@formio/js 5.1.0-dev.6000.fab85ea → 5.1.0-dev.6002.16f1966

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4875,7 +4875,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
4875
4875
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4876
4876
 
4877
4877
  "use strict";
4878
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/components/_classes/component/editForm/utils.js\"));\nconst utils_2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\n/* eslint-disable quotes, max-len */\nexports[\"default\"] = [\n {\n type: 'panel',\n title: 'Simple',\n key: 'simple-conditional',\n theme: 'default',\n weight: 105,\n components: [\n {\n type: 'select',\n input: true,\n label: 'This component should Display:',\n key: 'conditional.show',\n dataSrc: 'values',\n data: {\n values: [\n { label: 'True', value: 'true' },\n { label: 'False', value: 'false' }\n ]\n }\n },\n {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'conditional.when',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom(context) {\n return (0, utils_2.getContextComponents)(context);\n }\n }\n },\n {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'conditional.eq'\n }\n ]\n },\n utils_1.default.javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '<p>You must assign the <strong>show</strong> variable a boolean result.</p>' +\n '<p><strong>Note: Advanced Conditional logic will override the results of the Simple Conditional logic.</strong></p>' +\n '<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href=\"https://help.form.io/userguide/form-building/logic-and-conditions\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for an example</a></p>')\n];\n/* eslint-enable quotes, max-len */\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js?");
4878
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/components/_classes/component/editForm/utils.js\"));\nconst utils_2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\n/* eslint-disable quotes, max-len */\nexports[\"default\"] = [\n {\n type: 'panel',\n title: 'Simple',\n key: 'simple-conditional',\n theme: 'default',\n weight: 105,\n components: [\n {\n type: 'select',\n input: true,\n label: 'This component should Display:',\n key: 'conditional.show',\n dataSrc: 'values',\n data: {\n values: [\n { label: 'True', value: 'true' },\n { label: 'False', value: 'false' }\n ]\n }\n },\n {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'conditional.when',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom(context) {\n return (0, utils_2.getContextComponents)(context);\n }\n }\n },\n {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'conditional.eq'\n }\n ]\n },\n utils_1.default.javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '<p>You must assign the <strong>show</strong> variable a boolean result.</p>' +\n '<p><strong>Note: Advanced Conditional logic will override the results of the Simple Conditional logic.</strong></p>' +\n '<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href=\"https://help.form.io/userguide/form-building/logic-and-conditions\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for an example</a></p>', utils_1.default.tokenVariableDescription())\n];\n/* eslint-enable quotes, max-len */\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js?");
4879
4879
 
4880
4880
  /***/ }),
4881
4881
 
@@ -4886,7 +4886,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
4886
4886
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4887
4887
 
4888
4888
  "use strict";
