@formio/js 5.2.3 → 5.2.4

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.
Files changed (66) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +22 -22
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +24 -24
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +3 -3
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +1 -1
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  16. package/lib/cjs/Element.js +6 -3
  17. package/lib/cjs/Embed.js +3 -2
  18. package/lib/cjs/Formio.js +1 -1
  19. package/lib/cjs/Webform.js +4 -2
  20. package/lib/cjs/WebformBuilder.js +8 -4
  21. package/lib/cjs/Wizard.js +3 -3
  22. package/lib/cjs/components/_classes/component/Component.js +19 -11
  23. package/lib/cjs/components/address/Address.js +7 -5
  24. package/lib/cjs/components/button/Button.js +21 -15
  25. package/lib/cjs/components/datagrid/DataGrid.js +6 -5
  26. package/lib/cjs/components/datamap/DataMap.js +4 -2
  27. package/lib/cjs/components/day/Day.js +2 -1
  28. package/lib/cjs/components/editgrid/EditGrid.js +10 -8
  29. package/lib/cjs/components/file/File.js +11 -6
  30. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +37 -16
  31. package/lib/cjs/components/file/editForm/File.edit.file.js +78 -25
  32. package/lib/cjs/components/form/Form.js +10 -4
  33. package/lib/cjs/components/radio/Radio.js +6 -3
  34. package/lib/cjs/components/recaptcha/ReCaptcha.js +5 -3
  35. package/lib/cjs/components/select/Select.js +12 -1
  36. package/lib/cjs/components/selectboxes/SelectBoxes.js +5 -2
  37. package/lib/cjs/components/signature/Signature.js +2 -1
  38. package/lib/cjs/components/table/Table.js +2 -1
  39. package/lib/cjs/components/tabs/Tabs.js +2 -1
  40. package/lib/cjs/package.json +1 -1
  41. package/lib/mjs/Element.js +3 -3
  42. package/lib/mjs/Embed.js +2 -2
  43. package/lib/mjs/Formio.js +1 -1
  44. package/lib/mjs/Webform.js +2 -2
  45. package/lib/mjs/WebformBuilder.js +4 -4
  46. package/lib/mjs/Wizard.js +1 -1
  47. package/lib/mjs/components/_classes/component/Component.js +10 -10
  48. package/lib/mjs/components/address/Address.js +3 -3
  49. package/lib/mjs/components/button/Button.js +15 -15
  50. package/lib/mjs/components/datagrid/DataGrid.js +4 -4
  51. package/lib/mjs/components/datamap/DataMap.js +2 -2
  52. package/lib/mjs/components/day/Day.js +1 -1
  53. package/lib/mjs/components/editgrid/EditGrid.js +5 -5
  54. package/lib/mjs/components/file/File.js +6 -6
  55. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +37 -16
  56. package/lib/mjs/components/file/editForm/File.edit.file.js +78 -25
  57. package/lib/mjs/components/form/Form.js +7 -4
  58. package/lib/mjs/components/radio/Radio.js +3 -3
  59. package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -3
  60. package/lib/mjs/components/select/Select.js +12 -1
  61. package/lib/mjs/components/selectboxes/SelectBoxes.js +4 -2
  62. package/lib/mjs/components/signature/Signature.js +1 -1
  63. package/lib/mjs/components/table/Table.js +1 -1
  64. package/lib/mjs/components/tabs/Tabs.js +1 -1
  65. package/lib/mjs/package.json +1 -1
  66. package/package.json +2 -2
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
22
22
 
23
- /*! formiojs v5.2.3 | https://unpkg.com/formiojs@5.2.3/LICENSE.txt */
23
+ /*! formiojs v5.2.4 | https://unpkg.com/formiojs@5.2.4/LICENSE.txt */
24
24
 
25
25
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
26
26
 
@@ -1784,7 +1784,7 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
1784
1784
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1785
1785
 
1786
1786
  "use strict";
