conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
that.addListener = function (listener, namespace, predicate, priority, softNamespace, listenerId) {
=======
that.addListener = function (listener, namespace, priority, predicate, softNamespace) {
>>>>>>>
that.addListener = function (listener, namespace, priority, predicate, softNamespace, listenerId) {
<<<<<<<
var id = listenerId || identify(listener);
=======
var id = fluid.event.identifyListener(listener);
>>>>>>>
var id = listenerId || fluid.event.identifyListener(listener);
<<<<<<<
listenerId: listenerId,
priority: fluid.event.mapPriority(priority, that.sortedListeners.length)};
=======
priority: fluid.parsePriority(priority, that.sortedListeners.length, false, "listeners")};
>>>>>>>
listenerId: listenerId,
priority: fluid.parsePriority(priority, that.sortedListeners.length, false, "listeners")
};
<<<<<<<
wrapper(firer).addListener(value.listener, namespace || value.namespace, value.predicate, value.priority, value.softNamespace, value.listenerId);
=======
wrapper(firer).addListener(value.listener, namespace || value.namespace, value.priority, value.predicate, value.softNamespace);
>>>>>>>
wrapper(firer).addListener(value.listener, namespace || value.namespace, value.priority, value.predicate, value.softNamespace, value.listenerId); |
<<<<<<<
gradeNames: ["fluid.textToSpeech", "fluid.prefs.enactor"],
=======
gradeNames: ["fluid.prefs.enactor", "autoInit"],
>>>>>>>
gradeNames: "fluid.prefs.enactor", |
<<<<<<<
type: "fluid.uploader.swfUploadStrategy.local",
options: {
errorHandler: "{multiFileUploader}.dom.errorHandler"
}
=======
type: "fluid.uploader.local"
>>>>>>>
type: "fluid.uploader.local",
options: {
errorHandler: "{multiFileUploader}.dom.errorHandler"
}
<<<<<<<
var filterErroredFiles = function (file, events, queue, queueSettings) {
var fileSizeLimit = queueSettings.fileSizeLimit * 1000;
var fileUploadLimit = queueSettings.fileUploadLimit;
var processedFiles = queue.getReadyFiles().length + queue.getUploadedFiles().length;
if (file.size > fileSizeLimit) {
file.filestatus = fluid.uploader.fileStatusConstants.ERROR;
events.onQueueError.fire(file, fluid.uploader.queueErrorConstants.FILE_EXCEEDS_SIZE_LIMIT);
} else if (processedFiles >= fileUploadLimit) {
events.onQueueError.fire(file, fluid.uploader.queueErrorConstants.QUEUE_LIMIT_EXCEEDED);
} else {
events.afterFileQueued.fire(file);
}
};
fluid.uploader.swfUploadStrategy.flash10EventBinder = function (queue, queueSettings, events, local) {
var model = queue.files;
=======
fluid.uploader.swfUploadStrategy.flash10EventBinder = function (model, events) {
>>>>>>>
var filterErroredFiles = function (file, events, queue, queueSettings) {
var fileSizeLimit = queueSettings.fileSizeLimit * 1000;
var fileUploadLimit = queueSettings.fileUploadLimit;
var processedFiles = queue.getReadyFiles().length + queue.getUploadedFiles().length;
if (file.size > fileSizeLimit) {
file.filestatus = fluid.uploader.fileStatusConstants.ERROR;
events.onQueueError.fire(file, fluid.uploader.queueErrorConstants.FILE_EXCEEDS_SIZE_LIMIT);
} else if (processedFiles >= fileUploadLimit) {
events.onQueueError.fire(file, fluid.uploader.queueErrorConstants.QUEUE_LIMIT_EXCEEDED);
} else {
events.afterFileQueued.fire(file);
}
};
fluid.uploader.swfUploadStrategy.flash10EventBinder = function (queue, queueSettings, events) {
var model = queue.files;
<<<<<<<
events.onUploadStart.addListener(function () {
local.disableBrowseButton();
});
events.afterUploadComplete.addListener(function () {
local.enableBrowseButton();
});
events.onFileQueued.addListener(function (file) {
filterErroredFiles(file, events, queue, queueSettings);
});
=======
>>>>>>>
events.onFileQueued.addListener(function (file) {
filterErroredFiles(file, events, queue, queueSettings);
});
<<<<<<<
"{multiFileUploader}.queue",
"{multiFileUploader}.options.queueSettings",
"{multiFileUploader}.events",
"{swfUploadStrategy}.local"
=======
"{multiFileUploader}.queue.files",
"{multiFileUploader}.events"
>>>>>>>
"{multiFileUploader}.queue",
"{multiFileUploader}.queue.files",
"{multiFileUploader}.events" |
<<<<<<<
classnameMap: null, // must be supplied by implementors
=======
// The default model value represents both the expected format as well as the setting to be applied in the absence of a value passed down to the component.
// i.e. from the settings store, or specific defaults derived from schema.
// Note: This default value is not contributed and shared out
model: {
value: "default"
},
selectors: {
textFont: ".flc-uiOptions-text-font",
label: ".flc-uiOptions-text-font-label"
},
>>>>>>>
selectors: {
textFont: ".flc-uiOptions-text-font",
label: ".flc-uiOptions-text-font-label"
},
<<<<<<<
=======
// The default model value represents both the expected format as well as the setting to be applied in the absence of a value passed down to the component.
// i.e. from the settings store, or specific defaults derived from schema.
// Note: This default value is not contributed and shared out
model: {
value: "default"
},
listeners: {
afterRender: "{that}.style"
},
selectors: {
themeRow: ".flc-uiOptions-themeRow",
themeLabel: ".flc-uiOptions-theme-label",
themeInput: ".flc-uiOptions-themeInput",
label: ".flc-uiOptions-contrast-label"
},
>>>>>>>
listeners: {
afterRender: "{that}.style"
},
selectors: {
themeRow: ".flc-uiOptions-themeRow",
themeLabel: ".flc-uiOptions-theme-label",
themeInput: ".flc-uiOptions-themeInput",
label: ".flc-uiOptions-contrast-label"
}, |
<<<<<<<
/* global fluid, jqUnit, speechSynthesis */
=======
// Declare dependencies
/* global fluid, jqUnit */
>>>>>>>
/* global fluid, jqUnit */
<<<<<<<
gradeNames: ["fluid.prefs.enactor.speak"],
members: {
eventRecord: {},
speakQueue: []
},
=======
gradeNames: ["fluid.prefs.enactor.speak", "autoInit"],
>>>>>>>
gradeNames: ["fluid.prefs.enactor.speak"],
<<<<<<<
gradeNames: ["fluid.prefs.enactor.selfVoicing", "fluid.tests.prefs.enactor.speakEnactor"],
=======
gradeNames: ["fluid.prefs.enactor.selfVoicing", "autoInit"],
>>>>>>>
gradeNames: ["fluid.prefs.enactor.selfVoicing"], |
<<<<<<<
var initialModel = prefsEditor.initialModel;
var globalUIEnhancer = fluid.queryIoCSelector(fluid.rootComponent, "fluid.pageEnhancer", true)[0].uiEnhancer;
=======
var initialModel = prefsEditorLoader.initialModel;
>>>>>>>
var globalUIEnhancer = fluid.queryIoCSelector(fluid.rootComponent, "fluid.pageEnhancer", true)[0].uiEnhancer;
var initialModel = prefsEditorLoader.initialModel; |
<<<<<<<
var softFailure = [false];
fluid.activityTracing = false;
fluid.activityTrace = [];
=======
>>>>>>>
fluid.activityTracing = false;
fluid.activityTrace = [];
<<<<<<<
fluid.setLogging(true);
fluid.log.apply(null, ["ASSERTION FAILED: "].concat(args));
fluid.logActivity(activity);
=======
fluid.log.apply(null, [fluid.logLevel.FAIL, "ASSERTION FAILED: "].concat(args).concat(fluid.renderActivity(activity).reverse()));
>>>>>>>
fluid.log.apply(null, [fluid.logLevel.FAIL, "ASSERTION FAILED: "].concat(args));
fluid.logActivity(activity); |
<<<<<<<
fluid.demo.initTableOfContents = function () {
fluid.tableOfContents("body");
=======
fluid.tableOfContents("body", {
ignoreForToC: {
trees: ".demo-toc-trees"
}
});
>>>>>>>
fluid.demo.initTableOfContents = function () {
fluid.tableOfContents("body", {
ignoreForToC: {
trees: ".demo-toc-trees"
}
}); |
<<<<<<<
"fluid.prefs.emphasizeLinks": {
"model.value": "value"
}
},
cssClass: null, // Must be supplied by implementors
elementsToStyle: "{that}.container"
});
/*******************************************************************************
* inputsLarger
*
* The enactor to enlarge inputs in the container according to the value
*******************************************************************************/
// Note that the implementors need to provide the container for this view component
fluid.defaults("fluid.prefs.enactor.inputsLarger", {
gradeNames: ["fluid.prefs.enactor.styleElements", "fluid.viewComponent"],
preferenceMap: {
"fluid.prefs.inputsLarger": {
"model.value": "value"
=======
"fluid.prefs.enhanceInputs": {
"model.value": "default"
>>>>>>>
"fluid.prefs.enhanceInputs": {
"model.value": "value" |
<<<<<<<
var power = navigator.mozPower;
navigator.mozApps.getSelf().onsuccess = function(e) {
var app = e.target.result;
app.launch();
if (power) {
power.screenEnabled = true;
var preferredBrightness = 0.8;
power.screenBrightness = preferredBrightness;
}
if ('vibrate' in navigator) {
var vibrateInterval = 0;
vibrateInterval = window.setInterval(function vibrate() {
navigator.vibrate([200]);
}, 600);
window.setTimeout(function clearVibration() {
window.clearInterval(vibrateInterval);
}, 3000);
}
ringtonePlayer.play();
window.setTimeout(function pauseRingtone() {
ringtonePlayer.pause();
}, 2000);
};
=======
var protocol = window.location.protocol;
var host = window.location.host;
window.open(protocol + '//' + host + '/onring.html',
'ring_screen', 'attention');
if ('mozVibrate' in navigator) {
var vibrateInterval = 0;
vibrateInterval = window.setInterval(function vibrate() {
navigator.mozVibrate([200]);
}, 600);
window.setTimeout(function clearVibration() {
window.clearInterval(vibrateInterval);
}, 3000);
}
ringtonePlayer.play();
window.setTimeout(function pauseRingtone() {
ringtonePlayer.pause();
}, 2000);
>>>>>>>
var protocol = window.location.protocol;
var host = window.location.host;
window.open(protocol + '//' + host + '/onring.html',
'ring_screen', 'attention');
if ('vibrate' in navigator) {
var vibrateInterval = 0;
vibrateInterval = window.setInterval(function vibrate() {
navigator.vibrate([200]);
}, 600);
window.setTimeout(function clearVibration() {
window.clearInterval(vibrateInterval);
}, 3000);
}
ringtonePlayer.play();
window.setTimeout(function pauseRingtone() {
ringtonePlayer.pause();
}, 2000); |
<<<<<<<
uiOptions: {
options: {
components: {
settingsStore: "{uiEnhancer}.settingsStore"
},
listeners: {
onUIOptionsRefresh: "{uiEnhancer}.updateFromSettingsStore"
}
}
},
container: "{that}.container",
distributeOptions: [{
source: "{that}.options.templateLoader.options",
removeSource: true,
target: "{that templateLoader}.options"
}, {
source: "{that}.options.prefix",
target: "{that templatePath}.options.value"
}, {
source: "{that}.options.uiOptionsLoader.options",
removeSource: true,
target: "{that > uiOptionsLoader}.options"
}, {
source: "{that}.options.uiOptions.options",
removeSource: true,
target: "{that uiOptions}.options"
}, {
source: "{that}.options.container",
removeSource: true,
target: "{that > uiOptionsLoader}.container"
}]
=======
uiOptionsTransform: {
transformer: "fluid.uiOptions.mapOptions",
config: {
// To be replaced by IoCSS when FLUID-5012, FLUID-5013 and FLUID-5017 are resolved.
"*.templateLoader": "templateLoader",
"*.uiOptionsLoader.*.uiOptions": "uiOptions",
// To be replaced by IoCSS when FLUID-5013 and FLUID-5017 are resolved.
"*.uiOptionsLoader.container": "container",
// To be replaced by IoCSS when FLUID-5014 Case 2 and FLUID-5017 are resolved.
// "prefix" options is needed by both "fatPanel" and its grade components "inline".
"*.templateLoader.*.templatePath.options.value": "prefix",
// To be replaced by IoCSS when FLUID-5017 is resolved.
"*.uiOptionsLoader": "uiOptionsLoader"
}
}
>>>>>>>
container: "{that}.container",
distributeOptions: [{
source: "{that}.options.templateLoader.options",
removeSource: true,
target: "{that templateLoader}.options"
}, {
source: "{that}.options.prefix",
target: "{that templatePath}.options.value"
}, {
source: "{that}.options.uiOptionsLoader.options",
removeSource: true,
target: "{that > uiOptionsLoader}.options"
}, {
source: "{that}.options.uiOptions.options",
removeSource: true,
target: "{that uiOptions}.options"
}, {
source: "{that}.options.container",
removeSource: true,
target: "{that > uiOptionsLoader}.container"
}] |
<<<<<<<
templates: {
textSize: "%templatePrefix/PrefsEditorTemplate-textSize.html",
textFont: "%templatePrefix/PrefsEditorTemplate-textFont.html",
lineSpace: "%templatePrefix/PrefsEditorTemplate-lineSpace.html",
contrast: "%templatePrefix/PrefsEditorTemplate-contrast.html",
layoutControls: "%templatePrefix/PrefsEditorTemplate-layout.html",
linksControls: "%templatePrefix/PrefsEditorTemplate-linksControls.html",
emphasizeLinks: "%templatePrefix/PrefsEditorTemplate-emphasizeLinks.html",
inputsLarger: "%templatePrefix/PrefsEditorTemplate-inputsLarger.html"
=======
resources: {
textSize: "%prefix/PrefsEditorTemplate-textSize.html",
textFont: "%prefix/PrefsEditorTemplate-textFont.html",
lineSpace: "%prefix/PrefsEditorTemplate-lineSpace.html",
contrast: "%prefix/PrefsEditorTemplate-contrast.html",
layoutControls: "%prefix/PrefsEditorTemplate-layout.html",
linksControls: "%prefix/PrefsEditorTemplate-linksControls.html",
emphasizeLinks: "%prefix/PrefsEditorTemplate-emphasizeLinks.html",
inputsLarger: "%prefix/PrefsEditorTemplate-inputsLarger.html"
>>>>>>>
resources: {
textSize: "%templatePrefix/PrefsEditorTemplate-textSize.html",
textFont: "%templatePrefix/PrefsEditorTemplate-textFont.html",
lineSpace: "%templatePrefix/PrefsEditorTemplate-lineSpace.html",
contrast: "%templatePrefix/PrefsEditorTemplate-contrast.html",
layoutControls: "%templatePrefix/PrefsEditorTemplate-layout.html",
linksControls: "%templatePrefix/PrefsEditorTemplate-linksControls.html",
emphasizeLinks: "%templatePrefix/PrefsEditorTemplate-emphasizeLinks.html",
inputsLarger: "%templatePrefix/PrefsEditorTemplate-inputsLarger.html"
<<<<<<<
templates: {
prefsEditor: "%templatePrefix/SeparatedPanelPrefsEditor.html"
=======
resources: {
prefsEditor: "%prefix/SeparatedPanelPrefsEditor.html"
>>>>>>>
resources: {
prefsEditor: "%templatePrefix/SeparatedPanelPrefsEditor.html"
<<<<<<<
templates: {
prefsEditor: "%templatePrefix/FullPreviewPrefsEditor.html"
=======
resources: {
prefsEditor: "%prefix/FullPreviewPrefsEditor.html"
>>>>>>>
resources: {
prefsEditor: "%templatePrefix/FullPreviewPrefsEditor.html"
<<<<<<<
templates: {
prefsEditor: "%templatePrefix/FullNoPreviewPrefsEditor.html"
=======
resources: {
prefsEditor: "%prefix/FullNoPreviewPrefsEditor.html"
>>>>>>>
resources: {
prefsEditor: "%templatePrefix/FullNoPreviewPrefsEditor.html"
<<<<<<<
templates: {
prefsEditor: "%messagePrefix/prefsEditor.json",
textSize: "%messagePrefix/textSize.json",
textFont: "%messagePrefix/textFont.json",
lineSpace: "%messagePrefix/lineSpace.json",
contrast: "%messagePrefix/contrast.json",
layoutControls: "%messagePrefix/tableOfContents.json",
linksControls: "%messagePrefix/linksControls.json",
emphasizeLinks: "%messagePrefix/emphasizeLinks.json",
inputsLarger: "%messagePrefix/inputsLarger.json"
=======
resources: {
prefsEditor: "%prefix/prefsEditor.json",
textSize: "%prefix/textSize.json",
textFont: "%prefix/textFont.json",
lineSpace: "%prefix/lineSpace.json",
contrast: "%prefix/contrast.json",
layoutControls: "%prefix/tableOfContents.json",
linksControls: "%prefix/linksControls.json",
emphasizeLinks: "%prefix/emphasizeLinks.json",
inputsLarger: "%prefix/inputsLarger.json"
>>>>>>>
resources: {
prefsEditor: "%messagePrefix/prefsEditor.json",
textSize: "%messagePrefix/textSize.json",
textFont: "%messagePrefix/textFont.json",
lineSpace: "%messagePrefix/lineSpace.json",
contrast: "%messagePrefix/contrast.json",
layoutControls: "%messagePrefix/tableOfContents.json",
linksControls: "%messagePrefix/linksControls.json",
emphasizeLinks: "%messagePrefix/emphasizeLinks.json",
inputsLarger: "%messagePrefix/inputsLarger.json" |
<<<<<<<
=======
/**********************
* ARIA Tabs *
**********************/
fluid.defaults("fluid.tabs", {
gradeNames: ["fluid.viewComponent", "autoInit"],
selectors: {
tabs: ".flc-uiOptions-tabs",
tabPanels: ".fl-tab-panel",
firstTabPanel: ".fl-tab-panel:first"
},
styles: {
active: ".fl-tabs-active"
},
finalInitFunction: "fluid.tabs.finalInit"
});
fluid.tabs.finalInit = function (that) {
that.setActiveTab = function (that) {
//unset current tab
$("li", that.options.selectors.tabs).removeClass("fl-tabs-active");
$("a", that.options.selectors.tabs).attr("tabindex", "-1");
$("a", that.options.selectors.tabs).attr("aria-selected", "false");
//set the active style on clicked tab
/* activeTab.addClass("fl-tabs-active");
$("a", activeTab).attr("tabindex", "0");
$("a", activeTab).attr("aria-selected", "true");
//show the active tab panel
that.locate("tabPanels").hide();
that.locate("tabPanels").attr("aria-hidden", "true");
var activeTabPanel = $(activeTab.find("a").attr("href"));
$(activeTabPanel).show();
$(activeTabPanel).attr("aria-hidden", "false"); */
};
//event binder
that.locate("li", that.locate("tabs")).click (that.setActiveTab(that) );
//hide tabs, set first tab as active, show first tab panel
that.locate("tabPanel").hide();
that.locate("firstTabPanel").show();
};
/*fluid.demands("fluid.uiOptions.tabs", ["fluid.uiOptions", "fluid.uiOptions.controls"], {
args: [
"{options}"
]
});*/
>>>>>>> |
<<<<<<<
templates: {
prefsEditor: "%templatePrefix/SeparatedPanelPrefsEditor.html"
=======
resources: {
prefsEditor: "%prefix/SeparatedPanelPrefsEditor.html"
>>>>>>>
resources: {
prefsEditor: "%templatePrefix/SeparatedPanelPrefsEditor.html"
<<<<<<<
var prefsEditorType = "fluid.prefs.fullNoPreview", storeType = "fluid.tests.store", enhancerType = "fluid.tests.enhancer";
var terms = {
templatePrefix: "../../../../src/framework/preferences/html",
messagePrefix: "../../../../src/framework/preferences/messages"
};
=======
var loaderGrades = ["fluid.prefs.fullNoPreview"];
var storeType = "fluid.tests.store";
var enhancerType = "fluid.tests.enhancer";
var templatePrefix = "../../../../src/framework/preferences/html/";
var messagePrefix = "../../../../src/framework/preferences/messages/";
>>>>>>>
var loaderGrades = ["fluid.prefs.fullNoPreview"];
var storeType = "fluid.tests.store";
var enhancerType = "fluid.tests.enhancer";
var terms = {
templatePrefix: "../../../../src/framework/preferences/html",
messagePrefix: "../../../../src/framework/preferences/messages"
};
<<<<<<<
"template": "%templatePrefix/FullNoPreviewPrefsEditor.html",
=======
loaderGrades: loaderGrades,
"template": "%prefix/FullNoPreviewPrefsEditor.html",
>>>>>>>
loaderGrades: loaderGrades,
"template": "%templatePrefix/FullNoPreviewPrefsEditor.html",
<<<<<<<
"terms": {
"templatePrefix": "../testResources/html"
}
=======
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"templatePrefix": "../testResources/html/"
>>>>>>>
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"terms": {
"templatePrefix": "../testResources/html"
}
<<<<<<<
"terms": {
"templatePrefix": "../../../../src/framework/preferences/html",
"messagePrefix": "../../../../src/framework/preferences/messages"
}
=======
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"templatePrefix": "../../../../src/framework/preferences/html/",
"messagePrefix": "../../../../src/framework/preferences/messages/"
>>>>>>>
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"terms": {
"templatePrefix": "../../../../src/framework/preferences/html",
"messagePrefix": "../../../../src/framework/preferences/messages"
}
<<<<<<<
"terms": {
"templatePrefix": "../../../../src/framework/preferences/html",
"messagePrefix": "../../../../src/framework/preferences/messages"
}
=======
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"templatePrefix": "../../../../src/framework/preferences/html/",
"messagePrefix": "../../../../src/framework/preferences/messages/"
>>>>>>>
"loaderGrades": ["fluid.prefs.fullNoPreview"],
"terms": {
"templatePrefix": "../../../../src/framework/preferences/html",
"messagePrefix": "../../../../src/framework/preferences/messages"
} |
<<<<<<<
/**
* Error Handler
*/
var bindDeleteKey = function (that, row, errorCode) {
var deleteHandler = function () {
that.removeError(errorCode);
};
fluid.activatable(row, null, {
additionalBindings: [{
key: $.ui.keyCode.DELETE,
activateHandler: deleteHandler
}]
});
};
var bindErrorHandlers = function (that, errorCode) {
var row = that.locate(errorCode);
//Bind delete button
that.locate("deleteErrorButton", row).click(function () {
that.removeError(errorCode);
});
//Bind hide/show error details link
that.locate("toggleErrorBodyButton", row).click(function () {
that.errorMsgs[errorCode].show = !that.errorMsgs[errorCode].show;
if (that.errorMsgs[errorCode].show) {
that.locate("errorBodyTogglable", row).show();
that.locate("toggleErrorBodyButton", row).text(that.options.strings.errorTemplateHideThisList);
} else {
that.locate("errorBodyTogglable", row).hide();
that.locate("toggleErrorBodyButton", row).text(that.options.strings.errorTemplateWhichOnes);
}
});
//Bind delete key on keyboard
bindDeleteKey(that, row, errorCode);
};
var errorHandlerInit = function (that) {
/* change the error title*/
that.locate("errorHeader").text(that.options.strings.errorTemplateHeader);
/* bind events */
bindErrorHandlers(that, "exceedsFileLimit");
bindErrorHandlers(that, "exceedsUploadLimit");
/* set all toggle buttons related prefs */
that.locate("toggleErrorBodyButton").text(that.options.strings.errorTemplateWhichOnes);
that.locate("errorBodyTogglable").hide();
/* hide the error on init */
that.container.hide();
};
var removeError = function (that, errorCode) {
that.errorMsgs[errorCode].files = [];
};
var updateTotalError = function (that) {
var errorSize = 0; //the number of errors, the total of all the subarrays
$.each(that.errorMsgs, function (errorCode, errObj) {
var errorStr = "";
var row = that.locate(errorCode);
errorSize = errorSize + that.errorMsgs[errorCode].files.length;
//render header title
var errorTitle = fluid.stringTemplate(that.options.strings[errorCode], {
num_of_files: that.errorMsgs[errorCode].files.length
});
that.locate("errorTitle", row).text(errorTitle);
$.each(errObj.files, function (errKey, indivErrMsg) {
errorStr = fluid.stringTemplate(that.options.strings.errorTemplateFilesListing, {
files: errorStr + indivErrMsg
});
});
if (!errorStr) {
row.hide();
} else {
row.show();
}
//Take out the extra comma and the space
that.locate("erroredFiles", row).text(errorStr.substring(0, errorStr.length - 2));
});
//if size is 0, then no errors -> hide the error box
if (errorSize === 0) {
//Hide the error box
that.container.hide();
} else {
that.container.show();
}
};
fluid.uploader.errorHandler = function (container, options) {
var that = fluid.initView("fluid.uploader.errorHandler", container, options);
/**
* A map that stores error messages toggle mode and its files. Mapped by the error name as key.
*/
that.errorMsgs = {
exceedsFileLimit: {
files: [],
show: false
},
exceedsUploadLimit: {
files: [],
show: false
}
};
/**
* Removes the specified error from the list of errors
*
* @param {string} The ID of the error box. Usually the error code itself (unique)
*/
that.removeError = function (errorCode) {
removeError(that, errorCode);
that.refreshView();
};
/**
* Add the specified error to the list of errors
* @param (string) The filename of the file which introduced the error.
* @param (string) The ID of the error box.
*/
that.addError = function (file, errorCode) {
that.errorMsgs[errorCode].files.push(file);
};
that.refreshView = function () {
updateTotalError(that);
};
that.clearErrors = function () {
$.each(that.errorMsgs, function (errorCode, errObj) {
removeError(that, errorCode);
});
that.refreshView();
};
errorHandlerInit(that);
return that;
};
fluid.defaults("fluid.uploader.errorHandler", {
selectors: {
errorHeader: ".flc-uploader-erroredHeader",
exceedsFileLimit: ".flc-uploader-exceededFileLimit-template",
exceedsUploadLimit: ".flc-uploader-exceededUploadLimit-template",
deleteErrorButton: ".flc-uploader-erroredButton",
toggleErrorBodyButton: ".flc-uploader-errored-bodyButton",
errorBodyTogglable: ".flc-uploader-erroredBody-togglable",
errorTitle: ".flc-uploader-erroredTitle",
erroredFiles: ".flc-uploader-erroredFiles"
},
strings: {
exceedsFileLimit: "Too many files were selected. %num_of_files were not added to the queue.",
exceedsUploadLimit: "%num_of_files files were too large and were not added to the queue.",
errorTemplateHeader: "Warning(s)",
errorTemplateButtonSpan: "Remove error",
errorTemplateHideThisList: "Hide files",
errorTemplateWhichOnes: "Show files",
errorTemplateFilesListing: "%files, "
}
});
fluid.demands("fluid.uploader.errorHandler", "fluid.uploader", {
funcName: "fluid.uploader.errorHandler",
args: [
"{multiFileUploader}.dom.errorHandler",
fluid.COMPONENT_OPTIONS
]
});
})(jQuery, fluid_1_3);
=======
})(jQuery, fluid_1_4);
>>>>>>>
/**
* Error Handler
*/
var bindDeleteKey = function (that, row, errorCode) {
var deleteHandler = function () {
that.removeError(errorCode);
};
fluid.activatable(row, null, {
additionalBindings: [{
key: $.ui.keyCode.DELETE,
activateHandler: deleteHandler
}]
});
};
var bindErrorHandlers = function (that, errorCode) {
var row = that.locate(errorCode);
//Bind delete button
that.locate("deleteErrorButton", row).click(function () {
that.removeError(errorCode);
});
//Bind hide/show error details link
that.locate("toggleErrorBodyButton", row).click(function () {
that.errorMsgs[errorCode].show = !that.errorMsgs[errorCode].show;
if (that.errorMsgs[errorCode].show) {
that.locate("errorBodyTogglable", row).show();
that.locate("toggleErrorBodyButton", row).text(that.options.strings.errorTemplateHideThisList);
} else {
that.locate("errorBodyTogglable", row).hide();
that.locate("toggleErrorBodyButton", row).text(that.options.strings.errorTemplateWhichOnes);
}
});
//Bind delete key on keyboard
bindDeleteKey(that, row, errorCode);
};
var errorHandlerInit = function (that) {
/* change the error title*/
that.locate("errorHeader").text(that.options.strings.errorTemplateHeader);
/* bind events */
bindErrorHandlers(that, "exceedsFileLimit");
bindErrorHandlers(that, "exceedsUploadLimit");
/* set all toggle buttons related prefs */
that.locate("toggleErrorBodyButton").text(that.options.strings.errorTemplateWhichOnes);
that.locate("errorBodyTogglable").hide();
/* hide the error on init */
that.container.hide();
};
var removeError = function (that, errorCode) {
that.errorMsgs[errorCode].files = [];
};
var updateTotalError = function (that) {
var errorSize = 0; //the number of errors, the total of all the subarrays
$.each(that.errorMsgs, function (errorCode, errObj) {
var errorStr = "";
var row = that.locate(errorCode);
errorSize = errorSize + that.errorMsgs[errorCode].files.length;
//render header title
var errorTitle = fluid.stringTemplate(that.options.strings[errorCode], {
num_of_files: that.errorMsgs[errorCode].files.length
});
that.locate("errorTitle", row).text(errorTitle);
$.each(errObj.files, function (errKey, indivErrMsg) {
errorStr = fluid.stringTemplate(that.options.strings.errorTemplateFilesListing, {
files: errorStr + indivErrMsg
});
});
if (!errorStr) {
row.hide();
} else {
row.show();
}
//Take out the extra comma and the space
that.locate("erroredFiles", row).text(errorStr.substring(0, errorStr.length - 2));
});
//if size is 0, then no errors -> hide the error box
if (errorSize === 0) {
//Hide the error box
that.container.hide();
} else {
that.container.show();
}
};
fluid.uploader.errorHandler = function (container, options) {
var that = fluid.initView("fluid.uploader.errorHandler", container, options);
/**
* A map that stores error messages toggle mode and its files. Mapped by the error name as key.
*/
that.errorMsgs = {
exceedsFileLimit: {
files: [],
show: false
},
exceedsUploadLimit: {
files: [],
show: false
}
};
/**
* Removes the specified error from the list of errors
*
* @param {string} The ID of the error box. Usually the error code itself (unique)
*/
that.removeError = function (errorCode) {
removeError(that, errorCode);
that.refreshView();
};
/**
* Add the specified error to the list of errors
* @param (string) The filename of the file which introduced the error.
* @param (string) The ID of the error box.
*/
that.addError = function (file, errorCode) {
that.errorMsgs[errorCode].files.push(file);
};
that.refreshView = function () {
updateTotalError(that);
};
that.clearErrors = function () {
$.each(that.errorMsgs, function (errorCode, errObj) {
removeError(that, errorCode);
});
that.refreshView();
};
errorHandlerInit(that);
return that;
};
fluid.defaults("fluid.uploader.errorHandler", {
selectors: {
errorHeader: ".flc-uploader-erroredHeader",
exceedsFileLimit: ".flc-uploader-exceededFileLimit-template",
exceedsUploadLimit: ".flc-uploader-exceededUploadLimit-template",
deleteErrorButton: ".flc-uploader-erroredButton",
toggleErrorBodyButton: ".flc-uploader-errored-bodyButton",
errorBodyTogglable: ".flc-uploader-erroredBody-togglable",
errorTitle: ".flc-uploader-erroredTitle",
erroredFiles: ".flc-uploader-erroredFiles"
},
strings: {
exceedsFileLimit: "Too many files were selected. %num_of_files were not added to the queue.",
exceedsUploadLimit: "%num_of_files files were too large and were not added to the queue.",
errorTemplateHeader: "Warning(s)",
errorTemplateButtonSpan: "Remove error",
errorTemplateHideThisList: "Hide files",
errorTemplateWhichOnes: "Show files",
errorTemplateFilesListing: "%files, "
}
});
fluid.demands("fluid.uploader.errorHandler", "fluid.uploader", {
funcName: "fluid.uploader.errorHandler",
args: [
"{multiFileUploader}.dom.errorHandler",
fluid.COMPONENT_OPTIONS
]
});
})(jQuery, fluid_1_4); |
<<<<<<<
launcher.close();
=======
var throbber = document.getElementById('throbber');
ok(!throbber.hidden, 'Throbber displayed');
waitFor(function() {
ok(throbber.hidden, 'Throbber hidden');
ok(conversationView.hidden, 'Conversation hidden');
windowManager.closeForegroundWindow();
}, function() {
return (document.getElementById('messages').children.length ==
(convCount + 1));
});
>>>>>>>
windowManager.closeForegroundWindow(); |
<<<<<<<
},
jsonlint: {
all: ["src/**/*.json", "tests/**/*.json", "demos/**/*.json", "examples/**/*.json"]
=======
},
stylus: {
compile: {
options: {
compress: "<%= stylusCompress %>"
},
files: [{
expand: true,
src: ["src/**/css/stylus/*.styl"],
ext: ".css",
rename: function(dest, src) {
// Move the generated css files one level up out of the stylus directory
var dir = path.dirname(src);
var filename = path.basename(src);
return path.join(dir, "..", filename);
}
}]
}
>>>>>>>
},
jsonlint: {
all: ["src/**/*.json", "tests/**/*.json", "demos/**/*.json", "examples/**/*.json"]
},
stylus: {
compile: {
options: {
compress: "<%= stylusCompress %>"
},
files: [{
expand: true,
src: ["src/**/css/stylus/*.styl"],
ext: ".css",
rename: function(dest, src) {
// Move the generated css files one level up out of the stylus directory
var dir = path.dirname(src);
var filename = path.basename(src);
return path.join(dir, "..", filename);
}
}]
}
<<<<<<<
grunt.registerTask("lint", "Apply jshint and jsonlint", ["jshint", "jsonlint"]);
=======
>>>>>>>
grunt.registerTask("lint", "Apply jshint and jsonlint", ["jshint", "jsonlint"]); |
<<<<<<<
that.uiEnhancer.updateModel(that.getSettings());
=======
that.options.originalUserOptions = $.extend(true, that.uiEnhancer.options, fluid.copy(that.options.uiEnhancer));
fluid.staticEnvironment.originalEnhancerOptions = that;
that.uiEnhancer.updateModel(fluid.get(that.getSettings(), "preferences"));
fluid.staticEnvironment.uiEnhancer = that.uiEnhancer;
>>>>>>>
that.uiEnhancer.updateModel(fluid.get(that.getSettings(), "preferences")); |
<<<<<<<
fluid.defaults("fluid.tests.FLUID4537", {
gradeNames: ["fluid.rendererComponent", "autoInit"],
renderOnInit: true,
model: {
feeds: [
{ title: "Title 1", description: "Description 1", link: "http://fake.com" }
]
},
selectors: {
item: ".news-item",
title: ".title",
link: ".link",
description: ".description"
},
repeatingSelectors: [ "item" ],
protoTree: {
expander: {
type: "fluid.renderer.repeat",
repeatID: "item",
controlledBy: "feeds",
pathAs: "item",
tree: {
title: "${{item}.title}",
link: { target: "${{item}.link}", decorators: { attrs: { title: "${{item}.description}" } } },
description: "${{item}.description}"
}
}
}
});
protoTests.test("FLUID-4537: Attribute decorator expansion test", function () {
var that = fluid.tests.FLUID4537(".news-items", {});
var links = that.locate("link");
jqUnit.assertEquals("One link rendered", 1, links.length);
var attr = links.attr("title");
jqUnit.assertEquals("Description title rendered", that.model.feeds[0].description, attr);
});
};
=======
fluid.defaults("fluid.tests.FLUID4536", {
gradeNames: ["fluid.viewComponent", "autoInit"],
components: {
iframeHead: {
createOnEvent: "iframeLoad",
type: "fluid.tests.FLUID4536IframeHead",
container: "{FLUID4536}.iframeContainer"
}
},
selectors: {
iframe: "iframe"
},
events: {
iframeLoad: null
},
finalInitFunction: "fluid.tests.FLUID4536.finalInit"
});
fluid.tests.FLUID4536.finalInit = function(that) {
that.iframe = that.dom.locate("iframe");
function tryLoad() {
var iframeWindow = that.iframe[0].contentWindow;
that.iframeDocument = iframeWindow.document;
that.jQuery = iframeWindow.jQuery;
if (that.jQuery) {
that.iframeContainer = that.jQuery("body");
that.events.iframeLoad.fire(that);
}
}
tryLoad();
if (!that.jQuery) {
that.iframe.load(tryLoad);
}
};
fluid.defaults("fluid.tests.FLUID4536IframeHead", {
gradeNames: ["fluid.viewComponent", "autoInit"],
components: {
iframeChild: {
type: "fluid.tests.FLUID4536IframeChild",
container: "{FLUID4536IframeHead}.dom.component"
}
},
selectors: {
component: "#main"
}
});
fluid.defaults("fluid.tests.FLUID4536IframeChild", {
gradeNames: ["fluid.rendererComponent", "autoInit"],
model: {
checked: true
},
protoTree: {
checkbox: "${checked}"
},
selectors: {
checkbox: ".flc-checkbox"
},
renderOnInit: true
});
protoTests.asyncTest("FLUID-4536 iframe propagation test", function() {
jqUnit.expect(4);
fluid.tests.FLUID4536("#main", {listeners: {
iframeLoad: {
priority: "last",
listener:
function(that) {
jqUnit.assertValue("Inner component constructed", that.iframeHead.iframeChild);
var outerExpando = $.expando;
var innerExpando = that.iframeContainer.constructor.expando;
jqUnit.assertNotEquals("Inner container uses different jQuery", outerExpando, innerExpando);
var child = that.iframeHead.iframeChild;
var furtherExpando = child.container.constructor.expando;
jqUnit.assertEquals("jQuery propagated through DOM binder", innerExpando, furtherExpando);
child.locate("checkbox").prop("checked", false).change();
jqUnit.assertEquals("Operable renderer component in child", false, child.model.checked);
start();
}}}});
});
};
>>>>>>>
fluid.defaults("fluid.tests.FLUID4537", {
gradeNames: ["fluid.rendererComponent", "autoInit"],
renderOnInit: true,
model: {
feeds: [
{ title: "Title 1", description: "Description 1", link: "http://fake.com" }
]
},
selectors: {
item: ".news-item",
title: ".title",
link: ".link",
description: ".description"
},
repeatingSelectors: [ "item" ],
protoTree: {
expander: {
type: "fluid.renderer.repeat",
repeatID: "item",
controlledBy: "feeds",
pathAs: "item",
tree: {
title: "${{item}.title}",
link: { target: "${{item}.link}", decorators: { attrs: { title: "${{item}.description}" } } },
description: "${{item}.description}"
}
}
}
});
protoTests.test("FLUID-4537: Attribute decorator expansion test", function () {
var that = fluid.tests.FLUID4537(".news-items", {});
var links = that.locate("link");
jqUnit.assertEquals("One link rendered", 1, links.length);
var attr = links.attr("title");
jqUnit.assertEquals("Description title rendered", that.model.feeds[0].description, attr);
});
fluid.defaults("fluid.tests.FLUID4536", {
gradeNames: ["fluid.viewComponent", "autoInit"],
components: {
iframeHead: {
createOnEvent: "iframeLoad",
type: "fluid.tests.FLUID4536IframeHead",
container: "{FLUID4536}.iframeContainer"
}
},
selectors: {
iframe: "iframe"
},
events: {
iframeLoad: null
},
finalInitFunction: "fluid.tests.FLUID4536.finalInit"
});
fluid.tests.FLUID4536.finalInit = function(that) {
that.iframe = that.dom.locate("iframe");
function tryLoad() {
var iframeWindow = that.iframe[0].contentWindow;
that.iframeDocument = iframeWindow.document;
that.jQuery = iframeWindow.jQuery;
if (that.jQuery) {
that.iframeContainer = that.jQuery("body");
that.events.iframeLoad.fire(that);
}
}
tryLoad();
if (!that.jQuery) {
that.iframe.load(tryLoad);
}
};
fluid.defaults("fluid.tests.FLUID4536IframeHead", {
gradeNames: ["fluid.viewComponent", "autoInit"],
components: {
iframeChild: {
type: "fluid.tests.FLUID4536IframeChild",
container: "{FLUID4536IframeHead}.dom.component"
}
},
selectors: {
component: "#main"
}
});
fluid.defaults("fluid.tests.FLUID4536IframeChild", {
gradeNames: ["fluid.rendererComponent", "autoInit"],
model: {
checked: true
},
protoTree: {
checkbox: "${checked}"
},
selectors: {
checkbox: ".flc-checkbox"
},
renderOnInit: true
});
protoTests.asyncTest("FLUID-4536 iframe propagation test", function() {
jqUnit.expect(4);
fluid.tests.FLUID4536("#main", {listeners: {
iframeLoad: {
priority: "last",
listener:
function(that) {
jqUnit.assertValue("Inner component constructed", that.iframeHead.iframeChild);
var outerExpando = $.expando;
var innerExpando = that.iframeContainer.constructor.expando;
jqUnit.assertNotEquals("Inner container uses different jQuery", outerExpando, innerExpando);
var child = that.iframeHead.iframeChild;
var furtherExpando = child.container.constructor.expando;
jqUnit.assertEquals("jQuery propagated through DOM binder", innerExpando, furtherExpando);
child.locate("checkbox").prop("checked", false).change();
jqUnit.assertEquals("Operable renderer component in child", false, child.model.checked);
start();
}}}});
});
}; |
<<<<<<<
// TODO: This mixin grade appears to be supplied manually by various test cases but no longer appears in
// the main configuration. We should remove the need for users to supply this - also the use of "defaultPanels" in fact
// refers to "starter panels"
=======
fluid.uiOptions.uiOptionsLoader.createMsgBundle = function (messageResources, that) {
var completeMessage;
fluid.each(messageResources, function (oneResource) {
var message = JSON.parse(oneResource.resourceText);
completeMessage = $.extend({}, completeMessage, message);
});
var parentResolver = fluid.messageResolver({messageBase: completeMessage});
that.msgBundle = fluid.messageResolver({messageBase: {}, parents: [parentResolver]});
that.events.onMsgBundleReady.fire();
};
>>>>>>>
fluid.uiOptions.uiOptionsLoader.createMsgBundle = function (messageResources, that) {
var completeMessage;
fluid.each(messageResources, function (oneResource) {
var message = JSON.parse(oneResource.resourceText);
completeMessage = $.extend({}, completeMessage, message);
});
var parentResolver = fluid.messageResolver({messageBase: completeMessage});
that.msgBundle = fluid.messageResolver({messageBase: {}, parents: [parentResolver]});
that.events.onMsgBundleReady.fire();
};
// TODO: This mixin grade appears to be supplied manually by various test cases but no longer appears in
// the main configuration. We should remove the need for users to supply this - also the use of "defaultPanels" in fact
// refers to "starter panels"
<<<<<<<
// Do not supply "fluid.uiOptions.inline" here, since when this is used as a mixin for fatPanel, it ends up displacing the
// more refined type of the uiOptionsLoader
gradeNames: ["fluid.viewComponent", "autoInit"],
=======
gradeNames: ["fluid.uiOptions.uiOptionsLoader", "autoInit"],
>>>>>>>
// Do not supply "fluid.uiOptions.inline" here, since when this is used as a mixin for fatPanel, it ends up displacing the
// more refined type of the uiOptionsLoader
gradeNames: ["fluid.viewComponent", "autoInit"], |
<<<<<<<
jqUnit.assertEquals("Initially mist class exists", 1, $(".fl-theme-wb").length);
=======
jqUnit.assertEquals("Initially white on black class exists", 1, $(".fl-theme-hci").length);
>>>>>>>
jqUnit.assertEquals("Initially white on black class exists", 1, $(".fl-theme-wb").length);
<<<<<<<
jqUnit.assertTrue("High contrast is set", body.hasClass("fl-theme-bw"));
=======
jqUnit.assertTrue("High contrast is set", body.hasClass("fl-theme-uio-hc"));
>>>>>>>
jqUnit.assertTrue("High contrast is set", body.hasClass("fl-theme-bw")); |
<<<<<<<
"value": "{uiEnhancer}.container",
"validationFunc": "fluid.prefs.containerNeeded"
},
"options.sourceApplier": "{uiEnhancer}.applier"
=======
value: "{uiEnhancer}.container",
func: "fluid.prefs.containerNeeded"
}
>>>>>>>
"value": "{uiEnhancer}.container",
"validationFunc": "fluid.prefs.containerNeeded"
} |
<<<<<<<
// unsupported, non-API function
fluid.recordListener = function (event, listener, shadow, listenerId) {
=======
fluid.recordListener = function (event, listener, shadow) {
>>>>>>>
fluid.recordListener = function (event, listener, shadow, listenerId) {
<<<<<<<
expanded.listener = (standard && (expanded.args || firer)) ? fluid.event.dispatchListener(that, listener, eventName, expanded) : listener;
expanded.listenerId = fluid.allocateGuid();
=======
expanded.listener = (standard && (expanded.args && listener !== "fluid.notImplemented" || firer)) ? fluid.event.dispatchListener(that, listener, eventName, expanded) : listener;
>>>>>>>
expanded.listener = (standard && (expanded.args && listener !== "fluid.notImplemented" || firer)) ? fluid.event.dispatchListener(that, listener, eventName, expanded) : listener;
expanded.listenerId = fluid.allocateGuid();
<<<<<<<
firer.addListener = function (listener, namespace, predicate, priority, softNamespace, listenerId) {
=======
firer.addListener = function (listener, namespace, priority, predicate, softNamespace) {
>>>>>>>
firer.addListener = function (listener, namespace, priority, predicate, softNamespace, listenerId) {
<<<<<<<
adder(origin).addListener(dispatcher, namespace, predicate, priority, softNamespace, listenerId);
=======
adder(origin).addListener(dispatcher, namespace, priority, predicate, softNamespace);
>>>>>>>
adder(origin).addListener(dispatcher, namespace, priority, predicate, softNamespace, listenerId); |
<<<<<<<
expect: 3,
name: "messagePrefix",
=======
expect: 4,
name: "terms",
>>>>>>>
expect: 3,
name: "terms",
<<<<<<<
expect: 3,
name: "templatePrefix",
=======
expect: 4,
name: "terms",
>>>>>>>
expect: 3,
name: "terms",
<<<<<<<
expect: 3,
name: "messagePrefix",
func: "fluid.tests.assertDefaults",
args: ["{builderAll}.options.constructedGrades.messagePrefix", "{builderAll}.options.auxSchema.messagePrefix"]
}, {
expect: 4,
=======
expect: 5,
>>>>>>>
expect: 4,
<<<<<<<
expect: 3,
name: "templatePrefix",
=======
expect: 4,
name: "terms",
>>>>>>>
expect: 3,
name: "terms", |
<<<<<<<
/** Applies a stable sorting algorithm to the supplied array and comparator (note that Array.sort in JavaScript is not specified
* to be stable). The algorithm used will be an insertion sort, which whilst quadratic in time, will perform well
* on small array sizes.
*/
fluid.stableSort = function (array, func) {
for (var i = 0; i < array.length; i++) {
var k = array[i];
for (var j = i; j > 0 && func(k, array[j - 1]) < 0; j--) {
array[j] = array[j - 1];
}
array[j] = k;
}
};
/** Converts a hash into an object by hoisting out the object's keys into an array element via the supplied String "key", and then transforming via an optional further function, which receives the signature
* (newElement, oldElement, key) where newElement is the freshly cloned element, oldElement is the original hash's element, and key is the key of the element.
* If the function is not supplied, the old element is simply deep-cloned onto the new element (same effect
* as transform fluid.transforms.objectToArray)
*/
fluid.hashToArray = function (hash, keyName, func) {
var togo = [];
fluid.each(hash, function (el, key) {
var newEl = {};
newEl[keyName] = key;
if (func) {
newEl = func(newEl, el, key) || newEl;
} else {
$.extend(true, newEl, el);
}
togo.push(newEl);
});
return togo;
};
=======
/** Converts an array consisting of a mixture of arrays and non-arrays into the concatenation of any inner arrays
* with the non-array elements
*/
fluid.flatten = function (array) {
var togo = [];
fluid.each(array, function (element) {
if (fluid.isArrayable(element)) {
togo = togo.concat(element);
} else {
togo.push(element);
}
});
return togo;
};
>>>>>>>
/** Applies a stable sorting algorithm to the supplied array and comparator (note that Array.sort in JavaScript is not specified
* to be stable). The algorithm used will be an insertion sort, which whilst quadratic in time, will perform well
* on small array sizes.
*/
fluid.stableSort = function (array, func) {
for (var i = 0; i < array.length; i++) {
var k = array[i];
for (var j = i; j > 0 && func(k, array[j - 1]) < 0; j--) {
array[j] = array[j - 1];
}
array[j] = k;
}
};
/** Converts a hash into an object by hoisting out the object's keys into an array element via the supplied String "key", and then transforming via an optional further function, which receives the signature
* (newElement, oldElement, key) where newElement is the freshly cloned element, oldElement is the original hash's element, and key is the key of the element.
* If the function is not supplied, the old element is simply deep-cloned onto the new element (same effect
* as transform fluid.transforms.objectToArray)
*/
fluid.hashToArray = function (hash, keyName, func) {
var togo = [];
fluid.each(hash, function (el, key) {
var newEl = {};
newEl[keyName] = key;
if (func) {
newEl = func(newEl, el, key) || newEl;
} else {
$.extend(true, newEl, el);
}
togo.push(newEl);
});
return togo;
};
/** Converts an array consisting of a mixture of arrays and non-arrays into the concatenation of any inner arrays
* with the non-array elements
*/
fluid.flatten = function (array) {
var togo = [];
fluid.each(array, function (element) {
if (fluid.isArrayable(element)) {
togo = togo.concat(element);
} else {
togo.push(element);
}
});
return togo;
}; |
<<<<<<<
var enhancerModel = fluid.tests.getPageEnhancer(separatedPanel).model;
fluid.tests.prefs.checkModelSelections("enhancerModel from bwSkin", fluid.tests.prefs.bwSkin, enhancerModel);
=======
fluid.tests.prefs.checkModelSelections("enhancerModel from bwSkin", fluid.tests.prefs.bwSkin.preferences, separatedPanel.pageEnhancer.model);
>>>>>>>
var enhancerModel = fluid.tests.getPageEnhancer(separatedPanel).model;
fluid.tests.prefs.checkModelSelections("enhancerModel from bwSkin", fluid.tests.prefs.bwSkin.preferences, enhancerModel); |
<<<<<<<
* @param {String} cookieName - name of the cookie
* @param {String} data - the serialized data to be stored in the cookie
* @param {Object} options - settings
=======
* @param cookie {Object} settings
>>>>>>>
* @param cookieName {String} name of the cookie
* @param data {String} the serialized data to be stored in the cookie
* @param options {Object} settings
<<<<<<<
* Write the cookie
* @param {Object} payload - the serialized data to write to the cookie
* @param {Object} options - settings
=======
* Saves the settings into a cookie
* @param settings {Object}
* @param cookieOptions {Object}
>>>>>>>
* Saves the settings into a cookie
* @param payload {Object} the serialized data to write to the cookie
* @param options {Object} settings |
<<<<<<<
"model.speakText": "value"
=======
"model.value": "default"
>>>>>>>
"model.value": "value"
<<<<<<<
"model.incSize": "value"
=======
"model.value": "default"
>>>>>>>
"model.value": "value" |
<<<<<<<
module.exports.getByDevice = require('./deviceType.getByDevice.js');
module.exports.getByIdentifier = require('./deviceType.getByIdentifier.js');
=======
module.exports.getByDevice = require('./deviceType.getByDevice.js');
module.exports.getByType = require('./deviceType.getByType.js');
module.exports.getById = require('./deviceType.getById.js');
>>>>>>>
module.exports.getByDevice = require('./deviceType.getByDevice.js');
module.exports.getByIdentifier = require('./deviceType.getByIdentifier.js');
module.exports.getByType = require('./deviceType.getByType.js');
module.exports.getById = require('./deviceType.getById.js'); |
<<<<<<<
getAllById: 'SELECT * FROM user WHERE id = ?;',
delete: 'DELETE FROM user WHERE id = ?;'
=======
delete: 'DELETE FROM user WHERE id = ?;',
getParamUserByValue: 'SELECT * FROM paramuser WHERE value = ?;'
>>>>>>>
getAllById: 'SELECT * FROM user WHERE id = ?;',
delete: 'DELETE FROM user WHERE id = ?;',
getParamUserByValue: 'SELECT * FROM paramuser WHERE value = ?;' |
<<<<<<<
},
{
"uuid": "81afa4ed-c084-45b3-ba8a-e9e22c9753ae",
"title": "Calendar",
"path": "views/boxs/calendar.ejs",
"view": "dashboard"
=======
},
{
"uuid": "c02be824-a1df-4a1a-a004-5bd5041b5655",
"title": "Chart",
"path": "views/boxs/chart.ejs",
"view": "dashboard"
>>>>>>>
},
{
"uuid": "81afa4ed-c084-45b3-ba8a-e9e22c9753ae",
"title": "Calendar",
"path": "views/boxs/calendar.ejs",
"view": "dashboard"
},
{
"uuid": "c02be824-a1df-4a1a-a004-5bd5041b5655",
"title": "Chart",
"path": "views/boxs/chart.ejs",
"view": "dashboard" |
<<<<<<<
=======
var expectedFile = _.flatten(globs).length;
// If any external streams were included, pipe all files to them first
streams.forEach(function (stream) {
src.pipe(stream);
>>>>>>>
<<<<<<<
restoreStream.write(file);
=======
// Add assets to the stream
// If noconcat option is false, concat the files first.
src
.pipe(through.obj(function (newFile, enc, callback) {
--expectedFile;
this.push(newFile);
callback();
}))
.pipe(gulpif(!opts.noconcat, concat(name)))
.pipe(through.obj(function (newFile, enc, callback) {
this.push(newFile);
callback();
}.bind(this)))
.on('finish', function () {
if (opts.mustexist && expectedFile > 0) {
this.emit('error', new Error(expectedFile + " did not exist"));
}
if (--unprocessed === 0 && end) {
this.emit('end');
}
}.bind(this));
}, this);
}, this);
restoreStream.write(file, cb);
>>>>>>>
restoreStream.write(file); |
<<<<<<<
function setDisplayedApp(origin, callback, url) {
if (origin == null)
origin = homescreen;
=======
function setDisplayedApp(origin, callback, disposition) {
>>>>>>>
function setDisplayedApp(origin, callback, disposition) {
if (origin == null)
origin = homescreen; |
<<<<<<<
empty ? samplePhotosCallback() : this.getThumbnails(thumbnailCallback);
=======
if (empty)
Gallery.getSamplePhotos();
else
this.getThumbnails(callback);
window.parent.postMessage('appready', '*');
>>>>>>>
empty ? samplePhotosCallback() : this.getThumbnails(thumbnailCallback);
window.parent.postMessage('appready', '*'); |
<<<<<<<
},
{
name: 'Suggest fixes if available',
id: 'suggestAvailableFixes',
type: 'boolean',
default: false,
description: 'Whether to provide fixes for patching corresponding mismatches.',
external: true,
usage: ['VALIDATION']
},
{
name: 'Show Metadata validation messages',
id: 'validateMetadata',
type: 'boolean',
default: false,
description: 'Whether to show mismatches for incorrect name and description of request',
external: true,
usage: ['VALIDATION']
},
{
name: 'Ignore mismatch for unresolved postman variables',
id: 'ignoreUnresolvedVariables',
type: 'boolean',
default: false,
description: 'Whether to ignore mismatches resulting from unresolved variables in the Postman request',
external: true,
usage: ['VALIDATION']
=======
},
{
name: 'Enable strict request matching',
id: 'strictRequestMatching',
type: 'boolean',
default: false,
description: 'Whether requests should be strictly matched with schema operations. Setting to true will not ' +
'include any matches where the URL path segments don\'t match exactly.',
external: true,
usage: ['VALIDATION']
>>>>>>>
},
{
name: 'Suggest fixes if available',
id: 'suggestAvailableFixes',
type: 'boolean',
default: false,
description: 'Whether to provide fixes for patching corresponding mismatches.',
external: true,
usage: ['VALIDATION']
},
{
name: 'Show Metadata validation messages',
id: 'validateMetadata',
type: 'boolean',
default: false,
description: 'Whether to show mismatches for incorrect name and description of request',
external: true,
usage: ['VALIDATION']
},
{
name: 'Ignore mismatch for unresolved postman variables',
id: 'ignoreUnresolvedVariables',
type: 'boolean',
default: false,
description: 'Whether to ignore mismatches resulting from unresolved variables in the Postman request',
external: true,
usage: ['VALIDATION']
},
{
name: 'Enable strict request matching',
id: 'strictRequestMatching',
type: 'boolean',
default: false,
description: 'Whether requests should be strictly matched with schema operations. Setting to true will not ' +
'include any matches where the URL path segments don\'t match exactly.',
external: true,
usage: ['VALIDATION'] |
<<<<<<<
zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json'),
requiredInParams = path.join(__dirname, VALID_OPENAPI_PATH, '/required_in_parameters.json');
=======
issue150 = path.join(__dirname, VALID_OPENAPI_PATH + '/issue#150.yml'),
zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json');
>>>>>>>
zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json'),
requiredInParams = path.join(__dirname, VALID_OPENAPI_PATH, '/required_in_parameters.json'),
issue150 = path.join(__dirname, VALID_OPENAPI_PATH + '/issue#150.yml');
<<<<<<<
it('[Github #137]- Should add `requried` keyword in parameters where ' +
'required field is set to true', function() {
Converter.convert({ type: 'file', data: requiredInParams }, { schemaFaker: true }, (err, conversionResult) => {
expect(err).to.be.null;
let requests = conversionResult.output[0].data.item[0].item,
request,
response;
// GET /pets
// query1 required, query2 optional
// header1 required, header2 optional
// response: header1 required, header2 optional
request = requests[0].request;
response = requests[0].response[0];
expect(request.url.query[0].description).to.equal('(Required) Description of query1');
expect(request.url.query[1].description).to.equal('Description of query2');
expect(request.header[0].description).to.equal('(Required) Description of header1');
expect(request.header[1].description).to.equal('Description of header2');
expect(response.header[0].description).to.equal('(Required) Description of responseHeader1');
expect(response.header[1].description).to.equal('Description of responseHeader2');
// PUT /pets
// RequestBody: multipart/form-data
// formParam1 required, formParam2 optional
request = requests[1].request;
expect(request.body.formdata[0].description).to.equal('(Required) Description of formParam1');
expect(request.body.formdata[1].description).to.equal('Description of formParam2');
// POST /pets
// RequestBody: application/x-www-form-urlencoded
// urlencodedParam1 required, urlencodedParam2 optional
request = requests[2].request;
expect(request.body.urlencoded[0].description).to.equal('(Required) Description of urlencodedParam1');
expect(request.body.urlencoded[1].description).to.equal('Description of urlencodedParam2');
// GET pets/{petId}
// petId required
request = requests[3].request;
expect(request.url.variable[0].description.content).to.equal('(Required) The id of the pet to retrieve');
});
});
=======
it('[GitHub #150] - should generate collection if examples are empty', function (done) {
var openapi = fs.readFileSync(issue150, 'utf8');
Converter.convert({ type: 'string', data: openapi }, { schemaFaker: false }, (err, conversionResult) => {
expect(err).to.be.null;
expect(conversionResult.result).to.equal(true);
expect(conversionResult.output.length).to.equal(1);
expect(conversionResult.output[0].type).to.equal('collection');
expect(conversionResult.output[0].data).to.have.property('info');
expect(conversionResult.output[0].data).to.have.property('item');
done();
});
});
>>>>>>>
it('[Github #137]- Should add `requried` keyword in parameters where ' +
'required field is set to true', function() {
Converter.convert({ type: 'file', data: requiredInParams }, { schemaFaker: true }, (err, conversionResult) => {
expect(err).to.be.null;
let requests = conversionResult.output[0].data.item[0].item,
request,
response;
// GET /pets
// query1 required, query2 optional
// header1 required, header2 optional
// response: header1 required, header2 optional
request = requests[0].request;
response = requests[0].response[0];
expect(request.url.query[0].description).to.equal('(Required) Description of query1');
expect(request.url.query[1].description).to.equal('Description of query2');
expect(request.header[0].description).to.equal('(Required) Description of header1');
expect(request.header[1].description).to.equal('Description of header2');
expect(response.header[0].description).to.equal('(Required) Description of responseHeader1');
expect(response.header[1].description).to.equal('Description of responseHeader2');
// PUT /pets
// RequestBody: multipart/form-data
// formParam1 required, formParam2 optional
request = requests[1].request;
expect(request.body.formdata[0].description).to.equal('(Required) Description of formParam1');
expect(request.body.formdata[1].description).to.equal('Description of formParam2');
// POST /pets
// RequestBody: application/x-www-form-urlencoded
// urlencodedParam1 required, urlencodedParam2 optional
request = requests[2].request;
expect(request.body.urlencoded[0].description).to.equal('(Required) Description of urlencodedParam1');
expect(request.body.urlencoded[1].description).to.equal('Description of urlencodedParam2');
// GET pets/{petId}
// petId required
request = requests[3].request;
expect(request.url.variable[0].description.content).to.equal('(Required) The id of the pet to retrieve');
done();
});
});
it('[GitHub #150] - should generate collection if examples are empty', function (done) {
var openapi = fs.readFileSync(issue150, 'utf8');
Converter.convert({ type: 'string', data: openapi }, { schemaFaker: false }, (err, conversionResult) => {
expect(err).to.be.null;
expect(conversionResult.result).to.equal(true);
expect(conversionResult.output.length).to.equal(1);
expect(conversionResult.output[0].type).to.equal('collection');
expect(conversionResult.output[0].data).to.have.property('info');
expect(conversionResult.output[0].data).to.have.property('item');
done();
});
}); |
<<<<<<<
REQUEST_TYPE = {
GET: 'GET',
POST: 'POST'
},
=======
HEADER_TYPE = {
JSON: 'json',
XML: 'xml',
INVALID: 'invalid'
},
PREVIEW_LANGUAGE = {
JSON: 'json',
XML: 'xml',
TEXT: 'text',
HTML: 'html'
},
>>>>>>>
REQUEST_TYPE = {
GET: 'GET',
POST: 'POST'
},
HEADER_TYPE = {
JSON: 'json',
XML: 'xml',
INVALID: 'invalid'
},
PREVIEW_LANGUAGE = {
JSON: 'json',
XML: 'xml',
TEXT: 'text',
HTML: 'html'
}, |
<<<<<<<
var currentAddress = currentContact.adr[adr];
=======
var default_type = TAG_OPTIONS['address-type'][0].value;
>>>>>>>
var currentAddress = currentContact.adr[adr];
var default_type = TAG_OPTIONS['address-type'][0].value;
<<<<<<<
streetAddress: currentAddress['streetAddress'],
postalCode: currentAddress['postalCode'] || '',
locality: currentAddress['locality'] || '',
countryName: currentAddress['countryName'] || '',
type: currentAddress['type'] || TAG_OPTIONS['address-type'][0],
=======
streetAddress: currentContact.adr[adr]['streetAddress'],
postalCode: currentContact.adr[adr]['postalCode'] || '',
locality: currentContact.adr[adr]['locality'] || '',
countryName: currentContact.adr[adr]['countryName'] || '',
type: currentContact.adr[adr]['type'] || default_type,
>>>>>>>
streetAddress: currentAddress['streetAddress'],
postalCode: currentAddress['postalCode'] || '',
locality: currentAddress['locality'] || '',
countryName: currentAddress['countryName'] || '',
type: currentAddress['type'] || default_type, |
<<<<<<<
constructor(imageFolder, imageCount, autoDeleteImages, images, emitter, logger) {
=======
constructor(imageFolder, imageCount, images, emitter, logger, ipcMain) {
>>>>>>>
constructor(imageFolder, imageCount, autoDeleteImages, images, emitter, logger, ipcMain) {
<<<<<<<
if (fs.existsSync(jsonData[image].src)) {
const stats = fs.statSync(jsonData[image].src);
if (stats.size > 0) {
this.images.push(jsonData[image]);
}
}
=======
if (fs.existsSync(jsonData[image].src)) {
const stats = fs.statSync(jsonData[image].src);
if (stats.size > 0) {
this.images.push(jsonData[image]);
if (jsonData[image].starred) {
console.log("starred")
this.imageCount++;
}
}
}
>>>>>>>
if (fs.existsSync(jsonData[image].src)) {
const stats = fs.statSync(jsonData[image].src);
if (stats.size > 0) {
this.images.push(jsonData[image]);
if (jsonData[image].starred) {
console.log("starred")
this.imageCount++;
}
}
}
<<<<<<<
if (this.images.length > this.imageCount) {
// delete image / video file before popping. Prevent an overfull harddrive
if (this.autoDeleteImages) {
// TODO: Check if the image to delete is starred (after implementation of starring feature via touchbar feature)
try {
var oldSrc = this.images[this.imageCount].src;
fs.unlinkSync(oldSrc);
this.logger.info("Deleted file " + oldSrc);
} catch(err) {
this.logger.error('An error occured while deleting the file ' + oldSrc + ':\n' + err);
}
}
this.images.pop();
=======
console.log(this.imageCount);
while (this.images.length-1 >= this.imageCount) {
console.log("yay");
console.log(this.images.splice(this.getOldestUnstarredImageIndex(), 1));
>>>>>>>
console.log(this.imageCount);
while (this.images.length > this.imageCount) {
console.log("yay");
var idx2bedeleted = this.getOldestUnstarredImageIndex();
if (this.autoDeleteImages) {
try {
var oldSrc = this.images[idx2bedeleted].src;
fs.unlinkSync(oldSrc);
this.logger.info("Deleted file " + oldSrc);
} catch(err) {
this.logger.error('An error occured while deleting the file ' + oldSrc + ':\n' + err);
}
}
console.log(this.images.splice(idx2bedeleted, 1));
<<<<<<<
type: type
=======
type: type,
images: this.images
>>>>>>>
type: type,
images: this.images |
<<<<<<<
if (fileExtension !== '.mp4' || config.showVideo) {
=======
// let bot reply, if wanted
if (config.botReply) {
if (fileExtension.match(/\.(mp4|gif)$/)){
botReply(ctx, 'videoReceived');
} else if (fileExtension.match(/\.(jpg|png)$/)){
botReply(ctx, 'imageReceived');
}
}
if (fileExtension !== '.mp4' || config.showVideos) {
>>>>>>>
if (fileExtension !== '.mp4' || config.showVideos) { |
<<<<<<<
import li from './li';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
import {getThreshold} from '../../../util/converter';
=======
import otsu from './otsu';
>>>>>>>
import li from './li';
import otsu from './otsu';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
import {getThreshold} from '../../../util/converter';
<<<<<<<
let histogram = this.getHistogram();
switch (algorithm.toLowerCase()) {
case 'threshold':
threshold = getThreshold(threshold, this.maxValue);
break;
case 'percentile':
threshold = percentile(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break;
default:
throw new Error('mask transform unknown algorithm: ' + algorithm);
=======
let threshold = 0;
if (typeof algorithm === 'number') {
threshold = algorithm * this.maxValue;
} else {
let histogram = this.getHistogram();
switch (algorithm.toLowerCase()) {
case 'percentile':
threshold = percentile(histogram);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
default:
throw new Error('mask transform unknown algorithm: ' + algorithm);
}
>>>>>>>
let histogram = this.getHistogram();
switch (algorithm.toLowerCase()) {
case 'threshold':
threshold = getThreshold(threshold, this.maxValue);
break;
case 'percentile':
threshold = percentile(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break;
default:
throw new Error('mask transform unknown algorithm: ' + algorithm); |
<<<<<<<
// Update UI properly.
CallUI.render(1);
=======
// When the call is connected the speaker state is reset
// keeping in sync...
this._syncSpeakerEnabled();
// Update UI properly.
CallUI.render(1);
>>>>>>>
// When the call is connected the speaker state is reset
// keeping in sync...
this._syncSpeakerEnabled();
// Update UI properly.
CallUI.render(1);
<<<<<<<
=======
}
_syncSpeakerEnabled: function och_syncSpeakerEnabled() {
if (navigator.mozTelephony.speakerEnabled) {
this.speakerButton.classList.add('speak');
} else {
this.speakerButton.classList.remove('speak');
}
>>>>>>>
},
_syncSpeakerEnabled: function och_syncSpeakerEnabled() {
if (navigator.mozTelephony.speakerEnabled) {
this.speakerButton.classList.add('speak');
} else {
this.speakerButton.classList.remove('speak');
} |
<<<<<<<
import intermodes from './intermodes';
import isodata from './isodata';
import li from './li';
import maxEntropy from './maxEntropy';
import mean from './mean';
import otsu from './otsu';
import renyiEntropy from './renyiEntropy.js';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
=======
import minErrorI from './minErrorI';
>>>>>>>
import intermodes from './intermodes';
import isodata from './isodata';
import li from './li';
import maxEntropy from './maxEntropy';
import mean from './mean';
import minErrorI from './minErrorI';
import otsu from './otsu';
import renyiEntropy from './renyiEntropy.js';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
<<<<<<<
case 'intermodes':
threshold = intermodes(histogram);
break;
case 'isodata':
threshold = isodata(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'maxentropy':
threshold = maxEntropy(histogram, this.size);
break;
case 'mean':
threshold = mean(histogram, this.size);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
case 'renyientropy':
threshold = renyiEntropy(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break;
=======
case 'minerrori':
threshold = minErrorI(histogram, this.size);
break;
>>>>>>>
case 'intermodes':
threshold = intermodes(histogram);
break;
case 'isodata':
threshold = isodata(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'maxentropy':
threshold = maxEntropy(histogram, this.size);
break;
case 'mean':
threshold = mean(histogram, this.size);
break;
case 'minerrori':
threshold = minErrorI(histogram, this.size);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
case 'renyientropy':
threshold = renyiEntropy(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break; |
<<<<<<<
import intermodes from './intermodes';
import isodata from './isodata';
import li from './li';
import otsu from './otsu';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
=======
import mean from './mean';
>>>>>>>
import intermodes from './intermodes';
import isodata from './isodata';
import li from './li';
import mean from './mean';
import otsu from './otsu';
import shanbhag from './shanbhag';
import triangle from './triangle';
import yen from './yen';
<<<<<<<
case 'intermodes':
threshold = intermodes(histogram);
break;
case 'isodata':
threshold = isodata(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break;
=======
case 'mean':
threshold = mean(histogram, this.size);
break;
>>>>>>>
case 'intermodes':
threshold = intermodes(histogram);
break;
case 'isodata':
threshold = isodata(histogram);
break;
case 'li':
threshold = li(histogram, this.size);
break;
case 'mean':
threshold = mean(histogram, this.size);
break;
case 'otsu':
threshold = otsu(histogram, this.size);
break;
case 'shanbhag':
threshold = shanbhag(histogram, this.size);
break;
case 'triangle':
threshold = triangle(histogram);
break;
case 'yen':
threshold = yen(histogram, this.size);
break; |
<<<<<<<
import bodyMode from './decorators/bodyMode'
=======
import trackRemoval from './decorators/trackRemoval'
>>>>>>>
import bodyMode from './decorators/bodyMode'
import trackRemoval from './decorators/trackRemoval'
<<<<<<<
@staticMethods @windowListener @customEvent @isCapture @getEffect @bodyMode
class ReactTooltip extends Component {
=======
@staticMethods
@windowListener
@customEvent
@isCapture
@getEffect
@trackRemoval
class ReactTooltip extends React.Component {
>>>>>>>
@staticMethods
@windowListener
@customEvent
@isCapture
@getEffect
@bodyMode
@trackRemoval
class ReactTooltip extends React.Component {
<<<<<<<
wrapper: PropTypes.string,
bodyMode: PropTypes.bool,
possibleCustomEvents: PropTypes.string,
possibleCustomEventsOff: PropTypes.string
=======
wrapper: PropTypes.string,
clickable: PropTypes.bool
>>>>>>>
wrapper: PropTypes.string,
bodyMode: PropTypes.bool,
possibleCustomEvents: PropTypes.string,
possibleCustomEventsOff: PropTypes.string,
clickable: PropTypes.bool
<<<<<<<
disable: false,
possibleCustomEvents: props.possibleCustomEvents || '',
possibleCustomEventsOff: props.possibleCustomEventsOff || ''
=======
disable: false,
originTooltip: null,
isMultiline: false
>>>>>>>
disable: false,
possibleCustomEvents: props.possibleCustomEvents || '',
possibleCustomEventsOff: props.possibleCustomEventsOff || '',
originTooltip: null,
isMultiline: false |
<<<<<<<
view: {},
emptyText: "",
emptyHint: ""
=======
view: {},
loading: false
>>>>>>>
view: {},
emptyText: "",
emptyHint: "",
loading: false
<<<<<<<
const {view, emptyText, emptyHint} = this.state;
=======
const {view, loading} = this.state;
>>>>>>>
const {view, emptyText, emptyHint, loading} = this.state; |
<<<<<<<
selectProduct = (id, idFocused, idFocusedDown) => {
=======
selectAll = () => {
const {rowData, tabid, keyProperty} = this.props;
const property = keyProperty ? keyProperty : "rowId";
const toSelect = rowData[tabid].map((item, index) => item[property]);
this.selectRangeProduct(toSelect);
}
getSelectedItems = () => {
const {selected} = this.state;
return selected;
}
selectProduct = (id) => {
>>>>>>>
selectAll = () => {
const {rowData, tabid, keyProperty} = this.props;
const property = keyProperty ? keyProperty : "rowId";
const toSelect = rowData[tabid].map((item, index) => item[property]);
this.selectRangeProduct(toSelect);
}
getSelectedItems = () => {
const {selected} = this.state;
return selected;
}
selectProduct = (id, idFocused, idFocusedDown) => {
<<<<<<<
</div>}
<div className="panel panel-primary panel-bordered panel-bordered-force">
<table className="table table-bordered-vertically table-striped" onKeyDown = { listenOnKeys ? (e) => this.handleKeyDown(e) : ''}>
<thead>
<TableHeader cols={cols} />
</thead>
<tbody>
{this.renderTableBody()}
</tbody>
<tfoot>
</tfoot>
</table>
{rowData && rowData[tabid] && Object.keys(rowData[tabid]).length === 0 && this.renderEmptyInfo()}
=======
>>>>>>> |
<<<<<<<
if(rowData && rowData[tabid]){
=======
if(rowData[tabid]){
>>>>>>>
if(rowData && rowData[tabid]){
<<<<<<<
=======
console.log(this.state.contextMenu.x);
>>>>>>>
<<<<<<<
=======
const { windowHandler } = state;
const {
rowData
} = windowHandler || {
rowData: {}
}
const selectedProducts = state.appHandler.selectedProducts;
>>>>>>>
const { appHandler } = state;
const {
selectedProducts
} = appHandler || {
selectedProducts: []
}
<<<<<<<
=======
rowData, selectedProducts
>>>>>>>
selectedProducts |
<<<<<<<
=======
case types.UPDATE_DATA_INCLUDED_TABS_INFO:
return Object.assign({}, state, {
[action.scope]: Object.assign({}, state[action.scope], {
includedTabsInfo:
action.includedTabsInfo &&
action.includedTabsInfo.reduce((acc, cur) => {
acc[cur.tabid] = cur;
return acc;
}, {})
})
})
case types.UPDATE_DATA_SUCCESS:
return Object.assign({}, state, {
[action.scope]: Object.assign({}, state[action.scope], {
data: state[action.scope].data.map(item =>
item.field === action.item.field ?
Object.assign({}, item, action.item) :
item
),
saveStatus: action.saveStatus,
validStatus: action.validStatus,
includedTabsInfo:
action.includedTabsInfo ?
action.includedTabsInfo.reduce((acc, cur) => {
acc[cur.tabid] = cur;
return acc;
}, {}) :
state[action.scope].includedTabsInfo
})
})
case types.UPDATE_DATA_PROPERTY:
return Object.assign({}, state, {
[action.scope]: Object.assign({}, state[action.scope], {
data: state[action.scope].data.map(item =>
item.field === action.property ?
Object.assign({}, item, { value: action.value }) :
item
)
})
})
case types.UPDATE_ROW_PROPERTY:
return update(state, {
[action.scope]: {
rowData: {
[action.tabid]: {
[action.rowid]: {
fields: {$set:
state[action.scope]
.rowData[action.tabid][action.rowid]
.fields.map(item =>
item.field === action.property ?
Object.assign({}, item, {
value: action.value
}) : item
)
}
}
}
}
}
})
>>>>>>>
case types.UPDATE_DATA_INCLUDED_TABS_INFO:
return Object.assign({}, state, {
[action.scope]: Object.assign({}, state[action.scope], {
includedTabsInfo:
action.includedTabsInfo &&
action.includedTabsInfo.reduce((acc, cur) => {
acc[cur.tabid] = cur;
return acc;
}, {})
})
}) |
<<<<<<<
=======
handleKeyDown = (e) => {
const input = document.getElementById('search-input');
const firstMenuItem =
document.getElementsByClassName('js-menu-item')[0];
switch(e.key) {
case 'ArrowDown':
if(document.activeElement === input) {
firstMenuItem.focus();
}
break;
case 'Tab':
e.preventDefault();
if(document.activeElement === input) {
firstMenuItem.focus();
} else {
input.focus();
}
break;
}
}
renderTree = () => {
const {rootResults, queriedResults, query} = this.state;
return(
<div>
<div className="search-wrapper">
<div className="input-flex input-primary">
<i className="input-icon meta-icon-preview"/>
<DebounceInput
debounceTimeout={250}
type="text" id="search-input"
className="input-field"
placeholder="Type phrase here"
onChange={e => this.handleQuery(e) }
onKeyDown={(e) =>
this.handleKeyDown(e)}
/>
{this.state.query && <i
className="input-icon meta-icon-close-alt pointer"
onClick={e => this.handleClear(e) }
/>}
</div>
</div>
<p
className="menu-overlay-header menu-overlay-header-main menu-overlay-header-spaced"
>
{rootResults.caption}
</p>
<div className="column-wrapper">
{queriedResults && queriedResults.map((subitem, subindex) =>
<MenuOverlayContainer
key={subindex}
printChildren={true}
handleClickOnFolder={this.handleDeeper}
handleRedirect={this.handleRedirect}
handleNewRedirect={this.handleNewRedirect}
openModal={this.openModal}
onKeyDown={(e) => this.handleKeyDown(e)}
{...subitem}
/>
)}
{ queriedResults.length === 0 && query!='' &&
<span>There are no results</span>
}
</div>
</div>
)
}
>>>>>>>
handleKeyDown = (e) => {
const input = document.getElementById('search-input');
const firstMenuItem =
document.getElementsByClassName('js-menu-item')[0];
switch(e.key) {
case 'ArrowDown':
if(document.activeElement === input) {
firstMenuItem.focus();
}
break;
case 'Tab':
e.preventDefault();
if(document.activeElement === input) {
firstMenuItem.focus();
} else {
input.focus();
}
break;
}
} |
<<<<<<<
=======
this.setState({sortingAsc: ascending}, function () {
// console.log(this.state.sortingAsc);
});
>>>>>>>
<<<<<<<
const {layout, data, page, sortingField} = this.state;
=======
const {layout, data, page} = this.state;
>>>>>>>
const {layout, data, page, sortingField} = this.state; |
<<<<<<<
=======
// console.log(this.state);
>>>>>>> |
<<<<<<<
navigate = (up) => {
const {selected} = this.state;
const {list} = this.props;
const next = up ? selected + 1 : selected - 1;
this.setState(Object.assign({}, this.state, {
selected: (next >= 0 && next <= list.length) ? next : selected
}));
}
handleKeyDown = (e) => {
const {list} = this.props;
const {selected} = this.state;
switch(e.key){
case "ArrowDown":
e.preventDefault();
this.navigate(true);
break;
case "ArrowUp":
e.preventDefault();
this.navigate(false);
break;
case "Enter":
e.preventDefault();
this.handleSelect(list[Object.keys(list)[selected-1]])
break;
case "Escape":
e.preventDefault();
this.handleBlur();
break;
}
}
getRow = (index, option, label) => {
const {selected} = this.state;
return (
<div
key={index}
className={"input-dropdown-list-option " +
(selected === index ? "input-dropdown-list-option-key-on" : "")
}
onClick={() => this.handleSelect(option)}
>
<p className="input-dropdown-item-title">{label ? label : option[Object.keys(option)[0]]}</p>
</div>
)
=======
handleKeyDown = (e) => {
switch(e.key){
case "ArrowDown":
e.preventDefault();
console.log('asd')
break;
case "ArrowUp":
e.preventDefault();
break;
case "Enter":
e.preventDefault();
break;
case "Escape":
e.preventDefault();
break;
}
}
getRow = (index, option, label) => {
return (<div key={index} className={"input-dropdown-list-option"} onClick={() => this.handleSelect(option)}>
<p className="input-dropdown-item-title">{label ? label : option[Object.keys(option)[0]]}</p>
</div>)
>>>>>>>
navigate = (up) => {
const {selected} = this.state;
const {list} = this.props;
const next = up ? selected + 1 : selected - 1;
this.setState(Object.assign({}, this.state, {
selected: (next >= 0 && next <= list.length) ? next : selected
}));
}
handleKeyDown = (e) => {
const {list} = this.props;
const {selected} = this.state;
switch(e.key){
case "ArrowDown":
e.preventDefault();
this.navigate(true);
break;
case "ArrowUp":
e.preventDefault();
this.navigate(false);
break;
case "Enter":
e.preventDefault();
this.handleSelect(list[Object.keys(list)[selected-1]])
break;
case "Escape":
e.preventDefault();
this.handleBlur();
break;
}
}
getRow = (index, option, label) => {
const {selected} = this.state;
return (
<div
key={index}
className={"input-dropdown-list-option " +
(selected === index ? "input-dropdown-list-option-key-on" : "")
}
onClick={() => this.handleSelect(option)}
>
<p className="input-dropdown-item-title">{label ? label : option[Object.keys(option)[0]]}</p>
</div>
)
return (<div key={index} className={"input-dropdown-list-option"} onClick={() => this.handleSelect(option)}>
<p className="input-dropdown-item-title">{label ? label : option[Object.keys(option)[0]]}</p>
</div>) |
<<<<<<<
validStatus: {},
includedTabsInfo: {}
=======
validStatus: {},
docId: undefined
>>>>>>>
validStatus: {},
includedTabsInfo: {}
docId: undefined |
<<<<<<<
dispatch(mapDataToState(response.data, isModal, rowId));
})
}
}
function mapDataToState(data, isModal, rowId){
return dispatch => {
data.map(item1 => {
if(rowId === "NEW"){
dispatch(addNewRow(item1, item1.tabid, item1.rowId, "master"))
}else{
item1.fields.map(item2 => {
if(rowId && !isModal){
dispatch(updateRowSuccess(item2, item1.tabid, item1.rowId, getScope(isModal)))
}else{
dispatch(updateDataSuccess(item2, getScope(isModal)));
}
});
}
=======
response.data.map(item1 => {
setTimeout(function(){
dispatch(indicatorState('saved'));
}, 3500);
if(rowId === "NEW"){
dispatch(addNewRow(item1, item1.tabid, item1.rowId, getScope(isModal)))
}else{
item1.fields.map(item2 => {
if(rowId){
dispatch(updateRowSuccess(item2, item1.tabid, item1.rowId, getScope(isModal)))
}else{
dispatch(updateDataSuccess(item2, getScope(isModal)));
}
});
}
})
>>>>>>>
dispatch(mapDataToState(response.data, isModal, rowId));
})
}
}
function mapDataToState(data, isModal, rowId){
return dispatch => {
data.map(item1 => {
setTimeout(function(){
dispatch(indicatorState('saved'));
}, 3500);
if(rowId === "NEW"){
dispatch(addNewRow(item1, item1.tabid, item1.rowId, "master"))
}else{
item1.fields.map(item2 => {
if(rowId && !isModal){
dispatch(updateRowSuccess(item2, item1.tabid, item1.rowId, getScope(isModal)))
}else{
dispatch(updateDataSuccess(item2, getScope(isModal)));
}
});
} |
<<<<<<<
NEW_DOCUMENT: mod + '+' + 'm',
FOCUS_FAST_LINE_ENTRY: mod + '+' + 'q',
=======
NEW_DOCUMENT: mod + '+' + 'm'
>>>>>>>
NEW_DOCUMENT: mod + '+' + 'm'
<<<<<<<
=======
TABLE_CONTEXT: {
TOGGLE_QUICK_INPUT: mod + '+' + 'q',
TOGGLE_EXPAND: mod + '+' + 'l'
}
>>>>>>>
TABLE_CONTEXT: {
TOGGLE_QUICK_INPUT: mod + '+' + 'q',
TOGGLE_EXPAND: mod + '+' + 'l'
} |
<<<<<<<
import BarChart from '../components/charts/BarChartComponent';
=======
>>>>>>>
import BarChart from '../components/charts/BarChartComponent';
<<<<<<<
const {breadcrumb} = this.props;
const data = [
{name: "Alice", value: 2},
{name: "Bob", value: 3},
{name: "Carol", value: 1},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 28},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18}
];
const data2 = [
{name: "Alice", value: 2},
{name: "Bob", value: 3},
{name: "Carol", value: 1},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 18},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18},
{name: "Valice", value: 12},
{name: "Boob", value: 23},
{name: "Darol", value: 31},
{name: "Cwayne", value: 45},
{name: "Tanne", value: 58},
{name: "Mobin", value: 28},
{name: "Meve", value: 12},
{name: "Caren", value: 46},
{name: "Gisa", value: 42},
{name: "Pom", value: 18},
{name: "Slice", value: 2},
{name: "Yob", value: 3},
{name: "CCarol", value: 1},
{name: "Duayne", value: 35},
{name: "Canne", value: 18},
{name: "Oobin", value: 28},
{name: "Weve", value: 12},
{name: "Laren", value: 16},
{name: "Zisa", value: 22},
{name: "Oom", value: 18}
];
const data3 = [
{name: "Alice", value: 42},
{name: "Bob", value: 33},
{name: "Carol", value: 41},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 28},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18},
{name: "CCarol", value: 1},
{name: "Duayne", value: 35},
{name: "Canne", value: 18},
{name: "Oobin", value: 28},
{name: "Weve", value: 12},
{name: "Laren", value: 16},
{name: "Zisa", value: 22},
{name: "Oom", value: 18}
];
=======
>>>>>>>
const {breadcrumb} = this.props;
const data = [
{name: "Alice", value: 2},
{name: "Bob", value: 3},
{name: "Carol", value: 1},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 28},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18}
];
const data2 = [
{name: "Alice", value: 2},
{name: "Bob", value: 3},
{name: "Carol", value: 1},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 18},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18},
{name: "Valice", value: 12},
{name: "Boob", value: 23},
{name: "Darol", value: 31},
{name: "Cwayne", value: 45},
{name: "Tanne", value: 58},
{name: "Mobin", value: 28},
{name: "Meve", value: 12},
{name: "Caren", value: 46},
{name: "Gisa", value: 42},
{name: "Pom", value: 18},
{name: "Slice", value: 2},
{name: "Yob", value: 3},
{name: "CCarol", value: 1},
{name: "Duayne", value: 35},
{name: "Canne", value: 18},
{name: "Oobin", value: 28},
{name: "Weve", value: 12},
{name: "Laren", value: 16},
{name: "Zisa", value: 22},
{name: "Oom", value: 18}
];
const data3 = [
{name: "Alice", value: 42},
{name: "Bob", value: 33},
{name: "Carol", value: 41},
{name: "Dwayne", value: 5},
{name: "Anne", value: 8},
{name: "Robin", value: 28},
{name: "Eve", value: 12},
{name: "Karen", value: 6},
{name: "Lisa", value: 22},
{name: "Tom", value: 18},
{name: "CCarol", value: 1},
{name: "Duayne", value: 35},
{name: "Canne", value: 18},
{name: "Oobin", value: 28},
{name: "Weve", value: 12},
{name: "Laren", value: 16},
{name: "Zisa", value: 22},
{name: "Oom", value: 18}
]; |
<<<<<<<
=======
console.log('---API request ----')
>>>>>>>
<<<<<<<
=======
console.log('NEW');
>>>>>>>
<<<<<<<
=======
console.log(payload);
>>>>>>>
<<<<<<<
=======
console.log('response ');
console.log(response);
>>>>>>>
<<<<<<<
=======
console.log('new');
>>>>>>>
<<<<<<<
=======
console.log('updateRowSuccess');
>>>>>>>
<<<<<<<
=======
console.log('updateDataSuccess');
console.log(item2);
>>>>>>> |
<<<<<<<
=======
// console.log(props);
>>>>>>> |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
handleChange = (e, property) => {
// const {dispatch, tabId, rowId, isModal, relativeDocId, precision} = this.props;
// let currRowId = rowId;
// if(!this.validatePrecision(e.target.value)){
// return;
// }
// if(rowId === "NEW"){
// currRowId = relativeDocId;
// }
// e.preventDefault();
// dispatch(updateProperty(property, e.target.value, tabId, currRowId, isModal));
}
>>>>>>> |
<<<<<<<
export default types => (path, state) => {
// We can only do one or the other, but preprocessing
// disables the normal transpilation, obviously
if (useCSSPreprocessor(state)) {
preprocess(types)(path, state)
} else if (useTranspileTemplateLiterals(state)) {
transpile(types)(path, state)
=======
export default (path, state) => {
if (useTranspileTemplateLiterals(state)) {
transpile(path, state)
>>>>>>>
export default types => (path, state) => {
if (useTranspileTemplateLiterals(state)) {
transpile(types)(path, state) |
<<<<<<<
/*! Lity - v2.1.1 - 2016-10-07
=======
/*! Lity - v2.2.0 - 2016-10-08
>>>>>>>
/*! Lity - v2.2.0 - 2016-10-08
<<<<<<<
return iframe(
'https://www.facebook.com/plugins/video.php?href=' + target + '&autoplay=1',
instance,
matches[4],
target
=======
if (0 !== target.indexOf('http')) {
target = 'https:' + target;
}
return iframeHandler(
transferHash(
target,
appendQueryParams(
'https://www.facebook.com/plugins/video.php?href=' + target,
$.extend(
{
autoplay: 1
},
parseQueryParams(matches[4] || '')
)
)
)
>>>>>>>
if (0 !== target.indexOf('http')) {
target = 'https:' + target;
}
return iframe(
'https://www.facebook.com/plugins/video.php?href=' + target + '&autoplay=1',
instance,
matches[4],
target |
<<<<<<<
Your perfect movie date{" "}
<span style={{ textDecoration: "underline" }}>
<a href="https://moviedo.netlify.app">MovieDo</a>
</span>
=======
>>>>>>>
<<<<<<<
=======
<h2
className="is-size-4"
style={{
marginBottom: '.2rem',
color: '#4a4a4a',
fontWeight: 400,
}}
>
</h2>
>>>>>>> |
<<<<<<<
function klass(o) {
return extend.call(typeof o == 'function' ? o : noop, o);
}
function process(what, o, supr){
for (var k in o) {
if (o.hasOwnProperty(k)) {
what[k] = typeof o[k] == "function"
&& typeof supr.prototype[k] == "function"
&& fnTest.test(o[k])
? wrap(k, o[k], supr) : o[k];
}
}
}
function wrap(k, fn, supr) {
return function () {
var tmp = this.supr;
this.supr = supr.prototype[k];
var ret = fn.apply(this, arguments);
this.supr = tmp;
return ret;
};
}
=======
function klass(o){
var methods, _constructor = isFn(o) ? (methods = {}, o) : (methods = o, noop);
return extend.call(_constructor, o, 1);
};
>>>>>>>
function klass(o) {
return extend.call(typeof o == 'function' ? o : noop, o, 1);
}
function process(what, o, supr){
for (var k in o) {
if (o.hasOwnProperty(k)) {
what[k] = typeof o[k] == "function"
&& typeof supr[proto][k] == "function"
&& fnTest.test(o[k])
? wrap(k, o[k], supr) : o[k];
}
}
}
function wrap(k, fn, supr) {
return function () {
var tmp = this.supr;
this.supr = supr[proto][k];
var ret = fn.apply(this, arguments);
this.supr = tmp;
return ret;
};
}
<<<<<<<
prototype = new noop(),
isFunction = typeof o == 'function',
_constructor = isFunction ? o : this,
_methods = isFunction ? {} : o,
fn = function () {
supr.apply(this, arguments);
=======
_methods,
_constructor = isFn(o) ? (_methods = {}, o) : (_methods = o, this),
fn = function () {
fromSub || isFn(o) && supr.apply(this, arguments);
>>>>>>>
prototype = new noop(),
isFunction = typeof o == 'function',
_constructor = isFunction ? o : this,
_methods = isFunction ? {} : o,
fn = function () {
fromSub || isFn(o) && supr.apply(this, arguments);
<<<<<<<
};
fn.methods = function (o) {
process(prototype, o, supr);
fn.prototype = prototype;
=======
},
prototype = new noop();
fn.methods = function (prop) {
for (var name in prop) {
prototype[name] = isFn(prop[name]) &&
isFn(supr[proto][name]) && fnTest.test(prop[name]) ?
(function(name, fn){
return function() {
this.supr = supr[proto][name];
return fn.apply(this, arguments);
};
})(name, prop[name]) :
prop[name];
}
fn[proto] = prototype;
>>>>>>>
};
fn.methods = function (o) {
process(prototype, o, supr);
fn[proto] = prototype; |
<<<<<<<
$scope.filterAll = function(){
$scope.selectedtags=[];
$scope.filterOptions.filterText="";
var creds_filtered=[];
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if($scope.active_vault.credentials[i].delete_time===0){
creds_filtered.push($scope.active_vault.credentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(creds_filtered);
};
$scope.filterStrength = function(strength_min, strength_max){
var initialCredentials=$scope.active_vault.credentials;
var postFiltered=[];
for (var i = 0; i < initialCredentials.length; i++) {
var _credential = initialCredentials[i];
var zxcvbn_result = zxcvbn(_credential.password);
if(zxcvbn_result.score>=strength_min && zxcvbn_result.score<=strength_max){
postFiltered.push(initialCredentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(postFiltered);
};
$scope.filterExpired = function(){
var initialCredentials=$scope.active_vault.credentials;
var now = Date.now();
var postFiltered=[];
for (var i = 0; i < initialCredentials.length; i++) {
var _credential = initialCredentials[i];
if(_credential.expire_time!==0 && _credential.expire_time <= now){
postFiltered.push(initialCredentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(postFiltered);
};
$scope.filterHidden = function(list){
var list_without_hidden=[];
for (var i = 0; i < list.length; i++) {
if(list[i].hidden!==1){
list_without_hidden.push(list[i]);
}
}
return list_without_hidden;
};
$scope.selectedtags = [];
var to;
$rootScope.$on('selected_tags_updated', function (evt, _sTags) {
var _selectedTags = [];
for (var x = 0; x < _sTags.length; x++) {
_selectedTags.push(_sTags[x].text);
}
$scope.selectedtags = _selectedTags;
$timeout.cancel(to);
if (_selectedTags.length > 0) {
to = $timeout(function () {
if ($scope.filtered_credentials) {
var _filtered_tags = [];
for (var i = 0; i < $scope.filtered_credentials.length; i++) {
var tags = $scope.filtered_credentials[i].tags_raw;
for (var x = 0; x < tags.length; x++) {
var tag = tags[x].text;
if (_filtered_tags.indexOf(tag) === -1) {
_filtered_tags.push(tag);
}
}
}
$rootScope.$emit('limit_tags_in_list', _filtered_tags);
}
}, 50);
}
});
$scope.delete_time = 0;
$scope.showCredentialRow = function (credential) {
if ($scope.delete_time === 0) {
return credential.delete_time === 0;
} else {
return credential.delete_time > $scope.delete_time;
}
};
$rootScope.$on('set_delete_time', function (event, time) {
$scope.delete_time = time;
});
$scope.setDeleteTime = function (delete_time) {
$scope.delete_time = delete_time;
};
$scope.selectedCredential = false;
$scope.selectCredential = function (credential) {
if (credential.description) {
credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", '<br />'));
}
$scope.selectedCredential = angular.copy(credential);
$rootScope.$emit('app_menu', true);
};
$scope.closeSelected = function () {
$rootScope.$emit('app_menu', false);
$scope.selectedCredential = false;
};
$rootScope.$on('logout', function () {
if ($scope.active_vault) {
$rootScope.vaultCache[$scope.active_vault.guid] = null;
}
$scope.active_vault = null;
$scope.credentials = [];
//$scope.$parent.selectedVault = false;
=======
$rootScope.$on('logout', function () {
if($scope.active_vault) {
$rootScope.vaultCache[$scope.active_vault.guid] = null;
}
$scope.active_vault = null;
$scope.credentials = [];
//$scope.$parent.selectedVault = false;
>>>>>>>
$scope.filterAll = function(){
$scope.selectedtags=[];
$scope.filterOptions.filterText="";
var creds_filtered=[];
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
if($scope.active_vault.credentials[i].delete_time===0){
creds_filtered.push($scope.active_vault.credentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(creds_filtered);
};
$scope.filterStrength = function(strength_min, strength_max){
var initialCredentials=$scope.active_vault.credentials;
var postFiltered=[];
for (var i = 0; i < initialCredentials.length; i++) {
var _credential = initialCredentials[i];
var zxcvbn_result = zxcvbn(_credential.password);
if(zxcvbn_result.score>=strength_min && zxcvbn_result.score<=strength_max){
postFiltered.push(initialCredentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(postFiltered);
};
$scope.filterExpired = function(){
var initialCredentials=$scope.active_vault.credentials;
var now = Date.now();
var postFiltered=[];
for (var i = 0; i < initialCredentials.length; i++) {
var _credential = initialCredentials[i];
if(_credential.expire_time!==0 && _credential.expire_time <= now){
postFiltered.push(initialCredentials[i]);
}
}
$scope.filtered_credentials=$scope.filterHidden(postFiltered);
};
$scope.filterHidden = function(list){
var list_without_hidden=[];
for (var i = 0; i < list.length; i++) {
if(list[i].hidden!==1){
list_without_hidden.push(list[i]);
}
}
return list_without_hidden;
};
$scope.selectedtags = [];
var to;
$rootScope.$on('selected_tags_updated', function (evt, _sTags) {
var _selectedTags = [];
for (var x = 0; x < _sTags.length; x++) {
_selectedTags.push(_sTags[x].text);
}
$scope.selectedtags = _selectedTags;
$timeout.cancel(to);
if (_selectedTags.length > 0) {
to = $timeout(function () {
if ($scope.filtered_credentials) {
var _filtered_tags = [];
for (var i = 0; i < $scope.filtered_credentials.length; i++) {
var tags = $scope.filtered_credentials[i].tags_raw;
for (var x = 0; x < tags.length; x++) {
var tag = tags[x].text;
if (_filtered_tags.indexOf(tag) === -1) {
_filtered_tags.push(tag);
}
}
}
$rootScope.$emit('limit_tags_in_list', _filtered_tags);
}
}, 50);
}
});
$scope.delete_time = 0;
$scope.showCredentialRow = function (credential) {
if ($scope.delete_time === 0) {
return credential.delete_time === 0;
} else {
return credential.delete_time > $scope.delete_time;
}
};
$rootScope.$on('set_delete_time', function (event, time) {
$scope.delete_time = time;
});
$scope.setDeleteTime = function (delete_time) {
$scope.delete_time = delete_time;
};
$scope.selectedCredential = false;
$scope.selectCredential = function (credential) {
if (credential.description) {
credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", '<br />'));
}
$scope.selectedCredential = angular.copy(credential);
$rootScope.$emit('app_menu', true);
};
$scope.closeSelected = function () {
$rootScope.$emit('app_menu', false);
$scope.selectedCredential = false;
};
$rootScope.$on('logout', function () {
if ($scope.active_vault) {
$rootScope.vaultCache[$scope.active_vault.guid] = null;
}
$scope.active_vault = null;
$scope.credentials = [];
// $scope.$parent.selectedVault = false; |
<<<<<<<
describe('Controller: Products', () => {
const defaultProduct = [{
__v: 0,
_id: "56cb91bdc3464f14678934ca",
name: 'Default product',
description: 'product description',
price: 100
}];
=======
describe('Controllers: Products', () => {
const defaultProduct = [
{
name: 'Default product',
description: 'product description',
price: 100
}
];
>>>>>>>
describe('Controller: Products', () => {
const defaultProduct = [
{
__v: 0,
_id: '56cb91bdc3464f14678934ca',
name: 'Default product',
description: 'product description',
price: 100
}
];
<<<<<<<
it('should call send with a list of products', () => {
=======
it('should return a list of products', async () => {
const request = {};
>>>>>>>
it('should return a list of products', async () => {
<<<<<<<
return productsController.get(defaultRequest, response)
.then(() => {
sinon.assert.calledWith(response.send, defaultProduct);
});
=======
await productsController.get(request, response);
sinon.assert.calledWith(response.send, defaultProduct);
>>>>>>>
await productsController.get(defaultRequest, response);
sinon.assert.calledWith(response.send, defaultProduct); |
<<<<<<<
import MergeCellDemo from '~/components/table/demos/mergeCell';
=======
import {Dropdown, DropdownMenu, DropdownItem} from 'kpc/components/dropdown';
import {Icon} from 'kpc/components/icon';
import Vue from 'vue';
>>>>>>>
import MergeCellDemo from '~/components/table/demos/mergeCell';
import {Dropdown, DropdownMenu, DropdownItem} from 'kpc/components/dropdown';
import {Icon} from 'kpc/components/icon';
import Vue from 'vue'; |
<<<<<<<
var deleted = insertable && prevNode && typeof prevNode === 'object'
=======
var deleted = insertable && typeof prevNode === 'object' && prevNode !== null
>>>>>>>
var deleted = insertable && typeof prevNode === 'object' && prevNode |
<<<<<<<
import disableMethod from './disable-method';
=======
import disableMultiItemChange from './disable-multi-item-change';
>>>>>>>
import disableMethod from './disable-method';
import disableMultiItemChange from './disable-multi-item-change';
<<<<<<<
disableMethod,
=======
disableMultiItemChange,
>>>>>>>
disableMethod,
disableMultiItemChange, |
<<<<<<<
let asyncSchema;
let ajvAsync;
=======
let schemaForAjvInstance;
>>>>>>>
let schemaForAjvInstance;
let asyncSchema;
let ajvAsync;
<<<<<<<
=======
hookBeforeArrayForAjvInstance = {
type: 'before',
method: 'create',
params: { provider: 'rest' },
data: [
{ first: 'John', last: 'Doe' },
{ first: 'Josh', last: 'Doe' },
{ first: 'Joe', last: 'Doe' }
]
};
schema = {
'properties': {
'first': { 'type': 'string' },
'last': { 'type': 'string' }
},
'required': ['first', 'last']
};
schemaForAjvInstance = {
'properties': {
'first': { 'type': 'string', 'format': 'startWithJo' },
'last': { 'type': 'string' }
},
'required': ['first', 'last']
};
>>>>>>>
hookBeforeArrayForAjvInstance = {
type: 'before',
method: 'create',
params: { provider: 'rest' },
data: [
{ first: 'John', last: 'Doe' },
{ first: 'Josh', last: 'Doe' },
{ first: 'Joe', last: 'Doe' }
]
};
schema = {
'properties': {
'first': { 'type': 'string' },
'last': { 'type': 'string' }
},
'required': ['first', 'last']
};
schemaForAjvInstance = {
'properties': {
'first': { 'type': 'string', 'format': 'startWithJo' },
'last': { 'type': 'string' }
},
'required': ['first', 'last']
};
<<<<<<<
it('works with array of valid items', () => {
validateSchema(schema, Ajv)(hookBeforeArray);
});
=======
it('works with valid single item when ajv instance is passed', () => {
validateSchema(schemaForAjvInstance, ajv)(hookBefore);
});
it('works with array of valid items when ajv instance is passed', () => {
validateSchema(schemaForAjvInstance, ajv)(hookBeforeArrayForAjvInstance);
});
it('fails with invalid single item', () => {
hookBefore.data = { first: 1 };
>>>>>>>
it('works with array of valid items', () => {
validateSchema(schema, Ajv)(hookBeforeArray);
});
it('works with valid single item when ajv instance is passed', () => {
validateSchema(schemaForAjvInstance, ajv)(hookBefore);
});
it('works with array of valid items when ajv instance is passed', () => {
validateSchema(schemaForAjvInstance, ajv)(hookBeforeArrayForAjvInstance);
});
<<<<<<<
describe('Async validation', () => {
before(() => {
ajvAsync = new Ajv({ allErrors: true });
=======
it('fails with invalid single item when ajv instance is passed', () => {
hookBefore.data = { first: 'Jane' };
try {
validateSchema(schemaForAjvInstance, ajv)(hookBefore);
assert.fail(true, false, 'test succeeds unexpectedly');
} catch (err) {
console.log(err.errors);
assert.deepEqual(err.errors, [
'\'first\' should match format "startWithJo"',
'should have required property \'last\''
]);
}
});
it('fails with array of invalid items', () => {
hookBeforeArray.data[0] = { first: 1 };
delete hookBeforeArray.data[2].last;
>>>>>>>
describe('Async validation', () => {
before(() => {
ajvAsync = new Ajv({ allErrors: true }); |
<<<<<<<
'disableMethod',
=======
'disableMultiItemChange',
>>>>>>>
'disableMethod',
'disableMultiItemChange', |
<<<<<<<
document.getElementById('saveRules').style.setProperty('left', (rect.left + 4) + 'px');
=======
document.getElementById('saveflushButtonGroup').style.setProperty('left', (rect.left + 4) + 'px');
updateAllFirewallCells();
>>>>>>>
document.getElementById('saveflushButtonGroup').style.setProperty('left', (rect.left + 4) + 'px'); |
<<<<<<<
var voicemail = window.navigator.mozVoicemail;
if (voicemail) {
voicemail.removeEventListener('statuschanged', this);
}
clearTimeout(this._clockTimer);
=======
icon.hidden = false;
flightModeIcon.hidden = true;
>>>>>>>
icon.hidden = false;
flightModeIcon.hidden = true;
<<<<<<<
updateVoicemail: function sb_updateVoicemail() {
var voicemail = window.navigator.mozVoicemail;
if (!voicemail) {
return;
}
var status = voicemail.status;
if (!status) {
return;
}
this.updateVoicemailStatus(status);
},
updateVoicemailStatus: function updateVoicemailStatus(status) {
var _ = window.navigator.mozL10n.get;
var title = status.returnMessage;
var showCount = status.hasMessages && status.messageCount > 0;
this.voicemail.hidden = !status.hasMessages;
this.voicemailCount.hidden = !showCount;
if (showCount) {
this.voicemailCount.textContent = status.messageCount;
if (!title) {
title = _('newVoicemails', { n: status.messageCount });
}
} else {
if (!title) {
title = _('newVoicemailsUnknown');
}
}
var text = title;
var voicemailNumber = navigator.mozVoicemail.number;
if (voicemailNumber) {
text = _('dialNumber', { number: voicemailNumber });
}
this.hideVoicemailNotification();
if (status.hasMessages) {
window.navigator.mozApps.getSelf().onsuccess = (function(event) {
var app = event.target.result;
var icon = app.installOrigin + '/style/statusbar/images/voicemail.png';
this.showVoicemailNotification(title, text, icon, voicemailNumber);
}).bind(this);
}
},
showVoicemailNotification: function sb_showVoicemailNotification(title, text,
icon, voicemailNumber)
{
this.voicemailNotification = NotificationScreen.addNotification({
id: 0, title: title, text: text, icon: icon
});
if (!voicemailNumber) {
return;
}
var self = this;
function vmNot_onTap(event) {
self.voicemailNotification.removeEventListener('tap', vmNot_onTap);
var telephony = window.navigator.mozTelephony;
if (!telephony) {
return;
}
telephony.dial(voicemailNumber);
}
this.voicemailNotification.addEventListener('tap', vmNot_onTap);
},
hideVoicemailNotification: function hideVoicemailNotification() {
if (this.voicemailNotification) {
if (this.voicemailNotification.parentNode) {
NotificationScreen.removeNotification(this.voicemailNotification);
}
this.voicemailNotification = null;
}
},
updateMuteState: function sb_updateMuteState() {
SettingsListener.observe('audio.volume.master', 5, (function(volume) {
this.mute.hidden = volume;
}).bind(this));
=======
updateNotification: function sb_updateNotification(count) {
var icon = this.icons.notification;
if (!count) {
icon.hidden = true;
return;
}
icon.hidden = false;
icon.dataset.num = count;
>>>>>>>
updateVoicemailStatus: function updateVoicemailStatus(status) {
var _ = window.navigator.mozL10n.get;
var title = status.returnMessage;
var showCount = status.hasMessages && status.messageCount > 0;
this.icons.voicemail.hidden = !status.hasMessages;
this.icons.voicemail.dataset.showNum = showCount;
if (showCount) {
this.icons.voicemail.dataset.num = status.messageCount;
if (!title) {
title = _('newVoicemails', { n: status.messageCount });
}
} else {
if (!title) {
title = _('newVoicemailsUnknown');
}
}
var text = title;
var voicemailNumber = navigator.mozVoicemail.number;
if (voicemailNumber) {
text = _('dialNumber', { number: voicemailNumber });
}
this.hideVoicemailNotification();
if (status.hasMessages) {
window.navigator.mozApps.getSelf().onsuccess = (function(event) {
var app = event.target.result;
var icon = app.installOrigin + '/style/statusbar/images/voicemail.png';
this.showVoicemailNotification(title, text, icon, voicemailNumber);
}).bind(this);
}
},
showVoicemailNotification: function sb_showVoicemailNotification(title, text,
icon, voicemailNumber)
{
if (!this.vmNotificationStart) {
this.vmNotificationStart = 3000 + Math.floor(Math.random() * 999);
}
this.vmNotificationId = this.vmNotificationStart++;
this.voicemailNotification = NotificationScreen.addNotification({
id: this.vmNotificationId, title: title, text: text, icon: icon
});
if (!voicemailNumber) {
return;
}
var self = this;
function vmNot_onTap(event) {
self.voicemailNotification.removeEventListener('tap', vmNot_onTap);
var telephony = window.navigator.mozTelephony;
if (!telephony) {
return;
}
telephony.dial(voicemailNumber);
}
this.voicemailNotification.addEventListener('tap', vmNot_onTap);
},
hideVoicemailNotification: function sb_hideVoicemailNotification() {
if (this.voicemailNotification) {
if (this.voicemailNotification.parentNode) {
NotificationScreen.removeNotification(this.vmNotificationId);
}
this.voicemailNotification = null;
this.vmNotificationId = 0;
}
},
updateNotification: function sb_updateNotification(count) {
var icon = this.icons.notification;
if (!count) {
icon.hidden = true;
return;
}
icon.hidden = false;
icon.dataset.num = count;
<<<<<<<
var elements = ['signal', 'conn', 'data', 'wifi',
'notification', 'voicemail', 'voicemail-count', 'mute', 'battery',
'battery-fuel', 'battery-charging', 'time'];
=======
var elements = ['notification', 'time',
'battery', 'wifi', 'data', 'flight-mode', 'signal',
'tethering', 'alarm', 'bluetooth', 'mute',
'recording', 'sms', 'geolocation', 'usb'];
>>>>>>>
var elements = ['notification', 'time',
'battery', 'wifi', 'data', 'flight-mode', 'signal',
'tethering', 'alarm', 'bluetooth', 'mute',
'recording', 'sms', 'voicemail', 'geolocation', 'usb']; |
<<<<<<<
import Layout from "components/Layout";
import { ProductGrid } from "components/ProductGrid";
=======
import withShop from "containers/shop/withShop";
import Profile from "components/Profile";
const styles = (theme) => ({
root: {
textAlign: "center",
paddingTop: theme.spacing.unit * 0
}
});
>>>>>>>
import withShop from "containers/shop/withShop";
import Layout from "components/Layout";
import { ProductGrid } from "components/ProductGrid";
<<<<<<<
=======
@withShop
@withStyles(styles)
>>>>>>>
@withShop |
<<<<<<<
import withTracking from "lib/tracking/withTracking";
import trackProductListViewed from "lib/tracking/trackProductListViewed";
=======
import ProductGridHero from "components/ProductGridHero";
>>>>>>>
import ProductGridHero from "components/ProductGridHero";
import withTracking from "lib/tracking/withTracking";
import trackProductListViewed from "lib/tracking/trackProductListViewed";
<<<<<<<
@withTracking
@trackProductListViewed({ dispatchOnMount: true })
=======
@withTag
>>>>>>>
@withTag
@withTracking
@trackProductListViewed({ dispatchOnMount: true }) |
<<<<<<<
import Badge from "components/Badge";
import Img from "components/Img";
import { inventoryStatus, isProductLowQuantity, INVENTORY_STATUS, priceByCurrencyCode } from "lib/utils";
=======
import BadgeOverlay from "components/BadgeOverlay";
import track from "lib/tracking/track";
import trackProductClicked from "lib/tracking/trackProductClicked";
import priceByCurrencyCode from "lib/utils/priceByCurrencyCode";
>>>>>>>
import Img from "components/Img";
import BadgeOverlay from "components/BadgeOverlay";
<<<<<<<
=======
@track()
@inject("uiStore")
@observer
>>>>>>>
@track()
<<<<<<<
get primaryImage() {
const { product: { primaryImage } } = this.props;
=======
@trackProductClicked()
handleAnchorClick = () => {}
onImageLoad = () => {
const { hasImageLoaded } = this.state;
if (hasImageLoaded) return;
this.setState({ hasImageLoaded: true });
};
buildImgUrl(imgPath) {
const { uiStore: { appConfig: { publicRuntimeConfig } } } = this.props;
return `${publicRuntimeConfig.externalAssetsUrl}${imgPath}`;
}
renderProductImage() {
const {
classes: { img, imgLoading, loadingIcon },
theme: {
breakpoints: { values }
},
uiStore
} = this.props;
const { publicRuntimeConfig } = uiStore.appConfig;
const { hasImageLoaded } = this.state;
let { product: { primaryImage } } = this.props;
>>>>>>>
get primaryImage() {
const { product: { primaryImage } } = this.props;
<<<<<<<
renderProductImage() {
const { product: { description } } = this.props;
return <Img altText={description} presrc={this.primaryImage.URLs.thumbnail} src={this.primaryImage.URLs.small} />;
}
=======
>>>>>>>
@trackProductClicked()
handleAnchorClick = () => {} |
<<<<<<<
import Grid from "@material-ui/core/Grid";
import { withStyles } from "@material-ui/core/styles";
import { observable, action, computed } from "mobx";
import { observer } from "mobx-react";
import { Router } from "routes";
=======
import Grid from "material-ui/Grid";
import { withStyles } from "material-ui/styles";
>>>>>>>
import Grid from "@material-ui/core/Grid";
import { withStyles } from "@material-ui/core/styles";
<<<<<<<
@observable _selectedOption = null;
@computed
get selectedOption() {
return this._selectedOption;
}
set selectedOption(value) {
this._selectedOption = value;
}
@action
selectOption = (option) => {
this.selectedOption = option._id;
Router.pushRoute("product", {
slugOrId: this.props.productSlug,
variantId: option._id
});
}
=======
>>>>>>> |
<<<<<<<
onClick: PropTypes.func
=======
uiStore: PropTypes.shape({
closeCartPopover: PropTypes.func,
openCartPopover: PropTypes.func
}).isRequired,
variantId: PropTypes.string
>>>>>>>
onClick: PropTypes.func,
uiStore: PropTypes.shape({
closeCartPopover: PropTypes.func,
openCartPopover: PropTypes.func
}).isRequired
<<<<<<<
// Pass chosen quantity to onClick callback
this.props.onClick(this.state.addToCartQuantity);
=======
const { uiStore } = this.props;
// This function currently does nothing. When our GraphQL endpoints are available, we'll use them to add the items to the cart.
// To test that this is working, uncomment the following lines and check to see that the data is correct
// const { variantId } = this.props;
// const { addToCartQuantity } = this.state;
// console.log("ID to add to cart: ", variantId);
// console.log("Quantity to add to cart: ", addToCartQuantity);
>>>>>>>
const { uiStore } = this.props;
// Pass chosen quantity to onClick callback
this.props.onClick(this.state.addToCartQuantity); |
<<<<<<<
import Badge from "components/Badge";
import track from "lib/tracking/track";
import trackProductClicked from "lib/tracking/trackProductClicked";
import { inventoryStatus, isProductLowQuantity, INVENTORY_STATUS, priceByCurrencyCode } from "lib/utils";
=======
import BadgeOverlay from "components/BadgeOverlay";
import priceByCurrencyCode from "lib/utils/priceByCurrencyCode";
>>>>>>>
import BadgeOverlay from "components/BadgeOverlay";
import track from "lib/tracking/track";
import trackProductClicked from "lib/tracking/trackProductClicked";
import priceByCurrencyCode from "lib/utils/priceByCurrencyCode";
<<<<<<<
<Link
route={this.productDetailHref}
onAnchorClick={this.handleAnchorClick}
>
{this.renderProductMedia()}
{this.renderProductInfo()}
=======
<Link route={this.productDetailHref}>
<BadgeOverlay product={product}>
{this.renderProductMedia()}
{this.renderProductInfo()}
</BadgeOverlay>
>>>>>>>
<Link
route={this.productDetailHref}
onAnchorClick={this.handleAnchorClick}
>
<BadgeOverlay product={product}>
{this.renderProductMedia()}
{this.renderProductInfo()}
</BadgeOverlay> |
<<<<<<<
{globalStyles}
{styledComponentsStyleTags}
=======
>>>>>>>
{styledComponentsStyleTags} |
<<<<<<<
import Accordion from "@reactioncommerce/components/Accordion/v1";
import AddressBook from "@reactioncommerce/components/AddressBook/v1";
=======
import Address from "@reactioncommerce/components/Address/v1";
import AddressCapture from "@reactioncommerce/components/AddressCapture/v1";
>>>>>>>
import Accordion from "@reactioncommerce/components/Accordion/v1";
import AddressBook from "@reactioncommerce/components/AddressBook/v1";
import Address from "@reactioncommerce/components/Address/v1";
import AddressCapture from "@reactioncommerce/components/AddressCapture/v1";
<<<<<<<
import InPageMenuItem from "@reactioncommerce/components/InPageMenuItem/v1";
=======
import InlineAlert from "@reactioncommerce/components/InlineAlert/v1";
>>>>>>>
import InPageMenuItem from "@reactioncommerce/components/InPageMenuItem/v1";
import InlineAlert from "@reactioncommerce/components/InlineAlert/v1";
<<<<<<<
Accordion,
AddressBook,
=======
Address,
AddressCapture,
>>>>>>>
Accordion,
AddressBook,
Address,
AddressCapture, |
<<<<<<<
<Provider uiStore={uiStore}>
<ProductGrid
catalogItems={products}
pageInfo={pageInfo}
primaryShopId="123"
/>
</Provider>
=======
<MuiThemeProvider theme={theme}>
<Provider uiStore={uiStore}>
<ProductGrid catalogItems={products} primaryShopId="123" />
</Provider>
</MuiThemeProvider>
>>>>>>>
<MuiThemeProvider theme={theme}>
<Provider uiStore={uiStore}>
<ProductGrid catalogItems={products} pageInfo={pageInfo} primaryShopId="123" />
</Provider>
</MuiThemeProvider> |
<<<<<<<
componentDidMount() {
const { routingStore } = this.props;
routingStore.setTag({});
}
renderHelmet() {
const { shop } = this.props;
return (
<Helmet>
<title>{shop && shop.name}</title>
<meta name="description" content={shop && shop.description} />
</Helmet>
);
}
// TODO: move this handler to _app.js, when it becomes available.
=======
>>>>>>>
componentDidMount() {
const { routingStore } = this.props;
routingStore.setTag({});
} |
<<<<<<<
import Img from "components/Img";
=======
import getConfig from "next/config";
>>>>>>>
<<<<<<<
<Img
presrc={placeholderURL}
src={placeholderURL}
=======
<ProgressiveImage
presrc={placeholderImageUrls.galleryFeatured}
src={placeholderImageUrls.galleryFeatured}
>>>>>>>
<ProgressiveImage
presrc={placeholderURL}
src={placeholderURL} |
<<<<<<<
* The number of items per page to display on the product grid.
*
* @type Number
*/
@observable pageSize = 20;
/**
* App config data
=======
* The ID of the option that is selected on the product detail page. This is not
* tracked per product, so the assumption is that you can only view one detail page
* at a time. The page must reset this before initial mount.
>>>>>>>
* The number of items per page to display on the product grid.
*
* @type Number
*/
@observable pageSize = 20;
/**
* App config data
* The ID of the option that is selected on the product detail page. This is not
* tracked per product, so the assumption is that you can only view one detail page
* at a time. The page must reset this before initial mount.
<<<<<<<
@action
toggleMenuDrawerOpen = () => {
this.menuDrawerOpen = !this.menuDrawerOpen;
}
@action setPageSize = (size) => {
this.pageSize = size;
}
=======
@action toggleMenuDrawerOpen() {
this.isMenuDrawerOpen = !this.isMenuDrawerOpen;
}
>>>>>>>
@action toggleMenuDrawerOpen() {
this.isMenuDrawerOpen = !this.isMenuDrawerOpen;
}
@action setPageSize = (size) => {
this.pageSize = size;
} |
<<<<<<<
var t2 = Math.floor((d2 - min) / 1000 / 60 / 60);
return this.generateValues(t1, t2, this.getTypeMax(d.valueOf()));
=======
var t2 = Math.floor((d - min) / 86400000) * 24 + d2.getUTCHours();
// get the last hour of the year by getting the next new year and subtracting the previous new year
var max = ((new Date(d.getUTCFullYear() + 1, 0) - min) / 86400000) * 24;
return this.generateValues(t1, t2, max);
case os.histo.DateBinType.MONTH_OF_YEAR:
// 0-11
if (!d2) {
var m = d.getUTCMonth();
return this.arrayKeys ? [m] : m;
}
var max = 11;
var m1 = d.getUTCMonth();
var m2 = d2.getUTCMonth();
return this.generateValues(m1, m2, max);
>>>>>>>
var t2 = Math.floor((d2 - min) / 1000 / 60 / 60);
return this.generateValues(t1, t2, this.getTypeMax(d.valueOf()));
case os.histo.DateBinType.MONTH_OF_YEAR:
// 0-11
if (!d2) {
var m = d.getUTCMonth();
return this.arrayKeys ? [m] : m;
}
var max = 11;
var m1 = d.getUTCMonth();
var m2 = d2.getUTCMonth();
return this.generateValues(m1, m2, max); |
<<<<<<<
* entry: !os.filter.FilterEntry,
* mappings: !Array<!Object>,
* startColumn: string,
* endColumn: string,
* uri: string
* }}
*/
plugin.track.QueryOptions;
/**
* @typedef {{
* coordinates: (Array<!ol.Coordinate>|undefined),
* features: (Array<!ol.Feature>|undefined),
* track: !ol.Feature
* }}
*/
plugin.track.AddOptions;
/**
* @typedef {{
* coordinates: (Array<!ol.Coordinate>|undefined),
=======
>>>>>>>
* coordinates: (Array<!ol.Coordinate>|undefined),
* features: (Array<!ol.Feature>|undefined),
* track: !ol.Feature
* }}
*/
plugin.track.AddOptions;
/**
* @typedef {{
* coordinates: (Array<!ol.Coordinate>|undefined), |
<<<<<<<
self.populateContent();
self.setTrigger();
self.toolbarWidth = self.toolbar.width();
=======
self.populateContent();
self.setTrigger();
>>>>>>>
self.populateContent();
self.setTrigger();
self.toolbarWidth = self.toolbar.width();
<<<<<<<
switch(self.options.position)
{
case 'top':
return coordinates = {
left: self.coordinates.left-(self.toolbarWidth/2)+(self.$elem.width()/2),
top: self.coordinates.top-self.$elem.height()-adjustment,
right: 'auto'
}
break;
case 'left':
return coordinates = {
left: self.coordinates.left-(self.toolbarWidth/2)-(self.$elem.width()/2)-adjustment,
top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.height()/2),
right: 'auto'
}
break;
case 'right':
return coordinates = {
left: self.coordinates.left+(self.toolbarWidth/2)+(self.$elem.width()/3)+adjustment,
top: self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.height()/2),
right: 'auto'
}
break;
case 'bottom':
return coordinates = {
left: self.coordinates.left-(self.toolbarWidth/2)+(self.$elem.width()/2),
top: self.coordinates.top+self.$elem.height()+adjustment,
right: 'auto'
}
break;
}
=======
>>>>>>> |
<<<<<<<
nav = require("./content/nav"),
=======
>>>>>>>
nav = require("./content/nav"),
<<<<<<<
ref = db.child("content/" + m.route.param("schema") + "/" + m.route.param("id")),
=======
id = m.route.param("id"),
ref = db.child("content/" + m.route.param("schema") + "/" + id),
>>>>>>>
id = m.route.param("id"),
ref = db.child("content/" + m.route.param("schema") + "/" + id),
<<<<<<<
=======
ctrl.id = id;
>>>>>>>
ctrl.id = id;
<<<<<<<
ctrl.form = el;
// force a redraw so publishing component can get
// new args w/ actual validity
m.redraw();
}
},
m.component(children, {
details : ctrl.schema.fields,
ref : ctrl.ref.child("fields"),
data : ctrl.data.fields || {},
root : ctrl.ref
})
)
=======
ctrl.form = el;
// force a redraw so publishing component can get
// new args w/ actual validity
m.redraw();
}
},
m.component(children, {
details : ctrl.schema.fields,
ref : ctrl.ref.child("fields"),
data : ctrl.data.fields || {},
state : ctrl.data.fields,
root : ctrl.ref
})
>>>>>>>
ctrl.form = el;
// force a redraw so publishing component can get
// new args w/ actual validity
m.redraw();
}
},
m.component(children, {
details : ctrl.schema.fields,
ref : ctrl.ref.child("fields"),
data : ctrl.data.fields || {},
state : ctrl.data.fields,
root : ctrl.ref
})
) |
<<<<<<<
import { AppSwitcher20, Menu32, Close20, Search20 } from '@carbon/icons-react';
=======
import { AppSwitcher20, Close20 } from '@carbon/icons-react';
>>>>>>>
import { AppSwitcher20, Close20, Search20 } from '@carbon/icons-react'; |
<<<<<<<
import FeatureTile from '${__dirname}/src/components/FeatureTile';
import DoDontExample from '${__dirname}/src/components/DoDontExample';
=======
import ColorBlock from '${__dirname}/src/components/ColorBlock';
>>>>>>>
import FeatureTile from '${__dirname}/src/components/FeatureTile';
import ColorBlock from '${__dirname}/src/components/ColorBlock';
<<<<<<<
import { Row, Column } from '@carbon/addons-website';
=======
import WebsiteTabs from '${__dirname}/src/components/WebsiteTabs';
>>>>>>>
import WebsiteTabs from '${__dirname}/src/components/WebsiteTabs';
<<<<<<<
DoDontExample,
=======
GridWrapper,
>>>>>>>
DoDontExample,
<<<<<<<
Row,
Column
=======
WebsiteTabs,
>>>>>>>
Row,
Column,
WebsiteTabs, |
<<<<<<<
export { default as WebsiteBackToTopBtn } from './components/WebsiteBackToTopBtn';
export { Row, Column } from './components/Grid';
=======
export {
default as WebsiteBackToTopBtn,
} from './components/WebsiteBackToTopBtn';
export { default as AnchorLinks } from './components/AnchorLinks';
>>>>>>>
export { default as WebsiteBackToTopBtn } from './components/WebsiteBackToTopBtn';
export { Row, Column } from './components/Grid';
export { default as AnchorLinks } from './components/AnchorLinks'; |
<<<<<<<
import Homepage from '../components/Homepage';
import NextPrevious from '../components/NextPrevious';
=======
import GridWrapper from '../components/GridWrapper';
import { HomepageFooter, HomepageHeader } from '../components/Homepage/Homepage';
>>>>>>>
import NextPrevious from '../components/NextPrevious';
import GridWrapper from '../components/GridWrapper';
import { HomepageFooter, HomepageHeader } from '../components/Homepage/Homepage'; |
<<<<<<<
<CopyToClipboard onCopy={() => this.setState({ copied: true })}>
<CodeSnippet type={type} className="bx--snippet--website">
<div ref={element => (this.codeRef = element)}>{children}</div>
</CodeSnippet>
</CopyToClipboard>
=======
<div className="bx--snippet--website">
<CopyToClipboard
text={children[0].props.children[0]}
onCopy={() => this.setState({ copied: true })}>
<CodeSnippet type={type}>
<div ref={element => (this.codeRef = element)}>{children}</div>
</CodeSnippet>
</CopyToClipboard>
</div>
>>>>>>>
<div className="bx--snippet--website">
<CopyToClipboard onCopy={() => this.setState({ copied: true })}>
<CodeSnippet type={type}>
<div ref={element => (this.codeRef = element)}>{children}</div>
</CodeSnippet>
</CopyToClipboard>
</div> |
<<<<<<<
var getIndividualIDFromEncounterToString = function(encToString) {
// return everything between "individualID=" and the next comma after that
var id = encToString.split("individualID=")[1].split(",")[0];
if (id == '<null>') return false;
return id;
}
=======
>>>>>>>
var getIndividualIDFromEncounterToString = function(encToString) {
// return everything between "individualID=" and the next comma after that
var id = encToString.split("individualID=")[1].split(",")[0];
if (id == '<null>') return false;
return id;
} |
<<<<<<<
pragma solidity ^0.4.4;
=======
pragma solidity 0.3.4;
>>>>>>>
pragma solidity 0.3.4;
<<<<<<<
pragma solidity ^0.4.4;
pragma solidity 0.3.4;
`,
noIndent()
)
assertErrorCount(report, 1)
})
it('should disable only one compiler error on previous line using multiline comment', () => {
const report = linter.processStr(
`
pragma solidity ^0.4.4;
/* solhint-disable-previous-line */
=======
pragma solidity 0.3.4;
>>>>>>>
pragma solidity 0.3.4;
pragma solidity 0.3.4;
`,
noIndent()
)
assertErrorCount(report, 1)
})
it('should disable only one compiler error on previous line using multiline comment', () => {
const report = linter.processStr(
`
pragma solidity 0.3.4;
/* solhint-disable-previous-line */ |
<<<<<<<
.option('-w, --max-warnings [maxWarningsNumber]', 'number of warnings to trigger nonzero exit code')
=======
.option('-q, --quiet', 'report errors only - default: false')
>>>>>>>
.option('-w, --max-warnings [maxWarningsNumber]', 'number of warnings to trigger nonzero exit code')
.option('-q, --quiet', 'report errors only')
<<<<<<<
if (printReports(reports, program.formatter)) {
const warningsNumberExceeded = program.maxWarnings >= 0 && reports[0].warningCount > program.maxWarnings;
if (program.maxWarnings && !reports[0].errorCount && warningsNumberExceeded) {
console.log('Solhint found more warnings than the maximum specified (maximum: %s).', program.maxWarnings);
process.exit(1);
}
}
=======
if (program.quiet) {
// filter the list of reports, to set errors only.
reports[0].reports = reports[0].reports.filter(i => i.severity === 2);
}
printReports(reports, program.formatter);
>>>>>>>
if (program.quiet) {
// filter the list of reports, to set errors only.
reports[0].reports = reports[0].reports.filter(i => i.severity === 2);
}
if (printReports(reports, program.formatter)) {
const warningsNumberExceeded = program.maxWarnings >= 0 && reports[0].warningCount > program.maxWarnings;
if (program.maxWarnings && !reports[0].errorCount && warningsNumberExceeded) {
console.log('Solhint found more warnings than the maximum specified (maximum: %s).', program.maxWarnings);
process.exit(1);
}
} |
<<<<<<<
function charEncodeByCharCodeOrUnescape8(charCode)
=======
function charEncodeByUnescape16(charCode)
>>>>>>>
function charEncodeByCharCodeOrUnescape8(charCode)
<<<<<<<
define('V', ANY_DOCUMENT, HTMLAUDIOELEMENT, NAME),
=======
define('V', ANY_DOCUMENT, FF_SRC, NAME),
>>>>>>>
define('V', ANY_DOCUMENT, FF_SRC, NAME),
define('V', ANY_DOCUMENT, HTMLAUDIOELEMENT, NAME),
<<<<<<<
define('V', ANY_DOCUMENT, NAME, NO_IE_SRC, NO_V8_SRC),
=======
define('V', ANY_DOCUMENT, HTMLAUDIOELEMENT, NAME),
>>>>>>>
<<<<<<<
OPTIMAL_RETURN_STRING =
[
define('return(isNaN+false).constructor'),
define('return String', CAPITAL_HTML, ENTRIES_OBJ),
define('return(isNaN+false).constructor', FILL, IE_SRC),
define('return(isNaN+false).constructor', FILL, NO_IE_SRC)
];
=======
>>>>>>>
OPTIMAL_RETURN_STRING =
[
define('return(isNaN+false).constructor'),
define('return String', CAPITAL_HTML, ENTRIES_OBJ),
define('return(isNaN+false).constructor', FILL, IE_SRC),
define('return(isNaN+false).constructor', FILL, NO_IE_SRC)
]; |
<<<<<<<
'PLAIN_INTL',
'REGEXP_STRING_ITERATOR',
=======
>>>>>>>
'REGEXP_STRING_ITERATOR',
<<<<<<<
engine: 'Safari 10 and Safari 11',
=======
engine: 'Safari 10',
>>>>>>>
engine: 'Safari 10 and Safari 11', |
<<<<<<<
function iterate(apps) {
pageHelper.push(apps);
},
function onsuccess(results) {
if (results === 0) {
renderFromMozApps();
return;
}
// Grid was loaded from DB
updatePaginationBar(true);
addLanguageListener();
},
function onerror() {
// Error recovering info about apps
=======
function iterate(apps) {
pageHelper.push(apps);
appsInDB = appsInDB.concat(apps);
},
function onsuccess(results) {
if (results === 0) {
>>>>>>>
function iterate(apps) {
pageHelper.push(apps);
appsInDB = appsInDB.concat(apps);
},
function onsuccess(results) {
if (results === 0) {
renderFromMozApps();
return;
}
var installedApps = Applications.getInstalledApplications();
var len = appsInDB.length;
for (var i = 0; i < len; i++) {
var origin = appsInDB[i];
if (origin in installedApps) {
delete installedApps[origin];
}
}
for (var origin in installedApps) {
GridManager.install(installedApps[origin]);
}
// Grid was loaded from DB
updatePaginationBar(true);
addLanguageListener();
},
function onerror() {
// Error recovering info about apps
<<<<<<<
=======
var installedApps = Applications.getInstalledApplications();
var len = appsInDB.length;
for (var i = 0; i < len; i++) {
var origin = appsInDB[i];
if (origin in installedApps) {
delete installedApps[origin];
}
}
for (var origin in installedApps) {
GridManager.install(installedApps[origin]);
}
// Grid was loaded from DB
updatePaginationBar(true);
addLanguageListener();
},
function onerror() {
// Error recovering info about apps
renderFromMozApps();
}
>>>>>>> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.