4889
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/components/_classes/component/editForm/utils.js\"));\n/* eslint-disable max-len */\nexports[\"default\"] = [\n {\n weight: 0,\n type: 'checkbox',\n label: 'Multiple Values',\n tooltip: 'Allows multiple values to be entered for this field.',\n key: 'multiple',\n input: true\n },\n {\n type: 'textfield',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true\n },\n {\n weight: 30,\n type: 'radio',\n label: 'Persistent',\n tooltip: 'A persistent field will be stored in database when the form is submitted.',\n key: 'persistent',\n input: true,\n inline: true,\n defaultValue: true,\n values: [\n { label: 'None', value: false },\n { label: 'Server', value: true },\n { label: 'Client', value: 'client-only' },\n ]\n },\n {\n weight: 150,\n type: 'checkbox',\n label: 'Protected',\n tooltip: 'A protected field will not be returned when queried via API.',\n key: 'protected',\n input: true\n },\n {\n type: 'checkbox',\n input: true,\n weight: 200,\n key: 'dbIndex',\n label: 'Database Index',\n tooltip: 'Set this field as an index within the database. Increases performance for submission queries.'\n },\n {\n weight: 400,\n type: 'checkbox',\n label: 'Encrypted',\n tooltip: 'Encrypt this field on the server. This is two way encryption which is not suitable for passwords.',\n key: 'encrypted',\n input: true,\n logic: [\n {\n name: 'disabled',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [\n {\n name: 'disabled',\n type: 'property',\n property: {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n },\n state: true\n }\n ]\n },\n {\n name: 'disabledToolTip',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [\n {\n name: 'addDisabledTooltip',\n type: 'property',\n property: {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n },\n text: 'Only available with Security Module. Contact sales@form.io for more information.'\n }\n ]\n }\n ]\n },\n {\n type: 'select',\n input: true,\n key: 'redrawOn',\n label: 'Redraw On',\n weight: 600,\n tooltip: 'Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom(context) {\n var values = [];\n values.push({ label: 'Any Change', value: 'data' });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: { '!': [{ var: 'data.dataSrc' }] },\n },\n },\n {\n weight: 700,\n type: 'checkbox',\n label: 'Omit Value From Submission Data When Conditionally Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is conditionally hidden, omit the value from the submission data.',\n input: true\n },\n utils_1.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '<p><h4>Example:</h4><pre>value = data.firstName + \" \" + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}</pre>'),\n utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}</pre><p><a href=\"https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for an example</a></p>', '<tr><th>token</th><td>The decoded JWT token for the authenticated user.</td></tr>'),\n {\n type: 'checkbox',\n input: true,\n weight: 1100,\n key: 'calculateServer',\n label: 'Calculate Value on server',\n tooltip: 'Checking this will run the calculation on the server. This is useful if you wish to override the values submitted with the calculations performed on the server.'\n },\n {\n type: 'checkbox',\n input: true,\n weight: 1200,\n key: 'allowCalculateOverride',\n label: 'Allow Manual Override of Calculated Value',\n tooltip: 'When checked, this will allow the user to manually override the calculated value.'\n },\n];\n/* eslint-enable max-len */\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/Component.edit.data.js?");
4889
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst utils_1 = __importDefault(__webpack_require__(/*! ./utils */ \"./lib/cjs/components/_classes/component/editForm/utils.js\"));\n/* eslint-disable max-len */\nexports[\"default\"] = [\n {\n weight: 0,\n type: 'checkbox',\n label: 'Multiple Values',\n tooltip: 'Allows multiple values to be entered for this field.',\n key: 'multiple',\n input: true\n },\n {\n type: 'textfield',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true\n },\n {\n weight: 30,\n type: 'radio',\n label: 'Persistent',\n tooltip: 'A persistent field will be stored in database when the form is submitted.',\n key: 'persistent',\n input: true,\n inline: true,\n defaultValue: true,\n values: [\n { label: 'None', value: false },\n { label: 'Server', value: true },\n { label: 'Client', value: 'client-only' },\n ]\n },\n {\n weight: 150,\n type: 'checkbox',\n label: 'Protected',\n tooltip: 'A protected field will not be returned when queried via API.',\n key: 'protected',\n input: true\n },\n {\n type: 'checkbox',\n input: true,\n weight: 200,\n key: 'dbIndex',\n label: 'Database Index',\n tooltip: 'Set this field as an index within the database. Increases performance for submission queries.'\n },\n {\n weight: 400,\n type: 'checkbox',\n label: 'Encrypted',\n tooltip: 'Encrypt this field on the server. This is two way encryption which is not suitable for passwords.',\n key: 'encrypted',\n input: true,\n logic: [\n {\n name: 'disabled',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [\n {\n name: 'disabled',\n type: 'property',\n property: {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n },\n state: true\n }\n ]\n },\n {\n name: 'disabledToolTip',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [\n {\n name: 'addDisabledTooltip',\n type: 'property',\n property: {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n },\n text: 'Only available with Security Module. Contact sales@form.io for more information.'\n }\n ]\n }\n ]\n },\n {\n type: 'select',\n input: true,\n key: 'redrawOn',\n label: 'Redraw On',\n weight: 600,\n tooltip: 'Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom(context) {\n var values = [];\n values.push({ label: 'Any Change', value: 'data' });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: { '!': [{ var: 'data.dataSrc' }] },\n },\n },\n {\n weight: 700,\n type: 'checkbox',\n label: 'Omit Value From Submission Data When Conditionally Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is conditionally hidden, omit the value from the submission data.',\n input: true\n },\n utils_1.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '<p><h4>Example:</h4><pre>value = data.firstName + \" \" + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}</pre>'),\n utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}</pre><p><a href=\"https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for an example</a></p>', utils_1.default.tokenVariableDescription()),\n {\n type: 'checkbox',\n input: true,\n weight: 1100,\n key: 'calculateServer',\n label: 'Calculate Value on server',\n tooltip: 'Checking this will run the calculation on the server. This is useful if you wish to override the values submitted with the calculations performed on the server.'\n },\n {\n type: 'checkbox',\n input: true,\n weight: 1200,\n key: 'allowCalculateOverride',\n label: 'Allow Manual Override of Calculated Value',\n tooltip: 'When checked, this will allow the user to manually override the calculated value.'\n },\n];\n/* eslint-enable max-len */\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/Component.edit.data.js?");
4890
4890
 
4891
4891
  /***/ }),
4892
4892
 
@@ -4941,7 +4941,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
4941
4941
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4942
4942
 
4943
4943
  "use strict";
