Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// If it does then retrieve the value of it here or return false
configMerge = configMergeExists ? config.options['merge-default-rules'] : false;
// check to see if inline options contains an options property and whether property has a property called merge-default-rules
optionsMergeExists = (options.options && typeof options.options['merge-default-rules'] !== 'undefined');
// If it does then retrieve the value of it here or return false
optionsMerge = optionsMergeExists ? options.options['merge-default-rules'] : false;
// order of preference is inline options > user config > default config
// merge-default-rules defaults to true so each step above should merge with the previous. If at any step merge-default-rules is set to
// false it should skip that steps merge.
defaults = confHelpers.loadDefaults();
finalConfig = merge.recursive(defaults, config, options);
// if merge-default-rules is set to false in user config file then we essentially skip the merging with default rules by overwriting our
// final rules with the content of our user config otherwise we don't take action here as the default merging has already happened
if (configMergeExists && !configMerge) {
finalConfig.rules = config.rules;
}
// if merge-default-rules is set to false in inline options we essentially skip the merging with our current rules by overwriting our
// final rules with the content of our user config otherwise we check to see if merge-default-rules is true OR that we have any inline
// rules, if we do then we want to merge these into our final ruleset.
if (optionsMergeExists && !optionsMerge) {
finalConfig.rules = options.rules;
}
else if ((optionsMergeExists && optionsMerge) || options.rules && Object.keys(options.rules).length > 0) {
finalConfig.rules = merge.recursive(finalConfig.rules, options.rules);
}
if (config.preset === undefined) {
presetFile = require.resolve('liferay-npm-bundler-preset-standard');
} else if (config.preset === '' || config.preset === false) {
// don't load preset
} else {
presetFile = resolveModule.sync(config.preset, {
basedir: '.',
});
}
if (presetFile) {
const originalConfig = Object.assign({}, config);
Object.assign(
config,
merge.recursive(readJsonSync(presetFile), originalConfig)
);
config.pluginsBaseDir = getPackageDir(presetFile);
}
// Normalize
config['/'] = config['/'] || {};
config['config'] = config['config'] || {};
config.packages = config.packages || {};
}
module.exports = function() {
return merge.recursive(Field(), {
props: {
placeholder: {
type:String,
required:false,
default:''
},
disabled: {
type: Boolean
},
tinymce:{
default: false
},
debounce:{
type:Number,
default:300
},
data: function() {
return {
globalOptions: globalOptions ? globalOptions : {},
templates: merge.recursive(fields, customFields),
isForm: true,
vffields: [],
additionalValues: [],
vferrors: [],
relatedFields: {},
triggeredFields: {},
sending: false
};
},
computed: {
module.exports = function() {
return merge.recursive(Field(), {
data: function() {
return {
fieldType: "buttons",
allSelected: false,
filteringField: null,
allSelected: false,
clearText: "Clear",
toggleTexts: {
select: "Select All",
unselect: "Unselect All"
}
};
},
props: {
items: {
type: Array,
_merge(object1, object2) {
return merge.recursive(true, object1, object2)
}
ready: function() {
if (this.tinymce===false) return;
var that = this;
var setup = that.tinymce && that.tinymce.hasOwnProperty('setup')?
that.tinymce.setup:
function() {};
var parentSetup = that.getForm().options.tinymceOptions.hasOwnProperty('setup')?
that.getForm().options.tinymceOptions.setup:
function(){};
var options = typeof this.tinymce=='object'?
merge.recursive(clone(this.getForm().options.tinymceOptions), this.tinymce):
this.getForm().options.tinymceOptions;
options = merge.recursive(options, {
selector:'textarea[name=' + this.name +']',
setup : function(ed) {
that.editor = ed;
parentSetup(ed);
setup(ed);
ed.on('change',function(e) {
that.value = ed.getContent();
}.bind(this));
function recursiveMerge(target, source) {
const merge = require('merge');
return merge.recursive(target, source);
}
module.exports = function() {
return merge.recursive(Field(), {
props: {
format: {
type: String,
default: "DD-MM-YYYY"
},
options: {
type: Object
}
},
data: function() {
return {
fieldType: "pikaday",
months: {
Jan: "01",
Feb: "02",
Mar: "03",
data: function() {
return merge.recursive(
data(),
{
source: "client",
globalOptions,
currentlySorting: {},
time: Date.now()
},
stateData(useVuex, "client", this.options.initialPage)
);
},
computed: {