@formio/js 5.0.0-dev.5633.53931b9 → 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 +180 -139
- package/lib/cjs/Webform.js +308 -295
- 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 +502 -269
- 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 +435 -191
- 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 +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 +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 +180 -139
- package/lib/mjs/Webform.js +320 -307
- 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 +502 -269
- 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 +435 -191
- 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 +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 +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,17 +338,36 @@ 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
348
|
* @param {object|null|undefined} ctx - The rendering context
|
|
333
|
-
* @return {string}
|
|
349
|
+
* @return {string} - The modal preview markup
|
|
334
350
|
*/
|
|
335
351
|
renderModalPreview(ctx: object | null | undefined): string;
|
|
352
|
+
/**
|
|
353
|
+
* Returns the modal preview template.
|
|
354
|
+
* @returns {string} - The modal preview template.
|
|
355
|
+
*/
|
|
336
356
|
getModalPreviewTemplate(): string;
|
|
337
|
-
|
|
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>;
|
|
338
363
|
get hasModalSaveButton(): boolean;
|
|
339
|
-
|
|
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;
|
|
340
371
|
/**
|
|
341
372
|
* Creates the tooltip instance using tippy.js and returns it
|
|
342
373
|
* @param {HTMLElement} tooltipEl - HTML element to attach the tooltip
|
|
@@ -344,23 +375,68 @@ declare class Component extends Element {
|
|
|
344
375
|
* @return {import('tippy.js').Tippy} - tippy.js instance
|
|
345
376
|
*/
|
|
346
377
|
createTooltip(tooltipEl: HTMLElement, settings?: object | null | undefined): import('tippy.js').Tippy;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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.
|
|
390
|
+
*/
|
|
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>;
|
|
350
398
|
componentModal: any;
|
|
399
|
+
/**
|
|
400
|
+
* Restors the "focus" on a component after a redraw event has occured.
|
|
401
|
+
*/
|
|
351
402
|
restoreFocus(): void;
|
|
352
|
-
|
|
353
|
-
|
|
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;
|
|
354
417
|
/**
|
|
355
418
|
* Remove all event handlers.
|
|
356
419
|
*/
|
|
357
420
|
detach(): void;
|
|
358
|
-
|
|
359
|
-
|
|
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;
|
|
360
436
|
/**
|
|
361
437
|
* Refreshes the component with a new value.
|
|
362
|
-
*
|
|
363
|
-
* @
|
|
438
|
+
* @param {any} value - The latest value of the component to check if it needs to be refreshed.
|
|
439
|
+
* @returns {void}
|
|
364
440
|
*/
|
|
365
441
|
refresh(value: any): void;
|
|
366
442
|
refreshOnChanged: boolean | undefined;
|
|
@@ -371,33 +447,84 @@ declare class Component extends Element {
|
|
|
371
447
|
* with the components data and returns true if they are in the same context.
|
|
372
448
|
*
|
|
373
449
|
* Different rows of the same EditGrid, for example, are in different contexts.
|
|
374
|
-
*
|
|
375
|
-
* @
|
|
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.
|
|
376
452
|
*/
|
|
377
453
|
inContext(component: any): boolean;
|
|
378
|
-
|
|
379
|
-
|
|
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;
|
|
380
465
|
element: any;
|
|
381
|
-
|
|
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
|
+
*/
|
|
382
475
|
get defaultViewOnlyValue(): string;
|
|
383
476
|
/**
|
|
384
477
|
* Uses the widget to determine the output string.
|
|
385
|
-
*
|
|
386
|
-
* @param
|
|
387
|
-
* @
|
|
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}
|
|
388
501
|
*/
|
|
389
|
-
getWidgetValueAsString(value: any, options: any): any;
|
|
390
|
-
getValueAsString(value: any, options: any): any;
|
|
391
|
-
getView(value: any, options: any): any;
|
|
392
502
|
updateItems(...args: any[]): void;
|
|
393
503
|
/**
|
|
394
|
-
*
|
|
395
|
-
* @param {
|
|
396
|
-
* @
|
|
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.
|
|
397
508
|
*/
|
|
398
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
|
+
*/
|
|
399
515
|
itemValueForHTMLMode(value: any): any;
|
|
400
|
-
|
|
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
|
+
*/
|
|
401
528
|
get optimizeRedraw(): boolean;
|
|
402
529
|
/**
|
|
403
530
|
* Retrieves the CSS class name of this component.
|
|
@@ -406,125 +533,251 @@ declare class Component extends Element {
|
|
|
406
533
|
get className(): string;
|
|
407
534
|
/**
|
|
408
535
|
* Build the custom style from the layout values
|
|
409
|
-
* @
|
|
536
|
+
* @returns {string} - The custom style
|
|
410
537
|
*/
|
|
411
538
|
get customStyle(): string;
|
|
412
|
-
|
|
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;
|
|
413
544
|
/**
|
|
414
545
|
* Returns the outside wrapping element of this component.
|
|
415
|
-
* @returns {HTMLElement}
|
|
546
|
+
* @returns {HTMLElement} - The wrapping element of this component.
|
|
416
547
|
*/
|
|
417
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;
|
|
418
555
|
/**
|
|
419
556
|
* Sets the pristine flag for this component.
|
|
420
|
-
*
|
|
421
|
-
* @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
|
|
557
|
+
* @param {boolean} pristine - TRUE to make pristine, FALSE not pristine.
|
|
422
558
|
*/
|
|
423
559
|
setPristine(pristine: boolean): void;
|
|
560
|
+
/**
|
|
561
|
+
* Returns if the component is pristine.
|
|
562
|
+
* @returns {boolean} - TRUE if the component is pristine.
|
|
563
|
+
*/
|
|
424
564
|
get isPristine(): boolean;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
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;
|
|
428
576
|
/**
|
|
429
577
|
* Removes a value out of the data array and rebuild the rows.
|
|
430
578
|
* @param {number} index - The index of the data element to remove.
|
|
431
579
|
*/
|
|
432
580
|
removeValue(index: number): void;
|
|
433
|
-
|
|
434
|
-
|
|
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;
|
|
435
594
|
/**
|
|
436
595
|
* The readible name for this component.
|
|
437
596
|
* @returns {string} - The name of the component.
|
|
438
597
|
*/
|
|
439
598
|
get name(): string;
|
|
440
|
-
|
|
441
|
-
|
|
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[];
|
|
442
609
|
/**
|
|
443
610
|
* Returns the error label for this component.
|
|
444
|
-
* @
|
|
611
|
+
* @returns {string} - The error label for this component.
|
|
445
612
|
*/
|
|
446
|
-
get errorLabel():
|
|
613
|
+
get errorLabel(): string;
|
|
447
614
|
/**
|
|
448
615
|
* Get the error message provided a certain type of error.
|
|
449
|
-
* @param type
|
|
450
|
-
* @
|
|
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.
|
|
451
631
|
*/
|
|
452
|
-
errorMessage(type: any): any;
|
|
453
|
-
setContent(element: any, content: any, forceSanitize: any, sanitizeOptions: any): boolean;
|
|
454
632
|
restoreCaretPosition(): void;
|
|
633
|
+
/**
|
|
634
|
+
* Redraw the component.
|
|
635
|
+
* @returns {Promise<void>} - A promise that resolves when the component is done redrawing.
|
|
636
|
+
*/
|
|
455
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
|
+
*/
|
|
456
642
|
rebuild(): Promise<void>;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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;
|
|
460
664
|
/**
|
|
461
665
|
* Determines if this component has a condition defined.
|
|
462
|
-
*
|
|
463
|
-
* @return {null}
|
|
666
|
+
* @returns {boolean} - TRUE if the component has a condition defined.
|
|
464
667
|
*/
|
|
465
|
-
hasCondition():
|
|
668
|
+
hasCondition(): boolean;
|
|
466
669
|
/**
|
|
467
670
|
* Check if this component is conditionally visible.
|
|
468
|
-
*
|
|
469
|
-
* @param data
|
|
470
|
-
* @
|
|
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.
|
|
471
674
|
*/
|
|
472
675
|
conditionallyVisible(data: any, row: any): boolean;
|
|
473
676
|
/**
|
|
474
677
|
* Checks the condition of this component.
|
|
475
678
|
*
|
|
476
679
|
* TODO: Switch row and data parameters to be consistent with other methods.
|
|
477
|
-
*
|
|
478
|
-
* @param
|
|
479
|
-
* @
|
|
480
|
-
* @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.
|
|
481
683
|
*/
|
|
482
684
|
checkCondition(row: any, data: any): boolean;
|
|
483
685
|
/**
|
|
484
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.
|
|
485
691
|
*/
|
|
486
692
|
checkComponentConditions(data: any, flags: any, row: any): boolean;
|
|
487
693
|
/**
|
|
488
694
|
* Checks conditions for this component and any sub components.
|
|
489
|
-
* @param
|
|
490
|
-
* @
|
|
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.
|
|
491
699
|
*/
|
|
492
700
|
checkConditions(data: any, flags: any, row: any): boolean;
|
|
493
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Returns the component logic if applicable.
|
|
703
|
+
* @returns {Array<object>} - The component logic.
|
|
704
|
+
*/
|
|
705
|
+
get logic(): object[];
|
|
494
706
|
/**
|
|
495
707
|
* Check all triggers and apply necessary actions.
|
|
496
|
-
*
|
|
497
|
-
* @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.
|
|
498
711
|
*/
|
|
499
|
-
fieldLogic(data
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
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.
|
|
716
|
+
*/
|
|
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;
|
|
503
735
|
addInputError(message: any, dirty: any, elements: any): void;
|
|
504
736
|
removeInputError(elements: any): void;
|
|
505
737
|
/**
|
|
506
738
|
* Add a new input error to this element.
|
|
507
|
-
*
|
|
508
|
-
* @
|
|
509
|
-
*/
|
|
510
|
-
addMessages(messages:
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
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
|
+
*/
|
|
516
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
|
+
*/
|
|
517
768
|
triggerRootChange(...args: any[]): void;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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;
|
|
524
777
|
get wysiwygDefault(): {
|
|
525
778
|
quill: {
|
|
526
779
|
theme: string;
|
|
527
|
-
placeholder:
|
|
780
|
+
placeholder: string;
|
|
528
781
|
modules: {
|
|
529
782
|
toolbar: ({
|
|
530
783
|
size: (string | boolean)[];
|
|
@@ -561,7 +814,7 @@ declare class Component extends Element {
|
|
|
561
814
|
minLines: number;
|
|
562
815
|
tabSize: number;
|
|
563
816
|
mode: string;
|
|
564
|
-
placeholder:
|
|
817
|
+
placeholder: string;
|
|
565
818
|
};
|
|
566
819
|
ckeditor: {
|
|
567
820
|
image: {
|
|
@@ -580,28 +833,27 @@ declare class Component extends Element {
|
|
|
580
833
|
get tree(): any;
|
|
581
834
|
/**
|
|
582
835
|
* The empty value for this component.
|
|
583
|
-
*
|
|
584
|
-
* @return {null}
|
|
836
|
+
* @returns {null} - The empty value for this component.
|
|
585
837
|
*/
|
|
586
838
|
get emptyValue(): null;
|
|
587
839
|
/**
|
|
588
840
|
* Returns if this component has a value set.
|
|
589
|
-
*
|
|
841
|
+
* @param {any} data - The global data object.
|
|
842
|
+
* @returns {boolean} - TRUE if a value is set.
|
|
590
843
|
*/
|
|
591
844
|
hasValue(data: any): boolean;
|
|
592
845
|
/**
|
|
593
846
|
* Get the data value at the root level.
|
|
594
|
-
*
|
|
595
|
-
* @return {*}
|
|
847
|
+
* @returns {*} - The root value for the component, typically the Webform data object.
|
|
596
848
|
*/
|
|
597
849
|
get rootValue(): any;
|
|
598
850
|
get rootPristine(): any;
|
|
599
851
|
/**
|
|
600
852
|
* Splice a value from the dataValue.
|
|
601
|
-
*
|
|
602
|
-
* @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.
|
|
603
855
|
*/
|
|
604
|
-
splice(index:
|
|
856
|
+
splice(index: number, flags?: any): void;
|
|
605
857
|
unset(): void;
|
|
606
858
|
/**
|
|
607
859
|
* Deletes the value of the component.
|
|
@@ -612,33 +864,29 @@ declare class Component extends Element {
|
|
|
612
864
|
get defaultValue(): any;
|
|
613
865
|
/**
|
|
614
866
|
* Get the input value of this component.
|
|
615
|
-
*
|
|
616
|
-
* @return {*}
|
|
867
|
+
* @returns {*} - The value for the component.
|
|
617
868
|
*/
|
|
618
869
|
getValue(): any;
|
|
619
870
|
/**
|
|
620
871
|
* Get the value at a specific index.
|
|
621
|
-
*
|
|
622
|
-
* @
|
|
623
|
-
* @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.
|
|
624
874
|
*/
|
|
625
|
-
getValueAt(index:
|
|
875
|
+
getValueAt(index: number): any;
|
|
626
876
|
/**
|
|
627
877
|
* Set the value of this component.
|
|
628
|
-
*
|
|
629
|
-
* @param value
|
|
630
|
-
* @
|
|
631
|
-
*
|
|
632
|
-
* @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.
|
|
633
881
|
*/
|
|
634
|
-
setValue(value: any, flags?:
|
|
882
|
+
setValue(value: any, flags?: any): boolean;
|
|
635
883
|
/**
|
|
636
884
|
* Set the value at a specific index.
|
|
637
|
-
*
|
|
638
|
-
* @param index
|
|
639
|
-
* @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.
|
|
640
888
|
*/
|
|
641
|
-
setValueAt(index:
|
|
889
|
+
setValueAt(index: number, value: any, flags?: any): void;
|
|
642
890
|
get hasSetValue(): boolean;
|
|
643
891
|
setDefaultValue(): void;
|
|
644
892
|
/**
|
|
@@ -647,22 +895,21 @@ declare class Component extends Element {
|
|
|
647
895
|
restoreValue(): void;
|
|
648
896
|
/**
|
|
649
897
|
* Normalize values coming into updateValue.
|
|
650
|
-
*
|
|
651
|
-
* @
|
|
652
|
-
* @return {*}
|
|
898
|
+
* @param {*} value - The value to normalize before setting.
|
|
899
|
+
* @returns {*} - The normalized value.
|
|
653
900
|
*/
|
|
654
901
|
normalizeValue(value: any): any;
|
|
655
902
|
/**
|
|
656
903
|
* Update a value of this component.
|
|
657
|
-
*
|
|
658
|
-
* @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.
|
|
659
907
|
*/
|
|
660
|
-
updateComponentValue(value: any, flags?:
|
|
908
|
+
updateComponentValue(value: any, flags?: any): boolean;
|
|
661
909
|
/**
|
|
662
910
|
* Updates the value of this component plus all sub-components.
|
|
663
|
-
*
|
|
664
|
-
* @
|
|
665
|
-
* @return {boolean}
|
|
911
|
+
* @param {...any} args - The arguments to pass to updateValue.
|
|
912
|
+
* @returns {boolean} - If the value changed.
|
|
666
913
|
*/
|
|
667
914
|
updateValue(...args: any[]): boolean;
|
|
668
915
|
getIcon(name: any, content: any, styles: any, ref?: string): any;
|
|
@@ -672,130 +919,123 @@ declare class Component extends Element {
|
|
|
672
919
|
resetValue(): void;
|
|
673
920
|
/**
|
|
674
921
|
* Determine if the value of this component has changed.
|
|
675
|
-
*
|
|
676
|
-
* @param
|
|
677
|
-
* @
|
|
678
|
-
* @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.
|
|
679
925
|
*/
|
|
680
926
|
hasChanged(newValue: any, oldValue: any): boolean;
|
|
681
927
|
/**
|
|
682
928
|
* Update the value on change.
|
|
683
|
-
*
|
|
684
|
-
* @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.
|
|
685
932
|
*/
|
|
686
|
-
updateOnChange(flags?:
|
|
687
|
-
|
|
688
|
-
* Perform a calculated value operation.
|
|
689
|
-
*
|
|
690
|
-
* @param data - The global data object.
|
|
691
|
-
*
|
|
692
|
-
* @return {boolean} - If the value changed during calculation.
|
|
693
|
-
*/
|
|
694
|
-
convertNumberOrBoolToString(value: any): boolean;
|
|
933
|
+
updateOnChange(flags?: any, changed?: boolean): boolean;
|
|
934
|
+
convertNumberOrBoolToString(value: any): any;
|
|
695
935
|
doValueCalculation(dataValue: any, data: any, row: any): any;
|
|
696
936
|
calculateComponentValue(data: any, flags: any, row: any): boolean;
|
|
697
937
|
calculationLocked: boolean | undefined;
|
|
698
938
|
calculatedValue: any;
|
|
699
939
|
/**
|
|
700
940
|
* Performs calculations in this component plus any child components.
|
|
701
|
-
*
|
|
702
|
-
* @param
|
|
703
|
-
* @
|
|
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.
|
|
704
945
|
*/
|
|
705
946
|
calculateValue(data: any, flags: any, row: any): boolean;
|
|
706
947
|
/**
|
|
707
948
|
* Set this component's label text and render it.
|
|
708
|
-
*
|
|
709
|
-
* @param value - The new label text.
|
|
949
|
+
* @param {string} value - The new label text.
|
|
710
950
|
*/
|
|
711
|
-
set label(value:
|
|
951
|
+
set label(value: string);
|
|
712
952
|
/**
|
|
713
953
|
* Get this component's label text.
|
|
714
|
-
*
|
|
954
|
+
* @returns {string} - The label text for this component.
|
|
715
955
|
*/
|
|
716
|
-
get label():
|
|
956
|
+
get label(): string;
|
|
717
957
|
/**
|
|
718
958
|
* Get FormioForm element at the root of this component tree.
|
|
719
|
-
*
|
|
959
|
+
* @returns {*} root - The root component to search from.
|
|
720
960
|
*/
|
|
721
|
-
getRoot():
|
|
961
|
+
getRoot(): any;
|
|
722
962
|
/**
|
|
723
963
|
* Returns the invalid message, or empty string if the component is valid.
|
|
724
|
-
*
|
|
725
|
-
* @param
|
|
726
|
-
* @param
|
|
727
|
-
* @
|
|
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.
|
|
728
969
|
*/
|
|
729
|
-
invalidMessage(data: any, dirty:
|
|
970
|
+
invalidMessage(data: any, dirty: boolean, ignoreCondition: boolean, row: any): string;
|
|
730
971
|
/**
|
|
731
972
|
* Returns if the component is valid or not.
|
|
732
|
-
*
|
|
733
|
-
* @param
|
|
734
|
-
* @
|
|
735
|
-
* @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.
|
|
736
976
|
*/
|
|
737
|
-
isValid(data: any, dirty:
|
|
977
|
+
isValid(data: any, dirty: boolean): boolean;
|
|
738
978
|
setComponentValidity(errors: any, dirty: any, silentCheck: any): any;
|
|
739
979
|
/**
|
|
740
980
|
* Interpolate errors from the validation methods.
|
|
741
|
-
* @param {
|
|
742
|
-
* @returns
|
|
981
|
+
* @param {Array<any>} errors - An array of errors to interpolate.
|
|
982
|
+
* @returns {Array<any>} - The interpolated errors.
|
|
743
983
|
*/
|
|
744
|
-
interpolateErrors(errors: any): any
|
|
984
|
+
interpolateErrors(errors: Array<any>): Array<any>;
|
|
745
985
|
/**
|
|
746
986
|
* Show component validation errors.
|
|
747
987
|
* @param {*} errors - An array of errors that have occured.
|
|
748
988
|
* @param {*} data - The root submission data.
|
|
749
989
|
* @param {*} row - The contextual row data.
|
|
750
990
|
* @param {*} flags - The flags to perform validation.
|
|
751
|
-
* @returns
|
|
991
|
+
* @returns {boolean} - TRUE if the component is valid.
|
|
752
992
|
*/
|
|
753
|
-
showValidationErrors(errors: any, data: any, row: any, flags: any):
|
|
993
|
+
showValidationErrors(errors: any, data: any, row: any, flags: any): boolean;
|
|
754
994
|
/**
|
|
755
995
|
* Perform a component validation.
|
|
756
996
|
* @param {*} data - The root data you wish to use for this component.
|
|
757
997
|
* @param {*} row - The contextual row data you wish to use for this component.
|
|
758
998
|
* @param {*} flags - The flags to control the behavior of the validation.
|
|
759
|
-
* @returns
|
|
999
|
+
* @returns {Array<any>} - An array of errors if the component is invalid.
|
|
760
1000
|
*/
|
|
761
|
-
validateComponent(data
|
|
1001
|
+
validateComponent(data?: any, row?: any, flags?: any): Array<any>;
|
|
762
1002
|
/**
|
|
763
1003
|
* Checks the validity of this component and sets the error message if it is invalid.
|
|
764
|
-
*
|
|
765
|
-
* @param
|
|
766
|
-
* @param
|
|
767
|
-
* @param
|
|
768
|
-
* @
|
|
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.
|
|
769
1010
|
*/
|
|
770
|
-
checkComponentValidity(data
|
|
1011
|
+
checkComponentValidity(data?: any, dirty?: boolean, row?: any, flags?: any, allErrors?: Array<any>): boolean;
|
|
771
1012
|
/**
|
|
772
1013
|
* Checks the validity of the component.
|
|
773
|
-
* @param {*} data
|
|
774
|
-
* @param {
|
|
775
|
-
* @param {*} row
|
|
776
|
-
* @param {
|
|
777
|
-
* @
|
|
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.
|
|
778
1020
|
*/
|
|
779
|
-
checkValidity(data
|
|
780
|
-
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;
|
|
781
1023
|
/**
|
|
782
1024
|
* Check the conditions, calculations, and validity of a single component and triggers an update if
|
|
783
1025
|
* something changed.
|
|
784
|
-
*
|
|
785
|
-
* @param
|
|
786
|
-
* @param
|
|
787
|
-
*
|
|
788
|
-
* @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.
|
|
789
1030
|
*/
|
|
790
|
-
checkData(data
|
|
1031
|
+
checkData(data?: any, flags?: any, row?: any): void | boolean;
|
|
791
1032
|
checkModal(errors?: any[], dirty?: boolean): void;
|
|
792
1033
|
get validationValue(): any;
|
|
793
1034
|
isEmpty(value?: any): any;
|
|
794
1035
|
isEqual(valueA: any, valueB?: any): any;
|
|
795
1036
|
/**
|
|
796
1037
|
* Check if a component is eligible for multiple validation
|
|
797
|
-
*
|
|
798
|
-
* @return {boolean}
|
|
1038
|
+
* @returns {boolean} - TRUE if the component is eligible for multiple validation.
|
|
799
1039
|
*/
|
|
800
1040
|
validateMultiple(): boolean;
|
|
801
1041
|
clearErrorClasses(element?: any): void;
|
|
@@ -805,8 +1045,7 @@ declare class Component extends Element {
|
|
|
805
1045
|
/**
|
|
806
1046
|
* Determines if the value of this component is hidden from the user as if it is coming from the server, but is
|
|
807
1047
|
* protected.
|
|
808
|
-
*
|
|
809
|
-
* @return {boolean|*}
|
|
1048
|
+
* @returns {boolean|*} - TRUE if the value is hidden.
|
|
810
1049
|
*/
|
|
811
1050
|
isValueHidden(): boolean | any;
|
|
812
1051
|
shouldSkipValidation(data: any, row: any, flags?: {}): boolean;
|
|
@@ -814,6 +1053,8 @@ declare class Component extends Element {
|
|
|
814
1053
|
get dataReady(): Promise<void>;
|
|
815
1054
|
/**
|
|
816
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.
|
|
817
1058
|
*/
|
|
818
1059
|
asString(value: any): string;
|
|
819
1060
|
setDisabled(element: any, disabled: any): void;
|
|
@@ -829,25 +1070,17 @@ declare class Component extends Element {
|
|
|
829
1070
|
attachLogic(): void;
|
|
830
1071
|
/**
|
|
831
1072
|
* Get the element information.
|
|
1073
|
+
* @returns {*} - The components "input" DOM element information.
|
|
832
1074
|
*/
|
|
833
|
-
elementInfo():
|
|
834
|
-
type: string;
|
|
835
|
-
component: any;
|
|
836
|
-
changeEvent: string;
|
|
837
|
-
attr: {
|
|
838
|
-
name: any;
|
|
839
|
-
type: any;
|
|
840
|
-
class: string;
|
|
841
|
-
lang: any;
|
|
842
|
-
};
|
|
843
|
-
};
|
|
1075
|
+
elementInfo(): any;
|
|
844
1076
|
autofocus(): void;
|
|
845
1077
|
scrollIntoView(element?: any): void;
|
|
846
|
-
focus(index
|
|
1078
|
+
focus(index?: number): void;
|
|
847
1079
|
/**
|
|
848
1080
|
* Get `Formio` instance for working with files
|
|
1081
|
+
* @returns {import('@formio/core').Formio} - The Formio instance file service.
|
|
849
1082
|
*/
|
|
850
|
-
get fileService():
|
|
1083
|
+
get fileService(): import("@formio/core").Formio;
|
|
851
1084
|
resetCaches(): void;
|
|
852
1085
|
get previewMode(): boolean;
|
|
853
1086
|
}
|