4944
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Evaluator_1 = __webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nconst EditFormUtils = {\n sortAndFilterComponents(components) {\n return lodash_1.default.filter(lodash_1.default.sortBy(components, 'weight'), (item) => !item.ignore);\n },\n unifyComponents(objValue, srcValue) {\n if (objValue.key && srcValue.key) {\n if (objValue.skipMerge || srcValue.skipMerge) {\n return false;\n }\n if (objValue.key === srcValue.key) {\n // Create complete objects by including missing keys.\n lodash_1.default.each(objValue, (value, prop) => {\n if (objValue.overrideEditForm || !srcValue.hasOwnProperty(prop)) {\n srcValue[prop] = value;\n }\n });\n lodash_1.default.each(srcValue, (value, prop) => {\n if (srcValue.overrideEditForm || !objValue.hasOwnProperty(prop)) {\n objValue[prop] = value;\n }\n });\n if (objValue.components) {\n srcValue.components = EditFormUtils.sortAndFilterComponents(lodash_1.default.unionWith(objValue.components, srcValue.components, EditFormUtils.unifyComponents));\n }\n return true;\n }\n else {\n return false;\n }\n }\n return lodash_1.default.isEqual(objValue, srcValue);\n },\n logicVariablesTable(additional) {\n additional = additional || '';\n return {\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '<p>The following variables are available in all scripts.</p>' +\n '<table class=\"table table-bordered table-condensed table-striped\">' +\n additional +\n '<tr><th>form</th><td>The complete form JSON object</td></tr>' +\n '<tr><th>submission</th><td>The complete submission object.</td></tr>' +\n '<tr><th>data</th><td>The complete submission data object.</td></tr>' +\n '<tr><th>row</th><td>Contextual \"row\" data, used within DataGrid, EditGrid, and Container components</td></tr>' +\n '<tr><th>component</th><td>The current component JSON</td></tr>' +\n '<tr><th>instance</th><td>The current component instance.</td></tr>' +\n '<tr><th>value</th><td>The current value of the component.</td></tr>' +\n '<tr><th>moment</th><td>The moment.js library for date manipulation.</td></tr>' +\n '<tr><th>_</th><td>An instance of <a href=\"https://lodash.com/docs/\" target=\"_blank\" rel=\"noopener noreferrer\">Lodash</a>.</td></tr>' +\n '<tr><th>utils</th><td>An instance of the <a href=\"https://help.form.io/developers/javascript-development/javascript-utilities\" target=\"_blank\" rel=\"noopener noreferrer\">FormioUtils</a> object.</td></tr>' +\n '<tr><th>util</th><td>An alias for \"utils\".</td></tr>' +\n '</table><br/>'\n /* eslint-enable prefer-template */\n };\n },\n javaScriptValue(title, property, propertyJSON, weight, exampleHTML, exampleJSON, additionalParams = '', excludeJSONLogic) {\n const components = [\n this.logicVariablesTable(additionalParams),\n {\n type: 'panel',\n title: 'JavaScript',\n collapsible: true,\n collapsed: false,\n style: { 'margin-bottom': '10px' },\n key: `${property}-js`,\n customConditional() {\n return !Evaluator_1.Evaluator.noeval || Evaluator_1.Evaluator.protectedEval;\n },\n components: [\n {\n type: 'textarea',\n key: property,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n },\n {\n type: 'htmlelement',\n tag: 'div',\n content: `<p>Enter custom javascript code.</p>${exampleHTML}`\n }\n ]\n },\n {\n type: 'panel',\n title: 'JSONLogic',\n collapsible: true,\n collapsed: true,\n key: `${property}-json`,\n components: [\n {\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '<p>Execute custom logic using <a href=\"http://jsonlogic.com/\" target=\"_blank\" rel=\"noopener noreferrer\">JSONLogic</a>.</p>' +\n '<p>Full <a href=\"https://lodash.com/docs\" target=\"_blank\" rel=\"noopener noreferrer\">Lodash</a> support is provided using an \"_\" before each operation, such as <code>{\"_sum\": {var: \"data.a\"}}</code></p>' +\n exampleJSON\n /* eslint-enable prefer-template */\n },\n {\n type: 'textarea',\n key: propertyJSON,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'json',\n input: true\n }\n ]\n }\n ];\n if (excludeJSONLogic) {\n components.splice(2, 1);\n }\n return {\n type: 'panel',\n title: title,\n theme: 'default',\n collapsible: true,\n collapsed: true,\n key: `${property}Panel`,\n weight: weight,\n components\n };\n }\n};\nexports[\"default\"] = EditFormUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/utils.js?");
4944
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst Evaluator_1 = __webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nconst EditFormUtils = {\n sortAndFilterComponents(components) {\n return lodash_1.default.filter(lodash_1.default.sortBy(components, 'weight'), (item) => !item.ignore);\n },\n unifyComponents(objValue, srcValue) {\n if (objValue.key && srcValue.key) {\n if (objValue.skipMerge || srcValue.skipMerge) {\n return false;\n }\n if (objValue.key === srcValue.key) {\n // Create complete objects by including missing keys.\n lodash_1.default.each(objValue, (value, prop) => {\n if (objValue.overrideEditForm || !srcValue.hasOwnProperty(prop)) {\n srcValue[prop] = value;\n }\n });\n lodash_1.default.each(srcValue, (value, prop) => {\n if (srcValue.overrideEditForm || !objValue.hasOwnProperty(prop)) {\n objValue[prop] = value;\n }\n });\n if (objValue.components) {\n srcValue.components = EditFormUtils.sortAndFilterComponents(lodash_1.default.unionWith(objValue.components, srcValue.components, EditFormUtils.unifyComponents));\n }\n return true;\n }\n else {\n return false;\n }\n }\n return lodash_1.default.isEqual(objValue, srcValue);\n },\n tokenVariableDescription() {\n return '<tr><th>token</th><td>The decoded JWT token for the authenticated user.</td></tr>';\n },\n logicVariablesTable(additional) {\n additional = additional || '';\n return {\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '<p>The following variables are available in all scripts.</p>' +\n '<table class=\"table table-bordered table-condensed table-striped\">' +\n additional +\n '<tr><th>form</th><td>The complete form JSON object</td></tr>' +\n '<tr><th>submission</th><td>The complete submission object.</td></tr>' +\n '<tr><th>data</th><td>The complete submission data object.</td></tr>' +\n '<tr><th>row</th><td>Contextual \"row\" data, used within DataGrid, EditGrid, and Container components</td></tr>' +\n '<tr><th>component</th><td>The current component JSON</td></tr>' +\n '<tr><th>instance</th><td>The current component instance.</td></tr>' +\n '<tr><th>value</th><td>The current value of the component.</td></tr>' +\n '<tr><th>moment</th><td>The moment.js library for date manipulation.</td></tr>' +\n '<tr><th>_</th><td>An instance of <a href=\"https://lodash.com/docs/\" target=\"_blank\" rel=\"noopener noreferrer\">Lodash</a>.</td></tr>' +\n '<tr><th>utils</th><td>An instance of the <a href=\"https://help.form.io/developers/javascript-development/javascript-utilities\" target=\"_blank\" rel=\"noopener noreferrer\">FormioUtils</a> object.</td></tr>' +\n '<tr><th>util</th><td>An alias for \"utils\".</td></tr>' +\n '</table><br/>'\n /* eslint-enable prefer-template */\n };\n },\n javaScriptValue(title, property, propertyJSON, weight, exampleHTML, exampleJSON, additionalParams = '', excludeJSONLogic) {\n const components = [\n this.logicVariablesTable(additionalParams),\n {\n type: 'panel',\n title: 'JavaScript',\n collapsible: true,\n collapsed: false,\n style: { 'margin-bottom': '10px' },\n key: `${property}-js`,\n customConditional() {\n return !Evaluator_1.Evaluator.noeval || Evaluator_1.Evaluator.protectedEval;\n },\n components: [\n {\n type: 'textarea',\n key: property,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n },\n {\n type: 'htmlelement',\n tag: 'div',\n content: `<p>Enter custom javascript code.</p>${exampleHTML}`\n }\n ]\n },\n {\n type: 'panel',\n title: 'JSONLogic',\n collapsible: true,\n collapsed: true,\n key: `${property}-json`,\n components: [\n {\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '<p>Execute custom logic using <a href=\"http://jsonlogic.com/\" target=\"_blank\" rel=\"noopener noreferrer\">JSONLogic</a>.</p>' +\n '<p>Full <a href=\"https://lodash.com/docs\" target=\"_blank\" rel=\"noopener noreferrer\">Lodash</a> support is provided using an \"_\" before each operation, such as <code>{\"_sum\": {var: \"data.a\"}}</code></p>' +\n exampleJSON\n /* eslint-enable prefer-template */\n },\n {\n type: 'textarea',\n key: propertyJSON,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'json',\n input: true\n }\n ]\n }\n ];\n if (excludeJSONLogic) {\n components.splice(2, 1);\n }\n return {\n type: 'panel',\n title: title,\n theme: 'default',\n collapsible: true,\n collapsed: true,\n key: `${property}Panel`,\n weight: weight,\n components\n };\n }\n};\nexports[\"default\"] = EditFormUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/component/editForm/utils.js?");
4945
4945
 
4946
4946
  /***/ }),
4947
4947