@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
|
@@ -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,43 +338,105 @@ 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
|
-
|
|
341
|
+
/**
|
|
342
|
+
* Opens the modal element.
|
|
343
|
+
* @param {string} template - The template to use for the modal dialog.
|
|
344
|
+
*/
|
|
345
|
+
setOpenModalElement(template?: string): void;
|
|
330
346
|
/**
|
|
331
347
|
* Renders a modal preview template and returns the markup as a string
|
|
332
|
-
*
|
|
333
|
-
* @
|
|
334
|
-
|
|
348
|
+
* @param {object|null|undefined} ctx - The rendering context
|
|
349
|
+
* @return {string} - The modal preview markup
|
|
350
|
+
*/
|
|
351
|
+
renderModalPreview(ctx: object | null | undefined): string;
|
|
352
|
+
/**
|
|
353
|
+
* Returns the modal preview template.
|
|
354
|
+
* @returns {string} - The modal preview template.
|
|
335
355
|
*/
|
|
336
|
-
renderModalPreview(ctx: Object | null | undefined): string;
|
|
337
356
|
getModalPreviewTemplate(): string;
|
|
338
|
-
|
|
357
|
+
/**
|
|
358
|
+
* Performs a complete build of a component, which empties, renders, sets the content in the DOM, and then finally attaches events.
|
|
359
|
+
* @param {HTMLElement} element - The element to attach this component to.
|
|
360
|
+
* @returns {Promise<void>} - A promise that resolves when the component has been built.
|
|
361
|
+
*/
|
|
362
|
+
build(element: HTMLElement): Promise<void>;
|
|
339
363
|
get hasModalSaveButton(): boolean;
|
|
340
|
-
|
|
364
|
+
/**
|
|
365
|
+
* Renders a component as an HTML string.
|
|
366
|
+
* @param {string} children - The contents of all the children HTML as a string.
|
|
367
|
+
* @param {boolean} topLevel - If this is the topmost component that is being rendered.
|
|
368
|
+
* @returns {string} - The rendered HTML string of a component.
|
|
369
|
+
*/
|
|
370
|
+
render(children?: string, topLevel?: boolean): string;
|
|
341
371
|
/**
|
|
342
372
|
* Creates the tooltip instance using tippy.js and returns it
|
|
343
|
-
*
|
|
344
373
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
345
|
-
* @param {
|
|
346
|
-
* @return {
|
|
374
|
+
* @param {object|null|undefined} settings - tippy.js options
|
|
375
|
+
* @return {import('tippy.js').Tippy} - tippy.js instance
|
|
376
|
+
*/
|
|
377
|
+
createTooltip(tooltipEl: HTMLElement, settings?: object | null | undefined): import('tippy.js').Tippy;
|
|
378
|
+
/**
|
|
379
|
+
* Attaches all the tooltips provided the refs object.
|
|
380
|
+
* @param {object} toolTipsRefs - The refs for the tooltips within your template.
|
|
381
|
+
* @returns {void}
|
|
382
|
+
*/
|
|
383
|
+
attachTooltips(toolTipsRefs: object): void;
|
|
384
|
+
/**
|
|
385
|
+
* Create a new component modal for this component.
|
|
386
|
+
* @param {HTMLElement} element - The element to attach the modal to.
|
|
387
|
+
* @param {boolean} modalShouldBeOpened - TRUE if the modal should open immediately.
|
|
388
|
+
* @param {any} currentValue - The current value of the component.
|
|
389
|
+
* @returns {ComponentModal} - The created component modal.
|
|
347
390
|
*/
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
391
|
+
createComponentModal(element: HTMLElement, modalShouldBeOpened: boolean, currentValue: any): ComponentModal;
|
|
392
|
+
/**
|
|
393
|
+
* Attaches all event listensers for this component to the DOM elements that were rendered.
|
|
394
|
+
* @param {HTMLElement} element - The element to attach the listeners to.
|
|
395
|
+
* @returns {Promise<void>} - Resolves when the component is done attaching to the DOM.
|
|
396
|
+
*/
|
|
397
|
+
attach(element: HTMLElement): Promise<void>;
|
|
352
398
|
componentModal: any;
|
|
399
|
+
/**
|
|
400
|
+
* Restors the "focus" on a component after a redraw event has occured.
|
|
401
|
+
*/
|
|
353
402
|
restoreFocus(): void;
|
|
354
|
-
|
|
355
|
-
|
|
403
|
+
/**
|
|
404
|
+
* Adds a keyboard shortcut to this component.
|
|
405
|
+
* @param {HTMLElement} element - The element to attach the keyboard shortcut to.
|
|
406
|
+
* @param {string} shortcut - The keyboard shortcut to add.
|
|
407
|
+
* @returns {void}
|
|
408
|
+
*/
|
|
409
|
+
addShortcut(element: HTMLElement, shortcut: string): void;
|
|
410
|
+
/**
|
|
411
|
+
* Removes a keyboard shortcut from this component.
|
|
412
|
+
* @param {HTMLElement} element - The element to remove the keyboard shortcut from.
|
|
413
|
+
* @param {string} shortcut - The keyboard shortcut to remove.
|
|
414
|
+
* @returns {void}
|
|
415
|
+
*/
|
|
416
|
+
removeShortcut(element: HTMLElement, shortcut: string): void;
|
|
356
417
|
/**
|
|
357
418
|
* Remove all event handlers.
|
|
358
419
|
*/
|
|
359
420
|
detach(): void;
|
|
360
|
-
|
|
361
|
-
|
|
421
|
+
/**
|
|
422
|
+
* Determines if the component should be refreshed based on the path of another component that changed.
|
|
423
|
+
* @param {string} refreshData - The path of the data that needs to trigger a refresh.
|
|
424
|
+
* @param {boolean} changed - Flag that is true if the data has been changed.
|
|
425
|
+
* @param {any} flags - The flags for the checkData procedure.
|
|
426
|
+
* @returns {void}
|
|
427
|
+
*/
|
|
428
|
+
checkRefresh(refreshData: string, changed: boolean, flags: any): void;
|
|
429
|
+
/**
|
|
430
|
+
* 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.
|
|
431
|
+
* @param {Array<any>} changes - The list of components that have changed.
|
|
432
|
+
* @param {any} flags - The checkData flags.
|
|
433
|
+
* @returns {void}
|
|
434
|
+
*/
|
|
435
|
+
checkRefreshOn(changes: Array<any>, flags?: any): void;
|
|
362
436
|
/**
|
|
363
437
|
* Refreshes the component with a new value.
|
|
364
|
-
*
|
|
365
|
-
* @
|
|
438
|
+
* @param {any} value - The latest value of the component to check if it needs to be refreshed.
|
|
439
|
+
* @returns {void}
|
|
366
440
|
*/
|
|
367
441
|
refresh(value: any): void;
|
|
368
442
|
refreshOnChanged: boolean | undefined;
|
|
@@ -373,33 +447,84 @@ declare class Component extends Element {
|
|
|
373
447
|
* with the components data and returns true if they are in the same context.
|
|
374
448
|
*
|
|
375
449
|
* Different rows of the same EditGrid, for example, are in different contexts.
|
|
376
|
-
*
|
|
377
|
-
* @
|
|
450
|
+
* @param {any} component - The component to check if it is in the same context as this component.
|
|
451
|
+
* @returns {boolean} - TRUE if the component is in the same context as this component.
|
|
378
452
|
*/
|
|
379
453
|
inContext(component: any): boolean;
|
|
380
|
-
|
|
381
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Determines if we are in "view" only mode.
|
|
456
|
+
* @returns {boolean} - TRUE if we are in "view" only mode.
|
|
457
|
+
*/
|
|
458
|
+
get viewOnly(): boolean;
|
|
459
|
+
/**
|
|
460
|
+
* Sets the HTMLElement for this component.
|
|
461
|
+
* @param {HTMLElement} element - The element that is attached to this component.
|
|
462
|
+
* @returns {void}
|
|
463
|
+
*/
|
|
464
|
+
setElement(element: HTMLElement): void;
|
|
382
465
|
element: any;
|
|
383
|
-
|
|
466
|
+
/**
|
|
467
|
+
* Creates an element to hold the "view only" version of this component.
|
|
468
|
+
* @returns {HTMLElement} - The element for this component.
|
|
469
|
+
*/
|
|
470
|
+
createViewOnlyElement(): HTMLElement;
|
|
471
|
+
/**
|
|
472
|
+
* The default value for the "view only" mode of a component if the value is not provided.
|
|
473
|
+
* @returns {string} - The default value for this component.
|
|
474
|
+
*/
|
|
384
475
|
get defaultViewOnlyValue(): string;
|
|
385
476
|
/**
|
|
386
477
|
* Uses the widget to determine the output string.
|
|
387
|
-
*
|
|
388
|
-
* @param
|
|
389
|
-
* @
|
|
478
|
+
* @param {any} value - The current value of the component.
|
|
479
|
+
* @param {any} options - The options for getValueAsString.
|
|
480
|
+
* @returns {any|Array<any>} - The value as a string.
|
|
481
|
+
*/
|
|
482
|
+
getWidgetValueAsString(value: any, options: any): any | Array<any>;
|
|
483
|
+
/**
|
|
484
|
+
* Returns the value of the component as a string.
|
|
485
|
+
* @param {any} value - The value for this component.
|
|
486
|
+
* @param {any} options - The options for this component.
|
|
487
|
+
* @returns {string} - The string representation of the value of this component.
|
|
488
|
+
*/
|
|
489
|
+
getValueAsString(value: any, options: any): string;
|
|
490
|
+
/**
|
|
491
|
+
* Returns the string representation "view" of the component value.
|
|
492
|
+
* @param {any} value - The value of the component.
|
|
493
|
+
* @param {any} options - The options for this component.
|
|
494
|
+
* @returns {string} - The string representation of the value of this component.
|
|
495
|
+
*/
|
|
496
|
+
getView(value: any, options: any): string;
|
|
497
|
+
/**
|
|
498
|
+
* Updates the items list for this component. Useful for Select and other List component types.
|
|
499
|
+
* @param {...any} args - The arguments to pass to the onChange event.
|
|
500
|
+
* @returns {void}
|
|
390
501
|
*/
|
|
391
|
-
getWidgetValueAsString(value: any, options: any): any;
|
|
392
|
-
getValueAsString(value: any, options: any): any;
|
|
393
|
-
getView(value: any, options: any): any;
|
|
394
502
|
updateItems(...args: any[]): void;
|
|
395
503
|
/**
|
|
396
|
-
*
|
|
397
|
-
* @param {
|
|
398
|
-
* @
|
|
504
|
+
* Returns the value for a specific item in a List type component.
|
|
505
|
+
* @param {any} data - The data for this component.
|
|
506
|
+
* @param {boolean} [forceUseValue] - if true, return 'value' property of the data
|
|
507
|
+
* @returns {any} - The value of the item.
|
|
399
508
|
*/
|
|
400
509
|
itemValue(data: any, forceUseValue?: boolean | undefined): any;
|
|
510
|
+
/**
|
|
511
|
+
* Returns the item value for html mode.
|
|
512
|
+
* @param {any} value - The value for this component.
|
|
513
|
+
* @returns {any} - The value of the item for html mode.
|
|
514
|
+
*/
|
|
401
515
|
itemValueForHTMLMode(value: any): any;
|
|
402
|
-
|
|
516
|
+
/**
|
|
517
|
+
* Creates a modal to input the value of this component.
|
|
518
|
+
* @param {HTMLElement} element - The element to attach the modal to.
|
|
519
|
+
* @param {any} attr - A list of attributes to add to the modal.
|
|
520
|
+
* @param {boolean} confirm - If we should add a confirmation to the modal that keeps it from closing unless confirmed.
|
|
521
|
+
* @returns {HTMLElement} - The created modal element.
|
|
522
|
+
*/
|
|
523
|
+
createModal(element: HTMLElement, attr: any, confirm: boolean): HTMLElement;
|
|
524
|
+
/**
|
|
525
|
+
* Uses CSS classes to show or hide an element.
|
|
526
|
+
* @returns {boolean} - TRUE if the element has been css removed.
|
|
527
|
+
*/
|
|
403
528
|
get optimizeRedraw(): boolean;
|
|
404
529
|
/**
|
|
405
530
|
* Retrieves the CSS class name of this component.
|
|
@@ -408,125 +533,251 @@ declare class Component extends Element {
|
|
|
408
533
|
get className(): string;
|
|
409
534
|
/**
|
|
410
535
|
* Build the custom style from the layout values
|
|
411
|
-
* @
|
|
536
|
+
* @returns {string} - The custom style
|
|
412
537
|
*/
|
|
413
538
|
get customStyle(): string;
|
|
414
|
-
|
|
539
|
+
/**
|
|
540
|
+
* Returns if the application is on a mobile device.
|
|
541
|
+
* @returns {boolean} - TRUE if the application is on a mobile device.
|
|
542
|
+
*/
|
|
543
|
+
get isMobile(): boolean;
|
|
415
544
|
/**
|
|
416
545
|
* Returns the outside wrapping element of this component.
|
|
417
|
-
* @returns {HTMLElement}
|
|
546
|
+
* @returns {HTMLElement} - The wrapping element of this component.
|
|
418
547
|
*/
|
|
419
548
|
getElement(): HTMLElement;
|
|
549
|
+
/**
|
|
550
|
+
* Create an evaluation context for all script executions and interpolations.
|
|
551
|
+
* @param {any} additional - Additional context to provide.
|
|
552
|
+
* @returns {any} - The evaluation context.
|
|
553
|
+
*/
|
|
554
|
+
evalContext(additional: any): any;
|
|
420
555
|
/**
|
|
421
556
|
* Sets the pristine flag for this component.
|
|
422
|
-
*
|
|
423
|
-
* @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
|
|
557
|
+
* @param {boolean} pristine - TRUE to make pristine, FALSE not pristine.
|
|
424
558
|
*/
|
|
425
559
|
setPristine(pristine: boolean): void;
|
|
560
|
+
/**
|
|
561
|
+
* Returns if the component is pristine.
|
|
562
|
+
* @returns {boolean} - TRUE if the component is pristine.
|
|
563
|
+
*/
|
|
426
564
|
get isPristine(): boolean;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
565
|
+
/**
|
|
566
|
+
* Sets the dirty flag for this component.
|
|
567
|
+
* @param {boolean} dirty - TRUE to make dirty, FALSE not dirty.
|
|
568
|
+
*/
|
|
569
|
+
setDirty(dirty: boolean): void;
|
|
570
|
+
dirty: boolean | undefined;
|
|
571
|
+
/**
|
|
572
|
+
* Returns if the component is dirty.
|
|
573
|
+
* @returns {boolean} - TRUE if the component is dirty.
|
|
574
|
+
*/
|
|
575
|
+
get isDirty(): boolean;
|
|
430
576
|
/**
|
|
431
577
|
* Removes a value out of the data array and rebuild the rows.
|
|
432
578
|
* @param {number} index - The index of the data element to remove.
|
|
433
579
|
*/
|
|
434
580
|
removeValue(index: number): void;
|
|
435
|
-
|
|
436
|
-
|
|
581
|
+
/**
|
|
582
|
+
* Returns the icon class for a given icon name.
|
|
583
|
+
* @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.
|
|
584
|
+
* @param {boolean} spinning - If the component should be spinning.
|
|
585
|
+
* @returns {string} - The icon class for the equivalent icon in the iconset we are using.
|
|
586
|
+
*/
|
|
587
|
+
iconClass(name: string, spinning: boolean): string;
|
|
588
|
+
/**
|
|
589
|
+
* Returns the size css class names for our current template.
|
|
590
|
+
* @param {string} size - The size class name for the default iconset.
|
|
591
|
+
* @returns {string} - The size class for our component.
|
|
592
|
+
*/
|
|
593
|
+
size(size: string): string;
|
|
437
594
|
/**
|
|
438
595
|
* The readible name for this component.
|
|
439
596
|
* @returns {string} - The name of the component.
|
|
440
597
|
*/
|
|
441
598
|
get name(): string;
|
|
442
|
-
|
|
443
|
-
|
|
599
|
+
/**
|
|
600
|
+
* Returns the visible errors for this component.
|
|
601
|
+
* @returns {Array<object>} - The visible errors for this component.
|
|
602
|
+
*/
|
|
603
|
+
get visibleErrors(): object[];
|
|
604
|
+
/**
|
|
605
|
+
* Returns all the errors for this component, visible or not.
|
|
606
|
+
* @returns {Array<object>} - All the errors for this component.
|
|
607
|
+
*/
|
|
608
|
+
get errors(): object[];
|
|
444
609
|
/**
|
|
445
610
|
* Returns the error label for this component.
|
|
446
|
-
* @
|
|
611
|
+
* @returns {string} - The error label for this component.
|
|
447
612
|
*/
|
|
448
|
-
get errorLabel():
|
|
613
|
+
get errorLabel(): string;
|
|
449
614
|
/**
|
|
450
615
|
* Get the error message provided a certain type of error.
|
|
451
|
-
* @param type
|
|
452
|
-
* @
|
|
616
|
+
* @param {string} type - The type of error to fetch the message for.
|
|
617
|
+
* @returns {string} - The error message configured for this component.
|
|
618
|
+
*/
|
|
619
|
+
errorMessage(type: string): string;
|
|
620
|
+
/**
|
|
621
|
+
* Sets the content, innerHTML, of an element to the sanitized content.
|
|
622
|
+
* @param {HTMLElement} element - The element to set the innerHTML to.
|
|
623
|
+
* @param {string} content - The HTML string content that we wish to set.
|
|
624
|
+
* @param {boolean} forceSanitize - If we should force the content to be sanitized.
|
|
625
|
+
* @param {any} sanitizeOptions - The options for the sanitize function.
|
|
626
|
+
* @returns {boolean} - TRUE if the content was sanitized and set.
|
|
627
|
+
*/
|
|
628
|
+
setContent(element: HTMLElement, content: string, forceSanitize: boolean, sanitizeOptions: any): boolean;
|
|
629
|
+
/**
|
|
630
|
+
* Restores the caret position in the input element after a refresh occurs.
|
|
453
631
|
*/
|
|
454
|
-
errorMessage(type: any): any;
|
|
455
|
-
setContent(element: any, content: any, forceSanitize: any, sanitizeOptions: any): boolean;
|
|
456
632
|
restoreCaretPosition(): void;
|
|
633
|
+
/**
|
|
634
|
+
* Redraw the component.
|
|
635
|
+
* @returns {Promise<void>} - A promise that resolves when the component is done redrawing.
|
|
636
|
+
*/
|
|
457
637
|
redraw(): Promise<void>;
|
|
638
|
+
/**
|
|
639
|
+
* Rebuild and redraw a component.
|
|
640
|
+
* @returns {Promise<void>} - A promise that resolves when the component is done rebuilding and redrawing.
|
|
641
|
+
*/
|
|
458
642
|
rebuild(): Promise<void>;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
643
|
+
/**
|
|
644
|
+
* Returns if the dom node has the classes provided.
|
|
645
|
+
* @param {HTMLElement} element - The element to check for the class.
|
|
646
|
+
* @param {string} className - The name of the class to check.
|
|
647
|
+
* @returns {boolean|void} - TRUE if the element has the class.
|
|
648
|
+
*/
|
|
649
|
+
hasClass(element: HTMLElement, className: string): boolean | void;
|
|
650
|
+
/**
|
|
651
|
+
* Adds a class to an HTML element.
|
|
652
|
+
* @param {HTMLElement} element - The dom element to add the class to.
|
|
653
|
+
* @param {string} className - The class name you wish to add.
|
|
654
|
+
* @returns {this|void} - The component instance.
|
|
655
|
+
*/
|
|
656
|
+
addClass(element: HTMLElement, className: string): this | void;
|
|
657
|
+
/**
|
|
658
|
+
* Removes a class from an element.
|
|
659
|
+
* @param {HTMLElement} element - The element to remove the class from.
|
|
660
|
+
* @param {string} className - The class name to remove.
|
|
661
|
+
* @returns {this|void} - The component instance.
|
|
662
|
+
*/
|
|
663
|
+
removeClass(element: HTMLElement, className: string): this | void;
|
|
462
664
|
/**
|
|
463
665
|
* Determines if this component has a condition defined.
|
|
464
|
-
*
|
|
465
|
-
* @return {null}
|
|
666
|
+
* @returns {boolean} - TRUE if the component has a condition defined.
|
|
466
667
|
*/
|
|
467
|
-
hasCondition():
|
|
668
|
+
hasCondition(): boolean;
|
|
468
669
|
/**
|
|
469
670
|
* Check if this component is conditionally visible.
|
|
470
|
-
*
|
|
471
|
-
* @param data
|
|
472
|
-
* @
|
|
671
|
+
* @param {any} data - The data to check against.
|
|
672
|
+
* @param {any} row - The row data to check against.
|
|
673
|
+
* @returns {boolean} - TRUE if the component is conditionally visible.
|
|
473
674
|
*/
|
|
474
675
|
conditionallyVisible(data: any, row: any): boolean;
|
|
475
676
|
/**
|
|
476
677
|
* Checks the condition of this component.
|
|
477
678
|
*
|
|
478
679
|
* TODO: Switch row and data parameters to be consistent with other methods.
|
|
479
|
-
*
|
|
480
|
-
* @param
|
|
481
|
-
* @
|
|
482
|
-
* @return {boolean} - True if the condition applies to this component.
|
|
680
|
+
* @param {any} row - The row contextual data.
|
|
681
|
+
* @param {any} data - The global data object.
|
|
682
|
+
* @returns {boolean} - True if the condition applies to this component.
|
|
483
683
|
*/
|
|
484
684
|
checkCondition(row: any, data: any): boolean;
|
|
485
685
|
/**
|
|
486
686
|
* Check for conditionals and hide/show the element based on those conditions.
|
|
687
|
+
* @param {any} data - The data to check against.
|
|
688
|
+
* @param {any} flags - The flags passed to checkData function.
|
|
689
|
+
* @param {any} row - The row data to check against.
|
|
690
|
+
* @returns {boolean} - TRUE if the component is visible.
|
|
487
691
|
*/
|
|
488
692
|
checkComponentConditions(data: any, flags: any, row: any): boolean;
|
|
489
693
|
/**
|
|
490
694
|
* Checks conditions for this component and any sub components.
|
|
491
|
-
* @param
|
|
492
|
-
* @
|
|
695
|
+
* @param {any} data - The data to check against.
|
|
696
|
+
* @param {any} flags - The flags passed to checkData function.
|
|
697
|
+
* @param {any} row - The row data to check against.
|
|
698
|
+
* @returns {boolean} - TRUE if the component is visible.
|
|
493
699
|
*/
|
|
494
700
|
checkConditions(data: any, flags: any, row: any): boolean;
|
|
495
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Returns the component logic if applicable.
|
|
703
|
+
* @returns {Array<object>} - The component logic.
|
|
704
|
+
*/
|
|
705
|
+
get logic(): object[];
|
|
496
706
|
/**
|
|
497
707
|
* Check all triggers and apply necessary actions.
|
|
498
|
-
*
|
|
499
|
-
* @param data
|
|
708
|
+
* @param {any} data - The data to check against.
|
|
709
|
+
* @param {any} row - The row data to check against.
|
|
710
|
+
* @returns {boolean|void} - TRUE if the component was altered.
|
|
711
|
+
*/
|
|
712
|
+
fieldLogic(data?: any, row?: any): boolean | void;
|
|
713
|
+
/**
|
|
714
|
+
* Retuns if the browser is Internet Explorer.
|
|
715
|
+
* @returns {boolean} - TRUE if the browser is IE.
|
|
500
716
|
*/
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
717
|
+
isIE(): boolean;
|
|
718
|
+
/**
|
|
719
|
+
* Defines the logic action value through evaluation.
|
|
720
|
+
* @param {object} action - The action within the Logic system to perform.
|
|
721
|
+
* @param {object} argsObject - The arguments to pass to the evaluation.
|
|
722
|
+
* @returns {any} - The result of the evaluation.
|
|
723
|
+
*/
|
|
724
|
+
defineActionValue(action: object, argsObject: object): any;
|
|
725
|
+
/**
|
|
726
|
+
* Apply the actions of Logic for a component once the conditions have been met.
|
|
727
|
+
* @param {object} newComponent - The new component to apply the actions to.
|
|
728
|
+
* @param {Array<object>} actions - An array of actions
|
|
729
|
+
* @param {any} result - The result of the conditional check in order to evaluate the actions.
|
|
730
|
+
* @param {any} row - The contextual row data for this component.
|
|
731
|
+
* @param {any} data - The global data object for the submission.
|
|
732
|
+
* @returns {boolean} - TRUE if the component was altered.
|
|
733
|
+
*/
|
|
734
|
+
applyActions(newComponent: object, actions: Array<object>, result: any, row: any, data: any): boolean;
|
|
505
735
|
addInputError(message: any, dirty: any, elements: any): void;
|
|
506
736
|
removeInputError(elements: any): void;
|
|
507
737
|
/**
|
|
508
738
|
* Add a new input error to this element.
|
|
509
|
-
*
|
|
510
|
-
* @
|
|
511
|
-
*/
|
|
512
|
-
addMessages(messages:
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
739
|
+
* @param {Array<object>|string} messages - An array of messages to add to the element.
|
|
740
|
+
* @returns {void}
|
|
741
|
+
*/
|
|
742
|
+
addMessages(messages: Array<object> | string): void;
|
|
743
|
+
/**
|
|
744
|
+
* Sets the form input widget error classes.
|
|
745
|
+
* @param {Array<HTMLElement>} elements - An array of DOM elements to set the error classes on.
|
|
746
|
+
* @param {boolean} dirty - If the input is dirty.
|
|
747
|
+
* @param {boolean} hasErrors - If the input has errors.
|
|
748
|
+
* @param {boolean} hasMessages - If the input has messages.
|
|
749
|
+
* @param {HTMLElement} element - The wrapper element for all the other elements passed in first argument.
|
|
750
|
+
* @returns {void}
|
|
751
|
+
*/
|
|
752
|
+
setErrorClasses(elements: Array<HTMLElement>, dirty: boolean, hasErrors: boolean, hasMessages: boolean, element?: HTMLElement): void;
|
|
753
|
+
/**
|
|
754
|
+
* Adds the classes necessary to mark an element as invalid.
|
|
755
|
+
* @param {HTMLElement} element - The element you wish to add the invalid classes to.
|
|
756
|
+
* @param {boolean} invalid - TRUE if the component is invalid, FALSE otherwise.
|
|
757
|
+
* @returns {void}
|
|
758
|
+
*/
|
|
759
|
+
setElementInvalid(element: HTMLElement, invalid: boolean): void;
|
|
760
|
+
/**
|
|
761
|
+
* Clears the components data if it is conditionally hidden AND clearOnHide is set to true for this component.
|
|
762
|
+
*/
|
|
518
763
|
clearOnHide(): void;
|
|
764
|
+
/**
|
|
765
|
+
* Triggers a debounced onChange event for the root component (usually Webform).
|
|
766
|
+
* @param {...any} args - The arguments to pass to the onChange event.
|
|
767
|
+
*/
|
|
519
768
|
triggerRootChange(...args: any[]): void;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
769
|
+
/**
|
|
770
|
+
* Called when the component value has been changed. This will then trigger the root level onChange handler which
|
|
771
|
+
* propagates the checkData methods for the full component tree.
|
|
772
|
+
* @param {any} flags - The flags for the change event propagation.
|
|
773
|
+
* @param {boolean} fromRoot - If the change event is from the root component.
|
|
774
|
+
* @returns {boolean} - TRUE if the component has changed.
|
|
775
|
+
*/
|
|
776
|
+
onChange(flags: any, fromRoot: boolean): boolean;
|
|
526
777
|
get wysiwygDefault(): {
|
|
527
778
|
quill: {
|
|
528
779
|
theme: string;
|
|
529
|
-
placeholder:
|
|
780
|
+
placeholder: string;
|
|
530
781
|
modules: {
|
|
531
782
|
toolbar: ({
|
|
532
783
|
size: (string | boolean)[];
|
|
@@ -563,7 +814,7 @@ declare class Component extends Element {
|
|
|
563
814
|
minLines: number;
|
|
564
815
|
tabSize: number;
|
|
565
816
|
mode: string;
|
|
566
|
-
placeholder:
|
|
817
|
+
placeholder: string;
|
|
567
818
|
};
|
|
568
819
|
ckeditor: {
|
|
569
820
|
image: {
|
|
@@ -582,28 +833,27 @@ declare class Component extends Element {
|
|
|
582
833
|
get tree(): any;
|
|
583
834
|
/**
|
|
584
835
|
* The empty value for this component.
|
|
585
|
-
*
|
|
586
|
-
* @return {null}
|
|
836
|
+
* @returns {null} - The empty value for this component.
|
|
587
837
|
*/
|
|
588
838
|
get emptyValue(): null;
|
|
589
839
|
/**
|
|
590
840
|
* Returns if this component has a value set.
|
|
591
|
-
*
|
|
841
|
+
* @param {any} data - The global data object.
|
|
842
|
+
* @returns {boolean} - TRUE if a value is set.
|
|
592
843
|
*/
|
|
593
844
|
hasValue(data: any): boolean;
|
|
594
845
|
/**
|
|
595
846
|
* Get the data value at the root level.
|
|
596
|
-
*
|
|
597
|
-
* @return {*}
|
|
847
|
+
* @returns {*} - The root value for the component, typically the Webform data object.
|
|
598
848
|
*/
|
|
599
849
|
get rootValue(): any;
|
|
600
850
|
get rootPristine(): any;
|
|
601
851
|
/**
|
|
602
852
|
* Splice a value from the dataValue.
|
|
603
|
-
*
|
|
604
|
-
* @param
|
|
853
|
+
* @param {number} index - The index to splice for an array component values.
|
|
854
|
+
* @param {*} flags - The flags to use when splicing the value.
|
|
605
855
|
*/
|
|
606
|
-
splice(index:
|
|
856
|
+
splice(index: number, flags?: any): void;
|
|
607
857
|
unset(): void;
|
|
608
858
|
/**
|
|
609
859
|
* Deletes the value of the component.
|
|
@@ -614,33 +864,29 @@ declare class Component extends Element {
|
|
|
614
864
|
get defaultValue(): any;
|
|
615
865
|
/**
|
|
616
866
|
* Get the input value of this component.
|
|
617
|
-
*
|
|
618
|
-
* @return {*}
|
|
867
|
+
* @returns {*} - The value for the component.
|
|
619
868
|
*/
|
|
620
869
|
getValue(): any;
|
|
621
870
|
/**
|
|
622
871
|
* Get the value at a specific index.
|
|
623
|
-
*
|
|
624
|
-
* @
|
|
625
|
-
* @returns {*}
|
|
872
|
+
* @param {number} index - For an array component or multiple values, this returns the value at a specific index.
|
|
873
|
+
* @returns {*} - The value at the specified index.
|
|
626
874
|
*/
|
|
627
|
-
getValueAt(index:
|
|
875
|
+
getValueAt(index: number): any;
|
|
628
876
|
/**
|
|
629
877
|
* Set the value of this component.
|
|
630
|
-
*
|
|
631
|
-
* @param value
|
|
632
|
-
* @
|
|
633
|
-
*
|
|
634
|
-
* @return {boolean} - If the value changed.
|
|
878
|
+
* @param {*} value - The value to set for this component.
|
|
879
|
+
* @param {*} flags - The flags to use when setting the value.
|
|
880
|
+
* @returns {boolean} - If the value changed.
|
|
635
881
|
*/
|
|
636
|
-
setValue(value: any, flags?:
|
|
882
|
+
setValue(value: any, flags?: any): boolean;
|
|
637
883
|
/**
|
|
638
884
|
* Set the value at a specific index.
|
|
639
|
-
*
|
|
640
|
-
* @param index
|
|
641
|
-
* @param value
|
|
885
|
+
* @param {number} index - The index to set the value at.
|
|
886
|
+
* @param {*} value - The value to set at the specified index.
|
|
887
|
+
* @param {*} flags - The flags to use when setting the value.
|
|
642
888
|
*/
|
|
643
|
-
setValueAt(index:
|
|
889
|
+
setValueAt(index: number, value: any, flags?: any): void;
|
|
644
890
|
get hasSetValue(): boolean;
|
|
645
891
|
setDefaultValue(): void;
|
|
646
892
|
/**
|
|
@@ -649,22 +895,21 @@ declare class Component extends Element {
|
|
|
649
895
|
restoreValue(): void;
|
|
650
896
|
/**
|
|
651
897
|
* Normalize values coming into updateValue.
|
|
652
|
-
*
|
|
653
|
-
* @
|
|
654
|
-
* @return {*}
|
|
898
|
+
* @param {*} value - The value to normalize before setting.
|
|
899
|
+
* @returns {*} - The normalized value.
|
|
655
900
|
*/
|
|
656
901
|
normalizeValue(value: any): any;
|
|
657
902
|
/**
|
|
658
903
|
* Update a value of this component.
|
|
659
|
-
*
|
|
660
|
-
* @param flags
|
|
904
|
+
* @param {*} value - The value to update.
|
|
905
|
+
* @param {*} flags - The flags to use when updating the value.
|
|
906
|
+
* @returns {boolean} - If the value changed.
|
|
661
907
|
*/
|
|
662
|
-
updateComponentValue(value: any, flags?:
|
|
908
|
+
updateComponentValue(value: any, flags?: any): boolean;
|
|
663
909
|
/**
|
|
664
910
|
* Updates the value of this component plus all sub-components.
|
|
665
|
-
*
|
|
666
|
-
* @
|
|
667
|
-
* @return {boolean}
|
|
911
|
+
* @param {...any} args - The arguments to pass to updateValue.
|
|
912
|
+
* @returns {boolean} - If the value changed.
|
|
668
913
|
*/
|
|
669
914
|
updateValue(...args: any[]): boolean;
|
|
670
915
|
getIcon(name: any, content: any, styles: any, ref?: string): any;
|
|
@@ -674,130 +919,123 @@ declare class Component extends Element {
|
|
|
674
919
|
resetValue(): void;
|
|
675
920
|
/**
|
|
676
921
|
* Determine if the value of this component has changed.
|
|
677
|
-
*
|
|
678
|
-
* @param
|
|
679
|
-
* @
|
|
680
|
-
* @return {boolean}
|
|
922
|
+
* @param {*} newValue - The new value to check.
|
|
923
|
+
* @param {*} oldValue - The existing value of the component.
|
|
924
|
+
* @returns {boolean} - TRUE if the value has changed.
|
|
681
925
|
*/
|
|
682
926
|
hasChanged(newValue: any, oldValue: any): boolean;
|
|
683
927
|
/**
|
|
684
928
|
* Update the value on change.
|
|
685
|
-
*
|
|
686
|
-
* @param
|
|
929
|
+
* @param {*} flags - The flags to use when triggering the on change event.
|
|
930
|
+
* @param {boolean} changed - If the value has changed.
|
|
931
|
+
* @returns {boolean} - If the value changed.
|
|
687
932
|
*/
|
|
688
|
-
updateOnChange(flags?:
|
|
689
|
-
|
|
690
|
-
* Perform a calculated value operation.
|
|
691
|
-
*
|
|
692
|
-
* @param data - The global data object.
|
|
693
|
-
*
|
|
694
|
-
* @return {boolean} - If the value changed during calculation.
|
|
695
|
-
*/
|
|
696
|
-
convertNumberOrBoolToString(value: any): boolean;
|
|
933
|
+
updateOnChange(flags?: any, changed?: boolean): boolean;
|
|
934
|
+
convertNumberOrBoolToString(value: any): any;
|
|
697
935
|
doValueCalculation(dataValue: any, data: any, row: any): any;
|
|
698
936
|
calculateComponentValue(data: any, flags: any, row: any): boolean;
|
|
699
937
|
calculationLocked: boolean | undefined;
|
|
700
938
|
calculatedValue: any;
|
|
701
939
|
/**
|
|
702
940
|
* Performs calculations in this component plus any child components.
|
|
703
|
-
*
|
|
704
|
-
* @param
|
|
705
|
-
* @
|
|
941
|
+
* @param {*} data - The data to perform the calculation with.
|
|
942
|
+
* @param {*} flags - The flags to use when calculating the value.
|
|
943
|
+
* @param {*} row - The contextual row data to use when performing the calculation.
|
|
944
|
+
* @returns {boolean} - TRUE if the value changed.
|
|
706
945
|
*/
|
|
707
946
|
calculateValue(data: any, flags: any, row: any): boolean;
|
|
708
947
|
/**
|
|
709
948
|
* Set this component's label text and render it.
|
|
710
|
-
*
|
|
711
|
-
* @param value - The new label text.
|
|
949
|
+
* @param {string} value - The new label text.
|
|
712
950
|
*/
|
|
713
|
-
set label(value:
|
|
951
|
+
set label(value: string);
|
|
714
952
|
/**
|
|
715
953
|
* Get this component's label text.
|
|
716
|
-
*
|
|
954
|
+
* @returns {string} - The label text for this component.
|
|
717
955
|
*/
|
|
718
|
-
get label():
|
|
956
|
+
get label(): string;
|
|
719
957
|
/**
|
|
720
958
|
* Get FormioForm element at the root of this component tree.
|
|
721
|
-
*
|
|
959
|
+
* @returns {*} root - The root component to search from.
|
|
722
960
|
*/
|
|
723
|
-
getRoot():
|
|
961
|
+
getRoot(): any;
|
|
724
962
|
/**
|
|
725
963
|
* Returns the invalid message, or empty string if the component is valid.
|
|
726
|
-
*
|
|
727
|
-
* @param
|
|
728
|
-
* @param
|
|
729
|
-
* @
|
|
964
|
+
* @param {*} data - The data to check if the component is valid.
|
|
965
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
966
|
+
* @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
|
|
967
|
+
* @param {*} row - Contextual row data for this component.
|
|
968
|
+
* @returns {string} - The message to show when the component is invalid.
|
|
730
969
|
*/
|
|
731
|
-
invalidMessage(data: any, dirty:
|
|
970
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
|
732
971
|
/**
|
|
733
972
|
* Returns if the component is valid or not.
|
|
734
|
-
*
|
|
735
|
-
* @param
|
|
736
|
-
* @
|
|
737
|
-
* @return {boolean}
|
|
973
|
+
* @param {*} data - The data to check if the component is valid.
|
|
974
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
975
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
738
976
|
*/
|
|
739
|
-
isValid(data: any, dirty:
|
|
977
|
+
isValid(data: any, dirty: boolean): boolean;
|
|
740
978
|
setComponentValidity(errors: any, dirty: any, silentCheck: any): any;
|
|
741
979
|
/**
|
|
742
980
|
* Interpolate errors from the validation methods.
|
|
743
|
-
* @param {
|
|
744
|
-
* @returns
|
|
981
|
+
* @param {Array<any>} errors - An array of errors to interpolate.
|
|
982
|
+
* @returns {Array<any>} - The interpolated errors.
|
|
745
983
|
*/
|
|
746
|
-
interpolateErrors(errors: any): any
|
|
984
|
+
interpolateErrors(errors: Array<any>): Array<any>;
|
|
747
985
|
/**
|
|
748
986
|
* Show component validation errors.
|
|
749
987
|
* @param {*} errors - An array of errors that have occured.
|
|
750
988
|
* @param {*} data - The root submission data.
|
|
751
989
|
* @param {*} row - The contextual row data.
|
|
752
990
|
* @param {*} flags - The flags to perform validation.
|
|
753
|
-
* @returns
|
|
991
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
754
992
|
*/
|
|
755
|
-
showValidationErrors(errors: any, data: any, row: any, flags: any):
|
|
993
|
+
showValidationErrors(errors: any, data: any, row: any, flags: any): boolean;
|
|
756
994
|
/**
|
|
757
995
|
* Perform a component validation.
|
|
758
996
|
* @param {*} data - The root data you wish to use for this component.
|
|
759
997
|
* @param {*} row - The contextual row data you wish to use for this component.
|
|
760
998
|
* @param {*} flags - The flags to control the behavior of the validation.
|
|
761
|
-
* @returns
|
|
999
|
+
* @returns {Array<any>} - An array of errors if the component is invalid.
|
|
762
1000
|
*/
|
|
763
|
-
validateComponent(data
|
|
1001
|
+
validateComponent(data?: any, row?: any, flags?: any): Array<any>;
|
|
764
1002
|
/**
|
|
765
1003
|
* Checks the validity of this component and sets the error message if it is invalid.
|
|
766
|
-
*
|
|
767
|
-
* @param
|
|
768
|
-
* @param
|
|
769
|
-
* @param
|
|
770
|
-
* @
|
|
1004
|
+
* @param {*} data - The data to check if the component is valid.
|
|
1005
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
1006
|
+
* @param {*} row - The contextual row data for this component.
|
|
1007
|
+
* @param {*} flags - The flags to use when checking the validity.
|
|
1008
|
+
* @param {Array<any>} allErrors - An array of all errors that have occured so that it can be appended when another one occurs here.
|
|
1009
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
771
1010
|
*/
|
|
772
|
-
checkComponentValidity(data
|
|
1011
|
+
checkComponentValidity(data?: any, dirty?: boolean, row?: any, flags?: any, allErrors?: Array<any>): boolean;
|
|
773
1012
|
/**
|
|
774
1013
|
* Checks the validity of the component.
|
|
775
|
-
* @param {*} data
|
|
776
|
-
* @param {
|
|
777
|
-
* @param {*} row
|
|
778
|
-
* @param {
|
|
779
|
-
* @
|
|
1014
|
+
* @param {*} data - The data to check if the component is valid.
|
|
1015
|
+
* @param {boolean} dirty - If the component is dirty.
|
|
1016
|
+
* @param {*} row - The contextual row data for this component.
|
|
1017
|
+
* @param {boolean} silentCheck - If the check should be silent and not set the error messages.
|
|
1018
|
+
* @param {Array<any>} errors - An array of all errors that have occured so that it can be appended when another one occurs here.
|
|
1019
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
780
1020
|
*/
|
|
781
|
-
checkValidity(data
|
|
782
|
-
checkAsyncValidity(data
|
|
1021
|
+
checkValidity(data?: any, dirty?: boolean, row?: any, silentCheck?: boolean, errors?: Array<any>): boolean;
|
|
1022
|
+
checkAsyncValidity(data?: null, dirty?: boolean, row?: null, silentCheck?: boolean, errors?: any[]): boolean;
|
|
783
1023
|
/**
|
|
784
1024
|
* Check the conditions, calculations, and validity of a single component and triggers an update if
|
|
785
1025
|
* something changed.
|
|
786
|
-
*
|
|
787
|
-
* @param
|
|
788
|
-
* @param
|
|
789
|
-
*
|
|
790
|
-
* @return boolean - If component is valid or not.
|
|
1026
|
+
* @param {*} data - The root data of the change event.
|
|
1027
|
+
* @param {*} flags - The flags from this change event.
|
|
1028
|
+
* @param {*} row - The contextual row data for this component.
|
|
1029
|
+
* @returns {void|boolean} - TRUE if no check should be performed on the component.
|
|
791
1030
|
*/
|
|
792
|
-
checkData(data
|
|
1031
|
+
checkData(data?: any, flags?: any, row?: any): void | boolean;
|
|
793
1032
|
checkModal(errors?: any[], dirty?: boolean): void;
|
|
794
1033
|
get validationValue(): any;
|
|
795
1034
|
isEmpty(value?: any): any;
|
|
796
1035
|
isEqual(valueA: any, valueB?: any): any;
|
|
797
1036
|
/**
|
|
798
1037
|
* Check if a component is eligible for multiple validation
|
|
799
|
-
*
|
|
800
|
-
* @return {boolean}
|
|
1038
|
+
* @returns {boolean} - TRUE if the component is eligible for multiple validation.
|
|
801
1039
|
*/
|
|
802
1040
|
validateMultiple(): boolean;
|
|
803
1041
|
clearErrorClasses(element?: any): void;
|
|
@@ -807,8 +1045,7 @@ declare class Component extends Element {
|
|
|
807
1045
|
/**
|
|
808
1046
|
* Determines if the value of this component is hidden from the user as if it is coming from the server, but is
|
|
809
1047
|
* protected.
|
|
810
|
-
*
|
|
811
|
-
* @return {boolean|*}
|
|
1048
|
+
* @returns {boolean|*} - TRUE if the value is hidden.
|
|
812
1049
|
*/
|
|
813
1050
|
isValueHidden(): boolean | any;
|
|
814
1051
|
shouldSkipValidation(data: any, row: any, flags?: {}): boolean;
|
|
@@ -816,6 +1053,8 @@ declare class Component extends Element {
|
|
|
816
1053
|
get dataReady(): Promise<void>;
|
|
817
1054
|
/**
|
|
818
1055
|
* Prints out the value of this component as a string value.
|
|
1056
|
+
* @param {*} value - The value to print out.
|
|
1057
|
+
* @returns {string} - The string representation of the value.
|
|
819
1058
|
*/
|
|
820
1059
|
asString(value: any): string;
|
|
821
1060
|
setDisabled(element: any, disabled: any): void;
|
|
@@ -831,25 +1070,17 @@ declare class Component extends Element {
|
|
|
831
1070
|
attachLogic(): void;
|
|
832
1071
|
/**
|
|
833
1072
|
* Get the element information.
|
|
1073
|
+
* @returns {*} - The components "input" DOM element information.
|
|
834
1074
|
*/
|
|
835
|
-
elementInfo():
|
|
836
|
-
type: string;
|
|
837
|
-
component: any;
|
|
838
|
-
changeEvent: string;
|
|
839
|
-
attr: {
|
|
840
|
-
name: any;
|
|
841
|
-
type: any;
|
|
842
|
-
class: string;
|
|
843
|
-
lang: any;
|
|
844
|
-
};
|
|
845
|
-
};
|
|
1075
|
+
elementInfo(): any;
|
|
846
1076
|
autofocus(): void;
|
|
847
1077
|
scrollIntoView(element?: any): void;
|
|
848
|
-
focus(index
|
|
1078
|
+
focus(index?: number): void;
|
|
849
1079
|
/**
|
|
850
1080
|
* Get `Formio` instance for working with files
|
|
1081
|
+
* @returns {import('@formio/core').Formio} - The Formio instance file service.
|
|
851
1082
|
*/
|
|
852
|
-
get fileService():
|
|
1083
|
+
get fileService(): import("@formio/core").Formio;
|
|
853
1084
|
resetCaches(): void;
|
|
854
1085
|
get previewMode(): boolean;
|
|
855
1086
|
}
|