@formio/js 5.0.0-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.txt +19 -0
- package/README.md +195 -0
- package/dist/fonts/bootstrap-icons.woff +0 -0
- package/dist/fonts/bootstrap-icons.woff2 +0 -0
- package/dist/formio.builder.css +2295 -0
- package/dist/formio.builder.min.css +1 -0
- package/dist/formio.embed.css +40 -0
- package/dist/formio.embed.js +90 -0
- package/dist/formio.embed.min.css +1 -0
- package/dist/formio.embed.min.js +2 -0
- package/dist/formio.embed.min.js.LICENSE.txt +1 -0
- package/dist/formio.form.css +2014 -0
- package/dist/formio.form.js +8300 -0
- package/dist/formio.form.min.css +1 -0
- package/dist/formio.form.min.js +2 -0
- package/dist/formio.form.min.js.LICENSE.txt +48 -0
- package/dist/formio.full.css +3937 -0
- package/dist/formio.full.js +10276 -0
- package/dist/formio.full.min.css +5 -0
- package/dist/formio.full.min.js +2 -0
- package/dist/formio.full.min.js.LICENSE.txt +48 -0
- package/dist/formio.js +2722 -0
- package/dist/formio.min.js +2 -0
- package/dist/formio.min.js.LICENSE.txt +17 -0
- package/dist/formio.utils.js +2103 -0
- package/dist/formio.utils.min.js +2 -0
- package/dist/formio.utils.min.js.LICENSE.txt +41 -0
- package/index.d.ts +1 -0
- package/lib/cjs/CDN.d.ts +28 -0
- package/lib/cjs/CDN.js +76 -0
- package/lib/cjs/Element.d.ts +255 -0
- package/lib/cjs/Element.js +593 -0
- package/lib/cjs/Embed.d.ts +1 -0
- package/lib/cjs/Embed.js +355 -0
- package/lib/cjs/EventEmitter.d.ts +7 -0
- package/lib/cjs/EventEmitter.js +52 -0
- package/lib/cjs/Form.d.ts +90 -0
- package/lib/cjs/Form.js +337 -0
- package/lib/cjs/FormBuilder.d.ts +6 -0
- package/lib/cjs/FormBuilder.js +39 -0
- package/lib/cjs/Formio.d.ts +2 -0
- package/lib/cjs/Formio.js +95 -0
- package/lib/cjs/PDF.d.ts +32 -0
- package/lib/cjs/PDF.js +292 -0
- package/lib/cjs/PDFBuilder.d.ts +55 -0
- package/lib/cjs/PDFBuilder.js +481 -0
- package/lib/cjs/Webform.d.ts +408 -0
- package/lib/cjs/Webform.js +1515 -0
- package/lib/cjs/WebformBuilder.d.ts +120 -0
- package/lib/cjs/WebformBuilder.js +1537 -0
- package/lib/cjs/Wizard.d.ts +93 -0
- package/lib/cjs/Wizard.js +917 -0
- package/lib/cjs/WizardBuilder.d.ts +46 -0
- package/lib/cjs/WizardBuilder.js +257 -0
- package/lib/cjs/addons/FormioAddon.d.ts +19 -0
- package/lib/cjs/addons/FormioAddon.js +37 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +717 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +590 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +316 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +397 -0
- package/lib/cjs/addons/index.d.ts +625 -0
- package/lib/cjs/addons/index.js +25 -0
- package/lib/cjs/builders/Builders.d.ts +18 -0
- package/lib/cjs/builders/Builders.js +29 -0
- package/lib/cjs/builders/index.d.ts +2 -0
- package/lib/cjs/builders/index.js +7 -0
- package/lib/cjs/components/Components.d.ts +258 -0
- package/lib/cjs/components/Components.js +80 -0
- package/lib/cjs/components/_classes/component/Component.d.ts +779 -0
- package/lib/cjs/components/_classes/component/Component.form.d.ts +3 -0
- package/lib/cjs/components/_classes/component/Component.form.js +77 -0
- package/lib/cjs/components/_classes/component/Component.js +3146 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +645 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +46 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.api.d.ts +42 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.api.js +40 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +113 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +55 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +219 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +161 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.d.ts +160 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +202 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.d.ts +44 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.js +79 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.d.ts +368 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +415 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +140 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +209 -0
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +83 -0
- package/lib/cjs/components/_classes/component/editForm/utils.js +137 -0
- package/lib/cjs/components/_classes/component/fixtures/comp1.d.ts +33 -0
- package/lib/cjs/components/_classes/component/fixtures/comp1.js +33 -0
- package/lib/cjs/components/_classes/component/fixtures/comp2.d.ts +33 -0
- package/lib/cjs/components/_classes/component/fixtures/comp2.js +33 -0
- package/lib/cjs/components/_classes/component/fixtures/comp3.d.ts +14 -0
- package/lib/cjs/components/_classes/component/fixtures/comp3.js +14 -0
- package/lib/cjs/components/_classes/component/fixtures/comp4.d.ts +17 -0
- package/lib/cjs/components/_classes/component/fixtures/comp4.js +18 -0
- package/lib/cjs/components/_classes/component/fixtures/index.d.ts +5 -0
- package/lib/cjs/components/_classes/component/fixtures/index.js +14 -0
- package/lib/cjs/components/_classes/componentModal/ComponentModal.d.ts +46 -0
- package/lib/cjs/components/_classes/componentModal/ComponentModal.js +183 -0
- package/lib/cjs/components/_classes/field/Field.d.ts +4 -0
- package/lib/cjs/components/_classes/field/Field.js +23 -0
- package/lib/cjs/components/_classes/input/Input.d.ts +42 -0
- package/lib/cjs/components/_classes/input/Input.js +304 -0
- package/lib/cjs/components/_classes/list/ListComponent.d.ts +14 -0
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +3 -0
- package/lib/cjs/components/_classes/list/ListComponent.form.js +16 -0
- package/lib/cjs/components/_classes/list/ListComponent.js +215 -0
- package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +183 -0
- package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +119 -0
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +29 -0
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +263 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +130 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +3 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +19 -0
- package/lib/cjs/components/_classes/nested/NestedComponent.js +693 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp1.d.ts +8 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp1.js +16 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp2.d.ts +236 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp2.js +227 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp3.d.ts +26 -0
- package/lib/cjs/components/_classes/nested/fixtures/comp3.js +29 -0
- package/lib/cjs/components/_classes/nested/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/_classes/nested/fixtures/index.js +12 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +14 -0
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +180 -0
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +11 -0
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +123 -0
- package/lib/cjs/components/address/Address.d.ts +58 -0
- package/lib/cjs/components/address/Address.form.d.ts +3 -0
- package/lib/cjs/components/address/Address.form.js +28 -0
- package/lib/cjs/components/address/Address.js +547 -0
- package/lib/cjs/components/address/editForm/Address.edit.data.d.ts +31 -0
- package/lib/cjs/components/address/editForm/Address.edit.data.js +23 -0
- package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +49 -0
- package/lib/cjs/components/address/editForm/Address.edit.display.js +44 -0
- package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +164 -0
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +156 -0
- package/lib/cjs/components/address/fixtures/comp1.d.ts +34 -0
- package/lib/cjs/components/address/fixtures/comp1.js +71 -0
- package/lib/cjs/components/address/fixtures/comp2.d.ts +62 -0
- package/lib/cjs/components/address/fixtures/comp2.js +103 -0
- package/lib/cjs/components/address/fixtures/comp3.d.ts +44 -0
- package/lib/cjs/components/address/fixtures/comp3.js +85 -0
- package/lib/cjs/components/address/fixtures/comp4.d.ts +56 -0
- package/lib/cjs/components/address/fixtures/comp4.js +93 -0
- package/lib/cjs/components/address/fixtures/index.d.ts +5 -0
- package/lib/cjs/components/address/fixtures/index.js +14 -0
- package/lib/cjs/components/address/fixtures/values.d.ts +22 -0
- package/lib/cjs/components/address/fixtures/values.js +19 -0
- package/lib/cjs/components/alert/Alert.d.ts +30 -0
- package/lib/cjs/components/alert/Alert.js +183 -0
- package/lib/cjs/components/builder.d.ts +2 -0
- package/lib/cjs/components/builder.js +91 -0
- package/lib/cjs/components/button/Button.d.ts +44 -0
- package/lib/cjs/components/button/Button.form.d.ts +3 -0
- package/lib/cjs/components/button/Button.form.js +24 -0
- package/lib/cjs/components/button/Button.js +465 -0
- package/lib/cjs/components/button/editForm/Button.edit.display.d.ts +360 -0
- package/lib/cjs/components/button/editForm/Button.edit.display.js +253 -0
- package/lib/cjs/components/button/fixtures/comp1.d.ts +15 -0
- package/lib/cjs/components/button/fixtures/comp1.js +16 -0
- package/lib/cjs/components/button/fixtures/comp2.d.ts +25 -0
- package/lib/cjs/components/button/fixtures/comp2.js +57 -0
- package/lib/cjs/components/button/fixtures/comp3.d.ts +113 -0
- package/lib/cjs/components/button/fixtures/comp3.js +84 -0
- package/lib/cjs/components/button/fixtures/index.d.ts +4 -0
- package/lib/cjs/components/button/fixtures/index.js +12 -0
- package/lib/cjs/components/button/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/button/fixtures/values.js +6 -0
- package/lib/cjs/components/checkbox/Checkbox.d.ts +36 -0
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +3 -0
- package/lib/cjs/components/checkbox/Checkbox.form.js +26 -0
- package/lib/cjs/components/checkbox/Checkbox.js +194 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +5 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.js +8 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +75 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +79 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +5 -0
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.js +12 -0
- package/lib/cjs/components/checkbox/fixtures/comp1.d.ts +24 -0
- package/lib/cjs/components/checkbox/fixtures/comp1.js +24 -0
- package/lib/cjs/components/checkbox/fixtures/comp2.d.ts +12 -0
- package/lib/cjs/components/checkbox/fixtures/comp2.js +13 -0
- package/lib/cjs/components/checkbox/fixtures/comp3.d.ts +15 -0
- package/lib/cjs/components/checkbox/fixtures/comp3.js +16 -0
- package/lib/cjs/components/checkbox/fixtures/comp4.d.ts +46 -0
- package/lib/cjs/components/checkbox/fixtures/comp4.js +39 -0
- package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.d.ts +25 -0
- package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.js +25 -0
- package/lib/cjs/components/checkbox/fixtures/index.d.ts +6 -0
- package/lib/cjs/components/checkbox/fixtures/index.js +16 -0
- package/lib/cjs/components/checkbox/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/checkbox/fixtures/values.js +6 -0
- package/lib/cjs/components/columns/Columns.d.ts +25 -0
- package/lib/cjs/components/columns/Columns.form.d.ts +3 -0
- package/lib/cjs/components/columns/Columns.form.js +16 -0
- package/lib/cjs/components/columns/Columns.js +156 -0
- package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +58 -0
- package/lib/cjs/components/columns/editForm/Columns.edit.display.js +100 -0
- package/lib/cjs/components/columns/fixtures/comp1.d.ts +45 -0
- package/lib/cjs/components/columns/fixtures/comp1.js +85 -0
- package/lib/cjs/components/columns/fixtures/comp2.d.ts +24 -0
- package/lib/cjs/components/columns/fixtures/comp2.js +127 -0
- package/lib/cjs/components/columns/fixtures/comp3.d.ts +45 -0
- package/lib/cjs/components/columns/fixtures/comp3.js +53 -0
- package/lib/cjs/components/columns/fixtures/index.d.ts +4 -0
- package/lib/cjs/components/columns/fixtures/index.js +12 -0
- package/lib/cjs/components/container/Container.d.ts +14 -0
- package/lib/cjs/components/container/Container.form.d.ts +3 -0
- package/lib/cjs/components/container/Container.form.js +21 -0
- package/lib/cjs/components/container/Container.js +78 -0
- package/lib/cjs/components/container/editForm/Container.edit.data.d.ts +5 -0
- package/lib/cjs/components/container/editForm/Container.edit.data.js +16 -0
- package/lib/cjs/components/container/editForm/Container.edit.display.d.ts +5 -0
- package/lib/cjs/components/container/editForm/Container.edit.display.js +20 -0
- package/lib/cjs/components/container/fixtures/comp1.d.ts +49 -0
- package/lib/cjs/components/container/fixtures/comp1.js +82 -0
- package/lib/cjs/components/container/fixtures/comp2.d.ts +30 -0
- package/lib/cjs/components/container/fixtures/comp2.js +34 -0
- package/lib/cjs/components/container/fixtures/comp3.d.ts +77 -0
- package/lib/cjs/components/container/fixtures/comp3.js +57 -0
- package/lib/cjs/components/container/fixtures/index.d.ts +4 -0
- package/lib/cjs/components/container/fixtures/index.js +12 -0
- package/lib/cjs/components/content/Content.d.ts +15 -0
- package/lib/cjs/components/content/Content.form.d.ts +3 -0
- package/lib/cjs/components/content/Content.form.js +43 -0
- package/lib/cjs/components/content/Content.js +76 -0
- package/lib/cjs/components/content/editForm/Content.edit.display.d.ts +18 -0
- package/lib/cjs/components/content/editForm/Content.edit.display.js +48 -0
- package/lib/cjs/components/content/editForm/Content.edit.logic.d.ts +48 -0
- package/lib/cjs/components/content/editForm/Content.edit.logic.js +100 -0
- package/lib/cjs/components/content/fixtures/comp1.d.ts +13 -0
- package/lib/cjs/components/content/fixtures/comp1.js +14 -0
- package/lib/cjs/components/content/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/content/fixtures/index.js +8 -0
- package/lib/cjs/components/currency/Currency.d.ts +8 -0
- package/lib/cjs/components/currency/Currency.form.d.ts +3 -0
- package/lib/cjs/components/currency/Currency.form.js +46 -0
- package/lib/cjs/components/currency/Currency.js +180 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +17 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.data.js +188 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.d.ts +18 -0
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +36 -0
- package/lib/cjs/components/currency/fixtures/comp1.d.ts +31 -0
- package/lib/cjs/components/currency/fixtures/comp1.js +31 -0
- package/lib/cjs/components/currency/fixtures/comp2.d.ts +20 -0
- package/lib/cjs/components/currency/fixtures/comp2.js +20 -0
- package/lib/cjs/components/currency/fixtures/comp3.d.ts +13 -0
- package/lib/cjs/components/currency/fixtures/comp3.js +14 -0
- package/lib/cjs/components/currency/fixtures/comp4.d.ts +17 -0
- package/lib/cjs/components/currency/fixtures/comp4.js +20 -0
- package/lib/cjs/components/currency/fixtures/index.d.ts +5 -0
- package/lib/cjs/components/currency/fixtures/index.js +14 -0
- package/lib/cjs/components/currency/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/currency/fixtures/values.js +8 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +87 -0
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +3 -0
- package/lib/cjs/components/datagrid/DataGrid.form.js +26 -0
- package/lib/cjs/components/datagrid/DataGrid.js +646 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +5 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.js +8 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +283 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.js +149 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +20 -0
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.js +26 -0
- package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +37 -0
- package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.js +42 -0
- package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
- package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.js +1 -0
- package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +63 -0
- package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.js +81 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +76 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.js +75 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +197 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.js +178 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.d.ts +61 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.js +69 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-logic.d.ts +165 -0
- package/lib/cjs/components/datagrid/fixtures/comp-with-logic.js +180 -0
- package/lib/cjs/components/datagrid/fixtures/comp1.d.ts +93 -0
- package/lib/cjs/components/datagrid/fixtures/comp1.js +115 -0
- package/lib/cjs/components/datagrid/fixtures/comp2.d.ts +18 -0
- package/lib/cjs/components/datagrid/fixtures/comp2.js +29 -0
- package/lib/cjs/components/datagrid/fixtures/comp3.d.ts +14 -0
- package/lib/cjs/components/datagrid/fixtures/comp3.js +23 -0
- package/lib/cjs/components/datagrid/fixtures/comp4.d.ts +27 -0
- package/lib/cjs/components/datagrid/fixtures/comp4.js +28 -0
- package/lib/cjs/components/datagrid/fixtures/comp5.d.ts +67 -0
- package/lib/cjs/components/datagrid/fixtures/comp5.js +77 -0
- package/lib/cjs/components/datagrid/fixtures/comp6.d.ts +567 -0
- package/lib/cjs/components/datagrid/fixtures/comp6.js +296 -0
- package/lib/cjs/components/datagrid/fixtures/comp7.d.ts +28 -0
- package/lib/cjs/components/datagrid/fixtures/comp7.js +35 -0
- package/lib/cjs/components/datagrid/fixtures/comp8.d.ts +35 -0
- package/lib/cjs/components/datagrid/fixtures/comp8.js +37 -0
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +15 -0
- package/lib/cjs/components/datagrid/fixtures/index.js +34 -0
- package/lib/cjs/components/datamap/DataMap.d.ts +35 -0
- package/lib/cjs/components/datamap/DataMap.form.d.ts +3 -0
- package/lib/cjs/components/datamap/DataMap.form.js +21 -0
- package/lib/cjs/components/datamap/DataMap.js +297 -0
- package/lib/cjs/components/datamap/editForm/DataMap.edit.data.d.ts +5 -0
- package/lib/cjs/components/datamap/editForm/DataMap.edit.data.js +12 -0
- package/lib/cjs/components/datamap/editForm/DataMap.edit.display.d.ts +30 -0
- package/lib/cjs/components/datamap/editForm/DataMap.edit.display.js +48 -0
- package/lib/cjs/components/datamap/fixtures/comp1.d.ts +18 -0
- package/lib/cjs/components/datamap/fixtures/comp1.js +15 -0
- package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +87 -0
- package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.js +85 -0
- package/lib/cjs/components/datamap/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/datamap/fixtures/index.js +10 -0
- package/lib/cjs/components/datetime/DateTime.d.ts +16 -0
- package/lib/cjs/components/datetime/DateTime.form.d.ts +3 -0
- package/lib/cjs/components/datetime/DateTime.form.js +40 -0
- package/lib/cjs/components/datetime/DateTime.js +145 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.data.d.ts +24 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.data.js +23 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +61 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +75 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.display.d.ts +128 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +100 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.d.ts +9 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +36 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +40 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +84 -0
- package/lib/cjs/components/datetime/fixtures/comp1.d.ts +45 -0
- package/lib/cjs/components/datetime/fixtures/comp1.js +44 -0
- package/lib/cjs/components/datetime/fixtures/comp10.d.ts +102 -0
- package/lib/cjs/components/datetime/fixtures/comp10.js +86 -0
- package/lib/cjs/components/datetime/fixtures/comp11.d.ts +58 -0
- package/lib/cjs/components/datetime/fixtures/comp11.js +55 -0
- package/lib/cjs/components/datetime/fixtures/comp12.d.ts +57 -0
- package/lib/cjs/components/datetime/fixtures/comp12.js +55 -0
- package/lib/cjs/components/datetime/fixtures/comp2.d.ts +42 -0
- package/lib/cjs/components/datetime/fixtures/comp2.js +43 -0
- package/lib/cjs/components/datetime/fixtures/comp3.d.ts +51 -0
- package/lib/cjs/components/datetime/fixtures/comp3.js +40 -0
- package/lib/cjs/components/datetime/fixtures/comp5.d.ts +57 -0
- package/lib/cjs/components/datetime/fixtures/comp5.js +48 -0
- package/lib/cjs/components/datetime/fixtures/comp6.d.ts +55 -0
- package/lib/cjs/components/datetime/fixtures/comp6.js +49 -0
- package/lib/cjs/components/datetime/fixtures/comp7.d.ts +59 -0
- package/lib/cjs/components/datetime/fixtures/comp7.js +53 -0
- package/lib/cjs/components/datetime/fixtures/comp8.d.ts +59 -0
- package/lib/cjs/components/datetime/fixtures/comp8.js +52 -0
- package/lib/cjs/components/datetime/fixtures/comp9.d.ts +64 -0
- package/lib/cjs/components/datetime/fixtures/comp9.js +95 -0
- package/lib/cjs/components/datetime/fixtures/index.d.ts +12 -0
- package/lib/cjs/components/datetime/fixtures/index.js +28 -0
- package/lib/cjs/components/datetime/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/datetime/fixtures/values.js +6 -0
- package/lib/cjs/components/day/Day.d.ts +143 -0
- package/lib/cjs/components/day/Day.form.d.ts +3 -0
- package/lib/cjs/components/day/Day.form.js +47 -0
- package/lib/cjs/components/day/Day.js +535 -0
- package/lib/cjs/components/day/editForm/Day.edit.data.d.ts +5 -0
- package/lib/cjs/components/day/editForm/Day.edit.data.js +8 -0
- package/lib/cjs/components/day/editForm/Day.edit.day.d.ts +40 -0
- package/lib/cjs/components/day/editForm/Day.edit.day.js +48 -0
- package/lib/cjs/components/day/editForm/Day.edit.display.d.ts +40 -0
- package/lib/cjs/components/day/editForm/Day.edit.display.js +46 -0
- package/lib/cjs/components/day/editForm/Day.edit.month.d.ts +40 -0
- package/lib/cjs/components/day/editForm/Day.edit.month.js +40 -0
- package/lib/cjs/components/day/editForm/Day.edit.validation.d.ts +29 -0
- package/lib/cjs/components/day/editForm/Day.edit.validation.js +54 -0
- package/lib/cjs/components/day/editForm/Day.edit.year.d.ts +40 -0
- package/lib/cjs/components/day/editForm/Day.edit.year.js +58 -0
- package/lib/cjs/components/day/fixtures/comp1.d.ts +46 -0
- package/lib/cjs/components/day/fixtures/comp1.js +39 -0
- package/lib/cjs/components/day/fixtures/comp2.d.ts +46 -0
- package/lib/cjs/components/day/fixtures/comp2.js +39 -0
- package/lib/cjs/components/day/fixtures/comp3.d.ts +48 -0
- package/lib/cjs/components/day/fixtures/comp3.js +41 -0
- package/lib/cjs/components/day/fixtures/comp4.d.ts +53 -0
- package/lib/cjs/components/day/fixtures/comp4.js +56 -0
- package/lib/cjs/components/day/fixtures/index.d.ts +5 -0
- package/lib/cjs/components/day/fixtures/index.js +14 -0
- package/lib/cjs/components/day/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/day/fixtures/values.js +6 -0
- package/lib/cjs/components/editgrid/EditGrid.d.ts +98 -0
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +3 -0
- package/lib/cjs/components/editgrid/EditGrid.form.js +33 -0
- package/lib/cjs/components/editgrid/EditGrid.js +1162 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +18 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.js +20 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +82 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +58 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +58 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +131 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +29 -0
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.js +34 -0
- package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +34 -0
- package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.js +36 -0
- package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +327 -0
- package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.js +220 -0
- package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +77 -0
- package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.js +84 -0
- package/lib/cjs/components/editgrid/fixtures/comp1.d.ts +89 -0
- package/lib/cjs/components/editgrid/fixtures/comp1.js +128 -0
- package/lib/cjs/components/editgrid/fixtures/comp10.d.ts +49 -0
- package/lib/cjs/components/editgrid/fixtures/comp10.js +48 -0
- package/lib/cjs/components/editgrid/fixtures/comp11.d.ts +53 -0
- package/lib/cjs/components/editgrid/fixtures/comp11.js +50 -0
- package/lib/cjs/components/editgrid/fixtures/comp12.d.ts +57 -0
- package/lib/cjs/components/editgrid/fixtures/comp12.js +50 -0
- package/lib/cjs/components/editgrid/fixtures/comp13.d.ts +64 -0
- package/lib/cjs/components/editgrid/fixtures/comp13.js +64 -0
- package/lib/cjs/components/editgrid/fixtures/comp14.d.ts +88 -0
- package/lib/cjs/components/editgrid/fixtures/comp14.js +84 -0
- package/lib/cjs/components/editgrid/fixtures/comp2.d.ts +112 -0
- package/lib/cjs/components/editgrid/fixtures/comp2.js +114 -0
- package/lib/cjs/components/editgrid/fixtures/comp3.d.ts +27 -0
- package/lib/cjs/components/editgrid/fixtures/comp3.js +28 -0
- package/lib/cjs/components/editgrid/fixtures/comp4.d.ts +23 -0
- package/lib/cjs/components/editgrid/fixtures/comp4.js +24 -0
- package/lib/cjs/components/editgrid/fixtures/comp5.d.ts +19 -0
- package/lib/cjs/components/editgrid/fixtures/comp5.js +22 -0
- package/lib/cjs/components/editgrid/fixtures/comp6.d.ts +50 -0
- package/lib/cjs/components/editgrid/fixtures/comp6.js +58 -0
- package/lib/cjs/components/editgrid/fixtures/comp7.d.ts +129 -0
- package/lib/cjs/components/editgrid/fixtures/comp7.js +123 -0
- package/lib/cjs/components/editgrid/fixtures/comp8.d.ts +148 -0
- package/lib/cjs/components/editgrid/fixtures/comp8.js +156 -0
- package/lib/cjs/components/editgrid/fixtures/comp9.d.ts +86 -0
- package/lib/cjs/components/editgrid/fixtures/comp9.js +62 -0
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +17 -0
- package/lib/cjs/components/editgrid/fixtures/index.js +38 -0
- package/lib/cjs/components/email/Email.d.ts +4 -0
- package/lib/cjs/components/email/Email.form.d.ts +3 -0
- package/lib/cjs/components/email/Email.form.js +21 -0
- package/lib/cjs/components/email/Email.js +54 -0
- package/lib/cjs/components/email/editForm/Email.edit.display.d.ts +5 -0
- package/lib/cjs/components/email/editForm/Email.edit.display.js +20 -0
- package/lib/cjs/components/email/editForm/Email.edit.validation.d.ts +24 -0
- package/lib/cjs/components/email/editForm/Email.edit.validation.js +28 -0
- package/lib/cjs/components/email/fixtures/comp1.d.ts +26 -0
- package/lib/cjs/components/email/fixtures/comp1.js +26 -0
- package/lib/cjs/components/email/fixtures/comp2.d.ts +23 -0
- package/lib/cjs/components/email/fixtures/comp2.js +13 -0
- package/lib/cjs/components/email/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/email/fixtures/index.js +10 -0
- package/lib/cjs/components/email/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/email/fixtures/values.js +6 -0
- package/lib/cjs/components/fieldset/Fieldset.d.ts +13 -0
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +3 -0
- package/lib/cjs/components/fieldset/Fieldset.form.js +16 -0
- package/lib/cjs/components/fieldset/Fieldset.js +43 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +33 -0
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +44 -0
- package/lib/cjs/components/fieldset/fixtures/comp1.d.ts +46 -0
- package/lib/cjs/components/fieldset/fixtures/comp1.js +81 -0
- package/lib/cjs/components/fieldset/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/fieldset/fixtures/index.js +8 -0
- package/lib/cjs/components/file/File.d.ts +59 -0
- package/lib/cjs/components/file/File.form.d.ts +3 -0
- package/lib/cjs/components/file/File.form.js +33 -0
- package/lib/cjs/components/file/File.js +752 -0
- package/lib/cjs/components/file/editForm/File.edit.data.d.ts +5 -0
- package/lib/cjs/components/file/editForm/File.edit.data.js +8 -0
- package/lib/cjs/components/file/editForm/File.edit.display.d.ts +5 -0
- package/lib/cjs/components/file/editForm/File.edit.display.js +8 -0
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +213 -0
- package/lib/cjs/components/file/editForm/File.edit.file.js +261 -0
- package/lib/cjs/components/file/editForm/File.edit.validation.d.ts +5 -0
- package/lib/cjs/components/file/editForm/File.edit.validation.js +12 -0
- package/lib/cjs/components/file/fixtures/comp1.d.ts +15 -0
- package/lib/cjs/components/file/fixtures/comp1.js +18 -0
- package/lib/cjs/components/file/fixtures/comp2.d.ts +35 -0
- package/lib/cjs/components/file/fixtures/comp2.js +31 -0
- package/lib/cjs/components/file/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/file/fixtures/index.js +10 -0
- package/lib/cjs/components/file/fixtures/values.d.ts +10 -0
- package/lib/cjs/components/file/fixtures/values.js +15 -0
- package/lib/cjs/components/form/Form.d.ts +94 -0
- package/lib/cjs/components/form/Form.form.d.ts +3 -0
- package/lib/cjs/components/form/Form.form.js +30 -0
- package/lib/cjs/components/form/Form.js +727 -0
- package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +82 -0
- package/lib/cjs/components/form/editForm/Form.edit.data.js +21 -0
- package/lib/cjs/components/form/editForm/Form.edit.display.d.ts +5 -0
- package/lib/cjs/components/form/editForm/Form.edit.display.js +29 -0
- package/lib/cjs/components/form/editForm/Form.edit.form.d.ts +89 -0
- package/lib/cjs/components/form/editForm/Form.edit.form.js +75 -0
- package/lib/cjs/components/form/fixtures/comp1.d.ts +45 -0
- package/lib/cjs/components/form/fixtures/comp1.js +80 -0
- package/lib/cjs/components/form/fixtures/comp2.d.ts +14 -0
- package/lib/cjs/components/form/fixtures/comp2.js +15 -0
- package/lib/cjs/components/form/fixtures/comp3.d.ts +187 -0
- package/lib/cjs/components/form/fixtures/comp3.js +170 -0
- package/lib/cjs/components/form/fixtures/comp4.d.ts +107 -0
- package/lib/cjs/components/form/fixtures/comp4.js +91 -0
- package/lib/cjs/components/form/fixtures/comp5.d.ts +42 -0
- package/lib/cjs/components/form/fixtures/comp5.js +45 -0
- package/lib/cjs/components/form/fixtures/comp6.d.ts +74 -0
- package/lib/cjs/components/form/fixtures/comp6.js +94 -0
- package/lib/cjs/components/form/fixtures/formModalEdit.d.ts +42 -0
- package/lib/cjs/components/form/fixtures/formModalEdit.js +51 -0
- package/lib/cjs/components/form/fixtures/index.d.ts +8 -0
- package/lib/cjs/components/form/fixtures/index.js +20 -0
- package/lib/cjs/components/form/fixtures/values.d.ts +6 -0
- package/lib/cjs/components/form/fixtures/values.js +9 -0
- package/lib/cjs/components/hidden/Hidden.d.ts +25 -0
- package/lib/cjs/components/hidden/Hidden.form.d.ts +3 -0
- package/lib/cjs/components/hidden/Hidden.form.js +29 -0
- package/lib/cjs/components/hidden/Hidden.js +60 -0
- package/lib/cjs/components/hidden/editForm/Hidden.edit.data.d.ts +5 -0
- package/lib/cjs/components/hidden/editForm/Hidden.edit.data.js +16 -0
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.d.ts +5 -0
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +44 -0
- package/lib/cjs/components/hidden/fixtures/comp1.d.ts +18 -0
- package/lib/cjs/components/hidden/fixtures/comp1.js +18 -0
- package/lib/cjs/components/hidden/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/hidden/fixtures/index.js +8 -0
- package/lib/cjs/components/hidden/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/hidden/fixtures/values.js +6 -0
- package/lib/cjs/components/html/HTML.d.ts +16 -0
- package/lib/cjs/components/html/HTML.form.d.ts +3 -0
- package/lib/cjs/components/html/HTML.form.js +29 -0
- package/lib/cjs/components/html/HTML.js +89 -0
- package/lib/cjs/components/html/editForm/HTML.edit.display.d.ts +77 -0
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +100 -0
- package/lib/cjs/components/html/editForm/HTML.edit.logic.d.ts +48 -0
- package/lib/cjs/components/html/editForm/HTML.edit.logic.js +100 -0
- package/lib/cjs/components/html/fixtures/comp1.d.ts +19 -0
- package/lib/cjs/components/html/fixtures/comp1.js +22 -0
- package/lib/cjs/components/html/fixtures/comp2.d.ts +21 -0
- package/lib/cjs/components/html/fixtures/comp2.js +24 -0
- package/lib/cjs/components/html/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/html/fixtures/index.js +10 -0
- package/lib/cjs/components/index.d.ts +100 -0
- package/lib/cjs/components/index.js +104 -0
- package/lib/cjs/components/number/Number.d.ts +31 -0
- package/lib/cjs/components/number/Number.form.d.ts +3 -0
- package/lib/cjs/components/number/Number.form.js +26 -0
- package/lib/cjs/components/number/Number.js +192 -0
- package/lib/cjs/components/number/editForm/Number.edit.data.d.ts +18 -0
- package/lib/cjs/components/number/editForm/Number.edit.data.js +32 -0
- package/lib/cjs/components/number/editForm/Number.edit.display.d.ts +5 -0
- package/lib/cjs/components/number/editForm/Number.edit.display.js +24 -0
- package/lib/cjs/components/number/editForm/Number.edit.validation.d.ts +20 -0
- package/lib/cjs/components/number/editForm/Number.edit.validation.js +46 -0
- package/lib/cjs/components/number/fixtures/comp1.d.ts +33 -0
- package/lib/cjs/components/number/fixtures/comp1.js +32 -0
- package/lib/cjs/components/number/fixtures/comp2.d.ts +32 -0
- package/lib/cjs/components/number/fixtures/comp2.js +31 -0
- package/lib/cjs/components/number/fixtures/comp3.d.ts +14 -0
- package/lib/cjs/components/number/fixtures/comp3.js +15 -0
- package/lib/cjs/components/number/fixtures/comp4.d.ts +14 -0
- package/lib/cjs/components/number/fixtures/comp4.js +15 -0
- package/lib/cjs/components/number/fixtures/comp5.d.ts +20 -0
- package/lib/cjs/components/number/fixtures/comp5.js +20 -0
- package/lib/cjs/components/number/fixtures/comp6.d.ts +40 -0
- package/lib/cjs/components/number/fixtures/comp6.js +27 -0
- package/lib/cjs/components/number/fixtures/comp7.d.ts +15 -0
- package/lib/cjs/components/number/fixtures/comp7.js +16 -0
- package/lib/cjs/components/number/fixtures/index.d.ts +8 -0
- package/lib/cjs/components/number/fixtures/index.js +20 -0
- package/lib/cjs/components/number/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/number/fixtures/values.js +11 -0
- package/lib/cjs/components/panel/Panel.d.ts +14 -0
- package/lib/cjs/components/panel/Panel.form.d.ts +3 -0
- package/lib/cjs/components/panel/Panel.form.js +21 -0
- package/lib/cjs/components/panel/Panel.js +59 -0
- package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +75 -0
- package/lib/cjs/components/panel/editForm/Panel.edit.conditional.js +42 -0
- package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +228 -0
- package/lib/cjs/components/panel/editForm/Panel.edit.display.js +213 -0
- package/lib/cjs/components/panel/fixtures/comp1.d.ts +46 -0
- package/lib/cjs/components/panel/fixtures/comp1.js +80 -0
- package/lib/cjs/components/panel/fixtures/comp2.d.ts +80 -0
- package/lib/cjs/components/panel/fixtures/comp2.js +69 -0
- package/lib/cjs/components/panel/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/panel/fixtures/index.js +10 -0
- package/lib/cjs/components/password/Password.d.ts +3 -0
- package/lib/cjs/components/password/Password.form.d.ts +3 -0
- package/lib/cjs/components/password/Password.form.js +26 -0
- package/lib/cjs/components/password/Password.js +40 -0
- package/lib/cjs/components/password/editForm/Password.edit.data.d.ts +18 -0
- package/lib/cjs/components/password/editForm/Password.edit.data.js +48 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.d.ts +5 -0
- package/lib/cjs/components/password/editForm/Password.edit.display.js +16 -0
- package/lib/cjs/components/password/editForm/Password.edit.validation.d.ts +5 -0
- package/lib/cjs/components/password/editForm/Password.edit.validation.js +16 -0
- package/lib/cjs/components/password/fixtures/comp1.d.ts +22 -0
- package/lib/cjs/components/password/fixtures/comp1.js +22 -0
- package/lib/cjs/components/password/fixtures/comp2.d.ts +27 -0
- package/lib/cjs/components/password/fixtures/comp2.js +29 -0
- package/lib/cjs/components/password/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/password/fixtures/index.js +10 -0
- package/lib/cjs/components/password/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/password/fixtures/values.js +6 -0
- package/lib/cjs/components/phonenumber/PhoneNumber.d.ts +3 -0
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +3 -0
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +29 -0
- package/lib/cjs/components/phonenumber/PhoneNumber.js +33 -0
- package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +5 -0
- package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +24 -0
- package/lib/cjs/components/phonenumber/fixtures/comp1.d.ts +27 -0
- package/lib/cjs/components/phonenumber/fixtures/comp1.js +27 -0
- package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/phonenumber/fixtures/index.js +8 -0
- package/lib/cjs/components/phonenumber/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/phonenumber/fixtures/values.js +6 -0
- package/lib/cjs/components/radio/Radio.d.ts +44 -0
- package/lib/cjs/components/radio/Radio.form.d.ts +3 -0
- package/lib/cjs/components/radio/Radio.form.js +26 -0
- package/lib/cjs/components/radio/Radio.js +295 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.data.d.ts +134 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.data.js +85 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.display.d.ts +40 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.display.js +34 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.validation.d.ts +18 -0
- package/lib/cjs/components/radio/editForm/Radio.edit.validation.js +20 -0
- package/lib/cjs/components/radio/fixtures/comp1.d.ts +28 -0
- package/lib/cjs/components/radio/fixtures/comp1.js +42 -0
- package/lib/cjs/components/radio/fixtures/comp2.d.ts +85 -0
- package/lib/cjs/components/radio/fixtures/comp2.js +86 -0
- package/lib/cjs/components/radio/fixtures/comp3.d.ts +85 -0
- package/lib/cjs/components/radio/fixtures/comp3.js +90 -0
- package/lib/cjs/components/radio/fixtures/comp4.d.ts +19 -0
- package/lib/cjs/components/radio/fixtures/comp4.js +27 -0
- package/lib/cjs/components/radio/fixtures/comp5.d.ts +39 -0
- package/lib/cjs/components/radio/fixtures/comp5.js +35 -0
- package/lib/cjs/components/radio/fixtures/comp6.d.ts +38 -0
- package/lib/cjs/components/radio/fixtures/comp6.js +33 -0
- package/lib/cjs/components/radio/fixtures/comp7.d.ts +23 -0
- package/lib/cjs/components/radio/fixtures/comp7.js +21 -0
- package/lib/cjs/components/radio/fixtures/comp8.d.ts +118 -0
- package/lib/cjs/components/radio/fixtures/comp8.js +113 -0
- package/lib/cjs/components/radio/fixtures/comp9.d.ts +35 -0
- package/lib/cjs/components/radio/fixtures/comp9.js +32 -0
- package/lib/cjs/components/radio/fixtures/index.d.ts +10 -0
- package/lib/cjs/components/radio/fixtures/index.js +24 -0
- package/lib/cjs/components/radio/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/radio/fixtures/values.js +7 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +22 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +32 -0
- package/lib/cjs/components/recaptcha/ReCaptcha.js +140 -0
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +44 -0
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +108 -0
- package/lib/cjs/components/recaptcha/fixtures/comp1.d.ts +8 -0
- package/lib/cjs/components/recaptcha/fixtures/comp1.js +9 -0
- package/lib/cjs/components/recaptcha/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/recaptcha/fixtures/index.js +8 -0
- package/lib/cjs/components/resource/Resource.d.ts +3 -0
- package/lib/cjs/components/resource/Resource.form.d.ts +3 -0
- package/lib/cjs/components/resource/Resource.form.js +16 -0
- package/lib/cjs/components/resource/Resource.js +40 -0
- package/lib/cjs/components/resource/editForm/Resource.edit.display.d.ts +173 -0
- package/lib/cjs/components/resource/editForm/Resource.edit.display.js +102 -0
- package/lib/cjs/components/resource/fixtures/comp1.d.ts +30 -0
- package/lib/cjs/components/resource/fixtures/comp1.js +30 -0
- package/lib/cjs/components/resource/fixtures/comp2.d.ts +35 -0
- package/lib/cjs/components/resource/fixtures/comp2.js +31 -0
- package/lib/cjs/components/resource/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/resource/fixtures/index.js +10 -0
- package/lib/cjs/components/select/Select.d.ts +122 -0
- package/lib/cjs/components/select/Select.form.d.ts +3 -0
- package/lib/cjs/components/select/Select.form.js +26 -0
- package/lib/cjs/components/select/Select.js +1463 -0
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1039 -0
- package/lib/cjs/components/select/editForm/Select.edit.data.js +629 -0
- package/lib/cjs/components/select/editForm/Select.edit.display.d.ts +27 -0
- package/lib/cjs/components/select/editForm/Select.edit.display.js +28 -0
- package/lib/cjs/components/select/editForm/Select.edit.validation.d.ts +30 -0
- package/lib/cjs/components/select/editForm/Select.edit.validation.js +35 -0
- package/lib/cjs/components/select/fixtures/comp1.d.ts +40 -0
- package/lib/cjs/components/select/fixtures/comp1.js +66 -0
- package/lib/cjs/components/select/fixtures/comp10.d.ts +41 -0
- package/lib/cjs/components/select/fixtures/comp10.js +32 -0
- package/lib/cjs/components/select/fixtures/comp11.d.ts +28 -0
- package/lib/cjs/components/select/fixtures/comp11.js +24 -0
- package/lib/cjs/components/select/fixtures/comp12.d.ts +53 -0
- package/lib/cjs/components/select/fixtures/comp12.js +29 -0
- package/lib/cjs/components/select/fixtures/comp13.d.ts +28 -0
- package/lib/cjs/components/select/fixtures/comp13.js +31 -0
- package/lib/cjs/components/select/fixtures/comp14.d.ts +40 -0
- package/lib/cjs/components/select/fixtures/comp14.js +27 -0
- package/lib/cjs/components/select/fixtures/comp15.d.ts +50 -0
- package/lib/cjs/components/select/fixtures/comp15.js +41 -0
- package/lib/cjs/components/select/fixtures/comp16.d.ts +34 -0
- package/lib/cjs/components/select/fixtures/comp16.js +33 -0
- package/lib/cjs/components/select/fixtures/comp17.d.ts +51 -0
- package/lib/cjs/components/select/fixtures/comp17.js +43 -0
- package/lib/cjs/components/select/fixtures/comp18.d.ts +49 -0
- package/lib/cjs/components/select/fixtures/comp18.js +42 -0
- package/lib/cjs/components/select/fixtures/comp2.d.ts +41 -0
- package/lib/cjs/components/select/fixtures/comp2.js +67 -0
- package/lib/cjs/components/select/fixtures/comp3.d.ts +35 -0
- package/lib/cjs/components/select/fixtures/comp3.js +209 -0
- package/lib/cjs/components/select/fixtures/comp4.d.ts +103 -0
- package/lib/cjs/components/select/fixtures/comp4.js +106 -0
- package/lib/cjs/components/select/fixtures/comp5.d.ts +21 -0
- package/lib/cjs/components/select/fixtures/comp5.js +28 -0
- package/lib/cjs/components/select/fixtures/comp6.d.ts +20 -0
- package/lib/cjs/components/select/fixtures/comp6.js +30 -0
- package/lib/cjs/components/select/fixtures/comp7.d.ts +63 -0
- package/lib/cjs/components/select/fixtures/comp7.js +46 -0
- package/lib/cjs/components/select/fixtures/comp8.d.ts +72 -0
- package/lib/cjs/components/select/fixtures/comp8.js +37 -0
- package/lib/cjs/components/select/fixtures/comp9.d.ts +88 -0
- package/lib/cjs/components/select/fixtures/comp9.js +67 -0
- package/lib/cjs/components/select/fixtures/index.d.ts +19 -0
- package/lib/cjs/components/select/fixtures/index.js +43 -0
- package/lib/cjs/components/select/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/select/fixtures/values.js +7 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +15 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +3 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.form.js +25 -0
- package/lib/cjs/components/selectboxes/SelectBoxes.js +214 -0
- package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +9 -0
- package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +36 -0
- package/lib/cjs/components/selectboxes/fixtures/comp1.d.ts +24 -0
- package/lib/cjs/components/selectboxes/fixtures/comp1.js +54 -0
- package/lib/cjs/components/selectboxes/fixtures/comp2.d.ts +24 -0
- package/lib/cjs/components/selectboxes/fixtures/comp2.js +54 -0
- package/lib/cjs/components/selectboxes/fixtures/comp3.d.ts +23 -0
- package/lib/cjs/components/selectboxes/fixtures/comp3.js +21 -0
- package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +63 -0
- package/lib/cjs/components/selectboxes/fixtures/comp4.js +66 -0
- package/lib/cjs/components/selectboxes/fixtures/comp5.d.ts +37 -0
- package/lib/cjs/components/selectboxes/fixtures/comp5.js +33 -0
- package/lib/cjs/components/selectboxes/fixtures/index.d.ts +6 -0
- package/lib/cjs/components/selectboxes/fixtures/index.js +16 -0
- package/lib/cjs/components/selectboxes/fixtures/values.d.ts +6 -0
- package/lib/cjs/components/selectboxes/fixtures/values.js +24 -0
- package/lib/cjs/components/signature/Signature.d.ts +26 -0
- package/lib/cjs/components/signature/Signature.form.d.ts +3 -0
- package/lib/cjs/components/signature/Signature.form.js +26 -0
- package/lib/cjs/components/signature/Signature.js +247 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.data.d.ts +5 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.data.js +16 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +51 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +71 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.validation.d.ts +5 -0
- package/lib/cjs/components/signature/editForm/Signature.edit.validation.js +12 -0
- package/lib/cjs/components/signature/fixtures/comp1.d.ts +30 -0
- package/lib/cjs/components/signature/fixtures/comp1.js +30 -0
- package/lib/cjs/components/signature/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/signature/fixtures/index.js +8 -0
- package/lib/cjs/components/signature/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/signature/fixtures/values.js +7 -0
- package/lib/cjs/components/survey/Survey.d.ts +16 -0
- package/lib/cjs/components/survey/Survey.form.d.ts +3 -0
- package/lib/cjs/components/survey/Survey.form.js +26 -0
- package/lib/cjs/components/survey/Survey.js +147 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.data.d.ts +44 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.data.js +72 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.display.d.ts +5 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.display.js +8 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.validation.d.ts +5 -0
- package/lib/cjs/components/survey/editForm/Survey.edit.validation.js +8 -0
- package/lib/cjs/components/survey/fixtures/comp1.d.ts +31 -0
- package/lib/cjs/components/survey/fixtures/comp1.js +55 -0
- package/lib/cjs/components/survey/fixtures/comp2.d.ts +31 -0
- package/lib/cjs/components/survey/fixtures/comp2.js +55 -0
- package/lib/cjs/components/survey/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/survey/fixtures/index.js +10 -0
- package/lib/cjs/components/survey/fixtures/values.d.ts +5 -0
- package/lib/cjs/components/survey/fixtures/values.js +12 -0
- package/lib/cjs/components/table/Table.d.ts +21 -0
- package/lib/cjs/components/table/Table.form.d.ts +3 -0
- package/lib/cjs/components/table/Table.form.js +16 -0
- package/lib/cjs/components/table/Table.js +171 -0
- package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +55 -0
- package/lib/cjs/components/table/editForm/Table.edit.display.js +111 -0
- package/lib/cjs/components/table/fixtures/comp1.d.ts +53 -0
- package/lib/cjs/components/table/fixtures/comp1.js +237 -0
- package/lib/cjs/components/table/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/table/fixtures/index.js +8 -0
- package/lib/cjs/components/tabs/Tabs.d.ts +28 -0
- package/lib/cjs/components/tabs/Tabs.form.d.ts +3 -0
- package/lib/cjs/components/tabs/Tabs.form.js +16 -0
- package/lib/cjs/components/tabs/Tabs.js +203 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +49 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +68 -0
- package/lib/cjs/components/tabs/fixtures/comp1.d.ts +23 -0
- package/lib/cjs/components/tabs/fixtures/comp1.js +33 -0
- package/lib/cjs/components/tabs/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/tabs/fixtures/index.js +8 -0
- package/lib/cjs/components/tags/Tags.d.ts +19 -0
- package/lib/cjs/components/tags/Tags.form.d.ts +3 -0
- package/lib/cjs/components/tags/Tags.form.js +16 -0
- package/lib/cjs/components/tags/Tags.js +164 -0
- package/lib/cjs/components/tags/editForm/Tags.edit.data.d.ts +51 -0
- package/lib/cjs/components/tags/editForm/Tags.edit.data.js +39 -0
- package/lib/cjs/components/tags/fixtures/comp1.d.ts +20 -0
- package/lib/cjs/components/tags/fixtures/comp1.js +20 -0
- package/lib/cjs/components/tags/fixtures/comp2.d.ts +10 -0
- package/lib/cjs/components/tags/fixtures/comp2.js +11 -0
- package/lib/cjs/components/tags/fixtures/comp3.d.ts +23 -0
- package/lib/cjs/components/tags/fixtures/comp3.js +20 -0
- package/lib/cjs/components/tags/fixtures/comp4.d.ts +9 -0
- package/lib/cjs/components/tags/fixtures/comp4.js +10 -0
- package/lib/cjs/components/tags/fixtures/comp5.d.ts +24 -0
- package/lib/cjs/components/tags/fixtures/comp5.js +24 -0
- package/lib/cjs/components/tags/fixtures/index.d.ts +6 -0
- package/lib/cjs/components/tags/fixtures/index.js +16 -0
- package/lib/cjs/components/tags/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/tags/fixtures/values.js +6 -0
- package/lib/cjs/components/textarea/TextArea.d.ts +36 -0
- package/lib/cjs/components/textarea/TextArea.form.d.ts +3 -0
- package/lib/cjs/components/textarea/TextArea.form.js +21 -0
- package/lib/cjs/components/textarea/TextArea.js +538 -0
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +355 -0
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +263 -0
- package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.d.ts +10 -0
- package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.js +22 -0
- package/lib/cjs/components/textarea/fixtures/comp1.d.ts +31 -0
- package/lib/cjs/components/textarea/fixtures/comp1.js +31 -0
- package/lib/cjs/components/textarea/fixtures/comp2.d.ts +29 -0
- package/lib/cjs/components/textarea/fixtures/comp2.js +29 -0
- package/lib/cjs/components/textarea/fixtures/comp3.d.ts +27 -0
- package/lib/cjs/components/textarea/fixtures/comp3.js +29 -0
- package/lib/cjs/components/textarea/fixtures/index.d.ts +4 -0
- package/lib/cjs/components/textarea/fixtures/index.js +12 -0
- package/lib/cjs/components/textarea/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/textarea/fixtures/values.js +6 -0
- package/lib/cjs/components/textfield/TextField.d.ts +38 -0
- package/lib/cjs/components/textfield/TextField.form.d.ts +3 -0
- package/lib/cjs/components/textfield/TextField.form.js +26 -0
- package/lib/cjs/components/textfield/TextField.js +243 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.data.d.ts +46 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.data.js +58 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.display.d.ts +248 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +208 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.validation.d.ts +10 -0
- package/lib/cjs/components/textfield/editForm/TextField.edit.validation.js +49 -0
- package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +47 -0
- package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.js +48 -0
- package/lib/cjs/components/textfield/fixtures/comp1.d.ts +33 -0
- package/lib/cjs/components/textfield/fixtures/comp1.js +33 -0
- package/lib/cjs/components/textfield/fixtures/comp2.d.ts +33 -0
- package/lib/cjs/components/textfield/fixtures/comp2.js +33 -0
- package/lib/cjs/components/textfield/fixtures/comp3.d.ts +33 -0
- package/lib/cjs/components/textfield/fixtures/comp3.js +33 -0
- package/lib/cjs/components/textfield/fixtures/comp4.d.ts +23 -0
- package/lib/cjs/components/textfield/fixtures/comp4.js +27 -0
- package/lib/cjs/components/textfield/fixtures/comp5.d.ts +12 -0
- package/lib/cjs/components/textfield/fixtures/comp5.js +13 -0
- package/lib/cjs/components/textfield/fixtures/comp6.d.ts +25 -0
- package/lib/cjs/components/textfield/fixtures/comp6.js +21 -0
- package/lib/cjs/components/textfield/fixtures/comp7.d.ts +37 -0
- package/lib/cjs/components/textfield/fixtures/comp7.js +38 -0
- package/lib/cjs/components/textfield/fixtures/index.d.ts +9 -0
- package/lib/cjs/components/textfield/fixtures/index.js +22 -0
- package/lib/cjs/components/textfield/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/textfield/fixtures/values.js +7 -0
- package/lib/cjs/components/time/Time.d.ts +16 -0
- package/lib/cjs/components/time/Time.form.d.ts +3 -0
- package/lib/cjs/components/time/Time.form.js +21 -0
- package/lib/cjs/components/time/Time.js +148 -0
- package/lib/cjs/components/time/editForm/Time.edit.data.d.ts +10 -0
- package/lib/cjs/components/time/editForm/Time.edit.data.js +13 -0
- package/lib/cjs/components/time/editForm/Time.edit.display.d.ts +52 -0
- package/lib/cjs/components/time/editForm/Time.edit.display.js +42 -0
- package/lib/cjs/components/time/fixtures/comp1.d.ts +24 -0
- package/lib/cjs/components/time/fixtures/comp1.js +24 -0
- package/lib/cjs/components/time/fixtures/comp2.d.ts +10 -0
- package/lib/cjs/components/time/fixtures/comp2.js +11 -0
- package/lib/cjs/components/time/fixtures/comp3.d.ts +15 -0
- package/lib/cjs/components/time/fixtures/comp3.js +18 -0
- package/lib/cjs/components/time/fixtures/index.d.ts +6 -0
- package/lib/cjs/components/time/fixtures/index.js +16 -0
- package/lib/cjs/components/time/fixtures/timeForm.d.ts +47 -0
- package/lib/cjs/components/time/fixtures/timeForm.js +52 -0
- package/lib/cjs/components/time/fixtures/timeForm2.d.ts +38 -0
- package/lib/cjs/components/time/fixtures/timeForm2.js +44 -0
- package/lib/cjs/components/time/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/time/fixtures/values.js +7 -0
- package/lib/cjs/components/tree/Node.d.ts +55 -0
- package/lib/cjs/components/tree/Node.js +185 -0
- package/lib/cjs/components/tree/Tree.d.ts +47 -0
- package/lib/cjs/components/tree/Tree.form.d.ts +3 -0
- package/lib/cjs/components/tree/Tree.form.js +16 -0
- package/lib/cjs/components/tree/Tree.js +384 -0
- package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +5 -0
- package/lib/cjs/components/tree/editForm/Tree.edit.data.js +9 -0
- package/lib/cjs/components/tree/fixtures/comp1.d.ts +23 -0
- package/lib/cjs/components/tree/fixtures/comp1.js +24 -0
- package/lib/cjs/components/tree/fixtures/comp2.d.ts +116 -0
- package/lib/cjs/components/tree/fixtures/comp2.js +82 -0
- package/lib/cjs/components/tree/fixtures/comp3.d.ts +24 -0
- package/lib/cjs/components/tree/fixtures/comp3.js +25 -0
- package/lib/cjs/components/tree/fixtures/comp4.d.ts +42 -0
- package/lib/cjs/components/tree/fixtures/comp4.js +47 -0
- package/lib/cjs/components/tree/fixtures/index.d.ts +5 -0
- package/lib/cjs/components/tree/fixtures/index.js +14 -0
- package/lib/cjs/components/unknown/Unknown.d.ts +28 -0
- package/lib/cjs/components/unknown/Unknown.form.d.ts +34 -0
- package/lib/cjs/components/unknown/Unknown.form.js +25 -0
- package/lib/cjs/components/unknown/Unknown.js +30 -0
- package/lib/cjs/components/unknown/editForm/Unknown.edit.display.d.ts +24 -0
- package/lib/cjs/components/unknown/editForm/Unknown.edit.display.js +27 -0
- package/lib/cjs/components/unknown/fixtures/comp1.d.ts +7 -0
- package/lib/cjs/components/unknown/fixtures/comp1.js +8 -0
- package/lib/cjs/components/unknown/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/unknown/fixtures/index.js +8 -0
- package/lib/cjs/components/url/Url.d.ts +3 -0
- package/lib/cjs/components/url/Url.form.d.ts +3 -0
- package/lib/cjs/components/url/Url.form.js +26 -0
- package/lib/cjs/components/url/Url.js +39 -0
- package/lib/cjs/components/url/editForm/Url.edit.data.d.ts +5 -0
- package/lib/cjs/components/url/editForm/Url.edit.data.js +8 -0
- package/lib/cjs/components/url/editForm/Url.edit.display.d.ts +5 -0
- package/lib/cjs/components/url/editForm/Url.edit.display.js +20 -0
- package/lib/cjs/components/url/editForm/Url.edit.validation.d.ts +5 -0
- package/lib/cjs/components/url/editForm/Url.edit.validation.js +12 -0
- package/lib/cjs/components/url/fixtures/comp1.d.ts +26 -0
- package/lib/cjs/components/url/fixtures/comp1.js +26 -0
- package/lib/cjs/components/url/fixtures/comp2.d.ts +26 -0
- package/lib/cjs/components/url/fixtures/comp2.js +23 -0
- package/lib/cjs/components/url/fixtures/index.d.ts +3 -0
- package/lib/cjs/components/url/fixtures/index.js +10 -0
- package/lib/cjs/components/url/fixtures/values.d.ts +2 -0
- package/lib/cjs/components/url/fixtures/values.js +6 -0
- package/lib/cjs/components/well/Well.d.ts +13 -0
- package/lib/cjs/components/well/Well.form.d.ts +3 -0
- package/lib/cjs/components/well/Well.form.js +16 -0
- package/lib/cjs/components/well/Well.js +41 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +5 -0
- package/lib/cjs/components/well/editForm/Well.edit.display.js +32 -0
- package/lib/cjs/components/well/fixtures/comp1.d.ts +43 -0
- package/lib/cjs/components/well/fixtures/comp1.js +77 -0
- package/lib/cjs/components/well/fixtures/index.d.ts +2 -0
- package/lib/cjs/components/well/fixtures/index.js +8 -0
- package/lib/cjs/displays/Displays.d.ts +18 -0
- package/lib/cjs/displays/Displays.js +29 -0
- package/lib/cjs/displays/index.d.ts +2 -0
- package/lib/cjs/displays/index.js +7 -0
- package/lib/cjs/formio.embed.d.ts +1 -0
- package/lib/cjs/formio.embed.js +4 -0
- package/lib/cjs/formio.form.d.ts +22 -0
- package/lib/cjs/formio.form.js +158 -0
- package/lib/cjs/i18n.d.ts +13 -0
- package/lib/cjs/i18n.js +19 -0
- package/lib/cjs/index.d.ts +4 -0
- package/lib/cjs/index.js +34 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/pdf.image.d.ts +2 -0
- package/lib/cjs/pdf.image.js +94 -0
- package/lib/cjs/polyfills/ElementPolyfill.d.ts +0 -0
- package/lib/cjs/polyfills/ElementPolyfill.js +338 -0
- package/lib/cjs/polyfills/index.d.ts +1 -0
- package/lib/cjs/polyfills/index.js +4 -0
- package/lib/cjs/providers/Providers.d.ts +64 -0
- package/lib/cjs/providers/Providers.js +34 -0
- package/lib/cjs/providers/address/AddressProvider.d.ts +17 -0
- package/lib/cjs/providers/address/AddressProvider.js +61 -0
- package/lib/cjs/providers/address/AzureAddressProvider.d.ts +12 -0
- package/lib/cjs/providers/address/AzureAddressProvider.js +31 -0
- package/lib/cjs/providers/address/CustomAddressProvider.d.ts +7 -0
- package/lib/cjs/providers/address/CustomAddressProvider.js +26 -0
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +18 -0
- package/lib/cjs/providers/address/GoogleAddressProvider.js +118 -0
- package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +11 -0
- package/lib/cjs/providers/address/NominatimAddressProvider.js +31 -0
- package/lib/cjs/providers/address/index.d.ts +6 -0
- package/lib/cjs/providers/address/index.js +12 -0
- package/lib/cjs/providers/auth/index.d.ts +2 -0
- package/lib/cjs/providers/auth/index.js +3 -0
- package/lib/cjs/providers/index.d.ts +2 -0
- package/lib/cjs/providers/index.js +7 -0
- package/lib/cjs/providers/processor/fileProcessor.d.ts +2 -0
- package/lib/cjs/providers/processor/fileProcessor.js +44 -0
- package/lib/cjs/providers/storage/azure.d.ts +8 -0
- package/lib/cjs/providers/storage/azure.js +30 -0
- package/lib/cjs/providers/storage/base64.d.ts +10 -0
- package/lib/cjs/providers/storage/base64.js +35 -0
- package/lib/cjs/providers/storage/dropbox.d.ts +8 -0
- package/lib/cjs/providers/storage/dropbox.js +61 -0
- package/lib/cjs/providers/storage/googleDrive.d.ts +8 -0
- package/lib/cjs/providers/storage/googleDrive.js +60 -0
- package/lib/cjs/providers/storage/index.d.ts +15 -0
- package/lib/cjs/providers/storage/index.js +19 -0
- package/lib/cjs/providers/storage/indexeddb.d.ts +11 -0
- package/lib/cjs/providers/storage/indexeddb.js +124 -0
- package/lib/cjs/providers/storage/s3.d.ts +8 -0
- package/lib/cjs/providers/storage/s3.js +50 -0
- package/lib/cjs/providers/storage/uploadAdapter.d.ts +1 -0
- package/lib/cjs/providers/storage/uploadAdapter.js +61 -0
- package/lib/cjs/providers/storage/url.d.ts +11 -0
- package/lib/cjs/providers/storage/url.js +138 -0
- package/lib/cjs/providers/storage/xhr.d.ts +7 -0
- package/lib/cjs/providers/storage/xhr.js +101 -0
- package/lib/cjs/templates/Templates.d.ts +11 -0
- package/lib/cjs/templates/Templates.js +47 -0
- package/lib/cjs/templates/index.d.ts +4 -0
- package/lib/cjs/templates/index.js +9 -0
- package/lib/cjs/translations/en.d.ts +66 -0
- package/lib/cjs/translations/en.js +67 -0
- package/lib/cjs/utils/ChoicesWrapper.d.ts +37 -0
- package/lib/cjs/utils/ChoicesWrapper.js +175 -0
- package/lib/cjs/utils/Evaluator.d.ts +4 -0
- package/lib/cjs/utils/Evaluator.js +98 -0
- package/lib/cjs/utils/builder.d.ts +22 -0
- package/lib/cjs/utils/builder.js +84 -0
- package/lib/cjs/utils/calendarUtils.d.ts +41 -0
- package/lib/cjs/utils/calendarUtils.js +136 -0
- package/lib/cjs/utils/conditionOperators/ConditionOperator.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/ConditionOperator.js +29 -0
- package/lib/cjs/utils/conditionOperators/DateGreaterThan.d.ts +13 -0
- package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +37 -0
- package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.js +18 -0
- package/lib/cjs/utils/conditionOperators/DateLessThan.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/DateLessThan.js +18 -0
- package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.js +18 -0
- package/lib/cjs/utils/conditionOperators/EndsWith.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/EndsWith.js +19 -0
- package/lib/cjs/utils/conditionOperators/GreaterThan.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/GreaterThan.js +19 -0
- package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.js +19 -0
- package/lib/cjs/utils/conditionOperators/Includes.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/Includes.js +19 -0
- package/lib/cjs/utils/conditionOperators/IsDateEqual.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/IsDateEqual.js +18 -0
- package/lib/cjs/utils/conditionOperators/IsEmptyValue.d.ts +9 -0
- package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +30 -0
- package/lib/cjs/utils/conditionOperators/IsEqualTo.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +30 -0
- package/lib/cjs/utils/conditionOperators/IsNotDateEqual.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/IsNotDateEqual.js +18 -0
- package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.js +18 -0
- package/lib/cjs/utils/conditionOperators/IsNotEqualTo.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/IsNotEqualTo.js +19 -0
- package/lib/cjs/utils/conditionOperators/LessThan.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/LessThan.js +19 -0
- package/lib/cjs/utils/conditionOperators/LessThanOrEqual.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/LessThanOrEqual.js +19 -0
- package/lib/cjs/utils/conditionOperators/NotIncludes.d.ts +4 -0
- package/lib/cjs/utils/conditionOperators/NotIncludes.js +18 -0
- package/lib/cjs/utils/conditionOperators/StartsWith.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/StartsWith.js +19 -0
- package/lib/cjs/utils/conditionOperators/index.d.ts +7 -0
- package/lib/cjs/utils/conditionOperators/index.js +44 -0
- package/lib/cjs/utils/formUtils.d.ts +173 -0
- package/lib/cjs/utils/formUtils.js +583 -0
- package/lib/cjs/utils/index.d.ts +2 -0
- package/lib/cjs/utils/index.js +30 -0
- package/lib/cjs/utils/jsonlogic/operators.d.ts +1 -0
- package/lib/cjs/utils/jsonlogic/operators.js +265 -0
- package/lib/cjs/utils/utils.d.ts +364 -0
- package/lib/cjs/utils/utils.js +1468 -0
- package/lib/cjs/validator/Rules.d.ts +53 -0
- package/lib/cjs/validator/Rules.js +22 -0
- package/lib/cjs/validator/Validator.d.ts +200 -0
- package/lib/cjs/validator/Validator.js +1090 -0
- package/lib/cjs/validator/conjunctions/index.d.ts +7 -0
- package/lib/cjs/validator/conjunctions/index.js +18 -0
- package/lib/cjs/validator/operators/index.d.ts +7 -0
- package/lib/cjs/validator/operators/index.js +18 -0
- package/lib/cjs/validator/quickRules/index.d.ts +7 -0
- package/lib/cjs/validator/quickRules/index.js +18 -0
- package/lib/cjs/validator/rules/Custom.d.ts +5 -0
- package/lib/cjs/validator/rules/Custom.js +31 -0
- package/lib/cjs/validator/rules/Date.d.ts +5 -0
- package/lib/cjs/validator/rules/Date.js +26 -0
- package/lib/cjs/validator/rules/Day.d.ts +5 -0
- package/lib/cjs/validator/rules/Day.js +59 -0
- package/lib/cjs/validator/rules/Email.d.ts +5 -0
- package/lib/cjs/validator/rules/Email.js +25 -0
- package/lib/cjs/validator/rules/JSON.d.ts +5 -0
- package/lib/cjs/validator/rules/JSON.js +30 -0
- package/lib/cjs/validator/rules/Mask.d.ts +5 -0
- package/lib/cjs/validator/rules/Mask.js +33 -0
- package/lib/cjs/validator/rules/Max.d.ts +5 -0
- package/lib/cjs/validator/rules/Max.js +22 -0
- package/lib/cjs/validator/rules/MaxDate.d.ts +5 -0
- package/lib/cjs/validator/rules/MaxDate.js +35 -0
- package/lib/cjs/validator/rules/MaxLength.d.ts +5 -0
- package/lib/cjs/validator/rules/MaxLength.js +21 -0
- package/lib/cjs/validator/rules/MaxWords.d.ts +5 -0
- package/lib/cjs/validator/rules/MaxWords.js +21 -0
- package/lib/cjs/validator/rules/MaxYear.d.ts +5 -0
- package/lib/cjs/validator/rules/MaxYear.js +23 -0
- package/lib/cjs/validator/rules/Min.d.ts +5 -0
- package/lib/cjs/validator/rules/Min.js +22 -0
- package/lib/cjs/validator/rules/MinDate.d.ts +5 -0
- package/lib/cjs/validator/rules/MinDate.js +31 -0
- package/lib/cjs/validator/rules/MinLength.d.ts +5 -0
- package/lib/cjs/validator/rules/MinLength.js +21 -0
- package/lib/cjs/validator/rules/MinWords.d.ts +5 -0
- package/lib/cjs/validator/rules/MinWords.js +21 -0
- package/lib/cjs/validator/rules/MinYear.d.ts +5 -0
- package/lib/cjs/validator/rules/MinYear.js +23 -0
- package/lib/cjs/validator/rules/Pattern.d.ts +5 -0
- package/lib/cjs/validator/rules/Pattern.js +21 -0
- package/lib/cjs/validator/rules/Required.d.ts +5 -0
- package/lib/cjs/validator/rules/Required.js +18 -0
- package/lib/cjs/validator/rules/Rule.d.ts +7 -0
- package/lib/cjs/validator/rules/Rule.js +13 -0
- package/lib/cjs/validator/rules/Select.d.ts +5 -0
- package/lib/cjs/validator/rules/Select.js +97 -0
- package/lib/cjs/validator/rules/Time.d.ts +5 -0
- package/lib/cjs/validator/rules/Time.js +20 -0
- package/lib/cjs/validator/rules/Unique.d.ts +5 -0
- package/lib/cjs/validator/rules/Unique.js +71 -0
- package/lib/cjs/validator/rules/Url.d.ts +5 -0
- package/lib/cjs/validator/rules/Url.js +24 -0
- package/lib/cjs/validator/rules/index.d.ts +47 -0
- package/lib/cjs/validator/rules/index.js +51 -0
- package/lib/cjs/validator/transformers/index.d.ts +7 -0
- package/lib/cjs/validator/transformers/index.js +18 -0
- package/lib/cjs/validator/valueSources/index.d.ts +7 -0
- package/lib/cjs/validator/valueSources/index.js +18 -0
- package/lib/cjs/widgets/CalendarWidget.d.ts +96 -0
- package/lib/cjs/widgets/CalendarWidget.js +468 -0
- package/lib/cjs/widgets/InputWidget.d.ts +24 -0
- package/lib/cjs/widgets/InputWidget.js +75 -0
- package/lib/cjs/widgets/index.d.ts +7 -0
- package/lib/cjs/widgets/index.js +11 -0
- package/lib/mjs/CDN.d.ts +28 -0
- package/lib/mjs/CDN.js +74 -0
- package/lib/mjs/Element.d.ts +255 -0
- package/lib/mjs/Element.js +562 -0
- package/lib/mjs/Embed.d.ts +1 -0
- package/lib/mjs/Embed.js +348 -0
- package/lib/mjs/EventEmitter.d.ts +7 -0
- package/lib/mjs/EventEmitter.js +26 -0
- package/lib/mjs/Form.d.ts +90 -0
- package/lib/mjs/Form.js +308 -0
- package/lib/mjs/FormBuilder.d.ts +6 -0
- package/lib/mjs/FormBuilder.js +34 -0
- package/lib/mjs/Formio.d.ts +2 -0
- package/lib/mjs/Formio.js +89 -0
- package/lib/mjs/PDF.d.ts +32 -0
- package/lib/mjs/PDF.js +285 -0
- package/lib/mjs/PDFBuilder.d.ts +55 -0
- package/lib/mjs/PDFBuilder.js +474 -0
- package/lib/mjs/Webform.d.ts +408 -0
- package/lib/mjs/Webform.js +1513 -0
- package/lib/mjs/WebformBuilder.d.ts +120 -0
- package/lib/mjs/WebformBuilder.js +1537 -0
- package/lib/mjs/Wizard.d.ts +93 -0
- package/lib/mjs/Wizard.js +905 -0
- package/lib/mjs/WizardBuilder.d.ts +46 -0
- package/lib/mjs/WizardBuilder.js +250 -0
- package/lib/mjs/addons/FormioAddon.d.ts +19 -0
- package/lib/mjs/addons/FormioAddon.js +31 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +717 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +590 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +311 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +388 -0
- package/lib/mjs/addons/index.d.ts +625 -0
- package/lib/mjs/addons/index.js +19 -0
- package/lib/mjs/builders/Builders.d.ts +18 -0
- package/lib/mjs/builders/Builders.js +24 -0
- package/lib/mjs/builders/index.d.ts +2 -0
- package/lib/mjs/builders/index.js +2 -0
- package/lib/mjs/components/Components.d.ts +258 -0
- package/lib/mjs/components/Components.js +75 -0
- package/lib/mjs/components/_classes/component/Component.d.ts +779 -0
- package/lib/mjs/components/_classes/component/Component.form.d.ts +3 -0
- package/lib/mjs/components/_classes/component/Component.form.js +71 -0
- package/lib/mjs/components/_classes/component/Component.js +3110 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +645 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +39 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.api.d.ts +42 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.api.js +38 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +113 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +50 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +219 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +156 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.d.ts +160 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +199 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.d.ts +44 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.js +77 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.d.ts +368 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +410 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +140 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +204 -0
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +83 -0
- package/lib/mjs/components/_classes/component/editForm/utils.js +132 -0
- package/lib/mjs/components/_classes/component/fixtures/comp1.d.ts +33 -0
- package/lib/mjs/components/_classes/component/fixtures/comp1.js +31 -0
- package/lib/mjs/components/_classes/component/fixtures/comp2.d.ts +33 -0
- package/lib/mjs/components/_classes/component/fixtures/comp2.js +31 -0
- package/lib/mjs/components/_classes/component/fixtures/comp3.d.ts +14 -0
- package/lib/mjs/components/_classes/component/fixtures/comp3.js +12 -0
- package/lib/mjs/components/_classes/component/fixtures/comp4.d.ts +17 -0
- package/lib/mjs/components/_classes/component/fixtures/comp4.js +16 -0
- package/lib/mjs/components/_classes/component/fixtures/index.d.ts +5 -0
- package/lib/mjs/components/_classes/component/fixtures/index.js +5 -0
- package/lib/mjs/components/_classes/componentModal/ComponentModal.d.ts +46 -0
- package/lib/mjs/components/_classes/componentModal/ComponentModal.js +177 -0
- package/lib/mjs/components/_classes/field/Field.d.ts +4 -0
- package/lib/mjs/components/_classes/field/Field.js +21 -0
- package/lib/mjs/components/_classes/input/Input.d.ts +42 -0
- package/lib/mjs/components/_classes/input/Input.js +297 -0
- package/lib/mjs/components/_classes/list/ListComponent.d.ts +14 -0
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +3 -0
- package/lib/mjs/components/_classes/list/ListComponent.form.js +10 -0
- package/lib/mjs/components/_classes/list/ListComponent.js +208 -0
- package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +183 -0
- package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +117 -0
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +29 -0
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +256 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +130 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +3 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
- package/lib/mjs/components/_classes/nested/NestedComponent.js +687 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp1.d.ts +8 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp1.js +14 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp2.d.ts +236 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp2.js +225 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp3.d.ts +26 -0
- package/lib/mjs/components/_classes/nested/fixtures/comp3.js +27 -0
- package/lib/mjs/components/_classes/nested/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/_classes/nested/fixtures/index.js +3 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +14 -0
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +174 -0
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +11 -0
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +124 -0
- package/lib/mjs/components/address/Address.d.ts +58 -0
- package/lib/mjs/components/address/Address.form.d.ts +3 -0
- package/lib/mjs/components/address/Address.form.js +22 -0
- package/lib/mjs/components/address/Address.js +536 -0
- package/lib/mjs/components/address/editForm/Address.edit.data.d.ts +31 -0
- package/lib/mjs/components/address/editForm/Address.edit.data.js +21 -0
- package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +49 -0
- package/lib/mjs/components/address/editForm/Address.edit.display.js +42 -0
- package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +164 -0
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +151 -0
- package/lib/mjs/components/address/fixtures/comp1.d.ts +34 -0
- package/lib/mjs/components/address/fixtures/comp1.js +69 -0
- package/lib/mjs/components/address/fixtures/comp2.d.ts +62 -0
- package/lib/mjs/components/address/fixtures/comp2.js +101 -0
- package/lib/mjs/components/address/fixtures/comp3.d.ts +44 -0
- package/lib/mjs/components/address/fixtures/comp3.js +83 -0
- package/lib/mjs/components/address/fixtures/comp4.d.ts +56 -0
- package/lib/mjs/components/address/fixtures/comp4.js +91 -0
- package/lib/mjs/components/address/fixtures/index.d.ts +5 -0
- package/lib/mjs/components/address/fixtures/index.js +5 -0
- package/lib/mjs/components/address/fixtures/values.d.ts +22 -0
- package/lib/mjs/components/address/fixtures/values.js +17 -0
- package/lib/mjs/components/alert/Alert.d.ts +30 -0
- package/lib/mjs/components/alert/Alert.js +176 -0
- package/lib/mjs/components/builder.d.ts +2 -0
- package/lib/mjs/components/builder.js +86 -0
- package/lib/mjs/components/button/Button.d.ts +44 -0
- package/lib/mjs/components/button/Button.form.d.ts +3 -0
- package/lib/mjs/components/button/Button.form.js +18 -0
- package/lib/mjs/components/button/Button.js +458 -0
- package/lib/mjs/components/button/editForm/Button.edit.display.d.ts +360 -0
- package/lib/mjs/components/button/editForm/Button.edit.display.js +247 -0
- package/lib/mjs/components/button/fixtures/comp1.d.ts +15 -0
- package/lib/mjs/components/button/fixtures/comp1.js +14 -0
- package/lib/mjs/components/button/fixtures/comp2.d.ts +25 -0
- package/lib/mjs/components/button/fixtures/comp2.js +55 -0
- package/lib/mjs/components/button/fixtures/comp3.d.ts +113 -0
- package/lib/mjs/components/button/fixtures/comp3.js +82 -0
- package/lib/mjs/components/button/fixtures/index.d.ts +4 -0
- package/lib/mjs/components/button/fixtures/index.js +4 -0
- package/lib/mjs/components/button/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/button/fixtures/values.js +4 -0
- package/lib/mjs/components/checkbox/Checkbox.d.ts +36 -0
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +3 -0
- package/lib/mjs/components/checkbox/Checkbox.form.js +20 -0
- package/lib/mjs/components/checkbox/Checkbox.js +188 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +5 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.js +6 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +75 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +74 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +5 -0
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.js +10 -0
- package/lib/mjs/components/checkbox/fixtures/comp1.d.ts +24 -0
- package/lib/mjs/components/checkbox/fixtures/comp1.js +22 -0
- package/lib/mjs/components/checkbox/fixtures/comp2.d.ts +12 -0
- package/lib/mjs/components/checkbox/fixtures/comp2.js +11 -0
- package/lib/mjs/components/checkbox/fixtures/comp3.d.ts +15 -0
- package/lib/mjs/components/checkbox/fixtures/comp3.js +14 -0
- package/lib/mjs/components/checkbox/fixtures/comp4.d.ts +46 -0
- package/lib/mjs/components/checkbox/fixtures/comp4.js +37 -0
- package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.d.ts +25 -0
- package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.js +23 -0
- package/lib/mjs/components/checkbox/fixtures/index.d.ts +6 -0
- package/lib/mjs/components/checkbox/fixtures/index.js +6 -0
- package/lib/mjs/components/checkbox/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/checkbox/fixtures/values.js +4 -0
- package/lib/mjs/components/columns/Columns.d.ts +25 -0
- package/lib/mjs/components/columns/Columns.form.d.ts +3 -0
- package/lib/mjs/components/columns/Columns.form.js +10 -0
- package/lib/mjs/components/columns/Columns.js +149 -0
- package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +58 -0
- package/lib/mjs/components/columns/editForm/Columns.edit.display.js +98 -0
- package/lib/mjs/components/columns/fixtures/comp1.d.ts +45 -0
- package/lib/mjs/components/columns/fixtures/comp1.js +83 -0
- package/lib/mjs/components/columns/fixtures/comp2.d.ts +24 -0
- package/lib/mjs/components/columns/fixtures/comp2.js +125 -0
- package/lib/mjs/components/columns/fixtures/comp3.d.ts +45 -0
- package/lib/mjs/components/columns/fixtures/comp3.js +51 -0
- package/lib/mjs/components/columns/fixtures/index.d.ts +4 -0
- package/lib/mjs/components/columns/fixtures/index.js +4 -0
- package/lib/mjs/components/container/Container.d.ts +14 -0
- package/lib/mjs/components/container/Container.form.d.ts +3 -0
- package/lib/mjs/components/container/Container.form.js +15 -0
- package/lib/mjs/components/container/Container.js +72 -0
- package/lib/mjs/components/container/editForm/Container.edit.data.d.ts +5 -0
- package/lib/mjs/components/container/editForm/Container.edit.data.js +14 -0
- package/lib/mjs/components/container/editForm/Container.edit.display.d.ts +5 -0
- package/lib/mjs/components/container/editForm/Container.edit.display.js +18 -0
- package/lib/mjs/components/container/fixtures/comp1.d.ts +49 -0
- package/lib/mjs/components/container/fixtures/comp1.js +80 -0
- package/lib/mjs/components/container/fixtures/comp2.d.ts +30 -0
- package/lib/mjs/components/container/fixtures/comp2.js +32 -0
- package/lib/mjs/components/container/fixtures/comp3.d.ts +77 -0
- package/lib/mjs/components/container/fixtures/comp3.js +55 -0
- package/lib/mjs/components/container/fixtures/index.d.ts +4 -0
- package/lib/mjs/components/container/fixtures/index.js +4 -0
- package/lib/mjs/components/content/Content.d.ts +15 -0
- package/lib/mjs/components/content/Content.form.d.ts +3 -0
- package/lib/mjs/components/content/Content.form.js +37 -0
- package/lib/mjs/components/content/Content.js +69 -0
- package/lib/mjs/components/content/editForm/Content.edit.display.d.ts +18 -0
- package/lib/mjs/components/content/editForm/Content.edit.display.js +46 -0
- package/lib/mjs/components/content/editForm/Content.edit.logic.d.ts +48 -0
- package/lib/mjs/components/content/editForm/Content.edit.logic.js +98 -0
- package/lib/mjs/components/content/fixtures/comp1.d.ts +13 -0
- package/lib/mjs/components/content/fixtures/comp1.js +12 -0
- package/lib/mjs/components/content/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/content/fixtures/index.js +2 -0
- package/lib/mjs/components/currency/Currency.d.ts +8 -0
- package/lib/mjs/components/currency/Currency.form.d.ts +3 -0
- package/lib/mjs/components/currency/Currency.form.js +40 -0
- package/lib/mjs/components/currency/Currency.js +174 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +17 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.data.js +186 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.d.ts +18 -0
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +34 -0
- package/lib/mjs/components/currency/fixtures/comp1.d.ts +31 -0
- package/lib/mjs/components/currency/fixtures/comp1.js +29 -0
- package/lib/mjs/components/currency/fixtures/comp2.d.ts +20 -0
- package/lib/mjs/components/currency/fixtures/comp2.js +18 -0
- package/lib/mjs/components/currency/fixtures/comp3.d.ts +13 -0
- package/lib/mjs/components/currency/fixtures/comp3.js +12 -0
- package/lib/mjs/components/currency/fixtures/comp4.d.ts +17 -0
- package/lib/mjs/components/currency/fixtures/comp4.js +18 -0
- package/lib/mjs/components/currency/fixtures/index.d.ts +5 -0
- package/lib/mjs/components/currency/fixtures/index.js +5 -0
- package/lib/mjs/components/currency/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/currency/fixtures/values.js +6 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +87 -0
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +3 -0
- package/lib/mjs/components/datagrid/DataGrid.form.js +20 -0
- package/lib/mjs/components/datagrid/DataGrid.js +642 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +5 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.js +6 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +283 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.js +147 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +20 -0
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.js +24 -0
- package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +37 -0
- package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.js +40 -0
- package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
- package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.js +1 -0
- package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +63 -0
- package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.js +79 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +76 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.js +73 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +197 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.js +176 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.d.ts +61 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.js +67 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-logic.d.ts +165 -0
- package/lib/mjs/components/datagrid/fixtures/comp-with-logic.js +178 -0
- package/lib/mjs/components/datagrid/fixtures/comp1.d.ts +93 -0
- package/lib/mjs/components/datagrid/fixtures/comp1.js +113 -0
- package/lib/mjs/components/datagrid/fixtures/comp2.d.ts +18 -0
- package/lib/mjs/components/datagrid/fixtures/comp2.js +27 -0
- package/lib/mjs/components/datagrid/fixtures/comp3.d.ts +14 -0
- package/lib/mjs/components/datagrid/fixtures/comp3.js +21 -0
- package/lib/mjs/components/datagrid/fixtures/comp4.d.ts +27 -0
- package/lib/mjs/components/datagrid/fixtures/comp4.js +26 -0
- package/lib/mjs/components/datagrid/fixtures/comp5.d.ts +67 -0
- package/lib/mjs/components/datagrid/fixtures/comp5.js +75 -0
- package/lib/mjs/components/datagrid/fixtures/comp6.d.ts +567 -0
- package/lib/mjs/components/datagrid/fixtures/comp6.js +294 -0
- package/lib/mjs/components/datagrid/fixtures/comp7.d.ts +28 -0
- package/lib/mjs/components/datagrid/fixtures/comp7.js +33 -0
- package/lib/mjs/components/datagrid/fixtures/comp8.d.ts +35 -0
- package/lib/mjs/components/datagrid/fixtures/comp8.js +35 -0
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +15 -0
- package/lib/mjs/components/datagrid/fixtures/index.js +15 -0
- package/lib/mjs/components/datamap/DataMap.d.ts +35 -0
- package/lib/mjs/components/datamap/DataMap.form.d.ts +3 -0
- package/lib/mjs/components/datamap/DataMap.form.js +15 -0
- package/lib/mjs/components/datamap/DataMap.js +291 -0
- package/lib/mjs/components/datamap/editForm/DataMap.edit.data.d.ts +5 -0
- package/lib/mjs/components/datamap/editForm/DataMap.edit.data.js +10 -0
- package/lib/mjs/components/datamap/editForm/DataMap.edit.display.d.ts +30 -0
- package/lib/mjs/components/datamap/editForm/DataMap.edit.display.js +46 -0
- package/lib/mjs/components/datamap/fixtures/comp1.d.ts +18 -0
- package/lib/mjs/components/datamap/fixtures/comp1.js +13 -0
- package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +87 -0
- package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.js +83 -0
- package/lib/mjs/components/datamap/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/datamap/fixtures/index.js +3 -0
- package/lib/mjs/components/datetime/DateTime.d.ts +16 -0
- package/lib/mjs/components/datetime/DateTime.form.d.ts +3 -0
- package/lib/mjs/components/datetime/DateTime.form.js +34 -0
- package/lib/mjs/components/datetime/DateTime.js +161 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.data.d.ts +24 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.data.js +21 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +61 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +70 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.display.d.ts +128 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +98 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.d.ts +9 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +34 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +40 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +82 -0
- package/lib/mjs/components/datetime/fixtures/comp1.d.ts +45 -0
- package/lib/mjs/components/datetime/fixtures/comp1.js +42 -0
- package/lib/mjs/components/datetime/fixtures/comp10.d.ts +102 -0
- package/lib/mjs/components/datetime/fixtures/comp10.js +84 -0
- package/lib/mjs/components/datetime/fixtures/comp11.d.ts +58 -0
- package/lib/mjs/components/datetime/fixtures/comp11.js +53 -0
- package/lib/mjs/components/datetime/fixtures/comp12.d.ts +57 -0
- package/lib/mjs/components/datetime/fixtures/comp12.js +53 -0
- package/lib/mjs/components/datetime/fixtures/comp2.d.ts +42 -0
- package/lib/mjs/components/datetime/fixtures/comp2.js +41 -0
- package/lib/mjs/components/datetime/fixtures/comp3.d.ts +51 -0
- package/lib/mjs/components/datetime/fixtures/comp3.js +38 -0
- package/lib/mjs/components/datetime/fixtures/comp5.d.ts +57 -0
- package/lib/mjs/components/datetime/fixtures/comp5.js +46 -0
- package/lib/mjs/components/datetime/fixtures/comp6.d.ts +55 -0
- package/lib/mjs/components/datetime/fixtures/comp6.js +47 -0
- package/lib/mjs/components/datetime/fixtures/comp7.d.ts +59 -0
- package/lib/mjs/components/datetime/fixtures/comp7.js +51 -0
- package/lib/mjs/components/datetime/fixtures/comp8.d.ts +59 -0
- package/lib/mjs/components/datetime/fixtures/comp8.js +50 -0
- package/lib/mjs/components/datetime/fixtures/comp9.d.ts +64 -0
- package/lib/mjs/components/datetime/fixtures/comp9.js +93 -0
- package/lib/mjs/components/datetime/fixtures/index.d.ts +12 -0
- package/lib/mjs/components/datetime/fixtures/index.js +12 -0
- package/lib/mjs/components/datetime/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/datetime/fixtures/values.js +4 -0
- package/lib/mjs/components/day/Day.d.ts +143 -0
- package/lib/mjs/components/day/Day.form.d.ts +3 -0
- package/lib/mjs/components/day/Day.form.js +41 -0
- package/lib/mjs/components/day/Day.js +528 -0
- package/lib/mjs/components/day/editForm/Day.edit.data.d.ts +5 -0
- package/lib/mjs/components/day/editForm/Day.edit.data.js +6 -0
- package/lib/mjs/components/day/editForm/Day.edit.day.d.ts +40 -0
- package/lib/mjs/components/day/editForm/Day.edit.day.js +46 -0
- package/lib/mjs/components/day/editForm/Day.edit.display.d.ts +40 -0
- package/lib/mjs/components/day/editForm/Day.edit.display.js +44 -0
- package/lib/mjs/components/day/editForm/Day.edit.month.d.ts +40 -0
- package/lib/mjs/components/day/editForm/Day.edit.month.js +38 -0
- package/lib/mjs/components/day/editForm/Day.edit.validation.d.ts +29 -0
- package/lib/mjs/components/day/editForm/Day.edit.validation.js +52 -0
- package/lib/mjs/components/day/editForm/Day.edit.year.d.ts +40 -0
- package/lib/mjs/components/day/editForm/Day.edit.year.js +56 -0
- package/lib/mjs/components/day/fixtures/comp1.d.ts +46 -0
- package/lib/mjs/components/day/fixtures/comp1.js +37 -0
- package/lib/mjs/components/day/fixtures/comp2.d.ts +46 -0
- package/lib/mjs/components/day/fixtures/comp2.js +37 -0
- package/lib/mjs/components/day/fixtures/comp3.d.ts +48 -0
- package/lib/mjs/components/day/fixtures/comp3.js +39 -0
- package/lib/mjs/components/day/fixtures/comp4.d.ts +53 -0
- package/lib/mjs/components/day/fixtures/comp4.js +54 -0
- package/lib/mjs/components/day/fixtures/index.d.ts +5 -0
- package/lib/mjs/components/day/fixtures/index.js +5 -0
- package/lib/mjs/components/day/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/day/fixtures/values.js +4 -0
- package/lib/mjs/components/editgrid/EditGrid.d.ts +98 -0
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +3 -0
- package/lib/mjs/components/editgrid/EditGrid.form.js +27 -0
- package/lib/mjs/components/editgrid/EditGrid.js +1151 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +18 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.js +18 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +82 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +53 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +58 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +126 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +29 -0
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.js +32 -0
- package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +34 -0
- package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.js +34 -0
- package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +327 -0
- package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.js +218 -0
- package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +77 -0
- package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.js +82 -0
- package/lib/mjs/components/editgrid/fixtures/comp1.d.ts +89 -0
- package/lib/mjs/components/editgrid/fixtures/comp1.js +126 -0
- package/lib/mjs/components/editgrid/fixtures/comp10.d.ts +49 -0
- package/lib/mjs/components/editgrid/fixtures/comp10.js +46 -0
- package/lib/mjs/components/editgrid/fixtures/comp11.d.ts +53 -0
- package/lib/mjs/components/editgrid/fixtures/comp11.js +48 -0
- package/lib/mjs/components/editgrid/fixtures/comp12.d.ts +57 -0
- package/lib/mjs/components/editgrid/fixtures/comp12.js +48 -0
- package/lib/mjs/components/editgrid/fixtures/comp13.d.ts +64 -0
- package/lib/mjs/components/editgrid/fixtures/comp13.js +62 -0
- package/lib/mjs/components/editgrid/fixtures/comp14.d.ts +88 -0
- package/lib/mjs/components/editgrid/fixtures/comp14.js +82 -0
- package/lib/mjs/components/editgrid/fixtures/comp2.d.ts +112 -0
- package/lib/mjs/components/editgrid/fixtures/comp2.js +112 -0
- package/lib/mjs/components/editgrid/fixtures/comp3.d.ts +27 -0
- package/lib/mjs/components/editgrid/fixtures/comp3.js +26 -0
- package/lib/mjs/components/editgrid/fixtures/comp4.d.ts +23 -0
- package/lib/mjs/components/editgrid/fixtures/comp4.js +22 -0
- package/lib/mjs/components/editgrid/fixtures/comp5.d.ts +19 -0
- package/lib/mjs/components/editgrid/fixtures/comp5.js +20 -0
- package/lib/mjs/components/editgrid/fixtures/comp6.d.ts +50 -0
- package/lib/mjs/components/editgrid/fixtures/comp6.js +56 -0
- package/lib/mjs/components/editgrid/fixtures/comp7.d.ts +129 -0
- package/lib/mjs/components/editgrid/fixtures/comp7.js +121 -0
- package/lib/mjs/components/editgrid/fixtures/comp8.d.ts +148 -0
- package/lib/mjs/components/editgrid/fixtures/comp8.js +154 -0
- package/lib/mjs/components/editgrid/fixtures/comp9.d.ts +86 -0
- package/lib/mjs/components/editgrid/fixtures/comp9.js +60 -0
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +17 -0
- package/lib/mjs/components/editgrid/fixtures/index.js +17 -0
- package/lib/mjs/components/email/Email.d.ts +4 -0
- package/lib/mjs/components/email/Email.form.d.ts +3 -0
- package/lib/mjs/components/email/Email.form.js +15 -0
- package/lib/mjs/components/email/Email.js +48 -0
- package/lib/mjs/components/email/editForm/Email.edit.display.d.ts +5 -0
- package/lib/mjs/components/email/editForm/Email.edit.display.js +18 -0
- package/lib/mjs/components/email/editForm/Email.edit.validation.d.ts +24 -0
- package/lib/mjs/components/email/editForm/Email.edit.validation.js +26 -0
- package/lib/mjs/components/email/fixtures/comp1.d.ts +26 -0
- package/lib/mjs/components/email/fixtures/comp1.js +24 -0
- package/lib/mjs/components/email/fixtures/comp2.d.ts +23 -0
- package/lib/mjs/components/email/fixtures/comp2.js +11 -0
- package/lib/mjs/components/email/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/email/fixtures/index.js +3 -0
- package/lib/mjs/components/email/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/email/fixtures/values.js +4 -0
- package/lib/mjs/components/fieldset/Fieldset.d.ts +13 -0
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +3 -0
- package/lib/mjs/components/fieldset/Fieldset.form.js +10 -0
- package/lib/mjs/components/fieldset/Fieldset.js +37 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +33 -0
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +42 -0
- package/lib/mjs/components/fieldset/fixtures/comp1.d.ts +46 -0
- package/lib/mjs/components/fieldset/fixtures/comp1.js +79 -0
- package/lib/mjs/components/fieldset/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/fieldset/fixtures/index.js +2 -0
- package/lib/mjs/components/file/File.d.ts +59 -0
- package/lib/mjs/components/file/File.form.d.ts +3 -0
- package/lib/mjs/components/file/File.form.js +27 -0
- package/lib/mjs/components/file/File.js +746 -0
- package/lib/mjs/components/file/editForm/File.edit.data.d.ts +5 -0
- package/lib/mjs/components/file/editForm/File.edit.data.js +6 -0
- package/lib/mjs/components/file/editForm/File.edit.display.d.ts +5 -0
- package/lib/mjs/components/file/editForm/File.edit.display.js +6 -0
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +213 -0
- package/lib/mjs/components/file/editForm/File.edit.file.js +256 -0
- package/lib/mjs/components/file/editForm/File.edit.validation.d.ts +5 -0
- package/lib/mjs/components/file/editForm/File.edit.validation.js +10 -0
- package/lib/mjs/components/file/fixtures/comp1.d.ts +15 -0
- package/lib/mjs/components/file/fixtures/comp1.js +16 -0
- package/lib/mjs/components/file/fixtures/comp2.d.ts +35 -0
- package/lib/mjs/components/file/fixtures/comp2.js +29 -0
- package/lib/mjs/components/file/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/file/fixtures/index.js +3 -0
- package/lib/mjs/components/file/fixtures/values.d.ts +10 -0
- package/lib/mjs/components/file/fixtures/values.js +13 -0
- package/lib/mjs/components/form/Form.d.ts +94 -0
- package/lib/mjs/components/form/Form.form.d.ts +3 -0
- package/lib/mjs/components/form/Form.form.js +24 -0
- package/lib/mjs/components/form/Form.js +714 -0
- package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +82 -0
- package/lib/mjs/components/form/editForm/Form.edit.data.js +16 -0
- package/lib/mjs/components/form/editForm/Form.edit.display.d.ts +5 -0
- package/lib/mjs/components/form/editForm/Form.edit.display.js +27 -0
- package/lib/mjs/components/form/editForm/Form.edit.form.d.ts +89 -0
- package/lib/mjs/components/form/editForm/Form.edit.form.js +72 -0
- package/lib/mjs/components/form/fixtures/comp1.d.ts +45 -0
- package/lib/mjs/components/form/fixtures/comp1.js +78 -0
- package/lib/mjs/components/form/fixtures/comp2.d.ts +14 -0
- package/lib/mjs/components/form/fixtures/comp2.js +13 -0
- package/lib/mjs/components/form/fixtures/comp3.d.ts +187 -0
- package/lib/mjs/components/form/fixtures/comp3.js +168 -0
- package/lib/mjs/components/form/fixtures/comp4.d.ts +107 -0
- package/lib/mjs/components/form/fixtures/comp4.js +89 -0
- package/lib/mjs/components/form/fixtures/comp5.d.ts +42 -0
- package/lib/mjs/components/form/fixtures/comp5.js +43 -0
- package/lib/mjs/components/form/fixtures/comp6.d.ts +74 -0
- package/lib/mjs/components/form/fixtures/comp6.js +92 -0
- package/lib/mjs/components/form/fixtures/formModalEdit.d.ts +42 -0
- package/lib/mjs/components/form/fixtures/formModalEdit.js +49 -0
- package/lib/mjs/components/form/fixtures/index.d.ts +8 -0
- package/lib/mjs/components/form/fixtures/index.js +8 -0
- package/lib/mjs/components/form/fixtures/values.d.ts +6 -0
- package/lib/mjs/components/form/fixtures/values.js +7 -0
- package/lib/mjs/components/hidden/Hidden.d.ts +25 -0
- package/lib/mjs/components/hidden/Hidden.form.d.ts +3 -0
- package/lib/mjs/components/hidden/Hidden.form.js +23 -0
- package/lib/mjs/components/hidden/Hidden.js +54 -0
- package/lib/mjs/components/hidden/editForm/Hidden.edit.data.d.ts +5 -0
- package/lib/mjs/components/hidden/editForm/Hidden.edit.data.js +14 -0
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.d.ts +5 -0
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +42 -0
- package/lib/mjs/components/hidden/fixtures/comp1.d.ts +18 -0
- package/lib/mjs/components/hidden/fixtures/comp1.js +16 -0
- package/lib/mjs/components/hidden/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/hidden/fixtures/index.js +2 -0
- package/lib/mjs/components/hidden/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/hidden/fixtures/values.js +4 -0
- package/lib/mjs/components/html/HTML.d.ts +16 -0
- package/lib/mjs/components/html/HTML.form.d.ts +3 -0
- package/lib/mjs/components/html/HTML.form.js +23 -0
- package/lib/mjs/components/html/HTML.js +83 -0
- package/lib/mjs/components/html/editForm/HTML.edit.display.d.ts +77 -0
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +98 -0
- package/lib/mjs/components/html/editForm/HTML.edit.logic.d.ts +48 -0
- package/lib/mjs/components/html/editForm/HTML.edit.logic.js +98 -0
- package/lib/mjs/components/html/fixtures/comp1.d.ts +19 -0
- package/lib/mjs/components/html/fixtures/comp1.js +20 -0
- package/lib/mjs/components/html/fixtures/comp2.d.ts +21 -0
- package/lib/mjs/components/html/fixtures/comp2.js +22 -0
- package/lib/mjs/components/html/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/html/fixtures/index.js +3 -0
- package/lib/mjs/components/index.d.ts +100 -0
- package/lib/mjs/components/index.js +99 -0
- package/lib/mjs/components/number/Number.d.ts +31 -0
- package/lib/mjs/components/number/Number.form.d.ts +3 -0
- package/lib/mjs/components/number/Number.form.js +20 -0
- package/lib/mjs/components/number/Number.js +185 -0
- package/lib/mjs/components/number/editForm/Number.edit.data.d.ts +18 -0
- package/lib/mjs/components/number/editForm/Number.edit.data.js +30 -0
- package/lib/mjs/components/number/editForm/Number.edit.display.d.ts +5 -0
- package/lib/mjs/components/number/editForm/Number.edit.display.js +22 -0
- package/lib/mjs/components/number/editForm/Number.edit.validation.d.ts +20 -0
- package/lib/mjs/components/number/editForm/Number.edit.validation.js +44 -0
- package/lib/mjs/components/number/fixtures/comp1.d.ts +33 -0
- package/lib/mjs/components/number/fixtures/comp1.js +30 -0
- package/lib/mjs/components/number/fixtures/comp2.d.ts +32 -0
- package/lib/mjs/components/number/fixtures/comp2.js +29 -0
- package/lib/mjs/components/number/fixtures/comp3.d.ts +14 -0
- package/lib/mjs/components/number/fixtures/comp3.js +13 -0
- package/lib/mjs/components/number/fixtures/comp4.d.ts +14 -0
- package/lib/mjs/components/number/fixtures/comp4.js +13 -0
- package/lib/mjs/components/number/fixtures/comp5.d.ts +20 -0
- package/lib/mjs/components/number/fixtures/comp5.js +18 -0
- package/lib/mjs/components/number/fixtures/comp6.d.ts +40 -0
- package/lib/mjs/components/number/fixtures/comp6.js +25 -0
- package/lib/mjs/components/number/fixtures/comp7.d.ts +15 -0
- package/lib/mjs/components/number/fixtures/comp7.js +14 -0
- package/lib/mjs/components/number/fixtures/index.d.ts +8 -0
- package/lib/mjs/components/number/fixtures/index.js +8 -0
- package/lib/mjs/components/number/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/number/fixtures/values.js +9 -0
- package/lib/mjs/components/panel/Panel.d.ts +14 -0
- package/lib/mjs/components/panel/Panel.form.d.ts +3 -0
- package/lib/mjs/components/panel/Panel.form.js +15 -0
- package/lib/mjs/components/panel/Panel.js +52 -0
- package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +75 -0
- package/lib/mjs/components/panel/editForm/Panel.edit.conditional.js +40 -0
- package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +228 -0
- package/lib/mjs/components/panel/editForm/Panel.edit.display.js +208 -0
- package/lib/mjs/components/panel/fixtures/comp1.d.ts +46 -0
- package/lib/mjs/components/panel/fixtures/comp1.js +78 -0
- package/lib/mjs/components/panel/fixtures/comp2.d.ts +80 -0
- package/lib/mjs/components/panel/fixtures/comp2.js +67 -0
- package/lib/mjs/components/panel/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/panel/fixtures/index.js +3 -0
- package/lib/mjs/components/password/Password.d.ts +3 -0
- package/lib/mjs/components/password/Password.form.d.ts +3 -0
- package/lib/mjs/components/password/Password.form.js +20 -0
- package/lib/mjs/components/password/Password.js +34 -0
- package/lib/mjs/components/password/editForm/Password.edit.data.d.ts +18 -0
- package/lib/mjs/components/password/editForm/Password.edit.data.js +46 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.d.ts +5 -0
- package/lib/mjs/components/password/editForm/Password.edit.display.js +14 -0
- package/lib/mjs/components/password/editForm/Password.edit.validation.d.ts +5 -0
- package/lib/mjs/components/password/editForm/Password.edit.validation.js +14 -0
- package/lib/mjs/components/password/fixtures/comp1.d.ts +22 -0
- package/lib/mjs/components/password/fixtures/comp1.js +20 -0
- package/lib/mjs/components/password/fixtures/comp2.d.ts +27 -0
- package/lib/mjs/components/password/fixtures/comp2.js +27 -0
- package/lib/mjs/components/password/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/password/fixtures/index.js +3 -0
- package/lib/mjs/components/password/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/password/fixtures/values.js +4 -0
- package/lib/mjs/components/phonenumber/PhoneNumber.d.ts +3 -0
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +3 -0
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +23 -0
- package/lib/mjs/components/phonenumber/PhoneNumber.js +27 -0
- package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +5 -0
- package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +22 -0
- package/lib/mjs/components/phonenumber/fixtures/comp1.d.ts +27 -0
- package/lib/mjs/components/phonenumber/fixtures/comp1.js +25 -0
- package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/phonenumber/fixtures/index.js +2 -0
- package/lib/mjs/components/phonenumber/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/phonenumber/fixtures/values.js +4 -0
- package/lib/mjs/components/radio/Radio.d.ts +44 -0
- package/lib/mjs/components/radio/Radio.form.d.ts +3 -0
- package/lib/mjs/components/radio/Radio.form.js +20 -0
- package/lib/mjs/components/radio/Radio.js +288 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.data.d.ts +134 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.data.js +80 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.display.d.ts +40 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.display.js +32 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.validation.d.ts +18 -0
- package/lib/mjs/components/radio/editForm/Radio.edit.validation.js +18 -0
- package/lib/mjs/components/radio/fixtures/comp1.d.ts +28 -0
- package/lib/mjs/components/radio/fixtures/comp1.js +40 -0
- package/lib/mjs/components/radio/fixtures/comp2.d.ts +85 -0
- package/lib/mjs/components/radio/fixtures/comp2.js +84 -0
- package/lib/mjs/components/radio/fixtures/comp3.d.ts +85 -0
- package/lib/mjs/components/radio/fixtures/comp3.js +88 -0
- package/lib/mjs/components/radio/fixtures/comp4.d.ts +19 -0
- package/lib/mjs/components/radio/fixtures/comp4.js +25 -0
- package/lib/mjs/components/radio/fixtures/comp5.d.ts +39 -0
- package/lib/mjs/components/radio/fixtures/comp5.js +33 -0
- package/lib/mjs/components/radio/fixtures/comp6.d.ts +38 -0
- package/lib/mjs/components/radio/fixtures/comp6.js +31 -0
- package/lib/mjs/components/radio/fixtures/comp7.d.ts +23 -0
- package/lib/mjs/components/radio/fixtures/comp7.js +19 -0
- package/lib/mjs/components/radio/fixtures/comp8.d.ts +118 -0
- package/lib/mjs/components/radio/fixtures/comp8.js +111 -0
- package/lib/mjs/components/radio/fixtures/comp9.d.ts +35 -0
- package/lib/mjs/components/radio/fixtures/comp9.js +30 -0
- package/lib/mjs/components/radio/fixtures/index.d.ts +10 -0
- package/lib/mjs/components/radio/fixtures/index.js +10 -0
- package/lib/mjs/components/radio/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/radio/fixtures/values.js +5 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +22 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +26 -0
- package/lib/mjs/components/recaptcha/ReCaptcha.js +137 -0
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +44 -0
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +106 -0
- package/lib/mjs/components/recaptcha/fixtures/comp1.d.ts +8 -0
- package/lib/mjs/components/recaptcha/fixtures/comp1.js +7 -0
- package/lib/mjs/components/recaptcha/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/recaptcha/fixtures/index.js +2 -0
- package/lib/mjs/components/resource/Resource.d.ts +3 -0
- package/lib/mjs/components/resource/Resource.form.d.ts +3 -0
- package/lib/mjs/components/resource/Resource.form.js +10 -0
- package/lib/mjs/components/resource/Resource.js +34 -0
- package/lib/mjs/components/resource/editForm/Resource.edit.display.d.ts +173 -0
- package/lib/mjs/components/resource/editForm/Resource.edit.display.js +100 -0
- package/lib/mjs/components/resource/fixtures/comp1.d.ts +30 -0
- package/lib/mjs/components/resource/fixtures/comp1.js +28 -0
- package/lib/mjs/components/resource/fixtures/comp2.d.ts +35 -0
- package/lib/mjs/components/resource/fixtures/comp2.js +29 -0
- package/lib/mjs/components/resource/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/resource/fixtures/index.js +3 -0
- package/lib/mjs/components/select/Select.d.ts +122 -0
- package/lib/mjs/components/select/Select.form.d.ts +3 -0
- package/lib/mjs/components/select/Select.form.js +20 -0
- package/lib/mjs/components/select/Select.js +1485 -0
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1039 -0
- package/lib/mjs/components/select/editForm/Select.edit.data.js +627 -0
- package/lib/mjs/components/select/editForm/Select.edit.display.d.ts +27 -0
- package/lib/mjs/components/select/editForm/Select.edit.display.js +26 -0
- package/lib/mjs/components/select/editForm/Select.edit.validation.d.ts +30 -0
- package/lib/mjs/components/select/editForm/Select.edit.validation.js +33 -0
- package/lib/mjs/components/select/fixtures/comp1.d.ts +40 -0
- package/lib/mjs/components/select/fixtures/comp1.js +64 -0
- package/lib/mjs/components/select/fixtures/comp10.d.ts +41 -0
- package/lib/mjs/components/select/fixtures/comp10.js +30 -0
- package/lib/mjs/components/select/fixtures/comp11.d.ts +28 -0
- package/lib/mjs/components/select/fixtures/comp11.js +22 -0
- package/lib/mjs/components/select/fixtures/comp12.d.ts +53 -0
- package/lib/mjs/components/select/fixtures/comp12.js +27 -0
- package/lib/mjs/components/select/fixtures/comp13.d.ts +28 -0
- package/lib/mjs/components/select/fixtures/comp13.js +29 -0
- package/lib/mjs/components/select/fixtures/comp14.d.ts +40 -0
- package/lib/mjs/components/select/fixtures/comp14.js +25 -0
- package/lib/mjs/components/select/fixtures/comp15.d.ts +50 -0
- package/lib/mjs/components/select/fixtures/comp15.js +39 -0
- package/lib/mjs/components/select/fixtures/comp16.d.ts +34 -0
- package/lib/mjs/components/select/fixtures/comp16.js +31 -0
- package/lib/mjs/components/select/fixtures/comp17.d.ts +51 -0
- package/lib/mjs/components/select/fixtures/comp17.js +41 -0
- package/lib/mjs/components/select/fixtures/comp18.d.ts +49 -0
- package/lib/mjs/components/select/fixtures/comp18.js +40 -0
- package/lib/mjs/components/select/fixtures/comp2.d.ts +41 -0
- package/lib/mjs/components/select/fixtures/comp2.js +65 -0
- package/lib/mjs/components/select/fixtures/comp3.d.ts +35 -0
- package/lib/mjs/components/select/fixtures/comp3.js +206 -0
- package/lib/mjs/components/select/fixtures/comp4.d.ts +103 -0
- package/lib/mjs/components/select/fixtures/comp4.js +104 -0
- package/lib/mjs/components/select/fixtures/comp5.d.ts +21 -0
- package/lib/mjs/components/select/fixtures/comp5.js +26 -0
- package/lib/mjs/components/select/fixtures/comp6.d.ts +20 -0
- package/lib/mjs/components/select/fixtures/comp6.js +28 -0
- package/lib/mjs/components/select/fixtures/comp7.d.ts +63 -0
- package/lib/mjs/components/select/fixtures/comp7.js +44 -0
- package/lib/mjs/components/select/fixtures/comp8.d.ts +72 -0
- package/lib/mjs/components/select/fixtures/comp8.js +35 -0
- package/lib/mjs/components/select/fixtures/comp9.d.ts +88 -0
- package/lib/mjs/components/select/fixtures/comp9.js +65 -0
- package/lib/mjs/components/select/fixtures/index.d.ts +19 -0
- package/lib/mjs/components/select/fixtures/index.js +19 -0
- package/lib/mjs/components/select/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/select/fixtures/values.js +5 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +15 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +3 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.form.js +19 -0
- package/lib/mjs/components/selectboxes/SelectBoxes.js +208 -0
- package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +9 -0
- package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +34 -0
- package/lib/mjs/components/selectboxes/fixtures/comp1.d.ts +24 -0
- package/lib/mjs/components/selectboxes/fixtures/comp1.js +52 -0
- package/lib/mjs/components/selectboxes/fixtures/comp2.d.ts +24 -0
- package/lib/mjs/components/selectboxes/fixtures/comp2.js +52 -0
- package/lib/mjs/components/selectboxes/fixtures/comp3.d.ts +23 -0
- package/lib/mjs/components/selectboxes/fixtures/comp3.js +19 -0
- package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +63 -0
- package/lib/mjs/components/selectboxes/fixtures/comp4.js +64 -0
- package/lib/mjs/components/selectboxes/fixtures/comp5.d.ts +37 -0
- package/lib/mjs/components/selectboxes/fixtures/comp5.js +31 -0
- package/lib/mjs/components/selectboxes/fixtures/index.d.ts +6 -0
- package/lib/mjs/components/selectboxes/fixtures/index.js +6 -0
- package/lib/mjs/components/selectboxes/fixtures/values.d.ts +6 -0
- package/lib/mjs/components/selectboxes/fixtures/values.js +22 -0
- package/lib/mjs/components/signature/Signature.d.ts +26 -0
- package/lib/mjs/components/signature/Signature.form.d.ts +3 -0
- package/lib/mjs/components/signature/Signature.form.js +20 -0
- package/lib/mjs/components/signature/Signature.js +240 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.data.d.ts +5 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.data.js +14 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +51 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +69 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.validation.d.ts +5 -0
- package/lib/mjs/components/signature/editForm/Signature.edit.validation.js +10 -0
- package/lib/mjs/components/signature/fixtures/comp1.d.ts +30 -0
- package/lib/mjs/components/signature/fixtures/comp1.js +28 -0
- package/lib/mjs/components/signature/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/signature/fixtures/index.js +2 -0
- package/lib/mjs/components/signature/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/signature/fixtures/values.js +5 -0
- package/lib/mjs/components/survey/Survey.d.ts +16 -0
- package/lib/mjs/components/survey/Survey.form.d.ts +3 -0
- package/lib/mjs/components/survey/Survey.form.js +20 -0
- package/lib/mjs/components/survey/Survey.js +141 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.data.d.ts +44 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.data.js +70 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.display.d.ts +5 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.display.js +6 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.validation.d.ts +5 -0
- package/lib/mjs/components/survey/editForm/Survey.edit.validation.js +6 -0
- package/lib/mjs/components/survey/fixtures/comp1.d.ts +31 -0
- package/lib/mjs/components/survey/fixtures/comp1.js +53 -0
- package/lib/mjs/components/survey/fixtures/comp2.d.ts +31 -0
- package/lib/mjs/components/survey/fixtures/comp2.js +53 -0
- package/lib/mjs/components/survey/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/survey/fixtures/index.js +3 -0
- package/lib/mjs/components/survey/fixtures/values.d.ts +5 -0
- package/lib/mjs/components/survey/fixtures/values.js +10 -0
- package/lib/mjs/components/table/Table.d.ts +21 -0
- package/lib/mjs/components/table/Table.form.d.ts +3 -0
- package/lib/mjs/components/table/Table.form.js +10 -0
- package/lib/mjs/components/table/Table.js +165 -0
- package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +55 -0
- package/lib/mjs/components/table/editForm/Table.edit.display.js +109 -0
- package/lib/mjs/components/table/fixtures/comp1.d.ts +53 -0
- package/lib/mjs/components/table/fixtures/comp1.js +235 -0
- package/lib/mjs/components/table/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/table/fixtures/index.js +2 -0
- package/lib/mjs/components/tabs/Tabs.d.ts +28 -0
- package/lib/mjs/components/tabs/Tabs.form.d.ts +3 -0
- package/lib/mjs/components/tabs/Tabs.form.js +10 -0
- package/lib/mjs/components/tabs/Tabs.js +197 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +49 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +66 -0
- package/lib/mjs/components/tabs/fixtures/comp1.d.ts +23 -0
- package/lib/mjs/components/tabs/fixtures/comp1.js +31 -0
- package/lib/mjs/components/tabs/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/tabs/fixtures/index.js +2 -0
- package/lib/mjs/components/tags/Tags.d.ts +19 -0
- package/lib/mjs/components/tags/Tags.form.d.ts +3 -0
- package/lib/mjs/components/tags/Tags.form.js +10 -0
- package/lib/mjs/components/tags/Tags.js +158 -0
- package/lib/mjs/components/tags/editForm/Tags.edit.data.d.ts +51 -0
- package/lib/mjs/components/tags/editForm/Tags.edit.data.js +37 -0
- package/lib/mjs/components/tags/fixtures/comp1.d.ts +20 -0
- package/lib/mjs/components/tags/fixtures/comp1.js +18 -0
- package/lib/mjs/components/tags/fixtures/comp2.d.ts +10 -0
- package/lib/mjs/components/tags/fixtures/comp2.js +9 -0
- package/lib/mjs/components/tags/fixtures/comp3.d.ts +23 -0
- package/lib/mjs/components/tags/fixtures/comp3.js +18 -0
- package/lib/mjs/components/tags/fixtures/comp4.d.ts +9 -0
- package/lib/mjs/components/tags/fixtures/comp4.js +8 -0
- package/lib/mjs/components/tags/fixtures/comp5.d.ts +24 -0
- package/lib/mjs/components/tags/fixtures/comp5.js +22 -0
- package/lib/mjs/components/tags/fixtures/index.d.ts +6 -0
- package/lib/mjs/components/tags/fixtures/index.js +6 -0
- package/lib/mjs/components/tags/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/tags/fixtures/values.js +4 -0
- package/lib/mjs/components/textarea/TextArea.d.ts +36 -0
- package/lib/mjs/components/textarea/TextArea.form.d.ts +3 -0
- package/lib/mjs/components/textarea/TextArea.form.js +15 -0
- package/lib/mjs/components/textarea/TextArea.js +530 -0
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +355 -0
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +258 -0
- package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.d.ts +10 -0
- package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.js +20 -0
- package/lib/mjs/components/textarea/fixtures/comp1.d.ts +31 -0
- package/lib/mjs/components/textarea/fixtures/comp1.js +29 -0
- package/lib/mjs/components/textarea/fixtures/comp2.d.ts +29 -0
- package/lib/mjs/components/textarea/fixtures/comp2.js +27 -0
- package/lib/mjs/components/textarea/fixtures/comp3.d.ts +27 -0
- package/lib/mjs/components/textarea/fixtures/comp3.js +27 -0
- package/lib/mjs/components/textarea/fixtures/index.d.ts +4 -0
- package/lib/mjs/components/textarea/fixtures/index.js +4 -0
- package/lib/mjs/components/textarea/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/textarea/fixtures/values.js +4 -0
- package/lib/mjs/components/textfield/TextField.d.ts +38 -0
- package/lib/mjs/components/textfield/TextField.form.d.ts +3 -0
- package/lib/mjs/components/textfield/TextField.form.js +20 -0
- package/lib/mjs/components/textfield/TextField.js +218 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.data.d.ts +46 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.data.js +56 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.display.d.ts +248 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +203 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.validation.d.ts +10 -0
- package/lib/mjs/components/textfield/editForm/TextField.edit.validation.js +47 -0
- package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +47 -0
- package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.js +46 -0
- package/lib/mjs/components/textfield/fixtures/comp1.d.ts +33 -0
- package/lib/mjs/components/textfield/fixtures/comp1.js +31 -0
- package/lib/mjs/components/textfield/fixtures/comp2.d.ts +33 -0
- package/lib/mjs/components/textfield/fixtures/comp2.js +31 -0
- package/lib/mjs/components/textfield/fixtures/comp3.d.ts +33 -0
- package/lib/mjs/components/textfield/fixtures/comp3.js +31 -0
- package/lib/mjs/components/textfield/fixtures/comp4.d.ts +23 -0
- package/lib/mjs/components/textfield/fixtures/comp4.js +25 -0
- package/lib/mjs/components/textfield/fixtures/comp5.d.ts +12 -0
- package/lib/mjs/components/textfield/fixtures/comp5.js +11 -0
- package/lib/mjs/components/textfield/fixtures/comp6.d.ts +25 -0
- package/lib/mjs/components/textfield/fixtures/comp6.js +19 -0
- package/lib/mjs/components/textfield/fixtures/comp7.d.ts +37 -0
- package/lib/mjs/components/textfield/fixtures/comp7.js +36 -0
- package/lib/mjs/components/textfield/fixtures/index.d.ts +9 -0
- package/lib/mjs/components/textfield/fixtures/index.js +9 -0
- package/lib/mjs/components/textfield/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/textfield/fixtures/values.js +5 -0
- package/lib/mjs/components/time/Time.d.ts +16 -0
- package/lib/mjs/components/time/Time.form.d.ts +3 -0
- package/lib/mjs/components/time/Time.form.js +15 -0
- package/lib/mjs/components/time/Time.js +142 -0
- package/lib/mjs/components/time/editForm/Time.edit.data.d.ts +10 -0
- package/lib/mjs/components/time/editForm/Time.edit.data.js +11 -0
- package/lib/mjs/components/time/editForm/Time.edit.display.d.ts +52 -0
- package/lib/mjs/components/time/editForm/Time.edit.display.js +40 -0
- package/lib/mjs/components/time/fixtures/comp1.d.ts +24 -0
- package/lib/mjs/components/time/fixtures/comp1.js +22 -0
- package/lib/mjs/components/time/fixtures/comp2.d.ts +10 -0
- package/lib/mjs/components/time/fixtures/comp2.js +9 -0
- package/lib/mjs/components/time/fixtures/comp3.d.ts +15 -0
- package/lib/mjs/components/time/fixtures/comp3.js +16 -0
- package/lib/mjs/components/time/fixtures/index.d.ts +6 -0
- package/lib/mjs/components/time/fixtures/index.js +6 -0
- package/lib/mjs/components/time/fixtures/timeForm.d.ts +47 -0
- package/lib/mjs/components/time/fixtures/timeForm.js +50 -0
- package/lib/mjs/components/time/fixtures/timeForm2.d.ts +38 -0
- package/lib/mjs/components/time/fixtures/timeForm2.js +42 -0
- package/lib/mjs/components/time/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/time/fixtures/values.js +5 -0
- package/lib/mjs/components/tree/Node.d.ts +55 -0
- package/lib/mjs/components/tree/Node.js +179 -0
- package/lib/mjs/components/tree/Tree.d.ts +47 -0
- package/lib/mjs/components/tree/Tree.form.d.ts +3 -0
- package/lib/mjs/components/tree/Tree.form.js +10 -0
- package/lib/mjs/components/tree/Tree.js +385 -0
- package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +5 -0
- package/lib/mjs/components/tree/editForm/Tree.edit.data.js +7 -0
- package/lib/mjs/components/tree/fixtures/comp1.d.ts +23 -0
- package/lib/mjs/components/tree/fixtures/comp1.js +22 -0
- package/lib/mjs/components/tree/fixtures/comp2.d.ts +116 -0
- package/lib/mjs/components/tree/fixtures/comp2.js +80 -0
- package/lib/mjs/components/tree/fixtures/comp3.d.ts +24 -0
- package/lib/mjs/components/tree/fixtures/comp3.js +23 -0
- package/lib/mjs/components/tree/fixtures/comp4.d.ts +42 -0
- package/lib/mjs/components/tree/fixtures/comp4.js +45 -0
- package/lib/mjs/components/tree/fixtures/index.d.ts +5 -0
- package/lib/mjs/components/tree/fixtures/index.js +5 -0
- package/lib/mjs/components/unknown/Unknown.d.ts +28 -0
- package/lib/mjs/components/unknown/Unknown.form.d.ts +34 -0
- package/lib/mjs/components/unknown/Unknown.form.js +19 -0
- package/lib/mjs/components/unknown/Unknown.js +24 -0
- package/lib/mjs/components/unknown/editForm/Unknown.edit.display.d.ts +24 -0
- package/lib/mjs/components/unknown/editForm/Unknown.edit.display.js +25 -0
- package/lib/mjs/components/unknown/fixtures/comp1.d.ts +7 -0
- package/lib/mjs/components/unknown/fixtures/comp1.js +6 -0
- package/lib/mjs/components/unknown/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/unknown/fixtures/index.js +2 -0
- package/lib/mjs/components/url/Url.d.ts +3 -0
- package/lib/mjs/components/url/Url.form.d.ts +3 -0
- package/lib/mjs/components/url/Url.form.js +20 -0
- package/lib/mjs/components/url/Url.js +33 -0
- package/lib/mjs/components/url/editForm/Url.edit.data.d.ts +5 -0
- package/lib/mjs/components/url/editForm/Url.edit.data.js +6 -0
- package/lib/mjs/components/url/editForm/Url.edit.display.d.ts +5 -0
- package/lib/mjs/components/url/editForm/Url.edit.display.js +18 -0
- package/lib/mjs/components/url/editForm/Url.edit.validation.d.ts +5 -0
- package/lib/mjs/components/url/editForm/Url.edit.validation.js +10 -0
- package/lib/mjs/components/url/fixtures/comp1.d.ts +26 -0
- package/lib/mjs/components/url/fixtures/comp1.js +24 -0
- package/lib/mjs/components/url/fixtures/comp2.d.ts +26 -0
- package/lib/mjs/components/url/fixtures/comp2.js +21 -0
- package/lib/mjs/components/url/fixtures/index.d.ts +3 -0
- package/lib/mjs/components/url/fixtures/index.js +3 -0
- package/lib/mjs/components/url/fixtures/values.d.ts +2 -0
- package/lib/mjs/components/url/fixtures/values.js +4 -0
- package/lib/mjs/components/well/Well.d.ts +13 -0
- package/lib/mjs/components/well/Well.form.d.ts +3 -0
- package/lib/mjs/components/well/Well.form.js +10 -0
- package/lib/mjs/components/well/Well.js +35 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +5 -0
- package/lib/mjs/components/well/editForm/Well.edit.display.js +30 -0
- package/lib/mjs/components/well/fixtures/comp1.d.ts +43 -0
- package/lib/mjs/components/well/fixtures/comp1.js +75 -0
- package/lib/mjs/components/well/fixtures/index.d.ts +2 -0
- package/lib/mjs/components/well/fixtures/index.js +2 -0
- package/lib/mjs/displays/Displays.d.ts +18 -0
- package/lib/mjs/displays/Displays.js +24 -0
- package/lib/mjs/displays/index.d.ts +2 -0
- package/lib/mjs/displays/index.js +2 -0
- package/lib/mjs/formio.embed.d.ts +1 -0
- package/lib/mjs/formio.embed.js +2 -0
- package/lib/mjs/formio.form.d.ts +22 -0
- package/lib/mjs/formio.form.js +138 -0
- package/lib/mjs/i18n.d.ts +13 -0
- package/lib/mjs/i18n.js +14 -0
- package/lib/mjs/index.d.ts +4 -0
- package/lib/mjs/index.js +13 -0
- package/lib/mjs/package.json +3 -0
- package/lib/mjs/pdf.image.d.ts +2 -0
- package/lib/mjs/pdf.image.js +94 -0
- package/lib/mjs/polyfills/ElementPolyfill.d.ts +0 -0
- package/lib/mjs/polyfills/ElementPolyfill.js +338 -0
- package/lib/mjs/polyfills/index.d.ts +1 -0
- package/lib/mjs/polyfills/index.js +2 -0
- package/lib/mjs/providers/Providers.d.ts +64 -0
- package/lib/mjs/providers/Providers.js +29 -0
- package/lib/mjs/providers/address/AddressProvider.d.ts +17 -0
- package/lib/mjs/providers/address/AddressProvider.js +54 -0
- package/lib/mjs/providers/address/AzureAddressProvider.d.ts +12 -0
- package/lib/mjs/providers/address/AzureAddressProvider.js +27 -0
- package/lib/mjs/providers/address/CustomAddressProvider.d.ts +7 -0
- package/lib/mjs/providers/address/CustomAddressProvider.js +22 -0
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +18 -0
- package/lib/mjs/providers/address/GoogleAddressProvider.js +110 -0
- package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +11 -0
- package/lib/mjs/providers/address/NominatimAddressProvider.js +27 -0
- package/lib/mjs/providers/address/index.d.ts +6 -0
- package/lib/mjs/providers/address/index.js +10 -0
- package/lib/mjs/providers/auth/index.d.ts +2 -0
- package/lib/mjs/providers/auth/index.js +1 -0
- package/lib/mjs/providers/index.d.ts +2 -0
- package/lib/mjs/providers/index.js +2 -0
- package/lib/mjs/providers/processor/fileProcessor.d.ts +2 -0
- package/lib/mjs/providers/processor/fileProcessor.js +39 -0
- package/lib/mjs/providers/storage/azure.d.ts +8 -0
- package/lib/mjs/providers/storage/azure.js +25 -0
- package/lib/mjs/providers/storage/base64.d.ts +10 -0
- package/lib/mjs/providers/storage/base64.js +30 -0
- package/lib/mjs/providers/storage/dropbox.d.ts +8 -0
- package/lib/mjs/providers/storage/dropbox.js +56 -0
- package/lib/mjs/providers/storage/googleDrive.d.ts +8 -0
- package/lib/mjs/providers/storage/googleDrive.js +55 -0
- package/lib/mjs/providers/storage/index.d.ts +15 -0
- package/lib/mjs/providers/storage/index.js +14 -0
- package/lib/mjs/providers/storage/indexeddb.d.ts +11 -0
- package/lib/mjs/providers/storage/indexeddb.js +119 -0
- package/lib/mjs/providers/storage/s3.d.ts +8 -0
- package/lib/mjs/providers/storage/s3.js +45 -0
- package/lib/mjs/providers/storage/uploadAdapter.d.ts +1 -0
- package/lib/mjs/providers/storage/uploadAdapter.js +55 -0
- package/lib/mjs/providers/storage/url.d.ts +11 -0
- package/lib/mjs/providers/storage/url.js +133 -0
- package/lib/mjs/providers/storage/xhr.d.ts +7 -0
- package/lib/mjs/providers/storage/xhr.js +94 -0
- package/lib/mjs/templates/Templates.d.ts +11 -0
- package/lib/mjs/templates/Templates.js +41 -0
- package/lib/mjs/templates/index.d.ts +4 -0
- package/lib/mjs/templates/index.js +4 -0
- package/lib/mjs/translations/en.d.ts +66 -0
- package/lib/mjs/translations/en.js +65 -0
- package/lib/mjs/utils/ChoicesWrapper.d.ts +37 -0
- package/lib/mjs/utils/ChoicesWrapper.js +169 -0
- package/lib/mjs/utils/Evaluator.d.ts +4 -0
- package/lib/mjs/utils/Evaluator.js +93 -0
- package/lib/mjs/utils/builder.d.ts +22 -0
- package/lib/mjs/utils/builder.js +79 -0
- package/lib/mjs/utils/calendarUtils.d.ts +41 -0
- package/lib/mjs/utils/calendarUtils.js +128 -0
- package/lib/mjs/utils/conditionOperators/ConditionOperator.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/ConditionOperator.js +23 -0
- package/lib/mjs/utils/conditionOperators/DateGreaterThan.d.ts +13 -0
- package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +31 -0
- package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.js +12 -0
- package/lib/mjs/utils/conditionOperators/DateLessThan.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/DateLessThan.js +12 -0
- package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.js +12 -0
- package/lib/mjs/utils/conditionOperators/EndsWith.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/EndsWith.js +13 -0
- package/lib/mjs/utils/conditionOperators/GreaterThan.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/GreaterThan.js +13 -0
- package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.js +13 -0
- package/lib/mjs/utils/conditionOperators/Includes.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/Includes.js +13 -0
- package/lib/mjs/utils/conditionOperators/IsDateEqual.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/IsDateEqual.js +12 -0
- package/lib/mjs/utils/conditionOperators/IsEmptyValue.d.ts +9 -0
- package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +24 -0
- package/lib/mjs/utils/conditionOperators/IsEqualTo.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +24 -0
- package/lib/mjs/utils/conditionOperators/IsNotDateEqual.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/IsNotDateEqual.js +12 -0
- package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.js +12 -0
- package/lib/mjs/utils/conditionOperators/IsNotEqualTo.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/IsNotEqualTo.js +13 -0
- package/lib/mjs/utils/conditionOperators/LessThan.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/LessThan.js +13 -0
- package/lib/mjs/utils/conditionOperators/LessThanOrEqual.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/LessThanOrEqual.js +13 -0
- package/lib/mjs/utils/conditionOperators/NotIncludes.d.ts +4 -0
- package/lib/mjs/utils/conditionOperators/NotIncludes.js +12 -0
- package/lib/mjs/utils/conditionOperators/StartsWith.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/StartsWith.js +13 -0
- package/lib/mjs/utils/conditionOperators/index.d.ts +7 -0
- package/lib/mjs/utils/conditionOperators/index.js +39 -0
- package/lib/mjs/utils/formUtils.d.ts +173 -0
- package/lib/mjs/utils/formUtils.js +560 -0
- package/lib/mjs/utils/index.d.ts +2 -0
- package/lib/mjs/utils/index.js +5 -0
- package/lib/mjs/utils/jsonlogic/operators.d.ts +1 -0
- package/lib/mjs/utils/jsonlogic/operators.js +262 -0
- package/lib/mjs/utils/utils.d.ts +364 -0
- package/lib/mjs/utils/utils.js +1368 -0
- package/lib/mjs/validator/Rules.d.ts +53 -0
- package/lib/mjs/validator/Rules.js +17 -0
- package/lib/mjs/validator/Validator.d.ts +200 -0
- package/lib/mjs/validator/Validator.js +1081 -0
- package/lib/mjs/validator/conjunctions/index.d.ts +7 -0
- package/lib/mjs/validator/conjunctions/index.js +16 -0
- package/lib/mjs/validator/operators/index.d.ts +7 -0
- package/lib/mjs/validator/operators/index.js +16 -0
- package/lib/mjs/validator/quickRules/index.d.ts +7 -0
- package/lib/mjs/validator/quickRules/index.js +16 -0
- package/lib/mjs/validator/rules/Custom.d.ts +5 -0
- package/lib/mjs/validator/rules/Custom.js +22 -0
- package/lib/mjs/validator/rules/Date.d.ts +5 -0
- package/lib/mjs/validator/rules/Date.js +17 -0
- package/lib/mjs/validator/rules/Day.d.ts +5 -0
- package/lib/mjs/validator/rules/Day.js +50 -0
- package/lib/mjs/validator/rules/Email.d.ts +5 -0
- package/lib/mjs/validator/rules/Email.js +16 -0
- package/lib/mjs/validator/rules/JSON.d.ts +5 -0
- package/lib/mjs/validator/rules/JSON.js +21 -0
- package/lib/mjs/validator/rules/Mask.d.ts +5 -0
- package/lib/mjs/validator/rules/Mask.js +24 -0
- package/lib/mjs/validator/rules/Max.d.ts +5 -0
- package/lib/mjs/validator/rules/Max.js +13 -0
- package/lib/mjs/validator/rules/MaxDate.d.ts +5 -0
- package/lib/mjs/validator/rules/MaxDate.js +26 -0
- package/lib/mjs/validator/rules/MaxLength.d.ts +5 -0
- package/lib/mjs/validator/rules/MaxLength.js +12 -0
- package/lib/mjs/validator/rules/MaxWords.d.ts +5 -0
- package/lib/mjs/validator/rules/MaxWords.js +12 -0
- package/lib/mjs/validator/rules/MaxYear.d.ts +5 -0
- package/lib/mjs/validator/rules/MaxYear.js +14 -0
- package/lib/mjs/validator/rules/Min.d.ts +5 -0
- package/lib/mjs/validator/rules/Min.js +13 -0
- package/lib/mjs/validator/rules/MinDate.d.ts +5 -0
- package/lib/mjs/validator/rules/MinDate.js +22 -0
- package/lib/mjs/validator/rules/MinLength.d.ts +5 -0
- package/lib/mjs/validator/rules/MinLength.js +12 -0
- package/lib/mjs/validator/rules/MinWords.d.ts +5 -0
- package/lib/mjs/validator/rules/MinWords.js +12 -0
- package/lib/mjs/validator/rules/MinYear.d.ts +5 -0
- package/lib/mjs/validator/rules/MinYear.js +14 -0
- package/lib/mjs/validator/rules/Pattern.d.ts +5 -0
- package/lib/mjs/validator/rules/Pattern.js +12 -0
- package/lib/mjs/validator/rules/Required.d.ts +5 -0
- package/lib/mjs/validator/rules/Required.js +9 -0
- package/lib/mjs/validator/rules/Rule.d.ts +7 -0
- package/lib/mjs/validator/rules/Rule.js +10 -0
- package/lib/mjs/validator/rules/Select.d.ts +5 -0
- package/lib/mjs/validator/rules/Select.js +88 -0
- package/lib/mjs/validator/rules/Time.d.ts +5 -0
- package/lib/mjs/validator/rules/Time.js +11 -0
- package/lib/mjs/validator/rules/Unique.d.ts +5 -0
- package/lib/mjs/validator/rules/Unique.js +62 -0
- package/lib/mjs/validator/rules/Url.d.ts +5 -0
- package/lib/mjs/validator/rules/Url.js +15 -0
- package/lib/mjs/validator/rules/index.d.ts +47 -0
- package/lib/mjs/validator/rules/index.js +46 -0
- package/lib/mjs/validator/transformers/index.d.ts +7 -0
- package/lib/mjs/validator/transformers/index.js +16 -0
- package/lib/mjs/validator/valueSources/index.d.ts +7 -0
- package/lib/mjs/validator/valueSources/index.js +16 -0
- package/lib/mjs/widgets/CalendarWidget.d.ts +96 -0
- package/lib/mjs/widgets/CalendarWidget.js +457 -0
- package/lib/mjs/widgets/InputWidget.d.ts +24 -0
- package/lib/mjs/widgets/InputWidget.js +69 -0
- package/lib/mjs/widgets/index.d.ts +7 -0
- package/lib/mjs/widgets/index.js +6 -0
- package/package.json +178 -0
- package/types/builders.d.ts +7 -0
- package/types/components/_classes/component/component.d.ts +174 -0
- package/types/components/_classes/componentmodal/componentmodal.d.ts +31 -0
- package/types/components/_classes/field/field.d.ts +5 -0
- package/types/components/_classes/input/input.d.ts +30 -0
- package/types/components/_classes/multivalue/multivalue.d.ts +16 -0
- package/types/components/_classes/nested/nestedComponent.d.ts +61 -0
- package/types/components/_classes/widgetcomponent/widgetComponent.d.ts +6 -0
- package/types/components/components.d.ts +69 -0
- package/types/components/schema.d.ts +240 -0
- package/types/displays.d.ts +7 -0
- package/types/element.d.ts +45 -0
- package/types/eventEmitter.d.ts +3 -0
- package/types/form.d.ts +18 -0
- package/types/formbuilder.d.ts +6 -0
- package/types/formio.d.ts +119 -0
- package/types/index.d.ts +17 -0
- package/types/providers.d.ts +8 -0
- package/types/rulesEngine/conjunctions.d.ts +7 -0
- package/types/rulesEngine/operators.d.ts +7 -0
- package/types/rulesEngine/quckRules.d.ts +7 -0
- package/types/rulesEngine/rules.d.ts +7 -0
- package/types/rulesEngine/transformers.d.ts +7 -0
- package/types/rulesEngine/valueSources.d.ts +7 -0
- package/types/templates.d.ts +8 -0
- package/types/utils.d.ts +155 -0
- package/types/widgets.d.ts +4 -0
@@ -0,0 +1,3146 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
/* globals Quill, ClassicEditor, CKEDITOR */
|
30
|
+
const vanilla_text_mask_1 = require("@formio/vanilla-text-mask");
|
31
|
+
const native_promise_only_1 = __importDefault(require("native-promise-only"));
|
32
|
+
const tippy_js_1 = __importDefault(require("tippy.js"));
|
33
|
+
const lodash_1 = __importDefault(require("lodash"));
|
34
|
+
const ismobilejs_1 = __importDefault(require("ismobilejs"));
|
35
|
+
const Formio_1 = require("../../../Formio");
|
36
|
+
const FormioUtils = __importStar(require("../../../utils/utils"));
|
37
|
+
const Validator_1 = __importDefault(require("../../../validator/Validator"));
|
38
|
+
const utils_1 = require("../../../utils/utils");
|
39
|
+
const Element_1 = __importDefault(require("../../../Element"));
|
40
|
+
const ComponentModal_1 = __importDefault(require("../componentModal/ComponentModal"));
|
41
|
+
const widgets_1 = __importDefault(require("../../../widgets"));
|
42
|
+
const addons_1 = __importDefault(require("../../../addons"));
|
43
|
+
const uploadAdapter_1 = require("../../../providers/storage/uploadAdapter");
|
44
|
+
const en_1 = __importDefault(require("../../../translations/en"));
|
45
|
+
const Templates_1 = __importDefault(require("../../../templates/Templates"));
|
46
|
+
const isIEBrowser = FormioUtils.getBrowserInfo().ie;
|
47
|
+
/**
|
48
|
+
* This is the Component class
|
49
|
+
which all elements within the FormioForm derive from.
|
50
|
+
*/
|
51
|
+
class Component extends Element_1.default {
|
52
|
+
static schema(...sources) {
|
53
|
+
return lodash_1.default.merge({
|
54
|
+
/**
|
55
|
+
* Determines if this component provides an input.
|
56
|
+
*/
|
57
|
+
input: true,
|
58
|
+
/**
|
59
|
+
* The data key for this component (how the data is stored in the database).
|
60
|
+
*/
|
61
|
+
key: '',
|
62
|
+
/**
|
63
|
+
* The input placeholder for this component.
|
64
|
+
*/
|
65
|
+
placeholder: '',
|
66
|
+
/**
|
67
|
+
* The input prefix
|
68
|
+
*/
|
69
|
+
prefix: '',
|
70
|
+
/**
|
71
|
+
* The custom CSS class to provide to this component.
|
72
|
+
*/
|
73
|
+
customClass: '',
|
74
|
+
/**
|
75
|
+
* The input suffix.
|
76
|
+
*/
|
77
|
+
suffix: '',
|
78
|
+
/**
|
79
|
+
* If this component should allow an array of values to be captured.
|
80
|
+
*/
|
81
|
+
multiple: false,
|
82
|
+
/**
|
83
|
+
* The default value of this component.
|
84
|
+
*/
|
85
|
+
defaultValue: null,
|
86
|
+
/**
|
87
|
+
* If the data of this component should be protected (no GET api requests can see the data)
|
88
|
+
*/
|
89
|
+
protected: false,
|
90
|
+
/**
|
91
|
+
* Validate if the value of this component should be unique within the form.
|
92
|
+
*/
|
93
|
+
unique: false,
|
94
|
+
/**
|
95
|
+
* If the value of this component should be persisted within the backend api database.
|
96
|
+
*/
|
97
|
+
persistent: true,
|
98
|
+
/**
|
99
|
+
* Determines if the component should be within the form, but not visible.
|
100
|
+
*/
|
101
|
+
hidden: false,
|
102
|
+
/**
|
103
|
+
* If the component should be cleared when hidden.
|
104
|
+
*/
|
105
|
+
clearOnHide: true,
|
106
|
+
/**
|
107
|
+
* This will refresh this component options when this field changes.
|
108
|
+
*/
|
109
|
+
refreshOn: '',
|
110
|
+
/**
|
111
|
+
* This will redraw the component when this field changes.
|
112
|
+
*/
|
113
|
+
redrawOn: '',
|
114
|
+
/**
|
115
|
+
* If this component should be included as a column within a submission table.
|
116
|
+
*/
|
117
|
+
tableView: false,
|
118
|
+
/**
|
119
|
+
* If this component should be rendering in modal.
|
120
|
+
*/
|
121
|
+
modalEdit: false,
|
122
|
+
/**
|
123
|
+
* The input label provided to this component.
|
124
|
+
*/
|
125
|
+
label: '',
|
126
|
+
dataGridLabel: false,
|
127
|
+
labelPosition: 'top',
|
128
|
+
description: '',
|
129
|
+
errorLabel: '',
|
130
|
+
tooltip: '',
|
131
|
+
hideLabel: false,
|
132
|
+
tabindex: '',
|
133
|
+
disabled: false,
|
134
|
+
autofocus: false,
|
135
|
+
dbIndex: false,
|
136
|
+
customDefaultValue: '',
|
137
|
+
calculateValue: '',
|
138
|
+
calculateServer: false,
|
139
|
+
widget: null,
|
140
|
+
/**
|
141
|
+
* Attributes that will be assigned to the input elements of this component.
|
142
|
+
*/
|
143
|
+
attributes: {},
|
144
|
+
/**
|
145
|
+
* This will perform the validation on either "change" or "blur" of the input element.
|
146
|
+
*/
|
147
|
+
validateOn: 'change',
|
148
|
+
/**
|
149
|
+
* The validation criteria for this component.
|
150
|
+
*/
|
151
|
+
validate: {
|
152
|
+
/**
|
153
|
+
* If this component is required.
|
154
|
+
*/
|
155
|
+
required: false,
|
156
|
+
/**
|
157
|
+
* Custom JavaScript validation.
|
158
|
+
*/
|
159
|
+
custom: '',
|
160
|
+
/**
|
161
|
+
* If the custom validation should remain private (only the backend will see it and execute it).
|
162
|
+
*/
|
163
|
+
customPrivate: false,
|
164
|
+
/**
|
165
|
+
* If this component should implement a strict date validation if the Calendar widget is implemented.
|
166
|
+
*/
|
167
|
+
strictDateValidation: false,
|
168
|
+
multiple: false,
|
169
|
+
unique: false
|
170
|
+
},
|
171
|
+
/**
|
172
|
+
* The simple conditional settings for a component.
|
173
|
+
*/
|
174
|
+
conditional: {
|
175
|
+
show: null,
|
176
|
+
when: null,
|
177
|
+
eq: ''
|
178
|
+
},
|
179
|
+
overlay: {
|
180
|
+
style: '',
|
181
|
+
left: '',
|
182
|
+
top: '',
|
183
|
+
width: '',
|
184
|
+
height: '',
|
185
|
+
},
|
186
|
+
allowCalculateOverride: false,
|
187
|
+
encrypted: false,
|
188
|
+
showCharCount: false,
|
189
|
+
showWordCount: false,
|
190
|
+
properties: {},
|
191
|
+
allowMultipleMasks: false,
|
192
|
+
addons: [],
|
193
|
+
}, ...sources);
|
194
|
+
}
|
195
|
+
/**
|
196
|
+
* Return the validator as part of the component.
|
197
|
+
*
|
198
|
+
* @return {ValidationChecker}
|
199
|
+
* @constructor
|
200
|
+
*/
|
201
|
+
static get Validator() {
|
202
|
+
return Validator_1.default;
|
203
|
+
}
|
204
|
+
/**
|
205
|
+
* Provides a table view for this component. Override if you wish to do something different than using getView
|
206
|
+
* method of your instance.
|
207
|
+
*
|
208
|
+
* @param value
|
209
|
+
* @param options
|
210
|
+
*/
|
211
|
+
/* eslint-disable no-unused-vars */
|
212
|
+
static tableView(value, options) { }
|
213
|
+
/* eslint-enable no-unused-vars */
|
214
|
+
/**
|
215
|
+
* Initialize a new Component.
|
216
|
+
*
|
217
|
+
* @param {Object} component - The component JSON you wish to initialize.
|
218
|
+
* @param {Object} options - The options for this component.
|
219
|
+
* @param {Object} data - The global data submission object this component will belong.
|
220
|
+
*/
|
221
|
+
/* eslint-disable max-statements */
|
222
|
+
constructor(component, options, data) {
|
223
|
+
super(Object.assign({
|
224
|
+
renderMode: 'form',
|
225
|
+
attachMode: 'full',
|
226
|
+
noDefaults: false
|
227
|
+
}, options || {}));
|
228
|
+
// Restore the component id.
|
229
|
+
if (component && component.id) {
|
230
|
+
this.id = component.id;
|
231
|
+
}
|
232
|
+
/**
|
233
|
+
* Determines if this component has a condition assigned to it.
|
234
|
+
* @type {null}
|
235
|
+
* @private
|
236
|
+
*/
|
237
|
+
this._hasCondition = null;
|
238
|
+
/**
|
239
|
+
* References to dom elements
|
240
|
+
*/
|
241
|
+
this.refs = {};
|
242
|
+
// Allow global override for any component JSON.
|
243
|
+
if (component &&
|
244
|
+
this.options.components &&
|
245
|
+
this.options.components[component.type]) {
|
246
|
+
lodash_1.default.merge(component, this.options.components[component.type]);
|
247
|
+
}
|
248
|
+
/**
|
249
|
+
* Set the validator instance.
|
250
|
+
*/
|
251
|
+
this.validator = Validator_1.default;
|
252
|
+
/**
|
253
|
+
* The data path to this specific component instance.
|
254
|
+
*
|
255
|
+
* @type {string}
|
256
|
+
*/
|
257
|
+
this.path = '';
|
258
|
+
/**
|
259
|
+
* The Form.io component JSON schema.
|
260
|
+
* @type {*}
|
261
|
+
*/
|
262
|
+
this.component = this.mergeSchema(component || {});
|
263
|
+
// Add the id to the component.
|
264
|
+
this.component.id = this.id;
|
265
|
+
this.afterComponentAssign();
|
266
|
+
// Save off the original component to be used in logic.
|
267
|
+
this.originalComponent = (0, utils_1.fastCloneDeep)(this.component);
|
268
|
+
/**
|
269
|
+
* If the component has been attached
|
270
|
+
*/
|
271
|
+
this.attached = false;
|
272
|
+
/**
|
273
|
+
* If the component has been rendered
|
274
|
+
*/
|
275
|
+
this.rendered = false;
|
276
|
+
/**
|
277
|
+
* The data object in which this component resides.
|
278
|
+
* @type {*}
|
279
|
+
*/
|
280
|
+
this._data = data || {};
|
281
|
+
/**
|
282
|
+
* The existing error that this component has.
|
283
|
+
* @type {string}
|
284
|
+
*/
|
285
|
+
this.error = '';
|
286
|
+
/**
|
287
|
+
* Tool tip text after processing
|
288
|
+
* @type {string}
|
289
|
+
*/
|
290
|
+
this.tooltip = '';
|
291
|
+
/**
|
292
|
+
* The row path of this component.
|
293
|
+
* @type {number}
|
294
|
+
*/
|
295
|
+
this.row = this.options.row;
|
296
|
+
/**
|
297
|
+
* Determines if this component is disabled, or not.
|
298
|
+
*
|
299
|
+
* @type {boolean}
|
300
|
+
*/
|
301
|
+
this._disabled = (0, utils_1.boolValue)(this.component.disabled) ? this.component.disabled : false;
|
302
|
+
/**
|
303
|
+
* Points to the root component, usually the FormComponent.
|
304
|
+
*
|
305
|
+
* @type {Component}
|
306
|
+
*/
|
307
|
+
this.root = this.options.root;
|
308
|
+
this.localRoot = this.options.localRoot;
|
309
|
+
/**
|
310
|
+
* If this input has been input and provided value.
|
311
|
+
*
|
312
|
+
* @type {boolean}
|
313
|
+
*/
|
314
|
+
this.pristine = true;
|
315
|
+
/**
|
316
|
+
* Points to the parent component.
|
317
|
+
*
|
318
|
+
* @type {Component}
|
319
|
+
*/
|
320
|
+
this.parent = this.options.parent;
|
321
|
+
this.options.name = this.options.name || 'data';
|
322
|
+
/**
|
323
|
+
* The validators that are assigned to this component.
|
324
|
+
* @type {[string]}
|
325
|
+
*/
|
326
|
+
this.validators = ['required', 'minLength', 'maxLength', 'minWords', 'maxWords', 'custom', 'pattern', 'json', 'mask'];
|
327
|
+
this._path = '';
|
328
|
+
// Nested forms don't have parents so we need to pass their path in.
|
329
|
+
this._parentPath = this.options.parentPath || '';
|
330
|
+
// Needs for Nextgen Rules Engine
|
331
|
+
this.resetCaches();
|
332
|
+
/**
|
333
|
+
* Determines if this component is visible, or not.
|
334
|
+
*/
|
335
|
+
this._parentVisible = this.options.hasOwnProperty('parentVisible') ? this.options.parentVisible : true;
|
336
|
+
this._visible = this._parentVisible && this.conditionallyVisible(null, data);
|
337
|
+
this._parentDisabled = false;
|
338
|
+
/**
|
339
|
+
* Used to trigger a new change in this component.
|
340
|
+
* @type {function} - Call to trigger a change in this component.
|
341
|
+
*/
|
342
|
+
let changes = [];
|
343
|
+
let lastChanged = null;
|
344
|
+
let triggerArgs = [];
|
345
|
+
const _triggerChange = lodash_1.default.debounce((...args) => {
|
346
|
+
if (this.root) {
|
347
|
+
this.root.changing = false;
|
348
|
+
}
|
349
|
+
triggerArgs = [];
|
350
|
+
if (!args[1] && lastChanged) {
|
351
|
+
// Set the changed component if one isn't provided.
|
352
|
+
args[1] = lastChanged;
|
353
|
+
}
|
354
|
+
if (lodash_1.default.isEmpty(args[0]) && lastChanged) {
|
355
|
+
// Set the flags if it is empty and lastChanged exists.
|
356
|
+
args[0] = lastChanged.flags;
|
357
|
+
}
|
358
|
+
lastChanged = null;
|
359
|
+
args[3] = changes;
|
360
|
+
const retVal = this.onChange(...args);
|
361
|
+
changes = [];
|
362
|
+
return retVal;
|
363
|
+
}, 100);
|
364
|
+
this.triggerChange = (...args) => {
|
365
|
+
if (args[1]) {
|
366
|
+
// Make sure that during the debounce that we always track lastChanged component, even if they
|
367
|
+
// don't provide one later.
|
368
|
+
lastChanged = args[1];
|
369
|
+
changes.push(lastChanged);
|
370
|
+
}
|
371
|
+
if (this.root) {
|
372
|
+
this.root.changing = true;
|
373
|
+
}
|
374
|
+
if (args.length) {
|
375
|
+
triggerArgs = args;
|
376
|
+
}
|
377
|
+
return _triggerChange(...triggerArgs);
|
378
|
+
};
|
379
|
+
/**
|
380
|
+
* Used to trigger a redraw event within this component.
|
381
|
+
*
|
382
|
+
* @type {Function}
|
383
|
+
*/
|
384
|
+
this.triggerRedraw = lodash_1.default.debounce(this.redraw.bind(this), 100);
|
385
|
+
/**
|
386
|
+
* list of attached tooltips
|
387
|
+
* @type {Array}
|
388
|
+
*/
|
389
|
+
this.tooltips = [];
|
390
|
+
/**
|
391
|
+
* List of attached addons
|
392
|
+
* @type {Array}
|
393
|
+
*/
|
394
|
+
this.addons = [];
|
395
|
+
// To force this component to be invalid.
|
396
|
+
this.invalid = false;
|
397
|
+
if (this.component) {
|
398
|
+
this.type = this.component.type;
|
399
|
+
if (this.allowData && this.key) {
|
400
|
+
this.options.name += `[${this.key}]`;
|
401
|
+
// If component is visible or not set to clear on hide, set the default value.
|
402
|
+
if (this.visible || !this.component.clearOnHide) {
|
403
|
+
if (!this.hasValue()) {
|
404
|
+
if (this.shouldAddDefaultValue) {
|
405
|
+
this.dataValue = this.defaultValue;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
else {
|
409
|
+
// Ensure the dataValue is set.
|
410
|
+
/* eslint-disable no-self-assign */
|
411
|
+
this.dataValue = this.dataValue;
|
412
|
+
/* eslint-enable no-self-assign */
|
413
|
+
}
|
414
|
+
}
|
415
|
+
}
|
416
|
+
/**
|
417
|
+
* The element information for creating the input element.
|
418
|
+
* @type {*}
|
419
|
+
*/
|
420
|
+
this.info = this.elementInfo();
|
421
|
+
}
|
422
|
+
// Allow anyone to hook into the component creation.
|
423
|
+
this.hook('component');
|
424
|
+
if (!this.options.skipInit) {
|
425
|
+
this.init();
|
426
|
+
}
|
427
|
+
}
|
428
|
+
/* eslint-enable max-statements */
|
429
|
+
get data() {
|
430
|
+
return this._data;
|
431
|
+
}
|
432
|
+
set data(value) {
|
433
|
+
this._data = value;
|
434
|
+
}
|
435
|
+
mergeSchema(component = {}) {
|
436
|
+
return lodash_1.default.defaultsDeep(component, this.defaultSchema);
|
437
|
+
}
|
438
|
+
// Allow componets to notify when ready.
|
439
|
+
get ready() {
|
440
|
+
return native_promise_only_1.default.resolve(this);
|
441
|
+
}
|
442
|
+
get isPDFReadOnlyMode() {
|
443
|
+
return this.parent &&
|
444
|
+
this.parent.form &&
|
445
|
+
(this.parent.form.display === 'pdf') &&
|
446
|
+
this.options.readOnly;
|
447
|
+
}
|
448
|
+
get labelInfo() {
|
449
|
+
const label = {};
|
450
|
+
label.hidden = this.labelIsHidden();
|
451
|
+
label.className = '';
|
452
|
+
label.labelPosition = this.component.labelPosition;
|
453
|
+
label.tooltipClass = `${this.iconClass('question-sign')} text-muted`;
|
454
|
+
const isPDFReadOnlyMode = this.isPDFReadOnlyMode;
|
455
|
+
if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {
|
456
|
+
label.className += ' field-required';
|
457
|
+
}
|
458
|
+
if (label.hidden) {
|
459
|
+
label.className += ' control-label--hidden';
|
460
|
+
}
|
461
|
+
if (this.info.attr.id) {
|
462
|
+
label.for = this.info.attr.id;
|
463
|
+
}
|
464
|
+
return label;
|
465
|
+
}
|
466
|
+
init() {
|
467
|
+
var _a;
|
468
|
+
this.disabled = this.shouldDisabled;
|
469
|
+
this._visible = this.conditionallyVisible(null, null);
|
470
|
+
if ((_a = this.component.addons) === null || _a === void 0 ? void 0 : _a.length) {
|
471
|
+
this.component.addons.forEach((addon) => this.createAddon(addon));
|
472
|
+
}
|
473
|
+
}
|
474
|
+
afterComponentAssign() {
|
475
|
+
//implement in extended classes
|
476
|
+
}
|
477
|
+
createAddon(addonConfiguration) {
|
478
|
+
var _a;
|
479
|
+
const name = addonConfiguration.name;
|
480
|
+
if (!name) {
|
481
|
+
return;
|
482
|
+
}
|
483
|
+
const settings = ((_a = addonConfiguration.settings) === null || _a === void 0 ? void 0 : _a.data) || {};
|
484
|
+
const Addon = addons_1.default[name.value];
|
485
|
+
let addon = null;
|
486
|
+
if (Addon) {
|
487
|
+
const supportedComponents = Addon.info.supportedComponents;
|
488
|
+
const supportsThisComponentType = !(supportedComponents === null || supportedComponents === void 0 ? void 0 : supportedComponents.length) ||
|
489
|
+
supportedComponents.indexOf(this.component.type) !== -1;
|
490
|
+
if (supportsThisComponentType) {
|
491
|
+
addon = new Addon(settings, this);
|
492
|
+
this.addons.push(addon);
|
493
|
+
}
|
494
|
+
else {
|
495
|
+
console.warn(`Addon ${name.label} does not support component of type ${this.component.type}.`);
|
496
|
+
}
|
497
|
+
}
|
498
|
+
return addon;
|
499
|
+
}
|
500
|
+
teardown() {
|
501
|
+
if (this.element) {
|
502
|
+
delete this.element.component;
|
503
|
+
delete this.element;
|
504
|
+
}
|
505
|
+
delete this._currentForm;
|
506
|
+
delete this.parent;
|
507
|
+
delete this.root;
|
508
|
+
delete this.triggerChange;
|
509
|
+
delete this.triggerRedraw;
|
510
|
+
if (this.options) {
|
511
|
+
delete this.options.root;
|
512
|
+
delete this.options.parent;
|
513
|
+
delete this.options.i18next;
|
514
|
+
}
|
515
|
+
super.teardown();
|
516
|
+
}
|
517
|
+
destroy(all = false) {
|
518
|
+
super.destroy(all);
|
519
|
+
this.detach();
|
520
|
+
this.addons.forEach((addon) => addon.destroy());
|
521
|
+
if (all) {
|
522
|
+
this.teardown();
|
523
|
+
}
|
524
|
+
}
|
525
|
+
get shouldDisabled() {
|
526
|
+
return this.options.readOnly || this.component.disabled || (this.options.hasOwnProperty('disabled') && this.options.disabled[this.key]);
|
527
|
+
}
|
528
|
+
get isInputComponent() {
|
529
|
+
return !this.component.hasOwnProperty('input') || this.component.input;
|
530
|
+
}
|
531
|
+
get allowData() {
|
532
|
+
return this.hasInput;
|
533
|
+
}
|
534
|
+
get hasInput() {
|
535
|
+
return this.isInputComponent || (this.refs.input && this.refs.input.length);
|
536
|
+
}
|
537
|
+
get defaultSchema() {
|
538
|
+
return Component.schema();
|
539
|
+
}
|
540
|
+
get key() {
|
541
|
+
return lodash_1.default.get(this.component, 'key', '');
|
542
|
+
}
|
543
|
+
set parentVisible(value) {
|
544
|
+
this._parentVisible = value;
|
545
|
+
}
|
546
|
+
get parentVisible() {
|
547
|
+
return this._parentVisible;
|
548
|
+
}
|
549
|
+
set parentDisabled(value) {
|
550
|
+
this._parentDisabled = value;
|
551
|
+
}
|
552
|
+
get parentDisabled() {
|
553
|
+
return this._parentDisabled;
|
554
|
+
}
|
555
|
+
/**
|
556
|
+
*
|
557
|
+
* @param value {boolean}
|
558
|
+
*/
|
559
|
+
set visible(value) {
|
560
|
+
if (this._visible !== value) {
|
561
|
+
this._visible = value;
|
562
|
+
this.clearOnHide();
|
563
|
+
this.redraw();
|
564
|
+
}
|
565
|
+
}
|
566
|
+
/**
|
567
|
+
*
|
568
|
+
* @returns {boolean}
|
569
|
+
*/
|
570
|
+
get visible() {
|
571
|
+
// Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.
|
572
|
+
if (this.builderMode || this.previewMode || this.options.showHiddenFields) {
|
573
|
+
return true;
|
574
|
+
}
|
575
|
+
if (this.options.hide &&
|
576
|
+
this.options.hide[this.component.key]) {
|
577
|
+
return false;
|
578
|
+
}
|
579
|
+
if (this.options.show &&
|
580
|
+
this.options.show[this.component.key]) {
|
581
|
+
return true;
|
582
|
+
}
|
583
|
+
return this._visible && this._parentVisible;
|
584
|
+
}
|
585
|
+
get currentForm() {
|
586
|
+
return this._currentForm;
|
587
|
+
}
|
588
|
+
set currentForm(instance) {
|
589
|
+
this._currentForm = instance;
|
590
|
+
}
|
591
|
+
get fullMode() {
|
592
|
+
return this.options.attachMode === 'full';
|
593
|
+
}
|
594
|
+
get builderMode() {
|
595
|
+
return this.options.attachMode === 'builder';
|
596
|
+
}
|
597
|
+
get calculatedPath() {
|
598
|
+
console.error('component.calculatedPath was deprecated, use component.path instead.');
|
599
|
+
return this.path;
|
600
|
+
}
|
601
|
+
get labelPosition() {
|
602
|
+
return this.component.labelPosition;
|
603
|
+
}
|
604
|
+
get labelWidth() {
|
605
|
+
const width = this.component.labelWidth;
|
606
|
+
return width >= 0 ? width : 30;
|
607
|
+
}
|
608
|
+
get labelMargin() {
|
609
|
+
const margin = this.component.labelMargin;
|
610
|
+
return margin >= 0 ? margin : 3;
|
611
|
+
}
|
612
|
+
get isAdvancedLabel() {
|
613
|
+
return [
|
614
|
+
'left-left',
|
615
|
+
'left-right',
|
616
|
+
'right-left',
|
617
|
+
'right-right'
|
618
|
+
].includes(this.labelPosition);
|
619
|
+
}
|
620
|
+
get labelPositions() {
|
621
|
+
return this.labelPosition.split('-');
|
622
|
+
}
|
623
|
+
get skipInEmail() {
|
624
|
+
return false;
|
625
|
+
}
|
626
|
+
rightDirection(direction) {
|
627
|
+
if (this.options.condensedMode) {
|
628
|
+
return false;
|
629
|
+
}
|
630
|
+
return direction === 'right';
|
631
|
+
}
|
632
|
+
getLabelInfo(isCondensed = false) {
|
633
|
+
const isRightPosition = this.rightDirection(this.labelPositions[0]);
|
634
|
+
const isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;
|
635
|
+
const isRightAlign = this.rightDirection(this.labelPositions[1]);
|
636
|
+
let contentMargin = '';
|
637
|
+
if (this.component.hideLabel) {
|
638
|
+
const margin = this.labelWidth + this.labelMargin;
|
639
|
+
contentMargin = isRightPosition ? `margin-right: ${margin}%` : '';
|
640
|
+
contentMargin = isLeftPosition ? `margin-left: ${margin}%` : '';
|
641
|
+
}
|
642
|
+
const labelStyles = `
|
643
|
+
flex: ${this.labelWidth};
|
644
|
+
${isRightPosition ? 'margin-left' : 'margin-right'}: ${this.labelMargin}%;
|
645
|
+
`;
|
646
|
+
const contentStyles = `
|
647
|
+
flex: ${100 - this.labelWidth - this.labelMargin};
|
648
|
+
${contentMargin};
|
649
|
+
${this.component.hideLabel ? `max-width: ${100 - this.labelWidth - this.labelMargin}` : ''};
|
650
|
+
`;
|
651
|
+
return {
|
652
|
+
isRightPosition,
|
653
|
+
isRightAlign,
|
654
|
+
labelStyles,
|
655
|
+
contentStyles
|
656
|
+
};
|
657
|
+
}
|
658
|
+
/**
|
659
|
+
* Returns only the schema that is different from the default.
|
660
|
+
*
|
661
|
+
* @param schema
|
662
|
+
* @param defaultSchema
|
663
|
+
*/
|
664
|
+
getModifiedSchema(schema, defaultSchema, recursion) {
|
665
|
+
const modified = {};
|
666
|
+
if (!defaultSchema) {
|
667
|
+
return schema;
|
668
|
+
}
|
669
|
+
lodash_1.default.each(schema, (val, key) => {
|
670
|
+
if (!lodash_1.default.isArray(val) && lodash_1.default.isObject(val) && defaultSchema.hasOwnProperty(key)) {
|
671
|
+
const subModified = this.getModifiedSchema(val, defaultSchema[key], true);
|
672
|
+
if (!lodash_1.default.isEmpty(subModified)) {
|
673
|
+
modified[key] = subModified;
|
674
|
+
}
|
675
|
+
}
|
676
|
+
else if (lodash_1.default.isArray(val)) {
|
677
|
+
if (val.length !== 0 && !lodash_1.default.isEqual(val, defaultSchema[key])) {
|
678
|
+
modified[key] = val;
|
679
|
+
}
|
680
|
+
}
|
681
|
+
else if ((!recursion && (key === 'type')) ||
|
682
|
+
(!recursion && (key === 'key')) ||
|
683
|
+
(!recursion && (key === 'label')) ||
|
684
|
+
(!recursion && (key === 'input')) ||
|
685
|
+
(!recursion && (key === 'tableView')) ||
|
686
|
+
(val !== '' && !defaultSchema.hasOwnProperty(key)) ||
|
687
|
+
(val !== '' && val !== defaultSchema[key]) ||
|
688
|
+
(defaultSchema[key] && val !== defaultSchema[key])) {
|
689
|
+
modified[key] = val;
|
690
|
+
}
|
691
|
+
});
|
692
|
+
return modified;
|
693
|
+
}
|
694
|
+
/**
|
695
|
+
* Returns the JSON schema for this component.
|
696
|
+
*/
|
697
|
+
get schema() {
|
698
|
+
return (0, utils_1.fastCloneDeep)(this.getModifiedSchema(lodash_1.default.omit(this.component, 'id'), this.defaultSchema));
|
699
|
+
}
|
700
|
+
/**
|
701
|
+
* Returns true if component is inside DataGrid
|
702
|
+
*/
|
703
|
+
get isInDataGrid() {
|
704
|
+
return this.inDataGrid;
|
705
|
+
}
|
706
|
+
/**
|
707
|
+
* Translate a text using the i18n system.
|
708
|
+
*
|
709
|
+
* @param {string} text - The i18n identifier.
|
710
|
+
* @param {Object} params - The i18n parameters to use for translation.
|
711
|
+
*/
|
712
|
+
t(text, params = {}, ...args) {
|
713
|
+
if (!text) {
|
714
|
+
return '';
|
715
|
+
}
|
716
|
+
// Use _userInput: true to ignore translations from defaults
|
717
|
+
if (text in en_1.default && params._userInput) {
|
718
|
+
return text;
|
719
|
+
}
|
720
|
+
params.data = this.rootValue;
|
721
|
+
params.row = this.data;
|
722
|
+
params.component = this.component;
|
723
|
+
return super.t(text, params, ...args);
|
724
|
+
}
|
725
|
+
labelIsHidden() {
|
726
|
+
return !this.component.label ||
|
727
|
+
((!this.isInDataGrid && this.component.hideLabel) ||
|
728
|
+
(this.isInDataGrid && !this.component.dataGridLabel) ||
|
729
|
+
this.options.inputsOnly) && !this.builderMode;
|
730
|
+
}
|
731
|
+
transform(type, value) {
|
732
|
+
const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;
|
733
|
+
return frameworkTemplates.hasOwnProperty('transform')
|
734
|
+
? frameworkTemplates.transform(type, value, this)
|
735
|
+
: (type, value) => value;
|
736
|
+
}
|
737
|
+
getTemplate(names, modes) {
|
738
|
+
modes = Array.isArray(modes) ? modes : [modes];
|
739
|
+
names = Array.isArray(names) ? names : [names];
|
740
|
+
if (!modes.includes('form')) {
|
741
|
+
modes.push('form');
|
742
|
+
}
|
743
|
+
let result = null;
|
744
|
+
if (this.options.templates) {
|
745
|
+
result = this.checkTemplate(this.options.templates, names, modes);
|
746
|
+
if (result) {
|
747
|
+
return result;
|
748
|
+
}
|
749
|
+
}
|
750
|
+
const frameworkTemplates = this.options.template ? Templates_1.default.templates[this.options.template] : Templates_1.default.current;
|
751
|
+
result = this.checkTemplate(frameworkTemplates, names, modes);
|
752
|
+
if (result) {
|
753
|
+
return result;
|
754
|
+
}
|
755
|
+
// Default back to bootstrap if not defined.
|
756
|
+
const name = names[names.length - 1];
|
757
|
+
const templatesByName = Templates_1.default.defaultTemplates[name];
|
758
|
+
if (!templatesByName) {
|
759
|
+
return `Unknown template: ${name}`;
|
760
|
+
}
|
761
|
+
const templateByMode = this.checkTemplateMode(templatesByName, modes);
|
762
|
+
if (templateByMode) {
|
763
|
+
return templateByMode;
|
764
|
+
}
|
765
|
+
return templatesByName.form;
|
766
|
+
}
|
767
|
+
checkTemplate(templates, names, modes) {
|
768
|
+
for (const name of names) {
|
769
|
+
const templatesByName = templates[name];
|
770
|
+
if (templatesByName) {
|
771
|
+
const templateByMode = this.checkTemplateMode(templatesByName, modes);
|
772
|
+
if (templateByMode) {
|
773
|
+
return templateByMode;
|
774
|
+
}
|
775
|
+
}
|
776
|
+
}
|
777
|
+
return null;
|
778
|
+
}
|
779
|
+
checkTemplateMode(templatesByName, modes) {
|
780
|
+
for (const mode of modes) {
|
781
|
+
const templateByMode = templatesByName[mode];
|
782
|
+
if (templateByMode) {
|
783
|
+
return templateByMode;
|
784
|
+
}
|
785
|
+
}
|
786
|
+
return null;
|
787
|
+
}
|
788
|
+
getFormattedAttribute(attr) {
|
789
|
+
return attr ? this.t(attr, { _userInput: true }).replace(/"/g, '"') : '';
|
790
|
+
}
|
791
|
+
getFormattedTooltip(tooltipValue) {
|
792
|
+
const tooltip = this.interpolate(tooltipValue || '').replace(/(?:\r\n|\r|\n)/g, '<br />');
|
793
|
+
return this.getFormattedAttribute(tooltip);
|
794
|
+
}
|
795
|
+
isHtmlRenderMode() {
|
796
|
+
return this.options.renderMode === 'html';
|
797
|
+
}
|
798
|
+
renderTemplate(name, data = {}, modeOption) {
|
799
|
+
// Need to make this fall back to form if renderMode is not found similar to how we search templates.
|
800
|
+
const mode = modeOption || this.options.renderMode || 'form';
|
801
|
+
data.component = this.component;
|
802
|
+
data.self = this;
|
803
|
+
data.options = this.options;
|
804
|
+
data.readOnly = this.options.readOnly;
|
805
|
+
data.iconClass = this.iconClass.bind(this);
|
806
|
+
data.size = this.size.bind(this);
|
807
|
+
data.t = this.t.bind(this);
|
808
|
+
data.transform = this.transform.bind(this);
|
809
|
+
data.id = data.id || this.id;
|
810
|
+
data.key = data.key || this.key;
|
811
|
+
data.value = data.value || this.dataValue;
|
812
|
+
data.disabled = this.disabled;
|
813
|
+
data.builder = this.builderMode;
|
814
|
+
data.render = (...args) => {
|
815
|
+
console.warn(`Form.io 'render' template function is deprecated.
|
816
|
+
If you need to render template (template A) inside of another template (template B),
|
817
|
+
pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`);
|
818
|
+
return this.renderTemplate(...args);
|
819
|
+
};
|
820
|
+
data.label = data.labelInfo || this.labelInfo;
|
821
|
+
data.tooltip = this.getFormattedTooltip(this.component.tooltip);
|
822
|
+
// Allow more specific template names
|
823
|
+
const names = [
|
824
|
+
`${name}-${this.component.type}-${this.key}`,
|
825
|
+
`${name}-${this.component.type}`,
|
826
|
+
`${name}-${this.key}`,
|
827
|
+
`${name}`,
|
828
|
+
];
|
829
|
+
// Allow template alters.
|
830
|
+
return this.hook(`render${name.charAt(0).toUpperCase() + name.substring(1, name.length)}`, this.interpolate(this.getTemplate(names, mode), data), data, mode);
|
831
|
+
}
|
832
|
+
/**
|
833
|
+
* Sanitize an html string.
|
834
|
+
*
|
835
|
+
* @param string
|
836
|
+
* @returns {*}
|
837
|
+
*/
|
838
|
+
sanitize(dirty, forceSanitize, options) {
|
839
|
+
var _a;
|
840
|
+
// No need to sanitize when generating PDF'S since no users interact with the form.
|
841
|
+
if ((!this.shouldSanitizeValue && !forceSanitize) || ((this.options.pdf) && !forceSanitize)) {
|
842
|
+
return dirty;
|
843
|
+
}
|
844
|
+
return FormioUtils.sanitize(dirty, {
|
845
|
+
sanitizeConfig: lodash_1.default.merge(((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitizeConfig) || {}, options || {}),
|
846
|
+
});
|
847
|
+
}
|
848
|
+
/**
|
849
|
+
* Render a template string into html.
|
850
|
+
*
|
851
|
+
* @param template
|
852
|
+
* @param data
|
853
|
+
* @param actions
|
854
|
+
*
|
855
|
+
* @return {HTMLElement|String} - The created element or an empty string if template is not specified.
|
856
|
+
*/
|
857
|
+
renderString(template, data) {
|
858
|
+
if (!template) {
|
859
|
+
return '';
|
860
|
+
}
|
861
|
+
// Interpolate the template and populate
|
862
|
+
return this.interpolate(template, data);
|
863
|
+
}
|
864
|
+
performInputMapping(input) {
|
865
|
+
return input;
|
866
|
+
}
|
867
|
+
get widget() {
|
868
|
+
var _a;
|
869
|
+
const settings = this.component.widget;
|
870
|
+
if (settings && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.shadowRoot)) {
|
871
|
+
settings.shadowRoot = this.root.shadowRoot;
|
872
|
+
}
|
873
|
+
const widget = settings && widgets_1.default[settings.type] ? new widgets_1.default[settings.type](settings, this.component, this) : null;
|
874
|
+
return widget;
|
875
|
+
}
|
876
|
+
getBrowserLanguage() {
|
877
|
+
const nav = window.navigator;
|
878
|
+
const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];
|
879
|
+
let language;
|
880
|
+
// support for HTML 5.1 "navigator.languages"
|
881
|
+
if (Array.isArray(nav.languages)) {
|
882
|
+
for (let i = 0; i < nav.languages.length; i++) {
|
883
|
+
language = nav.languages[i];
|
884
|
+
if (language && language.length) {
|
885
|
+
return language.split(';')[0];
|
886
|
+
}
|
887
|
+
}
|
888
|
+
}
|
889
|
+
// support for other well known properties in browsers
|
890
|
+
for (let i = 0; i < browserLanguagePropertyKeys.length; i++) {
|
891
|
+
language = nav[browserLanguagePropertyKeys[i]];
|
892
|
+
if (language && language.length) {
|
893
|
+
return language.split(';')[0];
|
894
|
+
}
|
895
|
+
}
|
896
|
+
return null;
|
897
|
+
}
|
898
|
+
/**
|
899
|
+
* Called before a next and previous page is triggered allowing the components
|
900
|
+
* to perform special functions.
|
901
|
+
*
|
902
|
+
* @return {*}
|
903
|
+
*/
|
904
|
+
beforePage() {
|
905
|
+
return native_promise_only_1.default.resolve(true);
|
906
|
+
}
|
907
|
+
beforeNext() {
|
908
|
+
return this.beforePage(true);
|
909
|
+
}
|
910
|
+
/**
|
911
|
+
* Called before a submission is triggered allowing the components
|
912
|
+
* to perform special async functions.
|
913
|
+
*
|
914
|
+
* @return {*}
|
915
|
+
*/
|
916
|
+
beforeSubmit() {
|
917
|
+
return native_promise_only_1.default.resolve(true);
|
918
|
+
}
|
919
|
+
/**
|
920
|
+
* Return the submission timezone.
|
921
|
+
*
|
922
|
+
* @return {*}
|
923
|
+
*/
|
924
|
+
get submissionTimezone() {
|
925
|
+
this.options.submissionTimezone = this.options.submissionTimezone || lodash_1.default.get(this.root, 'options.submissionTimezone');
|
926
|
+
return this.options.submissionTimezone;
|
927
|
+
}
|
928
|
+
get timezone() {
|
929
|
+
return this.getTimezone(this.component);
|
930
|
+
}
|
931
|
+
getTimezone(settings) {
|
932
|
+
if (settings.timezone) {
|
933
|
+
return settings.timezone;
|
934
|
+
}
|
935
|
+
if (settings.displayInTimezone === 'utc') {
|
936
|
+
return 'UTC';
|
937
|
+
}
|
938
|
+
const submissionTimezone = this.submissionTimezone;
|
939
|
+
if (submissionTimezone &&
|
940
|
+
((settings.displayInTimezone === 'submission') ||
|
941
|
+
((this.options.pdf || this.options.server) && (settings.displayInTimezone === 'viewer')))) {
|
942
|
+
return submissionTimezone;
|
943
|
+
}
|
944
|
+
// Return current timezone if none are provided.
|
945
|
+
return (0, utils_1.currentTimezone)();
|
946
|
+
}
|
947
|
+
loadRefs(element, refs) {
|
948
|
+
for (const ref in refs) {
|
949
|
+
const refType = refs[ref];
|
950
|
+
const isString = typeof refType === 'string';
|
951
|
+
const selector = isString && refType.includes('scope') ? `:scope > [ref="${ref}"]` : `[ref="${ref}"]`;
|
952
|
+
if (isString && refType.startsWith('single')) {
|
953
|
+
this.refs[ref] = element.querySelector(selector);
|
954
|
+
}
|
955
|
+
else {
|
956
|
+
this.refs[ref] = element.querySelectorAll(selector);
|
957
|
+
}
|
958
|
+
}
|
959
|
+
}
|
960
|
+
setOpenModalElement(template) {
|
961
|
+
this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());
|
962
|
+
}
|
963
|
+
getModalPreviewTemplate() {
|
964
|
+
var _a;
|
965
|
+
const dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;
|
966
|
+
const message = this.error ? {
|
967
|
+
level: 'error',
|
968
|
+
message: this.error.message,
|
969
|
+
} : '';
|
970
|
+
let modalLabel;
|
971
|
+
if (this.hasInput && ((_a = this.component.validate) === null || _a === void 0 ? void 0 : _a.required) && !this.isPDFReadOnlyMode) {
|
972
|
+
modalLabel = { className: 'field-required' };
|
973
|
+
}
|
974
|
+
return this.renderTemplate('modalPreview', {
|
975
|
+
previewText: this.getValueAsString(dataValue, { modalPreview: true }) || this.t('Click to set value'),
|
976
|
+
messages: message && this.renderTemplate('message', message),
|
977
|
+
labelInfo: modalLabel,
|
978
|
+
});
|
979
|
+
}
|
980
|
+
build(element) {
|
981
|
+
element = element || this.element;
|
982
|
+
this.empty(element);
|
983
|
+
this.setContent(element, this.render());
|
984
|
+
return this.attach(element);
|
985
|
+
}
|
986
|
+
get hasModalSaveButton() {
|
987
|
+
return true;
|
988
|
+
}
|
989
|
+
render(children = `Unknown component: ${this.component.type}`, topLevel = false) {
|
990
|
+
const isVisible = this.visible;
|
991
|
+
this.rendered = true;
|
992
|
+
if (!this.builderMode && !this.previewMode && this.component.modalEdit) {
|
993
|
+
return ComponentModal_1.default.render(this, {
|
994
|
+
visible: isVisible,
|
995
|
+
showSaveButton: this.hasModalSaveButton,
|
996
|
+
id: this.id,
|
997
|
+
classes: this.className,
|
998
|
+
styles: this.customStyle,
|
999
|
+
children
|
1000
|
+
}, topLevel);
|
1001
|
+
}
|
1002
|
+
else {
|
1003
|
+
return this.renderTemplate('component', {
|
1004
|
+
visible: isVisible,
|
1005
|
+
id: this.id,
|
1006
|
+
classes: this.className,
|
1007
|
+
styles: this.customStyle,
|
1008
|
+
children
|
1009
|
+
}, topLevel);
|
1010
|
+
}
|
1011
|
+
}
|
1012
|
+
attachTooltips(toolTipsRefs) {
|
1013
|
+
toolTipsRefs === null || toolTipsRefs === void 0 ? void 0 : toolTipsRefs.forEach((tooltip, index) => {
|
1014
|
+
if (tooltip) {
|
1015
|
+
const tooltipAttribute = tooltip.getAttribute('data-tooltip');
|
1016
|
+
const tooltipDataTitle = tooltip.getAttribute('data-title');
|
1017
|
+
const tooltipText = this.interpolate(tooltipDataTitle || tooltipAttribute)
|
1018
|
+
.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
1019
|
+
this.tooltips[index] = (0, tippy_js_1.default)(tooltip, {
|
1020
|
+
allowHTML: true,
|
1021
|
+
trigger: 'mouseenter click focus',
|
1022
|
+
placement: 'right',
|
1023
|
+
zIndex: 10000,
|
1024
|
+
interactive: true,
|
1025
|
+
content: this.t(tooltipText, { _userInput: true }),
|
1026
|
+
});
|
1027
|
+
}
|
1028
|
+
});
|
1029
|
+
}
|
1030
|
+
createComponentModal(element, modalShouldBeOpened, currentValue) {
|
1031
|
+
return new ComponentModal_1.default(this, element, modalShouldBeOpened, currentValue);
|
1032
|
+
}
|
1033
|
+
attach(element) {
|
1034
|
+
if (!this.builderMode && !this.previewMode && this.component.modalEdit) {
|
1035
|
+
const modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;
|
1036
|
+
const currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;
|
1037
|
+
const openModalTemplate = this.componentModal && modalShouldBeOpened
|
1038
|
+
? this.componentModal.openModalTemplate
|
1039
|
+
: null;
|
1040
|
+
this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);
|
1041
|
+
this.setOpenModalElement(openModalTemplate);
|
1042
|
+
}
|
1043
|
+
this.attached = true;
|
1044
|
+
this.setElement(element);
|
1045
|
+
element.component = this;
|
1046
|
+
// If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.
|
1047
|
+
if (this.element.id) {
|
1048
|
+
this.id = this.element.id;
|
1049
|
+
this.component.id = this.id;
|
1050
|
+
}
|
1051
|
+
this.loadRefs(element, {
|
1052
|
+
messageContainer: 'single',
|
1053
|
+
tooltip: 'multiple'
|
1054
|
+
});
|
1055
|
+
this.attachTooltips(this.refs.tooltip);
|
1056
|
+
// Attach logic.
|
1057
|
+
this.attachLogic();
|
1058
|
+
this.autofocus();
|
1059
|
+
// Allow global attach.
|
1060
|
+
this.hook('attachComponent', element, this);
|
1061
|
+
// Allow attach per component type.
|
1062
|
+
const type = this.component.type;
|
1063
|
+
if (type) {
|
1064
|
+
this.hook(`attach${type.charAt(0).toUpperCase() + type.substring(1, type.length)}`, element, this);
|
1065
|
+
}
|
1066
|
+
this.restoreFocus();
|
1067
|
+
this.addons.forEach((addon) => addon.attach(element));
|
1068
|
+
return native_promise_only_1.default.resolve();
|
1069
|
+
}
|
1070
|
+
restoreFocus() {
|
1071
|
+
var _a, _b, _c;
|
1072
|
+
const isFocused = ((_b = (_a = this.root) === null || _a === void 0 ? void 0 : _a.focusedComponent) === null || _b === void 0 ? void 0 : _b.path) === this.path;
|
1073
|
+
if (isFocused) {
|
1074
|
+
this.loadRefs(this.element, { input: 'multiple' });
|
1075
|
+
this.focus((_c = this.root.currentSelection) === null || _c === void 0 ? void 0 : _c.index);
|
1076
|
+
this.restoreCaretPosition();
|
1077
|
+
}
|
1078
|
+
}
|
1079
|
+
addShortcut(element, shortcut) {
|
1080
|
+
// Avoid infinite recursion.
|
1081
|
+
if (!element || !this.root || (this.root === this)) {
|
1082
|
+
return;
|
1083
|
+
}
|
1084
|
+
if (!shortcut) {
|
1085
|
+
shortcut = this.component.shortcut;
|
1086
|
+
}
|
1087
|
+
this.root.addShortcut(element, shortcut);
|
1088
|
+
}
|
1089
|
+
removeShortcut(element, shortcut) {
|
1090
|
+
// Avoid infinite recursion.
|
1091
|
+
if (!element || (this.root === this)) {
|
1092
|
+
return;
|
1093
|
+
}
|
1094
|
+
if (!shortcut) {
|
1095
|
+
shortcut = this.component.shortcut;
|
1096
|
+
}
|
1097
|
+
this.root.removeShortcut(element, shortcut);
|
1098
|
+
}
|
1099
|
+
/**
|
1100
|
+
* Remove all event handlers.
|
1101
|
+
*/
|
1102
|
+
detach() {
|
1103
|
+
// First iterate through each ref and delete the component so there are no dangling component references.
|
1104
|
+
lodash_1.default.each(this.refs, (ref) => {
|
1105
|
+
if (typeof ref === NodeList) {
|
1106
|
+
ref.forEach((elem) => {
|
1107
|
+
delete elem.component;
|
1108
|
+
});
|
1109
|
+
}
|
1110
|
+
else if (ref) {
|
1111
|
+
delete ref.component;
|
1112
|
+
}
|
1113
|
+
});
|
1114
|
+
this.refs = {};
|
1115
|
+
this.removeEventListeners();
|
1116
|
+
this.detachLogic();
|
1117
|
+
if (this.tooltip) {
|
1118
|
+
this.tooltip.destroy();
|
1119
|
+
}
|
1120
|
+
}
|
1121
|
+
checkRefresh(refreshData, changed, flags) {
|
1122
|
+
const changePath = lodash_1.default.get(changed, 'instance.path', false);
|
1123
|
+
// Don't let components change themselves.
|
1124
|
+
if (changePath && this.path === changePath) {
|
1125
|
+
return;
|
1126
|
+
}
|
1127
|
+
if (refreshData === 'data') {
|
1128
|
+
this.refresh(this.data, changed, flags);
|
1129
|
+
}
|
1130
|
+
else if ((changePath && (0, utils_1.getComponentPath)(changed.instance) === refreshData) && changed && changed.instance &&
|
1131
|
+
// Make sure the changed component is not in a different "context". Solves issues where refreshOn being set
|
1132
|
+
// in fields inside EditGrids could alter their state from other rows (which is bad).
|
1133
|
+
this.inContext(changed.instance)) {
|
1134
|
+
this.refresh(changed.value, changed, flags);
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
checkRefreshOn(changes, flags = {}) {
|
1138
|
+
changes = changes || [];
|
1139
|
+
if (flags.noRefresh) {
|
1140
|
+
return;
|
1141
|
+
}
|
1142
|
+
if (!changes.length && flags.changed) {
|
1143
|
+
changes = [flags.changed];
|
1144
|
+
}
|
1145
|
+
const refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn;
|
1146
|
+
// If they wish to refresh on a value, then add that here.
|
1147
|
+
if (refreshOn) {
|
1148
|
+
if (Array.isArray(refreshOn)) {
|
1149
|
+
refreshOn.forEach(refreshData => changes.forEach(changed => this.checkRefresh(refreshData, changed, flags)));
|
1150
|
+
}
|
1151
|
+
else {
|
1152
|
+
changes.forEach(changed => this.checkRefresh(refreshOn, changed, flags));
|
1153
|
+
}
|
1154
|
+
}
|
1155
|
+
}
|
1156
|
+
/**
|
1157
|
+
* Refreshes the component with a new value.
|
1158
|
+
*
|
1159
|
+
* @param value
|
1160
|
+
*/
|
1161
|
+
refresh(value) {
|
1162
|
+
if (this.hasOwnProperty('refreshOnValue')) {
|
1163
|
+
this.refreshOnChanged = !lodash_1.default.isEqual(value, this.refreshOnValue);
|
1164
|
+
}
|
1165
|
+
else {
|
1166
|
+
this.refreshOnChanged = true;
|
1167
|
+
}
|
1168
|
+
this.refreshOnValue = (0, utils_1.fastCloneDeep)(value);
|
1169
|
+
if (this.refreshOnChanged) {
|
1170
|
+
if (this.component.clearOnRefresh) {
|
1171
|
+
this.setValue(null);
|
1172
|
+
}
|
1173
|
+
this.triggerRedraw();
|
1174
|
+
}
|
1175
|
+
}
|
1176
|
+
/**
|
1177
|
+
* Checks to see if a separate component is in the "context" of this component. This is determined by first checking
|
1178
|
+
* if they share the same "data" object. It will then walk up the parent tree and compare its parents data objects
|
1179
|
+
* with the components data and returns true if they are in the same context.
|
1180
|
+
*
|
1181
|
+
* Different rows of the same EditGrid, for example, are in different contexts.
|
1182
|
+
*
|
1183
|
+
* @param component
|
1184
|
+
*/
|
1185
|
+
inContext(component) {
|
1186
|
+
if (component.data === this.data) {
|
1187
|
+
return true;
|
1188
|
+
}
|
1189
|
+
let parent = this.parent;
|
1190
|
+
while (parent) {
|
1191
|
+
if (parent.data === component.data) {
|
1192
|
+
return true;
|
1193
|
+
}
|
1194
|
+
parent = parent.parent;
|
1195
|
+
}
|
1196
|
+
return false;
|
1197
|
+
}
|
1198
|
+
get viewOnly() {
|
1199
|
+
return this.options.readOnly && this.options.viewAsHtml;
|
1200
|
+
}
|
1201
|
+
setElement(element) {
|
1202
|
+
if (this.element) {
|
1203
|
+
delete this.element.component;
|
1204
|
+
delete this.element;
|
1205
|
+
}
|
1206
|
+
this.element = element;
|
1207
|
+
}
|
1208
|
+
createViewOnlyElement() {
|
1209
|
+
this.setElement(this.ce('dl', {
|
1210
|
+
id: this.id
|
1211
|
+
}));
|
1212
|
+
if (this.element) {
|
1213
|
+
// Ensure you can get the component info from the element.
|
1214
|
+
this.element.component = this;
|
1215
|
+
}
|
1216
|
+
return this.element;
|
1217
|
+
}
|
1218
|
+
get defaultViewOnlyValue() {
|
1219
|
+
return '-';
|
1220
|
+
}
|
1221
|
+
/**
|
1222
|
+
* Uses the widget to determine the output string.
|
1223
|
+
*
|
1224
|
+
* @param value
|
1225
|
+
* @return {*}
|
1226
|
+
*/
|
1227
|
+
getWidgetValueAsString(value, options) {
|
1228
|
+
const noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;
|
1229
|
+
if (!value || noInputWidget) {
|
1230
|
+
if (!this.widget || !value) {
|
1231
|
+
return value;
|
1232
|
+
}
|
1233
|
+
else {
|
1234
|
+
return this.widget.getValueAsString(value);
|
1235
|
+
}
|
1236
|
+
}
|
1237
|
+
if (Array.isArray(value)) {
|
1238
|
+
const values = [];
|
1239
|
+
value.forEach((val, index) => {
|
1240
|
+
const widget = this.refs.input[index] && this.refs.input[index].widget;
|
1241
|
+
if (widget) {
|
1242
|
+
values.push(widget.getValueAsString(val, options));
|
1243
|
+
}
|
1244
|
+
});
|
1245
|
+
return values;
|
1246
|
+
}
|
1247
|
+
const widget = this.refs.input[0].widget;
|
1248
|
+
return widget.getValueAsString(value, options);
|
1249
|
+
}
|
1250
|
+
getValueAsString(value, options) {
|
1251
|
+
if (!value) {
|
1252
|
+
return '';
|
1253
|
+
}
|
1254
|
+
value = this.getWidgetValueAsString(value, options);
|
1255
|
+
if (Array.isArray(value)) {
|
1256
|
+
return value.join(', ');
|
1257
|
+
}
|
1258
|
+
if (lodash_1.default.isPlainObject(value)) {
|
1259
|
+
return JSON.stringify(value);
|
1260
|
+
}
|
1261
|
+
if (value === null || value === undefined) {
|
1262
|
+
return '';
|
1263
|
+
}
|
1264
|
+
const stringValue = value.toString();
|
1265
|
+
return this.sanitize(stringValue);
|
1266
|
+
}
|
1267
|
+
getView(value, options) {
|
1268
|
+
if (this.component.protected) {
|
1269
|
+
return '--- PROTECTED ---';
|
1270
|
+
}
|
1271
|
+
return this.getValueAsString(value, options);
|
1272
|
+
}
|
1273
|
+
updateItems(...args) {
|
1274
|
+
this.restoreValue();
|
1275
|
+
this.onChange(...args);
|
1276
|
+
}
|
1277
|
+
/**
|
1278
|
+
* @param {*} data
|
1279
|
+
* @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data
|
1280
|
+
* @return {*}
|
1281
|
+
*/
|
1282
|
+
itemValue(data, forceUseValue = false) {
|
1283
|
+
if (lodash_1.default.isObject(data) && !lodash_1.default.isArray(data)) {
|
1284
|
+
if (this.valueProperty) {
|
1285
|
+
return lodash_1.default.get(data, this.valueProperty);
|
1286
|
+
}
|
1287
|
+
if (forceUseValue) {
|
1288
|
+
return data.value;
|
1289
|
+
}
|
1290
|
+
}
|
1291
|
+
return data;
|
1292
|
+
}
|
1293
|
+
itemValueForHTMLMode(value) {
|
1294
|
+
if (Array.isArray(value)) {
|
1295
|
+
const values = value.map(item => Array.isArray(item) ? this.itemValueForHTMLMode(item) : this.itemValue(item));
|
1296
|
+
return values.join(', ');
|
1297
|
+
}
|
1298
|
+
return this.itemValue(value);
|
1299
|
+
}
|
1300
|
+
createModal(element, attr, confirm) {
|
1301
|
+
const dialog = this.ce('div', attr || {});
|
1302
|
+
this.setContent(dialog, this.renderTemplate('dialog'));
|
1303
|
+
// Add refs to dialog, not "this".
|
1304
|
+
dialog.refs = {};
|
1305
|
+
this.loadRefs.call(dialog, dialog, {
|
1306
|
+
dialogOverlay: 'single',
|
1307
|
+
dialogContents: 'single',
|
1308
|
+
dialogClose: 'single',
|
1309
|
+
});
|
1310
|
+
dialog.refs.dialogContents.appendChild(element);
|
1311
|
+
document.body.appendChild(dialog);
|
1312
|
+
document.body.classList.add('modal-open');
|
1313
|
+
dialog.close = () => {
|
1314
|
+
document.body.classList.remove('modal-open');
|
1315
|
+
dialog.dispatchEvent(new CustomEvent('close'));
|
1316
|
+
};
|
1317
|
+
this.addEventListener(dialog, 'close', () => this.removeChildFrom(dialog, document.body));
|
1318
|
+
const close = (event) => {
|
1319
|
+
event.preventDefault();
|
1320
|
+
dialog.close();
|
1321
|
+
};
|
1322
|
+
const handleCloseClick = (e) => {
|
1323
|
+
if (confirm) {
|
1324
|
+
confirm().then(() => close(e))
|
1325
|
+
.catch(() => { });
|
1326
|
+
}
|
1327
|
+
else {
|
1328
|
+
close(e);
|
1329
|
+
}
|
1330
|
+
};
|
1331
|
+
this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);
|
1332
|
+
this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);
|
1333
|
+
return dialog;
|
1334
|
+
}
|
1335
|
+
get optimizeRedraw() {
|
1336
|
+
if (this.options.optimizeRedraw && this.element && !this.visible) {
|
1337
|
+
this.addClass(this.element, 'formio-removed');
|
1338
|
+
return true;
|
1339
|
+
}
|
1340
|
+
return false;
|
1341
|
+
}
|
1342
|
+
/**
|
1343
|
+
* Retrieves the CSS class name of this component.
|
1344
|
+
* @returns {string} - The class name of this component.
|
1345
|
+
*/
|
1346
|
+
get className() {
|
1347
|
+
let className = this.hasInput ? `${this.transform('class', 'form-group')} has-feedback ` : '';
|
1348
|
+
className += `formio-component formio-component-${this.component.type} `;
|
1349
|
+
// TODO: find proper way to avoid overriding of default type-based component styles
|
1350
|
+
if (this.key && this.key !== 'form') {
|
1351
|
+
className += `formio-component-${this.key} `;
|
1352
|
+
}
|
1353
|
+
if (this.component.multiple) {
|
1354
|
+
className += 'formio-component-multiple ';
|
1355
|
+
}
|
1356
|
+
if (this.component.customClass) {
|
1357
|
+
className += this.component.customClass;
|
1358
|
+
}
|
1359
|
+
if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required)) {
|
1360
|
+
className += ' required';
|
1361
|
+
}
|
1362
|
+
if (this.labelIsHidden()) {
|
1363
|
+
className += ' formio-component-label-hidden';
|
1364
|
+
}
|
1365
|
+
if (!this.visible) {
|
1366
|
+
className += ' formio-hidden';
|
1367
|
+
}
|
1368
|
+
return className;
|
1369
|
+
}
|
1370
|
+
/**
|
1371
|
+
* Build the custom style from the layout values
|
1372
|
+
* @return {string} - The custom style
|
1373
|
+
*/
|
1374
|
+
get customStyle() {
|
1375
|
+
let customCSS = '';
|
1376
|
+
lodash_1.default.each(this.component.style, (value, key) => {
|
1377
|
+
if (value !== '') {
|
1378
|
+
customCSS += `${key}:${value};`;
|
1379
|
+
}
|
1380
|
+
});
|
1381
|
+
return customCSS;
|
1382
|
+
}
|
1383
|
+
get isMobile() {
|
1384
|
+
return (0, ismobilejs_1.default)();
|
1385
|
+
}
|
1386
|
+
/**
|
1387
|
+
* Returns the outside wrapping element of this component.
|
1388
|
+
* @returns {HTMLElement}
|
1389
|
+
*/
|
1390
|
+
getElement() {
|
1391
|
+
return this.element;
|
1392
|
+
}
|
1393
|
+
/**
|
1394
|
+
* Create an evaluation context for all script executions and interpolations.
|
1395
|
+
*
|
1396
|
+
* @param additional
|
1397
|
+
* @return {*}
|
1398
|
+
*/
|
1399
|
+
evalContext(additional) {
|
1400
|
+
return super.evalContext(Object.assign({
|
1401
|
+
component: this.component,
|
1402
|
+
row: this.data,
|
1403
|
+
rowIndex: this.rowIndex,
|
1404
|
+
data: this.rootValue,
|
1405
|
+
iconClass: this.iconClass.bind(this),
|
1406
|
+
// Bind the translate function to the data context of any interpolated string.
|
1407
|
+
// It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)
|
1408
|
+
// and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.
|
1409
|
+
t: this.t.bind(this),
|
1410
|
+
submission: (this.root ? this.root._submission : {
|
1411
|
+
data: this.rootValue
|
1412
|
+
}),
|
1413
|
+
form: this.root ? this.root._form : {},
|
1414
|
+
options: this.options,
|
1415
|
+
}, additional));
|
1416
|
+
}
|
1417
|
+
/**
|
1418
|
+
* Sets the pristine flag for this component.
|
1419
|
+
*
|
1420
|
+
* @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
|
1421
|
+
*/
|
1422
|
+
setPristine(pristine) {
|
1423
|
+
this.pristine = pristine;
|
1424
|
+
}
|
1425
|
+
get isPristine() {
|
1426
|
+
return this.pristine;
|
1427
|
+
}
|
1428
|
+
setDirty(dirty) {
|
1429
|
+
this.dirty = dirty;
|
1430
|
+
}
|
1431
|
+
get isDirty() {
|
1432
|
+
return this.dirty;
|
1433
|
+
}
|
1434
|
+
/**
|
1435
|
+
* Removes a value out of the data array and rebuild the rows.
|
1436
|
+
* @param {number} index - The index of the data element to remove.
|
1437
|
+
*/
|
1438
|
+
removeValue(index) {
|
1439
|
+
this.splice(index);
|
1440
|
+
this.redraw();
|
1441
|
+
this.restoreValue();
|
1442
|
+
this.triggerRootChange();
|
1443
|
+
}
|
1444
|
+
iconClass(name, spinning) {
|
1445
|
+
const iconset = this.options.iconset || Templates_1.default.current.defaultIconset || 'fa';
|
1446
|
+
return Templates_1.default.current.hasOwnProperty('iconClass')
|
1447
|
+
? Templates_1.default.current.iconClass(iconset, name, spinning)
|
1448
|
+
: this.options.iconset === 'fa' ? Templates_1.default.defaultTemplates.iconClass(iconset, name, spinning) : name;
|
1449
|
+
}
|
1450
|
+
size(size) {
|
1451
|
+
return Templates_1.default.current.hasOwnProperty('size')
|
1452
|
+
? Templates_1.default.current.size(size)
|
1453
|
+
: size;
|
1454
|
+
}
|
1455
|
+
/**
|
1456
|
+
* The readible name for this component.
|
1457
|
+
* @returns {string} - The name of the component.
|
1458
|
+
*/
|
1459
|
+
get name() {
|
1460
|
+
return this.t(this.component.label || this.component.placeholder || this.key, { _userInput: true });
|
1461
|
+
}
|
1462
|
+
/**
|
1463
|
+
* Returns the error label for this component.
|
1464
|
+
* @return {*}
|
1465
|
+
*/
|
1466
|
+
get errorLabel() {
|
1467
|
+
return this.t(this.component.errorLabel
|
1468
|
+
|| this.component.label
|
1469
|
+
|| this.component.placeholder
|
1470
|
+
|| this.key);
|
1471
|
+
}
|
1472
|
+
/**
|
1473
|
+
* Get the error message provided a certain type of error.
|
1474
|
+
* @param type
|
1475
|
+
* @return {*}
|
1476
|
+
*/
|
1477
|
+
errorMessage(type) {
|
1478
|
+
return (this.component.errors && this.component.errors[type]) ? this.component.errors[type] : type;
|
1479
|
+
}
|
1480
|
+
setContent(element, content, forceSanitize, sanitizeOptions) {
|
1481
|
+
if (element instanceof HTMLElement) {
|
1482
|
+
element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);
|
1483
|
+
return true;
|
1484
|
+
}
|
1485
|
+
return false;
|
1486
|
+
}
|
1487
|
+
restoreCaretPosition() {
|
1488
|
+
var _a, _b, _c;
|
1489
|
+
if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.currentSelection) {
|
1490
|
+
if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
|
1491
|
+
const { selection, index } = this.root.currentSelection;
|
1492
|
+
let input = this.refs.input[index];
|
1493
|
+
const isInputRangeSelectable = /text|search|password|tel|url/i.test(input.type || '');
|
1494
|
+
if (input) {
|
1495
|
+
if (isInputRangeSelectable) {
|
1496
|
+
input.setSelectionRange(...selection);
|
1497
|
+
}
|
1498
|
+
}
|
1499
|
+
else {
|
1500
|
+
input = this.refs.input[this.refs.input.length];
|
1501
|
+
const lastCharacter = ((_c = input.value) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
1502
|
+
if (isInputRangeSelectable) {
|
1503
|
+
input.setSelectionRange(lastCharacter, lastCharacter);
|
1504
|
+
}
|
1505
|
+
}
|
1506
|
+
}
|
1507
|
+
}
|
1508
|
+
}
|
1509
|
+
redraw() {
|
1510
|
+
// Don't bother if we have not built yet.
|
1511
|
+
if (!this.element || !this.element.parentNode || this.optimizeRedraw) {
|
1512
|
+
// Return a non-resolving promise.
|
1513
|
+
return native_promise_only_1.default.resolve();
|
1514
|
+
}
|
1515
|
+
this.detach();
|
1516
|
+
this.emit('redraw');
|
1517
|
+
// Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.
|
1518
|
+
const parent = this.element.parentNode;
|
1519
|
+
const index = Array.prototype.indexOf.call(parent.children, this.element);
|
1520
|
+
this.element.outerHTML = this.sanitize(this.render());
|
1521
|
+
this.setElement(parent.children[index]);
|
1522
|
+
return this.attach(this.element);
|
1523
|
+
}
|
1524
|
+
rebuild() {
|
1525
|
+
this.destroy();
|
1526
|
+
this.init();
|
1527
|
+
this.visible = this.conditionallyVisible(null, null);
|
1528
|
+
return this.redraw();
|
1529
|
+
}
|
1530
|
+
removeEventListeners() {
|
1531
|
+
super.removeEventListeners();
|
1532
|
+
this.tooltips.forEach(tooltip => tooltip.destroy());
|
1533
|
+
this.tooltips = [];
|
1534
|
+
}
|
1535
|
+
hasClass(element, className) {
|
1536
|
+
if (!element) {
|
1537
|
+
return;
|
1538
|
+
}
|
1539
|
+
return super.hasClass(element, this.transform('class', className));
|
1540
|
+
}
|
1541
|
+
addClass(element, className) {
|
1542
|
+
if (!element) {
|
1543
|
+
return;
|
1544
|
+
}
|
1545
|
+
return super.addClass(element, this.transform('class', className));
|
1546
|
+
}
|
1547
|
+
removeClass(element, className) {
|
1548
|
+
if (!element) {
|
1549
|
+
return;
|
1550
|
+
}
|
1551
|
+
return super.removeClass(element, this.transform('class', className));
|
1552
|
+
}
|
1553
|
+
/**
|
1554
|
+
* Determines if this component has a condition defined.
|
1555
|
+
*
|
1556
|
+
* @return {null}
|
1557
|
+
*/
|
1558
|
+
hasCondition() {
|
1559
|
+
if (this._hasCondition !== null) {
|
1560
|
+
return this._hasCondition;
|
1561
|
+
}
|
1562
|
+
this._hasCondition = FormioUtils.hasCondition(this.component);
|
1563
|
+
return this._hasCondition;
|
1564
|
+
}
|
1565
|
+
/**
|
1566
|
+
* Check if this component is conditionally visible.
|
1567
|
+
*
|
1568
|
+
* @param data
|
1569
|
+
* @return {boolean}
|
1570
|
+
*/
|
1571
|
+
conditionallyVisible(data, row) {
|
1572
|
+
data = data || this.rootValue;
|
1573
|
+
row = row || this.data;
|
1574
|
+
if (this.builderMode || this.previewMode || !this.hasCondition()) {
|
1575
|
+
return !this.component.hidden;
|
1576
|
+
}
|
1577
|
+
data = data || (this.root ? this.root.data : {});
|
1578
|
+
return this.checkCondition(row, data);
|
1579
|
+
}
|
1580
|
+
/**
|
1581
|
+
* Checks the condition of this component.
|
1582
|
+
*
|
1583
|
+
* TODO: Switch row and data parameters to be consistent with other methods.
|
1584
|
+
*
|
1585
|
+
* @param row - The row contextual data.
|
1586
|
+
* @param data - The global data object.
|
1587
|
+
* @return {boolean} - True if the condition applies to this component.
|
1588
|
+
*/
|
1589
|
+
checkCondition(row, data) {
|
1590
|
+
return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);
|
1591
|
+
}
|
1592
|
+
/**
|
1593
|
+
* Check for conditionals and hide/show the element based on those conditions.
|
1594
|
+
*/
|
1595
|
+
checkComponentConditions(data, flags, row) {
|
1596
|
+
data = data || this.rootValue;
|
1597
|
+
flags = flags || {};
|
1598
|
+
row = row || this.data;
|
1599
|
+
if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {
|
1600
|
+
this.redraw();
|
1601
|
+
}
|
1602
|
+
// Check advanced conditions
|
1603
|
+
const visible = this.conditionallyVisible(data, row);
|
1604
|
+
if (this.visible !== visible) {
|
1605
|
+
this.visible = visible;
|
1606
|
+
}
|
1607
|
+
return visible;
|
1608
|
+
}
|
1609
|
+
/**
|
1610
|
+
* Checks conditions for this component and any sub components.
|
1611
|
+
* @param args
|
1612
|
+
* @return {boolean}
|
1613
|
+
*/
|
1614
|
+
checkConditions(data, flags, row) {
|
1615
|
+
data = data || this.rootValue;
|
1616
|
+
flags = flags || {};
|
1617
|
+
row = row || this.data;
|
1618
|
+
return this.checkComponentConditions(data, flags, row);
|
1619
|
+
}
|
1620
|
+
get logic() {
|
1621
|
+
return this.component.logic || [];
|
1622
|
+
}
|
1623
|
+
/**
|
1624
|
+
* Check all triggers and apply necessary actions.
|
1625
|
+
*
|
1626
|
+
* @param data
|
1627
|
+
*/
|
1628
|
+
fieldLogic(data, row) {
|
1629
|
+
data = data || this.rootValue;
|
1630
|
+
row = row || this.data;
|
1631
|
+
const logics = this.logic;
|
1632
|
+
// If there aren't logic, don't go further.
|
1633
|
+
if (logics.length === 0) {
|
1634
|
+
return;
|
1635
|
+
}
|
1636
|
+
const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);
|
1637
|
+
let changed = logics.reduce((changed, logic) => {
|
1638
|
+
const result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);
|
1639
|
+
return (result ? this.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;
|
1640
|
+
}, false);
|
1641
|
+
// If component definition changed, replace and mark as changed.
|
1642
|
+
if (!lodash_1.default.isEqual(this.component, newComponent)) {
|
1643
|
+
this.component = newComponent;
|
1644
|
+
changed = true;
|
1645
|
+
const disabled = this.shouldDisabled;
|
1646
|
+
// Change disabled state if it has changed
|
1647
|
+
if (this.disabled !== disabled) {
|
1648
|
+
this.disabled = disabled;
|
1649
|
+
}
|
1650
|
+
}
|
1651
|
+
return changed;
|
1652
|
+
}
|
1653
|
+
isIE() {
|
1654
|
+
if (typeof window === 'undefined') {
|
1655
|
+
return false;
|
1656
|
+
}
|
1657
|
+
const userAgent = window.navigator.userAgent;
|
1658
|
+
const msie = userAgent.indexOf('MSIE ');
|
1659
|
+
if (msie > 0) {
|
1660
|
+
// IE 10 or older => return version number
|
1661
|
+
return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);
|
1662
|
+
}
|
1663
|
+
const trident = userAgent.indexOf('Trident/');
|
1664
|
+
if (trident > 0) {
|
1665
|
+
// IE 11 => return version number
|
1666
|
+
const rv = userAgent.indexOf('rv:');
|
1667
|
+
return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);
|
1668
|
+
}
|
1669
|
+
const edge = userAgent.indexOf('Edge/');
|
1670
|
+
if (edge > 0) {
|
1671
|
+
// IE 12 (aka Edge) => return version number
|
1672
|
+
return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);
|
1673
|
+
}
|
1674
|
+
// other browser
|
1675
|
+
return false;
|
1676
|
+
}
|
1677
|
+
defineActionValue(action, argsObject) {
|
1678
|
+
return this.evaluate(action.value, argsObject, 'value');
|
1679
|
+
}
|
1680
|
+
applyActions(newComponent, actions, result, row, data) {
|
1681
|
+
data = data || this.rootValue;
|
1682
|
+
row = row || this.data;
|
1683
|
+
return actions.reduce((changed, action) => {
|
1684
|
+
switch (action.type) {
|
1685
|
+
case 'property': {
|
1686
|
+
FormioUtils.setActionProperty(newComponent, action, result, row, data, this);
|
1687
|
+
const property = action.property.value;
|
1688
|
+
if (!lodash_1.default.isEqual(lodash_1.default.get(this.component, property), lodash_1.default.get(newComponent, property))) {
|
1689
|
+
changed = true;
|
1690
|
+
}
|
1691
|
+
break;
|
1692
|
+
}
|
1693
|
+
case 'value': {
|
1694
|
+
const oldValue = this.getValue();
|
1695
|
+
const newValue = this.defineActionValue(action, {
|
1696
|
+
value: lodash_1.default.clone(oldValue),
|
1697
|
+
data,
|
1698
|
+
row,
|
1699
|
+
component: newComponent,
|
1700
|
+
result,
|
1701
|
+
});
|
1702
|
+
if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {
|
1703
|
+
this.setValue(newValue);
|
1704
|
+
if (this.viewOnly) {
|
1705
|
+
this.dataValue = newValue;
|
1706
|
+
}
|
1707
|
+
changed = true;
|
1708
|
+
}
|
1709
|
+
break;
|
1710
|
+
}
|
1711
|
+
case 'mergeComponentSchema': {
|
1712
|
+
const schema = this.evaluate(action.schemaDefinition, {
|
1713
|
+
value: lodash_1.default.clone(this.getValue()),
|
1714
|
+
data,
|
1715
|
+
row,
|
1716
|
+
component: newComponent,
|
1717
|
+
result,
|
1718
|
+
}, 'schema');
|
1719
|
+
lodash_1.default.assign(newComponent, schema);
|
1720
|
+
if (!lodash_1.default.isEqual(this.component, newComponent)) {
|
1721
|
+
changed = true;
|
1722
|
+
}
|
1723
|
+
break;
|
1724
|
+
}
|
1725
|
+
case 'customAction': {
|
1726
|
+
const oldValue = this.getValue();
|
1727
|
+
const newValue = this.evaluate(action.customAction, {
|
1728
|
+
value: lodash_1.default.clone(oldValue),
|
1729
|
+
data,
|
1730
|
+
row,
|
1731
|
+
input: oldValue,
|
1732
|
+
component: newComponent,
|
1733
|
+
result,
|
1734
|
+
}, 'value');
|
1735
|
+
if (!lodash_1.default.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {
|
1736
|
+
this.setValue(newValue);
|
1737
|
+
if (this.viewOnly) {
|
1738
|
+
this.dataValue = newValue;
|
1739
|
+
}
|
1740
|
+
changed = true;
|
1741
|
+
}
|
1742
|
+
break;
|
1743
|
+
}
|
1744
|
+
}
|
1745
|
+
return changed;
|
1746
|
+
}, false);
|
1747
|
+
}
|
1748
|
+
// Deprecated
|
1749
|
+
addInputError(message, dirty, elements) {
|
1750
|
+
this.addMessages(message);
|
1751
|
+
this.setErrorClasses(elements, dirty, !!message);
|
1752
|
+
}
|
1753
|
+
// Deprecated
|
1754
|
+
removeInputError(elements) {
|
1755
|
+
this.setErrorClasses(elements, true, false);
|
1756
|
+
}
|
1757
|
+
/**
|
1758
|
+
* Add a new input error to this element.
|
1759
|
+
*
|
1760
|
+
* @param message
|
1761
|
+
* @param dirty
|
1762
|
+
*/
|
1763
|
+
addMessages(messages) {
|
1764
|
+
if (!messages) {
|
1765
|
+
return;
|
1766
|
+
}
|
1767
|
+
// Standardize on array of objects for message.
|
1768
|
+
if (typeof messages === 'string') {
|
1769
|
+
messages = {
|
1770
|
+
messages,
|
1771
|
+
level: 'error',
|
1772
|
+
};
|
1773
|
+
}
|
1774
|
+
if (!Array.isArray(messages)) {
|
1775
|
+
messages = [messages];
|
1776
|
+
}
|
1777
|
+
messages = lodash_1.default.uniqBy(messages, message => message.message);
|
1778
|
+
if (this.refs.messageContainer) {
|
1779
|
+
this.setContent(this.refs.messageContainer, messages.map((message) => {
|
1780
|
+
if (message.message && typeof message.message === 'string') {
|
1781
|
+
message.message = message.message.replaceAll('<', '<').replaceAll('>', '>');
|
1782
|
+
}
|
1783
|
+
return this.renderTemplate('message', message);
|
1784
|
+
}).join(''));
|
1785
|
+
}
|
1786
|
+
}
|
1787
|
+
setErrorClasses(elements, dirty, hasErrors, hasMessages, element = this.element) {
|
1788
|
+
this.clearErrorClasses();
|
1789
|
+
elements.forEach((element) => {
|
1790
|
+
this.setElementInvalid(this.performInputMapping(element), false);
|
1791
|
+
});
|
1792
|
+
this.setInputWidgetErrorClasses(elements, hasErrors);
|
1793
|
+
if (hasErrors) {
|
1794
|
+
// Add error classes
|
1795
|
+
elements.forEach((input) => {
|
1796
|
+
this.setElementInvalid(this.performInputMapping(input), true);
|
1797
|
+
});
|
1798
|
+
if (dirty && this.options.highlightErrors) {
|
1799
|
+
this.addClass(element, this.options.componentErrorClass);
|
1800
|
+
}
|
1801
|
+
else {
|
1802
|
+
this.addClass(element, 'has-error');
|
1803
|
+
}
|
1804
|
+
}
|
1805
|
+
if (hasMessages) {
|
1806
|
+
this.addClass(element, 'has-message');
|
1807
|
+
}
|
1808
|
+
}
|
1809
|
+
setElementInvalid(element, invalid) {
|
1810
|
+
if (!element)
|
1811
|
+
return;
|
1812
|
+
if (invalid) {
|
1813
|
+
this.addClass(element, 'is-invalid');
|
1814
|
+
}
|
1815
|
+
else {
|
1816
|
+
this.removeClass(element, 'is-invalid');
|
1817
|
+
}
|
1818
|
+
element.setAttribute('aria-invalid', invalid ? 'true' : 'false');
|
1819
|
+
}
|
1820
|
+
clearOnHide() {
|
1821
|
+
// clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.
|
1822
|
+
if (
|
1823
|
+
// if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true
|
1824
|
+
(!this.rootPristine || this.options.server || (0, utils_1.isInsideScopingComponent)(this)) &&
|
1825
|
+
this.component.clearOnHide !== false &&
|
1826
|
+
!this.options.readOnly &&
|
1827
|
+
!this.options.showHiddenFields) {
|
1828
|
+
if (!this.visible) {
|
1829
|
+
this.deleteValue();
|
1830
|
+
}
|
1831
|
+
else if (!this.hasValue() && this.shouldAddDefaultValue) {
|
1832
|
+
// If shown, ensure the default is set.
|
1833
|
+
this.setValue(this.defaultValue, {
|
1834
|
+
noUpdateEvent: true
|
1835
|
+
});
|
1836
|
+
}
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
triggerRootChange(...args) {
|
1840
|
+
if (this.options.onChange) {
|
1841
|
+
this.options.onChange(...args);
|
1842
|
+
}
|
1843
|
+
else if (this.root) {
|
1844
|
+
this.root.triggerChange(...args);
|
1845
|
+
}
|
1846
|
+
}
|
1847
|
+
onChange(flags, fromRoot) {
|
1848
|
+
flags = flags || {};
|
1849
|
+
if (flags.modified) {
|
1850
|
+
if (!flags.noPristineChangeOnModified) {
|
1851
|
+
this.pristine = false;
|
1852
|
+
}
|
1853
|
+
this.addClass(this.getElement(), 'formio-modified');
|
1854
|
+
}
|
1855
|
+
// If we are supposed to validate on blur, then don't trigger validation yet.
|
1856
|
+
if (this.component.validateOn === 'blur' && !this.errors.length) {
|
1857
|
+
flags.noValidate = true;
|
1858
|
+
}
|
1859
|
+
if (this.component.onChange) {
|
1860
|
+
this.evaluate(this.component.onChange, {
|
1861
|
+
flags
|
1862
|
+
});
|
1863
|
+
}
|
1864
|
+
// Set the changed variable.
|
1865
|
+
const changed = {
|
1866
|
+
instance: this,
|
1867
|
+
component: this.component,
|
1868
|
+
value: this.dataValue,
|
1869
|
+
flags: flags
|
1870
|
+
};
|
1871
|
+
// Emit the change.
|
1872
|
+
this.emit('componentChange', changed);
|
1873
|
+
// Do not propogate the modified flag.
|
1874
|
+
let modified = false;
|
1875
|
+
if (flags.modified) {
|
1876
|
+
modified = true;
|
1877
|
+
delete flags.modified;
|
1878
|
+
}
|
1879
|
+
// Bubble this change up to the top.
|
1880
|
+
if (!fromRoot) {
|
1881
|
+
this.triggerRootChange(flags, changed, modified);
|
1882
|
+
}
|
1883
|
+
return changed;
|
1884
|
+
}
|
1885
|
+
get wysiwygDefault() {
|
1886
|
+
return {
|
1887
|
+
quill: {
|
1888
|
+
theme: 'snow',
|
1889
|
+
placeholder: this.t(this.component.placeholder, { _userInput: true }),
|
1890
|
+
modules: {
|
1891
|
+
toolbar: [
|
1892
|
+
[{ 'size': ['small', false, 'large', 'huge'] }],
|
1893
|
+
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
1894
|
+
[{ 'font': [] }],
|
1895
|
+
['bold', 'italic', 'underline', 'strike', { 'script': 'sub' }, { 'script': 'super' }, 'clean'],
|
1896
|
+
[{ 'color': [] }, { 'background': [] }],
|
1897
|
+
[{ 'list': 'ordered' }, { 'list': 'bullet' }, { 'indent': '-1' }, { 'indent': '+1' }, { 'align': [] }],
|
1898
|
+
['blockquote', 'code-block'],
|
1899
|
+
['link', 'image', 'video', 'formula', 'source']
|
1900
|
+
]
|
1901
|
+
}
|
1902
|
+
},
|
1903
|
+
ace: {
|
1904
|
+
theme: 'ace/theme/xcode',
|
1905
|
+
maxLines: 12,
|
1906
|
+
minLines: 12,
|
1907
|
+
tabSize: 2,
|
1908
|
+
mode: 'ace/mode/javascript',
|
1909
|
+
placeholder: this.t(this.component.placeholder, { _userInput: true })
|
1910
|
+
},
|
1911
|
+
ckeditor: {
|
1912
|
+
image: {
|
1913
|
+
toolbar: [
|
1914
|
+
'imageTextAlternative',
|
1915
|
+
'|',
|
1916
|
+
'imageStyle:full',
|
1917
|
+
'imageStyle:alignLeft',
|
1918
|
+
'imageStyle:alignCenter',
|
1919
|
+
'imageStyle:alignRight'
|
1920
|
+
],
|
1921
|
+
styles: [
|
1922
|
+
'full',
|
1923
|
+
'alignLeft',
|
1924
|
+
'alignCenter',
|
1925
|
+
'alignRight'
|
1926
|
+
]
|
1927
|
+
},
|
1928
|
+
extraPlugins: []
|
1929
|
+
},
|
1930
|
+
default: {}
|
1931
|
+
};
|
1932
|
+
}
|
1933
|
+
addCKE(element, settings, onChange) {
|
1934
|
+
settings = lodash_1.default.isEmpty(settings) ? {} : settings;
|
1935
|
+
settings.base64Upload = this.component.isUploadEnabled ? false : true;
|
1936
|
+
settings.mediaEmbed = { previewsInData: true };
|
1937
|
+
settings = lodash_1.default.merge(this.wysiwygDefault.ckeditor, lodash_1.default.get(this.options, 'editors.ckeditor.settings', {}), settings);
|
1938
|
+
if (this.component.isUploadEnabled) {
|
1939
|
+
settings.extraPlugins.push((0, uploadAdapter_1.getFormioUploadAdapterPlugin)(this.fileService, this));
|
1940
|
+
}
|
1941
|
+
return Formio_1.Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', lodash_1.default.get(this.options, 'editors.ckeditor.src', `${Formio_1.Formio.cdn.ckeditor}/ckeditor.js`), true)
|
1942
|
+
.then(() => {
|
1943
|
+
if (!element.parentNode) {
|
1944
|
+
return native_promise_only_1.default.reject();
|
1945
|
+
}
|
1946
|
+
if (isIEBrowser) {
|
1947
|
+
const editor = CKEDITOR.replace(element);
|
1948
|
+
editor.on('change', () => onChange(editor.getData()));
|
1949
|
+
return native_promise_only_1.default.resolve(editor);
|
1950
|
+
}
|
1951
|
+
else {
|
1952
|
+
return ClassicEditor.create(element, settings).then(editor => {
|
1953
|
+
editor.model.document.on('change', () => onChange(editor.data.get()));
|
1954
|
+
return editor;
|
1955
|
+
});
|
1956
|
+
}
|
1957
|
+
});
|
1958
|
+
}
|
1959
|
+
addQuill(element, settings, onChange) {
|
1960
|
+
settings = lodash_1.default.isEmpty(settings) ? this.wysiwygDefault.quill : settings;
|
1961
|
+
settings = lodash_1.default.merge(this.wysiwygDefault.quill, lodash_1.default.get(this.options, 'editors.quill.settings', {}), settings);
|
1962
|
+
settings = Object.assign(Object.assign({}, settings), { modules: Object.assign({ table: true }, settings.modules) });
|
1963
|
+
// Lazy load the quill css.
|
1964
|
+
Formio_1.Formio.requireLibrary(`quill-css-${settings.theme}`, 'Quill', [
|
1965
|
+
{ type: 'styles', src: `${Formio_1.Formio.cdn.quill}/quill.${settings.theme}.css` }
|
1966
|
+
], true);
|
1967
|
+
// Lazy load the quill library.
|
1968
|
+
return Formio_1.Formio.requireLibrary('quill', 'Quill', lodash_1.default.get(this.options, 'editors.quill.src', `${Formio_1.Formio.cdn.quill}/quill.min.js`), true)
|
1969
|
+
.then(() => {
|
1970
|
+
return Formio_1.Formio.requireLibrary('quill-table', 'Quill', `${Formio_1.Formio.cdn.baseUrl}/quill/quill-table.js`, true)
|
1971
|
+
.then(() => {
|
1972
|
+
if (!element.parentNode) {
|
1973
|
+
return native_promise_only_1.default.reject();
|
1974
|
+
}
|
1975
|
+
this.quill = new Quill(element, isIEBrowser ? Object.assign(Object.assign({}, settings), { modules: {} }) : settings);
|
1976
|
+
/** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/
|
1977
|
+
const txtArea = document.createElement('textarea');
|
1978
|
+
txtArea.setAttribute('class', 'quill-source-code');
|
1979
|
+
this.quill.addContainer('ql-custom').appendChild(txtArea);
|
1980
|
+
const qlSource = element.parentNode.querySelector('.ql-source');
|
1981
|
+
if (qlSource) {
|
1982
|
+
this.addEventListener(qlSource, 'click', (event) => {
|
1983
|
+
event.preventDefault();
|
1984
|
+
if (txtArea.style.display === 'inherit') {
|
1985
|
+
this.quill.setContents(this.quill.clipboard.convert({ html: txtArea.value }));
|
1986
|
+
}
|
1987
|
+
txtArea.style.display = (txtArea.style.display === 'none') ? 'inherit' : 'none';
|
1988
|
+
});
|
1989
|
+
}
|
1990
|
+
/** END CODEBLOCK **/
|
1991
|
+
// Make sure to select cursor when they click on the element.
|
1992
|
+
this.addEventListener(element, 'click', () => this.quill.focus());
|
1993
|
+
// Allows users to skip toolbar items when tabbing though form
|
1994
|
+
const elm = document.querySelectorAll('.ql-formats > button');
|
1995
|
+
for (let i = 0; i < elm.length; i++) {
|
1996
|
+
elm[i].setAttribute('tabindex', '-1');
|
1997
|
+
}
|
1998
|
+
this.quill.on('text-change', () => {
|
1999
|
+
txtArea.value = this.quill.root.innerHTML;
|
2000
|
+
onChange(txtArea);
|
2001
|
+
});
|
2002
|
+
return this.quill;
|
2003
|
+
});
|
2004
|
+
});
|
2005
|
+
}
|
2006
|
+
get shouldSanitizeValue() {
|
2007
|
+
var _a;
|
2008
|
+
// Sanitize value if sanitizing for thw whole content is turned off
|
2009
|
+
return (((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitize) !== false);
|
2010
|
+
}
|
2011
|
+
addAce(element, settings, onChange) {
|
2012
|
+
if (!settings || (settings.theme === 'snow')) {
|
2013
|
+
const mode = settings ? settings.mode : '';
|
2014
|
+
settings = {};
|
2015
|
+
if (mode) {
|
2016
|
+
settings.mode = mode;
|
2017
|
+
}
|
2018
|
+
}
|
2019
|
+
settings = lodash_1.default.merge(this.wysiwygDefault.ace, lodash_1.default.get(this.options, 'editors.ace.settings', {}), settings || {});
|
2020
|
+
return Formio_1.Formio.requireLibrary('ace', 'ace', lodash_1.default.get(this.options, 'editors.ace.src', `${Formio_1.Formio.cdn.ace}/ace.js`), true)
|
2021
|
+
.then((editor) => {
|
2022
|
+
editor = editor.edit(element);
|
2023
|
+
editor.removeAllListeners('change');
|
2024
|
+
editor.setOptions(settings);
|
2025
|
+
editor.getSession().setMode(settings.mode);
|
2026
|
+
editor.on('change', () => onChange(editor.getValue()));
|
2027
|
+
if (settings.isUseWorkerDisabled) {
|
2028
|
+
editor.session.setUseWorker(false);
|
2029
|
+
}
|
2030
|
+
return editor;
|
2031
|
+
});
|
2032
|
+
}
|
2033
|
+
get tree() {
|
2034
|
+
return this.component.tree || false;
|
2035
|
+
}
|
2036
|
+
/**
|
2037
|
+
* The empty value for this component.
|
2038
|
+
*
|
2039
|
+
* @return {null}
|
2040
|
+
*/
|
2041
|
+
get emptyValue() {
|
2042
|
+
return null;
|
2043
|
+
}
|
2044
|
+
/**
|
2045
|
+
* Returns if this component has a value set.
|
2046
|
+
*
|
2047
|
+
*/
|
2048
|
+
hasValue(data) {
|
2049
|
+
return !lodash_1.default.isUndefined(lodash_1.default.get(data || this.data, this.key));
|
2050
|
+
}
|
2051
|
+
/**
|
2052
|
+
* Get the data value at the root level.
|
2053
|
+
*
|
2054
|
+
* @return {*}
|
2055
|
+
*/
|
2056
|
+
get rootValue() {
|
2057
|
+
return this.root ? this.root.data : this.data;
|
2058
|
+
}
|
2059
|
+
get rootPristine() {
|
2060
|
+
return lodash_1.default.get(this, 'root.pristine', false);
|
2061
|
+
}
|
2062
|
+
/**
|
2063
|
+
* Get the static value of this component.
|
2064
|
+
* @return {*}
|
2065
|
+
*/
|
2066
|
+
get dataValue() {
|
2067
|
+
if (!this.key ||
|
2068
|
+
(!this.visible && this.component.clearOnHide && !this.rootPristine)) {
|
2069
|
+
return this.emptyValue;
|
2070
|
+
}
|
2071
|
+
if (!this.hasValue() && this.shouldAddDefaultValue) {
|
2072
|
+
const empty = this.component.multiple ? [] : this.emptyValue;
|
2073
|
+
if (!this.rootPristine) {
|
2074
|
+
this.dataValue = empty;
|
2075
|
+
}
|
2076
|
+
return empty;
|
2077
|
+
}
|
2078
|
+
return lodash_1.default.get(this._data, this.key);
|
2079
|
+
}
|
2080
|
+
/**
|
2081
|
+
* Sets the static value of this component.
|
2082
|
+
*
|
2083
|
+
* @param value
|
2084
|
+
*/
|
2085
|
+
set dataValue(value) {
|
2086
|
+
if (!this.allowData ||
|
2087
|
+
!this.key ||
|
2088
|
+
(!this.visible && this.component.clearOnHide && !this.rootPristine)) {
|
2089
|
+
return;
|
2090
|
+
}
|
2091
|
+
if ((value !== null) && (value !== undefined)) {
|
2092
|
+
value = this.hook('setDataValue', value, this.key, this._data);
|
2093
|
+
}
|
2094
|
+
if ((value === null) || (value === undefined)) {
|
2095
|
+
this.unset();
|
2096
|
+
return;
|
2097
|
+
}
|
2098
|
+
lodash_1.default.set(this._data, this.key, value);
|
2099
|
+
return;
|
2100
|
+
}
|
2101
|
+
/**
|
2102
|
+
* Splice a value from the dataValue.
|
2103
|
+
*
|
2104
|
+
* @param index
|
2105
|
+
*/
|
2106
|
+
splice(index, flags = {}) {
|
2107
|
+
if (this.hasValue()) {
|
2108
|
+
const dataValue = this.dataValue || [];
|
2109
|
+
if (lodash_1.default.isArray(dataValue) && dataValue.hasOwnProperty(index)) {
|
2110
|
+
dataValue.splice(index, 1);
|
2111
|
+
this.dataValue = dataValue;
|
2112
|
+
this.triggerChange(flags);
|
2113
|
+
}
|
2114
|
+
}
|
2115
|
+
}
|
2116
|
+
unset() {
|
2117
|
+
lodash_1.default.unset(this._data, this.key);
|
2118
|
+
}
|
2119
|
+
/**
|
2120
|
+
* Deletes the value of the component.
|
2121
|
+
*/
|
2122
|
+
deleteValue() {
|
2123
|
+
this.setValue(null, {
|
2124
|
+
noUpdateEvent: true,
|
2125
|
+
noDefault: true
|
2126
|
+
});
|
2127
|
+
this.unset();
|
2128
|
+
}
|
2129
|
+
getCustomDefaultValue(defaultValue) {
|
2130
|
+
if (this.component.customDefaultValue && !this.options.preview) {
|
2131
|
+
defaultValue = this.evaluate(this.component.customDefaultValue, { value: '' }, 'value');
|
2132
|
+
}
|
2133
|
+
return defaultValue;
|
2134
|
+
}
|
2135
|
+
get shouldAddDefaultValue() {
|
2136
|
+
return !this.options.noDefaults || (this.component.defaultValue && !this.isEmpty(this.component.defaultValue)) || this.component.customDefaultValue;
|
2137
|
+
}
|
2138
|
+
get defaultValue() {
|
2139
|
+
let defaultValue = this.emptyValue;
|
2140
|
+
if (this.component.defaultValue) {
|
2141
|
+
defaultValue = this.component.defaultValue;
|
2142
|
+
}
|
2143
|
+
defaultValue = this.getCustomDefaultValue(defaultValue);
|
2144
|
+
const checkMask = (value) => {
|
2145
|
+
if (typeof value === 'string') {
|
2146
|
+
const placeholderChar = this.placeholderChar;
|
2147
|
+
value = (0, vanilla_text_mask_1.conformToMask)(value, this.defaultMask, { placeholderChar }).conformedValue;
|
2148
|
+
if (!FormioUtils.matchInputMask(value, this.defaultMask)) {
|
2149
|
+
value = '';
|
2150
|
+
}
|
2151
|
+
}
|
2152
|
+
else {
|
2153
|
+
value = '';
|
2154
|
+
}
|
2155
|
+
return value;
|
2156
|
+
};
|
2157
|
+
if (this.defaultMask) {
|
2158
|
+
if (Array.isArray(defaultValue)) {
|
2159
|
+
defaultValue = defaultValue.map(checkMask);
|
2160
|
+
}
|
2161
|
+
else {
|
2162
|
+
defaultValue = checkMask(defaultValue);
|
2163
|
+
}
|
2164
|
+
}
|
2165
|
+
// Clone so that it creates a new instance.
|
2166
|
+
return lodash_1.default.cloneDeep(defaultValue);
|
2167
|
+
}
|
2168
|
+
/**
|
2169
|
+
* Get the input value of this component.
|
2170
|
+
*
|
2171
|
+
* @return {*}
|
2172
|
+
*/
|
2173
|
+
getValue() {
|
2174
|
+
if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {
|
2175
|
+
return this.dataValue;
|
2176
|
+
}
|
2177
|
+
const values = [];
|
2178
|
+
for (const i in this.refs.input) {
|
2179
|
+
if (this.refs.input.hasOwnProperty(i)) {
|
2180
|
+
if (!this.component.multiple) {
|
2181
|
+
return this.getValueAt(i);
|
2182
|
+
}
|
2183
|
+
values.push(this.getValueAt(i));
|
2184
|
+
}
|
2185
|
+
}
|
2186
|
+
if (values.length === 0 && !this.component.multiple) {
|
2187
|
+
return '';
|
2188
|
+
}
|
2189
|
+
return values;
|
2190
|
+
}
|
2191
|
+
/**
|
2192
|
+
* Get the value at a specific index.
|
2193
|
+
*
|
2194
|
+
* @param index
|
2195
|
+
* @returns {*}
|
2196
|
+
*/
|
2197
|
+
getValueAt(index) {
|
2198
|
+
const input = this.performInputMapping(this.refs.input[index]);
|
2199
|
+
return input ? input.value : undefined;
|
2200
|
+
}
|
2201
|
+
/**
|
2202
|
+
* Set the value of this component.
|
2203
|
+
*
|
2204
|
+
* @param value
|
2205
|
+
* @param flags
|
2206
|
+
*
|
2207
|
+
* @return {boolean} - If the value changed.
|
2208
|
+
*/
|
2209
|
+
setValue(value, flags = {}) {
|
2210
|
+
const changed = this.updateValue(value, flags);
|
2211
|
+
value = this.dataValue;
|
2212
|
+
if (!this.hasInput) {
|
2213
|
+
return changed;
|
2214
|
+
}
|
2215
|
+
const isArray = Array.isArray(value);
|
2216
|
+
const valueInput = this.refs.fileLink || this.refs.input;
|
2217
|
+
if (isArray &&
|
2218
|
+
Array.isArray(this.defaultValue) &&
|
2219
|
+
this.refs.hasOwnProperty('input') &&
|
2220
|
+
valueInput &&
|
2221
|
+
(valueInput.length !== value.length) &&
|
2222
|
+
this.visible) {
|
2223
|
+
this.redraw();
|
2224
|
+
}
|
2225
|
+
if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
|
2226
|
+
this.redraw();
|
2227
|
+
return changed;
|
2228
|
+
}
|
2229
|
+
for (const i in this.refs.input) {
|
2230
|
+
if (this.refs.input.hasOwnProperty(i)) {
|
2231
|
+
this.setValueAt(i, isArray ? value[i] : value, flags);
|
2232
|
+
}
|
2233
|
+
}
|
2234
|
+
return changed;
|
2235
|
+
}
|
2236
|
+
/**
|
2237
|
+
* Set the value at a specific index.
|
2238
|
+
*
|
2239
|
+
* @param index
|
2240
|
+
* @param value
|
2241
|
+
*/
|
2242
|
+
setValueAt(index, value, flags = {}) {
|
2243
|
+
if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {
|
2244
|
+
value = this.defaultValue;
|
2245
|
+
}
|
2246
|
+
const input = this.performInputMapping(this.refs.input[index]);
|
2247
|
+
const valueMaskInput = this.refs.valueMaskInput;
|
2248
|
+
if (valueMaskInput === null || valueMaskInput === void 0 ? void 0 : valueMaskInput.mask) {
|
2249
|
+
valueMaskInput.mask.textMaskInputElement.update(value);
|
2250
|
+
}
|
2251
|
+
if (input.mask) {
|
2252
|
+
input.mask.textMaskInputElement.update(value);
|
2253
|
+
}
|
2254
|
+
else if (input.widget && input.widget.setValue) {
|
2255
|
+
input.widget.setValue(value);
|
2256
|
+
}
|
2257
|
+
else {
|
2258
|
+
input.value = value;
|
2259
|
+
}
|
2260
|
+
}
|
2261
|
+
get hasSetValue() {
|
2262
|
+
return this.hasValue() && !this.isEmpty(this.dataValue);
|
2263
|
+
}
|
2264
|
+
setDefaultValue() {
|
2265
|
+
if (this.defaultValue && this.shouldAddDefaultValue) {
|
2266
|
+
const defaultValue = (this.component.multiple && !this.dataValue.length) ? [] : this.defaultValue;
|
2267
|
+
this.setValue(defaultValue, {
|
2268
|
+
noUpdateEvent: true
|
2269
|
+
});
|
2270
|
+
}
|
2271
|
+
}
|
2272
|
+
/**
|
2273
|
+
* Restore the value of a control.
|
2274
|
+
*/
|
2275
|
+
restoreValue() {
|
2276
|
+
if (this.hasSetValue) {
|
2277
|
+
this.setValue(this.dataValue, {
|
2278
|
+
noUpdateEvent: true
|
2279
|
+
});
|
2280
|
+
}
|
2281
|
+
else {
|
2282
|
+
this.setDefaultValue();
|
2283
|
+
}
|
2284
|
+
}
|
2285
|
+
/**
|
2286
|
+
* Normalize values coming into updateValue.
|
2287
|
+
*
|
2288
|
+
* @param value
|
2289
|
+
* @return {*}
|
2290
|
+
*/
|
2291
|
+
normalizeValue(value) {
|
2292
|
+
if (this.component.multiple && !Array.isArray(value)) {
|
2293
|
+
value = value ? [value] : [];
|
2294
|
+
}
|
2295
|
+
return value;
|
2296
|
+
}
|
2297
|
+
/**
|
2298
|
+
* Update a value of this component.
|
2299
|
+
*
|
2300
|
+
* @param flags
|
2301
|
+
*/
|
2302
|
+
updateComponentValue(value, flags = {}) {
|
2303
|
+
let newValue = (!flags.resetValue && (value === undefined || value === null)) ? this.getValue() : value;
|
2304
|
+
newValue = this.normalizeValue(newValue, flags);
|
2305
|
+
const oldValue = this.dataValue;
|
2306
|
+
let changed = ((newValue !== undefined) ? this.hasChanged(newValue, oldValue) : false);
|
2307
|
+
if (changed) {
|
2308
|
+
this.dataValue = newValue;
|
2309
|
+
changed = this.dataValue !== oldValue;
|
2310
|
+
this.updateOnChange(flags, changed);
|
2311
|
+
}
|
2312
|
+
if (this.componentModal && flags && flags.fromSubmission) {
|
2313
|
+
this.componentModal.setValue(value);
|
2314
|
+
}
|
2315
|
+
return changed;
|
2316
|
+
}
|
2317
|
+
/**
|
2318
|
+
* Updates the value of this component plus all sub-components.
|
2319
|
+
*
|
2320
|
+
* @param args
|
2321
|
+
* @return {boolean}
|
2322
|
+
*/
|
2323
|
+
updateValue(...args) {
|
2324
|
+
return this.updateComponentValue(...args);
|
2325
|
+
}
|
2326
|
+
getIcon(name, content, styles, ref = 'icon') {
|
2327
|
+
return this.renderTemplate('icon', {
|
2328
|
+
className: this.iconClass(name),
|
2329
|
+
ref,
|
2330
|
+
styles,
|
2331
|
+
content
|
2332
|
+
});
|
2333
|
+
}
|
2334
|
+
/**
|
2335
|
+
* Resets the value of this component.
|
2336
|
+
*/
|
2337
|
+
resetValue() {
|
2338
|
+
this.unset();
|
2339
|
+
this.setValue(this.emptyValue, {
|
2340
|
+
noUpdateEvent: true,
|
2341
|
+
noValidate: true,
|
2342
|
+
resetValue: true
|
2343
|
+
});
|
2344
|
+
}
|
2345
|
+
/**
|
2346
|
+
* Determine if the value of this component has changed.
|
2347
|
+
*
|
2348
|
+
* @param newValue
|
2349
|
+
* @param oldValue
|
2350
|
+
* @return {boolean}
|
2351
|
+
*/
|
2352
|
+
hasChanged(newValue, oldValue) {
|
2353
|
+
if (((newValue === undefined) || (newValue === null)) &&
|
2354
|
+
((oldValue === undefined) || (oldValue === null) || this.isEmpty(oldValue))) {
|
2355
|
+
return false;
|
2356
|
+
}
|
2357
|
+
// If we do not have a value and are getting set to anything other than undefined or null, then we changed.
|
2358
|
+
if (newValue !== undefined &&
|
2359
|
+
newValue !== null &&
|
2360
|
+
this.allowData &&
|
2361
|
+
!this.hasValue()) {
|
2362
|
+
return true;
|
2363
|
+
}
|
2364
|
+
return !lodash_1.default.isEqual(newValue, oldValue);
|
2365
|
+
}
|
2366
|
+
/**
|
2367
|
+
* Update the value on change.
|
2368
|
+
*
|
2369
|
+
* @param flags
|
2370
|
+
*/
|
2371
|
+
updateOnChange(flags = {}, changed = false) {
|
2372
|
+
if (!flags.noUpdateEvent && changed) {
|
2373
|
+
this.triggerChange(flags);
|
2374
|
+
return true;
|
2375
|
+
}
|
2376
|
+
return false;
|
2377
|
+
}
|
2378
|
+
/**
|
2379
|
+
* Perform a calculated value operation.
|
2380
|
+
*
|
2381
|
+
* @param data - The global data object.
|
2382
|
+
*
|
2383
|
+
* @return {boolean} - If the value changed during calculation.
|
2384
|
+
*/
|
2385
|
+
convertNumberOrBoolToString(value) {
|
2386
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
2387
|
+
return value.toString();
|
2388
|
+
}
|
2389
|
+
return value;
|
2390
|
+
}
|
2391
|
+
doValueCalculation(dataValue, data, row) {
|
2392
|
+
var _a;
|
2393
|
+
return this.evaluate(this.component.calculateValue, {
|
2394
|
+
value: dataValue,
|
2395
|
+
data,
|
2396
|
+
row: row || this.data,
|
2397
|
+
submission: ((_a = this.root) === null || _a === void 0 ? void 0 : _a._submission) || {
|
2398
|
+
data: this.rootValue
|
2399
|
+
}
|
2400
|
+
}, 'value');
|
2401
|
+
}
|
2402
|
+
/* eslint-disable max-statements */
|
2403
|
+
calculateComponentValue(data, flags, row) {
|
2404
|
+
// Skip value calculation for the component if we don't have entire form data set
|
2405
|
+
if (lodash_1.default.isUndefined(lodash_1.default.get(this, 'root.data'))) {
|
2406
|
+
return false;
|
2407
|
+
}
|
2408
|
+
// If no calculated value or
|
2409
|
+
// hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)
|
2410
|
+
const { clearOnHide } = this.component;
|
2411
|
+
const shouldBeCleared = !this.visible && clearOnHide;
|
2412
|
+
const allowOverride = lodash_1.default.get(this.component, 'allowCalculateOverride', false);
|
2413
|
+
// Handle all cases when calculated values should not fire.
|
2414
|
+
if ((this.options.readOnly && !this.options.pdf && !this.component.calculateValue) ||
|
2415
|
+
!(this.component.calculateValue || this.component.calculateValueVariable) ||
|
2416
|
+
shouldBeCleared ||
|
2417
|
+
(this.options.server && !this.component.calculateServer) ||
|
2418
|
+
(flags.dataSourceInitialLoading && allowOverride)) {
|
2419
|
+
return false;
|
2420
|
+
}
|
2421
|
+
const dataValue = this.dataValue;
|
2422
|
+
// Calculate the new value.
|
2423
|
+
let calculatedValue = this.doValueCalculation(dataValue, data, row, flags);
|
2424
|
+
if (lodash_1.default.isNil(calculatedValue)) {
|
2425
|
+
calculatedValue = this.emptyValue;
|
2426
|
+
}
|
2427
|
+
const changed = !lodash_1.default.isEqual(dataValue, calculatedValue);
|
2428
|
+
// Do not override calculations on server if they have calculateServer set.
|
2429
|
+
if (allowOverride) {
|
2430
|
+
// The value is considered locked if it is not empty and comes from a submission value.
|
2431
|
+
const fromSubmission = (flags.fromSubmission && this.component.persistent === true);
|
2432
|
+
if (this.isEmpty(dataValue)) {
|
2433
|
+
// Reset the calculation lock if ever the data is cleared.
|
2434
|
+
this.calculationLocked = false;
|
2435
|
+
}
|
2436
|
+
else if (this.calculationLocked || fromSubmission) {
|
2437
|
+
this.calculationLocked = true;
|
2438
|
+
return false;
|
2439
|
+
}
|
2440
|
+
const firstPass = (this.calculatedValue === undefined);
|
2441
|
+
if (firstPass) {
|
2442
|
+
this.calculatedValue = null;
|
2443
|
+
}
|
2444
|
+
const newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));
|
2445
|
+
const previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));
|
2446
|
+
const normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));
|
2447
|
+
const calculationChanged = !lodash_1.default.isEqual(previousCalculatedValue, newCalculatedValue);
|
2448
|
+
const previousChanged = !lodash_1.default.isEqual(normalizedDataValue, previousCalculatedValue);
|
2449
|
+
if (calculationChanged && previousChanged && !firstPass) {
|
2450
|
+
return false;
|
2451
|
+
}
|
2452
|
+
// Check to ensure that the calculated value is different than the previously calculated value.
|
2453
|
+
if (previousCalculatedValue && previousChanged && !calculationChanged) {
|
2454
|
+
return false;
|
2455
|
+
}
|
2456
|
+
if (flags.isReordered || !calculationChanged) {
|
2457
|
+
return false;
|
2458
|
+
}
|
2459
|
+
if (fromSubmission) {
|
2460
|
+
// If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass
|
2461
|
+
this.calculatedValue = calculatedValue;
|
2462
|
+
return false;
|
2463
|
+
}
|
2464
|
+
// If this is the firstPass, and the dataValue is different than to the calculatedValue.
|
2465
|
+
if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {
|
2466
|
+
// Return that we have a change so it will perform another pass.
|
2467
|
+
return true;
|
2468
|
+
}
|
2469
|
+
}
|
2470
|
+
this.calculatedValue = calculatedValue;
|
2471
|
+
if (changed) {
|
2472
|
+
if (!flags.noPristineChangeOnModified) {
|
2473
|
+
this.pristine = false;
|
2474
|
+
}
|
2475
|
+
flags.triggeredComponentId = this.id;
|
2476
|
+
return this.setValue(calculatedValue, flags);
|
2477
|
+
}
|
2478
|
+
return false;
|
2479
|
+
}
|
2480
|
+
/* eslint-enable max-statements */
|
2481
|
+
/**
|
2482
|
+
* Performs calculations in this component plus any child components.
|
2483
|
+
*
|
2484
|
+
* @param args
|
2485
|
+
* @return {boolean}
|
2486
|
+
*/
|
2487
|
+
calculateValue(data, flags, row) {
|
2488
|
+
data = data || this.rootValue;
|
2489
|
+
flags = flags || {};
|
2490
|
+
row = row || this.data;
|
2491
|
+
return this.calculateComponentValue(data, flags, row);
|
2492
|
+
}
|
2493
|
+
/**
|
2494
|
+
* Get this component's label text.
|
2495
|
+
*
|
2496
|
+
*/
|
2497
|
+
get label() {
|
2498
|
+
return this.component.label;
|
2499
|
+
}
|
2500
|
+
/**
|
2501
|
+
* Set this component's label text and render it.
|
2502
|
+
*
|
2503
|
+
* @param value - The new label text.
|
2504
|
+
*/
|
2505
|
+
set label(value) {
|
2506
|
+
this.component.label = value;
|
2507
|
+
if (this.labelElement) {
|
2508
|
+
this.labelElement.innerText = value;
|
2509
|
+
}
|
2510
|
+
}
|
2511
|
+
/**
|
2512
|
+
* Get FormioForm element at the root of this component tree.
|
2513
|
+
*
|
2514
|
+
*/
|
2515
|
+
getRoot() {
|
2516
|
+
return this.root;
|
2517
|
+
}
|
2518
|
+
/**
|
2519
|
+
* Returns the invalid message, or empty string if the component is valid.
|
2520
|
+
*
|
2521
|
+
* @param data
|
2522
|
+
* @param dirty
|
2523
|
+
* @return {*}
|
2524
|
+
*/
|
2525
|
+
invalidMessage(data, dirty, ignoreCondition, row) {
|
2526
|
+
if (!ignoreCondition && !this.checkCondition(row, data)) {
|
2527
|
+
return '';
|
2528
|
+
}
|
2529
|
+
// See if this is forced invalid.
|
2530
|
+
if (this.invalid) {
|
2531
|
+
return this.invalid;
|
2532
|
+
}
|
2533
|
+
// No need to check for errors if there is no input or if it is pristine.
|
2534
|
+
if (!this.hasInput || (!dirty && this.pristine)) {
|
2535
|
+
return '';
|
2536
|
+
}
|
2537
|
+
return lodash_1.default.map(Validator_1.default.checkComponent(this, data), 'message').join('\n\n');
|
2538
|
+
}
|
2539
|
+
/**
|
2540
|
+
* Returns if the component is valid or not.
|
2541
|
+
*
|
2542
|
+
* @param data
|
2543
|
+
* @param dirty
|
2544
|
+
* @return {boolean}
|
2545
|
+
*/
|
2546
|
+
isValid(data, dirty) {
|
2547
|
+
return !this.invalidMessage(data, dirty);
|
2548
|
+
}
|
2549
|
+
setComponentValidity(messages, dirty, silentCheck) {
|
2550
|
+
const hasErrors = !!messages.filter(message => message.level === 'error' && !message.fromServer).length;
|
2551
|
+
if (messages.length && (!silentCheck || this.error) && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {
|
2552
|
+
this.setCustomValidity(messages, dirty);
|
2553
|
+
}
|
2554
|
+
else if (!silentCheck) {
|
2555
|
+
this.setCustomValidity('');
|
2556
|
+
}
|
2557
|
+
return !hasErrors;
|
2558
|
+
}
|
2559
|
+
/**
|
2560
|
+
* Checks the validity of this component and sets the error message if it is invalid.
|
2561
|
+
*
|
2562
|
+
* @param data
|
2563
|
+
* @param dirty
|
2564
|
+
* @param row
|
2565
|
+
* @return {boolean}
|
2566
|
+
*/
|
2567
|
+
checkComponentValidity(data, dirty, row, options = {}) {
|
2568
|
+
var _a;
|
2569
|
+
data = data || this.rootValue;
|
2570
|
+
row = row || this.data;
|
2571
|
+
const { async = false, silentCheck = false } = options;
|
2572
|
+
if (this.shouldSkipValidation(data, dirty, row)) {
|
2573
|
+
this.setCustomValidity('');
|
2574
|
+
return async ? native_promise_only_1.default.resolve(true) : true;
|
2575
|
+
}
|
2576
|
+
const check = Validator_1.default.checkComponent(this, data, row, true, async);
|
2577
|
+
let validations = check;
|
2578
|
+
if ((_a = this.serverErrors) === null || _a === void 0 ? void 0 : _a.length) {
|
2579
|
+
validations = check.concat(this.serverErrors);
|
2580
|
+
}
|
2581
|
+
return async ?
|
2582
|
+
validations.then((messages) => this.setComponentValidity(messages, dirty, silentCheck)) :
|
2583
|
+
this.setComponentValidity(validations, dirty, silentCheck);
|
2584
|
+
}
|
2585
|
+
checkValidity(data, dirty, row, silentCheck) {
|
2586
|
+
data = data || this.rootValue;
|
2587
|
+
row = row || this.data;
|
2588
|
+
const isValid = this.checkComponentValidity(data, dirty, row, { silentCheck });
|
2589
|
+
this.checkModal();
|
2590
|
+
return isValid;
|
2591
|
+
}
|
2592
|
+
checkAsyncValidity(data, dirty, row, silentCheck) {
|
2593
|
+
return native_promise_only_1.default.resolve(this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }));
|
2594
|
+
}
|
2595
|
+
/**
|
2596
|
+
* Check the conditions, calculations, and validity of a single component and triggers an update if
|
2597
|
+
* something changed.
|
2598
|
+
*
|
2599
|
+
* @param data - The root data of the change event.
|
2600
|
+
* @param flags - The flags from this change event.
|
2601
|
+
*
|
2602
|
+
* @return boolean - If component is valid or not.
|
2603
|
+
*/
|
2604
|
+
checkData(data, flags, row) {
|
2605
|
+
data = data || this.rootValue;
|
2606
|
+
flags = flags || {};
|
2607
|
+
row = row || this.data;
|
2608
|
+
// Needs for Nextgen Rules Engine
|
2609
|
+
this.resetCaches();
|
2610
|
+
// Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners
|
2611
|
+
if (!flags.fromBlur) {
|
2612
|
+
this.checkRefreshOn(flags.changes, flags);
|
2613
|
+
}
|
2614
|
+
if (flags.noCheck) {
|
2615
|
+
return true;
|
2616
|
+
}
|
2617
|
+
this.checkComponentConditions(data, flags, row);
|
2618
|
+
if (this.id !== flags.triggeredComponentId) {
|
2619
|
+
this.calculateComponentValue(data, flags, row);
|
2620
|
+
}
|
2621
|
+
if (flags.noValidate && !flags.validateOnInit && !flags.fromIframe) {
|
2622
|
+
if (flags.fromSubmission && this.rootPristine && this.pristine && this.error && flags.changed) {
|
2623
|
+
this.checkComponentValidity(data, !!this.options.alwaysDirty, row, true);
|
2624
|
+
}
|
2625
|
+
return true;
|
2626
|
+
}
|
2627
|
+
let isDirty = false;
|
2628
|
+
// We need to set dirty if they explicitly set noValidate to false.
|
2629
|
+
if (this.options.alwaysDirty || flags.dirty) {
|
2630
|
+
isDirty = true;
|
2631
|
+
}
|
2632
|
+
// See if they explicitely set the values with setSubmission.
|
2633
|
+
if (flags.fromSubmission && this.hasValue(data)) {
|
2634
|
+
isDirty = true;
|
2635
|
+
}
|
2636
|
+
this.setDirty(isDirty);
|
2637
|
+
if (this.component.validateOn === 'blur' && flags.fromSubmission) {
|
2638
|
+
return true;
|
2639
|
+
}
|
2640
|
+
const isValid = this.checkComponentValidity(data, isDirty, row, flags);
|
2641
|
+
this.checkModal();
|
2642
|
+
return isValid;
|
2643
|
+
}
|
2644
|
+
checkModal(isValid = true, dirty = false) {
|
2645
|
+
if (!this.component.modalEdit || !this.componentModal) {
|
2646
|
+
return;
|
2647
|
+
}
|
2648
|
+
if (dirty && !isValid) {
|
2649
|
+
this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!this.errors.length, this.refs.openModalWrapper);
|
2650
|
+
}
|
2651
|
+
else {
|
2652
|
+
this.clearErrorClasses(this.refs.openModalWrapper);
|
2653
|
+
}
|
2654
|
+
}
|
2655
|
+
get validationValue() {
|
2656
|
+
return this.dataValue;
|
2657
|
+
}
|
2658
|
+
isEmpty(value = this.dataValue) {
|
2659
|
+
const isEmptyArray = (lodash_1.default.isArray(value) && value.length === 1) ? lodash_1.default.isEqual(value[0], this.emptyValue) : false;
|
2660
|
+
return value == null || value.length === 0 || lodash_1.default.isEqual(value, this.emptyValue) || isEmptyArray;
|
2661
|
+
}
|
2662
|
+
isEqual(valueA, valueB = this.dataValue) {
|
2663
|
+
return (this.isEmpty(valueA) && this.isEmpty(valueB)) || lodash_1.default.isEqual(valueA, valueB);
|
2664
|
+
}
|
2665
|
+
/**
|
2666
|
+
* Check if a component is eligible for multiple validation
|
2667
|
+
*
|
2668
|
+
* @return {boolean}
|
2669
|
+
*/
|
2670
|
+
validateMultiple() {
|
2671
|
+
return true;
|
2672
|
+
}
|
2673
|
+
get errors() {
|
2674
|
+
return this.error ? [this.error] : [];
|
2675
|
+
}
|
2676
|
+
clearErrorClasses(element = this.element) {
|
2677
|
+
this.removeClass(element, this.options.componentErrorClass);
|
2678
|
+
this.removeClass(element, 'alert alert-danger');
|
2679
|
+
this.removeClass(element, 'has-error');
|
2680
|
+
this.removeClass(element, 'has-message');
|
2681
|
+
}
|
2682
|
+
setInputWidgetErrorClasses(inputRefs, hasErrors) {
|
2683
|
+
if (!this.isInputComponent || !this.component.widget || !(inputRefs === null || inputRefs === void 0 ? void 0 : inputRefs.length)) {
|
2684
|
+
return;
|
2685
|
+
}
|
2686
|
+
inputRefs.forEach((input) => {
|
2687
|
+
if ((input === null || input === void 0 ? void 0 : input.widget) && input.widget.setErrorClasses) {
|
2688
|
+
input.widget.setErrorClasses(hasErrors);
|
2689
|
+
}
|
2690
|
+
});
|
2691
|
+
}
|
2692
|
+
addFocusBlurEvents(element) {
|
2693
|
+
this.addEventListener(element, 'focus', () => {
|
2694
|
+
if (this.root.focusedComponent !== this) {
|
2695
|
+
if (this.root.pendingBlur) {
|
2696
|
+
this.root.pendingBlur();
|
2697
|
+
}
|
2698
|
+
this.root.focusedComponent = this;
|
2699
|
+
this.emit('focus', this);
|
2700
|
+
}
|
2701
|
+
else if (this.root.focusedComponent === this && this.root.pendingBlur) {
|
2702
|
+
this.root.pendingBlur.cancel();
|
2703
|
+
this.root.pendingBlur = null;
|
2704
|
+
}
|
2705
|
+
});
|
2706
|
+
this.addEventListener(element, 'blur', () => {
|
2707
|
+
this.root.pendingBlur = FormioUtils.delay(() => {
|
2708
|
+
this.emit('blur', this);
|
2709
|
+
if (this.component.validateOn === 'blur') {
|
2710
|
+
this.root.triggerChange({ fromBlur: true }, {
|
2711
|
+
instance: this,
|
2712
|
+
component: this.component,
|
2713
|
+
value: this.dataValue,
|
2714
|
+
flags: { fromBlur: true }
|
2715
|
+
});
|
2716
|
+
}
|
2717
|
+
this.root.focusedComponent = null;
|
2718
|
+
this.root.pendingBlur = null;
|
2719
|
+
});
|
2720
|
+
});
|
2721
|
+
}
|
2722
|
+
setCustomValidity(messages, dirty, external) {
|
2723
|
+
const inputRefs = this.isInputComponent ? this.refs.input || [] : null;
|
2724
|
+
if (typeof messages === 'string' && messages) {
|
2725
|
+
messages = {
|
2726
|
+
level: 'error',
|
2727
|
+
message: messages,
|
2728
|
+
};
|
2729
|
+
}
|
2730
|
+
if (!Array.isArray(messages)) {
|
2731
|
+
if (messages) {
|
2732
|
+
messages = [messages];
|
2733
|
+
}
|
2734
|
+
else {
|
2735
|
+
messages = [];
|
2736
|
+
}
|
2737
|
+
}
|
2738
|
+
const hasErrors = !!messages.filter(message => message.level === 'error').length;
|
2739
|
+
let invalidInputRefs = inputRefs;
|
2740
|
+
if (this.component.multiple) {
|
2741
|
+
const inputRefsArray = Array.from(inputRefs);
|
2742
|
+
inputRefsArray.forEach((input) => {
|
2743
|
+
this.setElementInvalid(this.performInputMapping(input), false);
|
2744
|
+
});
|
2745
|
+
this.setInputWidgetErrorClasses(inputRefsArray, false);
|
2746
|
+
invalidInputRefs = inputRefsArray.filter((ref) => {
|
2747
|
+
var _a;
|
2748
|
+
return (_a = messages.some) === null || _a === void 0 ? void 0 : _a.call(messages, (msg) => {
|
2749
|
+
var _a;
|
2750
|
+
return ((_a = msg === null || msg === void 0 ? void 0 : msg.context) === null || _a === void 0 ? void 0 : _a.input) === ref;
|
2751
|
+
});
|
2752
|
+
});
|
2753
|
+
}
|
2754
|
+
if (messages.length) {
|
2755
|
+
if (this.refs.messageContainer) {
|
2756
|
+
this.empty(this.refs.messageContainer);
|
2757
|
+
}
|
2758
|
+
this.error = {
|
2759
|
+
component: this.component,
|
2760
|
+
message: messages[0].message,
|
2761
|
+
messages,
|
2762
|
+
external: !!external,
|
2763
|
+
};
|
2764
|
+
this.emit('componentError', this.error);
|
2765
|
+
this.addMessages(messages, dirty, invalidInputRefs);
|
2766
|
+
if (invalidInputRefs) {
|
2767
|
+
this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);
|
2768
|
+
}
|
2769
|
+
}
|
2770
|
+
else if (!this.error || (this.error && this.error.external === !!external)) {
|
2771
|
+
if (this.refs.messageContainer) {
|
2772
|
+
this.empty(this.refs.messageContainer);
|
2773
|
+
}
|
2774
|
+
if (this.refs.modalMessageContainer) {
|
2775
|
+
this.empty(this.refs.modalMessageContainer);
|
2776
|
+
}
|
2777
|
+
this.error = null;
|
2778
|
+
if (invalidInputRefs) {
|
2779
|
+
this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);
|
2780
|
+
}
|
2781
|
+
this.clearErrorClasses();
|
2782
|
+
}
|
2783
|
+
// if (!this.refs.input) {
|
2784
|
+
// return;
|
2785
|
+
// }
|
2786
|
+
// this.refs.input.forEach(input => {
|
2787
|
+
// input = this.performInputMapping(input);
|
2788
|
+
// if (typeof input.setCustomValidity === 'function') {
|
2789
|
+
// input.setCustomValidity(message, dirty);
|
2790
|
+
// }
|
2791
|
+
// });
|
2792
|
+
}
|
2793
|
+
/**
|
2794
|
+
* Determines if the value of this component is hidden from the user as if it is coming from the server, but is
|
2795
|
+
* protected.
|
2796
|
+
*
|
2797
|
+
* @return {boolean|*}
|
2798
|
+
*/
|
2799
|
+
isValueHidden() {
|
2800
|
+
if (this.component.protected && this.root.editing) {
|
2801
|
+
return false;
|
2802
|
+
}
|
2803
|
+
if (!this.root || !this.root.hasOwnProperty('editing')) {
|
2804
|
+
return false;
|
2805
|
+
}
|
2806
|
+
if (!this.root || !this.root.editing) {
|
2807
|
+
return false;
|
2808
|
+
}
|
2809
|
+
return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));
|
2810
|
+
}
|
2811
|
+
shouldSkipValidation(data, dirty, row) {
|
2812
|
+
const rules = [
|
2813
|
+
// Do not check custom validation for empty data if it is not required
|
2814
|
+
() => this.component.validate.custom && !this.dataValue && !this.component.validate.required,
|
2815
|
+
// Force valid if component is read-only
|
2816
|
+
() => this.options.readOnly,
|
2817
|
+
// Do not check validations if component is not an input component.
|
2818
|
+
() => !this.hasInput,
|
2819
|
+
// Check to see if we are editing and if so, check component persistence.
|
2820
|
+
() => this.isValueHidden(),
|
2821
|
+
// Force valid if component is hidden.
|
2822
|
+
() => !this.visible,
|
2823
|
+
// Force valid if component is conditionally hidden.
|
2824
|
+
() => !this.checkCondition(row, data)
|
2825
|
+
];
|
2826
|
+
return rules.some(pred => pred());
|
2827
|
+
}
|
2828
|
+
// Maintain reverse compatibility.
|
2829
|
+
whenReady() {
|
2830
|
+
console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');
|
2831
|
+
return this.dataReady;
|
2832
|
+
}
|
2833
|
+
get dataReady() {
|
2834
|
+
return native_promise_only_1.default.resolve();
|
2835
|
+
}
|
2836
|
+
/**
|
2837
|
+
* Prints out the value of this component as a string value.
|
2838
|
+
*/
|
2839
|
+
asString(value) {
|
2840
|
+
value = value || this.getValue();
|
2841
|
+
return (Array.isArray(value) ? value : [value]).map(lodash_1.default.toString).join(', ');
|
2842
|
+
}
|
2843
|
+
/**
|
2844
|
+
* Return if the component is disabled.
|
2845
|
+
* @return {boolean}
|
2846
|
+
*/
|
2847
|
+
get disabled() {
|
2848
|
+
return this._disabled || this.parentDisabled;
|
2849
|
+
}
|
2850
|
+
/**
|
2851
|
+
* Disable this component.
|
2852
|
+
*
|
2853
|
+
* @param {boolean} disabled
|
2854
|
+
*/
|
2855
|
+
set disabled(disabled) {
|
2856
|
+
this._disabled = disabled;
|
2857
|
+
}
|
2858
|
+
setDisabled(element, disabled) {
|
2859
|
+
if (!element) {
|
2860
|
+
return;
|
2861
|
+
}
|
2862
|
+
element.disabled = disabled;
|
2863
|
+
if (disabled) {
|
2864
|
+
element.setAttribute('disabled', 'disabled');
|
2865
|
+
}
|
2866
|
+
else {
|
2867
|
+
element.removeAttribute('disabled');
|
2868
|
+
}
|
2869
|
+
}
|
2870
|
+
setLoading(element, loading) {
|
2871
|
+
if (!element || (element.loading === loading)) {
|
2872
|
+
return;
|
2873
|
+
}
|
2874
|
+
element.loading = loading;
|
2875
|
+
if (!element.loader && loading) {
|
2876
|
+
element.loader = this.ce('i', {
|
2877
|
+
class: `${this.iconClass('refresh', true)} button-icon-right`
|
2878
|
+
});
|
2879
|
+
}
|
2880
|
+
if (element.loader) {
|
2881
|
+
if (loading) {
|
2882
|
+
this.appendTo(element.loader, element);
|
2883
|
+
}
|
2884
|
+
else {
|
2885
|
+
this.removeChildFrom(element.loader, element);
|
2886
|
+
}
|
2887
|
+
}
|
2888
|
+
}
|
2889
|
+
selectOptions(select, tag, options, defaultValue) {
|
2890
|
+
lodash_1.default.each(options, (option) => {
|
2891
|
+
const attrs = {
|
2892
|
+
value: option.value
|
2893
|
+
};
|
2894
|
+
if (defaultValue !== undefined && (option.value === defaultValue)) {
|
2895
|
+
attrs.selected = 'selected';
|
2896
|
+
}
|
2897
|
+
const optionElement = this.ce('option', attrs);
|
2898
|
+
optionElement.appendChild(this.text(option.label));
|
2899
|
+
select.appendChild(optionElement);
|
2900
|
+
});
|
2901
|
+
}
|
2902
|
+
setSelectValue(select, value) {
|
2903
|
+
const options = select.querySelectorAll('option');
|
2904
|
+
lodash_1.default.each(options, (option) => {
|
2905
|
+
if (option.value === value) {
|
2906
|
+
option.setAttribute('selected', 'selected');
|
2907
|
+
}
|
2908
|
+
else {
|
2909
|
+
option.removeAttribute('selected');
|
2910
|
+
}
|
2911
|
+
});
|
2912
|
+
if (select.onchange) {
|
2913
|
+
select.onchange();
|
2914
|
+
}
|
2915
|
+
if (select.onselect) {
|
2916
|
+
select.onselect();
|
2917
|
+
}
|
2918
|
+
}
|
2919
|
+
getRelativePath(path) {
|
2920
|
+
const keyPart = `.${this.key}`;
|
2921
|
+
const thisPath = this.isInputComponent ? this.path
|
2922
|
+
: this.path.slice(0).replace(keyPart, '');
|
2923
|
+
return path.replace(thisPath, '');
|
2924
|
+
}
|
2925
|
+
clear() {
|
2926
|
+
this.detach();
|
2927
|
+
this.empty(this.getElement());
|
2928
|
+
}
|
2929
|
+
append(element) {
|
2930
|
+
this.appendTo(element, this.element);
|
2931
|
+
}
|
2932
|
+
prepend(element) {
|
2933
|
+
this.prependTo(element, this.element);
|
2934
|
+
}
|
2935
|
+
removeChild(element) {
|
2936
|
+
this.removeChildFrom(element, this.element);
|
2937
|
+
}
|
2938
|
+
detachLogic() {
|
2939
|
+
this.logic.forEach(logic => {
|
2940
|
+
if (logic.trigger.type === 'event') {
|
2941
|
+
const event = this.interpolate(logic.trigger.event);
|
2942
|
+
this.off(event); // only applies to callbacks on this component
|
2943
|
+
}
|
2944
|
+
});
|
2945
|
+
}
|
2946
|
+
attachLogic() {
|
2947
|
+
// Do not attach logic during builder mode.
|
2948
|
+
if (this.builderMode) {
|
2949
|
+
return;
|
2950
|
+
}
|
2951
|
+
this.logic.forEach((logic) => {
|
2952
|
+
if (logic.trigger.type === 'event') {
|
2953
|
+
const event = this.interpolate(logic.trigger.event);
|
2954
|
+
this.on(event, (...args) => {
|
2955
|
+
const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);
|
2956
|
+
if (this.applyActions(newComponent, logic.actions, args)) {
|
2957
|
+
// If component definition changed, replace it.
|
2958
|
+
if (!lodash_1.default.isEqual(this.component, newComponent)) {
|
2959
|
+
this.component = newComponent;
|
2960
|
+
const visible = this.conditionallyVisible(null, null);
|
2961
|
+
const disabled = this.shouldDisabled;
|
2962
|
+
// Change states which won't be recalculated during redrawing
|
2963
|
+
if (this.visible !== visible) {
|
2964
|
+
this.visible = visible;
|
2965
|
+
}
|
2966
|
+
if (this.disabled !== disabled) {
|
2967
|
+
this.disabled = disabled;
|
2968
|
+
}
|
2969
|
+
this.redraw();
|
2970
|
+
}
|
2971
|
+
}
|
2972
|
+
}, true);
|
2973
|
+
}
|
2974
|
+
});
|
2975
|
+
}
|
2976
|
+
/**
|
2977
|
+
* Get the element information.
|
2978
|
+
*/
|
2979
|
+
elementInfo() {
|
2980
|
+
const attributes = {
|
2981
|
+
name: this.options.name,
|
2982
|
+
type: this.component.inputType || 'text',
|
2983
|
+
class: 'form-control',
|
2984
|
+
lang: this.options.language
|
2985
|
+
};
|
2986
|
+
if (this.component.placeholder) {
|
2987
|
+
attributes.placeholder = this.t(this.component.placeholder, { _userInput: true });
|
2988
|
+
}
|
2989
|
+
if (this.component.tabindex) {
|
2990
|
+
attributes.tabindex = this.component.tabindex;
|
2991
|
+
}
|
2992
|
+
if (this.disabled) {
|
2993
|
+
attributes.disabled = 'disabled';
|
2994
|
+
}
|
2995
|
+
lodash_1.default.defaults(attributes, this.component.attributes);
|
2996
|
+
return {
|
2997
|
+
type: 'input',
|
2998
|
+
component: this.component,
|
2999
|
+
changeEvent: 'change',
|
3000
|
+
attr: attributes
|
3001
|
+
};
|
3002
|
+
}
|
3003
|
+
autofocus() {
|
3004
|
+
const hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;
|
3005
|
+
if (hasAutofocus) {
|
3006
|
+
this.on('render', () => this.focus(), true);
|
3007
|
+
}
|
3008
|
+
}
|
3009
|
+
scrollIntoView(element = this.element) {
|
3010
|
+
if (!element) {
|
3011
|
+
return;
|
3012
|
+
}
|
3013
|
+
const { left, top } = element.getBoundingClientRect();
|
3014
|
+
window.scrollTo(left + window.scrollX, top + window.scrollY);
|
3015
|
+
}
|
3016
|
+
focus(index) {
|
3017
|
+
var _a, _b;
|
3018
|
+
if ('beforeFocus' in this.parent) {
|
3019
|
+
this.parent.beforeFocus(this);
|
3020
|
+
}
|
3021
|
+
if ((_a = this.refs.input) === null || _a === void 0 ? void 0 : _a.length) {
|
3022
|
+
const focusingInput = typeof index === 'number' && this.refs.input[index]
|
3023
|
+
? this.refs.input[index]
|
3024
|
+
: this.refs.input[this.refs.input.length - 1];
|
3025
|
+
if (((_b = this.component.widget) === null || _b === void 0 ? void 0 : _b.type) === 'calendar') {
|
3026
|
+
const sibling = focusingInput.nextSibling;
|
3027
|
+
if (sibling) {
|
3028
|
+
sibling.focus();
|
3029
|
+
}
|
3030
|
+
}
|
3031
|
+
else {
|
3032
|
+
focusingInput.focus();
|
3033
|
+
}
|
3034
|
+
}
|
3035
|
+
if (this.refs.openModal) {
|
3036
|
+
this.refs.openModal.focus();
|
3037
|
+
}
|
3038
|
+
if (this.parent.refs.openModal) {
|
3039
|
+
this.parent.refs.openModal.focus();
|
3040
|
+
}
|
3041
|
+
}
|
3042
|
+
/**
|
3043
|
+
* Get `Formio` instance for working with files
|
3044
|
+
*/
|
3045
|
+
get fileService() {
|
3046
|
+
if (this.options.fileService) {
|
3047
|
+
return this.options.fileService;
|
3048
|
+
}
|
3049
|
+
if (this.options.formio) {
|
3050
|
+
return this.options.formio;
|
3051
|
+
}
|
3052
|
+
if (this.root && this.root.formio) {
|
3053
|
+
return this.root.formio;
|
3054
|
+
}
|
3055
|
+
const formio = new Formio_1.Formio();
|
3056
|
+
// If a form is loaded, then make sure to set the correct formUrl.
|
3057
|
+
if (this.root && this.root._form && this.root._form._id) {
|
3058
|
+
formio.formUrl = `${formio.projectUrl}/form/${this.root._form._id}`;
|
3059
|
+
}
|
3060
|
+
return formio;
|
3061
|
+
}
|
3062
|
+
resetCaches() { }
|
3063
|
+
get previewMode() {
|
3064
|
+
return false;
|
3065
|
+
}
|
3066
|
+
}
|
3067
|
+
exports.default = Component;
|
3068
|
+
Component.externalLibraries = {};
|
3069
|
+
Component.requireLibrary = function (name, property, src, polling) {
|
3070
|
+
if (!Component.externalLibraries.hasOwnProperty(name)) {
|
3071
|
+
Component.externalLibraries[name] = {};
|
3072
|
+
Component.externalLibraries[name].ready = new native_promise_only_1.default((resolve, reject) => {
|
3073
|
+
Component.externalLibraries[name].resolve = resolve;
|
3074
|
+
Component.externalLibraries[name].reject = reject;
|
3075
|
+
});
|
3076
|
+
const callbackName = `${name}Callback`;
|
3077
|
+
if (!polling && !window[callbackName]) {
|
3078
|
+
window[callbackName] = function () {
|
3079
|
+
this.resolve();
|
3080
|
+
}.bind(Component.externalLibraries[name]);
|
3081
|
+
}
|
3082
|
+
// See if the plugin already exists.
|
3083
|
+
const plugin = lodash_1.default.get(window, property);
|
3084
|
+
if (plugin) {
|
3085
|
+
Component.externalLibraries[name].resolve(plugin);
|
3086
|
+
}
|
3087
|
+
else {
|
3088
|
+
src = Array.isArray(src) ? src : [src];
|
3089
|
+
src.forEach((lib) => {
|
3090
|
+
let attrs = {};
|
3091
|
+
let elementType = '';
|
3092
|
+
if (typeof lib === 'string') {
|
3093
|
+
lib = {
|
3094
|
+
type: 'script',
|
3095
|
+
src: lib
|
3096
|
+
};
|
3097
|
+
}
|
3098
|
+
switch (lib.type) {
|
3099
|
+
case 'script':
|
3100
|
+
elementType = 'script';
|
3101
|
+
attrs = {
|
3102
|
+
src: lib.src,
|
3103
|
+
type: 'text/javascript',
|
3104
|
+
defer: true,
|
3105
|
+
async: true
|
3106
|
+
};
|
3107
|
+
break;
|
3108
|
+
case 'styles':
|
3109
|
+
elementType = 'link';
|
3110
|
+
attrs = {
|
3111
|
+
href: lib.src,
|
3112
|
+
rel: 'stylesheet'
|
3113
|
+
};
|
3114
|
+
break;
|
3115
|
+
}
|
3116
|
+
// Add the script to the top page.
|
3117
|
+
const script = document.createElement(elementType);
|
3118
|
+
for (const attr in attrs) {
|
3119
|
+
script.setAttribute(attr, attrs[attr]);
|
3120
|
+
}
|
3121
|
+
document.getElementsByTagName('head')[0].appendChild(script);
|
3122
|
+
});
|
3123
|
+
// if no callback is provided, then check periodically for the script.
|
3124
|
+
if (polling) {
|
3125
|
+
setTimeout(function checkLibrary() {
|
3126
|
+
const plugin = lodash_1.default.get(window, property);
|
3127
|
+
if (plugin) {
|
3128
|
+
Component.externalLibraries[name].resolve(plugin);
|
3129
|
+
}
|
3130
|
+
else {
|
3131
|
+
// check again after 200 ms.
|
3132
|
+
setTimeout(checkLibrary, 200);
|
3133
|
+
}
|
3134
|
+
}, 200);
|
3135
|
+
}
|
3136
|
+
}
|
3137
|
+
}
|
3138
|
+
return Component.externalLibraries[name].ready;
|
3139
|
+
};
|
3140
|
+
Component.libraryReady = function (name) {
|
3141
|
+
if (Component.externalLibraries.hasOwnProperty(name) &&
|
3142
|
+
Component.externalLibraries[name].ready) {
|
3143
|
+
return Component.externalLibraries[name].ready;
|
3144
|
+
}
|
3145
|
+
return native_promise_only_1.default.reject(`${name} library was not required.`);
|
3146
|
+
};
|