@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
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export default [
|
|
2
2
|
{
|
|
3
3
|
key: 'labelPosition',
|
|
4
|
-
ignore: true
|
|
4
|
+
ignore: true
|
|
5
5
|
},
|
|
6
6
|
{
|
|
7
7
|
key: 'placeholder',
|
|
8
|
-
ignore: true
|
|
8
|
+
ignore: true
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
key: 'description',
|
|
12
|
-
ignore: true
|
|
12
|
+
ignore: true
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
key: 'autofocus',
|
|
16
|
-
ignore: true
|
|
16
|
+
ignore: true
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
key: 'tooltip',
|
|
20
|
-
ignore: true
|
|
20
|
+
ignore: true
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
key: 'tabindex',
|
|
24
|
-
ignore: true
|
|
24
|
+
ignore: true
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
key: 'tableView',
|
|
28
|
-
ignore: true
|
|
28
|
+
ignore: true
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: 'hideLabel',
|
|
32
|
-
ignore: true
|
|
32
|
+
ignore: true
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
weight: 0,
|
|
@@ -40,9 +40,9 @@ export default [
|
|
|
40
40
|
placeholder: 'Field Label',
|
|
41
41
|
tooltip: 'The label for this field.',
|
|
42
42
|
validate: {
|
|
43
|
-
required: true
|
|
43
|
+
required: true
|
|
44
44
|
},
|
|
45
45
|
autofocus: true,
|
|
46
|
-
overrideEditForm: true
|
|
46
|
+
overrideEditForm: true
|
|
47
47
|
},
|
|
48
48
|
];
|
package/lib/mjs/formio.form.d.ts
CHANGED
|
@@ -24,5 +24,4 @@ import Licenses from './licenses';
|
|
|
24
24
|
import EventEmitter from './EventEmitter';
|
|
25
25
|
import Webform from './Webform';
|
|
26
26
|
import { DefaultEvaluator } from './utils';
|
|
27
|
-
|
|
28
|
-
export { Components, Displays, Providers, Widgets, Templates, Utils, Form, Formio, Licenses, EventEmitter, Webform, DefaultEvaluator, FormOptions };
|
|
27
|
+
export { Components, Displays, Providers, Widgets, Templates, Utils, Form, Formio, Licenses, EventEmitter, Webform, DefaultEvaluator };
|
package/lib/mjs/formio.form.js
CHANGED
|
@@ -6,13 +6,15 @@ import Displays from './displays/Displays';
|
|
|
6
6
|
import Templates from './templates/Templates';
|
|
7
7
|
import Providers from './providers';
|
|
8
8
|
import Widgets from './widgets';
|
|
9
|
-
import Form
|
|
10
|
-
import Utils
|
|
9
|
+
import Form from './Form';
|
|
10
|
+
import Utils from './utils';
|
|
11
11
|
import Licenses from './licenses';
|
|
12
12
|
import EventEmitter from './EventEmitter';
|
|
13
13
|
import Webform from './Webform';
|
|
14
|
+
import { Evaluator, registerEvaluator, DefaultEvaluator } from './utils';
|
|
14
15
|
Formio.loadModules = (path = `${Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
|
|
15
|
-
Formio.requireLibrary(name, name, path, true)
|
|
16
|
+
Formio.requireLibrary(name, name, path, true)
|
|
17
|
+
.then((modules) => {
|
|
16
18
|
Formio.use(modules);
|
|
17
19
|
});
|
|
18
20
|
};
|
|
@@ -105,14 +107,10 @@ export function registerModule(mod, defaultFn = null, options = {}) {
|
|
|
105
107
|
*/
|
|
106
108
|
export function useModule(defaultFn = null) {
|
|
107
109
|
return (plugins, options = {}) => {
|
|
108
|
-
plugins = _.isArray(plugins)
|
|
109
|
-
? plugins
|
|
110
|
-
: [
|
|
111
|
-
plugins,
|
|
112
|
-
];
|
|
110
|
+
plugins = _.isArray(plugins) ? plugins : [plugins];
|
|
113
111
|
plugins.forEach((plugin) => {
|
|
114
112
|
if (Array.isArray(plugin)) {
|
|
115
|
-
plugin.forEach(
|
|
113
|
+
plugin.forEach(p => registerModule(p, defaultFn, options));
|
|
116
114
|
}
|
|
117
115
|
else {
|
|
118
116
|
registerModule(plugin, defaultFn, options);
|
|
@@ -129,4 +127,4 @@ export function useModule(defaultFn = null) {
|
|
|
129
127
|
Formio.use = useModule();
|
|
130
128
|
export { Formio as FormioCore } from './Formio';
|
|
131
129
|
// Export the components.
|
|
132
|
-
export { Components, Displays, Providers, Widgets, Templates, Utils, Form, Formio, Licenses, EventEmitter, Webform, DefaultEvaluator
|
|
130
|
+
export { Components, Displays, Providers, Widgets, Templates, Utils, Form, Formio, Licenses, EventEmitter, Webform, DefaultEvaluator };
|
package/lib/mjs/i18n.d.ts
CHANGED
package/lib/mjs/i18n.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import enTranslation from './translations/en';
|
|
2
|
-
import deTranslation from './translations/de';
|
|
3
2
|
import { fastCloneDeep } from './utils';
|
|
4
3
|
export default {
|
|
5
4
|
lng: 'en',
|
|
@@ -9,10 +8,7 @@ export default {
|
|
|
9
8
|
contextSeparator: '._.',
|
|
10
9
|
resources: {
|
|
11
10
|
en: {
|
|
12
|
-
translation: fastCloneDeep(enTranslation)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
translation: fastCloneDeep(deTranslation),
|
|
16
|
-
},
|
|
17
|
-
},
|
|
11
|
+
translation: fastCloneDeep(enTranslation)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
18
14
|
};
|
package/lib/mjs/package.json
CHANGED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAAA3NCSVQICAjb4U/gAAAC9FBMVEX' +
|
|
3
|
+
'///+HiYuGhomCg4aCgIF6eX12eHokJCQkICAgICAjHSOOj5KJi46Dh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nHSGiHCCeHB+aGx/MBOLyAAAA/HR' +
|
|
13
|
+
'STlMAERERERERERERESIiIiIiIiIiMzMzMzMzM0RERERVVVVVVVVVVVVmZmZmZmZmZmZ3d3eIiIiImZmZqqqqqrvMzMzMzMzMzMzMz' +
|
|
14
|
+
'MzM3d3d3e7u7v/////////////////////////////////////////////////////////////////////////////////////////' +
|
|
15
|
+
'//////////////////////////////////////////////////////////////////////////////////////////////////////' +
|
|
16
|
+
'/////////////////////////////////8PeNL3AAAACXBIWXMAAC37AAAt+wH8h0rnAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJ' +
|
|
17
|
+
'ld29ya3MgQ1M26LyyjAAAFydJREFUeJzt3Xl8FNd9AHD31K56LfSIaOumTY80aeK06R23TXq5xXV8ZIRhzWEkgkAHKICQZCwpQpZsS' +
|
|
18
|
+
'SsWRQdeR2hlCWEsXFkHyELmtMEkGBvnMKZ2iV1jW2COGAOSwPzT33tv5s2bY3fn+O2slg8//DFikeT97u94b2Zn5FtuuRk342bcjJt' +
|
|
19
|
+
'xM8zCl5nhaWRm+lJNJuHP8Psy/H6/z7uA/1oG/CvVfL+P/vJS7qP/uQx4wVOJh9f/93q6u6LRzs0dHZH29ra21taWluZwOBRqbGxsq' +
|
|
20
|
+
'K+vr6urra2trq6qqqqsrKyoqFhHo5TEWiFKtKE8TD6NfgF8ZUUlfJNq+G519Q2NoVA4/Lek2lJI931algO8HeCqvKGBwOsIvFqBV+j' +
|
|
21
|
+
'hJXHCFF+9Huj1hN7Scs/vQvZTJ/f9Ppe3mcjVlGsyrsv1mpI1mtDo6QtVyvHV1WBvDIWbW1pb2//G58tMjRwaLvAHXE7hIA9RuVzsc' +
|
|
22
|
+
'sqNGedsHquFf6t+rqd2kndOb2ttn/2p1OQ9w58ZCHxWlbeYyUnKNXAh4cxqEuwFMLVXVpFmh3pvbYP/Zvu9n/Olot+h3AOBzwtyqHX' +
|
|
23
|
+
'tgNOmXN/ignuVJmQ/56s9D98J0v5YQ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aIcyj3hl7D5TKdnHlPtdwb+hYuJzftBWuOTHglj9XnXtPJ4drbx8eFk3EXkvyOYjy5pwUvnIZ' +
|
|
89
|
+
'k9HfcTrgE8Lhyjyb8uE4un4VM8noep8+9oxefM+b8fEp2r2og/YSShE+yeFwv35f0988TyL2ii28rkh+ntA/hvLObPveSDtF0hF0HO' +
|
|
90
|
+
'r6vCeNNRbdyL+kkysrcH5lbgVuQe01HC1d9zn7oWprSXcnlH+6N80PX0lGennT3fZ6udBx5GtITwC3L049uGZ5IfqPRLU44xB+mmo7' +
|
|
91
|
+
'ydKNj9Tnez4xOR3la0RPAbcrTiW4Zbk1+49BtTTgk+gyP6NhyQp/hjj4zkPWllMvt9rlMn+mG7icFf1s6ylnB+13Q/YHArKTTE8Ady' +
|
|
92
|
+
'ed9bVYg4HdOzyT0rC+mVm57tsv0LELPdEr3ZZBe/0JK6Q4mHP0fHX2V9HqGzyn9Fh9t9ltvvfVP0ivgGdNWdy6/xU8W9lnEnk548nS' +
|
|
93
|
+
'zZpFl3e+cnuHPDEDaqT2tIguSHsh0PuVI1jMg7ZD3tNLDs4WcB+C5u8j6LX5a8iTxhJ8eMYumnJS7G7lqT7twLQe6PyOT7GcDgZkzU' +
|
|
94
|
+
's2xEDPoM/X5MmE75pJO+p3+guynSfjlZ+wWTuywlSevYapJFoPUKWzeMeQ0oIDSJzI1O5n/B5/xAXbXPcU5AAAAAElFTkSuQmCC';
|
|
@@ -87,9 +87,7 @@ export class AddressProvider {
|
|
|
87
87
|
* @returns {string} The serialized parameters.
|
|
88
88
|
*/
|
|
89
89
|
serialize(params) {
|
|
90
|
-
return _.toPairs(params)
|
|
91
|
-
.map(([key, value,]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
|
92
|
-
.join('&');
|
|
90
|
+
return _.toPairs(params).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join('&');
|
|
93
91
|
}
|
|
94
92
|
/**
|
|
95
93
|
* @private
|
|
@@ -126,9 +124,10 @@ export class AddressProvider {
|
|
|
126
124
|
*/
|
|
127
125
|
search(query, options = {}) {
|
|
128
126
|
const requestOptions = this.getRequestOptions(options);
|
|
129
|
-
const params =
|
|
127
|
+
const params = requestOptions.params = requestOptions.params || {};
|
|
130
128
|
params[this.queryProperty] = query;
|
|
131
|
-
return this.makeRequest(requestOptions)
|
|
129
|
+
return this.makeRequest(requestOptions)
|
|
130
|
+
.then((result) => this.responseProperty ? _.get(result, this.responseProperty, []) : result);
|
|
132
131
|
}
|
|
133
132
|
/**
|
|
134
133
|
* @public
|
|
@@ -136,8 +135,6 @@ export class AddressProvider {
|
|
|
136
135
|
* @returns {string} The display value of the address.
|
|
137
136
|
*/
|
|
138
137
|
getDisplayValue(address) {
|
|
139
|
-
return this.displayValueProperty
|
|
140
|
-
? _.get(address, this.displayValueProperty, '')
|
|
141
|
-
: String(address);
|
|
138
|
+
return this.displayValueProperty ? _.get(address, this.displayValueProperty, '') : String(address);
|
|
142
139
|
}
|
|
143
140
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*/
|
|
27
27
|
export class GoogleAddressProvider extends AddressProvider {
|
|
28
28
|
/**
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
* @param {ProviderOptions} options - The options for the provider.
|
|
31
31
|
*/
|
|
32
32
|
constructor(options?: ProviderOptions);
|
|
@@ -50,11 +50,11 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
50
50
|
_autocompleteOptions: AutocompleteOptions | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* Sets the autocomplete options based on the provider options.
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
*/
|
|
55
55
|
setAutocompleteOptions(): void;
|
|
56
56
|
/**
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
* Converts the region to autocomplete option if it exists.
|
|
59
59
|
* @param {ProviderOptions} options - The provider options.
|
|
60
60
|
*/
|
|
@@ -45,7 +45,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
45
45
|
return 'Google Maps';
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
* @param {ProviderOptions} options - The options for the provider.
|
|
50
50
|
*/
|
|
51
51
|
constructor(options = {}) {
|
|
@@ -85,7 +85,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Sets the autocomplete options based on the provider options.
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
*/
|
|
90
90
|
setAutocompleteOptions() {
|
|
91
91
|
let options = _.get(this.options, 'params.autocompleteOptions', {});
|
|
@@ -96,7 +96,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
96
96
|
this.autocompleteOptions = options;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
* Converts the region to autocomplete option if it exists.
|
|
101
101
|
* @param {ProviderOptions} options - The provider options.
|
|
102
102
|
*/
|
|
@@ -120,27 +120,18 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
120
120
|
if (region && !_.has(options, 'params.autocompleteOptions')) {
|
|
121
121
|
region = region.toUpperCase().trim();
|
|
122
122
|
// providing compatibility with ISO 3166-1 Alpha-2 county codes (for checking compatibility https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)
|
|
123
|
-
const countryCodes = { UK: 'GB' };
|
|
123
|
+
const countryCodes = { 'UK': 'GB' };
|
|
124
124
|
if (countryCodes[region]) {
|
|
125
125
|
region = countryCodes[region];
|
|
126
126
|
}
|
|
127
|
-
_.set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [
|
|
128
|
-
region,
|
|
129
|
-
]);
|
|
127
|
+
_.set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [region]);
|
|
130
128
|
}
|
|
131
129
|
}
|
|
132
130
|
/**
|
|
133
131
|
* @returns {string[]} The required address properties.
|
|
134
132
|
*/
|
|
135
133
|
getRequiredAddressProperties() {
|
|
136
|
-
return [
|
|
137
|
-
'address_components',
|
|
138
|
-
'formatted_address',
|
|
139
|
-
'geometry',
|
|
140
|
-
'place_id',
|
|
141
|
-
'plus_code',
|
|
142
|
-
'types',
|
|
143
|
-
];
|
|
134
|
+
return ['address_components', 'formatted_address', 'geometry', 'place_id', 'plus_code', 'types'];
|
|
144
135
|
}
|
|
145
136
|
/**
|
|
146
137
|
* Adds the required provider options to the options.
|
|
@@ -149,8 +140,8 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
149
140
|
addRequiredProviderOptions(options) {
|
|
150
141
|
const addressProperties = this.getRequiredAddressProperties();
|
|
151
142
|
if (_.isArray(options.fields) && options.fields.length > 0) {
|
|
152
|
-
options.fields.forEach(
|
|
153
|
-
if (!addressProperties.some(
|
|
143
|
+
options.fields.forEach(optionalField => {
|
|
144
|
+
if (!addressProperties.some(addressProp => optionalField === addressProp)) {
|
|
154
145
|
addressProperties.push(optionalField);
|
|
155
146
|
}
|
|
156
147
|
});
|
|
@@ -161,7 +152,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
161
152
|
place = place || {};
|
|
162
153
|
const filteredPlace = {};
|
|
163
154
|
if (this.autocompleteOptions) {
|
|
164
|
-
this.autocompleteOptions.fields.forEach(
|
|
155
|
+
this.autocompleteOptions.fields.forEach(field => {
|
|
165
156
|
if (place[field]) {
|
|
166
157
|
filteredPlace[field] = place[field];
|
|
167
158
|
}
|
|
@@ -200,14 +191,12 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
|
200
191
|
return;
|
|
201
192
|
}
|
|
202
193
|
const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|
|
203
|
-
if (existingScript &&
|
|
204
|
-
options.params?.key &&
|
|
205
|
-
!existingScript.attributes.src.value.endsWith(options.params.key)) {
|
|
194
|
+
if (existingScript && options.params?.key && !existingScript.attributes.src.value.endsWith(options.params.key)) {
|
|
206
195
|
const googleMapsScripts = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`) ?? [];
|
|
207
|
-
googleMapsScripts.forEach(
|
|
196
|
+
googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
|
|
208
197
|
delete Formio.libraries[this.getLibraryName()];
|
|
209
|
-
delete
|
|
210
|
-
delete
|
|
198
|
+
delete global?.google?.maps;
|
|
199
|
+
delete global[`${this.getLibraryName()}Callback`];
|
|
211
200
|
}
|
|
212
201
|
}
|
|
213
202
|
}
|
|
@@ -20,9 +20,7 @@ const fileProcessor = (formio, config) => (file, options) => new Promise((resolv
|
|
|
20
20
|
xhr.onload = () => {
|
|
21
21
|
if (xhr.status >= 200 && xhr.status < 300) {
|
|
22
22
|
const mimetype = xhr.getResponseHeader('Content-Type') || file.type;
|
|
23
|
-
resolve(new File([
|
|
24
|
-
xhr.response,
|
|
25
|
-
], file.name, { type: mimetype }));
|
|
23
|
+
resolve(new File([xhr.response], file.name, { type: mimetype }));
|
|
26
24
|
}
|
|
27
25
|
else {
|
|
28
26
|
reject(xhr.response || 'Unable to process file');
|
|
@@ -15,10 +15,7 @@ function azure(formio) {
|
|
|
15
15
|
}, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then((response) => {
|
|
16
16
|
return {
|
|
17
17
|
storage: 'azure',
|
|
18
|
-
name: XHR.path([
|
|
19
|
-
dir,
|
|
20
|
-
fileName,
|
|
21
|
-
]),
|
|
18
|
+
name: XHR.path([dir, fileName]),
|
|
22
19
|
size: file.size,
|
|
23
20
|
type: file.type,
|
|
24
21
|
groupPermissions,
|
|
@@ -33,7 +30,7 @@ function azure(formio) {
|
|
|
33
30
|
deleteFile: function deleteFile(fileInfo) {
|
|
34
31
|
var url = `${formio.formUrl}/storage/azure?name=${XHR.trim(fileInfo.name)}&key=${XHR.trim(fileInfo.key)}`;
|
|
35
32
|
return formio.makeRequest('', url, 'delete');
|
|
36
|
-
}
|
|
33
|
+
}
|
|
37
34
|
};
|
|
38
35
|
}
|
|
39
36
|
azure.title = 'Azure File Services';
|
|
@@ -7,7 +7,7 @@ import { setXhrHeaders } from './xhr';
|
|
|
7
7
|
function dropbox(formio) {
|
|
8
8
|
return {
|
|
9
9
|
uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {
|
|
10
|
-
return new Promise((resolve, reject) => {
|
|
10
|
+
return new Promise(((resolve, reject) => {
|
|
11
11
|
// Send the file with data.
|
|
12
12
|
const xhr = new XMLHttpRequest();
|
|
13
13
|
if (typeof progressCallback === 'function') {
|
|
@@ -48,13 +48,14 @@ function dropbox(formio) {
|
|
|
48
48
|
xhr.setRequestHeader('x-jwt-token', token);
|
|
49
49
|
}
|
|
50
50
|
xhr.send(fd);
|
|
51
|
-
});
|
|
51
|
+
}));
|
|
52
52
|
},
|
|
53
53
|
downloadFile(file) {
|
|
54
54
|
const token = formio.getToken();
|
|
55
|
-
file.url =
|
|
55
|
+
file.url =
|
|
56
|
+
`${formio.formUrl}/storage/dropbox?path_lower=${file.path_lower}${token ? `&x-jwt-token=${token}` : ''}`;
|
|
56
57
|
return Promise.resolve(file);
|
|
57
|
-
}
|
|
58
|
+
}
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
dropbox.title = 'Dropbox';
|
|
@@ -8,7 +8,7 @@ import { setXhrHeaders } from './xhr';
|
|
|
8
8
|
function googledrive(formio) {
|
|
9
9
|
return {
|
|
10
10
|
uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
11
|
+
return new Promise(((resolve, reject) => {
|
|
12
12
|
// Send the file with data.
|
|
13
13
|
const xhr = new XMLHttpRequest();
|
|
14
14
|
if (typeof progressCallback === 'function') {
|
|
@@ -48,12 +48,13 @@ function googledrive(formio) {
|
|
|
48
48
|
xhr.setRequestHeader('x-jwt-token', token);
|
|
49
49
|
}
|
|
50
50
|
xhr.send(fd);
|
|
51
|
-
});
|
|
51
|
+
}));
|
|
52
52
|
},
|
|
53
53
|
downloadFile(file, component) {
|
|
54
54
|
const token = formio.getToken();
|
|
55
55
|
// Constructed the url with the fileId, fileName, displayImage, imageSize if applicable
|
|
56
|
-
file.url =
|
|
56
|
+
file.url =
|
|
57
|
+
`${formio.formUrl}/storage/gdrive?fileId=${file.id}&fileName=${file.originalName}${token ? `&x-jwt-token=${token}` : ''}${component.image ? '&displayImage=true' : ''}${component.imageSize ? `&imageSize=${component.imageSize}` : ''}`;
|
|
57
58
|
return Promise.resolve(file);
|
|
58
59
|
},
|
|
59
60
|
deleteFile: function deleteFile(fileInfo) {
|
|
@@ -9,7 +9,7 @@ function indexeddb() {
|
|
|
9
9
|
name: 'indexeddb',
|
|
10
10
|
uploadFile(file, fileName, dir, progressCallback, url, options) {
|
|
11
11
|
if (!('indexedDB' in window)) {
|
|
12
|
-
console.log(
|
|
12
|
+
console.log('This browser doesn\'t support IndexedDB');
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
return new Promise((resolve) => {
|
|
@@ -26,9 +26,7 @@ function indexeddb() {
|
|
|
26
26
|
const reader = new FileReader();
|
|
27
27
|
return new Promise((resolve, reject) => {
|
|
28
28
|
reader.onload = () => {
|
|
29
|
-
const blobObject = new Blob([
|
|
30
|
-
file,
|
|
31
|
-
], { type: file.type });
|
|
29
|
+
const blobObject = new Blob([file], { type: file.type });
|
|
32
30
|
const id = uuidv4(blobObject);
|
|
33
31
|
const data = {
|
|
34
32
|
id,
|
|
@@ -38,9 +36,7 @@ function indexeddb() {
|
|
|
38
36
|
type: file.type,
|
|
39
37
|
url,
|
|
40
38
|
};
|
|
41
|
-
const trans = db.transaction([
|
|
42
|
-
options.indexeddbTable,
|
|
43
|
-
], 'readwrite');
|
|
39
|
+
const trans = db.transaction([options.indexeddbTable], 'readwrite');
|
|
44
40
|
const addReq = trans.objectStore(options.indexeddbTable).put(data, id);
|
|
45
41
|
addReq.onerror = function (e) {
|
|
46
42
|
console.log('error storing data');
|
|
@@ -73,16 +69,12 @@ function indexeddb() {
|
|
|
73
69
|
};
|
|
74
70
|
}).then((db) => {
|
|
75
71
|
return new Promise((resolve, reject) => {
|
|
76
|
-
const trans = db.transaction([
|
|
77
|
-
options.indexeddbTable,
|
|
78
|
-
], 'readonly');
|
|
72
|
+
const trans = db.transaction([options.indexeddbTable], 'readonly');
|
|
79
73
|
const store = trans.objectStore(options.indexeddbTable).get(file.id);
|
|
80
74
|
store.onsuccess = () => {
|
|
81
75
|
trans.oncomplete = () => {
|
|
82
76
|
const result = store.result;
|
|
83
|
-
const dbFile = new File([
|
|
84
|
-
store.result.data,
|
|
85
|
-
], file.name, {
|
|
77
|
+
const dbFile = new File([store.result.data], file.name, {
|
|
86
78
|
type: store.result.type,
|
|
87
79
|
});
|
|
88
80
|
const reader = new FileReader();
|
|
@@ -112,9 +104,7 @@ function indexeddb() {
|
|
|
112
104
|
};
|
|
113
105
|
}).then((db) => {
|
|
114
106
|
return new Promise((resolve, reject) => {
|
|
115
|
-
const trans = db.transaction([
|
|
116
|
-
options.indexeddbTable,
|
|
117
|
-
], 'readwrite');
|
|
107
|
+
const trans = db.transaction([options.indexeddbTable], 'readwrite');
|
|
118
108
|
const store = trans.objectStore(options.indexeddbTable).delete(file.id);
|
|
119
109
|
store.onsuccess = () => {
|
|
120
110
|
trans.oncomplete = () => {
|
|
@@ -15,11 +15,7 @@ function s3(formio) {
|
|
|
15
15
|
async uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback, multipartOptions) {
|
|
16
16
|
const xhrCallback = async (xhr, response, abortCallback) => {
|
|
17
17
|
response.data.fileName = fileName;
|
|
18
|
-
response.data.key = XHR.path([
|
|
19
|
-
response.data.key,
|
|
20
|
-
dir,
|
|
21
|
-
fileName,
|
|
22
|
-
]);
|
|
18
|
+
response.data.key = XHR.path([response.data.key, dir, fileName]);
|
|
23
19
|
if (response.signed) {
|
|
24
20
|
if (multipartOptions && Array.isArray(response.signed)) {
|
|
25
21
|
// patch abort callback
|
|
@@ -31,11 +27,7 @@ function s3(formio) {
|
|
|
31
27
|
}
|
|
32
28
|
try {
|
|
33
29
|
const parts = await this.uploadParts(file, response.signed, response.data.headers, response.partSizeActual, multipartOptions, abortSignal);
|
|
34
|
-
await withRetries(this.completeMultipartUpload, [
|
|
35
|
-
response,
|
|
36
|
-
parts,
|
|
37
|
-
multipartOptions,
|
|
38
|
-
], 3);
|
|
30
|
+
await withRetries(this.completeMultipartUpload, [response, parts, multipartOptions], 3);
|
|
39
31
|
return;
|
|
40
32
|
}
|
|
41
33
|
catch (err) {
|
|
@@ -73,13 +65,10 @@ function s3(formio) {
|
|
|
73
65
|
name: fileName,
|
|
74
66
|
bucket: response.bucket,
|
|
75
67
|
key: response.data.key,
|
|
76
|
-
url: XHR.path([
|
|
77
|
-
response.url,
|
|
78
|
-
response.data.key,
|
|
79
|
-
]),
|
|
68
|
+
url: XHR.path([response.url, response.data.key]),
|
|
80
69
|
acl: response.data.acl,
|
|
81
70
|
size: file.size,
|
|
82
|
-
type: file.type
|
|
71
|
+
type: file.type
|
|
83
72
|
};
|
|
84
73
|
},
|
|
85
74
|
async completeMultipartUpload(serverResponse, parts, multipart) {
|
|
@@ -90,9 +79,9 @@ function s3(formio) {
|
|
|
90
79
|
method: 'POST',
|
|
91
80
|
headers: {
|
|
92
81
|
'Content-Type': 'application/json',
|
|
93
|
-
...(token ? { 'x-jwt-token': token } : {})
|
|
82
|
+
...(token ? { 'x-jwt-token': token } : {})
|
|
94
83
|
},
|
|
95
|
-
body: JSON.stringify({ parts, uploadId: serverResponse.uploadId, key: serverResponse.key })
|
|
84
|
+
body: JSON.stringify({ parts, uploadId: serverResponse.uploadId, key: serverResponse.key })
|
|
96
85
|
});
|
|
97
86
|
const message = await response.text();
|
|
98
87
|
if (!response.ok) {
|
|
@@ -111,9 +100,9 @@ function s3(formio) {
|
|
|
111
100
|
method: 'POST',
|
|
112
101
|
headers: {
|
|
113
102
|
'Content-Type': 'application/json',
|
|
114
|
-
...(token ? { 'x-jwt-token': token } : {})
|
|
103
|
+
...(token ? { 'x-jwt-token': token } : {})
|
|
115
104
|
},
|
|
116
|
-
body: JSON.stringify({ uploadId, key })
|
|
105
|
+
body: JSON.stringify({ uploadId, key })
|
|
117
106
|
}).catch((err) => console.error('Error while aborting multipart upload:', err));
|
|
118
107
|
},
|
|
119
108
|
uploadParts(file, urls, headers, partSize, multipart, abortSignal) {
|