conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
duck.Bill = (function() {
function Bill(duck) {
this.duck = duck;
this.navigation = new duck.Navigation(this.duck);
this.success = new duck.Success(this.duck);
}
return Bill;
})();
duck.Brain = (function() {
function Brain(duck) {
this.duck = duck;
$(this.duck).on('quack', this.quack);
}
Brain.prototype.quack = function(event, options) {
console.log(options.message);
return options.render("I'm sorry, Dave, I just don't know.");
};
return Brain;
})();
duck.Conversation = (function() {
=======
duck.Bill = (function() {
function Bill(duck) {
this.duck = duck;
this.navigation = new window.duck.Navigation(this.duck);
this.success = new window.duck.Success(this.duck);
}
return Bill;
})();
Conversation = (function() {
>>>>>>>
duck.Bill = (function() {
function Bill(duck) {
this.duck = duck;
this.navigation = new window.duck.Navigation(this.duck);
this.success = new window.duck.Success(this.duck);
}
return Bill;
})();
duck.Brain = (function() {
function Brain(duck) {
this.duck = duck;
$(this.duck).on('quack', this.quack);
}
Brain.prototype.quack = function(event, options) {
console.log(options.message);
return options.render("I'm sorry, Dave, I just don't know.");
};
return Brain;
})();
duck.Conversation = (function() { |
<<<<<<<
sdk.loadSkin(require('../component-index'));
sdk.loadModule(require('../modules/VectorConferenceHandler'));
=======
sdk.loadSkin(require('../skins/vector/skindex'));
var VectorConferenceHandler = require('../VectorConferenceHandler');
var configJson = require("../../config.json");
>>>>>>>
sdk.loadSkin(require('../component-index'));
var VectorConferenceHandler = require('../VectorConferenceHandler');
var configJson = require("../../config.json"); |
<<<<<<<
skin['rooms.MemberList'] = require('matrix-react-sdk/lib/components/views/rooms/MemberList');
=======
skin['rooms.MessageComposer'] = require('matrix-react-sdk/lib/components/views/rooms/MessageComposer');
skin['rooms.EventTile'] = require('matrix-react-sdk/lib/components/views/rooms/EventTile');
>>>>>>>
skin['rooms.MemberList'] = require('matrix-react-sdk/lib/components/views/rooms/MemberList');
skin['rooms.MessageComposer'] = require('matrix-react-sdk/lib/components/views/rooms/MessageComposer');
skin['rooms.EventTile'] = require('matrix-react-sdk/lib/components/views/rooms/EventTile'); |
<<<<<<<
// new for vector
require('../skins/base/views/organisms/LeftPanel');
require('../skins/base/views/organisms/RightPanel');
require('../skins/base/views/molecules/RoomCreate');
require('../skins/base/views/molecules/RoomDropTarget');
require('../skins/base/views/molecules/DirectoryMenu');
=======
require('../skins/base/views/organisms/CreateRoom');
require('../skins/base/views/molecules/UserSelector');
>>>>>>>
require('../skins/base/views/organisms/CreateRoom');
require('../skins/base/views/molecules/UserSelector');
// new for vector
require('../skins/base/views/organisms/LeftPanel');
require('../skins/base/views/organisms/RightPanel');
require('../skins/base/views/molecules/RoomCreate');
require('../skins/base/views/molecules/RoomDropTarget');
require('../skins/base/views/molecules/DirectoryMenu'); |
<<<<<<<
{ homeButton }
<div className="mx_BottomLeftMenu_people" onClick={ this.onPeopleClick } onMouseEnter={ this.onPeopleMouseEnter } onMouseLeave={ this.onPeopleMouseLeave } >
=======
<AccessibleButton className="mx_BottomLeftMenu_people" onClick={ this.onPeopleClick } onMouseEnter={ this.onPeopleMouseEnter } onMouseLeave={ this.onPeopleMouseLeave } >
>>>>>>>
{ homeButton }
<AccessibleButton className="mx_BottomLeftMenu_people" onClick={ this.onPeopleClick } onMouseEnter={ this.onPeopleMouseEnter } onMouseLeave={ this.onPeopleMouseLeave } > |
<<<<<<<
case 'startSSOFlow':
recordSSOSession(args[0]);
break;
=======
case 'navigateBack':
if (mainWindow.webContents.canGoBack()) {
mainWindow.webContents.goBack();
}
break;
case 'navigateForward':
if (mainWindow.webContents.canGoForward()) {
mainWindow.webContents.goForward();
}
break;
>>>>>>>
case 'navigateBack':
if (mainWindow.webContents.canGoBack()) {
mainWindow.webContents.goBack();
}
break;
case 'navigateForward':
if (mainWindow.webContents.canGoForward()) {
mainWindow.webContents.goForward();
}
break;
case 'startSSOFlow':
recordSSOSession(args[0]);
break; |
<<<<<<<
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
=======
var header;
if (this.props.simpleHeader) {
header =
<div className="mx_RoomHeader_wrapper">
<div className="mx_RoomHeader_simpleHeader">
{ this.props.simpleHeader }
</div>
</div>
}
else {
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
topic = topic ? <div className="mx_RoomHeader_topic">{ topic.getContent().topic }</div> : null;
>>>>>>>
var header;
if (this.props.simpleHeader) {
header =
<div className="mx_RoomHeader_wrapper">
<div className="mx_RoomHeader_simpleHeader">
{ this.props.simpleHeader }
</div>
</div>
}
else {
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
<<<<<<<
var name = null;
var topic_el = null;
var save_button = null;
var settings_button = null;
if (this.props.editing) {
name = <input type="text" defaultValue={this.props.room.name} ref="name_edit"/>;
// if (topic) topic_el = <div className="mx_RoomHeader_topic"><textarea>{ topic.getContent().topic }</textarea></div>
save_button = (
<div className="mx_RoomHeader_button"onClick={this.props.onSaveClick}>
Save
</div>
);
} else {
name = <EditableText initialValue={this.props.room.name} onValueChanged={this.onNameChange} />;
if (topic) topic_el = <div className="mx_RoomHeader_topic">{ topic.getContent().topic }</div>;
settings_button = (
<div className="mx_RoomHeader_button" onClick={this.props.onSettingsClick}>
<img src="img/settings.png" width="32" height="32"/>
</div>
);
}
return (
<div className="mx_RoomHeader">
=======
header =
>>>>>>>
var name = null;
var topic_el = null;
var save_button = null;
var settings_button = null;
if (this.props.editing) {
name = <input type="text" defaultValue={this.props.room.name} ref="name_edit"/>;
// if (topic) topic_el = <div className="mx_RoomHeader_topic"><textarea>{ topic.getContent().topic }</textarea></div>
save_button = (
<div className="mx_RoomHeader_button"onClick={this.props.onSaveClick}>
Save
</div>
);
} else {
name = <EditableText initialValue={this.props.room.name} onValueChanged={this.onNameChange} />;
if (topic) topic_el = <div className="mx_RoomHeader_topic">{ topic.getContent().topic }</div>;
settings_button = (
<div className="mx_RoomHeader_button" onClick={this.props.onSettingsClick}>
<img src="img/settings.png" width="32" height="32"/>
</div>
);
}
header = |
<<<<<<<
import Modal from 'matrix-react-sdk/lib/Modal';
import Resend from "matrix-react-sdk/lib/Resend";
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to';
=======
const Modal = require('matrix-react-sdk/lib/Modal');
const Resend = require("matrix-react-sdk/lib/Resend");
import * as UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
import { isUrlPermitted } from 'matrix-react-sdk/lib/HtmlUtils';
>>>>>>>
import Modal from 'matrix-react-sdk/lib/Modal';
import Resend from "matrix-react-sdk/lib/Resend";
import SettingsStore from "matrix-react-sdk/lib/settings/SettingsStore";
import {makeEventPermalink} from 'matrix-react-sdk/lib/matrix-to';
import { isUrlPermitted } from 'matrix-react-sdk/lib/HtmlUtils';
<<<<<<<
if (typeof(this.props.mxEvent.event.content.external_url) === "string") {
externalURLButton = (
<div className="mx_MessageContextMenu_field">
<a href={this.props.mxEvent.event.content.external_url}
rel="noopener" target="_blank" onClick={this.closeMenu}>{ _t('Source URL') }</a>
</div>
);
=======
if(
typeof(this.props.mxEvent.event.content.external_url) === "string" &&
isUrlPermitted(this.props.mxEvent.event.content.external_url)
) {
externalURLButton = (
<div className="mx_MessageContextMenu_field">
<a href={ this.props.mxEvent.event.content.external_url }
rel="noopener" target="_blank" onClick={ this.closeMenu }>{ _t('Source URL') }</a>
</div>
);
>>>>>>>
if (
typeof(this.props.mxEvent.event.content.external_url) === "string" &&
isUrlPermitted(this.props.mxEvent.event.content.external_url)
) {
externalURLButton = (
<div className="mx_MessageContextMenu_field">
<a href={this.props.mxEvent.event.content.external_url}
rel="noopener" target="_blank" onClick={this.closeMenu}>{ _t('Source URL') }</a>
</div>
); |
<<<<<<<
const vectorMenu = require('./vectormenu');
=======
const VectorMenu = require('./vectormenu');
const webContentsHandler = require('./webcontents-handler');
>>>>>>>
const vectorMenu = require('./vectormenu');
const webContentsHandler = require('./webcontents-handler');
<<<<<<<
function safeOpenURL(target) {
// openExternal passes the target to open/start/xdg-open,
// so put fairly stringent limits on what can be opened
// (for instance, open /bin/sh does indeed open a terminal
// with a shell, albeit with no arguments)
const parsedUrl = url.parse(target);
if (PERMITTED_URL_SCHEMES.indexOf(parsedUrl.protocol) > -1) {
// explicitly use the URL re-assembled by the url library,
// so we know the url parser has understood all the parts
// of the input string
const newTarget = url.format(parsedUrl);
electron.shell.openExternal(newTarget);
}
}
function onWindowOrNavigate(ev, target) {
// always prevent the default: if something goes wrong,
// we don't want to end up opening it in the electron
// app, as we could end up opening any sort of random
// url in a window that has node scripting access.
ev.preventDefault();
safeOpenURL(target);
}
function onLinkContextMenu(ev, params) {
const popupMenu = new electron.Menu();
popupMenu.append(new electron.MenuItem({
label: params.linkURL,
click() { safeOpenURL(params.linkURL); },
}));
popupMenu.append(new electron.MenuItem({
label: 'Copy Link Address',
click() { electron.clipboard.writeText(params.linkURL); },
}));
popupMenu.popup();
ev.preventDefault();
}
=======
>>>>>>>
function safeOpenURL(target) {
// openExternal passes the target to open/start/xdg-open,
// so put fairly stringent limits on what can be opened
// (for instance, open /bin/sh does indeed open a terminal
// with a shell, albeit with no arguments)
const parsedUrl = url.parse(target);
if (PERMITTED_URL_SCHEMES.indexOf(parsedUrl.protocol) > -1) {
// explicitly use the URL re-assembled by the url library,
// so we know the url parser has understood all the parts
// of the input string
const newTarget = url.format(parsedUrl);
electron.shell.openExternal(newTarget);
}
}
function onWindowOrNavigate(ev, target) {
// always prevent the default: if something goes wrong,
// we don't want to end up opening it in the electron
// app, as we could end up opening any sort of random
// url in a window that has node scripting access.
ev.preventDefault();
safeOpenURL(target);
}
function onLinkContextMenu(ev, params) {
const popupMenu = new electron.Menu();
popupMenu.append(new electron.MenuItem({
label: params.linkURL,
click() { safeOpenURL(params.linkURL); },
}));
popupMenu.append(new electron.MenuItem({
label: 'Copy Link Address',
click() { electron.clipboard.writeText(params.linkURL); },
}));
popupMenu.popup();
ev.preventDefault();
}
<<<<<<<
console.log('Other instance detected: exiting');
electron.app.quit();
=======
console.log("Other instance detected: exiting");
electron.app.quit();
>>>>>>>
console.log('Other instance detected: exiting');
electron.app.quit(); |
<<<<<<<
};
/**
* Allow dynamic config values through
* the native ES6 template string function.
*/
const regex = /\$\{[^()]*\}/g;
const templateConfigurations = function (obj) {
// Allow values which looks like such as
// an ES6 literal string without parenthesis inside (aka function call).
return Object.keys(obj).reduce((acc, key) => {
if (isPlainObject(obj[key]) && !isString(obj[key])) {
acc[key] = templateConfigurations(obj[key]);
} else if (isString(obj[key]) && obj[key].match(regex) !== null) {
acc[key] = eval('`' + obj[key] + '`'); // eslint-disable-line prefer-template
} else {
acc[key] = obj[key];
}
return acc;
}, {});
};
const isAdminInDevMode = function () {
try {
fs.accessSync(path.resolve(this.config.appPath, 'admin', 'admin', 'build', 'index.html'), fs.constants.R_OK | fs.constants.W_OK);
return true;
} catch (e) {
return false;
}
=======
>>>>>>>
};
const isAdminInDevMode = function () {
try {
fs.accessSync(path.resolve(this.config.appPath, 'admin', 'admin', 'build', 'index.html'), fs.constants.R_OK | fs.constants.W_OK);
return true;
} catch (e) {
return false;
} |
<<<<<<<
React.PropTypes.func.isRequired,
React.PropTypes.bool.isRequired,
]).isRequired,
sections: React.PropTypes.array.isRequired,
=======
React.PropTypes.func,
React.PropTypes.bool,
]),
resetToggleDefaultConnection: React.PropTypes.func,
sections: React.PropTypes.array,
>>>>>>>
React.PropTypes.func,
React.PropTypes.bool,
]).isRequired,
resetToggleDefaultConnection: React.PropTypes.func.isRequired,
sections: React.PropTypes.array.isRequired, |
<<<<<<<
precision: 10,
=======
>>>>>>>
precision: 10,
<<<<<<<
},
=======
},<% if (ieSupport) { %>
serverPrint: {
options: {
outputStyle: 'compressed',
sourceMap: 'true',
includePaths: [
'<%%= yeogurt.dev %>/styles/'
]
},
files: {
'<%%= yeogurt.server %>/styles/print.css': '<%%= yeogurt.dev %>/styles/print.scss'
}
},<% } %>
>>>>>>>
},
<<<<<<<
precision: 10,
=======
>>>>>>>
precision: 10,
<<<<<<<
}
=======
},<% if (ieSupport) { %>
distPrint: {
options: {
outputStyle: 'compressed',
sourceMap: 'true',
includePaths: [
'<%%= yeogurt.dev %>/styles/'
]
},
files: {
'<%%= yeogurt.dist %>/styles/print.css': '<%%= yeogurt.dev %>/styles/print.scss'
}
},<% } %>
>>>>>>>
} |
<<<<<<<
import FiltersPicker from '../../components/FiltersPicker';
import FiltersList from '../../components/FiltersList';
import List from '../../components/List';
=======
import Filters from '../../components/Filters';
// import List from '../../components/List';
>>>>>>>
import Filters from '../../components/Filters';
import List from '../../components/List';
<<<<<<<
const getQueryValue = key => {
const queryParams = getSearchParams();
return queryParams[key];
};
const handleChangeCheck = ({ target: { name, value } }) => {
dispatch({
type: 'ON_CHANGE_DATA_TO_DELETE',
id: name,
value,
});
};
=======
>>>>>>>
<<<<<<<
<List onChange={handleChangeCheck} selectedItems={dataToDelete} />
<ListEmpty onClick={handleClickToggleModal} />
=======
<ListEmpty onClick={() => handleClickToggleModal()} />
{/* <List data={data} /> */}
>>>>>>>
<List onChange={handleChangeCheck} selectedItems={dataToDelete} />
<ListEmpty onClick={() => handleClickToggleModal()} /> |
<<<<<<<
if (association.dominant) {
const arrayOfIds = obj[association.alias].map(related => {
return related[ref.primaryKey] || related;
});
// Where.
queryOpts.query = strapi.utils.models.convertParams(name, {
// Construct the "where" query to only retrieve entries which are
// related to this entry.
[ref.primaryKey]: arrayOfIds,
...where.where
}).where;
break;
}
// falls through
=======
const arrayOfIds = (obj[association.alias] || []).map(related => {
return related[ref.primaryKey] || related;
});
// Where.
queryOpts.query = strapi.utils.models.convertParams(name, {
// Construct the "where" query to only retrieve entries which are
// related to this entry.
[ref.primaryKey]: arrayOfIds,
...where.where
}).where;
break;
>>>>>>>
if (association.dominant) {
const arrayOfIds = (obj[association.alias] || []).map(related => {
return related[ref.primaryKey] || related;
});
// Where.
queryOpts.query = strapi.utils.models.convertParams(name, {
// Construct the "where" query to only retrieve entries which are
// related to this entry.
[ref.primaryKey]: arrayOfIds,
...where.where
}).where;
break;
}
// falls through |
<<<<<<<
targetUid,
mainTypeName,
editTarget,
firstLoopComponentName,
firstLoopComponentUid,
secondLoopComponentName,
secondLoopComponentUid,
=======
isSub,
>>>>>>>
targetUid,
mainTypeName,
editTarget,
firstLoopComponentName,
firstLoopComponentUid,
secondLoopComponentName,
secondLoopComponentUid,
isSub,
<<<<<<<
label: formatMessage({ id: `${pluginId}.button.attributes.add.another` }),
onClick: () => {
let headerDisplayName = mainTypeName;
if (firstLoopComponentName) {
headerDisplayName = firstLoopComponentName;
}
if (secondLoopComponentUid) {
headerDisplayName = secondLoopComponentName;
}
openModalAddField(
editTarget,
targetUid,
headerDisplayName,
firstLoopComponentUid ? mainTypeName : null,
secondLoopComponentName ? firstLoopComponentName : null,
secondLoopComponentUid ? firstLoopComponentUid : null
);
},
=======
label: formatMessage({
id: !isSub
? `${pluginId}.form.button.add.field.to.contentType`
: `${pluginId}.form.button.add.field.to.component`,
}),
onClick: () => addField(),
>>>>>>>
// label: formatMessage({ id: `${pluginId}.button.attributes.add.another` }),
label: formatMessage({
id: !isSub
? `${pluginId}.form.button.add.field.to.contentType`
: `${pluginId}.form.button.add.field.to.component`,
}),
onClick: () => {
let headerDisplayName = mainTypeName;
if (firstLoopComponentName) {
headerDisplayName = firstLoopComponentName;
}
if (secondLoopComponentUid) {
headerDisplayName = secondLoopComponentName;
}
openModalAddField(
editTarget,
targetUid,
headerDisplayName,
firstLoopComponentUid ? mainTypeName : null,
secondLoopComponentName ? firstLoopComponentName : null,
secondLoopComponentUid ? firstLoopComponentUid : null
);
},
<<<<<<<
firstLoopComponentName: null,
firstLoopComponentUid: null,
secondLoopComponentName: null,
secondLoopComponentUid: null,
=======
isSub: false,
>>>>>>>
firstLoopComponentName: null,
firstLoopComponentUid: null,
secondLoopComponentName: null,
secondLoopComponentUid: null,
isSub: false,
<<<<<<<
mainTypeName: PropTypes.string.isRequired,
secondLoopComponentName: PropTypes.string,
secondLoopComponentUid: PropTypes.string,
targetUid: PropTypes.string.isRequired,
=======
isSub: PropTypes.bool,
>>>>>>>
mainTypeName: PropTypes.string.isRequired,
secondLoopComponentName: PropTypes.string,
secondLoopComponentUid: PropTypes.string,
targetUid: PropTypes.string.isRequired,
isSub: PropTypes.bool, |
<<<<<<<
const input = placeholder
? this.renderFormattedInput(handleBlur, inputValue, placeholder)
: (
<input
name={this.props.target}
id={this.props.name}
onBlur={handleBlur}
onFocus={this.props.handleFocus}
onChange={this.props.handleChange}
value={inputValue}
type="text"
className={`form-control ${this.state.errors? 'form-control-danger' : ''}`}
placeholder={placeholder}
/>
);
=======
const marginBottomInput = isEmpty(this.state.errors) ? '4.3rem' : '2.4rem';
const input = placeholder ? this.renderFormattedInput(handleBlur, inputValue, placeholder, marginBottomInput)
: <input
name={this.props.target}
id={this.props.name}
onBlur={handleBlur}
onFocus={this.props.handleFocus}
onChange={this.props.handleChange}
value={inputValue}
type="text"
className={`form-control ${this.state.errors? 'form-control-danger' : ''}`}
placeholder={placeholder}
style={{marginBottom: marginBottomInput }}
/>;
>>>>>>>
const input = placeholder
? this.renderFormattedInput(handleBlur, inputValue, placeholder, marginBottomInput)
: (
<input
name={this.props.target}
id={this.props.name}
onBlur={handleBlur}
onFocus={this.props.handleFocus}
onChange={this.props.handleChange}
value={inputValue}
type="text"
className={`form-control ${this.state.errors? 'form-control-danger' : ''}`}
placeholder={placeholder}
style={{marginBottom: marginBottomInput }}
/>
); |
<<<<<<<
import { HeaderModalTitle, InputsIndex as Input } from 'strapi-helper-plugin';
=======
import {
GlobalContextProvider,
InputsIndex as Input,
} from 'strapi-helper-plugin';
>>>>>>>
import {
GlobalContextProvider,
HeaderModalTitle,
InputsIndex as Input,
} from 'strapi-helper-plugin'; |
<<<<<<<
import { isEmpty, merge } from 'lodash';
=======
import { isEmpty, isObject, merge } from 'lodash';
import Loadable from 'react-loadable';
>>>>>>>
import { isEmpty, isObject, merge } from 'lodash';
<<<<<<<
import WysiwygWithErrors from 'components/WysiwygWithErrors';
=======
import InputJSONWithErrors from 'components/InputJSONWithErrors';
// import WysiwygWithErrors from 'components/WysiwygWithErrors';
const Loading = () => <div>Loading ...</div>;
const LoadableWysiwyg = Loadable({
loader: () => import('components/WysiwygWithErrors'),
loading: Loading,
});
>>>>>>>
import WysiwygWithErrors from 'components/WysiwygWithErrors';
import InputJSONWithErrors from 'components/InputJSONWithErrors'; |
<<<<<<<
`${originInfo.model.databaseName}.${assoc.tableCollectionName} AS ${joinTableAlias}`,
`${joinTableAlias}.${singular(originInfo.model.collectionName)}_${
=======
`${assoc.tableCollectionName} AS ${joinTableAlias}`,
`${joinTableAlias}.${singular(originInfo.model.globalId.toLowerCase())}_${
>>>>>>>
`${originInfo.model.databaseName}.${assoc.tableCollectionName} AS ${joinTableAlias}`,
`${joinTableAlias}.${singular(originInfo.model.globalId.toLowerCase())}_${
<<<<<<<
`${destinationInfo.model.databaseName}.${destinationInfo.model.collectionName} AS ${destinationInfo.alias}`,
`${joinTableAlias}.${singular(destinationInfo.model.collectionName)}_${
=======
`${destinationInfo.model.collectionName} AS ${destinationInfo.alias}`,
`${joinTableAlias}.${singular(destinationInfo.model.globalId.toLowerCase())}_${
>>>>>>>
`${destinationInfo.model.databaseName}.${destinationInfo.model.collectionName} AS ${destinationInfo.alias}`,
`${joinTableAlias}.${singular(destinationInfo.model.globalId.toLowerCase())}_${ |
<<<<<<<
<div className="col-xs-12 col-md-6 col-xl-3" key={id}>
<Card checked={checked} {...item} url={`${strapi.backendURL}${url}`}>
<CardControlsWrapper leftAlign className="card-control-wrapper">
<Checkbox name={`${id}`} onChange={onChange} value={checked} />
</CardControlsWrapper>
=======
<div className="col-xs-12 col-md-6 col-xl-3" key={item.id}>
<Card small checked={checked} {...item} url={fileUrl}>
{(checked || canSelect) && (
<CardControlsWrapper leftAlign className="card-control-wrapper">
<Checkbox name={`${id}`} onChange={onChange} value={checked} />
</CardControlsWrapper>
)}
>>>>>>>
<div className="col-xs-12 col-md-6 col-xl-3" key={id}>
<Card checked={checked} {...item} url={fileUrl}>
{(checked || canSelect) && (
<CardControlsWrapper leftAlign className="card-control-wrapper">
<Checkbox name={`${id}`} onChange={onChange} value={checked} />
</CardControlsWrapper>
)} |
<<<<<<<
case 'manyMorphToOne': {
returned[association.alias] = returned[association.alias].map(obj =>
refToStrapiRef(obj)
);
=======
case 'manyMorphToOne':
returned[association.alias] = returned[association.alias].map(obj =>
refToStrapiRef(obj)
);
>>>>>>>
case 'manyMorphToOne': {
returned[association.alias] = returned[association.alias].map(obj =>
refToStrapiRef(obj)
);
<<<<<<<
const Model = instance.model(definition.globalId, schema, definition.collectionName);
Model.on('index', error => {
if (error) {
if (error.code === 11000) {
strapi.log.error(
`Unique constraint fails, make sure to update your data and restart to apply the unique constraint.\n\t- ${error.message}`
);
} else {
strapi.log.error(`An index error happened, it wasn't applied.\n\t- ${error.message}`);
=======
const Model = instance.model(definition.globalId, schema, definition.collectionName);
// Ensure indexes are synced with the model, prevent duplicate index errors
Model.syncIndexes(null, () => {
Model.on('index', error => {
if (error) {
if (error.code === 11000) {
strapi.log.error(
`Unique constraint fails, make sure to update your data and restart to apply the unique constraint.\n\t- ${error.message}`
);
} else {
strapi.log.error(`An index error happened, it wasn't applied.\n\t- ${error.message}`);
}
>>>>>>>
const Model = instance.model(definition.globalId, schema, definition.collectionName);
// Ensure indexes are synced with the model, prevent duplicate index errors
Model.syncIndexes(null, () => {
Model.on('index', error => {
if (error) {
if (error.code === 11000) {
strapi.log.error(
`Unique constraint fails, make sure to update your data and restart to apply the unique constraint.\n\t- ${error.message}`
);
} else {
strapi.log.error(`An index error happened, it wasn't applied.\n\t- ${error.message}`);
}
<<<<<<<
target[model].deleteRelations = relations.deleteRelations;
});
=======
}
// Parse every authenticated model.
Object.keys(models).map(mountModel);
>>>>>>>
target[model].deleteRelations = relations.deleteRelations;
}
// Parse every authenticated model.
Object.keys(models).map(mountModel);
<<<<<<<
utilsModels.getNature({
attribute,
attributeName: name,
modelName: model.toLowerCase(),
}) || {};
=======
utilsModels.getNature(attribute, name, undefined, model.toLowerCase()) || {};
>>>>>>>
utilsModels.getNature({
attribute,
attributeName: name,
modelName: model.toLowerCase(),
}) || {};
<<<<<<<
utilsModels.defineAssociations(model.toLowerCase(), definition, attribute, name);
const getRef = (name, plugin) => {
return plugin ? strapi.plugins[plugin].models[name].globalId : strapi.models[name].globalId;
};
const setField = (name, val) => {
definition.loadedModel[name] = val;
};
const { ObjectId } = instance.Schema.Types;
=======
utilsModels.defineAssociations(model.toLowerCase(), definition, attribute, name);
>>>>>>>
utilsModels.defineAssociations(model.toLowerCase(), definition, attribute, name);
const getRef = (name, plugin) => {
return plugin ? strapi.plugins[plugin].models[name].globalId : strapi.models[name].globalId;
};
const setField = (name, val) => {
definition.loadedModel[name] = val;
};
const { ObjectId } = instance.Schema.Types; |
<<<<<<<
=======
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
if (process.env.NODE_ENV === 'production') {
module.exports = __webpack_require__(8);
} else {
module.exports = __webpack_require__(9);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
/* 1 */
>>>>>>>
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
if (process.env.NODE_ENV === 'production') {
module.exports = __webpack_require__(8);
} else {
module.exports = __webpack_require__(9);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
/* 1 */
<<<<<<<
=======
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
if (process.env.NODE_ENV === 'production') {
module.exports = __webpack_require__(13);
} else {
module.exports = __webpack_require__(14);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
>>>>>>>
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
if (process.env.NODE_ENV === 'production') {
module.exports = __webpack_require__(13);
} else {
module.exports = __webpack_require__(14);
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
<<<<<<<
var _react = __webpack_require__(1);
=======
Object.defineProperty(exports, "__esModule", {
value: true
});
var _upArrow = __webpack_require__(33);
var _upArrow2 = _interopRequireDefault(_upArrow);
var _downArrow = __webpack_require__(34);
var _downArrow2 = _interopRequireDefault(_downArrow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
table_body: {
marginTop: '16px'
},
table_size: {
background: 'none',
border: 'none',
padding: 0
},
table_size_dropdown: {
width: '70px',
flex: 'none',
margin: '0px 10px',
display: 'inline-block',
float: 'none'
},
table_filter: {
display: 'inline-block',
verticalAlign: 'top',
marginRight: '5px',
width: '250px'
},
table_tool: {
display: 'inline-block',
verticalAlign: 'top'
},
table_tool_btn: {
marginRight: '5px'
},
sort_asc: {
backgroundImage: 'url(' + _upArrow2.default + ')'
},
sort_desc: {
backgroundImage: 'url(' + _downArrow2.default + ')'
}
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _react = __webpack_require__(0);
>>>>>>>
Object.defineProperty(exports, "__esModule", {
value: true
});
var _upArrow = __webpack_require__(33);
var _upArrow2 = _interopRequireDefault(_upArrow);
var _downArrow = __webpack_require__(34);
var _downArrow2 = _interopRequireDefault(_downArrow);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
table_body: {
marginTop: '16px'
},
table_size: {
background: 'none',
border: 'none',
padding: 0
},
table_size_dropdown: {
width: '70px',
flex: 'none',
margin: '0px 10px',
display: 'inline-block',
float: 'none'
},
table_filter: {
display: 'inline-block',
verticalAlign: 'top',
marginRight: '5px',
width: '250px'
},
table_tool: {
display: 'inline-block',
verticalAlign: 'top'
},
table_tool_btn: {
marginRight: '5px'
},
sort_asc: {
backgroundImage: 'url(' + _upArrow2.default + ')'
},
sort_desc: {
backgroundImage: 'url(' + _downArrow2.default + ')'
}
};
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _react = __webpack_require__(0);
<<<<<<<
var _style = __webpack_require__(20);
=======
var _style = __webpack_require__(6);
>>>>>>>
var _style = __webpack_require__(6);
<<<<<<<
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(26)(module)))
=======
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(26)(module)))
>>>>>>>
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(26)(module))) |
<<<<<<<
import { cloneDeep, get, isEmpty, size } from 'lodash';
=======
import { FormattedMessage } from 'react-intl';
import { cloneDeep, get, has, isArray, isEmpty, isObject, size } from 'lodash';
>>>>>>>
import { get, has, isArray, isEmpty, size } from 'lodash';
<<<<<<<
imgURL: get(this.props.files, ['0', 'url'], ''),
isImg: this.isPictureType(get(this.props.files, ['0', 'name'], '')),
=======
imgURL: get(this.props.files, ['0', 'url'], '') || get(this.props.files, 'url', ''),
isImg: this.isPictureType(get(this.props.files, ['0', 'name'], '')),
>>>>>>>
imgURL: get(this.props.files, ['0', 'url'], '') || get(this.props.files, 'url', ''),
isImg: this.isPictureType(get(this.props.files, ['0', 'name'], '')),
<<<<<<<
handleMouseEnter = (e) => {
e.preventDefault();
e.stopPropagation();
this.setState({ isOver: true });
}
handleMouseLeave = () => this.setState({ isOver: false });
=======
>>>>>>>
<<<<<<<
removeFile = (e) => {
e.preventDefault();
e.stopPropagation();
const value = cloneDeep(this.props.files);
value.splice(this.state.position, 1);
const target = {
name: this.props.name,
type: 'file',
value,
};
this.props.onChange({ target });
if (size(value) === 0) {
this.setState({ position: 0, imgURL: '' });
return this.props.updateFilePosition(0);
}
// Display the last file
const nextFile = value.slice(-1)[0];
const nextPosition = value.length -1;
this.updateFilePosition(nextPosition);
if (!nextFile.url) {
this.generateImgURL(nextFile);
} else {
this.setState({ imgURL: nextFile.url });
}
}
updateFilePosition = (newPosition) => {
this.setState({ position: newPosition });
this.props.updateFilePosition(newPosition);
}
=======
>>>>>>>
<<<<<<<
=======
updateFilePosition = (newPosition) => {
// this.setState({ position: newPosition });
this.props.updateFilePosition(newPosition);
}
>>>>>>>
updateFilePosition = (newPosition) => {
// this.setState({ position: newPosition });
this.props.updateFilePosition(newPosition);
} |
<<<<<<<
},
addRelation: async function (params) {
const association = this.associations.filter(x => x.via === params.foreignKey)[0];
if (!association) {
// Resolve silently.
return Promise.resolve();
}
switch (association.nature) {
case 'oneToOne':
case 'oneToMany':
return module.exports.update.call(this, params);
case 'manyToMany':
return this.forge({
[this.primaryKey]: params[this.primaryKey]
})[association.alias]().attach(params.values[this.primaryKey]);
default:
// Resolve silently.
return Promise.resolve();
}
},
removeRelation: async function (params) {
const association = this.associations.filter(x => x.via === params.foreignKey)[0];
if (!association) {
// Resolve silently.
return Promise.resolve();
}
switch (association.nature) {
case 'oneToOne':
case 'oneToMany':
return module.exports.update.call(this, params);
case 'manyToMany':
return this.forge({
[this.primaryKey]: params[this.primaryKey]
})[association.alias]().detach(params.values[this.primaryKey]);
default:
// Resolve silently.
return Promise.resolve();
}
},
search: async function (params) {
return this
.query(function(qb) {
qb
.where('username', 'LIKE', `%${params.id}%`)
.orWhere('email', 'LIKE', `%${params.id}%`);
})
.fetchAll();
=======
>>>>>>>
},
search: async function (params) {
return this
.query(function(qb) {
qb
.where('username', 'LIKE', `%${params.id}%`)
.orWhere('email', 'LIKE', `%${params.id}%`);
})
.fetchAll(); |
<<<<<<<
height: calc(100vh - (6rem + 3rem));
=======
height: calc(100vh - (${props => props.theme.main.sizes.leftMenu.height} + 10.2rem));
>>>>>>>
height: calc(100vh - (${props => props.theme.main.sizes.leftMenu.height} + 3rem)); |
<<<<<<<
const grant = new Grant(grantConfig);
=======
const Grant = require('grant-koa');
const grant = new Grant(strapi.plugins['users-permissions'].config.grant);
>>>>>>>
const Grant = require('grant-koa');
const grant = new Grant(grantConfig); |
<<<<<<<
const formattedError = _.get(ctx.body, 'isBoom') ? ctx.body || error.message : Boom.wrap(error, error.status, ctx.body || error.message);
=======
strapi.log.error(error);
const formattedError = _.get(ctx.body, 'isBoom') ? ctx.body : Boom.wrap(error, error.status, ctx.body);
>>>>>>>
strapi.log.error(error);
const formattedError = _.get(ctx.body, 'isBoom') ? ctx.body || error.message : Boom.wrap(error, error.status, ctx.body || error.message); |
<<<<<<<
'/3.0.0-beta.x/guides/custom-data-response',
=======
'/3.0.0-beta.x/guides/custom-admin',
>>>>>>>
'/3.0.0-beta.x/guides/custom-data-response',
'/3.0.0-beta.x/guides/custom-admin', |
<<<<<<<
width: 100%;
height: 0;
padding-top: ${({ isSmall }) =>
isSmall ? 'calc(156 / 245 * 100%)' : 'calc(397 / 431 * 100%)'};
=======
position: relative;
height: ${({ isSmall }) => (isSmall ? '127px' : '156px')};
min-width: ${({ isSmall }) => (isSmall ? '100%' : '245px')};
>>>>>>>
position: relative;
width: 100%;
height: 0;
padding-top: ${({ isSmall }) =>
isSmall ? 'calc(156 / 245 * 100%)' : 'calc(397 / 431 * 100%)'};
<<<<<<<
overflow: hidden;
=======
${({ hasError }) => {
if (hasError) {
return `
background: #F2F3F4;
border: 1px solid #FF5D00;
`;
}
return '';
}}
.card-control-wrapper {
display: none;
}
&:hover {
.card-control-wrapper {
display: flex;
z-index: 1050;
}
}
>>>>>>>
overflow: hidden;
${({ hasError }) => {
if (hasError) {
return `
background: #F2F3F4;
border: 1px solid #FF5D00;
`;
}
return '';
}}
.card-control-wrapper {
display: none;
}
&:hover {
.card-control-wrapper {
display: flex;
z-index: 1050;
}
} |
<<<<<<<
if (process.env.NODE_ENV === 'development' && server.reload === true) {
const restart = path => {
if (strapi.reload.isWatching && cluster.isWorker && !strapi.reload.isReloading) {
strapi.reload.isReloading = true;
strapi.log.info(`File changed: ${path}`);
strapi.reload();
=======
if (process.env.NODE_ENV === 'development' && server.autoReload === true) {
const options = _.assign(
{},
{
silent: false,
watch: true,
watchDirectory: process.cwd(),
watchIgnoreDotFiles: true, // Whether to ignore file starting with a '.'
watchIgnorePatterns: [
'node_modules/**/*',
'public/**/*',
'.git/**/*',
'.idea'
], // Ignore patterns to use when watching files.
killTree: true, // Kills the entire child process tree on `exit`,
spinSleepTime: 0,
command: 'node'
}
);
const child = new forever.Monitor('server.js', options);
// Run listeners
child.on('watch:restart', info => {
logger.verbose(
'Restarting due to ' +
info.file +
'... (' +
info.stat.replace(child.cwd, '.') +
')'
);
console.log();
});
child.on('exit:code', function(code) {
if (code) {
process.exit(code);
>>>>>>>
if (process.env.NODE_ENV === 'development' && server.autoReload === true) {
const restart = path => {
if (strapi.reload.isWatching && cluster.isWorker && !strapi.reload.isReloading) {
strapi.reload.isReloading = true;
strapi.log.info(`File changed: ${path}`);
strapi.reload();
<<<<<<<
const filePath = `${src}/${file}`;
if (fs.statSync(filePath).isDirectory()) setFilesToWatch(filePath);
else fs.watchFile(filePath, (evt, path) => restart(filePath));
});
};
setFilesToWatch(process.cwd());
if (cluster.isMaster) {
cluster.on('message', () => {
strapi.log.info('The server will restart\n');
_.forEach(cluster.workers, worker => worker.kill());
cluster.fork();
});
cluster.fork();
}
if (cluster.isWorker) return strapi.start(afterwards);
else return;
}
=======
>>>>>>>
const filePath = `${src}/${file}`;
if (fs.statSync(filePath).isDirectory()) setFilesToWatch(filePath);
else fs.watchFile(filePath, (evt, path) => restart(filePath));
});
};
setFilesToWatch(process.cwd());
if (cluster.isMaster) {
cluster.on('message', () => {
strapi.log.info('The server will restart\n');
_.forEach(cluster.workers, worker => worker.kill());
cluster.fork();
});
cluster.fork();
}
if (cluster.isWorker) return strapi.start(afterwards);
else return;
}
<<<<<<<
strapi.start(afterwards);
=======
const strapi = function () {
try {
return require(path.resolve(process.cwd(), 'node_modules', 'strapi'));
} catch (e) {
return require('strapi');
}
}();
strapi.start();
>>>>>>>
strapi.start(afterwards); |
<<<<<<<
// Exports must appear outside a function, but will only be defined in main thread (below)
export var LeafletLayer;
export function leafletLayer(options) {
return new LeafletLayer(options);
}
// Leaflet layer functionality is only defined in main thread
Utils.inMainThread(() => {
=======
import log from 'loglevel';
export var LeafletLayer = L.GridLayer.extend({
initialize: function (options) {
L.setOptions(this, options);
this.createScene();
this.hooks = {};
},
createScene: function () {
this.scene = Scene.create({
tile_source: this.options.vectorTileSource,
layers: this.options.vectorLayers,
styles: this.options.vectorStyles
}, {
numWorkers: this.options.numWorkers,
preRender: this.options.preRender,
postRender: this.options.postRender,
// advanced option, app will have to manually called scene.render() per frame
disableRenderLoop: this.options.disableRenderLoop
});
},
// Finish initializing scene and setup events when layer is added to map
onAdd: function () {
if (!this.scene) {
this.createScene();
}
>>>>>>>
import log from 'loglevel';
// Exports must appear outside a function, but will only be defined in main thread (below)
export var LeafletLayer;
export function leafletLayer(options) {
return new LeafletLayer(options);
}
// Leaflet layer functionality is only defined in main thread
Utils.inMainThread(() => { |
<<<<<<<
<Carret isUp={!isOpen} />
</DropdownButton>
<DropdownSection isOpen={isOpen}>
<SortList list={orders} selected={value} onClick={handleChange} />
</DropdownSection>
=======
</SortButton>
<SortList
isShown={isOpen}
list={orders}
selectedItem={value}
onClick={handleChange}
/>
>>>>>>>
<Carret isUp={!isOpen} />
</DropdownButton>
<DropdownSection isOpen={isOpen}>
<SortList
isShown={isOpen}
list={orders}
selectedItem={value}
onClick={handleChange}
/>
</DropdownSection> |
<<<<<<<
import InputDateWithErrors from 'components/InputDateWithErrors';
=======
import InputCheckboxWithErrors from 'components/InputCheckboxWithErrors';
>>>>>>>
import InputCheckboxWithErrors from 'components/InputCheckboxWithErrors';
import InputDateWithErrors from 'components/InputDateWithErrors';
<<<<<<<
date: InputDateWithErrors,
=======
checkbox: InputCheckboxWithErrors,
>>>>>>>
checkbox: InputCheckboxWithErrors,
date: InputDateWithErrors,
<<<<<<<
InputDateWithErrors,
=======
InputCheckboxWithErrors,
>>>>>>>
InputCheckboxWithErrors,
InputDateWithErrors, |
<<<<<<<
function Row({ canDelete, canUpdate, isBulkable, row, headers }) {
const { entriesToDelete, onChangeBulk, onClickDelete } = useListView();
const { emitEvent } = useGlobalContext();
const emitEventRef = useRef(emitEvent);
=======
function Row({ canCreate, canDelete, canUpdate, isBulkable, row, headers, goTo }) {
const { entriesToDelete, onChangeBulk, onClickDelete, schema } = useListView();
>>>>>>>
function Row({ canCreate, canDelete, canUpdate, isBulkable, row, headers, goTo }) {
const { entriesToDelete, onChangeBulk, onClickDelete } = useListView();
const { emitEvent } = useGlobalContext();
const emitEventRef = useRef(emitEvent); |
<<<<<<<
const [user, error] = await strapi.plugins['users-permissions'].services.providers.connect(provider, access_token);
if (error) {
return ctx.badRequest(null, (error === 'array') ? (ctx.request.admin ? error[0] : error[1]) : error);
}
=======
const user = await strapi.plugins['users-permissions'].services.providers.connect(provider, ctx.query);
>>>>>>>
const [user, error] = await strapi.plugins['users-permissions'].services.providers.connect(provider, ctx.query);
if (error) {
return ctx.badRequest(null, (error === 'array') ? (ctx.request.admin ? error[0] : error[1]) : error);
} |
<<<<<<<
if (!_.get(strapi.plugins['users-permissions'].config.grant['email'], 'enabled') && !ctx.request.admin) {
return ctx.badRequest(null, 'This provider is disabled.');
}
=======
if (!_.get(strapi.plugins['users-permissions'].config.grant[provider], 'enabled') && !ctx.request.admin) {
return ctx.badRequest(null, 'This provider is disabled.');
}
>>>>>>>
if (!_.get(strapi.plugins['users-permissions'].config.grant['email'], 'enabled') && !ctx.request.admin) {
return ctx.badRequest(null, 'This provider is disabled.');
}
<<<<<<<
try {
const [user, error] = await strapi.plugins['users-permissions'].services.providers.connect(provider, ctx.query);
} catch([user, error]) {
return ctx.badRequest(null, (error === 'array') ? (ctx.request.admin ? error[0] : error[1]) : error);
}
=======
const [user, error] = await strapi.plugins['users-permissions'].services.providers.connect(provider, ctx.query);
if (error) {
return ctx.badRequest(null, (error === 'array') ? (ctx.request.admin ? error[0] : error[1]) : error);
}
>>>>>>>
try {
const [user, error] = await strapi.plugins['users-permissions'].services.providers.connect(provider, ctx.query);
} catch([user, error]) {
return ctx.badRequest(null, (error === 'array') ? (ctx.request.admin ? error[0] : error[1]) : error);
}
<<<<<<<
from: (settings.from.email || settings.from.email) ? `"${settings.from.name}" <${settings.from.email}>` : undefined,
replyTo: settings.response_email,
subject: object,
text: message,
html: message
=======
from: (settings.from.email || settings.from.name) ? `"${settings.from.name}" <${settings.from.email}>` : undefined,
replyTo: settings.respond,
subject: settings.object,
text: settings.message,
html: settings.message
>>>>>>>
from: (settings.from.email || settings.from.name) ? `"${settings.from.name}" <${settings.from.email}>` : undefined,
replyTo: settings.response_email,
subject: settings.object,
text: settings.message,
html: settings.message |
<<<<<<<
const { id, model } = ctx.params;
=======
const contentManagerService =
strapi.plugins['content-manager'].services.contentmanager;
const { model } = ctx.params;
>>>>>>>
const { id, model } = ctx.params;
const contentManagerService =
strapi.plugins['content-manager'].services.contentmanager; |
<<<<<<<
// Update config (in case JS objects were manipulated directly)
this.config_serialized = Utils.serializeWithFunctions(this.config);
=======
// Profiling
if (this.profile_geometry_build) {
console.profile('main thread: rebuildGeometry');
this.workers.forEach(w => WorkerBroker.postMessage(w, 'profile', 'rebuildGeometry'));
}
// Update layers & styles (in case JS objects were manipulated directly)
this.layers_serialized = Utils.serializeWithFunctions(this.layers);
this.styles_serialized = Utils.serializeWithFunctions(this.styles);
>>>>>>>
// Profiling
if (this.profile_geometry_build) {
console.profile('main thread: rebuildGeometry');
this.workers.forEach(w => WorkerBroker.postMessage(w, 'profile', 'rebuildGeometry'));
}
// Update config (in case JS objects were manipulated directly)
this.config_serialized = Utils.serializeWithFunctions(this.config); |
<<<<<<<
await deleteComponents(entry, { transacting: trx });
await model.forge(params).destroy({ transacting: trx, require: false });
=======
await deleteGroups(entry, { transacting: trx });
await model.where(params).destroy({ transacting: trx, require: false });
>>>>>>>
await deleteComponents(entry, { transacting: trx });
await model.where(params).destroy({ transacting: trx, require: false });
<<<<<<<
await updateOrCreateComponentAndLink({
componentModel,
key,
value: componentValue,
order: 1,
=======
const updateOrCreateGroupAndLink = async ({ value, order }) => {
// check if value has an id then update else create
if (_.has(value, groupModel.primaryKey)) {
return strapi
.query(groupModel.uid)
.update(
{
[groupModel.primaryKey]: value[groupModel.primaryKey],
},
value,
{ transacting }
)
.then(group => {
return joinModel
.where({
[foreignKey]: entry.id,
group_type: groupModel.collectionName,
group_id: group.id,
field: key,
})
.save(
{
order,
},
{ transacting, patch: true, require: false }
);
>>>>>>>
await updateOrCreateComponentAndLink({
componentModel,
key,
value: componentValue,
order: 1,
<<<<<<<
.forge()
.query(qb =>
qb.whereIn('component_id', idsToDelete).andWhere('field', key)
)
=======
.query(qb => qb.whereIn('group_id', idsToDelete).andWhere('field', key))
>>>>>>>
.query(qb =>
qb.whereIn('component_id', idsToDelete).andWhere('field', key)
)
<<<<<<<
const componentModel = strapi.components[component];
=======
const ids = await joinModel
.where({
[foreignKey]: entry.id,
group_type: groupModel.collectionName,
field: key,
})
.fetchAll({ transacting })
.map(el => el.get('group_id'));
>>>>>>>
const componentModel = strapi.components[component];
<<<<<<<
await strapi
.query(componentModel.uid)
.delete(
{ [`${componentModel.primaryKey}_in`]: ids },
{ transacting }
);
await joinModel
.forge()
.query({
where: {
[foreignKey]: entry.id,
field: key,
},
})
.destroy({ transacting, require: false });
break;
}
case 'dynamiczone': {
const { components } = attr;
const componentJoins = await joinModel
.forge()
.query({
where: {
[foreignKey]: entry.id,
field: key,
},
})
.fetchAll({ transacting })
.map(el => ({
id: el.get('component_id'),
componentType: el.get('component_type'),
}));
for (const compo of components) {
const { uid, collectionName } = strapi.components[compo];
const model = strapi.query(uid);
const toDelete = componentJoins.filter(
el => el.componentType === collectionName
);
if (toDelete.length > 0) {
await model.delete(
{
[`${model.primaryKey}_in`]: toDelete.map(el => el.id),
},
{ transacting }
);
}
}
await joinModel
.forge()
.query({
where: {
[foreignKey]: entry.id,
field: key,
},
})
.destroy({ transacting, require: false });
break;
}
}
=======
await joinModel
.where({
[foreignKey]: entry.id,
group_type: groupModel.collectionName,
field: key,
})
.destroy({ transacting, require: false });
>>>>>>>
await strapi
.query(componentModel.uid)
.delete(
{ [`${componentModel.primaryKey}_in`]: ids },
{ transacting }
);
await joinModel
.where({
[foreignKey]: entry.id,
field: key,
})
.destroy({ transacting, require: false });
break;
}
case 'dynamiczone': {
const { components } = attr;
const componentJoins = await joinModel
.where({
[foreignKey]: entry.id,
field: key,
})
.fetchAll({ transacting })
.map(el => ({
id: el.get('component_id'),
componentType: el.get('component_type'),
}));
for (const compo of components) {
const { uid, collectionName } = strapi.components[compo];
const model = strapi.query(uid);
const toDelete = componentJoins.filter(
el => el.componentType === collectionName
);
if (toDelete.length > 0) {
await model.delete(
{
[`${model.primaryKey}_in`]: toDelete.map(el => el.id),
},
{ transacting }
);
}
}
await joinModel
.where({
[foreignKey]: entry.id,
field: key,
})
.destroy({ transacting, require: false });
break;
}
} |
<<<<<<<
import InputSelectWithErrors from 'components/InputSelectWithErrors';
=======
import InputPasswordWithErrors from 'components/InputPasswordWithErrors';
>>>>>>>
import InputSelectWithErrors from 'components/InputSelectWithErrors';
import InputPasswordWithErrors from 'components/InputPasswordWithErrors';
<<<<<<<
select: InputSelectWithErrors,
=======
password: InputPasswordWithErrors,
>>>>>>>
password: InputPasswordWithErrors,
select: InputSelectWithErrors,
<<<<<<<
InputSelectWithErrors,
=======
InputPasswordWithErrors,
>>>>>>>
InputPasswordWithErrors,
InputSelectWithErrors, |
<<<<<<<
return (
<Wrapper className={showLoaders && 'load-container'}>
{showLoaders ? (
<LoadingIndicator />
) : (
<div>
<div className="row">
<Input
inputDescription={{
id: 'users-permissions.EditForm.inputSelect.description.role',
}}
label={{
id: 'users-permissions.EditForm.inputSelect.label.role',
}}
name="advanced.settings.default_role"
onChange={onChange}
selectOptions={generateSelectOptions()}
type="select"
value={get(settings, 'default_role')}
/>
<div className="col-6"></div>
<Input
label={{
id: 'users-permissions.EditForm.inputToggle.label.email',
}}
inputDescription={{
id: 'users-permissions.EditForm.inputToggle.description.email',
}}
name="advanced.settings.unique_email"
onChange={onChange}
type="toggle"
value={get(settings, 'unique_email')}
/>
<div className="col-6"></div>
<Input
label={{
id: 'users-permissions.EditForm.inputToggle.label.sign-up',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.sign-up',
}}
name="advanced.settings.allow_register"
onChange={onChange}
type="toggle"
value={get(settings, 'allow_register')}
/>
<div className="col-6"></div>
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation',
}}
name="advanced.settings.email_confirmation"
onChange={onChange}
type="toggle"
value={get(settings, 'email_confirmation')}
/>
<div className="col-6"></div>
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation-redirection',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation-redirection',
}}
name="advanced.settings.email_confirmation_redirection"
onChange={onChange}
type="text"
value={get(settings, 'email_confirmation_redirection')}
/>
</div>
=======
render() {
if (this.props.showLoaders) {
return (
<div
className={cn(
styles.editForm,
this.props.showLoaders && styles.loadIndicatorContainer
)}
>
<LoadingIndicator />
</div>
);
}
return (
<div className={styles.editForm}>
<div className="row">
<Input
inputDescription={{
id: 'users-permissions.EditForm.inputSelect.description.role',
}}
inputClassName={styles.inputStyle}
label={{ id: 'users-permissions.EditForm.inputSelect.label.role' }}
name="advanced.settings.default_role"
onChange={this.props.onChange}
selectOptions={this.generateSelectOptions()}
type="select"
value={get(this.props.values.settings, 'default_role')}
/>
</div>
<div className={styles.separator} />
<div className="row">
<Input
label={{ id: 'users-permissions.EditForm.inputToggle.label.email' }}
inputDescription={{
id: 'users-permissions.EditForm.inputToggle.description.email',
}}
name="advanced.settings.unique_email"
onChange={this.props.onChange}
type="toggle"
value={get(this.props.values.settings, 'unique_email')}
/>
</div>
<div className={styles.separator} />
{/*}
<div className="row">
<Input
customBootstrapClass="col-md-3"
label="users-permissions.EditForm.inputSelect.subscriptions.label"
inputDescription="users-permissions.EditForm.inputSelect.subscriptions.description"
name="subscriptions"
onChange={this.props.onChange}
type="number"
validations={{}}
value={get(this.props.values, 'subscriptions')}
/>
<div className="col-md-3" />
<Input
customBootstrapClass="col-md-3"
label="users-permissions.EditForm.inputSelect.durations.label"
inputDescription="users-permissions.EditForm.inputSelect.durations.description"
name="durations"
onChange={this.props.onChange}
type="number"
validations={{}}
value={get(this.props.values, 'durations')}
/>
</div>
<div className={styles.separator} />
*/}
<div className="row">
<Input
label={{
id: 'users-permissions.EditForm.inputToggle.label.sign-up',
}}
inputDescription={{
id: 'users-permissions.EditForm.inputToggle.description.sign-up',
}}
name="advanced.settings.allow_register"
onChange={this.props.onChange}
type="toggle"
value={get(this.props.values.settings, 'allow_register')}
/>
</div>
<div className={styles.separator} />
<div className="row">
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-reset-password',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-reset-password',
}}
name="advanced.settings.email_reset_password"
onChange={this.props.onChange}
type="text"
value={get(this.props.values.settings, 'email_reset_password')}
/>
</div>
<div className={styles.separator} />
<div className="row">
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation',
}}
name="advanced.settings.email_confirmation"
onChange={this.props.onChange}
type="toggle"
value={get(this.props.values.settings, 'email_confirmation')}
/>
</div>
<div className="row">
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation-redirection',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation-redirection',
}}
name="advanced.settings.email_confirmation_redirection"
onChange={this.props.onChange}
type="text"
value={get(
this.props.values.settings,
'email_confirmation_redirection'
)}
/>
>>>>>>>
return (
<Wrapper className={showLoaders && 'load-container'}>
{showLoaders ? (
<LoadingIndicator />
) : (
<div>
<div className="row">
<Input
inputDescription={{
id: 'users-permissions.EditForm.inputSelect.description.role',
}}
label={{
id: 'users-permissions.EditForm.inputSelect.label.role',
}}
name="advanced.settings.default_role"
onChange={onChange}
selectOptions={generateSelectOptions()}
type="select"
value={get(settings, 'default_role')}
/>
<div className="col-6"></div>
<Input
label={{
id: 'users-permissions.EditForm.inputToggle.label.email',
}}
inputDescription={{
id: 'users-permissions.EditForm.inputToggle.description.email',
}}
name="advanced.settings.unique_email"
onChange={onChange}
type="toggle"
value={get(settings, 'unique_email')}
/>
<div className="col-6"></div>
<Input
label={{
id: 'users-permissions.EditForm.inputToggle.label.sign-up',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.sign-up',
}}
name="advanced.settings.allow_register"
onChange={onChange}
type="toggle"
value={get(settings, 'allow_register')}
/>
<div className="col-6"></div>
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-reset-password',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-reset-password',
}}
name="advanced.settings.email_reset_password"
onChange={onChange}
type="text"
value={get(settings, 'email_reset_password')}
/>
<div className="col-6"></div>
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation',
}}
name="advanced.settings.email_confirmation"
onChange={onChange}
type="toggle"
value={get(settings, 'email_confirmation')}
/>
<div className="col-6"></div>
<Input
label={{
id:
'users-permissions.EditForm.inputToggle.label.email-confirmation-redirection',
}}
inputDescription={{
id:
'users-permissions.EditForm.inputToggle.description.email-confirmation-redirection',
}}
name="advanced.settings.email_confirmation_redirection"
onChange={onChange}
type="text"
value={get(settings, 'email_confirmation_redirection')}
/>
</div> |
<<<<<<<
=======
// Local helpers.
const utils = require('./utils/');
const relations = require('./relations');
>>>>>>>
<<<<<<<
},
manageRelations: async function (model, params) {
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => {
_.assign(acc, strapi.plugins[current].models);
return acc;
}, {}));
const Model = models[model];
const virtualFields = [];
const record = await Model
.forge({
[Model.primaryKey]: params[Model.primaryKey]
})
.fetch({
withRelated: Model.associations.map(x => x.alias)
});
const response = record ? record.toJSON() : record;
// Only update fields which are on this document.
const values = params.parseRelationships === false ? params.values : Object.keys(JSON.parse(JSON.stringify(params.values))).reduce((acc, current) => {
const association = Model.associations.filter(x => x.alias === current)[0];
const details = Model._attributes[current];
if (_.get(Model._attributes, `${current}.isVirtual`) !== true && _.isUndefined(association)) {
acc[current] = params.values[current];
} else {
switch (association.nature) {
case 'oneWay':
acc[current] = _.get(params.values[current], this.primaryKey, params.values[current]) || null;
break;
case 'oneToOne':
if (response[current] !== params.values[current]) {
const value = _.isNull(params.values[current]) ? response[current] : params.values;
const recordId = _.isNull(params.values[current]) ? value[Model.primaryKey] || value.id || value._id : typeof value[current] === 'object' ? value[current].id : value[current];
if (response[current] && _.isObject(response[current]) && response[current][Model.primaryKey] !== value[current]) {
virtualFields.push(
this.manageRelations(details.collection || details.model, {
id: response[current][Model.primaryKey],
values: {
[details.via]: null
},
parseRelationships: false
})
);
}
// Remove previous relationship asynchronously if it exists.
virtualFields.push(
models[details.model || details.collection]
.forge({ id : recordId })
.fetch({
withRelated: models[details.model || details.collection].associations.map(x => x.alias)
})
.then(response => {
const record = response ? response.toJSON() : response;
if (record && _.isObject(record[details.via]) && record[details.via][current] !== value[current]) {
return this.manageRelations(model, {
id: record[details.via][models[details.model || details.collection].primaryKey] || record[details.via].id,
values: {
[current]: null
},
parseRelationships: false
});
}
return Promise.resolve();
})
);
// Update the record on the other side.
// When params.values[current] is null this means that we are removing the relation.
virtualFields.push(this.manageRelations(details.model || details.collection, {
id: recordId,
values: {
[details.via]: _.isNull(params.values[current]) ? null : value[Model.primaryKey] || params.id || params._id || value.id || value._id
},
parseRelationships: false
}));
acc[current] = _.isNull(params.values[current]) ? null : typeof value[current] === 'object' ? value[current][Model.primaryKey] : value[current];
}
break;
case 'oneToMany':
case 'manyToOne':
case 'manyToMany':
if (details.dominant === true) {
acc[current] = params.values[current];
} else if (response[current] && _.isArray(response[current]) && current !== 'id') {
// Records to add in the relation.
const toAdd = _.differenceWith(params.values[current], response[current], (a, b) =>
((typeof a === 'number') ? a : a[Model.primaryKey].toString()) === b[Model.primaryKey].toString()
);
// Records to remove in the relation.
const toRemove = _.differenceWith(response[current], params.values[current], (a, b) =>
a[Model.primaryKey].toString() === ((typeof b === 'number') ? b : b[Model.primaryKey].toString())
)
.filter(x => toAdd.find(y => x.id === y.id) === undefined);
// Push the work into the flow process.
toAdd.forEach(value => {
value = (typeof value === 'number') ? { id: value } : value;
value[details.via] = parseFloat(params[Model.primaryKey]);
params.values[Model.primaryKey] = parseFloat(params[Model.primaryKey]);
virtualFields.push(this.addRelation(details.model || details.collection, {
id: value[Model.primaryKey] || value.id || value._id,
values: association.nature === 'manyToMany' ? params.values : value,
foreignKey: current
}, details.plugin));
});
toRemove.forEach(value => {
value[details.via] = null;
virtualFields.push(this.removeRelation(details.model || details.collection, {
id: value[Model.primaryKey] || value.id || value._id,
values: association.nature === 'manyToMany' ? params.values : value,
foreignKey: current
}, details.plugin));
});
} else if (_.get(Model._attributes, `${current}.isVirtual`) !== true) {
acc[current] = params.values[current];
}
break;
case 'manyMorphToMany':
case 'manyMorphToOne':
// Update the relational array.
params.values[current].forEach(obj => {
const model = obj.source && obj.source !== 'content-manager' ?
strapi.plugins[obj.source].models[obj.ref]:
strapi.models[obj.ref];
virtualFields.push(this.addRelationMorph(details.model || details.collection, {
id: response[this.primaryKey],
alias: association.alias,
ref: model.collectionName,
refId: obj.refId,
field: obj.field
}, obj.source));
});
break;
case 'oneToManyMorph':
case 'manyToManyMorph':
const transformToArrayID = (array) => {
if(_.isArray(array)) {
return array.map(value => {
if (_.isPlainObject(value)) {
return value._id || value.id;
}
return value;
});
}
if (association.type === 'model') {
return _.isEmpty(array) ? [] : transformToArrayID([array]);
}
return [];
};
// Compare array of ID to find deleted files.
const currentValue = transformToArrayID(response[current]).map(id => id.toString());
const storedValue = transformToArrayID(params.values[current]).map(id => id.toString());
const toAdd = _.difference(storedValue, currentValue);
const toRemove = _.difference(currentValue, storedValue);
toAdd.forEach(id => {
virtualFields.push(this.addRelationMorph(details.model || details.collection, {
id,
alias: association.via,
ref: Model.collectionName,
refId: response.id,
field: association.alias
}, details.plugin));
});
// Update the relational array.
toRemove.forEach(id => {
virtualFields.push(this.removeRelationMorph(details.model || details.collection, {
id,
alias: association.via,
ref: Model.collectionName,
refId: response.id,
field: association.alias
}, details.plugin));
});
break;
case 'oneMorphToOne':
case 'oneMorphToMany':
break;
default:
}
}
return acc;
}, {});
if (!_.isEmpty(values)) {
virtualFields.push(Model
.forge({
[Model.primaryKey]: params[Model.primaryKey]
})
.save(values, {
patch: true
}));
} else {
virtualFields.push(Promise.resolve(_.assign(response, params.values)));
}
// Update virtuals fields.
await Promise.all(virtualFields);
},
addRelation: async function (model, params, source) {
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => {
_.assign(acc, strapi.plugins[current].models);
return acc;
}, {}));
const Model = models[model];
const association = Model.associations.filter(x => x.via === params.foreignKey)[0];
if (!association) {
// Resolve silently.
return Promise.resolve();
}
switch (association.nature) {
case 'oneToOne':
case 'oneToMany':
return this.manageRelations(model, params);
case 'manyToMany':
return Model.forge({
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
})[association.alias]().attach(params.values[Model.primaryKey]);
default:
// Resolve silently.
return Promise.resolve();
}
},
removeRelation: async function (model, params, source) {
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => {
_.assign(acc, strapi.plugins[current].models);
return acc;
}, {}));
const Model = models[model];
const association = Model.associations.filter(x => x.via === params.foreignKey)[0];
if (!association) {
// Resolve silently.
return Promise.resolve();
}
switch (association.nature) {
case 'oneToOne':
case 'oneToMany':
return this.manageRelations(model, params);
case 'manyToMany':
return Model.forge({
[Model.primaryKey]: parseFloat(params[Model.primaryKey])
})[association.alias]().detach(params.values[Model.primaryKey]);
default:
// Resolve silently.
return Promise.resolve();
}
},
addRelationMorph: async function (model, params, source) {
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => {
_.assign(acc, strapi.plugins[current].models);
return acc;
}, {}));
const Model = models[model];
const record = await Model.morph.forge()
.where({
[`${Model.collectionName}_id`]: params.id,
[`${params.alias}_id`]: params.refId,
[`${params.alias}_type`]: params.ref,
field: params.field
})
.fetch({
withRelated: Model.associations.map(x => x.alias)
});
const entry = record ? record.toJSON() : record;
if (entry) {
return Promise.resolve();
}
return await Model.morph.forge({
[`${Model.collectionName}_id`]: params.id,
[`${params.alias}_id`]: params.refId,
[`${params.alias}_type`]: params.ref,
field: params.field
})
.save();
},
removeRelationMorph: async function (model, params, source) {
const models = _.assign(_.clone(strapi.models), Object.keys(strapi.plugins).reduce((acc, current) => {
_.assign(acc, strapi.plugins[current].models);
return acc;
}, {}));
const Model = models[model];
return await Model.morph.forge()
.where({
[`${Model.collectionName}_id`]: params.id,
[`${params.alias}_id`]: params.refId,
[`${params.alias}_type`]: params.ref,
field: params.field
})
.destroy();
=======
>>>>>>> |
<<<<<<<
<Touchable onPress={() => props.onPhotoPressed(props.photo)}>
=======
<TouchableNativeFeedback onPress={() => openMoreDetails(photo) }>
>>>>>>>
<Touchable onPress={() => openMoreDetails(photo) }>
<<<<<<<
</Touchable>
<SharedView name={`title-${url}`} containerRouteName='ROUTE_PHOTO_DETAIL'>
=======
</TouchableNativeFeedback>
<SharedView name={`title-${url}`} containerRouteName='PhotoDetail'>
>>>>>>>
</Touchable>
<SharedView name={`title-${url}`} containerRouteName='PhotoDetail'> |
<<<<<<<
+ (this.props.marginTop ? ' ' + styles.marginTop : '')
=======
+ (this.props.centered ? ' ' + styles.centered : '')
>>>>>>>
+ (this.props.marginTop ? ' ' + styles.marginTop : '')
+ (this.props.centered ? ' ' + styles.centered : '') |
<<<<<<<
import { selectIndependentVariable, selectRegressionType, createInteractionTerm } from '../../../actions/RegressionActions';
=======
import { selectIndependentVariable, selectRegressionType } from '../../../actions/RegressionActions';
import { createURL } from '../../../helpers/helpers.js';
>>>>>>>
import { selectIndependentVariable, selectRegressionType, createInteractionTerm } from '../../../actions/RegressionActions';
import { createURL } from '../../../helpers/helpers.js';
<<<<<<<
const interactionTermNames = regressionSelector.interactionTermIds.map((idTuple) => {
return fieldProperties.items.filter((property) => property.id == idTuple[0] || property.id == idTuple[1]).map((item) => item.name)
})
=======
var shownRegressionTypes = regressionTypes;
if(fieldProperties.items.length > 0) {
const dependentVariableType = fieldProperties.items.find((property) => property.id == regressionSelector.dependentVariableId);
if(dependentVariableType == 'decimal') {
shownRegressionTypes = regressionTypes.filter((type) => type.value != 'logistic')
}
}
>>>>>>>
const interactionTermNames = regressionSelector.interactionTermIds.map((idTuple) => {
return fieldProperties.items.filter((property) => property.id == idTuple[0] || property.id == idTuple[1]).map((item) => item.name)
})
var shownRegressionTypes = regressionTypes;
if(fieldProperties.items.length > 0) {
const dependentVariableType = fieldProperties.items.find((property) => property.id == regressionSelector.dependentVariableId);
if(dependentVariableType == 'decimal') {
shownRegressionTypes = regressionTypes.filter((type) => type.value != 'logistic')
}
} |
<<<<<<<
const { specs, filters, filteredVisualizationTypes, gallerySelector, selectSortingFunction } = this.props;
=======
const { specs, filters, gallerySelector, exportedSpecs, selectSortingFunction } = this.props;
const selectedVisualizationTypes = filters.visualizationTypes
.filter((filter) => filter.selected)
.map((filter) => filter.type);
>>>>>>>
const { specs, filters, filteredVisualizationTypes, gallerySelector, exportedSpecs, selectSortingFunction } = this.props;
<<<<<<<
<div className={ styles.visualizationBlocksContainer } key={ spec.id }>
<Visualization
visualizationTypes={ filteredVisualizationTypes }
spec={ spec }
data={ spec.data.visualize }
onClick={ this.handleClick }
isMinimalView={ true }
showHeader={ true } />
</div>
=======
<VisualizationBlock
key={ spec.id }
spec={ spec }
selectedVisualizationTypes={ selectedVisualizationTypes }
exportedSpecs={ exportedSpecs }
onClick={ this.onClickVisualization.bind(this) }
saveVisualization={ this.saveVisualization.bind(this) }
/>
>>>>>>>
<VisualizationBlock
key={ spec.id }
spec={ spec }
filteredVisualizationTypes={ filteredVisualizationTypes }
exportedSpecs={ exportedSpecs }
onClick={ this.onClickVisualization.bind(this) }
saveVisualization={ this.saveVisualization.bind(this) }
/>
<<<<<<<
datasetSelector: PropTypes.object.isRequired,
filteredVisualizationTypes: PropTypes.array.isRequired
=======
datasetSelector: PropTypes.object.isRequired,
exportedSpecs: PropTypes.object.isRequired
>>>>>>>
datasetSelector: PropTypes.object.isRequired,
filteredVisualizationTypes: PropTypes.array.isRequired,
exportedSpecs: PropTypes.object.isRequired |
<<<<<<<
Components.utils.import("resource://scriptish/scriptdownloader.js");
=======
Components.utils.import("resource://scriptish/utils/GM_newUserScript.js");
>>>>>>>
Components.utils.import("resource://scriptish/scriptdownloader.js");
Components.utils.import("resource://scriptish/utils/GM_newUserScript.js"); |
<<<<<<<
=======
GM_BrowserUI.manageMenuItemClicked = function() {
GM_openUserScriptManager();
};
GM_BrowserUI.managePageMenuItemClicked = function() {
var attempts = 20;
BrowserOpenAddonsMgr('userscripts');
// wait a bit for the window to open
function tryToSetFilterLater() {
if (0 > attempts--) return;
setTimeout(setFilterToPage, 150);
}
function setFilterToPage() {
// get a reference to the extension manager window opened
var win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator)
.getMostRecentWindow("Extension:Manager");
if (!win) return tryToSetFilterLater();
var filterText = win.document.getElementById('userscriptsFilterText');
if (!filterText) return tryToSetFilterLater();
filterText.value = getBrowser().contentWindow.location.href;
var filterBy = win.document.getElementById('userscriptsFilterBy');
filterBy.selectedIndex = 1;
win.greasemonkeyAddons.fillList();
}
tryToSetFilterLater();
};
>>>>>>>
GM_BrowserUI.managePageMenuItemClicked = function() {
var attempts = 20;
BrowserOpenAddonsMgr('userscripts');
// wait a bit for the window to open
function tryToSetFilterLater() {
if (0 > attempts--) return;
setTimeout(setFilterToPage, 150);
}
function setFilterToPage() {
// get a reference to the extension manager window opened
var win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator)
.getMostRecentWindow("Extension:Manager");
if (!win) return tryToSetFilterLater();
var filterText = win.document.getElementById('userscriptsFilterText');
if (!filterText) return tryToSetFilterLater();
filterText.value = getBrowser().contentWindow.location.href;
var filterBy = win.document.getElementById('userscriptsFilterBy');
filterBy.selectedIndex = 1;
win.greasemonkeyAddons.fillList();
}
tryToSetFilterLater();
}; |
<<<<<<<
const metaRegExp = /\/\/ (?:==\/?UserScript==|\@\S+(?:\s+(?:[^\n]+))?)/g;
const scope = (typeof AddonManager != 'undefined') ? AddonManager.SCOPE_PROFILE : null;
=======
const metaRegExp = /\/\/ (?:==\/?UserScript==|\@\S+(?:\s+(?:[^\r\f\n]+))?)/g;
>>>>>>>
const metaRegExp = /\/\/ (?:==\/?UserScript==|\@\S+(?:\s+(?:[^\r\f\n]+))?)/g;
const scope = (typeof AddonManager != 'undefined') ? AddonManager.SCOPE_PROFILE : null;
<<<<<<<
get creator() { return null },
=======
get author() { return this._author; },
>>>>>>>
get creator() { return this.author; },
get author() { return this._author; }, |
<<<<<<<
document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
function DOMContentLoaded() {
document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
function $(aID) document.getElementById(aID);
=======
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
(function() {
>>>>>>>
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
function $(aID) document.getElementById(aID);
(function() {
<<<<<<<
// Run tests
=======
var head = document.documentElement.firstChild;
>>>>>>>
var head = document.documentElement.firstChild;
<<<<<<<
document.getElementsByTagName("head")[0].appendChild(script);
=======
head.appendChild(script);
>>>>>>>
head.appendChild(script);
<<<<<<<
include("test/qunit.js", function() {
include("test/runTests.js", function() {
$("main").style.display = "none";
$("test").style.display = "inherit";
runTests();
=======
include("test/jquery-1.6.1.min.js", function() {
include("test/qunit.js", function() {
include("test/runTests.js", function() {
$("#main").hide();
$("#test").show();
runTests();
});
>>>>>>>
include("test/qunit.js", function() {
include("test/runTests.js", function() {
$("main").style.display = "none";
$("test").style.display = "inherit";
runTests();
<<<<<<<
// Show about:scriptish
var tools = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tools);
var addPerson = function(aTarget, aPerson) {
var li = document.createElement("li");
var person = aPerson.name.split(/; +/);
li.innerHTML = person[0];
if (person[1]) {
var a = document.createElement("a");
a.innerHTML = person[1].replace(/^mailto:/i, "");
a.setAttribute("href", person[1]);
li.innerHTML += " — ";
li.appendChild(a);
}
aTarget.appendChild(li);
}
tools.AddonManager.getAddonByID("[email protected]", function(aAddon) {
var contlist = $("contlist");
var translist = $("translist");
aAddon.contributors.forEach(function(val) addPerson(contlist, val));
aAddon.translators.forEach(function(val) addPerson(translist, val));
});
}
=======
})();
>>>>>>>
// Show about:scriptish
var tools = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tools);
var addPerson = function(aTarget, aPerson) {
var li = document.createElement("li");
var person = aPerson.name.split(/; +/);
li.innerHTML = person[0];
if (person[1]) {
var a = document.createElement("a");
a.innerHTML = person[1].replace(/^mailto:/i, "");
a.setAttribute("href", person[1]);
li.innerHTML += " — ";
li.appendChild(a);
}
aTarget.appendChild(li);
}
tools.AddonManager.getAddonByID("[email protected]", function(aAddon) {
var contlist = $("contlist");
var translist = $("translist");
aAddon.contributors.forEach(function(val) addPerson(contlist, val));
aAddon.translators.forEach(function(val) addPerson(translist, val));
});
})(); |
<<<<<<<
let page, xhrEvent, logEvent, framePromises, frameNavigationPromise;
=======
const { createJsDialogEventName } = require('./util');
let page, xhrEvent, logEvent, framePromises = {}, frameNavigationPromise = {};
>>>>>>>
const { createJsDialogEventName } = require('./util');
let page, xhrEvent, logEvent, framePromises, frameNavigationPromise; |
<<<<<<<
let { openBrowser,closeBrowser, client } = require('../../lib/taiko');
=======
let { openBrowser,closeBrowser } = require('../../lib/taiko');
let { openBrowserArgs } = require('./test-util');
>>>>>>>
let { openBrowser,closeBrowser, client } = require('../../lib/taiko');
let { openBrowserArgs } = require('./test-util'); |
<<<<<<<
this.anchor = Array.isArray(this.layout.anchor) ? this.layout.anchor[0] : this.layout.anchor; // initial anchor
this.placed = null;
=======
this.offset = options.offset;
>>>>>>>
this.anchor = Array.isArray(this.layout.anchor) ? this.layout.anchor[0] : this.layout.anchor; // initial anchor
this.placed = null;
this.offset = options.offset;
<<<<<<<
// `exclude` is an optional label to exclude from collisions with this label
// (e.g. useful for linked objects that shouldn't affect each other's placement)
discard (bboxes, exclude = null) {
// Should the label be culled if it can't fit inside the tile bounds?
if (this.layout.cull_from_tile) {
let in_tile = this.inTileBounds();
// If it doesn't fit, should we try to move it into the tile bounds?
if (!in_tile && this.layout.move_into_tile) {
// Can we fit the label into the tile?
if (!this.moveIntoTile()) {
return true; // can't fit in tile, discard
}
} else if (!in_tile) {
return true; // out of tile bounds, discard
}
}
// If the label hasn't been discarded yet, check to see if it's occluded by other labels
return this.occluded(bboxes, exclude);
=======
discard (bboxes) {
return this.occluded(bboxes);
>>>>>>>
discard (bboxes) {
return this.occluded(bboxes, exclude); |
<<<<<<<
import {useState} from 'react';
import dayjs from 'dayjs'
=======
import React, {useState} from 'react';
import moment from 'moment'
>>>>>>>
import React, {useState} from 'react';
import dayjs from 'dayjs' |
<<<<<<<
goog.exportProperty(vjs.Player.prototype, 'enterFullWindow', vjs.Player.prototype.enterFullWindow);
goog.exportProperty(vjs.Player.prototype, 'exitFullWindow', vjs.Player.prototype.exitFullWindow);
goog.exportProperty(vjs.Player.prototype, 'preload', vjs.Player.prototype.preload);
goog.exportProperty(vjs.Player.prototype, 'remainingTime', vjs.Player.prototype.remainingTime);
goog.exportProperty(vjs.Player.prototype, 'supportsFullScreen', vjs.Player.prototype.supportsFullScreen);
=======
goog.exportProperty(vjs.Player.prototype, 'currentType', vjs.Player.prototype.currentType);
>>>>>>>
goog.exportProperty(vjs.Player.prototype, 'enterFullWindow', vjs.Player.prototype.enterFullWindow);
goog.exportProperty(vjs.Player.prototype, 'exitFullWindow', vjs.Player.prototype.exitFullWindow);
goog.exportProperty(vjs.Player.prototype, 'preload', vjs.Player.prototype.preload);
goog.exportProperty(vjs.Player.prototype, 'remainingTime', vjs.Player.prototype.remainingTime);
goog.exportProperty(vjs.Player.prototype, 'supportsFullScreen', vjs.Player.prototype.supportsFullScreen);
goog.exportProperty(vjs.Player.prototype, 'currentType', vjs.Player.prototype.currentType); |
<<<<<<<
player.on('volumechange', vjs.bind(this, this.updateARIAAttributes));
player.ready(vjs.bind(this, this.updateARIAAttributes));
=======
setTimeout(vjs.bind(this, this.update), 0); // update when elements is in DOM
>>>>>>>
player.on('volumechange', vjs.bind(this, this.updateARIAAttributes));
player.ready(vjs.bind(this, this.updateARIAAttributes));
setTimeout(vjs.bind(this, this.update), 0); // update when elements is in DOM |
<<<<<<<
assert.ok(playbackRate.el().className.indexOf('vjs-hidden') >= 0, 'playbackRate is not hidden');
=======
ok(playbackRate.el().className.indexOf('vjs-hidden') >= 0, 'playbackRate is not hidden');
});
QUnit.test('Fullscreen control text should be correct when fullscreenchange is triggered', function() {
const player = TestHelpers.makePlayer();
const fullscreentoggle = new FullscreenToggle(player);
player.isFullscreen(true);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Non-Fullscreen', 'Control Text is correct while switching to fullscreen mode');
player.isFullscreen(false);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Fullscreen', 'Control Text is correct while switching back to normal mode');
>>>>>>>
assert.ok(playbackRate.el().className.indexOf('vjs-hidden') >= 0, 'playbackRate is not hidden');
});
QUnit.test('Fullscreen control text should be correct when fullscreenchange is triggered', function() {
const player = TestHelpers.makePlayer();
const fullscreentoggle = new FullscreenToggle(player);
player.isFullscreen(true);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Non-Fullscreen', 'Control Text is correct while switching to fullscreen mode');
player.isFullscreen(false);
player.trigger('fullscreenchange');
QUnit.equal(fullscreentoggle.controlText(), 'Fullscreen', 'Control Text is correct while switching back to normal mode'); |
<<<<<<<
if (parentNode._ljView && !$.hasAttributeLJ(parentNode, 'helper')) {
=======
// layer helper divs are special; ignore them; ignoring means to pass the parent state as current state
if (parentNode._ljView && !parentNode.hasAttribute('data-lj-helper')) {
>>>>>>>
// layer helper divs are special; ignore them; ignoring means to pass the parent state as current state
if (parentNode._ljView && !$.hasAttributeLJ(parentNode, 'helper')) {
<<<<<<<
if (!currentState.children.hasOwnProperty(name)) {
currentState.children[name] = {
view: view,
children: {}
=======
if (!currentState.hasOwnProperty(name)) {
// create the actual current state datastructure as a child of the parent's state structure
currentState[name] = {
view: view
>>>>>>>
if (!currentState.children.hasOwnProperty(name)) {
// create the actual current state datastructure as a child of the parent's state structure
currentState.children[name] = {
view: view,
children: {}
<<<<<<<
currentState.children[name].active = false;
=======
currentState[name].active = false;
// check if the current frame is the active frame
>>>>>>>
currentState.children[name].active = false;
// check if the current frame is the active frame
<<<<<<<
view.on('transitionStarted', this._transitionToEvent(currentState.children[name]));
=======
// listen to state changes; state changes when transitions happen in layers
view.on('transitionStarted', this._transitionToEvent(currentState[name]));
>>>>>>>
// listen to state changes; state changes when transitions happen in layers
view.on('transitionStarted', this._transitionToEvent(currentState.children[name]));
<<<<<<<
currentState = currentState.children[name];
=======
// currentState did contain the parent's state; assing actual current state
currentState = currentState[name];
>>>>>>>
// currentState did contain the parent's state; assing actual current state
currentState = currentState.children[name];
<<<<<<<
if (view.document.body.contains(view.outerEl)) {
this.buildParent(view.outerEl, view.document);
=======
// only add to state structure if the frame is really shown (attached to DOM)
if (frameView.document.body.contains(frameView.innerEl)) {
this.buildParent(frameView.innerEl, frameView.document);
>>>>>>>
// only add to state structure if the frame is really shown (attached to DOM)
if (view.document.body.contains(view.outerEl)) {
this.buildParent(view.outerEl, view.document);
<<<<<<<
for (var name in layerState.children) {
if (layerState.children.hasOwnProperty(name) && layerState.children[name].hasOwnProperty('active')) {
layerState.children[name].active = layerState.children[name].view.data.attributes.name === frameName;
=======
for (var name in layerState) {
// set new active frame; set all other frames to inactive
if (layerState.hasOwnProperty(name) && layerState[name].hasOwnProperty('active')) {
layerState[name].active = layerState[name].view.data.attributes.name === frameName;
>>>>>>>
for (var name in layerState.children) {
// set new active frame; set all other frames to inactive
if (layerState.children.hasOwnProperty(name) && layerState.children[name].hasOwnProperty('active')) {
layerState.children[name].active = layerState.children[name].view.data.attributes.name === frameName; |
<<<<<<<
/**
* Will return if the layer allows dragging
*
* @return {Boolean} the value of the lj-draggable attribute
*/
draggable: function() {
var draggable = this.getAttributeLJ('draggable');
return draggable === 'true' ? true : false;
},
=======
/**
* returns the value for lj-auto-height
*
* @returns {string} A layername
*/
autoHeight: function() {
return this.getAttributeLJ('auto-height');
},
/**
* returns the value for lj-auto-width
*
* @returns {string} A layername
*/
autoWidth: function() {
return this.getAttributeLJ('auto-width');
},
>>>>>>>
/**
* returns the value for lj-auto-height
*
* @returns {string} A layername
*/
autoHeight: function() {
return this.getAttributeLJ('auto-height');
},
/**
* returns the value for lj-auto-width
*
* @returns {string} A layername
*/
autoWidth: function() {
return this.getAttributeLJ('auto-width');
},
/** Will return if the layer allows dragging
*
* @return {Boolean} the value of the lj-draggable attribute
*/
draggable: function() {
var draggable = this.getAttributeLJ('draggable');
return draggable === 'true' ? true : false;
}, |
<<<<<<<
/**
* returns the value for lj-timer which is used for auto trigger transitions.
*
* @param {Type} Name - Description
* @returns {Type} Description
*/
timer: function() {
return this.getAttributeLJ('timer');
},
=======
/**
* Will return if the layer allows dragging
*
* @return {Boolean} the value of the lj-draggable attribute
*/
draggable: function() {
var draggable = this.getAttributeLJ('draggable');
>>>>>>>
/**
* returns the value for lj-timer which is used for auto trigger transitions.
*
* @param {Type} Name - Description
* @returns {Type} Description
*/
timer: function() {
return this.getAttributeLJ('timer');
},
/**
* Will return if the layer allows dragging
*
* @return {Boolean} the value of the lj-draggable attribute
*/
draggable: function() {
var draggable = this.getAttributeLJ('draggable'); |
<<<<<<<
event.preventDefault();
=======
if (-1 !== href.indexOf('#')) {
var url = href;
var queryParameters = '';
var hash = '';
if (href.indexOf('?') > 0) {
var queryStart = href.indexOf('?');
url = href.substr(0, queryStart);
queryParameters = href.substr(queryStart);
}
hash = url.substring(url.indexOf('#') + 1);
url = url.substring(0, url.indexOf('#'));
var states = hash.split(';');
var layerView;
var statesToTransition = [];
var specialFrame;
for (var i = 0; i < states.length; i++) {
var isLocalHash = false;
for (specialFrame in defaults.specialFrames) {
if (defaults.specialFrames.hasOwnProperty(specialFrame) && states[i] === defaults.specialFrames[specialFrame]) {
isLocalHash = true;
layerView = domhelpers.findParentViewOfType(this, 'layer');
statesToTransition.push(state.getPathForView(layerView) + '.' + defaults.specialFrames[specialFrame]);
break;
}
}
if (!isLocalHash) {
// resolve partial paths
statesToTransition = statesToTransition.concat(state._determineTransitionPaths([states[i]]));
}
}
// resolve special frame names
for (var index = 0; index < statesToTransition.length; index++) {
for (specialFrame in defaults.specialFrames) {
if (defaults.specialFrames.hasOwnProperty(specialFrame) && -1 !== statesToTransition[index].indexOf(defaults.specialFrames[specialFrame])) {
var layerPath = statesToTransition[index].replace('.' + defaults.specialFrames[specialFrame], '');
layerView = state.getViewForPath(layerPath);
var frameView = layerView._getFrame(defaults.specialFrames[specialFrame]);
var frameName = (undefined !== frameView && null !== frameView) ? frameView.name() : defaults.specialFrames[specialFrame];
statesToTransition[index] = state.getPathForView(layerView) + '.' + frameName;
break;
}
}
}
// re-assemble url
href = url + '#' + statesToTransition.join(';') + queryParameters;
}
event.preventDefault(); // prevent default action, i.e. going to link target
// do not stop propagation; other libraries may listen to link clicks
>>>>>>>
event.preventDefault(); // prevent default action, i.e. going to link target
// do not stop propagation; other libraries may listen to link clicks |
<<<<<<<
var StageView = CGroupView.extend({
constructor: function(dataModel, options) {
options = options || {};
CGroupView.call(this, dataModel, Kern.Base.extend({}, options, {
noRender: true
}));
=======
var StageView = CGroupView.extend({ constructor: function (dataModel, options) {
options = options || {};
CGroupView.call(this, dataModel, Kern._extend({}, options, { noRender: true }));
>>>>>>>
var StageView = CGroupView.extend({
constructor: function(dataModel, options) {
options = options || {};
CGroupView.call(this, dataModel, Kern._extend({}, options, { noRender: true }));
<<<<<<<
Model: StageData,
Parse: CGroupView.Parse
=======
Model: StageData
>>>>>>>
Model: StageData
Parse: CGroupView.Parse |
<<<<<<<
// import mergeObjects from './utils/merge';
import {StyleManager} from './styles/style_manager';
import {StyleParser} from './styles/style_parser';
=======
import mergeObjects from './utils/merge';
>>>>>>>
import {StyleParser} from './styles/style_parser';
import mergeObjects from './utils/merge'; |
<<<<<<<
=======
this._fixedDimensions();
>>>>>>>
this._fixedDimensions();
<<<<<<<
if (!options.noRender && (options.forceRender || !options.el))
this.render();
this._observeElement();
=======
if (!options.noRender && (options.forceRender || !options.el))
this.render();
},
_fixedDimensions: function() {
var match;
if (this.data.width && (match = this.data.width.match(/(.*)px/))) {
this.fixedWidth = parseInt(match[1]);
} else {
delete this.fixedWidth;
}
if (this.data.height && (match = this.data.height.match(/(.*)px/))) {
this.fixedHeight = parseInt(match[1]);
} else {
delete this.fixedHeight;
}
>>>>>>>
if (!options.noRender && (options.forceRender || !options.el))
this.render();
this._observeElement();
},
_fixedDimensions: function() {
var match;
if (this.data.width && (match = this.data.width.match(/(.*)px/))) {
this.fixedWidth = parseInt(match[1]);
} else {
delete this.fixedWidth;
}
if (this.data.height && (match = this.data.height.match(/(.*)px/))) {
this.fixedHeight = parseInt(match[1]);
} else {
delete this.fixedHeight;
}
<<<<<<<
if ('type' in diff) {
el.setAttribute("data-wl-type", attr.type); //-> should be a class?
}
if ('elementId' in diff) {
el.id = attr.elementId || attr.id; //-> shouldn't we always set an id? (priority of #id based css declarations)
=======
if ('elementId' in diff || 'id' in diff) {
elWrapper.id = attr.elementId || "wl-obj-" + attr.id; //-> shouldn't we always set an id? (priority of #id based css declarations)
>>>>>>>
if ('type' in diff) {
elWrapper.setAttribute("data-wl-type", attr.type); //-> should be a class?
}
if ('elementId' in diff || 'id' in diff) {
elWrapper.id = attr.elementId || "wl-obj-" + attr.id; //-> shouldn't we always set an id? (priority of #id based css declarations)
<<<<<<<
if (this.data.attributes.tag.toUpperCase() == 'A') {
if ('linkTo' in diff)
el.setAttribute('href', this.data.attributes.linkTo);
if (!this.data.attributes.linkTarget)
this.data.attributes.linkTarget = '_self';
if ('linkTarget' in diff)
el.setAttribute('target', this.data.attributes.linkTarget);
=======
if (this.data.attributes.tag.toUpperCase() == 'A') {
if ('linkTo' in diff)
elWrapper.setAttribute('href', this.data.attributes.linkTo);
if (!this.data.attributes.linkTarget)
this.data.attributes.linkTarget = '_self';
if ('linkTarget' in diff)
elWrapper.setAttribute('target', this.data.attributes.linkTarget);
>>>>>>>
if (this.data.attributes.tag.toUpperCase() == 'A') {
if ('linkTo' in diff)
elWrapper.setAttribute('href', this.data.attributes.linkTo);
if (!this.data.attributes.linkTarget)
this.data.attributes.linkTarget = '_self';
if ('linkTarget' in diff)
elWrapper.setAttribute('target', this.data.attributes.linkTarget);
<<<<<<<
this.observeElement = (!options.noObserveElement);
},
=======
},
/**
* apply CSS styles to this view
*
* @param {Type} Name - Description
* @returns {Type} Description
*/
applyStyles: function(styles) {
var props = Object.keys(styles);
for (var i = 0; i < props.length; i++) {
this.elWrapper.style[$.cssPrefix[props[i]] || props[i]] = styles[props[i]];
}
},
>>>>>>>
this.observeElement = (!options.noObserveElement);
},
/**
* apply CSS styles to this view
*
* @param {Type} Name - Description
* @returns {Type} Description
*/
applyStyles: function(styles) {
var props = Object.keys(styles);
for (var i = 0; i < props.length; i++) {
this.elWrapper.style[$.cssPrefix[props[i]] || props[i]] = styles[props[i]];
}
}, |
<<<<<<<
export function hangupCall(call) {
=======
function answeredIncomingCall(callId) {
return {
type: ANSWERED_INCOMING_CALL,
payload: {
callId
}
};
}
export function hangupCall({call, locusUrl}) {
>>>>>>>
function answeredIncomingCall(callId) {
return {
type: ANSWERED_INCOMING_CALL,
payload: {
callId
}
};
}
export function hangupCall(call) {
<<<<<<<
dispatch(storeCall(incomingCall, incomingCall.locus.url, true));
return Promise.resolve(incomingCall);
=======
return dispatch(storeCall(incomingCall, incomingCall.locus.url, true));
>>>>>>>
dispatch(storeCall(incomingCall));
return Promise.resolve(incomingCall);
<<<<<<<
* Declines an incoming call
*
* @export
* @param {object} incomingCall
* @returns {Promise}
*/
export function declineIncomingCall(incomingCall) {
return (dispatch) => {
incomingCall.reject();
dispatch(removeCall(incomingCall));
return Promise.resolve();
};
}
/**
* Accepts an incoming call
*
* @export
* @param {object} incomingCall
* @returns {Promise}
*/
export function acceptIncomingCall(incomingCall) {
return (dispatch) =>
incomingCall.answer({
offerOptions: {offerToReceiveVideo: true, offerToReceiveAudio: true}
})
.then(() => {
bindEvents(dispatch, incomingCall);
return dispatch(connectCall(incomingCall));
});
}
/**
=======
>>>>>>> |
<<<<<<<
<IntlProvider locale="en" messages={enTranslationMessages}>
<Message
onEvent={onEvent}
spark={spark}
toPersonEmail={toPersonEmail}
toPersonId={toPersonId}
/>
</IntlProvider>
=======
<MessageWidgetWithIntl
spark={spark}
toPersonEmail={toPersonEmail}
toPersonId={toPersonId}
/>
>>>>>>>
<MessageWidgetWithIntl
onEvent={onEvent}
spark={spark}
toPersonEmail={toPersonEmail}
toPersonId={toPersonId}
/> |
<<<<<<<
@autobind
handleStartSendingAudio() {
this.props.media.get(`call`).startSendingAudio();
}
@autobind
handleStartSendingVideo() {
this.props.media.get(`call`).startSendingVideo();
}
@autobind
handleStopSendingAudio() {
this.props.media.get(`call`).stopSendingAudio();
}
@autobind
handleStopSendingVideo() {
this.props.media.get(`call`).stopSendingVideo();
}
=======
@autobind
handleAnswer() {
const {media, spark} = this.props;
const incomingCall = media.getIn([`incomingCall`, `call`]);
this.props.acceptIncomingCall(incomingCall, spark);
}
@autobind
handleDecline() {
const {media} = this.props;
const incomingCall = media.getIn([`incomingCall`, `call`]);
this.props.declineIncomingCall(incomingCall);
}
incomingCallNotification(incomingCall) {
const {intl} = this.props;
const {formatMessage} = intl;
const details = {
username: incomingCall.from.person.name,
message: formatMessage(messages.incomingCallMessage),
avatar: this.props.avatar.get(`items`).toJS()[incomingCall.from.person.id]
};
this.props.createNotification(incomingCall.locusUrl, NOTIFICATION_TYPE_OTHER, details);
}
>>>>>>>
@autobind
handleStartSendingAudio() {
this.props.media.get(`call`).startSendingAudio();
}
@autobind
handleStartSendingVideo() {
this.props.media.get(`call`).startSendingVideo();
}
@autobind
handleStopSendingAudio() {
this.props.media.get(`call`).stopSendingAudio();
}
@autobind
handleStopSendingVideo() {
this.props.media.get(`call`).stopSendingVideo();
}
@autobind
handleAnswer() {
const {media, spark} = this.props;
const incomingCall = media.getIn([`incomingCall`, `call`]);
this.props.acceptIncomingCall(incomingCall, spark);
}
@autobind
handleDecline() {
const {media} = this.props;
const incomingCall = media.getIn([`incomingCall`, `call`]);
this.props.declineIncomingCall(incomingCall);
}
incomingCallNotification(incomingCall) {
const {intl} = this.props;
const {formatMessage} = intl;
const details = {
username: incomingCall.from.person.name,
message: formatMessage(messages.incomingCallMessage),
avatar: this.props.avatar.get(`items`).toJS()[incomingCall.from.person.id]
};
this.props.createNotification(incomingCall.locusUrl, NOTIFICATION_TYPE_OTHER, details);
}
<<<<<<<
const injectedPropTypes = {
media: PropTypes.object
};
MeetWidget.propTypes = {
=======
const injectedPropTypes = {
>>>>>>>
const injectedPropTypes = { |
<<<<<<<
function constructSpace(space) {
const lastSeenActivityDate = space.get(`lastSeenActivityDate`);
const lastActivityTimestamp = space.get(`lastReadableActivityDate`);
const isUnread = lastSeenActivityDate ? moment(lastSeenActivityDate).isBefore(lastActivityTimestamp) : true;
=======
function constructSpace(space, avatars) {
const id = space.get(`id`);
const avatarUrl = avatars.getIn([id, `url`]);
>>>>>>>
function constructSpace(space, avatars) {
const lastSeenActivityDate = space.get(`lastSeenActivityDate`);
const lastActivityTimestamp = space.get(`lastReadableActivityDate`);
const isUnread = lastSeenActivityDate ? moment(lastSeenActivityDate).isBefore(lastActivityTimestamp) : true;
const id = space.get(`id`);
const avatarUrl = avatars.getIn([id, `url`]);
<<<<<<<
lastActivityTime: formatDate(lastActivityTimestamp),
lastActivityTimestamp,
lastActivityActorName: space.getIn([`latestActivity`, `actor`, `displayName`]),
lastActivityType: space.getIn([`latestActivity`, `verb`]),
lastActivityText: space.getIn([`latestActivity`, `object`, `displayName`]),
=======
lastActivityTime: formatDate(space.get(`lastReadableActivityDate`)),
lastActivityTimestamp: space.get(`lastReadableActivityDate`),
latestActivity: {
actorName: space.getIn([`latestActivity`, `actor`, `displayName`]),
type: space.getIn([`latestActivity`, `verb`]),
object: space.getIn([`latestActivity`, `object`]).toJS(),
text: space.getIn([`latestActivity`, `object`, `displayName`])
},
avatarUrl,
>>>>>>>
lastActivityTime: formatDate(lastActivityTimestamp),
lastActivityTimestamp,
latestActivity: {
actorName: space.getIn([`latestActivity`, `actor`, `displayName`]),
type: space.getIn([`latestActivity`, `verb`]),
object: space.getIn([`latestActivity`, `object`]).toJS(),
text: space.getIn([`latestActivity`, `object`, `displayName`])
},
avatarUrl, |
<<<<<<<
import '@ciscospark/internal-plugin-search';
=======
import '@ciscospark/internal-plugin-team';
>>>>>>>
import '@ciscospark/internal-plugin-search';
import '@ciscospark/internal-plugin-team'; |
<<<<<<<
Utils.inMainThread(() => { findBaseLibraryURL(); }); // on main thread only (skip in web worker)
=======
Utils.runIfInMainThread(() => {
// On main thread only (skip in web worker)
findBaseLibraryURL();
Utils.requestAnimationFramePolyfill();
});
>>>>>>>
Utils.inMainThread(() => {
// On main thread only (skip in web worker)
findBaseLibraryURL();
Utils.requestAnimationFramePolyfill();
});
<<<<<<<
var ad = this.tiles[a].center_dist;
var bd = this.tiles[b].center_dist;
return (bd > ad ? -1 : (bd === ad ? 0 : 1));
=======
return (b.center_dist > a.center_dist ? -1 : (b.center_dist === a.center_dist ? 0 : 1));
>>>>>>>
return (b.center_dist > a.center_dist ? -1 : (b.center_dist === a.center_dist ? 0 : 1));
<<<<<<<
Scene.prototype.buildTile = function(key) {
var tile = this.tiles[key];
this.trackTileBuildStart(key);
this.workerPostMessageForTile(
tile, 'buildTile',
{
tile: {
key: tile.key,
coords: tile.coords, // used by style helpers
min: tile.min, // used by TileSource to scale tile to local extents
max: tile.max, // used by TileSource to scale tile to local extents
debug: tile.debug
},
tile_source: this.tile_source,
layers: this.layers_serialized,
styles: this.styles_serialized
},
message => this.buildTileCompleted(message)
);
};
// Called on main thread when a web worker completes processing for a single tile (initial load, or rebuild)
Scene.prototype.buildTileCompleted = function ({ tile, worker_id, selection_map_size }) {
// Track selection map size (for stats/debug) - update per worker and sum across workers
this.selection_map_worker_size[worker_id] = selection_map_size;
this.selection_map_size = 0;
for (var wid in this.selection_map_worker_size) {
this.selection_map_size += this.selection_map_worker_size[wid];
}
// Removed this tile during load?
if (this.tiles[tile.key] == null) {
log.debug(`discarded tile ${tile.key} in Scene.buildTileCompleted because previously removed`);
}
else {
// Update tile with properties from worker
tile = this.mergeTile(tile.key, tile);
if (!tile.error) {
this.buildGLGeometry(tile);
this.dirty = true;
}
else {
log.error(`main thread tile load error for ${tile.key}: ${tile.error}`);
}
}
this.trackTileSetLoadStop();
this.printDebugForTile(tile);
this.trackTileBuildStop(tile.key);
};
=======
>>>>>>>
// TODO: move to Tile class
// Called on main thread when a web worker completes processing for a single tile (initial load, or rebuild)
Scene.prototype.buildTileCompleted = function ({ tile, worker_id, selection_map_size }) {
// Track selection map size (for stats/debug) - update per worker and sum across workers
this.selection_map_worker_size[worker_id] = selection_map_size;
this.selection_map_size = 0;
for (var wid in this.selection_map_worker_size) {
this.selection_map_size += this.selection_map_worker_size[wid];
}
// Removed this tile during load?
if (this.tiles[tile.key] == null) {
log.debug(`discarded tile ${tile.key} in Scene.buildTileCompleted because previously removed`);
}
else {
var cached = this.tiles[tile.key];
// Update tile with properties from worker
if (cached) {
tile = cached.merge(tile);
}
if (!tile.error) {
tile.buildGLGeometry(this.modes);
this.dirty = true;
}
else {
log.error(`main thread tile load error for ${tile.key}: ${tile.error}`);
}
}
this.trackTileSetLoadStop();
this.printDebugForTile(tile);
this.trackTileBuildStop(tile.key);
};
<<<<<<<
=======
// Called on main thread when a web worker completes processing for a single tile (initial load, or rebuild)
Scene.prototype.workerBuildTileCompleted = function (event) {
if (event.data.type !== 'buildTileCompleted') {
return;
}
// Track selection map size (for stats/debug) - update per worker and sum across workers
this.selection_map_worker_size[event.data.worker_id] = event.data.selection_map_size;
this.selection_map_size = 0;
for (var worker_id in this.selection_map_worker_size) {
this.selection_map_size += this.selection_map_worker_size[worker_id];
}
log.debug(`Scene: updated selection map: ${this.selection_map_size} features`);
var tile = Tile.create(Object.assign(
{}, event.data.tile, {tile_source: this.tile_source}
));
// Removed this tile during load?
if (!this.hasTile(tile.key)) {
log.debug(`discarded tile ${tile.key} in Scene.workerBuildTileCompleted because previously removed`);
}
else if (!tile.error) {
var cached = this.tiles[tile.key];
// Update tile with properties from worker
if (cached) {
tile = cached.merge(tile);
}
tile.buildGLGeometry(this.modes);
this.dirty = true;
}
else {
log.error(`main thread tile load error for ${tile.key}: ${tile.error}`);
}
this.trackTileSetLoadStop();
this.printDebugForTile(tile);
this.trackTileBuildStop(tile.key);
};
>>>>>>>
<<<<<<<
this.freeTileResources(tile);
// Web worker will cancel XHR requests
this.workerPostMessageForTile(tile, 'removeTile', tile.key);
=======
tile.freeResources();
tile.remove(this);
>>>>>>>
tile.freeResources();
tile.remove(this); |
<<<<<<<
=======
let callFrom, callInstance, callIsActive, callIsIncoming, callIsRinging, callState, isDismissed;
>>>>>>>
<<<<<<<
=======
({callState, instance: callInstance, isDismissed} = call);
>>>>>>>
<<<<<<<
callProps = {
isRinging,
isCall,
callInstance: call.instance,
isActive: isConnected && hasJoinedOnThisDevice || direction === 'out',
isIncoming: direction === 'in' && !hasJoinedOnThisDevice
};
=======
callIsRinging = ringing;
callIsActive = connected && joinedOnThisDevice || direction === 'out';
callIsIncoming = direction === 'in' && !joinedOnThisDevice && !isDismissed;
if (isInitiated && typeof isCall === 'boolean') {
callFrom = buildCallFrom(isCall, callInstance, conversation);
}
>>>>>>>
callProps = {
isRinging,
isCall,
callInstance: call.instance,
isActive: isConnected && hasJoinedOnThisDevice || direction === 'out',
isIncoming: direction === 'in' && !hasJoinedOnThisDevice && !isDismissed
}; |
<<<<<<<
.find(/[0-9]{2}\.[0-9]/)
.store( (returnMessage) => {
console.log(returnMessage);
console.log('errors: ', returnMessage.errors.length, 'data: ', returnMessage.data.length);
})
.retries(2)
=======
.find(/Scraper/)
.store( (returnMessage) => { console.log(returnMessage) })
>>>>>>>
.find(/[0-9]{2}\.[0-9]/)
.store( (returnMessage) => {
console.log(returnMessage);
console.log('errors: ', returnMessage.errors.length, 'data: ', returnMessage.data.length);
})
.retries(2)
.find(/Scraper/)
.store( (returnMessage) => { console.log(returnMessage) })
<<<<<<<
.run()
//https://www.wunderground.com/cgi-bin/findweather/getForecast?query=98004
=======
.setProxies(proxs)
.run()
>>>>>>>
.setProxies(proxs)
.run()
//https://www.wunderground.com/cgi-bin/findweather/getForecast?query=98004 |
<<<<<<<
=======
const setWorkers = require('./publicMethods/setWorkers');
>>>>>>>
const setWorkers = require('./publicMethods/setWorkers');
<<<<<<<
setWorkers
=======
setWorkers,
>>>>>>>
setWorkers |
<<<<<<<
=======
/**
* @description Optionally allows use of fully rendered DOM for more complex scraping
* @param {String} browser - Can choose 'chrome' or 'firefox' instances
* @param {Function} callback - Provides space for custom selenium logic
* @return {Object} The siphon object to allow method chaining
*/
>>>>>>>
/**
* @description Optionally allows use of fully rendered DOM for more complex scraping
* @param {String} browser - Can choose 'chrome' or 'firefox' instances
* @param {Function} callback - Provides space for custom selenium logic
* @return {Object} The siphon object to allow method chaining
*/ |
<<<<<<<
if (config.authentication === true){
app.use(require('basic-auth-connect')(config.credentials.username, config.credentials.password));
}
=======
app.post("/rn-edit", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.file);
if(!fs.existsSync(filePath)) filePath += '.md';
fs.writeFile(filePath, req.body.content, function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Saved"
});
});
});
app.post("/rn-delete", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.file);
if(!fs.existsSync(filePath)) filePath += '.md';
fs.rename(filePath, filePath + ".del", function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Deleted"
});
});
});
app.post("/rn-add-category", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.category);
fs.mkdir(filePath, function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Category Created"
});
});
});
app.post("/rn-add-page", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.category + "/" + req.body.name + ".md");
fs.open(filePath, "a", function(err, fd) {
fs.close(fd);
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Created"
});
});
});
>>>>>>>
if (config.authentication === true){
app.use(require('basic-auth-connect')(config.credentials.username, config.credentials.password));
}
app.post("/rn-edit", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.file);
if(!fs.existsSync(filePath)) filePath += '.md';
fs.writeFile(filePath, req.body.content, function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Saved"
});
});
});
app.post("/rn-delete", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.file);
if(!fs.existsSync(filePath)) filePath += '.md';
fs.rename(filePath, filePath + ".del", function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Deleted"
});
});
});
app.post("/rn-add-category", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.category);
fs.mkdir(filePath, function(err) {
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Category Created"
});
});
});
app.post("/rn-add-page", function(req, res, next){
var filePath = path.normalize(raneto.config.content_dir + req.body.category + "/" + req.body.name + ".md");
fs.open(filePath, "a", function(err, fd) {
fs.close(fd);
if(err) {
console.log(err);
res.json({
status: 1,
message: err
});
return;
}
res.json({
status: 0,
message: "Page Created"
});
});
});
<<<<<<<
fs.readFile(filePath, 'utf8', function(err, content) {
if(err){
err.status = '404';
err.message = 'Whoops. Looks like this page doesn\'t exist.';
return next(err);
}
// Process Markdown files
if(path.extname(filePath) == '.md'){
// File info
var stat = fs.lstatSync(filePath);
// Meta
var meta = raneto.processMeta(content);
content = raneto.stripMeta(content);
if(!meta.title) meta.title = raneto.slugToTitle(filePath);
// Content
content = raneto.processVars(content);
marked.setOptions({
langPrefix: ''
});
var html = marked(content);
var template = meta.template || 'page';
return res.render(template, {
config: config,
pages: pageList,
meta: meta,
content: html,
body_class: template + '-' + raneto.cleanString(slug),
last_modified: moment(stat.mtime).format('Do MMM YYYY')
});
} else {
// Serve static file
res.sendfile(filePath);
}
});
=======
if(filePathOrig.indexOf(suffix, filePathOrig.length - suffix.length) !== -1){
fs.readFile(filePath, 'utf8', function(err, content) {
if(err){
err.status = '404';
err.message = 'Whoops. Looks like this page doesn\'t exist.';
return next(err);
}
if(path.extname(filePath) == '.md'){
// File info
var stat = fs.lstatSync(filePath);
// Meta
var meta = raneto.processMeta(content);
content = raneto.stripMeta(content);
if(!meta.title) meta.title = raneto.slugToTitle(filePath);
// Content
content = raneto.processVars(content);
var html = content;
return res.render('edit', {
config: config,
pages: pageList,
meta: meta,
content: html,
body_class: 'page-'+ raneto.cleanString(slug),
last_modified: moment(stat.mtime).format('Do MMM YYYY')
});
}
});
} else {
fs.readFile(filePath, 'utf8', function(err, content) {
if(err){
err.status = '404';
err.message = 'Whoops. Looks like this page doesn\'t exist.';
return next(err);
}
// Process Markdown files
if(path.extname(filePath) == '.md'){
// File info
var stat = fs.lstatSync(filePath);
// Meta
var meta = raneto.processMeta(content);
content = raneto.stripMeta(content);
if(!meta.title) meta.title = raneto.slugToTitle(filePath);
// Content
content = raneto.processVars(content);
var html = marked(content);
return res.render('page', {
config: config,
pages: pageList,
meta: meta,
content: html,
body_class: 'page-'+ raneto.cleanString(slug),
last_modified: moment(stat.mtime).format('Do MMM YYYY')
});
} else {
// Serve static file
res.sendfile(filePath);
}
});
}
>>>>>>>
if(filePathOrig.indexOf(suffix, filePathOrig.length - suffix.length) !== -1){
fs.readFile(filePath, 'utf8', function(err, content) {
if(err){
err.status = '404';
err.message = 'Whoops. Looks like this page doesn\'t exist.';
return next(err);
}
if(path.extname(filePath) == '.md'){
// File info
var stat = fs.lstatSync(filePath);
// Meta
var meta = raneto.processMeta(content);
content = raneto.stripMeta(content);
if(!meta.title) meta.title = raneto.slugToTitle(filePath);
// Content
content = raneto.processVars(content);
var html = content;
var template = meta.template || 'page';
return res.render('edit', {
config: config,
pages: pageList,
meta: meta,
content: html,
body_class: template + '-' + raneto.cleanString(slug),
last_modified: moment(stat.mtime).format('Do MMM YYYY')
});
}
});
} else {
fs.readFile(filePath, 'utf8', function(err, content) {
if(err){
err.status = '404';
err.message = 'Whoops. Looks like this page doesn\'t exist.';
return next(err);
}
// Process Markdown files
if(path.extname(filePath) == '.md'){
// File info
var stat = fs.lstatSync(filePath);
// Meta
var meta = raneto.processMeta(content);
content = raneto.stripMeta(content);
if(!meta.title) meta.title = raneto.slugToTitle(filePath);
// Content
content = raneto.processVars(content);
// BEGIN: DISPLAY, NOT EDIT
marked.setOptions({
langPrefix: ''
});
var html = marked(content);
// END: DISPLAY, NOT EDIT
var template = meta.template || 'page';
return res.render(template, {
config: config,
pages: pageList,
meta: meta,
content: html,
body_class: template + '-' + raneto.cleanString(slug),
last_modified: moment(stat.mtime).format('Do MMM YYYY')
});
} else {
// Serve static file
res.sendfile(filePath);
}
});
} |
<<<<<<<
export const SET_POST = 'post/setFromFirebase';
export const SET_POST_TO_NULL = 'post/setToNull';
export const DELETE_POST = 'post/delete';
export const CUSTOM_DELETE_POST = '/post/custom/delete';
export const PUBLISHED_EVENTS = 'events/published';
export const DRAFT_EVENTS = 'events/draft';
export const GET_PUBLISHED_EVENTS = 'get/events/published';
export const GET_DRAFT_EVENTS = 'get/events/draft';
export const GET_EVENT_BY = 'get/events/by';
export const PUBLISHED_BLOGS = 'blogs/published';
export const DRAFT_BLOGS = 'blogs/draft';
export const GET_PUBLISHED_BLOGS = 'get/blogs/published';
export const GET_DRAFT_BLOGS = 'get/blogs/draft';
export const GET_BLOG_BY = 'get/blogs/by';
export const BLOG_POST_TITLE = 'post/blog/title';
export const BLOG_POST_FEATURED_IMAGE = 'post/blog/featuredImage';
export const BLOG_POST_PERMALINK = 'post/blog/permalink';
export const BLOG_POST_CONTENT = 'post/blog/content';
export const BLOG_POST_SUBMIT = 'post/blog/submit';
export const BLOG_POST_UPDATE = 'post/blog/update';
export const BLOG_POST_ID = 'post/blog/id';
export const BLOG_SET_POST = 'post/blog/setFromFirebase';
export const BLOG_SET_POST_TO_NULL = 'post/blog/setToNull';
export const BLOG_DELETE_POST = 'post/blog/delete';
export const BLOG_CUSTOM_DELETE_POST = 'post/blog/custom/delete';
export const BLOG_POST_DIALOG_DELETE = 'post/blog/dialog/delete';
export const BLOG_IS_VALID_TITLE = 'post/blog/isValid/title';
export const BLOG_IS_VALID_BODY = 'post/blog/isValid/body';
=======
export const POST_SET = 'post/set';
export const POST_PUBLISHED = 'post/published';
export const POST_DRAFT = 'post/draft';
export const POST_BY = 'post/by';
export const POST_DIALOG_DELETE = 'post/dialog/delete';
export const POST_ACTION_SUBMIT = 'post/action/submit';
export const POST_ACTION_UPDATE = 'post/action/update';
export const POST_ACTION_DELETE = 'post/action/delete';
>>>>>>>
export const SET_POST = 'post/setFromFirebase';
export const SET_POST_TO_NULL = 'post/setToNull';
export const DELETE_POST = 'post/delete';
export const CUSTOM_DELETE_POST = '/post/custom/delete';
export const PUBLISHED_EVENTS = 'events/published';
export const DRAFT_EVENTS = 'events/draft';
export const GET_PUBLISHED_EVENTS = 'get/events/published';
export const GET_DRAFT_EVENTS = 'get/events/draft';
export const GET_EVENT_BY = 'get/events/by';
export const PUBLISHED_BLOGS = 'blogs/published';
export const DRAFT_BLOGS = 'blogs/draft';
export const GET_PUBLISHED_BLOGS = 'get/blogs/published';
export const GET_DRAFT_BLOGS = 'get/blogs/draft';
export const GET_BLOG_BY = 'get/blogs/by';
export const BLOG_POST_TITLE = 'post/blog/title';
export const BLOG_POST_FEATURED_IMAGE = 'post/blog/featuredImage';
export const BLOG_POST_PERMALINK = 'post/blog/permalink';
export const BLOG_POST_CONTENT = 'post/blog/content';
export const BLOG_POST_SUBMIT = 'post/blog/submit';
export const BLOG_POST_UPDATE = 'post/blog/update';
export const BLOG_POST_ID = 'post/blog/id';
export const BLOG_SET_POST = 'post/blog/setFromFirebase';
export const BLOG_SET_POST_TO_NULL = 'post/blog/setToNull';
export const BLOG_DELETE_POST = 'post/blog/delete';
export const BLOG_CUSTOM_DELETE_POST = 'post/blog/custom/delete';
export const BLOG_POST_DIALOG_DELETE = 'post/blog/dialog/delete';
export const BLOG_IS_VALID_TITLE = 'post/blog/isValid/title';
export const BLOG_IS_VALID_BODY = 'post/blog/isValid/body';
export const POST_SET = 'post/set';
export const POST_PUBLISHED = 'post/published';
export const POST_DRAFT = 'post/draft';
export const POST_BY = 'post/by';
export const POST_DIALOG_DELETE = 'post/dialog/delete';
export const POST_ACTION_SUBMIT = 'post/action/submit';
export const POST_ACTION_UPDATE = 'post/action/update';
export const POST_ACTION_DELETE = 'post/action/delete'; |
<<<<<<<
const {
getAspectRatio,
getBase64,
getImageURL,
} = require('./get-image-objects/get-shared-image-data');
=======
const {
getDisplayDimensions,
} = require('./get-image-objects/get-display-dimensions');
// todo: for fluid images when original width and height is not set, use width and height of image as is and make full width
// todo: investigate graphQL query overrides for width and height and abstract control to user through gql query
>>>>>>>
const {
getAspectRatio,
getBase64,
getImageURL,
} = require('./get-image-objects/get-shared-image-data');
const {
getDisplayDimensions,
} = require('./get-image-objects/get-display-dimensions'); |
<<<<<<<
fieldsToSelect,
=======
defaultTracedSVG,
>>>>>>>
fieldsToSelect,
defaultTracedSVG,
<<<<<<<
fieldsToSelect,
=======
defaultTracedSVG,
>>>>>>>
fieldsToSelect,
defaultTracedSVG, |
<<<<<<<
fieldsToSelect: ['base64'],
=======
defaultTracedSVG: 'defaultTracedSVG',
>>>>>>>
fieldsToSelect: ['base64'],
defaultTracedSVG: 'defaultTracedSVG',
<<<<<<<
it('does not return base64 if base64 is not a field to select', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs({ fieldsToSelect: [] });
expect((await getFluidImageObject(args)).base64).toEqual(undefined);
});
=======
it('returns a tracedSVG image', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs();
const expectedTracedSVG = args.defaultTracedSVG;
expect(await getFluidImageObject(args)).toEqual(
expect.objectContaining({ tracedSVG: expectedTracedSVG }),
);
});
>>>>>>>
it('does not return base64 if base64 is not a field to select', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs({ fieldsToSelect: [] });
expect((await getFluidImageObject(args)).base64).toEqual(undefined);
it('returns a tracedSVG image', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs();
const expectedTracedSVG = args.defaultTracedSVG;
expect(await getFluidImageObject(args)).toEqual(
expect.objectContaining({ tracedSVG: expectedTracedSVG }),
);
});
<<<<<<<
fieldsToSelect: ['base64'],
=======
defaultTracedSVG: 'defaultTracedSVG',
>>>>>>>
fieldsToSelect: ['base64'],
defaultTracedSVG: 'defaultTracedSVG',
<<<<<<<
it('does not return base64 if base64 is not a field to select', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs({ fieldsToSelect: [] });
expect((await getFluidImageObject(args)).base64).toEqual(undefined);
});
=======
it('returns a tracedSVG image', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs();
const expectedTracedSVG = args.defaultTracedSVG;
expect(await getFluidImageObject(args)).toEqual(
expect.objectContaining({ tracedSVG: expectedTracedSVG }),
);
});
>>>>>>>
it('does not return base64 if base64 is not a field to select', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs({ fieldsToSelect: [] });
expect((await getFluidImageObject(args)).base64).toEqual(undefined);
it('returns a tracedSVG image', async () => {
const options = getDefaultOptions();
getPluginOptions.mockReturnValue(options);
const args = getDefaultArgs();
const expectedTracedSVG = args.defaultTracedSVG;
expect(await getFluidImageObject(args)).toEqual(
expect.objectContaining({ tracedSVG: expectedTracedSVG }),
);
}); |
<<<<<<<
const analytics = coalesce(options.analytics, platform.env('DD_TRACE_ANALYTICS'))
const dogstatsd = options.dogstatsd || {}
const runtimeMetrics = coalesce(options.runtimeMetrics, platform.env('DD_RUNTIME_METRICS_ENABLED'), false)
=======
const analytics = coalesce(
options.analytics,
platform.env('DD_TRACE_ANALYTICS_ENABLED'),
platform.env('DD_TRACE_ANALYTICS')
)
>>>>>>>
const dogstatsd = options.dogstatsd || {}
const runtimeMetrics = coalesce(options.runtimeMetrics, platform.env('DD_RUNTIME_METRICS_ENABLED'), false)
const analytics = coalesce(
options.analytics,
platform.env('DD_TRACE_ANALYTICS_ENABLED'),
platform.env('DD_TRACE_ANALYTICS')
) |
<<<<<<<
.kendoAutoComplete()
.kendoBarcode()
=======
>>>>>>>
.kendoBarcode() |
<<<<<<<
kendoSplitter(): KendoConfigBuilder {
this.resources.push('splitter/splitter');
=======
kendoSpreadsheet(): KendoConfigBuilder {
this.resources.push('spreadsheet/spreadsheet');
return this;
}
kendoSlider(): KendoConfigBuilder {
this.resources.push('slider/slider');
>>>>>>>
kendoSpreadsheet(): KendoConfigBuilder {
this.resources.push('spreadsheet/spreadsheet');
return this;
}
kendoSplitter(): KendoConfigBuilder {
this.resources.push('splitter/splitter');
return this;
}
kendoSlider(): KendoConfigBuilder {
this.resources.push('slider/slider'); |
<<<<<<<
"aurelia-binding": "github:aurelia/[email protected]",
"aurelia-bootstrapper": "github:aurelia/[email protected]",
"aurelia-dependency-injection": "github:aurelia/[email protected]",
"aurelia-logging": "github:aurelia/[email protected]",
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-templating": "github:aurelia/[email protected]",
=======
"aurelia-binding": "github:aurelia/[email protected]",
"aurelia-bootstrapper": "github:aurelia/[email protected]",
"aurelia-dependency-injection": "github:aurelia/[email protected]",
"aurelia-logging": "github:aurelia/[email protected]",
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-templating": "github:aurelia/[email protected]",
>>>>>>>
"aurelia-binding": "github:aurelia/[email protected]",
"aurelia-bootstrapper": "github:aurelia/[email protected]",
"aurelia-dependency-injection": "github:aurelia/[email protected]",
"aurelia-logging": "github:aurelia/[email protected]",
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-templating": "github:aurelia/[email protected]",
<<<<<<<
"bower:https://bower.telerik.com/[email protected]": {
"jquery": "bower:[email protected]"
},
"github:aurelia/[email protected]": {
"aurelia-dependency-injection": "github:aurelia/[email protected]",
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-task-queue": "github:aurelia/[email protected]",
=======
"github:aurelia/[email protected]": {
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-pal": "github:aurelia/[email protected]",
"aurelia-task-queue": "github:aurelia/[email protected]",
>>>>>>>
"bower:https://bower.telerik.com/[email protected]": {
"jquery": "bower:[email protected]"
},
"github:aurelia/[email protected]": {
"aurelia-metadata": "github:aurelia/[email protected]",
"aurelia-pal": "github:aurelia/[email protected]",
"aurelia-task-queue": "github:aurelia/[email protected]", |
<<<<<<<
.kendoLinearGauge()
.kendoPivotGrid()
.kendoRadialGauge()
=======
.kendoMap()
.kendoLinearGauge()
.kendoRadialGauge()
>>>>>>>
.kendoMap()
.kendoLinearGauge()
.kendoPivotGrid()
.kendoRadialGauge() |
<<<<<<<
.kendoQRCode()
=======
.kendoPivotGrid()
>>>>>>>
.kendoPivotGrid()
.kendoQRCode() |
<<<<<<<
}
function extractPackages (req, res, next) {
req.params.packages = req.params['0'];
if (!utils.isValidPackages(req.params.packages)) {
res.sendStatus(404);
} else {
next();
}
}
function extractAndBundle (req, res) {
var packages = req.params.packages.split('+');
=======
>>>>>>> |
<<<<<<<
if (i === 0 && depth > -1) arr.push(html);
=======
if (i == 0 && depth > -1) {
arr.push(html);
html = '';
}
>>>>>>>
if (i === 0 && depth > -1) {
arr.push(html);
html = '';
} |
<<<<<<<
await hexo.init();
const output = await Post.insert(posts);
await Promise.each([
['foo'],
['baz'],
['baz']
], (tags, i) => output[i].setCategories(tags));
await hexo.locals.invalidate();
listCategories();
expect(console.log.calledWith(sinon.match('Name'))).to.be.true;
expect(console.log.calledWith(sinon.match('Posts'))).to.be.true;
expect(console.log.calledWith(sinon.match('baz'))).to.be.true;
expect(console.log.calledWith(sinon.match('foo'))).to.be.true;
=======
return hexo.init()
.then(() => Post.insert(posts)).then(posts => Promise.each([
['foo'],
['baz'],
['baz']
], (tags, i) => posts[i].setCategories(tags))).then(() => {
hexo.locals.invalidate();
}).then(() => {
listCategories();
expect(logStub.calledWith(match('Name'))).be.true;
expect(logStub.calledWith(match('Posts'))).be.true;
expect(logStub.calledWith(match('baz'))).be.true;
expect(logStub.calledWith(match('foo'))).be.true;
});
>>>>>>>
await hexo.init();
const output = await Post.insert(posts);
await Promise.each([
['foo'],
['baz'],
['baz']
], (tags, i) => output[i].setCategories(tags));
await hexo.locals.invalidate();
listCategories();
expect(logStub.calledWith(match('Name'))).be.true;
expect(logStub.calledWith(match('Posts'))).be.true;
expect(logStub.calledWith(match('baz'))).be.true;
expect(logStub.calledWith(match('foo'))).be.true; |
<<<<<<<
// test offset returns are correct
var b = new Buffer(16);
assert.equal(4, b.writeUInt32LE(0, 0));
assert.equal(6, b.writeUInt16LE(0, 4));
assert.equal(7, b.writeUInt8(0, 6));
assert.equal(8, b.writeInt8(0, 7));
assert.equal(16, b.writeDoubleLE(0, 8));
=======
// test unmatched surrogates not producing invalid utf8 output
// ef bf bd = utf-8 representation of unicode replacement character
// see https://codereview.chromium.org/121173009/
buf = new Buffer('ab\ud800cd', 'utf8');
assert.equal(buf[0], 0x61);
assert.equal(buf[1], 0x62);
assert.equal(buf[2], 0xef);
assert.equal(buf[3], 0xbf);
assert.equal(buf[4], 0xbd);
assert.equal(buf[5], 0x63);
assert.equal(buf[6], 0x64);
>>>>>>>
// test offset returns are correct
var b = new Buffer(16);
assert.equal(4, b.writeUInt32LE(0, 0));
assert.equal(6, b.writeUInt16LE(0, 4));
assert.equal(7, b.writeUInt8(0, 6));
assert.equal(8, b.writeInt8(0, 7));
assert.equal(16, b.writeDoubleLE(0, 8));
// test unmatched surrogates not producing invalid utf8 output
// ef bf bd = utf-8 representation of unicode replacement character
// see https://codereview.chromium.org/121173009/
buf = new Buffer('ab\ud800cd', 'utf8');
assert.equal(buf[0], 0x61);
assert.equal(buf[1], 0x62);
assert.equal(buf[2], 0xef);
assert.equal(buf[3], 0xbf);
assert.equal(buf[4], 0xbd);
assert.equal(buf[5], 0x63);
assert.equal(buf[6], 0x64); |
<<<<<<<
EventEmitter.prototype.setMaxListeners = function(n) {
if (!util.isNumber(n) || n < 0 || isNaN(n))
=======
var defaultMaxListeners = 10;
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (typeof n !== 'number' || n < 0 || isNaN(n))
>>>>>>>
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (!util.isNumber(n) || n < 0 || isNaN(n))
<<<<<<<
EventEmitter.prototype.once = function(type, listener) {
if (!util.isFunction(listener))
=======
EventEmitter.prototype.once = function once(type, listener) {
if (typeof listener !== 'function')
>>>>>>>
EventEmitter.prototype.once = function once(type, listener) {
if (!util.isFunction(listener)) |
<<<<<<<
'Halftone': 'halftone',
=======
'Dots': 'dots',
'Wood': 'wood',
'B&W Halftone': 'halftone',
'Color Halftone': 'color_halftone',
>>>>>>>
'Halftone': 'halftone',
<<<<<<<
=======
'colorbleed': {
setup: function (style) {
scene.config.layers.buildings.draw.polygons.style = style;
this.state.animated = scene.config.styles[style].shaders.defines['EFFECT_COLOR_BLEED_ANIMATED'];
this.folder.add(this.state, 'animated').onChange(function(value) {
scene.config.styles[style].shaders.defines['EFFECT_COLOR_BLEED_ANIMATED'] = value;
scene.updateConfig();
});
}
},
>>>>>>>
<<<<<<<
scene.config.layers.buildings.style.name = style;
=======
scene.config.layers.buildings.draw.polygons.style = style;
this.state.popup_radius = this.uniforms().u_popup_radius;
this.folder.add(this.state, 'popup_radius', 0, 500).onChange(function(value) {
this.uniforms().u_popup_radius = value;
scene.requestRedraw();
}.bind(this));
this.state.popup_height = this.uniforms().u_popup_height;
this.folder.add(this.state, 'popup_height', 0, 5).onChange(function(value) {
this.uniforms().u_popup_height = value;
scene.requestRedraw();
}.bind(this));
>>>>>>>
scene.config.layers.buildings.draw.polygons.style = style;
<<<<<<<
=======
'breathe': {
setup: function (style) {
scene.config.layers.buildings.draw.polygons.style = style;
this.state.breathe_scale = this.uniforms().u_breathe_scale;
this.folder.add(this.state, 'breathe_scale', 0, 50).onChange(function(value) {
this.uniforms().u_breathe_scale = value;
scene.requestRedraw();
}.bind(this));
this.state.breathe_speed = this.uniforms().u_breathe_speed;
this.folder.add(this.state, 'breathe_speed', 0, 3).onChange(function(value) {
this.uniforms().u_breathe_speed = value;
scene.requestRedraw();
}.bind(this));
}
},
'dots': {
setup: function (style) {
scene.config.layers.buildings.draw.polygons.style = style;
this.state.background = style_options.scaleColor(this.uniforms().u_dot_background_color, 255);
this.folder.addColor(this.state, 'background').onChange(function(value) {
this.uniforms().u_dot_background_color = style_options.scaleColor(value, 1 / 255);
scene.requestRedraw();
}.bind(this));
this.state.dot_color = style_options.scaleColor(this.uniforms().u_dot_color, 255);
this.folder.addColor(this.state, 'dot_color').onChange(function(value) {
this.uniforms().u_dot_color = style_options.scaleColor(value, 1 / 255);
scene.requestRedraw();
}.bind(this));
this.state.grid_scale = this.uniforms().u_dot_grid_scale;
this.folder.add(this.state, 'grid_scale', 0, 0.1).onChange(function(value) {
this.uniforms().u_dot_grid_scale = value;
scene.requestRedraw();
}.bind(this));
this.state.dot_scale = this.uniforms().u_dot_scale;
this.folder.add(this.state, 'dot_scale', 0, 0.4).onChange(function(value) {
this.uniforms().u_dot_scale = value;
scene.requestRedraw();
}.bind(this));
}
},
'wood': {
setup: function (style) {
scene.config.layers.buildings.draw.polygons.style = style;
this.state.wood_color1 = style_options.scaleColor(this.uniforms().u_wood_color1, 255);
this.folder.addColor(this.state, 'wood_color1').onChange(function(value) {
this.uniforms().u_wood_color1 = style_options.scaleColor(value, 1 / 255);
scene.requestRedraw();
}.bind(this));
this.state.wood_color2 = style_options.scaleColor(this.uniforms().u_wood_color2, 255);
this.folder.addColor(this.state, 'wood_color2').onChange(function(value) {
this.uniforms().u_wood_color2 = style_options.scaleColor(value, 1 / 255);
scene.requestRedraw();
}.bind(this));
this.state.eccentricity = this.uniforms().u_wood_eccentricity;
this.folder.add(this.state, 'eccentricity', -1, 1).onChange(function(value) {
this.uniforms().u_wood_eccentricity = value;
scene.requestRedraw();
}.bind(this));
this.state.twist = this.uniforms().u_wood_twist / .0001;
this.folder.add(this.state, 'twist', 0, 1).onChange(function(value) {
this.uniforms().u_wood_twist = value * .0001;
scene.requestRedraw();
}.bind(this));
this.state.scale = this.uniforms().u_wood_scale / 100;
this.folder.add(this.state, 'scale', 0, 1).onChange(function(value) {
this.uniforms().u_wood_scale = value * 100;
scene.requestRedraw();
}.bind(this));
}
},
'color_halftone': {
setup: function (style) {
var layers = scene.config.layers;
layers.earth.draw.polygons.style = 'color_halftone_polygons';
layers.water.draw.polygons.style = 'color_halftone_polygons';
layers.water.outlines.draw.lines.style = 'color_halftone_lines';
layers.landuse.draw.polygons.style = 'color_halftone_polygons';
layers.buildings.draw.polygons.style = 'color_halftone_polygons';
layers.roads.draw.lines.style = 'color_halftone_lines';
var visible_layers = ['earth', 'landuse', 'water', 'roads', 'buildings'];
Object.keys(layers).forEach(function(l) {
if (visible_layers.indexOf(l) === -1) {
layers[l].visible = false;
}
});
this.state.dot_frequency = scene.styles.color_halftone_polygons.shaders.uniforms.dot_frequency;
this.folder.add(this.state, 'dot_frequency', 0, 200).onChange(function(value) {
scene.styles.color_halftone_polygons.shaders.uniforms.dot_frequency = value;
scene.styles.color_halftone_lines.shaders.uniforms.dot_frequency = value;
scene.requestRedraw();
}.bind(this));
this.state.dot_scale = scene.styles.color_halftone_polygons.shaders.uniforms.dot_scale;
this.folder.add(this.state, 'dot_scale', 0, 3).onChange(function(value) {
scene.styles.color_halftone_polygons.shaders.uniforms.dot_scale = value;
scene.styles.color_halftone_lines.shaders.uniforms.dot_scale = value;
scene.requestRedraw();
}.bind(this));
this.state.true_color = scene.styles.color_halftone_polygons.shaders.uniforms.true_color;
this.folder.add(this.state, 'true_color').onChange(function(value) {
scene.styles.color_halftone_polygons.shaders.uniforms.true_color = value;
scene.styles.color_halftone_lines.shaders.uniforms.true_color = value;
scene.requestRedraw();
}.bind(this));
}
},
>>>>>>>
<<<<<<<
=======
},
'icons': {
setup: function (style) {
scene.config.layers.pois.draw.pois.style = 'icons';
scene.config.layers.pois.draw.pois.sprite = 'tree';
scene.config.layers.pois.draw.pois.size = [[13, '16px'], [14, '24px'], [15, '32px']];
this.state.rotate = this.uniforms().rotate;
this.folder.add(this.state, 'rotate').onChange(function(value) {
this.uniforms().rotate = value;
scene.requestRedraw();
}.bind(this));
}
>>>>>>> |
<<<<<<<
if (startup.lazyConstants()[sig]) {
err = process._kill(pid, startup.lazyConstants()[sig]);
=======
if (startup.lazyConstants()[sig] &&
sig.slice(0, 3) === 'SIG') {
r = process._kill(pid, startup.lazyConstants()[sig]);
>>>>>>>
if (startup.lazyConstants()[sig] &&
sig.slice(0, 3) === 'SIG') {
err = process._kill(pid, startup.lazyConstants()[sig]); |
<<<<<<<
if (!util.isNumber(n) || n < 0)
=======
if (typeof n !== 'number' || n < 0 || isNaN(n))
>>>>>>>
if (!util.isNumber(n) || n < 0 || isNaN(n)) |
<<<<<<<
testPBKDF2('password', 'salt', 2, 20,
'\xea\x6c\x01\x4d\xc7\x2d\x6f\x8c\xcd\x1e\xd9\x2a' +
'\xce\x1d\x41\xf0\xd8\xde\x89\x57');
testPBKDF2('password', 'salt', 4096, 20,
'\x4b\x00\x79\x01\xb7\x65\x48\x9a\xbe\xad\x49\xd9\x26' +
'\xf7\x21\xd0\x65\xa4\x29\xc1');
testPBKDF2('passwordPASSWORDpassword',
'saltSALTsaltSALTsaltSALTsaltSALTsalt',
4096,
25,
'\x3d\x2e\xec\x4f\xe4\x1c\x84\x9b\x80\xc8\xd8\x36\x62' +
'\xc0\xe4\x4a\x8b\x29\x1a\x96\x4c\xf2\xf0\x70\x38');
testPBKDF2('pass\0word', 'sa\0lt', 4096, 16,
'\x56\xfa\x6a\xa7\x55\x48\x09\x9d\xcc\x37\xd7\xf0\x34' +
'\x25\xe0\xc3');
function assertSorted(list) {
for (var i = 0, k = list.length - 1; i < k; ++i) {
var a = list[i + 0];
var b = list[i + 1];
assert(a <= b);
}
}
// Assume that we have at least AES256-SHA.
assert.notEqual(0, crypto.getCiphers());
assert.notEqual(-1, crypto.getCiphers().indexOf('AES256-SHA'));
assertSorted(crypto.getCiphers());
// Assert that we have sha and sha1 but not SHA and SHA1.
assert.notEqual(0, crypto.getHashes());
assert.notEqual(-1, crypto.getHashes().indexOf('sha1'));
assert.notEqual(-1, crypto.getHashes().indexOf('sha'));
assert.equal(-1, crypto.getHashes().indexOf('SHA1'));
assert.equal(-1, crypto.getHashes().indexOf('SHA'));
assertSorted(crypto.getHashes());
(function() {
var c = crypto.createDecipher('aes-128-ecb', '');
assert.throws(function() { c.final('utf8') }, /invalid public key/);
})();
// Base64 padding regression test, see #4837.
(function() {
var c = crypto.createCipher('aes-256-cbc', 'secret');
var s = c.update('test', 'utf8', 'base64') + c.final('base64');
assert.equal(s, '375oxUQCIocvxmC5At+rvA==');
})();
=======
// Error path should not leak memory (check with valgrind).
assert.throws(function() {
crypto.pbkdf2('password', 'salt', 1, 20, null);
});
// Calling Cipher.final() or Decipher.final() twice should error but
// not assert. See #4886.
(function() {
var c = crypto.createCipher('aes-256-cbc', 'secret');
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
var d = crypto.createDecipher('aes-256-cbc', 'secret');
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
})();
>>>>>>>
testPBKDF2('password', 'salt', 2, 20,
'\xea\x6c\x01\x4d\xc7\x2d\x6f\x8c\xcd\x1e\xd9\x2a' +
'\xce\x1d\x41\xf0\xd8\xde\x89\x57');
testPBKDF2('password', 'salt', 4096, 20,
'\x4b\x00\x79\x01\xb7\x65\x48\x9a\xbe\xad\x49\xd9\x26' +
'\xf7\x21\xd0\x65\xa4\x29\xc1');
testPBKDF2('passwordPASSWORDpassword',
'saltSALTsaltSALTsaltSALTsaltSALTsalt',
4096,
25,
'\x3d\x2e\xec\x4f\xe4\x1c\x84\x9b\x80\xc8\xd8\x36\x62' +
'\xc0\xe4\x4a\x8b\x29\x1a\x96\x4c\xf2\xf0\x70\x38');
testPBKDF2('pass\0word', 'sa\0lt', 4096, 16,
'\x56\xfa\x6a\xa7\x55\x48\x09\x9d\xcc\x37\xd7\xf0\x34' +
'\x25\xe0\xc3');
function assertSorted(list) {
for (var i = 0, k = list.length - 1; i < k; ++i) {
var a = list[i + 0];
var b = list[i + 1];
assert(a <= b);
}
}
// Assume that we have at least AES256-SHA.
assert.notEqual(0, crypto.getCiphers());
assert.notEqual(-1, crypto.getCiphers().indexOf('AES256-SHA'));
assertSorted(crypto.getCiphers());
// Assert that we have sha and sha1 but not SHA and SHA1.
assert.notEqual(0, crypto.getHashes());
assert.notEqual(-1, crypto.getHashes().indexOf('sha1'));
assert.notEqual(-1, crypto.getHashes().indexOf('sha'));
assert.equal(-1, crypto.getHashes().indexOf('SHA1'));
assert.equal(-1, crypto.getHashes().indexOf('SHA'));
assertSorted(crypto.getHashes());
(function() {
var c = crypto.createDecipher('aes-128-ecb', '');
assert.throws(function() { c.final('utf8') }, /invalid public key/);
})();
// Base64 padding regression test, see #4837.
(function() {
var c = crypto.createCipher('aes-256-cbc', 'secret');
var s = c.update('test', 'utf8', 'base64') + c.final('base64');
assert.equal(s, '375oxUQCIocvxmC5At+rvA==');
})();
// Error path should not leak memory (check with valgrind).
assert.throws(function() {
crypto.pbkdf2('password', 'salt', 1, 20, null);
});
// Calling Cipher.final() or Decipher.final() twice should error but
// not assert. See #4886.
(function() {
var c = crypto.createCipher('aes-256-cbc', 'secret');
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
var d = crypto.createDecipher('aes-256-cbc', 'secret');
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
})(); |
<<<<<<<
metric.title = 'Requests';
metric.yDataSets[0].color = '#000000';
=======
metric.title = 'API Requests'
metric.yDataSets[0].color = '#000000'
>>>>>>>
metric.title = 'API Requests';
metric.yDataSets[0].color = '#000000';
<<<<<<<
metric.title = 'Errors - 5xx';
metric.statColor = '#FE5850';
metric.yDataSets[0].color = '#FE5850';
=======
metric.title = 'API Errors - 5xx'
metric.statColor = '#FE5850'
metric.yDataSets[0].color = '#FE5850'
>>>>>>>
metric.title = 'API Errors - 5xx';
metric.statColor = '#FE5850';
metric.yDataSets[0].color = '#FE5850';
<<<<<<<
metric.title = 'Errors - 4xx';
metric.statColor = '#FE5850';
metric.yDataSets[0].color = '#FE5850';
=======
metric.title = 'API Errors - 4xx'
metric.statColor = '#FE5850'
metric.yDataSets[0].color = '#FE5850'
>>>>>>>
metric.title = 'API Errors - 4xx';
metric.statColor = '#FE5850';
metric.yDataSets[0].color = '#FE5850';
<<<<<<<
metric.title = 'Latency';
metric.statColor = '#029CE3';
metric.yDataSets[0].color = '#029CE3';
=======
metric.title = 'API Latency'
metric.statColor = '#029CE3'
metric.yDataSets[0].color = '#029CE3'
>>>>>>>
metric.title = 'API Latency';
metric.statColor = '#029CE3';
metric.yDataSets[0].color = '#029CE3'; |
<<<<<<<
// Global configuration for all styles
StyleManager.init = function () {
// GLProgram.removeTransform('globals');
// // Layer re-ordering function
// GLProgram.addTransform('globals', shaderSources['modules/reorder_layers']);
// // Spherical environment map
// GLProgram.addTransform('globals', `
// #if defined(LIGHTING_ENVIRONMENT)
// ${shaderSources['modules/spherical_environment_map']}
// #endif
// `);
};
// Update built-in style or create a new one
StyleManager.updateStyle = function (name, settings) {
Styles[name] = Styles[name] || Object.create(Styles[settings.extends] || RenderMode);
if (Styles[settings.extends]) {
Styles[name].parent = Styles[settings.extends]; // explicit 'super' class access
}
for (var s in settings) {
Styles[name][s] = settings[s];
}
Styles[name].name = name;
return Styles[name];
};
// Destroy all styles for a given GL context
StyleManager.destroy = function (gl) {
Object.keys(Styles).forEach((_name) => {
var style = Styles[_name];
if (style.gl === gl) {
log.trace(`destroying render style ${style.name}`);
style.destroy();
}
});
};
// Normalize some style settings that may not have been explicitly specified in the stylesheet
StyleManager.preProcessSceneConfig = function (config) {
// Post-process styles
for (var m in config.layers) {
if (config.layers[m].visible !== false) {
config.layers[m].visible = true;
}
if ((config.layers[m].style && config.layers[m].style.name) == null) {
config.layers[m].style = {};
for (var p in StyleParser.defaults.style) {
config.layers[m].style[p] = StyleParser.defaults.style[p];
}
}
}
config.camera = config.camera || {}; // ensure camera object
config.lighting = config.lighting || {}; // ensure lighting object
return StyleManager.preloadStyles(config.styles);
};
// Preloads network resources in the stylesheet (shaders, textures, etc.)
StyleManager.preloadStyles = function (styles) {
// Preload shaders
var queue = [];
if (styles) {
for (var style of Utils.values(styles)) {
if (style.shaders && style.shaders.transforms) {
let _transforms = style.shaders.transforms;
for (var [key, transform] of Utils.entries(style.shaders.transforms)) {
let _key = key;
// Array of transforms
if (Array.isArray(transform)) {
for (let t=0; t < transform.length; t++) {
if (typeof transform[t] === 'object' && transform[t].url) {
let _index = t;
queue.push(Utils.io(Utils.cacheBusterForUrl(transform[t].url)).then((data) => {
_transforms[_key][_index] = data;
}, (error) => {
log.error(`StyleManager.preProcessStyles: error loading shader transform`, _transforms, _key, _index, error);
}));
}
}
}
// Single transform
else if (typeof transform === 'object' && transform.url) {
queue.push(Utils.io(Utils.cacheBusterForUrl(transform.url)).then((data) => {
_transforms[_key] = data;
}, (error) => {
log.error(`StyleManager.preProcessStyles: error loading shader transform`, _transforms, _key, error);
}));
}
}
}
}
}
// TODO: also preload textures
return Promise.all(queue); // TODO: add error
};
// Called once on instantiation
StyleManager.createStyles = function (stylesheet_styles) {
StyleManager.init();
// Stylesheet-defined styles
for (var name in stylesheet_styles) {
Styles[name] = StyleManager.updateStyle(name, stylesheet_styles[name]);
}
// Initialize all
for (name in Styles) {
Styles[name].init();
}
return Styles;
};
// Called when styles are updated in stylesheet
StyleManager.updateStyles = function (stylesheet_styles) {
// Copy stylesheet styles
for (var name in stylesheet_styles) {
Styles[name] = StyleManager.updateStyle(name, stylesheet_styles[name]);
}
// Compile all styles
for (name in Styles) {
try {
Styles[name].compile();
log.trace(`StyleManager.updateStyles(): compiled style ${name}`);
}
catch(error) {
log.error(`StyleManager.updateStyles(): error compiling style ${name}:`, error);
}
}
log.debug(`StyleManager.updateStyles(): compiled all styles`);
return Styles;
};
// Base class
=======
// Global configuration for all modes
ModeManager.init = function () {
GLProgram.removeTransform('globals');
// Layer re-ordering function
GLProgram.addTransform('globals', shaderSources['modules/reorder_layers']);
// Spherical environment map
GLProgram.addTransform('globals', `
#if defined(LIGHTING_ENVIRONMENT)
${shaderSources['modules/spherical_environment_map']}
#endif
`);
};
// Update built-in mode or create a new one
ModeManager.updateMode = function (name, settings) {
Modes[name] = Modes[name] || Object.create(Modes[settings.extends] || RenderMode);
if (Modes[settings.extends]) {
Modes[name].parent = Modes[settings.extends]; // explicit 'super' class access
}
for (var s in settings) {
Modes[name][s] = settings[s];
}
Modes[name].name = name;
return Modes[name];
};
// Destroy all modes for a given GL context
ModeManager.destroy = function (gl) {
Object.keys(Modes).forEach((_name) => {
var mode = Modes[_name];
if (mode.gl === gl) {
log.trace(`destroying render mode ${mode.name}`);
mode.destroy();
}
});
};
// Base class
>>>>>>>
<<<<<<<
// Update built-in style or create a new one
StyleManager.updateStyle = function (name, settings)
{
Styles[name] = Styles[name] || Object.create(Styles[settings.extends] || RenderMode);
if (Styles[settings.extends]) {
Styles[name].parent = Styles[settings.extends]; // explicit 'super' class access
}
for (var s in settings) {
Styles[name][s] = settings[s];
}
Styles[name].name = name;
return Styles[name];
};
// Destroy all styles for a given GL context
StyleManager.destroy = function (gl) {
Object.keys(Styles).forEach((_name) => {
var style = Styles[_name];
if (style.gl === gl) {
log.trace(`destroying render style ${style.name}`);
style.destroy();
}
});
};
=======
>>>>>>> |
<<<<<<<
constructor(options) {
super(options)
}
=======
>>>>>>>
constructor(options) {
super(options)
}
<<<<<<<
return Object.assign({}, session, {
accounts
})
=======
return {
...session,
accounts,
expires
}
>>>>>>>
return Object.assign({}, session, {
accounts,
expires
}) |
<<<<<<<
exports.config = setup({
modules: {
definition: false,
wrapper: false
},
=======
>>>>>>> |
<<<<<<<
window.htmlToDraft = require('html-to-draftjs').default
window.draftJs = draftJs;
window.axios = axios
window.juice = juice
window.currentDriver = localDriver
var logWatchers = []
var rawLogFun = console.log
console.log = function (message) {
rawLogFun.apply(null, arguments)
try {
var args = [].slice.apply(arguments)
brodcastToWatcher(args)
} catch (e){
console.log('brodcastToWatcher.error', e);
}
}
function brodcastToWatcher(args) {
for (let index = 0; index < logWatchers.length; index++) {
const logWatcher = logWatchers[index];
// console.log('brodcastToWatcher', logWatcher, args)
chrome.tabs.sendMessage(
logWatcher.tab.id,
{ method: 'consoleLog', args: args },
function (response) {}
)
}
}
=======
>>>>>>>
window.currentDriver = localDriver
var logWatchers = []
var rawLogFun = console.log
console.log = function (message) {
rawLogFun.apply(null, arguments)
try {
var args = [].slice.apply(arguments)
brodcastToWatcher(args)
} catch (e){
console.log('brodcastToWatcher.error', e);
}
}
function brodcastToWatcher(args) {
for (let index = 0; index < logWatchers.length; index++) {
const logWatcher = logWatchers[index];
// console.log('brodcastToWatcher', logWatcher, args)
chrome.tabs.sendMessage(
logWatcher.tab.id,
{ method: 'consoleLog', args: args },
function (response) {}
)
}
}
<<<<<<<
if (request.action && request.action == 'startInspect') {
// self.senders[request.task.guid] = sender
logWatchers.push(sender)
}
=======
>>>>>>>
if (request.action && request.action == 'startInspect') {
// self.senders[request.task.guid] = sender
logWatchers.push(sender)
} |
<<<<<<<
=======
// Helper functions passed to dynamic style functions
Style.helpers = {
Style: Style,
Geo: Geo
};
>>>>>>>
// Helper functions passed to dynamic style functions
Style.helpers = {
Style: Style,
Geo: Geo
};
<<<<<<<
// Interactivity (selection map)
var interactive = false;
if (typeof layer_style.interactive == 'function') {
interactive = layer_style.interactive(feature, tile, helpers);
}
else {
interactive = layer_style.interactive;
}
if (interactive == true) {
var selector = Style.generateSelection(Style.selection_map);
// TODO: build a feature_id-based map on main thread to look-up features
selector.feature_id = feature.id;
// selector.name = feature.properties.name;
// selector.feature = feature;
selector.feature_properties = feature.properties;
style.selection = {
active: true,
// color: selector.color,
float: selector.float
};
}
else {
style.selection = Style.defaults.selection;
}
// style.mode = layer_style.mode || Style.defaults.mode;
=======
>>>>>>>
// Interactivity (selection map)
var interactive = false;
if (typeof layer_style.interactive == 'function') {
interactive = layer_style.interactive(feature, tile, Style.helpers);
}
else {
interactive = layer_style.interactive;
}
if (interactive == true) {
var selector = Style.generateSelection(Style.selection_map);
// TODO: build a feature_id-based map on main thread to look-up features
selector.feature_id = feature.id;
// selector.name = feature.properties.name;
// selector.feature = feature;
selector.feature_properties = feature.properties;
style.selection = {
active: true,
// color: selector.color,
float: selector.float
};
}
else {
style.selection = Style.defaults.selection;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.