@formio/js 5.0.0-rc.27 → 5.0.0-rc.29
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.
- package/dist/fonts/bootstrap-icons.woff +0 -0
- package/dist/fonts/bootstrap-icons.woff2 +0 -0
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +957 -2270
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +4 -2
- package/dist/formio.full.css +100 -3
- package/dist/formio.full.js +961 -2231
- package/dist/formio.full.min.css +2 -2
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +4 -2
- package/dist/formio.js +101 -1966
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -3
- package/dist/formio.utils.js +145 -104
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +4 -2
- package/lib/cjs/CDN.d.ts +1 -1
- package/lib/cjs/CDN.js +2 -2
- package/lib/cjs/Embed.d.ts +16 -7
- package/lib/cjs/Embed.js +76 -24
- package/lib/cjs/Formio.d.ts +0 -1
- package/lib/cjs/Formio.js +27 -19
- package/lib/cjs/PDF.js +2 -2
- package/lib/cjs/Webform.d.ts +6 -9
- package/lib/cjs/Webform.js +59 -81
- package/lib/cjs/WebformBuilder.d.ts +1 -1
- package/lib/cjs/WebformBuilder.js +33 -16
- package/lib/cjs/Wizard.d.ts +5 -4
- package/lib/cjs/Wizard.js +37 -26
- package/lib/cjs/WizardBuilder.d.ts +1 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
- package/lib/cjs/addons/index.d.ts +1 -0
- package/lib/cjs/addons/index.js +5 -1
- package/lib/cjs/components/Components.d.ts +7 -0
- package/lib/cjs/components/Components.js +30 -0
- package/lib/cjs/components/_classes/component/Component.d.ts +57 -27
- package/lib/cjs/components/_classes/component/Component.js +193 -119
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +28 -11
- package/lib/cjs/components/_classes/nested/NestedComponent.js +88 -57
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +17 -4
- package/lib/cjs/components/builder.js +0 -2
- package/lib/cjs/components/button/Button.js +2 -1
- package/lib/cjs/components/columns/Columns.d.ts +1 -0
- package/lib/cjs/components/columns/Columns.js +2 -3
- package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
- package/lib/cjs/components/columns/editForm/Columns.edit.display.js +23 -1
- package/lib/cjs/components/container/Container.d.ts +1 -0
- package/lib/cjs/components/container/Container.js +2 -6
- package/lib/cjs/components/content/Content.d.ts +1 -0
- package/lib/cjs/components/content/Content.js +1 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -8
- package/lib/cjs/components/datagrid/DataGrid.js +9 -26
- package/lib/cjs/components/datamap/DataMap.js +2 -1
- package/lib/cjs/components/datetime/DateTime.js +0 -2
- package/lib/cjs/components/day/Day.js +2 -3
- package/lib/cjs/components/editgrid/EditGrid.d.ts +8 -4
- package/lib/cjs/components/editgrid/EditGrid.js +96 -73
- package/lib/cjs/components/email/Email.js +0 -1
- package/lib/cjs/components/file/File.js +1 -1
- package/lib/cjs/components/file/fixtures/comp3.d.ts +29 -0
- package/lib/cjs/components/file/fixtures/comp3.js +31 -0
- package/lib/cjs/components/form/Form.d.ts +2 -6
- package/lib/cjs/components/form/Form.js +43 -14
- package/lib/cjs/components/index.d.ts +0 -2
- package/lib/cjs/components/index.js +0 -2
- package/lib/cjs/components/number/Number.d.ts +1 -2
- package/lib/cjs/components/number/Number.js +5 -6
- package/lib/cjs/components/panel/Panel.d.ts +0 -1
- package/lib/cjs/components/panel/Panel.js +2 -9
- package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
- package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -16
- package/lib/cjs/components/phonenumber/PhoneNumber.js +17 -0
- package/lib/cjs/components/radio/Radio.js +0 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/cjs/components/select/Select.js +3 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +31 -2
- package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
- package/lib/cjs/components/textfield/TextField.js +20 -6
- package/lib/cjs/components/time/Time.js +0 -6
- package/lib/cjs/components/url/Url.js +0 -1
- package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +25 -2
- package/lib/cjs/components/well/editForm/Well.edit.display.js +18 -0
- package/lib/cjs/formio.embed.js +5 -3
- package/lib/cjs/formio.form.d.ts +1 -7
- package/lib/cjs/formio.form.js +3 -38
- package/lib/cjs/index.d.ts +2 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/providers/Providers.d.ts +0 -4
- package/lib/cjs/providers/storage/azure.d.ts +0 -2
- package/lib/cjs/providers/storage/azure.js +1 -6
- package/lib/cjs/providers/storage/googleDrive.d.ts +0 -1
- package/lib/cjs/providers/storage/googleDrive.js +0 -4
- package/lib/cjs/providers/storage/s3.d.ts +0 -1
- package/lib/cjs/providers/storage/s3.js +0 -4
- package/lib/cjs/templates/Templates.d.ts +1 -11
- package/lib/cjs/templates/Templates.js +4 -41
- package/lib/cjs/translations/en.d.ts +5 -0
- package/lib/cjs/translations/en.js +5 -0
- package/lib/cjs/utils/formUtils.js +1 -0
- package/lib/cjs/utils/index.d.ts +1 -0
- package/lib/cjs/utils/index.js +2 -0
- package/lib/cjs/utils/utils.d.ts +2 -1
- package/lib/cjs/utils/utils.js +27 -9
- package/lib/mjs/CDN.d.ts +1 -1
- package/lib/mjs/CDN.js +2 -2
- package/lib/mjs/Embed.d.ts +16 -7
- package/lib/mjs/Embed.js +75 -18
- package/lib/mjs/Formio.d.ts +0 -1
- package/lib/mjs/Formio.js +11 -3
- package/lib/mjs/PDF.js +2 -2
- package/lib/mjs/Webform.d.ts +6 -9
- package/lib/mjs/Webform.js +58 -82
- package/lib/mjs/WebformBuilder.d.ts +1 -1
- package/lib/mjs/WebformBuilder.js +31 -10
- package/lib/mjs/Wizard.d.ts +5 -4
- package/lib/mjs/Wizard.js +36 -27
- package/lib/mjs/WizardBuilder.d.ts +1 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
- package/lib/mjs/addons/index.d.ts +1 -0
- package/lib/mjs/addons/index.js +5 -1
- package/lib/mjs/components/Components.d.ts +7 -0
- package/lib/mjs/components/Components.js +29 -0
- package/lib/mjs/components/_classes/component/Component.d.ts +57 -27
- package/lib/mjs/components/_classes/component/Component.js +191 -118
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +28 -11
- package/lib/mjs/components/_classes/nested/NestedComponent.js +88 -57
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +18 -5
- package/lib/mjs/components/builder.js +0 -2
- package/lib/mjs/components/button/Button.js +2 -1
- package/lib/mjs/components/columns/Columns.d.ts +1 -0
- package/lib/mjs/components/columns/Columns.js +2 -3
- package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
- package/lib/mjs/components/columns/editForm/Columns.edit.display.js +23 -1
- package/lib/mjs/components/container/Container.d.ts +1 -0
- package/lib/mjs/components/container/Container.js +2 -6
- package/lib/mjs/components/content/Content.d.ts +1 -0
- package/lib/mjs/components/content/Content.js +1 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -8
- package/lib/mjs/components/datagrid/DataGrid.js +9 -26
- package/lib/mjs/components/datamap/DataMap.js +2 -1
- package/lib/mjs/components/datetime/DateTime.js +0 -2
- package/lib/mjs/components/day/Day.js +2 -3
- package/lib/mjs/components/editgrid/EditGrid.d.ts +8 -4
- package/lib/mjs/components/editgrid/EditGrid.js +97 -76
- package/lib/mjs/components/email/Email.js +0 -1
- package/lib/mjs/components/file/File.js +1 -1
- package/lib/mjs/components/file/fixtures/comp3.d.ts +29 -0
- package/lib/mjs/components/file/fixtures/comp3.js +29 -0
- package/lib/mjs/components/form/Form.d.ts +2 -6
- package/lib/mjs/components/form/Form.js +45 -14
- package/lib/mjs/components/index.d.ts +0 -2
- package/lib/mjs/components/index.js +0 -2
- package/lib/mjs/components/number/Number.d.ts +1 -2
- package/lib/mjs/components/number/Number.js +4 -5
- package/lib/mjs/components/panel/Panel.d.ts +0 -1
- package/lib/mjs/components/panel/Panel.js +3 -9
- package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
- package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -16
- package/lib/mjs/components/phonenumber/PhoneNumber.js +17 -0
- package/lib/mjs/components/radio/Radio.js +0 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/mjs/components/select/Select.js +3 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +31 -2
- package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
- package/lib/mjs/components/textfield/TextField.js +20 -6
- package/lib/mjs/components/time/Time.js +0 -6
- package/lib/mjs/components/url/Url.js +0 -1
- package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +25 -2
- package/lib/mjs/components/well/editForm/Well.edit.display.js +18 -0
- package/lib/mjs/formio.embed.js +5 -3
- package/lib/mjs/formio.form.d.ts +1 -7
- package/lib/mjs/formio.form.js +3 -32
- package/lib/mjs/index.d.ts +2 -1
- package/lib/mjs/index.js +2 -1
- package/lib/mjs/providers/Providers.d.ts +0 -4
- package/lib/mjs/providers/storage/azure.d.ts +0 -2
- package/lib/mjs/providers/storage/azure.js +1 -6
- package/lib/mjs/providers/storage/googleDrive.d.ts +0 -1
- package/lib/mjs/providers/storage/googleDrive.js +0 -4
- package/lib/mjs/providers/storage/s3.d.ts +0 -1
- package/lib/mjs/providers/storage/s3.js +0 -4
- package/lib/mjs/templates/Templates.d.ts +1 -11
- package/lib/mjs/templates/Templates.js +4 -40
- package/lib/mjs/translations/en.d.ts +5 -0
- package/lib/mjs/translations/en.js +5 -0
- package/lib/mjs/utils/formUtils.js +1 -0
- package/lib/mjs/utils/index.d.ts +1 -0
- package/lib/mjs/utils/index.js +1 -0
- package/lib/mjs/utils/utils.d.ts +2 -1
- package/lib/mjs/utils/utils.js +24 -7
- package/package.json +13 -13
- package/lib/cjs/components/tree/Node.d.ts +0 -55
- package/lib/cjs/components/tree/Node.js +0 -185
- package/lib/cjs/components/tree/Tree.d.ts +0 -48
- package/lib/cjs/components/tree/Tree.form.d.ts +0 -3
- package/lib/cjs/components/tree/Tree.form.js +0 -21
- package/lib/cjs/components/tree/Tree.js +0 -383
- package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
- package/lib/cjs/components/tree/editForm/Tree.edit.data.js +0 -9
- package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
- package/lib/cjs/components/tree/editForm/Tree.edit.display.js +0 -12
- package/lib/cjs/components/tree/fixtures/comp1.d.ts +0 -23
- package/lib/cjs/components/tree/fixtures/comp1.js +0 -24
- package/lib/cjs/components/tree/fixtures/comp2.d.ts +0 -116
- package/lib/cjs/components/tree/fixtures/comp2.js +0 -82
- package/lib/cjs/components/tree/fixtures/comp3.d.ts +0 -24
- package/lib/cjs/components/tree/fixtures/comp3.js +0 -25
- package/lib/cjs/components/tree/fixtures/comp4.d.ts +0 -42
- package/lib/cjs/components/tree/fixtures/comp4.js +0 -47
- package/lib/cjs/components/tree/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/tree/fixtures/index.js +0 -14
- package/lib/cjs/validator/Rules.d.ts +0 -53
- package/lib/cjs/validator/Rules.js +0 -22
- package/lib/cjs/validator/Validator.d.ts +0 -228
- package/lib/cjs/validator/Validator.js +0 -1113
- package/lib/cjs/validator/conjunctions/index.d.ts +0 -7
- package/lib/cjs/validator/conjunctions/index.js +0 -18
- package/lib/cjs/validator/operators/index.d.ts +0 -7
- package/lib/cjs/validator/operators/index.js +0 -18
- package/lib/cjs/validator/quickRules/index.d.ts +0 -7
- package/lib/cjs/validator/quickRules/index.js +0 -18
- package/lib/cjs/validator/rules/Custom.d.ts +0 -5
- package/lib/cjs/validator/rules/Custom.js +0 -30
- package/lib/cjs/validator/rules/Date.d.ts +0 -5
- package/lib/cjs/validator/rules/Date.js +0 -25
- package/lib/cjs/validator/rules/Day.d.ts +0 -5
- package/lib/cjs/validator/rules/Day.js +0 -58
- package/lib/cjs/validator/rules/Email.d.ts +0 -5
- package/lib/cjs/validator/rules/Email.js +0 -24
- package/lib/cjs/validator/rules/JSON.d.ts +0 -5
- package/lib/cjs/validator/rules/JSON.js +0 -29
- package/lib/cjs/validator/rules/Mask.d.ts +0 -5
- package/lib/cjs/validator/rules/Mask.js +0 -32
- package/lib/cjs/validator/rules/Max.d.ts +0 -5
- package/lib/cjs/validator/rules/Max.js +0 -21
- package/lib/cjs/validator/rules/MaxDate.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxDate.js +0 -34
- package/lib/cjs/validator/rules/MaxLength.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxLength.js +0 -20
- package/lib/cjs/validator/rules/MaxWords.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxWords.js +0 -20
- package/lib/cjs/validator/rules/MaxYear.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxYear.js +0 -22
- package/lib/cjs/validator/rules/Min.d.ts +0 -5
- package/lib/cjs/validator/rules/Min.js +0 -21
- package/lib/cjs/validator/rules/MinDate.d.ts +0 -5
- package/lib/cjs/validator/rules/MinDate.js +0 -30
- package/lib/cjs/validator/rules/MinLength.d.ts +0 -5
- package/lib/cjs/validator/rules/MinLength.js +0 -20
- package/lib/cjs/validator/rules/MinWords.d.ts +0 -5
- package/lib/cjs/validator/rules/MinWords.js +0 -20
- package/lib/cjs/validator/rules/MinYear.d.ts +0 -5
- package/lib/cjs/validator/rules/MinYear.js +0 -22
- package/lib/cjs/validator/rules/Pattern.d.ts +0 -5
- package/lib/cjs/validator/rules/Pattern.js +0 -20
- package/lib/cjs/validator/rules/Required.d.ts +0 -5
- package/lib/cjs/validator/rules/Required.js +0 -17
- package/lib/cjs/validator/rules/Rule.d.ts +0 -7
- package/lib/cjs/validator/rules/Rule.js +0 -12
- package/lib/cjs/validator/rules/Select.d.ts +0 -5
- package/lib/cjs/validator/rules/Select.js +0 -95
- package/lib/cjs/validator/rules/Time.d.ts +0 -5
- package/lib/cjs/validator/rules/Time.js +0 -19
- package/lib/cjs/validator/rules/Unique.d.ts +0 -5
- package/lib/cjs/validator/rules/Unique.js +0 -69
- package/lib/cjs/validator/rules/Url.d.ts +0 -5
- package/lib/cjs/validator/rules/Url.js +0 -23
- package/lib/cjs/validator/rules/index.d.ts +0 -47
- package/lib/cjs/validator/rules/index.js +0 -51
- package/lib/cjs/validator/transformers/index.d.ts +0 -7
- package/lib/cjs/validator/transformers/index.js +0 -18
- package/lib/cjs/validator/valueSources/index.d.ts +0 -7
- package/lib/cjs/validator/valueSources/index.js +0 -18
- package/lib/mjs/components/tree/Node.d.ts +0 -55
- package/lib/mjs/components/tree/Node.js +0 -179
- package/lib/mjs/components/tree/Tree.d.ts +0 -48
- package/lib/mjs/components/tree/Tree.form.d.ts +0 -3
- package/lib/mjs/components/tree/Tree.form.js +0 -15
- package/lib/mjs/components/tree/Tree.js +0 -384
- package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
- package/lib/mjs/components/tree/editForm/Tree.edit.data.js +0 -7
- package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
- package/lib/mjs/components/tree/editForm/Tree.edit.display.js +0 -10
- package/lib/mjs/components/tree/fixtures/comp1.d.ts +0 -23
- package/lib/mjs/components/tree/fixtures/comp1.js +0 -22
- package/lib/mjs/components/tree/fixtures/comp2.d.ts +0 -116
- package/lib/mjs/components/tree/fixtures/comp2.js +0 -80
- package/lib/mjs/components/tree/fixtures/comp3.d.ts +0 -24
- package/lib/mjs/components/tree/fixtures/comp3.js +0 -23
- package/lib/mjs/components/tree/fixtures/comp4.d.ts +0 -42
- package/lib/mjs/components/tree/fixtures/comp4.js +0 -45
- package/lib/mjs/components/tree/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/tree/fixtures/index.js +0 -5
- package/lib/mjs/validator/Rules.d.ts +0 -53
- package/lib/mjs/validator/Rules.js +0 -17
- package/lib/mjs/validator/Validator.d.ts +0 -228
- package/lib/mjs/validator/Validator.js +0 -1103
- package/lib/mjs/validator/conjunctions/index.d.ts +0 -7
- package/lib/mjs/validator/conjunctions/index.js +0 -16
- package/lib/mjs/validator/operators/index.d.ts +0 -7
- package/lib/mjs/validator/operators/index.js +0 -16
- package/lib/mjs/validator/quickRules/index.d.ts +0 -7
- package/lib/mjs/validator/quickRules/index.js +0 -16
- package/lib/mjs/validator/rules/Custom.d.ts +0 -5
- package/lib/mjs/validator/rules/Custom.js +0 -21
- package/lib/mjs/validator/rules/Date.d.ts +0 -5
- package/lib/mjs/validator/rules/Date.js +0 -16
- package/lib/mjs/validator/rules/Day.d.ts +0 -5
- package/lib/mjs/validator/rules/Day.js +0 -49
- package/lib/mjs/validator/rules/Email.d.ts +0 -5
- package/lib/mjs/validator/rules/Email.js +0 -15
- package/lib/mjs/validator/rules/JSON.d.ts +0 -5
- package/lib/mjs/validator/rules/JSON.js +0 -20
- package/lib/mjs/validator/rules/Mask.d.ts +0 -5
- package/lib/mjs/validator/rules/Mask.js +0 -23
- package/lib/mjs/validator/rules/Max.d.ts +0 -5
- package/lib/mjs/validator/rules/Max.js +0 -12
- package/lib/mjs/validator/rules/MaxDate.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxDate.js +0 -25
- package/lib/mjs/validator/rules/MaxLength.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxLength.js +0 -11
- package/lib/mjs/validator/rules/MaxWords.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxWords.js +0 -11
- package/lib/mjs/validator/rules/MaxYear.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxYear.js +0 -13
- package/lib/mjs/validator/rules/Min.d.ts +0 -5
- package/lib/mjs/validator/rules/Min.js +0 -12
- package/lib/mjs/validator/rules/MinDate.d.ts +0 -5
- package/lib/mjs/validator/rules/MinDate.js +0 -21
- package/lib/mjs/validator/rules/MinLength.d.ts +0 -5
- package/lib/mjs/validator/rules/MinLength.js +0 -11
- package/lib/mjs/validator/rules/MinWords.d.ts +0 -5
- package/lib/mjs/validator/rules/MinWords.js +0 -11
- package/lib/mjs/validator/rules/MinYear.d.ts +0 -5
- package/lib/mjs/validator/rules/MinYear.js +0 -13
- package/lib/mjs/validator/rules/Pattern.d.ts +0 -5
- package/lib/mjs/validator/rules/Pattern.js +0 -11
- package/lib/mjs/validator/rules/Required.d.ts +0 -5
- package/lib/mjs/validator/rules/Required.js +0 -8
- package/lib/mjs/validator/rules/Rule.d.ts +0 -7
- package/lib/mjs/validator/rules/Rule.js +0 -9
- package/lib/mjs/validator/rules/Select.d.ts +0 -5
- package/lib/mjs/validator/rules/Select.js +0 -86
- package/lib/mjs/validator/rules/Time.d.ts +0 -5
- package/lib/mjs/validator/rules/Time.js +0 -10
- package/lib/mjs/validator/rules/Unique.d.ts +0 -5
- package/lib/mjs/validator/rules/Unique.js +0 -60
- package/lib/mjs/validator/rules/Url.d.ts +0 -5
- package/lib/mjs/validator/rules/Url.js +0 -14
- package/lib/mjs/validator/rules/index.d.ts +0 -47
- package/lib/mjs/validator/rules/index.js +0 -46
- package/lib/mjs/validator/transformers/index.d.ts +0 -7
- package/lib/mjs/validator/transformers/index.js +0 -16
- package/lib/mjs/validator/valueSources/index.d.ts +0 -7
- package/lib/mjs/validator/valueSources/index.js +0 -16
@@ -29,4 +29,22 @@ exports.default = [
|
|
29
29
|
key: 'tableView',
|
30
30
|
ignore: true
|
31
31
|
},
|
32
|
+
{
|
33
|
+
key: 'hideLabel',
|
34
|
+
ignore: true
|
35
|
+
},
|
36
|
+
{
|
37
|
+
weight: 0,
|
38
|
+
type: 'textfield',
|
39
|
+
input: true,
|
40
|
+
key: 'label',
|
41
|
+
label: 'Label',
|
42
|
+
placeholder: 'Field Label',
|
43
|
+
tooltip: 'The label for this field.',
|
44
|
+
validate: {
|
45
|
+
required: true
|
46
|
+
},
|
47
|
+
autofocus: true,
|
48
|
+
overrideEditForm: true
|
49
|
+
},
|
32
50
|
];
|
package/lib/cjs/formio.embed.js
CHANGED
@@ -26,9 +26,11 @@ if (thisScript) {
|
|
26
26
|
config.formioPath(scriptSrc);
|
27
27
|
}
|
28
28
|
scriptSrc = scriptSrc.join('/');
|
29
|
+
const debug = (query.debug === 'true' || query.debug === '1');
|
30
|
+
const renderer = debug ? 'formio.form' : 'formio.form.min';
|
29
31
|
Embed_1.Formio.config = Object.assign({
|
30
|
-
script: query.script || (`${config.updatePath ? config.updatePath() : scriptSrc}
|
31
|
-
style: query.styles || (`${config.updatePath ? config.updatePath() : scriptSrc}
|
32
|
+
script: query.script || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.js`),
|
33
|
+
style: query.styles || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.css`),
|
32
34
|
cdn: query.cdn,
|
33
35
|
class: (query.class || 'formio-form-wrapper'),
|
34
36
|
src: query.src,
|
@@ -39,7 +41,7 @@ if (thisScript) {
|
|
39
41
|
submit: query.submit,
|
40
42
|
includeLibs: (query.libs === 'true' || query.libs === '1'),
|
41
43
|
template: query.template,
|
42
|
-
debug:
|
44
|
+
debug: debug,
|
43
45
|
config: {},
|
44
46
|
redirect: (query.return || query.redirect),
|
45
47
|
embedCSS: (`${config.updatePath ? config.updatePath() : scriptSrc}/formio.embed.css`),
|
package/lib/cjs/formio.form.d.ts
CHANGED
@@ -8,16 +8,10 @@ export function useModule(defaultFn?: null): (plugins: any, options?: {}) => voi
|
|
8
8
|
import Components from './components/Components';
|
9
9
|
import Displays from './displays/Displays';
|
10
10
|
import Providers from './providers';
|
11
|
-
import Rules from './validator/Rules';
|
12
11
|
import Widgets from './widgets';
|
13
12
|
import Templates from './templates/Templates';
|
14
|
-
import Conjunctions from './validator/conjunctions';
|
15
|
-
import Operators from './validator/operators';
|
16
|
-
import QuickRules from './validator/quickRules';
|
17
|
-
import Transformers from './validator/transformers';
|
18
|
-
import ValueSources from './validator/valueSources';
|
19
13
|
import Utils from './utils';
|
20
14
|
import Form from './Form';
|
21
15
|
import { Formio } from './Formio';
|
22
16
|
import Licenses from './licenses';
|
23
|
-
export { Components, Displays, Providers,
|
17
|
+
export { Components, Displays, Providers, Widgets, Templates, Utils, Form, Formio, Licenses };
|
package/lib/cjs/formio.form.js
CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.Licenses = exports.Formio = exports.Form = exports.Utils = exports.
|
6
|
+
exports.Licenses = exports.Formio = exports.Form = exports.Utils = exports.Templates = exports.Widgets = exports.Providers = exports.Displays = exports.Components = exports.useModule = exports.registerModule = void 0;
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
8
8
|
const Formio_1 = require("./Formio");
|
9
9
|
Object.defineProperty(exports, "Formio", { enumerable: true, get: function () { return Formio_1.Formio; } });
|
@@ -16,18 +16,6 @@ const Templates_1 = __importDefault(require("./templates/Templates"));
|
|
16
16
|
exports.Templates = Templates_1.default;
|
17
17
|
const providers_1 = __importDefault(require("./providers"));
|
18
18
|
exports.Providers = providers_1.default;
|
19
|
-
const Rules_1 = __importDefault(require("./validator/Rules"));
|
20
|
-
exports.Rules = Rules_1.default;
|
21
|
-
const conjunctions_1 = __importDefault(require("./validator/conjunctions"));
|
22
|
-
exports.Conjunctions = conjunctions_1.default;
|
23
|
-
const operators_1 = __importDefault(require("./validator/operators"));
|
24
|
-
exports.Operators = operators_1.default;
|
25
|
-
const quickRules_1 = __importDefault(require("./validator/quickRules"));
|
26
|
-
exports.QuickRules = quickRules_1.default;
|
27
|
-
const transformers_1 = __importDefault(require("./validator/transformers"));
|
28
|
-
exports.Transformers = transformers_1.default;
|
29
|
-
const valueSources_1 = __importDefault(require("./validator/valueSources"));
|
30
|
-
exports.ValueSources = valueSources_1.default;
|
31
19
|
const widgets_1 = __importDefault(require("./widgets"));
|
32
20
|
exports.Widgets = widgets_1.default;
|
33
21
|
const Form_1 = __importDefault(require("./Form"));
|
@@ -44,20 +32,15 @@ Formio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalMo
|
|
44
32
|
});
|
45
33
|
};
|
46
34
|
// This is needed to maintain correct imports using the "dist" file.
|
35
|
+
Formio_1.Formio.isRenderer = true;
|
47
36
|
Formio_1.Formio.Components = Components_1.default;
|
48
37
|
Formio_1.Formio.Templates = Templates_1.default;
|
49
38
|
Formio_1.Formio.Utils = utils_1.default;
|
50
39
|
Formio_1.Formio.Form = Form_1.default;
|
51
40
|
Formio_1.Formio.Displays = Displays_1.default;
|
52
41
|
Formio_1.Formio.Providers = providers_1.default;
|
53
|
-
Formio_1.Formio.Rules = Rules_1.default;
|
54
42
|
Formio_1.Formio.Widgets = widgets_1.default;
|
55
43
|
Formio_1.Formio.Evaluator = Evaluator_1.default;
|
56
|
-
Formio_1.Formio.Conjunctions = conjunctions_1.default;
|
57
|
-
Formio_1.Formio.Operators = operators_1.default;
|
58
|
-
Formio_1.Formio.QuickRules = quickRules_1.default;
|
59
|
-
Formio_1.Formio.Transformers = transformers_1.default;
|
60
|
-
Formio_1.Formio.ValueSources = valueSources_1.default;
|
61
44
|
Formio_1.Formio.AllComponents = components_1.default;
|
62
45
|
Formio_1.Formio.Licenses = licenses_1.default;
|
63
46
|
// This is strange, but is needed for "premium" components to import correctly.
|
@@ -106,30 +89,12 @@ function registerModule(mod, defaultFn = null, options = {}) {
|
|
106
89
|
case 'displays':
|
107
90
|
Formio_1.Formio.Displays.addDisplays(mod.displays);
|
108
91
|
break;
|
109
|
-
case 'rules':
|
110
|
-
Formio_1.Formio.Rules.addRules(mod.rules);
|
111
|
-
break;
|
112
92
|
case 'evaluator':
|
113
93
|
Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);
|
114
94
|
break;
|
115
|
-
case 'conjunctions':
|
116
|
-
Formio_1.Formio.Conjunctions.addConjunctions(mod.conjunctions);
|
117
|
-
break;
|
118
|
-
case 'operators':
|
119
|
-
Formio_1.Formio.Operators.addOperators(mod.operators);
|
120
|
-
break;
|
121
|
-
case 'quickRules':
|
122
|
-
Formio_1.Formio.QuickRules.addQuickRules(mod.quickRules);
|
123
|
-
break;
|
124
|
-
case 'transformers':
|
125
|
-
Formio_1.Formio.Transformers.addTransformers(mod.transformers);
|
126
|
-
break;
|
127
|
-
case 'valueSources':
|
128
|
-
Formio_1.Formio.ValueSources.addValueSources(mod.valueSources);
|
129
|
-
break;
|
130
95
|
case 'library':
|
131
96
|
options.license
|
132
|
-
? Formio_1.Formio.Licenses.addLicense(mod.library,
|
97
|
+
? Formio_1.Formio.Licenses.addLicense(mod.library, options.license)
|
133
98
|
: Formio_1.Formio.Licenses.removeLicense(mod.library);
|
134
99
|
break;
|
135
100
|
default:
|
package/lib/cjs/index.d.ts
CHANGED
package/lib/cjs/index.js
CHANGED
@@ -17,13 +17,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.Builders = exports.FormBuilder = void 0;
|
20
|
+
exports.Formio = exports.Builders = exports.FormBuilder = void 0;
|
21
21
|
const FormBuilder_1 = __importDefault(require("./FormBuilder"));
|
22
22
|
exports.FormBuilder = FormBuilder_1.default;
|
23
23
|
const Builders_1 = __importDefault(require("./builders/Builders"));
|
24
24
|
exports.Builders = Builders_1.default;
|
25
25
|
const formio_form_1 = require("./formio.form");
|
26
|
+
Object.defineProperty(exports, "Formio", { enumerable: true, get: function () { return formio_form_1.Formio; } });
|
26
27
|
formio_form_1.Formio.Builders = Builders_1.default;
|
28
|
+
formio_form_1.Formio.isBuilder = true;
|
27
29
|
formio_form_1.Formio.use = (0, formio_form_1.useModule)((key, mod) => {
|
28
30
|
if (key === 'builders') {
|
29
31
|
formio_form_1.Formio.Builders.addBuilders(mod.builders);
|
@@ -27,7 +27,6 @@ export default class Providers {
|
|
27
27
|
type: any;
|
28
28
|
}>;
|
29
29
|
downloadFile(file: any): any;
|
30
|
-
deleteFile(fileInfo: any): any;
|
31
30
|
};
|
32
31
|
title: string;
|
33
32
|
};
|
@@ -50,10 +49,8 @@ export default class Providers {
|
|
50
49
|
type: any;
|
51
50
|
groupPermissions: any;
|
52
51
|
groupId: any;
|
53
|
-
key: any;
|
54
52
|
}>;
|
55
53
|
downloadFile(file: any): any;
|
56
|
-
deleteFile: (fileInfo: any) => any;
|
57
54
|
};
|
58
55
|
title: string;
|
59
56
|
};
|
@@ -71,7 +68,6 @@ export default class Providers {
|
|
71
68
|
(formio: any): {
|
72
69
|
uploadFile(file: any, fileName: any, dir: any, progressCallback: any, url: any, options: any, fileKey: any, groupPermissions: any, groupId: any, abortCallback: any): Promise<any>;
|
73
70
|
downloadFile(file: any): Promise<any>;
|
74
|
-
deleteFile: (fileInfo: any) => any;
|
75
71
|
};
|
76
72
|
title: string;
|
77
73
|
};
|
@@ -11,7 +11,7 @@ const azure = (formio) => ({
|
|
11
11
|
xhr.setRequestHeader('Content-Type', file.type);
|
12
12
|
xhr.setRequestHeader('x-ms-blob-type', 'BlockBlob');
|
13
13
|
return file;
|
14
|
-
}, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then((
|
14
|
+
}, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then(() => {
|
15
15
|
return {
|
16
16
|
storage: 'azure',
|
17
17
|
name: xhr_1.default.path([dir, fileName]),
|
@@ -19,16 +19,11 @@ const azure = (formio) => ({
|
|
19
19
|
type: file.type,
|
20
20
|
groupPermissions,
|
21
21
|
groupId,
|
22
|
-
key: response.pathFile
|
23
22
|
};
|
24
23
|
});
|
25
24
|
},
|
26
25
|
downloadFile(file) {
|
27
26
|
return formio.makeRequest('file', `${formio.formUrl}/storage/azure?name=${xhr_1.default.trim(file.name)}`, 'GET');
|
28
|
-
},
|
29
|
-
deleteFile: function deleteFile(fileInfo) {
|
30
|
-
var url = `${formio.formUrl}/storage/azure?name=${xhr_1.default.trim(fileInfo.name)}&key=${xhr_1.default.trim(fileInfo.key)}`;
|
31
|
-
return formio.makeRequest('', url, 'delete');
|
32
27
|
}
|
33
28
|
});
|
34
29
|
azure.title = 'Azure File Services';
|
@@ -2,7 +2,6 @@ export default googledrive;
|
|
2
2
|
declare function googledrive(formio: any): {
|
3
3
|
uploadFile(file: any, fileName: any, dir: any, progressCallback: any, url: any, options: any, fileKey: any, groupPermissions: any, groupId: any, abortCallback: any): Promise<any>;
|
4
4
|
downloadFile(file: any): Promise<any>;
|
5
|
-
deleteFile: (fileInfo: any) => any;
|
6
5
|
};
|
7
6
|
declare namespace googledrive {
|
8
7
|
const title: string;
|
@@ -50,10 +50,6 @@ const googledrive = (formio) => ({
|
|
50
50
|
file.url =
|
51
51
|
`${formio.formUrl}/storage/gdrive?fileId=${file.id}&fileName=${file.originalName}${token ? `&x-jwt-token=${token}` : ''}`;
|
52
52
|
return Promise.resolve(file);
|
53
|
-
},
|
54
|
-
deleteFile: function deleteFile(fileInfo) {
|
55
|
-
var url = ''.concat(formio.formUrl, `/storage/gdrive?id=${fileInfo.id}&name=${fileInfo.originalName}`);
|
56
|
-
return formio.makeRequest('', url, 'delete');
|
57
53
|
}
|
58
54
|
});
|
59
55
|
googledrive.title = 'Google Drive';
|
@@ -43,10 +43,6 @@ const s3 = (formio) => ({
|
|
43
43
|
else {
|
44
44
|
return Promise.resolve(file);
|
45
45
|
}
|
46
|
-
},
|
47
|
-
deleteFile(fileInfo) {
|
48
|
-
const url = `${formio.formUrl}/file/${xhr_1.default.trim(fileInfo.name)}?bucket=${xhr_1.default.trim(fileInfo.bucket)}&key=${xhr_1.default.trim(fileInfo.key)}`;
|
49
|
-
return formio.makeRequest('', url, 'delete');
|
50
46
|
}
|
51
47
|
});
|
52
48
|
s3.title = 'S3';
|
@@ -1,11 +1 @@
|
|
1
|
-
export default
|
2
|
-
static get templates(): any;
|
3
|
-
static addTemplate(name: any, template: any): void;
|
4
|
-
static extendTemplate(name: any, template: any): void;
|
5
|
-
static setTemplate(name: any, template: any): void;
|
6
|
-
static set current(arg: any);
|
7
|
-
static get current(): any;
|
8
|
-
static get defaultTemplates(): any;
|
9
|
-
static set framework(arg: any);
|
10
|
-
static get framework(): any;
|
11
|
-
}
|
1
|
+
export default Template;
|
@@ -3,45 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const lodash_1 = __importDefault(require("lodash"));
|
7
6
|
const index_1 = __importDefault(require("./index"));
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
return Templates._templates;
|
14
|
-
}
|
15
|
-
static addTemplate(name, template) {
|
16
|
-
Templates.templates[name] = template;
|
17
|
-
}
|
18
|
-
static extendTemplate(name, template) {
|
19
|
-
Templates.templates[name] = lodash_1.default.merge({}, Templates.templates[name], template);
|
20
|
-
}
|
21
|
-
static setTemplate(name, template) {
|
22
|
-
Templates.addTemplate(name, template);
|
23
|
-
}
|
24
|
-
static set current(templates) {
|
25
|
-
const defaultTemplates = Templates.current;
|
26
|
-
Templates._current = lodash_1.default.merge({}, defaultTemplates, templates);
|
27
|
-
}
|
28
|
-
static get current() {
|
29
|
-
if (Templates._current) {
|
30
|
-
return Templates._current;
|
31
|
-
}
|
32
|
-
return Templates.defaultTemplates;
|
33
|
-
}
|
34
|
-
static get defaultTemplates() {
|
35
|
-
return Templates.templates.hasOwnProperty('bootstrap') ? Templates.templates.bootstrap : {};
|
36
|
-
}
|
37
|
-
static set framework(framework) {
|
38
|
-
if (Templates.templates.hasOwnProperty(framework)) {
|
39
|
-
Templates._framework = framework;
|
40
|
-
Templates._current = Templates.templates[framework];
|
41
|
-
}
|
42
|
-
}
|
43
|
-
static get framework() {
|
44
|
-
return Templates._framework;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
exports.default = Templates;
|
7
|
+
const template_1 = require("@formio/core/template");
|
8
|
+
template_1.Template.addTemplates(index_1.default);
|
9
|
+
template_1.Template.defaultTemplates = index_1.default.bootstrap;
|
10
|
+
exports.default = template_1.Template;
|
@@ -2,6 +2,8 @@ declare namespace _default {
|
|
2
2
|
const unsavedRowsError: string;
|
3
3
|
const invalidRowsError: string;
|
4
4
|
const invalidRowError: string;
|
5
|
+
const invalidOption: string;
|
6
|
+
const invalidDay: string;
|
5
7
|
const alertMessageWithLabel: string;
|
6
8
|
const alertMessage: string;
|
7
9
|
const complete: string;
|
@@ -26,11 +28,14 @@ declare namespace _default {
|
|
26
28
|
const minDate: string;
|
27
29
|
const maxYear: string;
|
28
30
|
const minYear: string;
|
31
|
+
const minSelectedCount: string;
|
32
|
+
const maxSelectedCount: string;
|
29
33
|
const invalid_email: string;
|
30
34
|
const invalid_url: string;
|
31
35
|
const invalid_regex: string;
|
32
36
|
const invalid_date: string;
|
33
37
|
const invalid_day: string;
|
38
|
+
const invalidValueProperty: string;
|
34
39
|
const mask: string;
|
35
40
|
const valueIsNotAvailable: string;
|
36
41
|
const stripe: string;
|
@@ -4,6 +4,8 @@ exports.default = {
|
|
4
4
|
unsavedRowsError: 'Please save all rows before proceeding.',
|
5
5
|
invalidRowsError: 'Please correct invalid rows before proceeding.',
|
6
6
|
invalidRowError: 'Invalid row. Please correct it or delete.',
|
7
|
+
invalidOption: '{{field}} is an invalid value.',
|
8
|
+
invalidDay: '{{field}} is not a valid day.',
|
7
9
|
alertMessageWithLabel: '{{label}}: {{message}}',
|
8
10
|
alertMessage: '{{message}}',
|
9
11
|
complete: 'Submission Complete',
|
@@ -28,11 +30,14 @@ exports.default = {
|
|
28
30
|
minDate: '{{field}} should not contain date before {{- minDate}}',
|
29
31
|
maxYear: '{{field}} should not contain year greater than {{maxYear}}',
|
30
32
|
minYear: '{{field}} should not contain year less than {{minYear}}',
|
33
|
+
minSelectedCount: 'You must select at least {{minCount}} items',
|
34
|
+
maxSelectedCount: 'You may only select up to {{maxCount}} items',
|
31
35
|
invalid_email: '{{field}} must be a valid email.',
|
32
36
|
invalid_url: '{{field}} must be a valid url.',
|
33
37
|
invalid_regex: '{{field}} does not match the pattern {{regex}}.',
|
34
38
|
invalid_date: '{{field}} is not a valid date.',
|
35
39
|
invalid_day: '{{field}} is not a valid day.',
|
40
|
+
invalidValueProperty: 'Invalid Value Property',
|
36
41
|
mask: '{{field}} does not match the mask.',
|
37
42
|
valueIsNotAvailable: '{{ field }} is an invalid value.',
|
38
43
|
stripe: '{{stripe}}',
|
@@ -18,6 +18,7 @@ const chunk_1 = __importDefault(require("lodash/chunk"));
|
|
18
18
|
const pad_1 = __importDefault(require("lodash/pad"));
|
19
19
|
const fast_json_patch_1 = require("fast-json-patch");
|
20
20
|
const lodash_1 = __importDefault(require("lodash"));
|
21
|
+
const utils_1 = require("./utils");
|
21
22
|
/**
|
22
23
|
* Determine if a component is a layout component or not.
|
23
24
|
*
|
package/lib/cjs/utils/index.d.ts
CHANGED
package/lib/cjs/utils/index.js
CHANGED
@@ -23,7 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.Utils = void 0;
|
26
27
|
const FormioUtils = __importStar(require("./utils"));
|
28
|
+
exports.Utils = FormioUtils;
|
27
29
|
if (typeof global === 'object') {
|
28
30
|
global.FormioUtils = FormioUtils;
|
29
31
|
}
|
package/lib/cjs/utils/utils.d.ts
CHANGED
@@ -306,7 +306,7 @@ export function sanitize(string: any, options: any): any;
|
|
306
306
|
export function fastCloneDeep(obj: any): any;
|
307
307
|
export function isInputComponent(componentJson: any): any;
|
308
308
|
export function getArrayFromComponentPath(pathStr: any): any;
|
309
|
-
export function
|
309
|
+
export function isChildOf(child: any, parent: any): boolean;
|
310
310
|
export function getStringFromComponentPath(path: any): any;
|
311
311
|
export function round(number: any, precision: any): any;
|
312
312
|
/**
|
@@ -367,6 +367,7 @@ export namespace componentValueTypes {
|
|
367
367
|
const date: string;
|
368
368
|
const any: string;
|
369
369
|
}
|
370
|
+
export function interpolateErrors(component: any, errors: FieldError[], interpolateFn: any): [];
|
370
371
|
import jsonLogic from 'json-logic-js';
|
371
372
|
import ConditionOperators from './conditionOperators';
|
372
373
|
import Evaluator from './Evaluator';
|
package/lib/cjs/utils/utils.js
CHANGED
@@ -31,7 +31,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
31
|
};
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
33
33
|
exports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;
|
34
|
-
exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.
|
34
|
+
exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;
|
35
35
|
const lodash_1 = __importDefault(require("lodash"));
|
36
36
|
exports._ = lodash_1.default;
|
37
37
|
const fetch_ponyfill_1 = __importDefault(require("fetch-ponyfill"));
|
@@ -784,8 +784,10 @@ function convertFormatToMask(format) {
|
|
784
784
|
.replace(/M{3}/g, '***')
|
785
785
|
// Short month conversion if input as text.
|
786
786
|
.replace(/e/g, 'Q')
|
787
|
+
// Month number conversion.
|
788
|
+
.replace(/W/g, '99')
|
787
789
|
// Year conversion.
|
788
|
-
.replace(/[
|
790
|
+
.replace(/[ydhmswHMG]/g, '9')
|
789
791
|
// AM/PM conversion.
|
790
792
|
.replace(/a/g, 'AA');
|
791
793
|
}
|
@@ -1297,15 +1299,16 @@ function getArrayFromComponentPath(pathStr) {
|
|
1297
1299
|
.map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));
|
1298
1300
|
}
|
1299
1301
|
exports.getArrayFromComponentPath = getArrayFromComponentPath;
|
1300
|
-
function
|
1301
|
-
|
1302
|
-
if (
|
1303
|
-
return
|
1302
|
+
function isChildOf(child, parent) {
|
1303
|
+
while (child && child.parent) {
|
1304
|
+
if (child.parent === parent) {
|
1305
|
+
return true;
|
1304
1306
|
}
|
1305
|
-
|
1306
|
-
}
|
1307
|
+
child = child.parent;
|
1308
|
+
}
|
1309
|
+
return false;
|
1307
1310
|
}
|
1308
|
-
exports.
|
1311
|
+
exports.isChildOf = isChildOf;
|
1309
1312
|
function getStringFromComponentPath(path) {
|
1310
1313
|
if (!lodash_1.default.isArray(path)) {
|
1311
1314
|
return path;
|
@@ -1485,3 +1488,18 @@ function getComponentSavedTypes(fullSchema) {
|
|
1485
1488
|
return null;
|
1486
1489
|
}
|
1487
1490
|
exports.getComponentSavedTypes = getComponentSavedTypes;
|
1491
|
+
/**
|
1492
|
+
* Interpolates @formio/core errors so that they are compatible with the renderer
|
1493
|
+
* @param {FieldError[]} errors
|
1494
|
+
* @param firstPass
|
1495
|
+
* @returns {[]}
|
1496
|
+
*/
|
1497
|
+
const interpolateErrors = (component, errors, interpolateFn) => {
|
1498
|
+
return errors.map((error) => {
|
1499
|
+
error.component = component;
|
1500
|
+
const { errorKeyOrMessage, context } = error;
|
1501
|
+
const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;
|
1502
|
+
return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });
|
1503
|
+
});
|
1504
|
+
};
|
1505
|
+
exports.interpolateErrors = interpolateErrors;
|
package/lib/mjs/CDN.d.ts
CHANGED
package/lib/mjs/CDN.js
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
// like Formio.cdn.ace === 'http://cdn.form.io/ace/1.4.12'.
|
4
4
|
// For latest version use empty string
|
5
5
|
class CDN {
|
6
|
-
constructor(baseUrl) {
|
6
|
+
constructor(baseUrl, overrides = {}) {
|
7
7
|
this.baseUrl = baseUrl || 'https://cdn.form.io';
|
8
|
-
this.overrides =
|
8
|
+
this.overrides = overrides;
|
9
9
|
this.libs = {
|
10
10
|
'js': '',
|
11
11
|
'ace': '1.4.12',
|
package/lib/mjs/Embed.d.ts
CHANGED
@@ -1,22 +1,30 @@
|
|
1
1
|
export class Formio {
|
2
|
+
static FormioClass: null;
|
2
3
|
static baseUrl: any;
|
3
4
|
static projectUrl: any;
|
5
|
+
static pathType: any;
|
4
6
|
static language: any;
|
5
7
|
static config: {};
|
6
|
-
static cdn:
|
7
|
-
static
|
8
|
+
static cdn: CDN;
|
9
|
+
static modules: any[];
|
10
|
+
static icons: string;
|
11
|
+
static formioReady: Promise<any>;
|
8
12
|
static version: string;
|
9
|
-
static setBaseUrl(url: any):
|
10
|
-
static
|
13
|
+
static setBaseUrl(url: any, norecurse: any): void;
|
14
|
+
static setApiUrl(url: any, norecurse: any): void;
|
15
|
+
static setProjectUrl(url: any, norecurse: any): void;
|
16
|
+
static setAppUrl(url: any, norecurse: any): void;
|
17
|
+
static setPathType(type: any, norecurse: any): void;
|
11
18
|
static debug(...args: any[]): void;
|
12
19
|
static clearCache(): void;
|
13
|
-
static global(prop: any): any;
|
20
|
+
static global(prop: any, flag?: string): any;
|
21
|
+
static use(module: any): void;
|
14
22
|
static createElement(type: any, attrs: any, children: any): any;
|
15
|
-
static addScript(wrapper: any, src: any, name: any): Promise<any>;
|
23
|
+
static addScript(wrapper: any, src: any, name: any, flag?: string): Promise<any>;
|
16
24
|
static addStyles(wrapper: any, href: any): Promise<void>;
|
17
25
|
static submitDone(instance: any, submission: any): Promise<void>;
|
18
26
|
static formioScript(script: any, builder: any): any;
|
19
|
-
static init(element: any, builder?: boolean): Promise<any>;
|
27
|
+
static init(element: any, options?: {}, builder?: boolean): Promise<any>;
|
20
28
|
static createForm(element: any, form: any, options: any): Promise<any>;
|
21
29
|
static builder(element: any, form: any, options: any): Promise<any>;
|
22
30
|
}
|
@@ -41,3 +49,4 @@ export class Form {
|
|
41
49
|
}
|
42
50
|
export class FormBuilder extends Form {
|
43
51
|
}
|
52
|
+
import CDN from './CDN.js';
|