conflict_resolution
stringlengths
27
16k
<<<<<<< if (!this.get('isMoving')) { if (event.target !== this.get('currentDragEvent').target && hasSameSortingScope) { //if not dragging over self ======= if (!this.get('isMoving') && this.get('currentDragEvent')) { if (normalizedEvent.target !== this.get('currentDragEvent').target && hasSameSortingScope) { //if not dragging over self >>>>>>> if (!this.get('isMoving') && this.get('currentDragEvent')) { if (event.target !== this.get('currentDragEvent').target && hasSameSortingScope) { //if not dragging over self
<<<<<<< Msg_Req.REQ_FETCH_SHOP_INFO = 120400; //获取商店信息 Msg_Req.REQ_BUY_PRODUCT = 120401; //购买物品 Msg_Req.REQ_REFRESH_SHOP = 120402; //手动刷新商店 ======= Msg_Req.REQ_ADD_SKILL_LEVEL = 120305; //提高英雄技能等级 >>>>>>> Msg_Req.REQ_ADD_SKILL_LEVEL = 120305; //提高英雄技能等级 Msg_Req.REQ_FETCH_SHOP_INFO = 120400; //获取商店信息 Msg_Req.REQ_BUY_PRODUCT = 120401; //购买物品 Msg_Req.REQ_REFRESH_SHOP = 120402; //手动刷新商店 <<<<<<< Msg_Res.RES_FETCH_SHOP_INFO = 520400; //获取商店信息(返回) Msg_Res.RES_BUY_PRODUCT = 520401; //购买物品(返回) Msg_Res.RES_REFRESH_SHOP = 520402; //手动刷新商店(返回) ======= Msg_Res.RES_ADD_SKILL_LEVEL = 520305; //提高英雄技能等级(返回) >>>>>>> Msg_Res.RES_ADD_SKILL_LEVEL = 520305; //提高英雄技能等级(返回) Msg_Res.RES_FETCH_SHOP_INFO = 520400; //获取商店信息(返回) Msg_Res.RES_BUY_PRODUCT = 520401; //购买物品(返回) Msg_Res.RES_REFRESH_SHOP = 520402; //手动刷新商店(返回)
<<<<<<< date: new Date('2018-11-09'), changes: 'Added checklist and suggestions for WG with high initial overhealing.', contributors: [blazyb], }, { ======= date: new Date('2018-11-07'), changes: 'Added support for random LB blooms in Photosynthesis.', contributors: [blazyb], }, { >>>>>>> date: new Date('2018-11-09'), changes: 'Added checklist and suggestions for WG with high initial overhealing.', contributors: [blazyb], }, { date: new Date('2018-11-07'), changes: 'Added support for random LB blooms in Photosynthesis.', contributors: [blazyb], }, {
<<<<<<< readStreamToEnd(res, function(errorBody){ fire( ERROR_EVENT, statusCode, errorBody ); }); ======= emit( ERROR_EVENT, statusCode ); >>>>>>> readStreamToEnd(res, function(errorBody){ emit( ERROR_EVENT, statusCode, errorBody ); }); <<<<<<< fire( ERROR_EVENT, 0, '', e ); ======= emit( ERROR_EVENT, e ); >>>>>>> emit( ERROR_EVENT, 0, '', e ); <<<<<<< fire:varArgs(function ( eventId, parameters ) { ======= emit:function ( eventId, event ) { >>>>>>> emit:varArgs(function ( eventId, parameters ) { <<<<<<< fire(ERROR_EVENT, 0, '', e); ======= emit(ERROR_EVENT, e); >>>>>>> emit(ERROR_EVENT, 0, '', e); <<<<<<< fire(ERROR_EVENT, 0, '', Error('error in callbak', e)); ======= emit(ERROR_EVENT, e); >>>>>>> emit(ERROR_EVENT, 0, '', Error('error in callback' + e.message));
<<<<<<< generateFrontEnd('React'); console.log('Hit React switch!') ======= selectionConditions[react] = 'react'; obj.module.rules.push({ test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-react', '@babel/preset-env'], }, }, }); obj.resolve.extensions.push('.js', '.jsx'); obj.resolve.alias = { 'react-dom': '@hot-loader/react-dom' }; >>>>>>> generateFrontEnd('React'); console.log('Hit React switch!') selectionConditions[react] = 'react'; obj.module.rules.push({ test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-react', '@babel/preset-env'], }, }, }); obj.resolve.extensions.push('.js', '.jsx'); obj.resolve.alias = { 'react-dom': '@hot-loader/react-dom' }; <<<<<<< // // Question 2: backend // switch(answers['backend']) { // case 'Not now': // // logic // break; // case 'Express': // // logic // break; // default: // } ======= // Question 2: backend // switch (answers['backend']) { // case 'Not now': // // logic // break; // case 'Express': // obj.output = {path: path.resolve(__dirname, 'dist'), // filename: 'bundle.js'} // break; // default: // console.log('An error has occured with your selection, backend.'); // } >>>>>>> // // Question 2: backend // switch(answers['backend']) { // Question 2: backend // switch (answers['backend']) { // case 'Not now': // // logic // break; // case 'Express': // // logic // break; // default: // obj.output = {path: path.resolve(__dirname, 'dist'), // filename: 'bundle.js'} // break; // default: // console.log('An error has occured with your selection, backend.'); // }
<<<<<<< const markoController = require('./controllers/marko'); ======= const infernoController = require('./controllers/inferno'); >>>>>>> const markoController = require('./controllers/marko'); const infernoController = require('./controllers/inferno'); <<<<<<< router.get('/marko', markoController.home); ======= router.get('/inferno', infernoController.home); >>>>>>> router.get('/marko', markoController.home); router.get('/inferno', infernoController.home);
<<<<<<< const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('errorText'), false); ======= const SelectInputElement = wrapper.find('SelectInput'); assert.equal(SelectInputElement.prop('errorText'), undefined); >>>>>>> const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('errorText'), undefined); <<<<<<< const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('errorText'), false); ======= const SelectInputElement = wrapper.find('SelectInput'); assert.equal(SelectInputElement.prop('errorText'), undefined); >>>>>>> const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('errorText'), undefined); <<<<<<< const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('errorText'), 'Required field.'); ======= const SelectInputElement = wrapper.find('SelectInput'); assert.deepEqual(SelectInputElement.prop('meta'), { touched: true, error: 'Required field.' }); >>>>>>> const SelectInputElement = wrapper.find('getContext(SelectInput)'); assert.equal(SelectInputElement.prop('meta'), { touched: true, error: 'Required field.' });
<<<<<<< const server = require('./lib/server'); const publisher = require('./lib/publisher'); const constants = require('./lib/constants'); ======= const { createAWSExports, createAmplifyConfig } = require('./lib/frontend-config-creator'); const constants = require('./lib/constants'); >>>>>>> const server = require('./lib/server'); const publisher = require('./lib/publisher'); const constants = require('./lib/constants'); const { createAWSExports, createAmplifyConfig } = require('./lib/frontend-config-creator'); <<<<<<< publish, serve, onCategoryOutputsChange ======= createFrontendConfigs, >>>>>>> publish, serve, onCategoryOutputsChange, createFrontendConfigs,
<<<<<<< Type = require('../core').Type, Status = require('../core').Status, MessageList = require('../core').MessageList, Presence = require('../core').Presence, ======= Core = require('../core'), Type = Core.Type, Heartbeat = require('../core/lib/Heartbeat.js'), >>>>>>> Core = require('../core'), <<<<<<< ======= this.timer = new Heartbeat().interval(15000); >>>>>>> <<<<<<< setInterval(Audit.totals, 1 * 60 * 1000); // each minute ======= Server.prototype.handleMessage = function(name, data) { logging.debug('#redis_in', name, data); if (this.channels[name]) { try { data = JSON.parse(data); } catch(parseError) { logging.error('Corrupted key value [' + name + ']. ' + parseError.message + ': '+ parseError.stack); return; } >>>>>>> Server.prototype.handleMessage = function(name, data) { logging.debug('#redis_in', name, data); if (this.channels[name]) { try { data = JSON.parse(data); } catch(parseError) { logging.error('Corrupted key value [' + name + ']. ' + parseError.message + ': '+ parseError.stack); return; }
<<<<<<< } Presence.prototype = new Resource(); ======= // add parent callback this.parentCallback = function() { self._xserver.timeouts(); }; this.parent.timer.add( this.parentCallback ); }; >>>>>>> }; <<<<<<< var userClientMap = {}; Presence.prototype.setStatus = function(client, message, sendAck) { if(arguments.length == 1) { message = client; // client and sendAck are optional } ======= Presence.prototype.set = function(client, message) { >>>>>>> var userClientMap = {}; Presence.prototype.set = function(client, message, sendAck) { if(arguments.length == 1) { message = client; // client and sendAck are optional } <<<<<<< Presence.prototype.unsubscribe = function(client, sendAck) { var self = this; this._presenceManager.offline(userClientMap[client.id], client.id, /*userType*/undefined, /*data*/undefined, /*hard*/false); delete userClientMap[client.id]; Resource.prototype.unsubscribe.call(this, client, sendAck); ======= Presence.prototype.unsubscribe = function(client, message) { this._xserver.disconnectLocal(client.id); // garbage collect if the set of subscribers is empty if (Object.keys(this.subscribers).length == 1) { this.parent.timer.remove(this.parentCallback); } // call parent Resource.prototype.unsubscribe.call(this, client, message); >>>>>>> Presence.prototype.unsubscribe = function(client, message) { this._presenceManager.offline(userClientMap[client.id], client.id, /*userType*/undefined, /*data*/undefined, /*hard*/false); delete userClientMap[client.id]; Resource.prototype.unsubscribe.call(this, client, message); <<<<<<< // will be deprecated when syncs no longer need to use "online" to look like // regular messages client.send({ op: 'online', to: this.name, value: usersWithType }); } ======= }); this.subscribe(client, message); >>>>>>> // will be deprecated when syncs no longer need to use "online" to look like // regular messages client.send({ op: 'online', to: this.name, value: usersWithType }); } this.subscribe(client, message); <<<<<<< Presence.prototype.getStatus = function(client, message) { var users = this._presenceManager.getUsers(); if(message.options && message.options.version == 2) { client.send({ op: 'get', to: this.name, value: users }); } else { var usersWithType = {}; for(var userId in users) { usersWithType[userId] = users[userId].userType; ======= Presence.prototype.get = function(client, message) { var self = this; this.fullRead(function(online) { if(message.options && message.options.version == 2) { client.send({ op: 'get', to: self.name, value: self._xserver.getClientsOnline() }); } else { client.send({ op: 'get', to: self.name, value: online }); >>>>>>> Presence.prototype.get = function(client, message) { var users = this._presenceManager.getUsers(); if(message.options && message.options.version == 2) { client.send({ op: 'get', to: this.name, value: users }); } else { var usersWithType = {}; for(var userId in users) { usersWithType[userId] = users[userId].userType;
<<<<<<< export default ({ app, router, store, urlPath, redirect }) => { const cfg = getApolloClientConfig({ app, router, store, urlPath, redirect }); ======= export default async ({ app, router, store, urlPath, redirect }) => { >>>>>>> export default async ({ app, router, store, urlPath, redirect }) => { const cfg = getApolloClientConfig({ app, router, store, urlPath, redirect }); <<<<<<< const apolloClient = createApolloClient({ cfg, ======= const apolloClient = await createApolloClient({ >>>>>>> const apolloClient = createApolloClient({ cfg,
<<<<<<< var bogart = require('../lib/bogart') , Q = require("promised-io/lib/promise") , assert = require('assert') , path = require('path') , security = require("../lib/security"); ======= var bogart = require('../lib/bogart') , Q = require("promised-io/lib/promise") , assert = require('assert') , path = require('path') , fs = require('fs'); >>>>>>> var bogart = require('../lib/bogart') , Q = require("promised-io/lib/promise") , assert = require('assert') , path = require('path') , fs = require('fs'), , security = require("../lib/security"); <<<<<<< }; exports["test flash"] = function(beforeExit) { var app , headers = { 'content-type': 'text/plain' } , request = { headers: headers, body:[] } , foo; app = bogart.middleware.Flash({}, function(req) { req.flash("foo", "bar"); foo = req.flash("foo"); return { status: 200, body: [], } }); var initialResp = app(request); var cookieStr = initialResp.headers["Set-Cookie"].join("").replace(/;$/, ""); // the first attempt to retrieve "foo" should be undefined assert.isUndefined(foo); request.headers.cookie = cookieStr; var secondResp = app(request); beforeExit(function() { assert.eql(foo, "bar"); }); }; ======= }; exports["test error middleware has default response when error is thrown"] = function(beforeExit) { var response = null , app = new bogart.middleware.Error(function(req) { throw new Error('intentional'); }); Q.when(app({ method: 'GET', env: {}, headers: {}, pathInfo: '/' }), function(resp) { response = resp; }); beforeExit(function() { assert.isNotNull(response); assert.equal(500, response.status); assert.equal('text/html', response.headers['content-type']); }); }; exports["test error middleware has default response when promise is rejected"] = function(beforeExit) { var response = null , app = new bogart.middleware.Error(function(req) { return require('q').reject('rejected'); }); Q.when(app({ method: 'GET', env: {}, headers: {}, pathInfo: '/' }), function(resp) { response = resp; }); beforeExit(function() { assert.isNotNull(response); assert.equal(500, response.status); assert.equal('text/html', response.headers['content-type']); }); }; exports["test parted json"] = function(beforeExit) { var request = null , parted = new bogart.middleware.Parted(function(req) { request = req; return {}; }); response = parted({ method: 'POST', env: {}, headers: { 'content-type': 'application/json' }, body: [ '{ "hello": "world" }' ] }); beforeExit(function() { assert.isNotNull(request); assert.isNotNull(request.body); assert.equal('object', typeof request.body); assert.equal('world', request.body.hello); }); }; exports["test parted multipart"] = function(beforeExit) { var request = null , parted = new bogart.middleware.Parted(function(req) { request = req; return {}; }); fs.readFileSync(path.join(__dirname, 'fixtures', 'chrome.part')); response = parted(multipartRequest(100, 'chrome')); beforeExit(function() { assert.ok(!!request.body); assert.ok(!!request.body.content, 'No file path'); }); }; /** * Create a mock request * * Modified from the mock request method in Parted in compliance with the license. */ function multipartRequest(size, file) { file = path.join(__dirname, 'fixtures', file + '.part'); var stream = fs.createReadStream(file, { bufferSize: size }); var boundary = fs .readFileSync(file) .toString('utf8') .match(/--[^\r\n]+/)[0] .slice(2); return { headers: { 'content-type': 'multipart/form-data; boundary="' + boundary + '"' }, method: 'POST', env: {}, pipe: function(dest) { stream.pipe(dest); }, emit: function(ev, err) { if (ev === 'error') this.errback && this.errback(err); return this; }, on: function(ev, func) { if (ev === 'error') this.errback = func; return this; }, destroy: function() { stream.destroy(); return this; }, body: { forEach: function(fn) { var deferred = Q.defer(); stream.on('data', function(data) { fn(data); }); stream.on('end', function() { deferred.resolve(); }); return deferred.promise; } } }; }; >>>>>>> }; exports["test error middleware has default response when error is thrown"] = function(beforeExit) { var response = null , app = new bogart.middleware.Error(function(req) { throw new Error('intentional'); }); Q.when(app({ method: 'GET', env: {}, headers: {}, pathInfo: '/' }), function(resp) { response = resp; }); beforeExit(function() { assert.isNotNull(response); assert.equal(500, response.status); assert.equal('text/html', response.headers['content-type']); }); }; exports["test flash"] = function(beforeExit) { var app , headers = { 'content-type': 'text/plain' } , request = { headers: headers, body:[] } , foo; app = bogart.middleware.Flash({}, function(req) { req.flash("foo", "bar"); foo = req.flash("foo"); return { status: 200, body: [], } }); var initialResp = app(request); var cookieStr = initialResp.headers["Set-Cookie"].join("").replace(/;$/, ""); // the first attempt to retrieve "foo" should be undefined assert.isUndefined(foo); request.headers.cookie = cookieStr; var secondResp = app(request); beforeExit(function() { assert.eql(foo, "bar"); }); }; exports["test error middleware has default response when promise is rejected"] = function(beforeExit) { var response = null , app = new bogart.middleware.Error(function(req) { return require('q').reject('rejected'); }); Q.when(app({ method: 'GET', env: {}, headers: {}, pathInfo: '/' }), function(resp) { response = resp; }); beforeExit(function() { assert.isNotNull(response); assert.equal(500, response.status); assert.equal('text/html', response.headers['content-type']); }); }; exports["test parted json"] = function(beforeExit) { var request = null , parted = new bogart.middleware.Parted(function(req) { request = req; return {}; }); response = parted({ method: 'POST', env: {}, headers: { 'content-type': 'application/json' }, body: [ '{ "hello": "world" }' ] }); beforeExit(function() { assert.isNotNull(request); assert.isNotNull(request.body); assert.equal('object', typeof request.body); assert.equal('world', request.body.hello); }); }; exports["test parted multipart"] = function(beforeExit) { var request = null , parted = new bogart.middleware.Parted(function(req) { request = req; return {}; }); fs.readFileSync(path.join(__dirname, 'fixtures', 'chrome.part')); response = parted(multipartRequest(100, 'chrome')); beforeExit(function() { assert.ok(!!request.body); assert.ok(!!request.body.content, 'No file path'); }); }; /** * Create a mock request * * Modified from the mock request method in Parted in compliance with the license. */ function multipartRequest(size, file) { file = path.join(__dirname, 'fixtures', file + '.part'); var stream = fs.createReadStream(file, { bufferSize: size }); var boundary = fs .readFileSync(file) .toString('utf8') .match(/--[^\r\n]+/)[0] .slice(2); return { headers: { 'content-type': 'multipart/form-data; boundary="' + boundary + '"' }, method: 'POST', env: {}, pipe: function(dest) { stream.pipe(dest); }, emit: function(ev, err) { if (ev === 'error') this.errback && this.errback(err); return this; }, on: function(ev, func) { if (ev === 'error') this.errback = func; return this; }, destroy: function() { stream.destroy(); return this; }, body: { forEach: function(fn) { var deferred = Q.defer(); stream.on('data', function(data) { fn(data); }); stream.on('end', function() { deferred.resolve(); }); return deferred.promise; } } }; };
<<<<<<< settings.appendChild(await createSpeechSynthToggle()); try { settings.appendChild(await createTranslatorModeToggle()); } catch (e) { console.error("BAD BAD", e); } ======= if (!isAndroid) settings.appendChild(await createSpeechSynthToggle()); >>>>>>> if (!isAndroid) settings.appendChild(await createSpeechSynthToggle()); settings.appendChild(await createTranslatorModeToggle());
<<<<<<< export findLocalizedText from './find-localized-text'; export * from './locale-helpers'; export objectInvert from './object-invert'; export findPreservingIds from './find-preserving-ids'; export findUnusedSlug from './find-unused-slug'; export slugify from './slugify'; ======= export { default as objectInvert } from './object-invert'; export { default as findPreservingIds } from './find-preserving-ids'; export { default as findUnusedSlug } from './find-unused-slug'; export { default as slugify } from './slugify'; >>>>>>> export { default as findLocalizedText } from './find-localized-text'; export * from './locale-helpers'; export { default as objectInvert } from './object-invert'; export { default as findPreservingIds } from './find-preserving-ids'; export { default as findUnusedSlug } from './find-unused-slug'; export { default as slugify } from './slugify';
<<<<<<< * @param {String} method one of 'GET' 'POST' 'PUT' 'DELETE' * @param {String} contentSource the url to make a request to, or a stream to read from ======= * @param {String} method one of 'GET' 'POST' 'PUT' 'PATCH' 'DELETE' * @param {String} url the url to make a request to >>>>>>> * @param {String} method one of 'GET' 'POST' 'PUT' 'PATCH' 'DELETE' * @param {String} contentSource the url to make a request to, or a stream to read from
<<<<<<< }, ======= self.initVersion(); } , initVersion: function(){ var ret = {"v1":[{"version":"v1","text":"v1"}],"v2":[{"version":"v2","text":"v2"}]} >>>>>>> self.initVersion(); }, initVersion: function() { var ret = { "v1": [{ "version": "v1", "text": "v1" }], "v2": [{ "version": "v2", "text": "v2" }] } var options = []; for (var version in ret) { if (!ret.hasOwnProperty(version)) { continue; } var item = ret[version]; console.log(item) options.push('<optgroup label="' + version + '">'); if (ret[version].length > 0) { for (var i in item) { if (!item.hasOwnProperty(i)) { continue; } var row = item[i]; options.push('<option value="' + row.version + '" data-directory="' + row.text + '">' + row.version + '/' + ' (' + row.text + ')' + '</option>'); } } options.push('</optgroup>'); } $('#version').html(options.join('')).eq(0).prop('selected', true); }, //初始化action initApiUri: function(version = '') { self = this; $.get(Param.uri.readApi + "?version=" + version, function(ret) { //console.log( ret ) ; <<<<<<< initApiUri: function() { $.get(Param.uri.readApi, function(ret) { ======= initApiUri : function (version='') { self=this; $.get( Param.uri.readApi+"?version="+version , function ( ret ) { >>>>>>> initApiUri: function(version = '') { self = this; $.get(Param.uri.readApi + "?version=" + version, function(ret) { <<<<<<< $('#actions').html(options.join('')).eq(0).prop('selected', true); }); }, ======= $( '#actions' ).html( options.join( '' ) ).eq( 0 ).prop( 'selected' , true ); self.loadParams(); } ); } , >>>>>>> $('#actions').html(options.join('')).eq(0).prop('selected', true); self.loadParams(); }); }, <<<<<<< var $actions = $('#actions'); var $headerForm = $('#headerForm'); var $signatureStr = $('#signatureStr'); var $apiResponse = $('#apiResponse'); ======= var $actions = $( '#actions' ); var $headerForm = $( '#headerForm' ); var $signatureStr = $( '#signatureStr' ); var $apiResponse = $( '#apiResponse' ); var $version = $('#version'); >>>>>>> var $actions = $('#actions'); var $headerForm = $('#headerForm'); var $signatureStr = $('#signatureStr'); var $apiResponse = $('#apiResponse'); var $version = $('#version'); <<<<<<< }); ======= } ); $version.on('change' , function(){ var $version = $('#version'); >>>>>>> }); $version.on('change', function() { var $version = $('#version'); <<<<<<< $actions.on('change', function() { $('#selectActionBtn').trigger('click'); }); ======= $actions.on( 'change' , function () { self.config.method = ''; $( '#selectActionBtn' ).trigger( 'click' ); } ); >>>>>>> $actions.on('change', function() { self.config.method = ''; $('#selectActionBtn').trigger('click'); }); <<<<<<< var $actions = $('#actions'); var $signatureStr = $('#signatureStr'); var $apiResponse = $('#apiResponse'); ======= var $actions = $( '#actions' ); var $signatureStr = $( '#signatureStr' ); var $apiResponse = $( '#apiResponse' ); var $version = $('#version'); //version $ver = $version.find('option:selected').data( 'directory' ) >>>>>>> var $actions = $('#actions'); var $signatureStr = $('#signatureStr'); var $apiResponse = $('#apiResponse'); var $version = $('#version'); //version $ver = $version.find('option:selected').data('directory') <<<<<<< directory: self.config.directory, action: self.config.action, method: self.config.method ======= directory : self.config.directory , action : self.config.action , method : self.config.method, version : self.config.version >>>>>>> directory: self.config.directory, action: self.config.action, method: self.config.method, version: self.config.version <<<<<<< if ($token.length > 0) { ======= console.log($token); if ( $token.length > 0 ) { >>>>>>> console.log($token); if ($token.length > 0) { <<<<<<< for (var i = 0; i < Param.testToken.length; i++) { var user = Param.testToken[i]; html += '<option value="' + user.api_token + '">' + user.api_token + ' (' + user.nickname + ' - ' + user.phone + ' )' + '</option>'; ======= for ( var i = 0 ; i < Param.testToken.length ; i ++ ) { var user = Param.testToken[ i ]; html += '<option value="' + user.api_token + '">' + user.api_token + ' (' + user.username + ' - ' + user.phone + ' )' + '</option>'; >>>>>>> for (var i = 0; i < Param.testToken.length; i++) { var user = Param.testToken[i]; html += '<option value="' + user.api_token + '">' + user.api_token + ' (' + user.username + ' - ' + user.phone + ' )' + '</option>';
<<<<<<< ======= // non-modifying HTML parsing rules for cheerio var CHEERIO_OPTIONS = { normalizeWhitespace: false, xmlMode: false, decodeEntities: false }; var cheerioRenderOptions = cheerio.prototype.options; cheerioRenderOptions.decodeEntities = false; >>>>>>> <<<<<<< var styleEl = whacko('<style>' + content + '</style>'); ======= var styleDoc = cheerio.load('<style>' + content + '</style>', CHEERIO_OPTIONS); >>>>>>> var styleEl = whacko('<style>' + content + '</style>'); <<<<<<< ======= function readDocument(filename) { return cheerio.load(readFile(filename), CHEERIO_OPTIONS); } >>>>>>> <<<<<<< return $; ======= // NOTE: work-around dom-serializer // return $.html(); return render($._root.children, cheerioRenderOptions); >>>>>>> return $; <<<<<<< // remove import link var $$ = concat(path.resolve(options.outputDir, href)); if (!$$) { el.remove(); return; ======= var rel = href; var inputPath = path.dirname(options.input); if (constants.ABS_URL.test(rel)) { var abs = path.resolve(inputPath, path.join(options.abspath, rel)); rel = path.relative(options.outputDir, abs); } var importContent = concat(path.resolve(options.outputDir, rel)); // hide import content in the main document if (mainDoc) { importContent = '<div hidden>' + importContent + '</div>'; >>>>>>> var rel = href; var inputPath = path.dirname(options.input); if (constants.ABS_URL.test(rel)) { var abs = path.resolve(inputPath, path.join(options.abspath, rel)); rel = path.relative(options.outputDir, abs); } var $$ = concat(path.resolve(options.outputDir, rel)); if (!$$) { // remove import link el.remove(); return; <<<<<<< writeFileSync(options.output, $.html(), true); ======= var outhtml = render($._root.children, CHEERIO_OPTIONS); fs.writeFileSync(options.output, outhtml, 'utf8'); >>>>>>> writeFileSync(options.output, $.html(), true);
<<<<<<< $('.togglesmall').each(function(index, html) { var switchery = new Switchery(html, { size: 'small', color: '#59aa29', secondaryColor: '#c4c4c4' }); $(html).removeClass('togglesmall'); }); $('.toggle').each(function(index, html) { var switchery = new Switchery(html, { color: '#59aa29', secondaryColor: '#c4c4c4' }); $(html).removeClass('toggle'); }); $('.togglemedium').each(function(index, html) { var switchery = new Switchery(html, { className: 'switcherymid', color: '#59aa29', secondaryColor: '#c4c4c4' }); $(html).removeClass('togglemedium'); }); // loading tooltip jQuery(document).ready(function($) { $('cf_tip').each(function() { // Grab all ".cf_tip" elements, and for each... log(this); // ...print out "this", which now refers to each ".cf_tip" DOM element }); $('.cf_tip').each(function() { $(this).jBox('Tooltip', { content: $(this).children('.cf_tooltiptext'), delayOpen: 100, delayClose: 100, position: { x: 'right', y: 'center' }, outside: 'x' }); }); }); // Build link to in-use CF version documentation var documentationButton = $('div#content #button-documentation'); documentationButton.html("Documentation for "+CONFIG.flightControllerVersion); documentationButton.attr("href","https://github.com/cleanflight/cleanflight/tree/v{0}/docs".format(CONFIG.flightControllerVersion)); ======= >>>>>>>
<<<<<<< SENSOR_ALIGNMENT.align_gyro = parseInt(orientation_gyro_e.val()); SENSOR_ALIGNMENT.align_acc = parseInt(orientation_acc_e.val()); SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val()); ======= // track feature usage if (isFeatureEnabled('RX_SERIAL')) { googleAnalytics.sendEvent('Setting', 'SerialRxProvider', serialRXtypes[BF_CONFIG.serialrx_type]); } for (var i = 0; i < features.length; i++) { var featureName = features[i].name; if (isFeatureEnabled(featureName)) { googleAnalytics.sendEvent('Setting', 'Feature', featureName); } } >>>>>>> SENSOR_ALIGNMENT.align_gyro = parseInt(orientation_gyro_e.val()); SENSOR_ALIGNMENT.align_acc = parseInt(orientation_acc_e.val()); SENSOR_ALIGNMENT.align_mag = parseInt(orientation_mag_e.val()); // track feature usage if (isFeatureEnabled('RX_SERIAL')) { googleAnalytics.sendEvent('Setting', 'SerialRxProvider', serialRXtypes[BF_CONFIG.serialrx_type]); } for (var i = 0; i < features.length; i++) { var featureName = features[i].name; if (isFeatureEnabled(featureName)) { googleAnalytics.sendEvent('Setting', 'Feature', featureName); } }
<<<<<<< case MSP_codes.MSP_SET_3D: console.log('3D settings saved'); break; case MSP_codes.MSP_SET_SENSOR_ALIGNMENT: console.log('Sensor alignment saved'); break; ======= case MSP_codes.MSP_SET_RX_CONFIG: console.log('Rx config saved'); break; case MSP_codes.MSP_SET_RXFAIL_CONFIG: console.log('Rxfail config saved'); break; case MSP_codes.MSP_SET_FAILSAFE_CONFIG: console.log('Failsafe config saved'); break; >>>>>>> case MSP_codes.MSP_SET_3D: console.log('3D settings saved'); break; case MSP_codes.MSP_SET_SENSOR_ALIGNMENT: console.log('Sensor alignment saved'); break; case MSP_codes.MSP_SET_RX_CONFIG: console.log('Rx config saved'); break; case MSP_codes.MSP_SET_RXFAIL_CONFIG: console.log('Rxfail config saved'); break; case MSP_codes.MSP_SET_FAILSAFE_CONFIG: console.log('Failsafe config saved'); break;
<<<<<<< // TODO: Check if this needs to be Buffer or not. const body = Buffer.from(arrayBuffer); if (!filePath) dicomDB.attachment.insert( couchDoc._id, 'object.dcm', body, 'application/dicom', { rev: data.rev }, attachmentErr => { if (attachmentErr) { reject(attachmentErr); } ======= >>>>>>> if (!filePath) dicomDB.attachment.insert( couchDoc._id, 'object.dcm', body, 'application/dicom', { rev: data.rev }, attachmentErr => { if (attachmentErr) { reject(attachmentErr); }
<<<<<<< assert.ok(util.inspect(x).indexOf('inspect') != -1); // util.inspect.styles and util.inspect.colors function test_color_style(style, input, implicit) { var color_name = util.inspect.styles[style]; var color = ['', '']; if(util.inspect.colors[color_name]) color = util.inspect.colors[color_name]; var without_color = util.inspect(input, false, 0, false); var with_color = util.inspect(input, false, 0, true); var expect = '\u001b[' + color[0] + 'm' + without_color + '\u001b[' + color[1] + 'm'; assert.equal(with_color, expect, 'util.inspect color for style '+style); } test_color_style('special', function(){}); test_color_style('number', 123.456); test_color_style('boolean', true); test_color_style('undefined', undefined); test_color_style('null', null); test_color_style('string', 'test string'); test_color_style('date', new Date); test_color_style('regexp', /regexp/); ======= assert.ok(util.inspect(x).indexOf('inspect') != -1); // an object with "hasOwnProperty" overwritten should not throw assert.doesNotThrow(function() { util.inspect({ hasOwnProperty: null }); }); >>>>>>> assert.ok(util.inspect(x).indexOf('inspect') != -1); // util.inspect.styles and util.inspect.colors function test_color_style(style, input, implicit) { var color_name = util.inspect.styles[style]; var color = ['', '']; if(util.inspect.colors[color_name]) color = util.inspect.colors[color_name]; var without_color = util.inspect(input, false, 0, false); var with_color = util.inspect(input, false, 0, true); var expect = '\u001b[' + color[0] + 'm' + without_color + '\u001b[' + color[1] + 'm'; assert.equal(with_color, expect, 'util.inspect color for style '+style); } test_color_style('special', function(){}); test_color_style('number', 123.456); test_color_style('boolean', true); test_color_style('undefined', undefined); test_color_style('null', null); test_color_style('string', 'test string'); test_color_style('date', new Date); test_color_style('regexp', /regexp/); // an object with "hasOwnProperty" overwritten should not throw assert.doesNotThrow(function() { util.inspect({ hasOwnProperty: null }); });
<<<<<<< if (startup.lazyConstants()[sig]) { err = process._kill(pid, startup.lazyConstants()[sig]); ======= if (startup.lazyConstants()[sig] && sig.slice(0, 3) === 'SIG') { r = process._kill(pid, startup.lazyConstants()[sig]); >>>>>>> if (startup.lazyConstants()[sig] && sig.slice(0, 3) === 'SIG') { err = process._kill(pid, startup.lazyConstants()[sig]);
<<<<<<< return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) >>> 0); }; ======= return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]); }; >>>>>>> return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]); }; <<<<<<< ======= return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]); }; Buffer.prototype.readFloatLE = function(offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); return this.parent.readFloatLE(this.offset + offset, !!noAssert); }; >>>>>>> <<<<<<< this[offset] = value; this[offset + 1] = (value >>> 8); return offset + 2; ======= this[offset] = value; this[offset + 1] = (value >>> 8); >>>>>>> this[offset] = value; this[offset + 1] = (value >>> 8); return offset + 2; <<<<<<< this[offset] = (value >>> 8); this[offset + 1] = value; return offset + 2; ======= this[offset] = (value >>> 8); this[offset + 1] = value; >>>>>>> this[offset] = (value >>> 8); this[offset + 1] = value; return offset + 2; <<<<<<< this[offset + 3] = (value >>> 24); this[offset + 2] = (value >>> 16); this[offset + 1] = (value >>> 8); this[offset] = value; return offset + 4; ======= this[offset + 3] = (value >>> 24); this[offset + 2] = (value >>> 16); this[offset + 1] = (value >>> 8); this[offset] = value; >>>>>>> this[offset + 3] = (value >>> 24); this[offset + 2] = (value >>> 16); this[offset + 1] = (value >>> 8); this[offset] = value; return offset + 4; <<<<<<< this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; return offset + 4; ======= this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; >>>>>>> this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; return offset + 4; <<<<<<< this[offset] = value; this[offset + 1] = (value >>> 8); return offset + 2; ======= this[offset] = value; this[offset + 1] = (value >>> 8); >>>>>>> this[offset] = value; this[offset + 1] = (value >>> 8); return offset + 2; <<<<<<< this[offset] = (value >>> 8); this[offset + 1] = value; return offset + 2; ======= this[offset] = (value >>> 8); this[offset + 1] = value; >>>>>>> this[offset] = (value >>> 8); this[offset + 1] = value; return offset + 2; <<<<<<< this[offset] = value; this[offset + 1] = (value >>> 8); this[offset + 2] = (value >>> 16); this[offset + 3] = (value >>> 24); return offset + 4; ======= this[offset] = value; this[offset + 1] = (value >>> 8); this[offset + 2] = (value >>> 16); this[offset + 3] = (value >>> 24); >>>>>>> this[offset] = value; this[offset + 1] = (value >>> 8); this[offset + 2] = (value >>> 16); this[offset + 3] = (value >>> 24); return offset + 4; <<<<<<< this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; return offset + 4; ======= this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; }; Buffer.prototype.writeFloatLE = function(value, offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); this.parent.writeFloatLE(value, this.offset + offset, !!noAssert); }; Buffer.prototype.writeFloatBE = function(value, offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length); this.parent.writeFloatBE(value, this.offset + offset, !!noAssert); }; Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length); this.parent.writeDoubleLE(value, this.offset + offset, !!noAssert); }; Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length); this.parent.writeDoubleBE(value, this.offset + offset, !!noAssert); >>>>>>> this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = value; return offset + 4;
<<<<<<< // Load module if ('/\\'.indexOf(process.argv[1].charAt(0)) < 0 && process.argv[1].charAt(1) != ':' && !(/^http:\/\//).exec(process.argv[1])) { process.argv[1] = path.join(cwd, process.argv[1]); ======= if (process.argv[1] == 'debug') { // Start the debugger agent var d = requireNative('_debugger'); d.start(); } else { // Load module if (process.argv[1].charAt(0) != '/' && !(/^http:\/\//).exec(process.argv[1])) { process.argv[1] = path.join(cwd, process.argv[1]); } // REMOVEME: nextTick should not be necessary. This hack to get // test/simple/test-exception-handler2.js working. process.nextTick(module.runMain); >>>>>>> if (process.argv[1] == 'debug') { // Start the debugger agent var d = requireNative('_debugger'); d.start(); } else { // Load module if ('/\\'.indexOf(process.argv[1].charAt(0)) < 0 && process.argv[1].charAt(1) != ':' && !(/^http:\/\//).exec(process.argv[1])) { process.argv[1] = path.join(cwd, process.argv[1]); } // REMOVEME: nextTick should not be necessary. This hack to get // test/simple/test-exception-handler2.js working. process.nextTick(module.runMain);
<<<<<<< import { Animated, Dimensions, Platform, Share } from 'react-native'; ======= import { Animated, Dimensions, Share, BackAndroid } from 'react-native'; >>>>>>> import { Animated, Dimensions, Platform, Share, BackAndroid } from 'react-native';
<<<<<<< sendTextMessage: function(dialog, text) { ActorClient.sendTextMessage(dialog.peer.peer, text); ======= setMessageShown: function(peer, message) { ActorClient.onMessageShown(peer, message); }, sendMessageText: function(dialog, text) { ActorClient.sendMessageText(dialog.peer.peer, text); >>>>>>> setMessageShown: function(peer, message) { ActorClient.onMessageShown(peer, message); }, sendTextMessage: function(dialog, text) { ActorClient.sendTextMessage(dialog.peer.peer, text);
<<<<<<< "twisted again by": "ретвіст від", ======= "Twistday Reminder": "Twistday Reminder", "Show upcoming in near future": "Show upcoming in near future", "Who's celebrating Twistday": "Who's celebrating Twistday", "Today's luckies:": "Today's luckies:", "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", >>>>>>> "Twistday Reminder": "Twistday Reminder", "Show upcoming in near future": "Show upcoming in near future", "Who's celebrating Twistday": "Who's celebrating Twistday", "Today's luckies:": "Today's luckies:", "Upcoming ones:": "Upcoming ones:", "twisted again by": "ретвіст від",
<<<<<<< ======= const npm = require('./npm.js') const chromeWebStore = require('./chrome-web-store.js') >>>>>>> <<<<<<< 'crates': require('./crates.js'), 'npm': require('./npm.js') ======= npm, 'chrome-web-store': chromeWebStore, >>>>>>> 'chrome-web-store': require('./chrome-web-store.js'), 'crates': require('./crates.js'), 'npm': require('./npm.js')
<<<<<<< id: "validate-pano-marker", ======= markerContainer: controlLayer, >>>>>>> id: "validate-pano-marker", markerContainer: controlLayer, <<<<<<< currentLabel.setProperty('startTimestamp', new Date().getTime()); setPanorama(label.getAuditProperty('gsvPanoramaId'), label.getAuditProperty('heading'), label.getAuditProperty('pitch'), label.getAuditProperty('zoom')); ======= currentLabel.setProperty('startTimestamp', new Date().getTime()); svv.statusField.updateLabelText(currentLabel.getAuditProperty('labelType')); svv.statusExample.updateLabelImage(currentLabel.getAuditProperty('labelType')); setPanorama(label.getAuditProperty('gsvPanoramaId'), label.getAuditProperty('heading'), label.getAuditProperty('pitch'), label.getAuditProperty('zoom')); >>>>>>> currentLabel.setProperty('startTimestamp', new Date().getTime()); svv.statusField.updateLabelText(currentLabel.getAuditProperty('labelType')); svv.statusExample.updateLabelImage(currentLabel.getAuditProperty('labelType')); setPanorama(label.getAuditProperty('gsvPanoramaId'), label.getAuditProperty('heading'), label.getAuditProperty('pitch'), label.getAuditProperty('zoom'));
<<<<<<< let getSessionInterval = null; let getTransactionStatusInterval = null; export const walletConnectModalInit = () => async (dispatch, getState) => { // Q: dapp name const webConnector = new WebConnector("https://walletconnect.balance.io", { "dappName": "Balance Manager" }); dispatch({ type: WALLET_CONNECT_NEW_SESSION_REQUEST }); webConnector.createSession() .then(({ session }) => { ======= export const walletConnectInit = () => async (dispatch, getState) => { const keypair = await generateKeyPair(); dispatch({ type: WALLET_CONNECT_SEND_TOKEN_REQUEST, payload: keypair }); apiWalletConnectInit() .then(({ data }) => { const sessionToken = data ? data.sessionToken : ''; >>>>>>> let getSessionInterval = null; let getTransactionStatusInterval = null; export const walletConnectInit = () => async (dispatch, getState) => { // Q: dapp name const webConnector = new WebConnector("https://walletconnect.balance.io", { "dappName": "Balance Manager" }); dispatch({ type: WALLET_CONNECT_NEW_SESSION_REQUEST }); webConnector.createSession() .then(({ session }) => {
<<<<<<< function updateMissionProgress() { let labelsProgress = getProperty("labelsProgress"); ======= function updateMissionProgress(skip) { var labelsProgress = getProperty("labelsProgress"); >>>>>>> function updateMissionProgress(skip) { let labelsProgress = getProperty("labelsProgress");
<<<<<<< '</tr>'+ '<tr>'+ '<th>Time Submitted</th>'+ '<td id="timestamp" colspan="3"></td>'+ '</tr>'+ '<tr>'+ '<th>Label ID</th>'+ '<td id="label-id" colspan="3"></td>'+ '</tr>'+ '</table>'+ '</div>'+ '</div>'+ ======= '</tr>'+ '<tr>'+ '<th>Validations</th>'+ '<td colspan="3" id="label-validations"></td>'+ '</tr>'+ '<tr>'+ '<th>Time Submitted</th>'+ '<td id="timestamp" colspan="3"></td>'+ '</tr>'+ '<th>Image Date</th>'+ '<td id="image-date" colspan="3"></td>'+ ' </tr>'; if (self.admin) { modalText += '<tr>'+ '<th>Task ID</th>' + '<td id="task"></td>' + '</tr>'+ '</table>'+ '</div>'+ '</div>'+ '</div>'+ '</div>' } else { modalText += '</table>'+ '</div>'+ '</div>'+ >>>>>>> '</tr>'+ '<tr>'+ '<th>Validations</th>'+ '<td colspan="3" id="label-validations"></td>'+ '</tr>'+ '<tr>'+ '<th>Time Submitted</th>'+ '<td id="timestamp" colspan="3"></td>'+ '</tr>'+ '<th>Image Date</th>'+ '<td id="image-date" colspan="3"></td>'+ ' </tr>'; if (self.admin) { modalText += '<tr>'+ '<th>Label ID</th>'+ '<td id="label-id" colspan="3"></td>'+ '</tr>'+ '<tr>'+ '<th>Task ID</th>' + '<td id="task"></td>' + '</tr>'+ '</table>'+ '</div>'+ '</div>'+ '</div>'+ '</div>' } else { modalText += '</table>'+ '</div>'+ '</div>'+ <<<<<<< self.modalLabelId.html(labelMetadata['label_id']); self.modalTask.html("<a href='/admin/task/"+labelMetadata['audit_task_id']+"'>"+ labelMetadata['audit_task_id']+"</a> by <a href='/admin/user/" + labelMetadata['username'] + "'>" + labelMetadata['username'] + "</a>"); ======= self.modalValidations.html(validationsText); self.modalImageDate.html(imageDate.format('MMMM YYYY')); if (self.admin) { self.modalTask.html("<a href='/admin/task/"+labelMetadata['audit_task_id']+"'>"+ labelMetadata['audit_task_id']+"</a> by <a href='/admin/user/" + labelMetadata['username'] + "'>" + labelMetadata['username'] + "</a>"); } >>>>>>> self.modalValidations.html(validationsText); self.modalImageDate.html(imageDate.format('MMMM YYYY')); if (self.admin) { self.modalLabelId.html(labelMetadata['label_id']); self.modalTask.html("<a href='/admin/task/"+labelMetadata['audit_task_id']+"'>"+ labelMetadata['audit_task_id']+"</a> by <a href='/admin/user/" + labelMetadata['username'] + "'>" + labelMetadata['username'] + "</a>"); }
<<<<<<< var coll = {"type":"FeatureCollection", "features":[ {"type":"Feature","geometry":{"type":"LineString", "coordinates":[ [-77.041402,38.8764389], [-77.059005,38.8864323], [-77.063005,38.8864250], [-77.063005,38.8964180], [-77.069005,38.8964180] ]},"properties":{"name":"line0"}}, {"type":"Feature","geometry":{"type":"LineString", "coordinates":[ [-77.069005,38.9164120], [-77.075005,38.9164120], [-77.075005,38.9364080], [-77.092005,38.9564080] ]}}] }; function lsToPoint(coll){ var coorList = coll.features[0].geometry.coordinates; var featureList = []; var len = coorList.length; for(i = 0; i < len; i ++){ var feature = turf.point(coorList[i]); featureList.push(feature); } var geoJSON = { "type": "FeatureCollection", "features": featureList }; return geoJSON; } function _animateMissionTasks(){ // http://zevross.com/blog/2014/09/30/use-the-amazing-d3-library-to-animate-a-path-on-a-leaflet-map/ // using d3 on leaflet var collection = lsToPoint(coll); var featuresdata = collection.features; svg = d3.select(map.getPanes().overlayPane).append("svg"), g = svg.append("g").attr("class", "leaflet-zoom-hide"); var transform = d3.geo.transform({ point: projectPoint }); var d3path = d3.geo.path().projection(transform); var toLine = d3.svg.line() .interpolate("linear") .x(function(d) { return applyLatLngToLayer(d).x; }) .y(function(d) { return applyLatLngToLayer(d).y; }); var ptFeatures = g.selectAll("circle") .data(featuresdata) .enter() .append("circle") .attr("r", 3) .attr("class", "waypoints"); var linePath = g.selectAll(".lineConnect") .data([featuresdata]) .enter() .append("path") .attr("class", "lineConnect"); var marker = g.append("circle") .attr("r", 10) .attr("id", "marker") .attr("class", "travelMarker"); var originANDdestination = [featuresdata[0], featuresdata[featuresdata.length-1]]; var begend = g.selectAll(".drinks") .data(originANDdestination) .enter() .append("circle", ".drinks") .attr("r", 5) .style("fill", "red") .style("opacity", "1"); map.on("viewreset", reset); reset(); transition(); // Reposition the SVG to cover the features. function reset() { var bounds = d3path.bounds(collection), topLeft = bounds[0], bottomRight = bounds[1]; // for the points we need to convert from latlong // to map units begend.attr("transform", function(d) { return "translate(" + applyLatLngToLayer(d).x + "," + applyLatLngToLayer(d).y + ")"; }); ptFeatures.attr("transform", function(d) { return "translate(" + applyLatLngToLayer(d).x + "," + applyLatLngToLayer(d).y + ")"; }); // again, not best practice, but I'm harding coding // the starting point marker.attr("transform", function() { var y = featuresdata[0].geometry.coordinates[1]; var x = featuresdata[0].geometry.coordinates[0]; return "translate(" + map.latLngToLayerPoint(new L.LatLng(y, x)).x + "," + map.latLngToLayerPoint(new L.LatLng(y, x)).y + ")"; }); // Setting the size and location of the overall SVG container svg.attr("width", bottomRight[0] - topLeft[0] + 120) .attr("height", bottomRight[1] - topLeft[1] + 120) .style("left", topLeft[0] - 50 + "px") .style("top", topLeft[1] - 50 + "px"); // linePath.attr("d", d3path); linePath.attr("d", toLine); // ptPath.attr("d", d3path); g.attr("transform", "translate(" + (-topLeft[0] + 50) + "," + (-topLeft[1] + 50) + ")"); } // end reset function transition() { linePath.transition() .duration(7500) .attrTween("stroke-dasharray", tweenDash) .style("opacity", "1") .each("end", function() { //d3.select(this).call(transition);// infinite loop }); } //end transition // this function feeds the attrTween operator above with the // stroke and dash lengths function tweenDash() { return function(t) { //total length of path (single value) var l = linePath.node().getTotalLength(); interpolate = d3.interpolateString("0," + l, l + "," + l); //t is fraction of time 0-1 since transition began var marker = d3.select("#marker"); var p = linePath.node().getPointAtLength(t * l); //Move the marker to that point marker.attr("transform", "translate(" + p.x + "," + p.y + ")"); //move marker return interpolate(t); } } //end tweenDash function projectPoint(x, y) { var point = map.latLngToLayerPoint(new L.LatLng(y, x)); this.stream.point(point.x, point.y); } function applyLatLngToLayer(d) { var y = d.geometry.coordinates[1]; var x = d.geometry.coordinates[0]; return map.latLngToLayerPoint(new L.LatLng(y, x)); } } ======= /** * This method takes tasks that has been completed in the current mission and *all* the tasks completed in the * current neighborhood so far. * WARNING: `completedTasks` include tasks completed in the current mission too. * WARNING2: The current tasks are not included in neither of `missionTasks` and `completedTasks` * * @param missionTasks * @param completedTasks * @private */ >>>>>>> /** * This method takes tasks that has been completed in the current mission and *all* the tasks completed in the * current neighborhood so far. * WARNING: `completedTasks` include tasks completed in the current mission too. * WARNING2: The current tasks are not included in neither of `missionTasks` and `completedTasks` * * @param missionTasks * @param completedTasks * @private */ <<<<<<< ======= >>>>>>>
<<<<<<< import { web3WebSocketPendingTxs, web3SetHttpProvider, web3SetWebSocketProvider } from '../helpers/web3'; import { warningOffline, warningOnline } from './_warning'; ======= import { web3SetProvider } from '../helpers/web3'; >>>>>>> import { web3SetHttpProvider, web3SetWebSocketProvider } from '../helpers/web3'; <<<<<<< export const accountUpdateAccountTransactions = data => (dispatch, getState) => { const { account, web3Network } = getState().account; dispatch({ type: ACCOUNT_GET_ACCOUNT_TRANSACTIONS_REQUEST }); apiGetEtherscanAccountTransactions(account.address, web3Network) .then(transactions => { dispatch({ type: ACCOUNT_GET_ACCOUNT_TRANSACTIONS_SUCCESS, payload: transactions }); dispatch(accountGetNativePrices()); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch({ type: ACCOUNT_GET_ACCOUNT_TRANSACTIONS_FAILURE }); }); }; export const accountSubscribeTxWebSocket = () => (dispatch, getState) => { const address = getState().account.accountAddress; web3WebSocketPendingTxs() .then(tx => { const parsedTx = parseWebsocketTransaction(tx, address); console.log(parsedTx); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch(accountSubscribeTxWebSocket()); }); }; export const accountUpdateMetamaskAccount = () => (dispatch, getState) => { if (window.web3.eth.defaultAccount !== getState().account.accountAddress) { const accountAddress = window.web3.eth.defaultAccount; dispatch(modalClose()); dispatch({ type: ACCOUNT_UPDATE_METAMASK_ACCOUNT, payload: accountAddress }); if (accountAddress) dispatch(accountGetAccountBalances(accountAddress, 'METAMASK')); } }; export const accountCheckNetworkIsConnected = online => dispatch => { if (online) { dispatch(warningOnline()); } else { dispatch(warningOffline()); } dispatch({ type: ACCOUNT_CHECK_NETWORK_IS_CONNECTED, payload: online }); }; export const accountConnectMetamask = () => (dispatch, getState) => { dispatch({ type: ACCOUNT_METAMASK_GET_NETWORK_REQUEST }); if (typeof window.web3 !== 'undefined') { apiGetMetamaskNetwork() .then(network => { web3SetHttpProvider(`https://${network}.infura.io/`); if (ethereumNetworks[network].WebSocket) { web3SetWebSocketProvider(`wss://${network}.infura.io/ws`); } dispatch({ type: ACCOUNT_METAMASK_GET_NETWORK_SUCCESS, payload: network }); dispatch(accountUpdateMetamaskAccount()); accountInterval = setInterval(() => dispatch(accountUpdateMetamaskAccount()), 100); }) .catch(err => dispatch({ type: ACCOUNT_METAMASK_GET_NETWORK_FAILURE })); } else { dispatch({ type: ACCOUNT_METAMASK_NOT_AVAILABLE }); } }; export const accountUpdateWalletConnect = accountAddress => dispatch => { web3SetHttpProvider(`https://mainnet.infura.io/`); web3SetWebSocketProvider(`wss://mainnet.infura.io/ws`); dispatch({ type: ACCOUNT_CONNECT_WALLET_REQUEST, payload: accountAddress }); if (accountAddress) dispatch(accountGetAccountBalances(accountAddress, 'WalletConnect')); ======= export const accountUpdateWeb3Network = network => dispatch => { web3SetProvider(`https://${network}.infura.io/`); dispatch({ type: ACCOUNT_UPDATE_WEB3_NETWORK, payload: network }); >>>>>>> export const accountUpdateWeb3Network = network => dispatch => { web3SetHttpProvider(`https://${network}.infura.io/`); web3SetWebSocketProvider(`wss://${network}.infura.io/ws`); dispatch({ type: ACCOUNT_UPDATE_WEB3_NETWORK, payload: network }); <<<<<<< fetchingNativePrices: false, fetching: false, error: false ======= fetching: false >>>>>>> fetching: false
<<<<<<< apiShapeshiftGetQuotedPrice, apiGetGasPrices ======= apiShapeshiftGetMarketInfo, apiGetGasPrices, >>>>>>> apiShapeshiftGetQuotedPrice, apiGetGasPrices, <<<<<<< ======= const EXCHANGE_GET_MARKET_INFO_REQUEST = 'exchange/EXCHANGE_GET_MARKET_INFO_REQUEST'; const EXCHANGE_GET_MARKET_INFO_SUCCESS = 'exchange/EXCHANGE_GET_MARKET_INFO_SUCCESS'; const EXCHANGE_GET_MARKET_INFO_FAILURE = 'exchange/EXCHANGE_GET_MARKET_INFO_FAILURE'; >>>>>>> <<<<<<< const EXCHANGE_UPDATE_DEPOSIT_SELECTED = 'exchange/EXCHANGE_UPDATE_DEPOSIT_SELECTED'; const EXCHANGE_UPDATE_WITHDRAWAL_SELECTED = 'exchange/EXCHANGE_UPDATE_WITHDRAWAL_SELECTED'; ======= const EXCHANGE_UPDATE_ASSET_AMOUNT = 'exchange/EXCHANGE_UPDATE_ASSET_AMOUNT'; const EXCHANGE_UPDATE_DEPOSIT_SELECTED = 'exchange/EXCHANGE_UPDATE_DEPOSIT_SELECTED'; const EXCHANGE_UPDATE_WITHDRAWAL_SELECTED = 'exchange/EXCHANGE_UPDATE_WITHDRAWAL_SELECTED'; >>>>>>> const EXCHANGE_UPDATE_DEPOSIT_SELECTED = 'exchange/EXCHANGE_UPDATE_DEPOSIT_SELECTED'; const EXCHANGE_UPDATE_WITHDRAWAL_SELECTED = 'exchange/EXCHANGE_UPDATE_WITHDRAWAL_SELECTED'; <<<<<<< let getRateTimeout = null; ======= export const exchangeUpdateExchangeRate = () => (dispatch, getState) => { const { depositSelected, withdrawalSelected, depositAmount, } = getState().exchange; dispatch({ type: EXCHANGE_GET_MARKET_INFO_REQUEST }); apiShapeshiftGetMarketInfo(depositSelected.symbol, withdrawalSelected.symbol) .then(({ data }) => { const exchangeDetails = data[Object.keys(data)[0]]; dispatch({ type: EXCHANGE_GET_MARKET_INFO_SUCCESS, payload: exchangeDetails, }); dispatch(exchangeUpdateDepositAmount(depositAmount)); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch({ type: EXCHANGE_GET_MARKET_INFO_FAILURE }); }); }; >>>>>>> let getRateTimeout = null; <<<<<<< ======= export const exchangeModalInit = () => (dispatch, getState) => { const { accountAddress, accountInfo } = getState().account; const depositSelected = accountInfo.assets.filter( asset => asset.symbol === 'ETH', )[0]; dispatch({ type: EXCHANGE_GET_AVAILABLE_REQUEST, payload: { address: accountAddress, depositSelected }, }); apiShapeshiftGetCurrencies() .then(({ data }) => { const withdrawalAssets = data; const availableSymbols = withdrawalAssets.map( availableAsset => availableAsset.symbol, ); const depositAssets = accountInfo.assets.filter( asset => availableSymbols.indexOf(asset.symbol) !== -1, ); dispatch({ type: EXCHANGE_GET_AVAILABLE_SUCCESS, payload: { withdrawalAssets, depositAssets, withdrawalSelected: withdrawalAssets[1], }, }); dispatch(exchangeGetGasPrices()); dispatch(exchangeUpdateExchangeRate()); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch({ type: EXCHANGE_GET_AVAILABLE_FAILURE }); }); }; >>>>>>> <<<<<<< export const exchangeUpdateWithdrawalSelected = value => (dispatch, getState) => { const { withdrawalAssets, depositAssets, depositAmount } = getState().exchange; ======= export const exchangeUpdateWithdrawalSelected = value => ( dispatch, getState, ) => { const { withdrawalAssets, depositAssets } = getState().exchange; >>>>>>> export const exchangeUpdateWithdrawalSelected = value => ( dispatch, getState, ) => { const { withdrawalAssets, depositAssets, depositAmount, } = getState().exchange; <<<<<<< export const exchangeUpdateDepositAmount = (depositAmount = '', noTimeout = false) => ( dispatch, getState ) => { let { withdrawalAmount, depositSelected, withdrawalSelected } = getState().exchange; ======= export const exchangeToggleConfirmationView = boolean => ( dispatch, getState, ) => { let confirm = boolean; if (!confirm) { confirm = !getState().exchange.confirm; } dispatch({ type: EXCHANGE_TOGGLE_CONFIRMATION_VIEW, payload: confirm }); }; export const exchangeUpdateDepositAmount = depositAmount => ( dispatch, getState, ) => { let { withdrawalAmount } = getState().exchange; const { exchangeDetails } = getState().exchange; >>>>>>> export const exchangeUpdateDepositAmount = ( depositAmount = '', noTimeout = false, ) => (dispatch, getState) => { let { withdrawalAmount, depositSelected, withdrawalSelected, } = getState().exchange; <<<<<<< if (!depositAmount) { ======= if (depositAmount) { withdrawalAmount = subtract( multiply(depositAmount, exchangeDetails.rate), exchangeDetails.minerFee, ); withdrawalAmount = formatInputDecimals(withdrawalAmount, depositAmount); } else { >>>>>>> if (!depositAmount) { <<<<<<< type: EXCHANGE_UPDATE_DEPOSIT_AMOUNT_REQUEST, payload: { depositAmount, withdrawalAmount } ======= type: EXCHANGE_UPDATE_ASSET_AMOUNT, payload: { depositAmount, withdrawalAmount }, >>>>>>> type: EXCHANGE_UPDATE_DEPOSIT_AMOUNT_REQUEST, payload: { depositAmount, withdrawalAmount }, <<<<<<< export const exchangeUpdateWithdrawalAmount = (withdrawalAmount = '', noTimeout = false) => ( dispatch, getState ) => { let { depositAmount, depositSelected, withdrawalSelected } = getState().exchange; ======= export const exchangeUpdateWithdrawalAmount = withdrawalAmount => ( dispatch, getState, ) => { let { depositAmount } = getState().exchange; const { exchangeDetails } = getState().exchange; >>>>>>> export const exchangeUpdateWithdrawalAmount = ( withdrawalAmount = '', noTimeout = false, ) => (dispatch, getState) => { let { depositAmount, depositSelected, withdrawalSelected, } = getState().exchange; <<<<<<< type: EXCHANGE_UPDATE_WITHDRAWAL_AMOUNT_REQUEST, payload: { withdrawalAmount, depositAmount } ======= type: EXCHANGE_UPDATE_ASSET_AMOUNT, payload: { depositAmount, withdrawalAmount }, >>>>>>> type: EXCHANGE_UPDATE_WITHDRAWAL_AMOUNT_REQUEST, payload: { withdrawalAmount, depositAmount }, <<<<<<< export const exchangeModalInit = () => (dispatch, getState) => { const { accountAddress, accountInfo } = getState().account; const depositSelected = accountInfo.assets.filter(asset => asset.symbol === 'ETH')[0]; dispatch({ type: EXCHANGE_GET_AVAILABLE_REQUEST, payload: { address: accountAddress, depositSelected } }); apiShapeshiftGetCurrencies() .then(({ data }) => { const withdrawalAssets = data; const availableSymbols = withdrawalAssets.map(availableAsset => availableAsset.symbol); const depositAssets = accountInfo.assets.filter( asset => availableSymbols.indexOf(asset.symbol) !== -1 ); dispatch({ type: EXCHANGE_GET_AVAILABLE_SUCCESS, payload: { withdrawalAssets, depositAssets, withdrawalSelected: withdrawalAssets[1] } }); dispatch(exchangeGetGasPrices()); dispatch(exchangeUpdateDepositAmount()); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch({ type: EXCHANGE_GET_AVAILABLE_FAILURE }); }); }; export const exchangeTransaction = ({ address, recipient, amount, asset, gasPrice, gasLimit }) => ( dispatch, getState ) => { ======= export const exchangeTransaction = ({ address, recipient, amount, asset, gasPrice, gasLimit, }) => (dispatch, getState) => { >>>>>>> export const exchangeModalInit = () => (dispatch, getState) => { const { accountAddress, accountInfo } = getState().account; const depositSelected = accountInfo.assets.filter( asset => asset.symbol === 'ETH', )[0]; dispatch({ type: EXCHANGE_GET_AVAILABLE_REQUEST, payload: { address: accountAddress, depositSelected }, }); apiShapeshiftGetCurrencies() .then(({ data }) => { const withdrawalAssets = data; const availableSymbols = withdrawalAssets.map( availableAsset => availableAsset.symbol, ); const depositAssets = accountInfo.assets.filter( asset => availableSymbols.indexOf(asset.symbol) !== -1, ); dispatch({ type: EXCHANGE_GET_AVAILABLE_SUCCESS, payload: { withdrawalAssets, depositAssets, withdrawalSelected: withdrawalAssets[1], }, }); dispatch(exchangeGetGasPrices()); dispatch(exchangeUpdateDepositAmount()); }) .catch(error => { const message = parseError(error); dispatch(notificationShow(message, true)); dispatch({ type: EXCHANGE_GET_AVAILABLE_FAILURE }); }); }; export const exchangeTransaction = ({ address, recipient, amount, asset, gasPrice, gasLimit, }) => (dispatch, getState) => { <<<<<<< ======= case EXCHANGE_GET_MARKET_INFO_SUCCESS: return { ...state, exchangeDetails: action.payload, }; >>>>>>>
<<<<<<< if (!svl.map.getStatus("lockDisablePanning") && !svl.map.getStatus("disablePanning")){ var heading = svl.panorama.pov.heading; var pitch = svl.panorama.pov.pitch; var zoom = svl.panorama.pov.zoom; heading = (heading + degree + 360) % 360; svl.panorama.setPov({heading: heading, pitch: pitch, zoom: zoom}); } ======= if (!svl.map.getStatus("disablePanning")){ var heading = svl.panorama.pov.heading; var pitch = svl.panorama.pov.pitch; var zoom = svl.panorama.pov.zoom; heading = (heading + degree + 360) % 360; svl.panorama.setPov({heading: heading, pitch: pitch, zoom: zoom}); } >>>>>>> if (!svl.map.getStatus("disablePanning")){ var heading = svl.panorama.pov.heading; var pitch = svl.panorama.pov.pitch; var zoom = svl.panorama.pov.zoom; heading = (heading + degree + 360) % 360; svl.panorama.setPov({heading: heading, pitch: pitch, zoom: zoom}); } <<<<<<< }else if (!status.focusOnTextField && !status.disableKeyboard) { ======= } else if (!status.focusOnTextField && !status.disableKeyboard) { >>>>>>> }else if (!status.focusOnTextField && !status.disableKeyboard) { <<<<<<< <<<<<<< HEAD case 27: // "Escape" if (canvas.getStatus('drawing')) { canvas.cancelDrawing(); svl.tracker.push("KeyboardShortcut_CancelDrawing"); ======= case util.misc.getLabelDescriptions('Occlusion')['shortcut']['keyNumber']: // "b" for a blocked view ribbon.modeSwitch("Occlusion"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Occlusion", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('CurbRamp')['shortcut']['keyNumber']: // "c" for CurbRamp. Switch the mode to the CurbRamp labeling mode. ribbon.modeSwitch("CurbRamp"); svl.tracker.push("KeyboardShortcut_ModeSwitch_CurbRamp", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('Walk')['shortcut']['keyNumber']: // "e" for Explore. Switch the mode to Walk (camera) mode. ribbon.modeSwitch("Walk"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Walk", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('NoCurbRamp')['shortcut']['keyNumber']: // "m" for MissingCurbRamp. Switch the mode to the MissingCurbRamp labeling mode. ribbon.modeSwitch("NoCurbRamp"); svl.tracker.push("KeyboardShortcut_ModeSwitch_NoCurbRamp", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('NoSidewalk')['shortcut']['keyNumber']: ribbon.modeSwitch("NoSidewalk"); svl.tracker.push("KeyboardShortcut_ModeSwitch_NoSidewalk", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('Obstacle')['shortcut']['keyNumber']: // "o" for Obstacle ribbon.modeSwitch("Obstacle"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Obstacle", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('SurfaceProblem')['shortcut']['keyNumber']: ribbon.modeSwitch("SurfaceProblem"); svl.tracker.push("KeyboardShortcut_ModeSwitch_SurfaceProblem", { keyCode: e.keyCode }); break; case 90: // "z" for zoom. By default, it will zoom in. If "shift" is down, it will zoom out. if (contextMenu.isOpen()){ contextMenu.hide(); } if (status.shiftDown) { // Zoom out zoomControl.zoomOut(); svl.tracker.push("KeyboardShortcut_ZoomOut", { keyCode: e.keyCode }); >>>>>>> refs/remotes/origin/develop ======= case 27: // "Escape" if (canvas.getStatus('drawing')) { canvas.cancelDrawing(); svl.tracker.push("KeyboardShortcut_CancelDrawing"); >>>>>>> case 27: // "Escape" if (canvas.getStatus('drawing')) { canvas.cancelDrawing(); svl.tracker.push("KeyboardShortcut_CancelDrawing"); } break; case util.misc.getLabelDescriptions('Occlusion')['shortcut']['keyNumber']: // "b" for a blocked view ribbon.modeSwitch("Occlusion"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Occlusion", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('CurbRamp')['shortcut']['keyNumber']: // "c" for CurbRamp. Switch the mode to the CurbRamp labeling mode. ribbon.modeSwitch("CurbRamp"); svl.tracker.push("KeyboardShortcut_ModeSwitch_CurbRamp", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('Walk')['shortcut']['keyNumber']: // "e" for Explore. Switch the mode to Walk (camera) mode. ribbon.modeSwitch("Walk"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Walk", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('NoCurbRamp')['shortcut']['keyNumber']: // "m" for MissingCurbRamp. Switch the mode to the MissingCurbRamp labeling mode. ribbon.modeSwitch("NoCurbRamp"); svl.tracker.push("KeyboardShortcut_ModeSwitch_NoCurbRamp", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('NoSidewalk')['shortcut']['keyNumber']: ribbon.modeSwitch("NoSidewalk"); svl.tracker.push("KeyboardShortcut_ModeSwitch_NoSidewalk", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('Obstacle')['shortcut']['keyNumber']: // "o" for Obstacle ribbon.modeSwitch("Obstacle"); svl.tracker.push("KeyboardShortcut_ModeSwitch_Obstacle", { keyCode: e.keyCode }); break; case util.misc.getLabelDescriptions('SurfaceProblem')['shortcut']['keyNumber']: ribbon.modeSwitch("SurfaceProblem"); svl.tracker.push("KeyboardShortcut_ModeSwitch_SurfaceProblem", { keyCode: e.keyCode }); break; case 90: // "z" for zoom. By default, it will zoom in. If "shift" is down, it will zoom out. if (contextMenu.isOpen()){ contextMenu.hide(); } if (status.shiftDown) { // Zoom out zoomControl.zoomOut(); svl.tracker.push("KeyboardShortcut_ZoomOut", { keyCode: e.keyCode });
<<<<<<< return "adjust-heading-angle-4"; } ======= return "adjust-heading-angle-3"; }] >>>>>>> return "adjust-heading-angle-4"; }] <<<<<<< "transition": function () { var completedRate = 25 / numStates; ======= "transition": [function () { var completedRate = 26 / numStates; >>>>>>> "transition": [function () { var completedRate = 26 / numStates;
<<<<<<< /** * Central function that handles the creation of choropleths and maps. * @param _ Allows the use of Underscore.js * @param $ Allows the use of jQuery. * @param difficultRegionIds Used to identify difficult regions. * @param params Object that includes properties that can change the process of choropleth creation. * @param layers Object that receives data during execution to pass outside of this function. * @param polygonData Data concerning which neighborhood polygons are to be rendered. * @param polygonRateData Rate data of each neighborhood polygon. * @param mapParamData Data used to initialize the choropleth properties. */ function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polygonRateData, mapParamData) { var labelText = { "NoSidewalk": "Missing Sidewalks", "NoCurbRamp": "Missing Curb Ramps", "SurfaceProblem": "Surface Problems", "Obstacle": "Obstacles", }; // Create base map. L.mapbox.accessToken = params.accessToken; var choropleth = L.mapbox.map(params.mapName, params.mapStyle, { ======= function Choropleth(_, $, difficultRegionIds) { var neighborhoodPolygonLayer; // var tileUrl = "https://a.tiles.mapbox.com/v4/kotarohara.mmoldjeh/page.html?access_token=pk.eyJ1Ijoia290YXJvaGFyYSIsImEiOiJDdmJnOW1FIn0.kJV65G6eNXs4ATjWCtkEmA#13/38.8998/-77.0638"; var tileUrl = "https:\/\/a.tiles.mapbox.com\/v4\/kotarohara.8e0c6890\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1Ijoia290YXJvaGFyYSIsImEiOiJDdmJnOW1FIn0.kJV65G6eNXs4ATjWCtkEmA"; var mapboxTiles = L.tileLayer(tileUrl, { attribution: '<a href="http://www.mapbox.com/about/maps/" target="_blank">Terms &amp; Feedback</a>' }); // a grayscale tileLayer for the choropleth L.mapbox.accessToken = 'pk.eyJ1IjoibWlzYXVnc3RhZCIsImEiOiJjajN2dTV2Mm0wMDFsMndvMXJiZWcydDRvIn0.IXE8rQNF--HikYDjccA7Ug'; var choropleth = L.mapbox.map('choropleth', null, { >>>>>>> /** * Central function that handles the creation of choropleths and maps. * @param _ Allows the use of Underscore.js * @param $ Allows the use of jQuery. * @param difficultRegionIds Used to identify difficult regions. * @param params Object that includes properties that can change the process of choropleth creation. * @param layers Object that receives data during execution to pass outside of this function. * @param polygonData Data concerning which neighborhood polygons are to be rendered. * @param polygonRateData Rate data of each neighborhood polygon. * @param mapParamData Data used to initialize the choropleth properties. */ function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polygonRateData, mapParamData) { var labelText = { "NoSidewalk": "Missing Sidewalks", "NoCurbRamp": "Missing Curb Ramps", "SurfaceProblem": "Surface Problems", "Obstacle": "Obstacles", }; // Create base map. L.mapbox.accessToken = params.accessToken; var choropleth = L.mapbox.map(params.mapName, null, { <<<<<<< zoomControl: params.zoomControl, ======= zoomControl: false, scrollWheelZoom: false, legendControl: { position: 'bottomleft' }, >>>>>>> zoomControl: params.zoomControl, scrollWheelZoom: params.scrollWheelZoom, <<<<<<< if (params.choroplethType === 'results') { $.getJSON('/adminapi/choroplethCounts', function (labelCounts) { //append label counts to region data with map/reduce var labelData = _.map(polygonRateData, function(region) { var regionLabel = _.find(labelCounts, function(x){ return x.region_id == region.region_id }); return regionLabel ? regionLabel : {}; }); initializeChoropleth(polygonRateData, labelData); }); } else { initializeChoropleth(polygonRateData, 'NA'); } ======= function clearChoroplethRegionOutlines(layers) { for (var i = layers.length - 1; i >= 0; i--) { layers[i].setStyle({opacity: 0.25, weight: 1, color: "#888"}); } } function addChoroplethRegionOutline(layer) { layer.setStyle({opacity: 1.0, weight: 3, color: "#000"}); } >>>>>>> if (params.popupType === 'issueCounts') { $.getJSON('/adminapi/choroplethCounts', function (labelCounts) { //append label counts to region data with map/reduce var labelData = _.map(polygonRateData, function(region) { var regionLabel = _.find(labelCounts, function(x){ return x.region_id == region.region_id }); return regionLabel ? regionLabel : {}; }); initializeChoropleth(polygonRateData, labelData); }); } else { initializeChoropleth(polygonRateData, 'NA'); }
<<<<<<< } else if ( _value >= timeUnits.ms.second && _value < timeUnits.ms.minute ) { _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.ms.second}`)) .toFixed(2), ).toString(); ======= } else if (_value >= timeUnits.ms.second && _value < timeUnits.ms.minute) { _value = formatFixedDecimals(divide(_value, timeUnits.ms.second), 2); >>>>>>> } else if ( _value >= timeUnits.ms.second && _value < timeUnits.ms.minute ) { _value = formatFixedDecimals(divide(_value, timeUnits.ms.second), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.ms.minute}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.ms.minute), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.ms.minute), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.ms.hour}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.ms.hour), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.ms.hour), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.ms.day}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.ms.day), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.ms.day), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .times(BigNumber(`${timeUnits.ms.second}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(multiply(_value, timeUnits.ms.second)); >>>>>>> _value = formatFixedDecimals(multiply(_value, timeUnits.ms.second)); <<<<<<< } else if ( _value >= timeUnits.secs.minute && _value < timeUnits.secs.hour ) { _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.secs.minute}`)) .toFixed(2), ).toString(); ======= } else if (_value >= timeUnits.secs.minute && _value < timeUnits.secs.hour) { _value = formatFixedDecimals(divide(_value, timeUnits.secs.minute), 2); >>>>>>> } else if ( _value >= timeUnits.secs.minute && _value < timeUnits.secs.hour ) { _value = formatFixedDecimals(divide(_value, timeUnits.secs.minute), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.secs.hour}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.secs.hour), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.secs.hour), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`timeUnits.secs.day`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.secs.day), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.secs.day), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .times(BigNumber(`${timeUnits.secs.minute}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(multiply(_value, timeUnits.secs.minute)); >>>>>>> _value = formatFixedDecimals(multiply(_value, timeUnits.secs.minute)); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.mins.hour}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.mins.hour), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.mins.hour), 2); <<<<<<< _value = BigNumber( BigNumber(`${_value}`) .dividedBy(BigNumber(`${timeUnits.mins.day}`)) .toFixed(2), ).toString(); ======= _value = formatFixedDecimals(divide(_value, timeUnits.mins.day), 2); >>>>>>> _value = formatFixedDecimals(divide(_value, timeUnits.mins.day), 2);
<<<<<<< "message": 'Awesome! Let’s finish labeling the last curb ramp in the intersection. ' + 'First, <span class="bold">grab and drag the Street View image.</span>', ======= "message": 'Awesome! We’re almost done with the training. Let’s learn how to walk. First, ' + '<span class="bold">grab and drag the Street View image to the right.</span>', >>>>>>> "message": 'Awesome! Let’s finish labeling the last curb ramp in the intersection. ' + 'First, <span class="bold">grab and drag the Street View image to the right.</span>', <<<<<<< "message": 'Great Job! We are almost done. Now, let\'s learn how to walk. ' + '<span class="bold">Grab and drag the Street View image</span>.', ======= "message": '<span class="bold">Ok, it\'s almost done!</span> Let’s adjust the view to ' + 'look at the final corner in this intersection. ' + '<span class="bold">Grab and drag the Street View image to the right.</span>', >>>>>>> "message": 'Great Job! We are almost done. Now, let\'s learn how to walk. ' + '<span class="bold">Grab and drag the Street View image to the right</span>.',
<<<<<<< import { capitalize } from '../../helpers/utilities'; import { colors, fonts } from '../../styles'; const mdBreakpoint = '712px'; const xsBreakpoint = '363px'; ======= import { colors, fonts, responsive } from '../../styles'; >>>>>>> import { colors, fonts } from '../../styles'; const mdBreakpoint = '712px'; const xsBreakpoint = '363px';
<<<<<<< import FetchLoader from "xgplayer-loader-fetch"; import XgBuffer from "xgplayer-buffer"; import Context from "../../xgplayer-utils/Context"; ======= import Context from 'xgplayer-utils/Context' import FlvDemuxer from 'xgplayer-flv/demux' >>>>>>> import FetchLoader from "xgplayer-loader-fetch"; import XgBuffer from "xgplayer-buffer"; import Context from "xgplayer-utils/Context"; import FlvDemuxer from 'xgplayer-flv/demux' <<<<<<< constructor (configs) { this.configs = Object.assign({},configs); this.container = document.querySelector("#" + this.configs.id); } _init() { this._registry(); } _registry() { this._context.registry("LOADER", FetchLoader); this._context.registry("LOADER_BUBBER", XgBuffer); // TODO: this._context.registry("DEMUXER", FLVDE) } _initInstances() { this._context.initInstance("LOADER", {buffer: "LOADER_BUFFER"}); this._context.initInstance("LOADER_BUBBER"); } load(url, opts) { let loader = this._context.getInstance("LOADER"); loader.load(url, opts); ======= constructor () { this.TAG = Tag this.context = new Context() FlvDemuxer(this.context) >>>>>>> constructor () { this.TAG = Tag this.context = new Context() FlvDemuxer(this.context) } _init() { this._registry(); } _registry() { this._context.registry("LOADER", FetchLoader); this._context.registry("LOADER_BUBBER", XgBuffer); // TODO: this._context.registry("DEMUXER", FLVDE) } _initInstances() { this._context.initInstance("LOADER", {buffer: "LOADER_BUFFER"}); this._context.initInstance("LOADER_BUBBER"); } load(url, opts) { let loader = this._context.getInstance("LOADER"); loader.load(url, opts); <<<<<<< export { FlvLiveController }; export default FlvLiveController; ======= export default FlvLiveController >>>>>>> export default FlvLiveController;
<<<<<<< import lang from '../languages'; import OpenSeaLogo from '../assets/opensea-logo.svg'; import { fonts, responsive } from '../styles'; ======= import { lang } from 'balance-common'; import OpenSeaLogo from '../assets/opensea-icon.png'; >>>>>>> import { lang } from 'balance-common'; import OpenSeaLogo from '../assets/opensea-logo.svg'; import { fonts, responsive } from '../styles';
<<<<<<< value: PropTypes.any.isRequired, change: PropTypes.func.isRequired, propName: PropTypes.string.isRequired, editProps: PropTypes.object, defaultProps: PropTypes.object, isDisabled: PropTypes.bool, validate: PropTypes.func, shouldBlockWhileLoading: PropTypes.bool, classLoading: PropTypes.string, classEditing: PropTypes.string, classDisabled: PropTypes.string, classInvalid: PropTypes.string, className: PropTypes.string ======= value: React.PropTypes.any.isRequired, change: React.PropTypes.func.isRequired, propName: React.PropTypes.string.isRequired, editProps: React.PropTypes.object, defaultProps: React.PropTypes.object, isDisabled: React.PropTypes.bool, validate: React.PropTypes.func, handleValidationFail: React.PropTypes.func, shouldBlockWhileLoading: React.PropTypes.bool, shouldRemainWhileInvalid: React.PropTypes.bool, classLoading: React.PropTypes.string, classEditing: React.PropTypes.string, classDisabled: React.PropTypes.string, classInvalid: React.PropTypes.string, className: React.PropTypes.string >>>>>>> value: PropTypes.any.isRequired, change: PropTypes.func.isRequired, propName: PropTypes.string.isRequired, editProps: PropTypes.object, defaultProps: PropTypes.object, isDisabled: PropTypes.bool, validate: PropTypes.func, handleValidationFail: PropTypes.func, shouldBlockWhileLoading: PropTypes.bool, shouldRemainWhileInvalid: PropTypes.bool, classLoading: PropTypes.string, classEditing: PropTypes.string, classDisabled: PropTypes.string, classInvalid: PropTypes.string, className: PropTypes.string
<<<<<<< var c = {simple: true}, i; ======= >>>>>>> var c = {simple: true}, i; <<<<<<< c.method = c.method.toUpperCase(); ======= return buildPromise(c); } function buildPromise (c, requester) { var _requester = requester || request; >>>>>>> c.method = c.method.toUpperCase(); return buildPromise(c); } function buildPromise (c, requester) { var _requester = requester || request;
<<<<<<< let _messageId = 0; ======= const html = ` <!doctype html> <html> <head> <style> html { margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100%; } body { margin: 0; padding: 0; overflow: hidden; } canvas { position: absolute; top: 0; left: 0; } </style> </head> <body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"> <script> const canvas = document.createElement('canvas'); document.body.appendChild(canvas); const targets = { canvas, context2D: canvas.getContext('2d'), }; const toMessage = result => { if (result instanceof Blob) { return { type: 'blob', payload: btoa(result), }; } return { type: 'json', payload: JSON.stringify(result), }; }; document.addEventListener('message', e => { const {type, payload} = JSON.parse(e.data); try { switch (type) { case 'exec': { const {target, method, args} = payload; // let's create a special context for drawImage, which allows // base64 data and urls as a source... if (method === 'drawImage' && args.length > 0 && typeof args[0] === 'string') { const image = new Image(); image.addEventListener('load', function() { targets[target].drawImage(image, ...args.slice(1)); }); image.addEventListener('error', function(err) { throw err; }); image.src = args[0]; break; } else { const result = targets[target][method](...args); const message = toMessage(result); postMessage(JSON.stringify(message)); break; } } case 'set': { const {target, key, value} = payload; targets[target][key] = value; break; } } } catch (err) { document.body.innerHTML = '<div class="error">' + err + '</div>'; } }); </script> </body> </html> ` class Bus { actions = []; messageListeners = []; >>>>>>> let _messageId = 0; const js = ` const flattenObject = object => { if (typeof object !== 'object') { return object; } const flatObject = {}; for (const key in object) { flatObject[key] = object[key]; } for (const key in Object.getOwnPropertyNames(object)) { flatObject[key] = object[key]; } return flatObject; }; const toMessage = result => { if (result instanceof Blob) { return { type: 'blob', payload: btoa(result), }; } return { type: 'json', payload: flattenObject(result), }; }; const canvas = document.createElement('canvas'); const targets = { canvas, context2D: canvas.getContext('2d'), }; const constructors = { Image, Path2D, }; const populateRefs = arg => { if (arg.__ref__) { return targets[arg.__ref__]; } return arg; }; document.body.appendChild(canvas); document.addEventListener('message', (e) => { const {id, type, payload} = JSON.parse(e.data) switch (type) { case 'exec': { const {target, method, args} = payload; const result = targets[target][method](...args.map(populateRefs)); const message = toMessage(result); postMessage(JSON.stringify(Object.assign({ id }, message))); break; } case 'set': { const {target, key, value} = payload; targets[target][key] = value; break; } case 'construct': { const {constructor, id: target, args = []} = payload; const object = new constructors[constructor](...args); const message = toMessage({}); targets[target] = object; postMessage(JSON.stringify(Object.assign({ id }, message))); break; } case 'listen': { const {types, target} = payload; for (const eventType of types) { targets[target].addEventListener(eventType, e => { const message = toMessage({ type: 'event', payload: { type: e.type, }, }); postMessage(JSON.stringify(Object.assign({ id }, message))); }); } break; } } }) `; const html = ` <!doctype html> <html> <head> <style> html { margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100%; } body { margin: 0; padding: 0; overflow: hidden; } canvas { position: absolute; top: 0; left: 0; } </style> </head> <body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"> <script>${js}</script> </body> </html> `; <<<<<<< const {style} = this.props; ======= >>>>>>> const {style} = this.props; <<<<<<< <View style={{width, height, overflow: 'hidden', flex: 0, ...style}}> <WebView ref={this.handleRef} style={{width, height, backgroundColor: 'transparent'}} source={require('./index.html')} onMessage={this.handleMessage} onLoad={this.handleLoad} /> </View> ======= <WebView ref={this.handleRef} style={{width, height, overflow: 'hidden', backgroundColor: 'transparent'}} source={{html, baseUrl: '/'}} onMessage={this.handleMessage} onLoad={this.handleLoad} scrollEnabled={false} /> >>>>>>> <View style={{width, height, overflow: 'hidden', flex: 0, ...style}}> <WebView ref={this.handleRef} style={{width, height, overflow: 'hidden', backgroundColor: 'transparent'}} source={{html, baseUrl: '/'}} onMessage={this.handleMessage} onLoad={this.handleLoad} scrollEnabled={false} /> </View>
<<<<<<< import czech from './_czech.json'; ======= import italian from './_italian.json'; import portuguese from './_portuguese.json'; import russian from './_russian.json'; import spanish from './_spanish.json'; import polish from './_polish.json'; >>>>>>> import czech from './_czech.json'; import italian from './_italian.json'; import portuguese from './_portuguese.json'; import russian from './_russian.json'; import spanish from './_spanish.json'; import polish from './_polish.json'; <<<<<<< de: german, cz: czech, ======= pt: portuguese, ru: russian, pl: polish, >>>>>>> de: german, cz: czech, pt: portuguese, ru: russian, pl: polish,
<<<<<<< import interactionsTabIcon from '../assets/interactions-tab.svg'; import uniquetokensTabIcon from '../assets/star-tab.svg'; ======= >>>>>>> import uniquetokensTabIcon from '../assets/star-tab.svg'; <<<<<<< tabPosition: -87 + this._firstTabOffset(), ======= activeLang: 'en', tabPosition: 0, tabWidth: 0 >>>>>>> activeLang: 'en', tabPosition: 0, tabWidth: 0 <<<<<<< <Link to={`${this.props.match.url}/interactions`}> <StyledTab data-toggle="tooltip" title={lang.t('account.tab_interactions_tooltip')} active={this.state.activeTab === 'INTERACTIONS_TAB'} icon={interactionsTabIcon} left > {lang.t('account.tab_interactions')} </StyledTab> </Link> <Link to={`${this.props.match.url}/uniquetokens`}> <StyledTab data-toggle="tooltip" title={lang.t('account.tab_uniquetokens_tooltip')} active={this.state.activeTab === 'UNIQUETOKENS_TAB'} icon={uniquetokensTabIcon} left > {lang.t('account.tab_uniquetokens')} </StyledTab> </Link> ======= >>>>>>> <Link to={`${this.props.match.url}/uniquetokens`}> <StyledTab data-toggle="tooltip" title={lang.t('account.tab_uniquetokens_tooltip')} active={this.state.activeTab === 'UNIQUETOKENS_TAB'} icon={uniquetokensTabIcon} left > {lang.t('account.tab_uniquetokens')} </StyledTab> </Link> <<<<<<< const tabCharSizes = [ 'account.tab_balances', 'account.tab_transactions', 'account.tab_interactions', ].map(resourceName => lang.t(resourceName).length); ======= const tabCharSizes = [ 'account.tab_balances', 'account.tab_transactions', ].map(resourceName => lang.t(resourceName).length); >>>>>>> const tabCharSizes = [ 'account.tab_balances', 'account.tab_transactions', 'account.tab_uniquetokens', ].map(resourceName => lang.t(resourceName).length);
<<<<<<< const Concept = require('./model/concept'); const ValidatedConcept = require('./model/validatedconcept'); const Resource = require('./model/resource'); const ResourceValidator = require('./serializer/resourcevalidator'); const ValidatedResource = require('./model/validatedresource'); const Relationship = require('./model/relationship'); ======= >>>>>>> <<<<<<< newInstance(ns, type, id, disableValidation) { return this.newResource(ns, type, id, disableValidation); } /** * Create a new Resource with a given namespace, type name and id * @param {string} ns - the namespace of the Resource * @param {string} type - the type of the Resource * @param {string} id - the identifier * @param {boolean} disableValidation - pass true if you want the factory to * return a {@link Resource} instead of a {@link ValidatedResource}. Defaults to false. * @return {Resource} the new instance * @throws {ModelException} if the type is not registered with the ModelManager */ newResource(ns, type, id, disableValidation) { ======= newInstance(ns, type, id, options) { >>>>>>> newInstance(ns, type, id, options) { return this.newResource(ns, type, id, disableValidation); } /** * Create a new Resource with a given namespace, type name and id * @param {string} ns - the namespace of the Resource * @param {string} type - the type of the Resource * @param {string} id - the identifier * @param {boolean} disableValidation - pass true if you want the factory to * return a {@link Resource} instead of a {@link ValidatedResource}. Defaults to false. * @return {Resource} the new instance * @throws {ModelException} if the type is not registered with the ModelManager */ newResource(ns, type, id, disableValidation) {
<<<<<<< module.exports.Admin = require('./lib/admin'); ======= module.exports.BusinessNetworkRegistry = require('./lib/businessnetworkregistry'); module.exports.ManagementConnection = require('./lib/managementconnection'); /** * Expose key concerto-common classes to make simplify client application dependencies */ module.exports.BusinessNetwork = require('@ibm/ibm-concerto-common').BusinessNetwork; >>>>>>> module.exports.Admin = require('./lib/admin'); /** * Expose key concerto-common classes to make simplify client application dependencies */ module.exports.BusinessNetwork = require('@ibm/ibm-concerto-common').BusinessNetwork;
<<<<<<< goog.require("vivliostyle.layoututil"); ======= goog.require('vivliostyle.pagefloat'); >>>>>>> goog.require("vivliostyle.layoututil"); goog.require('vivliostyle.pagefloat'); <<<<<<< /** @type {!Array.<adapt.layout.FragmentLayoutConstraint>} */ this.fragmentLayoutConstraints = []; /** @type {adapt.layout.Column} */ this.pseudoParent = null; /** @type {?adapt.vtree.NodeContext} */ this.nodeContextOverflowingDueToRepetitiveElements = null; ======= /** @type {?adapt.vtree.NodePosition} */ this.lastAfterPosition = null; >>>>>>> /** @type {?adapt.vtree.NodePosition} */ this.lastAfterPosition = null; /** @type {!Array.<adapt.layout.FragmentLayoutConstraint>} */ this.fragmentLayoutConstraints = []; /** @type {adapt.layout.Column} */ this.pseudoParent = null; /** @type {?adapt.vtree.NodeContext} */ this.nodeContextOverflowingDueToRepetitiveElements = null; <<<<<<< adapt.layout.Column.prototype.doFinishBreak = function(nodeContext, overflownNodeContext, initialNodeContext) { if (this.hasNewlyAddedPageFloats() || this.pageBreakType || !overflownNodeContext) { return adapt.task.newResult(nodeContext); } ======= adapt.layout.Column.prototype.findAcceptableBreak = function(overflownNodeContext, initialNodeContext, initialComputedBlockSize) { /** @type {!adapt.task.Frame.<adapt.vtree.NodeContext>} */ var frame = adapt.task.newFrame("findAcceptableBreak"); >>>>>>> adapt.layout.Column.prototype.doFinishBreak = function(nodeContext, overflownNodeContext, initialNodeContext, initialComputedBlockSize) { if (this.pageFloatLayoutContext.isInvalidated() || this.pageBreakType || !overflownNodeContext) { return adapt.task.newResult(nodeContext); } <<<<<<< if (!self.isBFC(nodeContext.formattingContext) || nodeContext.formattingContext instanceof vivliostyle.repetitiveelements.RepetitiveElementsOwnerFormattingContext || nodeContext.floatSide || nodeContext.flexContainer) { ======= if (!self.isBFC(nodeContext.formattingContext) || self.isFloatNodeContext(nodeContext) || nodeContext.flexContainer) { >>>>>>> if (!self.isBFC(nodeContext.formattingContext) || nodeContext.formattingContext instanceof vivliostyle.repetitiveelements.RepetitiveElementsOwnerFormattingContext || self.isFloatNodeContext(nodeContext) || nodeContext.flexContainer) { <<<<<<< var retryer = new adapt.layout.LayoutRetryer(leadingEdge); retryer.layout(nodeContext, self).then(function(nodeContextParam) { self.doFinishBreak(nodeContextParam, retryer.context.overflownNodeContext, nodeContext).then(function(positionAfter) { var cont = null; if (!self.pseudoParent) { cont = self.resetConstraints(positionAfter); } else { cont = adapt.task.newResult(null); } cont.then(function() { var footnoteArea = self.footnoteArea; if (footnoteArea) { self.element.appendChild(footnoteArea.element); if (self.vertical) { self.computedBlockSize = this.beforeEdge - this.afterEdge; } else { self.computedBlockSize = footnoteArea.top + footnoteArea.getInsetTop() + footnoteArea.computedBlockSize + footnoteArea.getInsetBottom(); } } // TODO: look at footnotes and floats as well if (!positionAfter) { frame.finish(null); } else if (self.hasNewlyAddedPageFloats()) { frame.finish(null); ======= var initialNodeContext = nodeContext; var initialComputedBlockSize = self.computedBlockSize; // ------ init backtracking list ----- self.breakPositions = []; // ------- fill the column ------------- frame.loopWithFrame(function(loopFrame) { while (nodeContext) { // fill a single block var pending = true; self.layoutNext(nodeContext, leadingEdge, breakAfter || null).then(function(nodeContextParam) { leadingEdge = false; nodeContext = nodeContextParam; if (self.pageFloatLayoutContext.isInvalidated()) { loopFrame.breakLoop(); } else if (self.pageBreakType) { // explicit page break loopFrame.breakLoop(); // Loop end } else if (nodeContext && self.stopByOverflow(nodeContext)) { // overflow (implicit page break): back up and find a page break self.findAcceptableBreak(nodeContext, initialNodeContext, initialComputedBlockSize).then(function(nodeContextParam) { nodeContext = nodeContextParam; loopFrame.breakLoop(); // Loop end }); >>>>>>> var retryer = new adapt.layout.LayoutRetryer(leadingEdge, breakAfter); retryer.layout(nodeContext, self).then(function(nodeContextParam) { self.doFinishBreak(nodeContextParam, retryer.context.overflownNodeContext, nodeContext, retryer.context.initialComputedBlockSize).then(function(positionAfter) { var cont = null; if (!self.pseudoParent) { cont = self.resetConstraints(positionAfter); } else { cont = adapt.task.newResult(null); } cont.then(function() { if (self.pageFloatLayoutContext.isInvalidated()) { frame.finish(null); return; } var footnoteArea = self.footnoteArea; if (footnoteArea) { self.element.appendChild(footnoteArea.element); if (self.vertical) { self.computedBlockSize = this.beforeEdge - this.afterEdge; } else { self.computedBlockSize = footnoteArea.top + footnoteArea.getInsetTop() + footnoteArea.computedBlockSize + footnoteArea.getInsetBottom(); } } // TODO: look at footnotes and floats as well if (!positionAfter) { frame.finish(null); <<<<<<< adapt.layout.BlockLayoutProcessor.prototype.layout = function(nodeContext, column, leadingEdge) { if (nodeContext.floatSide) { ======= adapt.layout.BlockLayoutProcessor.prototype.layout = function(nodeContext, column) { if (column.isFloatNodeContext(nodeContext)) { >>>>>>> adapt.layout.BlockLayoutProcessor.prototype.layout = function(nodeContext, column, leadingEdge) { if (column.isFloatNodeContext(nodeContext)) {
<<<<<<< /** @type {number} */ this.fragmentIndex = 1; ======= /** @type {?string} */ this.repeatOnBreak = null; /** @type {number} */ this.fragmentIndex = 1; /** @type {!Array.<string>} */ this.fragmentSelectorIds = []; >>>>>>> /** @type {?string} */ this.repeatOnBreak = null; /** @type {number} */ this.fragmentIndex = 1; <<<<<<< this.fragmentIndex = 1; ======= this.repeatOnBreak = null; this.fragmentIndex = 1; this.fragmentSelectorIds = []; >>>>>>> this.repeatOnBreak = null; this.fragmentIndex = 1; <<<<<<< np.fragmentIndex = this.fragmentIndex; ======= np.repeatOnBreak = this.repeatOnBreak; np.fragmentIndex = this.fragmentIndex; np.fragmentSelectorIds = [].concat(this.fragmentSelectorIds); >>>>>>> np.repeatOnBreak = this.repeatOnBreak; np.fragmentIndex = this.fragmentIndex;
<<<<<<< import italian from './_italian.json'; ======= import german from './_german.json'; >>>>>>> import italian from './_italian.json'; import german from './_german.json'; <<<<<<< it: italian, ======= de: german, >>>>>>> it: italian, de: german,
<<<<<<< accountClearState, ledgerConnectInit, ======= ledgerConnectInit >>>>>>> ledgerConnectInit,
<<<<<<< /** * * @param {*} source * @param {*} target */ self.setDefaultCompany = function (source, target) { if (source && target) { if (!target.company_id && _.isEmpty(target.company_ids)) { if (source.company_id) { target.company_id = source.company_id; } if (source.company_ids) { target.company_ids = source.company_ids; } } } } self.sendDoc = function (doc) { ======= InstanceRecordQueue.sendDoc = self.sendDoc = function (doc) { >>>>>>> /** * * @param {*} source * @param {*} target */ self.setDefaultCompany = function (source, target) { if (source && target) { if (!target.company_id && _.isEmpty(target.company_ids)) { if (source.company_id) { target.company_id = source.company_id; } if (source.company_ids) { target.company_ids = source.company_ids; } } } } InstanceRecordQueue.sendDoc = self.sendDoc = function (doc) {
<<<<<<< load() { this.entities = {} this.relations = [] let files; try { files = fs.readdirSync(path.join(this.app.path, 'entities')) } catch (e) { files = [] fs.mkdirSync(path.join(this.app.path, 'entities')) return Promise.resolve(false) } ======= _loadFromPath(basePath, opts) { return new Promise((resolve, reject) => { let files; try { files = fs.readdirSync(path.join(basePath, 'entities')) } catch (e) { files = [] fs.mkdirSync(path.join(basePath, 'entities')) return accept(false) } >>>>>>> _loadFromPath(basePath, opts) { let files; try { files = fs.readdirSync(path.join(basePath, 'entities')) } catch (e) { files = [] fs.mkdirSync(path.join(basePath, 'entities')) return Promise.resolve(false) } <<<<<<< for (let file of files) { try { if (file.substr(file.length - 5, 5) == '.json') { let content = fs.readFileSync(path.join(this.app.path, 'entities', file)) let entity = JSON.parse(content.toString()) entity.name = file.substr(0, file.length - 5) promises.push(this.add(entity, {history: false, db: false, save: false, wait_relations:true})); ======= files.forEach((file) => { try { if (file.substr(file.length - 5, 5) == '.json') { let content = fs.readFileSync(path.join(basePath, 'entities', file)) let entity = JSON.parse(content.toString()) entity.name = file.substr(0, file.length - 5) promises.push(this.add(entity, opts)); } } catch (e) { e += ' in ' + file throw new Error(e) >>>>>>> for (let file of files) { try { if (file.substr(file.length - 5, 5) == '.json') { let content = fs.readFileSync(path.join(this.app.path, 'entities', file)) let entity = JSON.parse(content.toString()) entity.name = file.substr(0, file.length - 5) promises.push(this.add(entity, opts)); <<<<<<< return Promise.all(promises).then(() => { promises = [] for (let name in this.entities) promises.push(this.entities[name].applyRelations()) return Promise.all(promises) ======= Promise.all(promises).then(() => { resolve() }).catch((e) => { reject(e) }) }) } load() { return new Promise((accept, reject) => { this.entities = {} this._loadFromPath(this.app.path, { history: false, db: false, save: false, wait_relations: true }).then(() => { accept() }).catch((err) => { reject(err) }) }) } loadFromAddon(addon) { return new Promise((accept, reject) => { this._loadFromPath(path.join(this.app.path, 'addons', addon), { history: false, db: true, save: false, wait_relations: true, fromAddon: addon }).then(() => { accept() }).catch((err) => { reject(err) }) >>>>>>> return Promise.all(promises).then(() => { promises = [] for (let name in this.entities) promises.push(this.entities[name].applyRelations()) return Promise.all(promises) }) } load() { return new Promise((accept, reject) => { this.entities = {} this._loadFromPath(this.app.path, { history: false, db: false, save: false, wait_relations: true }).then(() => { accept() }).catch((err) => { reject(err) }) }) } loadFromAddon(addon) { return new Promise((accept, reject) => { this._loadFromPath(path.join(this.app.path, 'addons', addon), { history: false, db: true, save: false, wait_relations: true, fromAddon: addon }).then(() => { accept() }).catch((err) => { reject(err) }) <<<<<<< _save_id_map(opts) { opts = opts || {} let name_map = {} for (let entity_name in this.entities) { let entity = this.entities[entity_name] name_map[entity.id] = entity_name } let actions = {} for (let k in opts) { actions[k] = opts[k] } return this.app.saveFile(path.join(this.app.path, '.materia', 'ids.json'), JSON.stringify(name_map), actions) ======= _save_id_map() { return new Promise((resolve, reject) => { let name_map = {} for (let entity_name in this.entities) { let entity = this.entities[entity_name] name_map[entity.id] = entity_name } mkdirp(path.join(this.app.path, '.materia'), (err) => { if (err) { console.error(err) return reject(err) } try { fs.writeFileSync(path.join(this.app.path, '.materia', 'ids.json'), JSON.stringify(name_map)) return resolve() } catch (e) { console.error(e) return reject(e); } }) }) >>>>>>> _save_id_map(opts) { opts = opts || {} let name_map = {} for (let entity_name in this.entities) { let entity = this.entities[entity_name] name_map[entity.id] = entity_name } let actions = {} for (let k in opts) { actions[k] = opts[k] } actions.mkdir = true return this.app.saveFile(path.join(this.app.path, '.materia', 'ids.json'), JSON.stringify(name_map), actions) <<<<<<< fs.unlinkSync(path.join(this.app.path, relativePath)) this._save_id_map(options) if (options && options.afterSave) { options.afterSave() } ======= fs.unlinkSync(path.join(this.app.path, 'entities', name + '.json')) this._save_id_map().then(() => { if (options && options.afterSave) { options.beforeSave() } }) >>>>>>> fs.unlinkSync(path.join(this.app.path, relativePath)) this._save_id_map(options) if (options && options.afterSave) { options.afterSave() }
<<<<<<< this.add(endpoint, {save: false, apply: false}) ======= this.add(endpoint, opts) >>>>>>> this.add(endpoint, opts) <<<<<<< updateEndpoints() { this.router = new express.Router() ======= load() { this.endpoints = [] this._loadFromPath(this.app.path, { save: false }) } loadFromAddon(addon) { this._loadFromPath(path.join(this.app.path, 'addons', addon), { save: false, fromAddon: addon }) } registerEndpoints(appServer) { //console.log '\nSetup API...' >>>>>>> load() { this.endpoints = [] this._loadFromPath(this.app.path, { save: false }) } loadFromAddon(addon) { this._loadFromPath(path.join(this.app.path, 'addons', addon), { save: false, fromAddon: addon }) } updateEndpoints() { this.router = new express.Router()
<<<<<<< let relativePath = path.join('entities', this.name + '.json') ======= let basepath = this.app.path if (this.fromAddon) { basepath = path.join(this.app.path, 'addons', this.fromAddon) } >>>>>>> let relativePath = path.join('entities', this.name + '.json') let basepath = this.app.path if (this.fromAddon) { basepath = path.join(this.app.path, 'addons', this.fromAddon) } <<<<<<< path.join(this.app.path, relativePath), ======= path.join(basepath, 'entities', this.name + '.json'), >>>>>>> path.join(basepath, relativePath),
<<<<<<< ======= tooltip={`Increased your Shred damage by a total of <b>${formatNumber(this.shredDamage)}</b> and ${swipeName} by <b>${formatNumber(this.swipeDamage)}</b>. <ul> <li><b>${(100 * this.shredsWithThrash / this.shredsTotal).toFixed(0)}%</b> of your Shreds benefited from Wild Fleshrending. <li><b>${(100 * this.swipesWithThrash / this.swipesTotal).toFixed(0)}%</b> of your ${swipeName}s benefited from Wild Fleshrending. </ul>`} >>>>>>>
<<<<<<< import networkList from '../references/ethereum-networks.json'; /** * @desc save to local storage * @param {String} [key=''] * @param {Object} [data={}] * @return {Object} */ export const saveLocal = (key = '', data = {}) => localStorage.setItem(key, JSON.stringify(data)); /** * @desc get from local storage * @param {String} [key=''] * @return {Object} */ export const getLocal = (key = '') => localStorage.getItem(key) ? JSON.parse(localStorage.getItem(key)) : null; /** * @desc get from local storage * @param {String} [key=''] * @return {Object} */ export const removeLocal = (key = '') => localStorage.removeItem(key); ======= >>>>>>> <<<<<<< * @desc filter object by a set of allowed keys * @param {Function} request * @param {Array} params * @param {Number} timeout * @return {Promise} */ export const filterObjectByKeys = (object, allowedKeys) => { const result = {}; const objectKeys = Object.keys(object); objectKeys.forEach(key => { if (allowedKeys.includes(key)) { result[key] = object[key]; } }); return result; }; /** * @desc update local balances * @param {Object} [account] * @param {String} [network] * @return {Void} */ export const updateLocalBalances = (account, network) => { const address = account.address; if (!address) return; const networks = Object.keys(networkList); let accountLocal = getLocal(address) || {}; accountLocal = filterObjectByKeys(accountLocal, networks); if (!accountLocal[network]) { accountLocal[network] = {}; } accountLocal[network].type = account.type; accountLocal[network].balances = { assets: account.assets, total: account.total || '———', }; saveLocal(address, accountLocal); }; /** * @desc update local transactions * @param {String} [address] * @param {Array} [transactions] * @param {String} [network] * @return {Void} */ export const updateLocalTransactions = (address, transactions, network) => { if (!address) return; const networks = Object.keys(networkList); let accountLocal = getLocal(address) || {}; accountLocal = filterObjectByKeys(accountLocal, networks); const pending = []; const _transactions = []; transactions.forEach(tx => { if (tx.pending) { pending.push(tx); } else { _transactions.push(tx); } }); if (!accountLocal[network]) { accountLocal[network] = {}; } accountLocal[network].transactions = _transactions; accountLocal[network].pending = pending; saveLocal(address, accountLocal); }; /** * @desc flatten tokens * @param {Object} [accounts] * @return {String} */ export const flattenTokens = accounts => { const asset = ['ETH']; for (let i = 0; i < accounts.length; i++) { if (accounts[i].tokens) { for (let j = 0; j < accounts[i].tokens.length; j++) { if (!asset.includes(accounts[i].tokens[j].symbol)) { asset.push(accounts[i].tokens[j].symbol); } } } } return asset; }; /** ======= >>>>>>> <<<<<<< * @desc get naked ethereum address * @param {String} address * @return {String} */ export const getNakedAddress = address => address.toLowerCase().replace('0x', ''); /** * @desc sanitize hexadecimal string * @param {String} address * @return {String} ======= * @desc get derivation path components * @param {String} [derivationPath = ''] * @return {Object} >>>>>>> * @desc get derivation path components * @param {String} [derivationPath = ''] * @return {Object} <<<<<<< }; /** * @desc ellipse text to max maxLength * @param {String} [text = ''] * @param {Number} [maxLength = 9999] * @return {Intercom} */ export const ellipseText = (text = '', maxLength = 9999) => { if (text.length <= maxLength) return text; const _maxLength = maxLength - 3; let ellipse = false; let currentLength = 0; const result = text .split(' ') .filter(word => { currentLength += word.length; if (ellipse || currentLength >= _maxLength) { ellipse = true; return false; } else { return true; } }) .join(' ') + '...'; return result; }; /** * @desc obtain path components from derivation path * @param {String} [derivationPath = ''] * @return {Object} */ export const obtainPathComponentsFromDerivationPath = (derivationPath = '') => { const regExp = /^(44'\/6[0|1]'\/\d+'?\/)(\d+)$/; const matchResult = regExp.exec(derivationPath); if (matchResult === null) { throw new Error( "To get multiple accounts your derivation path must follow pattern 44'/60|61'/x'/n ", ); } return { basePath: matchResult[1], index: parseInt(matchResult[2], 10) }; ======= >>>>>>>
<<<<<<< const shapeshift = axios.create({ baseURL: 'https://shapeshift.io', timeout: 30000, // 30 secs headers: { 'Content-Type': 'application/json', Accept: 'application/json' } }); ======= export const apiShapeshiftGetMarketInfo = ( depositSelected = '', withdrawalSelected = '', ) => api.get( `/get_market_info?deposit=${depositSelected}&withdrawal=${withdrawalSelected}`, ); >>>>>>> const shapeshift = axios.create({ baseURL: 'https://shapeshift.io', timeout: 30000, // 30 secs headers: { 'Content-Type': 'application/json', Accept: 'application/json', }, }); <<<<<<< export const apiShapeshiftGetFixedPrice = (amount = '', exchangePair = '', address = '') => shapeshift.post(`/sendamount`, { ======= export const apiShapeshiftGetFixedPrice = ( amount = '', exchangePair = '', address = '', ) => api.post(`/shapeshift_send_amount`, { >>>>>>> export const apiShapeshiftGetFixedPrice = ( amount = '', exchangePair = '', address = '', ) => shapeshift.post(`/sendamount`, { <<<<<<< export const apiShapeshiftGetMarketInfo = (exchangePair = '') => shapeshift.get(`/marketinfo/${exchangePair}`); /** * @desc shapeshift get quoted price * @param {String} [depositSelected = ''] * @param {String} [withdrawalSelected = ''] * @param {String} [depositAmount = ''] * @param {String} [withdrawalAmount = ''] * @return {Promise} */ export const apiShapeshiftGetQuotedPrice = async ({ depositSymbol = '', withdrawalSymbol = '', depositAmount = '', withdrawalAmount = '' }) => { try { const pair = `${depositSymbol.toLowerCase()}_${withdrawalSymbol.toLowerCase()}`; const marketInfo = await apiShapeshiftGetMarketInfo(pair); const min = marketInfo.data.minimum; const body = { pair }; if (withdrawalAmount) { body.amount = withdrawalAmount; } else if (depositAmount) { body.depositAmount = depositAmount; } else { body.depositAmount = min; } const response = await shapeshift.post(`/sendamount`, body); if (response.data.success) { response.data.success.min = min; return response; } else { console.log(marketInfo); return { data: { pair, quotedRate: marketInfo.data.rate, maxLimit: marketInfo.data.maxLimit, min: marketInfo.data.minimum, minerFee: marketInfo.data.minerFee, error: response.data.error } }; } } catch (error) { throw error; } }; /** * @desc shapeshift verify availability * @param {String} [depositSelected = ''] * @param {String} [withdrawalSelected = ''] * @param {String} [depositAmount = ''] * @param {String} [withdrawalAmount = ''] * @return {Promise} */ export const apiShapeshiftVerify = async () => shapeshift.post(`/sendamount`, { pair: 'eth_bnt', amount: '0.5' }); ======= export const apiShapeshiftGetQuotedPrice = (amount = '', exchangePair = '') => api.post(`/shapeshift_quoted_price_request`, { amount, pair: exchangePair, }); >>>>>>> export const apiShapeshiftGetMarketInfo = (exchangePair = '') => shapeshift.get(`/marketinfo/${exchangePair}`); /** * @desc shapeshift get quoted price * @param {String} [depositSelected = ''] * @param {String} [withdrawalSelected = ''] * @param {String} [depositAmount = ''] * @param {String} [withdrawalAmount = ''] * @return {Promise} */ export const apiShapeshiftGetQuotedPrice = async ({ depositSymbol = '', withdrawalSymbol = '', depositAmount = '', withdrawalAmount = '', }) => { try { const pair = `${depositSymbol.toLowerCase()}_${withdrawalSymbol.toLowerCase()}`; const marketInfo = await apiShapeshiftGetMarketInfo(pair); const min = marketInfo.data.minimum; const body = { pair }; if (withdrawalAmount) { body.amount = withdrawalAmount; } else if (depositAmount) { body.depositAmount = depositAmount; } else { body.depositAmount = min; } const response = await shapeshift.post(`/sendamount`, body); if (response.data.success) { response.data.success.min = min; return response; } else { console.log(marketInfo); return { data: { pair, quotedRate: marketInfo.data.rate, maxLimit: marketInfo.data.maxLimit, min: marketInfo.data.minimum, minerFee: marketInfo.data.minerFee, error: response.data.error, }, }; } } catch (error) { throw error; } }; /** * @desc shapeshift verify availability * @param {String} [depositSelected = ''] * @param {String} [withdrawalSelected = ''] * @param {String} [depositAmount = ''] * @param {String} [withdrawalAmount = ''] * @return {Promise} */ export const apiShapeshiftVerify = async () => shapeshift.post(`/sendamount`, { pair: 'eth_bnt', amount: '0.5' });
<<<<<<< import { startCase } from 'lodash'; import { ImageGrid } from 'kitsu/screens/Feed/components/ImageGrid'; import { ImageLightbox } from 'kitsu/components/ImageLightbox'; ======= import { startCase, isEmpty } from 'lodash'; import dataBunny from 'kitsu/assets/img/data-bunny.png'; >>>>>>> import { startCase } from 'lodash'; import { ImageGrid } from 'kitsu/screens/Feed/components/ImageGrid'; import { ImageLightbox } from 'kitsu/components/ImageLightbox'; import dataBunny from 'kitsu/assets/img/data-bunny.png'; <<<<<<< export class EmbeddedContent extends PureComponent { ======= class EmbeddedContent extends PureComponent { >>>>>>> class EmbeddedContent extends PureComponent { <<<<<<< compact: PropTypes.bool, ======= dataSaver: PropTypes.bool, >>>>>>> compact: PropTypes.bool, dataSaver: PropTypes.bool, <<<<<<< compact: false, ======= dataSaver: false, } state = { visible: false, } toggleVisibility = () => { this.setState({ visible: !this.state.visible }); } renderTapToLoad(width) { const { borderRadius } = this.props; const showDataBunny = !isNaN(width) && width > 300; const textContainerStyle = (!showDataBunny && { alignItems: 'center' }) || {}; return ( <TouchableOpacity style={[styles.dataSaver, { borderRadius }]} onPress={this.toggleVisibility} > {showDataBunny && <FastImage source={dataBunny} style={styles.dataBunny} resizeMode="contain" /> } <View style={[styles.dataSaverTextContainer, textContainerStyle]}> <StyledText color="light" size="default" bold numberOfLines={1} textStyle={{ marginBottom: 4 }}> Tap to load image </StyledText> <StyledText color="light" size="xxsmall"> Data-saving mode is currently enabled. </StyledText> </View> </TouchableOpacity> ); >>>>>>> compact: false, dataSaver: false, <<<<<<< const { maxWidth, minWidth, borderRadius, compact } = this.props; const { imageModalVisible, imageIndex } = this.state; ======= const { dataSaver } = this.props; const { visible } = this.state; const { maxWidth, minWidth, borderRadius } = this.props; >>>>>>> const { maxWidth, minWidth, borderRadius, compact, dataSaver } = this.props; const { imageModalVisible, imageIndex, visible } = this.state; <<<<<<< const images = [embed.image.url]; ======= if (dataSaver && !visible) { return this.renderTapToLoad(maxWidth); } // PostImage will auto scale the image >>>>>>> const images = [embed.image.url]; if (dataSaver && !visible) { return this.renderTapToLoad(maxWidth); }
<<<<<<< Object.keys(this.props.exchangeDetails).length && this.props.exchangeDetails.quotedRate ======= Object.keys(this.props.exchangeDetails).length && this.props.exchangeDetails.rate >>>>>>> Object.keys(this.props.exchangeDetails).length && this.props.exchangeDetails.quotedRate <<<<<<< divide(1, exchangeDetails.quotedRate) ) ======= divide(1, exchangeDetails.rate), ), >>>>>>> divide(1, exchangeDetails.quotedRate), ), <<<<<<< subtract( multiply(exchangeDetails.min, exchangeDetails.quotedRate), exchangeDetails.minerFee ) ======= subtract( multiply(exchangeDetails.min, exchangeDetails.rate), exchangeDetails.minerFee, ), >>>>>>> subtract( multiply(exchangeDetails.min, exchangeDetails.quotedRate), exchangeDetails.minerFee, ), <<<<<<< multiply(exchangeDetails.maxLimit, exchangeDetails.quotedRate), exchangeDetails.minerFee ) ======= multiply(exchangeDetails.maxLimit, exchangeDetails.rate), exchangeDetails.minerFee, ), >>>>>>> multiply(exchangeDetails.maxLimit, exchangeDetails.quotedRate), exchangeDetails.minerFee, ), <<<<<<< subtract( multiply(exchangeDetails.min, exchangeDetails.quotedRate), exchangeDetails.minerFee ) ======= subtract( multiply(exchangeDetails.min, exchangeDetails.rate), exchangeDetails.minerFee, ), >>>>>>> subtract( multiply(exchangeDetails.min, exchangeDetails.quotedRate), exchangeDetails.minerFee, ), <<<<<<< multiply(exchangeDetails.maxLimit, exchangeDetails.quotedRate), exchangeDetails.minerFee ) ======= multiply(exchangeDetails.maxLimit, exchangeDetails.rate), exchangeDetails.minerFee, ), >>>>>>> multiply(exchangeDetails.maxLimit, exchangeDetails.quotedRate), exchangeDetails.minerFee, ), <<<<<<< divide(1, exchangeDetails.quotedRate) ) ) ======= divide(1, exchangeDetails.rate), ), ), >>>>>>> divide(1, exchangeDetails.quotedRate), ), ), <<<<<<< this.props.exchangeUpdateDepositAmount(target.value) ======= this.props.exchangeUpdateDepositAmount( target.value, this.props.depositSelected, ) >>>>>>> this.props.exchangeUpdateDepositAmount(target.value) <<<<<<< <StyledAmountCurrency fetching={this.props.fetchingRate && this.state.activeInput !== 'DEPOSIT'} > {this.props.depositSelected.symbol} </StyledAmountCurrency> ======= <StyledAmountCurrency> {this.props.depositSelected.symbol} </StyledAmountCurrency> >>>>>>> <StyledAmountCurrency fetching={ this.props.fetchingRate && this.state.activeInput !== 'DEPOSIT' } > {this.props.depositSelected.symbol} </StyledAmountCurrency> <<<<<<< this.props.exchangeUpdateWithdrawalAmount(target.value) ======= this.props.exchangeUpdateWithdrawalAmount( target.value, this.props.withdrawalSelected, ) >>>>>>> this.props.exchangeUpdateWithdrawalAmount(target.value)
<<<<<<< import QuickUpdateStack from './quickUpdate'; ======= import FeedStack from './feed'; >>>>>>> import QuickUpdateStack from './quickUpdate'; import FeedStack from './feed'; <<<<<<< QuickUpdateStack, ======= FeedStack, >>>>>>> FeedStack,
<<<<<<< scrollToCommentInput = (index) => { this.postList.scrollToIndex({ animated: true, index, viewPosition: 1, viewOffset: POST_COMMENT_OFFSET * -1, }); } ======= >>>>>>>
<<<<<<< simplex = require("./rank/simplex"), ======= initRank = require("./rank/initRank"), >>>>>>> initRank = require("./rank/initRank"), simplex = require("./rank/simplex"), <<<<<<< PriorityQueue = require("cp-data").PriorityQueue, Set = require("cp-data").Set, Digraph = require("graphlib").Digraph; ======= Set = require("cp-data").Set; >>>>>>> Set = require("cp-data").Set, Digraph = require("graphlib").Digraph; <<<<<<< function rank(g, useSimplex) { ======= /* * Heuristic function that assigns a rank to each node of the input graph with * the intent of minimizing edge lengths, while respecting the `minLen` * attribute of incident edges. * * Prerequisites: * * * Input graph must be acyclic * * Each edge in the input graph must have an assigned 'minLen' attribute */ function rank(g) { >>>>>>> /* * Heuristic function that assigns a rank to each node of the input graph with * the intent of minimizing edge lengths, while respecting the `minLen` * attribute of incident edges. * * Prerequisites: * * * Input graph must be acyclic * * Each edge in the input graph must have an assigned 'minLen' attribute */ function rank(g, useSimplex) {
<<<<<<< minLen.push(minLenMap[id] = { e: e, u: u, v: v, len: 1 }); ======= minLen.push(minLenMap[id] = { u: u, v: v, len: 0 }); >>>>>>> minLen.push(minLenMap[id] = { e: e, u: u, v: v, len: 0 });
<<<<<<< ======= import Grid from '@material-ui/core/Grid'; >>>>>>> import Grid from '@material-ui/core/Grid'; <<<<<<< <div className="analytics--container" style={body}> <h1 className="headerText center">Country overview</h1> <OverviewTop /> <h2 className="headerText">Geopraphic overview of reports</h2> <Map /> ======= <h1 style={{textAlign: "center", fontFamily: "Lato"}}>CountryOverview</h1> <OverviewTop /> <div className="analytics--container" style={body}> <Map /> <Grid container spacing={0}> <Grid item xs={12} sm={6} md={4}> <LastWeekTotals /> </Grid> </Grid> >>>>>>> <div className="analytics--container" style={body}> <h1 className="headerText center">Country overview</h1> <OverviewTop /> <h2 className="headerText">Geopraphic overview of reports</h2> <Map /> <Grid container spacing={0}> <Grid item xs={12} sm={6} md={6}> <LastWeekTotals /> </Grid> </Grid>
<<<<<<< import CBSNavigation from '../../../../../Navigation/Web.React/lib/index.js'; ======= import CBSNavigation from '../Navigation/CBSNavigation'; import HealthRiskSelector from "../healthRisk/HealthRiskSelector"; import LastWeekTotals from "../lastWeekTotals/LastWeekTotals"; >>>>>>> import CBSNavigation from '../../../../../Navigation/Web.React/lib/index.js'; import HealthRiskSelector from "../healthRisk/HealthRiskSelector"; import LastWeekTotals from "../lastWeekTotals/LastWeekTotals";
<<<<<<< {/*<Map />*/} ======= <HealthRiskPerDistrictTable /> {/* <Map /> */} <ReportsPerHealthRiskPerDay></ReportsPerHealthRiskPerDay> >>>>>>> {/* <Map /> */} <ReportsPerHealthRiskPerDay></ReportsPerHealthRiskPerDay>
<<<<<<< import AccountInteractions from './AccountInteractions'; import AccountUniqueTokens from './AccountUniqueTokens'; ======= >>>>>>> import AccountUniqueTokens from './AccountUniqueTokens'; <<<<<<< <Route exact path={`${this.props.match.url}/interactions`} component={AccountInteractions} /> <Route exact path={`${this.props.match.url}/uniquetokens`} component={AccountUniqueTokens} /> ======= >>>>>>> <Route exact path={`${this.props.match.url}/uniquetokens`} component={AccountUniqueTokens} />
<<<<<<< * node = require('neo-js-blockchain'); ======= * neo = require('@cityofzion/neo-js'); >>>>>>> * node = require('@cityofzion/neo-js'); <<<<<<< * node = require('neo-js-blockchain'); ======= * neo = require('@cityofzion/neo-js'); >>>>>>> * node = require('@cityofzion/neo-js');
<<<<<<< import { sentryOptions } from './Sentry'; ======= import { contentIcons } from './ContentIcons'; >>>>>>> import { sentryOptions } from './Sentry'; import { contentIcons } from './ContentIcons'; <<<<<<< sentryOptions: { ...sentryOptions, }, ======= contentIcons: contentIcons, >>>>>>> sentryOptions: { ...sentryOptions, }, contentIcons: contentIcons,
<<<<<<< requiredTiles, ======= sidebarComponents, >>>>>>> requiredTiles, sidebarComponents, <<<<<<< requiredTiles, ======= sidebarComponents, >>>>>>> requiredTiles, sidebarComponents,
<<<<<<< pt_BR: 'Português (Brasil)', ======= ja: '日本語', >>>>>>> ja: '日本語', pt_BR: 'Português (Brasil)',
<<<<<<< "cMisc-CallServerEvent" : (eventName, d) => mp.events.callRemote(eventName, d) ======= "cMisc-CallServerEvent" : (eventName, id, price) => { mp.events.callRemote(eventName, id, price); }, >>>>>>> "cMisc-CallServerEvent" : (eventName, id, price) => mp.events.callRemote(eventName, id, price);
<<<<<<< 'moment', 'bidi/bidi', ], function($, IPython, utils, dialog, events, keyboard, moment, bidi) { ======= 'moment' ], function($, IPython, utils, i18n, dialog, events, keyboard, moment) { >>>>>>> 'moment', 'bidi/bidi', 'moment' ], function($, IPython, utils, i18n, dialog, events, keyboard, moment, bidi) { <<<<<<< var path = model.path, name = model.name, modified = model.last_modified; var running = (model.type === 'notebook' && this.sessions[path] !== undefined); name = bidi.applyBidi(name); item.data('name', name); item.data('path', path); item.data('modified', modified); ======= var running = (model.type === 'notebook' && this.sessions[model.path] !== undefined); item.data('name', model.name); item.data('path', model.path); item.data('modified', model.last_modified); >>>>>>> var running = (model.type === 'notebook' && this.sessions[model.path] !== undefined); item.data('name', bidi.applyBidi(model.name)); item.data('path', model.path); item.data('modified', model.last_modified);
<<<<<<< 'bidi/bidi', ], function($, utils, dialog, keyboard, moment, bidi) { ======= ], function($, utils, i18n, dialog, keyboard, moment) { >>>>>>> 'bidi/bidi', ], function($, utils, i18n, dialog, keyboard, moment, bidi) { <<<<<<< el.text('Last Checkpoint: ' + human_date).attr('title', long_date); ======= el.text(i18n.msg.sprintf(i18n.msg._('Last Checkpoint: %s'),human_date)).attr('title', long_date); >>>>>>> el.text(i18n.msg.sprintf(i18n.msg._('Last Checkpoint: %s'),human_date)).attr('title', long_date);
<<<<<<< { pattern: "node_modules/knockout/build/output/knockout-latest.debug.js", included: true, watched: false }, ======= "node_modules/jquery-mockjax/dist/jquery.mockjax.min.js", >>>>>>> "node_modules/jquery-mockjax/dist/jquery.mockjax.min.js", { pattern: "node_modules/knockout/build/output/knockout-latest.debug.js", included: true, watched: false },
<<<<<<< _addOrChangeColors: function(colors) { ======= _addOrChangeColors: function () { >>>>>>> _addOrChangeColors: function () { <<<<<<< } else { this._customColors = $("<div>").addClass(this.css.customColors); this._customColors.appendTo(this._colorTable); } for (row = 0; row < rowsLength; row++) { customColorsHtml += "<div class= " + this.css.colorsRow + ">"; colsLength = colors[ row ].length; //taking second dimension size for (col = 0; col < colsLength; col++) { customColorsHtml += "<div class=" + this.css.colorpickerColor + " style='background-color: " + colors[ row ][ col ] + ";'></div>"; ======= } else { this._customColors = $('<div>').addClass(this.css.customColors); this._customColors.appendTo(this._colorTable); } for (row = 0; row < rowsLength; row++) { customColorsHtml += '<div class= ' + this.css.colorsRow +'>'; colsLength = colors[row].length; //taking second dimension size for (col = 0; col < colsLength; col++) { customColorsHtml += '<div class=' + this.css.colorpickerColor + ' style="background-color: ' + colors[row][col] + ';"></div>'; >>>>>>> } else { this._customColors = $("<div>").addClass(this.css.customColors); this._customColors.appendTo(this._colorTable); } for (row = 0; row < rowsLength; row++) { customColorsHtml += "<div class= " + this.css.colorsRow + ">"; colsLength = colors[ row ].length; //taking second dimension size for (col = 0; col < colsLength; col++) { customColorsHtml += "<div class=" + this.css.colorpickerColor + ' style="background-color: ' + colors[ row ][ col ] + ';"></div>'; <<<<<<< } else { this._defaultColors = $("<div>").addClass(this.css.defaultColors); ======= } else { this._defaultColors = $('<div>').addClass(this.css.defaultColors); >>>>>>> } else { this._defaultColors = $("<div>").addClass(this.css.defaultColors); <<<<<<< for (item = 0; item < colors.length; item++) { defaultColorsHtml += "<div class=" + this.css.colorpickerColor + " style='background-color: " + colors[ item ] + ";'></div>"; ======= for (item = 0; item < colors.length; item++) { defaultColorsHtml += '<div class=' + this.css.colorpickerColor + ' style="background-color: ' + colors[item] + ';"></div>'; >>>>>>> for (item = 0; item < colors.length; item++) { defaultColorsHtml += "<div class=" + this.css.colorpickerColor + ' style="background-color: ' + colors[ item ] + ';"></div>'; <<<<<<< _setOption: function( key, value ) { var options = this.options; if (options[ key ] === value) { ======= _setOption: function ( key, value ) { if (this.options[key] === value) { >>>>>>> _setOption: function ( key, value ) { if (this.options[ key ] === value) { <<<<<<< switch (key) { case "standardColors": this._addOrChangeStandardColors(value); break; case "colors" : this._addOrChangeColors(value); break; ======= switch (key) { case 'standardColors': this._addOrChangeStandardColors(); break; case 'colors': this._addOrChangeColors(); break; >>>>>>> switch (key) { case "standardColors": this._addOrChangeStandardColors(); break; case "colors": this._addOrChangeColors(); break; <<<<<<< _rgbToHex: function(color) { var r, g, b, colHex; if (color.charAt(0) === "r") { color = color.replace("rgb(", "").replace(")", "").split(","); r = parseInt(color[ 0 ], 10).toString(16); g = parseInt(color[ 1 ], 10).toString(16); b = parseInt(color[ 2 ], 10).toString(16); r = r.length === 1 ? "0" + r : r; g = g.length === 1 ? "0" + g : g; b = b.length === 1 ? "0" + b : b; colHex = "#" + r + g + b; return colHex; ======= colorTable: function () { /* Gets the div element with the color table. returnType="object" Returns the div element with the colors. */ return this._colorTable; }, customColorTable: function () { /* Gets the div element with the custom color table. returnType="object" Returns the div element with the custom colors. */ return this._customColors; }, standardColorsTable: function () { /* Gets the div element with the standard color table. returnType="object" Returns the div element with the standard colors. */ return this._defaultColors; }, colorFromElement: function ($element) { /* Gets the color for an element from the color picker in RGB format. paramType="object" optional="false" The element in the color picker from which the color will be retrieved. returnType="string" Returns the color for the provided color element in RGB format. */ return $element.css("background-color"); }, selectedColor: function () { /* Returns the currently selected color in the color picker. Returns null if no color is selected. paramType="string" optional="false" The #RGB value of the color to be selected. returnType="string|null" Returns the selected color if available. Null if no color is selected. */ var selected = this._colorTable.find("div.selected-color"); if (selected.length) { return $.ig.util.rgbToHex(selected.css("background-color")); >>>>>>> colorTable: function () { /* Gets the div element with the color table. returnType="object" Returns the div element with the colors. */ return this._colorTable; }, customColorTable: function () { /* Gets the div element with the custom color table. returnType="object" Returns the div element with the custom colors. */ return this._customColors; }, standardColorsTable: function () { /* Gets the div element with the standard color table. returnType="object" Returns the div element with the standard colors. */ return this._defaultColors; }, colorFromElement: function ($element) { /* Gets the color for an element from the color picker in RGB format. paramType="object" optional="false" The element in the color picker from which the color will be retrieved. returnType="string" Returns the color for the provided color element in RGB format. */ return $element.css("background-color"); }, selectedColor: function () { /* Returns the currently selected color in the color picker. Returns null if no color is selected. paramType="string" optional="false" The #RGB value of the color to be selected. returnType="string|null" Returns the selected color if available. Null if no color is selected. */ var selected = this._colorTable.find("div.selected-color"); if (selected.length) { return $.ig.util.rgbToHex(selected.css("background-color")); <<<<<<< selectColor: function(color) { /* select a given color to the widget. */ var self = this; this._colorTable.find("div.selected-color").removeClass("selected-color"); var matching = this._colorTable.find("div").filter(function(index, item) { var hexColor = self._rgbToHex(item.style.backgroundColor); return hexColor && hexColor === color.toLowerCase(); }); if (matching.length > 0) { matching.addClass("selected-color"); } ======= selectColor: function (color) { /* Select a given color to the widget. paramType="string" optional="false" The #RGB value of the color to be selected. */ var matching = this._colorTable.find("div").filter(function(index, item){ var hexColor = $.ig.util.rgbToHex(item.style.backgroundColor); return hexColor && hexColor === color.toLowerCase(); }); this._changeSelectedColor(matching); >>>>>>> selectColor: function (color) { /* Select a given color to the widget. paramType="string" optional="false" The #RGB value of the color to be selected. */ var matching = this._colorTable.find("div").filter(function (index, item) { var hexColor = $.ig.util.rgbToHex(item.style.backgroundColor); return hexColor && hexColor === color.toLowerCase(); }); this._changeSelectedColor(matching);
<<<<<<< en: "Clinic", ======= en: "VDC", fr: "Arrondissement" }, "related_entities.health_center.name": { en: "VDC", >>>>>>> en: "Clinic", fr: "Arrondissement" }, "related_entities.health_center.name": { en: "Clinic",
<<<<<<< require('./db-get'); ======= require('./db'); >>>>>>> require('./db'); require('./db-get');
<<<<<<< }; exports.duplicate_form_submissions = { map: function(doc) { if (doc.type == "data_record" && doc.sms_message && doc.sms_message.form) { emit([doc.sms_message.form, doc.sms_message.from, doc.sms_message.message], doc._rev); } }, reduce: function(keys, values, rereduce){ if (rereduce){ return sum(values); } else{ return values.length; } } ======= }; /* * Allow for quering of forms based on the doc id minus the prefix. */ exports.forms = { map: function(doc) { if (doc.type !== 'form') { return; } // removes form: prefix on form docs function removePrefix(str) { return str.split(':').slice(1).join(':'); }; emit(removePrefix(doc._id)); } >>>>>>> }; exports.duplicate_form_submissions = { map: function(doc) { if (doc.type == "data_record" && doc.sms_message && doc.sms_message.form) { emit([doc.sms_message.form, doc.sms_message.from, doc.sms_message.message], doc._rev); } }, reduce: function(keys, values, rereduce){ if (rereduce){ return sum(values); } else{ return values.length; } } }; /* * Allow for quering of forms based on the doc id minus the prefix. */ exports.forms = { map: function(doc) { if (doc.type !== 'form') { return; } // removes form: prefix on form docs function removePrefix(str) { return str.split(':').slice(1).join(':'); }; emit(removePrefix(doc._id)); }
<<<<<<< exports['filter tests'] = function(test) { var contact = { phone: 'x' ======= exports['docs fail filter'] = function(test) { var related_entities = { clinic: { contact: { phone: "x" } } >>>>>>> exports['docs fail filter'] = function(test) { var contact = { phone: 'x' <<<<<<< medic: { view: function() {} } ======= view: function() {} >>>>>>> medic: { view: function() {} } <<<<<<< // TODO test for merging duplicates ======= exports['only one record in duplicates, mark transition complete'] = function(test) { // todo test.done(); }; exports['remove duplicates and replace with latest doc'] = function(test) { test.expect(7); var db = { view: function() {} }; var audit = { bulkSave: function(docs, options, cb) { test.same(docs.length, 2); test.ok(options.all_or_nothing); // new doc inherits id/rev from previous record and is deleted docs.forEach(function(doc) { if (doc._id === 'abc') { test.same(doc._rev, '1-dddd'); test.same(doc.pills, 22); } if (doc._id === 'xyz') { test.same(doc._deleted, true); } }); cb(); } }; sinon.stub(db, 'view').callsArgWith(3, null, { // ascending records rows: [ { key: [2013,4], doc: { _id: 'abc', _rev: '1-dddd', form: 'z', month: 4, year: 2013, pills: 12, reported_date: 100 } }, { key: [2013,4], doc: { _id: 'xyz', _rev: '1-kkkk', form: 'z', month: 4, year: 2013, pills: 22, reported_date: 200 } } ] }); var bulkSave = sinon.spy(audit, 'bulkSave'); var change = { doc: { _id: 'xyz', _rev: '1-kkkk', form: 'z', month: 4, year: 2013, pills: 22, reported_date: 200 } }; transition.onMatch(change, db, audit, function(err, complete) { test.equals(complete, true); test.equals(bulkSave.callCount, 1); test.done(); }); } >>>>>>> exports['only one record in duplicates, mark transition complete'] = function(test) { // todo test.done(); }; exports['remove duplicates and replace with latest doc'] = function(test) { test.expect(7); var db = { medic: { view: function() {} } }; var audit = { bulkSave: function(docs, options, cb) { test.same(docs.length, 2); test.ok(options.all_or_nothing); // new doc inherits id/rev from previous record and is deleted docs.forEach(function(doc) { if (doc._id === 'abc') { test.same(doc._rev, '1-dddd'); test.same(doc.pills, 22); } if (doc._id === 'xyz') { test.same(doc._deleted, true); } }); cb(); } }; sinon.stub(db.medic, 'view').callsArgWith(3, null, { // ascending records rows: [ { key: [2013,4], doc: { _id: 'abc', _rev: '1-dddd', form: 'z', month: 4, year: 2013, pills: 12, reported_date: 100 } }, { key: [2013,4], doc: { _id: 'xyz', _rev: '1-kkkk', form: 'z', month: 4, year: 2013, pills: 22, reported_date: 200 } } ] }); var bulkSave = sinon.spy(audit, 'bulkSave'); var change = { doc: { _id: 'xyz', _rev: '1-kkkk', form: 'z', month: 4, year: 2013, pills: 22, reported_date: 200 } }; transition.onMatch(change, db, audit, function(err, complete) { test.equals(complete, true); test.equals(bulkSave.callCount, 1); test.done(); }); }
<<<<<<< var getSettingsUpdates = function() { return { name: $scope.editUserModel.name, fullname: $scope.editUserModel.fullname, email: $scope.editUserModel.email, phone: $scope.editUserModel.phone, language: $scope.editUserModel.language && $scope.editUserModel.language.code, facility_id: $scope.editUserModel.facility && $scope.editUserModel.facility._id }; }; var getUserUpdates = function() { return { name: $scope.editUserModel.name, password: $scope.editUserModel.password, roles: getRoles($scope.editUserModel.type), facility_id: $scope.editUserModel.facility && $scope.editUserModel.facility._id }; }; var updateComplete = function(pane, err) { if (!err) { if ($scope.editUserModel.password) { // reload the page so the user can log in with the new password document.location.reload(true); } $rootScope.$broadcast('UsersUpdated', $scope.editUserModel.id); $scope.editUserModel = null; } pane.done(translateFilter('Error updating user'), err); }; $scope.updatePassword = function() { if (validatePassword()) { var pane = modal.start($('#update-password')); var updates = { password: $scope.editUserModel.password }; UpdateUser($scope.editUserModel.id, null, updates, function(err) { updateComplete(pane, err); }); } }; $scope.editUser = function(settingsOnly) { if (settingsOnly || validate()) { var modalId = settingsOnly ? '#edit-user-settings' : '#edit-user-profile'; var pane = modal.start($(modalId)); var settings = getSettingsUpdates(); var user = settingsOnly ? null : getUserUpdates(); if (settings.language && UserCtxService().name === $scope.editUserModel.name) { ======= $scope.editUser = function() { if (validate()) { var pane = modal.start($('#edit-user-profile')); var language = $scope.editUserModel.language && $scope.editUserModel.language.code; if (language && Session.userCtx().name === $scope.editUserModel.name) { >>>>>>> var getSettingsUpdates = function() { return { name: $scope.editUserModel.name, fullname: $scope.editUserModel.fullname, email: $scope.editUserModel.email, phone: $scope.editUserModel.phone, language: $scope.editUserModel.language && $scope.editUserModel.language.code, facility_id: $scope.editUserModel.facility && $scope.editUserModel.facility._id }; }; var getUserUpdates = function() { return { name: $scope.editUserModel.name, password: $scope.editUserModel.password, roles: getRoles($scope.editUserModel.type), facility_id: $scope.editUserModel.facility && $scope.editUserModel.facility._id }; }; var updateComplete = function(pane, err) { if (!err) { if ($scope.editUserModel.password) { // reload the page so the user can log in with the new password document.location.reload(true); } $rootScope.$broadcast('UsersUpdated', $scope.editUserModel.id); $scope.editUserModel = null; } pane.done(translateFilter('Error updating user'), err); }; $scope.updatePassword = function() { if (validatePassword()) { var pane = modal.start($('#update-password')); var updates = { password: $scope.editUserModel.password }; UpdateUser($scope.editUserModel.id, null, updates, function(err) { updateComplete(pane, err); }); } }; $scope.editUser = function(settingsOnly) { if (settingsOnly || validate()) { var modalId = settingsOnly ? '#edit-user-settings' : '#edit-user-profile'; var pane = modal.start($(modalId)); var settings = getSettingsUpdates(); var user = settingsOnly ? null : getUserUpdates(); if (settings.language && Session.userCtx().name === $scope.editUserModel.name) {
<<<<<<< locale = utils.getLocale(doc), eventType = getEventType(config, doc); ======= mute; >>>>>>> eventType = getEventType(config, doc); <<<<<<< function addErr(event_type) { var msg = getMessage(config, event_type); if (msg) { messages.addError(doc, messages.getMessage(msg, locale)); } else { messages.addError(doc, event_type); } } function addMsg(event_type) { var msg = getMessage(config, event_type); messages.addMessage({ doc: doc, message: messages.getMessage(msg, locale), phone: messages.getRecipientPhone(doc, msg.recipient), registrations: registrations }); } ======= >>>>>>> <<<<<<< module.exports.modifyRegistration({ audit: audit, mute: eventType.mute, ======= self.modifyRegistration({ db: audit, mute: mute, >>>>>>> self.modifyRegistration({ audit: audit, mute: eventType.mute,
<<<<<<< exports.getAppInfo = function(user) { var gateway, info, muvuku; ======= exports.getAppInfo = function() { var info, muvuku, app_settings = getSettings(); >>>>>>> exports.getAppInfo = function() { var gateway, info, muvuku, app_settings = getSettings(); <<<<<<< if (this.app_settings) { gateway = this.app_settings.gateway_number; info.muvuku_webapp_url = info.muvuku_webapp_url || this.app_settings.muvuku_webapp_url; ======= _.extend(info, app_settings || {}); if (app_settings && app_settings.muvuku_webapp_url) { info.muvuku_webapp_url = app_settings.muvuku_webapp_url; >>>>>>> if (app_settings) { gateway = this.app_settings.gateway_number; info.muvuku_webapp_url = info.muvuku_webapp_url || app_settings.muvuku_webapp_url; _.extend(info, app_settings); <<<<<<< _.extend(info, { gateway_number: gateway, sha: this.kanso && this.kanso.git && this.kanso.git.commit }); ======= info.sha = this.kanso && this.kanso.git && this.kanso.git.commit; >>>>>>> info.sha = this.kanso && this.kanso.git && this.kanso.git.commit;
<<<<<<< app.get('/api/v1/messages', function(req, res) { auth.check(req, 'can_view_data_records', null, function(err, ctx) { if (err) { return error(err, res); } auth.check(req, 'can_view_unallocated_data_records', null, function(err, ctx) { if (err) { return error(err, res); } var opts = _.pick(req.query, 'limit', 'start', 'descending', 'state'); messages.getMessages(opts, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); }); app.get('/api/v1/messages/:id', function(req, res) { auth.check(req, 'can_view_data_records', null, function(err, ctx) { if (err) { return error(err, res); } auth.check(req, 'can_view_unallocated_data_records', null, function(err, ctx) { if (err) { return error(err, res); } messages.getMessage(req.params.id, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); }); app.put('/api/v1/messages/state/:id', jsonParser, function(req, res) { auth.check(req, 'can_update_messages', null, function(err, ctx) { if (err) { return error(err, res); } messages.updateMessage(req.params.id, req.body, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); app.post('/api/v1/records', [jsonParser, formParser], function(req, res) { auth.check(req, 'can_create_records', null, function(err, ctx) { var create; if (err) { return error(err, res); } if (req.headers['content-type'].toLowerCase() === 'application/x-www-form-urlencoded') { create = records.createRecord; } else if (req.headers['content-type'].toLowerCase() === 'application/json') { create = records.createRecordJSON; } else { return error('Content type not supported.', res); } create(req.body, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); ======= >>>>>>> app.get('/api/v1/messages', function(req, res) { auth.check(req, 'can_view_data_records', null, function(err, ctx) { if (err) { return error(err, res); } auth.check(req, 'can_view_unallocated_data_records', null, function(err, ctx) { if (err) { return error(err, res); } var opts = _.pick(req.query, 'limit', 'start', 'descending', 'state'); messages.getMessages(opts, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); }); app.get('/api/v1/messages/:id', function(req, res) { auth.check(req, 'can_view_data_records', null, function(err, ctx) { if (err) { return error(err, res); } auth.check(req, 'can_view_unallocated_data_records', null, function(err, ctx) { if (err) { return error(err, res); } messages.getMessage(req.params.id, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); }); app.put('/api/v1/messages/state/:id', jsonParser, function(req, res) { auth.check(req, 'can_update_messages', null, function(err, ctx) { if (err) { return error(err, res); } messages.updateMessage(req.params.id, req.body, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); }); app.post('/api/v1/records', [jsonParser, formParser], function(req, res) { auth.check(req, 'can_create_records', null, function(err, ctx) { var create; if (err) { return error(err, res); } if (req.headers['content-type'].toLowerCase() === 'application/x-www-form-urlencoded') { create = records.createRecord; } else if (req.headers['content-type'].toLowerCase() === 'application/json') { create = records.createRecordJSON; } else { return error('Content type not supported.', res); } create(req.body, ctx && ctx.district, function(err, result) { if (err) { return error(err, res); } res.json(result); }); }); });
<<<<<<< var updateParent = function(DB, doc, callback) { if (doc.type === 'person' && doc.parent && doc.parent._id) { DB.get() .get(doc.parent._id) .then(function(parent) { if (parent.contact.phone !== doc.phone) { return callback(); } parent.contact = null; DB.get() .put(parent) .then(function() { callback(); }) .catch(function(err) { callback(err); }); }) .catch(function(err) { if (err.reason === 'deleted') { return callback(); } return callback(err); }); } else { callback(); } }; inboxServices.factory('DeleteDoc', ['$rootScope', 'DB', function($rootScope, DB) { ======= inboxServices.factory('DeleteDoc', ['$rootScope', 'db', function($rootScope, db) { var updateParent = function(doc, callback) { if (doc.type === 'person' && doc.parent && doc.parent._id) { db.getDoc(doc.parent._id, function(err, parent) { if (err) { if (err.reason === 'deleted') { return callback(); } return callback(err); } if (parent.contact.phone !== doc.phone) { return callback(); } parent.contact = null; db.saveDoc(parent, function(err) { if (err) { return callback(err); } $rootScope.$broadcast('ContactUpdated', parent); callback(); }); }); } else { callback(); } }; >>>>>>> inboxServices.factory('DeleteDoc', ['$rootScope', 'DB', function($rootScope, DB) { var updateParent = function(doc, callback) { if (doc.type === 'person' && doc.parent && doc.parent._id) { DB.get() .get(doc.parent._id) .then(function(parent) { if (parent.contact.phone !== doc.phone) { return callback(); } parent.contact = null; DB.get() .put(parent) .then(function() { $rootScope.$broadcast('ContactUpdated', parent); callback(); }) .catch(function(err) { callback(err); }); }) .catch(function(err) { if (err.reason === 'deleted') { return callback(); } return callback(err); }); } else { callback(); } }; <<<<<<< DB.get() .get(docId) .then(function(doc) { updateParent(DB, doc, function(err) { ======= db.getDoc(docId, function(err, doc) { if (err) { return callback(err); } updateParent(doc, function(err) { if (err) { return callback(err); } doc._deleted = true; db.saveDoc(doc, function(err) { >>>>>>> DB.get() .get(docId) .then(function(doc) { updateParent(doc, function(err) {
<<<<<<< ======= exports.sms_forms = function (doc, req) { events.on('afterResponse', function() { var db = require('db').current(), isAdmin = utils.isUserAdmin(req.userCtx), baseURL = require('duality/core').getBaseURL(), district = utils.getUserDistrict(req.userCtx), q = {startkey: [district], endkey: [district,{}], group: true}; $('.page-header h1').text('SMS Forms Data'); $('.navbar .nav *').removeClass('active'); $('.navbar .nav .home').addClass('active'); $('.page-header .controls').hide(); // render available downloads based on data available // user must either be admin or have associated district to view records if (isAdmin || district) { q = isAdmin ? {group: true} : q; db.getView( 'kujua-export', 'data_records_valid_by_district_and_form', q, renderDownloadForms); } else { renderDownloadForms(null, []); } }); return { title: 'SMS Forms', content: templates.render('sms_forms.html', req, {}) }; }; >>>>>>> exports.sms_forms = function (doc, req) { events.on('afterResponse', function() { var db = require('db').current(), isAdmin = utils.isUserAdmin(req.userCtx), baseURL = require('duality/core').getBaseURL(), district = utils.getUserDistrict(req.userCtx), q = {startkey: [district], endkey: [district,{}], group: true}; $('.page-header h1').text('SMS Forms Data'); $('.navbar .nav *').removeClass('active'); $('.navbar .nav .home').addClass('active'); $('.page-header .controls').hide(); // render available downloads based on data available // user must either be admin or have associated district to view records if (isAdmin || district) { q = isAdmin ? {group: true} : q; db.getView( 'kujua-export', 'data_records_valid_by_district_and_form', q, renderDownloadForms); } else { renderDownloadForms(null, []); } }); return { title: 'SMS Forms', content: templates.render('sms_forms.html', req, {}) }; }; <<<<<<< $('.navbar .nav > *').removeClass('active'); $('.navbar .nav .facilities').addClass('active'); ======= $('.navbar .nav > *').removeClass('active'); $('.navbar .nav .facilities').addClass('active'); $('.page-header .controls').hide(); var q, view; if (_.indexOf(req.userCtx.roles, 'national_admin') !== -1) { view = 'facilities'; q = { startkey: ['clinic'], endkey: ['clinic', {}], include_docs: true }; } else if (_.indexOf(req.userCtx.roles, 'district_admin') !== -1) { var district = req.userCtx.name.toLowerCase(); view = 'facilities_by_district'; q = { startkey: [district, 'clinic'], endkey: [district, 'clinic', {}], include_docs: true }; } else { // should not display facilities $('#content').html( '<p class="facilities_msg">You must be a district or national admin to edit facilities</p>' ); return; } >>>>>>> $('.navbar .nav > *').removeClass('active'); $('.navbar .nav .facilities').addClass('active'); $('.page-header .controls').hide(); var q, view; if (_.indexOf(req.userCtx.roles, 'national_admin') !== -1) { view = 'facilities'; q = { startkey: ['clinic'], endkey: ['clinic', {}], include_docs: true }; } else if (_.indexOf(req.userCtx.roles, 'district_admin') !== -1) { var district = req.userCtx.name.toLowerCase(); view = 'facilities_by_district'; q = { startkey: [district, 'clinic'], endkey: [district, 'clinic', {}], include_docs: true }; } else { // should not display facilities $('#content').html( '<p class="facilities_msg">You must be a district or national admin to edit facilities</p>' ); return; } <<<<<<< columns: [ { label: 'Name and Surname', property: ['contact', 'name'], type: 'string' }, { label: 'Health Center', property: ['parent', 'name'], type: 'string' }, { label: 'Village', property: ['name'], type: 'string' }, { label: 'RC Code', property: ['contact', 'rc_code'], type: 'string' }, { label: 'Phone', property: ['contact', 'phone'], type: 'string' } ], data: docs, save: function (doc, callback) { db.saveDoc(doc, function (err, res) { if (err) { return callback(err); } doc._rev = res.rev; callback(null, doc); }); }, create: function (callback) { db.newUUID(function (err, uuid) { if (err) { return callback(err); } callback(null, { _id: uuid, type: 'clinic' }); }); } }); }); }); return { title: 'Facilities', content: templates.render('facilities.html', req, { tab: {'clinics': true} }) }; }; exports.health_centers = function (doc, req) { events.once('afterResponse', function () { $('.page-header h1').text('Facilities'); $('.navbar .nav > *').removeClass('active'); $('.navbar .nav .facilities').addClass('active'); $('.page-header .controls').hide(); var q, view; if (_.indexOf(req.userCtx.roles, 'national_admin') !== -1) { view = 'facilities'; q = { startkey: ['health_center'], endkey: ['health_center', {}], include_docs: true }; } else if (_.indexOf(req.userCtx.roles, 'district_admin') !== -1) { var district = req.userCtx.name.toLowerCase(); view = 'facilities_by_district'; q = { startkey: [district, 'health_center'], endkey: [district, 'health_center', {}], include_docs: true }; } else { // should not display facilities $('#content').html( '<p class="facilities_msg">You must be a district or national admin to edit facilities</p>' ); return; } var db = require('db').current(); db.getView('kujua-export', view, q, function (err, data) { if (err) { return console.log(err); } var docs = _.map(data.rows, function (row) { return row.doc; }); $('#facilities').spreadsheet({ columns: [ { label: 'Name and Surname', property: ['contact', 'name'], type: 'string' }, { label: 'Health Center', property: ['name'], type: 'string' }, { label: 'RC Code', property: ['contact', 'rc_code'], type: 'string' }, { label: 'Phone', property: ['contact', 'phone'], type: 'string' } ======= columns: [ { label: 'Name and Surname', property: ['contact', 'name'], type: 'string' }, { label: 'Health Center', property: ['name'], type: 'string' }, { label: 'RC Code', property: ['contact', 'rc_code'], type: 'string' }, { label: 'Phone', property: ['contact', 'phone'], type: 'string' } >>>>>>> columns: [ { label: 'Name and Surname', property: ['contact', 'name'], type: 'string' }, { label: 'Health Center', property: ['name'], type: 'string' }, { label: 'RC Code', property: ['contact', 'rc_code'], type: 'string' }, { label: 'Phone', property: ['contact', 'phone'], type: 'string' }
<<<<<<< phoneUtil = require('google-libphonenumber').PhoneNumberUtil.getInstance(), ======= >>>>>>>
<<<<<<< const db = require('../db-nano'), dbPouch = require('../db-pouch'), { logger } = require('../lib/logger'), infoDocId = id => id + '-info'; ======= const db = require('../db-pouch'), logger = require('../lib/logger'), infoDocId = id => id + '-info'; >>>>>>> const db = require('../db-pouch'), { logger } = require('../lib/logger'), infoDocId = id => id + '-info';
<<<<<<< //Markdown import VueShowdown from 'vue-showdown' import Editor from 'v-markdown-editor' import 'v-markdown-editor/dist/v-markdown-editor.css' (function (OC, window, $, undefined) { ======= (function (OC, window) { >>>>>>> //Markdown import VueShowdown from 'vue-showdown' import Editor from 'v-markdown-editor' import 'v-markdown-editor/dist/v-markdown-editor.css' (function (OC, window) {
<<<<<<< this.setState({ showAddWidgetModal: true, newWidget: getEmptyWidgetDefinition() }) } filterModalEnabler = () => { this.setState({ showFilterModal: true, selectedFilter: getEmptyFilterDefinition() }) ======= this.setState({ showAddWidgetModal: true, newWidget: getEmptyWidgetDefinition(), newWidgetApiParams: {} }) >>>>>>> this.setState({ showAddWidgetModal: true, newWidget: getEmptyWidgetDefinition(), newWidgetApiParams: {} }) } filterModalEnabler = () => { this.setState({ showFilterModal: true, selectedFilter: getEmptyFilterDefinition() }) <<<<<<< this.props.widgetAdditionHandler(this.props.selectedDashboardIndex, this.state.newWidget) let widgetApiParams = this.state.widgetApiParams.slice() widgetApiParams.push({}) this.setState({ showAddWidgetModal: false, widgetApiParams: widgetApiParams }) ======= this.props.widgetAdditionHandler(this.props.selectedDashboardIndex, this.state.newWidget) this.setState({ showAddWidgetModal: false, newWidget: {} }) >>>>>>> this.props.widgetAdditionHandler(this.props.selectedDashboardIndex, this.state.newWidget) this.setState({ showAddWidgetModal: false, newWidget: {} }) <<<<<<< if (isJsonString(this.state.editorContent)) { let updatedWidgetDefinition = Object.assign({}, this.state.selectedWidget) updatedWidgetDefinition.chartStyles = JSON.parse(this.state.editorContent) let widgetApiParams = this.state.widgetApiParams.slice() updatedWidgetDefinition.apiParams = widgetApiParams[this.selectedWidgetIndex] this.props.updateWidgetDefinition(this.props.selectedDashboardIndex, this.selectedWidgetIndex, updatedWidgetDefinition) this.setState({ showEditWidgetModal: false }) } else { console.error(INCORRECT_JSON_ERROR) } ======= if (isJsonString(this.state.editorContent)) { let updatedWidgetDefinition = Object.assign({}, this.state.selectedWidget) updatedWidgetDefinition.chartStyles = JSON.parse(this.state.editorContent) this.props.updateWidgetDefinition(this.props.dashboardIndex, this.selectedWidgetIndex, updatedWidgetDefinition) this.setState({ showEditWidgetModal: false }) } else { console.error(INCORRECT_JSON_ERROR) } >>>>>>> if (isJsonString(this.state.editorContent)) { let updatedWidgetDefinition = Object.assign({}, this.state.selectedWidget) updatedWidgetDefinition.chartStyles = JSON.parse(this.state.editorContent) this.props.updateWidgetDefinition(this.props.dashboardIndex, this.selectedWidgetIndex, updatedWidgetDefinition) this.setState({ showEditWidgetModal: false }) } else { console.error(INCORRECT_JSON_ERROR) } <<<<<<< selectedDashboardIndex, deleteFilter, filterResizeHandler, filterRepositionHandler ======= selectedDashboardIndex, dashboardIndex, googleDefined >>>>>>> selectedDashboardIndex, dashboardIndex, googleDefined, deleteFilter, filterResizeHandler, filterRepositionHandler <<<<<<< let currentWidgetParams = this.state.widgetApiParams[this.selectedWidgetIndex] const {selectedWidget, editorContent, newWidget, selectedFilter} = this.state const filterModalContent = selectedFilter? <div className="row"> <div className="col-md-12"> <label className="col-md-4">Filter Label: </label> <input type="text" ref="filterLabel" value={selectedFilter.label} onChange={(event)=>this.updateFilterDefinition('label', event.target.value)} /> </div> <div className="col-md-12"> <label className="col-md-4">Filter Type: </label> <div className="col-md-5" style={{paddingLeft: '0', paddingRight: '35px'}}> <Select options={FILTER_TYPES} value={selectedFilter.type} onChange={(format)=>this.updateFilterDefinition( 'type', format?format.value:null )} /> </div> </div> {(selectedFilter.type === 'dropdown')? <div className="col-md-12"> <label className="col-md-4">Api Url: </label> <input type="text" ref="filterLabel" value={selectedFilter.apiUrl} onChange={(event)=>this.updateFilterDefinition('apiUrl', event.target.value)} /> </div> : null } </div> : null ======= const {selectedWidget, editorContent, newWidget, newWidgetApiParams} = this.state >>>>>>> const { selectedWidget, editorContent, newWidget, newWidgetApiParams, selectedFilter } = this.state const filterModalContent = selectedFilter? <div className="row"> <div className="col-md-12"> <label className="col-md-4">Filter Label: </label> <input type="text" ref="filterLabel" value={selectedFilter.label} onChange={(event)=>this.updateFilterDefinition('label', event.target.value)} /> </div> <div className="col-md-12"> <label className="col-md-4">Filter Type: </label> <div className="col-md-5" style={{paddingLeft: '0', paddingRight: '35px'}}> <Select options={FILTER_TYPES} value={selectedFilter.type} onChange={(format)=>this.updateFilterDefinition( 'type', format?format.value:null )} /> </div> </div> {(selectedFilter.type === 'dropdown')? <div className="col-md-12"> <label className="col-md-4">Api Url: </label> <input type="text" ref="filterLabel" value={selectedFilter.apiUrl} onChange={(event)=>this.updateFilterDefinition('apiUrl', event.target.value)} /> </div> : null } </div> : null
<<<<<<< null } <div id="dashboardArea" style={dashboardDefinition.styles}> ======= null} <div ref="dashboardArea" id="dashboardArea" style={dashboardDefinition.styles}> >>>>>>> null } <div ref="dashboardArea" id="dashboardArea" style={dashboardDefinition.styles}>
<<<<<<< ======= // const tempChartData = { // cols: [{id: 'task', label: 'Task', type: 'string'}, // {id: 'hours', label: 'Hours', type: 'number'}, // {id: 'revenue', label: 'Amount', type: 'number'}], // rows: [{c:[{v: 'Work'}, {v: 11}, {v: 8}]}, // {c:[{v: 'Eat'}, {v: 2}, {v: 6}]}, // {c:[{v: 'Commute'}, {v: 6}, {v: 4}]}, // {c:[{v: 'Watch TV'}, {v:8}, {v: 2}]}, // {c:[{v: 'Sleep'}, {v:7}, {v: 10}]}] // } >>>>>>> <<<<<<< // Toggles the edit mode of this component editModeToggler = () => { this.setState({editMode: !this.state.editMode}) } // Updates the size of the widget in the state of dashboard container widgetSizeUpdator = () => { const {selectedDashboardIndex, index} = this.props this.props.widgetResizeHandler( selectedDashboardIndex, index, this.state.width, this.state.height ) } ======= >>>>>>> <<<<<<< <Rnd ref={'widget'+index} x={left} y={top} width={width} height={height} onResize={this.widgetResizeHandler} onResizeStop={this.widgetSizeUpdator} onDragStop={this.widgetPositionHandler} resizeGrid={[10,10]} moveGrid={[10,10]} > <div onMouseEnter={this.editModeToggler} onMouseLeave={this.editModeToggler} ======= (widgetData && googleDefined)? <Rnd x={widgetData.left} y={widgetData.top} width={widgetData.width} height={widgetData.height} onResize={this.widgetResizeHandler} onDragStop={this.widgetPositionHandler} >>>>>>> (widgetData && googleDefined)? <Rnd x={widgetData.left} y={widgetData.top} width={widgetData.width} height={widgetData.height} onResize={this.widgetResizeHandler} onDragStop={this.widgetPositionHandler}
<<<<<<< export const DATE_FORMAT_OPTIONS = [ { label: 'DD-MM-YYYY', value: 'DD-MM-YYYY' }, { label:'DD-MM-YY', value:'DD-MM-YY' }, { label:'YY-MM-DD', value:'YY-MM-DD' }, { label:'DD-MMM-YYYY', value:'DD-MMM-YYYY' }, { label:'DD-MMM-YY', value:'DD-MMM-YY' }, { label: 'DD/MM/YYYY', value: 'DD/MM/YYYY' }, { label:'DD/MM/YY', value:'DD/MM/YY' }, { label:'YY/MM/DD', value:'YY/MM/DD' }, { label:'DD/MMM/YYYY', value:'DD/MMM/YYYY' }, { label:'DD/MMM/YY', value:'DD/MMM/YY' }, { } ] export const TIME_FORMAT_OPTIONS = [ { label:'HH:mm:ss', value:'HH:mm:ss' },{ label:'HH:mm', value:'HH:mm' }, { label:'h:mm:ss A', value:'h:mm:ss A' } , { label:'h:mm:ss AM/PM', value:'LT' } ] ======= export const PARAM_TYPE_OPTIONS = [ { label: 'User', value: 'user' }, { label: 'Query', value: 'query' } ] >>>>>>> export const DATE_FORMAT_OPTIONS = [ { label: 'DD-MM-YYYY', value: 'DD-MM-YYYY' }, { label:'DD-MM-YY', value:'DD-MM-YY' }, { label:'YY-MM-DD', value:'YY-MM-DD' }, { label:'DD-MMM-YYYY', value:'DD-MMM-YYYY' }, { label:'DD-MMM-YY', value:'DD-MMM-YY' }, { label: 'DD/MM/YYYY', value: 'DD/MM/YYYY' }, { label:'DD/MM/YY', value:'DD/MM/YY' }, { label:'YY/MM/DD', value:'YY/MM/DD' }, { label:'DD/MMM/YYYY', value:'DD/MMM/YYYY' }, { label:'DD/MMM/YY', value:'DD/MMM/YY' }, { } ] export const PARAM_TYPE_OPTIONS = [ { label: 'User', value: 'user' }, { label: 'Query', value: 'query' } ] export const TIME_FORMAT_OPTIONS = [ { label:'HH:mm:ss', value:'HH:mm:ss' },{ label:'HH:mm', value:'HH:mm' }, { label:'h:mm:ss A', value:'h:mm:ss A' } , { label:'h:mm:ss AM/PM', value:'LT' } ]
<<<<<<< newWidgetApiParams: {}, widgetApiParams: [], ======= widgetApiParams: this.props.dashboardDefinition.widgetsParams?this.props.dashboardDefinition.widgetsParams:[], >>>>>>> newWidgetApiParams: {}, <<<<<<< const { dashboardDefinition, dashboardIndex, updateWidgetDefinition } = this.props let newWidgetDefinition = dashboardDefinition.widgets[this.selectedWidgetIndex] newWidgetDefinition.apiParams[''] = '' updateWidgetDefinition(dashboardIndex, this.selectedWidgetIndex, newWidgetDefinition) this.setState({ selectedWidget: newWidgetDefinition }) ======= let widgetParam = this.state.widgetApiParams.slice() if (widgetParam[this.selectedWidgetIndex].hasOwnProperty('')) { this.setState({apiParamMessage:'Parameter name cannot be empty.'}) } else { widgetParam[this.selectedWidgetIndex][''] = '' this.setState({ widgetApiParams: widgetParam, apiParamMessage: '' }) } >>>>>>> const { dashboardDefinition, dashboardIndex, updateWidgetDefinition } = this.props let newWidgetDefinition = dashboardDefinition.widgets[this.selectedWidgetIndex] newWidgetDefinition.apiParams[''] = '' updateWidgetDefinition(dashboardIndex, this.selectedWidgetIndex, newWidgetDefinition) this.setState({ selectedWidget: newWidgetDefinition }) <<<<<<< selectedWidget: newWidgetDefinition ======= widgetApiParams: widgetParam, apiParamMessage: '' >>>>>>> selectedWidget: newWidgetDefinition
<<<<<<< onResultTabChanged, resultSectionActiveKey ======= onResultTabChanged, resultLoading, dataLoading, visualisationLoading >>>>>>> onResultTabChanged, resultSectionActiveKey, resultLoading, dataLoading, visualisationLoading <<<<<<< resultSectionActiveKey={resultSectionActiveKey} ======= resultLoading={resultLoading} dataLoading={dataLoading} visualisationLoading={visualisationLoading} >>>>>>> resultSectionActiveKey={resultSectionActiveKey} resultLoading={resultLoading} dataLoading={dataLoading} visualisationLoading={visualisationLoading}