@formio/js 5.2.4-rc.0 → 5.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.builder.css +50 -161
- package/dist/formio.builder.min.css +1 -1
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.css +49 -158
- package/dist/formio.form.js +108 -152
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.css +50 -161
- package/dist/formio.full.js +227 -401
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +18 -51
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +14 -47
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/CDN.js +12 -12
- package/lib/cjs/Element.d.ts +2 -3
- package/lib/cjs/Element.js +26 -29
- package/lib/cjs/Embed.js +42 -75
- package/lib/cjs/EventEmitter.js +1 -1
- package/lib/cjs/Form.d.ts +341 -371
- package/lib/cjs/Form.js +39 -153
- package/lib/cjs/FormBuilder.d.ts +3 -3
- package/lib/cjs/FormBuilder.js +3 -2
- package/lib/cjs/Formio.js +23 -26
- package/lib/cjs/InlineEmbed.js +17 -23
- package/lib/cjs/PDF.d.ts +0 -1
- package/lib/cjs/PDF.js +15 -18
- package/lib/cjs/PDFBuilder.js +36 -51
- package/lib/cjs/Webform.d.ts +366 -8
- package/lib/cjs/Webform.js +238 -177
- package/lib/cjs/WebformBuilder.js +152 -221
- package/lib/cjs/Wizard.js +65 -95
- package/lib/cjs/WizardBuilder.js +19 -27
- package/lib/cjs/addons/FormioAddon.js +1 -1
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +57 -59
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +16 -24
- package/lib/cjs/addons/index.js +3 -3
- package/lib/cjs/components/Components.js +4 -0
- package/lib/cjs/components/_classes/component/Component.form.js +11 -11
- package/lib/cjs/components/_classes/component/Component.js +198 -309
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +4 -2
- package/lib/cjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +11 -9
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -37
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +25 -39
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +29 -47
- package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
- package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +7 -5
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +34 -37
- package/lib/cjs/components/_classes/component/editForm/utils.js +16 -12
- package/lib/cjs/components/_classes/componentModal/ComponentModal.js +6 -6
- package/lib/cjs/components/_classes/field/Field.js +1 -7
- package/lib/cjs/components/_classes/input/Input.js +26 -30
- package/lib/cjs/components/_classes/list/ListComponent.form.js +1 -1
- package/lib/cjs/components/_classes/list/ListComponent.js +18 -27
- package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +9 -36
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +13 -32
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +1 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.form.js +3 -3
- package/lib/cjs/components/_classes/nested/NestedComponent.js +75 -67
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +14 -19
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +17 -19
- package/lib/cjs/components/address/Address.d.ts +0 -1
- package/lib/cjs/components/address/Address.js +52 -57
- package/lib/cjs/components/address/editForm/Address.edit.data.js +2 -2
- package/lib/cjs/components/address/editForm/Address.edit.display.js +2 -2
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +11 -53
- package/lib/cjs/components/alert/Alert.js +15 -21
- package/lib/cjs/components/button/Button.form.js +1 -1
- package/lib/cjs/components/button/Button.js +47 -64
- package/lib/cjs/components/button/editForm/Button.edit.display.js +9 -49
- package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/components/checkbox/Checkbox.form.js +3 -3
- package/lib/cjs/components/checkbox/Checkbox.js +20 -28
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +3 -13
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
- package/lib/cjs/components/columns/Columns.form.js +1 -1
- package/lib/cjs/components/columns/Columns.js +12 -24
- package/lib/cjs/components/columns/editForm/Columns.edit.display.js +17 -17
- package/lib/cjs/components/container/Container.form.js +2 -2
- package/lib/cjs/components/container/Container.js +4 -6
- package/lib/cjs/components/container/editForm/Container.edit.data.js +3 -3
- package/lib/cjs/components/container/editForm/Container.edit.display.js +4 -4
- package/lib/cjs/components/content/Content.form.js +2 -4
- package/lib/cjs/components/content/Content.js +8 -10
- package/lib/cjs/components/content/editForm/Content.edit.display.js +10 -10
- package/lib/cjs/components/currency/Currency.form.js +3 -3
- package/lib/cjs/components/currency/Currency.js +10 -19
- package/lib/cjs/components/currency/editForm/Currency.edit.data.js +5 -5
- package/lib/cjs/components/currency/editForm/Currency.edit.display.js +8 -8
- package/lib/cjs/components/datagrid/DataGrid.form.js +3 -3
- package/lib/cjs/components/datagrid/DataGrid.js +42 -92
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
- package/lib/cjs/components/datamap/DataMap.form.js +2 -2
- package/lib/cjs/components/datamap/DataMap.js +35 -46
- package/lib/cjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
- package/lib/cjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
- package/lib/cjs/components/datetime/DateTime.form.js +5 -5
- package/lib/cjs/components/datetime/DateTime.js +15 -30
- package/lib/cjs/components/datetime/editForm/DateTime.edit.data.js +3 -4
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
- package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +17 -22
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
- package/lib/cjs/components/day/Day.form.js +5 -5
- package/lib/cjs/components/day/Day.js +58 -147
- package/lib/cjs/components/day/editForm/Day.edit.day.js +9 -13
- package/lib/cjs/components/day/editForm/Day.edit.display.js +7 -7
- package/lib/cjs/components/day/editForm/Day.edit.month.js +8 -12
- package/lib/cjs/components/day/editForm/Day.edit.validation.js +7 -7
- package/lib/cjs/components/day/editForm/Day.edit.year.js +8 -8
- package/lib/cjs/components/editgrid/EditGrid.form.js +2 -2
- package/lib/cjs/components/editgrid/EditGrid.js +96 -142
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -7
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
- package/lib/cjs/components/email/Email.js +4 -4
- package/lib/cjs/components/email/editForm/Email.edit.display.js +3 -3
- package/lib/cjs/components/email/editForm/Email.edit.validation.js +6 -6
- package/lib/cjs/components/fieldset/Fieldset.form.js +1 -1
- package/lib/cjs/components/fieldset/Fieldset.js +2 -2
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
- package/lib/cjs/components/file/File.form.js +4 -4
- package/lib/cjs/components/file/File.js +90 -131
- package/lib/cjs/components/file/editForm/File.edit.display.js +5 -9
- package/lib/cjs/components/file/editForm/File.edit.file.js +53 -97
- package/lib/cjs/components/file/editForm/File.edit.validation.js +2 -2
- package/lib/cjs/components/form/Form.form.js +3 -3
- package/lib/cjs/components/form/Form.js +58 -68
- package/lib/cjs/components/form/editForm/Form.edit.data.js +3 -1
- package/lib/cjs/components/form/editForm/Form.edit.display.js +7 -6
- package/lib/cjs/components/form/editForm/Form.edit.form.js +9 -11
- package/lib/cjs/components/hidden/Hidden.form.js +4 -4
- package/lib/cjs/components/hidden/Hidden.js +2 -2
- package/lib/cjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
- package/lib/cjs/components/html/HTML.js +17 -23
- package/lib/cjs/components/html/editForm/HTML.edit.display.js +17 -17
- package/lib/cjs/components/html/editForm/HTML.edit.logic.js +2 -2
- package/lib/cjs/components/number/Number.form.js +3 -3
- package/lib/cjs/components/number/Number.js +11 -27
- package/lib/cjs/components/number/editForm/Number.edit.data.js +3 -3
- package/lib/cjs/components/number/editForm/Number.edit.display.js +4 -4
- package/lib/cjs/components/number/editForm/Number.edit.validation.js +9 -9
- package/lib/cjs/components/panel/Panel.form.js +1 -1
- package/lib/cjs/components/panel/Panel.js +2 -2
- package/lib/cjs/components/panel/editForm/Panel.edit.conditional.js +7 -5
- package/lib/cjs/components/panel/editForm/Panel.edit.display.js +29 -55
- package/lib/cjs/components/password/Password.form.js +3 -3
- package/lib/cjs/components/password/Password.js +2 -5
- package/lib/cjs/components/password/editForm/Password.edit.data.js +11 -11
- package/lib/cjs/components/password/editForm/Password.edit.display.js +3 -3
- package/lib/cjs/components/password/editForm/Password.edit.validation.js +3 -3
- package/lib/cjs/components/phonenumber/PhoneNumber.form.js +8 -8
- package/lib/cjs/components/phonenumber/PhoneNumber.js +3 -3
- package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
- package/lib/cjs/components/radio/Radio.form.js +3 -3
- package/lib/cjs/components/radio/Radio.js +32 -58
- package/lib/cjs/components/radio/editForm/Radio.edit.data.js +9 -23
- package/lib/cjs/components/radio/editForm/Radio.edit.display.js +6 -6
- package/lib/cjs/components/radio/editForm/Radio.edit.validation.js +2 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.form.js +5 -5
- package/lib/cjs/components/recaptcha/ReCaptcha.js +10 -10
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
- package/lib/cjs/components/select/Select.form.js +3 -3
- package/lib/cjs/components/select/Select.js +140 -235
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1 -1
- package/lib/cjs/components/select/editForm/Select.edit.data.js +57 -191
- package/lib/cjs/components/select/editForm/Select.edit.display.js +2 -2
- package/lib/cjs/components/select/editForm/Select.edit.validation.js +4 -4
- package/lib/cjs/components/selectboxes/SelectBoxes.form.js +3 -3
- package/lib/cjs/components/selectboxes/SelectBoxes.js +16 -29
- package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
- package/lib/cjs/components/signature/Signature.form.js +3 -3
- package/lib/cjs/components/signature/Signature.js +17 -26
- package/lib/cjs/components/signature/editForm/Signature.edit.display.js +10 -19
- package/lib/cjs/components/survey/Survey.form.js +3 -3
- package/lib/cjs/components/survey/Survey.js +17 -30
- package/lib/cjs/components/survey/editForm/Survey.edit.data.js +11 -23
- package/lib/cjs/components/survey/editForm/Survey.edit.display.js +1 -1
- package/lib/cjs/components/survey/editForm/Survey.edit.validation.js +1 -1
- package/lib/cjs/components/table/Table.form.js +1 -1
- package/lib/cjs/components/table/Table.js +7 -8
- package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -22
- package/lib/cjs/components/tabs/Tabs.form.js +1 -1
- package/lib/cjs/components/tabs/Tabs.js +10 -27
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +17 -21
- package/lib/cjs/components/tags/Tags.form.js +1 -1
- package/lib/cjs/components/tags/Tags.js +12 -28
- package/lib/cjs/components/tags/editForm/Tags.edit.data.js +7 -7
- package/lib/cjs/components/textarea/TextArea.form.js +2 -2
- package/lib/cjs/components/textarea/TextArea.js +45 -63
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +72 -96
- package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
- package/lib/cjs/components/textfield/TextField.form.js +3 -3
- package/lib/cjs/components/textfield/TextField.js +21 -32
- package/lib/cjs/components/textfield/editForm/TextField.edit.data.js +13 -15
- package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +21 -31
- package/lib/cjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
- package/lib/cjs/components/time/Time.js +10 -17
- package/lib/cjs/components/time/editForm/Time.edit.display.js +2 -2
- package/lib/cjs/components/unknown/Unknown.form.js +5 -5
- package/lib/cjs/components/unknown/Unknown.js +2 -2
- package/lib/cjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
- package/lib/cjs/components/url/Url.form.js +3 -3
- package/lib/cjs/components/url/Url.js +2 -2
- package/lib/cjs/components/url/editForm/Url.edit.display.js +3 -3
- package/lib/cjs/components/url/editForm/Url.edit.validation.js +1 -1
- package/lib/cjs/components/well/Well.form.js +1 -1
- package/lib/cjs/components/well/Well.js +2 -2
- package/lib/cjs/components/well/editForm/Well.edit.display.js +10 -10
- package/lib/cjs/formio.form.d.ts +1 -2
- package/lib/cjs/formio.form.js +12 -38
- package/lib/cjs/i18n.d.ts +0 -4
- package/lib/cjs/i18n.js +3 -7
- package/lib/cjs/package.json +1 -1
- package/lib/cjs/pdf.image.d.ts +2 -0
- package/lib/cjs/pdf.image.js +94 -0
- package/lib/cjs/providers/address/AddressProvider.js +5 -8
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +3 -3
- package/lib/cjs/providers/address/GoogleAddressProvider.js +13 -24
- package/lib/cjs/providers/processor/fileProcessor.js +1 -3
- package/lib/cjs/providers/storage/azure.js +2 -5
- package/lib/cjs/providers/storage/dropbox.js +5 -4
- package/lib/cjs/providers/storage/googleDrive.js +4 -3
- package/lib/cjs/providers/storage/index.js +1 -1
- package/lib/cjs/providers/storage/indexeddb.js +6 -16
- package/lib/cjs/providers/storage/s3.js +6 -17
- package/lib/cjs/providers/storage/uploadAdapter.js +11 -17
- package/lib/cjs/providers/storage/url.js +11 -13
- package/lib/cjs/providers/storage/xhr.js +9 -17
- package/lib/cjs/templates/index.js +1 -1
- package/lib/cjs/translations/en.d.ts +2 -0
- package/lib/cjs/translations/en.js +9 -7
- package/lib/cjs/utils/ChoicesWrapper.js +2 -2
- package/lib/cjs/utils/builder.js +7 -31
- package/lib/cjs/utils/calendarUtils.js +5 -7
- package/lib/cjs/utils/conditionOperators/ConditionOperator.js +1 -1
- package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +4 -12
- package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +1 -3
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +6 -10
- package/lib/cjs/utils/conditionOperators/index.js +1 -1
- package/lib/cjs/utils/formUtils.js +1 -1
- package/lib/cjs/utils/i18n.js +1 -7
- package/lib/cjs/utils/index.d.ts +1 -2
- package/lib/cjs/utils/index.js +2 -2
- 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 +1 -10
- package/lib/cjs/utils/utils.js +92 -175
- package/lib/cjs/widgets/CalendarWidget.js +49 -66
- package/lib/cjs/widgets/InputWidget.js +4 -6
- package/lib/cjs/widgets/index.js +1 -1
- package/lib/mjs/CDN.js +12 -12
- package/lib/mjs/Element.d.ts +2 -3
- package/lib/mjs/Element.js +23 -29
- package/lib/mjs/Embed.js +43 -77
- package/lib/mjs/EventEmitter.js +1 -1
- package/lib/mjs/Form.d.ts +341 -371
- package/lib/mjs/Form.js +126 -142
- package/lib/mjs/FormBuilder.d.ts +3 -3
- package/lib/mjs/FormBuilder.js +3 -2
- package/lib/mjs/Formio.js +23 -26
- package/lib/mjs/InlineEmbed.js +17 -23
- package/lib/mjs/PDF.d.ts +0 -1
- package/lib/mjs/PDF.js +15 -18
- package/lib/mjs/PDFBuilder.js +36 -51
- package/lib/mjs/Webform.d.ts +366 -8
- package/lib/mjs/Webform.js +251 -184
- package/lib/mjs/WebformBuilder.js +151 -224
- package/lib/mjs/Wizard.js +64 -94
- package/lib/mjs/WizardBuilder.js +19 -27
- package/lib/mjs/addons/FormioAddon.js +1 -1
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +57 -59
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +16 -24
- package/lib/mjs/addons/index.js +3 -3
- package/lib/mjs/components/Components.js +4 -0
- package/lib/mjs/components/_classes/component/Component.form.js +11 -11
- package/lib/mjs/components/_classes/component/Component.js +194 -313
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +4 -2
- package/lib/mjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +11 -9
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -37
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +25 -39
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +29 -47
- package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
- package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +7 -5
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +34 -37
- package/lib/mjs/components/_classes/component/editForm/utils.js +16 -12
- package/lib/mjs/components/_classes/componentModal/ComponentModal.js +2 -2
- package/lib/mjs/components/_classes/field/Field.js +2 -8
- package/lib/mjs/components/_classes/input/Input.js +23 -27
- package/lib/mjs/components/_classes/list/ListComponent.form.js +1 -1
- package/lib/mjs/components/_classes/list/ListComponent.js +18 -27
- package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +9 -36
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +13 -32
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +1 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.form.js +3 -3
- package/lib/mjs/components/_classes/nested/NestedComponent.js +33 -41
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +15 -20
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +17 -19
- package/lib/mjs/components/address/Address.d.ts +0 -1
- package/lib/mjs/components/address/Address.js +49 -60
- package/lib/mjs/components/address/editForm/Address.edit.data.js +2 -2
- package/lib/mjs/components/address/editForm/Address.edit.display.js +2 -2
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +11 -53
- package/lib/mjs/components/alert/Alert.js +16 -22
- package/lib/mjs/components/button/Button.form.js +1 -1
- package/lib/mjs/components/button/Button.js +42 -65
- package/lib/mjs/components/button/editForm/Button.edit.display.js +9 -49
- package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/mjs/components/checkbox/Checkbox.form.js +3 -3
- package/lib/mjs/components/checkbox/Checkbox.js +21 -29
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +3 -13
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
- package/lib/mjs/components/columns/Columns.form.js +1 -1
- package/lib/mjs/components/columns/Columns.js +12 -24
- package/lib/mjs/components/columns/editForm/Columns.edit.display.js +17 -17
- package/lib/mjs/components/container/Container.form.js +2 -2
- package/lib/mjs/components/container/Container.js +4 -6
- package/lib/mjs/components/container/editForm/Container.edit.data.js +3 -3
- package/lib/mjs/components/container/editForm/Container.edit.display.js +4 -4
- package/lib/mjs/components/content/Content.form.js +2 -4
- package/lib/mjs/components/content/Content.js +8 -10
- package/lib/mjs/components/content/editForm/Content.edit.display.js +10 -10
- package/lib/mjs/components/currency/Currency.form.js +3 -3
- package/lib/mjs/components/currency/Currency.js +10 -19
- package/lib/mjs/components/currency/editForm/Currency.edit.data.js +5 -5
- package/lib/mjs/components/currency/editForm/Currency.edit.display.js +8 -8
- package/lib/mjs/components/datagrid/DataGrid.form.js +3 -3
- package/lib/mjs/components/datagrid/DataGrid.js +41 -92
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
- package/lib/mjs/components/datamap/DataMap.form.js +2 -2
- package/lib/mjs/components/datamap/DataMap.js +33 -46
- package/lib/mjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
- package/lib/mjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
- package/lib/mjs/components/datetime/DateTime.form.js +5 -5
- package/lib/mjs/components/datetime/DateTime.js +16 -31
- package/lib/mjs/components/datetime/editForm/DateTime.edit.data.js +3 -4
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
- package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +17 -22
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
- package/lib/mjs/components/day/Day.form.js +5 -5
- package/lib/mjs/components/day/Day.js +58 -148
- package/lib/mjs/components/day/editForm/Day.edit.day.js +9 -13
- package/lib/mjs/components/day/editForm/Day.edit.display.js +7 -7
- package/lib/mjs/components/day/editForm/Day.edit.month.js +8 -12
- package/lib/mjs/components/day/editForm/Day.edit.validation.js +7 -7
- package/lib/mjs/components/day/editForm/Day.edit.year.js +8 -8
- package/lib/mjs/components/editgrid/EditGrid.form.js +2 -2
- package/lib/mjs/components/editgrid/EditGrid.js +92 -140
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -7
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
- package/lib/mjs/components/email/Email.js +4 -4
- package/lib/mjs/components/email/editForm/Email.edit.display.js +3 -3
- package/lib/mjs/components/email/editForm/Email.edit.validation.js +6 -6
- package/lib/mjs/components/fieldset/Fieldset.form.js +1 -1
- package/lib/mjs/components/fieldset/Fieldset.js +2 -2
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
- package/lib/mjs/components/file/File.form.js +4 -4
- package/lib/mjs/components/file/File.js +89 -136
- package/lib/mjs/components/file/editForm/File.edit.display.js +5 -9
- package/lib/mjs/components/file/editForm/File.edit.file.js +53 -97
- package/lib/mjs/components/file/editForm/File.edit.validation.js +2 -2
- package/lib/mjs/components/form/Form.form.js +3 -3
- package/lib/mjs/components/form/Form.js +55 -68
- package/lib/mjs/components/form/editForm/Form.edit.data.js +3 -1
- package/lib/mjs/components/form/editForm/Form.edit.display.js +7 -6
- package/lib/mjs/components/form/editForm/Form.edit.form.js +8 -10
- package/lib/mjs/components/hidden/Hidden.form.js +4 -4
- package/lib/mjs/components/hidden/Hidden.js +2 -2
- package/lib/mjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
- package/lib/mjs/components/html/HTML.js +17 -23
- package/lib/mjs/components/html/editForm/HTML.edit.display.js +17 -17
- package/lib/mjs/components/html/editForm/HTML.edit.logic.js +2 -2
- package/lib/mjs/components/number/Number.form.js +3 -3
- package/lib/mjs/components/number/Number.js +12 -28
- package/lib/mjs/components/number/editForm/Number.edit.data.js +3 -3
- package/lib/mjs/components/number/editForm/Number.edit.display.js +4 -4
- package/lib/mjs/components/number/editForm/Number.edit.validation.js +9 -9
- package/lib/mjs/components/panel/Panel.form.js +1 -1
- package/lib/mjs/components/panel/Panel.js +2 -2
- package/lib/mjs/components/panel/editForm/Panel.edit.conditional.js +8 -6
- package/lib/mjs/components/panel/editForm/Panel.edit.display.js +29 -55
- package/lib/mjs/components/password/Password.form.js +3 -3
- package/lib/mjs/components/password/Password.js +2 -5
- package/lib/mjs/components/password/editForm/Password.edit.data.js +11 -11
- package/lib/mjs/components/password/editForm/Password.edit.display.js +3 -3
- package/lib/mjs/components/password/editForm/Password.edit.validation.js +3 -3
- package/lib/mjs/components/phonenumber/PhoneNumber.form.js +8 -8
- package/lib/mjs/components/phonenumber/PhoneNumber.js +3 -3
- package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
- package/lib/mjs/components/radio/Radio.form.js +3 -3
- package/lib/mjs/components/radio/Radio.js +30 -59
- package/lib/mjs/components/radio/editForm/Radio.edit.data.js +9 -23
- package/lib/mjs/components/radio/editForm/Radio.edit.display.js +6 -6
- package/lib/mjs/components/radio/editForm/Radio.edit.validation.js +2 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.form.js +5 -5
- package/lib/mjs/components/recaptcha/ReCaptcha.js +8 -10
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
- package/lib/mjs/components/select/Select.form.js +3 -3
- package/lib/mjs/components/select/Select.js +145 -240
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1 -1
- package/lib/mjs/components/select/editForm/Select.edit.data.js +57 -191
- package/lib/mjs/components/select/editForm/Select.edit.display.js +2 -2
- package/lib/mjs/components/select/editForm/Select.edit.validation.js +4 -4
- package/lib/mjs/components/selectboxes/SelectBoxes.form.js +3 -3
- package/lib/mjs/components/selectboxes/SelectBoxes.js +16 -30
- package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
- package/lib/mjs/components/signature/Signature.form.js +3 -3
- package/lib/mjs/components/signature/Signature.js +16 -26
- package/lib/mjs/components/signature/editForm/Signature.edit.display.js +10 -19
- package/lib/mjs/components/survey/Survey.form.js +3 -3
- package/lib/mjs/components/survey/Survey.js +17 -30
- package/lib/mjs/components/survey/editForm/Survey.edit.data.js +11 -23
- package/lib/mjs/components/survey/editForm/Survey.edit.display.js +1 -1
- package/lib/mjs/components/survey/editForm/Survey.edit.validation.js +1 -1
- package/lib/mjs/components/table/Table.form.js +1 -1
- package/lib/mjs/components/table/Table.js +6 -8
- package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -22
- package/lib/mjs/components/tabs/Tabs.form.js +1 -1
- package/lib/mjs/components/tabs/Tabs.js +9 -27
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +17 -21
- package/lib/mjs/components/tags/Tags.form.js +1 -1
- package/lib/mjs/components/tags/Tags.js +12 -28
- package/lib/mjs/components/tags/editForm/Tags.edit.data.js +7 -7
- package/lib/mjs/components/textarea/TextArea.form.js +2 -2
- package/lib/mjs/components/textarea/TextArea.js +51 -75
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +72 -96
- package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
- package/lib/mjs/components/textfield/TextField.form.js +3 -3
- package/lib/mjs/components/textfield/TextField.js +23 -34
- package/lib/mjs/components/textfield/editForm/TextField.edit.data.js +13 -15
- package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +21 -31
- package/lib/mjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
- package/lib/mjs/components/time/Time.js +10 -17
- package/lib/mjs/components/time/editForm/Time.edit.display.js +2 -2
- package/lib/mjs/components/unknown/Unknown.form.js +5 -5
- package/lib/mjs/components/unknown/Unknown.js +2 -2
- package/lib/mjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
- package/lib/mjs/components/url/Url.form.js +3 -3
- package/lib/mjs/components/url/Url.js +2 -2
- package/lib/mjs/components/url/editForm/Url.edit.display.js +3 -3
- package/lib/mjs/components/url/editForm/Url.edit.validation.js +1 -1
- package/lib/mjs/components/well/Well.form.js +1 -1
- package/lib/mjs/components/well/Well.js +2 -2
- package/lib/mjs/components/well/editForm/Well.edit.display.js +10 -10
- package/lib/mjs/formio.form.d.ts +1 -2
- package/lib/mjs/formio.form.js +8 -10
- package/lib/mjs/i18n.d.ts +0 -4
- package/lib/mjs/i18n.js +3 -7
- package/lib/mjs/package.json +1 -1
- package/lib/mjs/pdf.image.d.ts +2 -0
- package/lib/mjs/pdf.image.js +94 -0
- package/lib/mjs/providers/address/AddressProvider.js +5 -8
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +3 -3
- package/lib/mjs/providers/address/GoogleAddressProvider.js +13 -24
- package/lib/mjs/providers/processor/fileProcessor.js +1 -3
- package/lib/mjs/providers/storage/azure.js +2 -5
- package/lib/mjs/providers/storage/dropbox.js +5 -4
- package/lib/mjs/providers/storage/googleDrive.js +4 -3
- package/lib/mjs/providers/storage/index.js +1 -1
- package/lib/mjs/providers/storage/indexeddb.js +6 -16
- package/lib/mjs/providers/storage/s3.js +8 -19
- package/lib/mjs/providers/storage/uploadAdapter.js +11 -17
- package/lib/mjs/providers/storage/url.js +11 -13
- package/lib/mjs/providers/storage/xhr.js +9 -17
- package/lib/mjs/templates/index.js +1 -1
- package/lib/mjs/translations/en.d.ts +2 -0
- package/lib/mjs/translations/en.js +9 -7
- package/lib/mjs/utils/ChoicesWrapper.js +2 -2
- package/lib/mjs/utils/builder.js +7 -31
- package/lib/mjs/utils/calendarUtils.js +5 -7
- package/lib/mjs/utils/conditionOperators/ConditionOperator.js +1 -1
- package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +5 -16
- package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +1 -3
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +6 -10
- package/lib/mjs/utils/conditionOperators/index.js +1 -1
- package/lib/mjs/utils/formUtils.js +2 -2
- package/lib/mjs/utils/i18n.js +1 -7
- package/lib/mjs/utils/index.d.ts +1 -2
- package/lib/mjs/utils/index.js +3 -3
- 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 +1 -10
- package/lib/mjs/utils/utils.js +91 -178
- package/lib/mjs/widgets/CalendarWidget.js +50 -67
- package/lib/mjs/widgets/InputWidget.js +4 -6
- package/lib/mjs/widgets/index.js +1 -1
- package/package.json +3 -3
- package/lib/cjs/translations/de.d.ts +0 -80
- package/lib/cjs/translations/de.js +0 -81
- package/lib/mjs/translations/de.d.ts +0 -80
- package/lib/mjs/translations/de.js +0 -79
|
@@ -8,7 +8,7 @@ exports.default = [
|
|
|
8
8
|
label: 'Use Input to add moment.js for minDate',
|
|
9
9
|
persistent: false,
|
|
10
10
|
weight: 10,
|
|
11
|
-
tooltip: 'Enables to use input for moment functions instead of calendar.'
|
|
11
|
+
tooltip: 'Enables to use input for moment functions instead of calendar.'
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
label: 'Minimum Date',
|
|
@@ -57,7 +57,7 @@ exports.default = [
|
|
|
57
57
|
label: 'Use Input to add moment.js for maxDate',
|
|
58
58
|
persistent: false,
|
|
59
59
|
weight: 20,
|
|
60
|
-
tooltip: 'Enables to use input for moment functions instead of calendar.'
|
|
60
|
+
tooltip: 'Enables to use input for moment functions instead of calendar.'
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
label: 'Maximum Date',
|
|
@@ -101,5 +101,5 @@ exports.default = [
|
|
|
101
101
|
enableTime: false,
|
|
102
102
|
skipMerge: true,
|
|
103
103
|
weight: 20,
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
105
|
];
|
|
@@ -19,7 +19,7 @@ function default_1(...extend) {
|
|
|
19
19
|
return Components_1.default.baseEditForm([
|
|
20
20
|
{
|
|
21
21
|
key: 'display',
|
|
22
|
-
components: Day_edit_display_1.default
|
|
22
|
+
components: Day_edit_display_1.default
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
key: 'data',
|
|
@@ -27,25 +27,25 @@ function default_1(...extend) {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
key: 'validation',
|
|
30
|
-
components: Day_edit_validation_1.default
|
|
30
|
+
components: Day_edit_validation_1.default
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
key: 'day',
|
|
34
34
|
label: 'Day',
|
|
35
35
|
weight: 3,
|
|
36
|
-
components: Day_edit_day_1.default
|
|
36
|
+
components: Day_edit_day_1.default
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
key: 'month',
|
|
40
40
|
label: 'Month',
|
|
41
41
|
weight: 3,
|
|
42
|
-
components: Day_edit_month_1.default
|
|
42
|
+
components: Day_edit_month_1.default
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
key: 'year',
|
|
46
46
|
label: 'Year',
|
|
47
47
|
weight: 3,
|
|
48
|
-
components: Day_edit_year_1.default
|
|
48
|
+
components: Day_edit_year_1.default
|
|
49
49
|
},
|
|
50
50
|
], ...extend);
|
|
51
51
|
}
|
|
@@ -18,21 +18,21 @@ class DayComponent extends Field_1.default {
|
|
|
18
18
|
day: {
|
|
19
19
|
type: 'number',
|
|
20
20
|
placeholder: '',
|
|
21
|
-
required: false
|
|
21
|
+
required: false
|
|
22
22
|
},
|
|
23
23
|
month: {
|
|
24
24
|
type: 'select',
|
|
25
25
|
placeholder: '',
|
|
26
|
-
required: false
|
|
26
|
+
required: false
|
|
27
27
|
},
|
|
28
28
|
year: {
|
|
29
29
|
type: 'number',
|
|
30
30
|
placeholder: '',
|
|
31
|
-
required: false
|
|
32
|
-
}
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
33
|
},
|
|
34
34
|
dayFirst: false,
|
|
35
|
-
defaultValue: ''
|
|
35
|
+
defaultValue: ''
|
|
36
36
|
}, ...extend);
|
|
37
37
|
}
|
|
38
38
|
static get builderInfo() {
|
|
@@ -42,29 +42,18 @@ class DayComponent extends Field_1.default {
|
|
|
42
42
|
icon: 'calendar',
|
|
43
43
|
documentation: '/userguide/form-building/advanced-components#day',
|
|
44
44
|
weight: 50,
|
|
45
|
-
schema: DayComponent.schema()
|
|
45
|
+
schema: DayComponent.schema()
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
static get conditionOperatorsSettings() {
|
|
49
|
-
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: [
|
|
50
|
-
'isDateEqual',
|
|
51
|
-
'isNotDateEqual',
|
|
52
|
-
'isEmpty',
|
|
53
|
-
'isNotEmpty',
|
|
54
|
-
'dateLessThan',
|
|
55
|
-
'dateGreaterThan',
|
|
56
|
-
'dateLessThanOrEqual',
|
|
57
|
-
'dateGreaterThanOrEqual',
|
|
58
|
-
] });
|
|
49
|
+
return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isDateEqual', 'isNotDateEqual', 'isEmpty', 'isNotEmpty', 'dateLessThan', 'dateGreaterThan', 'dateLessThanOrEqual', 'dateGreaterThanOrEqual'] });
|
|
59
50
|
}
|
|
60
51
|
static savedValueTypes(schema) {
|
|
61
52
|
schema = schema || {};
|
|
62
|
-
return (
|
|
63
|
-
utils_1.componentValueTypes.string,
|
|
64
|
-
]);
|
|
53
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.string];
|
|
65
54
|
}
|
|
66
55
|
constructor(component, options, data) {
|
|
67
|
-
if (
|
|
56
|
+
if (!options.inFormBuilder && !options.building) {
|
|
68
57
|
if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
|
|
69
58
|
component.maxDate = (0, moment_1.default)(component.maxDate, 'YYYY-MM-DD').toISOString();
|
|
70
59
|
}
|
|
@@ -149,7 +138,7 @@ class DayComponent extends Field_1.default {
|
|
|
149
138
|
step: 1,
|
|
150
139
|
min,
|
|
151
140
|
max,
|
|
152
|
-
}
|
|
141
|
+
}
|
|
153
142
|
};
|
|
154
143
|
}
|
|
155
144
|
selectDefinition(name) {
|
|
@@ -161,8 +150,8 @@ class DayComponent extends Field_1.default {
|
|
|
161
150
|
id: `${this.component.key}-${name}`,
|
|
162
151
|
class: 'form-control',
|
|
163
152
|
name,
|
|
164
|
-
lang: this.options.language
|
|
165
|
-
}
|
|
153
|
+
lang: this.options.language
|
|
154
|
+
}
|
|
166
155
|
};
|
|
167
156
|
}
|
|
168
157
|
get days() {
|
|
@@ -170,12 +159,12 @@ class DayComponent extends Field_1.default {
|
|
|
170
159
|
return this._days;
|
|
171
160
|
}
|
|
172
161
|
this._days = [
|
|
173
|
-
{ value: '', label: lodash_1.default.get(this.component, 'fields.day.placeholder', '') }
|
|
162
|
+
{ value: '', label: lodash_1.default.get(this.component, 'fields.day.placeholder', '') }
|
|
174
163
|
];
|
|
175
164
|
for (let x = 1; x <= 31; x++) {
|
|
176
165
|
this._days.push({
|
|
177
166
|
value: x,
|
|
178
|
-
label: x.toString()
|
|
167
|
+
label: x.toString()
|
|
179
168
|
});
|
|
180
169
|
}
|
|
181
170
|
return this._days;
|
|
@@ -187,8 +176,7 @@ class DayComponent extends Field_1.default {
|
|
|
187
176
|
this._months = [
|
|
188
177
|
{
|
|
189
178
|
value: '',
|
|
190
|
-
label: lodash_1.default.get(this.component, 'fields.month.placeholder') ||
|
|
191
|
-
(this.hideInputLabels ? this.t('Month') : ''),
|
|
179
|
+
label: lodash_1.default.get(this.component, 'fields.month.placeholder') || (this.hideInputLabels ? this.t('Month') : '')
|
|
192
180
|
},
|
|
193
181
|
{ value: 1, label: 'January' },
|
|
194
182
|
{ value: 2, label: 'February' },
|
|
@@ -201,7 +189,7 @@ class DayComponent extends Field_1.default {
|
|
|
201
189
|
{ value: 9, label: 'September' },
|
|
202
190
|
{ value: 10, label: 'October' },
|
|
203
191
|
{ value: 11, label: 'November' },
|
|
204
|
-
{ value: 12, label: 'December' }
|
|
192
|
+
{ value: 12, label: 'December' }
|
|
205
193
|
];
|
|
206
194
|
return this._months;
|
|
207
195
|
}
|
|
@@ -210,32 +198,24 @@ class DayComponent extends Field_1.default {
|
|
|
210
198
|
return this._years;
|
|
211
199
|
}
|
|
212
200
|
this._years = [
|
|
213
|
-
{ value: '', label: lodash_1.default.get(this.component, 'fields.year.placeholder', '') }
|
|
201
|
+
{ value: '', label: lodash_1.default.get(this.component, 'fields.year.placeholder', '') }
|
|
214
202
|
];
|
|
215
203
|
const minYears = lodash_1.default.get(this.component, 'fields.year.minYear', 1900) || 1900;
|
|
216
204
|
const maxYears = lodash_1.default.get(this.component, 'fields.year.maxYear', 2030) || 2030;
|
|
217
205
|
for (let x = minYears; x <= maxYears; x++) {
|
|
218
206
|
this._years.push({
|
|
219
207
|
value: x,
|
|
220
|
-
label: x.toString()
|
|
208
|
+
label: x.toString()
|
|
221
209
|
});
|
|
222
210
|
}
|
|
223
211
|
return this._years;
|
|
224
212
|
}
|
|
225
213
|
setErrorClasses(elements, dirty, hasError) {
|
|
226
214
|
super.setErrorClasses(elements, dirty, hasError);
|
|
227
|
-
super.setErrorClasses([
|
|
228
|
-
this.refs.day,
|
|
229
|
-
this.refs.month,
|
|
230
|
-
this.refs.year,
|
|
231
|
-
], dirty, hasError);
|
|
215
|
+
super.setErrorClasses([this.refs.day, this.refs.month, this.refs.year], dirty, hasError);
|
|
232
216
|
}
|
|
233
217
|
removeInputError(elements) {
|
|
234
|
-
super.removeInputError([
|
|
235
|
-
this.refs.day,
|
|
236
|
-
this.refs.month,
|
|
237
|
-
this.refs.year,
|
|
238
|
-
]);
|
|
218
|
+
super.removeInputError([this.refs.day, this.refs.month, this.refs.year]);
|
|
239
219
|
super.removeInputError(elements);
|
|
240
220
|
}
|
|
241
221
|
init() {
|
|
@@ -267,19 +247,18 @@ class DayComponent extends Field_1.default {
|
|
|
267
247
|
if (this.component.fields[name].type === 'select') {
|
|
268
248
|
return this.renderTemplate('select', {
|
|
269
249
|
input: this.selectDefinition(name),
|
|
270
|
-
selectOptions: this[`${name}s`].reduce((html, option) => html +
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}), ''),
|
|
250
|
+
selectOptions: this[`${name}s`].reduce((html, option) => html + this.renderTemplate('selectOption', {
|
|
251
|
+
option,
|
|
252
|
+
selected: false,
|
|
253
|
+
attrs: {}
|
|
254
|
+
}), ''),
|
|
276
255
|
});
|
|
277
256
|
}
|
|
278
257
|
else {
|
|
279
258
|
return this.renderTemplate('input', {
|
|
280
259
|
prefix: this.prefix,
|
|
281
260
|
suffix: this.suffix,
|
|
282
|
-
input: this.inputDefinition(name)
|
|
261
|
+
input: this.inputDefinition(name)
|
|
283
262
|
});
|
|
284
263
|
}
|
|
285
264
|
}
|
|
@@ -310,8 +289,7 @@ class DayComponent extends Field_1.default {
|
|
|
310
289
|
// TODO: Need to rework this to work with day select as well.
|
|
311
290
|
// Change day max input when month changes.
|
|
312
291
|
this.addEventListener(this.refs.month, 'input', () => {
|
|
313
|
-
const maxDay = this.refs.year
|
|
314
|
-
? parseInt(new Date(this.refs.year.value, this.refs.month.value, 0).getDate(), 10)
|
|
292
|
+
const maxDay = this.refs.year ? parseInt(new Date(this.refs.year.value, this.refs.month.value, 0).getDate(), 10)
|
|
315
293
|
: '';
|
|
316
294
|
const day = this.getFieldValue('day');
|
|
317
295
|
if (!this.component.fields.day.hide && maxDay) {
|
|
@@ -324,15 +302,9 @@ class DayComponent extends Field_1.default {
|
|
|
324
302
|
});
|
|
325
303
|
this.addEventListener(this.refs.year, 'input', updateValueAndSaveFocus(this.refs.year, 'year'));
|
|
326
304
|
this.addEventListener(this.refs.input, this.info.changeEvent, () => this.updateValue(null, {
|
|
327
|
-
modified: true
|
|
305
|
+
modified: true
|
|
328
306
|
}));
|
|
329
|
-
[
|
|
330
|
-
this.refs.day,
|
|
331
|
-
this.refs.month,
|
|
332
|
-
this.refs.year,
|
|
333
|
-
]
|
|
334
|
-
.filter((element) => !!element)
|
|
335
|
-
.forEach((element) => {
|
|
307
|
+
[this.refs.day, this.refs.month, this.refs.year].filter((element) => !!element).forEach((element) => {
|
|
336
308
|
super.addFocusBlurEvents(element);
|
|
337
309
|
});
|
|
338
310
|
}
|
|
@@ -383,32 +355,16 @@ class DayComponent extends Field_1.default {
|
|
|
383
355
|
}
|
|
384
356
|
const dateParts = [];
|
|
385
357
|
const valueParts = value.split('/');
|
|
386
|
-
const [DAY, MONTH, YEAR
|
|
387
|
-
? [
|
|
388
|
-
0,
|
|
389
|
-
1,
|
|
390
|
-
2,
|
|
391
|
-
]
|
|
392
|
-
: [
|
|
393
|
-
1,
|
|
394
|
-
0,
|
|
395
|
-
2,
|
|
396
|
-
];
|
|
358
|
+
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
397
359
|
const defaultValue = this.component.defaultValue ? this.component.defaultValue.split('/') : '';
|
|
398
360
|
let defaultDay = '';
|
|
399
361
|
let defaultMonth = '';
|
|
400
362
|
let defaultYear = '';
|
|
401
363
|
if (defaultValue) {
|
|
402
364
|
const hasHiddenFields = defaultValue.length !== 3;
|
|
403
|
-
defaultDay = hasHiddenFields
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
defaultMonth = hasHiddenFields
|
|
407
|
-
? this.getDayWithHiddenFields(defaultValue).month
|
|
408
|
-
: defaultValue[MONTH];
|
|
409
|
-
defaultYear = hasHiddenFields
|
|
410
|
-
? this.getDayWithHiddenFields(defaultValue).year
|
|
411
|
-
: defaultValue[YEAR];
|
|
365
|
+
defaultDay = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).day : defaultValue[DAY];
|
|
366
|
+
defaultMonth = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).month : defaultValue[MONTH];
|
|
367
|
+
defaultYear = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).year : defaultValue[YEAR];
|
|
412
368
|
}
|
|
413
369
|
if (this.options.building && defaultValue.length === 3) {
|
|
414
370
|
return this.component.defaultValue;
|
|
@@ -470,17 +426,7 @@ class DayComponent extends Field_1.default {
|
|
|
470
426
|
}
|
|
471
427
|
}
|
|
472
428
|
getDayWithHiddenFields(parts) {
|
|
473
|
-
let [DAY, MONTH, YEAR
|
|
474
|
-
? [
|
|
475
|
-
0,
|
|
476
|
-
1,
|
|
477
|
-
2,
|
|
478
|
-
]
|
|
479
|
-
: [
|
|
480
|
-
1,
|
|
481
|
-
0,
|
|
482
|
-
2,
|
|
483
|
-
];
|
|
429
|
+
let [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
484
430
|
if (!this.showDay) {
|
|
485
431
|
MONTH = MONTH === 0 ? 0 : MONTH - 1;
|
|
486
432
|
YEAR = YEAR - 1;
|
|
@@ -517,7 +463,7 @@ class DayComponent extends Field_1.default {
|
|
|
517
463
|
break;
|
|
518
464
|
}
|
|
519
465
|
val = parseInt(val, 10);
|
|
520
|
-
return !lodash_1.default.isNaN(val) && lodash_1.default.isNumber(val) ? val : 0;
|
|
466
|
+
return (!lodash_1.default.isNaN(val) && lodash_1.default.isNumber(val)) ? val : 0;
|
|
521
467
|
}
|
|
522
468
|
get parts() {
|
|
523
469
|
return {
|
|
@@ -539,69 +485,46 @@ class DayComponent extends Field_1.default {
|
|
|
539
485
|
* @returns {null|string} - The date string.
|
|
540
486
|
*/
|
|
541
487
|
getDate(value) {
|
|
488
|
+
var _a;
|
|
542
489
|
let defaults = [], day, month, year;
|
|
543
490
|
// Map positions to identifiers to get default values for each part of day
|
|
544
|
-
const [DAY, MONTH, YEAR
|
|
545
|
-
? [
|
|
546
|
-
0,
|
|
547
|
-
1,
|
|
548
|
-
2,
|
|
549
|
-
]
|
|
550
|
-
: [
|
|
551
|
-
1,
|
|
552
|
-
0,
|
|
553
|
-
2,
|
|
554
|
-
];
|
|
491
|
+
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
555
492
|
const defaultValue = value || this.component.defaultValue;
|
|
556
493
|
if (defaultValue) {
|
|
557
|
-
defaults = defaultValue.split('/').map(
|
|
494
|
+
defaults = defaultValue.split('/').map(x => parseInt(x, 10));
|
|
558
495
|
}
|
|
559
496
|
const isModalEditClosed = this.component.modalEdit && !this.componentModal.isOpened;
|
|
560
497
|
if (this.showDay && this.refs.day) {
|
|
561
|
-
day =
|
|
562
|
-
this.refs.day.value === '' && !isModalEditClosed ? '' : parseInt(this.refs.day.value, 10);
|
|
498
|
+
day = (this.refs.day.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.day.value, 10);
|
|
563
499
|
}
|
|
564
500
|
if (day === undefined || lodash_1.default.isNaN(day) || value) {
|
|
565
|
-
day =
|
|
566
|
-
defaults.
|
|
567
|
-
|
|
568
|
-
: defaults[DAY] && !lodash_1.default.isNaN(defaults[DAY])
|
|
569
|
-
? defaults[DAY]
|
|
570
|
-
: 0;
|
|
501
|
+
day = (defaults.length !== 3)
|
|
502
|
+
? this.getDayWithHiddenFields(defaults).day
|
|
503
|
+
: (defaults[DAY] && !lodash_1.default.isNaN(defaults[DAY]) ? defaults[DAY] : 0);
|
|
571
504
|
}
|
|
572
505
|
if (this.showMonth && this.refs.month) {
|
|
573
506
|
// Months are 0 indexed.
|
|
574
|
-
month =
|
|
575
|
-
this.refs.month.value === '' && !isModalEditClosed
|
|
576
|
-
? ''
|
|
577
|
-
: parseInt(this.refs.month.value, 10);
|
|
507
|
+
month = (this.refs.month.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.month.value, 10);
|
|
578
508
|
}
|
|
579
509
|
if (month === undefined || lodash_1.default.isNaN(month) || value) {
|
|
580
|
-
month =
|
|
581
|
-
defaults.
|
|
582
|
-
|
|
583
|
-
: defaults[MONTH] && !lodash_1.default.isNaN(defaults[MONTH])
|
|
584
|
-
? defaults[MONTH]
|
|
585
|
-
: 0;
|
|
510
|
+
month = (defaults.length !== 3)
|
|
511
|
+
? this.getDayWithHiddenFields(defaults).month
|
|
512
|
+
: (defaults[MONTH] && !lodash_1.default.isNaN(defaults[MONTH]) ? defaults[MONTH] : 0);
|
|
586
513
|
}
|
|
587
514
|
if (this.showYear && this.refs.year) {
|
|
588
|
-
year =
|
|
589
|
-
this.refs.year.value === '' && !isModalEditClosed ? '' : parseInt(this.refs.year.value);
|
|
515
|
+
year = (this.refs.year.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.year.value);
|
|
590
516
|
}
|
|
591
517
|
if (year === undefined || lodash_1.default.isNaN(year) || value) {
|
|
592
|
-
year =
|
|
593
|
-
defaults.
|
|
594
|
-
|
|
595
|
-
: defaults[YEAR] && !lodash_1.default.isNaN(defaults[YEAR])
|
|
596
|
-
? defaults[YEAR]
|
|
597
|
-
: 0;
|
|
518
|
+
year = (defaults.length !== 3)
|
|
519
|
+
? this.getDayWithHiddenFields(defaults).year
|
|
520
|
+
: (defaults[YEAR] && !lodash_1.default.isNaN(defaults[YEAR]) ? defaults[YEAR] : 0);
|
|
598
521
|
}
|
|
599
522
|
let result;
|
|
600
523
|
if (!day && !month && !year) {
|
|
601
524
|
if (!isModalEditClosed) {
|
|
602
525
|
this.dataValue = this.emptyValue;
|
|
603
526
|
if (this.options.building) {
|
|
604
|
-
this.triggerChange();
|
|
527
|
+
(_a = this.triggerChange) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
605
528
|
}
|
|
606
529
|
}
|
|
607
530
|
return null;
|
|
@@ -611,10 +534,10 @@ class DayComponent extends Field_1.default {
|
|
|
611
534
|
month = this.showMonth ? month.toString().padStart(2, 0) : '';
|
|
612
535
|
year = this.showYear ? year.toString().padStart(4, 0) : '';
|
|
613
536
|
if (this.component.dayFirst) {
|
|
614
|
-
result = `${day}${
|
|
537
|
+
result = `${day}${this.showDay && this.showMonth || this.showDay && this.showYear ? '/' : ''}${month}${this.showMonth && this.showYear ? '/' : ''}${year}`;
|
|
615
538
|
}
|
|
616
539
|
else {
|
|
617
|
-
result = `${month}${
|
|
540
|
+
result = `${month}${this.showDay && this.showMonth || this.showMonth && this.showYear ? '/' : ''}${day}${this.showDay && this.showYear ? '/' : ''}${year}`;
|
|
618
541
|
}
|
|
619
542
|
return result;
|
|
620
543
|
}
|
|
@@ -634,7 +557,7 @@ class DayComponent extends Field_1.default {
|
|
|
634
557
|
}
|
|
635
558
|
getValue() {
|
|
636
559
|
const result = super.getValue();
|
|
637
|
-
return !result ? this.dataValue : result;
|
|
560
|
+
return (!result) ? this.dataValue : result;
|
|
638
561
|
}
|
|
639
562
|
/**
|
|
640
563
|
* Get the value at a specific index.
|
|
@@ -668,12 +591,10 @@ class DayComponent extends Field_1.default {
|
|
|
668
591
|
if (field && typeof field === 'string' && this.refs[field]) {
|
|
669
592
|
this.refs[field].focus();
|
|
670
593
|
}
|
|
671
|
-
else if (
|
|
672
|
-
(!this.dayFirst && !this.showMonth && this.showDay)) {
|
|
594
|
+
else if (this.dayFirst && this.showDay || !this.dayFirst && !this.showMonth && this.showDay) {
|
|
673
595
|
(_a = this.refs.day) === null || _a === void 0 ? void 0 : _a.focus();
|
|
674
596
|
}
|
|
675
|
-
else if (
|
|
676
|
-
(!this.dayFirst && this.showMonth)) {
|
|
597
|
+
else if (this.dayFirst && !this.showDay && this.showMonth || !this.dayFirst && this.showMonth) {
|
|
677
598
|
(_b = this.refs.month) === null || _b === void 0 ? void 0 : _b.focus();
|
|
678
599
|
}
|
|
679
600
|
else if (!this.showDay && !this.showDay && this.showYear) {
|
|
@@ -697,22 +618,12 @@ class DayComponent extends Field_1.default {
|
|
|
697
618
|
if (!value) {
|
|
698
619
|
return true;
|
|
699
620
|
}
|
|
700
|
-
const [DAY, MONTH, YEAR
|
|
701
|
-
? [
|
|
702
|
-
0,
|
|
703
|
-
1,
|
|
704
|
-
2,
|
|
705
|
-
]
|
|
706
|
-
: [
|
|
707
|
-
1,
|
|
708
|
-
0,
|
|
709
|
-
2,
|
|
710
|
-
];
|
|
621
|
+
const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
|
|
711
622
|
const values = value.split('/');
|
|
712
623
|
if (values.length < 3) {
|
|
713
624
|
return true;
|
|
714
625
|
}
|
|
715
|
-
return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';
|
|
626
|
+
return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
|
|
716
627
|
}
|
|
717
628
|
getValidationFormat() {
|
|
718
629
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -15,14 +15,14 @@ exports.default = [
|
|
|
15
15
|
values: [
|
|
16
16
|
{
|
|
17
17
|
label: 'Number',
|
|
18
|
-
value: 'number'
|
|
18
|
+
value: 'number'
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
label: 'Select',
|
|
22
|
-
value: 'select'
|
|
22
|
+
value: 'select'
|
|
23
23
|
},
|
|
24
|
-
]
|
|
25
|
-
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
weight: 210,
|
|
@@ -31,7 +31,7 @@ exports.default = [
|
|
|
31
31
|
key: 'fields.day.placeholder',
|
|
32
32
|
label: 'Placeholder',
|
|
33
33
|
placeholder: 'Day Placeholder',
|
|
34
|
-
tooltip: 'The placeholder text that will appear when Day field is empty.'
|
|
34
|
+
tooltip: 'The placeholder text that will appear when Day field is empty.'
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
weight: 215,
|
|
@@ -43,13 +43,9 @@ exports.default = [
|
|
|
43
43
|
if (data.defaultValue) {
|
|
44
44
|
const defaultValueParts = data.defaultValue.split('/');
|
|
45
45
|
if (!data.fields.day.hide && defaultValueParts.length !== 3) {
|
|
46
|
-
const newDefaultValue = [
|
|
47
|
-
'00',
|
|
48
|
-
];
|
|
46
|
+
const newDefaultValue = ['00'];
|
|
49
47
|
if (!data.fields.month.hide) {
|
|
50
|
-
data.dayFirst
|
|
51
|
-
? newDefaultValue.push(defaultValueParts[0])
|
|
52
|
-
: newDefaultValue.unshift(defaultValueParts[0]);
|
|
48
|
+
data.dayFirst ? newDefaultValue.push(defaultValueParts[0]) : newDefaultValue.unshift(defaultValueParts[0]);
|
|
53
49
|
}
|
|
54
50
|
if (!data.fields.year.hide) {
|
|
55
51
|
newDefaultValue.push(defaultValueParts[1]);
|
|
@@ -58,7 +54,7 @@ exports.default = [
|
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
},
|
|
61
|
-
input: true
|
|
57
|
+
input: true
|
|
62
58
|
},
|
|
63
59
|
{
|
|
64
60
|
weight: 214,
|
|
@@ -66,6 +62,6 @@ exports.default = [
|
|
|
66
62
|
label: 'Day First',
|
|
67
63
|
tooltip: 'Display the Day field before the Month field.',
|
|
68
64
|
key: 'dayFirst',
|
|
69
|
-
input: true
|
|
65
|
+
input: true
|
|
70
66
|
},
|
|
71
67
|
];
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = [
|
|
4
4
|
{
|
|
5
5
|
key: 'labelPosition',
|
|
6
|
-
ignore: true
|
|
6
|
+
ignore: true
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
weight: 15,
|
|
@@ -11,7 +11,7 @@ exports.default = [
|
|
|
11
11
|
label: 'Hide Input Labels',
|
|
12
12
|
tooltip: 'Hide the labels of component inputs. This allows you to show the labels in the form builder, but not when it is rendered.',
|
|
13
13
|
key: 'hideInputLabels',
|
|
14
|
-
input: true
|
|
14
|
+
input: true
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
type: 'select',
|
|
@@ -27,13 +27,13 @@ exports.default = [
|
|
|
27
27
|
{ label: 'Top', value: 'top' },
|
|
28
28
|
{ label: 'Left', value: 'left' },
|
|
29
29
|
{ label: 'Right', value: 'right' },
|
|
30
|
-
{ label: 'Bottom', value: 'bottom' }
|
|
31
|
-
]
|
|
32
|
-
}
|
|
30
|
+
{ label: 'Bottom', value: 'bottom' }
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
key: 'placeholder',
|
|
36
|
-
ignore: true
|
|
36
|
+
ignore: true
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
weight: 213,
|
|
@@ -41,6 +41,6 @@ exports.default = [
|
|
|
41
41
|
label: 'Use Locale Settings',
|
|
42
42
|
tooltip: 'Use locale settings to display day.',
|
|
43
43
|
key: 'useLocaleSettings',
|
|
44
|
-
input: true
|
|
44
|
+
input: true
|
|
45
45
|
},
|
|
46
46
|
];
|
|
@@ -15,14 +15,14 @@ exports.default = [
|
|
|
15
15
|
values: [
|
|
16
16
|
{
|
|
17
17
|
label: 'Number',
|
|
18
|
-
value: 'number'
|
|
18
|
+
value: 'number'
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
label: 'Select',
|
|
22
|
-
value: 'select'
|
|
22
|
+
value: 'select'
|
|
23
23
|
},
|
|
24
|
-
]
|
|
25
|
-
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
weight: 210,
|
|
@@ -31,7 +31,7 @@ exports.default = [
|
|
|
31
31
|
key: 'fields.month.placeholder',
|
|
32
32
|
label: 'Placeholder',
|
|
33
33
|
placeholder: 'Month Placeholder',
|
|
34
|
-
tooltip: 'The placeholder text that will appear when Month field is empty.'
|
|
34
|
+
tooltip: 'The placeholder text that will appear when Month field is empty.'
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
weight: 215,
|
|
@@ -43,13 +43,9 @@ exports.default = [
|
|
|
43
43
|
if (data.defaultValue) {
|
|
44
44
|
const defaultValueParts = data.defaultValue.split('/');
|
|
45
45
|
if (!data.fields.month.hide && defaultValueParts.length !== 3) {
|
|
46
|
-
const newDefaultValue = [
|
|
47
|
-
'00',
|
|
48
|
-
];
|
|
46
|
+
const newDefaultValue = ['00'];
|
|
49
47
|
if (!data.fields.day.hide) {
|
|
50
|
-
data.dayFirst
|
|
51
|
-
? newDefaultValue.unshift(defaultValueParts[0])
|
|
52
|
-
: newDefaultValue.push(defaultValueParts[0]);
|
|
48
|
+
data.dayFirst ? newDefaultValue.unshift(defaultValueParts[0]) : newDefaultValue.push(defaultValueParts[0]);
|
|
53
49
|
}
|
|
54
50
|
if (!data.fields.year.hide) {
|
|
55
51
|
newDefaultValue.push(defaultValueParts[1]);
|
|
@@ -58,6 +54,6 @@ exports.default = [
|
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
},
|
|
61
|
-
input: true
|
|
57
|
+
input: true
|
|
62
58
|
},
|
|
63
59
|
];
|