conflict_resolution
stringlengths
27
16k
<<<<<<< if (action.type === ACTIONS.INIT_DATASET) { return setIn(state, action.id + '._init', true); } if (action.type === ACTIONS.SORT_DATASET) { state = setIn(state, action.id + '._sort', Immutable.fromJS({ sortField: action.sortField, sortOrder: action.sortOrder })); } ======= >>>>>>> if (action.type === ACTIONS.SORT_DATASET) { state = setIn(state, action.id + '._sort', Immutable.fromJS({ sortField: action.sortField, sortOrder: action.sortOrder })); }
<<<<<<< const containerOffset = getElementPosition(container); ======= const containerPosition = offset(container); >>>>>>> const containerPosition = getElementPosition(container); <<<<<<< const elementOffset = getElementPosition(element); ======= const elementPosition = offset(element); >>>>>>> const elementPosition = getElementPosition(element);
<<<<<<< 'Please enter the tenant code in English': '请输入租户编码只允许英文', 'Please enter tenant code in English': '请输入英文租户编码', 'Please enter tenant name without special characters': '请输入不包含特殊字符的租户名称', ======= 'Please enter tenant code': '请输入租户编码', 'Please enter tenant Name': '请输入租户名称', 'The tenant code. Only letters or a combination of letters and numbers are allowed': '租户编码只允许字母或字母与数字组合', >>>>>>> 'Please enter tenant code': '请输入租户编码', 'Please enter tenant Name': '请输入租户名称', 'The tenant code. Only letters or a combination of letters and numbers are allowed': '租户编码只允许字母或字母与数字组合', 'Please enter tenant name without special characters': '请输入不包含特殊字符的租户名称',
<<<<<<< fetchUrl: function(tweetID) { return "/tweets/?tweet_id=" + tweetID; }, icon_name: function() { return 'twitter'; }, ======= icon_name: 'twitter', >>>>>>> fetchUrl: function(tweetID) { return "/tweets/?tweet_id=" + tweetID; }, icon_name: 'twitter',
<<<<<<< var history = chat.core.last && chat.core.last.stamp && {since: Tools.stamp(Tools.unstamp(chat.core.last.stamp).getTime()/1000 + 1)}; console.log(history); ======= var history = chat.core.last && chat.core.last.stamp && {since: Tools.unlocalize(chat.core.last.stamp)}; >>>>>>> var history = chat.core.last && chat.core.last.stamp && {since: Tools.stamp(Tools.unstamp(chat.core.last.stamp).getTime()/1000 + 1)};
<<<<<<< e = e.originalEvent; var el = $(e.target), types = [].slice.call(e.dataTransfer.types); ======= var el = e.target, types = e.dataTransfer.types; >>>>>>> var el = e.target, types = [].slice.call(e.dataTransfer.types);
<<<<<<< this.send = function (to, text, options) { if (options.muc) { this.connection.muc.message(to, Strophe.getNodeFromJid(this.account.core.fullJid), text, null, 'groupchat'); } else { this.connection.Messaging.send(to, text, options.delay); } ======= this.send = function (to, text, delay) { var contact = Lungo.Core.findByProperty(this.account.core.roster, 'jid', to); var caps = contact && contact.presence.caps; var features = caps in App.caps && App.caps[caps].features; var wantsReceipt = features && features.indexOf(Strophe.NS.XEP0184); this.connection.Messaging.send(to, text, delay, wantsReceipt); >>>>>>> this.send = function (to, text, options) { if (options.muc) { this.connection.muc.message(to, Strophe.getNodeFromJid(this.account.core.fullJid), text, null, 'groupchat'); } else { var contact = Lungo.Core.findByProperty(this.account.core.roster, 'jid', to); var caps = contact && contact.presence.caps; var features = caps in App.caps && App.caps[caps].features; var wantsReceipt = features && features.indexOf(Strophe.NS.XEP0184); this.connection.Messaging.send(to, text, options.delay, wantsReceipt); } <<<<<<< var muc = tree.attr('type') == 'groupchat'; var from = tree.attr('from'); var to = muc ? Strophe.getBareJidFromJid(tree.attr('from')) : Strophe.getBareJidFromJid(tree.attr('to')); var body = tree.children('body').length ? tree.children('body').text() : null; var composing = tree.children('composing').length; var paused = tree.children('paused').length || tree.children('active').length; if (body && !(muc && from == to + '/' + Strophe.getNodeFromJid(account.core.fullJid))) { ======= var from = tree.attr('from'); var to = tree.attr('to'); var id = tree.attr('id'); var body = tree.children('body').length ? tree.children('body').text() : null; var composing = tree.children('composing').length; var paused = tree.children('paused').length || tree.children('active').length; var request = tree.children('request').length; var received = tree.children('received').length; if (body) { >>>>>>> var muc = tree.attr('type') == 'groupchat'; var from = tree.attr('from'); var to = muc ? Strophe.getBareJidFromJid(tree.attr('from')) : Strophe.getBareJidFromJid(tree.attr('to')); var body = tree.children('body').length ? tree.children('body').text() : null; var composing = tree.children('composing').length; var paused = tree.children('paused').length || tree.children('active').length; var request = tree.children('request').length; var received = tree.children('received').length; if (body && !(muc && from == to + '/' + Strophe.getNodeFromJid(account.core.fullJid))) {
<<<<<<< import datepickerDocs from './example/datepickerDocs.vue' ======= import calendarDocs from './example/calendarDocs.vue' import searchboxDocs from './example/searchboxDocs.vue' >>>>>>> import datepickerDocs from './example/datepickerDocs.vue' import searchboxDocs from './example/searchboxDocs.vue'
<<<<<<< const FederalistUsersHelper = require('./api/services/FederalistUsersHelper'); ======= const RepositoryVerifier = require('./api/services/RepositoryVerifier'); const SiteUserAuditor = require('./api/services/SiteUserAuditor'); >>>>>>> const FederalistUsersHelper = require('./api/services/FederalistUsersHelper'); const RepositoryVerifier = require('./api/services/RepositoryVerifier'); const SiteUserAuditor = require('./api/services/SiteUserAuditor'); <<<<<<< if (process.env.CF_INSTANCE_INDEX === 0 && config.app.app_env === 'production') { // audit federalist-users 18F teams daily at midnight schedule.scheduleJob('0 0 * * *', () => { FederalistUsersHelper.audit18F({}) .catch(logger.error); }); } ======= if (process.env.CF_INSTANCE_INDEX === 0 && config.app.app_env === 'production') { schedule.scheduleJob('0 0 * * *', () => { RepositoryVerifier.verifyRepos() .catch(logger.error); }); // audit users and remove sites w/o repo push permissions schedule.scheduleJob('0 0 * * *', () => { SiteUserAuditor.auditAllSites() .catch(logger.error); }); } >>>>>>> schedule.scheduleJob('0 0 * * *', () => { RepositoryVerifier.verifyRepos() .catch(logger.error); }); // audit users and remove sites w/o repo push permissions schedule.scheduleJob('0 0 * * *', () => { SiteUserAuditor.auditAllSites() .catch(logger.error); }); if (process.env.CF_INSTANCE_INDEX === 0 && config.app.app_env === 'production') { // audit federalist-users 18F teams daily at midnight schedule.scheduleJob('0 0 * * *', () => { FederalistUsersHelper.audit18F({}) .catch(logger.error); }); }
<<<<<<< describe('.getOrganizationMembers', () => { it('returns a list of all organization members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization }); githubAPINocks.getOrganizationMembers({ accessToken, organization, page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, page: 3 }); GitHub.getOrganizationMembers(accessToken, organization) .then((members) => { expect(members.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'token'; const organization = 'failOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization }); GitHub.getOrganizationMembers(accessToken, organization) .catch((err) => { expect(err.code).to.exist; done(); }); }); it('returns a list of organization admin members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin' }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin', page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin', page: 3 }); GitHub.getOrganizationMembers(accessToken, organization, 'admin') .then((members) => { expect(members.length).to.equal(3); done(); }) .catch(done); }); it('returns a list of organization non-admin members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member' }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member', page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member', page: 3 }); GitHub.getOrganizationMembers(accessToken, organization, 'member') .then((members) => { expect(members.length).to.equal(98); done(); }) .catch(done); }); }); describe('.getTeamMembers', () => { /* eslint-disable camelcase */ it('returns a branch based on the supplied parameters', (done) => { const accessToken = 'token'; const team_id = 12345; githubAPINocks.getTeamMembers({ accessToken, team_id }); githubAPINocks.getTeamMembers({ accessToken, team_id, page: 2 }); githubAPINocks.getTeamMembers({ accessToken, team_id, page: 3 }); GitHub.getTeamMembers(accessToken, team_id) .then((members) => { expect(members.length).to.equal(102); done(); }) .catch(done); }); it('returns a branch based on the supplied parameters', (done) => { const accessToken = 'token'; const team_id = 'failTeam'; githubAPINocks.getTeamMembers({ accessToken, team_id }); GitHub.getTeamMembers(accessToken, team_id) .catch((err) => { expect(err.code).to.exist; done(); }); }); /* eslint-enable camelcase */ }); ======= describe('.getRepositories', () => { it('returns a list of a user repositories', (done) => { const accessToken = 'token'; githubAPINocks.getRepositories({ accessToken }); githubAPINocks.getRepositories({ accessToken, page: 2 }); githubAPINocks.getRepositories({ accessToken, page: 3 }); GitHub.getRepositories(accessToken) .then((repos) => { expect(repos.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'invalid'; GitHub.getRepositories(accessToken) .catch((err) => { expect(err.code).to.exist; done(); }); }); }); describe('.getCollaborators', () => { it('returns a list of a repo collaborators', (done) => { const accessToken = 'token'; const owner = 'owner'; const repository = 'repo'; githubAPINocks.getCollaborators({ accessToken, owner, repository }); githubAPINocks.getCollaborators({ accessToken, owner, repository, page: 2 }); githubAPINocks.getCollaborators({ accessToken, owner, repository, page: 3 }); GitHub.getCollaborators(accessToken, owner, repository) .then((collabs) => { expect(collabs.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'invalid'; GitHub.getRepositories(accessToken) .catch((err) => { expect(err.code).to.exist; done(); }); }); }); >>>>>>> describe('.getRepositories', () => { it('returns a list of a user repositories', (done) => { const accessToken = 'token'; githubAPINocks.getRepositories({ accessToken }); githubAPINocks.getRepositories({ accessToken, page: 2 }); githubAPINocks.getRepositories({ accessToken, page: 3 }); GitHub.getRepositories(accessToken) .then((repos) => { expect(repos.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'invalid'; GitHub.getRepositories(accessToken) .catch((err) => { expect(err.code).to.exist; done(); }); }); }); describe('.getCollaborators', () => { it('returns a list of a repo collaborators', (done) => { const accessToken = 'token'; const owner = 'owner'; const repository = 'repo'; githubAPINocks.getCollaborators({ accessToken, owner, repository }); githubAPINocks.getCollaborators({ accessToken, owner, repository, page: 2 }); githubAPINocks.getCollaborators({ accessToken, owner, repository, page: 3 }); GitHub.getCollaborators(accessToken, owner, repository) .then((collabs) => { expect(collabs.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'invalid'; GitHub.getRepositories(accessToken) .catch((err) => { expect(err.code).to.exist; done(); }); }); }); describe('.getOrganizationMembers', () => { it('returns a list of all organization members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization }); githubAPINocks.getOrganizationMembers({ accessToken, organization, page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, page: 3 }); GitHub.getOrganizationMembers(accessToken, organization) .then((members) => { expect(members.length).to.equal(101); done(); }) .catch(done); }); it('returns an exception', (done) => { const accessToken = 'token'; const organization = 'failOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization }); GitHub.getOrganizationMembers(accessToken, organization) .catch((err) => { expect(err.code).to.exist; done(); }); }); it('returns a list of organization admin members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin' }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin', page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'admin', page: 3 }); GitHub.getOrganizationMembers(accessToken, organization, 'admin') .then((members) => { expect(members.length).to.equal(3); done(); }) .catch(done); }); it('returns a list of organization non-admin members', (done) => { const accessToken = 'token'; const organization = 'testOrg'; githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member' }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member', page: 2 }); githubAPINocks.getOrganizationMembers({ accessToken, organization, role: 'member', page: 3 }); GitHub.getOrganizationMembers(accessToken, organization, 'member') .then((members) => { expect(members.length).to.equal(98); done(); }) .catch(done); }); }); describe('.getTeamMembers', () => { /* eslint-disable camelcase */ it('returns a branch based on the supplied parameters', (done) => { const accessToken = 'token'; const team_id = 12345; githubAPINocks.getTeamMembers({ accessToken, team_id }); githubAPINocks.getTeamMembers({ accessToken, team_id, page: 2 }); githubAPINocks.getTeamMembers({ accessToken, team_id, page: 3 }); GitHub.getTeamMembers(accessToken, team_id) .then((members) => { expect(members.length).to.equal(102); done(); }) .catch(done); }); it('returns a branch based on the supplied parameters', (done) => { const accessToken = 'token'; const team_id = 'failTeam'; githubAPINocks.getTeamMembers({ accessToken, team_id }); GitHub.getTeamMembers(accessToken, team_id) .catch((err) => { expect(err.code).to.exist; done(); }); }); /* eslint-enable camelcase */ });
<<<<<<< /* eslint-disable camelcase */ const getOrganizationMembers = ({ accessToken, organization, role, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; organization = organization || 'test-org'; per_page = per_page || 100; page = page || 1; role = role || 'all'; /* eslint-enable no-param-reassign */ let orgMembers = []; for (let i = 0; i < (per_page + 1); i += 1) { if ((i % 50) === 0) { orgMembers.push({ login: `admin-${organization}-${i}`, role: 'admin' }); } else { orgMembers.push({ login: `user-${organization}-${i}`, role: 'member' }); } } if (role !== 'all') { orgMembers = orgMembers.filter(o => o.role === role); } return nock('https://api.github.com') .get(`/orgs/${organization}/members?access_token=${accessToken}&per_page=${per_page}&page=${page}&role=${role}`) .reply(response || 200, orgMembers.slice(((page - 1) * per_page), (page * per_page))); }; const getTeamMembers = ({ accessToken, team_id, per_page, page, response } = {}) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; team_id = team_id || 'test-team'; per_page = per_page || 100; page = page || 1; /* eslint-enable no-param-reassign */ const teamMembers = []; for (let i = 0; i < (per_page + 2); i += 1) { teamMembers.push({ login: `user-${team_id}-${i}` }); } return nock('https://api.github.com') .get(`/teams/${team_id}/members?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, teamMembers.slice(((page - 1) * per_page), page * per_page)); }; /* eslint-enable camelcase */ ======= /* eslint-disable camelcase */ const getRepositories = ({ accessToken, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; per_page = per_page || 100; page = page || 1; /* eslint-enable no-param-reassign */ const repos = []; for (let i = 0; i < (per_page + 1); i += 1) { repos.push({ full_name: `owner/repo-${i}`, permissions: { push: true } }); } return nock('https://api.github.com') .get(`/user/repos?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, repos.slice(((page - 1) * per_page), (page * per_page))); }; const getCollaborators = ({ accessToken, owner, repository, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; per_page = per_page || 100; page = page || 1; owner = owner || 'owner'; repository = repository || 'repo'; /* eslint-enable no-param-reassign */ const collabs = []; for (let i = 0; i < (per_page + 1); i += 1) { collabs.push({ login: `collaborator-${i}`, permissions: { push: true } }); } return nock('https://api.github.com') .get(`/repos/${owner}/${repository}/collaborators?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, collabs.slice(((page - 1) * per_page), (page * per_page))); }; >>>>>>> /* eslint-disable camelcase */ const getOrganizationMembers = ({ accessToken, organization, role, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; organization = organization || 'test-org'; per_page = per_page || 100; page = page || 1; role = role || 'all'; /* eslint-enable no-param-reassign */ let orgMembers = []; for (let i = 0; i < (per_page + 1); i += 1) { if ((i % 50) === 0) { orgMembers.push({ login: `admin-${organization}-${i}`, role: 'admin' }); } else { orgMembers.push({ login: `user-${organization}-${i}`, role: 'member' }); } } if (role !== 'all') { orgMembers = orgMembers.filter(o => o.role === role); } return nock('https://api.github.com') .get(`/orgs/${organization}/members?access_token=${accessToken}&per_page=${per_page}&page=${page}&role=${role}`) .reply(response || 200, orgMembers.slice(((page - 1) * per_page), (page * per_page))); }; const getTeamMembers = ({ accessToken, team_id, per_page, page, response } = {}) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; team_id = team_id || 'test-team'; per_page = per_page || 100; page = page || 1; /* eslint-enable no-param-reassign */ const teamMembers = []; for (let i = 0; i < (per_page + 2); i += 1) { teamMembers.push({ login: `user-${team_id}-${i}` }); } return nock('https://api.github.com') .get(`/teams/${team_id}/members?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, teamMembers.slice(((page - 1) * per_page), page * per_page)); }; /* eslint-enable camelcase */ const getRepositories = ({ accessToken, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; per_page = per_page || 100; page = page || 1; /* eslint-enable no-param-reassign */ const repos = []; for (let i = 0; i < (per_page + 1); i += 1) { repos.push({ full_name: `owner/repo-${i}`, permissions: { push: true } }); } return nock('https://api.github.com') .get(`/user/repos?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, repos.slice(((page - 1) * per_page), (page * per_page))); }; const getCollaborators = ({ accessToken, owner, repository, per_page, page, response }) => { /* eslint-disable no-param-reassign */ accessToken = accessToken || 'access-token-123abc'; per_page = per_page || 100; page = page || 1; owner = owner || 'owner'; repository = repository || 'repo'; /* eslint-enable no-param-reassign */ const collabs = []; for (let i = 0; i < (per_page + 1); i += 1) { collabs.push({ login: `collaborator-${i}`, permissions: { push: true } }); } return nock('https://api.github.com') .get(`/repos/${owner}/${repository}/collaborators?access_token=${accessToken}&per_page=${per_page}&page=${page}`) .reply(response || 200, collabs.slice(((page - 1) * per_page), (page * per_page))); }; <<<<<<< getTeamMembers, getOrganizationMembers, ======= getRepositories, getCollaborators, >>>>>>> getTeamMembers, getOrganizationMembers, getRepositories, getCollaborators,
<<<<<<< if (o.hasOwnProperty.call(obj, p)) { if (typeof obj[p] == 'object') { ======= if (obj.hasOwnProperty(p)) { if (typeof obj[p] == 'object' && !Array.isArray(obj[p])) { >>>>>>> if (o.hasOwnProperty.call(obj, p)) { if (typeof obj[p] == 'object' && !Array.isArray(obj[p])) {
<<<<<<< ======= >>>>>>> <<<<<<< if (!validChain(newChain) || !luckier(newChain, chain)) console.log("Commit rejected"); else { ======= logger("commit valid: " + validChain(newChain)); logger("commit luckier: " + luckier(newChain, chain)); if (!validChain(newChain) || !luckier(newChain, chain)) { transactions.Links = _.union(newTransactionLinks, transactions.Links); ipfsWriteTransactions(); console.log("Commit rejected"); } else { >>>>>>> logger("commit valid: " + validChain(newChain)); logger("commit luckier: " + luckier(newChain, chain)); if (!validChain(newChain) || !luckier(newChain, chain)) console.log("Commit rejected"); else {
<<<<<<< formatTreeData(data) { data = map(data, function(item){ var i = clone(item); i.parentHash = i.parent; return i; }); //console.log(data); // create a name: node map var dataMap = data.reduce(function(map, node) { map[node.hash] = node; return map; }, {}); console.log(dataMap); // create the tree array var treeData = []; data.forEach(function(node) { // add to parent var parent = dataMap[node.parent]; if (parent === "GENESIS") { parent = null; } if (parent) { // create child array if it doesn't exist (parent.children || (parent.children = [])) // add node to child array .push(node); } else { // parent is or missing treeData.push(node); } }); console.log(treeData); return treeData; } ======= >>>>>>> <<<<<<< //console.log(this.blocks); //this.treeData = blocks; this.treeData = this.formatTreeData(data); ======= >>>>>>>
<<<<<<< }); test('ensure label is scoped to form', function() { var form = $('form#new_user'), input = form.find('input#user_name'); var label = $('label[for="user_name"]'); $('#qunit-fixture') .prepend($('<form />', { id: 'other_form', 'data-validate': true }) .append($('<label for="user_name">Name</label>'))); var otherLabel = $('form#other_form').find('label') input.trigger('focusout'); ok(!otherLabel.parent().hasClass('field_with_errors')); ======= }); test("Return validation result", function() { var input = $('#user_name'); ok(!input.isValid(ClientSideValidations.forms['new_user'].validators)); input.val('123').data('changed', true); ok(input.isValid(ClientSideValidations.forms['new_user'].validators)); >>>>>>> }); test('ensure label is scoped to form', function() { var form = $('form#new_user'), input = form.find('input#user_name'); var label = $('label[for="user_name"]'); $('#qunit-fixture') .prepend($('<form />', { id: 'other_form', 'data-validate': true }) .append($('<label for="user_name">Name</label>'))); var otherLabel = $('form#other_form').find('label') input.trigger('focusout'); ok(!otherLabel.parent().hasClass('field_with_errors')); }); test("Return validation result", function() { var input = $('#user_name'); ok(!input.isValid(ClientSideValidations.forms['new_user'].validators)); input.val('123').data('changed', true); ok(input.isValid(ClientSideValidations.forms['new_user'].validators));
<<<<<<< var userInput = function() { return angular.element.trim(element.val()); }; var invalidInput = function(){ return userInput() && ngModel.$modelValue === null; }; ======= element.on('$destroy', function(){ element.timepicker('remove'); }); >>>>>>> var userInput = function() { return angular.element.trim(element.val()); }; var invalidInput = function(){ return userInput() && ngModel.$modelValue === null; }; element.on('$destroy', function(){ element.timepicker('remove'); });
<<<<<<< ======= gcli.createRequisition = createStartupChecker(function createRequisition() { return new cli.Requisition(); }); gcli.createPromise = createStartupChecker(function createPromise() { return new Promise(); }); // createStartupChecker is not required here because this function is only // available from within a command execution. gcli.getEnvironment = cli.getEnvironment; // Expose the command output manager so that GCLI can be integrated with // Firefox. gcli.commandOutputManager = canon.commandOutputManager; /* * We would like a better defined API with minimal surface area. */ gcli.ui = ui; >>>>>>> // Expose the command output manager so that GCLI can be integrated with // Firefox. gcli.commandOutputManager = canon.commandOutputManager;
<<<<<<< undo: 'отменить осуществления', redo: 'переделывать', preview: 'предварительный просмотр', print: 'печать', tag_p: 'текст', tag_div: 'основной (DIV)', tag_h: 'тема', tag_blockquote: 'цитата', tag_pre: 'код' ======= undo: 'Отменить', redo: 'Вернуть', preview: 'Предварительный просмотр', print: 'Печать', tag_p: 'Текст', tag_div: 'Базовый', tag_h: 'Заголовок', tag_quote: 'Цитата', pre: 'Код' >>>>>>> undo: 'Отменить', redo: 'Вернуть', preview: 'Предварительный просмотр', print: 'Печать', tag_p: 'Текст', tag_div: 'Базовый', tag_h: 'Заголовок', tag_blockquote: 'Цитата', tag_pre: 'Код'
<<<<<<< }, { "id": "svsven", "name": "Sven", "link": "https://github.com/svsven" ======= }, { "id": "dirty-co.de", "name": "Dirty-Co.de", "link": "https://dirty-co.de" >>>>>>> }, { "id": "dirty-co.de", "name": "Dirty-Co.de", "link": "https://dirty-co.de" }, { "id": "svsven", "name": "Sven", "link": "https://github.com/svsven"
<<<<<<< * Get map object describes which kinds of tracks should be marked as recvonly * @param {Object} options - Options of peer.call() * @return {Object} Map object which streamTrack will be recvonly or not */ _getReceiveOnlyState(options = {}) { const state = { audio: false, video: false, }; const hasStream = options.stream instanceof MediaStream; const hasAudioTrack = hasStream ? options.stream.getAudioTracks().length !== 0 : false; const hasVideoTrack = hasStream ? options.stream.getVideoTracks().length !== 0 : false; // force true if stream not passed(backward compatibility) if ( hasStream === false && options.audioReceiveEnabled === undefined && options.videoReceiveEnabled === undefined ) { state.audio = true; state.video = true; return state; } // Set recvonly to true if `stream does not have track` and `option is true` case only if (options.audioReceiveEnabled && hasAudioTrack === false) { state.audio = true; } if (options.videoReceiveEnabled && hasVideoTrack === false) { state.video = true; } // If stream has track, ignore options, which results in setting sendrecv internally. if (options.audioReceiveEnabled === false && hasAudioTrack) { logger.warn('Option audioReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = audio)'); } if (options.videoReceiveEnabled === false && hasVideoTrack) { logger.warn('Option videoReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = video)'); } return state; } /** ======= * Replace the stream being sent with a new one. * Video and audio are replaced per track by using `xxxTrack` methods. * We assume that there is at most 1 audio and at most 1 video in local stream. * @param {MediaStream} newStream - The stream to replace the old stream with. * @private */ _replacePerTrack(newStream) { const _this = this; const vTracks = newStream.getVideoTracks(); const aTracks = newStream.getAudioTracks(); const senders = this._pc.getSenders(); const vSender = senders.find(sender => sender.track.kind === 'video'); const aSender = senders.find(sender => sender.track.kind === 'audio'); _updateSenderWithTrack(vSender, vTracks[0], newStream); _updateSenderWithTrack(aSender, aTracks[0], newStream); this._replaceStreamCalled = true; // We don't actually need to do renegotiation but force it in order to prevent // problems with the stream.id being mismatched when renegotiation happens anyways // Firefox 55 doesn't trigger onnegotiationneeded event when a track in a stream is removed this._pc.onnegotiationneeded(); /** * Replace a track being sent with a new one. * @param {RTCRtpSender} sender - The sender which type is video or audio. * @param {MediaStreamTrack} track - The track of new stream. * @param {MediaStream} stream - The stream which contains the track. * @private */ function _updateSenderWithTrack(sender, track, stream) { if (track === undefined && sender === undefined) { return; } // remove video or audio sender if not passed if (track === undefined) { _this._pc.removeTrack(sender); return; } // if passed, replace track or create sender if (sender === undefined) { _this._pc.addTrack(track, stream); return; } // if track was not replaced, do nothing if (sender.track.id === track.id) { return; } sender.replaceTrack(track); } } /** * Replace the stream being sent with a new one. * Video and audio are replaced per stream by using `xxxStream` methods. * This method is used in some browsers which don't implement `xxxTrack` methods. * @param {MediaStream} newStream - The stream to replace the old stream with. * @private */ _replacePerStream(newStream) { const localStreams = this._pc.getLocalStreams(); // We assume that there is at most 1 stream in localStreams if (localStreams && localStreams[0]) { this._pc.removeStream(localStreams[0]); } this._replaceStreamCalled = true; // a chance to trigger (and do nothing) on removeStream. setTimeout(() => { this._pc.addStream(newStream); }); } /** >>>>>>> * Get map object describes which kinds of tracks should be marked as recvonly * @param {Object} options - Options of peer.call() * @return {Object} Map object which streamTrack will be recvonly or not */ _getReceiveOnlyState(options = {}) { const state = { audio: false, video: false, }; const hasStream = options.stream instanceof MediaStream; const hasAudioTrack = hasStream ? options.stream.getAudioTracks().length !== 0 : false; const hasVideoTrack = hasStream ? options.stream.getVideoTracks().length !== 0 : false; // force true if stream not passed(backward compatibility) if ( hasStream === false && options.audioReceiveEnabled === undefined && options.videoReceiveEnabled === undefined ) { state.audio = true; state.video = true; return state; } // Set recvonly to true if `stream does not have track` and `option is true` case only if (options.audioReceiveEnabled && hasAudioTrack === false) { state.audio = true; } if (options.videoReceiveEnabled && hasVideoTrack === false) { state.video = true; } // If stream has track, ignore options, which results in setting sendrecv internally. if (options.audioReceiveEnabled === false && hasAudioTrack) { logger.warn('Option audioReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = audio)'); } if (options.videoReceiveEnabled === false && hasVideoTrack) { logger.warn('Option videoReceiveEnabled will be treated as true, because passed stream has MediaStreamTrack(kind = video)'); } return state; } /** * Replace the stream being sent with a new one. * Video and audio are replaced per track by using `xxxTrack` methods. * We assume that there is at most 1 audio and at most 1 video in local stream. * @param {MediaStream} newStream - The stream to replace the old stream with. * @private */ _replacePerTrack(newStream) { const _this = this; const vTracks = newStream.getVideoTracks(); const aTracks = newStream.getAudioTracks(); const senders = this._pc.getSenders(); const vSender = senders.find(sender => sender.track.kind === 'video'); const aSender = senders.find(sender => sender.track.kind === 'audio'); _updateSenderWithTrack(vSender, vTracks[0], newStream); _updateSenderWithTrack(aSender, aTracks[0], newStream); this._replaceStreamCalled = true; // We don't actually need to do renegotiation but force it in order to prevent // problems with the stream.id being mismatched when renegotiation happens anyways // Firefox 55 doesn't trigger onnegotiationneeded event when a track in a stream is removed this._pc.onnegotiationneeded(); /** * Replace a track being sent with a new one. * @param {RTCRtpSender} sender - The sender which type is video or audio. * @param {MediaStreamTrack} track - The track of new stream. * @param {MediaStream} stream - The stream which contains the track. * @private */ function _updateSenderWithTrack(sender, track, stream) { if (track === undefined && sender === undefined) { return; } // remove video or audio sender if not passed if (track === undefined) { _this._pc.removeTrack(sender); return; } // if passed, replace track or create sender if (sender === undefined) { _this._pc.addTrack(track, stream); return; } // if track was not replaced, do nothing if (sender.track.id === track.id) { return; } sender.replaceTrack(track); } } /** * Replace the stream being sent with a new one. * Video and audio are replaced per stream by using `xxxStream` methods. * This method is used in some browsers which don't implement `xxxTrack` methods. * @param {MediaStream} newStream - The stream to replace the old stream with. * @private */ _replacePerStream(newStream) { const localStreams = this._pc.getLocalStreams(); // We assume that there is at most 1 stream in localStreams if (localStreams && localStreams[0]) { this._pc.removeStream(localStreams[0]); } this._replaceStreamCalled = true; // a chance to trigger (and do nothing) on removeStream. setTimeout(() => { this._pc.addStream(newStream); }); } /**
<<<<<<< _setupPCListeners(pc) { pc.onaddstream = evt => { util.log('Received remote media stream'); const stream = evt.stream; this.emit('addStream', stream); }; pc.ondatachannel = evt => { util.log('Received data channel'); const dc = evt.channel; this.emit('dcReady', dc); }; pc.onicecandidate = evt => { const candidate = evt.candidate; if (candidate) { util.log('ICE canddidates gathering complete'); util.log('Generated ICE candidate for:', candidate); this.emit(Negotiator.EVENTS.iceCandidate.name, candidate); } else { util.log('ICE canddidates gathering complete'); } }; pc.oniceconnectionstatechange = () => { switch (pc.iceConnectionState) { case 'new': util.log('iceConnectionState is new'); break; case 'checking': util.log('iceConnectionState is checking'); break; case 'connected': util.log('iceConnectionState is connected'); break; case 'completed': util.log('iceConnectionState is completed'); pc.onicecandidate = () => {}; break; case 'failed': util.log('iceConnectionState is failed, closing connection'); this.emit('iceConnectionDisconnected'); break; case 'disconnected': util.log('iceConnectionState is disconnected, closing connection'); this.emit('iceConnectionDisconnected'); break; case 'closed': util.log('iceConnectionState is closed'); break; default: break; } }; pc.onnegotiationneeded = () => { util.log('`negotiationneeded` triggered'); this._makeOfferSdp(pc) .then(offer => { this._setLocalDescription(pc, offer); } ); }; pc.onremovestream = () => { util.log('`removestream` triggered'); }; pc.onsignalingstatechange = () => { switch (pc.signalingState) { case 'stable': util.log('signalingState is stable'); break; case 'have-local-offer': util.log('signalingState is have-local-offer'); break; case 'have-remote-offer': util.log('signalingState is have-remote-offer'); break; case 'have-local-pranswer': util.log('signalingState is have-local-pranswer'); break; case 'have-remote-pranswer': util.log('signalingState is have-remote-pranswer'); break; case 'closed': util.log('signalingState is closed'); break; default: break; } }; return pc; } _makeOfferSdp(pc) { return pc.createOffer() .then(offer => { util.log('Created offer.'); return Promise.resolve(offer); }, error => { this.emitError('webrtc', error); util.log('Failed to createOffer, ', error); return Promise.reject(error); }); } _setLocalDescription(pc, offer) { return pc.setLocalDescription(offer) .then(() => { util.log('Set localDescription: offer'); this.emit(Negotiator.EVENTS.offerCreated.name, offer); }, error => { this.emitError('webrtc', error); util.log('Failed to setLocalDescription, ', error); }); ======= _setupPCListeners(pc) { pc.onaddstream = evt => { util.log('Received remote media stream'); const stream = evt.stream; this.emit(Negotiator.EVENTS.addStream.name, stream); }; pc.ondatachannel = evt => { util.log('Received data channel'); const dc = evt.channel; this.emit(Negotiator.EVENTS.dcReady.name, dc); }; pc.onicecandidate = evt => { const candidate = evt.candidate; if (candidate) { util.log('ICE canddidates gathering complete'); util.log('Generated ICE candidate for:', candidate); this.emit(Negotiator.EVENTS.iceCandidate.name, candidate); } else { util.log('ICE canddidates gathering complete'); } }; pc.oniceconnectionstatechange = () => { switch (pc.iceConnectionState) { case 'new': util.log('iceConnectionState is new'); break; case 'checking': util.log('iceConnectionState is checking'); break; case 'connected': util.log('iceConnectionState is connected'); break; case 'completed': util.log('iceConnectionState is completed'); pc.onicecandidate = () => {}; break; case 'failed': util.log('iceConnectionState is failed, closing connection'); this.emit(Negotiator.EVENTS.iceConnectionDisconnected.name); break; case 'disconnected': util.log('iceConnectionState is disconnected, closing connection'); this.emit(Negotiator.EVENTS.iceConnectionDisconnected.name); break; case 'closed': util.log('iceConnectionState is closed'); break; default: break; } }; pc.onnegotiationneeded = () => { util.log('`negotiationneeded` triggered'); this._makeOfferSdp(pc) .then(offer => { this._setLocalDescription(pc, offer); } ); }; pc.onremovestream = () => { util.log('`removestream` triggered'); }; pc.onsignalingstatechange = () => { switch (pc.signalingState) { case 'stable': util.log('signalingState is stable'); break; case 'have-local-offer': util.log('signalingState is have-local-offer'); break; case 'have-remote-offer': util.log('signalingState is have-remote-offer'); break; case 'have-local-pranswer': util.log('signalingState is have-local-pranswer'); break; case 'have-remote-pranswer': util.log('signalingState is have-remote-pranswer'); break; case 'closed': util.log('signalingState is closed'); break; default: break; } }; return pc; } _makeOfferSdp(pc) { return pc.createOffer() .then(offer => { util.log('Created offer.'); return Promise.resolve(offer); }, error => { this.emitError('webrtc', error); util.log('Failed to createOffer, ', error); return Promise.reject(error); }); } _setLocalDescription(pc, offer) { return pc.setLocalDescription(offer) .then(offer => { util.log('Set localDescription: offer'); this.emit(Negotiator.EVENTS.offerCreated.name, offer); }, error => { this.emitError('webrtc', error); util.log('Failed to setLocalDescription, ', error); }); >>>>>>> _setupPCListeners(pc) { pc.onaddstream = evt => { util.log('Received remote media stream'); const stream = evt.stream; this.emit(Negotiator.EVENTS.addStream.name, stream); }; pc.ondatachannel = evt => { util.log('Received data channel'); const dc = evt.channel; this.emit(Negotiator.EVENTS.dcReady.name, dc); }; pc.onicecandidate = evt => { const candidate = evt.candidate; if (candidate) { util.log('ICE canddidates gathering complete'); util.log('Generated ICE candidate for:', candidate); this.emit(Negotiator.EVENTS.iceCandidate.name, candidate); } else { util.log('ICE canddidates gathering complete'); } }; pc.oniceconnectionstatechange = () => { switch (pc.iceConnectionState) { case 'new': util.log('iceConnectionState is new'); break; case 'checking': util.log('iceConnectionState is checking'); break; case 'connected': util.log('iceConnectionState is connected'); break; case 'completed': util.log('iceConnectionState is completed'); pc.onicecandidate = () => {}; break; case 'failed': util.log('iceConnectionState is failed, closing connection'); this.emit(Negotiator.EVENTS.iceConnectionDisconnected.name); break; case 'disconnected': util.log('iceConnectionState is disconnected, closing connection'); this.emit(Negotiator.EVENTS.iceConnectionDisconnected.name); break; case 'closed': util.log('iceConnectionState is closed'); break; default: break; } }; pc.onnegotiationneeded = () => { util.log('`negotiationneeded` triggered'); this._makeOfferSdp(pc) .then(offer => { this._setLocalDescription(pc, offer); } ); }; pc.onremovestream = () => { util.log('`removestream` triggered'); }; pc.onsignalingstatechange = () => { switch (pc.signalingState) { case 'stable': util.log('signalingState is stable'); break; case 'have-local-offer': util.log('signalingState is have-local-offer'); break; case 'have-remote-offer': util.log('signalingState is have-remote-offer'); break; case 'have-local-pranswer': util.log('signalingState is have-local-pranswer'); break; case 'have-remote-pranswer': util.log('signalingState is have-remote-pranswer'); break; case 'closed': util.log('signalingState is closed'); break; default: break; } }; return pc; } _makeOfferSdp(pc) { return pc.createOffer() .then(offer => { util.log('Created offer.'); return Promise.resolve(offer); }, error => { this.emitError('webrtc', error); util.log('Failed to createOffer, ', error); return Promise.reject(error); }); } _setLocalDescription(pc, offer) { return pc.setLocalDescription(offer) .then(() => { util.log('Set localDescription: offer'); this.emit(Negotiator.EVENTS.offerCreated.name, offer); }, error => { this.emitError('webrtc', error); util.log('Failed to setLocalDescription, ', error); });
<<<<<<< if (!this.disconnected) { this._stopPings(); ======= if (this.isOpen) { >>>>>>> if (this.isOpen) { this._stopPings();
<<<<<<< let cleanupSpy; ======= let answerSpy; let candidateSpy; >>>>>>> let cleanupSpy; let answerSpy; let candidateSpy; <<<<<<< cleanupSpy = sinon.spy(); ======= answerSpy = sinon.spy(); candidateSpy = sinon.spy(); >>>>>>> cleanupSpy = sinon.spy(); answerSpy = sinon.spy(); candidateSpy = sinon.spy(); <<<<<<< startConnection: startSpy, cleanup: cleanupSpy ======= startConnection: startSpy, handleAnswer: answerSpy, handleCandidate: candidateSpy >>>>>>> startConnection: startSpy, cleanup: cleanupSpy, handleAnswer: answerSpy, handleCandidate: candidateSpy <<<<<<< cleanupSpy.reset(); ======= answerSpy.reset(); candidateSpy.reset(); >>>>>>> cleanupSpy.reset(); answerSpy.reset(); candidateSpy.reset(); <<<<<<< describe('Cleanup', () => { it('should close the socket and call the negotiator to cleanup on close()', () => { const mc = new MediaConnection({_stream: {}}); // Force to be open mc.open = true; let spy = sinon.spy(mc, 'close'); mc.close(); assert(mc); assert(spy.calledOnce); assert.equal(mc.open, false); assert(cleanupSpy.called); assert(cleanupSpy.calledWith(mc)); }); }); ======= describe('Handling messages', () => { it('should call negotiator\'s handleAnswer with an answer', () => { const answer = 'message'; const mc = new MediaConnection({_stream: {}}); assert(answerSpy.called === false); mc.handleAnswer(answer); assert(answerSpy.calledOnce === true); }); it('should call negotiator\'s handleCandidate with a candidate', () => { const candidate = 'message'; const mc = new MediaConnection({_stream: {}}); assert(candidateSpy.called === false); mc.handleCandidate(candidate); assert(candidateSpy.calledOnce === true); }); }); describe('Answering', () => { it('should set the localStream upon answering', () => { // Callee, so no _stream option provided at first const mc = new MediaConnection({_payload: {}}); assert.equal(mc.localStream, undefined); mc.answer('foobar'); assert.equal(mc.localStream, 'foobar'); assert.equal(mc.open, true); }); it('should not set the localStream if already set', () => { // Caller, so _stream option is initially provided const mc = new MediaConnection({_stream: 'exists', _payload: {}}); assert.equal(mc.localStream, 'exists'); mc.answer('foobar'); assert.equal(mc.localStream, 'exists'); assert.equal(mc.open, false); }); it('should call negotiator\'s startConnection method upon answering', () => { const mc = new MediaConnection({_payload: {}}); assert(startSpy.called === false); mc.answer('foobar'); assert(startSpy.calledOnce === true); }); it('should process any queued messages after PeerConnection object is created', () => { const messages = [{type: util.MESSAGE_TYPES.ANSWER.name, payload: 'message'}]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); let spy = sinon.spy(mc, 'handleAnswer'); assert.deepEqual(mc._queuedMessages, messages); assert.equal(spy.called, false); mc.answer('foobar'); assert.deepEqual(mc._queuedMessages, []); assert.equal(spy.calledOnce, true); spy.reset(); }); it('should not process any invalid queued messages', () => { const messages = [{type: 'WRONG', payload: 'message'}]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); let spy1 = sinon.spy(mc, 'handleAnswer'); let spy2 = sinon.spy(mc, 'handleCandidate'); assert.deepEqual(mc._queuedMessages, messages); assert.equal(spy1.called, false); assert.equal(spy2.called, false); mc.answer('foobar'); assert.deepEqual(mc._queuedMessages, []); assert.equal(spy1.called, false); assert.equal(spy2.called, false); spy1.reset(); spy2.reset(); }); it('should queue a message if handleMessage is called before PC is available', () => { const message1 = {type: util.MESSAGE_TYPES.CANDIDATE.name, payload: 'message1'}; const message2 = {type: util.MESSAGE_TYPES.ANSWER.name, payload: 'message2'}; const messages = [message1]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); assert.equal(mc._pcAvailable, false); mc.handleAnswer(message2.payload); assert.deepEqual(mc._queuedMessages, [message1, message2]); assert(answerSpy.called === false); assert(candidateSpy.called === false); }); }); >>>>>>> describe('Handling messages', () => { it('should call negotiator\'s handleAnswer with an answer', () => { const answer = 'message'; const mc = new MediaConnection({_stream: {}}); assert(answerSpy.called === false); mc.handleAnswer(answer); assert(answerSpy.calledOnce === true); }); it('should call negotiator\'s handleCandidate with a candidate', () => { const candidate = 'message'; const mc = new MediaConnection({_stream: {}}); assert(candidateSpy.called === false); mc.handleCandidate(candidate); assert(candidateSpy.calledOnce === true); }); }); describe('Answering', () => { it('should set the localStream upon answering', () => { // Callee, so no _stream option provided at first const mc = new MediaConnection({_payload: {}}); assert.equal(mc.localStream, undefined); mc.answer('foobar'); assert.equal(mc.localStream, 'foobar'); assert.equal(mc.open, true); }); it('should not set the localStream if already set', () => { // Caller, so _stream option is initially provided const mc = new MediaConnection({_stream: 'exists', _payload: {}}); assert.equal(mc.localStream, 'exists'); mc.answer('foobar'); assert.equal(mc.localStream, 'exists'); assert.equal(mc.open, false); }); it('should call negotiator\'s startConnection method upon answering', () => { const mc = new MediaConnection({_payload: {}}); assert(startSpy.called === false); mc.answer('foobar'); assert(startSpy.calledOnce === true); }); it('should process any queued messages after PeerConnection object is created', () => { const messages = [{type: util.MESSAGE_TYPES.ANSWER.name, payload: 'message'}]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); let spy = sinon.spy(mc, 'handleAnswer'); assert.deepEqual(mc._queuedMessages, messages); assert.equal(spy.called, false); mc.answer('foobar'); assert.deepEqual(mc._queuedMessages, []); assert.equal(spy.calledOnce, true); spy.reset(); }); it('should not process any invalid queued messages', () => { const messages = [{type: 'WRONG', payload: 'message'}]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); let spy1 = sinon.spy(mc, 'handleAnswer'); let spy2 = sinon.spy(mc, 'handleCandidate'); assert.deepEqual(mc._queuedMessages, messages); assert.equal(spy1.called, false); assert.equal(spy2.called, false); mc.answer('foobar'); assert.deepEqual(mc._queuedMessages, []); assert.equal(spy1.called, false); assert.equal(spy2.called, false); spy1.reset(); spy2.reset(); }); it('should queue a message if handleMessage is called before PC is available', () => { const message1 = {type: util.MESSAGE_TYPES.CANDIDATE.name, payload: 'message1'}; const message2 = {type: util.MESSAGE_TYPES.ANSWER.name, payload: 'message2'}; const messages = [message1]; const mc = new MediaConnection({_payload: {}, _queuedMessages: messages}); assert.equal(mc._pcAvailable, false); mc.handleAnswer(message2.payload); assert.deepEqual(mc._queuedMessages, [message1, message2]); assert(answerSpy.called === false); assert(candidateSpy.called === false); }); }); describe('Cleanup', () => { it('should close the socket and call the negotiator to cleanup on close()', () => { const mc = new MediaConnection({_stream: {}}); // Force to be open mc.open = true; let spy = sinon.spy(mc, 'close'); mc.close(); assert(mc); assert(spy.calledOnce); assert.equal(mc.open, false); assert(cleanupSpy.called); assert(cleanupSpy.calledWith(mc)); }); });
<<<<<<< const Peer = require('../src/peer'); const util = require('../src/util'); ======= >>>>>>> const util = require('../src/util');
<<<<<<< padding: 8px; grid-template-columns: repeat(4, 1fr); grid-gap: 20px; ======= padding: 0; text-align: center; display: flex; align-items: flex-start; &.folks img { border-radius: 50%; } p { margin: 12px 0 0 0; } >>>>>>> padding: 0; text-align: center; display: flex; align-items: flex-start; padding: 8px; &.folks img { border-radius: 50%; } p { margin: 12px 0 0 0; } <<<<<<< margin-top: -50px; ======= margin-bottom: -65px; >>>>>>> margin-bottom: -40px; <<<<<<< /> */} </Card> <Card header="Sponsors"> {/* <Glitch ======= /> </SimpleCard> <SimpleCard header="Team"> <ImageGrid className="folks"> <li> <a target="_blank" href="https://twitter.com/gurlcode"> <img src={jenn} alt="" /> <p>Jenn Creighton</p> </a> Organizer, Mod Maven </li> <li> <a target="_blank" href="https://twitter.com/NikkitaFTW"> <img src={sara} alt="" /> <p>Sara Vieira</p> </a> Organizer, Lightning Wrangler </li> <li> <a target="_blank" href="https://twitter.com/rachelnabors"> <img src={rachel} alt="" /> <p>Rachel Nabors</p> </a> Organizer, Instigator </li> <li> <a target="_blank" href="https://twitter.com/_phzn"> <img src={kevin} alt="" /> <p>Kevin Lewis</p> </a> A/V Crew </li> </ImageGrid> </SimpleCard> <SimpleCard header="Sponsors"> <Glitch >>>>>>> />*/} </Card> <Card header="Team"> <ImageGrid className="folks"> <li> <a target="_blank" href="https://twitter.com/gurlcode"> <img src={jenn} alt="" /> <p>Jenn Creighton</p> </a> Organizer, Mod Maven </li> <li> <a target="_blank" href="https://twitter.com/NikkitaFTW"> <img src={sara} alt="" /> <p>Sara Vieira</p> </a> Organizer, Lightning Wrangler </li> <li> <a target="_blank" href="https://twitter.com/rachelnabors"> <img src={rachel} alt="" /> <p>Rachel Nabors</p> </a> Organizer, Instigator </li> <li> <a target="_blank" href="https://twitter.com/_phzn"> <img src={kevin} alt="" /> <p>Kevin Lewis</p> </a> A/V Crew </li> </ImageGrid> </Card> <Card header="Sponsors"> {/* <Glitch <<<<<<< /> */} <Sponsors> ======= /> <ImageGrid> >>>>>>> /> */} <ImageGrid> <<<<<<< </Sponsors> </Card> ======= </ImageGrid> </SimpleCard> >>>>>>> </ImageGrid> </Card>
<<<<<<< const PYTHON = IS_PY2 ? "python2" : getarg("--python38") ? "python3.8" : "python3.7"; const IMAGE = IS_DOCKER ? python_image(getarg("--manylinux2010") ? "manylinux2010" : getarg("--manylinux2014") ? "manylinux2014" : "", PYTHON) : ""; const PLATFORM = getarg("--platform"); ======= const PYTHON = IS_PY2 ? "python2" : getarg("--python38") ? "python3.8" : getarg("--python36") ? "python3.6": "python3.7"; const IMAGE = python_image(getarg("--manylinux2010") ? "manylinux2010" : getarg("--manylinux2014") ? "manylinux2014" : "", PYTHON); >>>>>>> const PYTHON = IS_PY2 ? "python2" : getarg("--python38") ? "python3.8" : getarg("--python36") ? "python3.6": "python3.7"; const IMAGE = IS_DOCKER ? python_image(getarg("--manylinux2010") ? "manylinux2010" : getarg("--manylinux2014") ? "manylinux2014" : "", PYTHON) : ""; const PLATFORM = getarg("--platform");
<<<<<<< .xDomain(mainAxis.domain(settings).include([0])(data)) .yDomain(crossAxis.domain(settings)(data)) ======= .xDomain( mainAxis .domain(settings) .include([0]) .paddingStrategy(hardLimitZeroPadding())(data) ) .yDomain(crossAxis.domain(settings)(settings.data)) >>>>>>> .xDomain( mainAxis .domain(settings) .include([0]) .paddingStrategy(hardLimitZeroPadding())(data) ) .yDomain(crossAxis.domain(settings)(data))
<<<<<<< this._computed_expression_parser = COMPUTED_EXPRESSION_PARSER; ======= this._edit_port = null; this._edit_port_lock = invertPromise(); >>>>>>> this._computed_expression_parser = COMPUTED_EXPRESSION_PARSER; this._edit_port = null; this._edit_port_lock = invertPromise();
<<<<<<< import { createMeteorNetworkInterface, meteorClientConfig } from 'meteor/apollo'; import ApolloClient from 'apollo-client'; ======= import { createMeteorNetworkInterface } from 'meteor/apollo'; import ApolloClient from 'apollo-client'; >>>>>>> import { createMeteorNetworkInterface, meteorClientConfig } from 'meteor/apollo'; import ApolloClient from 'apollo-client'; <<<<<<< describe('Meteor Client config', () => { it('should accept a custom configuration object extending the default ones', () => { const clientConfig = meteorClientConfig({ addTypename: false, // this is not a default option of the meteorClientConfig }); assert.isFalse(clientConfig.addTypename); }); ======= // Authenticate the test user Meteor._localStorage.setItem('Meteor.loginToken', 'foobar123'); describe('Network interface', function() { >>>>>>> // Authenticate the test user Meteor._localStorage.setItem('Meteor.loginToken', 'foobar123'); describe('Meteor Client config', () => { it('should accept a custom configuration object extending the default ones', () => { const clientConfig = meteorClientConfig({ addTypename: false, // this is not a default option of the meteorClientConfig }); assert.isFalse(clientConfig.addTypename); });
<<<<<<< var content = this.get('content'), index = content.indexOf(element); this.sendAction('addElement', index + 1); ======= let content = this.get('content'); let index = content.indexOf(element); // To lookup validators, container access is required which can cause an issue with Ember.Object // creation if the object is statically imported. The current fix for this is as follows. // https://github.com/offirgolan/ember-cp-validations/blob/master/README.md#basic-usage---objects let container = this.get('container'); let newObject = this.get('elementObject').create({ container }); content .insertAt( index + 1, newObject ); >>>>>>> let content = this.get('content'); let index = content.indexOf(element); this.sendAction('addElement', index + 1); <<<<<<< ======= let content = this.get('content'); let index = content.indexOf(element); >>>>>>>
<<<<<<< this.escapeRegExp = function(str) { ======= lang.objectReverse = function(obj, keySplit) { var i, j, l, key, ret = {}; for (i in obj) { key = obj[i]; if (keySplit && typeof key == "string") { key = key.split(keySplit); for (j = 0, l = key.length; j < l; ++j) ret[key[j]] = i; } else { ret[key] = i; } } return ret; }; lang.escapeRegExp = function(str) { >>>>>>> lang.escapeRegExp = function(str) {
<<<<<<< import ContentSubHeader from '../../components/ContentSubHeader'; ======= import InputLabel from '../../components/InputLabel'; >>>>>>> import ContentSubHeader from '../../components/ContentSubHeader'; <<<<<<< import InputLabel from '../../components/InputLabel'; import EditDeleteButton from '../../components/EditDeleteButton'; import Toggle from '../../components/Toggle'; ======= >>>>>>> import InputLabel from '../../components/InputLabel'; import EditDeleteButton from '../../components/EditDeleteButton'; import Toggle from '../../components/Toggle';
<<<<<<< ======= import saga from './saga'; import { makeSelectActions, makeSelectAgent, makeSelectCategories, makeSelectFilteredCategories, makeSelectFilteredActions, makeSelectKeywords, makeSelectActionsPage, makeSelectNewSayingActions, makeSelectSayings, makeSelectSelectedCategory, makeSelectTotalSayings, makeSelectLocale, makeSelectTotalKeywords, makeSelectTotalActionsPage, makeSelectServerStatus, makeSelectDialoguePageFilterSearchSaying, makeSelectDialoguePageFilterCategory, makeSelectDialoguePageFilterActions, makeSelectDialoguePageNumberOfFiltersApplied, makeSelectDialoguePageFilterString, makeSelectDialoguePageFilterKeywords, } from '../App/selectors'; >>>>>>> import saga from './saga'; import { makeSelectActions, makeSelectAgent, makeSelectCategories, makeSelectFilteredCategories, makeSelectFilteredActions, makeSelectKeywords, makeSelectActionsPage, makeSelectNewSayingActions, makeSelectSayings, makeSelectSelectedCategory, makeSelectTotalSayings, makeSelectLocale, makeSelectTotalKeywords, makeSelectTotalActionsPage, makeSelectServerStatus, makeSelectDialoguePageFilterSearchSaying, makeSelectDialoguePageFilterCategory, makeSelectDialoguePageFilterActions, makeSelectDialoguePageNumberOfFiltersApplied, makeSelectDialoguePageFilterString, makeSelectDialoguePageFilterKeywords, makeSelectAgentVersions, makeSelectCurrentUser, makeSelectLoadingAgentVersion, } from '../App/selectors'; <<<<<<< addAgentVersion, loadAgentVersion, updateAgentVersion, deleteAgentVersion, ======= changeKeywordsPageSize, changeActionsPageSize, changeSayingCategory, resetSayings, toggleChatButton, changeDialoguePageFilterSearchSaying, changeDialoguePageFilterCategory, changeDialoguePageFilterActions, changeDialoguePageNumberOfFiltersApplied, changeDialoguePageFilterString, resetDialoguePageFilters, changeDialoguePageFilterKeywords, >>>>>>> addAgentVersion, loadAgentVersion, updateAgentVersion, deleteAgentVersion, changeDialoguePageFilterSearchSaying, changeDialoguePageFilterCategory, changeDialoguePageFilterActions, changeDialoguePageNumberOfFiltersApplied, changeDialoguePageFilterString, resetDialoguePageFilters, changeDialoguePageFilterKeywords, <<<<<<< (filter, currentSayingsPage = this.state.currentSayingsPage, pageSize = agentSayingsPageSize) => { ======= ( filter = this.props.dialoguePageFilterString, currentSayingsPage = this.state.currentSayingsPage, pageSize = agentSayingsPageSize, ) => { >>>>>>> ( filter = this.props.dialoguePageFilterString, currentSayingsPage = this.state.currentSayingsPage, pageSize = agentSayingsPageSize, ) => { <<<<<<< this.props.onLoadSayings(this.state.filter, pageNumber, this.state.sayingsPageSize); ======= this.props.onLoadSayings( this.props.dialoguePageFilterString, pageNumber, this.state.sayingsPageSize, ); >>>>>>> this.props.onLoadSayings( this.props.dialoguePageFilterString, pageNumber, this.state.sayingsPageSize, ); <<<<<<< this.props.onLoadSayings(this.state.filter, this.state.currentSayingsPage, this.state.sayingsPageSize); ======= this.props.onLoadSayings( this.props.dialoguePageFilterString, this.state.currentSayingsPage, this.state.sayingsPageSize, ); >>>>>>> this.props.onLoadSayings( this.props.dialoguePageFilterString, this.state.currentSayingsPage, this.state.sayingsPageSize, ); <<<<<<< isReadOnly={isReadOnly} ======= onChangeDialoguePageFilterSearchSaying={this.props.onChangeDialoguePageFilterSearchSaying} dialoguePageFilterSearchSaying={this.props.dialoguePageFilterSearchSaying} onChangeDialoguePageFilterCategory={this.props.onChangeDialoguePageFilterCategory} dialoguePageFilterCategory={this.props.dialoguePageFilterCategory} onChangeDialoguePageFilterActions={this.props.onChangeDialoguePageFilterActions} dialoguePageFilterActions={this.props.dialoguePageFilterActions} onChangeDialoguePageNumberOfFiltersApplied={this.props.onChangeDialoguePageNumberOfFiltersApplied} dialoguePageNumberOfFiltersApplied={this.props.dialoguePageNumberOfFiltersApplied} onResetDialoguePageFilters={this.props.onResetDialoguePageFilters} onChangeDialoguePageFilterKeywords={this.props.onChangeDialoguePageFilterKeywords} dialoguePageFilterKeywords={this.props.dialoguePageFilterKeywords} onChangeDialoguePageFilterString={this.props.onChangeDialoguePageFilterString} >>>>>>> isReadOnly={isReadOnly} onChangeDialoguePageFilterSearchSaying={this.props.onChangeDialoguePageFilterSearchSaying} dialoguePageFilterSearchSaying={this.props.dialoguePageFilterSearchSaying} onChangeDialoguePageFilterCategory={this.props.onChangeDialoguePageFilterCategory} dialoguePageFilterCategory={this.props.dialoguePageFilterCategory} onChangeDialoguePageFilterActions={this.props.onChangeDialoguePageFilterActions} dialoguePageFilterActions={this.props.dialoguePageFilterActions} onChangeDialoguePageNumberOfFiltersApplied={this.props.onChangeDialoguePageNumberOfFiltersApplied} dialoguePageNumberOfFiltersApplied={this.props.dialoguePageNumberOfFiltersApplied} onResetDialoguePageFilters={this.props.onResetDialoguePageFilters} onChangeDialoguePageFilterKeywords={this.props.onChangeDialoguePageFilterKeywords} dialoguePageFilterKeywords={this.props.dialoguePageFilterKeywords} onChangeDialoguePageFilterString={this.props.onChangeDialoguePageFilterString} <<<<<<< onShowChatButton: PropTypes.func, currentUser: PropTypes.object, ======= onShowChatButton: PropTypes.func, onChangeDialoguePageFilterSearchSaying: PropTypes.func, dialoguePageFilterSearchSaying: PropTypes.string, onChangeDialoguePageFilterCategory: PropTypes.func, dialoguePageFilterCategory: PropTypes.string, onChangeDialoguePageFilterActions: PropTypes.func, dialoguePageFilterActions: PropTypes.array, onChangeDialoguePageNumberOfFiltersApplied: PropTypes.func, dialoguePageNumberOfFiltersApplied: PropTypes.number, onChangeDialoguePageFilterString: PropTypes.func, dialoguePageFilterString: PropTypes.string, onResetDialoguePageFilters: PropTypes.func, onChangeDialoguePageFilterKeywords: PropTypes.func, dialoguePageFilterKeywords: PropTypes.array >>>>>>> onShowChatButton: PropTypes.func, currentUser: PropTypes.object, onChangeDialoguePageFilterSearchSaying: PropTypes.func, dialoguePageFilterSearchSaying: PropTypes.string, onChangeDialoguePageFilterCategory: PropTypes.func, dialoguePageFilterCategory: PropTypes.string, onChangeDialoguePageFilterActions: PropTypes.func, dialoguePageFilterActions: PropTypes.array, onChangeDialoguePageNumberOfFiltersApplied: PropTypes.func, dialoguePageNumberOfFiltersApplied: PropTypes.number, onChangeDialoguePageFilterString: PropTypes.func, dialoguePageFilterString: PropTypes.string, onResetDialoguePageFilters: PropTypes.func, onChangeDialoguePageFilterKeywords: PropTypes.func, dialoguePageFilterKeywords: PropTypes.array <<<<<<< currentUser: makeSelectCurrentUser(), loadingAgentVersion: makeSelectLoadingAgentVersion() ======= dialoguePageFilterSearchSaying: makeSelectDialoguePageFilterSearchSaying(), dialoguePageFilterCategory: makeSelectDialoguePageFilterCategory(), dialoguePageFilterActions: makeSelectDialoguePageFilterActions(), dialoguePageNumberOfFiltersApplied: makeSelectDialoguePageNumberOfFiltersApplied(), dialoguePageFilterString: makeSelectDialoguePageFilterString(), dialoguePageFilterKeywords: makeSelectDialoguePageFilterKeywords(), >>>>>>> currentUser: makeSelectCurrentUser(), loadingAgentVersion: makeSelectLoadingAgentVersion(), dialoguePageFilterSearchSaying: makeSelectDialoguePageFilterSearchSaying(), dialoguePageFilterCategory: makeSelectDialoguePageFilterCategory(), dialoguePageFilterActions: makeSelectDialoguePageFilterActions(), dialoguePageNumberOfFiltersApplied: makeSelectDialoguePageNumberOfFiltersApplied(), dialoguePageFilterString: makeSelectDialoguePageFilterString(), dialoguePageFilterKeywords: makeSelectDialoguePageFilterKeywords(), <<<<<<< }, onLoadAgentVersion: (versionId, currentAgentId) => { dispatch(loadAgentVersion(versionId, currentAgentId)); }, onUpdateAgentVersion: (version) => { dispatch(updateAgentVersion(version)); }, onDeleteAgentVersion: (versionId, currentAgentId) => { dispatch(deleteAgentVersion(versionId, currentAgentId)); }, onAddAgentVersion: id => { dispatch(addAgentVersion(id)); }, ======= }, onChangeDialoguePageFilterSearchSaying: newValue => { dispatch(changeDialoguePageFilterSearchSaying(newValue)); }, onChangeDialoguePageFilterCategory: newValue => { dispatch(changeDialoguePageFilterCategory(newValue)); }, onChangeDialoguePageFilterActions: newValue => { dispatch(changeDialoguePageFilterActions(newValue)); }, onChangeDialoguePageNumberOfFiltersApplied: newValue => { dispatch(changeDialoguePageNumberOfFiltersApplied(newValue)); }, onChangeDialoguePageFilterString: newValue => { dispatch(changeDialoguePageFilterString(newValue)); }, onResetDialoguePageFilters: () => { dispatch(resetDialoguePageFilters()); }, onChangeDialoguePageFilterKeywords: newValue => { dispatch(changeDialoguePageFilterKeywords(newValue)); } >>>>>>> }, onLoadAgentVersion: (versionId, currentAgentId) => { dispatch(loadAgentVersion(versionId, currentAgentId)); }, onUpdateAgentVersion: (version) => { dispatch(updateAgentVersion(version)); }, onDeleteAgentVersion: (versionId, currentAgentId) => { dispatch(deleteAgentVersion(versionId, currentAgentId)); }, onAddAgentVersion: id => { dispatch(addAgentVersion(id)); }, onChangeDialoguePageFilterSearchSaying: newValue => { dispatch(changeDialoguePageFilterSearchSaying(newValue)); }, onChangeDialoguePageFilterCategory: newValue => { dispatch(changeDialoguePageFilterCategory(newValue)); }, onChangeDialoguePageFilterActions: newValue => { dispatch(changeDialoguePageFilterActions(newValue)); }, onChangeDialoguePageNumberOfFiltersApplied: newValue => { dispatch(changeDialoguePageNumberOfFiltersApplied(newValue)); }, onChangeDialoguePageFilterString: newValue => { dispatch(changeDialoguePageFilterString(newValue)); }, onResetDialoguePageFilters: () => { dispatch(resetDialoguePageFilters()); }, onChangeDialoguePageFilterKeywords: newValue => { dispatch(changeDialoguePageFilterKeywords(newValue)); }
<<<<<<< static get schema() { return { id: Joi.number(), gravatar: Joi.number(), uiColor: Joi.string().trim(), agentName: Joi.string().trim(), description: Joi.string().trim(), language: Joi.string().trim(), timezone: Joi.string().trim(), useWebhook: Joi.boolean(), usePostFormat: Joi.boolean(), multiCategory: Joi.boolean(), categoryClassifierThreshold: Joi.number(), fallbackAction: Joi.string().trim(), status: Joi.string().trim(), lastTraining: Joi.alternatives().try( Joi.date(), Joi.string() .trim() .allow('') ), extraTrainingData: Joi.boolean(), enableModelsPerCategory: Joi.boolean(), model: Joi.string().allow(''), categoryRecognizer: Joi.boolean(), modifiersRecognizer: Joi.boolean(), modifiersRecognizerJustER: Joi.string().allow(''), creationDate: Joi.string(), modificationDate: Joi.string(), parameters: Joi.object(), enableDiscoverySheet: Joi.boolean(), enableAgentVersions: Joi.boolean(), generateSlotsQuickResponses: Joi.boolean(), accessPolicies: Joi.object(), generateSlotsQuickResponsesMax: Joi.number(), generateActionsQuickResponses: Joi.boolean(), generateActionsQuickResponsesMax: Joi.number(), isOriginalAgentVersion: Joi.boolean(), originalAgentVersionId: Joi.number(), originalAgentVersionName: Joi.string(), agentVersionNotes: Joi.string(), loadedAgentVersionName: Joi.string(), currentAgentVersionCounter: Joi.number(), enableAgentVersions: Joi.boolean(), ======= static get schema() { return { id: Joi.number(), gravatar: Joi.number(), uiColor: Joi.string().trim(), agentName: Joi.string().trim(), description: Joi.string().trim(), language: Joi.string().trim(), timezone: Joi.string().trim(), useWebhook: Joi.boolean(), usePostFormat: Joi.boolean(), multiCategory: Joi.boolean(), categoryClassifierThreshold: Joi.number(), fallbackAction: Joi.string().trim(), welcomeAction: Joi.string().trim(), status: Joi.string().trim(), lastTraining: Joi.alternatives().try(Joi.date(), Joi.string().trim().allow('')), extraTrainingData: Joi.boolean(), enableModelsPerCategory: Joi.boolean(), model: Joi.string().allow(''), categoryRecognizer: Joi.boolean(), modifiersRecognizer: Joi.boolean(), modifiersRecognizerJustER: Joi.string().allow(''), creationDate: Joi.string(), modificationDate: Joi.string(), parameters: Joi.object() }; >>>>>>> static get schema() { return { id: Joi.number(), gravatar: Joi.number(), uiColor: Joi.string().trim(), agentName: Joi.string().trim(), description: Joi.string().trim(), language: Joi.string().trim(), timezone: Joi.string().trim(), useWebhook: Joi.boolean(), usePostFormat: Joi.boolean(), multiCategory: Joi.boolean(), categoryClassifierThreshold: Joi.number(), fallbackAction: Joi.string().trim(), welcomeAction: Joi.string().trim(), status: Joi.string().trim(), lastTraining: Joi.alternatives().try( Joi.date(), Joi.string() .trim() .allow('') ), extraTrainingData: Joi.boolean(), enableModelsPerCategory: Joi.boolean(), model: Joi.string().allow(''), categoryRecognizer: Joi.boolean(), modifiersRecognizer: Joi.boolean(), modifiersRecognizerJustER: Joi.string().allow(''), creationDate: Joi.string(), modificationDate: Joi.string(), parameters: Joi.object(), enableDiscoverySheet: Joi.boolean(), enableAgentVersions: Joi.boolean(), generateSlotsQuickResponses: Joi.boolean(), accessPolicies: Joi.object(), generateSlotsQuickResponsesMax: Joi.number(), generateActionsQuickResponses: Joi.boolean(), generateActionsQuickResponsesMax: Joi.number(), isOriginalAgentVersion: Joi.boolean(), originalAgentVersionId: Joi.number(), originalAgentVersionName: Joi.string(), agentVersionNotes: Joi.string(), loadedAgentVersionName: Joi.string(), currentAgentVersionCounter: Joi.number(), enableAgentVersions: Joi.boolean(),
<<<<<<< defaultMessage: 'Webhook Definition', }, usePostFormat:{ id: 'boilerplate.containers.IntentPage.create_agent.use_postFormat', defaultMessage: 'Response Definition', }, postFormat:{ id: 'boilerplate.containers.IntentPage.create_agent.postFormat', defaultMessage: 'Response definition', ======= defaultMessage: 'Webhook', }, newSlotButton: { id: 'boilerplate.containers.IntentPage.create_agent.new_slot_button', defaultMessage: 'New +', }, defaultNewSlotName: { id: 'boilerplate.containers.IntentPage.create_agent.default_new_slot_name', defaultMessage: 'New slot', }, checkEntitiesOfSlots: { id: 'boilerplate.containers.IntentPage.create_agent.default_new_slot_name', defaultMessage: 'Please verify that every slot have an entity value', >>>>>>> defaultMessage: 'Webhook Definition', }, usePostFormat:{ id: 'boilerplate.containers.IntentPage.create_agent.use_postFormat', defaultMessage: 'Response Definition', }, postFormat:{ id: 'boilerplate.containers.IntentPage.create_agent.postFormat', defaultMessage: 'Response definition', }, newSlotButton: { id: 'boilerplate.containers.IntentPage.create_agent.new_slot_button', defaultMessage: 'New +', }, defaultNewSlotName: { id: 'boilerplate.containers.IntentPage.create_agent.default_new_slot_name', defaultMessage: 'New slot', }, checkEntitiesOfSlots: { id: 'boilerplate.containers.IntentPage.create_agent.default_new_slot_name', defaultMessage: 'Please verify that every slot have an entity value',
<<<<<<< EDIT_SLOT_TEXT_PROMPT, ======= EDIT_TEXT_RESPONSE_FLAG, >>>>>>> EDIT_SLOT_TEXT_PROMPT, EDIT_TEXT_RESPONSE_FLAG, <<<<<<< UPDATE_SETTINGS_TOUCHED, UPDATE_USER, UPDATE_USER_ERROR, UPDATE_USER_SUCCESS, ======= LOAD_SESSION, LOAD_SESSION_ERROR, LOAD_SESSION_SUCCESS, DELETE_SESSION, DELETE_SESSION_SUCCESS, DELETE_SESSION_ERROR, SHOW_WARNING, LOAD_PREBUILT_CATEGORIES, LOAD_PREBUILT_CATEGORIES_ERROR, LOAD_PREBUILT_CATEGORIES_SUCCESS, IMPORT_CATEGORY, IMPORT_CATEGORY_ERROR, IMPORT_CATEGORY_SUCCESS, REFRESH_SERVER_INFO, LOAD_SERVER_INFO, LOAD_SERVER_INFO_ERROR, LOAD_SERVER_INFO_SUCCESS, LOAD_AGENT_SESSIONS, LOAD_AGENT_SESSIONS_ERROR, LOAD_AGENT_SESSIONS_SUCCESS, ADD_NEW_QUICK_RESPONSE, DELETE_QUICK_RESPONSE, CHANGE_QUICK_RESPONSE, EDIT_SLOT_TEXT_PROMPT, DELETE_SLOT_TEXT_PROMPT, LOAD_USERS, LOAD_USERS_ERROR, LOAD_USERS_SUCCESS, DELETE_USER, DELETE_USER_SUCCESS, DELETE_USER_ERROR, RESET_SUCCESS_AGENT, RECOGNIZE_UPDATED_KEYWORDS, ADD_NEW_ACTION_RESPONSE_QUICK_RESPONSE, DELETE_NEW_ACTION_RESPONSE_QUICK_RESPONSE, CHANGE_DIALOGUE_PAGE_FILTER_SEARCH_SAYING, CHANGE_DIALOGUE_PAGE_FILTER_CATEGORY, CHANGE_DIALOGUE_PAGE_FILTER_ACTIONS, CHANGE_DIALOGUE_PAGE_NUMBER_OF_FILTERS_APPLIED, CHANGE_DIALOGUE_PAGE_FILTER_STRING, CHANGE_DIALOGUE_PAGE_FILTER_KEYWORDS, CHANGE_REVIEW_PAGE_FILTER_SEARCH_SAYING, CHANGE_REVIEW_PAGE_FILTER_CATEGORY, CHANGE_REVIEW_PAGE_FILTER_ACTIONS, CHANGE_REVIEW_PAGE_NUMBER_OF_FILTERS_APPLIED, CHANGE_REVIEW_PAGE_FILTER_STRING, CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MIN, CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MAX, CHANGE_REVIEW_PAGE_FILTER_CONTAINERS, CHANGE_REVIEW_PAGE_FILTER_MAX_LOGS, CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, CHANGE_REVIEW_PAGE_LOGS_NUMBER_OF_FILTERS_APPLIED, RESET_DIALOGUE_PAGE_FILTERS, RESET_REVIEW_PAGE_FILTERS, RESET_REVIEW_PAGE_LOGS_FILTERS >>>>>>> UPDATE_SETTINGS_TOUCHED, UPDATE_USER, UPDATE_USER_ERROR, UPDATE_USER_SUCCESS, DELETE_SESSION, DELETE_SESSION_SUCCESS, DELETE_SESSION_ERROR, IMPORT_CATEGORY, IMPORT_CATEGORY_ERROR, IMPORT_CATEGORY_SUCCESS, REFRESH_SERVER_INFO, DELETE_SLOT_TEXT_PROMPT, CHANGE_DIALOGUE_PAGE_FILTER_SEARCH_SAYING, CHANGE_DIALOGUE_PAGE_FILTER_CATEGORY, CHANGE_DIALOGUE_PAGE_FILTER_ACTIONS, CHANGE_DIALOGUE_PAGE_NUMBER_OF_FILTERS_APPLIED, CHANGE_DIALOGUE_PAGE_FILTER_STRING, CHANGE_DIALOGUE_PAGE_FILTER_KEYWORDS, CHANGE_REVIEW_PAGE_FILTER_SEARCH_SAYING, CHANGE_REVIEW_PAGE_FILTER_CATEGORY, CHANGE_REVIEW_PAGE_FILTER_ACTIONS, CHANGE_REVIEW_PAGE_NUMBER_OF_FILTERS_APPLIED, CHANGE_REVIEW_PAGE_FILTER_STRING, CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MIN, CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MAX, CHANGE_REVIEW_PAGE_FILTER_CONTAINERS, CHANGE_REVIEW_PAGE_FILTER_MAX_LOGS, CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, CHANGE_REVIEW_PAGE_LOGS_NUMBER_OF_FILTERS_APPLIED, RESET_DIALOGUE_PAGE_FILTERS, RESET_REVIEW_PAGE_FILTERS, RESET_REVIEW_PAGE_LOGS_FILTERS <<<<<<< } export function loadUser({ id }) { return { type: LOAD_USER, apiCall: true, id, }; } export function loadUserError(error) { return { type: LOAD_USER_ERROR, error, }; } export function loadUserSuccess({ user }) { return { type: LOAD_USER_SUCCESS, user, }; } export function changeUserData({ field, value }) { return { type: CHANGE_USER_DATA, field, value, }; } export function updateUser({ id, data }) { return { type: UPDATE_USER, apiCall: true, id, data, }; } export function updateUserError(error) { return { type: UPDATE_USER_ERROR, error, }; } export function updateUserSuccess({ user }) { return { type: UPDATE_USER_SUCCESS, user, }; ======= } export function changeDialoguePageFilterSearchSaying(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_SEARCH_SAYING, newValue, } } export function changeDialoguePageFilterCategory(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_CATEGORY, newValue, } } export function changeDialoguePageFilterActions(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_ACTIONS, newValue, } } export function changeDialoguePageNumberOfFiltersApplied(newValue) { return { type: CHANGE_DIALOGUE_PAGE_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function changeDialoguePageFilterString(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_STRING, newValue, } } export function changeDialoguePageFilterKeywords(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_KEYWORDS, newValue, } } export function changeReviewPageFilterSearchSaying(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_SEARCH_SAYING, newValue, } } export function changeReviewPageFilterCategory(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_CATEGORY, newValue, } } export function changeReviewPageFilterActions(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTIONS, newValue, } } export function changeReviewPageNumberOfFiltersApplied(newValue) { return { type: CHANGE_REVIEW_PAGE_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function changeReviewPageFilterString(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_STRING, newValue, } } export function changeReviewPageFilterActionIntervalMin(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MIN, newValue, } } export function changeReviewPageFilterActionIntervalMax(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MAX, newValue, } } export function changeReviewPageFilterContainers(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_CONTAINERS, newValue, } } export function changeReviewPageFilterMaxLogs(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_MAX_LOGS, newValue, } } export function changeReviewPageFilterLogsString(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, newValue, } } export function changeReviewPageNUMBERT(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, newValue, } } export function changeReviewPageLogsNumberOfFiltersApplied(newValue) { return { type: CHANGE_REVIEW_PAGE_LOGS_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function resetDialoguePageFilters() { return { type: RESET_DIALOGUE_PAGE_FILTERS } } export function resetReviewPageFilters() { return { type: RESET_REVIEW_PAGE_FILTERS } } export function resetReviewPageLogsFilters() { return { type: RESET_REVIEW_PAGE_LOGS_FILTERS } >>>>>>> } export function loadUser({ id }) { return { type: LOAD_USER, apiCall: true, id, }; } export function loadUserError(error) { return { type: LOAD_USER_ERROR, error, }; } export function loadUserSuccess({ user }) { return { type: LOAD_USER_SUCCESS, user, }; } export function changeUserData({ field, value }) { return { type: CHANGE_USER_DATA, field, value, }; } export function updateUser({ id, data }) { return { type: UPDATE_USER, apiCall: true, id, data, }; } export function updateUserError(error) { return { type: UPDATE_USER_ERROR, error, }; } export function updateUserSuccess({ user }) { return { type: UPDATE_USER_SUCCESS, user, }; } export function changeDialoguePageFilterSearchSaying(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_SEARCH_SAYING, newValue, } } export function changeDialoguePageFilterCategory(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_CATEGORY, newValue, } } export function changeDialoguePageFilterActions(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_ACTIONS, newValue, } } export function changeDialoguePageNumberOfFiltersApplied(newValue) { return { type: CHANGE_DIALOGUE_PAGE_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function changeDialoguePageFilterString(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_STRING, newValue, } } export function changeDialoguePageFilterKeywords(newValue) { return { type: CHANGE_DIALOGUE_PAGE_FILTER_KEYWORDS, newValue, } } export function changeReviewPageFilterSearchSaying(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_SEARCH_SAYING, newValue, } } export function changeReviewPageFilterCategory(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_CATEGORY, newValue, } } export function changeReviewPageFilterActions(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTIONS, newValue, } } export function changeReviewPageNumberOfFiltersApplied(newValue) { return { type: CHANGE_REVIEW_PAGE_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function changeReviewPageFilterString(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_STRING, newValue, } } export function changeReviewPageFilterActionIntervalMin(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MIN, newValue, } } export function changeReviewPageFilterActionIntervalMax(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_ACTION_INTERVAL_MAX, newValue, } } export function changeReviewPageFilterContainers(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_CONTAINERS, newValue, } } export function changeReviewPageFilterMaxLogs(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_MAX_LOGS, newValue, } } export function changeReviewPageFilterLogsString(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, newValue, } } export function changeReviewPageNUMBERT(newValue) { return { type: CHANGE_REVIEW_PAGE_FILTER_LOGS_STRING, newValue, } } export function changeReviewPageLogsNumberOfFiltersApplied(newValue) { return { type: CHANGE_REVIEW_PAGE_LOGS_NUMBER_OF_FILTERS_APPLIED, newValue, } } export function resetDialoguePageFilters() { return { type: RESET_DIALOGUE_PAGE_FILTERS } } export function resetReviewPageFilters() { return { type: RESET_REVIEW_PAGE_FILTERS } } export function resetReviewPageLogsFilters() { return { type: RESET_REVIEW_PAGE_LOGS_FILTERS }
<<<<<<< LOGIN_USER, LOGIN_USER_SUCCESS, ======= REFRESH_KEYWORD_EXAMPLE_UPDATE >>>>>>> LOGIN_USER, LOGIN_USER_SUCCESS, REFRESH_KEYWORD_EXAMPLE_UPDATE
<<<<<<< addAction, ======= makeSelectAction, makeSelectActionWebhook, makeSelectActionPostFormat, makeSelectKeywords, makeSelectAgent, makeSelectSayingForAction, makeSelectActions, makeSelectFilteredActions, makeSelectSuccessAction, makeSelectLoading, makeSelectActionTouched, makeSelectNewActionResponse, makeSelectRichResponses, } from '../App/selectors'; import { loadAction, loadActions, loadKeywords, changeActionName, changeActionData, >>>>>>> makeSelectAction, makeSelectActionWebhook, makeSelectActionPostFormat, makeSelectKeywords, makeSelectAgent, makeSelectSayingForAction, makeSelectActions, makeSelectFilteredActions, makeSelectSuccessAction, makeSelectLoading, makeSelectActionTouched, makeSelectNewActionResponse, makeSelectRichResponses, makeSelectCurrentUser, } from '../App/selectors'; import { addAction, changeActionName, changeActionData, <<<<<<< unchainActionFromResponse, updateAction, updateNewResponse, ======= addNewActionResponseQuickResponse, deleteNewActionResponseQuickResponse, loadRichResponses, addRichResponse, deleteRichResponse, editRichResponse, changeTextResponseFlag, >>>>>>> unchainActionFromResponse, updateAction, updateNewResponse, loadRichResponses, addRichResponse, deleteRichResponse, editRichResponse, changeTextResponseFlag, <<<<<<< const { classes, agent, currentUser} = this.props; const isReadOnly = !AC.validate({ userPolicies: currentUser.simplifiedGroupPolicies, requiredPolicies: [GROUP_ACCESS_CONTROL.AGENT_WRITE] }); ======= const { classes, richResponses } = this.props; >>>>>>> const { classes, agent, currentUser, richResponses } = this.props; const isReadOnly = !AC.validate({ userPolicies: currentUser.simplifiedGroupPolicies, requiredPolicies: [GROUP_ACCESS_CONTROL.AGENT_WRITE] }); <<<<<<< onAddNewActionResponseQuickResponse={this.props.onAddNewActionResponseQuickResponse} onDeleteNewActionResponseQuickResponse={this.props.onDeleteNewActionResponseQuickResponse} ======= onAddNewActionResponseQuickResponse={this.props.onAddNewActionResponseQuickResponse} onDeleteNewActionResponseQuickResponse={this.props.onDeleteNewActionResponseQuickResponse} richResponses={richResponses} onAddRichResponse={this.props.onAddRichResponse} onDeleteRichResponse={this.props.onDeleteRichResponse} onEditRichResponse={this.props.onEditRichResponse} >>>>>>> onAddNewActionResponseQuickResponse={this.props.onAddNewActionResponseQuickResponse} onDeleteNewActionResponseQuickResponse={this.props.onDeleteNewActionResponseQuickResponse} richResponses={richResponses} onAddRichResponse={this.props.onAddRichResponse} onDeleteRichResponse={this.props.onDeleteRichResponse} onEditRichResponse={this.props.onEditRichResponse} <<<<<<< currentUser: PropTypes.object, onDeleteNewActionResponseQuickResponse: PropTypes.func.isRequired, onAddNewActionResponseQuickResponse: PropTypes.func.isRequired, ======= richResponses: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), onAddRichResponse: PropTypes.func.isRequired, onDeleteRichResponse: PropTypes.func.isRequired, onEditRichResponse: PropTypes.func.isRequired, >>>>>>> currentUser: PropTypes.object, onDeleteNewActionResponseQuickResponse: PropTypes.func.isRequired, onAddNewActionResponseQuickResponse: PropTypes.func.isRequired, richResponses: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), onAddRichResponse: PropTypes.func.isRequired, onDeleteRichResponse: PropTypes.func.isRequired, onEditRichResponse: PropTypes.func.isRequired, <<<<<<< currentUser: makeSelectCurrentUser(), ======= richResponses: makeSelectRichResponses(), >>>>>>> currentUser: makeSelectCurrentUser(), richResponses: makeSelectRichResponses(),
<<<<<<< freeTextContainer: { position: 'relative', top: '50%', left: '50%', transform: 'translate(-50%,-50%)' } ======= responseEnter: { color: '#4e4e4e', fontSize: '12px', paddingRight: '15px', textDecoration: 'underline', cursor: 'pointer', }, newQuickResponseInputContainer: { border: '1px solid #a2a7b1', borderRadius: '5px', }, newCurrentSlotInputContainer: { border: '1px solid #a2a7b1', borderRadius: '5px', }, >>>>>>> freeTextContainer: { position: 'relative', top: '50%', left: '50%', transform: 'translate(-50%,-50%)' }, responseEnter: { color: '#4e4e4e', fontSize: '12px', paddingRight: '15px', textDecoration: 'underline', cursor: 'pointer', }, newQuickResponseInputContainer: { border: '1px solid #a2a7b1', borderRadius: '5px', }, newCurrentSlotInputContainer: { border: '1px solid #a2a7b1', borderRadius: '5px', },
<<<<<<< export const CONFIG_SETTINGS_SLACK_LOGGING_URL = 'slackLoggingURL'; ======= export const CONFIG_SETTINGS_ALLOW_NEW_USERS_SIGN_UPS = 'allowNewUsersSignUps'; >>>>>>> export const CONFIG_SETTINGS_SLACK_LOGGING_URL = 'slackLoggingURL'; export const CONFIG_SETTINGS_ALLOW_NEW_USERS_SIGN_UPS = 'allowNewUsersSignUps'; <<<<<<< CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH, CONFIG_SETTINGS_SLACK_LOGGING_URL ======= CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH, CONFIG_SETTINGS_ALLOW_NEW_USERS_SIGN_UPS >>>>>>> CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH, CONFIG_SETTINGS_SLACK_LOGGING_URL, CONFIG_SETTINGS_ALLOW_NEW_USERS_SIGN_UPS <<<<<<< CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH, CONFIG_SETTINGS_SLACK_LOGGING_URL, ======= CONFIG_SETTINGS_USERS_PAGE_SIZE, CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH >>>>>>> CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH, CONFIG_SETTINGS_SLACK_LOGGING_URL, CONFIG_SETTINGS_USERS_PAGE_SIZE, CONFIG_SETTINGS_CONVERSATION_PANEL_WIDTH
<<<<<<< makeSelectAgentVersions, makeSelectLoadingAgentVersion ======= makeSelectReviewPageFilterSearchSaying, makeSelectReviewPageFilterCategory, makeSelectReviewPageFilterActions, makeSelectReviewPageNumberOfFiltersApplied, makeSelectReviewPageFilterString, makeSelectReviewPageFilterActionIntervalMax, makeSelectReviewPageFilterActionIntervalMin, makeSelectReviewPageFilterContainers, makeSelectReviewPageFilterMaxLogs, makeSelectReviewPageFilterLogsString, makeSelectReviewPageLogsNumberOfFiltersApplied >>>>>>> makeSelectAgentVersions, makeSelectLoadingAgentVersion, makeSelectReviewPageFilterSearchSaying, makeSelectReviewPageFilterCategory, makeSelectReviewPageFilterActions, makeSelectReviewPageNumberOfFiltersApplied, makeSelectReviewPageFilterString, makeSelectReviewPageFilterActionIntervalMax, makeSelectReviewPageFilterActionIntervalMin, makeSelectReviewPageFilterContainers, makeSelectReviewPageFilterMaxLogs, makeSelectReviewPageFilterLogsString, makeSelectReviewPageLogsNumberOfFiltersApplied <<<<<<< agentVersions: makeSelectAgentVersions(), loadingAgentVersion: makeSelectLoadingAgentVersion(), ======= reviewPageFilterSearchSaying: makeSelectReviewPageFilterSearchSaying(), reviewPageFilterCategory: makeSelectReviewPageFilterCategory(), reviewPageFilterActions: makeSelectReviewPageFilterActions(), reviewPageNumberOfFiltersApplied: makeSelectReviewPageNumberOfFiltersApplied(), reviewPageFilterString: makeSelectReviewPageFilterString(), reviewPageFilterActionIntervalMin: makeSelectReviewPageFilterActionIntervalMin(), reviewPageFilterActionIntervalMax: makeSelectReviewPageFilterActionIntervalMax(), reviewPageFilterContainers: makeSelectReviewPageFilterContainers(), reviewPageFilterMaxLogs: makeSelectReviewPageFilterMaxLogs(), reviewPageFilterLogsString: makeSelectReviewPageFilterLogsString(), reviewPageLogsNumberOfFiltersApplied: makeSelectReviewPageLogsNumberOfFiltersApplied() >>>>>>> agentVersions: makeSelectAgentVersions(), loadingAgentVersion: makeSelectLoadingAgentVersion(), reviewPageFilterSearchSaying: makeSelectReviewPageFilterSearchSaying(), reviewPageFilterCategory: makeSelectReviewPageFilterCategory(), reviewPageFilterActions: makeSelectReviewPageFilterActions(), reviewPageNumberOfFiltersApplied: makeSelectReviewPageNumberOfFiltersApplied(), reviewPageFilterString: makeSelectReviewPageFilterString(), reviewPageFilterActionIntervalMin: makeSelectReviewPageFilterActionIntervalMin(), reviewPageFilterActionIntervalMax: makeSelectReviewPageFilterActionIntervalMax(), reviewPageFilterContainers: makeSelectReviewPageFilterContainers(), reviewPageFilterMaxLogs: makeSelectReviewPageFilterMaxLogs(), reviewPageFilterLogsString: makeSelectReviewPageFilterLogsString(), reviewPageLogsNumberOfFiltersApplied: makeSelectReviewPageLogsNumberOfFiltersApplied()
<<<<<<< export const LOAD_WEBHOOK = 'boilerplate/AgentPage/LOAD_WEBHOOK'; export const LOAD_WEBHOOK_SUCCESS = 'boilerplate/AgentPage/LOAD_WEBHOOK_SUCCESS'; export const LOAD_WEBHOOK_ERROR = 'boilerplate/AgentPage/LOAD_WEBHOOK_ERROR'; export const LOAD_POSTFORMAT = 'boilerplate/AgentPage/LOAD_POSTFORMAT'; export const LOAD_POSTFORMAT_SUCCESS = 'boilerplate/AgentPage/LOAD_POSTFORMAT_SUCCESS'; export const LOAD_POSTFORMAT_ERROR = 'boilerplate/AgentPage/LOAD_POSTFORMAT_ERROR'; ======= export const LOAD_WEBHOOK = 'boilerplate/IntentPage/LOAD_WEBHOOK'; export const LOAD_WEBHOOK_SUCCESS = 'boilerplate/IntentPage/LOAD_WEBHOOK_SUCCESS'; export const LOAD_WEBHOOK_ERROR = 'boilerplate/IntentPage/LOAD_WEBHOOK_ERROR'; export const SORT_SLOTS = 'boilerplate/IntentPage/SORT_SLOTS'; >>>>>>> export const LOAD_POSTFORMAT = 'boilerplate/AgentPage/LOAD_POSTFORMAT'; export const LOAD_POSTFORMAT_SUCCESS = 'boilerplate/AgentPage/LOAD_POSTFORMAT_SUCCESS'; export const LOAD_POSTFORMAT_ERROR = 'boilerplate/AgentPage/LOAD_POSTFORMAT_ERROR'; export const LOAD_WEBHOOK = 'boilerplate/IntentPage/LOAD_WEBHOOK'; export const LOAD_WEBHOOK_SUCCESS = 'boilerplate/IntentPage/LOAD_WEBHOOK_SUCCESS'; export const LOAD_WEBHOOK_ERROR = 'boilerplate/IntentPage/LOAD_WEBHOOK_ERROR'; export const SORT_SLOTS = 'boilerplate/IntentPage/SORT_SLOTS';
<<<<<<< try { // TODO: It would be nice to test this rather than relying on an exception return require('text!cockpit/ui/' + path); ======= var dataUrl; try { dataUrl = require('text!cockpit/ui/' + path); } catch (e) { } if (dataUrl) { return dataUrl; >>>>>>> try { return require('text!cockpit/ui/' + path);
<<<<<<< "xws": "heavyscykinterceptor", "grants": [ { "type": "slot", "name": "Cannon" }, { "type": "slot", "name": "Torpedo" }, { "type": "slot", "name": "Missile" } ] ======= "xws": "heavyscykinterceptor", "grants": [ { "type": "stats", "name": "hull", "value": 1 } ] >>>>>>> "xws": "heavyscykinterceptor", "grants": [ { "type": "slot", "name": "Cannon" }, { "type": "slot", "name": "Torpedo" }, { "type": "slot", "name": "Missile" }, { "type": "stats", "name": "hull", "value": 1 } ]
<<<<<<< var Promise = require('util/promise'); ======= var util = require('util/util'); var promise = require('util/promise'); >>>>>>> var promise = require('util/promise');
<<<<<<< }, getTasks: function() { return require('./jobtasks')(this); ======= }, /** * Generate a download URL for a model. */ downloadURL: function() { return (this.get('status') === 'complete') && '/export/download/' + this.get('filename'); >>>>>>> }, /** * Generate a download URL for a model. */ downloadURL: function() { return (this.get('status') === 'complete') && '/export/download/' + this.get('filename'); }, getTasks: function() { return require('./jobtasks')(this);
<<<<<<< var str = myNick + ":"; var msg = urlMsg.replace(myNick +":","<span style='color:#42C0FB'>" + myNick + ": </span>"); // show notification for your messages if (msg.indexOf(str)!= -1) { // alert('show notification '); // var notification = TitaniumNotification(window); // alert('notification ' + notification) // notification.setTitle("New Message"); // notification.setMessage(msg); // //notification.setIcon("app://logo_large.png"); // notification.show(); } $('#irc').append('<div style="color:yellow;float:left;margin-bottom:3px;width:90%">' + nick + ': <span style="color:white">' + msg + '</span></div><div style="float:right;color:#ccc;font-size:11px;width:10%;text-align:right">'+time+'</div><div style="clear:both"></div>'); ======= var str = username + ":"; var msg = urlMsg.replace(username +":","<span style='color:#42C0FB'>" + username + ": </span>"); $('#irc').append('<div style="color:yellow;float:left">' + nick + ': <span style="color:white">' + msg + '</span></div><div style="float:right;color:#ccc;font-size:11px">'+time+'</div><div style="clear:both"></div>'); >>>>>>> var str = username + ":"; var msg = urlMsg.replace(username +":","<span style='color:#42C0FB'>" + username + ": </span>"); $('#irc').append('<div style="color:yellow;float:left;margin-bottom:3px;width:90%">' + nick + ': <span style="color:white">' + msg + '</span></div><div style="float:right;color:#ccc;font-size:11px;width:10%;text-align:right">'+time+'</div><div style="clear:both"></div>'); <<<<<<< $('#irc').append('<div style="color:yellow;float:left;margin-bottom:3px;width:90%">' + myNick + ': <span style="color:white">' + $('#irc_msg').val() + '</span></div><div style="float:right;color:#ccc;font-size:11px;width:10%;text-align:right">'+time+'</div><div style="clear:both"></div>'); ======= $('#irc').append('<div style="color:yellow;float:left">' + username + ': <span style="color:white">' + $('#irc_msg').val() + '</span></div><div style="float:right;color:#ccc;font-size:11px">'+time+'</div><div style="clear:both"></div>'); >>>>>>> $('#irc').append('<div style="color:yellow;float:left;margin-bottom:3px;width:90%">' + username + ': <span style="color:white">' + $('#irc_msg').val() + '</span></div><div style="float:right;color:#ccc;font-size:11px;width:10%;text-align:right">'+time+'</div><div style="clear:both"></div>');
<<<<<<< data() { return { visible: false, }; }, }; const wrapper = mount(TestCompo); const { vm } = wrapper; ======= }, true); vm.$el.click(); >>>>>>> data() { return { visible: false, }; }, }; const wrapper = mount(TestCompo); const { vm } = wrapper; vm.$el.click(); <<<<<<< }; const wrapper = mount(TestCompo); const { vm } = wrapper; ======= }, true); vm.$el.click(); vm.v1 = '12311'; >>>>>>> }; const wrapper = mount(TestCompo); const { vm } = wrapper; <<<<<<< }; const wrapper = mount(TestCompo); const { vm } = wrapper; wrapper.find('.za-keyboard__item').trigger('click'); ======= }, true); vm.$el.click(); >>>>>>> }; const wrapper = mount(TestCompo); const { vm } = wrapper; vm.$el.click(); wrapper.find('.za-keyboard__item').trigger('click');
<<<<<<< var selector = sel(path); }).to.throw(Error, 'Invalid path specified'); ======= var selector = j.sel(path); }).to.throw(Error, 'Invalid path specified: ' + path); >>>>>>> var selector = sel(path); }).to.throw(Error, 'Invalid path specified: ' + path);
<<<<<<< "twitter": "", "twitterhashtag": "", ======= "discord": "", "discwebhook": "", >>>>>>> "twitter": "", "twitterhashtag": "", "discord": "", "discwebhook": "", <<<<<<< "twitter": "", "twitterhashtag": "", ======= "discord": "", "discwebhook": "", >>>>>>> "twitter": "", "twitterhashtag": "", "discord": "", "discwebhook": "", <<<<<<< db.get("SELECT id, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, mailenable, mailto FROM capcodes WHERE ? LIKE address ORDER BY REPLACE(address, '_', '%') DESC LIMIT 1", address, function(err,row) { ======= db.get("SELECT id, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, discord, discwebhook, mailenable, mailto FROM capcodes WHERE ? LIKE address ORDER BY REPLACE(address, '_', '%') DESC LIMIT 1", address, function(err,row) { >>>>>>> db.get("SELECT id, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, discord, discwebhook, mailenable, mailto FROM capcodes WHERE ? LIKE address ORDER BY REPLACE(address, '_', '%') DESC LIMIT 1", address, function(err,row) { <<<<<<< var twitonoff = null; ======= var disconoff = null; var discwebhook = null; >>>>>>> var twitonoff = null; var disconoff = null; var discwebhook = null; <<<<<<< telechat = row.telechat twitonoff = row.twitter twithashtags = row.twitterhashtag ======= telechat = row.telechat; disconoff = row.discord; discwebhook = row.discwebhook; >>>>>>> telechat = row.telechat twitonoff = row.twitter twithashtags = row.twitterhashtag telechat = row.telechat; disconoff = row.discord; discwebhook = row.discwebhook; <<<<<<< if (err) { console.error('Pushover:' + err); } console.log('Pushover:' + result); ======= if (err) { console.error('Pushover :' + err); } console.log('Pushover: ' + result); >>>>>>> if (err) { console.error('Pushover:' + err); } console.log('Pushover:' + result); <<<<<<< //start Twitter Module if (twitenable == true && twitonoff == 1) { //ensure API Keys have been entered before trying to post. if ((twitconskey == 0 || !twitconskey) || (twitconssecret == 0 || !twitconssecret) || (twitacctoken == 0 || !twitacctoken) || (twitaccsecret == 0 || !twitaccsecret)) { console.error('Twitter: ' + address + ' No API keys set. Please check API keys.'); } else { var tw = new twit({ consumer_key: twitconskey, consumer_secret: twitconssecret, access_token: twitacctoken, access_token_secret: twitaccsecret, }); var twittertext = `${row.agency} - ${row.alias} \n` + `${row.message} \n` + `${twithashtags}` + ' ' + `${twitglobalhashtags}` tw.post('statuses/update', { status: twittertext }, function (err, data, response) { if (err) { console.error('Twitter: ' + err); }else{ console.log('Twitter: ' + 'Tweet Posted')} }) } }; ======= if (discenable == true && disconoff == 1) { var toHex = require('colornames') var hostname = nconf.get('hostname'); //Ensure webhook ID and Token have been entered into the alias. if (discwebhook == 0 || !discwebhook) { console.error('Discord: ' + address + ' No Webhook URL set. Please enter Webhook URL.'); } else { var webhook = discwebhook.split('/'); var discwebhookid = webhook[5]; var discwebhooktoken = webhook[6]; var d = new discord.WebhookClient(discwebhookid, discwebhooktoken); //Use embedded discord notification format from discord.js var notificationembed = new discord.RichEmbed({ timestamp: new Date(), }); // toHex doesn't support putting HEX in, needs to check and skip over if already hex. var isHex = /^#[0-9A-F]{6}$/i.test(row.color) if (!isHex || isHex == false) { var discordcolor = toHex(row.color) } else { var discordcolor = row.color } notificationembed.setColor(discordcolor); notificationembed.setTitle(`**${row.agency} - ${row.alias}**`); notificationembed.addField('Message', `${row.message}`); if (hostname == undefined || !hostname) { console.debug('Discord: Hostname not set in config file using pagermon github') notificationembed.setAuthor('PagerMon', '', `https://github.com/davidmckenzie/pagermon`); } else { notificationembed.setAuthor('PagerMon', '', `${hostname}`); } //Print notification template when debugging enabled console.debug(notificationembed) d.send(notificationembed) .then(console.log(`Discord: Message Sent`)) .catch(function(err) { 'Discord: ' + console.error(err); }); } }; >>>>>>> //start Twitter Module if (twitenable == true && twitonoff == 1) { //ensure API Keys have been entered before trying to post. if ((twitconskey == 0 || !twitconskey) || (twitconssecret == 0 || !twitconssecret) || (twitacctoken == 0 || !twitacctoken) || (twitaccsecret == 0 || !twitaccsecret)) { console.error('Twitter: ' + address + ' No API keys set. Please check API keys.'); } else { var tw = new twit({ consumer_key: twitconskey, consumer_secret: twitconssecret, access_token: twitacctoken, access_token_secret: twitaccsecret, }); var twittertext = `${row.agency} - ${row.alias} \n` + `${row.message} \n` + `${twithashtags}` + ' ' + `${twitglobalhashtags}` tw.post('statuses/update', { status: twittertext }, function (err, data, response) { if (err) { console.error('Twitter: ' + err); }else{ console.log('Twitter: ' + 'Tweet Posted')} }) } }; //Start Discord Module if (discenable == true && disconoff == 1) { var toHex = require('colornames') var hostname = nconf.get('hostname'); //Ensure webhook ID and Token have been entered into the alias. if (discwebhook == 0 || !discwebhook) { console.error('Discord: ' + address + ' No Webhook URL set. Please enter Webhook URL.'); } else { var webhook = discwebhook.split('/'); var discwebhookid = webhook[5]; var discwebhooktoken = webhook[6]; var d = new discord.WebhookClient(discwebhookid, discwebhooktoken); //Use embedded discord notification format from discord.js var notificationembed = new discord.RichEmbed({ timestamp: new Date(), }); // toHex doesn't support putting HEX in, needs to check and skip over if already hex. var isHex = /^#[0-9A-F]{6}$/i.test(row.color) if (!isHex || isHex == false) { var discordcolor = toHex(row.color) } else { var discordcolor = row.color } notificationembed.setColor(discordcolor); notificationembed.setTitle(`**${row.agency} - ${row.alias}**`); notificationembed.addField('Message', `${row.message}`); if (hostname == undefined || !hostname) { console.debug('Discord: Hostname not set in config file using pagermon github') notificationembed.setAuthor('PagerMon', '', `https://github.com/davidmckenzie/pagermon`); } else { notificationembed.setAuthor('PagerMon', '', `${hostname}`); } //Print notification template when debugging enabled console.debug(notificationembed) d.send(notificationembed) .then(console.log(`Discord: Message Sent`)) .catch(function(err) { 'Discord: ' + console.error(err); }); } }; <<<<<<< var twitter = req.body.twitter || 0; var twitterhashtag = req.body.twitterhashtag || ''; ======= var discord = req.body.discord || 0; var discwebhook = req.body.discwebhook || ''; >>>>>>> var twitter = req.body.twitter || 0; var twitterhashtag = req.body.twitterhashtag || ''; var discord = req.body.discord || 0; var discwebhook = req.body.discwebhook || ''; <<<<<<< db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, mailenable, mailto) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesTwitter, $mesTwitterHashTag, $MailEnable, $MailTo );", { ======= db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, discord, discwebhook, mailenable, mailto) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesDiscord, $mesDiscWebhook, $MailEnable, $MailTo );", { >>>>>>> db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, discord, discwebhook, mailenable, mailto) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesTwitter, $mesTwitterHashTag, $mesDiscord, $mesDiscWebhook, $MailEnable, $MailTo );", { <<<<<<< $mesTwitter: twitter, $mesTwitterHashTag: twitterhashtag, ======= $mesDiscord: discord, $mesDiscWebhook: discwebhook, >>>>>>> $mesTwitter: twitter, $mesTwitterHashTag: twitterhashtag, $mesDiscord: discord, $mesDiscWebhook: discwebhook, <<<<<<< var twitter = req.body.twitter || 0; var twitterhashtag = req.body.twitterhashtag || ''; ======= var discord = req.body.discord || 0; var discwebhook = req.body.discwebhook || ''; >>>>>>> var twitter = req.body.twitter || 0; var twitterhashtag = req.body.twitterhashtag || ''; var discord = req.body.discord || 0; var discwebhook = req.body.discwebhook || ''; <<<<<<< db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, mailenable, mailto ) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesTwitter, $mesTwitterHashTag, $MailEnable, $MailTo );", { ======= db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, discord, discwebhook, mailenable, mailto ) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesDiscord, $mesDiscWebhook, $MailEnable, $MailTo );", { >>>>>>> db.run("REPLACE INTO capcodes (id, address, alias, agency, color, icon, ignore, push, pushpri, pushgroup, pushsound, telegram, telechat, twitter, twitterhashtag, discord, discwebhook, mailenable, mailto ) VALUES ($mesID, $mesAddress, $mesAlias, $mesAgency, $mesColor, $mesIcon, $mesIgnore, $mesPush, $mesPushPri, $mesPushGroup, $mesPushSound, $mesTelegram, $mesTeleChat, $mesTwitter, $mesTwitterHashTag, $mesDiscord, $mesDiscWebhook, $MailEnable, $MailTo );", { <<<<<<< $mesTwitter: twitter, $mesTwitterHashTag: twitterhashtag, ======= $mesDiscord: discord, $mesDiscWebhook: discwebhook, >>>>>>> $mesTwitter: twitter, $mesTwitterHashTag: twitterhashtag, $mesDiscord: discord, $mesDiscWebhook: discwebhook,
<<<<<<< /* * patternlab-node - v2.6.0-alpha - 2016 * ======= /* * patternlab-node - v2.4.4 - 2016 * >>>>>>> /* * patternlab-node - v2.6.0-alpha - 2016 * <<<<<<< plutils = require('./utilities'), cleanHtml = require('js-beautify').html; ======= inherits = require('util').inherits, pm = require('./plugin_manager'), plutils = require('./utilities'); >>>>>>> cleanHtml = require('js-beautify').html, inherits = require('util').inherits, pm = require('./plugin_manager'), plutils = require('./utilities'); <<<<<<< ======= patternlab.events.emit('patternlab-pattern-write-begin', patternlab, pattern); //write the compiled template to the public patterns directory >>>>>>> patternlab.events.emit('patternlab-pattern-write-begin', patternlab, pattern); //write the compiled template to the public patterns directory
<<<<<<< /* * patternlab-node - v1.2.1 - 2016 * ======= /* * patternlab-node - v1.3.0 - 2016 * >>>>>>> /* * patternlab-node - v1.3.0 - 2016 * <<<<<<< plutils = require('./utilities'), style_modifier_hunter = new smh(), pattern_assembler = new pa(); ======= pattern_assembler = new pa(), style_modifier_hunter = new smh(); /** * This function is really to accommodate the lax JSON-like syntax allowed by * Pattern Lab PHP for parameter submissions to partials. Unfortunately, no * easily searchable library was discovered for this. What we had to do was * write a custom script to crawl through the parameter string, and wrap the * keys and values in double-quotes as necessary. * The steps on a high-level are as follows: * * Further escape all escaped quotes and colons. Use the string * representation of their unicodes for this. This has the added bonus * of being interpreted correctly by JSON5.parse() without further * modification. This will be useful later in the function. * * Once escaped quotes are out of the way, we know the remaining quotes * are either key/value wrappers or wrapped within those wrappers. We know * that remaining commas and colons are either delimiters, or wrapped * within quotes to not be recognized as such. * * A do-while loop crawls paramString to write keys to a keys array and * values to a values array. * * Start by parsing the first key. Determine the type of wrapping quote, * if any. * * By knowing the open wrapper, we know that the next quote of that kind * (if the key is wrapped in quotes), HAS to be the close wrapper. * Similarly, if the key is unwrapped, we know the next colon HAS to be * the delimiter between key and value. * * Save the key to the keys array. * * Next, search for a value. It will either be the next block wrapped in * quotes, or a string of alphanumerics, decimal points, or minus signs. * * Save the value to the values array. * * The do-while loop truncates the paramString value while parsing. Its * condition for completion is when the paramString is whittled down to an * empty string. * * After the keys and values arrays are built, a for loop iterates through * them to build the final paramStringWellFormed string. * * No quote substitution had been done prior to this loop. In this loop, * all keys are ensured to be wrapped in double-quotes. String values are * also ensured to be wrapped in double-quotes. * * Unescape escaped unicodes except for double-quotes. Everything beside * double-quotes will be wrapped in double-quotes without need for escape. * * Return paramStringWellFormed. * * @param {string} pString * @returns {string} paramStringWellFormed */ >>>>>>> plutils = require('./utilities'), style_modifier_hunter = new smh(), pattern_assembler = new pa(); /** * This function is really to accommodate the lax JSON-like syntax allowed by * Pattern Lab PHP for parameter submissions to partials. Unfortunately, no * easily searchable library was discovered for this. What we had to do was * write a custom script to crawl through the parameter string, and wrap the * keys and values in double-quotes as necessary. * The steps on a high-level are as follows: * * Further escape all escaped quotes and colons. Use the string * representation of their unicodes for this. This has the added bonus * of being interpreted correctly by JSON5.parse() without further * modification. This will be useful later in the function. * * Once escaped quotes are out of the way, we know the remaining quotes * are either key/value wrappers or wrapped within those wrappers. We know * that remaining commas and colons are either delimiters, or wrapped * within quotes to not be recognized as such. * * A do-while loop crawls paramString to write keys to a keys array and * values to a values array. * * Start by parsing the first key. Determine the type of wrapping quote, * if any. * * By knowing the open wrapper, we know that the next quote of that kind * (if the key is wrapped in quotes), HAS to be the close wrapper. * Similarly, if the key is unwrapped, we know the next colon HAS to be * the delimiter between key and value. * * Save the key to the keys array. * * Next, search for a value. It will either be the next block wrapped in * quotes, or a string of alphanumerics, decimal points, or minus signs. * * Save the value to the values array. * * The do-while loop truncates the paramString value while parsing. Its * condition for completion is when the paramString is whittled down to an * empty string. * * After the keys and values arrays are built, a for loop iterates through * them to build the final paramStringWellFormed string. * * No quote substitution had been done prior to this loop. In this loop, * all keys are ensured to be wrapped in double-quotes. String values are * also ensured to be wrapped in double-quotes. * * Unescape escaped unicodes except for double-quotes. Everything beside * double-quotes will be wrapped in double-quotes without need for escape. * * Return paramStringWellFormed. * * @param {string} pString * @returns {string} paramStringWellFormed */ <<<<<<< //move param partial to paramStringWellFormed var. paramStringWellFormed += paramStringTmp; paramString = paramString.substring(quotePos, paramString.length).trim(); ======= //if there are no more colons, and we're looking for a key, there is //probably a problem. stop any further processing. } else { paramString = ''; break; } >>>>>>> //if there are no more colons, and we're looking for a key, there is //probably a problem. stop any further processing. } else { paramString = ''; break; } <<<<<<< //move param partial to paramStringWellFormed var. paramStringWellFormed += paramString.substring(0, quotePos); paramString = paramString.substring(quotePos, paramString.length).trim(); ======= //if there are no more colons, and we're looking for a value, there is //probably a problem. stop any further processing. } else { paramString = ''; break; >>>>>>> //if there are no more colons, and we're looking for a value, there is //probably a problem. stop any further processing. } else { paramString = ''; break;
<<<<<<< /* * patternlab-node - v0.12.0 - 2015 * ======= /* * patternlab-node - v0.13.0 - 2015 * >>>>>>> /* * patternlab-node - v0.13.0 - 2015 * <<<<<<< // given a pattern file, figure out what to do with it function processPatternFile(file, patternlab){ ======= function processPatternIterative(file, patternlab){ var fs = require('fs-extra'), of = require('./object_factory'), path = require('path'); >>>>>>> function processPatternIterative(file, patternlab){ var fs = require('fs-extra'), of = require('./object_factory'), path = require('path'); <<<<<<< // ignore _underscored patterns, dotfiles, and anything not recognized by // a loaded pattern engine if (filename.charAt(0) === '_' || filename.charAt(0) === '.' || !isPatternFile(filename, patternlab)) { ======= //ignore dotfiles and non-variant .json files if(filename.charAt(0) === '.' || (ext === '.json' && filename.indexOf('~') === -1)){ >>>>>>> // ignore _underscored patterns, dotfiles, and anything not recognized by // a loaded pattern engine if (filename.charAt(0) === '_' || filename.charAt(0) === '.' || (ext === '.json' && filename.indexOf('~') === -1) || !isPatternFile(filename, patternlab)) { <<<<<<< function processPattern(currentPattern, patternlab, additionalData){ var lh = require('./lineage_hunter'), ph = require('./parameter_hunter'), pph = require('./pseudopattern_hunter'), lih = require('./list_item_hunter'); ======= function processPatternRecursive(file, patternlab, additionalData){ var fs = require('fs-extra'), mustache = require('mustache'), lh = require('./lineage_hunter'), ph = require('./parameter_hunter'), pph = require('./pseudopattern_hunter'), lih = require('./list_item_hunter'), path = require('path'); >>>>>>> function processPatternRecursive(file, patternlab, additionalData){ var lh = require('./lineage_hunter'), ph = require('./parameter_hunter'), pph = require('./pseudopattern_hunter'), lih = require('./list_item_hunter'); <<<<<<< var self = this; function mergeData(obj1, obj2) { for (var p in obj2) { ======= /** * Recursively merge properties of two objects. * * @param {Object} obj1 If obj1 has properties obj2 doesn't, add to obj2. * @param {Object} obj2 This object's properties have priority over obj1. * @returns {Object} obj2 */ function mergeData(obj1, obj2){ if(typeof obj2 === 'undefined'){ obj2 = {}; } for(var p in obj1){ >>>>>>> /** * Recursively merge properties of two objects. * * @param {Object} obj1 If obj1 has properties obj2 doesn't, add to obj2. * @param {Object} obj2 This object's properties have priority over obj1. * @returns {Object} obj2 */ function mergeData(obj1, obj2){ if(typeof obj2 === 'undefined'){ obj2 = {}; } for(var p in obj1){
<<<<<<< if (config.debug) { console.log('processPatternIterative:', 'filename:', filename); } // skip non-pattern files if (!patternEngines.isPatternFile(filename, patternlab)) { return null; } if (config.debug) { console.log('processPatternIterative:', 'found pattern', file); ======= //ignore dotfiles, underscored files, and non-variant .json files if(filename.charAt(0) === '.' || filename.charAt(0) === '_' || (ext === '.json' && filename.indexOf('~') === -1)){ return; >>>>>>> if (config.debug) { console.log('processPatternIterative:', 'filename:', filename); } // skip non-pattern files if (!patternEngines.isPatternFile(filename, patternlab)) { return null; } if (config.debug) { console.log('processPatternIterative:', 'found pattern', file); <<<<<<< //if file is named in the syntax for variants if(patternEngines.isPseudoPatternJSON(filename)){ //add current pattern to patternlab object with minimal data //processPatternRecursive() will run find_pseudopatterns() to fill out //the object in the next diveSync addPattern(currentPattern, patternlab); //no need to process further return currentPattern; ======= //if file is named in the syntax for variants, no need to process further //processPatternRecursive() will run find_pseudopatterns() and look at each pattern for a variant if(ext === '.json' && filename.indexOf('~') > -1){ return; >>>>>>> //if file is named in the syntax for variants if(patternEngines.isPseudoPatternJSON(filename)){ return currentPattern; <<<<<<< ======= }, is_object_empty: function(obj){ return isObjectEmpty(obj); }, parse_data_links: function(patternlab){ parseDataLinks(patternlab); >>>>>>> }, parse_data_links: function(patternlab){ parseDataLinks(patternlab);
<<<<<<< let p; let typePatterns = []; const styleGuideExcludes = patternlab.config.styleGuideExcludes; ======= var p; var typePatterns = [], styleguideTypePatterns = []; var styleGuideExcludes = patternlab.config.styleGuideExcludes || patternlab.config.styleguideExcludes; >>>>>>> let p; let typePatterns = []; let styleguideTypePatterns = []; const styleGuideExcludes = patternlab.config.styleGuideExcludes || patternlab.config.styleguideExcludes;
<<<<<<< function paramToJson(pString) { let colonPos = -1; const keys = []; let paramString = pString; // to not reassign param let paramStringWellFormed; let quotePos = -1; let regex; const values = []; let wrapper; ======= function paramToJson(pString, patternlab) { var colonPos = -1; var keys = []; var paramString = pString; // to not reassign param var paramStringWellFormed; var quotePos = -1; var regex; var values = []; var wrapper; >>>>>>> function paramToJson(pString, patternlab) { let colonPos = -1; const keys = []; let paramString = pString; // to not reassign param let paramStringWellFormed; let quotePos = -1; let regex; const values = []; let wrapper; <<<<<<< const leftParen = pMatch.indexOf('('); const rightParen = pMatch.lastIndexOf(')'); const paramString = '{' + pMatch.substring(leftParen + 1, rightParen) + '}'; const paramStringWellFormed = paramToJson(paramString); ======= var leftParen = pMatch.indexOf('('); var rightParen = pMatch.lastIndexOf(')'); var paramString = '{' + pMatch.substring(leftParen + 1, rightParen) + '}'; var paramStringWellFormed = paramToJson(paramString, patternlab); >>>>>>> const leftParen = pMatch.indexOf('('); const rightParen = pMatch.lastIndexOf(')'); const paramString = '{' + pMatch.substring(leftParen + 1, rightParen) + '}'; const paramStringWellFormed = paramToJson(paramString, patternlab);
<<<<<<< return patternlab.processAllPatternsRecursive(paths.source.patterns).then(() => { //take the user defined head and foot and process any data and patterns that apply const headPatternPromise = processMetaPattern(`_00-head.${patternlab.config.patternExtension}`, 'userHead', patternlab); const footPatternPromise = processMetaPattern(`_01-foot.${patternlab.config.patternExtension}`, 'userFoot', patternlab); return Promise.all([headPatternPromise, footPatternPromise]).then(() => { //cascade any patternStates lineage_hunter.cascade_pattern_states(patternlab); //set pattern-specific header if necessary let head; if (patternlab.userHead) { head = patternlab.userHead; ======= // TODO we can reduce the time needed by only processing changed patterns and their partials patternlab.processAllPatternsRecursive(paths.source.patterns, patternlab); //take the user defined head and foot and process any data and patterns that apply const headPatternPromise = processMetaPattern(`_00-head.${patternlab.config.patternExtension}`, 'userHead', patternlab); const footPatternPromise = processMetaPattern(`_01-foot.${patternlab.config.patternExtension}`, 'userFoot', patternlab); return Promise.all([headPatternPromise, footPatternPromise]).then(() => { //cascade any patternStates lineage_hunter.cascade_pattern_states(patternlab); //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header return render(Pattern.createEmpty({extendedTemplate: patternlab.header}), { cacheBuster: patternlab.cacheBuster }).then((results) => { patternlab.data.patternLabHead = results; // If deletePatternDir == true or graph needs to be updated // rebuild all patterns let patternsToBuild = null; // If deletePatternDir == true or graph needs to be updated // rebuild all patterns patternsToBuild = null; if (patternlab.incrementalBuildsEnabled) { // When the graph was loaded from file, some patterns might have been moved/deleted between runs // so the graph data become out of sync patternlab.graph.sync().forEach(n => { logger.info("[Deleted/Moved] " + n); }); // TODO Find created or deleted files const now = new Date().getTime(); markModifiedPatterns(now, patternlab); patternsToBuild = patternlab.graph.compileOrder(); >>>>>>> return patternlab.processAllPatternsRecursive(paths.source.patterns).then(() => { //take the user defined head and foot and process any data and patterns that apply const headPatternPromise = processMetaPattern(`_00-head.${patternlab.config.patternExtension}`, 'userHead', patternlab); const footPatternPromise = processMetaPattern(`_01-foot.${patternlab.config.patternExtension}`, 'userFoot', patternlab); return Promise.all([headPatternPromise, footPatternPromise]).then(() => { //cascade any patternStates lineage_hunter.cascade_pattern_states(patternlab); //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header return render(Pattern.createEmpty({extendedTemplate: patternlab.header}), { cacheBuster: patternlab.cacheBuster }).then((results) => { patternlab.data.patternLabHead = results; // If deletePatternDir == true or graph needs to be updated // rebuild all patterns let patternsToBuild = null; // If deletePatternDir == true or graph needs to be updated // rebuild all patterns patternsToBuild = null; if (patternlab.incrementalBuildsEnabled) { // When the graph was loaded from file, some patterns might have been moved/deleted between runs // so the graph data become out of sync patternlab.graph.sync().forEach(n => { logger.info("[Deleted/Moved] " + n); }); // TODO Find created or deleted files const now = new Date().getTime(); markModifiedPatterns(now, patternlab); patternsToBuild = patternlab.graph.compileOrder();
<<<<<<< var PatternEngines = require('pattern_engines/pattern_engines'); var oPattern = function(subdir, filename, data){ ======= var oPattern = function(abspath, subdir, filename, data){ >>>>>>> var PatternEngines = require('pattern_engines/pattern_engines'); var oPattern = function(abspath, subdir, filename, data){
<<<<<<< else { // Mutate this argument to hold the completion var arg = assignment.arg.beget({ text: prediction.name }); promise = this.setAssignment(assignment, arg, { argUpdate: true }); if (!prediction.incomplete) { // The prediction is complete, add a space to let the user move-on this._addSpace(assignment); // Bug 779443 - Remove or explain the re-parse // Also decide what to do with this ignored promise if (assignment instanceof UnassignedAssignment) { this.update(this.toString()); } ======= } else { // Mutate this argument to hold the completion var arg = assignment.arg.beget({ text: prediction.name, dontQuote: (assignment === this.commandAssignment) }); this.setAssignment(assignment, arg, { argUpdate: true }); if (!prediction.incomplete) { // The prediction is complete, add a space to let the user move-on this._addSpace(assignment); // Bug 779443 - Remove or explain the reparse if (assignment instanceof UnassignedAssignment) { this.update(this.toString()); >>>>>>> else { // Mutate this argument to hold the completion var arg = assignment.arg.beget({ text: prediction.name, dontQuote: (assignment === this.commandAssignment) }); promise = this.setAssignment(assignment, arg, { argUpdate: true }); if (!prediction.incomplete) { // The prediction is complete, add a space to let the user move-on this._addSpace(assignment); // Bug 779443 - Remove or explain the re-parse // Also decide what to do with this ignored promise if (assignment instanceof UnassignedAssignment) { this.update(this.toString()); }
<<<<<<< exports.testTabsEvent_onCloseWindow = function(assert, done) { openBrowserWindow(function(window, browser) { let closeCount = 0, individualCloseCount = 0; function listener() { closeCount++; ======= exports.testTabsEvent_onCloseWindow = function(test) { test.waitUntilDone(); let closeCount = 0; let individualCloseCount = 0; openBrowserWindow(function(window) { tabs.on("close", function listener() { if (++closeCount == 4) { tabs.removeListener("close", listener); } }); function endTest() { if (++individualCloseCount < 3) { return; } test.assertEqual(closeCount, 4, "Correct number of close events received"); test.assertEqual(individualCloseCount, 3, "Each tab with an attached onClose listener received a close " + "event when the window was closed"); test.done(); >>>>>>> exports.testTabsEvent_onCloseWindow = function(assert, done) { let closeCount = 0; let individualCloseCount = 0; openBrowserWindow(function(window) { tabs.on("close", function listener() { if (++closeCount == 4) { tabs.removeListener("close", listener); } }); function endTest() { if (++individualCloseCount < 3) { return; } assert.equal(closeCount, 4, "Correct number of close events received"); assert.equal(individualCloseCount, 3, "Each tab with an attached onClose listener received a close " + "event when the window was closed"); done(); <<<<<<< function beginCloseWindow() { close(window).then(function testFinished() { tabs.removeListener("close", listener); assert.equal(closeCount, 4, "Correct number of close events received"); assert.equal(individualCloseCount, 3, "Each tab with an attached onClose listener received a close " + "event when the window was closed"); done(); }); } ======= >>>>>>>
<<<<<<< exports.testIsPrivateDefaults = function() { test.assertEqual(pb.isPrivate(), false, 'undefined is not private'); test.assertEqual(pb.isPrivate('test'), false, 'strings are not private'); test.assertEqual(pb.isPrivate({}), false, 'random objects are not private'); test.assertEqual(pb.isPrivate(4), false, 'numbers are not private'); test.assertEqual(pb.isPrivate(/abc/), false, 'regex are not private'); test.assertEqual(pb.isPrivate(function() {}), false, 'functions are not private'); }; ======= exports.testWindowDefaults = function(test) { test.waitUntilDone(); windows.open({ onActivate: function(window) { test.assertEqual(window.isPrivateBrowsing, false, 'window is not private browsing by default'); let chromeWin = winUtils.getMostRecentBrowserWindow(); test.assertEqual(pbUtils.getMode(chromeWin), false); test.assertEqual(pbUtils.isWindowPrivate(chromeWin), false); window.close(test.done()); } }); } >>>>>>> exports.testIsPrivateDefaults = function() { test.assertEqual(pb.isPrivate(), false, 'undefined is not private'); test.assertEqual(pb.isPrivate('test'), false, 'strings are not private'); test.assertEqual(pb.isPrivate({}), false, 'random objects are not private'); test.assertEqual(pb.isPrivate(4), false, 'numbers are not private'); test.assertEqual(pb.isPrivate(/abc/), false, 'regex are not private'); test.assertEqual(pb.isPrivate(function() {}), false, 'functions are not private'); }; exports.testWindowDefaults = function(test) { test.waitUntilDone(); windows.open({ onActivate: function(window) { test.assertEqual(window.isPrivateBrowsing, false, 'window is not private browsing by default'); let chromeWin = winUtils.getMostRecentBrowserWindow(); test.assertEqual(pbUtils.getMode(chromeWin), false); test.assertEqual(pbUtils.isWindowPrivate(chromeWin), false); window.close(test.done()); } }); }
<<<<<<< lint: enableMarkdownLint ? this.setCodeEditorLintConfig() : false, ======= lint: this.getCodeEditorLintConfig(), >>>>>>> lint: enableMarkdownLint ? this.getCodeEditorLintConfig() : false, <<<<<<< if (prevProps.enableMarkdownLint !== enableMarkdownLint || prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) { if (!enableMarkdownLint) { this.editor.setOption('lint', {default: false}) document.querySelector('.CodeMirror-lint-markers').style.display = 'none' } else { this.editor.setOption('lint', this.setCodeEditorLintConfig()) document.querySelector('.CodeMirror-lint-markers').style.display = 'inline-block' } ======= if (prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) { this.editor.setOption('lint', this.getCodeEditorLintConfig()) >>>>>>> if (prevProps.enableMarkdownLint !== enableMarkdownLint || prevProps.customMarkdownLintConfig !== customMarkdownLintConfig) { if (!enableMarkdownLint) { this.editor.setOption('lint', {default: false}) document.querySelector('.CodeMirror-lint-markers').style.display = 'none' } else { this.editor.setOption('lint', this.getCodeEditorLintConfig()) document.querySelector('.CodeMirror-lint-markers').style.display = 'inline-block' }
<<<<<<< exports.isXULBrowser = isXULBrowser; /** * Returns the most recent focused window */ function getFocusedWindow() { let window = getMostRecentBrowserWindow(); return window ? window.document.commandDispatcher.focusedWindow : null; } exports.getFocusedWindow = getFocusedWindow; /** * Returns the focused element in the most recent focused window */ function getFocusedElement() { let window = getMostRecentBrowserWindow(); return window ? window.document.commandDispatcher.focusedElement : null; } exports.getFocusedElement = getFocusedElement; ======= exports.isXULBrowser = isXULBrowser; function getFrames(window) { return Array.slice(window.frames).reduce(function(frames, frame) { return frames.concat(frame, getFrames(frame)) }, []) } exports.getFrames = getFrames; >>>>>>> exports.isXULBrowser = isXULBrowser; /** * Returns the most recent focused window */ function getFocusedWindow() { let window = getMostRecentBrowserWindow(); return window ? window.document.commandDispatcher.focusedWindow : null; } exports.getFocusedWindow = getFocusedWindow; /** * Returns the focused element in the most recent focused window */ function getFocusedElement() { let window = getMostRecentBrowserWindow(); return window ? window.document.commandDispatcher.focusedElement : null; } exports.getFocusedElement = getFocusedElement; function getFrames(window) { return Array.slice(window.frames).reduce(function(frames, frame) { return frames.concat(frame, getFrames(frame)) }, []) } exports.getFrames = getFrames;
<<<<<<< // firefox let newTab = window.gBrowser.addTab(url); if (options.inBackground === false) { activateTab(newTab); } return newTab; ======= let tab = window.gBrowser.addTab(url); if (!options.inBackground) activateTab(tab); return tab; >>>>>>> // firefox let newTab = window.gBrowser.addTab(url); if (!options.inBackground) { activateTab(newTab); } return newTab;
<<<<<<< if (self.testInProcess) { for (let name in module) { if(NOT_TESTS.indexOf(name) === -1) { tests.push({ setup: module.setup, teardown: module.teardown, testFunction: self._makeTest(suite, name, module[name]), name: suite + "." + name }); } } } ======= if (self.testInProcess) for each (let name in Object.keys(module).sort()) tests.push({ testFunction: self._makeTest(suite, name, module[name]), name: suite + "." + name }); >>>>>>> if (self.testInProcess) for each (let name in Object.keys(module).sort()) { if(NOT_TESTS.indexOf(name) === -1) { tests.push({ setup: module.setup, teardown: module.teardown, testFunction: self._makeTest(suite, name, module[name]), name: suite + "." + name }); } }
<<<<<<< if (option.name.indexOf(arg.text) !== -1 && !option.value.hidden) { ======= if (option._gcliLowerName.indexOf(match) !== -1) { >>>>>>> if (option._gcliLowerName.indexOf(match) !== -1 && !option.value.hidden) {
<<<<<<< let panel = Panel({ contentScript: "postMessage('')", contentScriptWhen: "ready", height: 10, width: 10, onMessage: function (message) { panel.show(); }, onShow: function () { panel.resize(100,100); panel.hide(); }, onHide: function () { test.assert((panel.width == 100) && (panel.height == 100), "The panel was resized."); test.done(); } }); ======= // These tests fail on Linux if the browser window in which the panel // is displayed is not active. And depending on what other tests have run // before this one, it might not be (the untitled window in which the test // runner executes is often active). So we make sure the browser window // is focused by focusing it before running the tests. Then, to be the best // possible test citizen, we refocus whatever window was focused before we // started running these tests. let activeWindow = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator). getMostRecentWindow(null); let browserWindow = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator). getMostRecentWindow("navigator:browser"); function onFocus() { browserWindow.removeEventListener("focus", onFocus, true); let panel = panels.add(Panel({ contentScript: "postMessage('')", contentScriptWhen: "ready", height: 10, width: 10, onMessage: function (message) { panel.show(); }, onShow: function () { panel.resize(100,100); panel.hide(); }, onHide: function () { test.assert((panel.width == 100) && (panel.height == 100), "The panel was resized."); activeWindow.focus(); test.done(); } })); } if (browserWindow === activeWindow) { onFocus(); } else { browserWindow.addEventListener("focus", onFocus, true); browserWindow.focus(); } >>>>>>> // These tests fail on Linux if the browser window in which the panel // is displayed is not active. And depending on what other tests have run // before this one, it might not be (the untitled window in which the test // runner executes is often active). So we make sure the browser window // is focused by focusing it before running the tests. Then, to be the best // possible test citizen, we refocus whatever window was focused before we // started running these tests. let activeWindow = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator). getMostRecentWindow(null); let browserWindow = Cc["@mozilla.org/appshell/window-mediator;1"]. getService(Ci.nsIWindowMediator). getMostRecentWindow("navigator:browser"); function onFocus() { browserWindow.removeEventListener("focus", onFocus, true); let panel = Panel({ contentScript: "postMessage('')", contentScriptWhen: "ready", height: 10, width: 10, onMessage: function (message) { panel.show(); }, onShow: function () { panel.resize(100,100); panel.hide(); }, onHide: function () { test.assert((panel.width == 100) && (panel.height == 100), "The panel was resized."); activeWindow.focus(); test.done(); } }); } if (browserWindow === activeWindow) { onFocus(); } else { browserWindow.addEventListener("focus", onFocus, true); browserWindow.focus(); } <<<<<<< tests['test:destruct before removed'] = function(test) { test.waitUntilDone(); let loader = test.makeSandboxedLoader(); let panels = loader.require('panel'); let { Panel } = loader.findSandboxForModule("panel").globalScope; let PanelShim = Panel.compose({ destructor: function() this._destructor() }); PanelShim.prototype = Panel.prototype; let isShowEmitted = false; let panel = PanelShim({ contentURL: "about:buildconfig", onShow: function onShow() { test.pass('shown was emitted'); panel.destructor(); }, onHide: function onHide() { test.done(); } }); panel.on('error', function(e) { test.fail('error emit was emitted:' + e.message + '\n'+ e.stack) }); panel.show(); }; ======= >>>>>>>
<<<<<<< const { activateTab, getTabTitle, setTabTitle, closeTab, getTabURL, getRawTabForBrowser, ======= const { activateTab, getTabTitle, setTabTitle, closeTab, getTabURL, getContentWindowForTab, >>>>>>> const { activateTab, getTabTitle, setTabTitle, closeTab, getTabURL, getContentWindowForTab, getRawTabForBrowser, <<<<<<< exports.Tab = Tab; function cleanupTab(tab) { let tabInternals = tabNS(tab); if (!tabInternals.tab) return; if (tabInternals.tab.browser) { tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady, false); } tabInternals.onReady = null; tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose, false); tabInternals.onClose = null; rawTabNS(tabInternals.tab).tab = null; tabInternals.tab = null; tabInternals.window = null; } function onTabReady(event) { let win = event.target.defaultView; // ignore frames if (win === win.top) { emit(this, 'ready', this); } } // TabClose function onTabClose(event) { let rawTab = getRawTabForBrowser(event.target); if (this !== rawTabNS(rawTab).tab) return; emit(this, EVENTS.close.name, this); cleanupTab(this); }; ======= exports.Tab = Tab; getPBOwnerWindow.define(Tab, function(tab) { return getContentWindowForTab(tabNS(tab).tab); }); >>>>>>> exports.Tab = Tab; function cleanupTab(tab) { let tabInternals = tabNS(tab); if (!tabInternals.tab) return; if (tabInternals.tab.browser) { tabInternals.tab.browser.removeEventListener(EVENTS.ready.dom, tabInternals.onReady, false); } tabInternals.onReady = null; tabInternals.window.BrowserApp.deck.removeEventListener(EVENTS.close.dom, tabInternals.onClose, false); tabInternals.onClose = null; rawTabNS(tabInternals.tab).tab = null; tabInternals.tab = null; tabInternals.window = null; } function onTabReady(event) { let win = event.target.defaultView; // ignore frames if (win === win.top) { emit(this, 'ready', this); } } // TabClose function onTabClose(event) { let rawTab = getRawTabForBrowser(event.target); if (this !== rawTabNS(rawTab).tab) return; emit(this, EVENTS.close.name, this); cleanupTab(this); }; getPBOwnerWindow.define(Tab, function(tab) { return getContentWindowForTab(tabNS(tab).tab); });
<<<<<<< var api = self._makeApi(path); sandbox.defineProperty('require', api.require); sandbox.defineProperty('define', api.define); // Override the default Iterator function with one that passes // a second argument to custom iterator methods that identifies // the call as originating from an Iterator function so the custom // iterator method can return [key, value] pairs just like default // iterators called via the default Iterator function. sandbox.defineProperty('Iterator', (function(DefaultIterator) { return function Iterator(obj, keysOnly) { if ("__iterator__" in obj && !keysOnly) return obj.__iterator__.call(obj, false, true); return DefaultIterator(obj, keysOnly); }; })(sandbox.globalScope.Iterator) ); sandbox.evaluate("var exports = {};"); self.modules[path] = sandbox.getProperty("exports"); ======= sandbox.defineProperty('require', self._makeRequire(path)); >>>>>>> var api = self._makeApi(path); sandbox.defineProperty('require', api.require); sandbox.defineProperty('define', api.define);
<<<<<<< // Converts anything that isn't false, null or undefined into a string function stringOrNull(val) val ? String(val) : val; // Shared option validation rules for Item and Menu ======= // Shared option validation rules for Item, Menu, and Separator >>>>>>> // Converts anything that isn't false, null or undefined into a string function stringOrNull(val) val ? String(val) : val; // Shared option validation rules for Item, Menu, and Separator <<<<<<< getMatchedContext: function getCurrentContexts(popupNode) { let results = this.getSandbox().emitSync("context", popupNode); ======= getMatchedContext: function getCurrentContexts(popupNode, data) { let results = this._contentWorker.emitSync("context", popupNode, data); >>>>>>> getMatchedContext: function getCurrentContexts(popupNode) { let results = this.getSandbox().emitSync("context", popupNode); <<<<<<< if (!worker || !worker.anyContextListeners()) return true; return worker.getMatchedContext(popupNode); ======= if (!worker) return null; return worker.getMatchedContext(popupNode, item.data); >>>>>>> if (!worker || !worker.anyContextListeners()) return true; return worker.getMatchedContext(popupNode); <<<<<<< ======= let toplevel = this.topLevelItems; if (toplevel.length >= MenuManager.overflowThreshold) { // Create the overflow menu and move everything there let overflowMenu = this.window.document.createElement("menu"); overflowMenu.setAttribute("class", OVERFLOW_MENU_CLASS); overflowMenu.setAttribute("label", OVERFLOW_MENU_LABEL); overflowMenu.setAttribute("accesskey", OVERFLOW_MENU_ACCESSKEY); this.contextMenu.insertBefore(overflowMenu, this.separator.nextSibling); menupopup = this.window.document.createElement("menupopup"); menupopup.setAttribute("class", OVERFLOW_POPUP_CLASS); overflowMenu.appendChild(menupopup); for (let xulNode of toplevel) { menupopup.appendChild(xulNode); this.setXULClass(xulNode); } } } >>>>>>> <<<<<<< if (item.image) { ======= if (item.accesskey) xulNode.setAttribute("accesskey", item.accesskey); if (item.image) >>>>>>> if (item.accesskey) xulNode.setAttribute("accesskey", item.accesskey); if (item.image) { <<<<<<< if (item.image) { ======= if (item.accesskey) xulNode.setAttribute("accesskey", item.accesskey); if (item.image) >>>>>>> if (item.accesskey) xulNode.setAttribute("accesskey", item.accesskey); if (item.image) {
<<<<<<< // Internal feature that is only used by SDK tests: // Expose unlock key to content script context. // See `PRIVATE_KEY` definition for more information. if (proxySandbox && worker._expose_key) sandbox.UNWRAP_ACCESS_KEY = proxySandbox.UNWRAP_ACCESS_KEY; // Overriding / Injecting some natives into sandbox. Cu.evalInSandbox(shims.contents, sandbox, JS_VERSION, shims.filename); ======= >>>>>>> // Internal feature that is only used by SDK tests: // Expose unlock key to content script context. // See `PRIVATE_KEY` definition for more information. if (proxySandbox && worker._expose_key) sandbox.UNWRAP_ACCESS_KEY = proxySandbox.UNWRAP_ACCESS_KEY;
<<<<<<< const { Trait } = require("light-traits"); const { EventEmitterTrait: EventEmitter } = require("events"); const { DOMEventAssembler } = require("events/assembler"); const { browserWindowIterator, isBrowser } = require('window-utils'); const { observer: windowObserver } = require("../windows/observer"); ======= const { Trait } = require("../light-traits"); const { EventEmitterTrait: EventEmitter } = require("../events"); const { DOMEventAssembler } = require("../events/assembler"); const { browserWindowIterator, isBrowser } = require('../window-utils'); const windowObserver = require("../windows/observer"); >>>>>>> const { Trait } = require("../light-traits"); const { EventEmitterTrait: EventEmitter } = require("../events"); const { DOMEventAssembler } = require("../events/assembler"); const { browserWindowIterator, isBrowser } = require('../window-utils'); const { observer: windowObserver } = require("../windows/observer");
<<<<<<< test.assertEqual(tabs.active.location, tab.location, "tab is now the active tab"); tab.close(function() { closeBrowserWindow(window, function() test.done()); }); test.assertNotEqual(tabs.active.location, url, "tab is no longer the active tab"); ======= test.assertEqual(tabs.activeTab.location, tab.location, "tab is now the active tab"); tab.close(); test.assertNotEqual(tabs.activeTab.location, url, "tab is no longer the active tab"); closeBrowserWindow(window, function() test.done()); >>>>>>> test.assertEqual(tabs.activeTab.location, tab.location, "tab is now the active tab"); tab.close(function() { closeBrowserWindow(window, function() test.done()); }); test.assertNotEqual(tabs.activeTab.location, url, "tab is no longer the active tab");
<<<<<<< tests.push(function() testSingleWidget({ id: "text", ======= tests.push(function testTextWidget() testSingleWidget({ >>>>>>> tests.push(function testTextWidget() testSingleWidget({ id: "text", <<<<<<< tests.push(function() testSingleWidget({ id: "html", ======= tests.push(function testHTMLWidget() testSingleWidget({ >>>>>>> tests.push(function testHTMLWidget() testSingleWidget({ id: "html", <<<<<<< tests.push(function() testSingleWidget({ id: "image", ======= tests.push(function testImageURLWidget() testSingleWidget({ >>>>>>> tests.push(function testImageURLWidget() testSingleWidget({ id: "image", <<<<<<< tests.push(function() testSingleWidget({ id: "web", ======= tests.push(function testWebURIWidget() testSingleWidget({ >>>>>>> tests.push(function testWebURIWidget() testSingleWidget({ id: "web", <<<<<<< tests.push(function() testSingleWidget({ id: "click", ======= tests.push(function testOnclickEventContent() testSingleWidget({ >>>>>>> tests.push(function testOnclickEventContent() testSingleWidget({ id: "click", <<<<<<< tests.push(function() testSingleWidget({ id: "mouseover", ======= tests.push(function testOnmouseoverEventContent() testSingleWidget({ >>>>>>> tests.push(function testOnmouseoverEventContent() testSingleWidget({ id: "mouseover", <<<<<<< tests.push(function() testSingleWidget({ id: "mouseout", ======= tests.push(function testOnmouseoutEventContent() testSingleWidget({ >>>>>>> tests.push(function testOnmouseoutEventContent() testSingleWidget({ id: "mouseout", <<<<<<< tests.push(function() testSingleWidget({ id: "click", ======= tests.push(function testOnclickEventImage() testSingleWidget({ >>>>>>> tests.push(function testOnclickEventImage() testSingleWidget({ id: "click", <<<<<<< tests.push(function() testSingleWidget({ id: "mouseover", ======= tests.push(function testOnmouseoverEventImage() testSingleWidget({ >>>>>>> tests.push(function testOnmouseoverEventImage() testSingleWidget({ id: "mouseover", <<<<<<< tests.push(function() testSingleWidget({ id: "mouseout", ======= tests.push(function testOnmouseoutEventImage() testSingleWidget({ >>>>>>> tests.push(function testOnmouseoutEventImage() testSingleWidget({ id: "mouseout", <<<<<<< tests.push(function() { let w1 = widgets.Widget({id: "first", label: "first widget", content: "first content"}); let w2 = widgets.Widget({id: "second", label: "second widget", content: "second content"}); ======= tests.push(function testMultipleWidgets() { let w1 = widgets.Widget({label: "first widget", content: "first content"}); let w2 = widgets.Widget({label: "second widget", content: "second content"}); >>>>>>> tests.push(function testMultipleWidgets() { let w1 = widgets.Widget({id: "first", label: "first widget", content: "first content"}); let w2 = widgets.Widget({id: "second", label: "second widget", content: "second content"}); <<<<<<< tests.push(function() testSingleWidget({ id: "content", ======= tests.push(function testUpdatingWidgetContent() testSingleWidget({ >>>>>>> tests.push(function testUpdatingWidgetContent() testSingleWidget({ id: "content", <<<<<<< tests.push(function() testSingleWidget({ id: "content", ======= tests.push(function testUpdatingContentURL() testSingleWidget({ >>>>>>> tests.push(function testUpdatingContentURL() testSingleWidget({ id: "content", <<<<<<< tests.push(function() testSingleWidget({ id: "text", ======= tests.push(function testTooltip() testSingleWidget({ >>>>>>> tests.push(function testTooltip() testSingleWidget({ id: "text", <<<<<<< tests.push(function() testSingleWidget({ id: "fallback", ======= tests.push(function testTooltipFallback() testSingleWidget({ >>>>>>> tests.push(function testTooltipFallback() testSingleWidget({ id: "fallback", <<<<<<< tests.push(function() testSingleWidget({ id: "tooltip", ======= tests.push(function testUpdatingTooltip() testSingleWidget({ >>>>>>> tests.push(function testUpdatingTooltip() testSingleWidget({ id: "tooltip", <<<<<<< tests.push(function() testSingleWidget({ id: "text", ======= tests.push(function testWidgetWidth() testSingleWidget({ >>>>>>> tests.push(function testWidgetWidth() testSingleWidget({ id: "text",
<<<<<<< const observerServ = require("observer-service"); ======= const { EventEmitterTrait: EventEmitter } = require("events"); >>>>>>> const { EventEmitterTrait: EventEmitter } = require("events"); const observerServ = require("observer-service");
<<<<<<< const keyboardObserver = require("keyboard/observer"); const { getKeyForCode, normalize, MODIFIERS } = require("keyboard/utils"); ======= const keyboardObserver = require("./observer"); const { getKeyForCode, normalize } = require("./utils"); >>>>>>> const keyboardObserver = require("./observer"); const { getKeyForCode, normalize, MODIFIERS } = require("./utils");
<<<<<<< let self = this; let window = this.window = options.window || getOwnerWindow(this._tab); ======= // TODO: Remove this dependency let window = this.window = options.window || require('../windows').BrowserWindow({ window: getOwnerWindow(this._tab) }); >>>>>>> let self = this; // TODO: Remove this dependency let window = this.window = options.window || require('../windows').BrowserWindow({ window: getOwnerWindow(this._tab) });
<<<<<<< function ($scope, $http, $mdToast, gridService, $translate, ======= function ($scope, $http, $mdToast, $filter, gridService, >>>>>>> function ($scope, $http, $mdToast, $filter, gridService, $translate,
<<<<<<< }); } ======= }); self.warpCount++; >>>>>>> }); } self.warpCount++;
<<<<<<< import ru from './locales/ru.json'; ======= import pl from './locales/pl.json'; >>>>>>> import ru from './locales/ru.json'; import pl from './locales/pl.json'; <<<<<<< ru, ======= pl, >>>>>>> ru, pl
<<<<<<< const PlaylistViewContainer = props => { return ( <PlaylistView playlist={this.props.playlists.playlists[this.props.match.params.playlistId]} musicSources={this.props.musicSources} addTracks={this.props.actions.addPlaylistTracksToQueue} selectSong={this.props.actions.selectSong} startPlayback={this.props.actions.startPlayback} notify={this.props.actions.notify} /> ); }; ======= render () { return ( <PlaylistView playlist={this.props.playlists.playlists[this.props.match.params.playlistId]} musicSources={this.props.musicSources} addTracks={this.props.actions.addPlaylistTracksToQueue} selectSong={this.props.actions.selectSong} startPlayback={this.props.actions.startPlayback} clearQueue={this.props.actions.clearQueue} addToQueue={this.props.actions.addToQueue} /> ); } } >>>>>>> const PlaylistViewContainer = props => { return ( <PlaylistView playlist={this.props.playlists.playlists[this.props.match.params.playlistId]} musicSources={this.props.musicSources} addTracks={this.props.actions.addPlaylistTracksToQueue} selectSong={this.props.actions.selectSong} startPlayback={this.props.actions.startPlayback} notify={this.props.actions.notify} clearQueue={this.props.actions.clearQueue} addToQueue={this.props.actions.addToQueue} /> ); };
<<<<<<< const DownloadsList = props => { const [sortAsc, setSort] = useState(true); const { items, clearFinishedTracks } = props; ======= const DownloadsList = ({ items, clearFinishedTracks }) => { >>>>>>> const DownloadsList = ({ items, clearFinishedTracks }) => { const [sortAsc, setSort] = useState(true);
<<<<<<< import zh from './locales/zh.json'; ======= import dk from './locales/dk.json'; import es from './locales/es.json'; import pl from './locales/pl.json'; >>>>>>> import zh from './locales/zh.json'; import dk from './locales/dk.json'; import es from './locales/es.json'; import pl from './locales/pl.json'; <<<<<<< nl, zh ======= nl, dk, es, pl, >>>>>>> nl, zh, dk, es, pl,
<<<<<<< import * as Autoradio from './autoradio'; ======= import globals from '../../globals'; import core from 'nuclear-core'; let lastfm = new core.LastFmApi(globals.lastfmApiKey, globals.lastfmApiSecret); >>>>>>> import * as Autoradio from './autoradio'; import globals from '../../globals'; import core from 'nuclear-core'; let lastfm = new core.LastFmApi(globals.lastfmApiKey, globals.lastfmApiSecret); <<<<<<< handleLoaded () { ======= handleLoaded () { this.handleLoadLyrics(); >>>>>>> handleLoaded () { this.handleLoadLyrics(); <<<<<<< handleAutoRadio () { ======= handleLoadLyrics () { let currentSong = this.props.queue.queueItems[ this.props.queue.currentSong ]; if (typeof currentSong.lyrics === 'undefined') { this.props.actions.lyricsSearch(currentSong); } } handleAutoRadio () { >>>>>>> handleLoadLyrics () { let currentSong = this.props.queue.queueItems[ this.props.queue.currentSong ]; if (typeof currentSong.lyrics === 'undefined') { this.props.actions.lyricsSearch(currentSong); } } handleAutoRadio () { <<<<<<< shouldComponentUpdate (nextProps) { ======= addAutoradioTrackToQueue () { let currentSong = this.props.queue.queueItems[this.props.queue.currentSong]; return lastfm .getArtistInfo(currentSong.artist) .then(artist => artist.json()) .then(artistJson => this.getSimilarArtists(artistJson.artist)) .then(similarArtists => this.getRandomElement(similarArtists)) .then(selectedArtist => this.getArtistTopTracks(selectedArtist)) .then(topTracks => this.getRandomElement(topTracks.toptracks.track)) .then(track => { return this.addToQueue(track.artist, track); }); } getSimilarArtists (artistJson) { return new Promise((resolve, reject) => { resolve(artistJson.similar.artist); }); } getRandomElement (arr) { let devianceParameter = 0.2; // We will select one of the 20% most similar artists let randomElement = arr[Math.round(Math.random() * (devianceParameter * (arr.length - 1)))]; return new Promise((resolve, reject) => resolve(randomElement)); } getArtistTopTracks (artist) { return lastfm .getArtistTopTracks(artist.name) .then(topTracks => topTracks.json()); } addToQueue (artist, track) { return new Promise((resolve, reject) => { let musicSources = this.props.plugins.plugins.musicSources; this.props.actions.addToQueue(musicSources, { artist: artist.name, name: track.name, thumbnail: track.image[0]['#text'] }); resolve(true); }); } shouldComponentUpdate (nextProps) { >>>>>>> addAutoradioTrackToQueue () { let currentSong = this.props.queue.queueItems[this.props.queue.currentSong]; return lastfm .getArtistInfo(currentSong.artist) .then(artist => artist.json()) .then(artistJson => this.getSimilarArtists(artistJson.artist)) .then(similarArtists => this.getRandomElement(similarArtists)) .then(selectedArtist => this.getArtistTopTracks(selectedArtist)) .then(topTracks => this.getRandomElement(topTracks.toptracks.track)) .then(track => { return this.addToQueue(track.artist, track); }); } getSimilarArtists (artistJson) { return new Promise((resolve, reject) => { resolve(artistJson.similar.artist); }); } getRandomElement (arr) { let devianceParameter = 0.2; // We will select one of the 20% most similar artists let randomElement = arr[Math.round(Math.random() * (devianceParameter * (arr.length - 1)))]; return new Promise((resolve, reject) => resolve(randomElement)); } getArtistTopTracks (artist) { return lastfm .getArtistTopTracks(artist.name) .then(topTracks => topTracks.json()); } addToQueue (artist, track) { return new Promise((resolve, reject) => { let musicSources = this.props.plugins.plugins.musicSources; this.props.actions.addToQueue(musicSources, { artist: artist.name, name: track.name, thumbnail: track.image[0]['#text'] }); resolve(true); }); } shouldComponentUpdate (nextProps) { <<<<<<< ScrobblingActions ======= ScrobblingActions, LyricsActions >>>>>>> ScrobblingActions, LyricsActions
<<<<<<< if (expected.error) { cli.logErrors = origLogErrors; } return Promise.resolve({}); ======= return promise.resolve({}); >>>>>>> if (expected.error) { cli.logErrors = origLogErrors; } return promise.resolve({}); <<<<<<< if (expected.error) { cli.logErrors = origLogErrors; } return Promise.resolve({ output: output }); ======= return promise.resolve({ output: output }); >>>>>>> if (expected.error) { cli.logErrors = origLogErrors; } return promise.resolve({ output: output }); <<<<<<< if (expected.error) { cli.logErrors = origLogErrors; } return Promise.resolve({ output: output }); ======= return promise.resolve({ output: output }); >>>>>>> if (expected.error) { cli.logErrors = origLogErrors; } return promise.resolve({ output: output });
<<<<<<< import { fetchMessages } from '../../store' ======= import {fetchMessages} from '../../store' import {ErrorBoundary} from './err' >>>>>>> import { fetchMessages } from '../../store' import { ErrorBoundary } from './err' <<<<<<< <section id="dashboard"> ======= <ErrorBoundary> <section id='dashboard'> >>>>>>> <ErrorBoundary> <section id="dashboard">
<<<<<<< request(`http://${config.API_ACCOUNTS}:6010/v1/blueprints/${id}`) .then(blueprint => { ======= request(`http://${config.API_ACCOUNTS}/blueprints/${id}`) .then(json => { let blueprints = json.reduce((acc, print) => { acc[print.ID] = print return acc }, {}) >>>>>>> request(`http://${config.API_ACCOUNTS}/blueprints/${id}`) .then(blueprint => {
<<<<<<< <div className={styles.companyAccess}> {this.props.isAdmin ? ( <React.Fragment> <p> By providing a team access you can allow an external group of users access to manage your instance. For example: this can be used to provide an agency with access to manage your website. </p> <div className={styles.addCompany}> <Input placeholder="Enter team ID" onChange={this.handleTream} /> <Select onSelect={this.handleRole}> <Option key="default" value="" text="Select Role" /> {this.props.siteRoles.map(role => { return ( <Option key={role.ZUID} value={role.ZUID} text={role.name} /> ) })} </Select> <Button name="companyAccessSubmit">Grant Access</Button> </div> </React.Fragment> ) : null} <div className={styles.companyTable}> <header> <h3>Team</h3> <h3>Contact</h3> <h3>Email</h3> <h3>Access</h3> </header> <main> <WithLoader condition={!this.props.loadingTeams} message="Loading Instance Teams" height="100px" width="100%" > {Object.keys(this.props.companies).map(ZUID => { let company = this.props.companies[ZUID] ======= {this.props.isAdmin ? ( <React.Fragment> <p> By providing a team access you can allow an external group of users access to manage your instance. For example; this is can be used to provide an agency with access to manage your website. </p> <div className={styles.addCompany}> <Input placeholder="Enter team ID" onChange={this.handleTream} /> <Select onSelect={this.handleRole}> <Option key="default" value="" text="Select Role" /> {this.props.siteRoles.map(role => { >>>>>>> {this.props.isAdmin ? ( <React.Fragment> <p> By providing a team access you can allow an external group of users access to manage your instance. For example: this can be used to provide an agency with access to manage your website. </p> <div className={styles.addCompany}> <Input placeholder="Enter team ID" onChange={this.handleTream} /> <Select onSelect={this.handleRole}> <Option key="default" value="" text="Select Role" /> {this.props.siteRoles.map(role => {
<<<<<<< exports["test token array FIFO"] = function() { var lexData = { rules: [ ["a", "return ['a','b'];"], ["c", "return 'c';"] ] }; var grammar = { ebnf: { "pgm" :[ ["expr expr expr", "return $1+$2+$3;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('ac'), "abc", "should return second token"); }; exports["test symbol aliases"] = function() { var lexData = { rules: [ ["a", "return 'a';"], ["b", "return 'b';"], ["c", "return 'c';"] ] }; var grammar = { bnf: { "pgm" :[ ["expr[alice] expr[bob] expr[carol]", "return $alice+$bob+$carol;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('abc'), "abc", "should return original string"); }; exports["test symbol aliases in ebnf"] = function() { var lexData = { rules: [ ["a", "return 'a';"], ["b", "return 'b';"], ["c", "return 'c';"] ] }; var grammar = { ebnf: { "pgm" :[ ["expr[alice] (expr[bob] expr[carol])+", "return $alice+$2;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('abc'), "ab", "should tolerate aliases in subexpression"); }; ======= exports["test YYACCEPT"] = function() { var lexData = { rules: [ ["x", "return 'x';"], ["y", "return 'y';"] ] }; var grammar = { bnf: { "pgm" :[ ["E", "return $1"] ], "E" :[ ["B E", "return $1+$2"], ["x", "$$ = 'EX'"] ], "B" :[ ["y", "YYACCEPT"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('x'), "EX", "return first token"); assert.equal(parser.parse('yx'), true, "return first after reduction"); }; exports["test YYABORT"] = function() { var lexData = { rules: [ ["x", "return 'x';"], ["y", "return 'y';"] ] }; var grammar = { bnf: { "pgm" :[ ["E", "return $1"] ], "E" :[ ["B E", "return $1+$2"], ["x", "$$ = 'EX'"] ], "B" :[ ["y", "YYABORT"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('x'), "EX", "return first token"); assert.equal(parser.parse('yx'), false, "return first after reduction"); }; exports["test parse params"] = function() { var lexData = { rules: [ ["y", "return 'y';"] ] }; var grammar = { bnf: { "E" :[ ["E y", "return first + second;"], "" ] }, parseParams: ["first", "second"] }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('y', "foo", "bar"), "foobar", "semantic action"); }; >>>>>>> exports["test token array FIFO"] = function() { var lexData = { rules: [ ["a", "return ['a','b'];"], ["c", "return 'c';"] ] }; var grammar = { ebnf: { "pgm" :[ ["expr expr expr", "return $1+$2+$3;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('ac'), "abc", "should return second token"); }; exports["test symbol aliases"] = function() { var lexData = { rules: [ ["a", "return 'a';"], ["b", "return 'b';"], ["c", "return 'c';"] ] }; var grammar = { bnf: { "pgm" :[ ["expr[alice] expr[bob] expr[carol]", "return $alice+$bob+$carol;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('abc'), "abc", "should return original string"); }; exports["test symbol aliases in ebnf"] = function() { var lexData = { rules: [ ["a", "return 'a';"], ["b", "return 'b';"], ["c", "return 'c';"] ] }; var grammar = { ebnf: { "pgm" :[ ["expr[alice] (expr[bob] expr[carol])+", "return $alice+$2;"] ], "expr" :[ ["a", "$$ = 'a';"], ["b", "$$ = 'b';"], ["c", "$$ = 'c';"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('abc'), "ab", "should tolerate aliases in subexpression"); }; exports["test YYACCEPT"] = function() { var lexData = { rules: [ ["x", "return 'x';"], ["y", "return 'y';"] ] }; var grammar = { bnf: { "pgm" :[ ["E", "return $1"] ], "E" :[ ["B E", "return $1+$2"], ["x", "$$ = 'EX'"] ], "B" :[ ["y", "YYACCEPT"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('x'), "EX", "return first token"); assert.equal(parser.parse('yx'), true, "return first after reduction"); }; exports["test YYABORT"] = function() { var lexData = { rules: [ ["x", "return 'x';"], ["y", "return 'y';"] ] }; var grammar = { bnf: { "pgm" :[ ["E", "return $1"] ], "E" :[ ["B E", "return $1+$2"], ["x", "$$ = 'EX'"] ], "B" :[ ["y", "YYABORT"] ] } }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('x'), "EX", "return first token"); assert.equal(parser.parse('yx'), false, "return first after reduction"); }; exports["test parse params"] = function() { var lexData = { rules: [ ["y", "return 'y';"] ] }; var grammar = { bnf: { "E" :[ ["E y", "return first + second;"], "" ] }, parseParams: ["first", "second"] }; var parser = new Jison.Parser(grammar); parser.lexer = new RegExpLexer(lexData); assert.equal(parser.parse('y', "foo", "bar"), "foobar", "semantic action"); };
<<<<<<< var Router = require('react-router'); var routerHistory = require('history'); var ReactDOM = require('react-dom'); var merge = require('lodash/object/merge'); ======= >>>>>>> var Router = require('react-router'); var routerHistory = require('history'); var ReactDOM = require('react-dom'); var merge = require('lodash/object/merge'); <<<<<<< ReactDOM.render(viewFactory(props), _document); ======= React.render(viewFactory(props), mountNode); >>>>>>> ReactDOM.render(viewFactory(props), _document);
<<<<<<< let styleJSON; const createPool = (ratio, min, max) => { const createRenderer = (ratio, createCallback) => { const renderer = new mbgl.Map({ ======= var styleJSON; var createPool = function(ratio, min, max) { var createRenderer = function(ratio, createCallback) { var renderer = new mbgl.Map({ mode: "tile", >>>>>>> let styleJSON; const createPool = (ratio, min, max) => { const createRenderer = (ratio, createCallback) => { const renderer = new mbgl.Map({ mode: "tile",
<<<<<<< this.arrayToMap = function(arr) { var map = {}; for (var i=0; i<arr.length; i++) { map[arr[i]] = 1; } return map; }; ======= this.objectReverse = function(obj, keySplit) { var i, j, l, key, ret = {}; for (i in obj) { key = obj[i]; if (keySplit && typeof key == "string") { key = key.split(keySplit); for (j = 0, l = key.length; j < l; ++j) ret[key[j]] = i; } else { ret[key] = i; } } return ret; }; >>>>>>> this.arrayToMap = function(arr) { var map = {}; for (var i=0; i<arr.length; i++) { map[arr[i]] = 1; } return map; }; this.objectReverse = function(obj, keySplit) { var i, j, l, key, ret = {}; for (i in obj) { key = obj[i]; if (keySplit && typeof key == "string") { key = key.split(keySplit); for (j = 0, l = key.length; j < l; ++j) ret[key[j]] = i; } else { ret[key] = i; } } return ret; };
<<<<<<< /* * Backbone.Courier, v0.5.6 ======= /*! * Backbone.Marionette.Courier, v0.5.7 >>>>>>> /* * Backbone.Courier, v0.5.7 <<<<<<< else if( isRoundTripMessage ) messageShouldBePassed = true; // round trip messages are passed up even if there is not an entry in the passMessages hash ======= >>>>>>> else if( isRoundTripMessage ) messageShouldBePassed = true; // round trip messages are passed up even if there is not an entry in the passMessages hash <<<<<<< if( _.isFunction( value ) ) { message = { name : eventName, data : {} }; ======= if( _.isFunction( value ) ) { message = { name : eventName, data : {}, source : _this }; >>>>>>> if( _.isFunction( value ) ) { message = { name : eventName, data : {}, source : _this };
<<<<<<< assert.equal(nptr.address, ptr.getPointer().address); assert.equal(1234.5678, ptr.getPointer().getDouble()); ======= assertEquals(nptr.address, ptr.getPointer().address); assertEquals(1234.5678, ptr.getPointer().getDouble()); assertEquals(32, nptr.allocated); >>>>>>> assert.equal(nptr.address, ptr.getPointer().address); assert.equal(1234.5678, ptr.getPointer().getDouble()); assert.equal(32, nptr.allocated); <<<<<<< assert.ok(advptr.address == ptr.address); ======= assertTrue(advptr.address == ptr.address); advptr.putInt64(1, true); assertTrue(advptr.address > ptr.address); advptr = ptr.seek(0); assertTrue(advptr.address == ptr.address); advptr.putUInt64(1, true); assertTrue(advptr.address > ptr.address); advptr = ptr.seek(0); assertTrue(advptr.address == ptr.address); >>>>>>> assert.ok(advptr.address == ptr.address); advptr.putInt64(1, true); assert.ok(advptr.address > ptr.address); advptr = ptr.seek(0); assert.ok(advptr.address == ptr.address); advptr.putUInt64(1, true); assert.ok(advptr.address > ptr.address); advptr = ptr.seek(0); assert.ok(advptr.address == ptr.address); <<<<<<< assert.ok(advptr.address == ptr.address); ======= assertTrue(advptr.address == ptr.address); advptr.getInt64(true); assertTrue(advptr.address > ptr.address); advptr = ptr.seek(0); assertTrue(advptr.address == ptr.address); advptr.getUInt64(true); assertTrue(advptr.address > ptr.address); advptr = ptr.seek(0); assertTrue(advptr.address == ptr.address); >>>>>>> assert.ok(advptr.address == ptr.address); advptr.getInt64(true); assert.ok(advptr.address > ptr.address); advptr = ptr.seek(0); assert.ok(advptr.address == ptr.address); advptr.getUInt64(true); assert.ok(advptr.address > ptr.address); advptr = ptr.seek(0); assert.ok(advptr.address == ptr.address);
<<<<<<< var util = require("util"); ======= var sys = require("sys"); >>>>>>> var util = require("util"); <<<<<<< var arg, next, watch, program, extensions, executor, poll_interval; ======= var arg, next, watch, program, programArgs, extensions, executor; >>>>>>> var arg, next, watch, program, programArgs, extensions, executor, poll_interval; <<<<<<< fileExtensionPattern = new RegExp("^.*\.(" + extensions + ")$"); ======= fileExtensionPattern = new RegExp(".*\.(" + extensions + ")"); >>>>>>> fileExtensionPattern = new RegExp("^.*\.(" + extensions + ")$"); <<<<<<< util.puts("") util.debug("Running node-supervisor with"); util.debug(" program '" + program + "'"); util.debug(" --watch '" + watch + "'"); util.debug(" --extensions '" + extensions + "'"); util.debug(" --exec '" + executor + "'"); util.puts("") ======= sys.puts(""); sys.debug("Running node-supervisor with"); sys.debug(" program '" + program + "'"); sys.debug(" --watch '" + watch + "'"); sys.debug(" --extensions '" + extensions + "'"); sys.debug(" --exec '" + executor + "'"); sys.puts(""); >>>>>>> util.puts("") util.debug("Running node-supervisor with"); util.debug(" program '" + program + "'"); util.debug(" --watch '" + watch + "'"); util.debug(" --extensions '" + extensions + "'"); util.debug(" --exec '" + executor + "'"); util.puts(""); <<<<<<< function print (m, n) { util.print(m+(!n?"\n":"")); return print } ======= function print (m, n) { sys.print(m+(!n?"\n":"")); return print; } >>>>>>> function print (m, n) { util.print(m+(!n?"\n":"")); return print; } <<<<<<< function startProgram (prog, exec) { util.debug("Starting child process with '" + exec + " " + prog + "'"); var child = exports.child = spawn(exec, [prog]); child.stdout.addListener("data", function (chunk) { chunk && util.print(chunk) }); child.stderr.addListener("data", function (chunk) { chunk && util.debug(chunk) }); child.addListener("exit", function () { startProgram(prog, exec) }); ======= function startProgram (prog, exec, args) { if (args) sys.debug("Starting child process with '" + exec + " " + prog + " " + args + "'"); else sys.debug("Starting child process with '" + exec + " " + prog + "'"); var spawnme = args ? [prog].concat(args) : [prog]; var child = exports.child = spawn(exec, spawnme); child.stdout.addListener("data", function (chunk) { chunk && sys.print(chunk); }); child.stderr.addListener("data", function (chunk) { chunk && sys.debug(chunk); }); child.addListener("exit", function () { startProgram(prog, exec, args); }); >>>>>>> function startProgram (prog, exec, args) { if (args) util.debug("Starting child process with '" + exec + " " + prog + " " + args + "'"); else util.debug("Starting child process with '" + exec + " " + prog + "'"); var spawnme = args ? [prog].concat(args) : [prog]; var child = exports.child = spawn(exec, spawnme); child.stdout.addListener("data", function (chunk) { chunk && util.print(chunk); }); child.stderr.addListener("data", function (chunk) { chunk && util.debug(chunk); }); child.addListener("exit", function () { startProgram(prog, exec, args); }); <<<<<<< crash_queued = true; ======= if (counter === -1) { timer = setTimeout(stopCrashing, 1000); } counter ++; >>>>>>> crash_queued = true; <<<<<<< function watchGivenFile (watch, poll_interval) { fs.watchFile(watch, { persistent: true, interval: poll_interval }, crash); ======= function watchGivenFile (watch) { fs.watchFile(watch, { persistent: true, interval: 250 }, crash); >>>>>>> function watchGivenFile (watch, poll_interval) { fs.watchFile(watch, { persistent: true, interval: poll_interval }, crash);
<<<<<<< this.connect = config => { this.ftp = config.sftp ? new PromiseSftp() : new PromiseFtp(); // sftp client does not provide a connection status // so instead provide one ourselfs if (config.sftp) { this.connectionStatus = "disconnected"; this.ftp.on("end", this.handleDisconnect); this.ftp.on("close", this.handleDisconnect); } ======= this.connect = (config) => { this.ftp = new PromiseFtp(); >>>>>>> this.connect = (config) => { this.ftp = config.sftp ? new PromiseSftp() : new PromiseFtp(); // sftp client does not provide a connection status // so instead provide one ourselfs if (config.sftp) { this.connectionStatus = "disconnected"; this.ftp.on("end", this.handleDisconnect); this.ftp.on("close", this.handleDisconnect); } <<<<<<< // sftp does not provide a connection status // so instead provide one ourselfs if (config.sftp) { this.connectionStatus = "connected"; } return config; }); ======= return config; }) .catch((err) => { return Promise.reject({ code: err.code, message: "connect: " + err.message, }); }); >>>>>>> // sftp does not provide a connection status // so instead provide one ourself if (config.sftp) { this.connectionStatus = "connected"; } return config; });
<<<<<<< ======= // History / back button stuff var lastSavedHistoryState = {index: -1, url: ""}; var scheduledAnimation = null; var loadHistory = function(state) { //console.log("Loading history state " + event.state); var index; if (state == null || rp.photos[state.index] == null || rp.photos[state.index].url != state.url) { index = 0; } else { index = state.index; lastSavedHistoryState = state; } startAnimation(index); }; window.onpopstate = function(event) { // This is called when back/forward button is pressed and there is custom history states saved. loadHistory(event.state); }; var saveHistory = function(index) { if (window.history == null) { return; // History api is not supported, do nothing } var photo = rp.photos[index]; if (index != lastSavedHistoryState.index && photo != null) { //console.log("Recorded history state " + index); lastSavedHistoryState = {index: index, url: photo.url}; history.pushState(lastSavedHistoryState, photo.title); } }; var animationFinished = function() { if (scheduledAnimation != null) { var next = scheduledAnimation; scheduledAnimation = null; startAnimation(next); } }; var showDefault = function() { // What to show initially if (window.history != null) { loadHistory(history.state); } else { startAnimation(0); } }; >>>>>>> // History / back button stuff var lastSavedHistoryState = {index: -1, url: ""}; var scheduledAnimation = null; var loadHistory = function(state) { //console.log("Loading history state " + event.state); var index; if (state == null || rp.photos[state.index] == null || rp.photos[state.index].url != state.url) { index = 0; } else { index = state.index; lastSavedHistoryState = state; } startAnimation(index); }; window.onpopstate = function(event) { // This is called when back/forward button is pressed and there is custom history states saved. loadHistory(event.state); }; var saveHistory = function(index) { if (window.history == null) { return; // History api is not supported, do nothing } var photo = rp.photos[index]; if (index != lastSavedHistoryState.index && photo != null) { //console.log("Recorded history state " + index); lastSavedHistoryState = {index: index, url: photo.url}; history.pushState(lastSavedHistoryState, photo.title); } }; var animationFinished = function() { if (scheduledAnimation != null) { var next = scheduledAnimation; scheduledAnimation = null; startAnimation(next); } }; var showDefault = function() { // What to show initially if (window.history != null) { loadHistory(history.state); } else { startAnimation(0); } }; <<<<<<< ======= animationFinished(); >>>>>>> animationFinished(); <<<<<<< if (rp.session.activeIndex === -1) { startShow(); ======= if (rp.session.activeIndex == -1) { showDefault(); >>>>>>> if (rp.session.activeIndex == -1) { // was startShow() showDefault(); <<<<<<< if (rp.session.activeIndex === -1) { startShow(); ======= if (rp.session.activeIndex == -1) { showDefault(); >>>>>>> if (rp.session.activeIndex === -1) { // was startShow(); showDefault();
<<<<<<< if (rp.settings.shouldAutoNextSlide) ======= // swap mp4 and webm, so that browsers prefer webm v.first().find('.webmsource').after(v.first().find('.mp4source')) if (shouldAutoNextSlide) >>>>>>> // swap mp4 and webm, so that browsers prefer webm v.first().find('.webmsource').after(v.first().find('.mp4source')) if (rp.settings.shouldAutoNextSlide)
<<<<<<< var arg = assignment.arg.beget({ text: prediction.name }); this.setAssignment(assignment, arg, { argUpdate: true }); ======= var arg = assignment.arg.beget({ text: prediction.name, dontQuote: (assignment === this.commandAssignment) }); this.setAssignment(assignment, arg); >>>>>>> var arg = assignment.arg.beget({ text: prediction.name, dontQuote: (assignment === this.commandAssignment) }); this.setAssignment(assignment, arg, { argUpdate: true });
<<<<<<< export const createEntity = (entity) => { ======= export const createResource = (resource, { onSuccess: onSuccess = noop, onError: onError = noop } = {}) => { if (onSuccess !== noop || onError !== noop) { console.warn('onSuccess/onError callbacks are deprecated. Please use returned promise: https://github.com/dixieio/redux-json-api/issues/17'); } >>>>>>> export const createResource = (resource) => { <<<<<<< dispatch(apiCreated(json.data)); ======= dispatch(apiCreated(json)); onSuccess(json); >>>>>>> dispatch(apiCreated(json)); <<<<<<< export const readEndpoint = (endpoint) => { ======= export const readEndpoint = (endpoint, { onSuccess: onSuccess = noop, onError: onError = noop, options = { indexLinks: undefined, } } = {}) => { if (onSuccess !== noop || onError !== noop) { console.warn('onSuccess/onError callbacks are deprecated. Please use returned promise: https://github.com/dixieio/redux-json-api/issues/17'); } >>>>>>> export const readEndpoint = (endpoint, { options = { indexLinks: undefined, } } = {}) => { <<<<<<< dispatch(apiRead({ endpoint, ...json })); ======= dispatch(apiRead({ endpoint, options, ...json })); onSuccess(json); >>>>>>> dispatch(apiRead({ endpoint, options, ...json })); <<<<<<< export const updateEntity = (entity) => { ======= export const updateResource = (resource, { onSuccess: onSuccess = noop, onError: onError = noop } = {}) => { if (onSuccess !== noop || onError !== noop) { console.warn('onSuccess/onError callbacks are deprecated. Please use returned promise: https://github.com/dixieio/redux-json-api/issues/17'); } >>>>>>> export const updateResource = (resource) => { <<<<<<< dispatch(apiUpdated(json.data)); ======= dispatch(apiUpdated(json)); onSuccess(json); >>>>>>> dispatch(apiUpdated(json)); <<<<<<< export const deleteEntity = (entity) => { ======= export const deleteResource = (resource, { onSuccess: onSuccess = noop, onError: onError = noop } = {}) => { if (onSuccess !== noop || onError !== noop) { console.warn('onSuccess/onError callbacks are deprecated. Please use returned promise: https://github.com/dixieio/redux-json-api/issues/17'); } >>>>>>> export const deleteResource = (resource) => { <<<<<<< dispatch(apiDeleted(entity)); ======= dispatch(apiDeleted(resource)); onSuccess(); >>>>>>> dispatch(apiDeleted(resource)); <<<<<<< export const requireEntity = (entityType, endpoint = entityType) => { ======= export const requireResource = (resourceType, endpoint = resourceType, { onSuccess: onSuccess = noop, onError: onError = noop } = {}) => { if (onSuccess !== noop || onError !== noop) { console.warn('onSuccess/onError callbacks are deprecated. Please use returned promise: https://github.com/dixieio/redux-json-api/issues/17'); } >>>>>>> export const requireResource = (resourceType, endpoint = resourceType) => {