@formio/js 5.1.0-dev.5992.ff65eb8 → 5.1.0-dev.6000.fab85ea

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.
@@ -5029,7 +5029,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
5029
5029
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
5030
5030
 
5031
5031
  "use strict";
5032
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst NestedComponent_1 = __importDefault(__webpack_require__(/*! ../nested/NestedComponent */ \"./lib/cjs/components/_classes/nested/NestedComponent.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nclass NestedDataComponent extends NestedComponent_1.default {\n hasChanged(newValue, oldValue) {\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined &&\n newValue !== null &&\n !this.hasValue()) {\n return true;\n }\n return !lodash_1.default.isEqual(newValue, oldValue);\n }\n static savedValueTypes(schema) {\n return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];\n }\n get allowData() {\n return true;\n }\n get emptyValue() {\n return {};\n }\n componentContext() {\n return this.dataValue;\n }\n getValueAsString(value, options) {\n if (options === null || options === void 0 ? void 0 : options.email) {\n let result = (`\n <table border=\"1\" style=\"width:100%\">\n <tbody>\n `);\n this.everyComponent((component) => {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += (`\n <tr>\n <th style=\"padding: 5px 10px;\">${component.label}</th>\n <td style=\"width:100%;padding:5px 10px;\">${component.getView(component.dataValue, options)}</td>\n </tr>\n `);\n }\n }, Object.assign(Object.assign({}, options), { fromRoot: true }));\n result += (`\n </tbody>\n </table>\n `);\n return result;\n }\n if (lodash_1.default.isEmpty(value)) {\n return '';\n }\n if (options === null || options === void 0 ? void 0 : options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n return '[Complex Data]';\n }\n getDataValueAsTable(value, options) {\n let result = (`\n <table border=\"1\" style=\"width:100%\">\n <tbody>\n `);\n const htmlTagRegExp = new RegExp('<(.*?)>');\n this.everyComponent((component) => {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n const componentValue = component.getView(component.dataValue, options);\n result += (`\n <tr>\n <th style=\"padding: 5px 10px;\">${component.label}</th>\n <td style=\"width:100%;padding:5px 10px;\">${component.component && component.component.inputFormat === 'html' && htmlTagRegExp.test(componentValue)\n ? componentValue\n : `<input type=\"text\" value=\"${componentValue.replace(/\"/g, '&quot;')}\" readonly/>`}</td>\n </tr>\n `);\n }\n }, Object.assign(Object.assign({}, options), { fromRoot: true }));\n result += (`\n </tbody>\n </table>\n `);\n return result;\n }\n everyComponent(fn, options = {}) {\n if (options === null || options === void 0 ? void 0 : options.email) {\n if (options.fromRoot) {\n delete options.fromRoot;\n }\n else {\n return;\n }\n }\n return super.everyComponent(fn, options);\n }\n /**\n * Get the value of this component.\n * @returns {any} - Return the value of this component.\n */\n getValue() {\n return this.dataValue;\n }\n updateValue(value, flags = {}) {\n // Intentionally skip over nested component updateValue method to keep\n // recursive update from occurring with sub components.\n return Component_1.default.prototype.updateValue.call(this, value, flags);\n }\n setValue(value, flags = {}) {\n let changed = false;\n const hasValue = this.hasValue();\n if (hasValue && lodash_1.default.isEmpty(this.dataValue)) {\n flags.noValidate = true;\n }\n if (!value || !lodash_1.default.isObject(value) || !hasValue) {\n changed = true;\n this.dataValue = this.defaultValue;\n }\n changed = super.setValue(value, flags) || changed;\n this.updateOnChange(flags, changed);\n return changed;\n }\n}\nexports[\"default\"] = NestedDataComponent;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/nesteddata/NestedDataComponent.js?");
5032
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst Component_1 = __importDefault(__webpack_require__(/*! ../component/Component */ \"./lib/cjs/components/_classes/component/Component.js\"));\nconst NestedComponent_1 = __importDefault(__webpack_require__(/*! ../nested/NestedComponent */ \"./lib/cjs/components/_classes/nested/NestedComponent.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ../../../utils/utils */ \"./lib/cjs/utils/utils.js\");\nclass NestedDataComponent extends NestedComponent_1.default {\n hasChanged(newValue, oldValue) {\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined &&\n newValue !== null &&\n !this.hasValue()) {\n return true;\n }\n return !lodash_1.default.isEqual(newValue, oldValue);\n }\n static savedValueTypes(schema) {\n return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];\n }\n get allowData() {\n return true;\n }\n get emptyValue() {\n return {};\n }\n get shouldAddDefaultValue() {\n return !this.options.noDefaults || !this.options.server;\n }\n componentContext() {\n return this.dataValue;\n }\n getValueAsString(value, options) {\n if (options === null || options === void 0 ? void 0 : options.email) {\n let result = (`\n <table border=\"1\" style=\"width:100%\">\n <tbody>\n `);\n this.everyComponent((component) => {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += (`\n <tr>\n <th style=\"padding: 5px 10px;\">${component.label}</th>\n <td style=\"width:100%;padding:5px 10px;\">${component.getView(component.dataValue, options)}</td>\n </tr>\n `);\n }\n }, Object.assign(Object.assign({}, options), { fromRoot: true }));\n result += (`\n </tbody>\n </table>\n `);\n return result;\n }\n if (lodash_1.default.isEmpty(value)) {\n return '';\n }\n if (options === null || options === void 0 ? void 0 : options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n return '[Complex Data]';\n }\n getDataValueAsTable(value, options) {\n let result = (`\n <table border=\"1\" style=\"width:100%\">\n <tbody>\n `);\n const htmlTagRegExp = new RegExp('<(.*?)>');\n this.everyComponent((component) => {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n const componentValue = component.getView(component.dataValue, options);\n result += (`\n <tr>\n <th style=\"padding: 5px 10px;\">${component.label}</th>\n <td style=\"width:100%;padding:5px 10px;\">${component.component && component.component.inputFormat === 'html' && htmlTagRegExp.test(componentValue)\n ? componentValue\n : `<input type=\"text\" value=\"${componentValue.replace(/\"/g, '&quot;')}\" readonly/>`}</td>\n </tr>\n `);\n }\n }, Object.assign(Object.assign({}, options), { fromRoot: true }));\n result += (`\n </tbody>\n </table>\n `);\n return result;\n }\n everyComponent(fn, options = {}) {\n if (options === null || options === void 0 ? void 0 : options.email) {\n if (options.fromRoot) {\n delete options.fromRoot;\n }\n else {\n return;\n }\n }\n return super.everyComponent(fn, options);\n }\n /**\n * Get the value of this component.\n * @returns {any} - Return the value of this component.\n */\n getValue() {\n return this.dataValue;\n }\n updateValue(value, flags = {}) {\n // Intentionally skip over nested component updateValue method to keep\n // recursive update from occurring with sub components.\n return Component_1.default.prototype.updateValue.call(this, value, flags);\n }\n setValue(value, flags = {}) {\n let changed = false;\n const hasValue = this.hasValue();\n if (hasValue && lodash_1.default.isEmpty(this.dataValue)) {\n flags.noValidate = true;\n }\n if (!value || !lodash_1.default.isObject(value) || !hasValue) {\n changed = true;\n this.dataValue = this.defaultValue;\n }\n changed = super.setValue(value, flags) || changed;\n this.updateOnChange(flags, changed);\n return changed;\n }\n}\nexports[\"default\"] = NestedDataComponent;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/components/_classes/nesteddata/NestedDataComponent.js?");
5033
5033
 
5034
5034
  /***/ }),
5035
5035