1787
- eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.filterProcessInfo = exports.filterPostProcess = exports.filterPostProcessSync = exports.filterProcess = exports.filterProcessSync = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst lodash_2 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst filterProcessSync = (context) => {\n const { scope, path, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value !== undefined) {\n scope.filter[path] = true;\n }\n};\nexports.filterProcessSync = filterProcessSync;\nconst filterProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterProcessSync)(context);\n});\nexports.filterProcess = filterProcess;\nconst filterPostProcessSync = (context) => {\n const { scope, path, data, component, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value === undefined || !scope.filter[path]) {\n return;\n }\n scope.filtered = scope.filtered || {};\n const modelType = (0, formUtil_1.getModelType)(component);\n if (component.type === 'address' ||\n (modelType !== 'dataObject' &&\n modelType !== 'nestedArray' &&\n modelType !== 'nestedDataArray' &&\n modelType !== 'object')) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n if (modelType === 'dataObject') {\n (0, lodash_1.set)(data, `${path}.data`, (0, lodash_2.get)(scope.filtered, `${path}.data`, (value === null || value === void 0 ? void 0 : value.data) || {}));\n (0, lodash_1.set)(scope.filtered, path, (0, lodash_2.get)(data, path));\n }\n else if (modelType === 'nestedDataArray') {\n const filtered = (0, lodash_2.get)(scope.filtered, path, []);\n (0, lodash_1.set)(scope.filtered, path, value.map((item, index) => {\n var _a;\n return Object.assign(Object.assign({}, item), { data: ((_a = filtered[index]) === null || _a === void 0 ? void 0 : _a.data) || {} });\n }));\n }\n else if (!(0, lodash_1.has)(scope.filtered, path)) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n (0, lodash_1.set)(data, path, (0, lodash_2.get)(scope.filtered, path, value));\n }\n }\n};\nexports.filterPostProcessSync = filterPostProcessSync;\nconst filterPostProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterPostProcessSync)(context);\n});\nexports.filterPostProcess = filterPostProcess;\nexports.filterProcessInfo = {\n name: 'filter',\n process: exports.filterProcess,\n processSync: exports.filterProcessSync,\n postProcess: exports.filterPostProcess,\n postProcessSync: exports.filterPostProcessSync,\n shouldProcess: () => true,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/filter/index.js?\n}");
1787
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.filterProcessInfo = exports.filterPostProcess = exports.filterPostProcessSync = exports.filterProcess = exports.filterProcessSync = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst lodash_2 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst filterProcessSync = (context) => {\n const { scope, path, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value !== undefined) {\n scope.filter[path] = true;\n }\n};\nexports.filterProcessSync = filterProcessSync;\nconst filterProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterProcessSync)(context);\n});\nexports.filterProcess = filterProcess;\nconst filterPostProcessSync = (context) => {\n const { scope, path, data, component, value } = context;\n scope.filtered = scope.filtered || {};\n if (!scope.filter)\n scope.filter = {};\n if (value === undefined || !scope.filter[path]) {\n return;\n }\n const modelType = (0, formUtil_1.getModelType)(component);\n if (component.type === 'address' ||\n (modelType !== 'dataObject' &&\n modelType !== 'nestedArray' &&\n modelType !== 'nestedDataArray' &&\n modelType !== 'object')) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n if (modelType === 'dataObject') {\n (0, lodash_1.set)(data, `${path}.data`, (0, lodash_2.get)(scope.filtered, `${path}.data`, (value === null || value === void 0 ? void 0 : value.data) || {}));\n (0, lodash_1.set)(scope.filtered, path, (0, lodash_2.get)(data, path));\n }\n else if (modelType === 'nestedDataArray') {\n const filtered = (0, lodash_2.get)(scope.filtered, path, []);\n (0, lodash_1.set)(scope.filtered, path, value.map((item, index) => {\n var _a;\n return Object.assign(Object.assign({}, item), { data: ((_a = filtered[index]) === null || _a === void 0 ? void 0 : _a.data) || {} });\n }));\n }\n else if (!(0, lodash_1.has)(scope.filtered, path)) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n (0, lodash_1.set)(data, path, (0, lodash_2.get)(scope.filtered, path, value));\n }\n }\n};\nexports.filterPostProcessSync = filterPostProcessSync;\nconst filterPostProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterPostProcessSync)(context);\n});\nexports.filterPostProcess = filterPostProcess;\nexports.filterProcessInfo = {\n name: 'filter',\n process: exports.filterProcess,\n processSync: exports.filterProcessSync,\n postProcess: exports.filterPostProcess,\n postProcessSync: exports.filterPostProcessSync,\n shouldProcess: () => true,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/filter/index.js?\n}");
1788
1788
 
1789
1789
  /***/ }),
1790
1790