conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
isFocused: PropTypes.func,
=======
refPoint: dtLocationShape.isRequired,
>>>>>>>
isFocused: PropTypes.func,
refPoint: dtLocationShape.isRequired, |
<<<<<<<
{props.withBar && <div className="bar-container"><div style={{ color: color || 'currentColor' }} className={cx('bar', mode, largeClass)} ><div className="bar-inner" /></div></div>}
=======
{props.withBar && <div className="bar-container"><div className={cx('bar', mode)} ><div className="bar-inner" /></div></div>}
>>>>>>>
{props.withBar && <div className="bar-container"><div style={{ color: color || 'currentColor' }} className={cx('bar', mode)} ><div className="bar-inner" /></div></div>}
<<<<<<<
mode: React.PropTypes.string.isRequired,
color: React.PropTypes.string,
text: React.PropTypes.node,
large: React.PropTypes.bool,
vertical: React.PropTypes.bool,
className: React.PropTypes.string,
hasDisruption: React.PropTypes.bool,
fadeLong: React.PropTypes.bool,
withBar: React.PropTypes.bool.isRequired,
isCallAgency: React.PropTypes.bool.isRequired,
=======
mode: PropTypes.string.isRequired,
text: PropTypes.node,
vertical: PropTypes.bool,
className: PropTypes.string,
hasDisruption: PropTypes.bool,
fadeLong: PropTypes.bool,
withBar: PropTypes.bool.isRequired,
isCallAgency: PropTypes.bool.isRequired,
>>>>>>>
mode: PropTypes.string.isRequired,
color: React.PropTypes.string,
text: PropTypes.node,
vertical: PropTypes.bool,
className: PropTypes.string,
hasDisruption: PropTypes.bool,
fadeLong: PropTypes.bool,
withBar: PropTypes.bool.isRequired,
isCallAgency: PropTypes.bool.isRequired, |
<<<<<<<
import { shouldDisplayPopup } from '../util/Feedback';
import { openFeedbackModal } from '../action/feedbackActions';
const feedbackPanel = (
<LazilyLoad modules={{ Panel: () => importLazy(System.import('./FeedbackPanel')) }} >
{({ Panel }) => <Panel />}
</LazilyLoad>
);
const messageBar = (
<LazilyLoad modules={{ Bar: () => importLazy(System.import('./MessageBar')) }} >
{({ Bar }) => <Bar />}
</LazilyLoad>
);
=======
import MessageBar from './MessageBar';
import FavouritesPanel from './FavouritesPanel';
import NearbyRoutesPanel from './NearbyRoutesPanel';
import PageFooter from './PageFooter';
>>>>>>>
import PageFooter from './PageFooter';
const feedbackPanel = (
<LazilyLoad modules={{ Panel: () => importLazy(System.import('./FeedbackPanel')) }} >
{({ Panel }) => <Panel />}
</LazilyLoad>
);
const messageBar = (
<LazilyLoad modules={{ Bar: () => importLazy(System.import('./MessageBar')) }} >
{({ Bar }) => <Bar />}
</LazilyLoad>
);
<<<<<<<
{messageBar}
<MapWithTracking breakpoint={this.props.breakpoint} showStops tab={selectedTab}>
=======
<MessageBar />
<MapWithTracking
breakpoint={this.props.breakpoint} showStops showScaleBar tab={selectedTab}
>
>>>>>>>
{messageBar}
<MapWithTracking
breakpoint={this.props.breakpoint} showStops showScaleBar tab={selectedTab}
>
<<<<<<<
{feedbackPanel}
=======
<div id="page-footer-container">
<PageFooter content={(config.footer && config.footer.content) || []} />
</div>
<FeedbackPanel />
>>>>>>>
<div id="page-footer-container">
<PageFooter content={(config.footer && config.footer.content) || []} />
</div>
{feedbackPanel}
<<<<<<<
<MapWithTracking breakpoint={this.props.breakpoint} showStops >
{messageBar}
=======
<MapWithTracking breakpoint={this.props.breakpoint} showStops showScaleBar>
<MessageBar />
>>>>>>>
<MapWithTracking breakpoint={this.props.breakpoint} showStops showScaleBar>
{messageBar} |
<<<<<<<
showTicketInformation: true,
useTicketIcons: true,
ticketLink: 'https://www.hsl.fi/uudetvyöhykkeet',
=======
>>>>>>>
useTicketIcons: true, |
<<<<<<<
=======
L.control.attribution({
position: 'bottomleft',
prefix: '© <a href="http://osm.org/copyright">OpenStreetMap</a>',
}).addTo(this.refs.map.leafletElement);
if (this.props.showScaleBar) {
L.control.scale({ imperial: false, position: config.map.controls.scale.position })
.addTo(this.refs.map.leafletElement);
}
if (!this.props.disableZoom || L.Browser.touch) {
L.control.zoom({ position: config.map.controls.zoom.position })
.addTo(this.refs.map.leafletElement);
}
>>>>>>> |
<<<<<<<
relayData={relayData.data}
=======
geolocationStarter={geolocationStarter}
relayData={relayData != null ? relayData.data : []}
>>>>>>>
relayData={relayData != null ? relayData.data : []} |
<<<<<<<
=======
const jsdom = new JSDOM('<!doctype html><html><body></body></html>', {
url: 'https://localhost:8080',
});
const { window } = jsdom;
// For Google Tag Manager
window.dataLayer = [];
const copyProps = (src, target) => {
const props = Object.getOwnPropertyNames(src)
.filter(prop => typeof target[prop] === 'undefined')
.reduce(
(result, prop) => ({
...result,
[prop]: Object.getOwnPropertyDescriptor(src, prop),
}),
{},
);
Object.defineProperties(target, props);
};
global.window = window;
global.document = window.document;
global.navigator = {
userAgent: 'node.js',
};
copyProps(window, global);
>>>>>>> |
<<<<<<<
import { FormattedMessage } from 'react-intl';
import getContext from 'recompose/getContext';
=======
import { FormattedMessage, intlShape } from 'react-intl';
>>>>>>>
import getContext from 'recompose/getContext';
import { FormattedMessage, intlShape } from 'react-intl';
<<<<<<<
const SummaryRow = (props) => {
=======
// XXX fix visual test, now only mobile layout is tested
export default function SummaryRow(props, { breakpoint, intl: { formatMessage } }) {
>>>>>>>
const SummaryRow = (props, { intl: { formatMessage } }) => {
<<<<<<<
const NOW = moment();
const sameDay = dateOrEmpty(startTime, NOW) === '';
=======
const itineraryLabel = formatMessage({ id: 'itinerary-page.title', defaultMessage: 'Itinerary' });
>>>>>>>
const NOW = moment();
const sameDay = dateOrEmpty(startTime, NOW) === '';
const itineraryLabel = formatMessage({ id: 'itinerary-page.title', defaultMessage: 'Itinerary' });
<<<<<<<
<span className="flex-grow itinerary-heading">
<FormattedMessage
id="itinerary-page.title"
defaultMessage="Itinerary"
tagName="h2"
/>
</span>,
<div
=======
<FormattedMessage
id="itinerary-page.title"
defaultMessage="Itinerary"
tagName="h2"
/>,
<button
title={itineraryLabel}
>>>>>>>
<span className="flex-grow itinerary-heading">
<FormattedMessage
id="itinerary-page.title"
defaultMessage="Itinerary"
tagName="h2"
/>
</span>,
<button
title={itineraryLabel}
<<<<<<<
breakpoint: React.PropTypes.string.isRequired,
=======
};
SummaryRow.contextTypes = {
breakpoint: React.PropTypes.string,
intl: intlShape.isRequired,
>>>>>>>
breakpoint: React.PropTypes.string.isRequired,
};
SummaryRow.contextTypes = {
intl: intlShape.isRequired, |
<<<<<<<
import ReactCSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
=======
import { routerShape } from 'react-router';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
>>>>>>>
import { routerShape } from 'react-router';
import ReactCSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; |
<<<<<<<
Memory.time = Game.time;
=======
if (Game.time % 200 === 0) {
console.log(Game.time, 'TooAngel AI - All good');
}
>>>>>>>
Memory.time = Game.time;
if (Game.time % 200 === 0) {
console.log(Game.time, 'TooAngel AI - All good');
} |
<<<<<<<
this.say('R:p-1: ');
var creepPos = this.pos;
let returnCode = this.moveTo(_.min(search.path, function(object) {
return object.getRangeTo(creepPos);
}), {
reusePath: 0
});
if (returnCode == OK) {
=======
this.say('R:p-1: ' + this.pos.getDirectionTo(search.path[0]));
let returnCode = this.move(this.pos.getDirectionTo(search.path[0]));
if (returnCode === OK) {
>>>>>>>
this.say('R:p-1: ' + this.pos.getDirectionTo(search.path[0]));
var creepPos = this.pos;
let returnCode = this.moveTo(_.min(search.path, function(object) {
return object.getRangeTo(creepPos);
}), {
reusePath: 0
});
if (returnCode == OK) { |
<<<<<<<
import { parse, format, setYear, setMonth, getYear } from 'date-fns';
import React, { Component } from 'react';
=======
/** @jsx jsx */
import { jsx } from '@emotion/core';
import { parse, format, setYear, setMonth } from 'date-fns';
import { Component } from 'react';
>>>>>>>
/** @jsx jsx */
import { jsx } from '@emotion/core';
import { parse, format, setYear, setMonth, getYear } from 'date-fns';
import { Component } from 'react'; |
<<<<<<<
<Container>
<AuthProvider intitialUserValue={user}>
<ApolloProvider client={apolloClient}>
<StylesBase />
<Navbar />
<Component {...pageProps} />
</ApolloProvider>
</AuthProvider>
</Container>
=======
<ToastProvider>
<Container>
<AuthProvider intitialUserValue={user}>
<ApolloProvider client={apolloClient}>
<ApolloHooksProvider client={apolloClient}>
<Navbar />
<Component {...pageProps} />
</ApolloHooksProvider>
</ApolloProvider>
</AuthProvider>
</Container>
</ToastProvider>
>>>>>>>
<ToastProvider>
<Container>
<AuthProvider intitialUserValue={user}>
<ApolloProvider client={apolloClient}>
<ApolloHooksProvider client={apolloClient}>
<StylesBase />
<Navbar />
<Component {...pageProps} />
</ApolloHooksProvider>
</ApolloProvider>
</AuthProvider>
</Container>
</ToastProvider> |
<<<<<<<
mergeWhereClause,
=======
objMerge,
defaultObj,
arrayToObject,
flatten,
>>>>>>>
mergeWhereClause,
objMerge,
defaultObj,
arrayToObject,
flatten,
<<<<<<<
test('mergeWhereClause', () => {
let args = { a: 1 };
// Non-objects for where clause, simply return
expect(mergeWhereClause(args, undefined)).toEqual(args);
expect(mergeWhereClause(args, true)).toEqual(args);
expect(mergeWhereClause(args, 10)).toEqual(args);
let where = {};
expect(mergeWhereClause(args, where)).toEqual({ a: 1 });
where = { b: 20 };
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20 } });
args = { a: 1, where: { b: 2, c: 3, d: 4 } };
where = { b: 20, c: 30 };
expect(mergeWhereClause(args, where)).toEqual({
a: 1,
where: { AND: [{ b: 2, c: 3, d: 4 }, { b: 20, c: 30 }] },
});
args = { a: 1, where: {} };
where = { b: 20, c: 30 };
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20, c: 30 } });
args = { a: 1, where: { b: 20, c: 30 } };
where = {};
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20, c: 30 } });
});
test('mergeWhereClause doesnt clobber arrays', () => {
const args = { a: 1, where: { b: 2, c: ['1', '2'] } };
const where = { d: 20, c: ['3', '4'] };
expect(mergeWhereClause(args, where)).toEqual({
a: 1,
where: { AND: [{ b: 2, c: ['1', '2'] }, { d: 20, c: ['3', '4'] }] },
});
});
=======
test('objMerge', () => {
const obj1 = {
a: 1,
b: 2,
c: 3,
};
const obj2 = {
b: 10,
c: 11,
d: 12,
};
const obj3 = {
c: 20,
e: 30,
};
expect(objMerge([obj1, obj2, obj3])).toEqual({
a: 1,
b: 10,
c: 20,
d: 12,
e: 30,
});
});
test('defaultObj', () => {
expect(defaultObj(['a', 'b', 'c'], 1)).toEqual({ a: 1, b: 1, c: 1 });
});
test('arrayToObject', () => {
const pets = [
{ name: 'a', animal: 'cat' },
{ name: 'b', animal: 'dog' },
{ name: 'c', animal: 'cat' },
{ name: 'd', animal: 'dog' },
];
expect(arrayToObject(pets, 'name')).toEqual({
a: { name: 'a', animal: 'cat' },
b: { name: 'b', animal: 'dog' },
c: { name: 'c', animal: 'cat' },
d: { name: 'd', animal: 'dog' },
});
expect(arrayToObject(pets, 'name', pet => pet.animal)).toEqual({
a: 'cat',
b: 'dog',
c: 'cat',
d: 'dog',
});
});
test('flatten', () => {
const a = [[1, 2, 3], [4, 5], 6, [[7, 8], [9, 10]]];
expect(flatten([])).toEqual([]);
expect(flatten([1, 2, 3])).toEqual([1, 2, 3]);
expect(flatten([[1, 2, 3]])).toEqual([1, 2, 3]);
expect(flatten(a)).toEqual([1, 2, 3, 4, 5, 6, [7, 8], [9, 10]]);
});
>>>>>>>
test('objMerge', () => {
const obj1 = {
a: 1,
b: 2,
c: 3,
};
const obj2 = {
b: 10,
c: 11,
d: 12,
};
const obj3 = {
c: 20,
e: 30,
};
expect(objMerge([obj1, obj2, obj3])).toEqual({
a: 1,
b: 10,
c: 20,
d: 12,
e: 30,
});
});
test('defaultObj', () => {
expect(defaultObj(['a', 'b', 'c'], 1)).toEqual({ a: 1, b: 1, c: 1 });
});
test('arrayToObject', () => {
const pets = [
{ name: 'a', animal: 'cat' },
{ name: 'b', animal: 'dog' },
{ name: 'c', animal: 'cat' },
{ name: 'd', animal: 'dog' },
];
expect(arrayToObject(pets, 'name')).toEqual({
a: { name: 'a', animal: 'cat' },
b: { name: 'b', animal: 'dog' },
c: { name: 'c', animal: 'cat' },
d: { name: 'd', animal: 'dog' },
});
expect(arrayToObject(pets, 'name', pet => pet.animal)).toEqual({
a: 'cat',
b: 'dog',
c: 'cat',
d: 'dog',
});
});
test('flatten', () => {
const a = [[1, 2, 3], [4, 5], 6, [[7, 8], [9, 10]]];
expect(flatten([])).toEqual([]);
expect(flatten([1, 2, 3])).toEqual([1, 2, 3]);
expect(flatten([[1, 2, 3]])).toEqual([1, 2, 3]);
expect(flatten(a)).toEqual([1, 2, 3, 4, 5, 6, [7, 8], [9, 10]]);
});
test('mergeWhereClause', () => {
let args = { a: 1 };
// Non-objects for where clause, simply return
expect(mergeWhereClause(args, undefined)).toEqual(args);
expect(mergeWhereClause(args, true)).toEqual(args);
expect(mergeWhereClause(args, 10)).toEqual(args);
let where = {};
expect(mergeWhereClause(args, where)).toEqual({ a: 1 });
where = { b: 20 };
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20 } });
args = { a: 1, where: { b: 2, c: 3, d: 4 } };
where = { b: 20, c: 30 };
expect(mergeWhereClause(args, where)).toEqual({
a: 1,
where: { AND: [{ b: 2, c: 3, d: 4 }, { b: 20, c: 30 }] },
});
args = { a: 1, where: {} };
where = { b: 20, c: 30 };
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20, c: 30 } });
args = { a: 1, where: { b: 20, c: 30 } };
where = {};
expect(mergeWhereClause(args, where)).toEqual({ a: 1, where: { b: 20, c: 30 } });
});
test('mergeWhereClause doesnt clobber arrays', () => {
const args = { a: 1, where: { b: 2, c: ['1', '2'] } };
const where = { d: 20, c: ['3', '4'] };
expect(mergeWhereClause(args, where)).toEqual({
a: 1,
where: { AND: [{ b: 2, c: ['1', '2'] }, { d: 20, c: ['3', '4'] }] },
});
}); |
<<<<<<<
<PrimaryNavItem target="_blank" href={GITHUB_PROJECT} title="GitHub">
<MarkGithubIcon />
<A11yText>GitHub</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem
target="_blank"
href={graphiqlPath}
title="Graphiql Console"
>
<TerminalIcon />
<A11yText>Graphiql Console</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem to={`${adminPath}/style-guide`} title="Style Guide">
<TelescopeIcon />
<A11yText>Style Guide</A11yText>
</PrimaryNavItem>
{withAuth ? (
<Fragment>
<NavSeparator />
<SessionProvider {...{ signinPath, signoutPath, sessionPath }}>
{({ user, isLoading }) => {
if (isLoading) {
return (
<PrimaryNavItem title="Loading user info">
<EllipsisIcon />
<A11yText>Loading user info</A11yText>
</PrimaryNavItem>
);
} else if (user) {
return (
<PrimaryNavItem href={signoutPath} title="Sign Out">
<SignOutIcon />
<A11yText>Sign Out</A11yText>
</PrimaryNavItem>
);
}
return (
<PrimaryNavItem href={signinPath} title="Sign In">
<SignInIcon />
<A11yText>Sign In</A11yText>
</PrimaryNavItem>
);
}}
</SessionProvider>
</Fragment>
) : null}
=======
{ENABLE_DEV_FEATURES ? (
<Fragment>
<PrimaryNavItem
target="_blank"
href={GITHUB_PROJECT}
title="GitHub"
>
<MarkGithubIcon />
<A11yText>GitHub</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem
target="_blank"
href={graphiqlPath}
title="Graphiql Console"
>
<TerminalIcon />
<A11yText>Graphiql Console</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem to={`${adminPath}/style-guide`} title="Style Guide">
<TelescopeIcon />
<A11yText>Style Guide</A11yText>
</PrimaryNavItem>
<NavSeparator />
</Fragment>
) : null}
<PrimaryNavItem to={`${adminPath}/signin`} title="Sign Out">
<SignOutIcon />
<A11yText>Sign Out</A11yText>
</PrimaryNavItem>
>>>>>>>
{ENABLE_DEV_FEATURES ? (
<Fragment>
<PrimaryNavItem
target="_blank"
href={GITHUB_PROJECT}
title="GitHub"
>
<MarkGithubIcon />
<A11yText>GitHub</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem
target="_blank"
href={graphiqlPath}
title="Graphiql Console"
>
<TerminalIcon />
<A11yText>Graphiql Console</A11yText>
</PrimaryNavItem>
<NavSeparator />
<PrimaryNavItem to={`${adminPath}/style-guide`} title="Style Guide">
<TelescopeIcon />
<A11yText>Style Guide</A11yText>
</PrimaryNavItem>
<NavSeparator />
</Fragment>
) : null}
{withAuth ? (
<PrimaryNavItem href={signoutPath} title="Sign Out">
<SignOutIcon />
<A11yText>Sign Out</A11yText>
</PrimaryNavItem>
) : null} |
<<<<<<<
exports.Sponsor = {
fields: {
name: { type: Text },
website: { type: Text },
logo: { type: CloudinaryImage, adapter: cloudinaryAdapter },
},
};
exports.Organiser = {
fields: {
user: { type: Relationship, ref: 'User.organiser' },
order: { type: Number },
isOrganiser: { type: Checkbox },
role: { type: Text },
=======
const access = {
userIsAdmin: ({ authentication: { item: user } }) => user && user.isAdmin,
userIsAdminOrPath: path => ({ existingItem: item, authentication: { item: user } }) => {
if (!user) return false;
return user.isAdmin || user.id === item[path];
>>>>>>>
const access = {
userIsAdmin: ({ authentication: { item: user } }) => user && user.isAdmin,
userIsAdminOrPath: path => ({ existingItem: item, authentication: { item: user } }) => {
if (!user) return false;
return user.isAdmin || user.id === item[path];
<<<<<<<
// hooks: {
// validateInput: async ({ resolvedData, actions, addFieldValidationError }) => {
// const { task, data } = resolvedData;
// const x = await actions.query(`query {
// Task(where: { id: "${task}" }) {
// id
// taskDef { answerSchema }
// }
// }`);
// }
// }
=======
};
exports.Sponsor = {
access: access.readPublicWriteAdmin,
fields: {
name: { type: Text },
website: { type: Text },
logo: { type: CloudinaryImage, adapter: cloudinaryAdapter },
},
>>>>>>>
// hooks: {
// validateInput: async ({ resolvedData, actions, addFieldValidationError }) => {
// const { task, data } = resolvedData;
// const x = await actions.query(`query {
// Task(where: { id: "${task}" }) {
// id
// taskDef { answerSchema }
// }
// }`);
// }
// }
};
exports.Sponsor = {
access: access.readPublicWriteAdmin,
fields: {
name: { type: Text },
website: { type: Text },
logo: { type: CloudinaryImage, adapter: cloudinaryAdapter },
}, |
<<<<<<<
path={`${adminPath}/:list`}
render={() => <ListPage list={list} {...adminMeta} />}
=======
path="/admin/:list"
render={() => (
<ListPage key={listKey} list={list} {...adminMeta} />
)}
>>>>>>>
path={`${adminPath}/:list`}
render={() => (
<ListPage key={listKey} list={list} {...adminMeta} />
)} |
<<<<<<<
Decimal: require('./types/Decimal'),
=======
Color: require('./types/Color'),
Url: require('./types/Url'),
>>>>>>>
Decimal: require('./types/Decimal'),
Color: require('./types/Color'),
Url: require('./types/Url'), |
<<<<<<<
stringify(item, ctx, onComment, onChompKeep) {
if (!(item instanceof Node)) item = createNode(item, true)
=======
stringify(item, ctx, onComment) {
let tagObj
if (!(item instanceof Node)) {
tagObj = this.tags.find(
t => t.class && item instanceof t.class && !t.format
)
item = tagObj
? tagObj.createNode
? tagObj.createNode(item)
: new Scalar(item)
: createNode(item, true)
}
>>>>>>>
stringify(item, ctx, onComment, onChompKeep) {
let tagObj
if (!(item instanceof Node)) {
tagObj = this.tags.find(
t => t.class && item instanceof t.class && !t.format
)
item = tagObj
? tagObj.createNode
? tagObj.createNode(item)
: new Scalar(item)
: createNode(item, true)
}
<<<<<<<
if (item instanceof Pair) return item.toString(ctx, onComment, onChompKeep)
const tagObj = this.getTagObject(item)
=======
if (item instanceof Pair) return item.toString(ctx, onComment)
if (!tagObj) tagObj = this.getTagObject(item)
>>>>>>>
if (item instanceof Pair) return item.toString(ctx, onComment, onChompKeep)
if (!tagObj) tagObj = this.getTagObject(item) |
<<<<<<<
email: { type: Text },
dob: {
type: CalendarDay,
format: 'Do MMMM YYYY',
yearRangeFrom: 1901, //defaults to 100 years before the current year
yearRangeTo: 2022, //defaults to current year
yearPickerType: 'auto', //defaults to auto, could also be 'input' or 'string'
},
=======
email: { type: Text, unique: true },
dob: { type: CalendarDay, format: 'Do MMMM YYYY' },
>>>>>>>
email: { type: Text, unique: true },
dob: {
type: CalendarDay,
format: 'Do MMMM YYYY',
yearRangeFrom: 1901, //defaults to 100 years before the current year
yearRangeTo: 2022, //defaults to current year
yearPickerType: 'auto', //defaults to auto, could also be 'input' or 'string'
}, |
<<<<<<<
email: { type: Text, isUnique: true },
password: { type: Password, isRequired: true },
isAdmin: { type: Checkbox },
=======
email: { type: Text, isUnique: true, access: { read: access.userIsAdminOrPath('id') } },
password: { type: Password },
isAdmin: { type: Checkbox, access: { update: access.userIsAdmin } },
>>>>>>>
email: { type: Text, isUnique: true, access: { read: access.userIsAdminOrPath('id') } },
password: { type: Password, isRequired: true },
isAdmin: { type: Checkbox, access: { update: access.userIsAdmin } }, |
<<<<<<<
publicUrlTransformed(transformation: { width: "120" crop: "limit" }) {
url
}
=======
publicUrlTransformed(transformation: { width: "60", height: "60" })
>>>>>>>
publicUrlTransformed(transformation: { width: "120" crop: "limit" }) |
<<<<<<<
assert.strictEqual(requests.length, 1);
assert.strictEqual(
=======
assert.equal(requests.length, 1, 'Exactly one request was made');
assert.equal(
>>>>>>>
assert.strictEqual(requests.length, 1, 'Exactly one request was made');
assert.strictEqual(
<<<<<<<
assert.strictEqual(requests.length, 2);
assert.strictEqual(
=======
assert.equal(requests.length, 2, 'Exactly two requests were made');
assert.equal(
>>>>>>>
assert.strictEqual(requests.length, 2, 'Exactly two requests were made');
assert.strictEqual(
<<<<<<<
assert.strictEqual(err.message, 'Error in API: 400');
=======
assert.equal(err.message, 'Error in API: 400', 'Expect 400 error message');
>>>>>>>
assert.strictEqual(err.message, 'Error in API: 400', 'Expect 400 error message');
<<<<<<<
assert.strictEqual(err.message, 'Error in API: 500');
=======
assert.equal(err.message, 'Error in API: 500', 'Expect 500 error message');
>>>>>>>
assert.strictEqual(err.message, 'Error in API: 500', 'Expect 500 error message');
<<<<<<<
assert.strictEqual(
true,
=======
assert(
>>>>>>>
assert(
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(err, null);
assert.strictEqual(branch.session_id, newSessionId, 'branch session was replaced');
assert.strictEqual(branch.identity_id, newIdentityId, 'branch identity was replaced');
assert.strictEqual(branch.sessionLink, newLink, 'link was replaced');
=======
assert(!err, 'Expect no err');
assert.equal(branch.session_id, newSessionId, 'branch session was replaced');
assert.equal(branch.identity_id, newIdentityId, 'branch identity was replaced');
assert.equal(branch.sessionLink, newLink, 'link was replaced');
>>>>>>>
assert.strictEqual(err, null, 'Expect no err');
assert.strictEqual(branch.session_id, newSessionId, 'branch session was replaced');
assert.strictEqual(branch.identity_id, newIdentityId, 'branch identity was replaced');
assert.strictEqual(branch.sessionLink, newLink, 'link was replaced');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
<<<<<<<
assert.strictEqual(requests.length, indexOfLastInitRequest(2));
=======
assert.equal(requests.length, indexOfLastInitRequest(2), 'Expect requests length');
>>>>>>>
assert.strictEqual(requests.length, indexOfLastInitRequest(2), 'Expect requests length'); |
<<<<<<<
requestData['data'] = utils.merge(utils.whiteListJourneysLanguageData(session.get(self._storage) || {}), requestData['data']);
branch_view.handleBranchViewData(self._server, branchViewData, requestData, self._storage, data['has_app'], testFlag);
=======
branch_view.handleBranchViewData(self._server, branchViewData, requestData, self._storage, data['has_app'], testFlag, self);
>>>>>>>
requestData['data'] = utils.merge(utils.whiteListJourneysLanguageData(session.get(self._storage) || {}), requestData['data']);
branch_view.handleBranchViewData(self._server, branchViewData, requestData, self._storage, data['has_app'], testFlag, self); |
<<<<<<<
"function"===typeof a.b[e]?a.b[e](a.endpoint,e,c[e]):f)return{error:f};g+="/"+c[e]}var u={};for(e in a.a)if(a.a.hasOwnProperty(e)){if(f=a.a[e](a.endpoint,e,c[e]))return{error:f};f=c[e];"undefined"!==typeof f&&""!==f&&null!==f&&(u[e]=f)}if("POST"===a.method||"/v1/credithistory"===a.endpoint)try{c=d(c,u)}catch(p){return{error:p.message}}return{data:O(b,u,""),url:g}}
=======
"function"==typeof a.b[e]?a.b[e](a.endpoint,e,c[e]):f)return{error:f};g+="/"+c[e]}var t={};for(e in a.a)if(a.a.hasOwnProperty(e)){if(f=a.a[e](a.endpoint,e,c[e]))return{error:f};f=c[e];"undefined"!=typeof f&&""!==f&&null!==f&&(t[e]=f)}if("POST"===a.method||"/v1/credithistory"===a.endpoint)try{c=d(c,t)}catch(p){return{error:p.message}}"/v1/event"===a.endpoint&&(t.S=JSON.stringify(t.S||{}));return{data:O(b,t,""),url:g}}
>>>>>>>
"function"===typeof a.b[e]?a.b[e](a.endpoint,e,c[e]):f)return{error:f};g+="/"+c[e]}var t={};for(e in a.a)if(a.a.hasOwnProperty(e)){if(f=a.a[e](a.endpoint,e,c[e]))return{error:f};f=c[e];"undefined"!==typeof f&&""!==f&&null!==f&&(t[e]=f)}if("POST"===a.method||"/v1/credithistory"===a.endpoint)try{c=d(c,t)}catch(p){return{error:p.message}}"/v1/event"===a.endpoint&&(t.S=JSON.stringify(t.S||{}));return{data:O(b,t,""),url:g}}
<<<<<<<
W.prototype.addListener=function(b,a){"function"===typeof b&&void 0===a&&(a=b);a&&this.g.push({listener:a,event:b||null})};W.prototype.removeListener=function(b){b&&(this.g=this.g.filter(function(a){if(a.listener!==b)return a}))};
W.prototype.banner=V(0,function(b,a,c){"undefined"===typeof a.showAgain&&"undefined"!==typeof a.forgetHide&&(a.showAgain=a.forgetHide);var d={icon:a.icon||"",title:a.title||"",description:a.description||"",T:a.openAppButtonText||"View in app",M:a.downloadAppButtonText||"Download App",V:a.sendLinkText||"Send Link",U:a.phonePreviewText||"(999) 999-9999",m:"undefined"==typeof a.iframe?!0:a.iframe,w:"undefined"==typeof a.showiOS?!0:a.showiOS,X:"undefined"==typeof a.showiPad?!0:a.showiPad,v:"undefined"==
typeof a.showAndroid?!0:a.showAndroid,W:"undefined"==typeof a.showDesktop?!0:a.showDesktop,L:!!a.disableHide,s:"number"==typeof a.forgetHide?a.forgetHide:!!a.forgetHide,position:a.position||"top",J:a.customCSS||"",S:"undefined"==typeof a.mobileSticky?!1:a.mobileSticky,K:"undefined"==typeof a.desktopSticky?!0:a.desktopSticky,$:!!a.make_new_link};"undefined"!==typeof a.showMobile&&(d.w=a.showMobile,d.v=a.showMobile);this.D=Ka(this,d,c,this.c);b()});
=======
W.prototype.addListener=function(b,a){"function"==typeof b&&void 0===a&&(a=b);a&&this.g.push({listener:a,event:b||null})};W.prototype.removeListener=function(b){b&&(this.g=this.g.filter(function(a){if(a.listener!==b)return a}))};
W.prototype.banner=V(0,function(b,a,c){"undefined"===typeof a.showAgain&&"undefined"!==typeof a.forgetHide&&(a.showAgain=a.forgetHide);var d={icon:a.icon||"",title:a.title||"",description:a.description||"",U:a.openAppButtonText||"View in app",M:a.downloadAppButtonText||"Download App",W:a.sendLinkText||"Send Link",V:a.phonePreviewText||"(999) 999-9999",m:"undefined"==typeof a.iframe?!0:a.iframe,w:"undefined"==typeof a.showiOS?!0:a.showiOS,Y:"undefined"==typeof a.showiPad?!0:a.showiPad,v:"undefined"==
typeof a.showAndroid?!0:a.showAndroid,X:"undefined"==typeof a.showDesktop?!0:a.showDesktop,L:!!a.disableHide,s:"number"==typeof a.forgetHide?a.forgetHide:!!a.forgetHide,position:a.position||"top",J:a.customCSS||"",T:"undefined"==typeof a.mobileSticky?!1:a.mobileSticky,K:"undefined"==typeof a.desktopSticky?!0:a.desktopSticky,aa:!!a.make_new_link};"undefined"!=typeof a.showMobile&&(d.w=d.v=a.showMobile);this.D=Ka(this,d,c,this.c);b()});
>>>>>>>
W.prototype.addListener=function(b,a){"function"===typeof b&&void 0===a&&(a=b);a&&this.g.push({listener:a,event:b||null})};W.prototype.removeListener=function(b){b&&(this.g=this.g.filter(function(a){if(a.listener!==b)return a}))};
W.prototype.banner=V(0,function(b,a,c){"undefined"===typeof a.showAgain&&"undefined"!==typeof a.forgetHide&&(a.showAgain=a.forgetHide);var d={icon:a.icon||"",title:a.title||"",description:a.description||"",U:a.openAppButtonText||"View in app",M:a.downloadAppButtonText||"Download App",W:a.sendLinkText||"Send Link",V:a.phonePreviewText||"(999) 999-9999",m:"undefined"==typeof a.iframe?!0:a.iframe,w:"undefined"==typeof a.showiOS?!0:a.showiOS,Y:"undefined"==typeof a.showiPad?!0:a.showiPad,v:"undefined"==
typeof a.showAndroid?!0:a.showAndroid,X:"undefined"==typeof a.showDesktop?!0:a.showDesktop,L:!!a.disableHide,s:"number"==typeof a.forgetHide?a.forgetHide:!!a.forgetHide,position:a.position||"top",J:a.customCSS||"",T:"undefined"==typeof a.mobileSticky?!1:a.mobileSticky,K:"undefined"==typeof a.desktopSticky?!0:a.desktopSticky,aa:!!a.make_new_link};"undefined"!==typeof a.showMobile&&(d.w=a.showMobile,d.v=a.showMobile);this.D=Ka(this,d,c,this.c);b()}); |
<<<<<<<
if (CORDOVA_BUILD) { // jshint undef:false
this._permStorage = storage(true); // For storing data we need from run to run such as device_fingerprint_id and
// the session params from the first install.
this.sdk = "cordova" + config.version; // For mobile apps, we send the SDK version string that generated the request.
this.debug = false; // A debug install session will get a unique device id.
=======
if (config.CORDOVA_BUILD) {
// For storing data we need from run to run such as device_fingerprint_id and
// the session params from the first install.
this._permStorage = storage(true);
// A debug install session will get a unique device id.
this.debug = false;
>>>>>>>
if (CORDOVA_BUILD) { // jshint undef:false
this._permStorage = storage(true); // For storing data we need from run to run such as device_fingerprint_id and
// the session params from the first install.
this.sdk = "cordova" + config.version; // For mobile apps, we send the SDK version string that generated the request.
this.debug = false; // A debug install session will get a unique device id.
<<<<<<<
if (((resource.params && resource.params['link_click_id']) || (resource.queryPart && resource.queryPart['link_click_id'])) && this.link_click_id) { obj['link_click_id'] = this.link_click_id; }
=======
if (((resource.params && resource.params['sdk']) || (resource.queryPart && resource.queryPart['sdk'])) && this.sdk) { obj['sdk'] = this.sdk; }
>>>>>>>
if (((resource.params && resource.params['link_click_id']) || (resource.queryPart && resource.queryPart['link_click_id'])) && this.link_click_id) { obj['link_click_id'] = this.link_click_id; }
if (((resource.params && resource.params['sdk']) || (resource.queryPart && resource.queryPart['sdk'])) && this.sdk) { obj['sdk'] = this.sdk; }
<<<<<<<
if (((resource.params && resource.params['sdk']) || (resource.queryPart && resource.queryPart['sdk'])) && this.sdk) { obj['sdk'] = this.sdk; }
=======
if (((resource.params && resource.params['link_click_id']) || (resource.queryPart && resource.queryPart['link_click_id'])) && this.link_click_id) { obj['link_click_id'] = this.link_click_id; }
>>>>>>>
<<<<<<<
self._api(resources._r, { "v": config.version }, function(err, browser_fingerprint_id) {
if (err) { return finishInit(err, null); }
=======
self._api(resources._r, {}, function(err, browser_fingerprint_id) {
if (err) { finishInit(err, null); }
>>>>>>>
self._api(resources._r, { "sdk": config.version }, function(err, browser_fingerprint_id) {
if (err) { return finishInit(err, null); } |
<<<<<<<
=======
$(document.body).append(data);
>>>>>>> |
<<<<<<<
callback(null, utils.whiteListSessionData(utils.readStore()));
=======
var self = this;
this.pushQueue(function(callback) {
self.nextQueue();
callback(null, utils.whiteListSessionData(utils.readStore()));
}, this, [ callback ]);
>>>>>>>
<<<<<<<
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.profile, { "identity": identity }, function(err, data) {
callback(err, data);
});
=======
var self = this;
this.pushQueue(function(identity, callback) {
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.profile, { "identity": identity }, function(err, data) {
self.nextQueue();
callback(err, data);
});
}, this, [ identity, callback ]);
>>>>>>>
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.profile, { "identity": identity }, function(err, data) {
callback(err, data);
});
<<<<<<<
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.logout, {}, function(err) {
callback(err);
});
=======
var self = this;
this.pushQueue(function(callback) {
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.logout, {}, function(err) {
self.nextQueue();
callback(err);
});
}, this, [ callback ]);
>>>>>>>
if (!this.initialized) { return callback(utils.message(utils.messages.nonInit)); }
this._api(resources.logout, {}, function(err) {
callback(err);
});
<<<<<<<
});
=======
obj['data'] = JSON.stringify(obj['data']);
this._api(resources.link, obj, function(err, data) {
if (typeof callback == 'function') {
self.nextQueue();
callback(err, data['url']);
}
});
}, this, [ obj, callback ]);
>>>>>>>
});
<<<<<<<
if (!this.initialized) {
this.nextQueue();
return callback(utils.message(utils.messages.nonInit));
}
if (url) {
this._api(resources.linkClick, {
"link_url": url.replace('https://bnc.lt/', ''),
"click": "click"
}, function(err, data) {
utils.storeKeyValue("click_id", data["click_id"]);
if (err || data) { callback(err, data); }
});
}
=======
var self = this;
this.pushQueue(function(url, callback) {
if (!this.initialized) {
this.nextQueue();
return callback(utils.message(utils.messages.nonInit));
}
if (url) {
this._api(resources.linkClick, {
"link_url": url.replace('https://bnc.lt/', ''),
"click": "click"
}, function(err, data) {
self.nextQueue();
utils.storeKeyValue("click_id", data["click_id"]);
if (err || data) { callback(err, data); }
});
}
}, this, [ url, callback ]);
>>>>>>>
if (!this.initialized) {
return callback(utils.message(utils.messages.nonInit));
}
if (url) {
this._api(resources.linkClick, {
"link_url": url.replace('https://bnc.lt/', ''),
"click": "click"
}, function(err, data) {
utils.storeKeyValue("click_id", data["click_id"]);
if (err || data) { callback(err, data); }
});
}
<<<<<<<
if(obj["channel"] != "app banner") { obj["channel"] = 'sms'; }
=======
if (obj["channel"] != "app banner") { obj["channel"] = 'sms'; }
>>>>>>>
if (obj["channel"] != "app banner") { obj["channel"] = 'sms'; }
<<<<<<<
callback = callback || function() { };
=======
callback = callback || function() {};
var self = this;
>>>>>>>
callback = callback || function() {};
<<<<<<<
callback = callback || function() { };
if (!this.initialized) {
this.nextQueue();
return callback(utils.message(utils.messages.nonInit));
}
this._api(resources.referrals, {}, function(err, data) {
callback(err, data);
});
=======
callback = callback || function() {};
var self = this;
this.pushQueue(function(callback) {
if (!this.initialized) {
this.nextQueue();
return callback(utils.message(utils.messages.nonInit));
}
this._api(resources.referrals, {}, function(err, data) {
self.nextQueue();
callback(err, data);
});
}, this, [ callback ]);
>>>>>>>
callback = callback || function() {};
if (!this.initialized) {
return callback(utils.message(utils.messages.nonInit));
}
this._api(resources.referrals, {}, function(err, data) {
callback(err, data);
}); |
<<<<<<<
var async = require("async");
var utils = require('./utils');
=======
var hashGenerator = require("hasha");
var mapcache = require("./mapcache");
var compilerFactory = require("./compiler");
var getOptions = require("./getOptions");
>>>>>>>
var async = require("async");
var compilerFactory = require("./compiler");
var getOptions = require("./getOptions");
var utils = require('./utils'); |
<<<<<<<
c && (CORDOVA_BUILD && utils.store(c, d._permStorage), utils.store(c, d._storage), c.identity_id && (d.session_id = c.session_id.toString()), c.identity_id && (d.identity_id = c.identity_id.toString()), d.sessionLink = c.link, CORDOVA_BUILD && (d.device_fingerprint_id = c.device_fingerprint_id, d.link_click_id = c.link_click_id), d.init_state = init_states.INIT_SUCCEEDED);
=======
c && (CORDOVA_BUILD && utils.store(c, d._permStorage), utils.store(c, d._storage), d.session_id = c.session_id, d.identity_id = c.identity_id, d.sessionLink = c.link, CORDOVA_BUILD && (d.device_fingerprint_id = c.device_fingerprint_id, d.link_click_id = c.link_click_id), d.init_state = init_states.INIT_SUCCEEDED, c.data_parsed = c.data ? goog.json.parse(c.data) : null);
>>>>>>>
c && (CORDOVA_BUILD && utils.store(c, d._permStorage), utils.store(c, d._storage), c.identity_id && (d.session_id = c.session_id.toString()), c.identity_id && (d.identity_id = c.identity_id.toString()), d.sessionLink = c.link, CORDOVA_BUILD && (d.device_fingerprint_id = c.device_fingerprint_id, d.link_click_id = c.link_click_id), d.init_state = init_states.INIT_SUCCEEDED, c.data_parsed = c.data ? goog.json.parse(c.data) : null);
<<<<<<<
c.identity_id = e.identity_id.toString();
=======
e = e || {};
c.identity_id = e.identity_id;
>>>>>>>
e = e || {};
c.identity_id = e.identity_id.toString(); |
<<<<<<<
emberTemplates: {
files: 'core/client/templates/**/*.hbs',
tasks: ['emberTemplates']
},
ember: {
files: [
'core/client/**/*.js'
],
tasks: ['transpile', 'concat_sourcemap']
},
sass: {
files: ['<%= paths.adminOldAssets %>/sass/**/*'],
tasks: ['sass:admin']
},
=======
>>>>>>>
<<<<<<<
// Admin CSS
'<%= paths.adminOldAssets %>/css/*.css',
=======
>>>>>>>
<<<<<<<
// ### Config for grunt-contrib-sass
// Compile all the SASS!
sass: {
admin: {
files: {
'<%= paths.adminOldAssets %>/css/screen.css': '<%= paths.adminOldAssets %>/sass/screen.scss'
}
},
compress: {
options: {
style: 'compressed'
},
files: {
'<%= paths.adminOldAssets %>/css/screen.css': '<%= paths.adminOldAssets %>/sass/screen.scss'
}
}
},
=======
>>>>>>>
<<<<<<<
// run bundle
bundle: {
command: 'bundle install'
},
// install bourbon
bourbon: {
command: 'bourbon install --path <%= paths.adminOldAssets %>/sass/modules/'
},
=======
>>>>>>>
<<<<<<<
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'concat', 'copy:dev', 'emberBuild']);
=======
grunt.registerTask('default', 'Build JS & templates for development', ['update_submodules', 'handlebars', 'concat', 'copy:dev']);
>>>>>>>
grunt.registerTask('default', 'Build JS & templates for development', ['update_submodules', 'handlebars', 'concat', 'copy:dev', 'emberBuild']); |
<<<<<<<
* The `forgetHide` property defaults to false, and when set to true, will forget if the user has opened the banner previously, and thus will always show the banner to them even if they have closed it in the past.
* The `position` property defaults to 'top', but can also be set to 'bottom' if you would prefer to show the app banner from the bottom of the screen.
* The `mobileSticky` property defaults to false, but can be set to true if you want the user to continue to see the app banner as they scroll.
* The `desktopSticky` property defaults to true, but can be set to false if you want the user to only see the app banner when they are scrolled to the top of the page.
=======
* The `forgetHide` property defaults to false, and when set to true, will forget if the user has opened the banner previously, and thus will always show the banner to them even if they have closed it in the past. It can also be set to an integer, in which case, it would forget that the user has previously hid the banner after X days.
* The `position` property, defaults to 'top', but can also be set to 'bottom' if you would prefer to show the app banner from the bottom of the screen.
* The `customCSS` property allows you to style the banner, even if it is isolated within an iframe. To assist you with device specific styles, the body element of the banner has one of three classes: `branch-banner-android`, `branch-banner-ios`, or `branch-banner-desktop`.
>>>>>>>
* The `forgetHide` property defaults to false, and when set to true, will forget if the user has opened the banner previously, and thus will always show the banner to them even if they have closed it in the past. It can also be set to an integer, in which case, it would forget that the user has previously hid the banner after X days.
* The `position` property, defaults to 'top', but can also be set to 'bottom' if you would prefer to show the app banner from the bottom of the screen.
* The `customCSS` property allows you to style the banner, even if it is isolated within an iframe. To assist you with device specific styles, the body element of the banner has one of three classes: `branch-banner-android`, `branch-banner-ios`, or `branch-banner-desktop`.
* The `mobileSticky` property defaults to false, but can be set to true if you want the user to continue to see the app banner as they scroll.
* The `desktopSticky` property defaults to true, but can be set to false if you want the user to only see the app banner when they are scrolled to the top of the page.
<<<<<<<
* forgetHide: true,
* position: 'bottom',
* mobileSticky: true,
* desktopSticky: true
=======
* forgetHide: true, // Can also be set to an integer. For example: 10, would forget that the user previously hid the banner after 10 days
* position: 'bottom',
* customCSS: '.title { color: #F00; }'
>>>>>>>
* forgetHide: true, // Can also be set to an integer. For example: 10, would forget that the user previously hid the banner after 10 days
* position: 'bottom',
* mobileSticky: true,
* desktopSticky: true,
* customCSS: '.title { color: #F00; }'
<<<<<<<
* openAppButtonText: 'Open', // Text to show on button if the user has the app installed
* downloadAppButtonText: 'Download', // Text to show on button if the user does not have the app installed
* sendLinkText: 'Send Link', // Text to show on desktop button to allow users to text themselves the app
* phonePreviewText: '+44 9999-9999', // The default phone placeholder is a US format number, localize the placeholder number with a custom placeholder with this option
* showiOS: true, // Should the banner be shown on iOS devices?
* showAndroid: true, // Should the banner be shown on Android devices?
* showDesktop: true, // Should the banner be shown on desktop devices?
* iframe: true, // Show banner in an iframe, recomended to isolate Branch banner CSS
* disableHide: false, // Should the user have the ability to hide the banner? (show's X on left side)
* forgetHide: false, // Should we remember or forget whether the user hid the banner?
* position: 'top', // Sets the position of the banner, options are: 'top' or 'bottom', and the default is 'top'
* mobileSticky: false, // Determines whether the mobile banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to false *this property only applies when the banner position is 'top'
* desktopSticky: true, // Determines whether the desktop banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to true *this property only applies when the banner position is 'top'
* make_new_link: false // Should the banner create a new link, even if a link already exists?
=======
* openAppButtonText: 'Open', // Text to show on button if the user has the app installed
* downloadAppButtonText: 'Download', // Text to show on button if the user does not have the app installed
* sendLinkText: 'Send Link', // Text to show on desktop button to allow users to text themselves the app
* phonePreviewText: '+44 9999-9999', // The default phone placeholder is a US format number, localize the placeholder number with a custom placeholder with this option
* showiOS: true, // Should the banner be shown on iOS devices?
* showAndroid: true, // Should the banner be shown on Android devices?
* showDesktop: true, // Should the banner be shown on desktop devices?
* iframe: true, // Show banner in an iframe, recomended to isolate Branch banner CSS
* disableHide: false, // Should the user have the ability to hide the banner? (show's X on left side)
* forgetHide: false, // Should we show the banner after the user closes it? Can be set to true, or an integer to show again after X days
* position: 'top', // Sets the position of the banner, options are: 'top' or 'bottom', and the default is 'top'
* customCSS: '.title { color: #F00; }', // Add your own custom styles to the banner that load last, and are gauranteed to take precedence, even if you leave the banner in an iframe
* make_new_link: false // Should the banner create a new link, even if a link already exists?
>>>>>>>
* openAppButtonText: 'Open', // Text to show on button if the user has the app installed
* downloadAppButtonText: 'Download', // Text to show on button if the user does not have the app installed
* sendLinkText: 'Send Link', // Text to show on desktop button to allow users to text themselves the app
* phonePreviewText: '+44 9999-9999', // The default phone placeholder is a US format number, localize the placeholder number with a custom placeholder with this option
* showiOS: true, // Should the banner be shown on iOS devices?
* showAndroid: true, // Should the banner be shown on Android devices?
* showDesktop: true, // Should the banner be shown on desktop devices?
* iframe: true, // Show banner in an iframe, recomended to isolate Branch banner CSS
* disableHide: false, // Should the user have the ability to hide the banner? (show's X on left side)
* forgetHide: false, // Should we show the banner after the user closes it? Can be set to true, or an integer to show again after X days
* position: 'top', // Sets the position of the banner, options are: 'top' or 'bottom', and the default is 'top'
* mobileSticky: false, // Determines whether the mobile banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to false *this property only applies when the banner position is 'top'
* desktopSticky: true, // Determines whether the desktop banner will be set `position: fixed;` (sticky) or `position: absolute;`, defaults to true *this property only applies when the banner position is 'top'
* customCSS: '.title { color: #F00; }', // Add your own custom styles to the banner that load last, and are gauranteed to take precedence, even if you leave the banner in an iframe
* make_new_link: false // Should the banner create a new link, even if a link already exists?
<<<<<<<
make_new_link: !!options['make_new_link'],
mobileSticky: typeof options['mobileSticky'] == 'undefined' ? false : options['mobileSticky'],
desktopSticky: typeof options['desktopSticky'] == 'undefined' ? true : options['desktopSticky']
=======
customCSS: options['customCSS'] || '',
make_new_link: !!options['make_new_link']
>>>>>>>
customCSS: options['customCSS'] || '',
mobileSticky: typeof options['mobileSticky'] == 'undefined' ? false : options['mobileSticky'],
desktopSticky: typeof options['desktopSticky'] == 'undefined' ? true : options['desktopSticky'],
make_new_link: !!options['make_new_link'] |
<<<<<<<
"undefined" == typeof b.forgetHide && "undefined" != typeof b.forgetHide && (b.forgetHide = b.forgetHide);
var d = {icon:b.icon || "", title:b.title || "", description:b.description || "", openAppButtonText:b.openAppButtonText || "View in app", downloadAppButtonText:b.downloadAppButtonText || "Download App", sendLinkText:b.sendLinkText || "Send Link", phonePreviewText:b.phonePreviewText || "(999) 999-9999", iframe:"undefined" == typeof b.iframe ? !0 : b.iframe, showiOS:"undefined" == typeof b.showiOS ? !0 : b.showiOS, showAndroid:"undefined" == typeof b.showAndroid ? !0 : b.showAndroid, showDesktop:"undefined" ==
typeof b.showDesktop ? !0 : b.showDesktop, disableHide:!!b.disableHide, forgetHide:"number" == typeof b.forgetHide ? b.forgetHide : !!b.forgetHide, position:b.position || "top", make_new_link:!!b.make_new_link};
=======
var d = {icon:b.icon || "", title:b.title || "", description:b.description || "", openAppButtonText:b.openAppButtsonText || "View in app", downloadAppButtonText:b.downloadAppButtonText || "Download App", sendLinkText:b.sendLinkText || "Send Link", phonePreviewText:b.phonePreviewText || "(999) 999-9999", iframe:"undefined" == typeof b.iframe ? !0 : b.iframe, showiOS:"undefined" == typeof b.showiOS ? !0 : b.showiOS, showAndroid:"undefined" == typeof b.showAndroid ? !0 : b.showAndroid, showDesktop:"undefined" ==
typeof b.showDesktop ? !0 : b.showDesktop, disableHide:!!b.disableHide, forgetHide:!!b.forgetHide, position:b.position || "top", customCSS:b.customCSS || "", make_new_link:!!b.make_new_link};
>>>>>>>
"undefined" == typeof b.forgetHide && "undefined" != typeof b.forgetHide && (b.forgetHide = b.forgetHide);
var d = {icon:b.icon || "", title:b.title || "", description:b.description || "", openAppButtonText:b.openAppButtonText || "View in app", downloadAppButtonText:b.downloadAppButtonText || "Download App", sendLinkText:b.sendLinkText || "Send Link", phonePreviewText:b.phonePreviewText || "(999) 999-9999", iframe:"undefined" == typeof b.iframe ? !0 : b.iframe, showiOS:"undefined" == typeof b.showiOS ? !0 : b.showiOS, showAndroid:"undefined" == typeof b.showAndroid ? !0 : b.showAndroid, showDesktop:"undefined" ==
typeof b.showDesktop ? !0 : b.showDesktop, disableHide:!!b.disableHide, forgetHide:"number" == typeof b.forgetHide ? b.forgetHide : !!b.forgetHide, position:b.position || "top", customCSS:b.customCSS || "", make_new_link:!!b.make_new_link}; |
<<<<<<<
if (resource.endpoint === "/v1/pageview" && data && data['journey_displayed']) {
// special case for pageview endpoint
utils.currentRequestBrttTag = resource.endpoint + '-1-brtt';
}
else {
utils.currentRequestBrttTag = resource.endpoint + '-brtt';
}
// appends instrumentation object to /v1/url or /v1/has-app request
if ((resource.endpoint === "/v1/url" || resource.endpoint === "/v1/has-app") && Object.keys(utils.instrumentation).length > 1) {
=======
utils.currentRequestBrttTag = resource.endpoint + '-brtt';
if ((resource.endpoint === "/v1/url" || resource.endpoint === "/v1/has-app") && Object.keys(utils.instrumentation).length > 1) {
>>>>>>>
if (resource.endpoint === "/v1/pageview" && data && data['journey_displayed']) {
// special case for pageview endpoint
utils.currentRequestBrttTag = resource.endpoint + '-1-brtt';
}
else {
utils.currentRequestBrttTag = resource.endpoint + '-brtt';
}
if ((resource.endpoint === "/v1/url" || resource.endpoint === "/v1/has-app") && Object.keys(utils.instrumentation).length > 1) { |
<<<<<<<
self.identity_id = data['identity_id'].toString();
=======
data = data || { };
self.identity_id = data['identity_id'];
>>>>>>>
data = data || { };
self.identity_id = data['identity_id'].toString(); |
<<<<<<<
assert.equal(
=======
assert.strictEqual(
'12345',
>>>>>>>
assert.strictEqual(
<<<<<<<
assert.equal(
=======
assert.strictEqual(
'12345',
>>>>>>>
assert.strictEqual(
<<<<<<<
assert.equal(
=======
assert.strictEqual(
'67890',
>>>>>>>
assert.strictEqual(
<<<<<<<
assert.equal(
=======
assert.strictEqual(
'67890',
>>>>>>>
assert.strictEqual( |
<<<<<<<
$scope.$parent.$digest($scope.vgCanPlay({$event: evt}));
=======
$scope.$digest($scope.vgCanPlay({$event: evt}));
>>>>>>>
$scope.$parent.$digest($scope.vgCanPlay({$event: evt}));
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
if ($scope.$root.$$phase != '$apply' && $scope.$root.$$phase != '$digest') {
$scope.$parent.$digest();
=======
if ($scope.$$phase != '$apply' && $scope.$$phase != '$digest') {
$scope.$digest();
>>>>>>>
if ($scope.$$phase != '$apply' && $scope.$$phase != '$digest') {
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest();
<<<<<<<
$scope.$parent.$digest();
=======
$scope.$digest();
>>>>>>>
$scope.$parent.$digest(); |
<<<<<<<
if ($API.isPlayerReady()) onPlayerReady();
else $API.$on(VG_EVENTS.ON_PLAYER_READY, onPlayerReady);
=======
if (API.isPlayerReady()) onPlayerReady();
else $rootScope.$on(VG_EVENTS.ON_PLAYER_READY, onPlayerReady);
>>>>>>>
if (API.isPlayerReady()) onPlayerReady();
else $API.$on(VG_EVENTS.ON_PLAYER_READY, onPlayerReady);
<<<<<<<
//if (!$scope.$$phase) $scope.$apply();
=======
scope.$apply();
>>>>>>>
//if (!$scope.$$phase) $scope.$apply();
<<<<<<<
$elem.bind("click", onClickPlayPause);
$API.$on(VG_EVENTS.ON_SET_STATE, onChangeState);
=======
elem.bind("click", onClickPlayPause);
$rootScope.$on(VG_EVENTS.ON_SET_STATE, onChangeState);
>>>>>>>
elem.bind("click", onClickPlayPause);
$API.$on(VG_EVENTS.ON_SET_STATE, onChangeState);
<<<<<<<
link: function($scope, $elem, $attr, $API) {
=======
link: function(scope, elem, attr) {
>>>>>>>
link: function($scope, $elem, $attr, $API) {
<<<<<<<
require: "^videogular",
link: function($scope, $elem, $attr, $API) {
=======
link: function(scope, elem, attr) {
>>>>>>>
require: "^videogular",
link: function($scope, $elem, $attr, $API) {
<<<<<<<
$API.$on(VG_EVENTS.ON_ENTER_FULLSCREEN, onEnterFullScreen);
$API.$on(VG_EVENTS.ON_EXIT_FULLSCREEN, onExitFullScreen);
}
=======
$rootScope.$on(VG_EVENTS.ON_ENTER_FULLSCREEN, onEnterFullScreen);
$rootScope.$on(VG_EVENTS.ON_EXIT_FULLSCREEN, onExitFullScreen);
>>>>>>>
$API.$on(VG_EVENTS.ON_ENTER_FULLSCREEN, onEnterFullScreen);
$API.$on(VG_EVENTS.ON_EXIT_FULLSCREEN, onExitFullScreen);
} |
<<<<<<<
// console.log('containerRect: ', containerRect)
const height = containerRect.height;
const width = containerRect.width;
=======
console.log('containerRect: ', containerRect);
const { height } = containerRect;
const { width } = containerRect;
>>>>>>>
// console.log('containerRect: ', containerRect)
const height = containerRect.height;
const width = containerRect.width;
<<<<<<<
.forceSimulation([...tableNodes, ...columnNodes])
.force("link", d3.forceLink([...referencedBy, ...pointsTo]).id(d => d.id).distance(400).strength(1))
.force("line", d3.forceLink(linksToColumns).id(d => d.id).distance(50))
.force("charge", d3.forceManyBody().strength(-600)) // Negative numbers indicate a repulsive force and positive numbers an attractive force. Strength defaults to -30 upon installation.
.force('collision', d3.forceCollide().radius(d => d.r || 20))
.force("x", d3.forceX()) // These two siblings push nodes towards the desired x and y position.
.force("y", d3.forceY()); // default to the middle
=======
.forceSimulation([...newTableNodes, ...newColumnNodes])
.force(
'link',
d3
.forceLink(newlinksToTables)
.id((d) => d.id)
.distance(400)
.strength(1)
)
.force(
'line',
d3
.forceLink(newlinksToColumns)
.id((d) => d.id)
.distance(50)
)
.force('charge', d3.forceManyBody().strength(-600)) // Negative numbers indicate a repulsive force and positive numbers an attractive force. Strength defaults to -30 upon installation.
.force(
'collision',
d3.forceCollide().radius((d) => d.r || 20)
)
.force('x', d3.forceX()) // These two siblings push nodes towards the desired x and y position.
.force('y', d3.forceY()); // default to the middle
>>>>>>>
.forceSimulation([...tableNodes, ...columnNodes])
.force(
'link',
d3
.forceLink([...referencedBy, ...pointsTo])
.id((d) => d.id)
.distance(400)
.strength(1)
)
.force(
'line',
d3
.forceLink(linksToColumns)
.id((d) => d.id)
.distance(50)
)
.force('charge', d3.forceManyBody().strength(-600)) // Negative numbers indicate a repulsive force and positive numbers an attractive force. Strength defaults to -30 upon installation.
.force(
'collision',
d3.forceCollide().radius((d) => d.r || 20)
)
.force('x', d3.forceX()) // These two siblings push nodes towards the desired x and y position.
.force('y', d3.forceY()); // default to the middle
<<<<<<<
.append("g")
.attr("stroke", "#000")
.attr("stroke-opacity", 0.6)
.selectAll("line")
.data(linksToColumns)
.join("line")
.attr("stroke-width", d => Math.sqrt(d.value))
// appending little triangles, path object, as arrowhead
// The <defs> element is used to store graphical objects that will be used at a later time
// The <marker> element defines the graphic that is to be used for drawing arrowheads or polymarkers
// on a given <path>, <line>, <polyline> or <polygon> element.
=======
.append('g')
.attr('stroke', '#000')
.attr('stroke-opacity', 0.6)
.selectAll('line')
.data(newlinksToColumns)
.join('line')
.attr('stroke-width', (d) => Math.sqrt(d.value));
// appending little triangles, path object, as arrowhead
// The <defs> element is used to store graphical objects that will be used at a later time
// The <marker> element defines the graphic that is to be used for drawing arrowheads or polymarkers
// on a given <path>, <line>, <polyline> or <polygon> element.
>>>>>>>
.append('g')
.attr('stroke', '#000')
.attr('stroke-opacity', 0.6)
.selectAll('line')
.data(linksToColumns)
.join('line')
.attr('stroke-width', (d) => Math.sqrt(d.value));
// appending little triangles, path object, as arrowhead
// The <defs> element is used to store graphical objects that will be used at a later time
// The <marker> element defines the graphic that is to be used for drawing arrowheads or polymarkers
// on a given <path>, <line>, <polyline> or <polygon> element.
<<<<<<<
.append("svg:marker")
.attr("id", String)
.attr("viewBox", "0 -5 10 10") // //the bound of the SVG viewport for the current SVG fragment. defines a coordinate system 10 wide and 10 high starting on (0,-5)
.attr("refX", 25) // x coordinate for the reference point of the marker. If circle is bigger, this need to be bigger.
.attr("refY", -1.5)
.attr("orient", "auto")
.attr("markerWidth", 13)
.attr("markerHeight", 13)
=======
.append('svg:marker')
.attr('id', String)
.attr('viewBox', '0 -5 10 10') // //the bound of the SVG viewport for the current SVG fragment. defines a coordinate system 10 wide and 10 high starting on (0,-5)
.attr('refX', 25) // x coordinate for the reference point of the marker. If circle is bigger, this need to be bigger.
.attr('refY', -1.5) // what's this?
.attr('orient', 'auto') // what's this?
.attr('markerWidth', 13) // what's this?
.attr('markerHeight', 13) // what's this?
>>>>>>>
.append('svg:marker')
.attr('id', String)
.attr('viewBox', '0 -5 10 10') // //the bound of the SVG viewport for the current SVG fragment. defines a coordinate system 10 wide and 10 high starting on (0,-5)
.attr('refX', 23) // x coordinate for the reference point of the marker. If circle is bigger, this need to be bigger.
.attr('refY', 0)
.attr('orient', 'auto')
.attr('markerWidth', 13)
.attr('markerHeight', 13)
<<<<<<<
.append("svg:path")
.attr("d", "M 0,-5 L 10,0 L 0,5")
=======
.append('svg:path') // what's this?
.attr('d', 'M 0,-5 L 10,0 L 0,5') // what's this?
>>>>>>>
.append('svg:path')
.attr('d', 'M 0,-5 L 10,0 L 0,5')
<<<<<<<
.append("svg:g")
.selectAll("path")
.data([...referencedBy, ...pointsTo])
.join("svg:path")
.attr("fill", "none")
.style('stroke', d => d.type === "pointsTo" ? "orange" : "blue")
.style('stroke-width','1.5px')
.attr("marker-end", "url(#end)");
//The marker-end attribute defines the arrowhead or polymarker that will be drawn at the final vertex of the given shape.
=======
.append('svg:g')
.selectAll('path')
.data(newlinksToTables)
.join('svg:path')
.attr('fill', 'none')
.style('stroke', (d) => (d.type === 'pointsTo' ? 'orange' : 'blue'))
.style('stroke-width', '1.5px')
.attr('marker-end', 'url(#end)');
// The marker-end attribute defines the arrowhead or polymarker that will be drawn at the final vertex of the given shape.
>>>>>>>
.append('svg:g')
.selectAll('path')
.data([...referencedBy, ...pointsTo])
.join('svg:path')
.attr('fill', 'none')
.style('stroke', (d) => (d.type === 'pointsTo' ? 'orange' : 'blue'))
.style('stroke-width', '1.5px')
.attr('marker-end', 'url(#end)');
//The marker-end attribute defines the arrowhead or polymarker that will be drawn at the final vertex of the given shape.
<<<<<<<
.append("g")
.attr("stroke", "#fff")
.attr("stroke-width", 1)
.selectAll("circle")
.data([...tableNodes, ...columnNodes])
.join("circle")
.attr("r", d => d.primary ? 30 : 15)
.attr("fill", d => d.primary ? "#9D00A0" : "powderblue")
=======
.append('g')
.attr('stroke', '#fff')
.attr('stroke-width', 1)
.selectAll('circle')
.data([...newTableNodes, ...newColumnNodes])
.join('circle')
.attr('r', (d) => (d.primary ? 30 : 15))
.attr('fill', (d) => (d.primary ? '#9D00A0' : 'powderblue'))
>>>>>>>
.append('g')
.attr('stroke', '#fff')
.attr('stroke-width', 1)
.selectAll('circle')
.data([...tableNodes, ...columnNodes])
.join('circle')
.attr('r', (d) => (d.primary ? 25 : 12))
.attr('fill', (d) => (d.primary ? '#9D00A0' : 'powderblue'))
<<<<<<<
const label = svg.append("g")
.attr("class", "labels")
.selectAll("text")
.data([...tableNodes, ...columnNodes])
.join("text")
=======
const label = svg
.append('g')
.attr('class', 'labels')
.selectAll('text')
.data([...newTableNodes, ...newColumnNodes])
.join('text')
>>>>>>>
const label = svg
.append('g')
.attr('class', 'labels')
.selectAll('text')
.data([...tableNodes, ...columnNodes])
.join('text')
<<<<<<<
label
.attr("x", d => d.x )
.attr("y", d => d.y )
=======
// node (restrict to bound)
// .attr("cx", function(d) { return d.x = Math.max(radius, Math.min(width - radius, d.x)); })
// .attr("cy", function(d) { return d.y = Math.max(radius, Math.min(height - radius, d.y)); });
label.attr('x', (d) => d.x).attr('y', (d) => d.y);
>>>>>>>
label.attr('x', (d) => d.x).attr('y', (d) => d.y); |
<<<<<<<
modulePathIgnorePatterns: ['<rootDir>/examples'],
testMatch: ['<rootDir>/tests/**/*.ts?(x)'],
preset: 'ts-jest',
=======
modulePathIgnorePatterns: ['<rootDir>/tests/env'],
>>>>>>>
modulePathIgnorePatterns: ['<rootDir>/tests/env'],
testMatch: ['<rootDir>/tests/**/*.ts?(x)'],
preset: 'ts-jest', |
<<<<<<<
if (postCSSPlugin.name === 'creator' && postCSSPlugin().postcssPlugin) {
plugins.push(postCSSPlugin(postcssConfigPlugins ? postcssConfigPlugins[pluginName] : {}));
=======
if (postCSSPlugin && postCSSPlugin.name === 'creator' && postCSSPlugin().postcssPlugin) {
plugins.push(postCSSPlugin(pluginsOptions ? pluginsOptions[pluginName] : {}));
>>>>>>>
if (postCSSPlugin && postCSSPlugin.name === 'creator' && postCSSPlugin().postcssPlugin) {
plugins.push(postCSSPlugin(postcssConfigPlugins ? postcssConfigPlugins[pluginName] : {})); |
<<<<<<<
task = new Task(taskData.id, self, taskData.subject, taskData.color, taskData.priority, taskData.from, taskData.to, taskData.data, taskData.est, taskData.lct);
=======
task = new Task(taskData.id, self, taskData.subject, taskData.classes, taskData.priority, taskData.from, taskData.to, taskData.data);
>>>>>>>
task = new Task(taskData.id, self, taskData.subject, taskData.color, taskData.classes, taskData.priority, taskData.from, taskData.to, taskData.data, taskData.est, taskData.lct);
<<<<<<<
var Task = function(id, row, subject, color, priority, from, to, data, est, lct) {
=======
var Task = function(id, row, subject, classes, priority, from, to, data) {
>>>>>>>
var Task = function(id, row, subject, color, classes, priority, from, to, data, est, lct) {
<<<<<<<
return new Task(self.id, self.row, self.subject, self.color, self.priority, self.from, self.to, self.data, self.est, self.lct);
=======
return new Task(self.id, self.row, self.subject, self.classes, self.priority, self.from, self.to, self.data);
>>>>>>>
return new Task(self.id, self.row, self.subject, self.color, self.classes, self.priority, self.from, self.to, self.data, self.est, self.lct); |
<<<<<<<
this.scroll = new Scroll(this);
this.body = new Body(this);
this.rowHeader = new RowHeader(this);
this.header = new Header(this);
this.labels = new Labels(this);
=======
// Add a watcher if a view related setting changed from outside of the Gantt. Update the gantt accordingly if so.
// All those changes need a recalculation of the header columns
$scope.$watch('viewScale+width+labelsWidth+columnWidth+timeFramesWorkingMode+timeFramesNonWorkingMode+columnMagnet', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
self.rebuildColumns();
}
});
$scope.$watchCollection('headers', function(newValues, oldValues) {
if (!angular.equals(newValues, oldValues)) {
self.rebuildColumns();
}
});
$scope.$watchCollection('headersFormats', function(newValues, oldValues) {
if (!angular.equals(newValues, oldValues)) {
self.rebuildColumns();
}
});
$scope.$watch('fromDate+toDate+autoExpand+taskOutOfRange', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
self.updateColumns();
}
});
$scope.$watch('currentDate+currentDateValue', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
self.setCurrentDate($scope.currentDateValue);
}
});
$scope.$watch('ganttElementWidth+labelsWidth+showLabelsColumn+maxHeight', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
updateColumnsMeta();
}
});
var updateVisibleColumns = function() {
self.visibleColumns = $filter('ganttColumnLimit')(self.columns, $scope.scrollLeft, $scope.scrollWidth);
angular.forEach(self.headers, function(headers, key) {
if (self.headers.hasOwnProperty(key)) {
self.visibleHeaders[key] = $filter('ganttColumnLimit')(headers, $scope.scrollLeft, $scope.scrollWidth);
}
});
};
var updateVisibleRows = function() {
var oldFilteredRows = self.filteredRows;
if ($scope.filterRow) {
self.filteredRows = $filter('filter')(self.rows, $scope.filterRow, $scope.filterRowComparator);
} else {
self.filteredRows = self.rows.slice(0);
}
var filterEventData;
if (!angular.equals(oldFilteredRows, self.filteredRows)) {
filterEventData = {rows: self.rows, filteredRows: self.filteredRows};
}
// TODO: Implement rowLimit like columnLimit to enhance performance for gantt with many rows
self.visibleRows = self.filteredRows;
if (filterEventData !== undefined) {
$scope.$emit(GANTT_EVENTS.ROWS_FILTERED, filterEventData);
}
};
var updateVisibleTasks = function() {
var oldFilteredTasks = [];
var filteredTasks = [];
var tasks = [];
angular.forEach(self.filteredRows, function(row) {
oldFilteredTasks = oldFilteredTasks.concat(row.filteredTasks);
row.updateVisibleTasks();
filteredTasks = filteredTasks.concat(row.filteredTasks);
tasks = tasks.concat(row.tasks);
});
var filterEventData;
if (!angular.equals(oldFilteredTasks, filteredTasks)) {
filterEventData = {tasks: tasks, filteredTasks: filteredTasks};
}
if (filterEventData !== undefined) {
$scope.$emit(GANTT_EVENTS.TASKS_FILTERED, filterEventData);
}
};
var updateVisibleObjects = function() {
updateVisibleRows();
updateVisibleTasks();
};
updateVisibleColumns();
updateVisibleObjects();
$scope.$watch('scrollLeft+scrollWidth', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
updateVisibleColumns();
updateVisibleTasks();
}
});
$scope.$watch('filterTask+filterTaskComparator', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
updateVisibleTasks();
}
});
$scope.$watch('filterRow+filterRowComparator', function(newValue, oldValue) {
if (!angular.equals(newValue, oldValue)) {
updateVisibleRows();
}
});
var setScrollAnchor = function() {
if ($scope.template.scrollable && $scope.template.scrollable.$element && self.columns.length > 0) {
var el = $scope.template.scrollable.$element[0];
var center = el.scrollLeft + el.offsetWidth / 2;
self.scrollAnchor = self.getDateByPosition(center);
}
};
var getExpandedFrom = function(from) {
from = from ? moment(from) : from;
var minRowFrom = from;
angular.forEach(self.rows, function(row) {
if (minRowFrom === undefined || minRowFrom > row.from) {
minRowFrom = row.from;
}
});
if (minRowFrom && (!from || minRowFrom < from)) {
return minRowFrom;
}
return from;
};
var getExpandedTo = function(to) {
to = to ? moment(to) : to;
var maxRowTo = to;
angular.forEach(self.rows, function(row) {
if (maxRowTo === undefined || maxRowTo < row.to) {
maxRowTo = row.to;
}
});
if (maxRowTo && (!$scope.toDate || maxRowTo > $scope.toDate)) {
return maxRowTo;
}
return to;
};
// Generates the Gantt columns according to the specified from - to date range. Uses the currently assigned column generator.
var generateColumns = function(from, to) {
if (!from) {
from = getDefaultFrom();
if (!from) {
return false;
}
}
if (!to) {
to = getDefaultTo();
if (!to) {
return false;
}
}
if (self.from === from && self.to === to) {
return false;
}
setScrollAnchor();
self.from = from;
self.to = to;
self.columns = self.columnGenerator.generate(from, to);
self.headers = self.headerGenerator.generate(self.columns);
self.previousColumns = [];
self.nextColumns = [];
updateColumnsMeta();
return true;
};
var setColumnsWidth = function(width, originalWidth, columns) {
if (width && originalWidth && columns) {
var widthFactor = Math.abs(width / originalWidth);
angular.forEach(columns, function(column) {
column.left = widthFactor * column.originalSize.left;
column.width = widthFactor * column.originalSize.width;
angular.forEach(column.timeFrames, function(timeFrame) {
timeFrame.left = widthFactor * timeFrame.originalSize.left;
timeFrame.width = widthFactor * timeFrame.originalSize.width;
});
});
}
};
var updateColumnsMeta = function() {
var lastColumn = self.getLastColumn();
self.originalWidth = lastColumn !== undefined ? lastColumn.originalSize.left + lastColumn.originalSize.width : 0;
if ($scope.columnWidth === undefined) {
var newWidth = $scope.ganttElementWidth - ($scope.showLabelsColumn ? $scope.labelsWidth : 0);
if ($scope.maxHeight > 0) {
newWidth = newWidth - layout.getScrollBarWidth();
}
setColumnsWidth(newWidth, self.originalWidth, self.previousColumns);
setColumnsWidth(newWidth, self.originalWidth, self.columns);
setColumnsWidth(newWidth, self.originalWidth, self.nextColumns);
angular.forEach(self.headers, function(header) {
setColumnsWidth(newWidth, self.originalWidth, header);
});
}
self.width = lastColumn !== undefined ? lastColumn.left + lastColumn.width : 0;
if (self._currentDate !== undefined) {
self.setCurrentDate(self._currentDate);
}
$scope.currentDatePosition = self.getPositionByDate($scope.currentDateValue);
self.updateTasksPosAndSize();
self.updateTimespansPosAndSize();
updateVisibleColumns();
updateVisibleObjects();
};
var expandExtendedColumnsForPosition = function(x) {
if (x < 0) {
var firstColumn = self.getFirstColumn();
var from = firstColumn.date;
var firstExtendedColumn = self.getFirstColumn(true);
if (!firstExtendedColumn || firstExtendedColumn.left > x) {
self.previousColumns = self.columnGenerator.generate(from, undefined, -x, 0, true);
}
return true;
} else if (x > self.width) {
var lastColumn = self.getLastColumn();
var endDate = lastColumn.getDateByPosition(lastColumn.width);
var lastExtendedColumn = self.getLastColumn(true);
if (!lastExtendedColumn || lastExtendedColumn.left + lastExtendedColumn.width < x) {
self.nextColumns = self.columnGenerator.generate(endDate, undefined, x - self.width, self.width, false);
}
return true;
}
return false;
};
var expandExtendedColumnsForDate = function(date) {
var firstColumn = self.getFirstColumn();
var from;
if (firstColumn) {
from = firstColumn.date;
}
var lastColumn = self.getLastColumn();
var endDate;
if (lastColumn) {
endDate = lastColumn.getDateByPosition(lastColumn.width);
}
if (from && date < from) {
var firstExtendedColumn = self.getFirstColumn(true);
if (!firstExtendedColumn || firstExtendedColumn.date > date) {
self.previousColumns = self.columnGenerator.generate(from, date, undefined, 0, true);
}
return true;
} else if (endDate && date > endDate) {
var lastExtendedColumn = self.getLastColumn(true);
if (!lastExtendedColumn || endDate < lastExtendedColumn) {
self.nextColumns = self.columnGenerator.generate(endDate, date, undefined, self.width, false);
}
return true;
}
return false;
};
// Sets the Gantt view scale. Call reGenerateColumns to make changes visible after changing the view scale.
// The headers are shown depending on the defined view scale.
self.buildGenerators = function() {
self.columnGenerator = new ColumnGenerator($scope);
self.headerGenerator = new HeaderGenerator($scope);
};
var getDefaultFrom = function() {
var defaultFrom;
angular.forEach(self.timespans, function(timespan) {
if (defaultFrom === undefined || timespan.from < defaultFrom) {
defaultFrom = timespan.from;
}
});
>>>>>>>
$scope.$watch('timeFrames', function(newValues, oldValues) {
if (!angular.equals(newValues, oldValues)) {
this.calendar.clearTimeFrames();
this.calendar.registerTimeFrames($scope.timeFrames);
this.columnsManager.generateColumns();
}
});
$scope.$watch('dateFrames', function(newValues, oldValues) {
if (!angular.equals(newValues, oldValues)) {
this.calendar.clearTimeFrames();
this.calendar.registerTimeFrames($scope.timeFrames);
this.columnsManager.generateColumns();
}
});
this.scroll = new Scroll(this);
this.body = new Body(this);
this.rowHeader = new RowHeader(this);
this.header = new Header(this);
this.labels = new Labels(this);
<<<<<<<
=======
return defaultTo;
};
self.rebuildColumns = function() {
self.buildGenerators();
self.clearColumns();
self.updateColumns();
};
self.updateColumns = function() {
var from = $scope.fromDate;
var to = $scope.toDate;
if ($scope.taskOutOfRange === 'expand') {
from = getExpandedFrom(from);
to = getExpandedTo(to);
}
generateColumns(from, to);
};
>>>>>>>
<<<<<<<
=======
self.rebuildColumns();
self.setCurrentDate($scope.currentDateValue);
};
>>>>>>> |
<<<<<<<
["./tree", solidity.current.sourceRange], (ast, range) =>
findRange(ast, range.start, range.length)
=======
["/current/tree", solidity.next.sourceRange],
(ast, range) => findRange(ast, range.start, range.length)
>>>>>>>
["./tree", solidity.next.sourceRange],
(ast, range) => findRange(ast, range.start, range.length)
<<<<<<<
["./tree", "./pointer"], (ast, pointer) =>
jsonpointer.get(ast, pointer)
=======
["/current/tree", "./pointer"], (ast, pointer) =>
(pointer)
? jsonpointer.get(ast, pointer)
: jsonpointer.get(ast, "")
>>>>>>>
["./tree", "./pointer"], (ast, pointer) =>
(pointer)
? jsonpointer.get(ast, pointer)
: jsonpointer.get(ast, "") |
<<<<<<<
function list(verbose, asJson) {
var data = { auth : { client_id : auth.getClient(), user : auth.getUser() }, default_instance : getInstance() };
=======
function list(verbose, asJson, sortBy) {
var data = { auth : { client_id : auth.getClient() }, default_instance : getInstance() };
>>>>>>>
function list(verbose, asJson, sortBy) {
var data = { auth : { client_id : auth.getClient(), user : auth.getUser() }, default_instance : getInstance() }; |
<<<<<<<
,"mimic": "500tech.github.io/mimic"
=======
>>>>>>> |
<<<<<<<
=======
"wjy": "wjy20030407.github.io",
"wo": "iguanren.github.io/wo",
>>>>>>>
"wjy": "wjy20030407.github.io", |
<<<<<<<
'use strict';
var path = require('path');
var fs = require('fs');
var yaml = require('js-yaml');
var http = require('http');
var assert = require('assert');
var format = require('format');
var config = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '..', '..', 'config', '_config.yml'), 'utf8'));
process.env.PORT = (config.port < 3000 ? config.port + 3000 : config.port + 1); // don't use configured port
/***
* MaxCDN Stub
*/
var MaxCDN = require('maxcdn');
MaxCDN.prototype.get = function (_, cb) {
cb(null, require('../stubs/popular.json'));
return;
};
require('../../app.js');
var host = format('http://localhost:%s', process.env.PORT);
var response;
before(function(done) {
http.get(host + '/extras/popular', function(res) {
response = res;
response.body = '';
res.on('data', function(chunk) {
response.body += chunk;
});
res.on('end', function() {
done();
});
});
});
describe('popular', function() {
/*it('/extras/popular :: 200\'s', function(done) {
assert(response);
assert.equal(200, response.statusCode);
done();
});*/
it('contains authors', function(done) {
config.authors.forEach(function(author) {
assert(response.body.indexOf(author));
});
done();
});
it('contains analytics', function(done) {
assert(response.body.indexOf(config.google_analytics.account_id));
assert(response.body.indexOf(config.google_analytics.domain_name));
assert(response.body.indexOf('.google-analytics.com/ga.js'));
done();
});
describe('contains bootswatch', function() {
config.bootswatch.themes.forEach(function(theme) {
var file = config.bootswatch.bootstrap
.replace('SWATCH_NAME', theme)
.replace('SWATCH_VERSION', config.bootstrap.version)
.replace('https://maxcdn.bootstrapcdn.com', '');
it(format('-> %s', theme), function(done) {
assert(response.body.indexOf(file));
done();
});
});
});
describe('contains bootstrap', function() {
config.bootstrap.forEach(function(bootstrap) {
it(format('-> %s', bootstrap.version), function(done) {
assert(response.body.indexOf(bootstrap.css_complete.replace('https://maxcdn.bootstrapcdn.com', '')));
assert(response.body.indexOf(bootstrap.javascript.replace('https://maxcdn.bootstrapcdn.com', '')));
if (bootstrap.css_no_icons) {
assert(response.body.indexOf(bootstrap.css_no_icons.replace('https://maxcdn.bootstrapcdn.com', '')));
}
done();
});
});
});
});
=======
// 'use strict';
//
// var path = require('path');
// var fs = require('fs');
// var yaml = require('js-yaml');
// var http = require('http');
// var assert = require('assert');
// var format = require('format');
//
// var config = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '..', '..', 'config', '_config.yml'), 'utf8'));
// process.env.PORT = (config.port < 3000 ? config.port + 3000 : config.port + 1); // don't use configured port
//
// /***
// * MaxCDN Stub
// */
// var MaxCDN = require('maxcdn');
// MaxCDN.prototype.get = function (_, cb) {
// cb(null, require('../stubs/popular.json'));
// return;
// };
//
// require('../../app.js');
// var host = format('http://localhost:%s', process.env.PORT);
// var response;
//
// before(function(done) {
// http.get(host + '/extras/popular', function(res) {
// response = res;
// response.body = '';
// res.on('data', function(chunk) {
// response.body += chunk;
// });
// res.on('end', function() {
// done();
// });
// });
// });
//
// describe('popular', function() {
// /*it('/extras/popular :: 200\'s', function(done) {
// assert(response);
// assert.equal(200, response.statusCode);
// done();
// });*/
//
// it('contains authors', function(done) {
// config.authors.forEach(function(author) {
// assert(response.body.indexOf(author));
// });
// done();
// });
//
// it('contains analytics', function(done) {
// assert(response.body.indexOf(config.google_analytics.account_id));
// assert(response.body.indexOf(config.google_analytics.domain_name));
// assert(response.body.indexOf('.google-analytics.com/ga.js'));
// done();
// });
//
// describe('contains bootswatch', function() {
// config.bootswatch.themes.forEach(function(theme) {
// var file = config.bootswatch.bootstrap
// .replace('SWATCH_NAME', theme)
// .replace('SWATCH_VERSION', config.bootstrap.version)
// .replace('//maxcdn.bootstrapcdn.com', '');
// it(format('-> %s', theme), function(done) {
// assert(response.body.indexOf(file));
// done();
// });
// });
// });
//
// describe('contains bootstrap', function() {
// config.bootstrap.forEach(function(bootstrap) {
// it(format('-> %s', bootstrap.version), function(done) {
// assert(response.body.indexOf(bootstrap.css_complete.replace('//maxcdn.bootstrapcdn.com', '')));
// assert(response.body.indexOf(bootstrap.javascript.replace('//maxcdn.bootstrapcdn.com', '')));
// if (bootstrap.css_no_icons) {
// assert(response.body.indexOf(bootstrap.css_no_icons.replace('//maxcdn.bootstrapcdn.com', '')));
// }
// done();
// });
// });
// });
// });
>>>>>>>
// 'use strict';
//
// var path = require('path');
// var fs = require('fs');
// var yaml = require('js-yaml');
// var http = require('http');
// var assert = require('assert');
// var format = require('format');
//
// var config = yaml.safeLoad(fs.readFileSync(path.join(__dirname, '..', '..', 'config', '_config.yml'), 'utf8'));
// process.env.PORT = (config.port < 3000 ? config.port + 3000 : config.port + 1); // don't use configured port
//
// /***
// * MaxCDN Stub
// */
// var MaxCDN = require('maxcdn');
// MaxCDN.prototype.get = function (_, cb) {
// cb(null, require('../stubs/popular.json'));
// return;
// };
//
// require('../../app.js');
// var host = format('http://localhost:%s', process.env.PORT);
// var response;
//
// before(function(done) {
// http.get(host + '/extras/popular', function(res) {
// response = res;
// response.body = '';
// res.on('data', function(chunk) {
// response.body += chunk;
// });
// res.on('end', function() {
// done();
// });
// });
// });
//
// describe('popular', function() {
// /*it('/extras/popular :: 200\'s', function(done) {
// assert(response);
// assert.equal(200, response.statusCode);
// done();
// });*/
//
// it('contains authors', function(done) {
// config.authors.forEach(function(author) {
// assert(response.body.indexOf(author));
// });
// done();
// });
//
// it('contains analytics', function(done) {
// assert(response.body.indexOf(config.google_analytics.account_id));
// assert(response.body.indexOf(config.google_analytics.domain_name));
// assert(response.body.indexOf('.google-analytics.com/ga.js'));
// done();
// });
//
// describe('contains bootswatch', function() {
// config.bootswatch.themes.forEach(function(theme) {
// var file = config.bootswatch.bootstrap
// .replace('SWATCH_NAME', theme)
// .replace('SWATCH_VERSION', config.bootstrap.version)
// .replace('https://maxcdn.bootstrapcdn.com', '');
// it(format('-> %s', theme), function(done) {
// assert(response.body.indexOf(file));
// done();
// });
// });
// });
//
// describe('contains bootstrap', function() {
// config.bootstrap.forEach(function(bootstrap) {
// it(format('-> %s', bootstrap.version), function(done) {
// assert(response.body.indexOf(bootstrap.css_complete.replace('https://maxcdn.bootstrapcdn.com', '')));
// assert(response.body.indexOf(bootstrap.javascript.replace('https://maxcdn.bootstrapcdn.com', '')));
// if (bootstrap.css_no_icons) {
// assert(response.body.indexOf(bootstrap.css_no_icons.replace('https://maxcdn.bootstrapcdn.com', '')));
// }
// done();
// });
// });
// });
// }); |
<<<<<<<
DelayedFunction, OffsetOrigin, DragCoord, Container, EventHandler, Fields, BlockerUtils, DragState, BlockerEvents, MouseData, Snappables, FieldSchema, Fun,
Css, Traverse, Location, Scroll, parseInt, window
=======
DelayedFunction, Container, EventHandler, BlockerUtils, DragMovement, DragState, SnapSchema, BlockerEvents, MouseData, Snappables, FieldSchema, Fun, parseInt,
window
>>>>>>>
DelayedFunction, Container, EventHandler, Fields, BlockerUtils, DragMovement, DragState, SnapSchema, BlockerEvents, MouseData, Snappables, FieldSchema, Fun,
parseInt, window
<<<<<<<
Fields.onHandler('onDrop'),
FieldSchema.optionObjOf('snaps', [
FieldSchema.strict('getSnapPoints'),
Fields.onHandler('onSensor'),
FieldSchema.strict('leftAttr'),
FieldSchema.strict('topAttr'),
FieldSchema.defaulted('lazyViewport', defaultLazyViewport)
]),
=======
FieldSchema.defaulted('onDrop', Fun.noop),
SnapSchema,
>>>>>>>
Fields.onHandler('onDrop'),
SnapSchema, |
<<<<<<<
assert.eq(['ab'], getWords('a\ufeffb'));
=======
assert.eq(['1+1*1/1⋉1=1'], getWords('1+1*1/1⋉1=1'));
>>>>>>>
assert.eq(['ab'], getWords('a\ufeffb'));
assert.eq(['1+1*1/1⋉1=1'], getWords('1+1*1/1⋉1=1')); |
<<<<<<<
skin_url: "../../../../../skins/lightgray/dist/lightgray",
plugins: "paste code",
toolbar: "pastetext code",
=======
plugins: "paste code preview",
toolbar: "pastetext code preview",
init_instance_callback: function (editor) {
editor.on('PastePreProcess', function (evt) {
console.log(evt);
});
editor.on('PastePostProcess', function (evt) {
console.log(evt);
});
},
>>>>>>>
skin_url: "../../../../../skins/lightgray/dist/lightgray",
plugins: "paste code",
toolbar: "pastetext code",
init_instance_callback: function (editor) {
editor.on('PastePreProcess', function (evt) {
console.log(evt);
});
editor.on('PastePostProcess', function (evt) {
console.log(evt);
});
}, |
<<<<<<<
'ephox.alloy.api.behaviour.Focusing',
'ephox.alloy.api.behaviour.Representing',
'ephox.alloy.api.behaviour.Tabstopping',
=======
'ephox.alloy.data.Fields',
>>>>>>>
'ephox.alloy.api.behaviour.Focusing',
'ephox.alloy.api.behaviour.Representing',
'ephox.alloy.api.behaviour.Tabstopping',
'ephox.alloy.data.Fields',
<<<<<<<
function (Behaviour, Focusing, Representing, Tabstopping, FieldSchema, Objects, Fun, Merger, Value) {
=======
function (Behaviour, Fields, FieldSchema, Objects, Fun, Merger, Value) {
>>>>>>>
function (Behaviour, Focusing, Representing, Tabstopping, Fields, FieldSchema, Objects, Fun, Merger, Value) {
<<<<<<<
}
}),
Focusing.config({
=======
},
onSetValue: detail.onSetValue()
},
focusing: {
>>>>>>>
},
onSetValue: detail.onSetValue()
}),
Focusing.config({ |
<<<<<<<
// TODO duplicate check and update existing with alias if needed
=======
/**
* Adds the passed instance to the list of instances used with the CLI. If parameter
* alias was passed, the CLI is able to lookup the instance using this alias for any instance
* specific command.
*
* @param {String} instance the instance to add to the list
* @param {String} alias the alias to use for this instance
*/
>>>>>>>
/**
* Adds the passed instance to the list of instances used with the CLI. If parameter
* alias was passed, the CLI is able to lookup the instance using this alias for any instance
* specific command.
*
* @param {String} instance the instance to add to the list
* @param {String} alias the alias to use for this instance
*/
<<<<<<<
function list(verbose) {
// some auth details
var data = [['Client ID', ( auth.getClient() ? auth.getClient() : '(not set)' )]];
data.push(['User', ( auth.getUser() ? auth.getUser() : '(not set)' )]);
=======
/**
* List details of all instances currently configured and renders them to the console.
*
* @param {Boolean} verbose return more, detailed information
* @param {Boolean} asJson format output as json
*/
function list(verbose, asJson) {
var data = { auth : { client_id : auth.getClient() }, default_instance : getInstance() };
// client details
var out = [['Client ID', ( auth.getClient() ? auth.getClient() : '(not set)' )]];
>>>>>>>
/**
* List details of all instances currently configured and renders them to the console.
*
* @param {Boolean} verbose return more, detailed information
* @param {Boolean} asJson format output as json
*/
function list(verbose, asJson) {
var data = { auth : { client_id : auth.getClient(), user : auth.getUser() }, default_instance : getInstance() };
// client/user details
var out = [['Client ID', ( auth.getClient() ? auth.getClient() : '(not set)' )]];
out.push(['User', ( auth.getUser() ? auth.getUser() : '(not set)' )]);
<<<<<<<
data.push(['Default Instance', ( getInstance() ? getInstance() : '(not set)' )]);
console.log(table(data, {
columns: {
0: {
width: 20
},
1: {
width: 70
}
}
}));
=======
>>>>>>>
<<<<<<<
var data = [['Alias','Instance','Default']];
=======
var out = [['Alias','Instance','Default']];
>>>>>>>
var out = [['Alias','Instance','Default']]; |
<<<<<<<
values.title.filter(isNotEmpty).each(function (title) { attrs.title = title; });
values.target.filter(isNotEmpty).each(function (target) { attrs.target = target; });
=======
values.title.filter(isNotEmpty).each(function (title) {
attrs.title = title.text;
});
values.target.filter(isNotEmpty).each(function (target) {
attrs.target = target.text;
});
>>>>>>>
values.title.filter(isNotEmpty).each(function (title) { attrs.title = title; });
values.target.filter(isNotEmpty).each(function (target) { attrs.target = target; });
values.title.filter(isNotEmpty).each(function (title) {
attrs.title = title.text;
});
values.target.filter(isNotEmpty).each(function (target) {
attrs.target = target.text;
}); |
<<<<<<<
'ephox.katamari.api.Option',
=======
'ephox.katamari.api.FutureResult',
>>>>>>>
'ephox.katamari.api.Option',
'ephox.katamari.api.FutureResult',
<<<<<<<
function (Fun, Option, Result, Jsc) {
=======
function (Fun, FutureResult, Result, Jsc) {
>>>>>>>
function (Fun, Option, FutureResult, Result, Jsc) {
<<<<<<<
resultError: resultError,
resultValue: resultValue,
result: result,
option: arbOption,
optionSome: arbSome,
optionNone: arbNone,
indexArrayOf: arbIndexArrayOf
=======
resultError: arbResultError,
resultValue: arbResultValue,
result: arbResult,
futureResult: arbFutureResult,
futureResultSchema: arbFutureResultSchema
>>>>>>>
option: arbOption,
optionSome: arbSome,
optionNone: arbNone,
indexArrayOf: arbIndexArrayOf,
resultError: arbResultError,
resultValue: arbResultValue,
result: arbResult,
futureResult: arbFutureResult,
futureResultSchema: arbFutureResultSchema |
<<<<<<<
'ephox.alloy.api.events.GuiEvents',
'ephox.alloy.api.events.SystemEvents',
'ephox.alloy.api.system.SystemApi',
=======
'ephox.alloy.api.events.SystemEvents',
'ephox.alloy.api.system.SystemApi',
>>>>>>>
'ephox.alloy.api.events.SystemEvents',
'ephox.alloy.api.system.SystemApi',
<<<<<<<
'ephox.alloy.debugging.Debugging',
'ephox.alloy.events.DescribedHandler',
=======
'ephox.alloy.events.GuiEvents',
>>>>>>>
'ephox.alloy.debugging.Debugging',
'ephox.alloy.events.DescribedHandler',
'ephox.alloy.events.GuiEvents',
<<<<<<<
GuiFactory, GuiEvents, SystemEvents, SystemApi, Container, Debugging, DescribedHandler, Triggers, Registry, Tagger, Arr, Fun, Result, Compare, Focus, Insert,
Remove, Node, Traverse, Error
=======
GuiFactory, SystemEvents, SystemApi, Container, GuiEvents, Triggers, Registry, Tagger, Arr, Fun, Result, Compare, Focus, Insert, Remove, Node, Traverse,
Error
>>>>>>>
GuiFactory, SystemEvents, SystemApi, Container, Debugging, DescribedHandler, GuiEvents, Triggers, Registry, Tagger, Arr, Fun, Result, Compare, Focus, Insert,
Remove, Node, Traverse, Error |
<<<<<<<
'tinymce.themes.mobile.ui.ImagePicker',
'tinymce.themes.mobile.ui.IosContainer'
=======
'tinymce.themes.mobile.ui.IosContainer',
'tinymce.themes.mobile.ui.LinkButton'
>>>>>>>
'tinymce.themes.mobile.ui.ImagePicker',
'tinymce.themes.mobile.ui.IosContainer',
'tinymce.themes.mobile.ui.LinkButton'
<<<<<<<
function (Cell, Fun, Element, Error, window, EditorManager, ThemeManager, Api, Styles, Buttons, ImagePicker, IosContainer) {
=======
function (Cell, Fun, Element, window, EditorManager, ThemeManager, Api, Styles, Buttons, IosContainer, LinkButton) {
>>>>>>>
function (Cell, Fun, Element, window, EditorManager, ThemeManager, Api, Styles, Buttons, ImagePicker, IosContainer, LinkButton) {
<<<<<<<
Buttons.forToolbarStateCommand(editor, 'italic'),
ImagePicker.sketch(editor)
=======
Buttons.forToolbarStateCommand(editor, 'italic'),
LinkButton.sketch(ios, editor)
>>>>>>>
Buttons.forToolbarStateCommand(editor, 'italic'),
ImagePicker.sketch(editor),
LinkButton.sketch(ios, editor) |
<<<<<<<
var apiUmbrellaConfig = require('api-umbrella-config'),
path = require('path');
var config = apiUmbrellaConfig.load(path.resolve(__dirname, '../config/test.yml'));
=======
var fs = require('fs'),
path = require('path'),
yaml = require('js-yaml');
fs.writeFileSync('/tmp/api-umbrella-test.yml', yaml.safeDump({
router: {
dir: path.resolve(__dirname, '../../'),
},
}));
>>>>>>>
var apiUmbrellaConfig = require('api-umbrella-config'),
fs = require('fs'),
path = require('path'),
yaml = require('js-yaml');
var config = apiUmbrellaConfig.load(path.resolve(__dirname, '../config/test.yml'));
fs.writeFileSync('/tmp/api-umbrella-test.yml', yaml.safeDump({
router: {
dir: path.resolve(__dirname, '../../'),
},
})); |
<<<<<<<
// enable request debugging
if ( process.env.DEBUG ) {
require('request-debug')(request);
}
function getOptions(instance, path, token, method) {
=======
function getOptions(instance, path, token, options, method) {
>>>>>>>
// enable request debugging
if ( process.env.DEBUG ) {
require('request-debug')(request);
}
function getOptions(instance, path, token, options, method) { |
<<<<<<<
res.set('X-Received-Method', req.method);
=======
var rawUrl = req.protocol + '://' + req.hostname + req.url;
>>>>>>>
var rawUrl = req.protocol + '://' + req.hostname + req.url;
res.set('X-Received-Method', req.method);
<<<<<<<
local_interface_ip: req.socket.localAddress,
url: url.parse(req.protocol + '://' + req.hostname + req.url, true),
=======
raw_url: rawUrl,
url: url.parse(rawUrl, true),
>>>>>>>
local_interface_ip: req.socket.localAddress,
raw_url: rawUrl,
url: url.parse(rawUrl, true), |
<<<<<<<
config = require('api-umbrella-config').global(),
=======
cloneDeep = require('clone'),
config = require('../../config'),
>>>>>>>
cloneDeep = require('clone'),
config = require('api-umbrella-config').global(), |
<<<<<<<
{ path: '/checkout', component: CheckoutPage },
=======
{
path: '/onboarding',
component: OnboardingPage,
children: [
{ path: 'welcome', component: OnboardingWelcome },
{ path: 'donate', component: OnboardingDonate },
{ path: 'metamask', component: OnboardingMetamask },
],
},
>>>>>>>
{ path: '/checkout', component: CheckoutPage },
{
path: '/onboarding',
component: OnboardingPage,
children: [
{ path: 'welcome', component: OnboardingWelcome },
{ path: 'donate', component: OnboardingDonate },
{ path: 'metamask', component: OnboardingMetamask },
],
}, |
<<<<<<<
import { formatSecs, formatSecsShort } from '../lib/time.js';
import Donate from '../lib/donate.js';
import { Database } from '../lib/db.js';
=======
import { formatSecs } from '../lib/time.js';
>>>>>>>
import { formatSecs, formatSecsShort } from '../lib/time.js'; |
<<<<<<<
import { isOnDomain, canonicalizeUrl } from './url.js';
=======
>>>>>>>
import { isOnDomain, canonicalizeUrl } from './url.js';
<<<<<<<
_db
.version(3)
.stores({
thanks: '++id, url, date, title, creator',
})
.upgrade(trans => {
return trans.activity.toCollection().modify(act => {
act.url = canonicalizeUrl(act.url);
});
});
=======
_db.version(3).stores({
creator: '&url, name, ignore',
});
>>>>>>>
_db.version(3).stores({
creator: '&url, name, ignore',
});
_db
.version(4)
.stores({
thanks: '++id, url, date, title, creator',
})
.upgrade(trans => {
return trans.activity.toCollection().modify(act => {
act.url = canonicalizeUrl(act.url);
});
}); |
<<<<<<<
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-contrib-compass");
=======
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-shell");
>>>>>>>
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-shell"); |
<<<<<<<
function ensureValidToken(err, res, success, repeat) {
// token invalid
if(err && res && res.body && res.body.fault && res.body.fault.type == 'InvalidAccessTokenException') {
// no auto-renewal, just log error
if(!auth.getAutoRenewToken()) {
console.error('Error: Authorization token missing or invalid. Please (re-)authenticate first.');
=======
function ensureValidToken(err, res, callback) {
if (err && res && res.body && res.body.fault && res.body.fault.type == 'InvalidAccessTokenException') {
console.error('Error: Authorization token missing or invalid. Please (re-)authenticate first.');
if (auth.getAutoRenewToken()) {
console.log('Token auto-renewal enabled. Trying to renew token.');
auth.auth(auth, client_secret, auto_renew);
>>>>>>>
function ensureValidToken(err, res, success, repeat) {
// token invalid
if (err && res && res.body && res.body.fault && res.body.fault.type == 'InvalidAccessTokenException') {
// no auto-renewal, just log error
if (!auth.getAutoRenewToken()) {
console.error('Error: Authorization token missing or invalid. Please (re-)authenticate first.');
} else {
// attempt to renew
console.log('Authorization token invalid. Token auto-renewal enabled. Trying to renew token...');
// renew and callback and repeat over
auth.renew(repeat);
<<<<<<<
// attempt to renew
else {
console.log('Authorization token invalid. Token auto-renewal enabled. Trying to renew token...');
// renew and callback and repeat over
auth.renew(repeat);
}
}
// some other error
else if(err && ( !res || !res.body )) {
=======
} else if (err && ( !res || !res.body )) {
>>>>>>>
} else if (err && ( !res || !res.body )) {
// some other error |
<<<<<<<
firefox = ua.match(/Firefox\/([\d.]+)/),
safari = webkit && ua.match(/Mobile\//) && !chrome
=======
firefox = ua.match(/Firefox\/([\d.]+)/),
webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/)
>>>>>>>
firefox = ua.match(/Firefox\/([\d.]+)/),
safari = webkit && ua.match(/Mobile\//) && !chrome,
webview = ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/) && !chrome
<<<<<<<
if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true
=======
if (webview) browser.webview = true
>>>>>>>
if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true
if (webview) browser.webview = true |
<<<<<<<
// `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
// takes a CSS selector and an optional context (and handles various
// special cases).
// This method can be overriden in plugins.
zepto.init = function(selector, context) {
// If nothing given, return an empty Zepto collection
if (!selector) return zepto.Z()
// If there's a context, create a collection on that context first, and select
// nodes from there
if (context !== undefined) return $(context).find(selector)
// If a function is given, call it when the DOM is ready
else if (isFunction(selector)) return $(document).ready(selector)
// If a Zepto collection is given, juts return it
else if (zepto.isZ(selector)) return selector
=======
function $(selector, context){
if (!selector) return Z();
else if (isF(selector)) return $(document).ready(selector);
else if (selector instanceof Z) return selector;
>>>>>>>
// `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
// takes a CSS selector and an optional context (and handles various
// special cases).
// This method can be overriden in plugins.
zepto.init = function(selector, context) {
// If nothing given, return an empty Zepto collection
if (!selector) return zepto.Z()
// If a function is given, call it when the DOM is ready
else if (isFunction(selector)) return $(document).ready(selector)
// If a Zepto collection is given, juts return it
else if (zepto.isZ(selector)) return selector
<<<<<<<
dom = zepto.fragment(selector.trim(), RegExp.$1), selector = null
// If it's a text node, just wrap it
else if (selector.nodeType && selector.nodeType == 3) dom = [selector]
// And last but no least, if it's a CSS selector, use it to select nodes.
else dom = $$(document, selector)
// create a new Zepto collection from the nodes found
return zepto.Z(dom, selector)
=======
dom = fragment(selector.trim(), RegExp.$1), selector = null;
else if (selector.nodeType && selector.nodeType == 3) dom = [selector];
else if (context !== undefined) return $(context).find(selector);
else dom = $$(document, selector);
return Z(dom, selector);
>>>>>>>
dom = zepto.fragment(selector.trim(), RegExp.$1), selector = null
// If it's a text node, just wrap it
else if (selector.nodeType && selector.nodeType == 3) dom = [selector]
// If there's a context, create a collection on that context first, and select
// nodes from there
else if (context !== undefined) return $(context).find(selector)
// And last but no least, if it's a CSS selector, use it to select nodes.
else dom = $$(document, selector)
// create a new Zepto collection from the nodes found
return zepto.Z(dom, selector) |
<<<<<<<
compiler.hooks.emit.tapAsync('StylemugEmit', (compilation, cb) => {
const css = extractor.flushAsCss();
=======
compiler.plugin('emit', (compilation, cb) => {
const css = flushAsCss();
>>>>>>>
compiler.hooks.emit.tapAsync('StylemugEmit', (compilation, cb) => {
const css = flushAsCss(); |
<<<<<<<
var util = require('util');
var jsonwebtoken = require('jsonwebtoken');
var request = require('superagent');
var open = require('open');
=======
var request = require('request');
>>>>>>>
var util = require('util');
var jsonwebtoken = require('jsonwebtoken');
var open = require('open');
var request = require('request');
<<<<<<<
/**
* Obtain an access token using with the specified grant type from the access token endpoint
* of the AM. If grantType is not provided or null grant_type=client_credentials is being used as default
* grant payload.
*
* @param {String} accountManagerHostOverride Alternative host of the Account Manager to use, fallback to default
* @param {String} basicEncoded Base64 encoded client credentials used for basic auth header
* @param {String} grantPayload the grant payload to sent, by default grant_type=client_credentials is sent
* @param {Function} callback callback function to execute with the result of the request
*/
function obtainToken(accountManagerHostOverride, basicEncoded, grantPayload, callback) {
=======
/**
* Contructs the http request options for request at the authorization server and ensure shared request
* headers across requests.
*
* @param {String} host
* @param {String} path
* @param {String} basicAuthUser
* @param {String} basicAuthPassword
* @param {String} method
* @return {Object} the request options
*/
function getOptions(host, path, basicAuthUser, basicAuthPassword, method) {
var opts = {
uri: 'https://' + host + path,
auth: {
user: basicAuthUser,
pass: basicAuthPassword
},
strictSSL: true,
method: method,
json: true
};
return opts;
}
function obtainToken(accountManagerHostOverride, basicAuthUser, basicAuthPassword, callback) {
>>>>>>>
/**
* Contructs the http request options for request at the authorization server and ensure shared request
* headers across requests.
*
* @param {String} host
* @param {String} path
* @param {String} basicAuthUser
* @param {String} basicAuthPassword
* @param {String} method
* @return {Object} the request options
*/
function getOptions(host, path, basicAuthUser, basicAuthPassword, method) {
var opts = {
uri: 'https://' + host + path,
auth: {
user: basicAuthUser,
pass: basicAuthPassword
},
strictSSL: true,
method: method,
json: true
};
return opts;
}
/**
* Obtain an access token using with the specified grant type from the access token endpoint
* of the AM. If grantType is not provided or null grant_type=client_credentials is being used as default
* grant payload.
*
* @param {String} accountManagerHostOverride Alternative host of the Account Manager to use, fallback to default
* @param {String} basicAuthUser User name used for basic auth
* @param {String} basicAuthPassword Password used for basic auth
* @param {Object} grantPayload the grant payload to sent, by default { grant_type : 'client_credentials' } is used
* @param {Function} callback callback function to execute with the result of the request
*/
function obtainToken(accountManagerHostOverride, basicAuthUser, basicAuthPassword, grantPayload, callback) {
<<<<<<<
// the default grant type
var payload = 'grant_type=client_credentials';
if ( grantPayload ) {
payload = grantPayload;
}
if ( process.env.DEBUG ) {
console.log('Doing auth request, payload: %s', payload);
}
// just do the request with the basicEncoded and the payload and call the callback
request
.post('https://' + accountManagerHost + ACCOUNT_MANAGER_TOKEN_PATH)
.set('Authorization', 'Basic ' + basicEncoded)
.set('Content-Type', 'application/x-www-form-urlencoded')
.send(payload)
.end(callback);
=======
// build the request options
var options = getOptions(accountManagerHost, ACCOUNT_MANAGER_PATH, basicAuthUser, basicAuthPassword);
// the grant type as form data
options['form'] = { grant_type : 'client_credentials' };
// just do the request and pass the callback
request.post(options, callback);
>>>>>>>
// the payload with the default grant type
var payload = { grant_type : 'client_credentials' };
if ( grantPayload ) {
payload = grantPayload;
}
if ( process.env.DEBUG ) {
console.log('Doing auth request, payload: %s', JSON.stringify(payload));
}
// build the request options
var options = getOptions(accountManagerHost, ACCOUNT_MANAGER_TOKEN_PATH, basicAuthUser, basicAuthPassword);
// the grant type as form data
options['form'] = payload;
// just do the request and pass the callback
request.post(options, callback);
<<<<<<<
obtainToken(accountManager, basicEncoded, grantPayload, function (err, res) {
=======
obtainToken(accountManager, client, client_secret, function (err, res) {
>>>>>>>
obtainToken(accountManager, client, client_secret, grantPayload, function (err, res) {
<<<<<<<
obtainToken(null, basicEncoded, null, function (err, res) {
=======
obtainToken(null, client, clientSecret, function (err, res) {
>>>>>>>
obtainToken(null, client, clientSecret, null, function (err, res) {
<<<<<<<
obtainToken(null, basicEncoded, null, function (err, res) {
=======
obtainToken(null, client_id, client_secret, function (err, res) {
>>>>>>>
obtainToken(null, client_id, client_secret, null, function (err, res) { |
<<<<<<<
players,
=======
streamproviders: providers,
streamprovidersDropDown: computed(function() {
return Object.keys( providers )
.filter(function( key ) {
// exclude unsupported providers
return providers[ key ][ "exec" ][ platform.platform ];
})
.map(function( key ) {
return {
id: key,
label: providers[ key ][ "label" ]
};
});
}),
>>>>>>>
streamproviders: providers,
streamprovidersDropDown: computed(function() {
return Object.keys( providers )
.filter(function( key ) {
// exclude unsupported providers
return providers[ key ][ "exec" ][ platform.platform ];
})
.map(function( key ) {
return {
id: key,
label: providers[ key ][ "label" ]
};
});
}),
players, |
<<<<<<<
var Notif = window.chrome.notifications;
=======
var intervalSuccess = config.notification[ "interval" ][ "requests" ] || 60000;
var intervalRetry = config.notification[ "interval" ][ "retry" ] || 1000;
var intervalError = config.notification[ "interval" ][ "error" ] || 120000;
var failsRequests = config.notification[ "fails" ][ "requests" ];
var failsChannels = config.notification[ "fails" ][ "channels" ];
var cacheDir = platform.tmpdir( config.notification[ "cache" ][ "dir" ] );
var cacheTime = config.notification[ "cache" ][ "time" ];
var iconGroup = config.files[ "icons" ][ "big" ];
var Notif = window.Notification;
>>>>>>>
var intervalSuccess = config.notification[ "interval" ][ "requests" ] || 60000;
var intervalRetry = config.notification[ "interval" ][ "retry" ] || 1000;
var intervalError = config.notification[ "interval" ][ "error" ] || 120000;
var failsRequests = config.notification[ "fails" ][ "requests" ];
var failsChannels = config.notification[ "fails" ][ "channels" ];
var cacheDir = platform.tmpdir( config.notification[ "cache" ][ "dir" ] );
var cacheTime = config.notification[ "cache" ][ "time" ];
var iconGroup = config.files[ "icons" ][ "big" ];
var Notif = window.chrome.notifications;
<<<<<<<
config : alias( "metadata.config" ),
failsRequests: alias( "config.notification-max-fails-requests" ),
failsChannels: alias( "config.notification-max-fails-channels" ),
interval : alias( "config.notification-interval" ),
intervalRetry: alias( "config.notification-interval-retry" ),
intervalError: alias( "config.notification-interval-error" ),
// cache related properties
cacheDir: function() {
var dir = get( this, "config.notification-cache-dir" );
return PATH.resolve( dir.replace( "{os-tmpdir}", OS.tmpdir() ) );
}.property( "config.notification-cache-dir" ),
cacheTime: function() {
var days = get( this, "config.notification-cache-time" );
return days * 24 * 3600 * 1000;
}.property( "config.notification-cache-time" ),
// controller state
=======
>>>>>>>
<<<<<<<
this.showNotification(
"Some followed channels have started streaming",
get( this, "config.notification-icon-group" ),
streams.map(function( stream ) {
return {
title : get( stream, "channel.display_name" ),
message: get( stream, "channel.status" ) || ""
};
}),
function() {
=======
this.showNotification({
icon : iconGroup,
title: "Some of your favorites have started streaming",
body : streams.map(function( stream ) {
return get( stream, "channel.display_name" );
}).join( ", " ),
click: function() {
>>>>>>>
this.showNotification(
"Some followed channels have started streaming",
iconGroup,
streams.map(function( stream ) {
return {
title : get( stream, "channel.display_name" ),
message: get( stream, "channel.status" ) || ""
};
}),
function() {
<<<<<<<
streams.forEach(function( stream ) {
get( this, "livestreamer" ).startStream( stream );
// don't open the chat twice
if ( !get( this, "settings.gui_openchat" ) ) {
var url = get( this, "config.twitch-chat-url" );
var channel = get( stream, "channel.id" );
if ( url && channel ) {
url = url.replace( "{channel}", channel );
applicationController.send( "openBrowser", url );
}
}
}, this );
=======
get( this, "livestreamer" ).startStream( stream );
// don't open the chat twice (startStream may open chat already)
if ( get( this, "settings.gui_openchat" ) ) { break; }
var chat = get( this, "chat" );
var channel = get( stream, "channel.id" );
chat.open( channel )
.catch(function() {});
break;
>>>>>>>
streams.forEach(function( stream ) {
get( this, "livestreamer" ).startStream( stream );
// don't open the chat twice (startStream may open chat already)
if ( get( this, "settings.gui_openchat" ) ) { return; }
var chat = get( this, "chat" );
var channel = get( stream, "channel.id" );
chat.open( channel )
.catch(function() {});
}, this );
break; |
<<<<<<<
SET_SWIPE_START, SET_SWIPE_END, CLEAR_SWIPE_ACTION, SET_SEARCHED_FOR_ELEMENT_BOUNDS, CLEAR_SEARCHED_FOR_ELEMENT_BOUNDS, SET_SAVED_TESTS, SHOW_SAVE_TEST_MODAL,
HIDE_SAVE_TEST_MODAL
=======
SET_SWIPE_START, SET_SWIPE_END, CLEAR_SWIPE_ACTION, SET_SEARCHED_FOR_ELEMENT_BOUNDS, CLEAR_SEARCHED_FOR_ELEMENT_BOUNDS,
PROMPT_KEEP_ALIVE, HIDE_PROMPT_KEEP_ALIVE
>>>>>>>
SET_SWIPE_START, SET_SWIPE_END, CLEAR_SWIPE_ACTION, SET_SEARCHED_FOR_ELEMENT_BOUNDS, CLEAR_SEARCHED_FOR_ELEMENT_BOUNDS, SET_SAVED_TESTS, SHOW_SAVE_TEST_MODAL,
HIDE_SAVE_TEST_MODAL, PROMPT_KEEP_ALIVE, HIDE_PROMPT_KEEP_ALIVE
<<<<<<<
savedTests: [],
screenshot: null,
=======
showKeepAlivePrompt: false,
>>>>>>>
savedTests: [],
screenshot: null,
showKeepAlivePrompt: false,
<<<<<<<
case SET_SAVED_TESTS:
return {
...state,
savedTests: action.tests,
};
case SHOW_SAVE_TEST_MODAL:
return {
...state,
saveTestModalVisible: true,
};
case HIDE_SAVE_TEST_MODAL:
return {
...state,
saveTestModalVisible: false,
};
=======
case PROMPT_KEEP_ALIVE:
return {
...state,
showKeepAlivePrompt: true,
};
case HIDE_PROMPT_KEEP_ALIVE:
return {
...state,
showKeepAlivePrompt: false,
};
>>>>>>>
case SET_SAVED_TESTS:
return {
...state,
savedTests: action.tests,
};
case SHOW_SAVE_TEST_MODAL:
return {
...state,
saveTestModalVisible: true,
};
case HIDE_SAVE_TEST_MODAL:
return {
...state,
saveTestModalVisible: false,
};
case PROMPT_KEEP_ALIVE:
return {
...state,
showKeepAlivePrompt: true,
};
case HIDE_PROMPT_KEEP_ALIVE:
return {
...state,
showKeepAlivePrompt: false,
}; |
<<<<<<<
if (FeatureAvailabilityService.hasFeature("PROJECT", "sidebarMenu", locale)) {
IaasSectionSidebarService.fillSection(services.iaas);
}
if (FeatureAvailabilityService.hasFeature("DEDICATED_CLOUD", "sidebarMenu", locale)) {
PaasSectionSidebarService.fillSection(services.paas);
}
if (FeatureAvailabilityService.hasFeature("METRICS", "sidebarMenu", locale)) {
MetricsSectionSidebarService.fillSection(services.metrics);
}
=======
IaasSectionSidebarService.fillSection(services.iaas);
PaasSectionSidebarService.fillSection(services.paas);
MetricsSectionSidebarService.fillSection(services.metrics);
if (FeatureAvailabilityService.hasFeature("DBAAS_LOGS", "sidebarMenu", locale)) {
LogsSectionSidebarService.fillSection(services.logs);
}
>>>>>>>
if (FeatureAvailabilityService.hasFeature("PROJECT", "sidebarMenu", locale)) {
IaasSectionSidebarService.fillSection(services.iaas);
}
if (FeatureAvailabilityService.hasFeature("DEDICATED_CLOUD", "sidebarMenu", locale)) {
PaasSectionSidebarService.fillSection(services.paas);
}
if (FeatureAvailabilityService.hasFeature("METRICS", "sidebarMenu", locale)) {
MetricsSectionSidebarService.fillSection(services.metrics);
}
if (FeatureAvailabilityService.hasFeature("DBAAS_LOGS", "sidebarMenu", locale)) {
LogsSectionSidebarService.fillSection(services.logs);
} |
<<<<<<<
=======
this.CloudMessage = CloudMessage;
this.editMode = Boolean(this.inputId);
>>>>>>>
this.CloudMessage = CloudMessage;
<<<<<<<
$onInit () {
this.input.load()
.then(() => this.test.load());
}
=======
>>>>>>>
<<<<<<<
return result;
=======
return input;
>>>>>>>
return input;
<<<<<<<
this.test = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.getTestResults(this.serviceName, this.input.data)
});
=======
this.input.load();
>>>>>>>
this.test = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.getTestResults(this.serviceName, this.input.data)
});
this.input.load()
.then(() => this.test.load());
<<<<<<<
executeTest () {
this.test = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.executeTest(this.serviceName, this.input.data)
});
this.test.load();
}
=======
saveFlowgger () {
if (this.flowggerForm.$invalid) {
return this.$q.reject();
}
this.CloudMessage.flushChildMessage();
this.saving = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.updateFlowgger(this.serviceName, this.input.data, this.configuration.flowgger)
.then(() => this.goToNetworkPage())
.finally(() => this.ControllerHelper.scrollPageToTop())
});
return this.saving.load();
}
goToNetworkPage () {
this.$state.go("dbaas.logs.detail.inputs.editwizard.networks", {
serviceName: this.serviceName,
inputId: this.inputId
});
}
>>>>>>>
executeTest () {
this.test = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.updateLogstash(this.serviceName, this.input.data, this.configuration.logstash)
.then(() => this.LogsInputsService.executeTest(this.serviceName, this.input.data))
});
this.test.load();
}
saveFlowgger () {
if (this.flowggerForm.$invalid) {
return this.$q.reject();
}
this.CloudMessage.flushChildMessage();
this.saving = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.updateFlowgger(this.serviceName, this.input.data, this.configuration.flowgger)
.then(() => this.goToNetworkPage())
.finally(() => this.ControllerHelper.scrollPageToTop())
});
return this.saving.load();
}
saveLogstash () {
if (this.logstashForm.$invalid) {
return this.$q.reject();
}
this.CloudMessage.flushChildMessage();
this.saving = this.ControllerHelper.request.getHashLoader({
loaderFunction: () => this.LogsInputsService.updateLogstash(this.serviceName, this.input.data, this.configuration.logstash)
.then(() => this.goToNetworkPage())
.finally(() => this.ControllerHelper.scrollPageToTop())
});
return this.saving.load();
}
goToNetworkPage () {
this.$state.go("dbaas.logs.detail.inputs.editwizard.networks", {
serviceName: this.serviceName,
inputId: this.inputId
});
} |
<<<<<<<
translations: ["common", "dbaas/logs", "dbaas/logs/options"]
})
.state("dbaas.logs.detail.options.home", {
url: "/home",
views: {
logsOptions: {
templateUrl: "app/dbaas/logs/detail/options/home/logs-options-home.html",
controller: "LogsOptionsCtrl",
controllerAs: "ctrl"
}
}
})
.state("dbaas.logs.detail.options.manage", {
url: "/manage",
views: {
logsOptions: {
templateUrl: "app/dbaas/logs/detail/options/manage/logs-options-manage.html",
controller: "LogsOptionsManageCtrl",
controllerAs: "ctrl"
},
translations: ["common", "dbaas/logs", "dbaas/logs/options"]
}
=======
translations: ["common", "dbaas/logs", "dbaas/logs/detail/options", "dbaas/logs/detail/offer"]
>>>>>>>
translations: ["common", "dbaas/logs", "dbaas/logs/detail/options", "dbaas/logs/detail/offer"]
})
.state("dbaas.logs.detail.options.home", {
url: "/home",
views: {
logsOptions: {
templateUrl: "app/dbaas/logs/detail/options/home/logs-options-home.html",
controller: "LogsOptionsCtrl",
controllerAs: "ctrl"
}
}
})
.state("dbaas.logs.detail.options.manage", {
url: "/manage",
views: {
logsOptions: {
templateUrl: "app/dbaas/logs/detail/options/manage/logs-options-manage.html",
controller: "LogsOptionsManageCtrl",
controllerAs: "ctrl"
},
translations: ["common", "dbaas/logs", "dbaas/logs/options"]
} |
<<<<<<<
$scope.gridOpts.onRegisterApi = function(gridApi){
$scope.gridApi = gridApi;
};
$scope.gridOpts.onRegisterApi = function (gridApi) {
$scope.gridApi = gridApi;
$scope.grid = gridApi.grid;
};
elm = angular.element('<div ui-grid="gridOpts" ui-grid-cellNav></div>');
=======
$scope.gridOpts.onRegisterApi = function (gridApi) {
$scope.gridApi = gridApi;
$scope.grid = gridApi.grid;
};
elm = angular.element('<div ui-grid="gridOpts" ui-grid-cellNav></div>');
>>>>>>>
$scope.gridOpts.onRegisterApi = function (gridApi) {
$scope.gridApi = gridApi;
$scope.grid = gridApi.grid;
};
elm = angular.element('<div ui-grid="gridOpts" ui-grid-cellNav></div>');
$scope.gridOpts.onRegisterApi = function (gridApi) {
$scope.gridApi = gridApi;
$scope.grid = gridApi.grid;
};
elm = angular.element('<div ui-grid="gridOpts" ui-grid-cellNav></div>'); |
<<<<<<<
var newColumnIndex = $scope.$index;
=======
var newColumnIndex;
var lastInRow = false;
var firstInRow = false;
>>>>>>>
var newColumnIndex = $scope.$index;
var lastInRow = false;
var firstInRow = false;
<<<<<<<
var focusedOnFirstColumn = $scope.displaySelectionCheckbox ? ($scope.col.index == 1) : ($scope.col.index == 0);
var focusedOnFirstVisibleColumn = ($scope.$index === 0);
var focusedOnLastVisibleColumn = ($scope.$index === ($scope.renderedColumns.length - 1));
var focusedOnLastColumn = ($scope.col.index == ($scope.columns.length - 1));
var toScroll;
if ((charCode == 37 || charCode == 9 && evt.shiftKey)) {
if (focusedOnFirstVisibleColumn) {
toScroll = grid.$viewport.scrollLeft() - $scope.col.width;
grid.$viewport.scrollLeft(Math.max(toScroll, 0));
}
if(!focusedOnFirstColumn){
newColumnIndex -= 1;
}
} else if(charCode == 39 || charCode == 9 && !evt.shiftKey){
if (focusedOnLastVisibleColumn) {
toScroll = grid.$viewport.scrollLeft() + $scope.col.width;
grid.$viewport.scrollLeft(Math.min(toScroll, grid.$canvas.width() - grid.$viewport.width()));
}
if(!focusedOnLastColumn){
newColumnIndex += 1;
}
=======
var focusedOnFirstColumn = $scope.displaySelectionCheckbox && $scope.col.index == 1 || !$scope.displaySelectionCheckbox && $scope.col.index == 0;
var focusedOnLastColumn = $scope.col.index == $scope.columns.length - 1;
newColumnIndex = $scope.col.index;
if((charCode == 37 || charCode == 9 && evt.shiftKey) && !focusedOnFirstColumn){
newColumnIndex -= 1;
} else if((charCode == 39 || charCode == 9 && !evt.shiftKey) && !focusedOnLastColumn){
newColumnIndex += 1;
} else if((charCode == 9 && !evt.shiftKey) && focusedOnLastColumn){
newColumnIndex = 0;
lastInRow = true;
} else if((charCode == 9 && evt.shiftKey) && focusedOnFirstColumn){
newColumnIndex = $scope.columns.length - 1;
firstInRow = true;
>>>>>>>
var focusedOnFirstColumn = $scope.displaySelectionCheckbox ? ($scope.col.index == 1) : ($scope.col.index == 0);
var focusedOnFirstVisibleColumn = ($scope.$index === 0);
var focusedOnLastVisibleColumn = ($scope.$index === ($scope.renderedColumns.length - 1));
var focusedOnLastColumn = ($scope.col.index == ($scope.columns.length - 1));
var toScroll;
if((charCode == 37 || charCode == 9 && evt.shiftKey)){
if (focusedOnFirstVisibleColumn) {
toScroll = grid.$viewport.scrollLeft() - $scope.col.width;
grid.$viewport.scrollLeft(Math.max(toScroll, 0));
}
if(!focusedOnFirstColumn){
newColumnIndex -= 1;
}
newColumnIndex -= 1;
} else if((charCode == 39 || charCode == 9 && !evt.shiftKey)){
if (focusedOnLastVisibleColumn) {
toScroll = grid.$viewport.scrollLeft() + $scope.col.width;
grid.$viewport.scrollLeft(Math.min(toScroll, grid.$canvas.width() - grid.$viewport.width()));
}
if(!focusedOnLastColumn){
newColumnIndex += 1;
}
newColumnIndex += 1;
} else if((charCode == 9 && !evt.shiftKey) && focusedOnLastColumn){
newColumnIndex = 0;
lastInRow = true;
} else if((charCode == 9 && evt.shiftKey) && focusedOnFirstColumn){
newColumnIndex = $scope.columns.length - 1;
firstInRow = true; |
<<<<<<<
if (self.rows.length === 0 && newRawData.length > 0) {
self.addRows(newRawData);
return;
}
//look for new rows
var newRows = newRawData.filter(function (newItem) {
return !self.rows.some(function(oldRow) {
return self.options.rowEquality(oldRow.entity, newItem);
});
});
for (i = 0; i < newRows.length; i++) {
self.addRows([newRows[i]]);
}
//look for deleted rows
var deletedRows = self.rows.filter(function (oldRow) {
return !newRawData.some(function (newItem) {
return self.options.rowEquality(newItem, oldRow.entity);
});
});
for (var i = 0; i < deletedRows.length; i++) {
self.rows.splice( self.rows.indexOf(deletedRows[i] ), 1 );
}
};
/**
* Private Undocumented Method
* @name addRows
* @methodOf ui.grid.class:Grid
* @description adds the newRawData array of rows to the grid and calls all registered
* rowBuilders. this keyword will reference the grid
*/
Grid.prototype.addRows = function(newRawData) {
var self = this;
for (var i=0; i < newRawData.length; i++) {
self.rows.push( self.processRowBuilders(new GridRow(newRawData[i], i)) );
}
};
/**
* @ngdoc function
* @name processRowBuilders
* @methodOf ui.grid.class:Grid
* @description processes all RowBuilders for the gridRow
* @param {GridRow} gridRow reference to gridRow
* @returns {GridRow} the gridRow with all additional behavior added
*/
Grid.prototype.processRowBuilders = function(gridRow) {
var self = this;
self.rowBuilders.forEach(function (builder) {
builder.call(self,gridRow, self.gridOptions);
});
return gridRow;
};
/**
* @ngdoc function
* @name registerStyleComputation
* @methodOf ui.grid.class:Grid
* @description registered a styleComputation function
* @param {function($scope)} styleComputation function
*/
Grid.prototype.registerStyleComputation = function (styleComputation) {
this.styleComputations.push(styleComputation);
};
Grid.prototype.setRenderedRows = function (newRows) {
this.renderedRows.length = newRows.length;
for (var i = 0; i < newRows.length; i++) {
this.renderedRows[i] = newRows[i];
}
};
Grid.prototype.setRenderedColumns = function (newColumns) {
this.renderedColumns.length = newColumns.length;
for (var i = 0; i < newColumns.length; i++) {
this.renderedColumns[i] = newColumns[i];
}
};
/**
* @ngdoc function
* @name buildStyles
* @methodOf ui.grid.class:Grid
* @description calls each styleComputation function
*/
Grid.prototype.buildStyles = function ($scope) {
var self = this;
self.styleComputations.forEach(function (comp) {
comp.call(self, $scope);
});
};
Grid.prototype.minRowsToRender = function () {
return Math.ceil(this.getViewportHeight() / this.options.rowHeight);
};
Grid.prototype.minColumnsToRender = function () {
var self = this;
var viewport = this.getViewportWidth();
var min = 0;
var totalWidth = 0;
self.columns.forEach(function(col, i) {
if (totalWidth < viewport) {
totalWidth += col.drawnWidth;
min++;
}
else {
var currWidth = 0;
for (var j = i; j >= i - min; j--) {
currWidth += self.columns[j].drawnWidth;
}
if (currWidth < viewport) {
min++;
}
}
});
return min;
// return Math.ceil(this.getViewportWidth() / this.options.columnWidth);
};
// NOTE: viewport drawable height is the height of the grid minus the header row height (including any border)
// TODO(c0bra): account for footer height
Grid.prototype.getViewportHeight = function () {
var viewPortHeight = this.gridHeight - this.headerHeight;
return viewPortHeight;
};
Grid.prototype.getViewportWidth = function () {
var viewPortWidth = this.gridWidth;
return viewPortWidth;
};
Grid.prototype.getCanvasHeight = function () {
return this.options.rowHeight * this.rows.length;
};
Grid.prototype.getCanvasWidth = function () {
return this.canvasWidth;
};
Grid.prototype.getTotalRowHeight = function () {
return this.options.rowHeight * this.rows.length;
};
// Is the grid currently scrolling?
Grid.prototype.isScrolling = function() {
return this.scrolling ? true : false;
};
Grid.prototype.setScrolling = function(scrolling) {
this.scrolling = scrolling;
};
/**
* @ngdoc function
* @name ui.grid.class:GridOptions
* @description Default GridOptions class. GridOptions are defined by the application developer and overlaid
* over this object.
* @param {string} id id to assign to grid
*/
function GridOptions() {
/**
* @ngdoc object
* @name data
* @propertyOf ui.grid.class:GridOptions
* @description Array of data to be rendered to grid. Array can contain complex objects
*/
this.data = [];
/**
* @ngdoc object
* @name columnDefs
* @propertyOf ui.grid.class:GridOptions
* @description (optional) Array of columnDef objects. Only required property is name.
* _field property can be used in place of name for backwards compatibilty with 2.x_
* @example
var columnDefs = [{name:'field1'}, {name:'field2'}];
*/
this.columnDefs = [];
this.headerRowHeight = 30;
this.rowHeight = 30;
this.maxVisibleRowCount = 200;
this.columnWidth = 50;
this.maxVisibleColumnCount = 200;
// Turn virtualization on when number of data elements goes over this number
this.virtualizationThreshold = 50;
this.columnVirtualizationThreshold = 20;
// Extra rows to to render outside of the viewport
this.excessRows = 4;
this.scrollThreshold = 4;
// Extra columns to to render outside of the viewport
this.excessColumns = 2;
this.horizontalScrollThreshold = 2;
/**
* @ngdoc function
* @name rowEquality
* @methodOf ui.grid.class:GridOptions
* @description By default, rows are compared using object equality. This option can be overridden
* to compare on any data item property or function
* @param {object} entityA First Data Item to compare
* @param {object} entityB Second Data Item to compare
*/
this.rowEquality = function(entityA, entityB) {
return entityA === entityB;
};
// Custom template for header row
this.headerTemplate = null;
}
/**
* @ngdoc function
* @name ui.grid.class:GridRow
* @description Wrapper for the GridOptions.data rows. Allows for needed properties and functions
* to be assigned to a grid row
* @param {object} entity the array item from GridOptions.data
* @param {number} index the current position of the row in the array
*/
function GridRow(entity, index) {
this.entity = entity;
this.index = index;
}
/**
* @ngdoc function
* @name getQualifiedColField
* @methodOf ui.grid.class:GridRow
* @description returns the qualified field name as it exists on scope
* ie: row.entity.fieldA
* @param {GridCol} col column instance
* @returns {string} resulting name that can be evaluated on scope
*/
GridRow.prototype.getQualifiedColField = function(col) {
return 'row.entity.' + col.field;
};
GridRow.prototype.getEntityQualifiedColField = function(col) {
return 'entity.' + col.field;
};
/**
* @ngdoc function
* @name ui.grid.class:GridColumn
* @description Wrapper for the GridOptions.colDefs items. Allows for needed properties and functions
* to be assigned to a grid column
* @param {ColDef} colDef Column definition.
<br/>Required properties
<ul>
<li>
name - name of field
</li>
</ul>
<br/>Optional properties
<ul>
<li>
field - angular expression that evaluates against grid.options.data array element.
<br/>can be complex - employee.address.city
<br/>Can also be a function - employee.getFullAddress()
<br/>see angular docs on binding expressions
</li>
<li>displayName - column name when displayed on screen. defaults to name</li>
<li>todo: add other optional fields as implementation matures</li>
</ul>
*
* @param {number} index the current position of the column in the array
*/
function GridColumn(colDef, index) {
var self = this;
colDef.index = index;
self.updateColumnDef(colDef);
}
GridColumn.prototype.updateColumnDef = function(colDef, index) {
var self = this;
self.colDef = colDef;
//position of column
self.index = (typeof(index) === 'undefined') ? colDef.index : index;
if (colDef.name === undefined) {
throw new Error('colDef.name is required for column at index ' + self.index);
}
var parseErrorMsg = "Cannot parse column width '" + colDef.width + "' for column named '" + colDef.name + "'";
// If width is not defined, set it to a single star
if (gridUtil.isNullOrUndefined(colDef.width)) {
self.width = '*';
}
else {
// If the width is not a number
if (! angular.isNumber(colDef.width)) {
// See if it ends with a percent
if (gridUtil.endsWith(colDef.width, '%')) {
// If so we should be able to parse the non-percent-sign part to a number
var percentStr = colDef.width.replace(/%/g, '');
var percent = parseFloat(percentStr);
if (isNaN(percent)) {
throw new Error(parseErrorMsg);
}
}
// And see if it's a number string
else if (colDef.width.match(/^(\d+)$/)) {
self.width = parseFloat(colDef.width.match(/^(\d+)$/)[1]);
}
// Otherwise it should be a string of asterisks
else if (! colDef.width.match(/^\*+$/)) {
throw new Error(parseErrorMsg);
}
}
// Is a number, use it as the width
else {
self.width = colDef.width;
}
}
self.minWidth = !colDef.minWidth ? 50 : colDef.minWidth;
self.maxWidth = !colDef.maxWidth ? 9000 : colDef.maxWidth;
//use field if it is defined; name if it is not
self.field = (colDef.field === undefined) ? colDef.name : colDef.field;
// Use colDef.displayName as long as it's not undefined, otherwise default to the field name
self.displayName = (colDef.displayName === undefined) ? gridUtil.readableColumnName(colDef.name) : colDef.displayName;
//self.originalIndex = index;
self.cellClass = colDef.cellClass;
self.cellFilter = colDef.cellFilter ? colDef.cellFilter : "";
self.visible = gridUtil.isNullOrUndefined(colDef.visible) || colDef.visible;
self.headerClass = colDef.headerClass;
//self.cursor = self.sortable ? 'pointer' : 'default';
self.visible = true;
};
return service;
}]);
module.controller('uiGridController', ['$scope', '$element', '$attrs', '$log', 'gridUtil', '$q', 'uiGridConstants',
'$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile',
=======
angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', '$log', 'gridUtil', '$q', 'uiGridConstants',
'$templateCache', 'gridClassFactory', '$timeout', '$parse',
>>>>>>>
angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', '$log', 'gridUtil', '$q', 'uiGridConstants',
'$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile',
<<<<<<<
function preCompileCellTemplates(columns) {
columns.forEach(function (col) {
var html = col.cellTemplate.replace(uiGridConstants.COL_FIELD, 'getCellValue(row, col)');
// console.log('col', col, html);
var compiledElementFn = $compile(html);
col.compiledElementFn = compiledElementFn;
});
}
=======
//TODO: Move this.
$scope.groupings = [];
>>>>>>>
// Function to pre-compile all the cell templates when the column definitions change
function preCompileCellTemplates(columns) {
columns.forEach(function (col) {
var html = col.cellTemplate.replace(uiGridConstants.COL_FIELD, 'getCellValue(row, col)');
var compiledElementFn = $compile(html);
col.compiledElementFn = compiledElementFn;
});
}
//TODO: Move this.
$scope.groupings = []; |
<<<<<<<
import Notification from './notification'
import { tap } from '../utils/promise'
import css from './App.css'
=======
>>>>>>>
import css from './App.css'
<<<<<<<
signup(username, password) {
return new AV.User()
.setUsername(username)
.setPassword(password)
.signUp()
.then(tap(user => Notification.login(user.id)))
}
=======
>>>>>>> |
<<<<<<<
.then((ticket) => {
if (this.state.appId) {
return new AV.Object('Tag').save({
key: 'appId',
value: this.state.appId,
ticket
})
}
return
})
}).then(() => {
=======
})
.then(() => {
this.setState({isCommitting: false})
return
})
.then(() => {
>>>>>>>
.then((ticket) => {
if (this.state.appId) {
return new AV.Object('Tag').save({
key: 'appId',
value: this.state.appId,
ticket
})
}
return
})
})
.then(() => {
this.setState({isCommitting: false})
return
})
.then(() => { |
<<<<<<<
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo, getTicketAcl, OrganizationSelect} from './common'
=======
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo, getTicketAcl, OrganizationSelect, TagForm} from './common'
>>>>>>>
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo, getTicketAcl, OrganizationSelect, TagForm} from './common'
<<<<<<<
title: '',
appId: '',
=======
>>>>>>>
appId: '',
<<<<<<<
categoriesTree, apps,
title, appId, categoryPath, content,
=======
ticket,
categoriesTree,
categoryPath,
>>>>>>>
ticket,
categoriesTree,
categoryPath,
apps,
appId,
<<<<<<<
const appTooltip = (
<Tooltip id="appTooltip">如需显示北美和华东节点应用,请到帐号设置页面关联帐号</Tooltip>
)
=======
const ticket = this.state.ticket
>>>>>>>
const appTooltip = (
<Tooltip id="appTooltip">如需显示北美和华东节点应用,请到帐号设置页面关联帐号</Tooltip>
)
const ticket = this.state.ticket
<<<<<<<
<input type="text" className="form-control docsearch-input" value={this.state.title}
onChange={this.handleTitleChange.bind(this)} />
</FormGroup>
<FormGroup>
<ControlLabel>
相关应用 <OverlayTrigger placement="top" overlay={appTooltip}>
<span className='icon-wrap'><span className='glyphicon glyphicon-question-sign'></span></span>
</OverlayTrigger>
</ControlLabel>
<FormControl componentClass="select" value={this.state.appId} onChange={this.handleAppChange.bind(this)}>
<option key='empty'></option>
{appOptions}
</FormControl>
=======
<input type="text" className="form-control" value={ticket.get('title')} onChange={this.handleTitleChange.bind(this)} />
>>>>>>>
<input type="text" className="form-control docsearch-input" value={ticket.get('title')}
onChange={this.handleTitleChange.bind(this)} />
</FormGroup>
<FormGroup>
<ControlLabel>
相关应用 <OverlayTrigger placement="top" overlay={appTooltip}>
<span className='icon-wrap'><span className='glyphicon glyphicon-question-sign'></span></span>
</OverlayTrigger>
</ControlLabel>
<FormControl componentClass="select" value={this.state.appId} onChange={this.handleAppChange.bind(this)}>
<option key='empty'></option>
{appOptions}
</FormControl> |
<<<<<<<
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo, getTicketAcl, OrganizationSelect} from './common'
=======
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo} from './common'
>>>>>>>
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
import {uploadFiles, getCategoriesTree, depthFirstSearchFind, getTinyCategoryInfo, getTicketAcl, OrganizationSelect} from './common'
<<<<<<<
return ticket.save()
=======
.then((ticket) => {
if (this.state.appId) {
return new AV.Object('Tag').save({
key: 'appId',
value: this.state.appId,
ticket
})
}
return
})
>>>>>>>
return ticket.save()
.then((ticket) => {
if (this.state.appId) {
return new AV.Object('Tag').save({
key: 'appId',
value: this.state.appId,
ticket
})
}
return
})
<<<<<<<
<div>
<form onSubmit={this.handleSubmit.bind(this)}>
{this.props.organizations.length > 0 && <OrganizationSelect organizations={this.props.organizations}
selectedOrgId={this.props.selectedOrgId}
onOrgChange={this.props.handleOrgChange} />}
<FormGroup>
<ControlLabel>标题:</ControlLabel>
<input type="text" className="form-control" value={this.state.title} onChange={this.handleTitleChange.bind(this)} />
</FormGroup>
{categorySelects}
<FormGroup>
<ControlLabel>
问题描述: <OverlayTrigger placement="top" overlay={tooltip}>
<b className="has-required" title="支持 Markdown 语法">M↓</b>
</OverlayTrigger>
</ControlLabel>
<TextareaWithPreview componentClass="textarea" placeholder="在这里输入,粘贴图片即可上传。" rows="8"
value={this.state.content}
onChange={this.handleContentChange.bind(this)}
inputRef={(ref) => this.contentTextarea = ref }
/>
</FormGroup>
<FormGroup>
<input id="ticketFile" type="file" multiple />
</FormGroup>
<Button type='submit' disabled={this.state.isCommitting} bsStyle='primary'>提交</Button>
</form>
</div>
=======
<form onSubmit={this.handleSubmit.bind(this)}>
<FormGroup>
<ControlLabel>标题</ControlLabel>
<input type="text" className="form-control docsearch-input" value={this.state.title}
onChange={this.handleTitleChange.bind(this)} />
</FormGroup>
<FormGroup>
<ControlLabel>
相关应用 <OverlayTrigger placement="top" overlay={appTooltip}>
<span className='icon-wrap'><span className='glyphicon glyphicon-question-sign'></span></span>
</OverlayTrigger>
</ControlLabel>
<FormControl componentClass="select" value={this.state.appId} onChange={this.handleAppChange.bind(this)}>
<option key='empty'></option>
{appOptions}
</FormControl>
</FormGroup>
{categorySelects}
<FormGroup>
<ControlLabel>
问题描述 <OverlayTrigger placement="top" overlay={tooltip}>
<b className="has-required" title="支持 Markdown 语法">M↓</b>
</OverlayTrigger>
</ControlLabel>
<TextareaWithPreview componentClass="textarea" placeholder="在这里输入,粘贴图片即可上传。" rows="8"
value={this.state.content}
onChange={this.handleContentChange.bind(this)}
inputRef={(ref) => this.contentTextarea = ref }
/>
</FormGroup>
<FormGroup>
<input id="ticketFile" type="file" multiple />
</FormGroup>
<Button type='submit' disabled={this.state.isCommitting}>提交</Button>
</form>
>>>>>>>
<div>
<form onSubmit={this.handleSubmit.bind(this)}>
{this.props.organizations.length > 0 && <OrganizationSelect organizations={this.props.organizations}
selectedOrgId={this.props.selectedOrgId}
onOrgChange={this.props.handleOrgChange} />}
<FormGroup>
<ControlLabel>标题:</ControlLabel>
<input type="text" className="form-control docsearch-input" value={this.state.title}
onChange={this.handleTitleChange.bind(this)} />
</FormGroup>
<FormGroup>
<ControlLabel>
相关应用 <OverlayTrigger placement="top" overlay={appTooltip}>
<span className='icon-wrap'><span className='glyphicon glyphicon-question-sign'></span></span>
</OverlayTrigger>
</ControlLabel>
<FormControl componentClass="select" value={this.state.appId} onChange={this.handleAppChange.bind(this)}>
<option key='empty'></option>
{appOptions}
</FormControl>
</FormGroup>
{categorySelects}
<FormGroup>
<ControlLabel>
问题描述: <OverlayTrigger placement="top" overlay={tooltip}>
<b className="has-required" title="支持 Markdown 语法">M↓</b>
</OverlayTrigger>
</ControlLabel>
<TextareaWithPreview componentClass="textarea" placeholder="在这里输入,粘贴图片即可上传。" rows="8"
value={this.state.content}
onChange={this.handleContentChange.bind(this)}
inputRef={(ref) => this.contentTextarea = ref }
/>
</FormGroup>
<FormGroup>
<input id="ticketFile" type="file" multiple />
</FormGroup>
<Button type='submit' disabled={this.state.isCommitting} bsStyle='primary'>提交</Button>
</form>
</div> |
<<<<<<<
/*global $, ALGOLIA_API_KEY*/
=======
/*global $*/
import _ from 'lodash'
>>>>>>>
/*global $, ALGOLIA_API_KEY*/
import _ from 'lodash'
<<<<<<<
import {uploadFiles, getTinyCategoryInfo} from './common'
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
=======
const {uploadFiles, getCategoreisTree, depthFirstSearchFind, getTinyCategoryInfo} = require('./common')
>>>>>>>
import {defaultLeanCloudRegion, getLeanCloudRegionText} from '../lib/common'
const {uploadFiles, getCategoreisTree, depthFirstSearchFind, getTinyCategoryInfo} = require('./common')
<<<<<<<
categories: [],
apps: [],
=======
categoriesTree: [],
>>>>>>>
categoriesTree: [],
apps: [],
<<<<<<<
appId: '',
categoryId: '',
=======
categoryPath: [],
>>>>>>>
appId: '',
categoryPath: [],
<<<<<<<
AV.Cloud.run('checkPermission')
.then(() => {
return Promise.all([
new AV.Query('Category').find(),
AV.Cloud.run('getLeanCloudApps')
.catch((err) => {
if (err.message.indexOf('Could not find LeanCloud authData:') === 0) {
return []
}
throw err
}),
])
})
.then(([categories, apps]) => {
=======
return getCategoreisTree()
.then(categoriesTree => {
>>>>>>>
AV.Cloud.run('checkPermission')
.then(() => {
return Promise.all([
getCategoreisTree(),
AV.Cloud.run('getLeanCloudApps')
.catch((err) => {
if (err.message.indexOf('Could not find LeanCloud authData:') === 0) {
return []
}
throw err
}),
])
})
.then(([categoriesTree, apps]) => {
<<<<<<<
appId='',
categoryId='',
=======
categoryIds=JSON.parse(localStorage.getItem('ticket:new:categoryIds') || '[]'),
>>>>>>>
appId='',
categoryIds=JSON.parse(localStorage.getItem('ticket:new:categoryIds') || '[]'),
<<<<<<<
categories, apps,
title, appId, categoryId, content,
=======
categoriesTree,
title, categoryPath, content,
>>>>>>>
categoriesTree, apps,
title, appId, categoryPath, content,
<<<<<<<
})
const appOptions = this.state.apps.map((app) => {
if (defaultLeanCloudRegion === app.region) {
return <option key={app.app_id} value={app.app_id}>{app.app_name}</option>
}
return <option key={app.app_id} value={app.app_id}>{app.app_name} ({getLeanCloudRegionText(app.region)})</option>
})
=======
}
const categorySelects = []
for (let i = 0; i < this.state.categoryPath.length + 1; i++) {
const selected = this.state.categoryPath[i]
if (i == 0) {
categorySelects.push(getSelect(this.state.categoriesTree, selected, i))
} else {
categorySelects.push(getSelect(this.state.categoryPath[i - 1].children, selected, i))
}
}
>>>>>>>
}
const appOptions = this.state.apps.map((app) => {
if (defaultLeanCloudRegion === app.region) {
return <option key={app.app_id} value={app.app_id}>{app.app_name}</option>
}
return <option key={app.app_id} value={app.app_id}>{app.app_name} ({getLeanCloudRegionText(app.region)})</option>
})
const categorySelects = []
for (let i = 0; i < this.state.categoryPath.length + 1; i++) {
const selected = this.state.categoryPath[i]
if (i == 0) {
categorySelects.push(getSelect(this.state.categoriesTree, selected, i))
} else {
categorySelects.push(getSelect(this.state.categoryPath[i - 1].children, selected, i))
}
} |
<<<<<<<
.then(([privateTags, categoriesTree, replies, opsLogs, watch]) => {
=======
.then(([privateTags, categoriesTree, replies, tags, opsLogs]) => {
>>>>>>>
.then(([privateTags, categoriesTree, replies, tags, opsLogs, watch]) => { |
<<<<<<<
export function command(apiJS, argv) {
const site = new CLILibraryListCommandSite(argv, buildAPIClient(apiJS));
const cmd = new LibraryListCommand();
let count = 0;
=======
export default ({lib, factory, apiJS}) => {
factory.createCommand(lib, 'list', 'Lists libraries available', {
options: {
'filter': {
required: false,
string: true,
description: 'filters libraries not matching the text'
},
'non-interactive': {
required: false,
boolean: true,
description: 'Prints a single page of libraries without prompting'
},
'page': {
required: false,
description: 'Start the listing at the given page number'
},
'limit': {
required: false,
description: 'The number of items to show per page'
}
},
params: '[sections...]',
handler: function libraryListHandler(argv) {
const site = new CLILibraryListCommandSite(argv, buildAPIClient(apiJS));
const cmd = new LibraryListCommand();
function prompForNextPage() {
return prompt.enterToContinueControlCToExit();
}
>>>>>>>
export function command(apiJS, argv) {
const site = new CLILibraryListCommandSite(argv, buildAPIClient(apiJS));
const cmd = new LibraryListCommand(); |
<<<<<<<
/* eslint no-var: 0 */
var app = require('../dist/cli/app');
app.run();
=======
/* eslint no-var: 0 */
global.verboseLevel = 1;
var app = require('../dist/cli/app');
app.default.run();
>>>>>>>
/* eslint no-var: 0 */
global.verboseLevel = 1;
var app = require('../dist/cli/app');
app.run(); |
<<<<<<<
if (rUpdateMethod.test(method)) {
(0, _forEach2.default)(params, function (val, k) {
=======
if (isUpdateMethod) {
_lodash2.default.forEach(params, function (val, k) {
>>>>>>>
if (isUpdateMethod) {
(0, _forEach2.default)(params, function (val, k) {
<<<<<<<
var pagination = getPagination(response);
(0, _assign2.default)(result.pagination, pagination);
=======
>>>>>>> |
<<<<<<<
if(rUpdateMethod.test(method)) {
forEach(params, (val, k) => {
=======
if(isUpdateMethod) {
lodash.forEach(params, (val, k) => {
>>>>>>>
if(isUpdateMethod) {
forEach(params, (val, k) => {
<<<<<<<
let pagination = getPagination(response);
assign(result.pagination, pagination);
=======
>>>>>>> |
<<<<<<<
exports.should = should;
=======
// See https://github.com/shouldjs/should.js/issues/41
Object.defineProperty(exports, 'should', { value: should });
>>>>>>>
Object.defineProperty(exports, 'should', { value: should }); |
<<<<<<<
if (transaction.asset.data) {
var dataBuffer = Buffer.from(transaction.asset.data);
for (i = 0; i < dataBuffer.length; i++) {
=======
if (transaction.data) {
const dataBuffer = Buffer.from(transaction.data);
for (let i = 0; i < dataBuffer.length; i++) {
>>>>>>>
if (transaction.asset.data) {
const dataBuffer = Buffer.from(transaction.asset.data);
for (i = 0; i < dataBuffer.length; i++) { |
<<<<<<<
var privateApi = common.privateApi;
var utils = common.utils;
=======
var sinon = common.sinon;
>>>>>>>
var privateApi = common.privateApi;
var utils = common.utils;
var sinon = common.sinon; |
<<<<<<<
describe('#listMultisignatureTransactions', function () {
it('should list all current not signed multisignature transactions', function (done) {
lisk.api().listMultisignatureTransactions(function(result) {
(result).should.be.ok;
(result).should.be.type('object');
done();
});
});
});
describe('#getMultisignatureTransaction', function () {
it('should list all current not signed multisignature transactions', function (done) {
lisk.api().getMultisignatureTransaction('123', function(result) {
(result).should.be.ok;
(result).should.be.type('object');
done();
});
});
});
=======
>>>>>>>
describe('#listMultisignatureTransactions', function () {
it('should list all current not signed multisignature transactions', function (done) {
lisk.api().listMultisignatureTransactions(function(result) {
(result).should.be.ok;
(result).should.be.type('object');
done();
});
});
});
describe('#getMultisignatureTransaction', function () {
it('should list all current not signed multisignature transactions', function (done) {
lisk.api().getMultisignatureTransaction('123', function(result) {
(result).should.be.ok;
(result).should.be.type('object');
done();
});
});
}); |
<<<<<<<
importTest("transactions newCrypto", './transactions/crypto/index.js');
=======
importTest("api", './api/liskApi.js');
importTest("api", './api/parseTransaction.js');
>>>>>>>
importTest("transactions newCrypto", './transactions/crypto/index.js');
importTest("api", './api/liskApi.js');
importTest("api", './api/parseTransaction.js'); |
<<<<<<<
it('should use time.getTimeWithOffset with an offset of -10 seconds to get the time for the timestamp', () => {
transferOutOfDapp(dappId, transactionId, recipientId, amount, secret, null, offset);
=======
it('should use time slots with an offset of -10 seconds to get the time for the timestamp', () => {
transferOutOfDapp({ dappId, transactionId, recipientId, amount, secret, timeOffset: offset });
>>>>>>>
it('should use time.getTimeWithOffset with an offset of -10 seconds to get the time for the timestamp', () => {
transferOutOfDapp({ dappId, transactionId, recipientId, amount, secret, timeOffset: offset }); |
<<<<<<<
=======
describe('#generateAccount', () => {
const expectedRessult = {
privateKey:
'7683ba873c5e5aa6c12df564a60a93a519e2a5682cf5358a6a5b9ccc70607e96d803281f421e35ca585682829119c270a094fa9a1da2edc3dd65a3dc0dc46497',
publicKey: 'd803281f421e35ca585682829119c270a094fa9a1da2edc3dd65a3dc0dc46497',
};
it('should get publicKey', () => {
const callback = sinon.spy();
const secret = 'dream capable public heart sauce pilot ordinary fever final brand flock boring';
LSK.generateAccount(secret, callback);
(callback.called).should.be.true();
(callback.calledWith(expectedRessult)).should.be.true();
});
});
describe('#listMultisignatureTransactions', () => {
it('should list all current not signed multisignature transactions', () => {
return liskApi().listMultisignatureTransactions((result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
describe('#getMultisignatureTransaction', () => {
it('should get a multisignature transaction by id', () => {
return liskApi().getMultisignatureTransaction('123', (result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
>>>>>>>
describe('#generateAccount', () => {
const expectedRessult = {
privateKey:
'7683ba873c5e5aa6c12df564a60a93a519e2a5682cf5358a6a5b9ccc70607e96d803281f421e35ca585682829119c270a094fa9a1da2edc3dd65a3dc0dc46497',
publicKey: 'd803281f421e35ca585682829119c270a094fa9a1da2edc3dd65a3dc0dc46497',
};
it('should get publicKey', () => {
const callback = sinon.spy();
const secret = 'dream capable public heart sauce pilot ordinary fever final brand flock boring';
LSK.generateAccount(secret, callback);
(callback.called).should.be.true();
(callback.calledWith(expectedRessult)).should.be.true();
});
});
describe('#listMultisignatureTransactions', () => {
it('should list all current not signed multisignature transactions', () => {
return liskApi().listMultisignatureTransactions((result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
describe('#getMultisignatureTransaction', () => {
it('should get a multisignature transaction by id', () => {
return liskApi().getMultisignatureTransaction('123', (result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
<<<<<<<
describe('#checkReDial', () => {
it('should check if all the peers are already banned', () => {
const thisLSK = liskApi();
(privateApi.checkReDial.call(thisLSK)).should.be.equal(true);
});
it('should be able to get a new node when current one is not reachable', () => {
return liskApi({ node: externalNode, randomPeer: true }).sendRequest(GET, 'blocks/getHeight', {}, (result) => {
(result).should.be.type('object');
});
});
it('should recognize that now all the peers are banned for mainnet', () => {
const thisLSK = liskApi();
thisLSK.bannedPeers = liskApi().defaultPeers;
(privateApi.checkReDial.call(thisLSK)).should.be.equal(false);
});
it('should recognize that now all the peers are banned for testnet', () => {
const thisLSK = liskApi({ testnet: true });
thisLSK.bannedPeers = liskApi().defaultTestnetPeers;
(privateApi.checkReDial.call(thisLSK)).should.be.equal(false);
});
it('should recognize that now all the peers are banned for ssl', () => {
const thisLSK = liskApi({ ssl: true });
thisLSK.bannedPeers = liskApi().defaultSSLPeers;
(privateApi.checkReDial.call(thisLSK)).should.be.equal(false);
});
it('should stop redial when all the peers are banned already', () => {
const thisLSK = liskApi();
thisLSK.bannedPeers = liskApi().defaultPeers;
thisLSK.currentPeer = '';
return thisLSK.sendRequest(GET, 'blocks/getHeight').then((e) => {
(e.message).should.be.equal('could not create http request to any of the given peers');
});
});
it('should redial to new node when randomPeer is set true', () => {
const thisLSK = liskApi({ randomPeer: true, node: externalNode });
return thisLSK.getAccount('12731041415715717263L', (data) => {
(data).should.be.ok();
(data.success).should.be.equal(true);
});
});
it('should not redial to new node when randomPeer is set to true but unknown nethash provided', () => {
const thisLSK = liskApi({ randomPeer: true, node: externalNode, nethash: '123' });
(privateApi.checkReDial.call(thisLSK)).should.be.equal(false);
});
it('should redial to mainnet nodes when nethash is set and randomPeer is true', () => {
const thisLSK = liskApi({ randomPeer: true, node: externalNode, nethash: 'ed14889723f24ecc54871d058d98ce91ff2f973192075c0155ba2b7b70ad2511' });
(privateApi.checkReDial.call(thisLSK)).should.be.equal(true);
(thisLSK.testnet).should.be.equal(false);
});
it('should redial to testnet nodes when nethash is set and randomPeer is true', () => {
const thisLSK = liskApi({ randomPeer: true, node: externalNode, nethash: 'da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba' });
(privateApi.checkReDial.call(thisLSK)).should.be.equal(true);
(thisLSK.testnet).should.be.equal(true);
});
it('should not redial when randomPeer is set false', () => {
const thisLSK = liskApi({ randomPeer: false });
(privateApi.checkReDial.call(thisLSK)).should.be.equal(false);
});
});
describe('#sendRequest with promise', () => {
it('should be able to use sendRequest as a promise for GET', () => {
return liskApi().sendRequest(GET, 'blocks/getHeight', {}).then((result) => {
(result).should.be.type('object');
(result.success).should.be.equal(true);
(result.height).should.be.type('number');
});
});
it('should be able to use sendRequest as a promise for POST', () => {
const options = {
ssl: false,
node: '',
randomPeer: true,
testnet: true,
port: testPort,
bannedPeers: [],
};
const LSKnode = liskApi(options);
const secret = 'soap arm custom rhythm october dove chunk force own dial two odor';
const secondSecret = 'spider must salmon someone toe chase aware denial same chief else human';
const recipient = '10279923186189318946L';
const amount = 100000000;
return LSKnode.sendRequest(GET, 'transactions', { recipientId: recipient, secret, secondSecret, amount }).then((result) => {
(result).should.be.type('object');
(result).should.be.ok();
});
});
it('should retry timestamp in future failures', () => {
const thisLSK = liskApi();
const successResponse = { body: { success: true } };
const futureTimestampResponse = {
body: { success: false, message: 'Invalid transaction timestamp. Timestamp is in the future' },
};
const stub = sinon.stub(privateApi, 'sendRequestPromise');
const spy = sinon.spy(thisLSK, 'sendRequest');
stub.resolves(futureTimestampResponse);
stub.onThirdCall().resolves(successResponse);
return thisLSK.sendRequest(POST, 'transactions')
.then(() => {
(spy.callCount).should.equal(3);
(spy.args[1][2]).should.have.property('timeOffset').equal(10);
(spy.args[2][2]).should.have.property('timeOffset').equal(20);
stub.restore();
spy.restore();
});
});
it('should not retry timestamp in future failures forever', () => {
const thisLSK = liskApi();
const futureTimestampResponse = {
body: { success: false, message: 'Invalid transaction timestamp. Timestamp is in the future' },
};
const stub = sinon.stub(privateApi, 'sendRequestPromise');
const spy = sinon.spy(thisLSK, 'sendRequest');
stub.resolves(futureTimestampResponse);
return thisLSK.sendRequest(POST, 'transactions')
.then((response) => {
(response).should.equal(futureTimestampResponse.body);
stub.restore();
spy.restore();
});
});
});
describe('#listMultisignatureTransactions', () => {
it('should list all current not signed multisignature transactions', () => {
return liskApi().listMultisignatureTransactions((result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
describe('#getMultisignatureTransaction', () => {
it('should get a multisignature transaction by id', () => {
return liskApi().getMultisignatureTransaction('123', (result) => {
(result).should.be.ok();
(result).should.be.type('object');
});
});
});
=======
>>>>>>>
<<<<<<<
describe('#createRequestObject', () => {
let options;
let LSKAPI;
let expectedObject;
beforeEach(() => {
options = { limit: 5, offset: 3, details: defaultData };
LSKAPI = liskApi({ node: localNode });
expectedObject = {
method: GET,
url: 'http://localhost:8000/api/transaction',
headers: {
'Content-Type': 'application/json',
nethash: 'ed14889723f24ecc54871d058d98ce91ff2f973192075c0155ba2b7b70ad2511',
broadhash: 'ed14889723f24ecc54871d058d98ce91ff2f973192075c0155ba2b7b70ad2511',
os: 'lisk-js-api',
version: '1.0.0',
minVersion: '>=0.5.0',
port: 8000,
},
body: {},
};
});
it('should create a valid request Object for GET request', () => {
const requestObject = privateApi.createRequestObject.call(LSKAPI, GET, 'transaction', options);
expectedObject.url = 'http://localhost:8000/api/transaction?limit=5&offset=3&details=testData';
(requestObject).should.be.eql(expectedObject);
});
it('should create a valid request Object for POST request', () => {
const requestObject = privateApi.createRequestObject.call(LSKAPI, POST, 'transaction', options);
expectedObject.body = { limit: 5, offset: 3, details: 'testData' };
expectedObject.method = POST;
(requestObject).should.be.eql(expectedObject);
});
it('should create a valid request Object for POST request without options', () => {
const requestObject = privateApi.createRequestObject.call(LSKAPI, POST, 'transaction');
expectedObject.method = POST;
(requestObject).should.be.eql(expectedObject);
});
it('should create a valid request Object for undefined request without options', () => {
const requestObject = privateApi.createRequestObject.call(LSKAPI, undefined, 'transaction');
expectedObject.method = undefined;
(requestObject).should.be.eql(expectedObject);
});
});
describe('#constructRequestData', () => {
it('should construct optional request data for API helper functions', () => {
const address = '123';
const requestData = {
limit: '123',
offset: 5,
};
const expectedObject = {
address: '123',
limit: '123',
offset: 5,
};
const createObject = privateApi.constructRequestData({ address }, requestData);
(createObject).should.be.eql(expectedObject);
});
it('should construct with variable and callback', () => {
const address = '123';
const expectedObject = {
address: '123',
};
const createObject = privateApi.constructRequestData({ address }, () => { return '123'; });
(createObject).should.be.eql(expectedObject);
});
});
=======
>>>>>>>
describe('#constructRequestData', () => {
it('should construct optional request data for API helper functions', () => {
const address = '123';
const requestData = {
limit: '123',
offset: 5,
};
const expectedObject = {
address: '123',
limit: '123',
offset: 5,
};
const createObject = privateApi.constructRequestData({ address }, requestData);
(createObject).should.be.eql(expectedObject);
});
it('should construct with variable and callback', () => {
const address = '123';
const expectedObject = {
address: '123',
};
const createObject = privateApi.constructRequestData({ address }, () => { return '123'; });
(createObject).should.be.eql(expectedObject);
});
}); |
<<<<<<<
/**
* @method isSendTransaction
* @return {object}
*/
=======
>>>>>>>
/**
* @method isSendTransaction
* @return {object}
*/ |
<<<<<<<
function run(code, options) {
var mainModule = require.main;
if (!options)
options = {};
mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : ".";
mainModule.moduleCache && (mainModule.moduleCache = {});
mainModule.paths = require("module")._nodeModulePaths(path.dirname(fs.realpathSync(options.filename)));
if (path.extname(mainModule.filename) !== ".six" || require.extensions) {
mainModule._compile(compile(code, options), mainModule.filename);
} else {
mainModule._compile(code, mainModule.filename);
}
}
function compile(src, options, callback) {
src = rewrite(src, options);
return src;
}
function nodes(src, options) {
return dumpAst(src, options.verbose);
}
if (require && require.extensions) {
require.extensions[".six"] = function (module, filename) {
var content = compile(fs.readFileSync(filename, "utf8"));
return module._compile(content, filename);
};
}
Object.define(exports, {
run: run,
compile: compile,
nodes: nodes
});
=======
var run = exports.run = function (code, options) {
var mainModule = require.main;
if (!options)
options = {};
mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : ".";
mainModule.moduleCache && (mainModule.moduleCache = {});
mainModule.paths = require("module")._nodeModulePaths(path.dirname(fs.realpathSync(options.filename)));
if (path.extname(mainModule.filename) !== ".six" || require.extensions) {
mainModule._compile(compile(code, options), mainModule.filename);
} else {
mainModule._compile(code, mainModule.filename);
}
};
var compile = exports.compile = function (src, options, callback) {
src = rewrite(src, options);
return src;
};
var nodes = exports.nodes = function (src, options) {
return dumpAst(src, options.verbose);
};
>>>>>>>
var run = exports.run = function (code, options) {
var mainModule = require.main;
if (!options)
options = {};
mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : ".";
mainModule.moduleCache && (mainModule.moduleCache = {});
mainModule.paths = require("module")._nodeModulePaths(path.dirname(fs.realpathSync(options.filename)));
if (path.extname(mainModule.filename) !== ".six" || require.extensions) {
mainModule._compile(compile(code, options), mainModule.filename);
} else {
mainModule._compile(code, mainModule.filename);
}
};
var compile = exports.compile = function (src, options, callback) {
src = rewrite(src, options);
return src;
};
var nodes = exports.nodes = function (src, options) {
return dumpAst(src, options.verbose);
};
if (require && require.extensions) {
require.extensions[".six"] = function (module, filename) {
var content = compile(fs.readFileSync(filename, "utf8"));
return module._compile(content, filename);
};
} |
<<<<<<<
if (shouldQueryUrl(url, this)===true) {
return this.linkQueue.enqueue(
{
url: urllib.resolve(baseUrl || "", url), // URL must be absolute
data: { orgUrl:url, baseUrl:baseUrl, customData:customData }
});
}
=======
return this.linkQueue.enqueue(
{
url: urlobj.resolve(baseUrl || "", urlobj.parse(url) ), // URL must be absolute
data: { orgUrl:url, baseUrl:baseUrl, customData:customData }
});
>>>>>>>
if (shouldQueryUrl(url, this)===true) {
return this.linkQueue.enqueue(
{
url: urlobj.resolve(baseUrl || "", urlobj.parse(url) ), // URL must be absolute
data: { orgUrl:url, baseUrl:baseUrl, customData:customData }
});
} |
<<<<<<<
require('./rules/file_type_exclusion').bind(null, {type: '.dll'}),
=======
require('./rules/type_exclusion').bind(null, {type: '.dll'}),
require('./rules/licensee_check').bind(null, {name: 'Licensee Check'}),
>>>>>>>
require('./rules/file_type_exclusion').bind(null, {type: '.dll'}),
require('./rules/licensee_check').bind(null, {name: 'Licensee Check'}), |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.