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