@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/Form.js
CHANGED
|
@@ -4,119 +4,28 @@ import Displays from './displays';
|
|
|
4
4
|
import templates from './templates';
|
|
5
5
|
import * as FormioUtils from './utils/utils';
|
|
6
6
|
export default class Form extends Element {
|
|
7
|
-
/**
|
|
8
|
-
* Represents a JSON value.
|
|
9
|
-
* @typedef {(string | number | boolean | null | JSONArray | JSONObject)} JSON
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Represents a JSON array.
|
|
13
|
-
* @typedef {Array<JSON>} JSONArray
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Represents a JSON object.
|
|
17
|
-
* @typedef {{[key: string]: JSON}} JSONObject
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* @typedef {object} FormioHooks
|
|
21
|
-
* @property {Function} [beforeSubmit] - Called before a submission is made.
|
|
22
|
-
* @property {Function} [beforeCancel] - Called before a cancel is made.
|
|
23
|
-
* @property {Function} [beforeNext] - Called before the next page is navigated to.
|
|
24
|
-
* @property {Function} [beforePrev] - Called before the previous page is navigated to.
|
|
25
|
-
* @property {Function} [attachComponent] - Called when a component is attached.
|
|
26
|
-
* @property {Function} [setDataValue] - Called when a data value is set.
|
|
27
|
-
* @property {Function} [addComponents] - Called when components are added.
|
|
28
|
-
* @property {Function} [addComponent] - Called when a component is added.
|
|
29
|
-
* @property {Function} [customValidation] - Called when a custom validation is made.
|
|
30
|
-
* @property {Function} [attachWebform] - Called when a webform is attached.
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* @typedef {object} SanitizeConfig
|
|
34
|
-
* @property {string[]} [addAttr] - The html attributes to allow with sanitization.
|
|
35
|
-
* @property {string[]} [addTags] - The html tags to allow with sanitization.
|
|
36
|
-
* @property {string[]} [allowedAttrs] - The html attributes to allow with sanitization.
|
|
37
|
-
* @property {string[]} [allowedTags] - The html tags to allow with sanitization.
|
|
38
|
-
* @property {string[]} [allowedUriRegex] - The regex for allowed URIs.
|
|
39
|
-
* @property {string[]} [addUriSafeAttr] - The URI attributes to allow with sanitization.
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* @typedef {object} ButtonSettings
|
|
43
|
-
* @property {boolean} [showPrevious] - Show the previous button in wizard forms.
|
|
44
|
-
* @property {boolean} [showNext] - Show the next button in wizard forms.
|
|
45
|
-
* @property {boolean} [showCancel] - Show the cancel button in wizard forms.
|
|
46
|
-
* @property {boolean} [showSubmit] - Show the submit button in wizard forms.
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* @typedef {object} FormOptions
|
|
50
|
-
* @property {boolean} [saveDraft] - Enable the save draft feature.
|
|
51
|
-
* @property {number} [saveDraftThrottle] - The throttle for the save draft feature.
|
|
52
|
-
* @property {boolean} [readOnly] - Set this form to readOnly.
|
|
53
|
-
* @property {boolean} [noAlerts] - Disable the alerts dialog.
|
|
54
|
-
* @property {{[key: string]: string}} [i18n] - The translation file for this rendering.
|
|
55
|
-
* @property {string} [template] - Custom logic for creation of elements.
|
|
56
|
-
* @property {boolean} [noDefaults] - Exclude default values from the settings.
|
|
57
|
-
* @property {any} [fileService] - The file service for this form.
|
|
58
|
-
* @property {EventEmitter} [events] - The EventEmitter for this form.
|
|
59
|
-
* @property {string} [language] - The language to render this form in.
|
|
60
|
-
* @property {{[key: string]: string}} [i18next] - The i18next configuration for this form.
|
|
61
|
-
* @property {boolean} [viewAsHtml] - View the form as raw HTML.
|
|
62
|
-
* @property {'form' | 'html' | 'flat' | 'builder' | 'pdf'} [renderMode] - The render mode for this form.
|
|
63
|
-
* @property {boolean} [highlightErrors] - Highlight any errors on the form.
|
|
64
|
-
* @property {string} [componentErrorClass] - The error class for components.
|
|
65
|
-
* @property {any} [templates] - The templates for this form.
|
|
66
|
-
* @property {string} [iconset] - The iconset for this form.
|
|
67
|
-
* @property {import('@formio/core').Component[]} [components] - The components for this form.
|
|
68
|
-
* @property {{[key: string]: boolean}} [disabled] - Disabled components for this form.
|
|
69
|
-
* @property {boolean} [showHiddenFields] - Show hidden fields.
|
|
70
|
-
* @property {{[key: string]: boolean}} [hide] - Hidden components for this form.
|
|
71
|
-
* @property {{[key: string]: boolean}} [show] - Components to show for this form.
|
|
72
|
-
* @property {Formio} [formio] - The Formio instance for this form.
|
|
73
|
-
* @property {string} [decimalSeparator] - The decimal separator for this form.
|
|
74
|
-
* @property {string} [thousandsSeparator] - The thousands separator for this form.
|
|
75
|
-
* @property {FormioHooks} [hooks] - The hooks for this form.
|
|
76
|
-
* @property {boolean} [alwaysDirty] - Always be dirty.
|
|
77
|
-
* @property {boolean} [skipDraftRestore] - Skip restoring a draft.
|
|
78
|
-
* @property {'form' | 'wizard' | 'pdf'} [display] - The display for this form.
|
|
79
|
-
* @property {string} [cdnUrl] - The CDN url for this form.
|
|
80
|
-
* @property {boolean} [flatten] - Flatten the form.
|
|
81
|
-
* @property {boolean} [sanitize] - Sanitize the form.
|
|
82
|
-
* @property {SanitizeConfig} [sanitizeConfig] - The sanitize configuration for this form.
|
|
83
|
-
* @property {ButtonSettings} [buttonSettings] - The button settings for this form.
|
|
84
|
-
* @property {object} [breadcrumbSettings] - The breadcrumb settings for this form.
|
|
85
|
-
* @property {boolean} [allowPrevious] - Allow the previous button (for Wizard forms).
|
|
86
|
-
* @property {string[]} [wizardButtonOrder] - The order of the buttons (for Wizard forms).
|
|
87
|
-
* @property {boolean} [showCheckboxBackground] - Show the checkbox background.
|
|
88
|
-
* @property {number} [zoom] - The zoom for PDF forms.
|
|
89
|
-
*/
|
|
90
7
|
/**
|
|
91
8
|
* Creates an easy to use interface for embedding webforms, pdfs, and wizards into your application.
|
|
92
|
-
*
|
|
93
|
-
* @param {
|
|
94
|
-
* @param {
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} element - The DOM element you wish to render this form within.
|
|
11
|
+
* @param {Object | string} form - Either a Form JSON schema or the URL of a hosted form via. form.io.
|
|
12
|
+
* @param {Object} options - The options to create a new form instance.
|
|
13
|
+
* @param {boolean} options.readOnly - Set this form to readOnly
|
|
14
|
+
* @param {boolean} options.noAlerts - Set to true to disable the alerts dialog.
|
|
15
|
+
* @param {boolean} options.i18n - The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js
|
|
16
|
+
* @param {boolean} options.template - Provides a way to inject custom logic into the creation of every element rendered within the form.
|
|
17
|
+
*
|
|
95
18
|
* @example
|
|
96
19
|
* import Form from '@formio/js/Form';
|
|
97
20
|
* const form = new Form(document.getElementById('formio'), 'https://examples.form.io/example');
|
|
98
21
|
* form.build();
|
|
99
22
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*/
|
|
103
|
-
options;
|
|
104
|
-
constructor(elementOrForm, formOrOptions, options = {}) {
|
|
105
|
-
let element, form, formOptions;
|
|
106
|
-
if (elementOrForm instanceof HTMLElement) {
|
|
107
|
-
element = elementOrForm;
|
|
108
|
-
form = formOrOptions;
|
|
109
|
-
formOptions = options;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
element = null;
|
|
113
|
-
form = elementOrForm;
|
|
114
|
-
formOptions = formOrOptions || {};
|
|
115
|
-
}
|
|
23
|
+
constructor(...args) {
|
|
24
|
+
let options = args[0] instanceof HTMLElement ? args[2] : args[1];
|
|
116
25
|
if (Formio.options && Formio.options.form) {
|
|
117
|
-
|
|
26
|
+
options = Object.assign(options, Formio.options.form);
|
|
118
27
|
}
|
|
119
|
-
super(
|
|
28
|
+
super(options);
|
|
120
29
|
if (this.options.useSessionToken) {
|
|
121
30
|
Formio.useSessionToken(this.options);
|
|
122
31
|
}
|
|
@@ -125,22 +34,30 @@ export default class Form extends Element {
|
|
|
125
34
|
this.readyReject = reject;
|
|
126
35
|
});
|
|
127
36
|
this.instance = null;
|
|
128
|
-
if (
|
|
37
|
+
if (args[0] instanceof HTMLElement) {
|
|
129
38
|
if (this.element) {
|
|
130
39
|
delete this.element.component;
|
|
131
40
|
}
|
|
132
|
-
this.element =
|
|
41
|
+
this.element = args[0];
|
|
42
|
+
this.options = args[2] || {};
|
|
43
|
+
this.options.events = this.events;
|
|
44
|
+
this.setForm(args[1])
|
|
45
|
+
.then(() => this.readyResolve(this.instance))
|
|
46
|
+
.catch(this.readyReject);
|
|
133
47
|
}
|
|
134
|
-
else {
|
|
48
|
+
else if (args[0]) {
|
|
135
49
|
this.element = null;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
this.setForm(
|
|
50
|
+
this.options = args[1] || {};
|
|
51
|
+
this.options.events = this.events;
|
|
52
|
+
this.setForm(args[0])
|
|
139
53
|
.then(() => this.readyResolve(this.instance))
|
|
140
54
|
.catch(this.readyReject);
|
|
141
55
|
}
|
|
142
|
-
|
|
143
|
-
|
|
56
|
+
else {
|
|
57
|
+
this.element = null;
|
|
58
|
+
this.options = {};
|
|
59
|
+
this.options.events = this.events;
|
|
60
|
+
}
|
|
144
61
|
this.display = '';
|
|
145
62
|
}
|
|
146
63
|
createElement(tag, attrs, children) {
|
|
@@ -188,8 +105,9 @@ export default class Form extends Element {
|
|
|
188
105
|
}
|
|
189
106
|
/**
|
|
190
107
|
* Create a new form instance provided the display of the form.
|
|
108
|
+
*
|
|
191
109
|
* @param {string} display - The display of the form, either "wizard", "form", or "pdf"
|
|
192
|
-
* @
|
|
110
|
+
* @return {*}
|
|
193
111
|
*/
|
|
194
112
|
create(display) {
|
|
195
113
|
if (this.options && (this.options.flatten || this.options.renderMode === 'flat')) {
|
|
@@ -206,8 +124,9 @@ export default class Form extends Element {
|
|
|
206
124
|
}
|
|
207
125
|
/**
|
|
208
126
|
* Sets the form. Either as JSON or a URL to a form JSON schema.
|
|
127
|
+
*
|
|
209
128
|
* @param {string|object} formParam - Either the form JSON or the URL of the form json.
|
|
210
|
-
* @
|
|
129
|
+
* @return {*}
|
|
211
130
|
*/
|
|
212
131
|
set form(formParam) {
|
|
213
132
|
this.setForm(formParam);
|
|
@@ -234,11 +153,12 @@ export default class Form extends Element {
|
|
|
234
153
|
};
|
|
235
154
|
}
|
|
236
155
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
156
|
+
* Check Subdirectories path and provide correct options
|
|
157
|
+
*
|
|
158
|
+
* @param {string} url - The the URL of the form json.
|
|
159
|
+
* @param {form} object - The form json.
|
|
160
|
+
* @return {object} The initial options with base and project.
|
|
161
|
+
*/
|
|
242
162
|
getFormInitOptions(url, form) {
|
|
243
163
|
const options = {};
|
|
244
164
|
const index = url.indexOf(form?.path);
|
|
@@ -262,11 +182,6 @@ export default class Form extends Element {
|
|
|
262
182
|
}
|
|
263
183
|
return {};
|
|
264
184
|
}
|
|
265
|
-
/**
|
|
266
|
-
* Sets the form to the JSON schema of a form.
|
|
267
|
-
* @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
|
|
268
|
-
* @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
|
|
269
|
-
*/
|
|
270
185
|
setForm(formParam) {
|
|
271
186
|
let result;
|
|
272
187
|
formParam = formParam || this.form;
|
|
@@ -327,15 +242,17 @@ export default class Form extends Element {
|
|
|
327
242
|
}
|
|
328
243
|
/**
|
|
329
244
|
* Returns the loaded forms JSON.
|
|
330
|
-
*
|
|
245
|
+
*
|
|
246
|
+
* @return {object} - The loaded form's JSON
|
|
331
247
|
*/
|
|
332
248
|
get form() {
|
|
333
249
|
return this._form;
|
|
334
250
|
}
|
|
335
251
|
/**
|
|
336
252
|
* Changes the display of the form.
|
|
253
|
+
*
|
|
337
254
|
* @param {string} display - The display to set this form. Either "wizard", "form", or "pdf"
|
|
338
|
-
* @
|
|
255
|
+
* @return {Promise<T>}
|
|
339
256
|
*/
|
|
340
257
|
setDisplay(display) {
|
|
341
258
|
if ((this.display === display) && this.instance) {
|
|
@@ -376,9 +293,9 @@ export default class Form extends Element {
|
|
|
376
293
|
}
|
|
377
294
|
/**
|
|
378
295
|
* Sanitize an html string.
|
|
379
|
-
*
|
|
380
|
-
* @param
|
|
381
|
-
* @returns {
|
|
296
|
+
*
|
|
297
|
+
* @param string
|
|
298
|
+
* @returns {*}
|
|
382
299
|
*/
|
|
383
300
|
sanitize(dirty, forceSanitize) {
|
|
384
301
|
// If Sanitize is turned off
|
|
@@ -396,7 +313,8 @@ export default class Form extends Element {
|
|
|
396
313
|
}
|
|
397
314
|
/**
|
|
398
315
|
* Build a new form.
|
|
399
|
-
*
|
|
316
|
+
*
|
|
317
|
+
* @return {Promise<T>}
|
|
400
318
|
*/
|
|
401
319
|
build() {
|
|
402
320
|
if (!this.instance) {
|
|
@@ -451,16 +369,15 @@ export default class Form extends Element {
|
|
|
451
369
|
// Allow simple embedding.
|
|
452
370
|
Formio.embedForm = (embed) => Form.embed(embed);
|
|
453
371
|
/**
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
* @param {
|
|
457
|
-
* @param {
|
|
458
|
-
* @
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
* Formio.createForm(document.getElementById('formio'), 'https://examples.form.io/example');
|
|
372
|
+
* Factory that creates a new form based on the form parameters.
|
|
373
|
+
*
|
|
374
|
+
* @param element {HMTLElement} - The HTML Element to add this form to.
|
|
375
|
+
* @param form {string|Object} - The src of the form, or a form object.
|
|
376
|
+
* @param options {Object} - The options to create this form.
|
|
377
|
+
*
|
|
378
|
+
* @return {Promise} - When the form is instance is ready.
|
|
462
379
|
*/
|
|
463
|
-
Formio.createForm = (
|
|
464
|
-
return (new Form(
|
|
380
|
+
Formio.createForm = (...args) => {
|
|
381
|
+
return (new Form(...args)).ready;
|
|
465
382
|
};
|
|
466
383
|
Formio.Form = Form;
|
package/lib/mjs/FormBuilder.d.ts
CHANGED
|
@@ -1,191 +1,6 @@
|
|
|
1
1
|
export default class FormBuilder extends Form {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @property {string[]} [disabled] - An array of "keys" of components that should be disabled within the form builder. Example: ['firstName', 'lastName']
|
|
5
|
-
* @property {boolean} [noNewEdit] - When set to TRUE no modal is shown when a component is dragged onto the form.
|
|
6
|
-
* @property {boolean} [noDefaultSubmitButton] - Set to TRUE to not include the default submit button in Webforms.
|
|
7
|
-
* @property {boolean} [alwaysConfirmComponentRemoval] - Set to TRUE to always require confirmation before removing a component.
|
|
8
|
-
* @property {object} [formConfig] - Form configurations to apply to forms being created. These configurations are added to the "config" property of the form object.
|
|
9
|
-
* @property {string} [resourceTag] - The tag to use to query for the "Existing Resource Fields" section of the builder.
|
|
10
|
-
* @property {import('./Form').FormOptions} [editForm] - The options to apply to the Edit Form (the form that shows inside the modal when you edit a component).
|
|
11
|
-
* @property {string} [language] - The language to load into the form builder.
|
|
12
|
-
* @property {object} [builder] - The builder options to pass to the builder.
|
|
13
|
-
* @property {'form'|'wizard'|'pdf'} [display] - The display mode of the builder.
|
|
14
|
-
* @property {string} [resourceFilter] - Filter applied to the resources that appear in the builder's Existing Resource Fields.
|
|
15
|
-
* @property {boolean} [noSource] - When set to TRUE, the resource ID in the builder's Existing Resource Fields will not be linked.
|
|
16
|
-
* @property {boolean} [showFullJsonSchema] - When set to TRUE, the full JSON schema will be displayed in the JSON edit menu.
|
|
17
|
-
*/
|
|
18
|
-
/** @type {FormBuilderOptions} */
|
|
19
|
-
static options: {
|
|
20
|
-
/**
|
|
21
|
-
* - An array of "keys" of components that should be disabled within the form builder. Example: ['firstName', 'lastName']
|
|
22
|
-
*/
|
|
23
|
-
disabled?: string[] | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* - When set to TRUE no modal is shown when a component is dragged onto the form.
|
|
26
|
-
*/
|
|
27
|
-
noNewEdit?: boolean | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* - Set to TRUE to not include the default submit button in Webforms.
|
|
30
|
-
*/
|
|
31
|
-
noDefaultSubmitButton?: boolean | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* - Set to TRUE to always require confirmation before removing a component.
|
|
34
|
-
*/
|
|
35
|
-
alwaysConfirmComponentRemoval?: boolean | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* - Form configurations to apply to forms being created. These configurations are added to the "config" property of the form object.
|
|
38
|
-
*/
|
|
39
|
-
formConfig?: object | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* - The tag to use to query for the "Existing Resource Fields" section of the builder.
|
|
42
|
-
*/
|
|
43
|
-
resourceTag?: string | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* - The options to apply to the Edit Form (the form that shows inside the modal when you edit a component).
|
|
46
|
-
*/
|
|
47
|
-
editForm?: any;
|
|
48
|
-
/**
|
|
49
|
-
* - The language to load into the form builder.
|
|
50
|
-
*/
|
|
51
|
-
language?: string | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* - The builder options to pass to the builder.
|
|
54
|
-
*/
|
|
55
|
-
builder?: object | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* - The display mode of the builder.
|
|
58
|
-
*/
|
|
59
|
-
display?: "form" | "pdf" | "wizard" | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* - Filter applied to the resources that appear in the builder's Existing Resource Fields.
|
|
62
|
-
*/
|
|
63
|
-
resourceFilter?: string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* - When set to TRUE, the resource ID in the builder's Existing Resource Fields will not be linked.
|
|
66
|
-
*/
|
|
67
|
-
noSource?: boolean | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* - When set to TRUE, the full JSON schema will be displayed in the JSON edit menu.
|
|
70
|
-
*/
|
|
71
|
-
showFullJsonSchema?: boolean | undefined;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Creates a new form builder.
|
|
75
|
-
* @param {HTMLElement} element - The HTML element to place the form builder.
|
|
76
|
-
* @param {string | object} form - The form to pass to the builder
|
|
77
|
-
* @param {FormBuilderOptions} options - The options to create this builder.
|
|
78
|
-
* @returns {FormBuilder} - The form builder instance.
|
|
79
|
-
*/
|
|
80
|
-
constructor(element: HTMLElement, form: string | object, options: {
|
|
81
|
-
/**
|
|
82
|
-
* - An array of "keys" of components that should be disabled within the form builder. Example: ['firstName', 'lastName']
|
|
83
|
-
*/
|
|
84
|
-
disabled?: string[] | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* - When set to TRUE no modal is shown when a component is dragged onto the form.
|
|
87
|
-
*/
|
|
88
|
-
noNewEdit?: boolean | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* - Set to TRUE to not include the default submit button in Webforms.
|
|
91
|
-
*/
|
|
92
|
-
noDefaultSubmitButton?: boolean | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* - Set to TRUE to always require confirmation before removing a component.
|
|
95
|
-
*/
|
|
96
|
-
alwaysConfirmComponentRemoval?: boolean | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* - Form configurations to apply to forms being created. These configurations are added to the "config" property of the form object.
|
|
99
|
-
*/
|
|
100
|
-
formConfig?: object | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* - The tag to use to query for the "Existing Resource Fields" section of the builder.
|
|
103
|
-
*/
|
|
104
|
-
resourceTag?: string | undefined;
|
|
105
|
-
/**
|
|
106
|
-
* - The options to apply to the Edit Form (the form that shows inside the modal when you edit a component).
|
|
107
|
-
*/
|
|
108
|
-
editForm?: any;
|
|
109
|
-
/**
|
|
110
|
-
* - The language to load into the form builder.
|
|
111
|
-
*/
|
|
112
|
-
language?: string | undefined;
|
|
113
|
-
/**
|
|
114
|
-
* - The builder options to pass to the builder.
|
|
115
|
-
*/
|
|
116
|
-
builder?: object | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* - The display mode of the builder.
|
|
119
|
-
*/
|
|
120
|
-
display?: "form" | "pdf" | "wizard" | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* - Filter applied to the resources that appear in the builder's Existing Resource Fields.
|
|
123
|
-
*/
|
|
124
|
-
resourceFilter?: string | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* - When set to TRUE, the resource ID in the builder's Existing Resource Fields will not be linked.
|
|
127
|
-
*/
|
|
128
|
-
noSource?: boolean | undefined;
|
|
129
|
-
/**
|
|
130
|
-
* - When set to TRUE, the full JSON schema will be displayed in the JSON edit menu.
|
|
131
|
-
*/
|
|
132
|
-
showFullJsonSchema?: boolean | undefined;
|
|
133
|
-
});
|
|
134
|
-
/** @type {FormBuilderOptions} */
|
|
135
|
-
options: {
|
|
136
|
-
/**
|
|
137
|
-
* - An array of "keys" of components that should be disabled within the form builder. Example: ['firstName', 'lastName']
|
|
138
|
-
*/
|
|
139
|
-
disabled?: string[] | undefined;
|
|
140
|
-
/**
|
|
141
|
-
* - When set to TRUE no modal is shown when a component is dragged onto the form.
|
|
142
|
-
*/
|
|
143
|
-
noNewEdit?: boolean | undefined;
|
|
144
|
-
/**
|
|
145
|
-
* - Set to TRUE to not include the default submit button in Webforms.
|
|
146
|
-
*/
|
|
147
|
-
noDefaultSubmitButton?: boolean | undefined;
|
|
148
|
-
/**
|
|
149
|
-
* - Set to TRUE to always require confirmation before removing a component.
|
|
150
|
-
*/
|
|
151
|
-
alwaysConfirmComponentRemoval?: boolean | undefined;
|
|
152
|
-
/**
|
|
153
|
-
* - Form configurations to apply to forms being created. These configurations are added to the "config" property of the form object.
|
|
154
|
-
*/
|
|
155
|
-
formConfig?: object | undefined;
|
|
156
|
-
/**
|
|
157
|
-
* - The tag to use to query for the "Existing Resource Fields" section of the builder.
|
|
158
|
-
*/
|
|
159
|
-
resourceTag?: string | undefined;
|
|
160
|
-
/**
|
|
161
|
-
* - The options to apply to the Edit Form (the form that shows inside the modal when you edit a component).
|
|
162
|
-
*/
|
|
163
|
-
editForm?: any;
|
|
164
|
-
/**
|
|
165
|
-
* - The language to load into the form builder.
|
|
166
|
-
*/
|
|
167
|
-
language?: string | undefined;
|
|
168
|
-
/**
|
|
169
|
-
* - The builder options to pass to the builder.
|
|
170
|
-
*/
|
|
171
|
-
builder?: object | undefined;
|
|
172
|
-
/**
|
|
173
|
-
* - The display mode of the builder.
|
|
174
|
-
*/
|
|
175
|
-
display?: "form" | "pdf" | "wizard" | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* - Filter applied to the resources that appear in the builder's Existing Resource Fields.
|
|
178
|
-
*/
|
|
179
|
-
resourceFilter?: string | undefined;
|
|
180
|
-
/**
|
|
181
|
-
* - When set to TRUE, the resource ID in the builder's Existing Resource Fields will not be linked.
|
|
182
|
-
*/
|
|
183
|
-
noSource?: boolean | undefined;
|
|
184
|
-
/**
|
|
185
|
-
* - When set to TRUE, the full JSON schema will be displayed in the JSON edit menu.
|
|
186
|
-
*/
|
|
187
|
-
showFullJsonSchema?: boolean | undefined;
|
|
188
|
-
};
|
|
2
|
+
static options: {};
|
|
3
|
+
constructor(element: any, form: any, options: any);
|
|
189
4
|
create(display: any): any;
|
|
190
5
|
}
|
|
191
6
|
import Form from './Form';
|
package/lib/mjs/FormBuilder.js
CHANGED
|
@@ -2,33 +2,7 @@ import { Formio } from './Formio';
|
|
|
2
2
|
import Builders from './builders';
|
|
3
3
|
import Form from './Form';
|
|
4
4
|
export default class FormBuilder extends Form {
|
|
5
|
-
/**
|
|
6
|
-
* @typedef FormBuilderOptions
|
|
7
|
-
* @property {string[]} [disabled] - An array of "keys" of components that should be disabled within the form builder. Example: ['firstName', 'lastName']
|
|
8
|
-
* @property {boolean} [noNewEdit] - When set to TRUE no modal is shown when a component is dragged onto the form.
|
|
9
|
-
* @property {boolean} [noDefaultSubmitButton] - Set to TRUE to not include the default submit button in Webforms.
|
|
10
|
-
* @property {boolean} [alwaysConfirmComponentRemoval] - Set to TRUE to always require confirmation before removing a component.
|
|
11
|
-
* @property {object} [formConfig] - Form configurations to apply to forms being created. These configurations are added to the "config" property of the form object.
|
|
12
|
-
* @property {string} [resourceTag] - The tag to use to query for the "Existing Resource Fields" section of the builder.
|
|
13
|
-
* @property {import('./Form').FormOptions} [editForm] - The options to apply to the Edit Form (the form that shows inside the modal when you edit a component).
|
|
14
|
-
* @property {string} [language] - The language to load into the form builder.
|
|
15
|
-
* @property {object} [builder] - The builder options to pass to the builder.
|
|
16
|
-
* @property {'form'|'wizard'|'pdf'} [display] - The display mode of the builder.
|
|
17
|
-
* @property {string} [resourceFilter] - Filter applied to the resources that appear in the builder's Existing Resource Fields.
|
|
18
|
-
* @property {boolean} [noSource] - When set to TRUE, the resource ID in the builder's Existing Resource Fields will not be linked.
|
|
19
|
-
* @property {boolean} [showFullJsonSchema] - When set to TRUE, the full JSON schema will be displayed in the JSON edit menu.
|
|
20
|
-
*/
|
|
21
|
-
/** @type {FormBuilderOptions} */
|
|
22
5
|
static options = {};
|
|
23
|
-
/** @type {FormBuilderOptions} */
|
|
24
|
-
options;
|
|
25
|
-
/**
|
|
26
|
-
* Creates a new form builder.
|
|
27
|
-
* @param {HTMLElement} element - The HTML element to place the form builder.
|
|
28
|
-
* @param {string | object} form - The form to pass to the builder
|
|
29
|
-
* @param {FormBuilderOptions} options - The options to create this builder.
|
|
30
|
-
* @returns {FormBuilder} - The form builder instance.
|
|
31
|
-
*/
|
|
32
6
|
constructor(element, form, options) {
|
|
33
7
|
form = form || {};
|
|
34
8
|
options = options || {};
|
|
@@ -46,12 +20,14 @@ export default class FormBuilder extends Form {
|
|
|
46
20
|
}
|
|
47
21
|
/**
|
|
48
22
|
* Factory that creates a new form builder based on the form parameter.
|
|
49
|
-
*
|
|
50
|
-
* @param {
|
|
51
|
-
* @param {
|
|
52
|
-
* @
|
|
23
|
+
*
|
|
24
|
+
* @param element {HMTLElement} - The HTML Element to add this form to.
|
|
25
|
+
* @param form {string|Object} - The src of the form, or a form object.
|
|
26
|
+
* @param options {Object} - The options to create this form.
|
|
27
|
+
*
|
|
28
|
+
* @return {Promise} - When the form is instance is ready.
|
|
53
29
|
*/
|
|
54
|
-
Formio.builder = (
|
|
55
|
-
return (new FormBuilder(
|
|
30
|
+
Formio.builder = (...args) => {
|
|
31
|
+
return (new FormBuilder(...args)).ready;
|
|
56
32
|
};
|
|
57
33
|
Formio.FormBuilder = FormBuilder;
|
package/lib/mjs/PDF.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export default class PDF extends Webform {
|
|
2
|
+
constructor(element: any, options: any);
|
|
2
3
|
components: any[];
|
|
3
4
|
init(): void;
|
|
4
|
-
|
|
5
|
-
submitButton: any;
|
|
5
|
+
submitButton: import("./components/_classes/component/Component").default | undefined;
|
|
6
6
|
attachComponents(element: any, components: any, container: any): Promise<void>;
|
|
7
7
|
attach(element: any): Promise<void>;
|
|
8
8
|
iframeReady: Promise<any> | undefined;
|
|
@@ -11,24 +11,26 @@ export default class PDF extends Webform {
|
|
|
11
11
|
iframeElement: any;
|
|
12
12
|
/**
|
|
13
13
|
* Get the submission from the iframe.
|
|
14
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* @return {Promise<any>}
|
|
15
16
|
*/
|
|
16
17
|
getSubmission(): Promise<any>;
|
|
17
18
|
/**
|
|
18
19
|
* Ensure we have the submission from the iframe before we submit the form.
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
20
|
+
*
|
|
21
|
+
* @param options
|
|
22
|
+
* @return {*}
|
|
21
23
|
*/
|
|
22
|
-
submitForm(options?:
|
|
24
|
+
submitForm(options?: {}): any;
|
|
23
25
|
getSrc(): string;
|
|
24
|
-
setForm(form: any, flags?: {}):
|
|
26
|
+
setForm(form: any, flags?: {}): any;
|
|
25
27
|
/**
|
|
26
28
|
* Set's the value of this form component.
|
|
27
|
-
*
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
29
|
+
*
|
|
30
|
+
* @param submission
|
|
31
|
+
* @param flags
|
|
30
32
|
*/
|
|
31
|
-
setValue(submission:
|
|
33
|
+
setValue(submission: any, flags?: {}): boolean;
|
|
32
34
|
postMessage(message: any): void;
|
|
33
35
|
iframeFormSetUp: boolean | undefined;
|
|
34
36
|
focusOnComponent(key: any): void;
|
package/lib/mjs/PDF.js
CHANGED
|
@@ -138,7 +138,8 @@ export default class PDF extends Webform {
|
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Get the submission from the iframe.
|
|
141
|
-
*
|
|
141
|
+
*
|
|
142
|
+
* @return {Promise<any>}
|
|
142
143
|
*/
|
|
143
144
|
getSubmission() {
|
|
144
145
|
return new Promise((resolve) => {
|
|
@@ -148,8 +149,9 @@ export default class PDF extends Webform {
|
|
|
148
149
|
}
|
|
149
150
|
/**
|
|
150
151
|
* Ensure we have the submission from the iframe before we submit the form.
|
|
151
|
-
*
|
|
152
|
-
* @
|
|
152
|
+
*
|
|
153
|
+
* @param options
|
|
154
|
+
* @return {*}
|
|
153
155
|
*/
|
|
154
156
|
submitForm(options = {}) {
|
|
155
157
|
this.postMessage({ name: 'getErrors' });
|
|
@@ -191,9 +193,9 @@ export default class PDF extends Webform {
|
|
|
191
193
|
}
|
|
192
194
|
/**
|
|
193
195
|
* Set's the value of this form component.
|
|
194
|
-
*
|
|
195
|
-
* @param
|
|
196
|
-
* @
|
|
196
|
+
*
|
|
197
|
+
* @param submission
|
|
198
|
+
* @param flags
|
|
197
199
|
*/
|
|
198
200
|
setValue(submission, flags = {}) {
|
|
199
201
|
const changed = super.setValue(submission, flags);
|