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