@formio/js 5.0.0-dev.5604.02ffada → 5.0.0-dev.5610.c46fab6
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 +646 -1194
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -11
- package/dist/formio.full.js +690 -918
- 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 +1856 -488
- 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 +86 -96
- package/lib/cjs/Element.js +68 -78
- 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 +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 +362 -216
- package/lib/cjs/utils/utils.js +331 -224
- package/lib/cjs/widgets/CalendarWidget.d.ts +9 -10
- package/lib/cjs/widgets/CalendarWidget.js +9 -11
- package/lib/mjs/Element.d.ts +86 -96
- package/lib/mjs/Element.js +68 -78
- 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 +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 +362 -216
- package/lib/mjs/utils/utils.js +325 -218
- 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
|
@@ -6,36 +6,34 @@ declare class Component extends Element {
|
|
|
6
6
|
static schema(...sources: any[]): any;
|
|
7
7
|
/**
|
|
8
8
|
* Return the simple condition settings as part of the component.
|
|
9
|
-
*
|
|
10
|
-
* @return {Object}
|
|
11
|
-
*
|
|
9
|
+
* @returns {object} - The simple conditional settings.
|
|
12
10
|
*/
|
|
13
|
-
static get conditionOperatorsSettings():
|
|
11
|
+
static get conditionOperatorsSettings(): object;
|
|
14
12
|
/**
|
|
15
13
|
* Return the array of possible types of component value absed on its schema.
|
|
16
|
-
*
|
|
17
14
|
* @param schema
|
|
18
|
-
* @
|
|
19
|
-
*
|
|
15
|
+
* @returns {Array}
|
|
20
16
|
*/
|
|
21
17
|
static savedValueTypes(schema: any): any[];
|
|
22
18
|
/**
|
|
23
19
|
* Provides a table view for this component. Override if you wish to do something different than using getView
|
|
24
20
|
* method of your instance.
|
|
25
|
-
*
|
|
26
21
|
* @param value
|
|
27
22
|
* @param options
|
|
28
23
|
*/
|
|
29
24
|
static tableView(value: any, options: any): void;
|
|
30
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Returns the component condition operator settings if available.
|
|
27
|
+
* @returns {object} - The component condition operator settings.
|
|
28
|
+
*/
|
|
29
|
+
static get serverConditionSettings(): object;
|
|
31
30
|
/**
|
|
32
31
|
* Initialize a new Component.
|
|
33
|
-
*
|
|
34
|
-
* @param {
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {Object} data - The global data submission object this component will belong.
|
|
32
|
+
* @param {object} component - The component JSON you wish to initialize.
|
|
33
|
+
* @param {object} options - The options for this component.
|
|
34
|
+
* @param {object} data - The global data submission object this component will belong.
|
|
37
35
|
*/
|
|
38
|
-
constructor(component:
|
|
36
|
+
constructor(component: object, options: object, data: object);
|
|
39
37
|
id: any;
|
|
40
38
|
/**
|
|
41
39
|
* Determines if this component has a condition assigned to it.
|
|
@@ -49,7 +47,6 @@ declare class Component extends Element {
|
|
|
49
47
|
refs: {};
|
|
50
48
|
/**
|
|
51
49
|
* The data path to this specific component instance.
|
|
52
|
-
*
|
|
53
50
|
* @type {string}
|
|
54
51
|
*/
|
|
55
52
|
path: string;
|
|
@@ -93,32 +90,27 @@ declare class Component extends Element {
|
|
|
93
90
|
row: number;
|
|
94
91
|
/**
|
|
95
92
|
* Points to a flat map of child components (if applicable).
|
|
96
|
-
*
|
|
97
|
-
* @type {Object}
|
|
93
|
+
* @type {object}
|
|
98
94
|
*/
|
|
99
|
-
childComponentsMap:
|
|
95
|
+
childComponentsMap: object;
|
|
100
96
|
/**
|
|
101
97
|
* Determines if this component is disabled, or not.
|
|
102
|
-
*
|
|
103
98
|
* @type {boolean}
|
|
104
99
|
*/
|
|
105
100
|
_disabled: boolean;
|
|
106
101
|
/**
|
|
107
102
|
* Points to the root component, usually the FormComponent.
|
|
108
|
-
*
|
|
109
103
|
* @type {Component}
|
|
110
104
|
*/
|
|
111
105
|
root: Component;
|
|
112
106
|
localRoot: any;
|
|
113
107
|
/**
|
|
114
108
|
* If this input has been input and provided value.
|
|
115
|
-
*
|
|
116
109
|
* @type {boolean}
|
|
117
110
|
*/
|
|
118
111
|
pristine: boolean;
|
|
119
112
|
/**
|
|
120
113
|
* Points to the parent component.
|
|
121
|
-
*
|
|
122
114
|
* @type {Component}
|
|
123
115
|
*/
|
|
124
116
|
parent: Component;
|
|
@@ -136,7 +128,6 @@ declare class Component extends Element {
|
|
|
136
128
|
triggerChange: (...args: any[]) => any;
|
|
137
129
|
/**
|
|
138
130
|
* Used to trigger a redraw event within this component.
|
|
139
|
-
*
|
|
140
131
|
* @type {Function}
|
|
141
132
|
*/
|
|
142
133
|
triggerRedraw: Function;
|
|
@@ -154,13 +145,12 @@ declare class Component extends Element {
|
|
|
154
145
|
type: any;
|
|
155
146
|
/**
|
|
156
147
|
* Sets the static value of this component.
|
|
157
|
-
*
|
|
158
|
-
* @param value
|
|
148
|
+
* @param {*} value - The value to set for this component.
|
|
159
149
|
*/
|
|
160
150
|
set dataValue(value: any);
|
|
161
151
|
/**
|
|
162
152
|
* Get the static value of this component.
|
|
163
|
-
* @
|
|
153
|
+
* @returns {*} - The value for this component.
|
|
164
154
|
*/
|
|
165
155
|
get dataValue(): any;
|
|
166
156
|
/**
|
|
@@ -184,13 +174,12 @@ declare class Component extends Element {
|
|
|
184
174
|
init(): void;
|
|
185
175
|
/**
|
|
186
176
|
* Disable this component.
|
|
187
|
-
*
|
|
188
|
-
* @param {boolean} disabled
|
|
177
|
+
* @param {boolean} disabled - TRUE to disable the component.
|
|
189
178
|
*/
|
|
190
179
|
set disabled(disabled: boolean);
|
|
191
180
|
/**
|
|
192
181
|
* Return if the component is disabled.
|
|
193
|
-
* @
|
|
182
|
+
* @returns {boolean} - TRUE if the component is disabled.
|
|
194
183
|
*/
|
|
195
184
|
get disabled(): boolean;
|
|
196
185
|
afterComponentAssign(): void;
|
|
@@ -209,13 +198,13 @@ declare class Component extends Element {
|
|
|
209
198
|
shouldForceHide(component: any): any;
|
|
210
199
|
shouldForceShow(component: any): any;
|
|
211
200
|
/**
|
|
212
|
-
*
|
|
213
|
-
* @param
|
|
201
|
+
* Sets the component visibility.
|
|
202
|
+
* @param {boolean} value - Whether the component should be visible or not.
|
|
214
203
|
*/
|
|
215
204
|
set visible(value: boolean);
|
|
216
205
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @returns {boolean}
|
|
206
|
+
* Returns the component visibility
|
|
207
|
+
* @returns {boolean} - Whether the component is visible or not.
|
|
219
208
|
*/
|
|
220
209
|
get visible(): boolean;
|
|
221
210
|
set currentForm(instance: any);
|
|
@@ -239,26 +228,30 @@ declare class Component extends Element {
|
|
|
239
228
|
};
|
|
240
229
|
/**
|
|
241
230
|
* Returns only the schema that is different from the default.
|
|
242
|
-
*
|
|
243
|
-
* @param schema
|
|
244
|
-
* @param
|
|
231
|
+
* @param {object} schema - The "full" json schema for the component.
|
|
232
|
+
* @param {object} defaultSchema - The "default" json schema for the component.
|
|
233
|
+
* @param {boolean} recursion - If we are currently in a recursive loop.
|
|
234
|
+
* @returns {object} - The minified json schema for this component.
|
|
245
235
|
*/
|
|
246
|
-
getModifiedSchema(schema:
|
|
236
|
+
getModifiedSchema(schema: object, defaultSchema: object, recursion: boolean): object;
|
|
247
237
|
/**
|
|
248
238
|
* Returns the JSON schema for this component.
|
|
239
|
+
* @returns {object} - The JSON schema for this component.
|
|
249
240
|
*/
|
|
250
|
-
get schema():
|
|
241
|
+
get schema(): object;
|
|
251
242
|
/**
|
|
252
243
|
* Returns true if component is inside DataGrid
|
|
244
|
+
* @returns {boolean} - True if component is inside DataGrid
|
|
253
245
|
*/
|
|
254
|
-
get isInDataGrid():
|
|
246
|
+
get isInDataGrid(): boolean;
|
|
255
247
|
/**
|
|
256
248
|
* Translate a text using the i18n system.
|
|
257
|
-
*
|
|
258
249
|
* @param {string} text - The i18n identifier.
|
|
259
|
-
* @param {
|
|
250
|
+
* @param {object} params - The i18n parameters to use for translation.
|
|
251
|
+
* @param {...any} args - Additional arguments to pass to the translation library.
|
|
252
|
+
* @returns {string} - The translated text.
|
|
260
253
|
*/
|
|
261
|
-
t(text: string, params?:
|
|
254
|
+
t(text: string, params?: object, ...args: any[]): string;
|
|
262
255
|
labelIsHidden(): any;
|
|
263
256
|
transform(type: any, value: any): any;
|
|
264
257
|
getTemplate(names: any, modes: any): {
|
|
@@ -272,53 +265,72 @@ declare class Component extends Element {
|
|
|
272
265
|
referenceAttributeName: any;
|
|
273
266
|
} | null;
|
|
274
267
|
checkTemplateMode(templatesByName: any, modes: any): any;
|
|
275
|
-
getFormattedAttribute(attr: any):
|
|
276
|
-
getFormattedTooltip(tooltipValue: any):
|
|
268
|
+
getFormattedAttribute(attr: any): string;
|
|
269
|
+
getFormattedTooltip(tooltipValue: any): string;
|
|
277
270
|
isHtmlRenderMode(): boolean;
|
|
278
|
-
renderTemplate(name: any, data
|
|
271
|
+
renderTemplate(name: any, data?: {}, modeOption?: string): any;
|
|
279
272
|
/**
|
|
280
273
|
* Sanitize an html string.
|
|
281
|
-
*
|
|
282
|
-
* @param
|
|
283
|
-
* @
|
|
274
|
+
* @param {string} dirty - The dirty html string to sanitize.
|
|
275
|
+
* @param {boolean} forceSanitize - If we should force the sanitize to occur.
|
|
276
|
+
* @param {object} options - The options for the sanitize.
|
|
277
|
+
* @returns {*} - The sanitized html string.
|
|
284
278
|
*/
|
|
285
|
-
sanitize(dirty:
|
|
279
|
+
sanitize(dirty: string, forceSanitize?: boolean, options?: object): any;
|
|
286
280
|
/**
|
|
287
281
|
* Render a template string into html.
|
|
288
|
-
*
|
|
289
|
-
* @param template
|
|
290
|
-
* @
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
* @param {string} template - The template to render.
|
|
283
|
+
* @param {object} data - The data to provide to the template.
|
|
284
|
+
* @returns {HTMLElement | string} - The created element or an empty string if template is not specified.
|
|
285
|
+
*/
|
|
286
|
+
renderString(template: string, data: object): HTMLElement | string;
|
|
287
|
+
/**
|
|
288
|
+
* Allows for modification of the component value prior to submission.
|
|
289
|
+
* @param {*} input - The input to be modified.
|
|
290
|
+
* @returns {*} - The modified input mapping for the extended component.
|
|
294
291
|
*/
|
|
295
|
-
renderString(template: any, data: any): HTMLElement | string;
|
|
296
292
|
performInputMapping(input: any): any;
|
|
293
|
+
/**
|
|
294
|
+
* Returns the component "widget" if one is available.
|
|
295
|
+
* @returns {Widget|null} - The widget instance. null if not available.
|
|
296
|
+
*/
|
|
297
297
|
get widget(): any;
|
|
298
|
-
getBrowserLanguage(): any;
|
|
299
298
|
/**
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
* @return {*}
|
|
299
|
+
* Returns the native supported browser language.
|
|
300
|
+
* @returns {string|null} - The native browser language that is supported.
|
|
304
301
|
*/
|
|
305
|
-
|
|
306
|
-
beforeNext(): any;
|
|
302
|
+
getBrowserLanguage(): string | null;
|
|
307
303
|
/**
|
|
308
|
-
* Called before a
|
|
309
|
-
* to
|
|
310
|
-
*
|
|
311
|
-
* @return {*}
|
|
304
|
+
* Called before a next and previous page is triggered allowing the components to perform special functions.
|
|
305
|
+
* @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the next/previous page navigation.
|
|
312
306
|
*/
|
|
313
|
-
|
|
307
|
+
beforePage(): Promise<boolean>;
|
|
308
|
+
/**
|
|
309
|
+
* Called before the next page is triggered allowing the components to hook into the page navigation and perform tasks.
|
|
310
|
+
* @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the next page navigation.
|
|
311
|
+
*/
|
|
312
|
+
beforeNext(): Promise<boolean>;
|
|
313
|
+
/**
|
|
314
|
+
* Called before a submission is triggered allowing the components to perform special async functions.
|
|
315
|
+
* @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the submission.
|
|
316
|
+
*/
|
|
317
|
+
beforeSubmit(): Promise<boolean>;
|
|
314
318
|
/**
|
|
315
319
|
* Return the submission timezone.
|
|
316
|
-
*
|
|
317
|
-
|
|
320
|
+
* @returns {string} - The submission timezone.
|
|
321
|
+
*/
|
|
322
|
+
get submissionTimezone(): string;
|
|
323
|
+
/**
|
|
324
|
+
* Return the current timezone.
|
|
325
|
+
* @returns {string} - The current timezone.
|
|
326
|
+
*/
|
|
327
|
+
get timezone(): string;
|
|
328
|
+
/**
|
|
329
|
+
* Return the current timezone.
|
|
330
|
+
* @param {object} settings - Settings to control how the timezone should be returned.
|
|
331
|
+
* @returns {string} - The current timezone.
|
|
318
332
|
*/
|
|
319
|
-
|
|
320
|
-
get timezone(): any;
|
|
321
|
-
getTimezone(settings: any): any;
|
|
333
|
+
getTimezone(settings: object): string;
|
|
322
334
|
/**
|
|
323
335
|
*
|
|
324
336
|
* @param {HTMLElement} element - The containing DOM element to query for the ref value.
|
|
@@ -326,28 +338,92 @@ declare class Component extends Element {
|
|
|
326
338
|
* @param {string} [referenceAttributeName] - The attribute name to use for the reference.
|
|
327
339
|
*/
|
|
328
340
|
loadRefs(element: HTMLElement, refs: object, referenceAttributeName?: string | undefined): void;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Opens the modal element.
|
|
343
|
+
* @param {string} template - The template to use for the modal dialog.
|
|
344
|
+
*/
|
|
345
|
+
setOpenModalElement(template?: string): void;
|
|
346
|
+
/**
|
|
347
|
+
* Returns the modal preview template.
|
|
348
|
+
* @returns {string} - The modal preview template.
|
|
349
|
+
*/
|
|
350
|
+
getModalPreviewTemplate(): string;
|
|
351
|
+
/**
|
|
352
|
+
* Performs a complete build of a component, which empties, renders, sets the content in the DOM, and then finally attaches events.
|
|
353
|
+
* @param {HTMLElement} element - The element to attach this component to.
|
|
354
|
+
* @returns {Promise<void>} - A promise that resolves when the component has been built.
|
|
355
|
+
*/
|
|
356
|
+
build(element: HTMLElement): Promise<void>;
|
|
332
357
|
get hasModalSaveButton(): boolean;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Renders a component as an HTML string.
|
|
360
|
+
* @param {string} children - The contents of all the children HTML as a string.
|
|
361
|
+
* @param {boolean} topLevel - If this is the topmost component that is being rendered.
|
|
362
|
+
* @returns {string} - The rendered HTML string of a component.
|
|
363
|
+
*/
|
|
364
|
+
render(children?: string, topLevel?: boolean): string;
|
|
365
|
+
/**
|
|
366
|
+
* Attaches all the tooltips provided the refs object.
|
|
367
|
+
* @param {object} toolTipsRefs - The refs for the tooltips within your template.
|
|
368
|
+
* @returns {void}
|
|
369
|
+
*/
|
|
370
|
+
attachTooltips(toolTipsRefs: object): void;
|
|
371
|
+
/**
|
|
372
|
+
* Create a new component modal for this component.
|
|
373
|
+
* @param {HTMLElement} element - The element to attach the modal to.
|
|
374
|
+
* @param {boolean} modalShouldBeOpened - TRUE if the modal should open immediately.
|
|
375
|
+
* @param {any} currentValue - The current value of the component.
|
|
376
|
+
* @returns {ComponentModal} - The created component modal.
|
|
377
|
+
*/
|
|
378
|
+
createComponentModal(element: HTMLElement, modalShouldBeOpened: boolean, currentValue: any): ComponentModal;
|
|
379
|
+
/**
|
|
380
|
+
* Attaches all event listensers for this component to the DOM elements that were rendered.
|
|
381
|
+
* @param {HTMLElement} element - The element to attach the listeners to.
|
|
382
|
+
* @returns {Promise<void>} - Resolves when the component is done attaching to the DOM.
|
|
383
|
+
*/
|
|
384
|
+
attach(element: HTMLElement): Promise<void>;
|
|
337
385
|
componentModal: any;
|
|
386
|
+
/**
|
|
387
|
+
* Restors the "focus" on a component after a redraw event has occured.
|
|
388
|
+
*/
|
|
338
389
|
restoreFocus(): void;
|
|
339
|
-
|
|
340
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Adds a keyboard shortcut to this component.
|
|
392
|
+
* @param {HTMLElement} element - The element to attach the keyboard shortcut to.
|
|
393
|
+
* @param {string} shortcut - The keyboard shortcut to add.
|
|
394
|
+
* @returns {void}
|
|
395
|
+
*/
|
|
396
|
+
addShortcut(element: HTMLElement, shortcut: string): void;
|
|
397
|
+
/**
|
|
398
|
+
* Removes a keyboard shortcut from this component.
|
|
399
|
+
* @param {HTMLElement} element - The element to remove the keyboard shortcut from.
|
|
400
|
+
* @param {string} shortcut - The keyboard shortcut to remove.
|
|
401
|
+
* @returns {void}
|
|
402
|
+
*/
|
|
403
|
+
removeShortcut(element: HTMLElement, shortcut: string): void;
|
|
341
404
|
/**
|
|
342
405
|
* Remove all event handlers.
|
|
343
406
|
*/
|
|
344
407
|
detach(): void;
|
|
345
|
-
|
|
346
|
-
|
|
408
|
+
/**
|
|
409
|
+
* Determines if the component should be refreshed based on the path of another component that changed.
|
|
410
|
+
* @param {string} refreshData - The path of the data that needs to trigger a refresh.
|
|
411
|
+
* @param {boolean} changed - Flag that is true if the data has been changed.
|
|
412
|
+
* @param {any} flags - The flags for the checkData procedure.
|
|
413
|
+
* @returns {void}
|
|
414
|
+
*/
|
|
415
|
+
checkRefresh(refreshData: string, changed: boolean, flags: any): void;
|
|
416
|
+
/**
|
|
417
|
+
* Iterates over a list of changes, and determines if the component should be refreshed if it is configured to refresh on any of those components.
|
|
418
|
+
* @param {Array<any>} changes - The list of components that have changed.
|
|
419
|
+
* @param {any} flags - The checkData flags.
|
|
420
|
+
* @returns {void}
|
|
421
|
+
*/
|
|
422
|
+
checkRefreshOn(changes: Array<any>, flags?: any): void;
|
|
347
423
|
/**
|
|
348
424
|
* Refreshes the component with a new value.
|
|
349
|
-
*
|
|
350
|
-
* @
|
|
425
|
+
* @param {any} value - The latest value of the component to check if it needs to be refreshed.
|
|
426
|
+
* @returns {void}
|
|
351
427
|
*/
|
|
352
428
|
refresh(value: any): void;
|
|
353
429
|
refreshOnChanged: boolean | undefined;
|
|
@@ -358,33 +434,84 @@ declare class Component extends Element {
|
|
|
358
434
|
* with the components data and returns true if they are in the same context.
|
|
359
435
|
*
|
|
360
436
|
* Different rows of the same EditGrid, for example, are in different contexts.
|
|
361
|
-
*
|
|
362
|
-
* @
|
|
437
|
+
* @param {any} component - The component to check if it is in the same context as this component.
|
|
438
|
+
* @returns {boolean} - TRUE if the component is in the same context as this component.
|
|
363
439
|
*/
|
|
364
440
|
inContext(component: any): boolean;
|
|
365
|
-
|
|
366
|
-
|
|
441
|
+
/**
|
|
442
|
+
* Determines if we are in "view" only mode.
|
|
443
|
+
* @returns {boolean} - TRUE if we are in "view" only mode.
|
|
444
|
+
*/
|
|
445
|
+
get viewOnly(): boolean;
|
|
446
|
+
/**
|
|
447
|
+
* Sets the HTMLElement for this component.
|
|
448
|
+
* @param {HTMLElement} element - The element that is attached to this component.
|
|
449
|
+
* @returns {void}
|
|
450
|
+
*/
|
|
451
|
+
setElement(element: HTMLElement): void;
|
|
367
452
|
element: any;
|
|
368
|
-
|
|
453
|
+
/**
|
|
454
|
+
* Creates an element to hold the "view only" version of this component.
|
|
455
|
+
* @returns {HTMLElement} - The element for this component.
|
|
456
|
+
*/
|
|
457
|
+
createViewOnlyElement(): HTMLElement;
|
|
458
|
+
/**
|
|
459
|
+
* The default value for the "view only" mode of a component if the value is not provided.
|
|
460
|
+
* @returns {string} - The default value for this component.
|
|
461
|
+
*/
|
|
369
462
|
get defaultViewOnlyValue(): string;
|
|
370
463
|
/**
|
|
371
464
|
* Uses the widget to determine the output string.
|
|
372
|
-
*
|
|
373
|
-
* @param
|
|
374
|
-
* @
|
|
465
|
+
* @param {any} value - The current value of the component.
|
|
466
|
+
* @param {any} options - The options for getValueAsString.
|
|
467
|
+
* @returns {any|Array<any>} - The value as a string.
|
|
468
|
+
*/
|
|
469
|
+
getWidgetValueAsString(value: any, options: any): any | Array<any>;
|
|
470
|
+
/**
|
|
471
|
+
* Returns the value of the component as a string.
|
|
472
|
+
* @param {any} value - The value for this component.
|
|
473
|
+
* @param {any} options - The options for this component.
|
|
474
|
+
* @returns {string} - The string representation of the value of this component.
|
|
475
|
+
*/
|
|
476
|
+
getValueAsString(value: any, options: any): string;
|
|
477
|
+
/**
|
|
478
|
+
* Returns the string representation "view" of the component value.
|
|
479
|
+
* @param {any} value - The value of the component.
|
|
480
|
+
* @param {any} options - The options for this component.
|
|
481
|
+
* @returns {string} - The string representation of the value of this component.
|
|
482
|
+
*/
|
|
483
|
+
getView(value: any, options: any): string;
|
|
484
|
+
/**
|
|
485
|
+
* Updates the items list for this component. Useful for Select and other List component types.
|
|
486
|
+
* @param {...any} args - The arguments to pass to the onChange event.
|
|
487
|
+
* @returns {void}
|
|
375
488
|
*/
|
|
376
|
-
getWidgetValueAsString(value: any, options: any): any;
|
|
377
|
-
getValueAsString(value: any, options: any): any;
|
|
378
|
-
getView(value: any, options: any): any;
|
|
379
489
|
updateItems(...args: any[]): void;
|
|
380
490
|
/**
|
|
381
|
-
*
|
|
382
|
-
* @param {
|
|
383
|
-
* @
|
|
491
|
+
* Returns the value for a specific item in a List type component.
|
|
492
|
+
* @param {any} data - The data for this component.
|
|
493
|
+
* @param {boolean} [forceUseValue] - if true, return 'value' property of the data
|
|
494
|
+
* @returns {any} - The value of the item.
|
|
384
495
|
*/
|
|
385
496
|
itemValue(data: any, forceUseValue?: boolean | undefined): any;
|
|
497
|
+
/**
|
|
498
|
+
* Returns the item value for html mode.
|
|
499
|
+
* @param {any} value - The value for this component.
|
|
500
|
+
* @returns {any} - The value of the item for html mode.
|
|
501
|
+
*/
|
|
386
502
|
itemValueForHTMLMode(value: any): any;
|
|
387
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Creates a modal to input the value of this component.
|
|
505
|
+
* @param {HTMLElement} element - The element to attach the modal to.
|
|
506
|
+
* @param {any} attr - A list of attributes to add to the modal.
|
|
507
|
+
* @param {boolean} confirm - If we should add a confirmation to the modal that keeps it from closing unless confirmed.
|
|
508
|
+
* @returns {HTMLElement} - The created modal element.
|
|
509
|
+
*/
|
|
510
|
+
createModal(element: HTMLElement, attr: any, confirm: boolean): HTMLElement;
|
|
511
|
+
/**
|
|
512
|
+
* Uses CSS classes to show or hide an element.
|
|
513
|
+
* @returns {boolean} - TRUE if the element has been css removed.
|
|
514
|
+
*/
|
|
388
515
|
get optimizeRedraw(): boolean;
|
|
389
516
|
/**
|
|
390
517
|
* Retrieves the CSS class name of this component.
|
|
@@ -393,123 +520,251 @@ declare class Component extends Element {
|
|
|
393
520
|
get className(): string;
|
|
394
521
|
/**
|
|
395
522
|
* Build the custom style from the layout values
|
|
396
|
-
* @
|
|
523
|
+
* @returns {string} - The custom style
|
|
397
524
|
*/
|
|
398
525
|
get customStyle(): string;
|
|
399
|
-
|
|
526
|
+
/**
|
|
527
|
+
* Returns if the application is on a mobile device.
|
|
528
|
+
* @returns {boolean} - TRUE if the application is on a mobile device.
|
|
529
|
+
*/
|
|
530
|
+
get isMobile(): boolean;
|
|
400
531
|
/**
|
|
401
532
|
* Returns the outside wrapping element of this component.
|
|
402
|
-
* @returns {HTMLElement}
|
|
533
|
+
* @returns {HTMLElement} - The wrapping element of this component.
|
|
403
534
|
*/
|
|
404
535
|
getElement(): HTMLElement;
|
|
536
|
+
/**
|
|
537
|
+
* Create an evaluation context for all script executions and interpolations.
|
|
538
|
+
* @param {any} additional - Additional context to provide.
|
|
539
|
+
* @returns {any} - The evaluation context.
|
|
540
|
+
*/
|
|
541
|
+
evalContext(additional: any): any;
|
|
405
542
|
/**
|
|
406
543
|
* Sets the pristine flag for this component.
|
|
407
|
-
*
|
|
408
|
-
* @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
|
|
544
|
+
* @param {boolean} pristine - TRUE to make pristine, FALSE not pristine.
|
|
409
545
|
*/
|
|
410
546
|
setPristine(pristine: boolean): void;
|
|
547
|
+
/**
|
|
548
|
+
* Returns if the component is pristine.
|
|
549
|
+
* @returns {boolean} - TRUE if the component is pristine.
|
|
550
|
+
*/
|
|
411
551
|
get isPristine(): boolean;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
552
|
+
/**
|
|
553
|
+
* Sets the dirty flag for this component.
|
|
554
|
+
* @param {boolean} dirty - TRUE to make dirty, FALSE not dirty.
|
|
555
|
+
*/
|
|
556
|
+
setDirty(dirty: boolean): void;
|
|
557
|
+
dirty: boolean | undefined;
|
|
558
|
+
/**
|
|
559
|
+
* Returns if the component is dirty.
|
|
560
|
+
* @returns {boolean} - TRUE if the component is dirty.
|
|
561
|
+
*/
|
|
562
|
+
get isDirty(): boolean;
|
|
415
563
|
/**
|
|
416
564
|
* Removes a value out of the data array and rebuild the rows.
|
|
417
565
|
* @param {number} index - The index of the data element to remove.
|
|
418
566
|
*/
|
|
419
567
|
removeValue(index: number): void;
|
|
420
|
-
|
|
421
|
-
|
|
568
|
+
/**
|
|
569
|
+
* Returns the icon class for a given icon name.
|
|
570
|
+
* @param {string} name - The name of the icon you wish to fetch provided the icon class. This is the "font awesome" version of the name of the icon.
|
|
571
|
+
* @param {boolean} spinning - If the component should be spinning.
|
|
572
|
+
* @returns {string} - The icon class for the equivalent icon in the iconset we are using.
|
|
573
|
+
*/
|
|
574
|
+
iconClass(name: string, spinning: boolean): string;
|
|
575
|
+
/**
|
|
576
|
+
* Returns the size css class names for our current template.
|
|
577
|
+
* @param {string} size - The size class name for the default iconset.
|
|
578
|
+
* @returns {string} - The size class for our component.
|
|
579
|
+
*/
|
|
580
|
+
size(size: string): string;
|
|
422
581
|
/**
|
|
423
582
|
* The readible name for this component.
|
|
424
583
|
* @returns {string} - The name of the component.
|
|
425
584
|
*/
|
|
426
585
|
get name(): string;
|
|
427
|
-
|
|
428
|
-
|
|
586
|
+
/**
|
|
587
|
+
* Returns the visible errors for this component.
|
|
588
|
+
* @returns {Array<object>} - The visible errors for this component.
|
|
589
|
+
*/
|
|
590
|
+
get visibleErrors(): object[];
|
|
591
|
+
/**
|
|
592
|
+
* Returns all the errors for this component, visible or not.
|
|
593
|
+
* @returns {Array<object>} - All the errors for this component.
|
|
594
|
+
*/
|
|
595
|
+
get errors(): object[];
|
|
429
596
|
/**
|
|
430
597
|
* Returns the error label for this component.
|
|
431
|
-
* @
|
|
598
|
+
* @returns {string} - The error label for this component.
|
|
432
599
|
*/
|
|
433
|
-
get errorLabel():
|
|
600
|
+
get errorLabel(): string;
|
|
434
601
|
/**
|
|
435
602
|
* Get the error message provided a certain type of error.
|
|
436
|
-
* @param type
|
|
437
|
-
* @
|
|
603
|
+
* @param {string} type - The type of error to fetch the message for.
|
|
604
|
+
* @returns {string} - The error message configured for this component.
|
|
605
|
+
*/
|
|
606
|
+
errorMessage(type: string): string;
|
|
607
|
+
/**
|
|
608
|
+
* Sets the content, innerHTML, of an element to the sanitized content.
|
|
609
|
+
* @param {HTMLElement} element - The element to set the innerHTML to.
|
|
610
|
+
* @param {string} content - The HTML string content that we wish to set.
|
|
611
|
+
* @param {boolean} forceSanitize - If we should force the content to be sanitized.
|
|
612
|
+
* @param {any} sanitizeOptions - The options for the sanitize function.
|
|
613
|
+
* @returns {boolean} - TRUE if the content was sanitized and set.
|
|
614
|
+
*/
|
|
615
|
+
setContent(element: HTMLElement, content: string, forceSanitize: boolean, sanitizeOptions: any): boolean;
|
|
616
|
+
/**
|
|
617
|
+
* Restores the caret position in the input element after a refresh occurs.
|
|
438
618
|
*/
|
|
439
|
-
errorMessage(type: any): any;
|
|
440
|
-
setContent(element: any, content: any, forceSanitize: any, sanitizeOptions: any): boolean;
|
|
441
619
|
restoreCaretPosition(): void;
|
|
620
|
+
/**
|
|
621
|
+
* Redraw the component.
|
|
622
|
+
* @returns {Promise<void>} - A promise that resolves when the component is done redrawing.
|
|
623
|
+
*/
|
|
442
624
|
redraw(): Promise<void>;
|
|
625
|
+
/**
|
|
626
|
+
* Rebuild and redraw a component.
|
|
627
|
+
* @returns {Promise<void>} - A promise that resolves when the component is done rebuilding and redrawing.
|
|
628
|
+
*/
|
|
443
629
|
rebuild(): Promise<void>;
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
630
|
+
/**
|
|
631
|
+
* Returns if the dom node has the classes provided.
|
|
632
|
+
* @param {HTMLElement} element - The element to check for the class.
|
|
633
|
+
* @param {string} className - The name of the class to check.
|
|
634
|
+
* @returns {boolean|void} - TRUE if the element has the class.
|
|
635
|
+
*/
|
|
636
|
+
hasClass(element: HTMLElement, className: string): boolean | void;
|
|
637
|
+
/**
|
|
638
|
+
* Adds a class to an HTML element.
|
|
639
|
+
* @param {HTMLElement} element - The dom element to add the class to.
|
|
640
|
+
* @param {string} className - The class name you wish to add.
|
|
641
|
+
* @returns {this|void} - The component instance.
|
|
642
|
+
*/
|
|
643
|
+
addClass(element: HTMLElement, className: string): this | void;
|
|
644
|
+
/**
|
|
645
|
+
* Removes a class from an element.
|
|
646
|
+
* @param {HTMLElement} element - The element to remove the class from.
|
|
647
|
+
* @param {string} className - The class name to remove.
|
|
648
|
+
* @returns {this|void} - The component instance.
|
|
649
|
+
*/
|
|
650
|
+
removeClass(element: HTMLElement, className: string): this | void;
|
|
447
651
|
/**
|
|
448
652
|
* Determines if this component has a condition defined.
|
|
449
|
-
*
|
|
450
|
-
* @return {null}
|
|
653
|
+
* @returns {boolean} - TRUE if the component has a condition defined.
|
|
451
654
|
*/
|
|
452
|
-
hasCondition():
|
|
655
|
+
hasCondition(): boolean;
|
|
453
656
|
/**
|
|
454
657
|
* Check if this component is conditionally visible.
|
|
455
|
-
*
|
|
456
|
-
* @param data
|
|
457
|
-
* @
|
|
658
|
+
* @param {any} data - The data to check against.
|
|
659
|
+
* @param {any} row - The row data to check against.
|
|
660
|
+
* @returns {boolean} - TRUE if the component is conditionally visible.
|
|
458
661
|
*/
|
|
459
662
|
conditionallyVisible(data: any, row: any): boolean;
|
|
460
663
|
/**
|
|
461
664
|
* Checks the condition of this component.
|
|
462
665
|
*
|
|
463
666
|
* TODO: Switch row and data parameters to be consistent with other methods.
|
|
464
|
-
*
|
|
465
|
-
* @param
|
|
466
|
-
* @
|
|
467
|
-
* @return {boolean} - True if the condition applies to this component.
|
|
667
|
+
* @param {any} row - The row contextual data.
|
|
668
|
+
* @param {any} data - The global data object.
|
|
669
|
+
* @returns {boolean} - True if the condition applies to this component.
|
|
468
670
|
*/
|
|
469
671
|
checkCondition(row: any, data: any): boolean;
|
|
470
672
|
/**
|
|
471
673
|
* Check for conditionals and hide/show the element based on those conditions.
|
|
674
|
+
* @param {any} data - The data to check against.
|
|
675
|
+
* @param {any} flags - The flags passed to checkData function.
|
|
676
|
+
* @param {any} row - The row data to check against.
|
|
677
|
+
* @returns {boolean} - TRUE if the component is visible.
|
|
472
678
|
*/
|
|
473
679
|
checkComponentConditions(data: any, flags: any, row: any): boolean;
|
|
474
680
|
/**
|
|
475
681
|
* Checks conditions for this component and any sub components.
|
|
476
|
-
* @param
|
|
477
|
-
* @
|
|
682
|
+
* @param {any} data - The data to check against.
|
|
683
|
+
* @param {any} flags - The flags passed to checkData function.
|
|
684
|
+
* @param {any} row - The row data to check against.
|
|
685
|
+
* @returns {boolean} - TRUE if the component is visible.
|
|
478
686
|
*/
|
|
479
687
|
checkConditions(data: any, flags: any, row: any): boolean;
|
|
480
|
-
|
|
688
|
+
/**
|
|
689
|
+
* Returns the component logic if applicable.
|
|
690
|
+
* @returns {Array<object>} - The component logic.
|
|
691
|
+
*/
|
|
692
|
+
get logic(): object[];
|
|
481
693
|
/**
|
|
482
694
|
* Check all triggers and apply necessary actions.
|
|
483
|
-
*
|
|
484
|
-
* @param data
|
|
695
|
+
* @param {any} data - The data to check against.
|
|
696
|
+
* @param {any} row - The row data to check against.
|
|
697
|
+
* @returns {boolean|void} - TRUE if the component was altered.
|
|
698
|
+
*/
|
|
699
|
+
fieldLogic(data?: any, row?: any): boolean | void;
|
|
700
|
+
/**
|
|
701
|
+
* Retuns if the browser is Internet Explorer.
|
|
702
|
+
* @returns {boolean} - TRUE if the browser is IE.
|
|
485
703
|
*/
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
704
|
+
isIE(): boolean;
|
|
705
|
+
/**
|
|
706
|
+
* Defines the logic action value through evaluation.
|
|
707
|
+
* @param {object} action - The action within the Logic system to perform.
|
|
708
|
+
* @param {object} argsObject - The arguments to pass to the evaluation.
|
|
709
|
+
* @returns {any} - The result of the evaluation.
|
|
710
|
+
*/
|
|
711
|
+
defineActionValue(action: object, argsObject: object): any;
|
|
712
|
+
/**
|
|
713
|
+
* Apply the actions of Logic for a component once the conditions have been met.
|
|
714
|
+
* @param {object} newComponent - The new component to apply the actions to.
|
|
715
|
+
* @param {Array<object>} actions - An array of actions
|
|
716
|
+
* @param {any} result - The result of the conditional check in order to evaluate the actions.
|
|
717
|
+
* @param {any} row - The contextual row data for this component.
|
|
718
|
+
* @param {any} data - The global data object for the submission.
|
|
719
|
+
* @returns {boolean} - TRUE if the component was altered.
|
|
720
|
+
*/
|
|
721
|
+
applyActions(newComponent: object, actions: Array<object>, result: any, row: any, data: any): boolean;
|
|
490
722
|
addInputError(message: any, dirty: any, elements: any): void;
|
|
491
723
|
removeInputError(elements: any): void;
|
|
492
724
|
/**
|
|
493
725
|
* Add a new input error to this element.
|
|
494
|
-
*
|
|
495
|
-
* @
|
|
496
|
-
|
|
726
|
+
* @param {Array<object>|string} messages - An array of messages to add to the element.
|
|
727
|
+
* @returns {void}
|
|
728
|
+
*/
|
|
729
|
+
addMessages(messages: Array<object> | string): void;
|
|
730
|
+
/**
|
|
731
|
+
* Sets the form input widget error classes.
|
|
732
|
+
* @param {Array<HTMLElement>} elements - An array of DOM elements to set the error classes on.
|
|
733
|
+
* @param {boolean} dirty - If the input is dirty.
|
|
734
|
+
* @param {boolean} hasErrors - If the input has errors.
|
|
735
|
+
* @param {boolean} hasMessages - If the input has messages.
|
|
736
|
+
* @param {HTMLElement} element - The wrapper element for all the other elements passed in first argument.
|
|
737
|
+
* @returns {void}
|
|
738
|
+
*/
|
|
739
|
+
setErrorClasses(elements: Array<HTMLElement>, dirty: boolean, hasErrors: boolean, hasMessages: boolean, element?: HTMLElement): void;
|
|
740
|
+
/**
|
|
741
|
+
* Adds the classes necessary to mark an element as invalid.
|
|
742
|
+
* @param {HTMLElement} element - The element you wish to add the invalid classes to.
|
|
743
|
+
* @param {boolean} invalid - TRUE if the component is invalid, FALSE otherwise.
|
|
744
|
+
* @returns {void}
|
|
745
|
+
*/
|
|
746
|
+
setElementInvalid(element: HTMLElement, invalid: boolean): void;
|
|
747
|
+
/**
|
|
748
|
+
* Clears the components data if it is conditionally hidden AND clearOnHide is set to true for this component.
|
|
497
749
|
*/
|
|
498
|
-
addMessages(messages: any): void;
|
|
499
|
-
setErrorClasses(elements: any, dirty: any, hasErrors: any, hasMessages: any, element?: any): void;
|
|
500
|
-
setElementInvalid(element: any, invalid: any): void;
|
|
501
750
|
clearOnHide(): void;
|
|
751
|
+
/**
|
|
752
|
+
* Triggers a debounced onChange event for the root component (usually Webform).
|
|
753
|
+
* @param {...any} args - The arguments to pass to the onChange event.
|
|
754
|
+
*/
|
|
502
755
|
triggerRootChange(...args: any[]): void;
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
756
|
+
/**
|
|
757
|
+
* Called when the component value has been changed. This will then trigger the root level onChange handler which
|
|
758
|
+
* propagates the checkData methods for the full component tree.
|
|
759
|
+
* @param {any} flags - The flags for the change event propagation.
|
|
760
|
+
* @param {boolean} fromRoot - If the change event is from the root component.
|
|
761
|
+
* @returns {boolean} - TRUE if the component has changed.
|
|
762
|
+
*/
|
|
763
|
+
onChange(flags: any, fromRoot: boolean): boolean;
|
|
509
764
|
get wysiwygDefault(): {
|
|
510
765
|
quill: {
|
|
511
766
|
theme: string;
|
|
512
|
-
placeholder:
|
|
767
|
+
placeholder: string;
|
|
513
768
|
modules: {
|
|
514
769
|
toolbar: ({
|
|
515
770
|
size: (string | boolean)[];
|
|
@@ -546,7 +801,7 @@ declare class Component extends Element {
|
|
|
546
801
|
minLines: number;
|
|
547
802
|
tabSize: number;
|
|
548
803
|
mode: string;
|
|
549
|
-
placeholder:
|
|
804
|
+
placeholder: string;
|
|
550
805
|
};
|
|
551
806
|
ckeditor: {
|
|
552
807
|
image: {
|
|
@@ -565,28 +820,27 @@ declare class Component extends Element {
|
|
|
565
820
|
get tree(): any;
|
|
566
821
|
/**
|
|
567
822
|
* The empty value for this component.
|
|
568
|
-
*
|
|
569
|
-
* @return {null}
|
|
823
|
+
* @returns {null} - The empty value for this component.
|
|
570
824
|
*/
|
|
571
825
|
get emptyValue(): null;
|
|
572
826
|
/**
|
|
573
827
|
* Returns if this component has a value set.
|
|
574
|
-
*
|
|
828
|
+
* @param {any} data - The global data object.
|
|
829
|
+
* @returns {boolean} - TRUE if a value is set.
|
|
575
830
|
*/
|
|
576
831
|
hasValue(data: any): boolean;
|
|
577
832
|
/**
|
|
578
833
|
* Get the data value at the root level.
|
|
579
|
-
*
|
|
580
|
-
* @return {*}
|
|
834
|
+
* @returns {*} - The root value for the component, typically the Webform data object.
|
|
581
835
|
*/
|
|
582
836
|
get rootValue(): any;
|
|
583
837
|
get rootPristine(): any;
|
|
584
838
|
/**
|
|
585
839
|
* Splice a value from the dataValue.
|
|
586
|
-
*
|
|
587
|
-
* @param
|
|
840
|
+
* @param {number} index - The index to splice for an array component values.
|
|
841
|
+
* @param {*} flags - The flags to use when splicing the value.
|
|
588
842
|
*/
|
|
589
|
-
splice(index:
|
|
843
|
+
splice(index: number, flags?: any): void;
|
|
590
844
|
unset(): void;
|
|
591
845
|
/**
|
|
592
846
|
* Deletes the value of the component.
|
|
@@ -597,33 +851,29 @@ declare class Component extends Element {
|
|
|
597
851
|
get defaultValue(): any;
|
|
598
852
|
/**
|
|
599
853
|
* Get the input value of this component.
|
|
600
|
-
*
|
|
601
|
-
* @return {*}
|
|
854
|
+
* @returns {*} - The value for the component.
|
|
602
855
|
*/
|
|
603
856
|
getValue(): any;
|
|
604
857
|
/**
|
|
605
858
|
* Get the value at a specific index.
|
|
606
|
-
*
|
|
607
|
-
* @
|
|
608
|
-
* @returns {*}
|
|
859
|
+
* @param {number} index - For an array component or multiple values, this returns the value at a specific index.
|
|
860
|
+
* @returns {*} - The value at the specified index.
|
|
609
861
|
*/
|
|
610
|
-
getValueAt(index:
|
|
862
|
+
getValueAt(index: number): any;
|
|
611
863
|
/**
|
|
612
864
|
* Set the value of this component.
|
|
613
|
-
*
|
|
614
|
-
* @param value
|
|
615
|
-
* @
|
|
616
|
-
*
|
|
617
|
-
* @return {boolean} - If the value changed.
|
|
865
|
+
* @param {*} value - The value to set for this component.
|
|
866
|
+
* @param {*} flags - The flags to use when setting the value.
|
|
867
|
+
* @returns {boolean} - If the value changed.
|
|
618
868
|
*/
|
|
619
|
-
setValue(value: any, flags?:
|
|
869
|
+
setValue(value: any, flags?: any): boolean;
|
|
620
870
|
/**
|
|
621
871
|
* Set the value at a specific index.
|
|
622
|
-
*
|
|
623
|
-
* @param index
|
|
624
|
-
* @param value
|
|
872
|
+
* @param {number} index - The index to set the value at.
|
|
873
|
+
* @param {*} value - The value to set at the specified index.
|
|
874
|
+
* @param {*} flags - The flags to use when setting the value.
|
|
625
875
|
*/
|
|
626
|
-
setValueAt(index:
|
|
876
|
+
setValueAt(index: number, value: any, flags?: any): void;
|
|
627
877
|
get hasSetValue(): boolean;
|
|
628
878
|
setDefaultValue(): void;
|
|
629
879
|
/**
|
|
@@ -632,22 +882,21 @@ declare class Component extends Element {
|
|
|
632
882
|
restoreValue(): void;
|
|
633
883
|
/**
|
|
634
884
|
* Normalize values coming into updateValue.
|
|
635
|
-
*
|
|
636
|
-
* @
|
|
637
|
-
* @return {*}
|
|
885
|
+
* @param {*} value - The value to normalize before setting.
|
|
886
|
+
* @returns {*} - The normalized value.
|
|
638
887
|
*/
|
|
639
888
|
normalizeValue(value: any): any;
|
|
640
889
|
/**
|
|
641
890
|
* Update a value of this component.
|
|
642
|
-
*
|
|
643
|
-
* @param flags
|
|
891
|
+
* @param {*} value - The value to update.
|
|
892
|
+
* @param {*} flags - The flags to use when updating the value.
|
|
893
|
+
* @returns {boolean} - If the value changed.
|
|
644
894
|
*/
|
|
645
|
-
updateComponentValue(value: any, flags?:
|
|
895
|
+
updateComponentValue(value: any, flags?: any): boolean;
|
|
646
896
|
/**
|
|
647
897
|
* Updates the value of this component plus all sub-components.
|
|
648
|
-
*
|
|
649
|
-
* @
|
|
650
|
-
* @return {boolean}
|
|
898
|
+
* @param {...any} args - The arguments to pass to updateValue.
|
|
899
|
+
* @returns {boolean} - If the value changed.
|
|
651
900
|
*/
|
|
652
901
|
updateValue(...args: any[]): boolean;
|
|
653
902
|
getIcon(name: any, content: any, styles: any, ref?: string): any;
|
|
@@ -657,130 +906,123 @@ declare class Component extends Element {
|
|
|
657
906
|
resetValue(): void;
|
|
658
907
|
/**
|
|
659
908
|
* Determine if the value of this component has changed.
|
|
660
|
-
*
|
|
661
|
-
* @param
|
|
662
|
-
* @
|
|
663
|
-
* @return {boolean}
|
|
909
|
+
* @param {*} newValue - The new value to check.
|
|
910
|
+
* @param {*} oldValue - The existing value of the component.
|
|
911
|
+
* @returns {boolean} - TRUE if the value has changed.
|
|
664
912
|
*/
|
|
665
913
|
hasChanged(newValue: any, oldValue: any): boolean;
|
|
666
914
|
/**
|
|
667
915
|
* Update the value on change.
|
|
668
|
-
*
|
|
669
|
-
* @param
|
|
916
|
+
* @param {*} flags - The flags to use when triggering the on change event.
|
|
917
|
+
* @param {boolean} changed - If the value has changed.
|
|
918
|
+
* @returns {boolean} - If the value changed.
|
|
670
919
|
*/
|
|
671
|
-
updateOnChange(flags?:
|
|
672
|
-
|
|
673
|
-
* Perform a calculated value operation.
|
|
674
|
-
*
|
|
675
|
-
* @param data - The global data object.
|
|
676
|
-
*
|
|
677
|
-
* @return {boolean} - If the value changed during calculation.
|
|
678
|
-
*/
|
|
679
|
-
convertNumberOrBoolToString(value: any): boolean;
|
|
920
|
+
updateOnChange(flags?: any, changed?: boolean): boolean;
|
|
921
|
+
convertNumberOrBoolToString(value: any): any;
|
|
680
922
|
doValueCalculation(dataValue: any, data: any, row: any): any;
|
|
681
923
|
calculateComponentValue(data: any, flags: any, row: any): boolean;
|
|
682
924
|
calculationLocked: boolean | undefined;
|
|
683
925
|
calculatedValue: any;
|
|
684
926
|
/**
|
|
685
927
|
* Performs calculations in this component plus any child components.
|
|
686
|
-
*
|
|
687
|
-
* @param
|
|
688
|
-
* @
|
|
928
|
+
* @param {*} data - The data to perform the calculation with.
|
|
929
|
+
* @param {*} flags - The flags to use when calculating the value.
|
|
930
|
+
* @param {*} row - The contextual row data to use when performing the calculation.
|
|
931
|
+
* @returns {boolean} - TRUE if the value changed.
|
|
689
932
|
*/
|
|
690
933
|
calculateValue(data: any, flags: any, row: any): boolean;
|
|
691
934
|
/**
|
|
692
935
|
* Set this component's label text and render it.
|
|
693
|
-
*
|
|
694
|
-
* @param value - The new label text.
|
|
936
|
+
* @param {string} value - The new label text.
|
|
695
937
|
*/
|
|
696
|
-
set label(value:
|
|
938
|
+
set label(value: string);
|
|
697
939
|
/**
|
|
698
940
|
* Get this component's label text.
|
|
699
|
-
*
|
|
941
|
+
* @returns {string} - The label text for this component.
|
|
700
942
|
*/
|
|
701
|
-
get label():
|
|
943
|
+
get label(): string;
|
|
702
944
|
/**
|
|
703
945
|
* Get FormioForm element at the root of this component tree.
|
|
704
|
-
*
|
|
946
|
+
* @returns {*} root - The root component to search from.
|
|
705
947
|
*/
|
|
706
|
-
getRoot():
|
|
948
|
+
getRoot(): any;
|
|
707
949
|
/**
|
|
708
950
|
* Returns the invalid message, or empty string if the component is valid.
|
|
709
|
-
*
|
|
710
|
-
* @param
|
|
711
|
-
* @param
|
|
712
|
-
* @
|
|
951
|
+
* @param {*} data - The data to check if the component is valid.
|
|
952
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
953
|
+
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
|
954
|
+
* @param {*} row - Contextual row data for this component.
|
|
955
|
+
* @returns {string} - The message to show when the component is invalid.
|
|
713
956
|
*/
|
|
714
|
-
invalidMessage(data: any, dirty:
|
|
957
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
|
715
958
|
/**
|
|
716
959
|
* Returns if the component is valid or not.
|
|
717
|
-
*
|
|
718
|
-
* @param
|
|
719
|
-
* @
|
|
720
|
-
* @return {boolean}
|
|
960
|
+
* @param {*} data - The data to check if the component is valid.
|
|
961
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
962
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
721
963
|
*/
|
|
722
|
-
isValid(data: any, dirty:
|
|
964
|
+
isValid(data: any, dirty: boolean): boolean;
|
|
723
965
|
setComponentValidity(errors: any, dirty: any, silentCheck: any): any;
|
|
724
966
|
/**
|
|
725
967
|
* Interpolate errors from the validation methods.
|
|
726
|
-
* @param {
|
|
727
|
-
* @returns
|
|
968
|
+
* @param {Array<any>} errors - An array of errors to interpolate.
|
|
969
|
+
* @returns {Array<any>} - The interpolated errors.
|
|
728
970
|
*/
|
|
729
|
-
interpolateErrors(errors: any): any
|
|
971
|
+
interpolateErrors(errors: Array<any>): Array<any>;
|
|
730
972
|
/**
|
|
731
973
|
* Show component validation errors.
|
|
732
974
|
* @param {*} errors - An array of errors that have occured.
|
|
733
975
|
* @param {*} data - The root submission data.
|
|
734
976
|
* @param {*} row - The contextual row data.
|
|
735
977
|
* @param {*} flags - The flags to perform validation.
|
|
736
|
-
* @returns
|
|
978
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
737
979
|
*/
|
|
738
|
-
showValidationErrors(errors: any, data: any, row: any, flags: any):
|
|
980
|
+
showValidationErrors(errors: any, data: any, row: any, flags: any): boolean;
|
|
739
981
|
/**
|
|
740
982
|
* Perform a component validation.
|
|
741
983
|
* @param {*} data - The root data you wish to use for this component.
|
|
742
984
|
* @param {*} row - The contextual row data you wish to use for this component.
|
|
743
985
|
* @param {*} flags - The flags to control the behavior of the validation.
|
|
744
|
-
* @returns
|
|
986
|
+
* @returns {Array<any>} - An array of errors if the component is invalid.
|
|
745
987
|
*/
|
|
746
|
-
validateComponent(data
|
|
988
|
+
validateComponent(data?: any, row?: any, flags?: any): Array<any>;
|
|
747
989
|
/**
|
|
748
990
|
* Checks the validity of this component and sets the error message if it is invalid.
|
|
749
|
-
*
|
|
750
|
-
* @param
|
|
751
|
-
* @param
|
|
752
|
-
* @param
|
|
753
|
-
* @
|
|
991
|
+
* @param {*} data - The data to check if the component is valid.
|
|
992
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
993
|
+
* @param {*} row - The contextual row data for this component.
|
|
994
|
+
* @param {*} flags - The flags to use when checking the validity.
|
|
995
|
+
* @param {Array<any>} allErrors - An array of all errors that have occured so that it can be appended when another one occurs here.
|
|
996
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
754
997
|
*/
|
|
755
|
-
checkComponentValidity(data
|
|
998
|
+
checkComponentValidity(data?: any, dirty?: boolean, row?: any, flags?: any, allErrors?: Array<any>): boolean;
|
|
756
999
|
/**
|
|
757
1000
|
* Checks the validity of the component.
|
|
758
|
-
* @param {*} data
|
|
759
|
-
* @param {
|
|
760
|
-
* @param {*} row
|
|
761
|
-
* @param {
|
|
762
|
-
* @
|
|
1001
|
+
* @param {*} data - The data to check if the component is valid.
|
|
1002
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
1003
|
+
* @param {*} row - The contextual row data for this component.
|
|
1004
|
+
* @param {boolean} silentCheck - If the check should be silent and not set the error messages.
|
|
1005
|
+
* @param {Array<any>} errors - An array of all errors that have occured so that it can be appended when another one occurs here.
|
|
1006
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
763
1007
|
*/
|
|
764
|
-
checkValidity(data
|
|
765
|
-
checkAsyncValidity(data
|
|
1008
|
+
checkValidity(data?: any, dirty?: boolean, row?: any, silentCheck?: boolean, errors?: Array<any>): boolean;
|
|
1009
|
+
checkAsyncValidity(data?: null, dirty?: boolean, row?: null, silentCheck?: boolean, errors?: any[]): boolean;
|
|
766
1010
|
/**
|
|
767
1011
|
* Check the conditions, calculations, and validity of a single component and triggers an update if
|
|
768
1012
|
* something changed.
|
|
769
|
-
*
|
|
770
|
-
* @param
|
|
771
|
-
* @param
|
|
772
|
-
*
|
|
773
|
-
* @return boolean - If component is valid or not.
|
|
1013
|
+
* @param {*} data - The root data of the change event.
|
|
1014
|
+
* @param {*} flags - The flags from this change event.
|
|
1015
|
+
* @param {*} row - The contextual row data for this component.
|
|
1016
|
+
* @returns {void|boolean} - TRUE if no check should be performed on the component.
|
|
774
1017
|
*/
|
|
775
|
-
checkData(data
|
|
1018
|
+
checkData(data?: any, flags?: any, row?: any): void | boolean;
|
|
776
1019
|
checkModal(errors?: any[], dirty?: boolean): void;
|
|
777
1020
|
get validationValue(): any;
|
|
778
1021
|
isEmpty(value?: any): any;
|
|
779
1022
|
isEqual(valueA: any, valueB?: any): any;
|
|
780
1023
|
/**
|
|
781
1024
|
* Check if a component is eligible for multiple validation
|
|
782
|
-
*
|
|
783
|
-
* @return {boolean}
|
|
1025
|
+
* @returns {boolean} - TRUE if the component is eligible for multiple validation.
|
|
784
1026
|
*/
|
|
785
1027
|
validateMultiple(): boolean;
|
|
786
1028
|
clearErrorClasses(element?: any): void;
|
|
@@ -790,8 +1032,7 @@ declare class Component extends Element {
|
|
|
790
1032
|
/**
|
|
791
1033
|
* Determines if the value of this component is hidden from the user as if it is coming from the server, but is
|
|
792
1034
|
* protected.
|
|
793
|
-
*
|
|
794
|
-
* @return {boolean|*}
|
|
1035
|
+
* @returns {boolean|*} - TRUE if the value is hidden.
|
|
795
1036
|
*/
|
|
796
1037
|
isValueHidden(): boolean | any;
|
|
797
1038
|
shouldSkipValidation(data: any, row: any, flags?: {}): boolean;
|
|
@@ -799,6 +1040,8 @@ declare class Component extends Element {
|
|
|
799
1040
|
get dataReady(): Promise<void>;
|
|
800
1041
|
/**
|
|
801
1042
|
* Prints out the value of this component as a string value.
|
|
1043
|
+
* @param {*} value - The value to print out.
|
|
1044
|
+
* @returns {string} - The string representation of the value.
|
|
802
1045
|
*/
|
|
803
1046
|
asString(value: any): string;
|
|
804
1047
|
setDisabled(element: any, disabled: any): void;
|
|
@@ -814,25 +1057,17 @@ declare class Component extends Element {
|
|
|
814
1057
|
attachLogic(): void;
|
|
815
1058
|
/**
|
|
816
1059
|
* Get the element information.
|
|
1060
|
+
* @returns {*} - The components "input" DOM element information.
|
|
817
1061
|
*/
|
|
818
|
-
elementInfo():
|
|
819
|
-
type: string;
|
|
820
|
-
component: any;
|
|
821
|
-
changeEvent: string;
|
|
822
|
-
attr: {
|
|
823
|
-
name: any;
|
|
824
|
-
type: any;
|
|
825
|
-
class: string;
|
|
826
|
-
lang: any;
|
|
827
|
-
};
|
|
828
|
-
};
|
|
1062
|
+
elementInfo(): any;
|
|
829
1063
|
autofocus(): void;
|
|
830
1064
|
scrollIntoView(element?: any): void;
|
|
831
|
-
focus(index
|
|
1065
|
+
focus(index?: number): void;
|
|
832
1066
|
/**
|
|
833
1067
|
* Get `Formio` instance for working with files
|
|
1068
|
+
* @returns {import('@formio/core').Formio} - The Formio instance file service.
|
|
834
1069
|
*/
|
|
835
|
-
get fileService():
|
|
1070
|
+
get fileService(): import("@formio/core").Formio;
|
|
836
1071
|
resetCaches(): void;
|
|
837
1072
|
get previewMode(): boolean;
|
|
838
1073
|
}
|