@formio/js 5.0.0-dev.5604.02ffada → 5.0.0-dev.5610.11a9aca
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 +1 -0
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +641 -1189
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -11
- package/dist/formio.full.js +685 -913
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -11
- 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 +1855 -487
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +12 -2
- package/embed.d.ts +1 -0
- package/form.d.ts +1 -0
- package/lib/cjs/Element.d.ts +85 -96
- package/lib/cjs/Element.js +65 -76
- 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 +109 -0
- package/lib/cjs/PDF.d.ts +11 -13
- package/lib/cjs/PDF.js +6 -8
- package/lib/cjs/Webform.d.ts +180 -139
- package/lib/cjs/Webform.js +313 -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 +42 -19
- 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 +501 -266
- 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 +433 -190
- 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/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 +2 -2
- 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/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 +22 -48
- 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 +15 -20
- 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/form/Form.d.ts +31 -20
- 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 +13 -10
- 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 +3 -4
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +5 -3
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +4 -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 +1 -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 +13 -16
- 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 +72 -0
- 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/utils/Evaluator.d.ts +7 -3
- package/lib/cjs/utils/Evaluator.js +12 -18
- 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 +361 -216
- package/lib/cjs/utils/utils.js +329 -169
- package/lib/cjs/widgets/CalendarWidget.d.ts +9 -10
- package/lib/cjs/widgets/CalendarWidget.js +9 -11
- package/lib/mjs/Element.d.ts +85 -96
- package/lib/mjs/Element.js +65 -76
- 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 +105 -0
- package/lib/mjs/PDF.d.ts +11 -13
- package/lib/mjs/PDF.js +6 -8
- package/lib/mjs/Webform.d.ts +180 -139
- package/lib/mjs/Webform.js +325 -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 +41 -18
- 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 +501 -266
- 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 +433 -190
- 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/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 +2 -2
- 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/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 +22 -48
- 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 +15 -20
- 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/form/Form.d.ts +31 -20
- 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 +13 -10
- 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 +3 -4
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +5 -3
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +4 -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 +13 -16
- 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 +1 -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 +13 -16
- 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 +72 -0
- 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/utils/Evaluator.d.ts +7 -3
- package/lib/mjs/utils/Evaluator.js +10 -18
- 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 +361 -216
- package/lib/mjs/utils/utils.js +321 -161
- 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/cjs/utils/utils.d.ts
CHANGED
|
@@ -1,213 +1,248 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Evaluate a method.
|
|
3
|
-
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @
|
|
3
|
+
* @param {Function|string|object} func - The function to evaluate.
|
|
4
|
+
* @param {*} args - A map of arguments to pass to the function.
|
|
5
|
+
* @param {string} ret - The name of the "return" variable in the script.
|
|
6
|
+
* @param {boolean} tokenize - True if the script should be interpolated before being executed.
|
|
7
|
+
* @returns {*} - The result of the evaluation.
|
|
8
|
+
*/
|
|
9
|
+
export function evaluate(func: Function | string | object, args: any, ret: string, tokenize: boolean): any;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a random compoennt ID.
|
|
12
|
+
* @returns {string} - A random component ID.
|
|
7
13
|
*/
|
|
8
|
-
export function evaluate(func: any, args: any, ret: any, tokenize: any): any;
|
|
9
14
|
export function getRandomComponentId(): string;
|
|
10
15
|
/**
|
|
11
16
|
* Get a property value of an element.
|
|
12
|
-
*
|
|
13
|
-
* @param
|
|
14
|
-
* @
|
|
15
|
-
* @return {number}
|
|
17
|
+
* @param {CSSStyleDeclaration} style - The style element to get the property value from.
|
|
18
|
+
* @param {string} prop - The property to get the value for.
|
|
19
|
+
* @returns {number} - The value of the property.
|
|
16
20
|
*/
|
|
17
|
-
export function getPropertyValue(style:
|
|
21
|
+
export function getPropertyValue(style: CSSStyleDeclaration, prop: string): number;
|
|
18
22
|
/**
|
|
19
23
|
* Get an elements bounding rectagle.
|
|
20
|
-
*
|
|
21
|
-
* @
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
height: string;
|
|
24
|
+
* @param {HTMLElement} element - A DOM element to get the bounding rectangle for.
|
|
25
|
+
* @returns {{x: number, y: number, width: number, height: number}} - The bounding rectangle.
|
|
26
|
+
*/
|
|
27
|
+
export function getElementRect(element: HTMLElement): {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
29
32
|
};
|
|
30
33
|
/**
|
|
31
34
|
* Determines the boolean value of a setting.
|
|
32
|
-
*
|
|
33
|
-
* @
|
|
34
|
-
* @return {boolean}
|
|
35
|
+
* @param {string|boolean} value - A string or boolean value to convert to boolean.
|
|
36
|
+
* @returns {boolean} - The boolean value of the setting.
|
|
35
37
|
*/
|
|
36
|
-
export function boolValue(value:
|
|
38
|
+
export function boolValue(value: string | boolean): boolean;
|
|
37
39
|
/**
|
|
38
40
|
* Check to see if an ID is a mongoID.
|
|
39
|
-
* @param text
|
|
40
|
-
* @
|
|
41
|
+
* @param {string} text - The text to check if it is a mongoID.
|
|
42
|
+
* @returns {boolean} - TRUE if the text is a mongoID; FALSE otherwise.
|
|
41
43
|
*/
|
|
42
|
-
export function isMongoId(text:
|
|
43
|
-
index: number;
|
|
44
|
-
input: string;
|
|
45
|
-
} | boolean | any;
|
|
44
|
+
export function isMongoId(text: string): boolean;
|
|
46
45
|
/**
|
|
47
46
|
* Checks the calculated value for a provided component and data.
|
|
48
|
-
*
|
|
49
|
-
* @param {
|
|
50
|
-
*
|
|
51
|
-
* @param {Object} submission
|
|
52
|
-
* A submission object.
|
|
53
|
-
* @param data
|
|
54
|
-
* The full submission data.
|
|
47
|
+
* @param {import('@formio/core').Component} component - The component to check for the calculated value.
|
|
48
|
+
* @param {import('@formio/core').Submission} submission - A submission object.
|
|
49
|
+
* @param {*} rowData - The contextual row data for the component.
|
|
55
50
|
*/
|
|
56
|
-
export function checkCalculated(component:
|
|
51
|
+
export function checkCalculated(component: import('@formio/core').Component, submission: import('@formio/core').Submission, rowData: any): void;
|
|
57
52
|
/**
|
|
58
53
|
* Check if a simple conditional evaluates to true.
|
|
59
|
-
*
|
|
60
|
-
* @param condition
|
|
61
|
-
* @param
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
64
|
-
* @
|
|
65
|
-
* @returns {boolean}
|
|
54
|
+
* @param {import('@formio/core').Component} component - The component to check for the conditional.
|
|
55
|
+
* @param {import('@formio/core').SimpleConditional} condition - The condition to check.
|
|
56
|
+
* @param {*} row - The row data for the component.
|
|
57
|
+
* @param {*} data - The full submission data.
|
|
58
|
+
* @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.
|
|
59
|
+
* @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
|
|
66
60
|
*/
|
|
67
|
-
export function checkSimpleConditional(component:
|
|
68
|
-
export function getComponentActualValue(compPath: any, data: any, row: any): any;
|
|
61
|
+
export function checkSimpleConditional(component: import('@formio/core').Component, condition: import('@formio/core').SimpleConditional, row: any, data: any, instance: any): boolean;
|
|
69
62
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @param
|
|
73
|
-
* @param
|
|
74
|
-
* @
|
|
75
|
-
* @param data
|
|
76
|
-
* @returns {*}
|
|
63
|
+
* Returns a components normalized value.
|
|
64
|
+
* @param {string} compPath - The full path to the component.
|
|
65
|
+
* @param {*} data - The data object to get the value from.
|
|
66
|
+
* @param {*} row - The contextual row data for the component.
|
|
67
|
+
* @returns {*} - The normalized value of the component.
|
|
77
68
|
*/
|
|
78
|
-
export function
|
|
79
|
-
|
|
69
|
+
export function getComponentActualValue(compPath: string, data: any, row: any): any;
|
|
70
|
+
/**
|
|
71
|
+
* Check custom javascript conditional.
|
|
72
|
+
* @param {import('@formio/core').Component} component - The component to check for the conditional.
|
|
73
|
+
* @param {string} custom - The custom conditional string to evaluate.
|
|
74
|
+
* @param {*} row - The row data for the component.
|
|
75
|
+
* @param {*} data - The full submission data.
|
|
76
|
+
* @param {import('@formio/core').Form} form - The form object.
|
|
77
|
+
* @param {string} variable - The variable name for the result of the custom conditional.
|
|
78
|
+
* @param {*} onError - A custom return if there is an error or the value is null from the evaluation.
|
|
79
|
+
* @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
|
|
80
|
+
* @returns {*} - The result of the evaulation.
|
|
81
|
+
*/
|
|
82
|
+
export function checkCustomConditional(component: import('@formio/core').Component, custom: string, row: any, data: any, form: import('@formio/core').Form, variable: string, onError: any, instance: any): any;
|
|
83
|
+
/**
|
|
84
|
+
* Check a component for JSON conditionals.
|
|
85
|
+
* @param {import('@formio/core').Component} component - The component
|
|
86
|
+
* @param {import('@formio/core').JSONConditional} json - The json conditional to check.
|
|
87
|
+
* @param {*} row - The contextual row data for the component.
|
|
88
|
+
* @param {*} data - The full submission data.
|
|
89
|
+
* @param {import('@formio/core').Form} form - The Form JSON of the form.
|
|
90
|
+
* @param {*} onError - Custom return value if there is an error.
|
|
91
|
+
* @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
|
|
92
|
+
*/
|
|
93
|
+
export function checkJsonConditional(component: import('@formio/core').Component, json: import('@formio/core').JSONConditional, row: any, data: any, form: import('@formio/core').Form, onError: any): boolean;
|
|
80
94
|
/**
|
|
81
95
|
* Checks the conditions for a provided component and data.
|
|
82
|
-
*
|
|
83
|
-
* @param
|
|
84
|
-
*
|
|
85
|
-
* @param
|
|
86
|
-
*
|
|
87
|
-
* @
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
* @returns {boolean}
|
|
91
|
-
*/
|
|
92
|
-
export function checkCondition(component: any, row: any, data: any, form: any, instance: any): boolean;
|
|
96
|
+
* @param {import('@formio/core').Component} component - The component to check for the condition.
|
|
97
|
+
* @param {*} row - The data within a row
|
|
98
|
+
* @param {*} data - The full submission data.
|
|
99
|
+
* @param {import('@formio/core').Form} form - The form object.
|
|
100
|
+
* @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
|
|
101
|
+
* @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
|
|
102
|
+
*/
|
|
103
|
+
export function checkCondition(component: import('@formio/core').Component, row: any, data: any, form: import('@formio/core').Form, instance: any): boolean;
|
|
93
104
|
/**
|
|
94
105
|
* Test a trigger on a component.
|
|
95
|
-
*
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
98
|
-
* @param data
|
|
99
|
-
* @param
|
|
100
|
-
* @
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
export function
|
|
106
|
+
* @param {import('@formio/core').Component} component - The component to test the trigger against.
|
|
107
|
+
* @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.
|
|
108
|
+
* @param {import('@formio/core').DataObject} row - The contextual row data.
|
|
109
|
+
* @param {import('@formio/core').DataObject} data - The root data object.
|
|
110
|
+
* @param {import('@formio/core').Form} form - The form object.
|
|
111
|
+
* @param {any} instance - The component that is performing the trigger.
|
|
112
|
+
* @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.
|
|
113
|
+
*/
|
|
114
|
+
export function checkTrigger(component: import('@formio/core').Component, trigger: any, row: import('@formio/core').DataObject, data: import('@formio/core').DataObject, form: import('@formio/core').Form, instance: any): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Sets a property on a component via an executed Logic action.
|
|
117
|
+
* @param {import('@formio/core').Component} component - The component to set the property on.
|
|
118
|
+
* @param {import('@formio/core').LogicAction} action - The action to perform on the component.
|
|
119
|
+
* @param {string} result - The name of the variable in the evaulation to use as the result.
|
|
120
|
+
* @param {import('@formio/core').DataObject} row - The contextual row data.
|
|
121
|
+
* @param {import('@formio/core').DataObject} data - The full submission data.
|
|
122
|
+
* @param {any} instance - The component instance.
|
|
123
|
+
* @returns {import('@formio/core').Component} - The modified component.
|
|
124
|
+
*/
|
|
125
|
+
export function setActionProperty(component: import('@formio/core').Component, action: any, result: string, row: import('@formio/core').DataObject, data: import('@formio/core').DataObject, instance: any): import('@formio/core').Component;
|
|
104
126
|
/**
|
|
105
127
|
* Unescape HTML characters like <, >, & and etc.
|
|
106
|
-
* @param str
|
|
107
|
-
* @returns {string}
|
|
128
|
+
* @param {string} str - The string to unescape.
|
|
129
|
+
* @returns {string} - The unescaped string.
|
|
108
130
|
*/
|
|
109
|
-
export function unescapeHTML(str:
|
|
131
|
+
export function unescapeHTML(str: string): string;
|
|
110
132
|
/**
|
|
111
133
|
* Make HTML element from string
|
|
112
|
-
* @param str
|
|
113
|
-
* @param selector
|
|
114
|
-
* @returns {HTMLElement}
|
|
134
|
+
* @param {string} str - The string to convert to an HTML element.
|
|
135
|
+
* @param {string} selector - The selector to use to get the element once it is created.
|
|
136
|
+
* @returns {HTMLElement} - The HTML element that was created.
|
|
115
137
|
*/
|
|
116
|
-
export function convertStringToHTMLElement(str:
|
|
138
|
+
export function convertStringToHTMLElement(str: string, selector: string): HTMLElement;
|
|
117
139
|
/**
|
|
118
140
|
* Make a filename guaranteed to be unique.
|
|
119
|
-
* @param name
|
|
120
|
-
* @param template
|
|
121
|
-
* @param evalContext
|
|
122
|
-
* @returns {string}
|
|
141
|
+
* @param {string} name - The original name of the file.
|
|
142
|
+
* @param {string} template - The template to use for the unique name.
|
|
143
|
+
* @param {object} evalContext - The context to use for the evaluation.
|
|
144
|
+
* @returns {string} - A unique filename.
|
|
145
|
+
*/
|
|
146
|
+
export function uniqueName(name: string, template: string, evalContext: object): string;
|
|
147
|
+
/**
|
|
148
|
+
* Returns a GUID
|
|
149
|
+
* @returns {string} - A GUID.
|
|
123
150
|
*/
|
|
124
|
-
export function uniqueName(name: any, template: any, evalContext: any): string;
|
|
125
151
|
export function guid(): string;
|
|
126
152
|
/**
|
|
127
153
|
* Return a translated date setting.
|
|
128
|
-
*
|
|
129
|
-
* @
|
|
130
|
-
|
|
154
|
+
* @param {string|Date} date - The date to translate.
|
|
155
|
+
* @returns {(null|Date)} - The translated date.
|
|
156
|
+
*/
|
|
157
|
+
export function getDateSetting(date: string | Date): (null | Date);
|
|
158
|
+
/**
|
|
159
|
+
* Returns true if the date is a valid date. False otherwise.
|
|
160
|
+
* @param {Date|string} date - The date to check for validity.
|
|
161
|
+
* @returns {boolean} - TRUE if the date is valid; FALSE otherwise.
|
|
131
162
|
*/
|
|
132
|
-
export function
|
|
133
|
-
export function isValidDate(date: any): any;
|
|
163
|
+
export function isValidDate(date: Date | string): boolean;
|
|
134
164
|
/**
|
|
135
165
|
* Get the current timezone string.
|
|
136
|
-
*
|
|
137
|
-
* @return {string}
|
|
166
|
+
* @returns {string} - The current timezone.
|
|
138
167
|
*/
|
|
139
168
|
export function currentTimezone(): string;
|
|
140
169
|
/**
|
|
141
170
|
* Get an offset date provided a date object and timezone object.
|
|
142
|
-
*
|
|
143
|
-
* @param date
|
|
144
|
-
* @
|
|
145
|
-
* @return {Date}
|
|
171
|
+
* @param {Date} date - The date to offset.
|
|
172
|
+
* @param {string} timezone - The timezone to offset the date to.
|
|
173
|
+
* @returns {Date} - The offset date.
|
|
146
174
|
*/
|
|
147
|
-
export function offsetDate(date:
|
|
175
|
+
export function offsetDate(date: Date, timezone: string): Date;
|
|
148
176
|
/**
|
|
149
177
|
* Returns if the zones are loaded.
|
|
150
|
-
*
|
|
151
|
-
* @return {boolean}
|
|
178
|
+
* @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.
|
|
152
179
|
*/
|
|
153
180
|
export function zonesLoaded(): boolean;
|
|
154
181
|
/**
|
|
155
182
|
* Returns if we should load the zones.
|
|
156
|
-
*
|
|
157
|
-
* @
|
|
158
|
-
* @return {boolean}
|
|
183
|
+
* @param {string} timezone - The timezone to check if we should load the zones.
|
|
184
|
+
* @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.
|
|
159
185
|
*/
|
|
160
|
-
export function shouldLoadZones(timezone:
|
|
186
|
+
export function shouldLoadZones(timezone: string): boolean;
|
|
161
187
|
/**
|
|
162
188
|
* Externally load the timezone data.
|
|
163
|
-
*
|
|
164
|
-
* @
|
|
189
|
+
* @param {string} url - The URL to load the timezone data from.
|
|
190
|
+
* @param {string} timezone - The timezone to load.
|
|
191
|
+
* @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.
|
|
165
192
|
*/
|
|
166
|
-
export function loadZones(url:
|
|
193
|
+
export function loadZones(url: string, timezone: string): Promise<any> | any;
|
|
167
194
|
/**
|
|
168
195
|
* Get the moment date object for translating dates with timezones.
|
|
169
|
-
*
|
|
170
|
-
* @param
|
|
171
|
-
* @param
|
|
172
|
-
* @
|
|
173
|
-
* @return {*}
|
|
196
|
+
* @param {string|Date} value - The value to convert into a moment date.
|
|
197
|
+
* @param {string} format - The format to convert the date to.
|
|
198
|
+
* @param {string} timezone - The timezone to convert the date to.
|
|
199
|
+
* @returns {Date} - The moment date object.
|
|
174
200
|
*/
|
|
175
|
-
export function momentDate(value:
|
|
201
|
+
export function momentDate(value: string | Date, format: string, timezone: string): Date;
|
|
176
202
|
/**
|
|
177
203
|
* Format a date provided a value, format, and timezone object.
|
|
178
|
-
*
|
|
179
|
-
* @param value
|
|
180
|
-
* @param format
|
|
181
|
-
* @param timezone
|
|
182
|
-
* @
|
|
204
|
+
* @param {string} timezonesUrl - The URL to load the timezone data from.
|
|
205
|
+
* @param {string|Date} value - The value to format.
|
|
206
|
+
* @param {string} format - The format to format the date to.
|
|
207
|
+
* @param {string} timezone - The timezone to format the date to.
|
|
208
|
+
* @param {string} flatPickrInputFormat - The format to use for flatpickr input.
|
|
209
|
+
* @returns {string} - The formatted date.
|
|
183
210
|
*/
|
|
184
|
-
export function formatDate(timezonesUrl:
|
|
211
|
+
export function formatDate(timezonesUrl: string, value: string | Date, format: string, timezone: string, flatPickrInputFormat: string): string;
|
|
185
212
|
/**
|
|
186
213
|
* Pass a format function to format within a timezone.
|
|
187
|
-
*
|
|
188
|
-
* @param formatFn
|
|
189
|
-
* @param date
|
|
190
|
-
* @param format
|
|
191
|
-
* @param timezone
|
|
192
|
-
* @
|
|
193
|
-
*/
|
|
194
|
-
export function formatOffset(timezonesUrl:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
214
|
+
* @param {string} timezonesUrl - The URL to load the timezone data from.
|
|
215
|
+
* @param {Function} formatFn - The format function to use.
|
|
216
|
+
* @param {Date|string} date - The date to format.
|
|
217
|
+
* @param {string} format - The format to format the date to.
|
|
218
|
+
* @param {string} timezone - The timezone to format the date to.
|
|
219
|
+
* @returns {string} - The formatted date.
|
|
220
|
+
*/
|
|
221
|
+
export function formatOffset(timezonesUrl: string, formatFn: Function, date: Date | string, format: string, timezone: string): string;
|
|
222
|
+
/**
|
|
223
|
+
* Returns the local date format information.
|
|
224
|
+
* @param {Intl.LocalesArgument} locale - The locale to get the date format for.
|
|
225
|
+
* @returns {object} - The local date format information.
|
|
226
|
+
*/
|
|
227
|
+
export function getLocaleDateFormatInfo(locale: Intl.LocalesArgument): object;
|
|
198
228
|
/**
|
|
199
229
|
* Convert the format from the angular-datepicker module to flatpickr format.
|
|
200
|
-
* @param format
|
|
201
|
-
* @
|
|
230
|
+
* @param {string} format - The format to convert.
|
|
231
|
+
* @returns {string} - The converted format.
|
|
202
232
|
*/
|
|
203
|
-
export function convertFormatToFlatpickr(format:
|
|
233
|
+
export function convertFormatToFlatpickr(format: string): string;
|
|
204
234
|
/**
|
|
205
235
|
* Convert the format from the angular-datepicker module to moment format.
|
|
206
|
-
* @param format
|
|
207
|
-
* @
|
|
236
|
+
* @param {string} format - The format to convert.
|
|
237
|
+
* @returns {string} - The converted format.
|
|
238
|
+
*/
|
|
239
|
+
export function convertFormatToMoment(format: string): string;
|
|
240
|
+
/**
|
|
241
|
+
* Convert the format from the angular-datepicker module to mask format.
|
|
242
|
+
* @param {string} format - The format to convert.
|
|
243
|
+
* @returns {string} - The converted format.
|
|
208
244
|
*/
|
|
209
|
-
export function
|
|
210
|
-
export function convertFormatToMask(format: any): any;
|
|
245
|
+
export function convertFormatToMask(format: string): string;
|
|
211
246
|
/**
|
|
212
247
|
* Returns an input mask that is compatible with the input mask library.
|
|
213
248
|
* @param {string} mask - The Form.io input mask.
|
|
@@ -215,149 +250,259 @@ export function convertFormatToMask(format: any): any;
|
|
|
215
250
|
* @returns {Array} - The input mask for the mask library.
|
|
216
251
|
*/
|
|
217
252
|
export function getInputMask(mask: string, placeholderChar: string): any[];
|
|
218
|
-
|
|
219
|
-
|
|
253
|
+
/**
|
|
254
|
+
* Unmasks a value using the provided mask and placeholder characters.
|
|
255
|
+
* @param {string} value - The value to unmask.
|
|
256
|
+
* @param {string} mask - The mask to use for unmasking.
|
|
257
|
+
* @param {string} placeholderChar - The placeholder character to use for unmasking.
|
|
258
|
+
* @returns {string} - The unmasked value.
|
|
259
|
+
*/
|
|
260
|
+
export function unmaskValue(value: string, mask: string, placeholderChar: string): string;
|
|
261
|
+
/**
|
|
262
|
+
* Returns true if the value matches the input mask format.
|
|
263
|
+
* @param {string} value - The value to check.
|
|
264
|
+
* @param {string} inputMask - The input mask to check against.
|
|
265
|
+
* @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.
|
|
266
|
+
*/
|
|
267
|
+
export function matchInputMask(value: string, inputMask: string): boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Returns the number separators (i.e. 1,000) for the provided language.
|
|
270
|
+
* @param {string} lang - The language code to get the number separators for.
|
|
271
|
+
* @returns {{delimiter: string, decimalSeparator: string}} - The number separators.
|
|
272
|
+
*/
|
|
220
273
|
export function getNumberSeparators(lang?: string): {
|
|
221
274
|
delimiter: string;
|
|
222
275
|
decimalSeparator: string;
|
|
223
276
|
};
|
|
224
|
-
|
|
277
|
+
/**
|
|
278
|
+
* Returns the number for the maximum amount of decimal places for a number.
|
|
279
|
+
* @param {import('@formio/core').Component} component - The component to check for decimal limits.
|
|
280
|
+
* @param {number} defaultLimit - The default limit to use if none is provided in the component.
|
|
281
|
+
* @returns {number} - The number of decimal places allowed.
|
|
282
|
+
*/
|
|
283
|
+
export function getNumberDecimalLimit(component: import('@formio/core').Component, defaultLimit: number): number;
|
|
284
|
+
/**
|
|
285
|
+
* Returns the currency affixes for a specific language.
|
|
286
|
+
* @param {object} arg0 - The arguments object.
|
|
287
|
+
* @param {string} arg0.currency - The currency code to get the affixes for.
|
|
288
|
+
* @param {number} arg0.decimalLimit - The number of decimal places to use.
|
|
289
|
+
* @param {string} arg0.decimalSeparator - The decimal separator to use.
|
|
290
|
+
* @param {string} arg0.lang - The language code to use.
|
|
291
|
+
* @returns {{prefix: string, suffix: string}} - The currency affixes.
|
|
292
|
+
*/
|
|
225
293
|
export function getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }: {
|
|
226
|
-
currency:
|
|
227
|
-
decimalLimit:
|
|
228
|
-
decimalSeparator:
|
|
229
|
-
lang:
|
|
294
|
+
currency: string;
|
|
295
|
+
decimalLimit: number;
|
|
296
|
+
decimalSeparator: string;
|
|
297
|
+
lang: string;
|
|
230
298
|
}): {
|
|
231
299
|
prefix: string;
|
|
232
300
|
suffix: string;
|
|
233
301
|
};
|
|
234
302
|
/**
|
|
235
303
|
* Fetch the field data provided a component.
|
|
236
|
-
*
|
|
237
|
-
* @param data
|
|
238
|
-
* @
|
|
239
|
-
* @return {*}
|
|
304
|
+
* @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.
|
|
305
|
+
* @param {import('@formio/core').Component} component - The component to fetch the field data for.
|
|
306
|
+
* @returns {*} - The field data.
|
|
240
307
|
*/
|
|
241
|
-
export function fieldData(data:
|
|
308
|
+
export function fieldData(data: import('@formio/core').DataObject, component: import('@formio/core').Component): any;
|
|
242
309
|
/**
|
|
243
310
|
* Delays function execution with possibility to execute function synchronously or cancel it.
|
|
244
|
-
*
|
|
245
|
-
* @param
|
|
246
|
-
* @param
|
|
247
|
-
* @
|
|
311
|
+
* @param {Function} fn - Function to delay
|
|
312
|
+
* @param {number} delay - Delay time
|
|
313
|
+
* @param {...any} args - Arguments to pass to the function
|
|
314
|
+
* @returns {*} - Function to cancel the delay
|
|
248
315
|
*/
|
|
249
|
-
export function delay(fn:
|
|
316
|
+
export function delay(fn: Function, delay?: number, ...args: any[]): any;
|
|
250
317
|
/**
|
|
251
318
|
* Iterate the given key to make it unique.
|
|
252
|
-
*
|
|
253
|
-
* @param {String} key
|
|
319
|
+
* @param {string} key
|
|
254
320
|
* Modify the component key to be unique.
|
|
255
|
-
*
|
|
256
|
-
* @returns {String}
|
|
321
|
+
* @returns {string}
|
|
257
322
|
* The new component key.
|
|
258
323
|
*/
|
|
259
324
|
export function iterateKey(key: string): string;
|
|
260
325
|
/**
|
|
261
326
|
* Determines a unique key within a map provided the base key.
|
|
262
|
-
*
|
|
263
|
-
* @param
|
|
264
|
-
* @
|
|
265
|
-
* @return {*}
|
|
327
|
+
* @param {Record<string, string>} map - The map to check for uniqueness.
|
|
328
|
+
* @param {string} base - The base path of the key.
|
|
329
|
+
* @returns {string} - The unique key.
|
|
266
330
|
*/
|
|
267
|
-
export function uniqueKey(map:
|
|
331
|
+
export function uniqueKey(map: Record<string, string>, base: string): string;
|
|
268
332
|
/**
|
|
269
333
|
* Determines the major version number of bootstrap.
|
|
270
|
-
*
|
|
271
|
-
* @
|
|
334
|
+
* @param {object} options - The options to check for bootstrap version.
|
|
335
|
+
* @param {string} options.bootstrap - The bootstrap version to use.
|
|
336
|
+
* @returns {number} - The bootstrap version.
|
|
272
337
|
*/
|
|
273
|
-
export function bootstrapVersion(options:
|
|
338
|
+
export function bootstrapVersion(options: {
|
|
339
|
+
bootstrap: string;
|
|
340
|
+
}): number;
|
|
274
341
|
/**
|
|
275
342
|
* Retrun provided argument.
|
|
276
343
|
* If argument is a function, returns the result of a function call.
|
|
277
|
-
* @param {
|
|
278
|
-
*
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
344
|
+
* @param {Function|any} e - The argument to check if a function and call if so.
|
|
345
|
+
* @returns {any} - Either the result of the function call (e) or e if it is not a function.
|
|
346
|
+
*/
|
|
347
|
+
export function unfold(e: Function | any): any;
|
|
348
|
+
/**
|
|
349
|
+
* Create enclosed state. Returns functions to getting and cycling between states.
|
|
350
|
+
* @param {*} a - initial state.
|
|
351
|
+
* @param {*} b - next state.
|
|
352
|
+
* @returns {Functions[]} -- [get, toggle];
|
|
353
|
+
*/
|
|
354
|
+
export function withSwitch(a: any, b: any): Functions[];
|
|
355
|
+
/**
|
|
356
|
+
* Create a function that will call the provided function only the provided limit.
|
|
357
|
+
* @param {Function} callback - The callback to call.
|
|
358
|
+
* @param {object} options - The options to use.
|
|
359
|
+
* @param {number} options.limit - The limit to call the callback.
|
|
360
|
+
* @param {number} options.delay - The delay to wait before resetting the call count.
|
|
361
|
+
* @returns {Function} - The function that will call the callback only the provided limit.
|
|
362
|
+
*/
|
|
363
|
+
export function observeOverload(callback: Function, options?: {
|
|
364
|
+
limit: number;
|
|
365
|
+
delay: number;
|
|
366
|
+
}): Function;
|
|
367
|
+
/**
|
|
368
|
+
* Returns the components that are provided within an evaluation context.
|
|
369
|
+
* @param {any} context - The evaluation context to get the components from.
|
|
370
|
+
* @param {boolean} excludeNested - Exclude nested components.
|
|
371
|
+
* @param {Array<string>} excludedTypes - The types of components to exclude.
|
|
372
|
+
* @returns {Array} - The components within the evaluation context.
|
|
373
|
+
*/
|
|
374
|
+
export function getContextComponents(context: any, excludeNested: boolean, excludedTypes?: Array<string>): any[];
|
|
375
|
+
/**
|
|
376
|
+
* Returns the button components that are within an evaluation context.
|
|
377
|
+
* @param {any} context - The evaluation context to get the components from.
|
|
378
|
+
* @returns {Array} - The button components within the evaluation context.
|
|
379
|
+
*/
|
|
285
380
|
export function getContextButtons(context: any): any[];
|
|
286
381
|
/**
|
|
287
382
|
* Translates text values in html template.
|
|
288
|
-
*
|
|
289
|
-
* @param {
|
|
290
|
-
* @
|
|
291
|
-
*
|
|
292
|
-
* @returns {String}
|
|
293
|
-
* Html template with translated values.
|
|
383
|
+
* @param {string} template - The template to translate.
|
|
384
|
+
* @param {Function} translate - The translation function.
|
|
385
|
+
* @returns {string} - Html template with translated values.
|
|
294
386
|
*/
|
|
295
387
|
export function translateHTMLTemplate(template: string, translate: Function): string;
|
|
296
388
|
/**
|
|
297
389
|
* Sanitize an html string.
|
|
298
|
-
*
|
|
299
|
-
* @param
|
|
300
|
-
* @returns {
|
|
390
|
+
* @param {string} string - The string to sanitize.
|
|
391
|
+
* @param {any} options - The options to use for sanitization.
|
|
392
|
+
* @returns {string} - The sanitized html string.
|
|
301
393
|
*/
|
|
302
|
-
export function sanitize(string:
|
|
394
|
+
export function sanitize(string: string, options: any): string;
|
|
303
395
|
/**
|
|
304
396
|
* Fast cloneDeep for JSON objects only.
|
|
397
|
+
* @param {any} obj - The object to perform a fast clone deep against.
|
|
398
|
+
* @returns {any} - The cloned object.
|
|
305
399
|
*/
|
|
306
400
|
export function fastCloneDeep(obj: any): any;
|
|
307
|
-
|
|
308
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Returns if the component is an input component.
|
|
403
|
+
* @param {import('@formio/core').Component} componentJson - The JSON of a component.
|
|
404
|
+
* @returns {bool} - TRUE if the component is an input component; FALSE otherwise.
|
|
405
|
+
*/
|
|
406
|
+
export function isInputComponent(componentJson: import('@formio/core').Component): bool;
|
|
407
|
+
/**
|
|
408
|
+
* Takes a component path, and returns a component path array.
|
|
409
|
+
* @param {string} pathStr - The path string to convert to an array.
|
|
410
|
+
* @returns {Arryay<number>} - The array of paths.
|
|
411
|
+
*/
|
|
412
|
+
export function getArrayFromComponentPath(pathStr: string): Arryay<number>;
|
|
413
|
+
/**
|
|
414
|
+
* Returns true if the component is a child of the parent.
|
|
415
|
+
* @param {any} child - The child component to check.
|
|
416
|
+
* @param {any} parent - The parent component to check.
|
|
417
|
+
* @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.
|
|
418
|
+
*/
|
|
309
419
|
export function isChildOf(child: any, parent: any): boolean;
|
|
310
|
-
|
|
311
|
-
|
|
420
|
+
/**
|
|
421
|
+
* Takes an array of component path indexes, and returns a string version of that array.
|
|
422
|
+
* @param {Array<number>} path - The path array to convert to a string.
|
|
423
|
+
* @returns {string} - The string version of the path.
|
|
424
|
+
*/
|
|
425
|
+
export function getStringFromComponentPath(path: Array<number>): string;
|
|
426
|
+
/**
|
|
427
|
+
* Takes a number and rounds it to the provided precision amount.
|
|
428
|
+
* @param {number} number - The number to round.
|
|
429
|
+
* @param {number} precision - The precision to round the number to.
|
|
430
|
+
* @returns {string} - The rounded number.
|
|
431
|
+
*/
|
|
432
|
+
export function round(number: number, precision: number): string;
|
|
312
433
|
/**
|
|
313
434
|
* Check for Internet Explorer browser version
|
|
314
|
-
*
|
|
315
|
-
* @return {(number|null)}
|
|
435
|
+
* @returns {(number|null)} - The IE browser version or null if not IE
|
|
316
436
|
*/
|
|
317
437
|
export function getIEBrowserVersion(): (number | null);
|
|
318
438
|
/**
|
|
319
439
|
* Get browser name and version (modified from 'jquery-browser-plugin')
|
|
320
|
-
*
|
|
321
|
-
* @return {Object} -- {{browser name, version, isWebkit?}}
|
|
440
|
+
* @returns {object} -- {{browser name, version, isWebkit?}}
|
|
322
441
|
* Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser
|
|
323
442
|
*/
|
|
324
|
-
export function getBrowserInfo():
|
|
443
|
+
export function getBrowserInfo(): object;
|
|
444
|
+
/**
|
|
445
|
+
* Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.
|
|
446
|
+
* @param {string} path - The path to remove the indicies from.
|
|
447
|
+
* @returns {string} - The path without the indicies.
|
|
448
|
+
*/
|
|
325
449
|
export function getComponentPathWithoutIndicies(path?: string): string;
|
|
326
450
|
/**
|
|
327
451
|
* Returns a path to the component which based on its schema
|
|
328
|
-
* @param {
|
|
452
|
+
* @param {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property
|
|
453
|
+
* @param {string} path - Path to the component
|
|
454
|
+
* @returns {string} - Path to the component
|
|
329
455
|
*/
|
|
330
|
-
export function getComponentPath(component:
|
|
456
|
+
export function getComponentPath(component: import('@formio/core').Component, path?: string): string;
|
|
331
457
|
/**
|
|
332
458
|
* Returns a parent component of the passed component instance skipping all the Layout components
|
|
333
|
-
* @param {
|
|
334
|
-
* @
|
|
459
|
+
* @param {Component} componentInstance - The component to check for the parent.
|
|
460
|
+
* @returns {Component|undefined} - The parent data component.
|
|
335
461
|
*/
|
|
336
|
-
export function getDataParentComponent(componentInstance:
|
|
462
|
+
export function getDataParentComponent(componentInstance: Component): Component | undefined;
|
|
337
463
|
/**
|
|
338
464
|
* Returns whether the value is a promise
|
|
339
|
-
* @param value
|
|
340
|
-
* @
|
|
465
|
+
* @param {any} value - The value to check
|
|
466
|
+
* @returns {boolean} - TRUE if the value is a promise; FALSE otherwise
|
|
341
467
|
*/
|
|
342
468
|
export function isPromise(value: any): boolean;
|
|
343
469
|
/**
|
|
344
470
|
* Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
|
|
345
471
|
* changes by itself, e.g. EditGrid)
|
|
346
|
-
* @param componentInstance
|
|
347
|
-
* @param firstPass
|
|
348
|
-
* @returns {boolean
|
|
349
|
-
*/
|
|
350
|
-
export function isInsideScopingComponent(componentInstance:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
472
|
+
* @param {Component} componentInstance - The component to check for the scoping parent.
|
|
473
|
+
* @param {boolean} firstPass - Whether it is the first pass of the function
|
|
474
|
+
* @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
|
|
475
|
+
*/
|
|
476
|
+
export function isInsideScopingComponent(componentInstance: Component, firstPass?: boolean): boolean | any;
|
|
477
|
+
/**
|
|
478
|
+
* Returns all the focusable elements within the provided dom element.
|
|
479
|
+
* @param {HTMLElement} element - The element to get the focusable elements from.
|
|
480
|
+
* @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.
|
|
481
|
+
*/
|
|
482
|
+
export function getFocusableElements(element: HTMLElement): NodeList<HTMLElement>;
|
|
483
|
+
/**
|
|
484
|
+
* Returns the saved types for the component
|
|
485
|
+
* @param {import('@formio/core').Component} fullSchema - The component schema
|
|
486
|
+
* @returns {Array<string>|null} - The saved types for the component
|
|
487
|
+
*/
|
|
488
|
+
export function getComponentSavedTypes(fullSchema: import('@formio/core').Component): Array<string> | null;
|
|
489
|
+
/**
|
|
490
|
+
* Returns the template keys inside the template code.
|
|
491
|
+
* @param {string} template - The template to get the keys from.
|
|
492
|
+
* @returns {Array<string>} - The keys inside the template.
|
|
493
|
+
*/
|
|
494
|
+
export function getItemTemplateKeys(template: string): Array<string>;
|
|
495
|
+
/**
|
|
496
|
+
* Returns if the component is a select resource with an object for its value.
|
|
497
|
+
* @param {import('@formio/core').Component} comp - The component to check.
|
|
498
|
+
* @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.
|
|
499
|
+
*/
|
|
500
|
+
export function isSelectResourceWithObjectValue(comp?: import('@formio/core').Component): boolean;
|
|
355
501
|
export * from "./formUtils";
|
|
356
502
|
/**
|
|
357
503
|
* Map values through unfold and return first non-nil value.
|
|
358
|
-
* @param {Array<T>} collection
|
|
359
|
-
*
|
|
360
|
-
* @return {T}
|
|
504
|
+
* @param {Array<T>} collection - The collection to map through unfold.;
|
|
505
|
+
* @returns {T} - The first non-nil value.
|
|
361
506
|
*/
|
|
362
507
|
export const firstNonNil: any;
|
|
363
508
|
export namespace componentValueTypes {
|
|
@@ -369,9 +514,9 @@ export namespace componentValueTypes {
|
|
|
369
514
|
let date: string;
|
|
370
515
|
let any: string;
|
|
371
516
|
}
|
|
372
|
-
export function interpolateErrors(component:
|
|
517
|
+
export function interpolateErrors(component: Component, errors: FieldError[], interpolateFn: Function): [];
|
|
373
518
|
import jsonLogic from 'json-logic-js';
|
|
374
519
|
import ConditionOperators from './conditionOperators';
|
|
375
|
-
import Evaluator from './Evaluator';
|
|
376
|
-
export const interpolate:
|
|
520
|
+
import { Evaluator } from './Evaluator';
|
|
521
|
+
export const interpolate: typeof Evaluator.interpolate;
|
|
377
522
|
export { jsonLogic, ConditionOperators, Evaluator, _ };
|