@formio/js 5.0.0-dev.5610.da13e39 → 5.0.0-dev.5613.3476921
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/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 +1199 -651
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +11 -3
- package/dist/formio.full.js +919 -691
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +11 -3
- package/dist/formio.js +16 -16
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +493 -1861
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -12
- package/lib/cjs/Element.d.ts +96 -86
- package/lib/cjs/Element.js +78 -68
- package/lib/cjs/Form.d.ts +36 -365
- package/lib/cjs/Form.js +64 -50
- package/lib/cjs/FormBuilder.d.ts +2 -187
- package/lib/cjs/FormBuilder.js +8 -30
- package/lib/cjs/PDF.d.ts +13 -11
- package/lib/cjs/PDF.js +8 -6
- package/lib/cjs/Webform.d.ts +139 -180
- package/lib/cjs/Webform.js +298 -313
- package/lib/cjs/WebformBuilder.d.ts +14 -16
- package/lib/cjs/WebformBuilder.js +11 -17
- package/lib/cjs/Wizard.d.ts +21 -31
- package/lib/cjs/Wizard.js +19 -42
- package/lib/cjs/WizardBuilder.d.ts +1 -1
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +5 -8
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -6
- package/lib/cjs/components/Components.d.ts +4 -4
- package/lib/cjs/components/Components.js +3 -3
- package/lib/cjs/components/_classes/component/Component.d.ts +269 -502
- package/lib/cjs/components/_classes/component/Component.form.d.ts +3 -6
- package/lib/cjs/components/_classes/component/Component.form.js +0 -5
- package/lib/cjs/components/_classes/component/Component.js +189 -433
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
- package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
- package/lib/cjs/components/_classes/field/Field.d.ts +2 -11
- package/lib/cjs/components/_classes/field/Field.js +1 -13
- package/lib/cjs/components/_classes/input/Input.d.ts +3 -4
- package/lib/cjs/components/_classes/input/Input.js +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +3 -6
- package/lib/cjs/components/_classes/list/ListComponent.form.js +0 -5
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +12 -43
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +3 -37
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +67 -163
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +3 -6
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +0 -5
- package/lib/cjs/components/_classes/nested/NestedComponent.js +54 -175
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -7
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +3 -2
- package/lib/cjs/components/address/Address.d.ts +2 -4
- package/lib/cjs/components/address/Address.form.d.ts +3 -6
- package/lib/cjs/components/address/Address.form.js +0 -5
- package/lib/cjs/components/button/Button.d.ts +12 -3
- package/lib/cjs/components/button/Button.form.d.ts +3 -6
- package/lib/cjs/components/button/Button.form.js +0 -5
- package/lib/cjs/components/button/Button.js +0 -5
- package/lib/cjs/components/checkbox/Checkbox.d.ts +27 -4
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +3 -6
- package/lib/cjs/components/checkbox/Checkbox.form.js +0 -5
- package/lib/cjs/components/columns/Columns.d.ts +2 -3
- package/lib/cjs/components/columns/Columns.form.d.ts +3 -6
- package/lib/cjs/components/columns/Columns.form.js +0 -5
- package/lib/cjs/components/columns/Columns.js +1 -1
- package/lib/cjs/components/container/Container.form.d.ts +3 -6
- package/lib/cjs/components/container/Container.form.js +0 -5
- package/lib/cjs/components/content/Content.d.ts +1 -2
- package/lib/cjs/components/content/Content.form.d.ts +3 -6
- package/lib/cjs/components/content/Content.form.js +0 -5
- package/lib/cjs/components/currency/Currency.form.d.ts +3 -6
- package/lib/cjs/components/currency/Currency.form.js +0 -5
- package/lib/cjs/components/currency/Currency.js +2 -1
- package/lib/cjs/components/datagrid/DataGrid.d.ts +7 -8
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +3 -6
- package/lib/cjs/components/datagrid/DataGrid.form.js +0 -5
- package/lib/cjs/components/datagrid/DataGrid.js +5 -5
- package/lib/cjs/components/datamap/DataMap.d.ts +0 -1
- package/lib/cjs/components/datamap/DataMap.form.d.ts +3 -6
- package/lib/cjs/components/datamap/DataMap.form.js +0 -5
- package/lib/cjs/components/datetime/DateTime.d.ts +14 -0
- package/lib/cjs/components/datetime/DateTime.form.d.ts +3 -6
- package/lib/cjs/components/datetime/DateTime.form.js +0 -5
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
- package/lib/cjs/components/day/Day.d.ts +48 -22
- package/lib/cjs/components/day/Day.form.d.ts +3 -6
- package/lib/cjs/components/day/Day.form.js +0 -5
- package/lib/cjs/components/day/Day.js +20 -15
- package/lib/cjs/components/editgrid/EditGrid.d.ts +3 -7
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +3 -6
- package/lib/cjs/components/editgrid/EditGrid.form.js +0 -5
- package/lib/cjs/components/editgrid/EditGrid.js +3 -3
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +5 -2
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +9 -6
- package/lib/cjs/components/email/Email.form.d.ts +3 -6
- package/lib/cjs/components/email/Email.form.js +0 -5
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +3 -6
- package/lib/cjs/components/fieldset/Fieldset.form.js +0 -5
- package/lib/cjs/components/file/File.d.ts +22 -9
- package/lib/cjs/components/file/File.form.d.ts +3 -6
- package/lib/cjs/components/file/File.form.js +0 -5
- package/lib/cjs/components/form/Form.d.ts +20 -31
- package/lib/cjs/components/form/Form.form.d.ts +3 -6
- package/lib/cjs/components/form/Form.form.js +0 -5
- package/lib/cjs/components/form/Form.js +10 -13
- package/lib/cjs/components/hidden/Hidden.d.ts +11 -1
- package/lib/cjs/components/hidden/Hidden.form.d.ts +3 -6
- package/lib/cjs/components/hidden/Hidden.form.js +0 -5
- package/lib/cjs/components/hidden/Hidden.js +2 -1
- package/lib/cjs/components/html/HTML.d.ts +1 -2
- package/lib/cjs/components/html/HTML.form.d.ts +3 -6
- package/lib/cjs/components/html/HTML.form.js +0 -5
- package/lib/cjs/components/number/Number.d.ts +17 -3
- package/lib/cjs/components/number/Number.form.d.ts +3 -6
- package/lib/cjs/components/number/Number.form.js +0 -5
- package/lib/cjs/components/number/Number.js +2 -1
- package/lib/cjs/components/panel/Panel.form.d.ts +3 -6
- package/lib/cjs/components/panel/Panel.form.js +0 -5
- package/lib/cjs/components/panel/Panel.js +1 -0
- package/lib/cjs/components/password/Password.form.d.ts +3 -6
- package/lib/cjs/components/password/Password.form.js +0 -5
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +3 -6
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +0 -5
- package/lib/cjs/components/radio/Radio.d.ts +26 -3
- package/lib/cjs/components/radio/Radio.form.d.ts +3 -6
- package/lib/cjs/components/radio/Radio.form.js +0 -5
- package/lib/cjs/components/radio/Radio.js +4 -3
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -5
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +0 -4
- package/lib/cjs/components/select/Select.d.ts +39 -16
- package/lib/cjs/components/select/Select.form.d.ts +3 -6
- package/lib/cjs/components/select/Select.form.js +0 -5
- package/lib/cjs/components/select/Select.js +16 -13
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +17 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +3 -6
- package/lib/cjs/components/selectboxes/SelectBoxes.form.js +0 -5
- package/lib/cjs/components/selectboxes/SelectBoxes.js +9 -7
- package/lib/cjs/components/signature/Signature.d.ts +14 -1
- package/lib/cjs/components/signature/Signature.form.d.ts +3 -6
- package/lib/cjs/components/signature/Signature.form.js +0 -5
- package/lib/cjs/components/survey/Survey.d.ts +15 -3
- package/lib/cjs/components/survey/Survey.form.d.ts +3 -6
- package/lib/cjs/components/survey/Survey.form.js +0 -5
- package/lib/cjs/components/table/Table.d.ts +1 -2
- package/lib/cjs/components/table/Table.form.d.ts +3 -6
- package/lib/cjs/components/table/Table.form.js +0 -5
- package/lib/cjs/components/tabs/Tabs.d.ts +4 -4
- package/lib/cjs/components/tabs/Tabs.form.d.ts +3 -6
- package/lib/cjs/components/tabs/Tabs.form.js +0 -5
- package/lib/cjs/components/tabs/Tabs.js +2 -1
- package/lib/cjs/components/tags/Tags.d.ts +14 -0
- package/lib/cjs/components/tags/Tags.form.d.ts +3 -6
- package/lib/cjs/components/tags/Tags.form.js +0 -5
- package/lib/cjs/components/textarea/TextArea.d.ts +9 -4
- package/lib/cjs/components/textarea/TextArea.form.d.ts +3 -6
- package/lib/cjs/components/textarea/TextArea.form.js +0 -5
- package/lib/cjs/components/textarea/TextArea.js +2 -2
- package/lib/cjs/components/textfield/TextField.d.ts +30 -14
- package/lib/cjs/components/textfield/TextField.form.d.ts +3 -6
- package/lib/cjs/components/textfield/TextField.form.js +0 -5
- package/lib/cjs/components/textfield/TextField.js +16 -13
- package/lib/cjs/components/time/Time.form.d.ts +3 -6
- package/lib/cjs/components/time/Time.form.js +0 -5
- package/lib/cjs/components/unknown/Unknown.form.d.ts +34 -5
- package/lib/cjs/components/unknown/Unknown.form.js +0 -4
- package/lib/cjs/components/url/Url.form.d.ts +3 -6
- package/lib/cjs/components/url/Url.form.js +0 -5
- package/lib/cjs/components/well/Well.form.d.ts +3 -6
- package/lib/cjs/components/well/Well.form.js +0 -5
- package/lib/cjs/formio.embed.d.ts +2 -1
- package/lib/cjs/formio.embed.js +100 -2
- package/lib/cjs/formio.form.d.ts +4 -11
- package/lib/cjs/formio.form.js +5 -13
- package/lib/cjs/providers/Providers.d.ts +5 -36
- package/lib/cjs/providers/Providers.js +0 -29
- package/lib/cjs/providers/address/AddressProvider.d.ts +12 -131
- package/lib/cjs/providers/address/AddressProvider.js +2 -88
- package/lib/cjs/providers/address/AzureAddressProvider.d.ts +1 -48
- package/lib/cjs/providers/address/AzureAddressProvider.js +0 -37
- package/lib/cjs/providers/address/CustomAddressProvider.d.ts +4 -27
- package/lib/cjs/providers/address/CustomAddressProvider.js +0 -34
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +6 -130
- package/lib/cjs/providers/address/GoogleAddressProvider.js +0 -72
- package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +7 -32
- package/lib/cjs/providers/address/NominatimAddressProvider.js +0 -33
- package/lib/cjs/providers/address/index.d.ts +1 -3
- package/lib/cjs/providers/processor/fileProcessor.d.ts +1 -7
- package/lib/cjs/providers/processor/fileProcessor.js +0 -6
- package/lib/cjs/providers/storage/azure.d.ts +13 -6
- package/lib/cjs/providers/storage/azure.js +0 -5
- package/lib/cjs/providers/storage/base64.d.ts +6 -5
- package/lib/cjs/providers/storage/base64.js +0 -4
- package/lib/cjs/providers/storage/dropbox.d.ts +4 -6
- package/lib/cjs/providers/storage/dropbox.js +0 -5
- package/lib/cjs/providers/storage/googleDrive.d.ts +5 -7
- package/lib/cjs/providers/storage/googleDrive.js +0 -6
- package/lib/cjs/providers/storage/indexeddb.d.ts +7 -5
- package/lib/cjs/providers/storage/indexeddb.js +0 -4
- package/lib/cjs/providers/storage/s3.d.ts +20 -6
- package/lib/cjs/providers/storage/s3.js +0 -5
- package/lib/cjs/providers/storage/url.d.ts +7 -6
- package/lib/cjs/providers/storage/url.js +0 -10
- package/lib/cjs/providers/storage/util.d.ts +1 -24
- package/lib/cjs/providers/storage/util.js +0 -18
- package/lib/cjs/templates/Templates.d.ts +0 -1
- package/lib/cjs/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +1 -0
- package/lib/cjs/utils/Evaluator.d.ts +3 -6
- package/lib/cjs/utils/Evaluator.js +20 -11
- package/lib/cjs/utils/builder.d.ts +7 -9
- package/lib/cjs/utils/builder.js +5 -10
- package/lib/cjs/utils/calendarUtils.d.ts +13 -7
- package/lib/cjs/utils/calendarUtils.js +17 -10
- package/lib/cjs/utils/formUtils.d.ts +171 -43
- package/lib/cjs/utils/formUtils.js +569 -38
- package/lib/cjs/utils/utils.d.ts +216 -362
- package/lib/cjs/utils/utils.js +224 -331
- package/lib/cjs/widgets/CalendarWidget.d.ts +10 -9
- package/lib/cjs/widgets/CalendarWidget.js +11 -9
- package/lib/mjs/Element.d.ts +96 -86
- package/lib/mjs/Element.js +78 -68
- package/lib/mjs/Form.d.ts +36 -365
- package/lib/mjs/Form.js +57 -140
- package/lib/mjs/FormBuilder.d.ts +2 -187
- package/lib/mjs/FormBuilder.js +8 -32
- package/lib/mjs/PDF.d.ts +13 -11
- package/lib/mjs/PDF.js +8 -6
- package/lib/mjs/Webform.d.ts +139 -180
- package/lib/mjs/Webform.js +310 -325
- package/lib/mjs/WebformBuilder.d.ts +14 -16
- package/lib/mjs/WebformBuilder.js +11 -16
- package/lib/mjs/Wizard.d.ts +21 -31
- package/lib/mjs/Wizard.js +18 -41
- package/lib/mjs/WizardBuilder.d.ts +1 -1
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +5 -8
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -6
- package/lib/mjs/components/Components.d.ts +4 -4
- package/lib/mjs/components/Components.js +3 -3
- package/lib/mjs/components/_classes/component/Component.d.ts +269 -502
- package/lib/mjs/components/_classes/component/Component.form.d.ts +3 -6
- package/lib/mjs/components/_classes/component/Component.form.js +0 -5
- package/lib/mjs/components/_classes/component/Component.js +189 -433
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/mjs/components/_classes/field/Field.d.ts +2 -11
- package/lib/mjs/components/_classes/field/Field.js +1 -13
- package/lib/mjs/components/_classes/input/Input.d.ts +3 -4
- package/lib/mjs/components/_classes/input/Input.js +2 -2
- package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +3 -6
- package/lib/mjs/components/_classes/list/ListComponent.form.js +0 -5
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +12 -43
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +3 -37
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +67 -163
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +3 -6
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +0 -5
- package/lib/mjs/components/_classes/nested/NestedComponent.js +54 -175
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -7
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +3 -2
- package/lib/mjs/components/address/Address.d.ts +2 -4
- package/lib/mjs/components/address/Address.form.d.ts +3 -6
- package/lib/mjs/components/address/Address.form.js +0 -5
- package/lib/mjs/components/button/Button.d.ts +12 -3
- package/lib/mjs/components/button/Button.form.d.ts +3 -6
- package/lib/mjs/components/button/Button.form.js +0 -5
- package/lib/mjs/components/button/Button.js +0 -5
- package/lib/mjs/components/checkbox/Checkbox.d.ts +27 -4
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +3 -6
- package/lib/mjs/components/checkbox/Checkbox.form.js +0 -5
- package/lib/mjs/components/columns/Columns.d.ts +2 -3
- package/lib/mjs/components/columns/Columns.form.d.ts +3 -6
- package/lib/mjs/components/columns/Columns.form.js +0 -5
- package/lib/mjs/components/columns/Columns.js +1 -1
- package/lib/mjs/components/container/Container.form.d.ts +3 -6
- package/lib/mjs/components/container/Container.form.js +0 -5
- package/lib/mjs/components/content/Content.d.ts +1 -2
- package/lib/mjs/components/content/Content.form.d.ts +3 -6
- package/lib/mjs/components/content/Content.form.js +0 -5
- package/lib/mjs/components/currency/Currency.form.d.ts +3 -6
- package/lib/mjs/components/currency/Currency.form.js +0 -5
- package/lib/mjs/components/currency/Currency.js +2 -1
- package/lib/mjs/components/datagrid/DataGrid.d.ts +7 -8
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +3 -6
- package/lib/mjs/components/datagrid/DataGrid.form.js +0 -5
- package/lib/mjs/components/datagrid/DataGrid.js +5 -5
- package/lib/mjs/components/datamap/DataMap.d.ts +0 -1
- package/lib/mjs/components/datamap/DataMap.form.d.ts +3 -6
- package/lib/mjs/components/datamap/DataMap.form.js +0 -5
- package/lib/mjs/components/datetime/DateTime.d.ts +14 -0
- package/lib/mjs/components/datetime/DateTime.form.d.ts +3 -6
- package/lib/mjs/components/datetime/DateTime.form.js +0 -5
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +48 -22
- package/lib/mjs/components/day/Day.form.d.ts +3 -6
- package/lib/mjs/components/day/Day.form.js +0 -5
- package/lib/mjs/components/day/Day.js +20 -15
- package/lib/mjs/components/editgrid/EditGrid.d.ts +3 -7
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +3 -6
- package/lib/mjs/components/editgrid/EditGrid.form.js +0 -5
- 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.js +1 -1
- package/lib/mjs/components/email/Email.form.d.ts +3 -6
- package/lib/mjs/components/email/Email.form.js +0 -5
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +3 -6
- package/lib/mjs/components/fieldset/Fieldset.form.js +0 -5
- package/lib/mjs/components/file/File.d.ts +22 -9
- package/lib/mjs/components/file/File.form.d.ts +3 -6
- package/lib/mjs/components/file/File.form.js +0 -5
- package/lib/mjs/components/form/Form.d.ts +20 -31
- package/lib/mjs/components/form/Form.form.d.ts +3 -6
- package/lib/mjs/components/form/Form.form.js +0 -5
- package/lib/mjs/components/form/Form.js +10 -13
- package/lib/mjs/components/hidden/Hidden.d.ts +11 -1
- package/lib/mjs/components/hidden/Hidden.form.d.ts +3 -6
- package/lib/mjs/components/hidden/Hidden.form.js +0 -5
- package/lib/mjs/components/hidden/Hidden.js +2 -1
- package/lib/mjs/components/html/HTML.d.ts +1 -2
- package/lib/mjs/components/html/HTML.form.d.ts +3 -6
- package/lib/mjs/components/html/HTML.form.js +0 -5
- package/lib/mjs/components/number/Number.d.ts +17 -3
- package/lib/mjs/components/number/Number.form.d.ts +3 -6
- package/lib/mjs/components/number/Number.form.js +0 -5
- package/lib/mjs/components/number/Number.js +2 -1
- package/lib/mjs/components/panel/Panel.form.d.ts +3 -6
- package/lib/mjs/components/panel/Panel.form.js +0 -5
- package/lib/mjs/components/panel/Panel.js +1 -0
- package/lib/mjs/components/password/Password.form.d.ts +3 -6
- package/lib/mjs/components/password/Password.form.js +0 -5
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +3 -6
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +0 -5
- package/lib/mjs/components/radio/Radio.d.ts +26 -3
- package/lib/mjs/components/radio/Radio.form.d.ts +3 -6
- package/lib/mjs/components/radio/Radio.form.js +0 -5
- package/lib/mjs/components/radio/Radio.js +4 -3
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -5
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +0 -4
- package/lib/mjs/components/select/Select.d.ts +39 -16
- package/lib/mjs/components/select/Select.form.d.ts +3 -6
- package/lib/mjs/components/select/Select.form.js +0 -5
- package/lib/mjs/components/select/Select.js +16 -13
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +17 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +3 -6
- package/lib/mjs/components/selectboxes/SelectBoxes.form.js +0 -5
- package/lib/mjs/components/selectboxes/SelectBoxes.js +9 -7
- package/lib/mjs/components/signature/Signature.d.ts +14 -1
- package/lib/mjs/components/signature/Signature.form.d.ts +3 -6
- package/lib/mjs/components/signature/Signature.form.js +0 -5
- package/lib/mjs/components/survey/Survey.d.ts +15 -3
- package/lib/mjs/components/survey/Survey.form.d.ts +3 -6
- package/lib/mjs/components/survey/Survey.form.js +0 -5
- package/lib/mjs/components/table/Table.d.ts +1 -2
- package/lib/mjs/components/table/Table.form.d.ts +3 -6
- package/lib/mjs/components/table/Table.form.js +0 -5
- package/lib/mjs/components/tabs/Tabs.d.ts +4 -4
- package/lib/mjs/components/tabs/Tabs.form.d.ts +3 -6
- package/lib/mjs/components/tabs/Tabs.form.js +0 -5
- package/lib/mjs/components/tabs/Tabs.js +2 -1
- package/lib/mjs/components/tags/Tags.d.ts +14 -0
- package/lib/mjs/components/tags/Tags.form.d.ts +3 -6
- package/lib/mjs/components/tags/Tags.form.js +0 -5
- package/lib/mjs/components/textarea/TextArea.d.ts +9 -4
- package/lib/mjs/components/textarea/TextArea.form.d.ts +3 -6
- package/lib/mjs/components/textarea/TextArea.form.js +0 -5
- package/lib/mjs/components/textarea/TextArea.js +2 -2
- package/lib/mjs/components/textfield/TextField.d.ts +30 -14
- package/lib/mjs/components/textfield/TextField.form.d.ts +3 -6
- package/lib/mjs/components/textfield/TextField.form.js +0 -5
- package/lib/mjs/components/textfield/TextField.js +16 -13
- package/lib/mjs/components/time/Time.form.d.ts +3 -6
- package/lib/mjs/components/time/Time.form.js +0 -5
- package/lib/mjs/components/unknown/Unknown.form.d.ts +34 -5
- package/lib/mjs/components/unknown/Unknown.form.js +0 -4
- package/lib/mjs/components/url/Url.form.d.ts +3 -6
- package/lib/mjs/components/url/Url.form.js +0 -5
- package/lib/mjs/components/well/Well.form.d.ts +3 -6
- package/lib/mjs/components/well/Well.form.js +0 -5
- package/lib/mjs/formio.embed.d.ts +2 -1
- package/lib/mjs/formio.embed.js +99 -2
- package/lib/mjs/formio.form.d.ts +4 -11
- package/lib/mjs/formio.form.js +3 -10
- package/lib/mjs/providers/Providers.d.ts +5 -36
- package/lib/mjs/providers/Providers.js +0 -29
- package/lib/mjs/providers/address/AddressProvider.d.ts +12 -131
- package/lib/mjs/providers/address/AddressProvider.js +2 -88
- package/lib/mjs/providers/address/AzureAddressProvider.d.ts +1 -48
- package/lib/mjs/providers/address/AzureAddressProvider.js +0 -37
- package/lib/mjs/providers/address/CustomAddressProvider.d.ts +4 -27
- package/lib/mjs/providers/address/CustomAddressProvider.js +0 -34
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +6 -130
- package/lib/mjs/providers/address/GoogleAddressProvider.js +0 -72
- package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +7 -32
- package/lib/mjs/providers/address/NominatimAddressProvider.js +0 -33
- package/lib/mjs/providers/address/index.d.ts +1 -3
- package/lib/mjs/providers/processor/fileProcessor.d.ts +1 -7
- package/lib/mjs/providers/processor/fileProcessor.js +0 -6
- package/lib/mjs/providers/storage/azure.d.ts +13 -6
- package/lib/mjs/providers/storage/azure.js +0 -5
- package/lib/mjs/providers/storage/base64.d.ts +6 -5
- package/lib/mjs/providers/storage/base64.js +0 -4
- package/lib/mjs/providers/storage/dropbox.d.ts +4 -6
- package/lib/mjs/providers/storage/dropbox.js +0 -5
- package/lib/mjs/providers/storage/googleDrive.d.ts +5 -7
- package/lib/mjs/providers/storage/googleDrive.js +0 -6
- package/lib/mjs/providers/storage/indexeddb.d.ts +7 -5
- package/lib/mjs/providers/storage/indexeddb.js +0 -4
- package/lib/mjs/providers/storage/s3.d.ts +20 -6
- package/lib/mjs/providers/storage/s3.js +0 -5
- package/lib/mjs/providers/storage/url.d.ts +7 -6
- package/lib/mjs/providers/storage/url.js +0 -10
- package/lib/mjs/providers/storage/util.d.ts +1 -24
- package/lib/mjs/providers/storage/util.js +0 -18
- package/lib/mjs/templates/Templates.d.ts +0 -1
- package/lib/mjs/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +1 -0
- package/lib/mjs/utils/Evaluator.d.ts +3 -6
- package/lib/mjs/utils/Evaluator.js +20 -9
- package/lib/mjs/utils/builder.d.ts +7 -9
- package/lib/mjs/utils/builder.js +5 -10
- package/lib/mjs/utils/calendarUtils.d.ts +13 -7
- package/lib/mjs/utils/calendarUtils.js +17 -10
- package/lib/mjs/utils/formUtils.d.ts +171 -43
- package/lib/mjs/utils/formUtils.js +554 -6
- package/lib/mjs/utils/utils.d.ts +216 -362
- package/lib/mjs/utils/utils.js +218 -325
- package/lib/mjs/widgets/CalendarWidget.d.ts +10 -9
- package/lib/mjs/widgets/CalendarWidget.js +11 -9
- package/package.json +22 -22
- package/embed.d.ts +0 -1
- package/form.d.ts +0 -1
- package/lib/cjs/InlineEmbed.d.ts +0 -7
- package/lib/cjs/InlineEmbed.js +0 -109
- package/lib/mjs/InlineEmbed.d.ts +0 -7
- package/lib/mjs/InlineEmbed.js +0 -105
- package/sdk.d.ts +0 -1
- package/utils.d.ts +0 -1
package/lib/mjs/Webform.d.ts
CHANGED
|
@@ -11,36 +11,36 @@
|
|
|
11
11
|
* @typedef {{[key: string]: JSON}} JSONObject
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
|
-
* @typedef {
|
|
15
|
-
* @property {
|
|
16
|
-
* @property {
|
|
17
|
-
* @property {
|
|
18
|
-
* @property {
|
|
19
|
-
* @property {
|
|
20
|
-
* @property {
|
|
21
|
-
* @property {
|
|
22
|
-
* @property {
|
|
23
|
-
* @property {
|
|
24
|
-
* @property {
|
|
14
|
+
* @typedef {Object} FormioHooks
|
|
15
|
+
* @property {function} [beforeSubmit]
|
|
16
|
+
* @property {function} [beforeCancel]
|
|
17
|
+
* @property {function} [beforeNext]
|
|
18
|
+
* @property {function} [beforePrev]
|
|
19
|
+
* @property {function} [attachComponent]
|
|
20
|
+
* @property {function} [setDataValue]
|
|
21
|
+
* @property {function} [addComponents]
|
|
22
|
+
* @property {function} [addComponent]
|
|
23
|
+
* @property {function} [customValidation]
|
|
24
|
+
* @property {function} [attachWebform]
|
|
25
25
|
*/
|
|
26
26
|
/**
|
|
27
|
-
* @typedef {
|
|
28
|
-
* @property {string[]} [addAttr]
|
|
29
|
-
* @property {string[]} [addTags]
|
|
30
|
-
* @property {string[]} [allowedAttrs]
|
|
31
|
-
* @property {string[]} [allowedTags]
|
|
32
|
-
* @property {string[]} [allowedUriRegex]
|
|
33
|
-
* @property {string[]} [addUriSafeAttr]
|
|
27
|
+
* @typedef {Object} SanitizeConfig
|
|
28
|
+
* @property {string[]} [addAttr]
|
|
29
|
+
* @property {string[]} [addTags]
|
|
30
|
+
* @property {string[]} [allowedAttrs]
|
|
31
|
+
* @property {string[]} [allowedTags]
|
|
32
|
+
* @property {string[]} [allowedUriRegex]
|
|
33
|
+
* @property {string[]} [addUriSafeAttr]
|
|
34
34
|
*/
|
|
35
35
|
/**
|
|
36
|
-
* @typedef {
|
|
37
|
-
* @property {boolean} [showPrevious]
|
|
38
|
-
* @property {boolean} [showNext]
|
|
39
|
-
* @property {boolean} [showCancel]
|
|
40
|
-
* @property {boolean} [showSubmit]
|
|
36
|
+
* @typedef {Object} ButtonSettings
|
|
37
|
+
* @property {boolean} [showPrevious]
|
|
38
|
+
* @property {boolean} [showNext]
|
|
39
|
+
* @property {boolean} [showCancel]
|
|
40
|
+
* @property {boolean} [showSubmit]
|
|
41
41
|
*/
|
|
42
42
|
/**
|
|
43
|
-
* @typedef {
|
|
43
|
+
* @typedef {Object} FormOptions
|
|
44
44
|
* @property {boolean} [saveDraft] - Enable the save draft feature.
|
|
45
45
|
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
|
46
46
|
* @property {boolean} [readOnly] - Set this form to readOnly.
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* @property {string} [componentErrorClass] - The error class for components.
|
|
59
59
|
* @property {any} [templates] - The templates for this form.
|
|
60
60
|
* @property {string} [iconset] - The iconset for this form.
|
|
61
|
-
* @property {
|
|
61
|
+
* @property {Component[]} [components] - The components for this form.
|
|
62
62
|
* @property {{[key: string]: boolean}} [disabled] - Disabled components for this form.
|
|
63
63
|
* @property {boolean} [showHiddenFields] - Show hidden fields.
|
|
64
64
|
* @property {{[key: string]: boolean}} [hide] - Hidden components for this form.
|
|
@@ -75,25 +75,27 @@
|
|
|
75
75
|
* @property {boolean} [sanitize] - Sanitize the form.
|
|
76
76
|
* @property {SanitizeConfig} [sanitizeConfig] - The sanitize configuration for this form.
|
|
77
77
|
* @property {ButtonSettings} [buttonSettings] - The button settings for this form.
|
|
78
|
-
* @property {
|
|
78
|
+
* @property {Object} [breadCrumbSettings] - The breadcrumb settings for this form.
|
|
79
79
|
* @property {boolean} [allowPrevious] - Allow the previous button (for Wizard forms).
|
|
80
80
|
* @property {string[]} [wizardButtonOrder] - The order of the buttons (for Wizard forms).
|
|
81
81
|
* @property {boolean} [showCheckboxBackground] - Show the checkbox background.
|
|
82
|
-
* @property {boolean} [inputsOnly] - Only show inputs in the form and no labels.
|
|
83
|
-
* @property {boolean} [building] - If we are in the process of building the form.
|
|
84
82
|
* @property {number} [zoom] - The zoom for PDF forms.
|
|
85
83
|
*/
|
|
84
|
+
/**
|
|
85
|
+
* Renders a Form.io form within the webpage.
|
|
86
|
+
*/
|
|
86
87
|
declare class Webform extends NestedDataComponent {
|
|
87
88
|
/**
|
|
88
89
|
* Creates a new Form instance.
|
|
89
|
-
*
|
|
90
|
-
* @param {
|
|
90
|
+
*
|
|
91
|
+
* @param {HTMLElement | Object | FormOptions} [elementOrOptions] - The DOM element to render this form within or the options to create this form instance.
|
|
92
|
+
* @param {FormOptions} [options] - The options to create a new form instance.
|
|
91
93
|
*/
|
|
92
|
-
constructor(elementOrOptions?: HTMLElement |
|
|
94
|
+
constructor(elementOrOptions?: HTMLElement | Object | FormOptions, options?: FormOptions | undefined);
|
|
93
95
|
/**
|
|
94
|
-
* @type {
|
|
96
|
+
* @type {FormOptions} - the options for this Webform.
|
|
95
97
|
*/
|
|
96
|
-
options:
|
|
98
|
+
options: FormOptions;
|
|
97
99
|
_src: string;
|
|
98
100
|
_loading: boolean;
|
|
99
101
|
_form: {};
|
|
@@ -104,11 +106,13 @@ declare class Webform extends NestedDataComponent {
|
|
|
104
106
|
get nosubmit(): any;
|
|
105
107
|
/**
|
|
106
108
|
* Determines if the form has tried to be submitted, error or not.
|
|
109
|
+
*
|
|
107
110
|
* @type {boolean}
|
|
108
111
|
*/
|
|
109
112
|
submitted: boolean;
|
|
110
113
|
/**
|
|
111
114
|
* Determines if the form is being submitted at the moment.
|
|
115
|
+
*
|
|
112
116
|
* @type {boolean}
|
|
113
117
|
*/
|
|
114
118
|
submitting: boolean;
|
|
@@ -140,6 +144,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
140
144
|
/**
|
|
141
145
|
* Promise that executes when the form is ready and rendered.
|
|
142
146
|
* @type {Promise}
|
|
147
|
+
*
|
|
143
148
|
* @example
|
|
144
149
|
* import Webform from '@formio/js/Webform';
|
|
145
150
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -151,17 +156,20 @@ declare class Webform extends NestedDataComponent {
|
|
|
151
156
|
formReady: Promise<any>;
|
|
152
157
|
/**
|
|
153
158
|
* Called when the formReady state of this form has been resolved.
|
|
154
|
-
*
|
|
159
|
+
*
|
|
160
|
+
* @type {function}
|
|
155
161
|
*/
|
|
156
162
|
formReadyResolve: Function;
|
|
157
163
|
/**
|
|
158
164
|
* Called when this form could not load and is rejected.
|
|
159
|
-
*
|
|
165
|
+
*
|
|
166
|
+
* @type {function}
|
|
160
167
|
*/
|
|
161
168
|
formReadyReject: Function;
|
|
162
169
|
/**
|
|
163
170
|
* Promise that executes when the submission is ready and rendered.
|
|
164
171
|
* @type {Promise}
|
|
172
|
+
*
|
|
165
173
|
* @example
|
|
166
174
|
* import Webform from '@formio/js/Webform';
|
|
167
175
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -173,39 +181,45 @@ declare class Webform extends NestedDataComponent {
|
|
|
173
181
|
submissionReady: Promise<any>;
|
|
174
182
|
/**
|
|
175
183
|
* Called when the formReady state of this form has been resolved.
|
|
176
|
-
*
|
|
184
|
+
*
|
|
185
|
+
* @type {function}
|
|
177
186
|
*/
|
|
178
187
|
submissionReadyResolve: Function;
|
|
179
188
|
/**
|
|
180
189
|
* Called when this form could not load and is rejected.
|
|
181
|
-
*
|
|
190
|
+
*
|
|
191
|
+
* @type {function}
|
|
182
192
|
*/
|
|
183
193
|
submissionReadyReject: Function;
|
|
184
194
|
shortcuts: any[];
|
|
185
195
|
/**
|
|
186
196
|
* Sets the language for this form.
|
|
187
|
-
*
|
|
197
|
+
*
|
|
198
|
+
* @param lang
|
|
199
|
+
* @return {Promise}
|
|
188
200
|
*/
|
|
189
|
-
set language(lang: string);
|
|
190
|
-
get language(): string;
|
|
201
|
+
set language(lang: string | undefined);
|
|
202
|
+
get language(): string | undefined;
|
|
191
203
|
root: this;
|
|
192
204
|
localRoot: this;
|
|
193
205
|
get emptyValue(): null;
|
|
194
206
|
get shadowRoot(): any;
|
|
195
207
|
/**
|
|
196
208
|
* Add a language for translations
|
|
197
|
-
*
|
|
198
|
-
* @param
|
|
199
|
-
* @param
|
|
209
|
+
*
|
|
210
|
+
* @param code
|
|
211
|
+
* @param lang
|
|
212
|
+
* @param active
|
|
213
|
+
* @return {*}
|
|
200
214
|
*/
|
|
201
|
-
addLanguage(code:
|
|
215
|
+
addLanguage(code: any, lang: any, active?: boolean): any;
|
|
202
216
|
keyboardCatchableElement(element: any): boolean;
|
|
203
217
|
executeShortcuts: (event: any) => void;
|
|
204
|
-
addShortcut(element: any, shortcut: any): void;
|
|
205
|
-
removeShortcut(element: any, shortcut: any): void;
|
|
206
218
|
/**
|
|
207
219
|
* Set the Form source, which is typically the Form.io embed URL.
|
|
220
|
+
*
|
|
208
221
|
* @param {string} value - The value of the form embed url.
|
|
222
|
+
*
|
|
209
223
|
* @example
|
|
210
224
|
* import Webform from '@formio/js/Webform';
|
|
211
225
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -217,56 +231,62 @@ declare class Webform extends NestedDataComponent {
|
|
|
217
231
|
set src(value: string);
|
|
218
232
|
/**
|
|
219
233
|
* Get the embed source of the form.
|
|
220
|
-
*
|
|
234
|
+
*
|
|
235
|
+
* @returns {string}
|
|
221
236
|
*/
|
|
222
237
|
get src(): string;
|
|
223
238
|
/**
|
|
224
239
|
* Loads the submission if applicable.
|
|
225
|
-
* @returns {Promise} - The promise that is triggered when the submission is loaded.
|
|
226
240
|
*/
|
|
227
241
|
loadSubmission(): Promise<any>;
|
|
228
242
|
loadingSubmission: boolean | undefined;
|
|
229
243
|
/**
|
|
230
244
|
* Set the src of the form renderer.
|
|
231
|
-
*
|
|
232
|
-
* @param
|
|
233
|
-
* @
|
|
245
|
+
*
|
|
246
|
+
* @param value
|
|
247
|
+
* @param options
|
|
234
248
|
*/
|
|
235
|
-
setSrc(value:
|
|
249
|
+
setSrc(value: any, options: any): any;
|
|
236
250
|
/**
|
|
237
251
|
* Set the form source but don't initialize the form and submission from the url.
|
|
252
|
+
*
|
|
238
253
|
* @param {string} value - The value of the form embed url.
|
|
239
254
|
*/
|
|
240
255
|
set url(value: string);
|
|
241
256
|
/**
|
|
242
257
|
* Get the embed source of the form.
|
|
243
|
-
*
|
|
258
|
+
*
|
|
259
|
+
* @returns {string}
|
|
244
260
|
*/
|
|
245
261
|
get url(): string;
|
|
246
262
|
/**
|
|
247
263
|
* Sets the url of the form renderer.
|
|
248
|
-
*
|
|
249
|
-
* @param
|
|
250
|
-
* @
|
|
264
|
+
*
|
|
265
|
+
* @param value
|
|
266
|
+
* @param options
|
|
251
267
|
*/
|
|
252
|
-
setUrl(value:
|
|
268
|
+
setUrl(value: any, options: any): boolean;
|
|
253
269
|
/**
|
|
254
270
|
* Called when both the form and submission have been loaded.
|
|
271
|
+
*
|
|
255
272
|
* @returns {Promise} - The promise to trigger when both form and submission have loaded.
|
|
256
273
|
*/
|
|
257
274
|
get ready(): Promise<any>;
|
|
258
275
|
/**
|
|
259
276
|
* Set the loading state for this form, and also show the loader spinner.
|
|
277
|
+
*
|
|
260
278
|
* @param {boolean} loading - If this form should be "loading" or not.
|
|
261
279
|
*/
|
|
262
280
|
set loading(loading: boolean);
|
|
263
281
|
/**
|
|
264
282
|
* Returns if this form is loading.
|
|
283
|
+
*
|
|
265
284
|
* @returns {boolean} - TRUE means the form is loading, FALSE otherwise.
|
|
266
285
|
*/
|
|
267
286
|
get loading(): boolean;
|
|
268
287
|
/**
|
|
269
288
|
* Sets the JSON schema for the form to be rendered.
|
|
289
|
+
*
|
|
270
290
|
* @example
|
|
271
291
|
* import Webform from '@formio/js/Webform';
|
|
272
292
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -294,25 +314,29 @@ declare class Webform extends NestedDataComponent {
|
|
|
294
314
|
* }
|
|
295
315
|
* ]
|
|
296
316
|
* });
|
|
297
|
-
*
|
|
298
|
-
* @param {
|
|
299
|
-
* @
|
|
317
|
+
*
|
|
318
|
+
* @param {Object} form - The JSON schema of the form @see https://examples.form.io/example for an example JSON schema.
|
|
319
|
+
* @param flags
|
|
320
|
+
* @returns {*}
|
|
300
321
|
*/
|
|
301
|
-
setForm(form:
|
|
322
|
+
setForm(form: Object, flags: any): any;
|
|
302
323
|
initialized: boolean | undefined;
|
|
303
324
|
/**
|
|
304
325
|
* Sets the form value.
|
|
326
|
+
*
|
|
305
327
|
* @alias setForm
|
|
306
|
-
* @param {
|
|
328
|
+
* @param {Object} form - The form schema object.
|
|
307
329
|
*/
|
|
308
|
-
set form(form:
|
|
330
|
+
set form(form: Object);
|
|
309
331
|
/**
|
|
310
332
|
* Gets the form object.
|
|
311
|
-
*
|
|
333
|
+
*
|
|
334
|
+
* @returns {Object} - The form JSON schema.
|
|
312
335
|
*/
|
|
313
|
-
get form():
|
|
336
|
+
get form(): Object;
|
|
314
337
|
/**
|
|
315
338
|
* Sets the submission of a form.
|
|
339
|
+
*
|
|
316
340
|
* @example
|
|
317
341
|
* import Webform from '@formio/js/Webform';
|
|
318
342
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -322,102 +346,102 @@ declare class Webform extends NestedDataComponent {
|
|
|
322
346
|
* lastName: 'Smith',
|
|
323
347
|
* email: 'joe@example.com'
|
|
324
348
|
* }};
|
|
325
|
-
*
|
|
349
|
+
*
|
|
350
|
+
* @param {Object} submission - The Form.io submission object.
|
|
326
351
|
*/
|
|
327
|
-
set submission(submission:
|
|
352
|
+
set submission(submission: Object);
|
|
328
353
|
/**
|
|
329
354
|
* Returns the submission object that was set within this form.
|
|
330
|
-
*
|
|
355
|
+
*
|
|
356
|
+
* @returns {Object}
|
|
331
357
|
*/
|
|
332
|
-
get submission():
|
|
358
|
+
get submission(): Object;
|
|
333
359
|
/**
|
|
334
360
|
* Sets a submission and returns the promise when it is ready.
|
|
335
|
-
* @param
|
|
336
|
-
* @param
|
|
337
|
-
* @
|
|
361
|
+
* @param submission
|
|
362
|
+
* @param flags
|
|
363
|
+
* @return {Promise.<TResult>}
|
|
338
364
|
*/
|
|
339
|
-
setSubmission(submission: any, flags?:
|
|
365
|
+
setSubmission(submission: any, flags?: {}): Promise<TResult>;
|
|
340
366
|
handleDraftError(errName: any, errDetails: any, restoreDraft: any): void;
|
|
367
|
+
/**
|
|
368
|
+
* Saves a submission draft.
|
|
369
|
+
*/
|
|
341
370
|
saveDraft(): void;
|
|
342
371
|
/**
|
|
343
372
|
* Restores a draft submission based on the user who is authenticated.
|
|
344
|
-
*
|
|
373
|
+
*
|
|
374
|
+
* @param {userId} - The user id where we need to restore the draft from.
|
|
345
375
|
*/
|
|
346
|
-
restoreDraft(userId:
|
|
347
|
-
get schema(): any;
|
|
376
|
+
restoreDraft(userId: any): void;
|
|
348
377
|
mergeData(_this: any, _that: any): void;
|
|
349
378
|
editing: boolean | undefined;
|
|
350
379
|
_submission: any;
|
|
351
380
|
/**
|
|
352
381
|
* Build the form.
|
|
353
|
-
* @returns {Promise} - The promise that is triggered when the form is built.
|
|
354
382
|
*/
|
|
355
383
|
init(): Promise<any>;
|
|
356
384
|
executeFormController(): false | undefined;
|
|
357
385
|
build(element: any): Promise<any>;
|
|
358
386
|
getClassName(): string;
|
|
359
|
-
render():
|
|
387
|
+
render(): any;
|
|
360
388
|
redraw(): Promise<void> | Promise<boolean>;
|
|
361
389
|
attach(element: any): Promise<boolean>;
|
|
362
390
|
hasRequiredFields(): boolean;
|
|
363
391
|
/**
|
|
364
392
|
* Sets a new alert to display in the error dialog of the form.
|
|
393
|
+
*
|
|
365
394
|
* @param {string} type - The type of alert to display. "danger", "success", "warning", etc.
|
|
366
395
|
* @param {string} message - The message to show in the alert.
|
|
367
|
-
* @param {
|
|
396
|
+
* @param {Object} options
|
|
368
397
|
*/
|
|
369
|
-
setAlert(type: string, message: string, options:
|
|
398
|
+
setAlert(type: string, message: string, options: Object): void;
|
|
370
399
|
/**
|
|
371
400
|
* Focus on selected component.
|
|
401
|
+
*
|
|
372
402
|
* @param {string} key - The key of selected component.
|
|
373
|
-
*/
|
|
374
|
-
focusOnComponent(key: string): void;
|
|
375
|
-
/**
|
|
376
|
-
* Show the errors of this form within the alert dialog.
|
|
377
|
-
* @param {object} error - An optional additional error to display along with the component errors.
|
|
378
403
|
* @returns {*}
|
|
379
404
|
*/
|
|
405
|
+
focusOnComponent(key: string): any;
|
|
380
406
|
/**
|
|
407
|
+
* Show the errors of this form within the alert dialog.
|
|
381
408
|
*
|
|
382
|
-
* @param {
|
|
383
|
-
* @
|
|
384
|
-
* @returns {void|Array} - The errors that were set.
|
|
409
|
+
* @param {Object} error - An optional additional error to display along with the component errors.
|
|
410
|
+
* @returns {*}
|
|
385
411
|
*/
|
|
386
|
-
showErrors(errors: any
|
|
412
|
+
showErrors(errors: any, triggerEvent: any): any;
|
|
387
413
|
/**
|
|
388
414
|
* Called when the submission has completed, or if the submission needs to be sent to an external library.
|
|
389
|
-
*
|
|
415
|
+
*
|
|
416
|
+
* @param {Object} submission - The submission object.
|
|
390
417
|
* @param {boolean} saved - Whether or not this submission was saved to the server.
|
|
391
418
|
* @returns {object} - The submission object.
|
|
392
419
|
*/
|
|
393
|
-
onSubmit(submission:
|
|
420
|
+
onSubmit(submission: Object, saved: boolean): object;
|
|
394
421
|
normalizeError(error: any): any;
|
|
395
422
|
/**
|
|
396
423
|
* Called when an error occurs during the submission.
|
|
397
|
-
*
|
|
398
|
-
* @
|
|
424
|
+
*
|
|
425
|
+
* @param {Object} error - The error that occured.
|
|
399
426
|
*/
|
|
400
|
-
onSubmissionError(error:
|
|
427
|
+
onSubmissionError(error: Object): any;
|
|
401
428
|
/**
|
|
402
429
|
* Trigger the change event for this form.
|
|
403
|
-
*
|
|
404
|
-
* @param
|
|
405
|
-
* @param
|
|
406
|
-
* @param {any} changes - The changes that have occured in the form.
|
|
430
|
+
*
|
|
431
|
+
* @param changed
|
|
432
|
+
* @param flags
|
|
407
433
|
*/
|
|
408
|
-
onChange(flags: any, changed: any, modified:
|
|
434
|
+
onChange(flags: any, changed: any, modified: any, changes: any): void;
|
|
409
435
|
/**
|
|
410
436
|
* Send a delete request to the server.
|
|
411
|
-
* @returns {Promise} - The promise that is triggered when the delete is complete.
|
|
412
437
|
*/
|
|
413
|
-
deleteSubmission():
|
|
438
|
+
deleteSubmission(): any;
|
|
414
439
|
/**
|
|
415
440
|
* Cancels the submission.
|
|
416
|
-
*
|
|
441
|
+
*
|
|
417
442
|
* @alias reset
|
|
418
|
-
* @returns {boolean} - TRUE means the submission was cancelled, FALSE otherwise.
|
|
419
443
|
*/
|
|
420
|
-
cancel(noconfirm:
|
|
444
|
+
cancel(noconfirm: any): boolean;
|
|
421
445
|
setMetadata(submission: any): void;
|
|
422
446
|
submitForm(options?: {}): Promise<any>;
|
|
423
447
|
setServerErrors(error: any): void;
|
|
@@ -427,6 +451,7 @@ declare class Webform extends NestedDataComponent {
|
|
|
427
451
|
clearServerErrors(): void;
|
|
428
452
|
/**
|
|
429
453
|
* Submits the form.
|
|
454
|
+
*
|
|
430
455
|
* @example
|
|
431
456
|
* import Webform from '@formio/js/Webform';
|
|
432
457
|
* let form = new Webform(document.getElementById('formio'));
|
|
@@ -439,11 +464,12 @@ declare class Webform extends NestedDataComponent {
|
|
|
439
464
|
* form.submit().then((submission) => {
|
|
440
465
|
* console.log(submission);
|
|
441
466
|
* });
|
|
467
|
+
*
|
|
442
468
|
* @param {boolean} before - If this submission occured from the before handlers.
|
|
443
|
-
*
|
|
469
|
+
*
|
|
444
470
|
* @returns {Promise} - A promise when the form is done submitting.
|
|
445
471
|
*/
|
|
446
|
-
submit(before
|
|
472
|
+
submit(before: boolean, options?: {}): Promise<any>;
|
|
447
473
|
submitUrl(URL: any, headers: any): void;
|
|
448
474
|
triggerRecaptcha(): void;
|
|
449
475
|
_nosubmit: any;
|
|
@@ -471,89 +497,29 @@ export type JSONObject = {
|
|
|
471
497
|
[key: string]: JSON;
|
|
472
498
|
};
|
|
473
499
|
export type FormioHooks = {
|
|
474
|
-
/**
|
|
475
|
-
* - A function that is called before the form is submitted.
|
|
476
|
-
*/
|
|
477
500
|
beforeSubmit?: Function | undefined;
|
|
478
|
-
/**
|
|
479
|
-
* - A function that is called before the form is canceled.
|
|
480
|
-
*/
|
|
481
501
|
beforeCancel?: Function | undefined;
|
|
482
|
-
/**
|
|
483
|
-
* - A function that is called before moving to the next page in a multi-page form.
|
|
484
|
-
*/
|
|
485
502
|
beforeNext?: Function | undefined;
|
|
486
|
-
/**
|
|
487
|
-
* - A function that is called before moving to the previous page in a multi-page form.
|
|
488
|
-
*/
|
|
489
503
|
beforePrev?: Function | undefined;
|
|
490
|
-
/**
|
|
491
|
-
* - A function that is called when a component is attached to the form.
|
|
492
|
-
*/
|
|
493
504
|
attachComponent?: Function | undefined;
|
|
494
|
-
/**
|
|
495
|
-
* - A function that is called when setting the value of a data component.
|
|
496
|
-
*/
|
|
497
505
|
setDataValue?: Function | undefined;
|
|
498
|
-
/**
|
|
499
|
-
* - A function that is called when adding multiple components to the form.
|
|
500
|
-
*/
|
|
501
506
|
addComponents?: Function | undefined;
|
|
502
|
-
/**
|
|
503
|
-
* - A function that is called when adding a single component to the form.
|
|
504
|
-
*/
|
|
505
507
|
addComponent?: Function | undefined;
|
|
506
|
-
/**
|
|
507
|
-
* - A function that is called for custom validation of the form.
|
|
508
|
-
*/
|
|
509
508
|
customValidation?: Function | undefined;
|
|
510
|
-
/**
|
|
511
|
-
* - A function that is called when attaching a webform to the form.
|
|
512
|
-
*/
|
|
513
509
|
attachWebform?: Function | undefined;
|
|
514
510
|
};
|
|
515
511
|
export type SanitizeConfig = {
|
|
516
|
-
/**
|
|
517
|
-
* - The attributes to add.
|
|
518
|
-
*/
|
|
519
512
|
addAttr?: string[] | undefined;
|
|
520
|
-
/**
|
|
521
|
-
* - The tags to add.
|
|
522
|
-
*/
|
|
523
513
|
addTags?: string[] | undefined;
|
|
524
|
-
/**
|
|
525
|
-
* - The allowed attributes.
|
|
526
|
-
*/
|
|
527
514
|
allowedAttrs?: string[] | undefined;
|
|
528
|
-
/**
|
|
529
|
-
* - The allowed tags.
|
|
530
|
-
*/
|
|
531
515
|
allowedTags?: string[] | undefined;
|
|
532
|
-
/**
|
|
533
|
-
* - The allowed URI regex.
|
|
534
|
-
*/
|
|
535
516
|
allowedUriRegex?: string[] | undefined;
|
|
536
|
-
/**
|
|
537
|
-
* - The URI safe attributes.
|
|
538
|
-
*/
|
|
539
517
|
addUriSafeAttr?: string[] | undefined;
|
|
540
518
|
};
|
|
541
519
|
export type ButtonSettings = {
|
|
542
|
-
/**
|
|
543
|
-
* - Show the "Previous" button.
|
|
544
|
-
*/
|
|
545
520
|
showPrevious?: boolean | undefined;
|
|
546
|
-
/**
|
|
547
|
-
* - Show the "Next" button.
|
|
548
|
-
*/
|
|
549
521
|
showNext?: boolean | undefined;
|
|
550
|
-
/**
|
|
551
|
-
* - Show the "Cancel" button.
|
|
552
|
-
*/
|
|
553
522
|
showCancel?: boolean | undefined;
|
|
554
|
-
/**
|
|
555
|
-
* - Show the "Submit" button.
|
|
556
|
-
*/
|
|
557
523
|
showSubmit?: boolean | undefined;
|
|
558
524
|
};
|
|
559
525
|
export type FormOptions = {
|
|
@@ -612,7 +578,7 @@ export type FormOptions = {
|
|
|
612
578
|
/**
|
|
613
579
|
* - The render mode for this form.
|
|
614
580
|
*/
|
|
615
|
-
renderMode?: "
|
|
581
|
+
renderMode?: "html" | "form" | "flat" | "builder" | "pdf" | undefined;
|
|
616
582
|
/**
|
|
617
583
|
* - Highlight any errors on the form.
|
|
618
584
|
*/
|
|
@@ -632,7 +598,7 @@ export type FormOptions = {
|
|
|
632
598
|
/**
|
|
633
599
|
* - The components for this form.
|
|
634
600
|
*/
|
|
635
|
-
components?:
|
|
601
|
+
components?: Component[] | undefined;
|
|
636
602
|
/**
|
|
637
603
|
* - Disabled components for this form.
|
|
638
604
|
*/
|
|
@@ -682,7 +648,7 @@ export type FormOptions = {
|
|
|
682
648
|
/**
|
|
683
649
|
* - The display for this form.
|
|
684
650
|
*/
|
|
685
|
-
display?: "form" | "
|
|
651
|
+
display?: "form" | "wizard" | "pdf" | undefined;
|
|
686
652
|
/**
|
|
687
653
|
* - The CDN url for this form.
|
|
688
654
|
*/
|
|
@@ -706,7 +672,7 @@ export type FormOptions = {
|
|
|
706
672
|
/**
|
|
707
673
|
* - The breadcrumb settings for this form.
|
|
708
674
|
*/
|
|
709
|
-
|
|
675
|
+
breadCrumbSettings?: Object | undefined;
|
|
710
676
|
/**
|
|
711
677
|
* - Allow the previous button (for Wizard forms).
|
|
712
678
|
*/
|
|
@@ -719,18 +685,11 @@ export type FormOptions = {
|
|
|
719
685
|
* - Show the checkbox background.
|
|
720
686
|
*/
|
|
721
687
|
showCheckboxBackground?: boolean | undefined;
|
|
722
|
-
/**
|
|
723
|
-
* - Only show inputs in the form and no labels.
|
|
724
|
-
*/
|
|
725
|
-
inputsOnly?: boolean | undefined;
|
|
726
|
-
/**
|
|
727
|
-
* - If we are in the process of building the form.
|
|
728
|
-
*/
|
|
729
|
-
building?: boolean | undefined;
|
|
730
688
|
/**
|
|
731
689
|
* - The zoom for PDF forms.
|
|
732
690
|
*/
|
|
733
691
|
zoom?: number | undefined;
|
|
734
692
|
};
|
|
735
|
-
import NestedDataComponent from
|
|
736
|
-
import EventEmitter from
|
|
693
|
+
import NestedDataComponent from './components/_classes/nesteddata/NestedDataComponent';
|
|
694
|
+
import EventEmitter from './EventEmitter';
|
|
695
|
+
import { Component } from '@formio/core';
|