@formio/js 5.0.0-rc.53 → 5.0.0-rc.55
Sign up to get free protection for your applications and to get access to all the features.
- 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 +563 -563
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -3
- package/dist/formio.full.js +606 -606
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -3
- package/dist/formio.js +3 -3
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +16 -16
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +3 -3
- package/embed.d.ts +1 -0
- package/form.d.ts +1 -0
- package/lib/cjs/Element.d.ts +3 -2
- package/lib/cjs/Element.js +4 -3
- package/lib/cjs/Form.d.ts +99 -36
- package/lib/cjs/Form.js +23 -18
- package/lib/cjs/InlineEmbed.d.ts +7 -0
- package/lib/cjs/InlineEmbed.js +109 -0
- package/lib/cjs/PDF.d.ts +8 -7
- package/lib/cjs/PDF.js +6 -5
- package/lib/cjs/Webform.d.ts +0 -3
- package/lib/cjs/Webform.js +18 -15
- package/lib/cjs/WebformBuilder.d.ts +15 -14
- package/lib/cjs/WebformBuilder.js +11 -10
- package/lib/cjs/Wizard.d.ts +0 -11
- package/lib/cjs/Wizard.js +16 -14
- package/lib/cjs/WizardBuilder.d.ts +1 -1
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +2 -2
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +2 -2
- package/lib/cjs/addons/index.d.ts +2 -2
- package/lib/cjs/components/Components.d.ts +6 -5
- package/lib/cjs/components/Components.js +2 -1
- package/lib/cjs/components/_classes/component/Component.form.d.ts +4 -5
- package/lib/cjs/components/_classes/component/Component.form.js +3 -2
- package/lib/cjs/components/_classes/component/Component.js +3 -2
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +2 -2
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +1 -1
- package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +4 -4
- package/lib/cjs/components/_classes/list/ListComponent.form.js +3 -3
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +4 -5
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +3 -2
- package/lib/cjs/components/_classes/nested/NestedComponent.js +0 -2
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
- package/lib/cjs/components/address/Address.form.d.ts +4 -5
- package/lib/cjs/components/address/Address.form.js +3 -2
- package/lib/cjs/components/button/Button.form.d.ts +4 -5
- package/lib/cjs/components/button/Button.form.js +3 -2
- package/lib/cjs/components/button/Button.js +3 -2
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +4 -5
- package/lib/cjs/components/checkbox/Checkbox.form.js +3 -2
- package/lib/cjs/components/checkbox/Checkbox.js +2 -9
- package/lib/cjs/components/checkbox/fixtures/comp5.d.ts +34 -0
- package/lib/cjs/components/checkbox/fixtures/comp5.js +55 -0
- package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
- package/lib/cjs/components/columns/Columns.d.ts +1 -1
- package/lib/cjs/components/columns/Columns.form.d.ts +4 -5
- package/lib/cjs/components/columns/Columns.form.js +3 -2
- package/lib/cjs/components/columns/Columns.js +1 -1
- package/lib/cjs/components/container/Container.form.d.ts +4 -5
- package/lib/cjs/components/container/Container.form.js +3 -2
- package/lib/cjs/components/content/Content.form.d.ts +4 -5
- package/lib/cjs/components/content/Content.form.js +3 -2
- package/lib/cjs/components/currency/Currency.form.d.ts +4 -5
- package/lib/cjs/components/currency/Currency.form.js +3 -2
- package/lib/cjs/components/currency/Currency.js +1 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +4 -4
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +4 -5
- package/lib/cjs/components/datagrid/DataGrid.form.js +3 -2
- package/lib/cjs/components/datagrid/DataGrid.js +4 -4
- package/lib/cjs/components/datamap/DataMap.form.d.ts +4 -5
- package/lib/cjs/components/datamap/DataMap.form.js +3 -2
- package/lib/cjs/components/datetime/DateTime.form.d.ts +4 -5
- package/lib/cjs/components/datetime/DateTime.form.js +3 -2
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +1 -1
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
- package/lib/cjs/components/day/Day.d.ts +18 -23
- package/lib/cjs/components/day/Day.form.d.ts +4 -5
- package/lib/cjs/components/day/Day.form.js +3 -2
- package/lib/cjs/components/day/Day.js +15 -14
- package/lib/cjs/components/editgrid/EditGrid.d.ts +4 -3
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +4 -5
- package/lib/cjs/components/editgrid/EditGrid.form.js +3 -2
- package/lib/cjs/components/editgrid/EditGrid.js +3 -3
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -5
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +1 -1
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +6 -9
- package/lib/cjs/components/email/Email.form.d.ts +4 -5
- package/lib/cjs/components/email/Email.form.js +3 -2
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +4 -5
- package/lib/cjs/components/fieldset/Fieldset.form.js +3 -2
- package/lib/cjs/components/file/File.form.d.ts +4 -5
- package/lib/cjs/components/file/File.form.js +3 -2
- package/lib/cjs/components/form/Form.d.ts +23 -20
- package/lib/cjs/components/form/Form.form.d.ts +4 -5
- package/lib/cjs/components/form/Form.form.js +3 -2
- package/lib/cjs/components/form/Form.js +18 -11
- package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +1 -1
- package/lib/cjs/components/form/fixtures/comp7.d.ts +36 -0
- package/lib/cjs/components/form/fixtures/comp7.js +37 -0
- package/lib/cjs/components/form/fixtures/comp8.d.ts +26 -0
- package/lib/cjs/components/form/fixtures/comp8.js +29 -0
- package/lib/cjs/components/form/fixtures/index.d.ts +3 -1
- package/lib/cjs/components/form/fixtures/index.js +5 -1
- package/lib/cjs/components/hidden/Hidden.form.d.ts +4 -5
- package/lib/cjs/components/hidden/Hidden.form.js +3 -2
- package/lib/cjs/components/hidden/Hidden.js +1 -1
- package/lib/cjs/components/html/HTML.form.d.ts +4 -5
- package/lib/cjs/components/html/HTML.form.js +3 -2
- package/lib/cjs/components/number/Number.d.ts +1 -1
- package/lib/cjs/components/number/Number.form.d.ts +4 -5
- package/lib/cjs/components/number/Number.form.js +3 -2
- package/lib/cjs/components/number/Number.js +1 -1
- package/lib/cjs/components/panel/Panel.form.d.ts +4 -5
- package/lib/cjs/components/panel/Panel.form.js +3 -2
- package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +1 -1
- package/lib/cjs/components/password/Password.form.d.ts +4 -5
- package/lib/cjs/components/password/Password.form.js +3 -2
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +4 -5
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +3 -2
- package/lib/cjs/components/radio/Radio.form.d.ts +4 -3
- package/lib/cjs/components/radio/Radio.form.js +3 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -4
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +2 -1
- package/lib/cjs/components/select/Select.d.ts +2 -2
- package/lib/cjs/components/select/Select.form.d.ts +4 -3
- package/lib/cjs/components/select/Select.form.js +3 -2
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -8
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +4 -3
- package/lib/cjs/components/selectboxes/SelectBoxes.form.js +3 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/cjs/components/signature/Signature.form.d.ts +4 -5
- package/lib/cjs/components/signature/Signature.form.js +3 -2
- package/lib/cjs/components/survey/Survey.form.d.ts +4 -5
- package/lib/cjs/components/survey/Survey.form.js +3 -2
- package/lib/cjs/components/table/Table.form.d.ts +4 -5
- package/lib/cjs/components/table/Table.form.js +3 -2
- package/lib/cjs/components/tabs/Tabs.d.ts +2 -2
- package/lib/cjs/components/tabs/Tabs.form.d.ts +4 -5
- package/lib/cjs/components/tabs/Tabs.form.js +3 -2
- package/lib/cjs/components/tabs/Tabs.js +1 -1
- package/lib/cjs/components/tags/Tags.form.d.ts +4 -5
- package/lib/cjs/components/tags/Tags.form.js +3 -2
- package/lib/cjs/components/textarea/TextArea.d.ts +3 -3
- package/lib/cjs/components/textarea/TextArea.form.d.ts +4 -5
- package/lib/cjs/components/textarea/TextArea.form.js +3 -2
- package/lib/cjs/components/textarea/TextArea.js +2 -2
- package/lib/cjs/components/textfield/TextField.d.ts +12 -19
- package/lib/cjs/components/textfield/TextField.form.d.ts +4 -5
- package/lib/cjs/components/textfield/TextField.form.js +3 -2
- package/lib/cjs/components/textfield/TextField.js +13 -12
- package/lib/cjs/components/time/Time.form.d.ts +4 -5
- package/lib/cjs/components/time/Time.form.js +3 -2
- package/lib/cjs/components/unknown/Unknown.form.d.ts +3 -35
- package/lib/cjs/components/unknown/Unknown.form.js +2 -1
- package/lib/cjs/components/url/Url.form.d.ts +4 -5
- package/lib/cjs/components/url/Url.form.js +3 -2
- package/lib/cjs/components/well/Well.form.d.ts +4 -5
- package/lib/cjs/components/well/Well.form.js +3 -2
- package/lib/cjs/formio.embed.d.ts +1 -2
- package/lib/cjs/formio.embed.js +2 -100
- package/lib/cjs/formio.form.js +2 -2
- package/lib/cjs/utils/Evaluator.d.ts +0 -1
- package/lib/cjs/utils/Evaluator.js +2 -5
- package/lib/cjs/utils/formUtils.d.ts +1 -1
- package/lib/cjs/utils/utils.d.ts +106 -83
- package/lib/cjs/utils/utils.js +96 -140
- package/lib/cjs/widgets/CalendarWidget.d.ts +8 -7
- package/lib/cjs/widgets/CalendarWidget.js +8 -7
- package/lib/mjs/Element.d.ts +3 -2
- package/lib/mjs/Element.js +4 -3
- package/lib/mjs/Form.d.ts +99 -36
- package/lib/mjs/Form.js +43 -38
- package/lib/mjs/InlineEmbed.d.ts +7 -0
- package/lib/mjs/InlineEmbed.js +105 -0
- package/lib/mjs/PDF.d.ts +8 -7
- package/lib/mjs/PDF.js +6 -5
- package/lib/mjs/Webform.d.ts +0 -3
- package/lib/mjs/Webform.js +18 -15
- package/lib/mjs/WebformBuilder.d.ts +15 -14
- package/lib/mjs/WebformBuilder.js +11 -10
- package/lib/mjs/Wizard.d.ts +0 -11
- package/lib/mjs/Wizard.js +14 -12
- package/lib/mjs/WizardBuilder.d.ts +1 -1
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +2 -2
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +2 -2
- package/lib/mjs/addons/index.d.ts +2 -2
- package/lib/mjs/components/Components.d.ts +6 -5
- package/lib/mjs/components/Components.js +2 -1
- package/lib/mjs/components/_classes/component/Component.form.d.ts +4 -5
- package/lib/mjs/components/_classes/component/Component.form.js +3 -2
- package/lib/mjs/components/_classes/component/Component.js +3 -2
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +2 -2
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +1 -1
- package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +4 -4
- package/lib/mjs/components/_classes/list/ListComponent.form.js +3 -3
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +4 -5
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +3 -2
- package/lib/mjs/components/_classes/nested/NestedComponent.js +0 -2
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
- package/lib/mjs/components/address/Address.form.d.ts +4 -5
- package/lib/mjs/components/address/Address.form.js +3 -2
- package/lib/mjs/components/button/Button.form.d.ts +4 -5
- package/lib/mjs/components/button/Button.form.js +3 -2
- package/lib/mjs/components/button/Button.js +3 -2
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +4 -5
- package/lib/mjs/components/checkbox/Checkbox.form.js +3 -2
- package/lib/mjs/components/checkbox/Checkbox.js +2 -9
- package/lib/mjs/components/checkbox/fixtures/comp5.d.ts +34 -0
- package/lib/mjs/components/checkbox/fixtures/comp5.js +53 -0
- package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
- package/lib/mjs/components/columns/Columns.d.ts +1 -1
- package/lib/mjs/components/columns/Columns.form.d.ts +4 -5
- package/lib/mjs/components/columns/Columns.form.js +3 -2
- package/lib/mjs/components/columns/Columns.js +1 -1
- package/lib/mjs/components/container/Container.form.d.ts +4 -5
- package/lib/mjs/components/container/Container.form.js +3 -2
- package/lib/mjs/components/content/Content.form.d.ts +4 -5
- package/lib/mjs/components/content/Content.form.js +3 -2
- package/lib/mjs/components/currency/Currency.form.d.ts +4 -5
- package/lib/mjs/components/currency/Currency.form.js +3 -2
- package/lib/mjs/components/currency/Currency.js +1 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +4 -4
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +4 -5
- package/lib/mjs/components/datagrid/DataGrid.form.js +3 -2
- package/lib/mjs/components/datagrid/DataGrid.js +4 -4
- package/lib/mjs/components/datamap/DataMap.form.d.ts +4 -5
- package/lib/mjs/components/datamap/DataMap.form.js +3 -2
- package/lib/mjs/components/datetime/DateTime.form.d.ts +4 -5
- package/lib/mjs/components/datetime/DateTime.form.js +3 -2
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +1 -1
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +18 -23
- package/lib/mjs/components/day/Day.form.d.ts +4 -5
- package/lib/mjs/components/day/Day.form.js +3 -2
- package/lib/mjs/components/day/Day.js +15 -14
- package/lib/mjs/components/editgrid/EditGrid.d.ts +4 -3
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +4 -5
- package/lib/mjs/components/editgrid/EditGrid.form.js +3 -2
- package/lib/mjs/components/editgrid/EditGrid.js +3 -3
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +1 -1
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
- package/lib/mjs/components/email/Email.form.d.ts +4 -5
- package/lib/mjs/components/email/Email.form.js +3 -2
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +4 -5
- package/lib/mjs/components/fieldset/Fieldset.form.js +3 -2
- package/lib/mjs/components/file/File.form.d.ts +4 -5
- package/lib/mjs/components/file/File.form.js +3 -2
- package/lib/mjs/components/form/Form.d.ts +23 -20
- package/lib/mjs/components/form/Form.form.d.ts +4 -5
- package/lib/mjs/components/form/Form.form.js +3 -2
- package/lib/mjs/components/form/Form.js +18 -11
- package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +1 -1
- package/lib/mjs/components/form/fixtures/comp7.d.ts +36 -0
- package/lib/mjs/components/form/fixtures/comp7.js +35 -0
- package/lib/mjs/components/form/fixtures/comp8.d.ts +26 -0
- package/lib/mjs/components/form/fixtures/comp8.js +27 -0
- package/lib/mjs/components/form/fixtures/index.d.ts +3 -1
- package/lib/mjs/components/form/fixtures/index.js +3 -1
- package/lib/mjs/components/hidden/Hidden.form.d.ts +4 -5
- package/lib/mjs/components/hidden/Hidden.form.js +3 -2
- package/lib/mjs/components/hidden/Hidden.js +1 -1
- package/lib/mjs/components/html/HTML.form.d.ts +4 -5
- package/lib/mjs/components/html/HTML.form.js +3 -2
- package/lib/mjs/components/number/Number.d.ts +1 -1
- package/lib/mjs/components/number/Number.form.d.ts +4 -5
- package/lib/mjs/components/number/Number.form.js +3 -2
- package/lib/mjs/components/number/Number.js +1 -1
- package/lib/mjs/components/panel/Panel.form.d.ts +4 -5
- package/lib/mjs/components/panel/Panel.form.js +3 -2
- package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +1 -1
- package/lib/mjs/components/password/Password.form.d.ts +4 -5
- package/lib/mjs/components/password/Password.form.js +3 -2
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +4 -5
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +3 -2
- package/lib/mjs/components/radio/Radio.form.d.ts +4 -3
- package/lib/mjs/components/radio/Radio.form.js +3 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -4
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +2 -1
- package/lib/mjs/components/select/Select.d.ts +2 -2
- package/lib/mjs/components/select/Select.form.d.ts +4 -3
- package/lib/mjs/components/select/Select.form.js +3 -2
- package/lib/mjs/components/select/Select.js +1 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -8
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +4 -3
- package/lib/mjs/components/selectboxes/SelectBoxes.form.js +3 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/mjs/components/signature/Signature.form.d.ts +4 -5
- package/lib/mjs/components/signature/Signature.form.js +3 -2
- package/lib/mjs/components/survey/Survey.form.d.ts +4 -5
- package/lib/mjs/components/survey/Survey.form.js +3 -2
- package/lib/mjs/components/table/Table.form.d.ts +4 -5
- package/lib/mjs/components/table/Table.form.js +3 -2
- package/lib/mjs/components/tabs/Tabs.d.ts +2 -2
- package/lib/mjs/components/tabs/Tabs.form.d.ts +4 -5
- package/lib/mjs/components/tabs/Tabs.form.js +3 -2
- package/lib/mjs/components/tabs/Tabs.js +1 -1
- package/lib/mjs/components/tags/Tags.form.d.ts +4 -5
- package/lib/mjs/components/tags/Tags.form.js +3 -2
- package/lib/mjs/components/textarea/TextArea.d.ts +3 -3
- package/lib/mjs/components/textarea/TextArea.form.d.ts +4 -5
- package/lib/mjs/components/textarea/TextArea.form.js +3 -2
- package/lib/mjs/components/textarea/TextArea.js +2 -2
- package/lib/mjs/components/textfield/TextField.d.ts +12 -19
- package/lib/mjs/components/textfield/TextField.form.d.ts +4 -5
- package/lib/mjs/components/textfield/TextField.form.js +3 -2
- package/lib/mjs/components/textfield/TextField.js +13 -12
- package/lib/mjs/components/time/Time.form.d.ts +4 -5
- package/lib/mjs/components/time/Time.form.js +3 -2
- package/lib/mjs/components/unknown/Unknown.form.d.ts +3 -35
- package/lib/mjs/components/unknown/Unknown.form.js +2 -1
- package/lib/mjs/components/url/Url.form.d.ts +4 -5
- package/lib/mjs/components/url/Url.form.js +3 -2
- package/lib/mjs/components/well/Well.form.d.ts +4 -5
- package/lib/mjs/components/well/Well.form.js +3 -2
- package/lib/mjs/formio.embed.d.ts +1 -2
- package/lib/mjs/formio.embed.js +2 -99
- package/lib/mjs/formio.form.js +1 -1
- package/lib/mjs/utils/Evaluator.d.ts +0 -1
- package/lib/mjs/utils/Evaluator.js +1 -4
- package/lib/mjs/utils/formUtils.d.ts +1 -1
- package/lib/mjs/utils/utils.d.ts +106 -83
- package/lib/mjs/utils/utils.js +96 -140
- package/lib/mjs/widgets/CalendarWidget.d.ts +8 -7
- package/lib/mjs/widgets/CalendarWidget.js +8 -7
- package/package.json +12 -11
- package/sdk.d.ts +1 -0
- package/utils.d.ts +1 -0
@@ -1,7 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
*
|
3
|
-
* @param {...any} extend
|
2
|
+
* The Edit Form function.
|
3
|
+
* @param {...any} extend - The components that extend the edit form.
|
4
|
+
* @returns {import('@formio/core').Component[]} - The edit form components.
|
4
5
|
*/
|
5
|
-
export default function _default(...extend: any[]):
|
6
|
-
components: any;
|
7
|
-
};
|
6
|
+
export default function _default(...extend: any[]): import('@formio/core').Component[];
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import nestedComponentForm from '../_classes/nested/NestedComponent.form';
|
2
2
|
import WellEditDisplay from './editForm/Well.edit.display';
|
3
3
|
/**
|
4
|
-
*
|
5
|
-
* @param {...any} extend
|
4
|
+
* The Edit Form function.
|
5
|
+
* @param {...any} extend - The components that extend the edit form.
|
6
|
+
* @returns {import('@formio/core').Component[]} - The edit form components.
|
6
7
|
*/
|
7
8
|
export default function (...extend) {
|
8
9
|
return nestedComponentForm([
|
@@ -1,2 +1 @@
|
|
1
|
-
export {
|
2
|
-
import { Formio } from './Embed';
|
1
|
+
export {};
|
package/lib/mjs/formio.embed.js
CHANGED
@@ -1,99 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const config = window.FormioConfig || {};
|
4
|
-
let thisScript = null;
|
5
|
-
let i = scripts.length;
|
6
|
-
const scriptName = config.scriptName || 'formio.embed.';
|
7
|
-
while (i--) {
|
8
|
-
if (scripts[i].src && (scripts[i].src.indexOf(scriptName) !== -1)) {
|
9
|
-
thisScript = scripts[i];
|
10
|
-
break;
|
11
|
-
}
|
12
|
-
}
|
13
|
-
if (thisScript) {
|
14
|
-
const query = {};
|
15
|
-
const queryString = thisScript.src.replace(/^[^?]+\??/, '');
|
16
|
-
queryString.replace(/\?/g, '&').split('&').forEach((item) => {
|
17
|
-
query[item.split('=')[0]] = item.split('=')[1] && decodeURIComponent(item.split('=')[1]);
|
18
|
-
});
|
19
|
-
let scriptSrc = thisScript.src.replace(/^([^?]+).*/, '$1').split('/');
|
20
|
-
scriptSrc.pop();
|
21
|
-
if (config.formioPath) {
|
22
|
-
config.formioPath(scriptSrc);
|
23
|
-
}
|
24
|
-
scriptSrc = scriptSrc.join('/');
|
25
|
-
const debug = (query.debug === 'true' || query.debug === '1');
|
26
|
-
const renderer = debug ? 'formio.form' : 'formio.form.min';
|
27
|
-
Formio.config = Object.assign({
|
28
|
-
script: query.script || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.js`),
|
29
|
-
style: query.styles || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.css`),
|
30
|
-
cdn: query.cdn,
|
31
|
-
class: (query.class || 'formio-form-wrapper'),
|
32
|
-
src: query.src,
|
33
|
-
form: null,
|
34
|
-
submission: null,
|
35
|
-
project: query.project,
|
36
|
-
base: query.base || 'https://api.form.io',
|
37
|
-
submit: query.submit,
|
38
|
-
includeLibs: (query.libs === 'true' || query.libs === '1'),
|
39
|
-
template: query.template,
|
40
|
-
debug: debug,
|
41
|
-
config: {},
|
42
|
-
redirect: (query.return || query.redirect),
|
43
|
-
embedCSS: (`${config.updatePath ? config.updatePath() : scriptSrc}/formio.embed.css`),
|
44
|
-
success: query.success || 'Thank you for your submission!',
|
45
|
-
before: null,
|
46
|
-
after: null
|
47
|
-
}, config);
|
48
|
-
const form = (Formio.config.form || Formio.config.src);
|
49
|
-
if (form) {
|
50
|
-
Formio.debug('Embedding Configuration', config);
|
51
|
-
if (Formio.config.addPremiumLib) {
|
52
|
-
Formio.config.addPremiumLib(Formio.config, scriptSrc);
|
53
|
-
}
|
54
|
-
// The id for this embedded form.
|
55
|
-
Formio.config.id = `formio-${Math.random().toString(36).substring(7)}`;
|
56
|
-
Formio.debug('Creating form element');
|
57
|
-
const element = Formio.createElement('div', {
|
58
|
-
'id': Formio.config.id,
|
59
|
-
class: Formio.config.class
|
60
|
-
});
|
61
|
-
// insertAfter doesn't exist, but effect is identical.
|
62
|
-
thisScript.parentNode.insertBefore(element, thisScript.parentNode.firstElementChild.nextSibling);
|
63
|
-
Formio.createForm(element, form, Formio.config.config).then((instance) => {
|
64
|
-
if (Formio.config.submit) {
|
65
|
-
instance.nosubmit = true;
|
66
|
-
}
|
67
|
-
// Configure a redirect.
|
68
|
-
instance.on('submit', (submission) => {
|
69
|
-
Formio.debug("on('submit')", submission);
|
70
|
-
if (Formio.config.submit) {
|
71
|
-
Formio.debug(`Sending submission to ${Formio.config.submit}`);
|
72
|
-
const headers = {
|
73
|
-
'content-type': 'application/json'
|
74
|
-
};
|
75
|
-
const token = Formio.FormioClass.getToken();
|
76
|
-
if (token) {
|
77
|
-
headers['x-jwt-token'] = token;
|
78
|
-
}
|
79
|
-
Formio.FormioClass.fetch(Formio.config.submit, {
|
80
|
-
body: JSON.stringify(submission),
|
81
|
-
headers: headers,
|
82
|
-
method: 'POST',
|
83
|
-
mode: 'cors',
|
84
|
-
})
|
85
|
-
.then(resp => resp.json())
|
86
|
-
.then(submission => Formio.submitDone(instance, submission));
|
87
|
-
}
|
88
|
-
else {
|
89
|
-
Formio.submitDone(instance, submission);
|
90
|
-
}
|
91
|
-
});
|
92
|
-
});
|
93
|
-
}
|
94
|
-
}
|
95
|
-
else {
|
96
|
-
// Show an error if the script cannot be found.
|
97
|
-
document.write('<span>Could not locate the Embedded form.</span>');
|
98
|
-
}
|
99
|
-
export { Formio };
|
1
|
+
import { embed } from './InlineEmbed';
|
2
|
+
embed();
|
package/lib/mjs/formio.form.js
CHANGED
@@ -8,7 +8,7 @@ import Providers from './providers';
|
|
8
8
|
import Widgets from './widgets';
|
9
9
|
import Form from './Form';
|
10
10
|
import Utils from './utils';
|
11
|
-
import Evaluator from './utils/Evaluator';
|
11
|
+
import { Evaluator } from './utils/Evaluator';
|
12
12
|
import Licenses from './licenses';
|
13
13
|
import EventEmitter from './EventEmitter';
|
14
14
|
import Webform from './Webform';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import stringHash from 'string-hash';
|
3
|
-
import {
|
3
|
+
import { JSONLogicEvaluator as CoreEvaluator } from '@formio/core/utils';
|
4
4
|
export class Evaluator extends CoreEvaluator {
|
5
5
|
static cache = {};
|
6
6
|
static protectedEval = false;
|
@@ -50,7 +50,4 @@ export class Evaluator extends CoreEvaluator {
|
|
50
50
|
}
|
51
51
|
return template;
|
52
52
|
}
|
53
|
-
static evaluate(func, args) {
|
54
|
-
return Array.isArray(args) ? func(...args) : func(args);
|
55
|
-
}
|
56
53
|
}
|
@@ -15,7 +15,7 @@ export const getComponentPath: typeof Utils.getComponentPath;
|
|
15
15
|
export const isComponentModelType: typeof Utils.isComponentModelType;
|
16
16
|
export const isComponentNestedDataType: typeof Utils.isComponentNestedDataType;
|
17
17
|
export const componentPath: typeof Utils.componentPath;
|
18
|
-
export const componentChildPath:
|
18
|
+
export const componentChildPath: any;
|
19
19
|
export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: AsyncComponentDataCallback, path?: string | undefined, index?: number | undefined, parent?: any, includeAll?: boolean | undefined) => Promise<void>;
|
20
20
|
export const eachComponentData: (components: Component[], data: DataObject, fn: ComponentDataCallback, path?: string | undefined, index?: number | undefined, parent?: any, includeAll?: boolean | undefined) => void;
|
21
21
|
export const getComponentKey: typeof Utils.getComponentKey;
|
package/lib/mjs/utils/utils.d.ts
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
* @param {Function|string|object} func - The function to evaluate.
|
4
4
|
* @param {*} args - A map of arguments to pass to the function.
|
5
5
|
* @param {string} ret - The name of the "return" variable in the script.
|
6
|
-
* @param {boolean}
|
6
|
+
* @param {boolean} interpolate - True if the script should be interpolated before being executed.
|
7
|
+
* @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.
|
7
8
|
* @returns {*} - The result of the evaluation.
|
8
9
|
*/
|
9
|
-
export function evaluate(func: Function | string | object, args: any, ret: string,
|
10
|
+
export function evaluate(func: Function | string | object, args: any, ret: string, interpolate: boolean, options?: import('@formio/core').EvaluatorOptions): any;
|
10
11
|
/**
|
11
12
|
* Returns a random compoennt ID.
|
12
13
|
* @returns {string} - A random component ID.
|
@@ -324,99 +325,115 @@ export function delay(fn: Function, delay?: number, ...args: any[]): any;
|
|
324
325
|
export function iterateKey(key: string): string;
|
325
326
|
/**
|
326
327
|
* Determines a unique key within a map provided the base key.
|
327
|
-
* @param map
|
328
|
-
* @param base
|
329
|
-
* @returns {
|
328
|
+
* @param {Record<string, string>} map - The map to check for uniqueness.
|
329
|
+
* @param {string} base - The base path of the key.
|
330
|
+
* @returns {string} - The unique key.
|
330
331
|
*/
|
331
|
-
export function uniqueKey(map:
|
332
|
+
export function uniqueKey(map: Record<string, string>, base: string): string;
|
332
333
|
/**
|
333
334
|
* Determines the major version number of bootstrap.
|
334
|
-
* @param options
|
335
|
-
* @
|
335
|
+
* @param {object} options - The options to check for bootstrap version.
|
336
|
+
* @param {string} options.bootstrap - The bootstrap version to use.
|
337
|
+
* @returns {number} - The bootstrap version.
|
336
338
|
*/
|
337
|
-
export function bootstrapVersion(options:
|
339
|
+
export function bootstrapVersion(options: {
|
340
|
+
bootstrap: string;
|
341
|
+
}): number;
|
338
342
|
/**
|
339
343
|
* Retrun provided argument.
|
340
344
|
* If argument is a function, returns the result of a function call.
|
341
|
-
* @param {
|
342
|
-
* @
|
343
|
-
* @returns {*}
|
345
|
+
* @param {Function|any} e - The argument to check if a function and call if so.
|
346
|
+
* @returns {any} - Either the result of the function call (e) or e if it is not a function.
|
344
347
|
*/
|
345
|
-
export function unfold(e: any): any;
|
348
|
+
export function unfold(e: Function | any): any;
|
346
349
|
/**
|
347
|
-
*
|
348
|
-
* @param a
|
349
|
-
* @param b
|
350
|
+
* Create enclosed state. Returns functions to getting and cycling between states.
|
351
|
+
* @param {*} a - initial state.
|
352
|
+
* @param {*} b - next state.
|
353
|
+
* @returns {Functions[]} -- [get, toggle];
|
350
354
|
*/
|
351
|
-
export function withSwitch(a: any, b: any):
|
355
|
+
export function withSwitch(a: any, b: any): Functions[];
|
352
356
|
/**
|
353
|
-
*
|
354
|
-
* @param callback
|
355
|
-
* @param options
|
357
|
+
* Create a function that will call the provided function only the provided limit.
|
358
|
+
* @param {Function} callback - The callback to call.
|
359
|
+
* @param {object} options - The options to use.
|
360
|
+
* @param {number} options.limit - The limit to call the callback.
|
361
|
+
* @param {number} options.delay - The delay to wait before resetting the call count.
|
362
|
+
* @returns {Function} - The function that will call the callback only the provided limit.
|
356
363
|
*/
|
357
|
-
export function observeOverload(callback:
|
364
|
+
export function observeOverload(callback: Function, options?: {
|
365
|
+
limit: number;
|
366
|
+
delay: number;
|
367
|
+
}): Function;
|
358
368
|
/**
|
359
|
-
*
|
360
|
-
* @param context
|
361
|
-
* @param excludeNested
|
362
|
-
* @param excludedTypes
|
369
|
+
* Returns the components that are provided within an evaluation context.
|
370
|
+
* @param {any} context - The evaluation context to get the components from.
|
371
|
+
* @param {boolean} excludeNested - Exclude nested components.
|
372
|
+
* @param {Array<string>} excludedTypes - The types of components to exclude.
|
373
|
+
* @returns {Array} - The components within the evaluation context.
|
363
374
|
*/
|
364
|
-
export function getContextComponents(context: any, excludeNested
|
375
|
+
export function getContextComponents(context: any, excludeNested: boolean, excludedTypes?: Array<string>): any[];
|
365
376
|
/**
|
366
|
-
*
|
367
|
-
* @param context
|
377
|
+
* Returns the button components that are within an evaluation context.
|
378
|
+
* @param {any} context - The evaluation context to get the components from.
|
379
|
+
* @returns {Array} - The button components within the evaluation context.
|
368
380
|
*/
|
369
381
|
export function getContextButtons(context: any): any[];
|
370
382
|
/**
|
371
383
|
* Translates text values in html template.
|
372
|
-
* @param {string} template
|
373
|
-
* @param {Function} translate
|
374
|
-
* @returns {string}
|
375
|
-
* Html template with translated values.
|
384
|
+
* @param {string} template - The template to translate.
|
385
|
+
* @param {Function} translate - The translation function.
|
386
|
+
* @returns {string} - Html template with translated values.
|
376
387
|
*/
|
377
388
|
export function translateHTMLTemplate(template: string, translate: Function): string;
|
378
389
|
/**
|
379
390
|
* Sanitize an html string.
|
380
|
-
* @param string
|
381
|
-
* @param options
|
382
|
-
* @returns {
|
391
|
+
* @param {string} string - The string to sanitize.
|
392
|
+
* @param {any} options - The options to use for sanitization.
|
393
|
+
* @returns {string} - The sanitized html string.
|
383
394
|
*/
|
384
|
-
export function sanitize(string:
|
395
|
+
export function sanitize(string: string, options: any): string;
|
385
396
|
/**
|
386
397
|
* Fast cloneDeep for JSON objects only.
|
387
|
-
* @param obj
|
398
|
+
* @param {any} obj - The object to perform a fast clone deep against.
|
399
|
+
* @returns {any} - The cloned object.
|
388
400
|
*/
|
389
401
|
export function fastCloneDeep(obj: any): any;
|
390
402
|
/**
|
391
|
-
*
|
392
|
-
* @param componentJson
|
403
|
+
* Returns if the component is an input component.
|
404
|
+
* @param {import('@formio/core').Component} componentJson - The JSON of a component.
|
405
|
+
* @returns {bool} - TRUE if the component is an input component; FALSE otherwise.
|
393
406
|
*/
|
394
|
-
export function isInputComponent(componentJson:
|
407
|
+
export function isInputComponent(componentJson: import('@formio/core').Component): bool;
|
395
408
|
/**
|
396
|
-
*
|
397
|
-
* @param pathStr
|
409
|
+
* Takes a component path, and returns a component path array.
|
410
|
+
* @param {string} pathStr - The path string to convert to an array.
|
411
|
+
* @returns {Arryay<number>} - The array of paths.
|
398
412
|
*/
|
399
|
-
export function getArrayFromComponentPath(pathStr:
|
413
|
+
export function getArrayFromComponentPath(pathStr: string): Arryay<number>;
|
400
414
|
/**
|
401
|
-
*
|
402
|
-
* @param child
|
403
|
-
* @param parent
|
415
|
+
* Returns true if the component is a child of the parent.
|
416
|
+
* @param {any} child - The child component to check.
|
417
|
+
* @param {any} parent - The parent component to check.
|
418
|
+
* @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.
|
404
419
|
*/
|
405
420
|
export function isChildOf(child: any, parent: any): boolean;
|
406
421
|
/**
|
407
|
-
*
|
408
|
-
* @param path
|
422
|
+
* Takes an array of component path indexes, and returns a string version of that array.
|
423
|
+
* @param {Array<number>} path - The path array to convert to a string.
|
424
|
+
* @returns {string} - The string version of the path.
|
409
425
|
*/
|
410
|
-
export function getStringFromComponentPath(path:
|
426
|
+
export function getStringFromComponentPath(path: Array<number>): string;
|
411
427
|
/**
|
412
|
-
*
|
413
|
-
* @param number
|
414
|
-
* @param precision
|
428
|
+
* Takes a number and rounds it to the provided precision amount.
|
429
|
+
* @param {number} number - The number to round.
|
430
|
+
* @param {number} precision - The precision to round the number to.
|
431
|
+
* @returns {string} - The rounded number.
|
415
432
|
*/
|
416
|
-
export function round(number:
|
433
|
+
export function round(number: number, precision: number): string;
|
417
434
|
/**
|
418
435
|
* Check for Internet Explorer browser version
|
419
|
-
* @returns {(number|null)}
|
436
|
+
* @returns {(number|null)} - The IE browser version or null if not IE
|
420
437
|
*/
|
421
438
|
export function getIEBrowserVersion(): (number | null);
|
422
439
|
/**
|
@@ -426,61 +443,67 @@ export function getIEBrowserVersion(): (number | null);
|
|
426
443
|
*/
|
427
444
|
export function getBrowserInfo(): object;
|
428
445
|
/**
|
429
|
-
*
|
430
|
-
* @param path
|
446
|
+
* Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.
|
447
|
+
* @param {string} path - The path to remove the indicies from.
|
448
|
+
* @returns {string} - The path without the indicies.
|
431
449
|
*/
|
432
450
|
export function getComponentPathWithoutIndicies(path?: string): string;
|
433
451
|
/**
|
434
452
|
* Returns a path to the component which based on its schema
|
435
|
-
* @param {
|
436
|
-
* @param path
|
453
|
+
* @param {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property
|
454
|
+
* @param {string} path - Path to the component
|
455
|
+
* @returns {string} - Path to the component
|
437
456
|
*/
|
438
|
-
export function getComponentPath(component:
|
457
|
+
export function getComponentPath(component: import('@formio/core').Component, path?: string): string;
|
439
458
|
/**
|
440
459
|
* Returns a parent component of the passed component instance skipping all the Layout components
|
441
|
-
* @param {
|
442
|
-
* @returns {
|
460
|
+
* @param {Component} componentInstance - The component to check for the parent.
|
461
|
+
* @returns {Component|undefined} - The parent data component.
|
443
462
|
*/
|
444
|
-
export function getDataParentComponent(componentInstance:
|
463
|
+
export function getDataParentComponent(componentInstance: Component): Component | undefined;
|
445
464
|
/**
|
446
465
|
* Returns whether the value is a promise
|
447
|
-
* @param value
|
448
|
-
* @returns {boolean}
|
466
|
+
* @param {any} value - The value to check
|
467
|
+
* @returns {boolean} - TRUE if the value is a promise; FALSE otherwise
|
449
468
|
*/
|
450
469
|
export function isPromise(value: any): boolean;
|
451
470
|
/**
|
452
471
|
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
453
472
|
* changes by itself, e.g. EditGrid)
|
454
|
-
* @param componentInstance
|
455
|
-
* @param firstPass
|
456
|
-
* @returns {boolean
|
473
|
+
* @param {Component} componentInstance - The component to check for the scoping parent.
|
474
|
+
* @param {boolean} firstPass - Whether it is the first pass of the function
|
475
|
+
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
457
476
|
*/
|
458
|
-
export function isInsideScopingComponent(componentInstance:
|
477
|
+
export function isInsideScopingComponent(componentInstance: Component, firstPass?: boolean): boolean | any;
|
459
478
|
/**
|
460
|
-
*
|
461
|
-
* @param element
|
479
|
+
* Returns all the focusable elements within the provided dom element.
|
480
|
+
* @param {HTMLElement} element - The element to get the focusable elements from.
|
481
|
+
* @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.
|
462
482
|
*/
|
463
|
-
export function getFocusableElements(element:
|
483
|
+
export function getFocusableElements(element: HTMLElement): NodeList<HTMLElement>;
|
464
484
|
/**
|
465
|
-
*
|
466
|
-
* @param fullSchema
|
485
|
+
* Returns the saved types for the component
|
486
|
+
* @param {import('@formio/core').Component} fullSchema - The component schema
|
487
|
+
* @returns {Array<string>|null} - The saved types for the component
|
467
488
|
*/
|
468
|
-
export function getComponentSavedTypes(fullSchema:
|
489
|
+
export function getComponentSavedTypes(fullSchema: import('@formio/core').Component): Array<string> | null;
|
469
490
|
/**
|
470
|
-
*
|
471
|
-
* @param template
|
491
|
+
* Returns the template keys inside the template code.
|
492
|
+
* @param {string} template - The template to get the keys from.
|
493
|
+
* @returns {Array<string>} - The keys inside the template.
|
472
494
|
*/
|
473
|
-
export function getItemTemplateKeys(template:
|
495
|
+
export function getItemTemplateKeys(template: string): Array<string>;
|
474
496
|
/**
|
475
|
-
*
|
476
|
-
* @param comp
|
497
|
+
* Returns if the component is a select resource with an object for its value.
|
498
|
+
* @param {import('@formio/core').Component} comp - The component to check.
|
499
|
+
* @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.
|
477
500
|
*/
|
478
|
-
export function isSelectResourceWithObjectValue(comp?:
|
501
|
+
export function isSelectResourceWithObjectValue(comp?: import('@formio/core').Component): boolean;
|
479
502
|
export * from "./formUtils";
|
480
503
|
/**
|
481
504
|
* Map values through unfold and return first non-nil value.
|
482
|
-
* @param {Array<T>} collection
|
483
|
-
* @returns {T}
|
505
|
+
* @param {Array<T>} collection - The collection to map through unfold.;
|
506
|
+
* @returns {T} - The first non-nil value.
|
484
507
|
*/
|
485
508
|
export const firstNonNil: any;
|
486
509
|
export namespace componentValueTypes {
|
@@ -492,7 +515,7 @@ export namespace componentValueTypes {
|
|
492
515
|
let date: string;
|
493
516
|
let any: string;
|
494
517
|
}
|
495
|
-
export function interpolateErrors(component:
|
518
|
+
export function interpolateErrors(component: Component, errors: FieldError[], interpolateFn: Function): [];
|
496
519
|
import jsonLogic from 'json-logic-js';
|
497
520
|
import ConditionOperators from './conditionOperators';
|
498
521
|
import { Evaluator } from './Evaluator';
|