conflict_resolution
stringlengths
27
16k
<<<<<<< constructor({mapContext, layerIndex, toggleable, label, description, bounds, mapId$, props, progress$}) { this.mapContext = mapContext ======= constructor({layerIndex, toggleable, label, description, bounds, mapId$, props, onInitialized, onProgress}) { >>>>>>> constructor({mapContext, layerIndex, toggleable, label, description, bounds, mapId$, props, progress$}) { this.mapContext = mapContext <<<<<<< this.progress$ = progress$ ======= this.onProgress = onProgress this.onInitialized = onInitialized >>>>>>> this.progress$ = progress$ <<<<<<< return this.mapId ? of(this) : this.mapId$.pipe( tap(({response: {token, mapId, urlTemplate}}) => { this.token = token this.mapId = mapId this.urlTemplate = urlTemplate }), mapTo(this) ) ======= if (this.mapId) return of(this) return this.mapId$.pipe( map(({response: {token, mapId, urlTemplate, visParams}}) => { this.token = token this.mapId = mapId this.urlTemplate = urlTemplate this.visParams = visParams this.onInitialized(visParams) return this }) ) >>>>>>> return this.mapId ? of(this) : this.mapId$.pipe( tap(({response: {token, mapId, urlTemplate, visParams}}) => { this.token = token this.mapId = mapId this.urlTemplate = urlTemplate this.visParams = visParams this.onInitialized(visParams) }), mapTo(this) )
<<<<<<< Categories={ edit:function(){ console.log('Categories.edit'); $('body').append('<div id="category_dialog"></div>'); $('#category_dialog').load(OC.filePath('contacts', 'ajax', 'categories/edit.php'), function(response, status, xhr){ try { var response = jQuery.parseJSON(response); console.log('status: ' + status + ', response: ' + response + ', response.status:' + response.status); if(response.status == 'error'){ alert(response.data.message); } else { alert(response); } } catch(e) { $('#edit_categories_dialog').dialog({ modal: true, height: 350, minHeight:200, width: 250, minWidth: 200, buttons: { 'Delete':function() { Categories.delete(); }, 'Rescan':function() { Categories.rescan(); } }, close : function(event, ui) { //alert('close'); $(this).dialog('destroy').remove(); $('#category_dialog').remove(); }, open : function(event, ui) { $('#category_addinput').live('input',function(){ if($(this).val().length > 0) { $('#category_addbutton').removeAttr('disabled'); } }); $('#categoryform').submit(function() { Categories.add($('#category_addinput').val()); $('#category_addinput').val(''); $('#category_addbutton').attr('disabled', 'disabled'); return false; }); $('#category_addbutton').live('click',function(e){ e.preventDefault(); if($('#category_addinput').val().length > 0) { Categories.add($('#category_addinput').val()); $('#category_addinput').val(''); } }); } }); } }); }, delete:function(){ var categories = $('#categorylist').find('input[type="checkbox"]').serialize(); console.log('Categories.delete: ' + categories); $.post(OC.filePath('contacts', 'ajax', 'categories/delete.php'),categories,function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); }, add:function(category){ console.log('Categories.add ' + category); $.getJSON(OC.filePath('contacts', 'ajax', 'categories/add.php'),{'category':category},function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); return false; }, rescan:function(){ console.log('Categories.rescan'); $.getJSON(OC.filePath('contacts', 'ajax', 'categories/rescan.php'),{},function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); }, _update:function(categories){ var categorylist = $('#categorylist'); categorylist.find('li').remove(); for(var category in categories) { var item = '<li><input type="checkbox" name="categories" value="' + categories[category] + '" />' + categories[category] + '</li>'; $(item).appendTo(categorylist); } if(Categories.changed != undefined) { Categories.changed(categories); } } } ======= String.prototype.strip_tags = function(){ tags = this; stripped = tags.replace(/[\<\>]/gi, ""); return stripped; }; >>>>>>> String.prototype.strip_tags = function(){ tags = this; stripped = tags.replace(/[\<\>]/gi, ""); return stripped; }; Categories={ edit:function(){ console.log('Categories.edit'); $('body').append('<div id="category_dialog"></div>'); $('#category_dialog').load(OC.filePath('contacts', 'ajax', 'categories/edit.php'), function(response, status, xhr){ try { var response = jQuery.parseJSON(response); console.log('status: ' + status + ', response: ' + response + ', response.status:' + response.status); if(response.status == 'error'){ alert(response.data.message); } else { alert(response); } } catch(e) { $('#edit_categories_dialog').dialog({ modal: true, height: 350, minHeight:200, width: 250, minWidth: 200, buttons: { 'Delete':function() { Categories.delete(); }, 'Rescan':function() { Categories.rescan(); } }, close : function(event, ui) { //alert('close'); $(this).dialog('destroy').remove(); $('#category_dialog').remove(); }, open : function(event, ui) { $('#category_addinput').live('input',function(){ if($(this).val().length > 0) { $('#category_addbutton').removeAttr('disabled'); } }); $('#categoryform').submit(function() { Categories.add($('#category_addinput').val()); $('#category_addinput').val(''); $('#category_addbutton').attr('disabled', 'disabled'); return false; }); $('#category_addbutton').live('click',function(e){ e.preventDefault(); if($('#category_addinput').val().length > 0) { Categories.add($('#category_addinput').val()); $('#category_addinput').val(''); } }); } }); } }); }, delete:function(){ var categories = $('#categorylist').find('input[type="checkbox"]').serialize(); console.log('Categories.delete: ' + categories); $.post(OC.filePath('contacts', 'ajax', 'categories/delete.php'),categories,function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); }, add:function(category){ console.log('Categories.add ' + category); $.getJSON(OC.filePath('contacts', 'ajax', 'categories/add.php'),{'category':category},function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); return false; }, rescan:function(){ console.log('Categories.rescan'); $.getJSON(OC.filePath('contacts', 'ajax', 'categories/rescan.php'),{},function(jsondata){ if(jsondata.status == 'success'){ Categories._update(jsondata.data.categories); } else { alert(jsondata.data.message); } }); }, _update:function(categories){ var categorylist = $('#categorylist'); categorylist.find('li').remove(); for(var category in categories) { var item = '<li><input type="checkbox" name="categories" value="' + categories[category] + '" />' + categories[category] + '</li>'; $(item).appendTo(categorylist); } if(Categories.changed != undefined) { Categories.changed(categories); } } }
<<<<<<< console.log('Contact.addProperty', name) var $elem; ======= console.log('Contact.addProperty', name); >>>>>>> console.log('Contact.addProperty', name) var $elem; <<<<<<< if($elem) { $elem.find('select.type[name="parameters[TYPE][]"]') .combobox({ singleclick: true, classes: ['propertytype', 'float', 'label'], }); } } ======= $elem.find('select.type[name="parameters[TYPE][]"]') .combobox({ singleclick: true, classes: ['propertytype', 'float', 'label'] }); }; >>>>>>> if($elem) { $elem.find('select.type[name="parameters[TYPE][]"]') .combobox({ singleclick: true, classes: ['propertytype', 'float', 'label'], }); } }; <<<<<<< value: value, parameters: parameters, checksum: jsondata.data.checksum, } ======= value: self.valueFor(obj), parameters: self.parametersFor(obj), checksum: jsondata.data.checksum }; >>>>>>> value: value, parameters: parameters, checksum: jsondata.data.checksum, }; <<<<<<< value: value, parameters: parameters, checksum: jsondata.data.checksum, ======= value: self.valueFor(obj), parameters: self.parametersFor(obj), checksum: jsondata.data.checksum >>>>>>> value: value, parameters: parameters, checksum: jsondata.data.checksum,
<<<<<<< if($('#contacts h3.addressbook').length == 0) { $('#contacts').html('<h3 class="addressbook" title="' + book.description + '" contextmenu="addressbookmenu" data-id="' ======= if($('#contacts h3').length == 0) { $('#contacts').html('<h3 class="addressbook" data-id="' >>>>>>> if($('#contacts h3.addressbook').length == 0) { $('#contacts').html('<h3 class="addressbook" data-id="' <<<<<<< if(!$('#contacts h3.addressbook[data-id="' + b + '"]').length) { var item = $('<h3 class="addressbook" title="' + book.description + '" contextmenu="addressbookmenu" data-id="' ======= if(!$('#contacts h3[data-id="' + b + '"]').length) { var item = $('<h3 class="addressbook" data-id="' >>>>>>> if(!$('#contacts h3.addressbook[data-id="' + b + '"]').length) { var item = $('<h3 class="addressbook" data-id="'
<<<<<<< let options = { withCredentials: this.withCredentials, withoutFormatSuffix: true }; FetchRequest.get(that.getRequestUrl(`${url}.json`), null, options).then(function (response) { return layerInfo.layerType === "TILE" ? response.json() : response.text(); }).then(async function (result) { if (layerInfo.layerType === "TILE") { layerInfo.units = result.coordUnit && result.coordUnit.toLowerCase(); layerInfo.coordUnit = result.coordUnit; layerInfo.visibleScales = result.visibleScales; layerInfo.extent = [result.bounds.left, result.bounds.bottom, result.bounds.right, result.bounds.top]; layerInfo.projection = `EPSG:${result.prjCoordSys.epsgCode}`; // let token = layerInfo.credential ? layerInfo.credential.token : undefined; // let isSupprtWebp = await that.isSupportWebp(layerInfo.url, token); // eslint-disable-next-line require-atomic-updates // layerInfo.format = isSupprtWebp ? 'webp' : 'png'; layerInfo.format = 'png'; callback(layerInfo); } else { layerInfo.projection = that.baseProjection; callback(layerInfo); ======= if (credential) { url = `${url}&token=${encodeURI(credential.token)}`; token = credential.token; } return FetchRequest.get(that.getRequestUrl(`${url}.json`), null, options).then(function (response) { return response.json(); }).then(async (result) => { if (result.succeed === false) { return null }; let isSupportWebp = await that.isSupportWebp(layerInfo.url, token); return { units: result.coordUnit && result.coordUnit.toLowerCase(), coordUnit: result.coordUnit, visibleScales: result.visibleScales, extent: [result.bounds.left, result.bounds.bottom, result.bounds.right, result.bounds.top], projection: `EPSG:${result.prjCoordSys.epsgCode}`, format: isSupportWebp ? 'webp' : 'png' >>>>>>> if (credential) { url = `${url}&token=${encodeURI(credential.token)}`; token = credential.token; } return FetchRequest.get(that.getRequestUrl(`${url}.json`), null, options).then(function (response) { return response.json(); }).then(async (result) => { if (result.succeed === false) { return null } // let isSupportWebp = await that.isSupportWebp(layerInfo.url, token); return { units: result.coordUnit && result.coordUnit.toLowerCase(), coordUnit: result.coordUnit, visibleScales: result.visibleScales, extent: [result.bounds.left, result.bounds.bottom, result.bounds.right, result.bounds.top], projection: `EPSG:${result.prjCoordSys.epsgCode}`, format: 'png'
<<<<<<< var unitList1 = this.getUnits(); var unitList2 = other.getUnits(); if (!_.isEqual(unitList1, unitList2)) { return false; } ======= // Compare at a set number (currently 12) of points to determine // equality. // // `range` (and `vars`) is the only variable that varies through the // iterations. For each of range = 10, 100, and 1000, each random // variable is picked from (-range, range). // // Note that because there are 12 iterations and three ranges, each // range is checked four times. >>>>>>> var unitList1 = this.getUnits(); var unitList2 = other.getUnits(); if (!_.isEqual(unitList1, unitList2)) { return false; } // Compare at a set number (currently 12) of points to determine // equality. // // `range` (and `vars`) is the only variable that varies through the // iterations. For each of range = 10, 100, and 1000, each random // variable is picked from (-range, range). // // Note that because there are 12 iterations and three ranges, each // range is checked four times.
<<<<<<< /** * If true the hover mode of the Time Picker is activated. * In hover mode no clicks are required to start selecting an hour * and the timemode switches automatically when a time was chosen. * When a minute is selected the chosen time is applied automatically. */ hoverMode: PropTypes.bool, ======= /** * An optional DOM Node to render the dialog into. The default is to render as the first child * in the `body`. */ renderNode: PropTypes.object, /** * Boolean if the dialog should be rendered as the last child of the `renderNode` or `body` instead * of the first. * * When the `TimePicker` is nested in a `Dialog`, this prop should be enabled to get the correct z-indexing. */ lastChild: PropTypes.bool, >>>>>>> /** * If true the hover mode of the Time Picker is activated. * In hover mode no clicks are required to start selecting an hour * and the timemode switches automatically when a time was chosen. * When a minute is selected the chosen time is applied automatically. */ hoverMode: PropTypes.bool, * An optional DOM Node to render the dialog into. The default is to render as the first child * in the `body`. */ renderNode: PropTypes.object, /** * Boolean if the dialog should be rendered as the last child of the `renderNode` or `body` instead * of the first. * * When the `TimePicker` is nested in a `Dialog`, this prop should be enabled to get the correct z-indexing. */ lastChild: PropTypes.bool, <<<<<<< hoverMode, ======= renderNode, lastChild, >>>>>>> hoverMode, renderNode, lastChild,
<<<<<<< ======= createCheckbox: PropTypes.func.isRequired, removeCheckbox: PropTypes.func.isRequired, toggleAllRows: PropTypes.func.isRequired, >>>>>>> createCheckbox: PropTypes.func.isRequired, removeCheckbox: PropTypes.func.isRequired,
<<<<<<< import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; ======= import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; >>>>>>> import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; <<<<<<< import { UP, DOWN, ENTER, ESC, TAB, ZERO, NINE, KEYPAD_ZERO, KEYPAD_NINE } from '../constants/keyCodes'; import omit from '../utils/omit'; ======= import { UP, DOWN, ESC, ENTER, SPACE, TAB, ZERO, NINE, KEYPAD_ZERO, KEYPAD_NINE } from '../constants/keyCodes'; >>>>>>> import { UP, DOWN, ESC, TAB, ZERO, NINE, KEYPAD_ZERO, KEYPAD_NINE } from '../constants/keyCodes'; import omit from '../utils/omit'; <<<<<<< ======= import handleKeyboardAccessibility from '../utils/EventUtils/handleKeyboardAccessibility'; import controlled from '../utils/PropTypes/controlled'; >>>>>>>
<<<<<<< import DialogContainer from '../../Dialogs/DialogContainer'; import Portal from '../../Helpers/Portal'; ======= >>>>>>> import Portal from '../../Helpers/Portal'; <<<<<<< it('should inerhit and pass the dialog\'s renderNode context', () => { const dialog = renderIntoDocument( <Dialog id="test"> <Drawer defaultVisible id="test-2"> <DialogContainer id="nested-dialog" visible onHide={jest.fn()} /> </Drawer> </Dialog> ======= it('should call the updateType function after initial mount', () => { const onVisibilityToggle = jest.fn(); renderIntoDocument( <Drawer onVisibilityToggle={onVisibilityToggle} drawerType={Drawer.DrawerTypes.PERSISTENT} /> >>>>>>> it('should not render in the Portal component by default', () => { const drawer = shallow(<Drawer />); expect(drawer.find(Portal).length).toBe(0); }); it('should render in the Portal component if the portal prop is enabled', () => { const drawer = shallow(<Drawer portal />); // One for overlay and one for the drawer itself expect(drawer.find(Portal).length).toBe(2); }); it('should call the updateType function after initial mount', () => { const onVisibilityToggle = jest.fn(); renderIntoDocument( <Drawer onVisibilityToggle={onVisibilityToggle} drawerType={Drawer.DrawerTypes.PERSISTENT} />
<<<<<<< ======= this.focus = this.focus.bind(this); this.getField = this.getField.bind(this); this._setField = this._setField.bind(this); this._handleBlur = this._handleBlur.bind(this); this._handleFocus = this._handleFocus.bind(this); this._handleChange = this._handleChange.bind(this); this._togglePasswordField = this._togglePasswordField.bind(this); this._handleContainerClick = this._handleContainerClick.bind(this); >>>>>>> <<<<<<< _setMessage = (message) => { if (message !== null) { this._message = findDOMNode(message); } }; _setDivider = (divider) => { if (divider !== null) { this._divider = findDOMNode(divider); } }; _setContainer = (container) => { if (container !== null) { this._node = container; } }; _setPasswordBtn = (btn) => { if (btn !== null) { this._password = findDOMNode(btn); } }; _setFloatingLabel = (label) => { if (label !== null) { this._label = findDOMNode(label); } }; _handleContainerClick = (e) => { ======= _handleContainerClick(e) { >>>>>>> _handleContainerClick = (e) => { <<<<<<< _updateMultilineHeight = (props = this.props) => { const { block } = props; const multiline = this._isMultiline(props); if (!multiline) { return; } const floating = this._node.querySelector('md-text-field--floating-margin'); this._additionalHeight = floating ? parseInt(window.getComputedStyle(floating).marginTop, 10) : 0; if (!block) { const mb = parseInt(window.getComputedStyle(this._divider).getPropertyValue('margin-bottom'), 10); this._additionalHeight += (mb === 4 ? 12 : 16); } if (this._message) { this._additionalHeight += this._message.offsetHeight; } }; _handleBlur = (e) => { ======= _handleBlur(e) { >>>>>>> _handleBlur = (e) => {
<<<<<<< /* eslint-disable max-len */ ======= jest.disableAutomock(); >>>>>>> /* eslint-disable max-len */ <<<<<<< import TextField from '../../TextFields/TextField'; ======= import ListItem from '../../Lists/ListItem'; >>>>>>> import TextField from '../../TextFields/TextField'; import ListItem from '../../Lists/ListItem'; <<<<<<< it('should reset the suggestion when an inline autocomplete is tabbed', () => { const data = ['Hello']; const autocomplete = mount(<Autocomplete id="test" data={data} defaultValue="he" inline />); expect(autocomplete.state('suggestion')).toBe(''); const field = autocomplete.find('input'); field.simulate('focus'); expect(autocomplete.state('suggestion')).toBe('llo'); field.simulate('keyDown', { which: TAB, keyCode: TAB }); expect(autocomplete.state('suggestion')).toBe(''); ======= it('should allow for ajax autocompletion flows', () => { let data = []; const onAutocomplete = jest.fn(); const autocomplete = mount( <Autocomplete id="ajax-example" data={data} label="Ajax" filter={null} onChange={jest.fn()} clearOnAutocomplete onAutocomplete={onAutocomplete} /> ); autocomplete.find('input').simulate('focus'); expect(autocomplete.state('focus')).toBe(true); autocomplete.find('input').simulate('change', { value: 'a' }); expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('isOpen')).toBe(false); data = ['Apples', 'Bananas', 'Oranges', 'Avacados']; autocomplete.setProps({ data }); // return from ajax call expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('isOpen')).toBe(true); autocomplete.find(ListItem).at(1).simulate('click'); expect(onAutocomplete).toBeCalled(); expect(autocomplete.state('focus')).toBe(true); expect(autocomplete.state('isOpen')).toBe(false); expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('value')).toBe(''); data = []; autocomplete.setProps({ data }); expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('focus')).toBe(true); autocomplete.find('input').simulate('change', { value: 'b' }); expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('isOpen')).toBe(false); data = ['Bapples', 'Bananas', 'Boranges', 'Bavacados']; autocomplete.setProps({ data }); expect(autocomplete.state('matches')).toBe(data); expect(autocomplete.state('isOpen')).toBe(true); }); describe('caseInsensitiveFilter', () => { it('includes any items that match a single letter', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = ['Apple', 'Banana', 'Orange']; expect(filter(haystack, 'a')).toEqual(haystack); expect(filter(haystack, 'e')).toEqual(['Apple', 'Orange']); }); it('includes any items that match a single letter ignoring case', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = ['Apple', 'Banana', 'Orange']; expect(filter(haystack, 'A')).toEqual(haystack); expect(filter(haystack, 'E')).toEqual(['Apple', 'Orange']); }); it('only includes items that match letters in order', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = ['Apple', 'Banana', 'Orange']; expect(filter(haystack, 'an')).toEqual(['Banana', 'Orange']); expect(filter(haystack, 'ana')).toEqual(['Banana']); }); it('allows the items to be a list of numbers', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = [1, 11, 111]; expect(filter(haystack, '1')).toEqual(haystack); expect(filter(haystack, '2')).toEqual([]); }); it('allows the items to be a list of objects', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = [{ name: 'Apple' }, { name: 'Banana' }, { name: 'Orange' }]; expect(filter(haystack, 'apple', 'name')).toEqual([{ name: 'Apple' }]); }); it('allows the item to be a mixed list of string, number, object, and react element', () => { const test = <Test />; const filter = Autocomplete.caseInsensitiveFilter; const haystack = [{ name: 'Apple' }, 'Banana', 3, test]; expect(filter(haystack, 'e', 'name')).toEqual([{ name: 'Apple' }, test]); expect(filter(haystack, '3', 'name')).toEqual([3, test]); }); it('filters out empty, null, and undefined', () => { const filter = Autocomplete.caseInsensitiveFilter; const haystack = [ undefined, '', null, 0, 100, { name: undefined }, { name: '' }, { name: null }, ]; expect(filter(haystack, '0')).toEqual([0, 100]); }); >>>>>>> it('should reset the suggestion when an inline autocomplete is tabbed', () => { const data = ['Hello']; const autocomplete = mount(<Autocomplete id="test" data={data} defaultValue="he" inline />); expect(autocomplete.state('suggestion')).toBe(''); const field = autocomplete.find('input'); field.simulate('focus'); expect(autocomplete.state('suggestion')).toBe('llo'); field.simulate('keyDown', { which: TAB, keyCode: TAB }); expect(autocomplete.state('suggestion')).toBe('');
<<<<<<< onClick: PropTypes.func.isRequired, disabledInteractions: PropTypes.arrayOf(PropTypes.oneOf(['keyboard', 'touch', 'mouse'])), }; _handleClick = (e) => { // The switch's thumb needs to have an onClick handler to enable keyboard accessibility, however, // this actually triggers two click events since the slider's track needs to be clickable as well. // Stop propagation to prevent the thumb click AND track propagation click. e.stopPropagation(); this.props.onClick(e); ======= onClick: PropTypes.func, >>>>>>> onClick: PropTypes.func, disabledInteractions: PropTypes.arrayOf(PropTypes.oneOf(['keyboard', 'touch', 'mouse'])),
<<<<<<< this.setState({ focus: false, visible: false }); }; ======= this.setState({ isOpen: false }); } >>>>>>> this.setState({ visible: false }); }; <<<<<<< let { visible } = this.state; let matches = value ? this.state.matches : []; ======= let { isOpen } = this.state; let matches = value || !filter ? this.state.matches : []; >>>>>>> let { visible } = this.state; let matches = value || !filter ? this.state.matches : [];
<<<<<<< import { mount } from 'enzyme'; import { findDOMNode } from 'react-dom'; ======= >>>>>>> import { mount } from 'enzyme'; <<<<<<< import CSSTransitionGroup from 'react-addons-css-transition-group'; import Portal from '../../Helpers/Portal'; ======= >>>>>>> import Portal from '../../Helpers/Portal'; <<<<<<< it('should not render in the Portal component by default', () => { const drawer = mount(<NavigationDrawer />); expect(drawer.find(Portal).length).toBe(0); }); it('should render in the Portal component if the portal prop is enabled', () => { const drawer = mount(<NavigationDrawer portal />); expect(drawer.find(Portal).length).toBe(1); }); ======= describe('Drawer', () => { const MATCH_MEDIA = window.matchMedia; const matchesMobile = jest.fn(query => ({ matches: query.indexOf(Drawer.defaultProps.mobileMinWidth) !== -1, })); const matchesTablet = jest.fn(query => ({ matches: query.indexOf(Drawer.defaultProps.tabletMinWidth) !== -1, })); const matchesDesktop = jest.fn(query => ({ matches: query.indexOf('max') === -1 && query.indexOf(Drawer.defaultProps.desktopMinWidth) !== -1, })); afterAll(() => { window.matchMedia = MATCH_MEDIA; }); it('should correctly set the default visibility on mobile devices', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesMobile; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(false); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(0); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly set the default visibility on tablets', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesTablet; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(false); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.PERSISTENT); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.DrawerTypes.PERSISTENT, { mobile: false, tablet: true, desktop: false }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly set the default visibility on desktop', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesDesktop; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.FULL_HEIGHT); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.DrawerTypes.FULL_HEIGHT, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle.mock.calls.length).toBe(1); expect(props.onVisibilityToggle).toBeCalledWith(true); }); it('should not update the visibility to false when the defaultVisible prop is enabled and the drawer type is temporary for any screen size', () => { const props = { defaultVisible: true, navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.TEMPORARY, desktopDrawerType: Drawer.DrawerTypes.TEMPORARY, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesMobile; let drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(0); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); window.matchMedia = matchesTablet; drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(props.tabletDrawerType, { mobile: false, tablet: true, desktop: false }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); window.matchMedia = matchesDesktop; drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(2); expect(props.onMediaTypeChange).toBeCalledWith(props.desktopDrawerType, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly update the visibility when the visible prop was defined and there was a media type change with visibility', () => { const props = { visible: false, defaultMedia: 'mobile', onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesDesktop; renderIntoDocument(<NavigationDrawer {...props} />); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.defaultProps.desktopDrawerType, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle).toBeCalledWith(true); window.matchMedia = matchesMobile; renderIntoDocument(<NavigationDrawer {...props} visible defaultMedia="desktop" />); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.defaultProps.mobileDrawerType, { mobile: true, tablet: false, desktop: false }); expect(props.onVisibilityToggle).toBeCalledWith(true); }); }); >>>>>>> it('should not render in the Portal component by default', () => { const MATCH_MEDIA = window.matchMedia; window.matchMedia = jest.fn(() => ({ matches: false })); const drawer = mount(<NavigationDrawer />); expect(drawer.find(Portal).length).toBe(0); window.matchMedia = MATCH_MEDIA; }); it('should render in the Portal component if the portal prop is enabled', () => { const drawer = mount(<NavigationDrawer portal />); expect(drawer.find(Portal).length).toBe(1); }); describe('Drawer', () => { const MATCH_MEDIA = window.matchMedia; const matchesMobile = jest.fn(query => ({ matches: query.indexOf(Drawer.defaultProps.mobileMinWidth) !== -1, })); const matchesTablet = jest.fn(query => ({ matches: query.indexOf(Drawer.defaultProps.tabletMinWidth) !== -1, })); const matchesDesktop = jest.fn(query => ({ matches: query.indexOf('max') === -1 && query.indexOf(Drawer.defaultProps.desktopMinWidth) !== -1, })); afterAll(() => { window.matchMedia = MATCH_MEDIA; }); it('should correctly set the default visibility on mobile devices', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesMobile; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(false); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(0); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly set the default visibility on tablets', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesTablet; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(false); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.PERSISTENT); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.DrawerTypes.PERSISTENT, { mobile: false, tablet: true, desktop: false }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly set the default visibility on desktop', () => { const props = { navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.PERSISTENT, desktopDrawerType: Drawer.DrawerTypes.FULL_HEIGHT, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesDesktop; const drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.FULL_HEIGHT); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.DrawerTypes.FULL_HEIGHT, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle.mock.calls.length).toBe(1); expect(props.onVisibilityToggle).toBeCalledWith(true); }); it('should not update the visibility to false when the defaultVisible prop is enabled and the drawer type is temporary for any screen size', () => { const props = { defaultVisible: true, navItems: [], mobileDrawerType: Drawer.DrawerTypes.TEMPORARY, tabletDrawerType: Drawer.DrawerTypes.TEMPORARY, desktopDrawerType: Drawer.DrawerTypes.TEMPORARY, onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesMobile; let drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(0); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); window.matchMedia = matchesTablet; drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(1); expect(props.onMediaTypeChange).toBeCalledWith(props.tabletDrawerType, { mobile: false, tablet: true, desktop: false }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); window.matchMedia = matchesDesktop; drawer = renderIntoDocument(<NavigationDrawer {...props} />); expect(drawer.state.visible).toBe(true); expect(drawer.state.drawerType).toBe(NavigationDrawer.DrawerTypes.TEMPORARY); expect(props.onMediaTypeChange.mock.calls.length).toBe(2); expect(props.onMediaTypeChange).toBeCalledWith(props.desktopDrawerType, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle.mock.calls.length).toBe(0); }); it('should correctly update the visibility when the visible prop was defined and there was a media type change with visibility', () => { const props = { visible: false, defaultMedia: 'mobile', onMediaTypeChange: jest.fn(), onVisibilityToggle: jest.fn(), }; window.matchMedia = matchesDesktop; renderIntoDocument(<NavigationDrawer {...props} />); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.defaultProps.desktopDrawerType, { mobile: false, tablet: false, desktop: true }); expect(props.onVisibilityToggle).toBeCalledWith(true); window.matchMedia = matchesMobile; renderIntoDocument(<NavigationDrawer {...props} visible defaultMedia="desktop" />); expect(props.onMediaTypeChange).toBeCalledWith(NavigationDrawer.defaultProps.mobileDrawerType, { mobile: true, tablet: false, desktop: false }); expect(props.onVisibilityToggle).toBeCalledWith(true); }); });
<<<<<<< this.setState(state); }; ======= this.setState(state, this._field.blur); } >>>>>>> this.setState(state, this._field.blur); };
<<<<<<< ======= this.focus = this.focus.bind(this); this.getField = this.getField.bind(this); this._setField = this._setField.bind(this); this._setDivider = this._setDivider.bind(this); this._setMessage = this._setMessage.bind(this); this._setContainer = this._setContainer.bind(this); this._setPasswordBtn = this._setPasswordBtn.bind(this); this._setFloatingLabel = this._setFloatingLabel.bind(this); this._handleBlur = this._handleBlur.bind(this); this._handleFocus = this._handleFocus.bind(this); this._handleChange = this._handleChange.bind(this); this._handleHeightChange = this._handleHeightChange.bind(this); this._updateMultilineHeight = this._updateMultilineHeight.bind(this); this._togglePasswordField = this._togglePasswordField.bind(this); this._handleContainerClick = this._handleContainerClick.bind(this); >>>>>>> <<<<<<< _blur = () => { const value = this._field.getValue(); ======= _handleBlur(e) { if (this.props.onBlur) { this.props.onBlur(e); } >>>>>>> _handleBlur = (e) => { if (this.props.onBlur) { this.props.onBlur(e); } <<<<<<< this.setState(state, this._field.blur); }; _handleOutsideClick = (e) => { if (!this._node.contains(e.target)) { this._blur(); } }; ======= this.setState(state); } >>>>>>> this.setState(state); }; <<<<<<< if (resize && (!resize.noShrink || this.state.width !== resize.max)) { if (!this._canvas) { this._canvas = document.createElement('canvas'); } const width = this._calcWidth(this._canvas, this._field.getField(), value, resize); if (width !== this.state.width && (!resize.noShrink || width > this.state.width)) { state = state || {}; state.width = width; } } if (state) { this.setState(state); } }; _handleKeyDown = (e) => { if (this.props.onKeyDown) { this.props.onKeyDown(e); } if ((e.which || e.keyCode) === TAB) { this._blur(); } }; _togglePasswordField = () => { ======= _togglePasswordField() { >>>>>>> if (state) { this.setState(state); } }; _togglePasswordField = () => { <<<<<<< ======= delete props.label; delete props.placeholder; delete props.error; delete props.active; delete props.floating; delete props.leftIcon; delete props.rightIcon; delete props.adjustMinWidth; delete props.onClick; delete props.onChange; delete props.onFocus; delete props.floatingLabel; >>>>>>>
<<<<<<< import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; ======= import React, { PureComponent, cloneElement, Children } from 'react'; import PropTypes from 'prop-types'; >>>>>>> import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; <<<<<<< ======= import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; >>>>>>> <<<<<<< import getField from '../utils/getField'; import anchorShape from '../Helpers/anchorShape'; import fixedToShape from '../Helpers/fixedToShape'; import positionShape from '../Helpers/positionShape'; ======= import handleWindowClickListeners from '../utils/EventUtils/handleWindowClickListeners'; import handleKeyboardAccessibility from '../utils/EventUtils/handleKeyboardAccessibility'; >>>>>>> import getField from '../utils/getField'; import handleKeyboardAccessibility from '../utils/EventUtils/handleKeyboardAccessibility'; import anchorShape from '../Helpers/anchorShape'; import fixedToShape from '../Helpers/fixedToShape'; import positionShape from '../Helpers/positionShape'; import Layover from '../Helpers/Layover'; <<<<<<< static childContextTypes = { listLevel: PropTypes.number, cascadingId: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), cascadingMenu: PropTypes.bool, cascadingFixedTo: fixedToShape, cascadingAnchor: anchorShape, cascadingZDepth: PropTypes.number, }; ======= this._setList = this._setList.bind(this); this._setContainer = this._setContainer.bind(this); this._handleKeyDown = this._handleKeyDown.bind(this); this._handleListClick = this._handleListClick.bind(this); this._handleOutsideClick = this._handleOutsideClick.bind(this); } >>>>>>> static childContextTypes = { listLevel: PropTypes.number, cascadingId: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ]), cascadingMenu: PropTypes.bool, cascadingFixedTo: fixedToShape, cascadingAnchor: anchorShape, cascadingZDepth: PropTypes.number, }; <<<<<<< ======= } _handleKeyDown(e) { handleKeyboardAccessibility(e, this._handleListClick, true, true); } _handleListClick(e) { const { onClose, close } = this.props; >>>>>>> <<<<<<< if (position === 'context') { position = Menu.Positions.BELOW; ======= const menuClassName = cn({ 'md-list--menu-contained': contained }, listClassName); let menuItems; try { const list = Children.only(children); menuItems = cloneElement(children, { id: list.props.id || listId, key: 'menu-list', className: cn(menuClassName, list.props.className), onClick: this._handleListClick, onKeyDown: this._handleKeyDown, ref: this._setList, }); } catch (e) { menuItems = ( <List id={listId} key="menu-list" style={listStyle} className={menuClassName} onKeyDown={this._handleKeyDown} onClick={this._handleListClick} ref={this._setList} > {children} </List> ); >>>>>>> if (position === 'context') { position = Menu.Positions.BELOW;
<<<<<<< page, /* eslint-disable no-unused-vars */ onPagination, rowsPerPage: propRowsPerPage, defaultPage, defaultRowsPerPage, /* eslint-enable no-unused-vars */ ======= >>>>>>> /* eslint-disable no-unused-vars */ onPagination, rowsPerPage: propRowsPerPage, page: propPage, defaultPage, defaultRowsPerPage, /* eslint-enable no-unused-vars */ <<<<<<< ======= delete props.onPagination; delete props.rowsPerPage; delete props.defaultPage; delete props.defaultRowsPerPage; delete props.page; >>>>>>>
<<<<<<< import Portal from '../../Helpers/Portal'; ======= import { ENTER } from '../../constants/keyCodes'; >>>>>>> import Portal from '../../Helpers/Portal'; import { ENTER } from '../../constants/keyCodes'; <<<<<<< it('should not render in the Portal component by default', () => { const dialog = mount(<DatePickerContainer id="test" defaultVisible />); expect(dialog.find(Portal).length).toBe(0); }); it('should render in the Portal component when the portal prop is enabled', () => { const dialog = mount(<DatePickerContainer id="test" defaultVisible portal />); expect(dialog.find(Portal).length).toBe(1); }); ======= it('should not open the DatePicker if it is disabled and the text field is clicked', () => { const props = { id: 'test', disabled: true }; const container = renderIntoDocument(<DatePickerContainer {...props} />); container._toggleOpen({ target: { tagName: 'input' } }); expect(container.state.visible).toBe(false); }); it('should not open the DatePicker if it is disabled and the users pressed the enter key while focused on the keyboard', () => { const props = { id: 'test', disabled: true }; const container = renderIntoDocument(<DatePickerContainer {...props} />); container._handleKeyDown({ keyCode: ENTER, target: { tagName: 'input' } }); expect(container.state.visible).toBe(false); }); >>>>>>> it('should not render in the Portal component by default', () => { const dialog = mount(<DatePickerContainer id="test" defaultVisible />); expect(dialog.find(Portal).length).toBe(0); }); it('should render in the Portal component when the portal prop is enabled', () => { const dialog = mount(<DatePickerContainer id="test" defaultVisible portal />); expect(dialog.find(Portal).length).toBe(1); }); it('should not open the DatePicker if it is disabled and the text field is clicked', () => { const props = { id: 'test', disabled: true }; const container = renderIntoDocument(<DatePickerContainer {...props} />); container._toggleOpen({ target: { tagName: 'input' } }); expect(container.state.visible).toBe(false); }); it('should not open the DatePicker if it is disabled and the users pressed the enter key while focused on the keyboard', () => { const props = { id: 'test', disabled: true }; const container = renderIntoDocument(<DatePickerContainer {...props} />); container._handleKeyDown({ keyCode: ENTER, target: { tagName: 'input' } }); expect(container.state.visible).toBe(false); });
<<<<<<< /** * Boolean if the nested items should animate when they appear or disappear. */ animateNestedItems: PropTypes.bool, /** * Defines the number of items in the list. This is only required when all items in the * list are not present in the DOM. * * @see https://www.w3.org/TR/wai-aria/states_and_properties#aria-setsize */ 'aria-setsize': PropTypes.number, /** * Defines the items position in the list. This is only required when all items in the list * are not present in the DOM. The custom validation just requires this prop if the `aria-setsize` * prop is defined as a helpful reminder. * * @see https://www.w3.org/TR/wai-aria/states_and_properties#aria-posinset */ 'aria-posinset': (props, propName, ...args) => { let validator = PropTypes.number; if (typeof props['aria-setsize'] !== 'undefined') { validator = validator.isRequired; } return validator(props, propName, ...args); }, initiallyOpen: deprecated(PropTypes.bool, 'Use `defaultVisible` instead'), defaultOpen: deprecated(PropTypes.bool, 'Use `defaultVisible` instead'), isOpen: deprecated(PropTypes.bool, 'Use `visible` instead'), ======= /** * Any additional props you would like to supply to the surrounding `<li>` tag for the `ListItem`. * By default, all props will be provided to the inner `AccessibleFakeButton`. If the `passPropsToItem` * prop is enabled, the remaining props will be provided to the `<lI>` tag instead and this prop * is probably useless. */ itemProps: PropTypes.object, /** * Any additional props you would like to add to the inner `AccessibleFakeButton`. By default, all the * remaining props will be provided to the `AccessibleFakeButton`, so this prop is probably useless. * Enabling the `passPropsToItem` prop will change the default behavior so that the remaining props * are provided to the surrounding `<li>` node instead and this prop becomes usefull. */ tileProps: PropTypes.object, /** * All the remaining props should be passed to the surrounding `<li>` node instead of the `AccessibleFakeButton`. * * > NOTE: This will most likely become the default in the next *major* release. Migration warnings will be added * if that is the case. */ passPropsToItem: PropTypes.bool, initiallyOpen: deprecated(PropTypes.bool, 'Use `defaultOpen` instead'), >>>>>>> /** * Boolean if the nested items should animate when they appear or disappear. */ animateNestedItems: PropTypes.bool, /** * Defines the number of items in the list. This is only required when all items in the * list are not present in the DOM. * * @see https://www.w3.org/TR/wai-aria/states_and_properties#aria-setsize */ 'aria-setsize': PropTypes.number, /** * Defines the items position in the list. This is only required when all items in the list * are not present in the DOM. The custom validation just requires this prop if the `aria-setsize` * prop is defined as a helpful reminder. * * @see https://www.w3.org/TR/wai-aria/states_and_properties#aria-posinset */ 'aria-posinset': (props, propName, ...args) => { let validator = PropTypes.number; if (typeof props['aria-setsize'] !== 'undefined') { validator = validator.isRequired; } return validator(props, propName, ...args); }, /** * Any additional props you would like to supply to the surrounding `<li>` tag for the `ListItem`. * By default, all props will be provided to the inner `AccessibleFakeButton`. If the `passPropsToItem` * prop is enabled, the remaining props will be provided to the `<lI>` tag instead and this prop * is probably useless. */ itemProps: PropTypes.object, /** * Any additional props you would like to add to the inner `AccessibleFakeButton`. By default, all the * remaining props will be provided to the `AccessibleFakeButton`, so this prop is probably useless. * Enabling the `passPropsToItem` prop will change the default behavior so that the remaining props * are provided to the surrounding `<li>` node instead and this prop becomes usefull. */ tileProps: PropTypes.object, /** * All the remaining props should be passed to the surrounding `<li>` node instead of the `AccessibleFakeButton`. * * > NOTE: This will most likely become the default in the next *major* release. Migration warnings will be added * if that is the case. */ passPropsToItem: PropTypes.bool, initiallyOpen: deprecated(PropTypes.bool, 'Use `defaultVisible` instead'), defaultOpen: deprecated(PropTypes.bool, 'Use `defaultVisible` instead'), isOpen: deprecated(PropTypes.bool, 'Use `visible` instead'), <<<<<<< itemComponent: ItemComponent, itemProps, 'aria-setsize': ariaSize, 'aria-posinset': ariaPos, isOpen, // deprecated /* eslint-disable no-unused-vars */ visible: propVisible, defaultVisible, // deprecated defaultOpen, initiallyOpen, /* eslint-enable no-unused-vars */ ======= itemProps, tileProps, passPropsToItem, component, >>>>>>> component, itemComponent: ItemComponent, itemProps, tileProps, passPropsToItem, 'aria-setsize': ariaSize, 'aria-posinset': ariaPos, isOpen, // deprecated /* eslint-disable no-unused-vars */ visible: propVisible, defaultVisible, // deprecated defaultOpen, initiallyOpen, /* eslint-enable no-unused-vars */
<<<<<<< tabIndex: !radio || checked ? undefined : -1, checkedRadioIcon: !radio ? undefined : this.props.checkedRadioIcon, uncheckedRadioIcon: !radio ? undefined : this.props.uncheckedRadioIcon, ======= tabIndex: !radio || checked || (i === 0 && this._activeIndex === -1) ? undefined : -1, >>>>>>> tabIndex: !radio || checked || (i === 0 && this._activeIndex === -1) ? undefined : -1, checkedRadioIcon: !radio ? undefined : this.props.checkedRadioIcon, uncheckedRadioIcon: !radio ? undefined : this.props.uncheckedRadioIcon,
<<<<<<< _toggleOpen = (e) => { if (this.props.disabled) { ======= _toggleOpen(e) { if (this.props.disabled || this.props.readOnly) { >>>>>>> _toggleOpen = (e) => { if (this.props.disabled || this.props.readOnly) { <<<<<<< _handleKeyDown = (e) => { if ((e.which || e.keyCode) === ENTER) { this._toggleOpen(e); ======= _handleKeyDown(e) { handleKeyboardAccessibility(e, this._toggleOpen, true, true); if ((e.which || e.keyCode) === TAB && this.state.active) { this.setState({ active: false }); >>>>>>> _handleKeyDown = (e) => { handleKeyboardAccessibility(e, this._toggleOpen, true, true); if ((e.which || e.keyCode) === TAB && this.state.active) { this.setState({ active: false }); <<<<<<< ======= delete props.value; delete props.onVisibilityChange; delete props.onChange; delete props.readOnly; delete props.defaultValue; delete props.defaultVisible; delete props.defaultTimeMode; // Delete deprecated delete props.isOpen; delete props.initialTimeMode; delete props.initiallyOpen; >>>>>>>
<<<<<<< _setRowsPerPage = (rowsPerPage) => { const page = getField(this.props, this.state, 'page'); const newStart = (page - 1) * rowsPerPage; ======= _setRowsPerPage(rowsPerPage) { const page = 1; const newStart = 0; >>>>>>> _setRowsPerPage = (rowsPerPage) => { const page = 1; const newStart = 0;
<<<<<<< portal, /* eslint-disable no-unused-vars */ type: propType, visible: propVisible, renderNode: propRenderNode, defaultVisible, defaultMedia, mobileType, mobileMinWidth, tabletType, tabletMinWidth, desktopType, desktopMinWidth, transitionDuration, onVisibilityToggle, onMediaTypeChange, autoclose, autocloseAfterInk, closeOnNavItemClick, constantType, /* eslint-enable no-unused-vars */ ======= portal, /* eslint-disable no-unused-vars */ type: propType, visible: propVisible, renderNode: propRenderNode, constantType, defaultVisible, defaultMedia, mobileType, mobileMinWidth, tabletType, tabletMinWidth, desktopType, desktopMinWidth, transitionDuration, onVisibilityToggle, onMediaTypeChange, autoclose, autocloseAfterInk, closeOnNavItemClick, /* eslint-enable no-unused-vars */ >>>>>>> portal, /* eslint-disable no-unused-vars */ type: propType, visible: propVisible, renderNode: propRenderNode, constantType, defaultVisible, defaultMedia, mobileType, mobileMinWidth, tabletType, tabletMinWidth, desktopType, desktopMinWidth, transitionDuration, onVisibilityToggle, onMediaTypeChange, autoclose, autocloseAfterInk, closeOnNavItemClick, constantType, /* eslint-enable no-unused-vars */
<<<<<<< ======= if (!controlledPage) { this.state.page = page; } if (!controlledRowsPerPage) { this.state.rowsPerPage = props.defaultRowsPerPage; } this._setControls = this._setControls.bind(this); this._position = this._position.bind(this); this._increment = this._increment.bind(this); this._decrement = this._decrement.bind(this); this._setRowsPerPage = this._setRowsPerPage.bind(this); >>>>>>> if (!controlledPage) { this.state.page = page; } if (!controlledRowsPerPage) { this.state.rowsPerPage = props.defaultRowsPerPage; } <<<<<<< this.setState({ start: newStart, page: nextPage }); }; ======= if (typeof this.props.page === 'undefined') { this.setState({ start: newStart, page: nextPage }); } } >>>>>>> if (typeof this.props.page === 'undefined') { this.setState({ start: newStart, page: nextPage }); } }; <<<<<<< this.setState({ start: newStart, page: nextPage }); }; ======= if (typeof this.props.page === 'undefined') { this.setState({ start: newStart, page: nextPage }); } } >>>>>>> if (typeof this.props.page === 'undefined') { this.setState({ start: newStart, page: nextPage }); } }; <<<<<<< this.setState({ start: newStart, rowsPerPage }); }; ======= let nextState; if (typeof this.props.rowsPerPage === 'undefined') { nextState = { rowsPerPage }; } if (typeof this.props.page === 'undefined') { nextState = nextState || {}; nextState.start = newStart; } if (nextState) { this.setState(nextState); } } >>>>>>> let nextState; if (typeof this.props.rowsPerPage === 'undefined') { nextState = { rowsPerPage }; } if (typeof this.props.page === 'undefined') { nextState = nextState || {}; nextState.start = newStart; } if (nextState) { this.setState(nextState); } };
<<<<<<< ======= jest.disableAutomock(); >>>>>>> <<<<<<< import { shallow } from 'enzyme'; import renderer from 'react-test-renderer'; ======= import { shallow, mount } from 'enzyme'; >>>>>>> import renderer from 'react-test-renderer'; import { shallow, mount } from 'enzyme';
<<<<<<< chartHeatMapBmapService, chartContrastService) { ======= chartHeatMapBmapService,chartScatterMapService,chartScatterMapBmapService) { >>>>>>> chartHeatMapBmapService,chartScatterMapService,chartScatterMapBmapService,chartContrastService) { <<<<<<< case 'contrast': chart = chartContrastService; break; ======= case 'scatterMap': chart = chartScatterMapService; break; case 'scatterMapBmap': chart = chartScatterMapBmapService; break; >>>>>>> case 'contrast': chart = chartContrastService; case 'scatterMap': chart = chartScatterMapService; break; case 'scatterMapBmap': chart = chartScatterMapBmapService; break;
<<<<<<< chartLiquidFillService, chartContrastService,chartChinaMapService, chartChinaMapBmapService) { ======= chartLiquidFillService, chartMarkLineMapService, chartHeatMapService, chartMarkLineMapBmapService, chartHeatMapBmapService,chartScatterMapService,chartScatterMapBmapService,chartContrastService,chartRelationService) { >>>>>>> chartLiquidFillService, chartContrastService,chartChinaMapService, chartChinaMapBmapService,chartRelationService) { <<<<<<< case 'chinaMap': chart = chartChinaMapService; break case 'chinaMapBmap': chart = chartChinaMapBmapService; break ======= case 'scatterMap': chart = chartScatterMapService; break; case 'scatterMapBmap': chart = chartScatterMapBmapService; break; case 'relation': chart = chartRelationService; break; >>>>>>> case 'chinaMap': chart = chartChinaMapService; break case 'chinaMapBmap': chart = chartChinaMapBmapService; break case 'relation': chart = chartRelationService; break;
<<<<<<< },{ name: translate('CONFIG.WIDGET.MARK_LINE_MAP'), value: 'markLineMap', class: 'cMarkLineMap', row: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1_MORE'), column: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0_MORE'), measure: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1') ======= }, { name: translate('CONFIG.WIDGET.LIQUID_FILL'), value: 'liquidFill', class: 'cLiquidFill', row: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0'), column: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0'), measure: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1') >>>>>>> },{ name: translate('CONFIG.WIDGET.MARK_LINE_MAP'), value: 'markLineMap', class: 'cMarkLineMap', row: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1_MORE'), column: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0_MORE'), measure: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1') }, { name: translate('CONFIG.WIDGET.LIQUID_FILL'), value: 'liquidFill', class: 'cLiquidFill', row: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0'), column: translate('CONFIG.WIDGET.TIPS_DIM_NUM_0'), measure: translate('CONFIG.WIDGET.TIPS_DIM_NUM_1') <<<<<<< "areaMap": true, "heatMapCalendar": true, "heatMapTable": true,"markLineMap":true ======= "areaMap": true, "heatMapCalendar": true, "heatMapTable": true, "liquidFill": true >>>>>>> "areaMap": true, "heatMapCalendar": true, "heatMapTable": true,"markLineMap":true, "liquidFill": true <<<<<<< heatMapTable: {keys: 0, groups: 0, filters: 0, values: 1}, markLineMap: {keys: 0, groups: 0, filters: 0, values: 0} ======= heatMapTable: {keys: 0, groups: 0, filters: 0, values: 1}, liquidFill: {keys: -1, groups: -1, filters: 0, values: 1} >>>>>>> heatMapTable: {keys: 0, groups: 0, filters: 0, values: 1}, markLineMap: {keys: 0, groups: 0, filters: 0, values: 0}, liquidFill: {keys: -1, groups: -1, filters: 0, values: 1} <<<<<<< case 'markLineMap': $scope.curWidget.config.selects = angular.copy($scope.columns); $scope.curWidget.config.keys = new Array(); $scope.curWidget.config.groups = new Array(); $scope.curWidget.config.values = [{ name: '', cols: [] }]; $scope.curWidget.config.filters = new Array(); break; ======= case 'liquidFill': $scope.curWidget.config.selects = angular.copy($scope.columns); $scope.curWidget.config.values = [{ name: '', cols: [], style: 'circle' }]; $scope.curWidget.config.filters = new Array(); $scope.curWidget.config.animation = 'static'; break; >>>>>>> case 'markLineMap': $scope.curWidget.config.selects = angular.copy($scope.columns); $scope.curWidget.config.keys = new Array(); $scope.curWidget.config.groups = new Array(); $scope.curWidget.config.values = [{ name: '', cols: [] }]; $scope.curWidget.config.filters = new Array(); break; case 'liquidFill': $scope.curWidget.config.selects = angular.copy($scope.columns); $scope.curWidget.config.values = [{ name: '', cols: [], style: 'circle' }]; $scope.curWidget.config.filters = new Array(); $scope.curWidget.config.animation = 'static'; break;
<<<<<<< chartTreeMapService, chartAreaMapService, chartHeatMapCalendarService, chartHeatMapTableService, chartMarkLineMapService) { ======= chartTreeMapService, chartAreaMapService, chartHeatMapCalendarService, chartHeatMapTableService, chartLiquidFillService ) { >>>>>>> chartTreeMapService, chartAreaMapService, chartHeatMapCalendarService, chartHeatMapTableService, chartLiquidFillService , chartMarkLineMapService) { <<<<<<< case 'markLineMap': chart = chartMarkLineMapService; break; ======= case 'liquidFill': chart = chartLiquidFillService; break; >>>>>>> case 'markLineMap': chart = chartMarkLineMapService; break; case 'liquidFill': chart = chartLiquidFillService; break;
<<<<<<< ======= }, bower: { install: { options: { targetDir: './public/lib', layout: 'byComponent', install: true, verbose: true, cleanBowerDir: true } } }, env: { test: { NODE_ENV: 'test' } >>>>>>> }, env: { test: { NODE_ENV: 'test' } <<<<<<< ======= grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-env'); >>>>>>> grunt.loadNpmTasks('grunt-env'); <<<<<<< grunt.registerTask('test', ['mochaTest']); ======= grunt.registerTask('test', ['env:test', 'mochaTest']); //Bower task. grunt.registerTask('install', ['bower']); >>>>>>> grunt.registerTask('test', ['env:test', 'mochaTest']);
<<<<<<< var table = require('azure-mobile-apps/express').table(); table.read.authorize = true; ======= var table = require('azure-mobile-apps').table(); table.read.authorise = true; >>>>>>> var table = require('azure-mobile-apps').table(); table.read.authorize = true;
<<<<<<< const ICOScan = ({ ...props }) => (<div> <ICOScanHeader {...props} /> <Row> <div id="loadingProgressG" className={props.isLoading === true ? 'show' : 'hide'}> <div id="loadingProgressG_1" className="loadingProgressG" /> </div> {!props.showLoader && props.web3 && <Col md={12}> <Row className="scanbox-details-parameters"> <Col lg={3} md={12} sm={12} xs={12} className="part"> <p className="title">Declared Cap</p> {props.cap && typeof props.cap === 'object' && getValueOrNotAvailable(props, 'cap').map(item => <strong key={item} className="desc">{item}</strong>)} {props.cap && typeof props.cap === 'string' && <strong className="desc">{getValueOrNotAvailable(props, 'cap')}</strong>} </Col> <Col lg={2} md={12} sm={12} xs={12} className="part"> <p className="title">Tokens Supply</p> <strong className="desc">{formatNumber(parseFloat(props.totalSupply))}</strong> </Col> <Col lg={2} md={12} sm={12} xs={12} className="part"> <p className="title">Token symbol</p> <strong className="desc">{getValueOrNotAvailable(props, 'symbol')}</strong> </Col> <Col lg={3} md={12} sm={12} xs={12} className="part"> <p className="title">Declared Duration</p> <strong className="desc">{getValueOrNotAvailable(props, 'startDate')} <span className="font-light">to</span> {getValueOrNotAvailable(props, 'endDate')} </strong> </Col> <Col lg={2} md={12} sm={12} xs={12} className="part part-status"> <div className="right"> <p className="title title-status">Status</p> <strong className={`desc ${trimString(getValueOrNotAvailable(props, 'status'))}`}>{getValueOrNotAvailable(props, 'status')}</strong> </div> </Col> </Row> </Col>} </Row> </div> ); ======= export const ICOScan = (props) => { const { isLoading, totalSupply, web3, showLoader, symbol, cap, startDate, endDate, status } = props; return (<div> <ICOScanHeader {...props} /> <Row> <div id="loadingProgressG" className={isLoading === true ? 'show' : 'hide'}> <div id="loadingProgressG_1" className="loadingProgressG" /> </div> {!showLoader && web3 && <Col md={12}> <Row className="scanbox-details-parameters"> <Col md={3} className="part"> <p className="title">Declared Cap</p> {cap && typeof cap === 'object' && getValueOrDefault(cap).map(item => (<strong key={item} className="desc" >{item}</strong>))} {cap && typeof cap === 'string' && <strong className="desc">{getValueOrDefault(cap)}</strong>} </Col> <Col md={2} className="part"> <p className="title">Tokens Supply</p> <strong className="desc">{formatNumber(parseFloat(totalSupply))}</strong> </Col> <Col md={2} className="part"> <p className="title">Token symbol</p> <strong className="desc">{getValueOrDefault(symbol)}</strong> </Col> <Col md={3} className="part"> <p className="title">Declared Duration</p> <strong className="desc">{getValueOrDefault(startDate)} <span className="font-light" >to</span> {getValueOrDefault(endDate)} </strong> </Col> <Col md={2} className="part part-status"> <div className="right"> <p className="title title-status">Status</p> <strong className={`desc ${trimString(getValueOrDefault(status))}`} >{getValueOrDefault(status)}</strong> </div> </Col> </Row> </Col>} </Row> </div> ); }; >>>>>>> export const ICOScan = (props) => { const { isLoading, totalSupply, web3, showLoader, symbol, cap, startDate, endDate, status } = props; return (<div> <ICOScanHeader {...props} /> <Row> <div id="loadingProgressG" className={isLoading === true ? 'show' : 'hide'}> <div id="loadingProgressG_1" className="loadingProgressG" /> </div> {!showLoader && web3 && <Col md={12}> <Row className="scanbox-details-parameters"> <Col lg={3} md={12} sm={12} xs={12} className="part"> <p className="title">Declared Cap</p> {cap && typeof cap === 'object' && getValueOrDefault(cap).map(item => (<strong key={item} className="desc" >{item}</strong>))} {cap && typeof cap === 'string' && <strong className="desc">{getValueOrDefault(cap)}</strong>} </Col> <Col lg={2} md={12} sm={12} xs={12} className="part"> <p className="title">Tokens Supply</p> <strong className="desc">{formatNumber(parseFloat(totalSupply))}</strong> </Col> <Col lg={2} md={12} sm={12} xs={12} className="part"> <p className="title">Token symbol</p> <strong className="desc">{getValueOrDefault(symbol)}</strong> </Col> <Col lg={3} md={12} sm={12} xs={12} className="part"> <p className="title">Declared Duration</p> <strong className="desc">{getValueOrDefault(startDate)} <span className="font-light" >to</span> {getValueOrDefault(endDate)} </strong> </Col> <Col lg={2} md={12} sm={12} xs={12} className="part part-status"> <div className="right"> <p className="title title-status">Status</p> <strong className={`desc ${trimString(getValueOrDefault(status))}`} >{getValueOrDefault(status)}</strong> </div> </Col> </Row> </Col>} </Row> </div> ); };
<<<<<<< import React from 'react'; ======= import React, { Component } from 'react'; import InfiniteScroll from 'react-infinite-scroller'; import '../assets/css/App.css'; >>>>>>> import React, { Component } from 'react'; import InfiniteScroll from 'react-infinite-scroller';
<<<<<<< export const allocateCSVFile = statistics => ({ type: 'CSV_FILE', csvContent: statistics }); ======= export const showStatistics = () => ({ type: 'SHOW_STATS' }); >>>>>>> export const allocateCSVFile = statistics => ({ type: 'CSV_FILE', csvContent: statistics }); export const showStatistics = () => ({ type: 'SHOW_STATS' });
<<<<<<< <h4><a href={props.address}> {props.name || props.information.aliasName}</a></h4> <p>{props.information.description}</p> ======= <h4><a href={props.ico.address}> {state.name || props.ico.information.aliasName}</a></h4> <p>PUT LINK TO PROJECT WEB PAGE!!!!</p> >>>>>>> <h4><a href={props.address}> {props.name || props.information.aliasName}</a></h4> <p>{props.information.description}</p> <p>PUT LINK TO PROJECT WEB PAGE!!!!</p> <<<<<<< <p className="title">Token Cap</p> <strong className="desc">{props['cap']}</strong> ======= <p className="title">Declared Cap</p> <strong className="desc">{getValueOrNotAvailable(state, 'cap')}</strong> >>>>>>> <p className="title">Declared Cap</p> <strong className="desc">{getValueOrNotAvailable(props, 'cap')}</strong> <<<<<<< <p className="title">Duration</p> <strong className="desc">{getValueOrNotAvailable(props,"startDate")}</strong> ======= <p className="title">Declared Duration</p> <strong className="desc">{getValueOrNotAvailable(state,"startDate")}</strong> >>>>>>> <p className="title">Declared Duration</p> <strong className="desc">{getValueOrNotAvailable(props,"startDate")}</strong>
<<<<<<< import electron, { app, BrowserWindow, BrowserView, globalShortcut, ipcMain, webContents, } from 'electron'; ======= import electron, {app, BrowserWindow, globalShortcut, ipcMain, nativeTheme} from 'electron'; >>>>>>> import electron, { app, BrowserWindow, BrowserView, globalShortcut, ipcMain, webContents, nativeTheme, } from 'electron'; <<<<<<< import {DEVTOOLS_MODES} from './constants/previewerLayouts'; ======= import {initMainShortcutManager} from './shortcut-manager/main-shortcut-manager'; >>>>>>> import {DEVTOOLS_MODES} from './constants/previewerLayouts'; import {initMainShortcutManager} from './shortcut-manager/main-shortcut-manager'; <<<<<<< mainWindow.on('resize', function() { const [width, height] = mainWindow.getSize(); mainWindow.webContents.send('window-resize', {height, width}); }); ======= initMainShortcutManager(); >>>>>>> initMainShortcutManager(); mainWindow.on('resize', function() { const [width, height] = mainWindow.getSize(); mainWindow.webContents.send('window-resize', {height, width}); }); <<<<<<< ipcMain.on('open-devtools', (event, ...args) => { const {webViewId, bounds, mode} = args[0]; if (!webViewId) { return; } const webView = webContents.fromId(webViewId); if (mode === DEVTOOLS_MODES.UNDOCKED) { return webView.openDevTools(); } devToolsView = new BrowserView(); mainWindow.setBrowserView(devToolsView); devToolsView.setBounds(bounds); webView.setDevToolsWebContents(devToolsView.webContents); webView.openDevTools(); devToolsView.webContents.executeJavaScript(` (async function () { const sleep = ms => (new Promise(resolve => setTimeout(resolve, ms))); var retryCount = 0; var done = false; while(retryCount < 10 && !done) { try { retryCount++; document.querySelectorAll('div[slot="insertion-point-main"]')[0].shadowRoot.querySelectorAll('.tabbed-pane-left-toolbar.toolbar')[0].style.display = 'none' done = true } catch(err){ await sleep(100); } } })() `); }); ipcMain.on('close-devtools', (event, ...args) => { const {webViewId} = args[0]; if (!devToolsView || !webViewId) { return; } webContents.fromId(webViewId).closeDevTools(); mainWindow.removeBrowserView(devToolsView); }); ipcMain.on('resize-devtools', (event, ...args) => { const {bounds} = args[0]; if (!bounds || !devToolsView) { return; } devToolsView.setBounds(bounds); }); ======= ipcMain.on('prefers-color-scheme-select', (event, scheme) => { nativeTheme.themeSource = scheme || 'system'; }); >>>>>>> ipcMain.on('prefers-color-scheme-select', (event, scheme) => { nativeTheme.themeSource = scheme || 'system'; }); ipcMain.on('open-devtools', (event, ...args) => { const {webViewId, bounds, mode} = args[0]; if (!webViewId) { return; } const webView = webContents.fromId(webViewId); if (mode === DEVTOOLS_MODES.UNDOCKED) { return webView.openDevTools(); } devToolsView = new BrowserView(); mainWindow.setBrowserView(devToolsView); devToolsView.setBounds(bounds); webView.setDevToolsWebContents(devToolsView.webContents); webView.openDevTools(); devToolsView.webContents.executeJavaScript(` (async function () { const sleep = ms => (new Promise(resolve => setTimeout(resolve, ms))); var retryCount = 0; var done = false; while(retryCount < 10 && !done) { try { retryCount++; document.querySelectorAll('div[slot="insertion-point-main"]')[0].shadowRoot.querySelectorAll('.tabbed-pane-left-toolbar.toolbar')[0].style.display = 'none' done = true } catch(err){ await sleep(100); } } })() `); }); ipcMain.on('close-devtools', (event, ...args) => { const {webViewId} = args[0]; if (!devToolsView || !webViewId) { return; } webContents.fromId(webViewId).closeDevTools(); mainWindow.removeBrowserView(devToolsView); }); ipcMain.on('resize-devtools', (event, ...args) => { const {bounds} = args[0]; if (!bounds || !devToolsView) { return; } devToolsView.setBounds(bounds); });
<<<<<<< export const TOGGLE_BOOKMARK = 'TOGGLE_BOOKMARK'; ======= export const NEW_WINDOW_SIZE = 'NEW_WINDOW_SIZE'; >>>>>>> export const TOGGLE_BOOKMARK = 'TOGGLE_BOOKMARK'; export const NEW_WINDOW_SIZE = 'NEW_WINDOW_SIZE'; <<<<<<< export function gotoUrl(url) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {address}, } = getState(); if (url === address) { return; } dispatch(newAddress(url)); }; } ======= export function onDevToolsModeChange(newMode) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig, windowSize}, } = getState(); const {mode, activeDevTools, open} = devToolsConfig; if (mode === newMode) { return; } let newActiveDevTools = [...activeDevTools]; let newOpen = open; if ( newMode === DEVTOOLS_MODES.UNDOCKED || mode === DEVTOOLS_MODES.UNDOCKED ) { dispatch(onDevToolsClose(null, true)); if (newActiveDevTools.length > 0) { newActiveDevTools = [newActiveDevTools[0]]; newOpen = true; } else { newActiveDevTools = []; newOpen = false; } } let newConfig = { ...devToolsConfig, activeDevTools: newActiveDevTools, mode: newMode, open: newOpen, }; if (newMode != DEVTOOLS_MODES.UNDOCKED) { const size = getDefaultDevToolsWindowSize(newMode, windowSize); const bounds = getBounds(newMode, size, windowSize); newConfig = { ...newConfig, size, bounds, }; } if ( newMode === DEVTOOLS_MODES.UNDOCKED || mode === DEVTOOLS_MODES.UNDOCKED ) { newConfig.activeDevTools.forEach(({webViewId, deviceId}) => setTimeout(() => { dispatch(onDevToolsOpen(deviceId, webViewId, true)); }) ); } else { ipcRenderer.send('resize-devtools', {bounds: newConfig.bounds}); } dispatch(newDevToolsConfig(newConfig)); }; } export function onWindowResize(size) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: { windowSize: {width, height}, devToolsConfig, }, } = getState(); if (width === size.width && height === size.height) { return; } dispatch(newWindowSize(size)); const devToolsSize = getDefaultDevToolsWindowSize( devToolsConfig.mode, size ); const newBounds = getBounds(devToolsConfig.mode, devToolsSize, size); ipcRenderer.send('resize-devtools', { bounds: newBounds, }); dispatch( newDevToolsConfig({ ...devToolsConfig, size: devToolsSize, bounds: newBounds, }) ); }; } export function onDevToolsResize(size) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig, windowSize}, } = getState(); const {size: devToolsSize, bounds, mode} = devToolsConfig; if ( devToolsSize.width === size.width && devToolsSize.height === size.height ) { return; } const newBounds = getBounds(mode, size, windowSize); ipcRenderer.send('resize-devtools', { bounds: newBounds, }); dispatch(newDevToolsConfig({...devToolsConfig, size, bounds: newBounds})); }; } export function onDevToolsOpen(newDeviceId, newWebViewId, force) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig}, } = getState(); const {open, activeDevTools, bounds, mode} = devToolsConfig; if ( open && !!activeDevTools.find(({deviceId}) => deviceId === newDeviceId) ) { if (force) { ipcRenderer.send('open-devtools', { bounds, mode, webViewId: newWebViewId, }); } return; } let newActiveDevices = [...activeDevTools]; if (open && activeDevTools[0] && mode !== DEVTOOLS_MODES.UNDOCKED) { activeDevTools.forEach(({webViewId}) => { ipcRenderer.send('close-devtools', {webViewId}); newActiveDevices = newActiveDevices.filter( ({webViewId: _webViewId}) => webViewId !== _webViewId ); }); } ipcRenderer.send('open-devtools', {bounds, mode, webViewId: newWebViewId}); const newData = { ...devToolsConfig, open: true, activeDevTools: [ ...newActiveDevices, {deviceId: newDeviceId, webViewId: newWebViewId}, ], }; dispatch(newDevToolsConfig(newData)); }; } export function onDevToolsClose(devToolsInfo, closeAll) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig}, } = getState(); const {open, activeDevTools} = devToolsConfig; if (!open) { return; } let devToolsToClose = []; if (closeAll) { devToolsToClose = [...activeDevTools]; } else { devToolsToClose = [devToolsInfo]; } let newActiveDevTools = [...activeDevTools]; devToolsToClose.forEach(({webViewId}) => { ipcRenderer.send('close-devtools', {webViewId}); newActiveDevTools = newActiveDevTools.filter( ({webViewId: _webViewId}) => _webViewId != webViewId ); }); dispatch( newDevToolsConfig({ ...devToolsConfig, open: newActiveDevTools.length > 0, activeDevTools: newActiveDevTools, }) ); }; } >>>>>>> export function gotoUrl(url) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {address}, } = getState(); if (url === address) { return; } dispatch(newAddress(url)); } } export function onDevToolsModeChange(newMode) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig, windowSize}, } = getState(); const {mode, activeDevTools, open} = devToolsConfig; if (mode === newMode) { return; } let newActiveDevTools = [...activeDevTools]; let newOpen = open; if ( newMode === DEVTOOLS_MODES.UNDOCKED || mode === DEVTOOLS_MODES.UNDOCKED ) { dispatch(onDevToolsClose(null, true)); if (newActiveDevTools.length > 0) { newActiveDevTools = [newActiveDevTools[0]]; newOpen = true; } else { newActiveDevTools = []; newOpen = false; } } let newConfig = { ...devToolsConfig, activeDevTools: newActiveDevTools, mode: newMode, open: newOpen, }; if (newMode != DEVTOOLS_MODES.UNDOCKED) { const size = getDefaultDevToolsWindowSize(newMode, windowSize); const bounds = getBounds(newMode, size, windowSize); newConfig = { ...newConfig, size, bounds, }; } if ( newMode === DEVTOOLS_MODES.UNDOCKED || mode === DEVTOOLS_MODES.UNDOCKED ) { newConfig.activeDevTools.forEach(({webViewId, deviceId}) => setTimeout(() => { dispatch(onDevToolsOpen(deviceId, webViewId, true)); }) ); } else { ipcRenderer.send('resize-devtools', {bounds: newConfig.bounds}); } dispatch(newDevToolsConfig(newConfig)); }; } export function onWindowResize(size) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: { windowSize: {width, height}, devToolsConfig, }, } = getState(); if (width === size.width && height === size.height) { return; } dispatch(newWindowSize(size)); const devToolsSize = getDefaultDevToolsWindowSize( devToolsConfig.mode, size ); const newBounds = getBounds(devToolsConfig.mode, devToolsSize, size); ipcRenderer.send('resize-devtools', { bounds: newBounds, }); dispatch( newDevToolsConfig({ ...devToolsConfig, size: devToolsSize, bounds: newBounds, }) ); }; } export function onDevToolsResize(size) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig, windowSize}, } = getState(); const {size: devToolsSize, bounds, mode} = devToolsConfig; if ( devToolsSize.width === size.width && devToolsSize.height === size.height ) { return; } const newBounds = getBounds(mode, size, windowSize); ipcRenderer.send('resize-devtools', { bounds: newBounds, }); dispatch(newDevToolsConfig({...devToolsConfig, size, bounds: newBounds})); }; } export function onDevToolsOpen(newDeviceId, newWebViewId, force) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig}, } = getState(); const {open, activeDevTools, bounds, mode} = devToolsConfig; if ( open && !!activeDevTools.find(({deviceId}) => deviceId === newDeviceId) ) { if (force) { ipcRenderer.send('open-devtools', { bounds, mode, webViewId: newWebViewId, }); } return; } let newActiveDevices = [...activeDevTools]; if (open && activeDevTools[0] && mode !== DEVTOOLS_MODES.UNDOCKED) { activeDevTools.forEach(({webViewId}) => { ipcRenderer.send('close-devtools', {webViewId}); newActiveDevices = newActiveDevices.filter( ({webViewId: _webViewId}) => webViewId !== _webViewId ); }); } ipcRenderer.send('open-devtools', {bounds, mode, webViewId: newWebViewId}); const newData = { ...devToolsConfig, open: true, activeDevTools: [ ...newActiveDevices, {deviceId: newDeviceId, webViewId: newWebViewId}, ], }; dispatch(newDevToolsConfig(newData)); }; } export function onDevToolsClose(devToolsInfo, closeAll) { return (dispatch: Dispatch, getState: RootStateType) => { const { browser: {devToolsConfig}, } = getState(); const {open, activeDevTools} = devToolsConfig; if (!open) { return; } let devToolsToClose = []; if (closeAll) { devToolsToClose = [...activeDevTools]; } else { devToolsToClose = [devToolsInfo]; } let newActiveDevTools = [...activeDevTools]; devToolsToClose.forEach(({webViewId}) => { ipcRenderer.send('close-devtools', {webViewId}); newActiveDevTools = newActiveDevTools.filter( ({webViewId: _webViewId}) => _webViewId != webViewId ); }); dispatch( newDevToolsConfig({ ...devToolsConfig, open: newActiveDevTools.length > 0, activeDevTools: newActiveDevTools, }) ); }; }
<<<<<<< if (removeFixedPositionedElements) { await this.webView.executeJavaScript(` //document.body.classList.add('responsivelyApp__ScreenshotInProgress'); responsivelyApp.hideFixedPositionElementsForScreenshot(); `); } ======= await this.webView .executeJavaScript( ` document.body.classList.add('responsivelyApp__ScreenshotInProgress'); responsivelyApp.hideFixedPositionElementsForScreenshot(); ` ) .catch(captureOnSentry); >>>>>>> if (removeFixedPositionedElements) { await this.webView.executeJavaScript(` responsivelyApp.hideFixedPositionElementsForScreenshot(); `); } <<<<<<< if (removeFixedPositionedElements) { return this.webView.executeJavaScript(` document.body.classList.remove('responsivelyApp__ScreenshotInProgress'); responsivelyApp.unHideElementsHiddenForScreenshot(); `); } return Promise.resolve(true); ======= return this.webView .executeJavaScript( ` document.body.classList.remove('responsivelyApp__ScreenshotInProgress'); responsivelyApp.unHideElementsHiddenForScreenshot(); ` ) .catch(captureOnSentry); >>>>>>> if (removeFixedPositionedElements) { return this.webView .executeJavaScript( ` document.body.classList.remove('responsivelyApp__ScreenshotInProgress'); responsivelyApp.unHideElementsHiddenForScreenshot(); ` ) .catch(captureOnSentry); } return Promise.resolve(true);
<<<<<<< import {SCREENSHOT_MECHANISM} from '../constants/values'; ======= import {PERMISSION_MANAGEMENT_OPTIONS} from '../constants/permissionsManagement'; >>>>>>> import {SCREENSHOT_MECHANISM} from '../constants/values'; import {PERMISSION_MANAGEMENT_OPTIONS} from '../constants/permissionsManagement'; <<<<<<< const _handleScreenshotMechanismPreferences = () => { const userPreferences = settings.get(USER_PREFERENCES) || {}; if (userPreferences.screenshotMechanism != null) { return; } userPreferences.screenshotMechanism = SCREENSHOT_MECHANISM.V2; settings.set(USER_PREFERENCES, userPreferences); }; ======= const _handlePermissionsDefaultPreferences = () => { const userPreferences = settings.get(USER_PREFERENCES) || {}; if (userPreferences.permissionManagement != null) { return; } userPreferences.permissionManagement = PERMISSION_MANAGEMENT_OPTIONS.ALLOW_ALWAYS; settings.set(USER_PREFERENCES, userPreferences); }; >>>>>>> const _handleScreenshotMechanismPreferences = () => { const userPreferences = settings.get(USER_PREFERENCES) || {}; if (userPreferences.screenshotMechanism != null) { return; } userPreferences.screenshotMechanism = SCREENSHOT_MECHANISM.V2; settings.set(USER_PREFERENCES, userPreferences); }; const _handlePermissionsDefaultPreferences = () => { const userPreferences = settings.get(USER_PREFERENCES) || {}; if (userPreferences.permissionManagement != null) { return; } userPreferences.permissionManagement = PERMISSION_MANAGEMENT_OPTIONS.ALLOW_ALWAYS; settings.set(USER_PREFERENCES, userPreferences); };
<<<<<<< NEW_CSS_EDITOR_STATUS, NEW_CSS_EDITOR_POSITION, NEW_CSS_EDITOR_CONTENT, ======= TOGGLE_ALL_DEVICES_DESIGN_MODE, TOGGLE_DEVICE_DESIGN_MODE, SET_HEADER_VISIBILITY, SET_LEFT_PANE_VISIBILITY, >>>>>>> NEW_CSS_EDITOR_STATUS, NEW_CSS_EDITOR_POSITION, NEW_CSS_EDITOR_CONTENT, TOGGLE_ALL_DEVICES_DESIGN_MODE, TOGGLE_DEVICE_DESIGN_MODE, SET_HEADER_VISIBILITY, SET_LEFT_PANE_VISIBILITY,
<<<<<<< DEVICE_LOADING, } from '../actions/browser' import type {Action} from './types' import getAllDevices from '../constants/devices' import {ipcRenderer, remote} from 'electron' import settings from 'electron-settings' import type {Device} from '../constants/devices' ======= } from '../actions/browser'; import type {Action} from './types'; import getAllDevices from '../constants/devices'; import {ipcRenderer, remote} from 'electron'; import settings from 'electron-settings'; import type {Device} from '../constants/devices'; >>>>>>> DEVICE_LOADING, } from '../actions/browser'; import type {Action} from './types'; import getAllDevices from '../constants/devices'; import {ipcRenderer, remote} from 'electron'; import settings from 'electron-settings'; import type {Device} from '../constants/devices'; <<<<<<< CUSTOM_DEVICES, } from '../constants/settingKeys' import {isIfStatement} from 'typescript' import {getHomepage, saveHomepage} from '../utils/navigatorUtils' import console from 'electron-timber' ======= CUSTOM_DEVICES } from '../constants/settingKeys'; import {isIfStatement} from 'typescript'; import {getHomepage, getLastOpenedAddress, saveHomepage, saveLastOpenedAddress} from '../utils/navigatorUtils' import console from 'electron-timber'; >>>>>>> CUSTOM_DEVICES, } from '../constants/settingKeys'; import {isIfStatement} from 'typescript'; import { getHomepage, getLastOpenedAddress, saveHomepage, saveLastOpenedAddress, } from '../utils/navigatorUtils'; import console from 'electron-timber'; <<<<<<< return {...state, address: action.address} ======= saveLastOpenedAddress(action.address) return {...state, address: action.address}; >>>>>>> saveLastOpenedAddress(action.address); return {...state, address: action.address};
<<<<<<< export const RELOAD_CSS = 'RELOAD_CSS'; ======= export const DELETE_STORAGE = 'DELETE_STORAGE'; >>>>>>> export const RELOAD_CSS = 'RELOAD_CSS'; export const DELETE_STORAGE = 'DELETE_STORAGE';
<<<<<<< import {shell, ipcRenderer} from 'electron'; ======= import PropTypes from 'prop-types'; import {shell} from 'electron'; >>>>>>> import {shell, ipcRenderer} from 'electron'; import PropTypes from 'prop-types'; <<<<<<< const AppUpdaterStatusInfoSection = () => { const [status, setAppUpdaterStatus] = useState('idle'); useEffect(() => { const handler = (event, args) => { setAppUpdaterStatus(args.nextStatus); }; ipcRenderer.on('updater-status-changed', handler); return () => { ipcRenderer.removeListener('updater-status-changed', handler); }; }, []); let label = ''; switch(status) { case 'checking': label = 'Update Info: Checking for Updates...'; break; case 'noUpdate': label = 'Update Info: No Updates'; break; case 'downloading': label = 'Update Info: Downloading Update...'; break; case 'downloaded': label = 'Update Info: Update Downloaded'; break; default: label = null; break; } if (label == null) return null; return ( <div className={styles.section}> <div> <span className={cx('appUpdaterStatusInfo', styles.linkText)}> {label} </span> </div> </div> ) } const StatusBar = () => { ======= const StatusBar = ({visible}) => { if (!visible) { return null; } >>>>>>> const AppUpdaterStatusInfoSection = () => { const [status, setAppUpdaterStatus] = useState('idle'); useEffect(() => { const handler = (event, args) => { setAppUpdaterStatus(args.nextStatus); }; ipcRenderer.on('updater-status-changed', handler); return () => { ipcRenderer.removeListener('updater-status-changed', handler); }; }, []); let label = ''; switch(status) { case 'checking': label = 'Update Info: Checking for Updates...'; break; case 'noUpdate': label = 'Update Info: No Updates'; break; case 'downloading': label = 'Update Info: Downloading Update...'; break; case 'downloaded': label = 'Update Info: Update Downloaded'; break; default: label = null; break; } if (label == null) return null; return ( <div className={styles.section}> <div> <span className={cx('appUpdaterStatusInfo', styles.linkText)}> {label} </span> </div> </div> ) } const StatusBar = ({visible}) => { if (!visible) { return null; }
<<<<<<< TOGGLE_ALL_DEVICES_DESIGN_MODE, TOGGLE_DEVICE_DESIGN_MODE, ======= SET_HEADER_VISIBILITY, SET_LEFT_PANE_VISIBILITY, >>>>>>> TOGGLE_ALL_DEVICES_DESIGN_MODE, TOGGLE_DEVICE_DESIGN_MODE, SET_HEADER_VISIBILITY, SET_LEFT_PANE_VISIBILITY, <<<<<<< allDevicesInDesignMode: boolean, ======= isHeaderVisible: boolean, isLeftPaneVisible: boolean, >>>>>>> allDevicesInDesignMode: boolean, isHeaderVisible: boolean, isLeftPaneVisible: boolean, <<<<<<< allDevicesInDesignMode: false, ======= isHeaderVisible: true, isLeftPaneVisible: true, >>>>>>> allDevicesInDesignMode: false, isHeaderVisible: true, isLeftPaneVisible: true, <<<<<<< case TOGGLE_ALL_DEVICES_DESIGN_MODE: const nextDevices = state.devices; nextDevices.forEach(d => (d.designMode = action.allDevicesInDesignMode)); return { ...state, allDevicesInDesignMode: action.allDevicesInDesignMode, devices: nextDevices, }; case TOGGLE_DEVICE_DESIGN_MODE: const deviceIndex = state.devices.findIndex( x => x.id === action.deviceId ); if (deviceIndex === -1) return {...state}; state.devices[deviceIndex] = { ...state.devices[deviceIndex], designMode: action.designModeOn, }; return { ...state, allDevicesInDesignMode: state.devices.every(x => x.designMode), devices: [...state.devices], }; ======= case SET_HEADER_VISIBILITY: return { ...state, isHeaderVisible: action.isVisible, }; case SET_LEFT_PANE_VISIBILITY: return { ...state, isLeftPaneVisible: action.isVisible, }; >>>>>>> case TOGGLE_ALL_DEVICES_DESIGN_MODE: const nextDevices = state.devices; nextDevices.forEach(d => (d.designMode = action.allDevicesInDesignMode)); return { ...state, allDevicesInDesignMode: action.allDevicesInDesignMode, devices: nextDevices, }; case TOGGLE_DEVICE_DESIGN_MODE: const deviceIndex = state.devices.findIndex( x => x.id === action.deviceId ); if (deviceIndex === -1) return {...state}; state.devices[deviceIndex] = { ...state.devices[deviceIndex], designMode: action.designModeOn, }; return { ...state, allDevicesInDesignMode: state.devices.every(x => x.designMode), devices: [...state.devices], }; case SET_HEADER_VISIBILITY: return { ...state, isHeaderVisible: action.isVisible, }; case SET_LEFT_PANE_VISIBILITY: return { ...state, isLeftPaneVisible: action.isVisible, };
<<<<<<< screenshotMechanism: string, ======= permissionManagement: 'Ask always' | 'Allow always' | 'Deny always', >>>>>>> screenshotMechanism: string, permissionManagement: 'Ask always' | 'Allow always' | 'Deny always',
<<<<<<< import Heartbreaker from './Modules/Talents/Heartbreaker'; ======= import Bloodworms from './Modules/Talents/Bloodworms'; >>>>>>> import Heartbreaker from './Modules/Talents/Heartbreaker'; import Bloodworms from './Modules/Talents/Bloodworms'; <<<<<<< heartbreaker: Heartbreaker, ======= bloodworms: Bloodworms, >>>>>>> heartbreaker: Heartbreaker, bloodworms: Bloodworms,
<<<<<<< handleMouseEnter = () => { this.props.active && this.setState({hover: true}) ======= handleMouseEnter() { this.props.active && this.props.useHover && this.setState({hover: true}) >>>>>>> handleMouseEnter = () => { this.props.active && this.props.useHover && this.setState({hover: true})
<<<<<<< var me = {}; function initialiseTearout() { var myDropTarget = tearElement.parentNode, parent = myDropTarget.parentNode, myHoverArea = parent.getElementsByClassName('hover-area')[0], offset = { x: 0, y: 0 }, currentlyDragging = false, insideFavouritesPane = true, dragService; hoverService.add(myHoverArea, scope.stock.code); // The distance from where the mouse click occurred from the origin of the element that will be torn out. // This is to place the tearout window exactly over the tornout element me.setOffset = (x, y) => { offset.x = x; offset.y = y; return me; }; // Sets whether the tearout window is being dragged. // Used to determine whether `mousemove` events should programmatically move the tearout window me.setCurrentlyDragging = (dragging) => { currentlyDragging = dragging; return me; }; // A call to the OpenFin API to move the tearout window me.moveTearoutWindow = (x, y) => { var tileTopPadding = 5, tileRightPadding = 5, tearElementWidth = 16; tearoutWindow.moveTo( x - tileWidth + (tearElementWidth - offset.x + tileRightPadding), y - (tileTopPadding + offset.y)); return me; }; // A call to the OpenFin API to both show the tearout window and ensure that // it is displayed in the foreground me.displayTearoutWindow = () => { tearoutWindow.show(); tearoutWindow.setAsForeground(); return me; }; // Inject the element being tornout into the new, tearout, window me.appendToOpenfinWindow = (injection, openfinWindow) => { openfinWindow .contentWindow .document .body .appendChild(injection); return me; }; // Grab the DOM element back from the tearout window and append the given container me.returnFromTearout = () => { myDropTarget.appendChild(tearElement); tearoutWindow.hide(); }; // Clear out all the elements but keep the js context ;) me.clearIncomingTearoutWindow = () => { tearoutWindow .getNativeWindow() .document .body = tearoutWindow .getNativeWindow() .document.createElement('body'); return me; }; // On a mousedown event, we grab our destination tearout window and inject // the DOM element to be torn out. // // `handleMouseDown` is the function assigned to the native `mousedown` // event on the element to be torn out. The param `e` is the native event // passed in by the event listener. The steps taken are as follows: // * Set the X and Y offsets to better position the tearout window // * Move the tearout window into position // * Clear out any DOM elements that may already be in the tearout window // * Move the DOM element to be torn out into the tearout // * Display the tearout window in the foreground me.handleMouseDown = (e) => { if (e.button !== 0) { // Only process left clicks return false; } ======= >>>>>>>
<<<<<<< ======= <Components.PreviewWindow display={displayPreview} htmlfile="preview-chart.html" position={previewDetails.position} size={previewDetails.size} ></Components.PreviewWindow> <div className="header"> <span className="watchlist-name">My Watchlist</span> </div> >>>>>>> <Components.PreviewWindow display={displayPreview} htmlfile="preview-chart.html" position={previewDetails.position} size={previewDetails.size} ></Components.PreviewWindow>
<<<<<<< import Borderless from './components/buttons/borderless-button/BorderlessButton'; import ChartBorderless from './components/buttons/borderless-buttons/app-shortcuts/Chart'; import NewsBorderless from './components/buttons/borderless-buttons/app-shortcuts/News'; import CloseBorderless from './components/buttons/borderless-buttons/Close'; import ChartIcon from './components/glyphs/small/chart.svg'; import NewsIcon from './components/glyphs/small/news.svg'; import WatchListIcon from './components/glyphs/small/watchlist.svg'; import PriceUp from './components/glyphs/arrows/priceArrowUp.svg'; import PriceDown from './components/glyphs/arrows/priceArrowDown.svg'; ======= import PreviewWindow from './components/preview-window/PreviewWindow'; >>>>>>> import Borderless from './components/buttons/borderless-button/BorderlessButton'; import ChartBorderless from './components/buttons/borderless-buttons/app-shortcuts/Chart'; import NewsBorderless from './components/buttons/borderless-buttons/app-shortcuts/News'; import CloseBorderless from './components/buttons/borderless-buttons/Close'; import ChartIcon from './components/glyphs/small/chart.svg'; import NewsIcon from './components/glyphs/small/news.svg'; import WatchListIcon from './components/glyphs/small/watchlist.svg'; import PriceUp from './components/glyphs/arrows/priceArrowUp.svg'; import PriceDown from './components/glyphs/arrows/priceArrowDown.svg'; import PreviewWindow from './components/preview-window/PreviewWindow'; <<<<<<< Buttons: { Round, Close, Borderless }, Shortcuts: { Watchlist, Chart, News, ChartBorderless, NewsBorderless, CloseBorderless }, Icons: { Small: { Chart: ChartIcon, News: NewsIcon, Watchlist: WatchListIcon }, Arrows: { PriceUp, PriceDown } } ======= Buttons: { Round, Close }, Shortcuts: { Watchlist, Chart, News }, PreviewWindow >>>>>>> Buttons: { Round, Close, Borderless }, Shortcuts: { Watchlist, Chart, News, ChartBorderless, NewsBorderless, CloseBorderless }, Icons: { Small: { Chart: ChartIcon, News: NewsIcon, Watchlist: WatchListIcon }, Arrows: { PriceUp, PriceDown } }, PreviewWindow
<<<<<<< import ConfirmationWindow from './components/popups/ConfirmationWindow'; import PopupWindow from './components/popups/PopupWindow'; ======= import PreviewWindow from './components/preview-window/PreviewWindow'; >>>>>>> import ConfirmationWindow from './components/popups/ConfirmationWindow'; import PopupWindow from './components/popups/PopupWindow'; import PreviewWindow from './components/preview-window/PreviewWindow'; <<<<<<< Shortcuts: { Watchlist, Chart, News }, Popups: { PopupWindow, ConfirmationWindow } ======= Shortcuts: { Watchlist, Chart, News }, PreviewWindow >>>>>>> Shortcuts: { Watchlist, Chart, News }, Popups: { PopupWindow, ConfirmationWindow }, PreviewWindow
<<<<<<< <div className="launcher-container"> <div className="launcher-title"> <Components.Titlebar title={title} confirmClose={true} /> ======= <div className="launcher"> <div className="title"> <Titlebar dockedTo={edge} /> >>>>>>> <div className="launcher"> <div className="title"> <Components.Titlebar title={title} confirmClose={true} />
<<<<<<< el.connectedCallback(); expect(el.state).to.eql({foo: 'bar'}); ======= el.attachedCallback(); expect(el.state).to.eql({foo: 'bar', baz: 'qux'}); >>>>>>> el.connectedCallback(); expect(el.state).to.eql({foo: 'bar', baz: 'qux'}); <<<<<<< el.connectedCallback(); expect(el.state).to.eql({foo: 'bar'}); ======= el.attachedCallback(); expect(el.state).to.eql({foo: 'bar', baz: 'qux'}); >>>>>>> el.connectedCallback(); expect(el.state).to.eql({foo: 'bar', baz: 'qux'});
<<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize() <<<<<<< transform.normalize() ======= >>>>>>> transform.normalize()
<<<<<<< return new Inline(properties) ======= if (properties.nodes.size == 0) { properties.nodes = properties.nodes.push(Text.create()) } return new Inline(properties).normalize() >>>>>>> if (properties.nodes.size == 0) { properties.nodes = properties.nodes.push(Text.create()) } return new Inline(properties)
<<<<<<< return new Block(properties) ======= if (properties.nodes.size == 0) { properties.nodes = properties.nodes.push(Text.create()) } return new Block(properties).normalize() >>>>>>> if (properties.nodes.size == 0) { properties.nodes = properties.nodes.push(Text.create()) } return new Block(properties)
<<<<<<< * Normalize the state using the core schema. * TODO: calling this transform should be useless * * @param {Transform} transform * @return {Transform} */ export function normalize(transform) { return transform.normalizeWith(defaultSchema) /* let { state } = transform let { document, selection } = state let failure // Normalize all of the document's nodes. document.filterDescendantsDeep((node) => { if (failure = node.validate(SCHEMA)) { const { value, rule } = failure rule.normalize(transform, node, value) } }) // Normalize the document itself. if (failure = document.validate(SCHEMA)) { const { value, rule } = failure rule.normalize(transform, document, value) } // Normalize the selection. // TODO: turn this into schema rules. state = transform.state document = state.document let nextSelection = selection.normalize(document) if (!selection.equals(nextSelection)) transform.setSelection(selection) return transform */ } /** ======= >>>>>>> * Normalize the state using the core schema. * TODO: calling this transform should be useless * * @param {Transform} transform * @return {Transform} */ export function normalize(transform) { return transform.normalizeWith(defaultSchema) /* let { state } = transform let { document, selection } = state let failure // Normalize all of the document's nodes. document.filterDescendantsDeep((node) => { if (failure = node.validate(SCHEMA)) { const { value, rule } = failure rule.normalize(transform, node, value) } }) // Normalize the document itself. if (failure = document.validate(SCHEMA)) { const { value, rule } = failure rule.normalize(transform, document, value) } // Normalize the selection. // TODO: turn this into schema rules. state = transform.state document = state.document let nextSelection = selection.normalize(document) if (!selection.equals(nextSelection)) transform.setSelection(selection) return transform */ } /**
<<<<<<< AbstractChosen = (function() { function AbstractChosen(elmn) { ======= Chosen = (function() { function Chosen(form_field, options) { this.form_field = form_field; this.options = options != null ? options : {}; >>>>>>> AbstractChosen = (function() { function AbstractChosen(form_field, options) { this.form_field = form_field; this.options = options != null ? options : {}; <<<<<<< return this.choices = 0; }; AbstractChosen.prototype.mouse_enter = function() { return this.mouse_on_container = true; }; AbstractChosen.prototype.mouse_leave = function() { return this.mouse_on_container = false; }; AbstractChosen.prototype.input_focus = function(evt) { if (!this.active_field) { return setTimeout((__bind(function() { return this.container_mousedown(); }, this)), 50); } }; AbstractChosen.prototype.input_blur = function(evt) { if (!this.mouse_on_container) { this.active_field = false; return setTimeout((__bind(function() { return this.blur_test(); }, this)), 100); } }; AbstractChosen.prototype.result_add_option = function(option) { var classes; if (!option.disabled) { option.dom_id = this.container_id + "_o_" + option.array_index; classes = option.selected && this.is_multiple ? [] : ["active-result"]; if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); } return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '">' + option.html + '</li>'; } else { return ""; } }; AbstractChosen.prototype.results_update_field = function() { this.result_clear_highlight(); this.result_single_selected = null; return this.results_build(); }; AbstractChosen.prototype.results_toggle = function() { if (this.results_showing) { return this.results_hide(); } else { return this.results_show(); } }; AbstractChosen.prototype.results_search = function(evt) { if (this.results_showing) { return this.winnow_results(); } else { return this.results_show(); } }; AbstractChosen.prototype.keyup_checker = function(evt) { var stroke, _ref; stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; this.search_field_scale(); switch (stroke) { case 8: if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { return this.keydown_backstroke(); } else if (!this.pending_backstroke) { this.result_clear_highlight(); return this.results_search(); } break; case 13: evt.preventDefault(); if (this.results_showing) { return this.result_select(evt); } break; case 27: if (this.results_showing) { return this.results_hide(); } break; case 9: case 38: case 40: case 16: case 91: case 17: break; default: return this.results_search(); } }; AbstractChosen.prototype.generate_field_id = function() { var new_id; new_id = this.generate_random_id(); this.form_field.id = new_id; return new_id; }; AbstractChosen.prototype.generate_random_char = function() { var chars, newchar, rand; chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"; rand = Math.floor(Math.random() * chars.length); return newchar = chars.substring(rand, rand + 1); }; return AbstractChosen; })(); root.AbstractChosen = AbstractChosen; }).call(this); (function() { /* Chosen source: generate output using 'cake build' Copyright (c) 2011 by Harvest */ var Chosen, get_side_border_padding, root; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; root = this; Chosen = (function() { __extends(Chosen, AbstractChosen); function Chosen() { Chosen.__super__.constructor.apply(this, arguments); } Chosen.prototype.setup = function() { return this.is_rtl = this.form_field.hasClassName("chzn-rtl"); }; Chosen.prototype.finish_setup = function() { return this.form_field.addClassName("chzn-done"); }; Chosen.prototype.set_default_values = function() { Chosen.__super__.set_default_values.call(this); ======= this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false; this.disable_search_threshold = this.options.disable_search_threshold || 0; this.choices = 0; this.results_none_found = this.options.no_results_text || "No results match"; >>>>>>> this.allow_single_deselect = (this.options.allow_single_deselect != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false; this.disable_search_threshold = this.options.disable_search_threshold || 0; this.choices = 0; return this.results_none_found = this.options.no_results_text || "No results match"; }; AbstractChosen.prototype.mouse_enter = function() { return this.mouse_on_container = true; }; AbstractChosen.prototype.mouse_leave = function() { return this.mouse_on_container = false; }; AbstractChosen.prototype.input_focus = function(evt) { if (!this.active_field) { return setTimeout((__bind(function() { return this.container_mousedown(); }, this)), 50); } }; AbstractChosen.prototype.input_blur = function(evt) { if (!this.mouse_on_container) { this.active_field = false; return setTimeout((__bind(function() { return this.blur_test(); }, this)), 100); } }; AbstractChosen.prototype.result_add_option = function(option) { var classes, style; if (!option.disabled) { option.dom_id = this.container_id + "_o_" + option.array_index; classes = option.selected && this.is_multiple ? [] : ["active-result"]; if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); } if (option.classes !== "") { classes.push(option.classes); } style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>'; } else { return ""; } }; AbstractChosen.prototype.results_update_field = function() { this.result_clear_highlight(); this.result_single_selected = null; return this.results_build(); }; AbstractChosen.prototype.results_toggle = function() { if (this.results_showing) { return this.results_hide(); } else { return this.results_show(); } }; AbstractChosen.prototype.results_search = function(evt) { if (this.results_showing) { return this.winnow_results(); } else { return this.results_show(); } }; AbstractChosen.prototype.keyup_checker = function(evt) { var stroke, _ref; stroke = (_ref = evt.which) != null ? _ref : evt.keyCode; this.search_field_scale(); switch (stroke) { case 8: if (this.is_multiple && this.backstroke_length < 1 && this.choices > 0) { return this.keydown_backstroke(); } else if (!this.pending_backstroke) { this.result_clear_highlight(); return this.results_search(); } break; case 13: evt.preventDefault(); if (this.results_showing) { return this.result_select(evt); } break; case 27: if (this.results_showing) { return this.results_hide(); } break; case 9: case 38: case 40: case 16: case 91: case 17: break; default: return this.results_search(); } }; AbstractChosen.prototype.generate_field_id = function() { var new_id; new_id = this.generate_random_id(); this.form_field.id = new_id; return new_id; }; AbstractChosen.prototype.generate_random_char = function() { var chars, newchar, rand; chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ"; rand = Math.floor(Math.random() * chars.length); return newchar = chars.substring(rand, rand + 1); }; return AbstractChosen; })(); root.AbstractChosen = AbstractChosen; }).call(this); (function() { /* Chosen source: generate output using 'cake build' Copyright (c) 2011 by Harvest */ var Chosen, get_side_border_padding, root; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; root = this; Chosen = (function() { __extends(Chosen, AbstractChosen); function Chosen() { Chosen.__super__.constructor.apply(this, arguments); } Chosen.prototype.setup = function() { return this.is_rtl = this.form_field.hasClassName("chzn-rtl"); }; Chosen.prototype.finish_setup = function() { return this.form_field.addClassName("chzn-done"); }; Chosen.prototype.set_default_values = function() { Chosen.__super__.set_default_values.call(this); <<<<<<< ======= Chosen.prototype.result_add_option = function(option) { var classes, style; if (!option.disabled) { option.dom_id = this.container_id + "_o_" + option.array_index; classes = option.selected && this.is_multiple ? [] : ["active-result"]; if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); } if (option.classes !== "") { classes.push(option.classes); } style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>'; } else { return ""; } }; Chosen.prototype.results_update_field = function() { this.result_clear_highlight(); this.result_single_selected = null; return this.results_build(); }; >>>>>>> <<<<<<< ======= }).call(this); (function() { var SelectParser; SelectParser = (function() { function SelectParser() { this.options_index = 0; this.parsed = []; } SelectParser.prototype.add_node = function(child) { if (child.nodeName === "OPTGROUP") { return this.add_group(child); } else { return this.add_option(child); } }; SelectParser.prototype.add_group = function(group) { var group_position, option, _i, _len, _ref, _results; group_position = this.parsed.length; this.parsed.push({ array_index: group_position, group: true, label: group.label, children: 0, disabled: group.disabled }); _ref = group.childNodes; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { option = _ref[_i]; _results.push(this.add_option(option, group_position, group.disabled)); } return _results; }; SelectParser.prototype.add_option = function(option, group_position, group_disabled) { if (option.nodeName === "OPTION") { if (option.text !== "") { if (group_position != null) { this.parsed[group_position].children += 1; } this.parsed.push({ array_index: this.parsed.length, options_index: this.options_index, value: option.value, text: option.text, html: option.innerHTML, selected: option.selected, disabled: group_disabled === true ? group_disabled : option.disabled, group_array_index: group_position, classes: option.className, style: option.style.cssText }); } else { this.parsed.push({ array_index: this.parsed.length, options_index: this.options_index, empty: true }); } return this.options_index += 1; } }; return SelectParser; })(); SelectParser.select_to_array = function(select) { var child, parser, _i, _len, _ref; parser = new SelectParser(); _ref = select.childNodes; for (_i = 0, _len = _ref.length; _i < _len; _i++) { child = _ref[_i]; parser.add_node(child); } return parser.parsed; }; this.SelectParser = SelectParser; >>>>>>>
<<<<<<< // TODO: Play around with react spring and create animation. It's currently located in the TrelloCard file. ======= >>>>>>>
<<<<<<< var base_template, container_classes, container_props; ======= var base_template, container_props, dd_top, dd_width, sf_width, _this = this; >>>>>>> var base_template, container_classes, container_props, _this = this;
<<<<<<< var base_template, container_classes, container_props; ======= var base_template, container_classes, container_props, dd_top, dd_width, sf_width; >>>>>>> var base_template, container_classes, container_props; <<<<<<< var _this = this; ======= var scrollCallback, _this = this; >>>>>>> var scrollCallback, _this = this; <<<<<<< ======= var target_closelink; >>>>>>> <<<<<<< ======= var dd_top; >>>>>>> <<<<<<< this.current_selectedIndex = this.form_field.selectedIndex; ======= this.current_value = this.form_field.value; >>>>>>> this.current_selectedIndex = this.form_field.selectedIndex; <<<<<<< var div, h, style, style_block, styles, w, _i, _len; ======= var dd_top, div, h, style, style_block, styles, w, _i, _len; >>>>>>> var div, h, style, style_block, styles, w, _i, _len;
<<<<<<< if (this.result_single_selected != null) { this.result_do_highlight(this.result_single_selected); } else if (this.is_multiple && this.max_selected_options <= this.choices) { ======= var dd_top; if (!this.is_multiple) { this.selected_item.addClassName('chzn-single-with-drop'); if (this.result_single_selected) { this.result_do_highlight(this.result_single_selected); } } else if (this.max_selected_options <= this.choices()) { >>>>>>> if (this.result_single_selected != null) { this.result_do_highlight(this.result_single_selected); } else if (this.is_multiple && this.max_selected_options <= this.choices()) {
<<<<<<< var Chosen, root, ======= var Chosen, get_side_border_padding, root, _ref, >>>>>>> var Chosen, root, _ref, <<<<<<< var container_classes, container_props; ======= var base_template, container_classes, container_props, dd_top, dd_width, sf_width; >>>>>>> var container_classes, container_props; <<<<<<< ======= var target_closelink; >>>>>>> <<<<<<< if (this.result_single_selected != null) { this.result_do_highlight(this.result_single_selected); } else if (this.is_multiple && this.max_selected_options <= this.choices) { ======= var dd_top; if (!this.is_multiple) { this.selected_item.addClassName('chzn-single-with-drop'); if (this.result_single_selected) { this.result_do_highlight(this.result_single_selected); } } else if (this.max_selected_options <= this.choices) { >>>>>>> if (this.result_single_selected != null) { this.result_do_highlight(this.result_single_selected); } else if (this.is_multiple && this.max_selected_options <= this.choices) { <<<<<<< this.current_selectedIndex = this.form_field.selectedIndex; ======= this.current_value = this.form_field.value; >>>>>>> this.current_selectedIndex = this.form_field.selectedIndex; <<<<<<< var div, h, style, style_block, styles, w, _i, _len; ======= var dd_top, div, h, style, style_block, styles, w, _i, _len; >>>>>>> var div, h, style, style_block, styles, w, _i, _len; <<<<<<< ======= if (Prototype.Browser.IE) { if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { Prototype.BrowserFeatures['Version'] = new Number(RegExp.$1); } } get_side_border_padding = function(elmt) { var layout, side_border_padding; layout = new Element.Layout(elmt); return side_border_padding = layout.get("border-left") + layout.get("border-right") + layout.get("padding-left") + layout.get("padding-right"); }; root.get_side_border_padding = get_side_border_padding; >>>>>>>
<<<<<<< option.dom_id = this.container_id + "_o_" + option.array_index; classes = []; if (!option.disabled && !(option.selected && this.is_multiple)) { classes.push("active-result"); } if (option.disabled && !(option.selected && this.is_multiple)) { classes.push("disabled-result"); } if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); ======= if (!option.disabled) { option.dom_id = this.container_id + "_o_" + option.array_index; classes = option.selected && this.is_multiple ? [] : ["active-result"]; if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); } if (option.classes !== "") { classes.push(option.classes); } style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : ""; return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '"' + style + '>' + option.html + '</li>'; } else { return ""; >>>>>>> option.dom_id = this.container_id + "_o_" + option.array_index; classes = []; if (!option.disabled && !(option.selected && this.is_multiple)) { classes.push("active-result"); } if (option.disabled && !(option.selected && this.is_multiple)) { classes.push("disabled-result"); } if (option.selected) { classes.push("result-selected"); } if (option.group_array_index != null) { classes.push("group-option"); <<<<<<< if (this.form_field_label == null) { this.form_field_label = $$("label[for=" + this.form_field.id + "]").first(); ======= if (this.form_field_label == null) { this.form_field_label = $$("label[for='" + this.form_field.id + "']").first(); >>>>>>> if (this.form_field_label == null) { this.form_field_label = $$("label[for='" + this.form_field.id + "']").first(); <<<<<<< _ref1 = this.results_data; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { option = _ref1[_i]; if (!option.empty) { ======= _ref1 = this.results_data; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { option = _ref1[_i]; if (!option.disabled && !option.empty) { >>>>>>> _ref1 = this.results_data; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { option = _ref1[_i]; if (!option.empty) { <<<<<<< ======= Chosen.prototype.winnow_results_clear = function() { var li, lis, _i, _len, _results; this.search_field.clear(); lis = this.search_results.select("li"); _results = []; for (_i = 0, _len = lis.length; _i < _len; _i++) { li = lis[_i]; if (li.hasClassName("group-result")) { _results.push(li.show()); } else if (!this.is_multiple || !li.hasClassName("result-selected")) { _results.push(this.result_activate(li)); } else { _results.push(void 0); } } return _results; }; >>>>>>> <<<<<<< var nexts, sibs; if (this.results_showing && this.result_highlight) { sibs = this.result_highlight.nextSiblings(); nexts = sibs.intersect(actives); if (nexts.length) { return this.result_do_highlight(nexts.first()); ======= var actives, nexts, sibs; actives = this.search_results.select("li.active-result"); if (actives.length) { if (!this.result_highlight) { this.result_do_highlight(actives.first()); } else if (this.results_showing) { sibs = this.result_highlight.nextSiblings(); nexts = sibs.intersect(actives); if (nexts.length) { this.result_do_highlight(nexts.first()); } } if (!this.results_showing) { return this.results_show(); >>>>>>> var nexts, sibs; if (this.results_showing && this.result_highlight) { sibs = this.result_highlight.nextSiblings(); nexts = sibs.intersect(actives); if (nexts.length) { return this.result_do_highlight(nexts.first());
<<<<<<< ======= out += "Raw JSON:\n"; out += this.toString(); >>>>>>>
<<<<<<< this.streamingCount = 0; this.deviceList = new Array(); ======= this._pluginPipelineSteps = {}; this._pluginExtendedMethods = {}; if (opts.useAllPlugins) this.useRegisteredPlugins(); >>>>>>> this.streamingCount = 0; this.deviceList = new Array(); this._pluginPipelineSteps = {}; this._pluginExtendedMethods = {}; if (opts.useAllPlugins) this.useRegisteredPlugins();
<<<<<<< enableHeartbeat: true, heartbeatInterval: 100, requestProtocolVersion: 5 ======= background: false, requestProtocolVersion: 4 >>>>>>> background: false, requestProtocolVersion: 5 <<<<<<< },{"./protocol":13,"events":18,"underscore":21}],2:[function(require,module,exports){ var CircularBuffer = module.exports = function(size) { this.pos = 0; this._buf = []; this.size = size; } CircularBuffer.prototype.get = function(i) { if (i == undefined) i = 0; if (i >= this.size) return undefined; if (i >= this._buf.length) return undefined; return this._buf[(this.pos - i - 1) % this.size]; } ======= },{"../protocol":13,"events":17,"underscore":20}],3:[function(require,module,exports){ var BaseConnection = module.exports = require('./base') , _ = require('underscore'); >>>>>>> },{"../protocol":14,"events":18,"underscore":21}],3:[function(require,module,exports){ var BaseConnection = module.exports = require('./base') , _ = require('underscore'); <<<<<<< var focusBlurHandler = function(e) { windowVisible = e.type === 'focus'; }; window.addEventListener('focus', focusBlurHandler); window.addEventListener('blur', focusBlurHandler); ======= var blurListener = window.addEventListener('blur', function(e) { connection.windowVisible = false; updateFocusState(); }); >>>>>>> var blurListener = window.addEventListener('blur', function(e) { connection.windowVisible = false; updateFocusState(); }); <<<<<<< if (connection.heartbeatTimer) { clearTimeout(connection.heartbeatTimer); delete connection.heartbeatTimer; } window.removeEventListener('focus', focusBlurHandler); window.removeEventListener('blur', focusBlurHandler); ======= window.removeEventListener('focus', focusListener); window.removeEventListener('blur', blurListener); >>>>>>> window.removeEventListener('focus', focusListener); window.removeEventListener('blur', blurListener); <<<<<<< },{"./circular_buffer":2,"./connection":3,"./frame":6,"./gesture":7,"./node_connection":17,"./pipeline":11,"__browserify_process":19,"events":18,"underscore":21}],5:[function(require,module,exports){ var Pointable = require('./pointable') , _ = require('underscore'); var Finger = module.exports = function(data) { Pointable.call(this, data); // use pointable as super-constructor this.dipPosition = data.dipPosition; this.pipPosition = data.pipPosition; this.mcpPosition = data.mcpPosition; this.extended = data.extended; this.type = data.type; this.finger = true; this.positions = [this.mcpPosition, this.pipPosition, this.dipPosition, this.tipPosition]; }; _.extend(Finger.prototype, Pointable.prototype); Finger.prototype.toString = function() { if(this.tool == true){ return "Finger [ id:" + this.id + " " + this.length + "mmx | with:" + this.width + "mm | direction:" + this.direction + ' ]'; } else { return "Finger [ id:" + this.id + " " + this.length + "mmx | direction: " + this.direction + ' ]'; } }; Finger.Invalid = { valid: false }; },{"./pointable":12,"underscore":21}],6:[function(require,module,exports){ ======= },{"./circular_buffer":1,"./connection/browser":3,"./connection/node":4,"./frame":6,"./gesture":7,"./pipeline":11,"__browserify_process":18,"events":17,"underscore":20}],6:[function(require,module,exports){ >>>>>>> },{"./circular_buffer":1,"./connection/browser":3,"./connection/node":4,"./frame":7,"./gesture":8,"./pipeline":12,"__browserify_process":19,"events":18,"underscore":21}],6:[function(require,module,exports){ var Pointable = require('./pointable') , _ = require('underscore'); var Finger = module.exports = function(data) { Pointable.call(this, data); // use pointable as super-constructor this.dipPosition = data.dipPosition; this.pipPosition = data.pipPosition; this.mcpPosition = data.mcpPosition; this.extended = data.extended; this.type = data.type; this.finger = true; this.positions = [this.mcpPosition, this.pipPosition, this.dipPosition, this.tipPosition]; }; _.extend(Finger.prototype, Pointable.prototype); Finger.prototype.toString = function() { if(this.tool == true){ return "Finger [ id:" + this.id + " " + this.length + "mmx | with:" + this.width + "mm | direction:" + this.direction + ' ]'; } else { return "Finger [ id:" + this.id + " " + this.length + "mmx | direction: " + this.direction + ' ]'; } }; Finger.Invalid = { valid: false }; },{"./pointable":13,"underscore":21}],7:[function(require,module,exports){ <<<<<<< },{"./gesture":7,"./hand":8,"./interaction_box":10,"./pointable":12,"gl-matrix":20,"underscore":21}],7:[function(require,module,exports){ ======= },{"./gesture":7,"./hand":8,"./interaction_box":10,"./pointable":12,"gl-matrix":19,"underscore":20}],7:[function(require,module,exports){ >>>>>>> },{"./gesture":8,"./hand":9,"./interaction_box":11,"./pointable":13,"gl-matrix":20,"underscore":21}],8:[function(require,module,exports){ <<<<<<< },{"events":18,"gl-matrix":20,"underscore":21}],8:[function(require,module,exports){ ======= },{"events":17,"gl-matrix":19,"underscore":20}],8:[function(require,module,exports){ >>>>>>> },{"events":18,"gl-matrix":20,"underscore":21}],9:[function(require,module,exports){ <<<<<<< },{"./pointable":12,"gl-matrix":20,"underscore":21}],9:[function(require,module,exports){ ======= },{"./pointable":12,"gl-matrix":19,"underscore":20}],9:[function(require,module,exports){ >>>>>>> },{"./pointable":13,"gl-matrix":20,"underscore":21}],10:[function(require,module,exports){ <<<<<<< },{"./circular_buffer":2,"./connection":3,"./controller":4,"./frame":6,"./gesture":7,"./hand":8,"./interaction_box":10,"./pointable":12,"./protocol":13,"./ui":14,"gl-matrix":20}],10:[function(require,module,exports){ ======= },{"./circular_buffer":1,"./controller":5,"./frame":6,"./gesture":7,"./hand":8,"./interaction_box":10,"./pointable":12,"./ui":14,"gl-matrix":19}],10:[function(require,module,exports){ >>>>>>> },{"./circular_buffer":1,"./controller":5,"./frame":7,"./gesture":8,"./hand":9,"./interaction_box":11,"./pointable":13,"./protocol":14,"./ui":15,"gl-matrix":20}],11:[function(require,module,exports){ <<<<<<< },{"gl-matrix":20}],11:[function(require,module,exports){ ======= },{"gl-matrix":19}],11:[function(require,module,exports){ >>>>>>> },{"gl-matrix":20}],12:[function(require,module,exports){ <<<<<<< },{"gl-matrix":20}],13:[function(require,module,exports){ ======= },{"gl-matrix":19}],13:[function(require,module,exports){ >>>>>>> },{"gl-matrix":20}],14:[function(require,module,exports){ <<<<<<< },{"./finger":5,"./frame":6,"./hand":8,"./pointable":12}],14:[function(require,module,exports){ ======= },{"./frame":6}],14:[function(require,module,exports){ >>>>>>> },{"./finger":6,"./frame":7,"./hand":9,"./pointable":13}],15:[function(require,module,exports){ <<<<<<< },{"events":18,"underscore":21}],17:[function(require,module,exports){ },{}],18:[function(require,module,exports){ ======= },{"events":17,"underscore":20}],17:[function(require,module,exports){ >>>>>>> },{"events":18,"underscore":21}],18:[function(require,module,exports){ <<<<<<< },{}],22:[function(require,module,exports){ ======= },{}],21:[function(require,module,exports){ (function(global){/// shim for browser packaging module.exports = function() { return global.WebSocket || global.MozWebSocket; } })(self) },{}],22:[function(require,module,exports){ >>>>>>> },{}],22:[function(require,module,exports){ (function(global){/// shim for browser packaging module.exports = function() { return global.WebSocket || global.MozWebSocket; } })(self) },{}],23:[function(require,module,exports){
<<<<<<< Controller.prototype.streaming = function() { return this.streamingCount > 0; } ======= Controller.prototype.connected = function() { return !!this.connection.connected; } >>>>>>> Controller.prototype.streaming = function() { return this.streamingCount > 0; } Controller.prototype.connected = function() { return !!this.connection.connected; }
<<<<<<< sessionCookieName : 'nanotraderSession', // Name of the Cookie that will store the session info in the browser urlRoot : '/spring-nanotrader-services/api/', // Path to the API service tplRoot : './templates/', // Path to the Templates directory accountIdUrlKey : '{accountid}', // Key in the api urls that's gonna be replaced with the actual accountid pageUrlKey : '{page}', // Key in the api urls that's gonna be replaced with the actual accountid quoteUrlKey : '{quote}', // Key in the api urls that's gonna be replaced with the actual accountid marketSummaryUpdateMillisecs : 15000, // Interval of milliseconds in which the Market Summary section updates currency : '$', // Current currency is dollars ======= device : 'computer', // Device rendering the application (changes to "mobile" depending on the user agent) sessionCookieName : 'nanotraderSession', // Name of the Cookie that will store the session info in the browser urlRoot : '/spring-nanotrader-services/api/', // Path to the API service tplRoot : './templates/', // Path to the Templates directory accountIdUrlKey : '{accountid}', // Key in the api urls that's gonna be replaced with the actual accountid pageUrlKey : '{page}', // Key in the api urls that's gonna be replaced with the actual accountid marketSummaryUpdateMillisecs : 15000, // Interval of milliseconds in which the Market Summary section updates currency : '$', // Current currency is dollars >>>>>>> device : 'computer', // Device rendering the application (changes to "mobile" depending on the user agent) sessionCookieName : 'nanotraderSession', // Name of the Cookie that will store the session info in the browser urlRoot : '/spring-nanotrader-services/api/', // Path to the API service tplRoot : './templates/', // Path to the Templates directory accountIdUrlKey : '{accountid}', // Key in the api urls that's gonna be replaced with the actual accountid pageUrlKey : '{page}', // Key in the api urls that's gonna be replaced with the actual accountid quoteUrlKey : '{quote}', // Key in the api urls that's gonna be replaced with the actual accountid marketSummaryUpdateMillisecs : 15000, // Interval of milliseconds in which the Market Summary section updates currency : '$', // Current currency is dollars
<<<<<<< enterNumUsers : "Please enter number of accounts you want to create", showWipeDBWarning : "Warning: This action is not recoverable. It will wipe your database.", showIntegerError : "Please enter a valid number", admin : "Admin", createUsers : "Create Users", dataPop : "Populating data ...", dataPopComplete : "Data population complete ...", loggingOut : "Logging out... Please log back in with new user id" ======= loginPage : 'Login Page', enterNumUsers : 'Please enter number of accounts you want to create', showWipeDBWarning : 'Warning: This action is not recoverable. It will wipe your database.', showIntegerError : 'Please enter a valid number', admin : 'Admin', createUsers : 'Create Users', error : 'Error!', goToLoginPage : 'Go To Login Page', recentTransactions : 'Recent Transactions' >>>>>>> loginPage : 'Login Page', enterNumUsers : 'Please enter number of accounts you want to create', showWipeDBWarning : 'Warning: This action is not recoverable. It will wipe your database.', showIntegerError : 'Please enter a valid number', admin : 'Admin', createUsers : 'Create Users', dataPop : "Populating data ...", dataPopComplete : "Data population complete ...", loggingOut : "Logging out... Please log back in with new user id" error : 'Error!', goToLoginPage : 'Go To Login Page', recentTransactions : 'Recent Transactions'
<<<<<<< files.sort(); ======= if (filter) files = files.filter(filter); >>>>>>> if (filter) files = files.filter(filter); files.sort();
<<<<<<< var http = require('http'); var escapehtml = require('escape-html'); var debug = require('debug')('connect:dispatcher'); var parseUrl = require('parseurl'); ======= var escapeHtml = require('escape-html'); var http = require('http') , parseurl = require('parseurl') , debug = require('debug')('connect:dispatcher'); >>>>>>> var escapeHtml = require('escape-html'); var http = require('http'); var debug = require('debug')('connect:dispatcher'); var parseUrl = require('parseurl'); <<<<<<< msg = escapehtml(msg).replace(/\n/g, '<br>').replace(/ /g, ' &nbsp;'); ======= msg = escapeHtml(msg); >>>>>>> msg = escapeHtml(msg).replace(/\n/g, '<br>').replace(/ /g, ' &nbsp;'); <<<<<<< res.end('Cannot ' + escapehtml(req.method) + ' ' + escapehtml(req.originalUrl) + '\n'); ======= res.end('Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl) + '\n'); >>>>>>> res.end('Cannot ' + escapeHtml(req.method) + ' ' + escapeHtml(req.originalUrl) + '\n');
<<<<<<< this.context.get(this.apiPath, this.ramlHandler(this.settings.ramlFile)); } if (this.settings.exceptionHandler) { return this.context.use(this.exceptionHandler(this.settings.exceptionHandler)); ======= this.context.get(this.apiPath, this.ramlHandler(this.settings.ramlFile)); return logger.info('API console has been initialized successfully'); >>>>>>> this.context.get(this.apiPath, this.ramlHandler(this.settings.ramlFile)); logger.info('API console has been initialized successfully'); } if (this.settings.exceptionHandler) { return this.context.use(this.exceptionHandler(this.settings.exceptionHandler)); <<<<<<< Osprey.prototype.exceptionHandler = function(settings) { return function(err, req, res, next) { var errorHandler; errorHandler = settings[err.constructor.name]; if (errorHandler != null) { return errorHandler(err, req, res); } else { return next(); } }; }; Osprey.prototype.validations = function() { ======= Osprey.prototype.validations = function(uriTemplateReader, resources) { >>>>>>> Osprey.prototype.exceptionHandler = function(settings) { return function(err, req, res, next) { var errorHandler; errorHandler = settings[err.constructor.name]; if (errorHandler != null) { return errorHandler(err, req, res); } else { return next(); } }; }; Osprey.prototype.validations = function(uriTemplateReader, resources) {
<<<<<<< if (!isValid && (methodInfo.responses[statusCode].body != null)) { throw new InvalidAcceptTypeError; ======= if (!isValid && (((_ref3 = methodInfo.responses) != null ? (_ref4 = _ref3[statusCode]) != null ? _ref4.body : void 0 : void 0) != null)) { res.send(406); >>>>>>> if (!isValid && (((_ref3 = methodInfo.responses) != null ? (_ref4 = _ref3[statusCode]) != null ? _ref4.body : void 0 : void 0) != null)) { throw new InvalidAcceptTypeError;
<<<<<<< // @version 1.0.2 ======= // @version 1.0.3 DEV >>>>>>> // @version 1.0.3 <<<<<<< // @require https://cdn.rawgit.com/camagu/jquery-feeds/master/jquery.feeds.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.enhanced_editor.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.helpers.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.features.js // @resource settingsDialog https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.dialog.html // @resource featuresJSON https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.features.info.json ======= // @require https://cdn.rawgit.com/camagu/jquery-feeds/master/jquery.feeds.js // @require https://rawgit.com/soscripted/sox/dev/sox.helpers.js?v=1.0.3a // @require https://rawgit.com/soscripted/sox/dev/sox.enhanced_editor.js?v=1.0.3a // @require https://rawgit.com/soscripted/sox/dev/sox.features.js?v=1.0.3j // @require https://api.stackexchange.com/js/2.0/all.js // @resource settingsDialog https://rawgit.com/soscripted/sox/dev/sox.dialog.html?v=1.0.3e // @resource featuresJSON https://rawgit.com/soscripted/sox/dev/sox.features.info.json?v=1.0.3e >>>>>>> // @require https://cdn.rawgit.com/camagu/jquery-feeds/master/jquery.feeds.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.3/sox.helpers.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.3/sox.enhanced_editor.js // @require https://cdn.rawgit.com/soscripted/sox/v1.0.3/sox.features.js // @require https://api.stackexchange.com/js/2.0/all.js // @resource settingsDialog https://cdn.rawgit.com/soscripted/sox/v1.0.3/sox.dialog.html // @resource featuresJSON https://cdn.rawgit.com/soscripted/sox/v1.0.3/sox.features.info.json <<<<<<< var $settingsDialog = $(GM_getResourceText('settingsDialog')), featuresJSON = JSON.parse(GM_getResourceText('featuresJSON')), $soxSettingsDialog, $soxSettingsDialogFeatures, $soxSettingsSave, $soxSettingsReset, $soxSettingsToggle, $soxSettingsClose; function isAvailable() { return GM_getValue(SOX_SETTINGS, -1) != -1; } function getSettings() { return JSON.parse(GM_getValue(SOX_SETTINGS)); } function reset() { GM_deleteValue(SOX_SETTINGS); } function save(options) { GM_setValue(SOX_SETTINGS, JSON.stringify(options)); console.log('SOX settings saved: ' + JSON.stringify(options)); } function isDeprecated() { //checks whether the saved settings contain a deprecated feature var settings = getSettings(), deprecatedFeatures = [ 'answerCountSidebar', 'highlightClosedQuestions', 'unHideAnswer', 'flaggingPercentages' ]; return (new RegExp('(' + deprecatedFeatures.join('|') + ')')).test(settings); } function addFeature(category, feature, desc) { var $div = $('<div/>'), $label = $('<label/>'), $input = $('<input/>', { id: feature, type: 'checkbox', style: 'margin-right: 5px;' }); $div.append($label); $label.append($input); $input.after(desc); $soxSettingsDialogFeatures.find('#' + category).append($div); } function addCategory(name) { var $div = $('<div/>', { id: name, 'class': 'feature-header' }), $h3 = $('<h3/>', { text: name }); $div.append($h3); $soxSettingsDialogFeatures.append($div); } //initialize sox (function () { // add sox CSS file and font-awesome CSS file $('head').append('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">') .append('<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/soscripted/sox/v1.0.2/sox.css" />'); $('body').append($settingsDialog); $soxSettingsDialog = $('#sox-settings-dialog'); $soxSettingsDialogFeatures = $soxSettingsDialog.find('#sox-settings-dialog-features'); $soxSettingsSave = $soxSettingsDialog.find('#sox-settings-dialog-save'); $soxSettingsReset = $soxSettingsDialog.find('#sox-settings-dialog-reset'); $soxSettingsToggle = $soxSettingsDialog.find('#sox-settings-dialog-check-toggle'); $soxSettingsClose = $soxSettingsDialog.find('#sox-settings-dialog-close'); for (var category in featuresJSON) { //load all the features in the settings dialog addCategory(category); for (var feature in featuresJSON[category]) { addFeature(category, feature, featuresJSON[category][feature].desc); ======= // auto-inject version number and environment information into GitHub issues // setInterval, because on GitHub, when you change page, the URL changes but the page itself is actually the same. So this will check every 2 seconds for whether the issue texatarea exists if (location.hostname.indexOf('github.com') > -1) { setInterval(function() { if ($('#issue_body').length) { var $issue = $('#issue_body'), issueText = $issue.text(); issueText = issueText.replace('1.X.X', SOX_VERSION); //inject the SOX version by replacing the issue template's placeholder '1.X.X' issueText = issueText.replace('Chrome/Tampermonkey', SOX_MANAGER); //inject the SOX userscript manager+platfirm by replacing the issue template's placeholder 'Chrome/Tampermonkey' $issue.text(issueText); >>>>>>> // auto-inject version number and environment information into GitHub issues // setInterval, because on GitHub, when you change page, the URL changes but the page itself is actually the same. So this will check every 2 seconds for whether the issue texatarea exists if (location.hostname.indexOf('github.com') > -1) { setInterval(function() { if ($('#issue_body').length) { var $issue = $('#issue_body'), issueText = $issue.text(); issueText = issueText.replace('1.X.X', SOX_VERSION); //inject the SOX version by replacing the issue template's placeholder '1.X.X' issueText = issueText.replace('Chrome/Tampermonkey', SOX_MANAGER); //inject the SOX userscript manager+platfirm by replacing the issue template's placeholder 'Chrome/Tampermonkey' $issue.text(issueText);
<<<<<<< document.body.onload = function() { XSS.load(); setTimeout(XSS.fontLoad, 500); ======= window.onload = function() { setTimeout(XSS.main, 250); >>>>>>> document.body.onload = function() { XSS.load(); setTimeout(XSS.fontLoad, 250);
<<<<<<< exports['eachSeries'] = function(test){ ======= exports['forEachOf'] = function(test){ var args = []; async.forEachOf({ a: 1, b: 2 }, forEachOfIterator.bind(this, args), function(err){ test.same(args, ["a", 1, "b", 2]); test.done(); }); }; exports['forEachOf empty object'] = function(test){ test.expect(1); async.forEachOf({}, function(value, key, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err) { test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOf error'] = function(test){ test.expect(1); async.forEachOf({ a: 1, b: 2 }, function(value, key, callback) { callback('error'); }, function(err){ test.equals(err, 'error'); }); setTimeout(test.done, 50); }; exports['forEachOf no callback'] = function(test){ async.forEachOf({ a: 1 }, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOf with array'] = function(test){ var args = []; async.forEachOf([ "a", "b" ], forEachOfIterator.bind(this, args), function(err){ test.same(args, [0, "a", 1, "b"]); test.done(); }); }; exports['forEachSeries'] = function(test){ >>>>>>> exports['forEachOf'] = function(test){ var args = []; async.forEachOf({ a: 1, b: 2 }, forEachOfIterator.bind(this, args), function(err){ test.same(args, ["a", 1, "b", 2]); test.done(); }); }; exports['forEachOf empty object'] = function(test){ test.expect(1); async.forEachOf({}, function(value, key, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err) { test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOf error'] = function(test){ test.expect(1); async.forEachOf({ a: 1, b: 2 }, function(value, key, callback) { callback('error'); }, function(err){ test.equals(err, 'error'); }); setTimeout(test.done, 50); }; exports['forEachOf no callback'] = function(test){ async.forEachOf({ a: 1 }, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOf with array'] = function(test){ var args = []; async.forEachOf([ "a", "b" ], forEachOfIterator.bind(this, args), function(err){ test.same(args, [0, "a", 1, "b"]); test.done(); }); }; exports['eachSeries'] = function(test){ <<<<<<< exports['eachLimit'] = function(test){ ======= exports['forEachOfSeries'] = function(test){ var args = []; async.forEachOfSeries({ a: 1, b: 2 }, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2 ]); test.done(); }); }; exports['forEachOfSeries empty object'] = function(test){ test.expect(1); async.forEachOfSeries({}, function(x, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfSeries error'] = function(test){ test.expect(2); var call_order = []; async.forEachOfSeries({ a: 1, b: 2 }, function(value, key, callback){ call_order.push(value, key); callback('error'); }, function(err){ test.same(call_order, [ 1, "a" ]); test.equals(err, 'error'); }); setTimeout(test.done, 50); }; exports['forEachOfSeries no callback'] = function(test){ async.forEachOfSeries({ a: 1 }, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOfSeries with array'] = function(test){ var args = []; async.forEachOfSeries([ "a", "b" ], forEachOfIterator.bind(this, args), function(err){ test.same(args, [ 0, "a", 1, "b" ]); test.done(); }); }; exports['forEachLimit'] = function(test){ >>>>>>> exports['forEachOfSeries'] = function(test){ var args = []; async.forEachOfSeries({ a: 1, b: 2 }, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2 ]); test.done(); }); }; exports['forEachOfSeries empty object'] = function(test){ test.expect(1); async.forEachOfSeries({}, function(x, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfSeries error'] = function(test){ test.expect(2); var call_order = []; async.forEachOfSeries({ a: 1, b: 2 }, function(value, key, callback){ call_order.push(value, key); callback('error'); }, function(err){ test.same(call_order, [ 1, "a" ]); test.equals(err, 'error'); }); setTimeout(test.done, 50); }; exports['forEachOfSeries no callback'] = function(test){ async.forEachOfSeries({ a: 1 }, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOfSeries with array'] = function(test){ var args = []; async.forEachOfSeries([ "a", "b" ], forEachOfIterator.bind(this, args), function(err){ test.same(args, [ 0, "a", 1, "b" ]); test.done(); }); }; exports['eachLimit'] = function(test){ <<<<<<< exports['forEachLimit alias'] = function (test) { test.strictEqual(async.eachLimit, async.forEachLimit); test.done(); }; ======= exports['forEachOfLimit'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4 }; async.forEachOfLimit(obj, 2, function(value, key, callback){ setTimeout(function(){ args.push(value, key); callback(); }, value * 5); }, function(err){ test.same(args, [ 1, "a", 2, "b", 3, "c", 4, "d" ]); test.done(); }); }; exports['forEachOfLimit empty object'] = function(test){ test.expect(1); async.forEachOfLimit({}, 2, function(value, key, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit limit exceeds size'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; async.forEachOfLimit(obj, 10, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2, "c", 3, "d", 4, "e", 5 ]); test.done(); }); }; exports['forEachOfLimit limit equal size'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; async.forEachOfLimit(obj, 5, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2, "c", 3, "d", 4, "e", 5 ]); test.done(); }); }; exports['forEachOfLimit zero limit'] = function(test){ test.expect(1); async.forEachOfLimit({ a: 1, b: 2 }, 0, function(x, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit error'] = function(test){ test.expect(2); var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; var call_order = []; async.forEachOfLimit(obj, 3, function(value, key, callback){ call_order.push(value, key); if (value === 2) { callback('error'); } }, function(err){ test.same(call_order, [ 1, "a", 2, "b" ]); test.equals(err, 'error'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit no callback'] = function(test){ async.forEachOfLimit({ a: 1 }, 1, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOfLimit synchronous'] = function(test){ var args = []; var obj = { a: 1, b: 2 }; async.forEachOfLimit(obj, 5, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2 ]); test.done(); }); }; exports['forEachOfLimit with array'] = function(test){ var args = []; var arr = [ "a", "b" ] async.forEachOfLimit(arr, 1, forEachOfIterator.bind(this, args), function (err) { test.same(args, [ 0, "a", 1, "b" ]); test.done(); }); }; >>>>>>> exports['forEachLimit alias'] = function (test) { test.strictEqual(async.eachLimit, async.forEachLimit); test.done(); }; exports['forEachOfLimit'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4 }; async.forEachOfLimit(obj, 2, function(value, key, callback){ setTimeout(function(){ args.push(value, key); callback(); }, value * 5); }, function(err){ test.same(args, [ 1, "a", 2, "b", 3, "c", 4, "d" ]); test.done(); }); }; exports['forEachOfLimit empty object'] = function(test){ test.expect(1); async.forEachOfLimit({}, 2, function(value, key, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit limit exceeds size'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; async.forEachOfLimit(obj, 10, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2, "c", 3, "d", 4, "e", 5 ]); test.done(); }); }; exports['forEachOfLimit limit equal size'] = function(test){ var args = []; var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; async.forEachOfLimit(obj, 5, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2, "c", 3, "d", 4, "e", 5 ]); test.done(); }); }; exports['forEachOfLimit zero limit'] = function(test){ test.expect(1); async.forEachOfLimit({ a: 1, b: 2 }, 0, function(x, callback){ test.ok(false, 'iterator should not be called'); callback(); }, function(err){ test.ok(true, 'should call callback'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit error'] = function(test){ test.expect(2); var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 }; var call_order = []; async.forEachOfLimit(obj, 3, function(value, key, callback){ call_order.push(value, key); if (value === 2) { callback('error'); } }, function(err){ test.same(call_order, [ 1, "a", 2, "b" ]); test.equals(err, 'error'); }); setTimeout(test.done, 25); }; exports['forEachOfLimit no callback'] = function(test){ async.forEachOfLimit({ a: 1 }, 1, forEachOfNoCallbackIterator.bind(this, test)); }; exports['forEachOfLimit synchronous'] = function(test){ var args = []; var obj = { a: 1, b: 2 }; async.forEachOfLimit(obj, 5, forEachOfIterator.bind(this, args), function(err){ test.same(args, [ "a", 1, "b", 2 ]); test.done(); }); }; exports['forEachOfLimit with array'] = function(test){ var args = []; var arr = [ "a", "b" ] async.forEachOfLimit(arr, 1, forEachOfIterator.bind(this, args), function (err) { test.same(args, [ 0, "a", 1, "b" ]); test.done(); }); };
<<<<<<< const mapboxEnabled = false // please change this if you take some code from here. // otherwise the demo page will run out of credits and that would be very sad :( const MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoicGlnZW9uLW1hcHMiLCJhIjoiY2l3eW01Y2E2MDA4dzJ6cWh5dG9pYWlwdiJ9.cvdCf-7PymM1Y3xp5j71NQ' const mapbox = (mapboxId, accessToken) => (x, y, z, dpr) => { return `https://api.mapbox.com/styles/v1/mapbox/${mapboxId}/tiles/256/${z}/${x}/${y}${ dpr >= 2 ? '@2x' : '' }?access_token=${accessToken}` } ======= >>>>>>> <<<<<<< <span className="map-attribution"> Map tiles by <a href="http://stamen.com">Stamen Design</a>, under{' '} <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by{' '} <a href="http://openstreetmap.org">OpenStreetMap</a>, under{' '} <a href="http://www.openstreetmap.org/copyright">ODbL</a>. </span> ) ======= <span className='map-attribution'> Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>. </span> ) >>>>>>> <span className="map-attribution"> Map tiles by <a href="http://stamen.com">Stamen Design</a>, under{' '} <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by{' '} <a href="http://openstreetmap.org">OpenStreetMap</a>, under{' '} <a href="http://www.openstreetmap.org/copyright">ODbL</a>. </span> )
<<<<<<< result = result.replace(/\bM\b/, locale.monthsShort[d.month]); case /ii/.test(result): result = result.replace(/\bii\b/, d.fullMinutes); case /i/.test(result): result = result.replace(/\bi(?!>)\b/, d.minutes); case /hh/.test(result): result = result.replace(/\bhh\b/, d.fullHours); case /h/.test(result): result = result.replace(/\bh\b/, d.hours); ======= result = result.replace(boundary('M'), locale.monthsShort[d.month]); >>>>>>> result = result.replace(boundary('M'), locale.monthsShort[d.month]); case /ii/.test(result): result = result.replace(/\bii\b/, d.fullMinutes); case /i/.test(result): result = result.replace(/\bi(?!>)\b/, d.minutes); case /hh/.test(result): result = result.replace(/\bhh\b/, d.fullHours); case /h/.test(result): result = result.replace(/\bh\b/, d.hours);
<<<<<<< const events = getActivityLogEvents( state, orderId ); ======= const orderLoading = isOrderLoading( state, orderId, siteId ); const orderLoaded = isOrderLoaded( state, orderId, siteId ); >>>>>>> const events = getActivityLogEvents( state, orderId ); const orderLoading = isOrderLoading( state, orderId, siteId ); const orderLoaded = isOrderLoaded( state, orderId, siteId ); <<<<<<< events, ======= orderLoading, orderLoaded, >>>>>>> events, orderLoading, orderLoaded,
<<<<<<< import { translate, localize } from 'i18n-calypso'; import { RadioControl, SelectControl } from '@wordpress/components'; import { mapValues, concat, values } from 'lodash'; ======= import { translate, localize, moment } from 'i18n-calypso'; import { RadioControl, CheckboxControl } from '@wordpress/components'; >>>>>>> import { translate, localize, moment } from 'i18n-calypso'; import { RadioControl, SelectControl } from '@wordpress/components'; import { mapValues, concat, values } from 'lodash';
<<<<<<< import RequestsFilter, { filterByType } from 'ui/components/RequestsFilter'; ======= import ResizeableCell from 'ui/components/ResizeableCell'; >>>>>>> import RequestsFilter, { filterByType } from 'ui/components/RequestsFilter'; import ResizeableCell from 'ui/components/ResizeableCell'; <<<<<<< constructor() { super(); this.state = { filterReferences: 0 }; } editRequest = (request) => () => { ======= editRequest = (request) => (event) => { if (event.srcElement.dataset.resizeHandle) { return; } >>>>>>> state = { filterReferences: 0 }; editRequest = (request) => (event) => { if (event.srcElement.dataset.resizeHandle) { return; }
<<<<<<< const disabledIconStyle = Object.assign({}, iconStyle, { opacity: '0.3' }); const delayOptions = [ ======= const delayPreset = [ >>>>>>> const disabledIconStyle = Object.assign({}, iconStyle, { opacity: '0.3' }); const delayPreset = [
<<<<<<< ROLLING_HAVOC: { id: 278747, name: 'Rolling Havoc', icon: 'warlock_pvp_banehavoc', }, ROLLING_HAVOC_BUFF: { id: 278931, name: 'Rolling Havoc', icon: 'warlock_pvp_banehavoc', }, ======= // Destruction Azerite traits and effects ACCELERANT: { id: 272955, name: 'Accelerant', icon: 'spell_shadow_rainoffire', }, ACCELERANT_BUFF: { id: 272957, name: 'Accelerant', icon: 'spell_shadow_rainoffire', }, FLASHPOINT: { id: 275425, name: 'Flashpoint', icon: 'spell_fire_immolation', }, FLASHPOINT_BUFF: { id: 275429, name: 'Flashpoint', icon: 'spell_fire_immolation', }, >>>>>>> // Destruction Azerite traits and effects ACCELERANT: { id: 272955, name: 'Accelerant', icon: 'spell_shadow_rainoffire', }, ACCELERANT_BUFF: { id: 272957, name: 'Accelerant', icon: 'spell_shadow_rainoffire', }, FLASHPOINT: { id: 275425, name: 'Flashpoint', icon: 'spell_fire_immolation', }, FLASHPOINT_BUFF: { id: 275429, name: 'Flashpoint', icon: 'spell_fire_immolation', }, ROLLING_HAVOC: { id: 278747, name: 'Rolling Havoc', icon: 'warlock_pvp_banehavoc', }, ROLLING_HAVOC_BUFF: { id: 278931, name: 'Rolling Havoc', icon: 'warlock_pvp_banehavoc', },
<<<<<<< test.equal(domToHtml.domToHtml(doc), '<html style="color: black; background-color: white"></html>\r\n', ''); test.done(); ======= assertEquals('', '<html style="color: black; background-color: white"></html>\n', require('../../lib/jsdom/browser/domtohtml').domToHtml(doc)); >>>>>>> test.equal(domToHtml.domToHtml(doc), '<html style="color: black; background-color: white"></html>\n', ''); test.done();
<<<<<<< }, script_execution_in_body : function() { var window, caught = false; try { window = jsdom.jsdom('<html><body><script>document.body.innerHTML = "monkey"</script></body></html>').createWindow(); } catch (e) { console.log(e.stack) caught = true; } assertFalse('execution should work as expected', caught); }, mutation_events : function() { var document = jsdom.jsdom(); document.implementation.addFeature('MutationEvents', '2.0'); var created = ''; var removed = ''; document.addEventListener('DOMNodeInserted', function(ev) { created += ev.target.tagName; }); document.addEventListener('DOMNodeRemoved', function(ev) { removed += ev.target.tagName; }); var h1 = document.createElement('h1'); var h2 = document.createElement('h2'); var h3 = document.createElement('h3'); document.body.appendChild(h2); document.body.insertBefore(h1, h2); document.body.insertBefore(h3, null); assertEquals("an event should be dispatched for each created element", 'H2H1H3', created); document.body.removeChild(h1); document.body.insertBefore(h3, h2); assertEquals("an event should be dispatched for each removed element", 'H1H3', removed); }, remove_listener_in_handler: function() { var document = jsdom.jsdom(); var h1 = 0, h2 = 0; // Event handler that removes itself function handler1() { h1++; document.removeEventListener('click', handler1); } function handler2() { h2++; } document.addEventListener('click', handler1); document.addEventListener('click', handler2); var ev = document.createEvent('MouseEvents'); ev.initEvent('click', true, true); document.dispatchEvent(ev); assertEquals("handler1 must be called once", 1, h1); assertEquals("handler2 must be called once", 1, h2); document.dispatchEvent(ev); assertEquals("handler1 must be called once", 1, h1); assertEquals("handler2 must be called twice", 2, h2); ======= }, childNodes_updates_on_insertChild : function() { var window = jsdom.jsdom("").createWindow(); var div = window.document.createElement("div") var text = window.document.createTextNode("bar") div.appendChild(text); assertEquals("childNodes NodeList should update after appendChild", text, div.childNodes[0]) text = window.document.createTextNode("bar") div.insertBefore(text, null); assertEquals("childNodes NodeList should update after insertBefore", text, div.childNodes[1]) }, option_set_selected : function() { var window = jsdom.jsdom("").createWindow(); var select = window.document.createElement("select") var option0 = window.document.createElement('option'); select.appendChild(option0); option0.setAttribute('selected', 'selected'); var optgroup = window.document.createElement('optgroup'); select.appendChild(optgroup); var option1 = window.document.createElement('option'); optgroup.appendChild(option1); assertEquals('initially selected', true, option0.selected); assertEquals('initially not selected', false, option1.selected); assertEquals("options should include options inside optgroup", option1, select.options[1]); option1.defaultSelected = true; assertEquals('selecting other option should deselect this', false, option0.selected); assertEquals('default should not change', true, option0.defaultSelected); assertEquals('selected changes when defaultSelected changes', true, option1.selected); assertEquals('I just set this', true, option1.defaultSelected); option0.defaultSelected = false; option0.selected = true; assertEquals('I just set this', true, option0.selected); assertEquals('selected does not set default', false, option0.defaultSelected); assertEquals('should deselect others', false, option1.selected); assertEquals('unchanged', true, option1.defaultSelected); >>>>>>> }, script_execution_in_body : function() { var window, caught = false; try { window = jsdom.jsdom('<html><body><script>document.body.innerHTML = "monkey"</script></body></html>').createWindow(); } catch (e) { console.log(e.stack) caught = true; } assertFalse('execution should work as expected', caught); }, mutation_events : function() { var document = jsdom.jsdom(); document.implementation.addFeature('MutationEvents', '2.0'); var created = ''; var removed = ''; document.addEventListener('DOMNodeInserted', function(ev) { created += ev.target.tagName; }); document.addEventListener('DOMNodeRemoved', function(ev) { removed += ev.target.tagName; }); var h1 = document.createElement('h1'); var h2 = document.createElement('h2'); var h3 = document.createElement('h3'); document.body.appendChild(h2); document.body.insertBefore(h1, h2); document.body.insertBefore(h3, null); assertEquals("an event should be dispatched for each created element", 'H2H1H3', created); document.body.removeChild(h1); document.body.insertBefore(h3, h2); assertEquals("an event should be dispatched for each removed element", 'H1H3', removed); }, remove_listener_in_handler: function() { var document = jsdom.jsdom(); var h1 = 0, h2 = 0; // Event handler that removes itself function handler1() { h1++; document.removeEventListener('click', handler1); } function handler2() { h2++; } document.addEventListener('click', handler1); document.addEventListener('click', handler2); var ev = document.createEvent('MouseEvents'); ev.initEvent('click', true, true); document.dispatchEvent(ev); assertEquals("handler1 must be called once", 1, h1); assertEquals("handler2 must be called once", 1, h2); document.dispatchEvent(ev); assertEquals("handler1 must be called once", 1, h1); assertEquals("handler2 must be called twice", 2, h2); }, childNodes_updates_on_insertChild : function() { var window = jsdom.jsdom("").createWindow(); var div = window.document.createElement("div") var text = window.document.createTextNode("bar") div.appendChild(text); assertEquals("childNodes NodeList should update after appendChild", text, div.childNodes[0]) text = window.document.createTextNode("bar") div.insertBefore(text, null); assertEquals("childNodes NodeList should update after insertBefore", text, div.childNodes[1]) }, option_set_selected : function() { var window = jsdom.jsdom("").createWindow(); var select = window.document.createElement("select") var option0 = window.document.createElement('option'); select.appendChild(option0); option0.setAttribute('selected', 'selected'); var optgroup = window.document.createElement('optgroup'); select.appendChild(optgroup); var option1 = window.document.createElement('option'); optgroup.appendChild(option1); assertEquals('initially selected', true, option0.selected); assertEquals('initially not selected', false, option1.selected); assertEquals("options should include options inside optgroup", option1, select.options[1]); option1.defaultSelected = true; assertEquals('selecting other option should deselect this', false, option0.selected); assertEquals('default should not change', true, option0.defaultSelected); assertEquals('selected changes when defaultSelected changes', true, option1.selected); assertEquals('I just set this', true, option1.defaultSelected); option0.defaultSelected = false; option0.selected = true; assertEquals('I just set this', true, option0.selected); assertEquals('selected does not set default', false, option0.defaultSelected); assertEquals('should deselect others', false, option1.selected); assertEquals('unchanged', true, option1.defaultSelected);
<<<<<<< const Writable = require('stream').Writable; const lookup = require('./lookup'); /** * * https://gist.github.com/telekosmos/3b62a31a5c43f40849bb * @param arr * @returns {Array} */ function uniques(arr) { // Sets cannot contain duplicate elements, which is what we want return [...new Set(arr)]; } ======= import { Writable } from 'stream'; >>>>>>> const { Writable } = require('stream'); <<<<<<< class TrainStream extends Writable { constructor(opts) { ======= export default class TrainStream extends Writable { constructor(options) { >>>>>>> class TrainStream extends Writable { constructor(options) { <<<<<<< this.inputKeys = []; this.outputKeys = []; // keeps track of keys seen this.i = 0; // keep track of the for loop i variable that we got rid of this.iterations = opts.iterations || 20000; this.errorThresh = opts.errorThresh || 0.005; // eslint-disable-next-line this.log = opts.log ? typeof opts.log === 'function' ? opts.log : console.log //eslint-disable-line : false; this.logPeriod = opts.logPeriod || 10; this.callback = opts.callback; this.callbackPeriod = opts.callbackPeriod || 10; this.floodCallback = opts.floodCallback; this.doneTrainingCallback = opts.doneTrainingCallback; ======= this.i = 0; // keep track of internal iterations >>>>>>> this.i = 0; // keep track of internal iterations <<<<<<< this.inputKeys = uniques( this.inputKeys.slice(0).concat(Object.keys(chunk.input)) ); this.outputKeys = uniques( this.outputKeys.slice(0).concat(Object.keys(chunk.output)) ); ======= this.neuralNetwork.addFormat(chunk); >>>>>>> this.neuralNetwork.addFormat(chunk); <<<<<<< const data = this.neuralNetwork.formatData(chunk); this.trainDatum(data[0]); ======= const data = this.neuralNetwork.formatData(chunk); this.sum += this.neuralNetwork.trainPattern(data[0], true); >>>>>>> const data = this.neuralNetwork.formatData(chunk); this.sum += this.neuralNetwork.trainPattern(data[0], true); <<<<<<< * @param datum */ trainDatum(datum) { const err = this.neuralNetwork.trainPattern(datum.input, datum.output); this.sum += err; } /** * ======= >>>>>>> <<<<<<< } module.exports = TrainStream; ======= } >>>>>>> } module.exports = TrainStream;
<<<<<<< ======= if (!this._nodes) { this._nodes = []; } this._nodes.push(this); >>>>>>> if (!this._nodes) { this._nodes = []; } this._nodes.push(this);
<<<<<<< }, ensure_a_default_window_has_a_window_location_hash: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); var defaultHref = window.location.href; test.equals(window.location.hash, ""); window.location.href = window.location.href + "#foobar"; test.equals(window.location.hash, "#foobar"); window.location.hash = "#baz"; test.equals(window.location.hash, "#baz"); test.equals(window.location.href, defaultHref + "#baz"); test.done(); ======= }, ensure_a_default_window_has_a_window_location_hash: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); var defaultHref = window.location.href; test.equals(window.location.hash, ""); window.location.href = window.location.href + "#foobar"; test.equals(window.location.hash, "#foobar"); window.location.hash = "#baz"; test.equals(window.location.hash, "#baz"); test.equals(window.location.href, defaultHref + "#baz"); test.done(); }, ensure_a_default_window_has_a_window_location_search: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); var defaultSearch = window.location.search; test.equals(window.location.search, ""); window.location.search = window.location.search + "?foo=bar"; test.equals(window.location.search, "?foo=bar"); window.location.search = "?baz=qux"; test.equals(window.location.search, "?baz=qux"); test.equals(window.location.search, defaultSearch + "?baz=qux"); test.done(); }, ensure_a_default_window_can_set_search_with_a_hash: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); window.location.href = window.location.href + "#foo"; window.location.search = "?foo=bar"; test.equals(window.location.href.split("?")[1], "foo=bar#foo"); window.location.search = ""; test.equals(window.location.href.indexOf("?"), -1); test.done(); >>>>>>> }, ensure_a_default_window_has_a_window_location_hash: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); var defaultHref = window.location.href; test.equals(window.location.hash, ""); window.location.href = window.location.href + "#foobar"; test.equals(window.location.hash, "#foobar"); window.location.hash = "#baz"; test.equals(window.location.hash, "#baz"); test.equals(window.location.href, defaultHref + "#baz"); test.done(); }, ensure_a_default_window_has_a_window_location_search: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); var defaultSearch = window.location.search; test.equals(window.location.search, ""); window.location.search = window.location.search + "?foo=bar"; test.equals(window.location.search, "?foo=bar"); window.location.search = "?baz=qux"; test.equals(window.location.search, "?baz=qux"); test.equals(window.location.search, defaultSearch + "?baz=qux"); test.done(); }, ensure_a_default_window_can_set_search_with_a_hash: function(test) { var window = require("../../lib/jsdom/browser/index").windowAugmentation(dom); window.location.href = window.location.href + "#foo"; window.location.search = "?foo=bar"; test.equals(window.location.href.split("?")[1], "foo=bar#foo"); window.location.search = ""; test.equals(window.location.href.indexOf("?"), -1); test.done(); <<<<<<< ======= >>>>>>>
<<<<<<< } }, importNode: function() { var caught = false; try { var doc1 = jsdom.jsdom('<html><body><h1 id="headline">Hello <span id="world">World</span></h1></body></html>'), doc2 = jsdom.jsdom(); doc2.body.appendChild(doc2.importNode(doc1.getElementById('headline'), true)); doc2.getElementById('world').className = 'foo'; } catch (err) { caught = err; } assertFalse("Importing nodes should not fail", caught); ======= }; }, window_is_augmented_with_dom_features : function() { var document = jsdom.jsdom(), window = document.createWindow(); assertEquals("window must be augmented", true, window._augmented); assertNotNull("window must include Element", window.Element); >>>>>>> } }, importNode: function() { var caught = false; try { var doc1 = jsdom.jsdom('<html><body><h1 id="headline">Hello <span id="world">World</span></h1></body></html>'), doc2 = jsdom.jsdom(); doc2.body.appendChild(doc2.importNode(doc1.getElementById('headline'), true)); doc2.getElementById('world').className = 'foo'; } catch (err) { caught = err; } assertFalse("Importing nodes should not fail", caught); }, window_is_augmented_with_dom_features : function() { var document = jsdom.jsdom(), window = document.createWindow(); assertEquals("window must be augmented", true, window._augmented); assertNotNull("window must include Element", window.Element);
<<<<<<< totalItemsCount: _react.PropTypes.number.isRequired, onChange: _react.PropTypes.func.isRequired, activePage: _react.PropTypes.number, itemsCountPerPage: _react.PropTypes.number, pageRangeDisplayed: _react.PropTypes.number, prevPageText: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), nextPageText: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), lastPageText: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), firstPageText: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), innerClass: _react.PropTypes.string, itemClass: _react.PropTypes.string, linkClass: _react.PropTypes.string, activeClass: _react.PropTypes.string, disabledClass: _react.PropTypes.string, hideDisabled: _react.PropTypes.bool ======= totalItemsCount: _propTypes2.default.number.isRequired, onChange: _propTypes2.default.func.isRequired, activePage: _propTypes2.default.number, itemsCountPerPage: _propTypes2.default.number, pageRangeDisplayed: _propTypes2.default.number, prevPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), nextPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), lastPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), firstPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), innerClass: _propTypes2.default.string, activeClass: _propTypes2.default.string, disabledClass: _propTypes2.default.string, hideDisabled: _propTypes2.default.bool >>>>>>> totalItemsCount: _propTypes2.default.number.isRequired, onChange: _propTypes2.default.func.isRequired, activePage: _propTypes2.default.number, itemsCountPerPage: _propTypes2.default.number, pageRangeDisplayed: _propTypes2.default.number, prevPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), nextPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), lastPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), firstPageText: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]), innerClass: _propTypes2.default.string, itemClass: _propTypes2.default.string, linkClass: _propTypes2.default.string, activeClass: _propTypes2.default.string, disabledClass: _propTypes2.default.string, hideDisabled: _propTypes2.default.bool
<<<<<<< import PropTypes from 'prop-types'; ======= const PropTypes = require('prop-types'); >>>>>>> import PropTypes from 'prop-types'; <<<<<<< <View style={styles.labelContainer} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Label'} testID={this.props.testID + 'Label'}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ======= { (this.props.label ? ( <View style={styles.labelContainer}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ) : <View></View>) } >>>>>>> { (this.props.label ? ( <View style={styles.labelContainer} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Label'} testID={this.props.testID + 'Label'}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ) : <View></View>) } <<<<<<< source={source} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Checkbox'} testID={this.props.testID + 'Checkbox'}/> <View style={styles.labelContainer} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Label'} testID={this.props.testID + 'Label'}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ======= source={source}/> { (this.props.label ? ( <View style={styles.labelContainer}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ) : <View></View>) } >>>>>>> source={source} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Checkbox'} testID={this.props.testID + 'Checkbox'}/> { (this.props.label ? ( <View style={styles.labelContainer} accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel + 'Label'} testID={this.props.testID + 'Label'}> <Text numberOfLines={this.props.labelLines} style={[styles.label, this.props.labelStyle]}>{this.props.label}</Text> </View> ) : <View></View>) } <<<<<<< <TouchableHighlight accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel} testID={this.props.testID} onPress={this.onChange} underlayColor={this.props.underlayColor} style={styles.flexContainer}> ======= <TouchableHighlight onPress={this.onChange} underlayColor={this.props.underlayColor} style={styles.flexContainer} disabled = {this.state.isDisabled}> >>>>>>> <TouchableHighlight accessible={this.props.accessible} accessibilityLabel={this.props.accessibilityLabel} testID={this.props.testID} onPress={this.onChange} underlayColor={this.props.underlayColor} style={styles.flexContainer}>
<<<<<<< this.copyChanges[layer] = this.gpu.createKernel( function(value) { return value[this.thread.y][this.thread.x]; }, { output: this.changesPropagate[layer].output, pipeline: true, } ); this.copyWeights[layer] = this.gpu.createKernel( function (value) { return value[this.thread.y][this.thread.x]; }, { output: this.changesPropagate[layer].output, pipeline: true, } ); } ======= this.copyWeights[layer] = this.gpu.createKernel(function(value) { return value[this.thread.y][this.thread.x]; }, { output: this.changesPropagate[layer].output, outputToTexture: true, hardCodeConstants: true }); } >>>>>>> this.copyChanges[layer] = this.gpu.createKernel( function(value) { return value[this.thread.y][this.thread.x]; }, { output: this.changesPropagate[layer].output, pipeline: true, } ); this.copyWeights[layer] = this.gpu.createKernel( function (value) { return value[this.thread.y][this.thread.x]; }, { output: this.changesPropagate[layer].output, pipeline: true, } ); } <<<<<<< let output = outputTextures.toArray ? outputTextures.toArray() : outputTextures; ======= let output; if (outputTextures.toArray) { output = outputTextures.toArray(this.gpu); } else { output = outputTextures; } >>>>>>> let output = outputTextures.toArray ? outputTextures.toArray() : outputTextures; <<<<<<< /** * * @param data * Verifies network sizes are initilaized * If they are not it will initialize them based off the data set. */ _verifyIsInitialized(data) { if (this.sizes) return; this.sizes = []; if (!data[0].size) { data[0].size = { input: data[0].input.length, output: data[0].output.length, }; } this.sizes.push(data[0].size.input); if (!this.hiddenSizes) { this.sizes.push(Math.max(3, Math.floor(data[0].size.input / 2))); } else { this.hiddenSizes.forEach(size => { this.sizes.push(size); }); } this.sizes.push(data[0].size.output); this._initialize(); } ======= >>>>>>> <<<<<<< data: data.map(set => ({ size: set.size, input: this._texturizeInputData(set.input), output: texturizeOutputData(set.output), })), ======= data: data.map((set) => { return { input: this.texturizeInputData(set.input), output: texturizeOutputData(set.output) } }), >>>>>>> data: data.map(set => ({ size: set.size, input: this.texturizeInputData(set.input), output: texturizeOutputData(set.output), })), <<<<<<< toFunction() { throw new Error( `${this.constructor.name}-toFunction is not yet implemented` ); ======= toJSON() { if (!this.weights[1].toArray) { // in fallback mode return super.toJSON(); } // in GPU mode const weights = []; const biases = []; for (let layer = 1; layer <= this.outputLayer; layer++) { weights[layer] = Array.from(this.weights[layer].toArray(this.gpu)); biases[layer] = Array.from(this.biases[layer].toArray(this.gpu)); } // pseudo lo-fi decorator return NeuralNetwork.prototype.toJSON.call({ inputLookup: this.inputLookup, outputLookup: this.outputLookup, outputLayer: this.outputLayer, sizes: this.sizes, getTrainOptsJSON: () => this.getTrainOptsJSON(), weights, biases, }); } } function weightedSumSigmoid(weights, biases, inputs) { let sum = biases[this.thread.x]; for (let k = 0; k < this.constants.size; k++) { sum += weights[this.thread.x][k] * inputs[k]; } //sigmoid return 1 / (1 + Math.exp(-sum)); } function weightedSumRelu(weights, biases, inputs) { let sum = biases[this.thread.x]; for (let k = 0; k < this.constants.size; k++) { sum += weights[this.thread.x][k] * inputs[k]; } //relu return (sum < 0 ? 0 : sum); } function weightedSumLeakyRelu(weights, biases, inputs) { let sum = biases[this.thread.x]; for (let k = 0; k < this.constants.size; k++) { sum += weights[this.thread.x][k] * inputs[k]; } //leaky relu return (sum < 0 ? 0 : 0.01 * sum); } function weightedSumTanh(weights, biases, inputs) { let sum = biases[this.thread.x]; for (let k = 0; k < this.constants.size; k++) { sum += weights[this.thread.x][k] * inputs[k]; >>>>>>> toFunction() { throw new Error( `${this.constructor.name}-toFunction is not yet implemented` ); } toJSON() { if (!this.weights[1].toArray) { // in fallback mode return super.toJSON(); } // in GPU mode const weights = []; const biases = []; for (let layer = 1; layer <= this.outputLayer; layer++) { weights[layer] = Array.from(this.weights[layer].toArray(this.gpu)); biases[layer] = Array.from(this.biases[layer].toArray(this.gpu)); } // pseudo lo-fi decorator return NeuralNetwork.prototype.toJSON.call({ inputLookup: this.inputLookup, outputLookup: this.outputLookup, outputLayer: this.outputLayer, sizes: this.sizes, getTrainOptsJSON: () => this.getTrainOptsJSON(), weights, biases, });
<<<<<<< this.updateUI = nanoraf((state) => { this.el = yo.update(this.el, this.render(state)) }) // this.updateUI = (state) => { // this.el = yo.update(this.el, this.render(state)) // } ======= // this.updateUI = nanoraf((state) => { // this.el = yo.update(this.el, this.render(state)) // }) >>>>>>> this.updateUI = nanoraf((state) => { this.el = yo.update(this.el, this.render(state)) })
<<<<<<< // const addFile = (file) => { // this.core.emit('core:file-add', file) // } const removeFile = (fileID) => { this.core.emit('core:file-remove', fileID) } ======= >>>>>>> <<<<<<< this.core.emit('core:upload-pause', fileID) } const retryUpload = (fileID) => { this.core.emit('core:upload-retry', fileID) ======= this.core.emit('core:upload-pause', fileID) >>>>>>> this.core.emit('core:upload-pause', fileID) } const retryUpload = (fileID) => { this.core.emit('core:upload-retry', fileID) <<<<<<< this.core.emit('core:update-meta', meta, fileID) this.core.emit('dashboard:file-card') } const info = (text, type, duration) => { this.core.info(text, type, duration) ======= this.core.emit('core:update-meta', meta, fileID) this.core.emit('dashboard:file-card') >>>>>>> this.core.emit('core:update-meta', meta, fileID) this.core.emit('dashboard:file-card')
<<<<<<< ======= /** * Generate a preview image for the given file, if possible. */ generatePreview (file) { if (Utils.isPreviewSupported(file.type) && !file.isRemote) { let previewPromise if (this.opts.thumbnailGeneration === true) { previewPromise = Utils.createThumbnail(file, 280) } else { previewPromise = Promise.resolve(URL.createObjectURL(file.data)) } previewPromise.then((preview) => { this.setPreviewURL(file.id, preview) }).catch((err) => { console.warn(err.stack || err.message) }) } } /** * Set the preview URL for a file. */ setPreviewURL (fileID, preview) { this.setFileState(fileID, { preview: preview }) } >>>>>>>
<<<<<<< core.setState({ files: { fileId: { name: 'filename' } } }) core.emit('upload-error', core.getFile('fileId'), new Error('this is the error')) expect(core.getState().info).toEqual({'message': 'Failed to upload filename', 'details': 'this is the error', 'isHidden': false, 'type': 'error'}) ======= core.state.files['fileId'] = { id: 'fileId', name: 'filename' } core.emit('upload-error', core.getState().files['fileId'], new Error('this is the error')) expect(core.state.info).toEqual({'message': 'Failed to upload filename', 'details': 'this is the error', 'isHidden': false, 'type': 'error'}) >>>>>>> core.setState({ files: { fileId: { id: 'fileId', name: 'filename' } } }) core.emit('upload-error', core.getFile('fileId'), new Error('this is the error')) expect(core.getState().info).toEqual({'message': 'Failed to upload filename', 'details': 'this is the error', 'isHidden': false, 'type': 'error'})
<<<<<<< if (this.opts.browserBackButtonClose) { this.updateBrowserHistory() } ======= this.rerender(this.uppy.getState()) >>>>>>> if (this.opts.browserBackButtonClose) { this.updateBrowserHistory() } this.rerender(this.uppy.getState())