conflict_resolution
stringlengths
27
16k
<<<<<<< (function (lcovParse, Q, Joi, logger, util, path) { ======= (function (lcovParse, Promise, Joi, logger, path) { >>>>>>> (function (lcovParse, Promise, Joi, logger, util, path) { <<<<<<< }(require('lcov-parse'), require('q'), require('joi'), require('../logger')(), require('../util'), require('path'))); ======= }(require('lcov-parse'), require('bluebird'), require('joi'), require('../logger')(), require('path'))); >>>>>>> }(require('lcov-parse'), require('bluebird'), require('joi'), require('../logger')(), require('../util'), require('path')));
<<<<<<< var arrayClone = function(){return this.slice()} // All our new methods, what they'll be called and their functions var types = { Array:{ findItem:findItem, extend:extend, contains:contains, clone:arrayClone }, Object:{ getKeys:getKeys, getSize:getSize, getPath:getPath }, String:{ contains:contains, startsWith:startsWith, endsWith:endsWith, repeat:repeat, forEach:Array.prototype.forEach // Strings don't have .forEach() standard but the one from Array works fine }, NodeList:{ forEach:Array.prototype.forEach // Ditto Nodelists } } var addMethods = function(global) { for ( var type in types ) { // Not all types exist - specifically NodeLists don't exist in the node global. if ( global.hasOwnProperty(type) ) { for ( var method in types[type] ) { Object.defineProperty( global[type].prototype, method, {value: types[type][method], enumerable: false}); } } } } addMethods(this) ======= >>>>>>>
<<<<<<< scope.sfIdentifier = scope.sfIdentifier || 'Id'; scope.selectedItemIds = scope.selectedItemIds || []; ======= scope.selectedItems = scope.selectedItems || []; scope.hierarchy = {}; >>>>>>> scope.selectedItems = scope.selectedItems || []; <<<<<<< scope.bind = function () { scope.hierarchy = {}; // Initial load of root elements scope.sfRequestChildren({ parent: null }).then(function (items) { if (items && items instanceof Array) { items.forEach(function (item) { scope.hierarchy[item[scope.sfIdentifier]] = new TreeNode(item); }); } }); }; scope.bind(); ======= // Initial load of root elements scope.sfRequestChildren({ parent: null }).then(function (items) { if (items && items instanceof Array) { items.forEach(function (item) { if (scope.sfIdentifier) { scope.hierarchy[item[scope.sfIdentifier]] = new TreeNode(item); } else if (item.Id) { scope.hierarchy[item.Id] = new TreeNode(item); } else { scope.hierarchy[item] = new TreeNode(item); } }); } }); >>>>>>> scope.bind = function () { scope.hierarchy = {}; // Initial load of root elements // Initial load of root elements scope.sfRequestChildren({ parent: null }).then(function (items) { if (items && items instanceof Array) { items.forEach(function (item) { if (scope.sfIdentifier) { scope.hierarchy[item[scope.sfIdentifier]] = new TreeNode(item); } else if (item.Id) { scope.hierarchy[item.Id] = new TreeNode(item); } else { scope.hierarchy[item] = new TreeNode(item); } }); } }); }; scope.bind();
<<<<<<< ctrl.removeUnselectedItems = function () { if (ctrl.$scope.multiselect) { var reoderedItems = []; if (ctrl.$scope.selectedItemsViewData && ctrl.$scope.selectedItemsViewData.length > 0) { for (var i = 0; i < ctrl.$scope.selectedItemsViewData.length; i++) { for (var j = 0; j < ctrl.$scope.selectedItemsInTheDialog.length; j++) { if ((ctrl.$scope.selectedItemsInTheDialog[j].Id && ctrl.$scope.selectedItemsInTheDialog[j].Id === ctrl.$scope.selectedItemsViewData[i].Id) || (ctrl.$scope.selectedItemsInTheDialog[j].ExternalPageId && ctrl.$scope.selectedItemsInTheDialog[j].ExternalPageId === ctrl.$scope.selectedItemsViewData[i].ExternalPageId)) { reoderedItems.push(ctrl.$scope.selectedItemsInTheDialog[j]); break; } } } ctrl.$scope.selectedItemsInTheDialog = []; Array.prototype.push.apply(ctrl.$scope.selectedItemsInTheDialog, reoderedItems); } ctrl.$scope.selectedItemsViewData = []; } }; ctrl.fetchSelectedItems = function () { if (ctrl.$scope.multiselect && ctrl.$scope.sfSelectedItems) return ctrl.$scope.sfSelectedItems; else if (!ctrl.$scope.multiselect && ctrl.$scope.sfSelectedItem) return ctrl.$scope.sfSelectedItem; var ids = ctrl.$scope.getSelectedIds(); currentSelectedIds = ids; if (ids.length === 0) { return; } return ctrl.getSpecificItems(ids) .then(function (data) { ////ctrl.updateSelection(data.Items); ctrl.onSelectedItemsLoadedSuccess(data); }, ctrl.onError) .finally(function () { ctrl.$scope.showLoadingIndicator = false; }); }; ======= // Adds multilingual support. ctrl.$scope.bindPageIdentifierField = function (dataItem) { return pageService.getPageTitleByCulture(dataItem, getCulture()); }; ctrl.OnItemsFiltering = function (items) { var culture = getCulture(); if (items && culture) { return items.filter(function (element) { // Check only in multilingual. if (element.AvailableLanguages.length > 0) { return element.AvailableLanguages.indexOf(culture) > -1; } return true; }); } return items; }; >>>>>>> ctrl.removeUnselectedItems = function () { if (ctrl.$scope.multiselect) { var reoderedItems = []; if (ctrl.$scope.selectedItemsViewData && ctrl.$scope.selectedItemsViewData.length > 0) { for (var i = 0; i < ctrl.$scope.selectedItemsViewData.length; i++) { for (var j = 0; j < ctrl.$scope.selectedItemsInTheDialog.length; j++) { if ((ctrl.$scope.selectedItemsInTheDialog[j].Id && ctrl.$scope.selectedItemsInTheDialog[j].Id === ctrl.$scope.selectedItemsViewData[i].Id) || (ctrl.$scope.selectedItemsInTheDialog[j].ExternalPageId && ctrl.$scope.selectedItemsInTheDialog[j].ExternalPageId === ctrl.$scope.selectedItemsViewData[i].ExternalPageId)) { reoderedItems.push(ctrl.$scope.selectedItemsInTheDialog[j]); break; } } } ctrl.$scope.selectedItemsInTheDialog = []; Array.prototype.push.apply(ctrl.$scope.selectedItemsInTheDialog, reoderedItems); } ctrl.$scope.selectedItemsViewData = []; } }; ctrl.fetchSelectedItems = function () { if (ctrl.$scope.multiselect && ctrl.$scope.sfSelectedItems) return ctrl.$scope.sfSelectedItems; else if (!ctrl.$scope.multiselect && ctrl.$scope.sfSelectedItem) return ctrl.$scope.sfSelectedItem; var ids = ctrl.$scope.getSelectedIds(); currentSelectedIds = ids; if (ids.length === 0) { return; } return ctrl.getSpecificItems(ids) .then(function (data) { ////ctrl.updateSelection(data.Items); ctrl.onSelectedItemsLoadedSuccess(data); }, ctrl.onError) .finally(function () { ctrl.$scope.showLoadingIndicator = false; }); }; // Adds multilingual support. ctrl.$scope.bindPageIdentifierField = function (dataItem) { return pageService.getPageTitleByCulture(dataItem, getCulture()); }; ctrl.OnItemsFiltering = function (items) { var culture = getCulture(); if (items && culture) { return items.filter(function (element) { // Check only in multilingual. if (element.AvailableLanguages.length > 0) { return element.AvailableLanguages.indexOf(culture) > -1; } return true; }); } return items; };
<<<<<<< //For multiple selection selectedItems: '=?', selectedIds: '=?', provider: '=?', taxonomyId: '=?', /* flat-selector */ itemType: '@?' /* content-selector */ ======= provider: '=?', /* content-selector */ taxonomyId: '=?', /* taxon-selector */ itemType: '=?', /* dynamic-items-selector */ identifierField: '=?' >>>>>>> //For multiple selection selectedItems: '=?', selectedIds: '=?', provider: '=?', taxonomyId: '=?', /* taxon-selector */ itemType: '=?', /* dynamic-items-selector */ identifierField: '=?' <<<<<<< this.updateSelectedItems = function (selectedItem) { if (!$scope.multiselect && !$scope.selectedItem) { $scope.selectedItem = selectedItem; } if (!$scope.selectedItems) { $scope.selectedItems = []; } var selectedIds = $scope.selectedItems.map(function (item) { return item.Id; }); if (selectedIds.indexOf(selectedItem.Id) < 0) { $scope.selectedItems.push(selectedItem); } ======= this.getItemType = function () { return $scope.itemType; }; this.updateSelectedItem = function (selectedItem) { $scope.selectedItem = selectedItem; >>>>>>> this.getItemType = function () { return $scope.itemType; }; this.updateSelectedItems = function (selectedItem) { if (!$scope.multiselect && !$scope.selectedItem) { $scope.selectedItem = selectedItem; } if (!$scope.selectedItems) { $scope.selectedItems = []; } var selectedIds = $scope.selectedItems.map(function (item) { return item.Id; }); if (selectedIds.indexOf(selectedItem.Id) < 0) { $scope.selectedItems.push(selectedItem); } <<<<<<< if (error && error.data && error.data.ResponseStatus) ======= if (error && error.data.ResponseStatus) { >>>>>>> if (error && error.data && error.data.ResponseStatus) { <<<<<<< var getSelectedIds = function () { if (attrs.multiselect) { if (scope.selectedIds && scope.selectedIds.length > 0) { return scope.selectedIds; } else if (scope.selectedItems && scope.selectedItems.length > 0) { return scope.selectedItems.map(function (item) { return item.Id; }); } } else { var id = (scope.selectedItem && scope.selectedItem.Id) || scope.selectedItemId; if (id) { var selected = []; selected.push(id); return selected; } } return []; }; ======= var emptyGuid = '00000000-0000-0000-0000-000000000000'; var selectedId = function () { return (scope.selectedItem && scope.selectedItem.Id) || scope.selectedItemId; }; >>>>>>> var getSelectedIds = function () { if (attrs.multiselect) { if (scope.selectedIds && scope.selectedIds.length > 0) { return scope.selectedIds; } else if (scope.selectedItems && scope.selectedItems.length > 0) { return scope.selectedItems.map(function (item) { return item.Id; }); } } else { var id = (scope.selectedItem && scope.selectedItem.Id) || scope.selectedItemId; if (id) { var selected = []; selected.push(id); return selected; } } return []; }; var emptyGuid = '00000000-0000-0000-0000-000000000000'; <<<<<<< var getSelectedItems = function () { var ids = getSelectedIds(); for (var i = 0; i < ids.length; i++) { if (ids[i] !== '00000000-0000-0000-0000-000000000000') { ctrl.getItem(ids[i]) .then(ctrl.onSelectedItemLoadedSuccess) .finally(hideLoadingIndicator);//TODO: call it only when the last item is retrieved } } ======= var getSelectedItem = function () { var id = selectedId(); if (id && id !== emptyGuid) { ctrl.getItem(id) .then(ctrl.onSelectedItemLoadedSuccess, onError); } >>>>>>> var getSelectedItems = function () { var ids = getSelectedIds(); for (var i = 0; i < ids.length; i++) { if (ids[i] !== emptyGuid) { ctrl.getItem(ids[i]) .then(ctrl.onSelectedItemLoadedSuccess, onError) .finally(hideLoadingIndicator);//TODO: call it only when the last item is retrieved } } <<<<<<< var selectItemsInDialog = function (items) { var selectedIds = getSelectedIds(); var selectedItems = items.filter(function (item) { return selectedIds.indexOf(item.Id) >= 0; }); scope.selectedItemsInTheDialog = selectedItems; ======= var isCurrentItemSelected = function (id) { return id === selectedId(); >>>>>>> var selectItemsInDialog = function (items) { var selectedIds = getSelectedIds(); var selectedItems = items.filter(function (item) { return selectedIds.indexOf(item.Id) >= 0; }); scope.selectedItemsInTheDialog = selectedItems; <<<<<<< var ids = getSelectedIds().filter(function (id) { return id !== '00000000-0000-0000-0000-000000000000'; }); return ids.length > 0; }; scope.isItemSelectedInDialog = function (item) { for (var i = 0; i < scope.selectedItemsInTheDialog.length; i++) { if (scope.selectedItemsInTheDialog[i].Id === item.Id) { return true; } } ======= var id = selectedId(); return id && id !== emptyGuid; >>>>>>> var ids = getSelectedIds().filter(function (id) { return id !== emptyGuid; }); return ids.length > 0; }; scope.isItemSelectedInDialog = function (item) { for (var i = 0; i < scope.selectedItemsInTheDialog.length; i++) { if (scope.selectedItemsInTheDialog[i].Id === item.Id) { return true; } } <<<<<<< ======= scope.bindIdentifierField = function (item) { return ctrl.bindIdentifierField(item); }; getSelectedItem(); >>>>>>> scope.bindIdentifierField = function (item) { return ctrl.bindIdentifierField(item); }; getSelectedItems();
<<<<<<< + this.paths.reduce(function(str, path) { return str + self._render(path); }, '') + 'var exp = require(\'' + mod + '\');' + 'if ("undefined" != typeof module) module.exports = exp;' + 'else ' + (opt.global || opt.main) + ' = exp;\n' ======= + this.paths.sort().reduce(function(str, path) { return str + self._render(path); }, '') + (opt.global || opt.main) + ' = require(\'' + mod + '\');\n' >>>>>>> + this.paths.sort().reduce(function(str, path) { return str + self._render(path); }, '') + 'var exp = require(\'' + mod + '\');' + 'if ("undefined" != typeof module) module.exports = exp;' + 'else ' + (opt.global || opt.main) + ' = exp;\n'
<<<<<<< asNavFor: null, ======= prevArrow: '<button type="button" class="slick-prev">Previous</button>', nextArrow: '<button type="button" class="slick-next">Next</button>', >>>>>>> asNavFor: null, prevArrow: '<button type="button" class="slick-prev">Previous</button>', nextArrow: '<button type="button" class="slick-next">Next</button>', <<<<<<< var _ = this; var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null; ======= var _ = this, $target = $(event.target); // If target is a link, prevent default action. $target.is('a') && event.preventDefault(); >>>>>>> var _ = this, $target = $(event.target); var asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor).getSlick() : null; // If target is a link, prevent default action. $target.is('a') && event.preventDefault(); <<<<<<< _.slideHandler(_.currentSlide - _.options.slidesToScroll); if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide - asNavFor.options.slidesToScroll); ======= if (_.slideCount > _.options.slidesToShow) { _.slideHandler(_.currentSlide - _.options .slidesToScroll); } >>>>>>> if (_.slideCount > _.options.slidesToShow) { _.slideHandler(_.currentSlide - _.options .slidesToScroll); if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide - asNavFor.options.slidesToScroll); } <<<<<<< _.slideHandler(_.currentSlide + _.options.slidesToScroll); if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll); ======= if (_.slideCount > _.options.slidesToShow) { _.slideHandler(_.currentSlide + _.options .slidesToScroll); } >>>>>>> if (_.slideCount > _.options.slidesToShow) { _.slideHandler(_.currentSlide + _.options .slidesToScroll); if(asNavFor != null) asNavFor.slideHandler(asNavFor.currentSlide + asNavFor.options.slidesToScroll); } <<<<<<< var index = $(event.target).parent().index() * _.options.slidesToScroll; _.slideHandler(index); if(asNavFor != null) asNavFor.slideHandler(index); ======= _.slideHandler($target.parent().index() * _.options.slidesToScroll); >>>>>>> var index = $(event.target).parent().index() * _.options.slidesToScroll; _.slideHandler(index); if(asNavFor != null) asNavFor.slideHandler(index); <<<<<<< _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active'); ======= _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass( 'slick-active'); >>>>>>> _.$dots.find('li').eq(Math.floor(_.currentSlide / _.options.slidesToScroll)).addClass('slick-active');
<<<<<<< connection.once('ping', this._initialPing.bind( this ) ); connection.on('permissionQuery', this._permissionQuery.bind( this ) ); ======= connection.on('channelRemove', this._channelRemove.bind( this )); connection.on('userRemove', this._userRemove.bind( this ) ); >>>>>>> connection.once('ping', this._initialPing.bind( this ) ); connection.on('permissionQuery', this._permissionQuery.bind( this ) ); connection.on('channelRemove', this._channelRemove.bind( this )); connection.on('userRemove', this._userRemove.bind( this ) );
<<<<<<< * Fuel UX Utilities ======= * Fuel UX Checkbox * https://github.com/ExactTarget/fuelux * * Copyright (c) 2012 ExactTarget * Licensed under the MIT license. */ define('fuelux/checkbox',['require','jquery'],function(require) { var $ = require('jquery'); // CHECKBOX CONSTRUCTOR AND PROTOTYPE var Checkbox = function (element, options) { this.$element = $(element); this.options = $.extend({}, $.fn.checkbox.defaults, options); // cache elements this.$label = this.$element.parent(); this.$icon = this.$label.find('i'); this.$chk = this.$label.find('input[type=checkbox]'); // set default state this.setState(this.$chk); // handle events this.$chk.on('change', $.proxy(this.itemchecked, this)); }; Checkbox.prototype = { constructor: Checkbox, setState: function($chk) { var checked = $chk.is(':checked'); var disabled = $chk.is(':disabled'); // reset classes this.$icon.removeClass('checked').removeClass('disabled'); // set state of checkbox if(checked === true) { this.$icon.addClass('checked'); } if(disabled === true) { this.$icon.addClass('disabled'); } }, enable: function() { this.$chk.attr('disabled', false); this.$icon.removeClass('disabled'); }, disable: function() { this.$chk.attr('disabled', true); this.$icon.addClass('disabled'); }, toggle: function() { this.$chk.click(); }, itemchecked: function(e) { var chk = $(e.target); this.setState(chk); } }; // CHECKBOX PLUGIN DEFINITION $.fn.checkbox = function (option, value) { var methodReturn; var $set = this.each(function () { var $this = $(this); var data = $this.data('checkbox'); var options = typeof option === 'object' && option; if (!data) $this.data('checkbox', (data = new Checkbox(this, options))); if (typeof option === 'string') methodReturn = data[option](value); }); return (methodReturn === undefined) ? $set : methodReturn; }; $.fn.checkbox.defaults = {}; $.fn.checkbox.Constructor = Checkbox; // CHECKBOX DATA-API $(function () { $(window).on('load', function () { //$('i.checkbox').each(function () { $('.checkbox-custom > input[type=checkbox]').each(function() { var $this = $(this); if ($this.data('checkbox')) return; $this.checkbox($this.data()); }); }); }); }); /* * Fuel UX Combobox >>>>>>> * Fuel UX Checkbox * https://github.com/ExactTarget/fuelux * * Copyright (c) 2012 ExactTarget * Licensed under the MIT license. */ define('fuelux/checkbox',['require','jquery'],function(require) { var $ = require('jquery'); // CHECKBOX CONSTRUCTOR AND PROTOTYPE var Checkbox = function (element, options) { this.$element = $(element); this.options = $.extend({}, $.fn.checkbox.defaults, options); // cache elements this.$label = this.$element.parent(); this.$icon = this.$label.find('i'); this.$chk = this.$label.find('input[type=checkbox]'); // set default state this.setState(this.$chk); // handle events this.$chk.on('change', $.proxy(this.itemchecked, this)); }; Checkbox.prototype = { constructor: Checkbox, setState: function($chk) { var checked = $chk.is(':checked'); var disabled = $chk.is(':disabled'); // reset classes this.$icon.removeClass('checked').removeClass('disabled'); // set state of checkbox if(checked === true) { this.$icon.addClass('checked'); } if(disabled === true) { this.$icon.addClass('disabled'); } }, enable: function() { this.$chk.attr('disabled', false); this.$icon.removeClass('disabled'); }, disable: function() { this.$chk.attr('disabled', true); this.$icon.addClass('disabled'); }, toggle: function() { this.$chk.click(); }, itemchecked: function(e) { var chk = $(e.target); this.setState(chk); } }; // CHECKBOX PLUGIN DEFINITION $.fn.checkbox = function (option, value) { var methodReturn; var $set = this.each(function () { var $this = $(this); var data = $this.data('checkbox'); var options = typeof option === 'object' && option; if (!data) $this.data('checkbox', (data = new Checkbox(this, options))); if (typeof option === 'string') methodReturn = data[option](value); }); return (methodReturn === undefined) ? $set : methodReturn; }; $.fn.checkbox.defaults = {}; $.fn.checkbox.Constructor = Checkbox; // CHECKBOX DATA-API $(function () { $(window).on('load', function () { //$('i.checkbox').each(function () { $('.checkbox-custom > input[type=checkbox]').each(function() { var $this = $(this); if ($this.data('checkbox')) return; $this.checkbox($this.data()); }); }); }); }); /* * Fuel UX Utilities
<<<<<<< * Fuel UX Utilities ======= * Fuel UX Checkbox * https://github.com/ExactTarget/fuelux * * Copyright (c) 2012 ExactTarget * Licensed under the MIT license. */ define('fuelux/checkbox',['require','jquery'],function(require) { var $ = require('jquery'); // CHECKBOX CONSTRUCTOR AND PROTOTYPE var Checkbox = function (element, options) { this.$element = $(element); this.options = $.extend({}, $.fn.checkbox.defaults, options); // cache elements this.$label = this.$element.parent(); this.$icon = this.$label.find('i'); this.$chk = this.$label.find('input[type=checkbox]'); // set default state this.setState(this.$chk); // handle events this.$chk.on('change', $.proxy(this.itemchecked, this)); }; Checkbox.prototype = { constructor: Checkbox, setState: function($chk) { var checked = $chk.is(':checked'); var disabled = $chk.is(':disabled'); // reset classes this.$icon.removeClass('checked').removeClass('disabled'); // set state of checkbox if(checked === true) { this.$icon.addClass('checked'); } if(disabled === true) { this.$icon.addClass('disabled'); } }, enable: function() { this.$chk.attr('disabled', false); this.$icon.removeClass('disabled'); }, disable: function() { this.$chk.attr('disabled', true); this.$icon.addClass('disabled'); }, toggle: function() { this.$chk.click(); }, itemchecked: function(e) { var chk = $(e.target); this.setState(chk); } }; // CHECKBOX PLUGIN DEFINITION $.fn.checkbox = function (option, value) { var methodReturn; var $set = this.each(function () { var $this = $(this); var data = $this.data('checkbox'); var options = typeof option === 'object' && option; if (!data) $this.data('checkbox', (data = new Checkbox(this, options))); if (typeof option === 'string') methodReturn = data[option](value); }); return (methodReturn === undefined) ? $set : methodReturn; }; $.fn.checkbox.defaults = {}; $.fn.checkbox.Constructor = Checkbox; // CHECKBOX DATA-API $(function () { $(window).on('load', function () { //$('i.checkbox').each(function () { $('.checkbox-custom > input[type=checkbox]').each(function() { var $this = $(this); if ($this.data('checkbox')) return; $this.checkbox($this.data()); }); }); }); }); /* * Fuel UX Combobox >>>>>>> * Fuel UX Checkbox * https://github.com/ExactTarget/fuelux * * Copyright (c) 2012 ExactTarget * Licensed under the MIT license. */ define('fuelux/checkbox',['require','jquery'],function(require) { var $ = require('jquery'); // CHECKBOX CONSTRUCTOR AND PROTOTYPE var Checkbox = function (element, options) { this.$element = $(element); this.options = $.extend({}, $.fn.checkbox.defaults, options); // cache elements this.$label = this.$element.parent(); this.$icon = this.$label.find('i'); this.$chk = this.$label.find('input[type=checkbox]'); // set default state this.setState(this.$chk); // handle events this.$chk.on('change', $.proxy(this.itemchecked, this)); }; Checkbox.prototype = { constructor: Checkbox, setState: function($chk) { var checked = $chk.is(':checked'); var disabled = $chk.is(':disabled'); // reset classes this.$icon.removeClass('checked').removeClass('disabled'); // set state of checkbox if(checked === true) { this.$icon.addClass('checked'); } if(disabled === true) { this.$icon.addClass('disabled'); } }, enable: function() { this.$chk.attr('disabled', false); this.$icon.removeClass('disabled'); }, disable: function() { this.$chk.attr('disabled', true); this.$icon.addClass('disabled'); }, toggle: function() { this.$chk.click(); }, itemchecked: function(e) { var chk = $(e.target); this.setState(chk); } }; // CHECKBOX PLUGIN DEFINITION $.fn.checkbox = function (option, value) { var methodReturn; var $set = this.each(function () { var $this = $(this); var data = $this.data('checkbox'); var options = typeof option === 'object' && option; if (!data) $this.data('checkbox', (data = new Checkbox(this, options))); if (typeof option === 'string') methodReturn = data[option](value); }); return (methodReturn === undefined) ? $set : methodReturn; }; $.fn.checkbox.defaults = {}; $.fn.checkbox.Constructor = Checkbox; // CHECKBOX DATA-API $(function () { $(window).on('load', function () { //$('i.checkbox').each(function () { $('.checkbox-custom > input[type=checkbox]').each(function() { var $this = $(this); if ($this.data('checkbox')) return; $this.checkbox($this.data()); }); }); }); }); /* * Fuel UX Utilities
<<<<<<< if (this.$pagesize.hasClass('select')) { this.$pagesize.select('selectByValue', this.options.dataOptions.pageSize); ======= // Shim until v3 -- account for FuelUX select or native select for page size: if (this.$pagesize.hasClass('select')) { >>>>>>> // Shim until v3 -- account for FuelUX select or native select for page size: if (this.$pagesize.hasClass('select')) { this.$pagesize.select('selectByValue', this.options.dataOptions.pageSize);
<<<<<<< ======= import React, { useState, useEffect } from 'react' import Layout from '../components/layout' import queryString from 'query-string' import { CopyToClipboard } from 'react-copy-to-clipboard' import styled from 'styled-components' import { parse } from 'orga' import toHAST from 'oast-to-hast' >>>>>>> import React, { useState, useEffect } from 'react' import Layout from '../components/layout' import queryString from 'query-string' import { CopyToClipboard } from 'react-copy-to-clipboard' import styled from 'styled-components' import { parse } from 'orga' import toHAST from 'oast-to-hast' <<<<<<< import styled from 'styled-components' import Layout from '../components/layout' ======= import { Segment, Grid, Divider, Button, Icon, TextArea, } from 'semantic-ui-react' >>>>>>> import styled from 'styled-components' import Layout from '../components/layout' import { Segment, Grid, Divider, Button, Icon, TextArea, } from 'semantic-ui-react' ======= end <<<<<<< export default () => { ======= export default ({ location }) => { const q = queryString.parse(location.search) >>>>>>> export default ({ location }) => { const q = queryString.parse(location.search)
<<<<<<< console.log('alex says that React Velocity is a great project name...'); ======= console.log('alex says...'); console.log('alex added from personal fork'); for (var i = 0; i < 2; i++) { if (i === 0) { console.log('alex is number 1'); } } >>>>>>> console.log('alex says that React Velocity is a great project name...'); console.log('alex says...'); console.log('alex added from personal fork'); for (var i = 0; i < 2; i++) { if (i === 0) { console.log('alex is number 1'); } }
<<<<<<< ======= this.handleTextFieldChange = this.handleTextFieldChange.bind(this); this.onButtonPress = this.onButtonPress.bind(this); this.onKeyPress = this.onKeyPress.bind(this); this.handleExport = this.handleExport.bind(this); >>>>>>> <<<<<<< ======= buttonCall(){console.log('kausbdfkasndfdlsinfas')}; handleExport(e) { const contents = generateCode(treeData); // console.log(contents); zip.file('paul.js', contents, {base64: false}); zip.generateAsync({type:"base64"}).then(function (base64) { location.href="data:application/zip;base64," + base64; }); } handleTextFieldChange(e){ this.setState({ textFieldValue: e.target.value, }); } onButtonPress(){console.log(this.state.textFieldValue)}; onKeyPress(e) { if(e.key == 'Enter') { console.log(this.state.textFieldValue) } } >>>>>>> handleExport(e) { const contents = generateCode(treeData); // console.log(contents); zip.file('paul.js', contents, {base64: false}); zip.generateAsync({type:"base64"}).then(function (base64) { location.href="data:application/zip;base64," + base64; }); }
<<<<<<< flattenedArray: [] ======= error: '', >>>>>>> flattenedArray: [] error: '', <<<<<<< <Webpage flattenedArray = {this.state.flattenedArray} ======= <Webpage error={this.state.error} textFieldValue={this.state.textFieldValue} >>>>>>> <Webpage flattenedArray = {this.state.flattenedArray} error={this.state.error} textFieldValue={this.state.textFieldValue}
<<<<<<< buttonCall(){console.log('kausbdfkasndfdlsinfas')}; ======= >>>>>>> buttonCall(){console.log('kausbdfkasndfdlsinfas')};
<<<<<<< import { paul, scott } from '../../generateContent'; import JSZip from 'jszip'; const zip = new JSZip(); ======= import Tree from './tree'; >>>>>>> import { paul, scott } from '../../generateContent'; import JSZip from 'jszip'; const zip = new JSZip(); import Tree from './tree'; <<<<<<< this.state = {open: false,}; ======= this.state = { open: false, textFieldValue: '', }; >>>>>>> this.state = { open: false, textFieldValue: '', }; <<<<<<< this.buttonCall = this.buttonCall.bind(this); this.handleExport = this.handleExport.bind(this); ======= this.handleTextFieldChange = this.handleTextFieldChange.bind(this); this.onButtonPress = this.onButtonPress.bind(this); this.onKeyPress = this.onKeyPress.bind(this); >>>>>>> this.handleTextFieldChange = this.handleTextFieldChange.bind(this); this.onButtonPress = this.onButtonPress.bind(this); this.onKeyPress = this.onKeyPress.bind(this); this.handleExport = this.handleExport.bind(this); <<<<<<< buttonCall(){console.log('kausbdfkasndfdlsinfas')}; handleExport(e) { e.preventDefault(); e.stopPropagation(); console.log(paul); zip.file('paul.js', paul); zip.generateAsync({type:"base64"}).then(function (base64) { location.href="data:application/zip;base64," + base64; }); } ======= handleTextFieldChange(e){ this.setState({ textFieldValue: e.target.value, }); } onButtonPress(){console.log(this.state.textFieldValue)}; onKeyPress(e) { if(e.key == 'Enter') { console.log(this.state.textFieldValue) } } >>>>>>> handleExport(e) { e.preventDefault(); e.stopPropagation(); console.log(paul); zip.file('paul.js', paul); zip.generateAsync({type:"base64"}).then(function (base64) { location.href="data:application/zip;base64," + base64; }); } handleTextFieldChange(e){ this.setState({ textFieldValue: e.target.value, }); } onButtonPress(){console.log(this.state.textFieldValue)}; onKeyPress(e) { if(e.key == 'Enter') { console.log(this.state.textFieldValue) } }
<<<<<<< },{"fz/events/Emitter":4,"fz/utils/timeout":10}],4:[function(require,module,exports){ ======= },{"fz/events/Emitter":4,"fz/utils/timeout":8}],4:[function(require,module,exports){ 'use strict'; >>>>>>> },{"fz/events/Emitter":4,"fz/utils/timeout":10}],4:[function(require,module,exports){ 'use strict'; <<<<<<< },{}],10:[function(require,module,exports){ // bigup kewah ======= },{}],8:[function(require,module,exports){ >>>>>>> },{}],10:[function(require,module,exports){ <<<<<<< this._binds.onTouchDown = this._onTouchDown.bind(this); this._binds.onTouchMove = this._onTouchMove.bind(this); this._binds.onTouchUp = this._onTouchUp.bind(this); this._binds.onScroll = this._onScroll.bind(this); this._binds.onUpdate = this._onUpdate.bind(this); ======= _this._binds.onScroll = _this._onScroll.bind(_this); _this._binds.onUpdate = _this._onUpdate.bind(_this); return _this; >>>>>>> _this._binds.onTouchDown = _this._onTouchDown.bind(_this); _this._binds.onTouchMove = _this._onTouchMove.bind(_this); _this._binds.onTouchUp = _this._onTouchUp.bind(_this); _this._binds.onScroll = _this._onScroll.bind(_this); _this._binds.onUpdate = _this._onUpdate.bind(_this); return _this; <<<<<<< if (browsers.mobile) { this._logo.scale.set(.7, .7); } this._binds = {}; this._binds.onResize = this._onResize.bind(this); ======= _this._binds = {}; _this._binds.onResize = _this._onResize.bind(_this); >>>>>>> if (browsers.mobile) { _this._logo.scale.set(.7, .7); } _this._binds = {}; _this._binds.onResize = _this._onResize.bind(_this); <<<<<<< },{"xmas/core/config":15}]},{},[12]); ======= },{"xmas/core/config":13,"xmas/core/scrollEmul":14}]},{},[10]); >>>>>>> },{"xmas/core/config":15,"xmas/core/scrollEmul":16}]},{},[12]);
<<<<<<< this._pixiLoader = new PIXI.loaders.Loader(); this._pixiLoader.add("img/default.jpg"); this._pixiLoader.add("img/sprites/sprites.json"); this._pixiLoader.add("img/sprites/roboto_regular.fnt"); this._pixiLoader.add("img/sprites/roboto_medium.fnt"); this._loaderOfLoader = new PIXI.loaders.Loader(); this._loaderOfLoader.add("img/logo.png"); this._loaderOfLoader.add("img/sprites/advent_bold.fnt"); this._binds = {}; this._binds.onProgress = this._onProgress.bind(this); this._binds.onComplete = this._onComplete.bind(this); this._binds.onPixiComplete = this._onPixiComplete.bind(this); this._binds.onLoaderOfLoaderComplete = this._onLoaderOfLoaderComplete.bind(this); ======= _this._pixiLoader = new PIXI.loaders.Loader(); _this._pixiLoader.add("img/default.jpg"); _this._pixiLoader.add("img/sprites/sprites.json"); _this._pixiLoader.add("img/sprites/roboto_regular.fnt"); _this._pixiLoader.add("img/sprites/roboto_medium.fnt"); _this._loaderOfLoader = new PIXI.loaders.Loader(); _this._loaderOfLoader.add("img/logo.png"); _this._loaderOfLoader.add("img/sprites/advent_bold.fnt"); _this._binds = {}; _this._binds.onProgress = _this._onProgress.bind(_this); _this._binds.onPixiComplete = _this._onPixiComplete.bind(_this); _this._binds.onLoaderOfLoaderComplete = _this._onLoaderOfLoaderComplete.bind(_this); return _this; >>>>>>> this._pixiLoader = new PIXI.loaders.Loader(); this._pixiLoader.add("img/default.jpg"); this._pixiLoader.add("img/sprites/sprites.json"); this._pixiLoader.add("img/sprites/roboto_regular.fnt"); this._pixiLoader.add("img/sprites/roboto_medium.fnt"); this._loaderOfLoader = new PIXI.loaders.Loader(); this._loaderOfLoader.add("img/logo.png"); this._loaderOfLoader.add("img/sprites/advent_bold.fnt"); this._binds = {}; this._binds.onProgress = this._onProgress.bind(this); this._binds.onPixiComplete = this._onPixiComplete.bind(this); this._binds.onLoaderOfLoaderComplete = this._onLoaderOfLoaderComplete.bind(this); <<<<<<< _this._addImages(); _this._loaderOfLoader.once("complete", _this._binds.onLoaderOfLoaderComplete); _this._loaderOfLoader.load(); ======= console.log('load'); _this2._addImages(); _this2._loaderOfLoader.once("complete", _this2._binds.onLoaderOfLoaderComplete); _this2._loaderOfLoader.load(); >>>>>>> console.log('load'); _this._addImages(); _this._loaderOfLoader.once("complete", _this._binds.onLoaderOfLoaderComplete); _this._loaderOfLoader.load(); <<<<<<< key: "_loadJSON", value: function _loadJSON() { var _this3 = this; var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); xobj.open("GET", "xp.json?" + (Math.random() * 10000 >> 0), true); // Replace 'my_data' with the path to your file xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { _this3._countComplete++; config.data = JSON.parse(xobj.responseText); _this3._addImages(); _this3._loaderOfLoader.once("complete", _this3._binds.onLoaderOfLoaderComplete); _this3._loaderOfLoader.load(); } }; xobj.send(null); } }, { ======= >>>>>>>
<<<<<<< resources: '#resourcesButton' ======= ok_loc: '#ok_loc', resources: '#resourcesButton', sch_vc: '#schButton', vis_ors: '#vis_ors', vis_rdt: '#vis_rdt', vis_vita: '#vis_vita', vis_alb: '#vis_alb', vis_blood: '#vis_blood' >>>>>>> resources: '#resourcesButton', sch_vc: '#schButton' <<<<<<< ======= ok_loc:{ tap: function(){ this.doLocation(true) } }, photo: { tap: function () { this.doResources('photo') } }, >>>>>>> <<<<<<< ======= // daily checkin xclass: 'mUserStories.view.confirmLocation' }, { // display a list of patients >>>>>>> <<<<<<< ======= // manage resources pages doResources: function (arg) { if (arg === 'video') { this.toPage(PAGES.VIDEO) } else if (arg === 'audio') { this.toPage(PAGES.AUDIO) } else if (arg === 'photo') { this.toPage(PAGES.PHOTO) } }, // manage navigation based on lower toolbar >>>>>>> // manage navigation based on lower toolbar <<<<<<< ======= var reading = ''; var title = ''; var detail = ''; if (arg === 'ors') { title = 'ORS'; detail = 'Adminster Oral Rehydration Salts' } else if (arg === 'rdt') { title = 'RDT'; detail = 'Adminster Rapid Diagnostic Test for malaria' } else if (arg === 'vita') { title = 'Vitamin A'; detail = 'Check if Vitamin A has been administered.' } else if (arg === 'alb') { title = 'Albendazole'; detail = 'Check if Albendazole has been administered' } else if (arg === 'blood') { title = 'Blood sample'; detail = 'Take a bloodsample for CBC' } // TODO: play recording Ext.getCmp('ping').play(); // confirm completion Ext.Msg.confirm('Task', detail, function (resp) { if (resp === 'yes') { // TODO: record that the task has been completed // change button to demonstrate this Ext.getCmp('vis_'+arg).setUi('decline'); Ext.getCmp('vis_'+arg).setDisabled(true) } }) // TODO: when all buttons are clicked, notify of completion >>>>>>> <<<<<<< // TODO: set patientcurrid to be subset of above organized by appt time // Do we need a separate store for this? ======= // TODO: set patientcurrid to be subset of above organized by appt time // Do we need a separate store for this? >>>>>>> // TODO: set patientcurrid to be subset of above organized by appt time // Do we need a separate store for this? <<<<<<< ======= isEmpty: function (arg) { // TODO: check to see if the select field is empty // TODO: continue to arg if not empty }, isOther: function (arg) { // TODO: check to see if the select field is other // TODO: pop up screen prompt // TODO: continue to arg }, >>>>>>>
<<<<<<< requires: ['Screener.store.Doctors', 'Screener.store.NewPatients', 'Screener.store.PatientList', 'Screener.store.NewPersons', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView'], models:['Screener.model.Person', 'Screener.mosel.PostList'], ======= requires: ['Screener.store.Doctors', 'Screener.store.NewPatients', 'Screener.store.NewPersons', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView'], models: ['Screener.model.Person'], >>>>>>> requires: ['Screener.store.Doctors', 'Screener.store.NewPatients', 'Screener.store.PatientList', 'Screener.store.NewPersons', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView'], models: ['Screener.model.Person', 'Screener.mosel.PostList', 'Screener.mosel.Patients'], <<<<<<< refreshButton: { tap: 'refreshList' }, ======= drugSubmitButton: { tap: 'drugSubmit' }, >>>>>>> refreshButton: { tap: 'refreshList' }, drugSubmitButton: { tap: 'drugSubmit' }, <<<<<<< ======= >>>>>>>
<<<<<<< ======= //////////////////////////// // Inventory //////////////////////////// // Navigation bar >>>>>>> //////////////////////////// // Inventory //////////////////////////// // Navigation bar <<<<<<< ======= // Request Drugs 'requisitionGrid': { deleteRequisitionDrug: this.deleteRequisitionDrug }, 'requisitionGrid button[action=addRequisitionDrug]': { click: this.addRequisitionDrug }, >>>>>>> // Request Drugs <<<<<<< ======= 'goodsIssueText button[action=cancelIssuePurchaseOrder]':{ click: this.cancelIssuePurchaseOrder }, 'goodsIssueGrid button[action=addIssueDrug]': { click: this.addIssueDrug }, 'goodsIssueGrid': { deleteIssueDrug: this.deleteIssueDrug }, 'goodsIssue button[action=submitIssue]': { click: this.submitIssue }, // Receive Drugs (Update Stock) 'goodsReceiptGrid': { deleteReceiptDrug: this.deleteReceiptDrug }, 'goodsReceiptGrid button[action=addReceiptDrug]': { click: this.addReceiptDrug }, >>>>>>> 'goodsIssue button[action=submitIssue]': { click: this.submitIssue }, // Receive Drugs (Update Stock) <<<<<<< 'goodsIssue button[action=submitIssue]': { click: this.submitIssue }, ======= // Create new drug - administration >>>>>>> <<<<<<< ======= // Creates a new purchase order newPurchaseOrder: function() { // TODO }, // Deletes current row of requisition grid deleteReceiptDrug: function (evtData) { var store = this.getStore('newReceipt'); var record = store.getAt(evtData.rowIndex); if(record) { store.remove(record); } }, // Adds new row to requisition grid addReceiptDrug: function(){ // Add blank item to store -- will automatically add new row to grid // TODO: remove [0] Ext.getStore('newReceipt').add({ drugname: '', quantity: '' })[0]; }, >>>>>>> <<<<<<< ======= // Deletes current row of requisition grid deleteRequisitionDrug: function (evtData) { var store = this.getStore('RequisitionItems'); var record = store.getAt(evtData.rowIndex); if(record) { store.remove(record); } }, // Adds new row to requisition grid addRequisitionDrug: function(){ // Add blank item to store -- will automatically add new row to grid Ext.getStore('RequisitionItems').add({ drugname: '', quantity: '' })[0]; }, // Submit Drug Request via REST to database >>>>>>> // Submit Drug Request via REST to database
<<<<<<< ======= requires: ['Registration.view.Home', 'Registration.view.RegistrationPart1', 'Registration.view.RegistrationPart2', 'Registration.view.ConfirmationScreen','Registration.view.SearchPart1','Registration.view.SearchPatientScreen', 'Registration.view.SearchPart2', 'Ext.tab.*', 'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.state.*', 'Ext.form.*', ], >>>>>>>
<<<<<<< text: 'Add an Illness', action: 'illnessAdd' ======= text: Ext.i18n.appBundle.getMsg('RaxaEmr.view.textfield.newIllness'), itemId: 'illnessAdd' >>>>>>> text: Ext.i18n.appBundle.getMsg('RaxaEmr.view.textfield.newIllness'), action: 'illnessAdd'
<<<<<<< if (localStorage.getItem("host") == null) { var HOST = 'http://test.raxa.org:8080/openmrs'; } else HOST = localStorage.getItem("host"); ======= var HOST; var DEFAULT_HOST = 'http://test.raxa.org:8080/openmrs'; if (localStorage.getItem("host") === null) { HOST = DEFAULT_HOST; } else { HOST = localStorage.getItem("host"); } >>>>>>> var HOST; var DEFAULT_HOST = 'http://test.raxa.org:8080/openmrs'; if (localStorage.getItem("host") === null) { HOST = DEFAULT_HOST; } else { HOST = localStorage.getItem("host"); } <<<<<<< var resourceUuid = [ ['concept', 'height', 'HEIGHT (CM)'], ['concept', 'weight', 'WEIGHT (KG)'], ['concept', 'bmi', 'BODY MASS INDEX'], ['concept', 'regfee', 'Registration Fee'], ['concept', 'patientHistory', 'PATIENT HISTORY'], ['concept', 'pastMedicationHistory', 'PAST MEDICATION HISTORY'], ['concept', 'alcoholIntake', 'ALCOHOL INTAKE'], ['concept', 'tobaccoIntake', 'TOBACCO INTAKE'], ['concept', 'otherHistory', 'OTHER HISTORY'], ['concept', 'familyHistory', 'FAMILY HISTORY'], ['concept', 'examlist', 'EXAMINATION LIST'], ['concept', 'neurologicalDiagnosis', 'NEUROLOGICAL DIAGNOSIS'], ['concept', 'cadiologicalDiagnosis', 'CARDIOLOGICAL DIAGNOSIS'], ['form', 'basic', 'Basic Form - This form contains only the common/core elements needed for most forms'], ['encountertype', 'reg', 'REGISTRATION - Registration encounter'], ['encountertype', 'screener', 'SCREENER - Screener encounter'], ['encountertype', 'out', 'OUTPATIENT - Outpatient encounter'], ['encountertype', 'prescription', 'PRESCRIPTION - Prescription encounter'], ['encountertype', 'prescriptionfill', 'PRESCRIPTIONFILL - Prescriptionfill encounter'], ['location', 'screener', 'Screener Registration Disk - registration desk in a screener module'], ['location', 'waiting', 'Waiting Patient: Screener - patients assigned to a doctor'], ['personattributetype', 'old Patient Identification Number', 'Old Patient Identification Number - Old Patient Identification Number'], ['personattributetype', 'caste', 'Caste - Caste'], ['personattributetype', 'education', 'Education - Education'], ['personattributetype', 'occupation', 'Occupation - Occupation'], ['personattributetype', 'tehsil', 'Tehsil - Tehsil'], ['personattributetype', 'district', 'District - District'], ['personattributetype', 'contact By Phone', 'Contact By Phone - Whether to contact this patient by phone'], ['personattributetype', 'primary Contact', 'Primary Contact - Primary Contact'], ['personattributetype', 'secondary Contact', 'Secondary Contact - Secondary Contact'], ['personattributetype', 'primary Relative', 'Primary Relative - Primary Relative'] ]; ======= >>>>>>> ['personattributetype', 'old Patient Identification Number', 'Old Patient Identification Number - Old Patient Identification Number'], ['personattributetype', 'caste', 'Caste - Caste'], ['personattributetype', 'education', 'Education - Education'], ['personattributetype', 'occupation', 'Occupation - Occupation'], ['personattributetype', 'tehsil', 'Tehsil - Tehsil'], ['personattributetype', 'district', 'District - District'], ['personattributetype', 'contact By Phone', 'Contact By Phone - Whether to contact this patient by phone'], ['personattributetype', 'primary Contact', 'Primary Contact - Primary Contact'], ['personattributetype', 'secondary Contact', 'Secondary Contact - Secondary Contact'], ['personattributetype', 'primary Relative', 'Primary Relative - Primary Relative'] ]; <<<<<<< /** *Returns how many days are left from now to date passed in */ daysFromNow: function(futureDate) { var future = new Date(futureDate); var now = new Date(); return Math.ceil((future.getTime()-now.getTime())/ONEDAYMS); }, ======= /* * Listener to workaround maxLength bug in HTML5 numberfield with Sencha * Number field fails to enforce maxLength, so must add JavaScript listener * http://stackoverflow.com/questions/9613743/maxlength-attribute-of-numberfield-in-sencha-touch */ maxLengthListener: function(maxLength) { return { keyup: function(textfield, e, eOpts) { var value = textfield.getValue() + ''; var length = value.length; var MAX_LENGTH = maxLength; if (length > MAX_LENGTH) { textfield.setValue(value.substring(0, MAX_LENGTH)); return false; } } }; }, >>>>>>> /** *Returns how many days are left from now to date passed in */ daysFromNow: function(futureDate) { var future = new Date(futureDate); var now = new Date(); return Math.ceil((future.getTime()-now.getTime())/ONEDAYMS); }, /* * Listener to workaround maxLength bug in HTML5 numberfield with Sencha * Number field fails to enforce maxLength, so must add JavaScript listener * http://stackoverflow.com/questions/9613743/maxlength-attribute-of-numberfield-in-sencha-touch */ maxLengthListener: function(maxLength) { return { keyup: function(textfield, e, eOpts) { var value = textfield.getValue() + ''; var length = value.length; var MAX_LENGTH = maxLength; if (length > MAX_LENGTH) { textfield.setValue(value.substring(0, MAX_LENGTH)); return false; } } }; }, <<<<<<< //replacing all the white spaces with blank spaces queryParameter = queryParameter.replace(/\s/g, ""); ======= console.log("getAttributeFromRest ... resource: " + resource + ", queryParameter: " + queryParameter + ", varName:" + varName + " RESPONSE: " + response.responseText); >>>>>>> //replacing all the white spaces with blank spaces queryParameter = queryParameter.replace(/\s/g, ""); console.log("getAttributeFromRest ... resource: " + resource + ", queryParameter: " + queryParameter + ", varName:" + varName + " RESPONSE: " + response.responseText); <<<<<<< keyMap.keyName = Ext.create('Ext.util.KeyMap',Ext.getBody(), [ { key: keyName, shift: false, ctrl: false, fn:function(){ var element = Ext.getCmp(ComponentName); element.fireEvent('click',element); ======= // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-381 /* keyMap.keyName = Ext.create('Ext.util.KeyMap',Ext.getBody(), [ { key: keyName, shift: false, ctrl: false, fn:function(){ var element = Ext.getCmp(ComponentName); element.fireEvent('click',element); >>>>>>> // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-381 /* keyMap.keyName = Ext.create('Ext.util.KeyMap',Ext.getBody(), [ { key: keyName, shift: false, ctrl: false, fn:function(){ var element = Ext.getCmp(ComponentName); element.fireEvent('click',element); <<<<<<< keyMap.keyName.destroy(true) ======= // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-381 /* keyMap.keyName.destroy(true); */ >>>>>>> // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-381 /* keyMap.keyName.destroy(true); */
<<<<<<< 'Screener.store.AssignedPatientList', 'Screener.store.Doctors', 'Screener.store.drugConcept', 'Screener.store.drugEncounter', 'Screener.store.druglist', 'Screener.store.encounterpost', 'Screener.store.encounters', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.store.NewPatients', // Cant find this store 'Screener.store.NewPersons', 'Screener.store.PatientList', 'Screener.store.Patients', 'Screener.store.PatientSummary', 'Screener.store.PostLists', 'Screener.model.observation', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView', 'Screener.view.VitalsView', 'Screener.view.VitalsForm', 'Screener.view.NewPatient' ======= 'Screener.store.AssignedPatientList', 'Screener.store.Doctors', 'Screener.store.drugConcept', 'Screener.store.drugEncounter', 'Screener.store.druglist', 'Screener.store.encounterpost', 'Screener.store.encounters', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.store.NewPatients', // Cant find this store 'Screener.store.NewPersons', 'Screener.store.PatientList', 'Screener.store.Patients', 'Screener.store.PatientSummary', 'Screener.store.PostLists', 'Screener.model.observation', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView', 'Screener.view.VitalsView', 'Screener.view.VitalsForm', 'Screener.view.Main', >>>>>>> 'Screener.store.AssignedPatientList', 'Screener.store.Doctors', 'Screener.store.drugConcept', 'Screener.store.drugEncounter', 'Screener.store.druglist', 'Screener.store.encounterpost', 'Screener.store.encounters', 'Screener.store.IdentifierType', 'Screener.store.Location', 'Screener.store.NewPatients', // Cant find this store 'Screener.store.NewPersons', 'Screener.store.PatientList', 'Screener.store.Patients', 'Screener.store.PatientSummary', 'Screener.store.PostLists', 'Screener.model.observation', 'Screener.view.PharmacyForm', 'Screener.view.PatientListView', 'Screener.view.VitalsView', 'Screener.view.VitalsForm', 'Screener.view.Main', <<<<<<< ) ); store_patientList.load(); ======= ) ); store_patientList.load({ scope: this, callback: function(records, operation, success){ if(success){ Ext.getCmp('loadMask').setHidden(true); this.setBMITime(store_patientList); // TODO: Add photos to patients in screener list store_patientList.each(function (record) { record.set('image', '/Raxa-JSS/src/screener/resources/pic.gif'); }); } else{ Ext.Msg.alert("Error", Util.getMessageLoadError()); } } }); >>>>>>> ) ); store_patientList.load({ scope: this, callback: function(records, operation, success){ if(success){ Ext.getCmp('loadMask').setHidden(true); this.setBMITime(store_patientList); // TODO: Add photos to patients in screener list store_patientList.each(function (record) { record.set('image', '/Raxa-JSS/src/screener/resources/pic.gif'); }); } else{ Ext.Msg.alert("Error", Util.getMessageLoadError()); } } }); <<<<<<< var time = Util.Datetime(startdate, Util.getUTCGMTdiff()); // model for posting the encounter for given drug orders var encounter = Ext.create('Screener.model.drugEncounter', { patient: this.getPatientList().getSelection()[0].getData().uuid, // this is the encounter for the prescription encounterType encounterType: localStorage.prescriptionUuidencountertype, encounterDatetime: time, orders: order }) var encounterStore = Ext.create('Screener.store.drugEncounter') encounterStore.add(encounter) // make post call for encounter encounterStore.sync() encounterStore.on('write', function () { Ext.Msg.alert('successfull') //Note- if we want add a TIMEOUT it shown added somewhere here }, this) ======= >>>>>>> <<<<<<< provider: provider, /*uuid: '', // TODO: see if sending a nonnull UUID allows the server to update with the real value*/ ======= provider: provider >>>>>>> provider: provider <<<<<<< sendEncounterData: function (personUuid, encountertype, location, provider) { //funciton to get the date in required format of the openMRS, since the default extjs4 format is not accepted var t = Util.Datetime(new Date(), Util.getUTCGMTdiff()); // creates the encounter json object // the 3 fields "encounterDatetime, patient, encounterType" are obligatory fields rest are optional var jsonencounter = Ext.create('Screener.model.encounterpost', { encounterDatetime: t, patient: personUuid, encounterType: encountertype, //location: location, provider: provider /*uuid: '', // TODO: see if sending a nonnull UUID allows the server to update with the real value*/ }); // Handle "Screener Vitals" encounters specially // Create observations linked to the encounter if (encountertype === localStorage.screenervitalsUuidencountertype) { var observations = jsonencounter.observations(); // Create set of observations var createObs = function (c, v) { // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-368 // Validate before submitting an Obs observations.add({ obsDatetime : t, person: personUuid, concept: c, value: v }); }; console.log("Creating Obs for uuid types..."); v = Ext.getCmp("vitalsForm").getValues(); createObs(localStorage.bloodoxygensaturationUuidconcept, v.bloodOxygenSaturationField[0]); createObs(localStorage.diastolicbloodpressureUuidconcept, v.diastolicBloodPressureField[0]); createObs(localStorage.respiratoryRateUuidconcept, v.respiratoryRateField[0]); createObs(localStorage.systolicbloodpressureUuidconcept, v.systolicBloodPressureField[0]); createObs(localStorage.temperatureUuidconcept, v.temperatureField[0]); createObs(localStorage.pulseUuidconcept, v.pulseField[0]); observations.sync(); console.log("... Complete! Created Obs for new uuid types"); } // Create encounter var store = Ext.create('Screener.store.encounterpost'); store.add(jsonencounter); store.sync(); store.on('write', function () { Ext.getStore('patientStore').load(); }, this); return store; }, ======= >>>>>>> <<<<<<< // Add back button to toolbar which points to old page var topbar = Ext.getCmp("topbar"); topbar.setBackButtonTargetPage(oldPage); }, onDateChange: function() { if(Ext.getCmp('dob').getValue() !== "" && Ext.getCmp('dob').getValue().length > 0) { var dt = new Date(); var currentDate = new Date(); console.log("inside if date of birth") console.log(Ext.getCmp('dob').getValue()); //var dateFormat = new Array( "j/n/Y","d/m/Y"); //for(var i =0; i< dateFormat.length ; i++) { dt = Ext.Date.parse(Ext.getCmp('dob').getValue(), "Y-n-j" , true); console.log("dateValidated"+dt); if(dt === null || dt === undefined) { console.log("inside 2nd if"); Ext.Msg.alert("Invalid date format") return false; } else { if(dt.getFullYear() > currentDate.getFullYear()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false; } if(dt.getFullYear() === currentDate.getFullYear()) { if(dt.getMonth() > currentDate.getMonth()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false } if(dt.getMonth() === currentDate.getMonth()) { if(dt.getDate() > currentDate.getDate()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false } } } } return true; // } } ======= >>>>>>> // Add back button to toolbar which points to old page var topbar = Ext.getCmp("topbar"); topbar.setBackButtonTargetPage(oldPage); }, onDateChange: function() { if(Ext.getCmp('dob').getValue() !== "" && Ext.getCmp('dob').getValue().length > 0) { var dt = new Date(); var currentDate = new Date(); console.log("inside if date of birth") console.log(Ext.getCmp('dob').getValue()); //var dateFormat = new Array( "j/n/Y","d/m/Y"); //for(var i =0; i< dateFormat.length ; i++) { dt = Ext.Date.parse(Ext.getCmp('dob').getValue(), "Y-n-j" , true); console.log("dateValidated"+dt); if(dt === null || dt === undefined) { console.log("inside 2nd if"); Ext.Msg.alert("Invalid date format") return false; } else { if(dt.getFullYear() > currentDate.getFullYear()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false; } if(dt.getFullYear() === currentDate.getFullYear()) { if(dt.getMonth() > currentDate.getMonth()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false } if(dt.getMonth() === currentDate.getMonth()) { if(dt.getDate() > currentDate.getDate()) { Ext.Msg.alert("Entered Date should not be greater then current Date") return false } } } } return true; // } }
<<<<<<< //Ext.getCmp('casteConfirm').setValue(Ext.getCmp('caste').value); ======= // This was causing a bug, as none of the fields after this line were copied to confirmation page // Ext.getCmp('casteConfirm').setValue(Ext.getCmp('caste').value); >>>>>>> // This was causing a bug, as none of the fields after this line were copied to confirmation page // Ext.getCmp('casteConfirm').setValue(Ext.getCmp('caste').value); <<<<<<< Ext.getCmp('patientFirstName').reset() Ext.getCmp('patientLastName').reset() Ext.getCmp('relativeFirstName').reset() Ext.getCmp('relativeLastName').reset() Ext.getCmp('sexRadioGroup').reset() Ext.getCmp('education').reset() Ext.getCmp('dob').reset() Ext.getCmp('patientAge').reset() //Ext.getCmp('caste').reset() Ext.getCmp('occupation').reset() Ext.getCmp('block').reset() Ext.getCmp('street').reset() Ext.getCmp('town').reset() Ext.getCmp('tehsil').reset() Ext.getCmp('district').reset() Ext.getCmp('phoneContactInformation').reset() Ext.getCmp('patientPrimaryContact').reset() Ext.getCmp('patientSecondaryContact').reset() Ext.getCmp('oldPatientIdentifier').reset() ======= var fields = [ 'patientFirstName', 'patientLastName', 'relativeFirstName', 'relativeLastName', 'sexRadioGroup', 'education', 'dob', 'patientAge', 'occupation', 'block', 'street', 'town', 'tehsil', 'district', 'phoneContactInformation', 'patientPrimaryContact', 'patientSecondaryContact', 'oldPatientIdentifier', 'heightIDcm', 'weightIDkg', 'bmiNumberfieldID' ]; for (var i = 0; i < fields.length; i++) { Ext.getCmp(fields[i]).reset(); } >>>>>>> var fields = [ 'patientFirstName', 'patientLastName', 'relativeFirstName', 'relativeLastName', 'sexRadioGroup', 'education', 'dob', 'patientAge', 'occupation', 'block', 'street', 'town', 'tehsil', 'district', 'phoneContactInformation', 'patientPrimaryContact', 'patientSecondaryContact', 'oldPatientIdentifier', 'heightIDcm', 'weightIDkg', 'bmiNumberfieldID' ]; for (var i = 0; i < fields.length; i++) { Ext.getCmp(fields[i]).reset(); } <<<<<<< ======= // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-206 //right now there is bug in openmrs server due to which sending attributes with body of //post call leads to 500 response status so right now I am commenting it for /* attributes : [{ value : Ext.getCmp('relativeFirstName').value, attributeType : '88b65382-496f-4789-b200-f01985e609e5' }, { value : Ext.getCmp('relativeLastName').value, attributeType : '606157e9-e2d9-454d-bef4-27a56b3da953' }]*/ >>>>>>> <<<<<<< if(Ext.getCmp('oldPatientIdentifier').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('oldPatientIdentifier').getValue(), //the attributeType will change if we change the server so change them if server changes attributeType : localStorage.oldPatientIdentificationNumberUuidpersonattributetype }) } /*if(Ext.getCmp('caste').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('caste').getValue(), attributeType : 'cff6cebc-24e7-46b0-9841-0269b56b01f1' }) }*/ if(Ext.getCmp('education').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('education').getValue(), attributeType : localStorage.educationUuidpersonattributetype }) } if(Ext.getCmp('occupation').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('occupation').getValue(), attributeType : localStorage.occupationUuidpersonattributetype }) } if(Ext.getCmp('tehsil').getValue() != ""){ jsonperson.data.attributes.push({ value : Ext.getCmp('tehsil').getValue(), attributeType : localStorage.tehsilUuidpersonattributetype }) } if(Ext.getCmp('district').getValue() != ""){ jsonperson.data.attributes.push({ value : Ext.getCmp('district').getValue(), attributeType : localStorage.districtUuidpersonattributetype }) } if(Ext.getCmp('phoneContactInformation').getChecked().length > 0){ if(Ext.getCmp('phoneContactInformation').getChecked()[0].boxLabel == "Yes"){ jsonperson.data.attributes.push({ value : "true", attributeType : localStorage.contactByPhoneUuidpersonattributetype }) } else { jsonperson.data.attributes.push({ value : "false", attributeType : localStorage.contactByPhoneUuidpersonattributetype }) } } if(Ext.getCmp('patientPrimaryContact').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('patientPrimaryContact').getValue(), attributeType : localStorage.primaryContactUuidpersonattributetype }) } if(Ext.getCmp('patientSecondaryContact').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('patientSecondaryContact').getValue(), attributeType : localStorage.secondaryContactUuidpersonattributetype }) } ======= // TODO: https://raxaemr.atlassian.net/browse/RAXAJSS-206 // Restore old code which adds patient Attributes // ('oldPatientIdentifier', 'caste', 'education', etc) >>>>>>> if(Ext.getCmp('oldPatientIdentifier').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('oldPatientIdentifier').getValue(), //the attributeType will change if we change the server so change them if server changes attributeType : localStorage.oldPatientIdentificationNumberUuidpersonattributetype }) } /*if(Ext.getCmp('caste').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('caste').getValue(), attributeType : 'cff6cebc-24e7-46b0-9841-0269b56b01f1' }) }*/ if(Ext.getCmp('education').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('education').getValue(), attributeType : localStorage.educationUuidpersonattributetype }) } if(Ext.getCmp('occupation').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('occupation').getValue(), attributeType : localStorage.occupationUuidpersonattributetype }) } if(Ext.getCmp('tehsil').getValue() != ""){ jsonperson.data.attributes.push({ value : Ext.getCmp('tehsil').getValue(), attributeType : localStorage.tehsilUuidpersonattributetype }) } if(Ext.getCmp('district').getValue() != ""){ jsonperson.data.attributes.push({ value : Ext.getCmp('district').getValue(), attributeType : localStorage.districtUuidpersonattributetype }) } if(Ext.getCmp('phoneContactInformation').getChecked().length > 0){ if(Ext.getCmp('phoneContactInformation').getChecked()[0].boxLabel == "Yes"){ jsonperson.data.attributes.push({ value : "true", attributeType : localStorage.contactByPhoneUuidpersonattributetype }) } else { jsonperson.data.attributes.push({ value : "false", attributeType : localStorage.contactByPhoneUuidpersonattributetype }) } } if(Ext.getCmp('patientPrimaryContact').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('patientPrimaryContact').getValue(), attributeType : localStorage.primaryContactUuidpersonattributetype }) } if(Ext.getCmp('patientSecondaryContact').getValue() != null){ jsonperson.data.attributes.push({ value : Ext.getCmp('patientSecondaryContact').getValue(), attributeType : localStorage.secondaryContactUuidpersonattributetype }) }
<<<<<<< /** * Copyright 2012, Raxa * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * This script initiates the registration module */ Ext.Loader.setConfig({ enabled: true, paths: { 'Ext.i18n': '../lib/i18n' //Path to the i18n library } }); Ext.require('Ext.i18n.Bundle', function(){ Ext.i18n.appBundle = Ext.create('Ext.i18n.Bundle',{ bundle: 'RaxaEmrReg', //Specify language here lang: 'en-US', path: 'app/view', //Path to the .properties file noCache: true }); }); Ext.application({ name: 'Registration', views: ['Viewport', 'Home', 'RegistrationPart1', 'RegistrationConfirm', 'RegistrationBMI', 'SearchPart1', 'SearchPart2', 'SearchConfirm'], controllers: ['Main', 'BMI','Search','PrintCard'], launch: function () { if(Util.checkModulePrivilege('registrationextjs4')){ Ext.create('Registration.view.Viewport'); } } ======= /** * Copyright 2012, Raxa * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * This script initiates the registration module */ Ext.Loader.setConfig({ enabled: true, paths: { 'Ext.i18n': '../lib/i18n' //Path to the i18n library } }); Ext.require('Ext.i18n.Bundle', function(){ Ext.i18n.appBundle = Ext.create('Ext.i18n.Bundle',{ bundle: 'RaxaEmrReg', //Specify language here lang: 'en-US', path: 'app/view', //Path to the .properties file noCache: true }); }); Ext.application({ name: 'Registration', views: ['Viewport', 'Home', 'RegistrationPart1', 'IllnessDetails', 'RegistrationConfirm', 'RegistrationBMI', 'SearchPart1', 'SearchPart2', 'SearchConfirm'], controllers: ['Main', 'BMI','Search'], stores: ['Person', 'identifiersType', 'location', 'patient', 'obsStore', 'encounterStore', 'orderStore', 'providerStore', 'Doctors'], models: ['Person', 'addresses', 'names', 'patient', 'identifiers', 'attributes', 'obsModel', 'encounterModel', 'orderModel', 'providerModel', 'Doctor'], launch: function () { Ext.create('Registration.view.Viewport'); } >>>>>>> /** * Copyright 2012, Raxa * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * This script initiates the registration module */ Ext.Loader.setConfig({ enabled: true, paths: { 'Ext.i18n': '../lib/i18n' //Path to the i18n library } }); Ext.require('Ext.i18n.Bundle', function(){ Ext.i18n.appBundle = Ext.create('Ext.i18n.Bundle',{ bundle: 'RaxaEmrReg', //Specify language here lang: 'en-US', path: 'app/view', //Path to the .properties file noCache: true }); }); Ext.application({ name: 'Registration', views: ['Viewport', 'Home', 'RegistrationPart1', 'IllnessDetails', 'RegistrationConfirm', 'RegistrationBMI', 'SearchPart1', 'SearchPart2', 'SearchConfirm'], controllers: ['Main', 'BMI','Search','PrintCard'], launch: function () { if(Util.checkModulePrivilege('registrationextjs4')){ Ext.create('Registration.view.Viewport'); } }
<<<<<<< const defaultProps = { viewData: {}, }; ======= const polyfills = [ 'default', 'fetch', 'HTMLCanvasElement.prototype.toBlob', 'Node.prototype.contains', 'Number.isNaN', 'Object.assign', 'Object.entries', 'Object.values', 'Promise', 'requestIdleCallback', 'String.prototype.includes', 'URL', ].join(','); >>>>>>> const defaultProps = { viewData: {}, }; const polyfills = [ 'default', 'fetch', 'HTMLCanvasElement.prototype.toBlob', 'Node.prototype.contains', 'Number.isNaN', 'Object.assign', 'Object.entries', 'Object.values', 'Promise', 'requestIdleCallback', 'String.prototype.includes', 'URL', ].join(',');
<<<<<<< config.node = { console: 'mock', fs: 'empty', net: 'empty', tls: 'empty', }; ======= config.node = { ...config.node, fs: "empty", } >>>>>>> config.node = { ...config.node, fs: "empty", };
<<<<<<< const { locationData, loginData, communityData } = usePageContext(); ======= const renderHeader = (useFullHeader, modeProps) => { const { collabData, historyData, pubData, updateLocalData } = modeProps; if (useFullHeader) { return ( <PubSuspendWhileTyping delay={1000}> {() => ( <PubHeader pubData={pubData} updateLocalData={updateLocalData} collabData={collabData} historyData={historyData} communityData={props.communityData} /> )} </PubSuspendWhileTyping> ); } return ( <PubHeaderCompact pubData={pubData} locationData={props.locationData} communityData={props.communityData} /> ); }; >>>>>>> const { loginData, locationData, communityData } = usePageContext(); const renderHeader = (useFullHeader, modeProps) => { const { collabData, historyData, pubData, updateLocalData } = modeProps; if (useFullHeader) { return ( <PubSuspendWhileTyping delay={1000}> {() => ( <PubHeader pubData={pubData} updateLocalData={updateLocalData} collabData={collabData} historyData={historyData} communityData={communityData} /> )} </PubSuspendWhileTyping> ); } return ( <PubHeaderCompact pubData={pubData} locationData={locationData} communityData={communityData} /> ); }; <<<<<<< {({ pubData, collabData, firebaseBranchRef, updateLocalData, historyData }) => { const mode = pubData.mode; const modeProps = { pubData: pubData, collabData: collabData, historyData: historyData, firebaseBranchRef: firebaseBranchRef, updateLocalData: updateLocalData, }; return ( <React.Fragment> <PubSuspendWhileTyping delay={1000}> {() => ( <PubHeader pubData={pubData} updateLocalData={updateLocalData} collabData={collabData} historyData={historyData} /> )} </PubSuspendWhileTyping> {mode === 'document' && <PubDocument {...modeProps} />} {mode === 'manage' && <PubManage {...modeProps} />} {mode === 'merge' && <PubMerge {...modeProps} />} {mode === 'review' && <PubReview {...modeProps} />} {mode === 'reviews' && <PubReviews {...modeProps} />} {mode === 'reviewCreate' && <PubReviewCreate {...modeProps} />} {mode === 'branchCreate' && <PubBranchCreate {...modeProps} />} </React.Fragment> ); }} </PubSyncManager> ======= <PubSyncManager pubData={props.pubData} locationData={props.locationData} communityData={props.communityData} loginData={props.loginData} > {({ pubData, collabData, firebaseBranchRef, updateLocalData, historyData, }) => { const mode = pubData.mode; const modeProps = { pubData: pubData, collabData: collabData, historyData: historyData, firebaseBranchRef: firebaseBranchRef, updateLocalData: updateLocalData, }; return ( <React.Fragment> {renderHeader(mode === 'document', modeProps)} {mode === 'document' && <PubDocument {...modeProps} />} {mode === 'manage' && <PubManage {...modeProps} />} {mode === 'merge' && <PubMerge {...modeProps} />} {mode === 'review' && <PubReview {...modeProps} />} {mode === 'reviews' && <PubReviews {...modeProps} />} {mode === 'reviewCreate' && <PubReviewCreate {...modeProps} />} {mode === 'branchCreate' && <PubBranchCreate {...modeProps} />} </React.Fragment> ); }} </PubSyncManager> </PageWrapper> >>>>>>> {({ pubData, collabData, firebaseBranchRef, updateLocalData, historyData }) => { const mode = pubData.mode; const modeProps = { pubData: pubData, collabData: collabData, historyData: historyData, firebaseBranchRef: firebaseBranchRef, updateLocalData: updateLocalData, }; return ( <React.Fragment> {renderHeader(mode === 'document', modeProps)} {mode === 'document' && <PubDocument {...modeProps} />} {mode === 'manage' && <PubManage {...modeProps} />} {mode === 'merge' && <PubMerge {...modeProps} />} {mode === 'review' && <PubReview {...modeProps} />} {mode === 'reviews' && <PubReviews {...modeProps} />} {mode === 'reviewCreate' && <PubReviewCreate {...modeProps} />} {mode === 'branchCreate' && <PubBranchCreate {...modeProps} />} </React.Fragment> ); }} </PubSyncManager>
<<<<<<< import classNames from 'classnames'; import { Header, Footer, GdprBanner, AccentStyle, NavBar, Icon } from 'components'; ======= import { Header, Footer, GdprBanner, AccentStyle, NavBar, Icon, SkipLink } from 'components'; >>>>>>> import classNames from 'classnames'; import { Header, Footer, GdprBanner, AccentStyle, NavBar, Icon, SkipLink } from 'components'; <<<<<<< <GdprBanner loginData={loginData} /> ======= <SkipLink targetId="main-content">Skip to main content</SkipLink> <GdprBanner loginData={props.loginData} /> >>>>>>> <SkipLink targetId="main-content">Skip to main content</SkipLink> <GdprBanner loginData={loginData} /> <<<<<<< {isDashboard && ( <div className="side-content"> <SideMenu communityData={communityData} locationData={locationData} /> </div> )} <div className="page-content"> {isDashboard && ( <Breadcrumbs communityData={communityData} locationData={locationData} /> )} {children} </div> ======= <div id="main-content" tabIndex="-1" className="page-content"> {props.children} </div> >>>>>>> {isDashboard && ( <div className="side-content"> <SideMenu communityData={communityData} locationData={locationData} /> </div> )} <div id="main-content" tabIndex="-1" className="page-content"> {isDashboard && ( <Breadcrumbs communityData={communityData} locationData={locationData} /> )} {children} </div>
<<<<<<< import Plugins from '../../components/EditorPlugins/index'; export function codeMirrorStyles(loginData) { ======= export function codeMirrorStyles(loginData, parentClass) { >>>>>>> import Plugins from '../../components/EditorPlugins/index'; export function codeMirrorStyles(loginData, parentClass) { <<<<<<< const pluginStyles = {}; for (const pluginKey in Plugins) { if (Plugins.hasOwnProperty(pluginKey)) { const plugin = Plugins[pluginKey]; if (plugin.Config.color) { pluginStyles[`.cm-plugin-${pluginKey}`] = { backgroundColor: plugin.Config.color }; } } } return { ...pluginStyles, ======= const output = { >>>>>>> const pluginStyles = {}; for (const pluginKey in Plugins) { if (Plugins.hasOwnProperty(pluginKey)) { const plugin = Plugins[pluginKey]; if (plugin.Config.color) { pluginStyles[`.cm-plugin-${pluginKey}`] = { backgroundColor: plugin.Config.color }; } } } const output = { ...pluginStyles,
<<<<<<< import {featurePub} from '../services/recommendations'; ======= const Firebase = require('firebase'); import {fireBaseURL, generateAuthToken} from '../services/firebase'; >>>>>>> const Firebase = require('firebase'); import {fireBaseURL, generateAuthToken} from '../services/firebase'; import {featurePub} from '../services/recommendations'; <<<<<<< ======= >>>>>>> <<<<<<< return res.status(201).json(savedJournal.subdomain); ======= >>>>>>> <<<<<<< }); app.get('/getJournal', function(req,res){ ======= export function getJournal(req, res) { >>>>>>> export function getJournal(req, res) { <<<<<<< isAdmin = true; ======= isAdmin = true; >>>>>>> isAdmin = true; <<<<<<< app.get('/getRandomSlug', function(req, res) { Pub.getRandomSlug(req.query.journalID, function(err, result){ if (err){console.log(err); return res.json(500);} ======= export function getRandomSlug(req, res) { Pub.getRandomSlug(req.query.journalID, function(err, result) { if (err) {console.log(err); return res.json(500);} >>>>>>> export function getRandomSlug(req, res) { Pub.getRandomSlug(req.query.journalID, function(err, result) { if (err) {console.log(err); return res.json(500);} <<<<<<< }); app.post('/saveJournal', function(req,res){ ======= } app.get('/getRandomSlug', getRandomSlug); export function saveJournal(req, res) { >>>>>>> } app.get('/getRandomSlug', getRandomSlug); export function saveJournal(req, res) { <<<<<<< journal.save(function(err, result){ if (err) { return res.status(500).json(err); } Journal.populate(result, Journal.populationObject(), (err, populatedJournal)=> { ======= journal.save(function(errSave, result) { if (errSave) { return res.status(500).json(errSave); } Journal.populate(result, Journal.populationObject(), function(errPopulate, populatedJournal) { >>>>>>> journal.save(function(errSave, result) { if (errSave) { return res.status(500).json(errSave); } Journal.populate(result, Journal.populationObject(), function(errPopulate, populatedJournal) { <<<<<<< Notification.getUnreadCount(userID, function(err, notificationCount) { const loginData = req.user ======= Notification.getUnreadCount(userID, function(errNotificationUnread, notificationCount) { const loginData = req.user >>>>>>> Notification.getUnreadCount(userID, function(errNotificationUnread, notificationCount) { const loginData = req.user <<<<<<< if (result) { // If it is a journal, check if the user is an admin. let isAdmin = false; const userID = req.user ? req.user._id : undefined; const adminsLength = result ? result.admins.length : 0; for(let index = adminsLength; index--; ) { if (String(result.admins[index]._id) === String(userID)) { isAdmin = true; } ======= Asset.find({_id: { $in: loginData.assets } }, function(errAssetFind, assets) { if (assets.length) { loginData.assets = assets; >>>>>>> Asset.find({_id: { $in: loginData.assets } }, function(errAssetFind, assets) { if (assets.length) { loginData.assets = assets; <<<<<<< } else { ======= } >>>>>>> } <<<<<<< } ======= }); >>>>>>> }); <<<<<<< journal.save(function (err, savedJournal) { if (err) { return res.status(500).json(err); } ======= >>>>>>>
<<<<<<< const searchInputRef = useRef(); const [isExpanded, setIsExpanded] = useState(); ======= const [isExpanded, setIsExpanded] = useState(defaultExpanded); >>>>>>> const searchInputRef = useRef(); const [isExpanded, setIsExpanded] = useState(defaultExpanded);
<<<<<<< const scopeData = await getScope({ communityId: communityId, loginId: userId, }); const editProps = [ 'title', 'subdomain', 'description', 'avatar', 'favicon', 'accentColorLight', 'accentColorDark', 'navigation', 'website', 'twitter', 'facebook', 'email', 'hideCreatePubButton', 'hideNav', 'defaultPubCollections', 'headerLogo', 'headerColorType', 'useHeaderTextAccent', 'headerLinks', 'hideHero', 'hideHeaderLogo', 'heroLogo', 'heroBackgroundImage', 'heroBackgroundColor', 'heroTextColor', 'useHeaderGradient', 'heroImage', 'heroTitle', 'heroText', 'heroPrimaryButton', 'heroSecondaryButton', 'heroAlign', ]; ======= const isSuperAdmin = checkIfSuperAdmin(userId); return CommunityAdmin.findOne({ where: { communityId: communityId, userId: userId } }).then( (communityAdminData) => { const editProps = [ 'title', 'subdomain', 'description', 'avatar', 'favicon', 'accentColorLight', 'accentColorDark', 'navigation', 'website', 'twitter', 'facebook', 'email', 'hideCreatePubButton', 'hideNav', 'defaultPubCollections', 'headerLogo', 'headerColorType', 'useHeaderTextAccent', 'headerLinks', 'hideHero', 'hideHeaderLogo', 'heroLogo', 'heroBackgroundImage', 'heroBackgroundColor', 'heroTextColor', 'useHeaderGradient', 'heroImage', 'heroTitle', 'heroText', 'heroPrimaryButton', 'heroSecondaryButton', 'heroAlign', 'navLinks', 'footerLinks', 'footerTitle', 'footerImage', ]; >>>>>>> const scopeData = await getScope({ communityId: communityId, loginId: userId, }); const editProps = [ 'title', 'subdomain', 'description', 'avatar', 'favicon', 'accentColorLight', 'accentColorDark', 'navigation', 'website', 'twitter', 'facebook', 'email', 'hideCreatePubButton', 'hideNav', 'defaultPubCollections', 'headerLogo', 'headerColorType', 'useHeaderTextAccent', 'headerLinks', 'hideHero', 'hideHeaderLogo', 'heroLogo', 'heroBackgroundImage', 'heroBackgroundColor', 'heroTextColor', 'useHeaderGradient', 'heroImage', 'heroTitle', 'heroText', 'heroPrimaryButton', 'heroSecondaryButton', 'heroAlign', 'navLinks', 'footerLinks', 'footerTitle', 'footerImage', ];
<<<<<<< const validLicenseSlug = !licenseSlug || scopeData.elements.activeCommunity.premiumLicenseFlag || licenseSlug === 'cc-by' || licenseSlug === 'cc-0'; const canManage = validLicenseSlug && scopeData.activePermissions.canManage; const editProps = [ 'slug', 'title', 'description', 'avatar', 'headerStyle', 'headerBackgroundType', 'headerBackgroundColor', 'headerBackgroundImage', 'isCommunityAdminManaged', 'communityAdminDraftPermissions', 'draftPermissions', 'labels', 'downloads', 'licenseSlug', ]; /* TODO: There are open questions about who should */ /* be able to delete pubs. Does a PubManager have the */ /* power to delete a pub and everyone else's branches? */ return { create: true, update: canManage ? editProps : false, destroy: canManage, }; ======= return Promise.all([findPubManager, findCommunityAdmin, findPub, findCommunity]).then( ([pubManagerData, communityAdminData, pubData, communityData]) => { const validLicenseSlug = !licenseSlug || communityData.premiumLicenseFlag || licenseSlug === 'cc-by' || licenseSlug === 'cc-0'; const canManage = validLicenseSlug && pubData && (isSuperAdmin || pubManagerData || (communityAdminData && pubData.isCommunityAdminManaged)); const editProps = [ 'slug', 'title', 'description', 'avatar', 'headerStyle', 'headerBackgroundColor', 'headerBackgroundImage', 'isCommunityAdminManaged', 'communityAdminDraftPermissions', 'draftPermissions', 'labels', 'downloads', 'licenseSlug', ]; /* TODO: There are open questions about who should */ /* be able to delete pubs. Does a PubManager have the */ /* power to delete a pub and everyone else's branches? */ return { create: true, update: canManage ? editProps : false, destroy: canManage, }; }, ); >>>>>>> const validLicenseSlug = !licenseSlug || scopeData.elements.activeCommunity.premiumLicenseFlag || licenseSlug === 'cc-by' || licenseSlug === 'cc-0'; const canManage = validLicenseSlug && scopeData.activePermissions.canManage; const editProps = [ 'slug', 'title', 'description', 'avatar', 'headerStyle', 'headerBackgroundColor', 'headerBackgroundImage', 'isCommunityAdminManaged', 'communityAdminDraftPermissions', 'draftPermissions', 'labels', 'downloads', 'licenseSlug', ]; /* TODO: There are open questions about who should */ /* be able to delete pubs. Does a PubManager have the */ /* power to delete a pub and everyone else's branches? */ return { create: true, update: canManage ? editProps : false, destroy: canManage, };
<<<<<<< import { GridWrapper } from 'components'; import Icon from 'components/Icon/Icon'; ======= import PropTypes from 'prop-types'; import { GridWrapper, Icon } from 'components'; >>>>>>> import { GridWrapper, Icon } from 'components';
<<<<<<< import stickybits from 'stickybits'; import { usePageContext } from 'utils/hooks'; ======= import { useSticky } from 'utils/useSticky'; >>>>>>> import { usePageContext } from 'utils/hooks'; import { useSticky } from 'utils/useSticky';
<<<<<<< ManagerBase.prototype._create_comm = function(comm_target_name, model_id, metadata) { return Promise.reject('No backend.'); ======= ManagerBase.prototype._create_comm = function(comm_target_name, model_id, data) { return Promise.reject("No backend."); >>>>>>> ManagerBase.prototype._create_comm = function(comm_target_name, model_id, data) { return Promise.reject('No backend.');
<<<<<<< // jupyter-js-widgets version var version = '4.1.0dev'; var _ = require('underscore'); var Backbone = require('backbone'); var utils = require('./utils'); ======= var _ = require("underscore"); var Backbone = require("backbone"); var utils = require("./utils"); var semver = require("semver"); >>>>>>> var _ = require('underscore'); var Backbone = require('backbone'); var utils = require('./utils'); var semver = require('semver'); <<<<<<< return utils.loadClass( model.get('_view_name'), model.get('_view_module'), ManagerBase._view_types ).then(function(ViewType) { ======= return utils.loadClass(model.get('_view_name'), model.get('_view_module'), ManagerBase._view_types, that.require_error).then(function(ViewType) { >>>>>>> return utils.loadClass( model.get('_view_name'), model.get('_view_module'), ManagerBase._view_types, that.require_error ).then(function(ViewType) { <<<<<<< * Parse a version string * @param {string} version i.e. '1.0.2dev' or '2.4' * @return {object} version object {major, minor, patch, dev} */ ManagerBase.prototype._parseVersion = function(version) { if (!version) return null; var versionParts = version.split('.'); var versionTail = versionParts.slice(-1)[0]; var versionSuffix = versionTail.slice(String(parseInt(versionTail)).length); return { major: parseInt(versionParts[0]), minor: versionParts.length > 1 ? parseInt(versionParts[1]) : 0, patch: versionParts.length > 2 ? parseInt(versionParts[2]) : 0, dev: versionSuffix.trim().toLowerCase() === 'dev' }; }; /** ======= >>>>>>> <<<<<<< var model_promises = []; ======= >>>>>>>
<<<<<<< }, ======= this._textAlign = this.defaultTextAlign; >>>>>>> this._textAlign = this.defaultTextAlign; },
<<<<<<< Crafty.c("Collision", { ======= Crafty.c("collision", { init: function() { this.requires("2D"); }, >>>>>>> Crafty.c("Collision", { init: function() { this.requires("2D"); },
<<<<<<< _textFont: { "type": "", "weight": "", "size": "", "family": "" }, defaultSize: "10px", defaultFamily: "sans-serif", ======= >>>>>>> defaultSize: "10px", defaultFamily: "sans-serif",
<<<<<<< this.hookCommand(new CommandStruct(null, { name: 'changelog', info: 'Shows the changelog.', func: this.commandChangelog })); ======= this.hookCommand(new CommandStruct(null, { name: 'udiag', info: 'Generates and uploads a diagnostic file.', func: this.uDiagnostics.bind(this) })); this.hookCommand(new CommandStruct(null, { name: 'diag', info: 'Generates and copies diagnostic information to your clipboard.', func: this.cDiagnostics.bind(this) })); >>>>>>> this.hookCommand(new CommandStruct(null, { name: 'changelog', info: 'Shows the changelog.', func: this.commandChangelog })); this.hookCommand(new CommandStruct(null, { name: 'udiag', info: 'Generates and uploads a diagnostic file.', func: this.uDiagnostics.bind(this) })); this.hookCommand(new CommandStruct(null, { name: 'diag', info: 'Generates and copies diagnostic information to your clipboard.', func: this.cDiagnostics.bind(this) })); <<<<<<< `<span class='command-plugin-tag${isDark(h2rgb(color)) ? ' dark' : ''}' style="color: #${color};border-color: #${command.plugin.color};"> ${command.plugin.name}</span> - ` : '' }${command.info}</div> ======= `<span class='command-plugin-tag${isDark(h2rgb(color)) ? ' dark' : ''}' style="color: #${color};border-color: #${command.plugin.color};"> ${command.plugin.name}</span> - ` : '' }${command.info}</div> >>>>>>> `<span class='command-plugin-tag${isDark(h2rgb(color)) ? ' dark' : ''}' style="color: #${color};border-color: #${command.plugin.color};"> ${command.plugin.name}</span> - ` : '' }${command.info}</div>
<<<<<<< change(date(2019, 9, 17), <>Added more information to the <SpellLink id={SPELLS.PURGE_THE_WICKED_BUFF.id} /> module.</>, [Khadaj]), ======= change(date(2019, 8, 17), <>Updated cooldown of <SpellLink id={SPELLS.POWER_WORD_RADIANCE.id} /> from 18 seconds to 20.</>, [Adoraci]), change(date(2019, 8, 16), <>Fixed <SpellLink id={SPELLS.SHADOWFIEND.id} /> not showing as atonement source when <ItemLink id={ITEMS.GLYPH_OF_THE_LIGHTSPAWN.id} /> is selected.</>, [Adoraci]), change(date(2019, 8, 12), 'Added essence Lucid Dreams.', [blazyb]), >>>>>>> change(date(2019, 9, 17), <>Added more information to the <SpellLink id={SPELLS.PURGE_THE_WICKED_BUFF.id} /> module.</>, [Khadaj]), change(date(2019, 8, 17), <>Updated cooldown of <SpellLink id={SPELLS.POWER_WORD_RADIANCE.id} /> from 18 seconds to 20.</>, [Adoraci]), change(date(2019, 8, 16), <>Fixed <SpellLink id={SPELLS.SHADOWFIEND.id} /> not showing as atonement source when <ItemLink id={ITEMS.GLYPH_OF_THE_LIGHTSPAWN.id} /> is selected.</>, [Adoraci]), change(date(2019, 8, 12), 'Added essence Lucid Dreams.', [blazyb]),
<<<<<<< const { article: { slug }, emailSignupUrl, headerHeight, isMobile, marginTop, showTooltips, onOpenAuthModal, } = this.props const { renderTimes } = this.state ======= const { showTooltips, onOpenAuthModal } = this.props const { renderTimes, articles } = this.state >>>>>>> const { article: { slug }, emailSignupUrl, isMobile, showTooltips, onOpenAuthModal, } = this.props const { renderTimes } = this.state <<<<<<< this.state.articles.map((article, i) => { const isFirstInScroll = i === 0 ======= articles.map((article, i) => { >>>>>>> this.state.articles.map((article, i) => { const isFirstInScroll = i === 0 <<<<<<< isTruncated={!isFirstInScroll} isMobile={isMobile} emailSignupUrl={emailSignupUrl} ======= isTruncated={i !== 0} isMobile={this.props.isMobile} >>>>>>> isTruncated={!isFirstInScroll} isMobile={isMobile} <<<<<<< headerHeight={isFirstInScroll ? headerHeight : null} marginTop={isFirstInScroll ? marginTop : null} ======= >>>>>>>
<<<<<<< SENTRY_PUBLIC_DSN, ======= OPENREDIS_URL, REQUEST_EXPIRE_MS, REQUEST_LIMIT, SENTRY_PRIVATE_DSN, >>>>>>> SENTRY_PRIVATE_DSN,
<<<<<<< import { buildServerApp } from 'reaction/Router' import { Meta, query, toJSONLD } from './components/Meta' ======= import { buildServerApp } from 'reaction/Artsy/Router' import { Meta, query } from './components/Meta' >>>>>>> import { buildServerApp } from 'reaction/Artsy/Router' import { Meta, query, toJSONLD } from './components/Meta'
<<<<<<< // Create the list if it doesn't exist. // It might be better to mark ourselves as invalid instead, but this works just fine. this.target.lists[listName] = createList(); ======= this.target.lists[listName] = new Scratch3List(); >>>>>>> this.target.lists[listName] = createList(); <<<<<<< function createList() { const list = []; list.modified = false; list.toString = function () { ======= class Scratch3List extends Array { constructor() { super(...arguments); this.modified = false; } toString() { >>>>>>> function createList() { const list = []; list.modified = false; list.toString = function () { <<<<<<< const scratchList = createList(); for (var i = 0; i < content.length; i++) { scratchList[i] = content[i]; } target.lists[name] = scratchList; ======= target.lists[name] = new Scratch3List().concat(content); target.listIds[id] = name; >>>>>>> const scratchList = createList(); for (var i = 0; i < content.length; i++) { scratchList[i] = content[i]; } target.lists[name] = scratchList; <<<<<<< // Create missing lists in the sprite scope. this.target.lists[name] = sb3.createList(); ======= this.target.lists[name] = new sb3.Scratch3List(); >>>>>>> this.target.lists[name] = sb3.createList();
<<<<<<< const lod = costume.get(objectScale * c.stage.zoom); ctx.imageSmoothingEnabled = false; const x = -costume.rotationCenterX * objectScale; const y = -costume.rotationCenterY * objectScale; const w = costume.width * objectScale; const h = costume.height * objectScale; ======= const image = costume.get(objectScale * c.stage.zoom); const x = -costume.rotationCenterX * objectScale; const y = -costume.rotationCenterY * objectScale; const w = costume.width * objectScale; const h = costume.height * objectScale; if (w < 1 || h < 1) { ctx.restore(); return; } ctx.imageSmoothingEnabled = false; >>>>>>> const lod = costume.get(objectScale * c.stage.zoom); ctx.imageSmoothingEnabled = false; const x = -costume.rotationCenterX * objectScale; const y = -costume.rotationCenterY * objectScale; const w = costume.width * objectScale; const h = costume.height * objectScale; if (w < 1 || h < 1) { ctx.restore(); return; } ctx.imageSmoothingEnabled = false; <<<<<<< this._reset(this.stageContext, scale * P.config.scale); ======= this._reset(this.stageContext, scale); this.noEffects = true; >>>>>>> this._reset(this.stageContext, scale * P.config.scale); <<<<<<< ======= getContext() { if (this._context) return this._context; const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); if (!ctx) { throw new Error('cannot get 2d rendering context for BitmapCustome ' + this.name); } canvas.width = this.width; canvas.height = this.height; ctx.drawImage(this.source, 0, 0); this._context = ctx; return ctx; } >>>>>>> <<<<<<< ======= getContext() { if (this._context) return this._context; const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); if (!ctx) { throw new Error('cannot get 2d rendering context for VectorCostume ' + this.name); } canvas.width = this.width; canvas.height = this.height; ctx.drawImage(this.source, 0, 0); this._context = ctx; return ctx; } >>>>>>>
<<<<<<< })(readers = IO.readers || (IO.readers = {})); })(IO = P.IO || (P.IO = {})); })(P || (P = {})); /// <reference path="phosphorus.ts" /> /// <reference path="core.ts" /> /// <reference path="audio.ts" /> // The phosphorus runtime for Scratch // Provides methods expected at runtime by scripts created by the compiler and an environment for Scratch scripts to run var P; (function (P) { var runtime; (function (runtime_1) { // Current runtime var runtime; // Current stage var self; // Current sprite or stage var S; // Current thread state. var R; // Stack of states (R) for this thread var STACK; // Current procedure call, if any. Contains arguments. var C; // This thread's call (C) stack var CALLS; // If level of layers of "Run without screen refresh" we are in // Each level (usually procedures) of depth will increment and decrement as they start and stop. // As long as this is greater than 0, functions will run without waiting for the screen. var WARP; var BASE; // The ID of the active thread in the Runtime's queue var THREAD; // The next function to run immediately after this one. var IMMEDIATE; // Has a "visual change" been made in this frame? var VISUAL; // Note: // Your editor might warn you about "unused variables" or things like that. // That is a complete lie and you should disregard such warnings. const epoch = Date.UTC(2000, 0, 1); const INSTRUMENTS = P.audio.instruments; const DRUMS = P.audio.drums; const DIGIT = /\d/; const tts = { voice: 'alto', language: 'en', }; // Converts a value to its boolean equivalent var bool = function (v) { return +v !== 0 && v !== '' && v !== 'false' && v !== false; }; // Compares two values. Returns -1 if x < y, 1 if x > y, 0 if x === y var compare = function (x, y) { if ((typeof x === 'number' || DIGIT.test(x)) && (typeof y === 'number' || DIGIT.test(y))) { var nx = +x; var ny = +y; if (nx === nx && ny === ny) { return nx < ny ? -1 : nx === ny ? 0 : 1; } ======= })(readers = io.readers || (io.readers = {})); class FetchingAssetManager { constructor() { this.soundbankSource = 'soundbank/'; >>>>>>> })(readers = io.readers || (io.readers = {})); class FetchingAssetManager { constructor() { this.soundbankSource = 'soundbank/'; <<<<<<< var ttsSpeak = function (text) { return P.tts.speak(text, tts.voice, tts.language); }; var save = function () { STACK.push(R); R = {}; }; var restore = function () { R = STACK.pop(); }; var call = function (procedure, id, values) { if (procedure) { STACK.push(R); CALLS.push(C); C = { base: procedure.fn, fn: S.fns[id], args: procedure.call(values), numargs: [], boolargs: [], stack: STACK = [], warp: procedure.warp, }; R = {}; if (C.warp || WARP) { WARP++; IMMEDIATE = procedure.fn; ======= io.Manual = Manual; class PromiseTask extends Manual { constructor(promise) { super(); promise.then(() => this.markComplete()); } } io.PromiseTask = PromiseTask; class Loader { constructor() { this._tasks = []; this.aborted = false; this.error = false; } calculateProgress() { if (this.aborted) { return 1; >>>>>>> io.Manual = Manual; class PromiseTask extends Manual { constructor(promise) { super(); promise.then(() => this.markComplete()); } } io.PromiseTask = PromiseTask; class Loader { constructor() { this._tasks = []; this.aborted = false; this.error = false; } calculateProgress() { if (this.aborted) { return 1; <<<<<<< /** * Write JS to pause script execution until a Promise is settled (regardless of resolve/reject) */ sleepUntilSettles(source) { this.writeLn('save();'); this.writeLn('R.resume = false;'); this.writeLn('var localR = R;'); this.writeLn(`${source}`); this.writeLn(' .then(function() { localR.resume = true; })'); this.writeLn(' .catch(function() { localR.resume = true; });'); const label = this.addLabel(); this.writeLn('if (!R.resume) {'); this.forceQueue(label); this.writeLn('}'); this.writeLn('restore();'); } /** * Append to the content */ ======= >>>>>>> sleepUntilSettles(source) { this.writeLn('save();'); this.writeLn('R.resume = false;'); this.writeLn('var localR = R;'); this.writeLn(`${source}`); this.writeLn(' .then(function() { localR.resume = true; })'); this.writeLn(' .catch(function() { localR.resume = true; });'); const label = this.addLabel(); this.writeLn('if (!R.resume) {'); this.forceQueue(label); this.writeLn('}'); this.writeLn('restore();'); } <<<<<<< statementLibrary['text2speech_setVoice'] = function (util) { const VOICE = util.getInput('VOICE', 'string'); util.writeLn(`tts.voice = ${VOICE};`); }; statementLibrary['text2speech_setLanguage'] = function (util) { const LANGUAGE = util.getInput('LANGUAGE', 'string'); util.writeLn(`tts.language = ${LANGUAGE};`); }; statementLibrary['text2speech_speakAndWait'] = function (util) { const WORDS = util.getInput('WORDS', 'string'); util.sleepUntilSettles(`ttsSpeak(${WORDS})`); }; // Legacy no-ops // https://github.com/LLK/scratch-vm/blob/bb42c0019c60f5d1947f3432038aa036a0fddca6/src/blocks/scratch3_motion.js#L19 // https://github.com/LLK/scratch-vm/blob/bb42c0019c60f5d1947f3432038aa036a0fddca6/src/blocks/scratch3_looks.js#L248 ======= statementLibrary['speech2text_listenAndWait'] = function (util) { util.stage.initSpeech2Text(); util.writeLn('if (self.speech2text) {'); util.writeLn(' save();'); util.writeLn(' self.speech2text.startListen();'); util.writeLn(' R.id = self.speech2text.id();'); const label = util.addLabel(); util.writeLn(' if (self.speech2text.id() === R.id) {'); util.forceQueue(label); util.writeLn(' }'); util.writeLn(' self.speech2text.endListen();'); util.writeLn(' restore();'); util.writeLn('}'); }; statementLibrary['videoSensing_videoToggle'] = function (util) { const VIDEO_STATE = util.getInput('VIDEO_STATE', 'string'); util.writeLn(`switch (${VIDEO_STATE}) {`); util.writeLn(' case "off": self.showVideo(false); break;'); util.writeLn(' case "on": self.showVideo(true); break;'); util.writeLn('}'); }; >>>>>>> statementLibrary['text2speech_setVoice'] = function (util) { const VOICE = util.getInput('VOICE', 'string'); util.writeLn(`tts.voice = ${VOICE};`); }; statementLibrary['text2speech_setLanguage'] = function (util) { const LANGUAGE = util.getInput('LANGUAGE', 'string'); util.writeLn(`tts.language = ${LANGUAGE};`); }; statementLibrary['text2speech_speakAndWait'] = function (util) { const WORDS = util.getInput('WORDS', 'string'); util.sleepUntilSettles(`ttsSpeak(${WORDS})`); }; statementLibrary['speech2text_listenAndWait'] = function (util) { util.stage.initSpeech2Text(); util.writeLn('if (self.speech2text) {'); util.writeLn(' save();'); util.writeLn(' self.speech2text.startListen();'); util.writeLn(' R.id = self.speech2text.id();'); const label = util.addLabel(); util.writeLn(' if (self.speech2text.id() === R.id) {'); util.forceQueue(label); util.writeLn(' }'); util.writeLn(' self.speech2text.endListen();'); util.writeLn(' restore();'); util.writeLn('}'); }; statementLibrary['videoSensing_videoToggle'] = function (util) { const VIDEO_STATE = util.getInput('VIDEO_STATE', 'string'); util.writeLn(`switch (${VIDEO_STATE}) {`); util.writeLn(' case "off": self.showVideo(false); break;'); util.writeLn(' case "on": self.showVideo(true); break;'); util.writeLn('}'); }; <<<<<<< inputLibrary['text2speech_menu_voices'] = function (util) { return util.fieldInput('voices'); }; inputLibrary['text2speech_menu_languages'] = function (util) { return util.fieldInput('languages'); }; // Legacy no-ops // https://github.com/LLK/scratch-vm/blob/bb42c0019c60f5d1947f3432038aa036a0fddca6/src/blocks/scratch3_sensing.js#L74 // https://github.com/LLK/scratch-vm/blob/bb42c0019c60f5d1947f3432038aa036a0fddca6/src/blocks/scratch3_motion.js#L42-L43 const noopInput = (util) => util.anyInput('undefined'); inputLibrary['motion_yscroll'] = noopInput; inputLibrary['motion_xscroll'] = noopInput; inputLibrary['sensing_userid'] = noopInput; /* Hats */ hatLibrary['control_start_as_clone'] = { handle(util) { util.target.listeners.whenCloned.push(util.startingFunction); }, ======= watcherLibrary['sensing_answer'] = { evaluate(watcher) { return watcher.stage.answer; }, getLabel() { return 'answer'; }, >>>>>>> watcherLibrary['sensing_answer'] = { evaluate(watcher) { return watcher.stage.answer; }, getLabel() { return 'answer'; }, <<<<<<< return param; } }; watcherLibrary['sensing_loudness'] = { // We don't implement loudness. evaluate() { return -1; }, getLabel() { return 'loudness'; }, }; watcherLibrary['sensing_timer'] = { evaluate(watcher) { return (watcher.stage.runtime.now - watcher.stage.runtime.timerStart) / 1000; }, getLabel() { return 'timer'; }, }; watcherLibrary['sensing_username'] = { evaluate(watcher) { return watcher.stage.username; }, getLabel() { return 'username'; }, }; watcherLibrary['sound_volume'] = { evaluate(watcher) { return watcher.target.volume * 100; }, getLabel() { return 'volume'; }, }; }()); /// <reference path="phosphorus.ts" /> /** * Text-to-speech */ var P; (function (P) { var tts; (function (tts) { tts.mode = 1 /* WebAudio */; function speak(message, voice, language) { if (tts.mode === 0 /* Disabled */) { return Promise.resolve(); } return new Promise((resolve, reject) => { if (tts.mode === 1 /* WebAudio */) { const utterance = new SpeechSynthesisUtterance(message); utterance.lang = language; utterance.onerror = function () { resolve(); }; utterance.onend = function () { resolve(); }; speechSynthesis.speak(utterance); } else { // TODO: use the scratch API } }); } tts.speak = speak; })(tts = P.tts || (P.tts = {})); })(P || (P = {})); ======= webgl.WebGLProjectRenderer = WebGLProjectRenderer; })(webgl = renderer.webgl || (renderer.webgl = {})); })(renderer = P.renderer || (P.renderer = {})); })(P || (P = {})); >>>>>>> webgl.WebGLProjectRenderer = WebGLProjectRenderer; })(webgl = renderer.webgl || (renderer.webgl = {})); })(renderer = P.renderer || (P.renderer = {})); })(P || (P = {}));
<<<<<<< var homeStack = [ loadUser, loadProviders, isHomepage, dashExists, checkProfile, setViewVar('statuses', app.get('statuses')), render('dashboard') ]; app.get('/', homeStack); ======= var liveStack = [ isLive(app), loadUser, loadProviders, setViewVar('statuses', app.get('statuses')), setViewVar('disqus_shortname', config.disqus_shortname), setViewVar('live', true), render('live') ]; app.get('/', checkProfile, dashboardStack); app.get('/live', liveStack); >>>>>>> var homeStack = [ loadUser, loadProviders, isHomepage, dashExists, checkProfile, setViewVar('statuses', app.get('statuses')), render('dashboard') ]; var liveStack = [ isLive(app), loadUser, loadProviders, dashExists, setViewVar('statuses', app.get('statuses')), setViewVar('disqus_shortname', config.disqus_shortname), setViewVar('live', true), render('live') ]; app.get('/', homeStack); app.get('/live', liveStack);
<<<<<<< // TODO: Use fake timer await new Promise(resolve => setTimeout(resolve, txSubscription.getEventsTimeout() * 2) ); ======= // TODO: Use fake timer when Sinon/Lolex supports it. // See more: // https://github.com/sinonjs/sinon/issues/1739 // https://github.com/sinonjs/lolex/issues/114 // https://stackoverflow.com/a/50785284 await new Promise(resolve => setTimeout(resolve, 200)); >>>>>>> // TODO: Use fake timer when Sinon/Lolex supports it. // See more: // https://github.com/sinonjs/sinon/issues/1739 // https://github.com/sinonjs/lolex/issues/114 // https://stackoverflow.com/a/50785284 await new Promise(resolve => setTimeout(resolve, txSubscription.getEventsTimeout() * 2) );
<<<<<<< log(getTopView()); // Associate the element with its view controller browser.push(slide, _title, context); // Invoke the function and set 'this' to be context. options.beforeVisible && options.beforeVisible.apply(context); if (options.afterVisible) { window.setTimeout(function() { // Invoke the function and set 'this' to be context. options.afterVisible.apply(context); }, 500); } ======= browser.push(slide, _title); >>>>>>> browser.push(slide, _title); <<<<<<< // TODO: END ---- This shouldn't be in Player.renderPlaylist() ======= >>>>>>> // TODO: END ---- This shouldn't be in Player.renderPlaylist()
<<<<<<< facebook_session.graphCall("/me", { })(function(result) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.write('By using Graph API:' + "\n"); response.write(' Name:' + result.name + "\n"); response.write(' Id:' + result.id + "\n"); response.write(' Link:' + result.link + "\n"); facebook_session.restCall("fql.multiquery", {"queries": {"query1":"SELECT uid FROM user WHERE uid=" + result.id, "query2":"SELECT name, url, pic FROM profile WHERE id IN (SELECT uid FROM #query1)"}}, {})(function() { console.log('multiquery', JSON.stringify(arguments[0])); response.end(); }); }); ======= response.writeHead(200, {'Content-Type': 'text/plain'}); facebook_session.isValid()(function(is_valid) { if (!is_valid) { response.write('Session expired or user logged out.' + "\n"); response.end(); return ; } facebook_session.graphCall("/me", { })(function(result) { response.write('By using Graph API:' + "\n"); response.write(' Name:' + result.name + "\n"); response.write(' Link:' + result.link + "\n"); response.end(); }); }); >>>>>>> response.writeHead(200, {'Content-Type': 'text/plain'}); facebook_session.isValid()(function(is_valid) { if (!is_valid) { response.write('Session expired or user logged out.' + "\n"); response.end(); return ; } facebook_session.graphCall("/me", { })(function(result) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.write('By using Graph API:' + "\n"); response.write(' Name:' + result.name + "\n"); response.write(' Id:' + result.id + "\n"); response.write(' Link:' + result.link + "\n"); facebook_session.restCall("fql.multiquery", {"queries": {"query1":"SELECT uid FROM user WHERE uid=" + result.id, "query2":"SELECT name, url, pic FROM profile WHERE id IN (SELECT uid FROM #query1)"}}, {})(function() { console.log('multiquery', JSON.stringify(arguments[0])); response.end(); }); }); });
<<<<<<< "postman", ======= "solidworks", >>>>>>> "postman", "solidworks", <<<<<<< skills: ["linux", "git"], } ======= skills: ["linux", "git", "arduino"], }, >>>>>>> skills: ["linux", "git", "arduino"], }, <<<<<<< vuejs: "https://devicons.github.io/devicon/devicon.git/icons/vuejs/vuejs-original-wordmark.svg", react: "https://devicons.github.io/devicon/devicon.git/icons/react/react-original-wordmark.svg", angularjs: "https://devicons.github.io/devicon/devicon.git/icons/angularjs/angularjs-original.svg", aws: "https://devicons.github.io/devicon/devicon.git/icons/amazonwebservices/amazonwebservices-original-wordmark.svg", android: "https://devicons.github.io/devicon/devicon.git/icons/android/android-original-wordmark.svg", backbonejs: "https://devicons.github.io/devicon/devicon.git/icons/backbonejs/backbonejs-original-wordmark.svg", bootstrap: "https://devicons.github.io/devicon/devicon.git/icons/bootstrap/bootstrap-plain.svg", ======= vuejs: "https://devicons.github.io/devicon/devicon.git/icons/vuejs/vuejs-original-wordmark.svg", react: "https://devicons.github.io/devicon/devicon.git/icons/react/react-original-wordmark.svg", angularjs: "https://devicons.github.io/devicon/devicon.git/icons/angularjs/angularjs-original.svg", aws: "https://devicons.github.io/devicon/devicon.git/icons/amazonwebservices/amazonwebservices-original-wordmark.svg", android: "https://devicons.github.io/devicon/devicon.git/icons/android/android-original-wordmark.svg", arduino: "https://cdn.worldvectorlogo.com/logos/arduino-1.svg", backbonejs: "https://devicons.github.io/devicon/devicon.git/icons/backbonejs/backbonejs-original-wordmark.svg", bootstrap: "https://devicons.github.io/devicon/devicon.git/icons/bootstrap/bootstrap-plain.svg", >>>>>>> vuejs: "https://devicons.github.io/devicon/devicon.git/icons/vuejs/vuejs-original-wordmark.svg", react: "https://devicons.github.io/devicon/devicon.git/icons/react/react-original-wordmark.svg", angularjs: "https://devicons.github.io/devicon/devicon.git/icons/angularjs/angularjs-original.svg", aws: "https://devicons.github.io/devicon/devicon.git/icons/amazonwebservices/amazonwebservices-original-wordmark.svg", android: "https://devicons.github.io/devicon/devicon.git/icons/android/android-original-wordmark.svg", arduino: "https://cdn.worldvectorlogo.com/logos/arduino-1.svg", backbonejs: "https://devicons.github.io/devicon/devicon.git/icons/backbonejs/backbonejs-original-wordmark.svg", bootstrap: "https://devicons.github.io/devicon/devicon.git/icons/bootstrap/bootstrap-plain.svg", <<<<<<< laravel: "https://devicons.github.io/devicon/devicon.git/icons/laravel/laravel-plain-wordmark.svg", meteor: "https://devicons.github.io/devicon/devicon.git/icons/meteor/meteor-original-wordmark.svg", mongodb: "https://devicons.github.io/devicon/devicon.git/icons/mongodb/mongodb-original-wordmark.svg", mysql: "https://devicons.github.io/devicon/devicon.git/icons/mysql/mysql-original-wordmark.svg", nginx: "https://devicons.github.io/devicon/devicon.git/icons/nginx/nginx-original.svg", nodejs: "https://devicons.github.io/devicon/devicon.git/icons/nodejs/nodejs-original-wordmark.svg", openresty: "https://symbols-electrical.getvecta.com/stencil_25/66_openresty.403a21ca72.svg", oracle: "https://devicons.github.io/devicon/devicon.git/icons/oracle/oracle-original.svg", photoshop: "https://devicons.github.io/devicon/devicon.git/icons/photoshop/photoshop-plain.svg", xd: "https://cdn.worldvectorlogo.com/logos/adobe-xd.svg", php: "https://devicons.github.io/devicon/devicon.git/icons/php/php-original.svg", perl: "https://api.iconify.design/logos-perl.svg", postgresql: "https://devicons.github.io/devicon/devicon.git/icons/postgresql/postgresql-original-wordmark.svg", python: "https://devicons.github.io/devicon/devicon.git/icons/python/python-original.svg", rails: "https://devicons.github.io/devicon/devicon.git/icons/rails/rails-original-wordmark.svg", redis: "https://devicons.github.io/devicon/devicon.git/icons/redis/redis-original-wordmark.svg", ruby: "https://devicons.github.io/devicon/devicon.git/icons/ruby/ruby-original-wordmark.svg", rust: "https://devicons.github.io/devicon/devicon.git/icons/rust/rust-plain.svg", sass: "https://devicons.github.io/devicon/devicon.git/icons/sass/sass-original.svg", scala: "https://devicons.github.io/devicon/devicon.git/icons/scala/scala-original-wordmark.svg", ======= laravel: "https://devicons.github.io/devicon/devicon.git/icons/laravel/laravel-plain-wordmark.svg", meteor: "https://devicons.github.io/devicon/devicon.git/icons/meteor/meteor-original-wordmark.svg", mongodb: "https://devicons.github.io/devicon/devicon.git/icons/mongodb/mongodb-original-wordmark.svg", mysql: "https://devicons.github.io/devicon/devicon.git/icons/mysql/mysql-original-wordmark.svg", nginx: "https://devicons.github.io/devicon/devicon.git/icons/nginx/nginx-original.svg", nodejs: "https://devicons.github.io/devicon/devicon.git/icons/nodejs/nodejs-original-wordmark.svg", openresty: "https://symbols-electrical.getvecta.com/stencil_25/66_openresty.403a21ca72.svg", oracle: "https://devicons.github.io/devicon/devicon.git/icons/oracle/oracle-original.svg", photoshop: "https://devicons.github.io/devicon/devicon.git/icons/photoshop/photoshop-plain.svg", xd: "https://cdn.worldvectorlogo.com/logos/adobe-xd.svg", php: "https://devicons.github.io/devicon/devicon.git/icons/php/php-original.svg", perl: "https://api.iconify.design/logos-perl.svg", postgresql: "https://devicons.github.io/devicon/devicon.git/icons/postgresql/postgresql-original-wordmark.svg", python: "https://devicons.github.io/devicon/devicon.git/icons/python/python-original.svg", rails: "https://devicons.github.io/devicon/devicon.git/icons/rails/rails-original-wordmark.svg", redis: "https://devicons.github.io/devicon/devicon.git/icons/redis/redis-original-wordmark.svg", ruby: "https://devicons.github.io/devicon/devicon.git/icons/ruby/ruby-original-wordmark.svg", rust: "https://devicons.github.io/devicon/devicon.git/icons/rust/rust-plain.svg", sass: "https://devicons.github.io/devicon/devicon.git/icons/sass/sass-original.svg", scala: "https://devicons.github.io/devicon/devicon.git/icons/scala/scala-original-wordmark.svg", solidworks: "https://cdn.worldvectorlogo.com/logos/solidworks.svg", >>>>>>> laravel: "https://devicons.github.io/devicon/devicon.git/icons/laravel/laravel-plain-wordmark.svg", meteor: "https://devicons.github.io/devicon/devicon.git/icons/meteor/meteor-original-wordmark.svg", mongodb: "https://devicons.github.io/devicon/devicon.git/icons/mongodb/mongodb-original-wordmark.svg", mysql: "https://devicons.github.io/devicon/devicon.git/icons/mysql/mysql-original-wordmark.svg", nginx: "https://devicons.github.io/devicon/devicon.git/icons/nginx/nginx-original.svg", nodejs: "https://devicons.github.io/devicon/devicon.git/icons/nodejs/nodejs-original-wordmark.svg", openresty: "https://symbols-electrical.getvecta.com/stencil_25/66_openresty.403a21ca72.svg", oracle: "https://devicons.github.io/devicon/devicon.git/icons/oracle/oracle-original.svg", photoshop: "https://devicons.github.io/devicon/devicon.git/icons/photoshop/photoshop-plain.svg", xd: "https://cdn.worldvectorlogo.com/logos/adobe-xd.svg", php: "https://devicons.github.io/devicon/devicon.git/icons/php/php-original.svg", perl: "https://api.iconify.design/logos-perl.svg", postgresql: "https://devicons.github.io/devicon/devicon.git/icons/postgresql/postgresql-original-wordmark.svg", python: "https://devicons.github.io/devicon/devicon.git/icons/python/python-original.svg", rails: "https://devicons.github.io/devicon/devicon.git/icons/rails/rails-original-wordmark.svg", redis: "https://devicons.github.io/devicon/devicon.git/icons/redis/redis-original-wordmark.svg", ruby: "https://devicons.github.io/devicon/devicon.git/icons/ruby/ruby-original-wordmark.svg", rust: "https://devicons.github.io/devicon/devicon.git/icons/rust/rust-plain.svg", sass: "https://devicons.github.io/devicon/devicon.git/icons/sass/sass-original.svg", scala: "https://devicons.github.io/devicon/devicon.git/icons/scala/scala-original-wordmark.svg", solidworks: "https://cdn.worldvectorlogo.com/logos/solidworks.svg",
<<<<<<< /** * returns next boundaryPoint with empty node * * @param {BoundaryPoint} point * @param {Boolean} isSkipInnerOffset * @return {BoundaryPoint} */ function nextPointWithEmptyNode(point, isSkipInnerOffset) { let node, offset; // if node is empty string node, return current node's sibling. if (isEmpty(point.node)) { node = point.node.nextSibling; offset = 0; return { node: node, offset: offset, }; } if (nodeLength(point.node) === point.offset) { if (isEditable(point.node)) { return null; } node = point.node.parentNode; offset = position(point.node) + 1; // if next node is editable , return current node's sibling node. if (isEditable(node)) { node = point.node.nextSibling; offset = 0; } } else if (hasChildren(point.node)) { node = point.node.childNodes[point.offset]; offset = 0; if (isEmpty(node)) { return null; } } else { node = point.node; offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1; if (isEmpty(node)) { return null; } } return { node: node, offset: offset, }; } ======= /* * returns the next Text node index or 0 if not found. */ function getNextTextNode(actual) { if(!actual.nextSibling) return undefined; if(actual.parent !== actual.nextSibling.parent) return undefined; if(isText(actual.nextSibling) ) return actual.nextSibling; else return getNextTextNode(actual.nextSibling); } >>>>>>> /** * returns next boundaryPoint with empty node * * @param {BoundaryPoint} point * @param {Boolean} isSkipInnerOffset * @return {BoundaryPoint} */ function nextPointWithEmptyNode(point, isSkipInnerOffset) { let node, offset; // if node is empty string node, return current node's sibling. if (isEmpty(point.node)) { node = point.node.nextSibling; offset = 0; return { node: node, offset: offset, }; } if (nodeLength(point.node) === point.offset) { if (isEditable(point.node)) { return null; } node = point.node.parentNode; offset = position(point.node) + 1; // if next node is editable , return current node's sibling node. if (isEditable(node)) { node = point.node.nextSibling; offset = 0; } } else if (hasChildren(point.node)) { node = point.node.childNodes[point.offset]; offset = 0; if (isEmpty(node)) { return null; } } else { node = point.node; offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1; if (isEmpty(node)) { return null; } } return { node: node, offset: offset, }; } /* * returns the next Text node index or 0 if not found. */ function getNextTextNode(actual) { if(!actual.nextSibling) return undefined; if(actual.parent !== actual.nextSibling.parent) return undefined; if(isText(actual.nextSibling) ) return actual.nextSibling; else return getNextTextNode(actual.nextSibling); }
<<<<<<< }, 'When gzip and brotli compression is enabled and a compressed file is available': { topic: function () { var server = httpServer.createServer({ root: root, brotli: true, gzip: true }); server.listen(8084); this.callback(null, server); }, 'and a request accepting only gzip is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'gzip' } }, this.callback); }, 'response should be gzip compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'gzip'); } }, 'and a request accepting only brotli is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'br' } }, this.callback); }, 'response should be brotli compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'br'); } }, 'and a request accepting both brotli and gzip is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'gzip, br' } }, this.callback); }, 'response should be brotli compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'br'); } } ======= }, 'When http-server is listening on 8083 with username "good_username" and password "good_password"': { topic: function () { var server = httpServer.createServer({ root: root, robots: true, headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true' }, username: 'good_username', password: 'good_password' }); server.listen(8083); this.callback(null, server); }, 'and the user requests an existent file with no auth details': { topic: function () { request('http://127.0.0.1:8083/file', this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with incorrect username': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'wrong_username', pass: 'good_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with incorrect password': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'good_username', pass: 'wrong_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests a non-existent file with incorrect password': { topic: function () { request('http://127.0.0.1:8083/404', { auth: { user: 'good_username', pass: 'wrong_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with correct auth details': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'good_username', pass: 'good_password' } }, this.callback); }, 'status code should be 200': function (res) { assert.equal(res.statusCode, 200); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should match content of served file': function (err, file, body) { assert.equal(body.trim(), file.trim()); } } } >>>>>>> }, 'When gzip and brotli compression is enabled and a compressed file is available': { topic: function () { var server = httpServer.createServer({ root: root, brotli: true, gzip: true }); server.listen(8084); this.callback(null, server); }, 'and a request accepting only gzip is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'gzip' } }, this.callback); }, 'response should be gzip compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'gzip'); } }, 'and a request accepting only brotli is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'br' } }, this.callback); }, 'response should be brotli compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'br'); } }, 'and a request accepting both brotli and gzip is made': { topic: function () { request({ uri: 'http://127.0.0.1:8084/compression/', headers: { 'accept-encoding': 'gzip, br' } }, this.callback); }, 'response should be brotli compressed': function (err, res, body) { assert.equal(res.statusCode, 200); assert.equal(res.headers['content-encoding'], 'br'); } } }, 'When http-server is listening on 8083 with username "good_username" and password "good_password"': { topic: function () { var server = httpServer.createServer({ root: root, robots: true, headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': 'true' }, username: 'good_username', password: 'good_password' }); server.listen(8083); this.callback(null, server); }, 'and the user requests an existent file with no auth details': { topic: function () { request('http://127.0.0.1:8083/file', this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with incorrect username': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'wrong_username', pass: 'good_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with incorrect password': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'good_username', pass: 'wrong_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests a non-existent file with incorrect password': { topic: function () { request('http://127.0.0.1:8083/404', { auth: { user: 'good_username', pass: 'wrong_password' } }, this.callback); }, 'status code should be 401': function (res) { assert.equal(res.statusCode, 401); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should be a forbidden message': function (err, file, body) { assert.equal(body, 'Access denied'); } } }, 'and the user requests an existent file with correct auth details': { topic: function () { request('http://127.0.0.1:8083/file', { auth: { user: 'good_username', pass: 'good_password' } }, this.callback); }, 'status code should be 200': function (res) { assert.equal(res.statusCode, 200); }, 'and file content': { topic: function (res, body) { var self = this; fs.readFile(path.join(root, 'file'), 'utf8', function (err, data) { self.callback(err, data, body); }); }, 'should match content of served file': function (err, file, body) { assert.equal(body.trim(), file.trim()); } } }
<<<<<<< // XXXXXXXX import { base64dict } from "./base64-convert" console.log(layerChannelCounts) ======= >>>>>>> <<<<<<< .attr('xlink:href', d => { // let filename = '../data/feature-vis/channel/' + layer + '-' + d.channel + '-channel' + fv_type // return filename // XXXXXXXX return base64dict[layer + '-' + d.channel] }) ======= .attr('xlink:href', d => { let filename = '../data/feature-vis/channel/' + layer + '-' + d.channel + '-channel' + fv_type return filename }) // d => fvURL + '/data/feature-vis/channel/' + layer + '-' + d.channel + '-channel' + fv_type) // 'https://raw.githubusercontent.com/fredhohman/atlas/master/ui.png' >>>>>>>
<<<<<<< // Update summary for the first histogram evolution var dates = hgramEvo.dates(); $('#prop-kind').text(hgram.kind()); $('#prop-submissions').text(fmt(hgram.submissions())); $('#prop-count').text(fmt(hgram.count())); $('#prop-dates').text(fmt(dates.length)); $('#prop-date-range').text(moment(dates[0]).format("YYYY/MM/DD") + ((dates.length == 1) ? "" : " to " + moment(dates[dates.length - 1]).format("YYYY/MM/DD"))); if (hgram.kind() == 'linear') { $('#prop-mean').text(fmt(hgram.mean())); $('#prop-standardDeviation').text(fmt(hgram.standardDeviation())); } else if (hgram.kind() == 'exponential') { $('#prop-mean2').text(fmt(hgram.mean())); $('#prop-geometricMean').text(fmt(hgram.geometricMean())); $('#prop-geometricStandardDeviation').text(fmt(hgram.geometricStandardDeviation())); } if (hgram.kind() == 'linear' || hgram.kind() == 'exponential') { $('#prop-p5').text(fmt(hgram.percentile(5))); $('#prop-p25').text(fmt(hgram.percentile(25))); $('#prop-p50').text(fmt(hgram.percentile(50))); $('#prop-p75').text(fmt(hgram.percentile(75))); $('#prop-p95').text(fmt(hgram.percentile(95))); } ======= >>>>>>> // Update summary for the first histogram evolution var dates = hgramEvo.dates(); $('#prop-kind').text(hgram.kind()); $('#prop-submissions').text(fmt(hgram.submissions())); $('#prop-count').text(fmt(hgram.count())); $('#prop-dates').text(fmt(dates.length)); $('#prop-date-range').text(moment(dates[0]).format("YYYY/MM/DD") + ((dates.length == 1) ? "" : " to " + moment(dates[dates.length - 1]).format("YYYY/MM/DD"))); if (hgram.kind() == 'linear') { $('#prop-mean').text(fmt(hgram.mean())); $('#prop-standardDeviation').text(fmt(hgram.standardDeviation())); } else if (hgram.kind() == 'exponential') { $('#prop-mean2').text(fmt(hgram.mean())); $('#prop-geometricMean').text(fmt(hgram.geometricMean())); $('#prop-geometricStandardDeviation').text(fmt(hgram.geometricStandardDeviation())); } if (hgram.kind() == 'linear' || hgram.kind() == 'exponential') { $('#prop-p5').text(fmt(hgram.percentile(5))); $('#prop-p25').text(fmt(hgram.percentile(25))); $('#prop-p50').text(fmt(hgram.percentile(50))); $('#prop-p75').text(fmt(hgram.percentile(75))); $('#prop-p95').text(fmt(hgram.percentile(95))); }
<<<<<<< // bound, so we estimate one. end = _estimateLastBucketEnd(this); ======= // bound and we estimate one. First we estimate the sum of all data-points // in buckets below i var sum_before_i = 0; for (var j = 0; j < i; j++) { var a_points = _aggregate(j, this); var bucket_center_value = (this._buckets[j+1] - this._buckets[j]) / 2 + this._buckets[j]; sum_before_i += a_points * bucket_center_value; } // We estimate the sum of data-points in i by subtracting the estimate of // sum of data-points before i... var sum_i = _aggregate(DataOffsets.SUM, this) - sum_before_i; // We estimate the mean of bucket i as follows var bucket_i_mean = sum_i / _aggregate(i, this); // Now estimate bucket i end by 2 * bucket_i_mean end = bucket_i_mean * 2; >>>>>>> // bound, so we estimate one. end = _estimateLastBucketEnd(this); <<<<<<< // Array of return values var results = []; // For each, invoke cb and push the result this.each(function(count, start, end, index) { results.push(cb.call(context, count, start, end, index)); }); // Return values from cb return results; } ======= }; >>>>>>> // Array of return values var results = []; // For each, invoke cb and push the result this.each(function(count, start, end, index) { results.push(cb.call(context, count, start, end, index)); }); // Return values from cb return results; };
<<<<<<< import { routerReducer as router } from 'react-router-redux' import account from 'routes/Account/modules/account' import library from 'routes/Library/modules/library' import queue from 'routes/Queue/modules/queue' ======= import locationReducer from './location' >>>>>>> import locationReducer from './location' import account from 'routes/Account/modules/account' import library from 'routes/Library/modules/library' import queue from 'routes/Queue/modules/queue' <<<<<<< // Add sync reducers here router, account, library, queue, ======= location: locationReducer, >>>>>>> location: locationReducer, account, library, queue,
<<<<<<< import { connect } from 'react-redux' import Navigation from '../../components/Navigation' import LibraryView from '../../routes/Library/containers/LibraryContainer' import classes from './CoreLayout.css' ======= import Header from '../../components/Header' import './CoreLayout.scss' >>>>>>> import Header from '../../components/Header' import Navigation from '../../components/Navigation' import LibraryView from '../../routes/Library/containers/LibraryContainer' import './CoreLayout.scss' <<<<<<< const CoreLayout = (props) => { let showLibrary = props.routerPath === '/library' return ( <div style={{height: '100%'}} className={classes.flexContainer}> <div className={classes.flexGrow}> <div className={showLibrary ? classes.activeView : classes.inactiveView}> <LibraryView/> </div> <div className={showLibrary ? classes.inactiveView : classes.activeView}> {props.children} </div> </div> ======= export const CoreLayout = ({ children }) => ( <div className='container text-center'> <Header /> <div className='core-layout__viewport'> {children} >>>>>>> const CoreLayout = (props) => { let showLibrary = props.routerPath === '/library' return ( <div style={{height: '100%'}} className={classes.flexContainer}> <div className={classes.flexGrow}> <div className={showLibrary ? classes.activeView : classes.inactiveView}> <LibraryView/> </div> <div className={showLibrary ? classes.inactiveView : classes.activeView}> {props.children} </div> </div> <<<<<<< children: React.PropTypes.element, routerPath: React.PropTypes.string.isRequired, ======= children : React.PropTypes.element.isRequired >>>>>>> children: React.PropTypes.element, routerPath: React.PropTypes.string.isRequired,
<<<<<<< const webpackConfig = require('../build/webpack.config') const config = require('../config') const paths = config.utils_paths ======= const webpackConfig = require('../config/webpack.config') const project = require('../config/project.config') const compress = require('compression') const app = express() >>>>>>> const webpackConfig = require('../config/webpack.config') const project = require('../config/project.config') <<<<<<< debug('Enable webpack dev and HMR middleware') app.use(convert(require("koa-webpack-dev-middleware")(compiler, { ======= debug('Enabling webpack dev and HMR middleware') app.use(require('webpack-dev-middleware')(compiler, { >>>>>>> debug('Enabling webpack dev and HMR middleware') app.use(convert(require("koa-webpack-dev-middleware")(compiler, { <<<<<<< stats : config.compiler_stats }))) app.use(convert(require('koa-webpack-hot-middleware')(compiler))) ======= stats : project.compiler_stats })) app.use(require('webpack-hot-middleware')(compiler)) >>>>>>> stats : project.compiler_stats }))) app.use(convert(require('koa-webpack-hot-middleware')(compiler))) <<<<<<< app.use(serve(paths.client('static'))) ======= app.use(express.static(project.paths.public())) >>>>>>> app.use(serve(project.paths.public())) <<<<<<< app.use(serve(paths.dist())) ======= app.use(express.static(project.paths.dist())) >>>>>>> app.use(serve(project.paths.dist()))
<<<<<<< if (window.Tether === undefined) { throw new Error('Bootstrap tooltips require Tether (http://tether.io/)') ======= if (typeof Tether === 'undefined') { throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)') >>>>>>> if (typeof Tether === 'undefined') { throw new Error('Bootstrap tooltips require Tether (http://tether.io/)')
<<<<<<< }(window.jQuery); /* ============================================================= * bootstrap-scrollspy.js v3.0.0 ======= ====================================================== * bootstrap-scrollspy.js v2.2.2 ======= /* POPOVER NO CONFLICT * =================== */ $.fn.popover.noConflict = function () { $.fn.popover = old return this } }(window.jQuery);/* ============================================================= * bootstrap-scrollspy.js v2.2.2 >>>>>>> /* POPOVER NO CONFLICT * =================== */ $.fn.popover.noConflict = function () { $.fn.popover = old return this } }(window.jQuery); /* ============================================================= * bootstrap-scrollspy.js v3.0.0
<<<<<<< * bootstrap-transition.js v3.0.0 ======= * bootstrap-transition.js v2.3.0 >>>>>>> * bootstrap-transition.js v3.0.0 <<<<<<< * bootstrap-alert.js v3.0.0 ======= * bootstrap-alert.js v2.3.0 >>>>>>> * bootstrap-alert.js v3.0.0 <<<<<<< * bootstrap-button.js v3.0.0 ======= * bootstrap-button.js v2.3.0 >>>>>>> * bootstrap-button.js v3.0.0 <<<<<<< * bootstrap-carousel.js v3.0.0 ======= * bootstrap-carousel.js v2.3.0 >>>>>>> * bootstrap-carousel.js v3.0.0 <<<<<<< * bootstrap-collapse.js v3.0.0 ======= * bootstrap-collapse.js v2.3.0 >>>>>>> * bootstrap-collapse.js v3.0.0 <<<<<<< * bootstrap-dropdown.js v3.0.0 ======= * bootstrap-dropdown.js v2.3.0 >>>>>>> * bootstrap-dropdown.js v3.0.0 <<<<<<< * bootstrap-modal.js v3.0.0 ======= * bootstrap-modal.js v2.3.0 >>>>>>> * bootstrap-modal.js v3.0.0 <<<<<<< * bootstrap-tooltip.js v3.0.0 ======= * bootstrap-tooltip.js v2.3.0 >>>>>>> * bootstrap-tooltip.js v3.0.0 <<<<<<< }(window.jQuery);/* =========================================================== * bootstrap-popover.js v3.0.0 ======= ==================================================== * bootstrap-popover.js v2.2.3 ======= }(window.jQuery); /* =========================================================== * bootstrap-popover.js v2.2.2 >>>>>>> }(window.jQuery); /* =========================================================== * bootstrap-popover.js v3.0.0 <<<<<<< }(window.jQuery); /* ============================================================= * bootstrap-scrollspy.js v3.0.0 ======= ====================================================== * bootstrap-scrollspy.js v2.2.3 ======= }(window.jQuery);/* ============================================================= * bootstrap-scrollspy.js v2.3.0 >>>>>>> }(window.jQuery); /* ============================================================= * bootstrap-scrollspy.js v3.0.0 <<<<<<< * bootstrap-tab.js v3.0.0 ======= * bootstrap-tab.js v2.3.0 >>>>>>> * bootstrap-tab.js v3.0.0 <<<<<<< * bootstrap-typeahead.js v3.0.0 ======= * bootstrap-typeahead.js v2.3.0 >>>>>>> * bootstrap-typeahead.js v3.0.0 <<<<<<< * bootstrap-affix.js v3.0.0 ======= * bootstrap-affix.js v2.3.0 >>>>>>> * bootstrap-affix.js v3.0.0
<<<<<<< // attach dropImage this.$dropzone.on('drop', (event) => { const dataTransfer = event.originalEvent.dataTransfer; ======= // stop the browser from opening the dropped content event.preventDefault(); if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { $editable.focus(); context.invoke('editor.insertImagesOrCallback', dataTransfer.files); } else { $.each(dataTransfer.types, function (idx, type) { var content = dataTransfer.getData(type); >>>>>>> // attach dropImage this.$dropzone.on('drop', (event) => { const dataTransfer = event.originalEvent.dataTransfer; // stop the browser from opening the dropped content event.preventDefault();
<<<<<<< compileCore: { options: { sourceMap: true, outputSourceFiles: true, sourceMapURL: '<%= pkg.name %>.css.map', sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map' }, files: { 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less' } }, compileTheme: { options: { sourceMap: true, outputSourceFiles: true, sourceMapURL: '<%= pkg.name %>-theme.css.map', sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map' }, ======= compile: { options: { strictMath: true }, >>>>>>> compileCore: { options: { strictMath: true, sourceMap: true, outputSourceFiles: true, sourceMapURL: '<%= pkg.name %>.css.map', sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map' }, files: { 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less' } }, compileTheme: { options: { strictMath: true, sourceMap: true, outputSourceFiles: true, sourceMapURL: '<%= pkg.name %>-theme.css.map', sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map' },
<<<<<<< li = $('<li class="opt"><label>' + opt.text() + '</label></li>'); ======= // todo: remove this data val var li = $('<li class="opt"><label>' + opt.text() + '</label></li>');//.data('val',opt.val()); >>>>>>> var li = $('<li class="opt"><label>' + opt.text() + '</label></li>');
<<<<<<< if (labelPath){ $opt.text(readPath(data, labelPath)); }else { $opt.text(data[treeData.labelFld || "text"]); } if (idPath) { $opt.val(readPath(data, idPath)); } else { $opt.val(data[treeData.valFld || "id"]); } ======= $opt.text(data[treeData.labelFld || "text"]); $opt.val(data[treeData.valFld || "id"]); if (data[treeData.selFld || "selected"] && String(data[treeData.selFld || "selected"]) === "true") { $opt.prop("selected", data[treeData.selFld || "selected"]); } >>>>>>> if (labelPath){ $opt.text(readPath(data, labelPath)); }else { $opt.text(data[treeData.labelFld || "text"]); } if (idPath) { $opt.val(readPath(data, idPath)); } else { $opt.val(data[treeData.valFld || "id"]); if (data[treeData.selFld || "selected"] && String(data[treeData.selFld || "selected"]) === "true") { $opt.prop("selected", data[treeData.selFld || "selected"]); }
<<<<<<< var fileExt = main.match(/\.\w+$/)[0]; if (fileExt == '.coffee') require('coffee-script'); /** * Hook into `require`. */ var _require = require.extensions[fileExt]; require.extensions[fileExt] = function(module, filename) { ======= /** Hook into `require()` */ var requireJs = require.extensions['.js']; require.extensions['.js'] = function(module, filename) { >>>>>>> var fileExt = main.match(/\.\w+$/)[0]; if (fileExt == '.coffee') require('coffee-script'); /** Hook into `require()` */ var _require = require.extensions[fileExt]; require.extensions[fileExt] = function(module, filename) {
<<<<<<< else if (typeof data === 'string') console.log(data); else prettyStdOut.write(data); ======= else if (typeof data === 'string') prettyStdOut.write(data); else prettyStdOut.write(data); >>>>>>> else if (typeof data === 'string') console.log(data); else if (typeof data === 'string') prettyStdOut.write(data); else prettyStdOut.write(data);
<<<<<<< import canvasBg from './background.png'; import rasterSrc from './transparent.png'; ======= >>>>>>> import rasterSrc from './transparent.png'; <<<<<<< const _makeRasterLayer = function () { const rasterLayer = new paper.Layer(); rasterLayer.data.isRasterLayer = true; clearRaster(); return rasterLayer; }; ======= const _makeBackgroundPaper = function (width, height, color) { // creates a checkerboard path of width * height squares in color on white let x = 0; let y = 0; const pathPoints = []; while (x < width) { pathPoints.push(new paper.Point(x, y)); x++; pathPoints.push(new paper.Point(x, y)); y = y === 0 ? height : 0; } y = height - 1; x = width; while (y > 0) { pathPoints.push(new paper.Point(x, y)); x = (x === 0 ? width : 0); pathPoints.push(new paper.Point(x, y)); y--; } const vRect = new paper.Shape.Rectangle(new paper.Point(0, 0), new paper.Point(120, 90)); vRect.fillColor = '#fff'; vRect.guide = true; vRect.locked = true; const vPath = new paper.Path(pathPoints); vPath.fillRule = 'evenodd'; vPath.fillColor = color; vPath.guide = true; vPath.locked = true; const vGroup = new paper.Group([vRect, vPath]); return vGroup; }; >>>>>>> const _makeRasterLayer = function () { const rasterLayer = new paper.Layer(); rasterLayer.data.isRasterLayer = true; clearRaster(); return rasterLayer; }; const _makeBackgroundPaper = function (width, height, color) { // creates a checkerboard path of width * height squares in color on white let x = 0; let y = 0; const pathPoints = []; while (x < width) { pathPoints.push(new paper.Point(x, y)); x++; pathPoints.push(new paper.Point(x, y)); y = y === 0 ? height : 0; } y = height - 1; x = width; while (y > 0) { pathPoints.push(new paper.Point(x, y)); x = (x === 0 ? width : 0); pathPoints.push(new paper.Point(x, y)); y--; } const vRect = new paper.Shape.Rectangle(new paper.Point(0, 0), new paper.Point(120, 90)); vRect.fillColor = '#fff'; vRect.guide = true; vRect.locked = true; const vPath = new paper.Path(pathPoints); vPath.fillRule = 'evenodd'; vPath.fillColor = color; vPath.guide = true; vPath.locked = true; const vGroup = new paper.Group([vRect, vPath]); return vGroup; };
<<<<<<< [key: string]: any; }; export type PredefinedGeneratorOptions = { name: string; dir?: string; entryPoint: string; }; ======= [key: string]: ?string; } export type Response = { status: (code: number) => void; sendStatus: (code: number) => void; send: (value: string | Object | Buffer) => void; set: (header: { [key: string]: string }) => void; redirect: (code: number, location: string) => void; } export type Request = { url: string; hostname: string; } export type Entries = { [key: string]: { component: Function; routes: Function; reducers: Object; name?: string; } } export type EntriesConfig = { [key: string]: { component: string; routes: string; reducers: string; name?: string; } } export type RenderRequirements = { Component: Function; routes: Function; reducers: Object; name: string; } export type RenderOutput = { responseString: string; rootElement: Object; } export type GetCachedIfProd = (req: Request, cache?: Object) => string | null; export type SetCacheIfProd = (req: Request, value: string, maxAge?: number, cache?: Object) => void; export type CacheManager = { getCachedIfProd: GetCachedIfProd; setCacheIfProd: SetCacheIfProd; } >>>>>>> [key: string]: any; }; export type PredefinedGeneratorOptions = { name: string; dir?: string; entryPoint: string; }; export type Response = { status: (code: number) => void; sendStatus: (code: number) => void; send: (value: string | Object | Buffer) => void; set: (header: { [key: string]: string }) => void; redirect: (code: number, location: string) => void; } export type Request = { url: string; hostname: string; } export type Entries = { [key: string]: { component: Function; routes: Function; reducers: Object; name?: string; } } export type EntriesConfig = { [key: string]: { component: string; routes: string; reducers: string; name?: string; } } export type RenderRequirements = { Component: Function; routes: Function; reducers: Object; name: string; } export type RenderOutput = { responseString: string; rootElement: Object; } export type GetCachedIfProd = (req: Request, cache?: Object) => string | null; export type SetCacheIfProd = (req: Request, value: string, maxAge?: number, cache?: Object) => void; export type CacheManager = { getCachedIfProd: GetCachedIfProd; setCacheIfProd: SetCacheIfProd; }
<<<<<<< export async function prepareOutput(req, {Index, store, getRoutes, fileName}, renderProps, config, envVariables, getHead=_getHead, Entry=_Entry, _webpackIsomorphicTools=webpackIsomorphicTools) { ======= export function enableComponentCaching (componentCacheConfig, isProduction, SSRCaching=_SSRCaching) { if (!isProduction) { return; } // only enable caching if componentCacheConfig has an object SSRCaching.enableCaching(!!componentCacheConfig); if (!!componentCacheConfig) { SSRCaching.setCachingConfig(componentCacheConfig); } } export function prepareOutput(req, {Index, store, getRoutes, fileName}, renderProps, config, envVariables, getHead=_getHead, Entry=_Entry, _webpackIsomorphicTools=webpackIsomorphicTools) { >>>>>>> export function enableComponentCaching (componentCacheConfig, isProduction, SSRCaching=_SSRCaching) { if (!isProduction) { return; } // only enable caching if componentCacheConfig has an object SSRCaching.enableCaching(!!componentCacheConfig); if (!!componentCacheConfig) { SSRCaching.setCachingConfig(componentCacheConfig); } } export async function prepareOutput(req, {Index, store, getRoutes, fileName}, renderProps, config, envVariables, getHead=_getHead, Entry=_Entry, _webpackIsomorphicTools=webpackIsomorphicTools) { <<<<<<< let headContent, bodyContent; const renderMethod = config.server.renderMethod; if (renderMethod) { try { const renderOutput = await renderMethod(reactRenderFunc, main); headContent = renderOutput.head; bodyContent = renderOutput.body; } catch (e) { throw new Error(e); } } else { bodyContent = reactRenderFunc(main); } ======= >>>>>>> let headContent, bodyContent; const renderMethod = config.server.renderMethod; if (renderMethod) { try { const renderOutput = await renderMethod(reactRenderFunc, main); headContent = renderOutput.head; bodyContent = renderOutput.body; } catch (e) { throw new Error(e); } } else { bodyContent = reactRenderFunc(main); } <<<<<<< html={bodyContent} ======= html={reactRenderFunc(main)} >>>>>>> html={bodyContent}
<<<<<<< "babel-eslint": "7.1.1", "babel-istanbul-loader": "0.1.0", ======= "babel-eslint": "6.0.4", >>>>>>> "babel-eslint": "7.1.1",
<<<<<<< moduleNameMapper[`^[./a-zA-Z0-9$_-]+\\.(${images.join('|')})$`] = `${TEST_MOCKS_PATH}/fileMock.js`; moduleNameMapper[`^[./a-zA-Z0-9$_-]+\\.(${styles.join('|')})$`] = `${TEST_MOCKS_PATH}/styleMock.js`; */ ======= moduleNameMapper[`^[./a-zA-Z0-9@$_-]+\\.(${images.join('|')}|${other.join('|')})$`] = `${TEST_MOCKS_PATH}/fileMock.js`; moduleNameMapper[`^[./a-zA-Z0-9@$_-]+\\.(${styles.join('|')})$`] = `${TEST_MOCKS_PATH}/styleMock.js`; >>>>>>> moduleNameMapper[`^[./a-zA-Z0-9@$_-]+\\.(${images.join('|')}|${other.join('|')})$`] = `${TEST_MOCKS_PATH}/fileMock.js`; moduleNameMapper[`^[./a-zA-Z0-9@$_-]+\\.(${styles.join('|')})$`] = `${TEST_MOCKS_PATH}/styleMock.js`; moduleNameMapper[`^[./a-zA-Z0-9$_-]+\\.(${images.join('|')})$`] = `${TEST_MOCKS_PATH}/fileMock.js`; moduleNameMapper[`^[./a-zA-Z0-9$_-]+\\.(${styles.join('|')})$`] = `${TEST_MOCKS_PATH}/styleMock.js`; */
<<<<<<< // This is a necessary hack to find Jest depending if node_modules has flatten dependencies or not const JEST_PATH = `${require.resolve('jest').split('jest')[0]}.bin/jest`; const JEST_DEBUG_CONFIG_PATH = `${path.join(__dirname, '..', '..', 'test')}/jestEnvironmentNodeDebug.js`; ======= const NODE_MODULES_PATH = path.join(__dirname, '..', '..', 'node_modules'); const JEST_PATH = path.join(NODE_MODULES_PATH, '.bin', 'jest'); const JEST_DEBUG_CONFIG_PATH = `${path.join(__dirname, '..', '..', 'jest')}/jestEnvironmentNodeDebug.js`; >>>>>>> // This is a necessary hack to find Jest depending if node_modules has flatten dependencies or not const JEST_PATH = `${require.resolve('jest').split('jest')[0]}.bin/jest`; const JEST_DEBUG_CONFIG_PATH = `${path.join(__dirname, '..', '..', 'jest')}/jestEnvironmentNodeDebug.js`;
<<<<<<< const vendors = vendor ? { vendor } : {}; return { ======= const baseWebpackConfig = { >>>>>>> const vendors = vendor ? { vendor } : {}; const baseWebpackConfig = {
<<<<<<< Job.prototype.disable = function() { this.attrs.disabled = true; return this; }; Job.prototype.enable = function() { this.attrs.disabled = false; return this; }; ======= Job.prototype.unique = function(unique) { this.attrs.unique = unique; return this; }; >>>>>>> Job.prototype.disable = function() { this.attrs.disabled = true; return this; }; Job.prototype.enable = function() { this.attrs.disabled = false; return this; }; Job.prototype.unique = function(unique) { this.attrs.unique = unique; return this; };
<<<<<<< const compressHTMLMinifier = (settings, content, callback) => { const options = extend(defaultOptions, settings.options); const contentMinified = HTMLMinifier(content, options); utils.writeFile(settings.output, contentMinified); ======= function compressHTMLMinifier(settings, content, callback, index) { var options = extend(defaultOptions, settings.options); var contentMinified = HTMLMinifier(content, options); utils.writeFile(settings.output, contentMinified, index); >>>>>>> const compressHTMLMinifier = (settings, content, callback, index) => { const options = extend(defaultOptions, settings.options); const contentMinified = HTMLMinifier(content, options); utils.writeFile(settings.output, contentMinified, index);
<<<<<<< const compressBabelMinify = (settings, content, callback) => { let babelOptions = { ======= function compressBabelMinify(settings, content, callback, index) { var babelOptions = { >>>>>>> const compressBabelMinify = (settings, content, callback, index) => { let babelOptions = { <<<<<<< const contentMinified = transform(content, babelOptions); utils.writeFile(settings.output, contentMinified.code); ======= var contentMinified = babel.transform(content, babelOptions); utils.writeFile(settings.output, contentMinified.code, index); >>>>>>> const contentMinified = transform(content, babelOptions); utils.writeFile(settings.output, contentMinified.code, index);
<<<<<<< const compressSqwish = (settings, content, callback) => { const contentMinified = sqwish.minify(content, settings.options.strict); utils.writeFile(settings.output, contentMinified); ======= function compressSqwish(settings, content, callback, index) { var contentMinified = sqwish.minify(content, settings.options.strict); utils.writeFile(settings.output, contentMinified, index); >>>>>>> const compressSqwish = (settings, content, callback, index) => { const contentMinified = sqwish.minify(content, settings.options.strict); utils.writeFile(settings.output, contentMinified, index);
<<<<<<< const content = getContentFromFiles(settings.input); ======= if (Array.isArray(settings.output)) { return settings.sync ? compressArrayOfFilesSync(settings) : compressArrayOfFilesAsync(settings); } else { return compressSingleFile(settings); } } /** * Compress an array of files in sync. * * @param {Object} settings */ function compressArrayOfFilesSync(settings) { return settings.input.forEach(function(input, index) { var content = getContentFromFiles(input); return runSync(settings, content, index); }); } /** * Compress an array of files in async. * * @param {Object} settings */ function compressArrayOfFilesAsync(settings) { var sequence = Promise.resolve(); settings.input.forEach(function(input, index) { var content = getContentFromFiles(input); sequence = sequence.then(function() { return runAsync(settings, content, index); }); }); return sequence; } /** * Compress a single file. * * @param {Object} settings */ function compressSingleFile(settings) { var content = getContentFromFiles(settings.input); >>>>>>> if (Array.isArray(settings.output)) { return settings.sync ? compressArrayOfFilesSync(settings) : compressArrayOfFilesAsync(settings); } else { return compressSingleFile(settings); } }; /** * Compress an array of files in sync. * * @param {Object} settings */ const compressArrayOfFilesSync = settings => { return settings.input.forEach(function(input, index) { const content = getContentFromFiles(input); return runSync(settings, content, index); }); }; /** * Compress an array of files in async. * * @param {Object} settings */ const compressArrayOfFilesAsync = settings => { let sequence = Promise.resolve(); settings.input.forEach((input, index) => { const content = getContentFromFiles(input); sequence = sequence.then(() => runAsync(settings, content, index)); }); return sequence; }; /** * Compress a single file. * * @param {Object} settings */ const compressSingleFile = settings => { const content = getContentFromFiles(settings.input); <<<<<<< const runSync = (settings, content) => compressorsMap[settings.compressor](settings, content); ======= function runSync(settings, content, index) { return compressorsMap[settings.compressor](settings, content, null, index); } >>>>>>> const runSync = (settings, content, index) => compressorsMap[settings.compressor](settings, content, null, index); <<<<<<< const runAsync = (settings, content) => { return new Promise((resolve, reject) => { compressorsMap[settings.compressor](settings, content, (err, min) => { if (err) { return reject(err); } resolve(min); }); ======= function runAsync(settings, content, index) { return new Promise(function(resolve, reject) { compressorsMap[settings.compressor]( settings, content, function(err, min) { if (err) { return reject(err); } resolve(min); }, index ); >>>>>>> const runAsync = (settings, content, index) => { return new Promise((resolve, reject) => { compressorsMap[settings.compressor]( settings, content, (err, min) => { if (err) { return reject(err); } resolve(min); }, index ); <<<<<<< const createDirectory = file => mkdirp.sync(file.substr(0, file.lastIndexOf('/'))); /** * Expose `compress()`. */ export { compress }; ======= function createDirectory(file) { if (Array.isArray(file)) { file = file[0]; } mkdirp.sync(file.substr(0, file.lastIndexOf('/'))); } >>>>>>> const createDirectory = file => { if (Array.isArray(file)) { file = file[0]; } mkdirp.sync(file.substr(0, file.lastIndexOf('/'))); }; /** * Expose `compress()`. */ export { compress };
<<<<<<< const compressCrass = (settings, content, callback) => { const contentMinified = crass ======= function compressCrass(settings, content, callback, index) { var contentMinified = crass >>>>>>> const compressCrass = (settings, content, callback, index) => { const contentMinified = crass
<<<<<<< const fileCSSOut = __dirname + '/../examples/public/dist/sample.css'; ======= var fileCSSOut = __dirname + '/../examples/public/dist/sample.css'; var oneFileHTML = __dirname + '/../examples/public/index.html'; var fileHTMLOut = __dirname + '/../examples/public/dist/index.min.html'; var filesHTMLArray = [__dirname + '/../examples/public/index.html', __dirname + '/../examples/public/index.html']; var filesHTMLArrayWithWildcards = [ __dirname + '/../examples/public/index.html', __dirname + '/../examples/public/index.html', __dirname + '/../examples/public/**/*.html' ]; var filesHTMLArrayWithWildcards2 = ['index.html', 'index.html', '**/*.html']; >>>>>>> const fileCSSOut = __dirname + '/../examples/public/dist/sample.css'; const oneFileHTML = __dirname + '/../examples/public/index.html'; const fileHTMLOut = __dirname + '/../examples/public/dist/index.min.html'; const filesHTMLArray = [__dirname + '/../examples/public/index.html', __dirname + '/../examples/public/index.html']; const filesHTMLArrayWithWildcards = [ __dirname + '/../examples/public/index.html', __dirname + '/../examples/public/index.html', __dirname + '/../examples/public/**/*.html' ]; const filesHTMLArrayWithWildcards2 = ['index.html', 'index.html', '**/*.html']; <<<<<<< ======= ], butternut: [ { it: 'should compress javascript with {compressor} and a single file with option check', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { check: true } } }, { it: 'should compress javascript with {compressor} and a single file with option allowDangerousEval', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { allowDangerousEval: true } } }, { it: 'should compress javascript with {compressor} and a single file with option sourceMap', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { sourceMap: false } } }, { it: 'should compress javascript with {compressor} and a single file with option sourceMap', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { sourceMap: true } } }, { it: 'should compress javascript with {compressor} and a single file with option file', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { file: 'file.js' } } }, { it: 'should compress javascript with {compressor} and a single file with option source', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { source: 'source.js' } } }, { it: 'should compress javascript with {compressor} and a single file with option includeContent', minify: { compressor: '{compressor}', input: oneFile, output: fileJSOut, options: { includeContent: false } } } ], commonhtml: [ { it: 'should compress html with {compressor} and a single file', minify: { compressor: '{compressor}', input: oneFileHTML, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and a single file with a custom public folder', minify: { compressor: '{compressor}', input: 'index.html', output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress html with {compressor} and a single file with empty options', minify: { compressor: '{compressor}', input: oneFileHTML, output: fileHTMLOut, options: {} } }, { it: 'should compress html with {compressor} and an array of file', minify: { compressor: '{compressor}', input: filesHTMLArray, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and an array of file with a custom public folder', minify: { compressor: '{compressor}', input: ['index.html', 'index.html'], output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress javascript with {compressor} and wildcards path', minify: { compressor: '{compressor}', input: __dirname + '/../examples/public/**/*.html', output: fileHTMLOut } }, { it: 'should compress html with {compressor} and wildcards path with a custom public folder', minify: { compressor: '{compressor}', input: '**/*.html', output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress html with {compressor} and an array of strings and wildcards path', minify: { compressor: '{compressor}', input: filesHTMLArrayWithWildcards, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and an array of strings and wildcards path' + ' with a custom public folder', minify: { compressor: '{compressor}', input: filesHTMLArrayWithWildcards2, output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } } >>>>>>> ], commonhtml: [ { it: 'should compress html with {compressor} and a single file', minify: { compressor: '{compressor}', input: oneFileHTML, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and a single file with a custom public folder', minify: { compressor: '{compressor}', input: 'index.html', output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress html with {compressor} and a single file with empty options', minify: { compressor: '{compressor}', input: oneFileHTML, output: fileHTMLOut, options: {} } }, { it: 'should compress html with {compressor} and an array of file', minify: { compressor: '{compressor}', input: filesHTMLArray, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and an array of file with a custom public folder', minify: { compressor: '{compressor}', input: ['index.html', 'index.html'], output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress javascript with {compressor} and wildcards path', minify: { compressor: '{compressor}', input: __dirname + '/../examples/public/**/*.html', output: fileHTMLOut } }, { it: 'should compress html with {compressor} and wildcards path with a custom public folder', minify: { compressor: '{compressor}', input: '**/*.html', output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } }, { it: 'should compress html with {compressor} and an array of strings and wildcards path', minify: { compressor: '{compressor}', input: filesHTMLArrayWithWildcards, output: fileHTMLOut } }, { it: 'should compress html with {compressor} and an array of strings and wildcards path' + ' with a custom public folder', minify: { compressor: '{compressor}', input: filesHTMLArrayWithWildcards2, output: fileHTMLOut, publicFolder: __dirname + '/../examples/public/' } } <<<<<<< describe('YUI', () => { tests.commonjs.forEach(o => { ======= describe('html-minifier', function() { tests.commonhtml.forEach(function(o) { runOneTest(o, 'html-minifier'); }); tests.commonhtml.forEach(function(o) { runOneTest(o, 'html-minifier', true); }); }); describe('YUI', function() { tests.commonjs.forEach(function(o) { >>>>>>> describe('html-minifier', () => { tests.commonhtml.forEach(o => { runOneTest(o, 'html-minifier'); }); tests.commonhtml.forEach(o => { runOneTest(o, 'html-minifier', true); }); }); describe('YUI', () => { tests.commonjs.forEach(o => {
<<<<<<< import { formatDateTime } from 'utils/date'; import { request } from 'utils/api'; ======= import { observer, inject } from 'mobx-react'; import { DateTime } from 'luxon'; import { Layout } from 'components/Layout'; >>>>>>> import { request } from 'utils/api'; import { formatDateTime } from 'utils/date'; import { SearchProvider } from 'components/data'; import { Layout } from 'components/Layout'; <<<<<<< <SearchProvider onDataNeeded={this.onDataNeeded}> {({ items, getSorted, setSort, reload }) => { return ( <Container> <Header as="h2"> Invites <InviteUser onSave={reload} trigger={ <Button primary floated="right" style={{ marginTop: '-5px' }} content="Invite User" icon="plus" /> } /> </Header> <div className="list"> {items.length === 0 ? ( <Message>No invitations yet</Message> ) : ( <Table celled sortable> <Table.Header> <Table.Row> <Table.HeaderCell>Email</Table.HeaderCell> <Table.HeaderCell onClick={() => setSort('status')} sorted={getSorted('status')}> Status </Table.HeaderCell> <Table.HeaderCell width={3} onClick={() => setSort('createdAt')} sorted={getSorted('createdAt')}> Invited At </Table.HeaderCell> <Table.HeaderCell textAlign="center"> Actions </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> {items.map((item) => { return ( <Table.Row key={item.id}> <Table.Cell> {item.email} </Table.Cell> <Table.Cell collapsing>{item.status}</Table.Cell> <Table.Cell collapsing> {formatDateTime(item.createdAt)} </Table.Cell> <Table.Cell textAlign="center"> <LoadButton basic icon="mail" title="Resend Invite" onClick={async () => { await request({ method: 'POST', path: `/1/invites/${item.id}/resend` }); reload(); }} /> <LoadButton basic icon="trash" title="Delete" onClick={async () => { await request({ method: 'DELETE', path: `/1/invites/${item.id}` }); reload(); }} /> </Table.Cell> </Table.Row> ); })} </Table.Body> </Table> )} </div> </Container> ); }} </SearchProvider> ======= <Container> <Header as="h2"> <Layout horizontal center spread> Invites <InviteUser size="tiny" trigger={ <Button primary content="Invite User" icon="plus" /> } /> </Layout> </Header> <div className="list"> {listStatus.success && !invites.items.length && ( <Message>No invitations yet</Message> )} {listStatus.success && invites.items.length > 0 && ( <Table celled> <Table.Header> <Table.Row> <Table.HeaderCell>Email</Table.HeaderCell> <Table.HeaderCell width={3}>Status</Table.HeaderCell> <Table.HeaderCell width={3}>Invited At</Table.HeaderCell> <Table.HeaderCell textAlign="center"> Actions </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> {invites.items.map((item) => { return ( <Table.Row key={item.id}> <Table.Cell> <Header as="h4"> <Header.Content>{item.email}</Header.Content> </Header> </Table.Cell> <Table.Cell collapsing>{item.status}</Table.Cell> <Table.Cell collapsing> {DateTime.fromJSDate(item.createdAt).toLocaleString( DateTime.DATETIME_MED )} </Table.Cell> <Table.Cell textAlign="center"> <Button loading={ invites.getStatus(`delete:${item.id}`).request } onClick={() => this.props.invites.delete( item, `delete:${item.id}` ) } basic icon="trash" /> <Button loading={ invites.getStatus(`resend:${item.id}`).request } onClick={() => this.props.invites.resend( item, `resend:${item.id}` ) } title="Resend Invite" basic icon="mail" /> </Table.Cell> </Table.Row> ); })} </Table.Body> </Table> )} {listStatus.success && invites.totalItems > invites.limit && ( <Center> <Pagination limit={invites.limit} page={invites.page} total={invites.totalItems} onPageChange={(e, { activePage }) => { invites.setPage(activePage); invites.fetchItems().then(() => { window.scrollTo(0, 0); }); }} /> </Center> )} {listStatus.request && ( <Segment style={{ height: '100px' }}> <Dimmer active inverted> <Loader>Loading</Loader> </Dimmer> </Segment> )} {listStatus.error && ( <Message error content={listStatus.error.message} /> )} </div> </Container> >>>>>>> <SearchProvider onDataNeeded={this.onDataNeeded}> {({ items, getSorted, setSort, reload }) => { return ( <Container> <Header as="h2"> <Layout horizontal center spread> Invites <InviteUser size="tiny" trigger={ <Button primary content="Invite User" icon="plus" /> } /> </Layout> </Header> <div className="list"> {items.length === 0 ? ( <Message>No invitations yet</Message> ) : ( <Table celled sortable> <Table.Header> <Table.Row> <Table.HeaderCell>Email</Table.HeaderCell> <Table.HeaderCell onClick={() => setSort('status')} sorted={getSorted('status')}> Status </Table.HeaderCell> <Table.HeaderCell width={3} onClick={() => setSort('createdAt')} sorted={getSorted('createdAt')}> Invited At </Table.HeaderCell> <Table.HeaderCell textAlign="center"> Actions </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> {items.map((item) => { return ( <Table.Row key={item.id}> <Table.Cell> {item.email} </Table.Cell> <Table.Cell collapsing>{item.status}</Table.Cell> <Table.Cell collapsing> {formatDateTime(item.createdAt)} </Table.Cell> <Table.Cell textAlign="center"> <LoadButton basic icon="mail" title="Resend Invite" onClick={async () => { await request({ method: 'POST', path: `/1/invites/${item.id}/resend` }); reload(); }} /> <LoadButton basic icon="trash" title="Delete" onClick={async () => { await request({ method: 'DELETE', path: `/1/invites/${item.id}` }); reload(); }} /> </Table.Cell> </Table.Row> ); })} </Table.Body> </Table> )} </div> </Container> ); }} </SearchProvider>
<<<<<<< const { sort, name, skip, limit, shop } = ctx.request.body; const query = { deletedAt: { $exists: false } }; ======= const { ids = [], sort, skip, limit, shop } = ctx.request.body; const query = { ...(ids.length ? { _id: { $in: ids } } : {}), deletedAt: { $exists: false }, }; >>>>>>> const { ids = [], sort, name, skip, limit, shop } = ctx.request.body; const query = { ...(ids.length ? { _id: { $in: ids } } : {}), deletedAt: { $exists: false }, };
<<<<<<< ======= import { observer, inject } from 'mobx-react'; import { DateTime } from 'luxon'; import AppWrapper from 'components/AppWrapper'; import Pagination from 'components/Pagination'; import { Layout } from 'components/Layout'; import styled from 'styled-components'; >>>>>>> <<<<<<< <SearchProvider onDataNeeded={this.onDataNeeded}> {({ items, getSorted, setSort, filters, setFilters, reload }) => { return ( <Container> <div style={{float: 'right', marginTop: '-5px'}}> <Filters onSave={setFilters} filters={filters} fields={[ { text: 'Country', name: 'country', options: countries, } ]} /> <EditShop trigger={ <Button primary content="New Shop" icon="plus" /> } onSave={reload} /> </div> <Header as="h2"> Shops </Header> {items.length === 0 ? ( <Message>No shops created yet</Message> ) : ( <Table celled sortable> <Table.Header> <Table.Row> <Table.HeaderCell width={3} onClick={() => setSort('name')} sorted={getSorted('name')}> Name </Table.HeaderCell> <Table.HeaderCell width={3}>Description</Table.HeaderCell> <Table.HeaderCell onClick={() => setSort('createdAt')} sorted={getSorted('createdAt')}> Created <HelpTip title="Created" text="This is the date and time the product was created." /> </Table.HeaderCell> <Table.HeaderCell textAlign="center">Actions</Table.HeaderCell> ======= <Container> <Header as="h2"> <Layout horizontal center spread> Shops <EditShop trigger={ <Button primary content="New Shop" icon="plus" /> } /> </Layout> </Header> <div className="list"> {listStatus.success && !shops.items.length && ( <Message>No shops created yet</Message> )} {listStatus.success && shops.items.length > 0 && ( <Table celled sortable> <Table.Header> <Table.Row> <Table.HeaderCell width={3} onClick={() => this.handleSort('name')} sorted={this.getSorted('name')} > Name </Table.HeaderCell> <Table.HeaderCell width={3}>Description</Table.HeaderCell> <Table.HeaderCell onClick={() => this.handleSort('createdAt')} sorted={this.getSorted('createdAt')} > Created <HelpTip title="Created" text="This is the date and time the product was created." /> </Table.HeaderCell> <Table.HeaderCell textAlign="center"> Actions </Table.HeaderCell> </Table.Row> </Table.Header> <Table.Body> {shops.items.map((item) => { return ( <Table.Row key={item.id}> <Table.Cell> <Link to={`/shops/${item.id}`}>{item.name}</Link> </Table.Cell> <Table.Cell>{item.description}</Table.Cell> <Table.Cell> {DateTime.fromJSDate(item.createdAt).toLocaleString( DateTime.DATETIME_MED )} </Table.Cell> <Table.Cell textAlign="center"> <EditShop initialValues={item} trigger={ <Button style={{ marginLeft: '20px' }} basic icon="edit" /> } /> <Modal header={`Are you sure you want to delete "${ item.name }"?`} content="All data will be permanently deleted" status={deleteStatus} trigger={<Button basic icon="trash" />} closeIcon actions={[ { key: 'delete', primary: true, content: 'Delete', onClick: () => this.handleRemove(item) } ]} /> </Table.Cell> >>>>>>> <SearchProvider onDataNeeded={this.onDataNeeded}> {({ items, getSorted, setSort, filters, setFilters, reload }) => { return ( <Container> <Header as="h2"> <Layout horizontal center spread> Shops <Layout.Group> <Filters onSave={setFilters} filters={filters} fields={[ { text: 'Country', name: 'country', options: countries, } ]} /> <EditShop trigger={ <Button primary content="New Shop" icon="plus" /> } onSave={reload} /> </Layout.Group> </Layout> </Header> {items.length === 0 ? ( <Message>No shops created yet</Message> ) : ( <Table celled sortable> <Table.Header> <Table.Row> <Table.HeaderCell width={3} onClick={() => setSort('name')} sorted={getSorted('name')}> Name </Table.HeaderCell> <Table.HeaderCell width={3}>Description</Table.HeaderCell> <Table.HeaderCell onClick={() => setSort('createdAt')} sorted={getSorted('createdAt')}> Created <HelpTip title="Created" text="This is the date and time the product was created." /> </Table.HeaderCell> <Table.HeaderCell textAlign="center">Actions</Table.HeaderCell>
<<<<<<< const { sort, skip, limit, startAt, endAt } = ctx.request.body; // --- Generator: vars const { name, country } = ctx.request.body; // --- Generator: end const query = { deletedAt: { $exists: false } }; // --- Generator: queries if (name) { query.name = { $regex: name, $options: 'i', }; } if (country) { query.country = country; } // --- Generator: end ======= const { ids = [], sort, skip, limit, country, startAt, endAt } = ctx.request.body; const query = { ...(ids.length ? { _id: { $in: ids } } : {}), deletedAt: { $exists: false }, }; >>>>>>> const { ids = [], sort, skip, limit, startAt, endAt } = ctx.request.body; // --- Generator: vars const { name, country } = ctx.request.body; // --- Generator: end const query = { ...(ids.length ? { _id: { $in: ids } } : {}), deletedAt: { $exists: false }, }; // --- Generator: queries if (name) { query.name = { $regex: name, $options: 'i', }; } if (country) { query.country = country; } // --- Generator: end
<<<<<<< if (typeof document == 'undefined') return null // Dont Render On Server var canvas: any = document.createElement('canvas') canvas.width = canvas.height = size * 2 var ctx = canvas.getContext('2d') ctx.fillStyle = c1 ctx.fillRect(0, 0, canvas.width, canvas.height) ctx.fillStyle = c2 ctx.fillRect(0, 0, size, size) ctx.translate(size, size) ctx.fillRect(0, 0, size, size) return canvas.toDataURL() ======= if (typeof document == 'undefined') return null; // Dont Render On Server var canvas: any = document.createElement('canvas'); canvas.width = canvas.height = size * 2; var ctx = canvas.getContext('2d'); if (!ctx) return null; // If no context can be found, return early. ctx.fillStyle = c1; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = c2; ctx.fillRect(0, 0, size, size); ctx.translate(size, size); ctx.fillRect(0, 0, size, size); return canvas.toDataURL(); >>>>>>> if (typeof document == 'undefined') return null // Dont Render On Server var canvas: any = document.createElement('canvas') canvas.width = canvas.height = size * 2 var ctx = canvas.getContext('2d') if (!ctx) return null // If no context can be found, return early. ctx.fillStyle = c1 ctx.fillRect(0, 0, canvas.width, canvas.height) ctx.fillStyle = c2 ctx.fillRect(0, 0, size, size) ctx.translate(size, size) ctx.fillRect(0, 0, size, size) return canvas.toDataURL()
<<<<<<< expect(data).to.eql('#333') }) const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />) ChromeFields.handleChange({ hex: '#333' }) expect(props.onChange).to.have.been.called }) ======= expect(data.hex).to.eql('#333'); }); const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />); ChromeFields.handleChange({ hex: '#333' }); expect(props.onChange).to.have.been.called; }); >>>>>>> expect(data.hex).to.eql('#333') }) const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />) ChromeFields.handleChange({ hex: '#333' }) expect(props.onChange).to.have.been.called }) <<<<<<< }) }) const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />) ChromeFields.handleChange({ a: 0.5 }) expect(props.onChange).to.have.been.called }) ======= source: 'rgb', }); }); const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />); ChromeFields.handleChange({ a: 0.5 }); expect(props.onChange).to.have.been.called; }); >>>>>>> source: 'rgb', }) }) const ChromeFields = TestUtils.renderIntoDocument(<ChromeFieldsComponent {...props} />) ChromeFields.handleChange({ a: 0.5 }) expect(props.onChange).to.have.been.called })
<<<<<<< handleChange = (data: any) => { color.isValidHex(data) && this.props.onChange(data) ======= handleChange(data: any) { color.isValidHex(data) && this.props.onChange({ hex: data, source: 'hex', }) >>>>>>> handleChange = (data: any) => { color.isValidHex(data) && this.props.onChange({ hex: data, source: 'hex', })
<<<<<<< }, 'OpenLayers': function () { return window.OpenLayers; ======= }, 'Zepto': function () { return window.Zepto; >>>>>>> }, 'OpenLayers': function () { return window.OpenLayers; }, 'Zepto': function () { return window.Zepto;
<<<<<<< const {ReplaySubject, Subject, EMPTY, of} = require('rx') const {mergeMap, takeUntil, filter, tap, switchMap, catchError, switchMapTo} = require('rx/operators') ======= const {Subject, EMPTY, merge, of} = require('rx') const {mergeMap, filter, tap, shareReplay, switchMap, catchError, switchMapTo} = require('rx/operators') >>>>>>> const {Subject, EMPTY, merge, of} = require('rx') const {mergeMap, shareReplay, filter, tap, switchMap, catchError, switchMapTo} = require('rx/operators') <<<<<<< const cmd$ = new ReplaySubject() ======= >>>>>>>
<<<<<<< const {interval, of, throwError} = require('rxjs') const {map, switchMap, finalize, catchError, mapTo, first, exhaustMap, distinctUntilChanged, takeWhile} = require('rxjs/operators') ======= const {interval, of, throwError} = require('rx') const {distinctUntilChanged, exhaustMap, first, finalize, map, switchMap, mapTo, takeWhile, tap} = require('rx/operators') const log = require('sepal/log').getLogger('ee') >>>>>>> const {interval, of, throwError} = require('rx') const {map, switchMap, finalize, catchError, mapTo, first, exhaustMap, distinctUntilChanged, takeWhile} = require('rx/operators')
<<<<<<< const {filter, map, takeUntil, tap} = require('rxjs/operators') const {lastInWindow, repeating} = require('./rxjs/operators') ======= const {filter, map, share, takeUntil, tap} = require('rxjs/operators') const {lastInWindow, repeating} = require('sepal/operators') >>>>>>> const {filter, map, takeUntil, tap} = require('rxjs/operators') const {lastInWindow, repeating} = require('sepal/operators')
<<<<<<< module.exports = app => app.use(createProxyMiddleware('/api', { target: 'http://localhost:8001/', ws: true, proxyTimeout: 10 * 60 * 1000, timeout: 10 * 60 * 1000 })) ======= module.exports = app => app .use(createProxyMiddleware('/api', {target: 'http://localhost:8001/', ws: true})) .use(createProxyMiddleware('/ceo', {target: 'http://localhost:8001/', ws: true})) >>>>>>> module.exports = app => app .use(createProxyMiddleware('/api', { target: 'http://localhost:8001/', ws: true, proxyTimeout: 10 * 60 * 1000, timeout: 10 * 60 * 1000 })) .use(createProxyMiddleware('/ceo', { target: 'http://localhost:8001/', ws: true, proxyTimeout: 10 * 60 * 1000, timeout: 10 * 60 * 1000 }))