@formio/js 5.0.0-rc.30 → 5.0.0-rc.32
Sign up to get free protection for your applications and to get access to all the features.
- 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.js +64 -108
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +66 -110
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +40 -84
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +18 -84
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/CDN.js +6 -2
- package/lib/cjs/Embed.js +98 -61
- package/lib/cjs/Formio.js +10 -0
- package/lib/cjs/Wizard.js +9 -10
- package/lib/cjs/components/_classes/component/Component.js +1 -3
- package/lib/cjs/components/_classes/component/fixtures/comp5.js +26 -0
- package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
- package/lib/cjs/components/columns/editForm/Columns.edit.display.js +0 -18
- package/lib/cjs/components/file/File.js +13 -1
- package/lib/cjs/components/file/editForm/File.edit.file.js +40 -0
- package/lib/cjs/components/select/Select.js +7 -3
- package/lib/cjs/formio.form.js +3 -1
- package/lib/cjs/providers/storage/azure.js +24 -22
- package/lib/cjs/providers/storage/base64.js +29 -27
- package/lib/cjs/providers/storage/dropbox.js +51 -49
- package/lib/cjs/providers/storage/googleDrive.js +50 -48
- package/lib/cjs/providers/storage/indexeddb.js +106 -104
- package/lib/cjs/providers/storage/s3.js +137 -37
- package/lib/cjs/providers/storage/url.js +2 -2
- package/lib/cjs/providers/storage/util.js +21 -0
- package/lib/cjs/providers/storage/xhr.js +81 -64
- package/lib/cjs/utils/formUtils.js +1 -1
- package/lib/cjs/utils/utils.js +6 -0
- package/lib/mjs/CDN.js +6 -2
- package/lib/mjs/Embed.js +94 -62
- package/lib/mjs/Formio.js +35 -25
- package/lib/mjs/Wizard.js +9 -10
- package/lib/mjs/components/_classes/component/Component.js +1 -3
- package/lib/mjs/components/_classes/component/fixtures/comp5.js +24 -0
- package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
- package/lib/mjs/components/columns/editForm/Columns.edit.display.js +0 -18
- package/lib/mjs/components/file/File.js +17 -1
- package/lib/mjs/components/file/editForm/File.edit.file.js +40 -0
- package/lib/mjs/components/select/Select.js +7 -3
- package/lib/mjs/formio.form.js +3 -1
- package/lib/mjs/providers/storage/azure.js +24 -22
- package/lib/mjs/providers/storage/base64.js +29 -27
- package/lib/mjs/providers/storage/dropbox.js +51 -49
- package/lib/mjs/providers/storage/googleDrive.js +50 -48
- package/lib/mjs/providers/storage/indexeddb.js +106 -104
- package/lib/mjs/providers/storage/s3.js +122 -29
- package/lib/mjs/providers/storage/url.js +2 -2
- package/lib/mjs/providers/storage/util.js +6 -0
- package/lib/mjs/providers/storage/xhr.js +75 -65
- package/lib/mjs/utils/formUtils.js +1 -1
- package/lib/mjs/utils/utils.js +6 -0
- package/package.json +7 -4
- package/types/Embed.d.ts +13 -0
- package/types/Plugins.d.ts +95 -0
- package/types/components/_classes/component/component.d.ts +2 -1
- package/types/components/schema.d.ts +2 -68
- package/types/formio.d.ts +1230 -118
- package/types/index.d.ts +1 -1
- package/types/utils.d.ts +1 -1
- package/lib/cjs/CDN.d.ts +0 -29
- package/lib/cjs/Element.d.ts +0 -255
- package/lib/cjs/Embed.d.ts +0 -52
- package/lib/cjs/EventEmitter.d.ts +0 -7
- package/lib/cjs/Form.d.ts +0 -93
- package/lib/cjs/FormBuilder.d.ts +0 -6
- package/lib/cjs/Formio.d.ts +0 -1
- package/lib/cjs/PDF.d.ts +0 -40
- package/lib/cjs/PDFBuilder.d.ts +0 -55
- package/lib/cjs/Webform.d.ts +0 -402
- package/lib/cjs/WebformBuilder.d.ts +0 -126
- package/lib/cjs/Wizard.d.ts +0 -97
- package/lib/cjs/WizardBuilder.d.ts +0 -49
- package/lib/cjs/addons/FormioAddon.d.ts +0 -19
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +0 -716
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +0 -590
- package/lib/cjs/addons/index.d.ts +0 -626
- package/lib/cjs/builders/Builders.d.ts +0 -18
- package/lib/cjs/builders/index.d.ts +0 -2
- package/lib/cjs/components/Components.d.ts +0 -265
- package/lib/cjs/components/_classes/component/Component.d.ts +0 -828
- package/lib/cjs/components/_classes/component/Component.form.d.ts +0 -3
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +0 -653
- package/lib/cjs/components/_classes/component/editForm/Component.edit.api.d.ts +0 -42
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +0 -113
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -219
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.d.ts +0 -160
- package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.d.ts +0 -44
- package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.d.ts +0 -368
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +0 -140
- package/lib/cjs/components/_classes/component/editForm/utils.d.ts +0 -83
- package/lib/cjs/components/_classes/component/fixtures/comp1.d.ts +0 -33
- package/lib/cjs/components/_classes/component/fixtures/comp2.d.ts +0 -33
- package/lib/cjs/components/_classes/component/fixtures/comp3.d.ts +0 -14
- package/lib/cjs/components/_classes/component/fixtures/comp4.d.ts +0 -17
- package/lib/cjs/components/_classes/component/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/_classes/componentModal/ComponentModal.d.ts +0 -46
- package/lib/cjs/components/_classes/field/Field.d.ts +0 -5
- package/lib/cjs/components/_classes/input/Input.d.ts +0 -42
- package/lib/cjs/components/_classes/list/ListComponent.d.ts +0 -18
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +0 -3
- package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +0 -183
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +0 -29
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +0 -150
- package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +0 -3
- package/lib/cjs/components/_classes/nested/fixtures/comp1.d.ts +0 -8
- package/lib/cjs/components/_classes/nested/fixtures/comp2.d.ts +0 -236
- package/lib/cjs/components/_classes/nested/fixtures/comp3.d.ts +0 -26
- package/lib/cjs/components/_classes/nested/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +0 -16
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -12
- package/lib/cjs/components/address/Address.d.ts +0 -66
- package/lib/cjs/components/address/Address.form.d.ts +0 -3
- package/lib/cjs/components/address/editForm/Address.edit.data.d.ts +0 -31
- package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +0 -49
- package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +0 -164
- package/lib/cjs/components/address/fixtures/comp1.d.ts +0 -34
- package/lib/cjs/components/address/fixtures/comp2.d.ts +0 -62
- package/lib/cjs/components/address/fixtures/comp3.d.ts +0 -44
- package/lib/cjs/components/address/fixtures/comp4.d.ts +0 -56
- package/lib/cjs/components/address/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/address/fixtures/values.d.ts +0 -22
- package/lib/cjs/components/alert/Alert.d.ts +0 -30
- package/lib/cjs/components/builder.d.ts +0 -2
- package/lib/cjs/components/button/Button.d.ts +0 -45
- package/lib/cjs/components/button/Button.form.d.ts +0 -3
- package/lib/cjs/components/button/editForm/Button.edit.display.d.ts +0 -360
- package/lib/cjs/components/button/fixtures/comp1.d.ts +0 -15
- package/lib/cjs/components/button/fixtures/comp2.d.ts +0 -25
- package/lib/cjs/components/button/fixtures/comp3.d.ts +0 -113
- package/lib/cjs/components/button/fixtures/index.d.ts +0 -4
- package/lib/cjs/components/button/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/checkbox/Checkbox.d.ts +0 -77
- package/lib/cjs/components/checkbox/Checkbox.form.d.ts +0 -3
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +0 -5
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +0 -75
- package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +0 -5
- package/lib/cjs/components/checkbox/fixtures/comp1.d.ts +0 -24
- package/lib/cjs/components/checkbox/fixtures/comp2.d.ts +0 -12
- package/lib/cjs/components/checkbox/fixtures/comp3.d.ts +0 -15
- package/lib/cjs/components/checkbox/fixtures/comp4.d.ts +0 -46
- package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.d.ts +0 -25
- package/lib/cjs/components/checkbox/fixtures/index.d.ts +0 -6
- package/lib/cjs/components/checkbox/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/columns/Columns.d.ts +0 -28
- package/lib/cjs/components/columns/Columns.form.d.ts +0 -3
- package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +0 -87
- package/lib/cjs/components/columns/fixtures/comp1.d.ts +0 -45
- package/lib/cjs/components/columns/fixtures/comp2.d.ts +0 -24
- package/lib/cjs/components/columns/fixtures/comp3.d.ts +0 -45
- package/lib/cjs/components/columns/fixtures/index.d.ts +0 -4
- package/lib/cjs/components/container/Container.d.ts +0 -16
- package/lib/cjs/components/container/Container.form.d.ts +0 -3
- package/lib/cjs/components/container/editForm/Container.edit.data.d.ts +0 -5
- package/lib/cjs/components/container/editForm/Container.edit.display.d.ts +0 -5
- package/lib/cjs/components/container/fixtures/comp1.d.ts +0 -49
- package/lib/cjs/components/container/fixtures/comp2.d.ts +0 -30
- package/lib/cjs/components/container/fixtures/comp3.d.ts +0 -77
- package/lib/cjs/components/container/fixtures/index.d.ts +0 -4
- package/lib/cjs/components/content/Content.d.ts +0 -18
- package/lib/cjs/components/content/Content.form.d.ts +0 -3
- package/lib/cjs/components/content/editForm/Content.edit.display.d.ts +0 -18
- package/lib/cjs/components/content/editForm/Content.edit.logic.d.ts +0 -48
- package/lib/cjs/components/content/fixtures/comp1.d.ts +0 -13
- package/lib/cjs/components/content/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/currency/Currency.d.ts +0 -8
- package/lib/cjs/components/currency/Currency.form.d.ts +0 -3
- package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +0 -29
- package/lib/cjs/components/currency/editForm/Currency.edit.display.d.ts +0 -18
- package/lib/cjs/components/currency/fixtures/comp1.d.ts +0 -31
- package/lib/cjs/components/currency/fixtures/comp2.d.ts +0 -20
- package/lib/cjs/components/currency/fixtures/comp3.d.ts +0 -13
- package/lib/cjs/components/currency/fixtures/comp4.d.ts +0 -17
- package/lib/cjs/components/currency/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/currency/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -80
- package/lib/cjs/components/datagrid/DataGrid.form.d.ts +0 -3
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +0 -5
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +0 -283
- package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +0 -20
- package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +0 -37
- package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
- package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +0 -63
- package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +0 -76
- package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +0 -197
- package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.d.ts +0 -61
- package/lib/cjs/components/datagrid/fixtures/comp-with-logic.d.ts +0 -165
- package/lib/cjs/components/datagrid/fixtures/comp1.d.ts +0 -93
- package/lib/cjs/components/datagrid/fixtures/comp2.d.ts +0 -18
- package/lib/cjs/components/datagrid/fixtures/comp3.d.ts +0 -14
- package/lib/cjs/components/datagrid/fixtures/comp4.d.ts +0 -27
- package/lib/cjs/components/datagrid/fixtures/comp5.d.ts +0 -67
- package/lib/cjs/components/datagrid/fixtures/comp6.d.ts +0 -567
- package/lib/cjs/components/datagrid/fixtures/comp7.d.ts +0 -28
- package/lib/cjs/components/datagrid/fixtures/comp8.d.ts +0 -35
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +0 -15
- package/lib/cjs/components/datamap/DataMap.d.ts +0 -36
- package/lib/cjs/components/datamap/DataMap.form.d.ts +0 -3
- package/lib/cjs/components/datamap/editForm/DataMap.edit.data.d.ts +0 -5
- package/lib/cjs/components/datamap/editForm/DataMap.edit.display.d.ts +0 -30
- package/lib/cjs/components/datamap/fixtures/comp1.d.ts +0 -18
- package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +0 -87
- package/lib/cjs/components/datamap/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/datetime/DateTime.d.ts +0 -39
- package/lib/cjs/components/datetime/DateTime.form.d.ts +0 -3
- package/lib/cjs/components/datetime/editForm/DateTime.edit.data.d.ts +0 -24
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +0 -61
- package/lib/cjs/components/datetime/editForm/DateTime.edit.display.d.ts +0 -128
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.d.ts +0 -9
- package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +0 -40
- package/lib/cjs/components/datetime/fixtures/comp1.d.ts +0 -45
- package/lib/cjs/components/datetime/fixtures/comp10.d.ts +0 -102
- package/lib/cjs/components/datetime/fixtures/comp11.d.ts +0 -58
- package/lib/cjs/components/datetime/fixtures/comp12.d.ts +0 -57
- package/lib/cjs/components/datetime/fixtures/comp2.d.ts +0 -42
- package/lib/cjs/components/datetime/fixtures/comp3.d.ts +0 -51
- package/lib/cjs/components/datetime/fixtures/comp5.d.ts +0 -57
- package/lib/cjs/components/datetime/fixtures/comp6.d.ts +0 -55
- package/lib/cjs/components/datetime/fixtures/comp7.d.ts +0 -59
- package/lib/cjs/components/datetime/fixtures/comp8.d.ts +0 -59
- package/lib/cjs/components/datetime/fixtures/comp9.d.ts +0 -64
- package/lib/cjs/components/datetime/fixtures/index.d.ts +0 -12
- package/lib/cjs/components/datetime/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/day/Day.d.ts +0 -163
- package/lib/cjs/components/day/Day.form.d.ts +0 -3
- package/lib/cjs/components/day/editForm/Day.edit.data.d.ts +0 -5
- package/lib/cjs/components/day/editForm/Day.edit.day.d.ts +0 -40
- package/lib/cjs/components/day/editForm/Day.edit.display.d.ts +0 -40
- package/lib/cjs/components/day/editForm/Day.edit.month.d.ts +0 -40
- package/lib/cjs/components/day/editForm/Day.edit.validation.d.ts +0 -29
- package/lib/cjs/components/day/editForm/Day.edit.year.d.ts +0 -40
- package/lib/cjs/components/day/fixtures/comp1.d.ts +0 -46
- package/lib/cjs/components/day/fixtures/comp2.d.ts +0 -46
- package/lib/cjs/components/day/fixtures/comp3.d.ts +0 -48
- package/lib/cjs/components/day/fixtures/comp4.d.ts +0 -53
- package/lib/cjs/components/day/fixtures/comp5.d.ts +0 -29
- package/lib/cjs/components/day/fixtures/comp6.d.ts +0 -81
- package/lib/cjs/components/day/fixtures/index.d.ts +0 -7
- package/lib/cjs/components/day/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/editgrid/EditGrid.d.ts +0 -103
- package/lib/cjs/components/editgrid/EditGrid.form.d.ts +0 -3
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +0 -18
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +0 -82
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +0 -58
- package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +0 -29
- package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +0 -34
- package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +0 -327
- package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +0 -77
- package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +0 -190
- package/lib/cjs/components/editgrid/fixtures/comp1.d.ts +0 -89
- package/lib/cjs/components/editgrid/fixtures/comp10.d.ts +0 -49
- package/lib/cjs/components/editgrid/fixtures/comp11.d.ts +0 -53
- package/lib/cjs/components/editgrid/fixtures/comp12.d.ts +0 -57
- package/lib/cjs/components/editgrid/fixtures/comp13.d.ts +0 -64
- package/lib/cjs/components/editgrid/fixtures/comp14.d.ts +0 -88
- package/lib/cjs/components/editgrid/fixtures/comp15.d.ts +0 -54
- package/lib/cjs/components/editgrid/fixtures/comp2.d.ts +0 -112
- package/lib/cjs/components/editgrid/fixtures/comp3.d.ts +0 -27
- package/lib/cjs/components/editgrid/fixtures/comp4.d.ts +0 -23
- package/lib/cjs/components/editgrid/fixtures/comp5.d.ts +0 -19
- package/lib/cjs/components/editgrid/fixtures/comp6.d.ts +0 -50
- package/lib/cjs/components/editgrid/fixtures/comp7.d.ts +0 -129
- package/lib/cjs/components/editgrid/fixtures/comp8.d.ts +0 -148
- package/lib/cjs/components/editgrid/fixtures/comp9.d.ts +0 -86
- package/lib/cjs/components/editgrid/fixtures/index.d.ts +0 -19
- package/lib/cjs/components/email/Email.d.ts +0 -4
- package/lib/cjs/components/email/Email.form.d.ts +0 -3
- package/lib/cjs/components/email/editForm/Email.edit.display.d.ts +0 -5
- package/lib/cjs/components/email/editForm/Email.edit.validation.d.ts +0 -24
- package/lib/cjs/components/email/fixtures/comp1.d.ts +0 -26
- package/lib/cjs/components/email/fixtures/comp2.d.ts +0 -23
- package/lib/cjs/components/email/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/email/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/fieldset/Fieldset.d.ts +0 -15
- package/lib/cjs/components/fieldset/Fieldset.form.d.ts +0 -3
- package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +0 -33
- package/lib/cjs/components/fieldset/fixtures/comp1.d.ts +0 -46
- package/lib/cjs/components/fieldset/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/file/File.d.ts +0 -81
- package/lib/cjs/components/file/File.form.d.ts +0 -3
- package/lib/cjs/components/file/editForm/File.edit.data.d.ts +0 -5
- package/lib/cjs/components/file/editForm/File.edit.display.d.ts +0 -5
- package/lib/cjs/components/file/editForm/File.edit.file.d.ts +0 -275
- package/lib/cjs/components/file/editForm/File.edit.validation.d.ts +0 -5
- package/lib/cjs/components/file/fixtures/comp1.d.ts +0 -15
- package/lib/cjs/components/file/fixtures/comp2.d.ts +0 -35
- package/lib/cjs/components/file/fixtures/comp3.d.ts +0 -29
- package/lib/cjs/components/file/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/file/fixtures/values.d.ts +0 -10
- package/lib/cjs/components/form/Form.d.ts +0 -94
- package/lib/cjs/components/form/Form.form.d.ts +0 -3
- package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +0 -82
- package/lib/cjs/components/form/editForm/Form.edit.display.d.ts +0 -5
- package/lib/cjs/components/form/editForm/Form.edit.form.d.ts +0 -89
- package/lib/cjs/components/form/fixtures/comp1.d.ts +0 -45
- package/lib/cjs/components/form/fixtures/comp2.d.ts +0 -14
- package/lib/cjs/components/form/fixtures/comp3.d.ts +0 -187
- package/lib/cjs/components/form/fixtures/comp4.d.ts +0 -107
- package/lib/cjs/components/form/fixtures/comp5.d.ts +0 -42
- package/lib/cjs/components/form/fixtures/comp6.d.ts +0 -74
- package/lib/cjs/components/form/fixtures/formModalEdit.d.ts +0 -42
- package/lib/cjs/components/form/fixtures/index.d.ts +0 -8
- package/lib/cjs/components/form/fixtures/values.d.ts +0 -6
- package/lib/cjs/components/hidden/Hidden.d.ts +0 -26
- package/lib/cjs/components/hidden/Hidden.form.d.ts +0 -3
- package/lib/cjs/components/hidden/editForm/Hidden.edit.data.d.ts +0 -5
- package/lib/cjs/components/hidden/editForm/Hidden.edit.display.d.ts +0 -5
- package/lib/cjs/components/hidden/fixtures/comp1.d.ts +0 -18
- package/lib/cjs/components/hidden/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/hidden/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/html/HTML.d.ts +0 -18
- package/lib/cjs/components/html/HTML.form.d.ts +0 -3
- package/lib/cjs/components/html/editForm/HTML.edit.display.d.ts +0 -77
- package/lib/cjs/components/html/editForm/HTML.edit.logic.d.ts +0 -48
- package/lib/cjs/components/html/fixtures/comp1.d.ts +0 -19
- package/lib/cjs/components/html/fixtures/comp2.d.ts +0 -21
- package/lib/cjs/components/html/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/index.d.ts +0 -98
- package/lib/cjs/components/number/Number.d.ts +0 -53
- package/lib/cjs/components/number/Number.form.d.ts +0 -3
- package/lib/cjs/components/number/editForm/Number.edit.data.d.ts +0 -18
- package/lib/cjs/components/number/editForm/Number.edit.display.d.ts +0 -5
- package/lib/cjs/components/number/editForm/Number.edit.validation.d.ts +0 -20
- package/lib/cjs/components/number/fixtures/comp1.d.ts +0 -33
- package/lib/cjs/components/number/fixtures/comp2.d.ts +0 -32
- package/lib/cjs/components/number/fixtures/comp3.d.ts +0 -14
- package/lib/cjs/components/number/fixtures/comp4.d.ts +0 -14
- package/lib/cjs/components/number/fixtures/comp5.d.ts +0 -20
- package/lib/cjs/components/number/fixtures/comp6.d.ts +0 -40
- package/lib/cjs/components/number/fixtures/comp7.d.ts +0 -15
- package/lib/cjs/components/number/fixtures/index.d.ts +0 -8
- package/lib/cjs/components/number/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/panel/Panel.d.ts +0 -14
- package/lib/cjs/components/panel/Panel.form.d.ts +0 -3
- package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +0 -75
- package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +0 -196
- package/lib/cjs/components/panel/fixtures/comp1.d.ts +0 -46
- package/lib/cjs/components/panel/fixtures/comp2.d.ts +0 -80
- package/lib/cjs/components/panel/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/password/Password.d.ts +0 -3
- package/lib/cjs/components/password/Password.form.d.ts +0 -3
- package/lib/cjs/components/password/editForm/Password.edit.data.d.ts +0 -18
- package/lib/cjs/components/password/editForm/Password.edit.display.d.ts +0 -5
- package/lib/cjs/components/password/editForm/Password.edit.validation.d.ts +0 -5
- package/lib/cjs/components/password/fixtures/comp1.d.ts +0 -22
- package/lib/cjs/components/password/fixtures/comp2.d.ts +0 -27
- package/lib/cjs/components/password/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/password/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/phonenumber/PhoneNumber.d.ts +0 -3
- package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +0 -3
- package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +0 -5
- package/lib/cjs/components/phonenumber/fixtures/comp1.d.ts +0 -27
- package/lib/cjs/components/phonenumber/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/phonenumber/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/radio/Radio.d.ts +0 -65
- package/lib/cjs/components/radio/Radio.form.d.ts +0 -3
- package/lib/cjs/components/radio/editForm/Radio.edit.data.d.ts +0 -134
- package/lib/cjs/components/radio/editForm/Radio.edit.display.d.ts +0 -40
- package/lib/cjs/components/radio/editForm/Radio.edit.validation.d.ts +0 -18
- package/lib/cjs/components/radio/fixtures/comp1.d.ts +0 -28
- package/lib/cjs/components/radio/fixtures/comp2.d.ts +0 -85
- package/lib/cjs/components/radio/fixtures/comp3.d.ts +0 -85
- package/lib/cjs/components/radio/fixtures/comp4.d.ts +0 -19
- package/lib/cjs/components/radio/fixtures/comp5.d.ts +0 -39
- package/lib/cjs/components/radio/fixtures/comp6.d.ts +0 -38
- package/lib/cjs/components/radio/fixtures/comp7.d.ts +0 -23
- package/lib/cjs/components/radio/fixtures/comp8.d.ts +0 -118
- package/lib/cjs/components/radio/fixtures/comp9.d.ts +0 -35
- package/lib/cjs/components/radio/fixtures/index.d.ts +0 -10
- package/lib/cjs/components/radio/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +0 -23
- package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +0 -3
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -44
- package/lib/cjs/components/recaptcha/fixtures/comp1.d.ts +0 -8
- package/lib/cjs/components/recaptcha/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/resource/Resource.d.ts +0 -10
- package/lib/cjs/components/resource/Resource.form.d.ts +0 -3
- package/lib/cjs/components/resource/editForm/Resource.edit.display.d.ts +0 -173
- package/lib/cjs/components/resource/fixtures/comp1.d.ts +0 -30
- package/lib/cjs/components/resource/fixtures/comp2.d.ts +0 -35
- package/lib/cjs/components/resource/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/select/Select.d.ts +0 -145
- package/lib/cjs/components/select/Select.form.d.ts +0 -3
- package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +0 -1039
- package/lib/cjs/components/select/editForm/Select.edit.display.d.ts +0 -27
- package/lib/cjs/components/select/editForm/Select.edit.validation.d.ts +0 -30
- package/lib/cjs/components/select/fixtures/comp1.d.ts +0 -40
- package/lib/cjs/components/select/fixtures/comp10.d.ts +0 -41
- package/lib/cjs/components/select/fixtures/comp11.d.ts +0 -28
- package/lib/cjs/components/select/fixtures/comp12.d.ts +0 -53
- package/lib/cjs/components/select/fixtures/comp13.d.ts +0 -28
- package/lib/cjs/components/select/fixtures/comp14.d.ts +0 -40
- package/lib/cjs/components/select/fixtures/comp15.d.ts +0 -50
- package/lib/cjs/components/select/fixtures/comp16.d.ts +0 -34
- package/lib/cjs/components/select/fixtures/comp17.d.ts +0 -51
- package/lib/cjs/components/select/fixtures/comp18.d.ts +0 -49
- package/lib/cjs/components/select/fixtures/comp19.d.ts +0 -23
- package/lib/cjs/components/select/fixtures/comp2.d.ts +0 -41
- package/lib/cjs/components/select/fixtures/comp3.d.ts +0 -35
- package/lib/cjs/components/select/fixtures/comp4.d.ts +0 -103
- package/lib/cjs/components/select/fixtures/comp5.d.ts +0 -21
- package/lib/cjs/components/select/fixtures/comp6.d.ts +0 -20
- package/lib/cjs/components/select/fixtures/comp7.d.ts +0 -63
- package/lib/cjs/components/select/fixtures/comp8.d.ts +0 -72
- package/lib/cjs/components/select/fixtures/comp9.d.ts +0 -88
- package/lib/cjs/components/select/fixtures/index.d.ts +0 -20
- package/lib/cjs/components/select/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -51
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +0 -3
- package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +0 -9
- package/lib/cjs/components/selectboxes/fixtures/comp1.d.ts +0 -24
- package/lib/cjs/components/selectboxes/fixtures/comp2.d.ts +0 -24
- package/lib/cjs/components/selectboxes/fixtures/comp3.d.ts +0 -23
- package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +0 -66
- package/lib/cjs/components/selectboxes/fixtures/comp5.d.ts +0 -37
- package/lib/cjs/components/selectboxes/fixtures/comp6.d.ts +0 -14
- package/lib/cjs/components/selectboxes/fixtures/comp7.d.ts +0 -18
- package/lib/cjs/components/selectboxes/fixtures/index.d.ts +0 -8
- package/lib/cjs/components/selectboxes/fixtures/values.d.ts +0 -6
- package/lib/cjs/components/signature/Signature.d.ts +0 -46
- package/lib/cjs/components/signature/Signature.form.d.ts +0 -3
- package/lib/cjs/components/signature/editForm/Signature.edit.data.d.ts +0 -5
- package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -51
- package/lib/cjs/components/signature/editForm/Signature.edit.validation.d.ts +0 -5
- package/lib/cjs/components/signature/fixtures/comp1.d.ts +0 -30
- package/lib/cjs/components/signature/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/signature/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/survey/Survey.d.ts +0 -37
- package/lib/cjs/components/survey/Survey.form.d.ts +0 -3
- package/lib/cjs/components/survey/editForm/Survey.edit.data.d.ts +0 -44
- package/lib/cjs/components/survey/editForm/Survey.edit.display.d.ts +0 -5
- package/lib/cjs/components/survey/editForm/Survey.edit.validation.d.ts +0 -5
- package/lib/cjs/components/survey/fixtures/comp1.d.ts +0 -31
- package/lib/cjs/components/survey/fixtures/comp2.d.ts +0 -31
- package/lib/cjs/components/survey/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/survey/fixtures/values.d.ts +0 -5
- package/lib/cjs/components/table/Table.d.ts +0 -23
- package/lib/cjs/components/table/Table.form.d.ts +0 -3
- package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +0 -84
- package/lib/cjs/components/table/fixtures/comp1.d.ts +0 -53
- package/lib/cjs/components/table/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/tabs/Tabs.d.ts +0 -30
- package/lib/cjs/components/tabs/Tabs.form.d.ts +0 -3
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +0 -77
- package/lib/cjs/components/tabs/fixtures/comp1.d.ts +0 -23
- package/lib/cjs/components/tabs/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/tags/Tags.d.ts +0 -41
- package/lib/cjs/components/tags/Tags.form.d.ts +0 -3
- package/lib/cjs/components/tags/editForm/Tags.edit.data.d.ts +0 -51
- package/lib/cjs/components/tags/fixtures/comp1.d.ts +0 -20
- package/lib/cjs/components/tags/fixtures/comp2.d.ts +0 -10
- package/lib/cjs/components/tags/fixtures/comp3.d.ts +0 -23
- package/lib/cjs/components/tags/fixtures/comp4.d.ts +0 -9
- package/lib/cjs/components/tags/fixtures/comp5.d.ts +0 -24
- package/lib/cjs/components/tags/fixtures/comp6.d.ts +0 -17
- package/lib/cjs/components/tags/fixtures/index.d.ts +0 -7
- package/lib/cjs/components/tags/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/textarea/TextArea.d.ts +0 -37
- package/lib/cjs/components/textarea/TextArea.form.d.ts +0 -3
- package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +0 -355
- package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.d.ts +0 -10
- package/lib/cjs/components/textarea/fixtures/comp1.d.ts +0 -31
- package/lib/cjs/components/textarea/fixtures/comp2.d.ts +0 -29
- package/lib/cjs/components/textarea/fixtures/comp3.d.ts +0 -27
- package/lib/cjs/components/textarea/fixtures/comp4.d.ts +0 -30
- package/lib/cjs/components/textarea/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/textarea/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/textfield/TextField.d.ts +0 -60
- package/lib/cjs/components/textfield/TextField.form.d.ts +0 -3
- package/lib/cjs/components/textfield/editForm/TextField.edit.data.d.ts +0 -46
- package/lib/cjs/components/textfield/editForm/TextField.edit.display.d.ts +0 -248
- package/lib/cjs/components/textfield/editForm/TextField.edit.validation.d.ts +0 -10
- package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +0 -47
- package/lib/cjs/components/textfield/fixtures/comp1.d.ts +0 -33
- package/lib/cjs/components/textfield/fixtures/comp2.d.ts +0 -33
- package/lib/cjs/components/textfield/fixtures/comp3.d.ts +0 -33
- package/lib/cjs/components/textfield/fixtures/comp4.d.ts +0 -23
- package/lib/cjs/components/textfield/fixtures/comp5.d.ts +0 -12
- package/lib/cjs/components/textfield/fixtures/comp6.d.ts +0 -25
- package/lib/cjs/components/textfield/fixtures/comp7.d.ts +0 -37
- package/lib/cjs/components/textfield/fixtures/index.d.ts +0 -9
- package/lib/cjs/components/textfield/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/time/Time.d.ts +0 -27
- package/lib/cjs/components/time/Time.form.d.ts +0 -3
- package/lib/cjs/components/time/editForm/Time.edit.data.d.ts +0 -10
- package/lib/cjs/components/time/editForm/Time.edit.display.d.ts +0 -52
- package/lib/cjs/components/time/fixtures/comp1.d.ts +0 -24
- package/lib/cjs/components/time/fixtures/comp2.d.ts +0 -10
- package/lib/cjs/components/time/fixtures/comp3.d.ts +0 -15
- package/lib/cjs/components/time/fixtures/index.d.ts +0 -6
- package/lib/cjs/components/time/fixtures/timeForm.d.ts +0 -47
- package/lib/cjs/components/time/fixtures/timeForm2.d.ts +0 -38
- package/lib/cjs/components/time/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/unknown/Unknown.d.ts +0 -28
- package/lib/cjs/components/unknown/Unknown.form.d.ts +0 -34
- package/lib/cjs/components/unknown/editForm/Unknown.edit.display.d.ts +0 -24
- package/lib/cjs/components/unknown/fixtures/comp1.d.ts +0 -7
- package/lib/cjs/components/unknown/fixtures/index.d.ts +0 -2
- package/lib/cjs/components/url/Url.d.ts +0 -3
- package/lib/cjs/components/url/Url.form.d.ts +0 -3
- package/lib/cjs/components/url/editForm/Url.edit.data.d.ts +0 -5
- package/lib/cjs/components/url/editForm/Url.edit.display.d.ts +0 -5
- package/lib/cjs/components/url/editForm/Url.edit.validation.d.ts +0 -5
- package/lib/cjs/components/url/fixtures/comp1.d.ts +0 -26
- package/lib/cjs/components/url/fixtures/comp2.d.ts +0 -26
- package/lib/cjs/components/url/fixtures/index.d.ts +0 -3
- package/lib/cjs/components/url/fixtures/values.d.ts +0 -2
- package/lib/cjs/components/well/Well.d.ts +0 -15
- package/lib/cjs/components/well/Well.form.d.ts +0 -3
- package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +0 -28
- package/lib/cjs/components/well/fixtures/comp1.d.ts +0 -43
- package/lib/cjs/components/well/fixtures/index.d.ts +0 -2
- package/lib/cjs/displays/Displays.d.ts +0 -18
- package/lib/cjs/displays/index.d.ts +0 -2
- package/lib/cjs/formio.embed.d.ts +0 -2
- package/lib/cjs/formio.form.d.ts +0 -17
- package/lib/cjs/i18n.d.ts +0 -13
- package/lib/cjs/index.d.ts +0 -5
- package/lib/cjs/licenses/Licenses.d.ts +0 -7
- package/lib/cjs/licenses/index.d.ts +0 -2
- package/lib/cjs/pdf.image.d.ts +0 -2
- package/lib/cjs/providers/Providers.d.ts +0 -80
- package/lib/cjs/providers/address/AddressProvider.d.ts +0 -17
- package/lib/cjs/providers/address/AzureAddressProvider.d.ts +0 -12
- package/lib/cjs/providers/address/CustomAddressProvider.d.ts +0 -7
- package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +0 -18
- package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +0 -11
- package/lib/cjs/providers/address/index.d.ts +0 -6
- package/lib/cjs/providers/auth/index.d.ts +0 -2
- package/lib/cjs/providers/index.d.ts +0 -2
- package/lib/cjs/providers/processor/fileProcessor.d.ts +0 -2
- package/lib/cjs/providers/storage/azure.d.ts +0 -15
- package/lib/cjs/providers/storage/base64.d.ts +0 -10
- package/lib/cjs/providers/storage/dropbox.d.ts +0 -8
- package/lib/cjs/providers/storage/googleDrive.d.ts +0 -8
- package/lib/cjs/providers/storage/index.d.ts +0 -15
- package/lib/cjs/providers/storage/indexeddb.d.ts +0 -11
- package/lib/cjs/providers/storage/s3.d.ts +0 -17
- package/lib/cjs/providers/storage/uploadAdapter.d.ts +0 -1
- package/lib/cjs/providers/storage/url.d.ts +0 -11
- package/lib/cjs/providers/storage/xhr.d.ts +0 -7
- package/lib/cjs/templates/Templates.d.ts +0 -1
- package/lib/cjs/templates/index.d.ts +0 -229
- package/lib/cjs/translations/en.d.ts +0 -71
- package/lib/cjs/utils/ChoicesWrapper.d.ts +0 -38
- package/lib/cjs/utils/Evaluator.d.ts +0 -4
- package/lib/cjs/utils/builder.d.ts +0 -22
- package/lib/cjs/utils/calendarUtils.d.ts +0 -41
- package/lib/cjs/utils/conditionOperators/ConditionOperator.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/DateGreaterThan.d.ts +0 -13
- package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/DateLessThan.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/EndsWith.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/GreaterThan.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/Includes.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/IsDateEqual.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/IsEmptyValue.d.ts +0 -9
- package/lib/cjs/utils/conditionOperators/IsEqualTo.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/IsNotDateEqual.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/IsNotEqualTo.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/LessThan.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/LessThanOrEqual.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/NotIncludes.d.ts +0 -4
- package/lib/cjs/utils/conditionOperators/StartsWith.d.ts +0 -7
- package/lib/cjs/utils/conditionOperators/index.d.ts +0 -7
- package/lib/cjs/utils/formUtils.d.ts +0 -173
- package/lib/cjs/utils/i18n.d.ts +0 -16
- package/lib/cjs/utils/index.d.ts +0 -3
- package/lib/cjs/utils/jsonlogic/operators.d.ts +0 -1
- package/lib/cjs/utils/utils.d.ts +0 -375
- package/lib/cjs/widgets/CalendarWidget.d.ts +0 -97
- package/lib/cjs/widgets/InputWidget.d.ts +0 -24
- package/lib/cjs/widgets/index.d.ts +0 -7
- package/lib/mjs/CDN.d.ts +0 -29
- package/lib/mjs/Element.d.ts +0 -255
- package/lib/mjs/Embed.d.ts +0 -52
- package/lib/mjs/EventEmitter.d.ts +0 -7
- package/lib/mjs/Form.d.ts +0 -93
- package/lib/mjs/FormBuilder.d.ts +0 -6
- package/lib/mjs/Formio.d.ts +0 -1
- package/lib/mjs/PDF.d.ts +0 -40
- package/lib/mjs/PDFBuilder.d.ts +0 -55
- package/lib/mjs/Webform.d.ts +0 -402
- package/lib/mjs/WebformBuilder.d.ts +0 -126
- package/lib/mjs/Wizard.d.ts +0 -97
- package/lib/mjs/WizardBuilder.d.ts +0 -49
- package/lib/mjs/addons/FormioAddon.d.ts +0 -19
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +0 -716
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +0 -590
- package/lib/mjs/addons/index.d.ts +0 -626
- package/lib/mjs/builders/Builders.d.ts +0 -18
- package/lib/mjs/builders/index.d.ts +0 -2
- package/lib/mjs/components/Components.d.ts +0 -265
- package/lib/mjs/components/_classes/component/Component.d.ts +0 -828
- package/lib/mjs/components/_classes/component/Component.form.d.ts +0 -3
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +0 -653
- package/lib/mjs/components/_classes/component/editForm/Component.edit.api.d.ts +0 -42
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +0 -113
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -219
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.d.ts +0 -160
- package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.d.ts +0 -44
- package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.d.ts +0 -368
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +0 -140
- package/lib/mjs/components/_classes/component/editForm/utils.d.ts +0 -83
- package/lib/mjs/components/_classes/component/fixtures/comp1.d.ts +0 -33
- package/lib/mjs/components/_classes/component/fixtures/comp2.d.ts +0 -33
- package/lib/mjs/components/_classes/component/fixtures/comp3.d.ts +0 -14
- package/lib/mjs/components/_classes/component/fixtures/comp4.d.ts +0 -17
- package/lib/mjs/components/_classes/component/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/_classes/componentModal/ComponentModal.d.ts +0 -46
- package/lib/mjs/components/_classes/field/Field.d.ts +0 -5
- package/lib/mjs/components/_classes/input/Input.d.ts +0 -42
- package/lib/mjs/components/_classes/list/ListComponent.d.ts +0 -18
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +0 -3
- package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +0 -183
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +0 -29
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -150
- package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +0 -3
- package/lib/mjs/components/_classes/nested/fixtures/comp1.d.ts +0 -8
- package/lib/mjs/components/_classes/nested/fixtures/comp2.d.ts +0 -236
- package/lib/mjs/components/_classes/nested/fixtures/comp3.d.ts +0 -26
- package/lib/mjs/components/_classes/nested/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +0 -16
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -12
- package/lib/mjs/components/address/Address.d.ts +0 -66
- package/lib/mjs/components/address/Address.form.d.ts +0 -3
- package/lib/mjs/components/address/editForm/Address.edit.data.d.ts +0 -31
- package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +0 -49
- package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +0 -164
- package/lib/mjs/components/address/fixtures/comp1.d.ts +0 -34
- package/lib/mjs/components/address/fixtures/comp2.d.ts +0 -62
- package/lib/mjs/components/address/fixtures/comp3.d.ts +0 -44
- package/lib/mjs/components/address/fixtures/comp4.d.ts +0 -56
- package/lib/mjs/components/address/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/address/fixtures/values.d.ts +0 -22
- package/lib/mjs/components/alert/Alert.d.ts +0 -30
- package/lib/mjs/components/builder.d.ts +0 -2
- package/lib/mjs/components/button/Button.d.ts +0 -45
- package/lib/mjs/components/button/Button.form.d.ts +0 -3
- package/lib/mjs/components/button/editForm/Button.edit.display.d.ts +0 -360
- package/lib/mjs/components/button/fixtures/comp1.d.ts +0 -15
- package/lib/mjs/components/button/fixtures/comp2.d.ts +0 -25
- package/lib/mjs/components/button/fixtures/comp3.d.ts +0 -113
- package/lib/mjs/components/button/fixtures/index.d.ts +0 -4
- package/lib/mjs/components/button/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/checkbox/Checkbox.d.ts +0 -77
- package/lib/mjs/components/checkbox/Checkbox.form.d.ts +0 -3
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +0 -5
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +0 -75
- package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +0 -5
- package/lib/mjs/components/checkbox/fixtures/comp1.d.ts +0 -24
- package/lib/mjs/components/checkbox/fixtures/comp2.d.ts +0 -12
- package/lib/mjs/components/checkbox/fixtures/comp3.d.ts +0 -15
- package/lib/mjs/components/checkbox/fixtures/comp4.d.ts +0 -46
- package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.d.ts +0 -25
- package/lib/mjs/components/checkbox/fixtures/index.d.ts +0 -6
- package/lib/mjs/components/checkbox/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/columns/Columns.d.ts +0 -28
- package/lib/mjs/components/columns/Columns.form.d.ts +0 -3
- package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +0 -87
- package/lib/mjs/components/columns/fixtures/comp1.d.ts +0 -45
- package/lib/mjs/components/columns/fixtures/comp2.d.ts +0 -24
- package/lib/mjs/components/columns/fixtures/comp3.d.ts +0 -45
- package/lib/mjs/components/columns/fixtures/index.d.ts +0 -4
- package/lib/mjs/components/container/Container.d.ts +0 -16
- package/lib/mjs/components/container/Container.form.d.ts +0 -3
- package/lib/mjs/components/container/editForm/Container.edit.data.d.ts +0 -5
- package/lib/mjs/components/container/editForm/Container.edit.display.d.ts +0 -5
- package/lib/mjs/components/container/fixtures/comp1.d.ts +0 -49
- package/lib/mjs/components/container/fixtures/comp2.d.ts +0 -30
- package/lib/mjs/components/container/fixtures/comp3.d.ts +0 -77
- package/lib/mjs/components/container/fixtures/index.d.ts +0 -4
- package/lib/mjs/components/content/Content.d.ts +0 -18
- package/lib/mjs/components/content/Content.form.d.ts +0 -3
- package/lib/mjs/components/content/editForm/Content.edit.display.d.ts +0 -18
- package/lib/mjs/components/content/editForm/Content.edit.logic.d.ts +0 -48
- package/lib/mjs/components/content/fixtures/comp1.d.ts +0 -13
- package/lib/mjs/components/content/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/currency/Currency.d.ts +0 -8
- package/lib/mjs/components/currency/Currency.form.d.ts +0 -3
- package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +0 -29
- package/lib/mjs/components/currency/editForm/Currency.edit.display.d.ts +0 -18
- package/lib/mjs/components/currency/fixtures/comp1.d.ts +0 -31
- package/lib/mjs/components/currency/fixtures/comp2.d.ts +0 -20
- package/lib/mjs/components/currency/fixtures/comp3.d.ts +0 -13
- package/lib/mjs/components/currency/fixtures/comp4.d.ts +0 -17
- package/lib/mjs/components/currency/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/currency/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -80
- package/lib/mjs/components/datagrid/DataGrid.form.d.ts +0 -3
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +0 -5
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +0 -283
- package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +0 -20
- package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +0 -37
- package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
- package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +0 -63
- package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +0 -76
- package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +0 -197
- package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.d.ts +0 -61
- package/lib/mjs/components/datagrid/fixtures/comp-with-logic.d.ts +0 -165
- package/lib/mjs/components/datagrid/fixtures/comp1.d.ts +0 -93
- package/lib/mjs/components/datagrid/fixtures/comp2.d.ts +0 -18
- package/lib/mjs/components/datagrid/fixtures/comp3.d.ts +0 -14
- package/lib/mjs/components/datagrid/fixtures/comp4.d.ts +0 -27
- package/lib/mjs/components/datagrid/fixtures/comp5.d.ts +0 -67
- package/lib/mjs/components/datagrid/fixtures/comp6.d.ts +0 -567
- package/lib/mjs/components/datagrid/fixtures/comp7.d.ts +0 -28
- package/lib/mjs/components/datagrid/fixtures/comp8.d.ts +0 -35
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +0 -15
- package/lib/mjs/components/datamap/DataMap.d.ts +0 -36
- package/lib/mjs/components/datamap/DataMap.form.d.ts +0 -3
- package/lib/mjs/components/datamap/editForm/DataMap.edit.data.d.ts +0 -5
- package/lib/mjs/components/datamap/editForm/DataMap.edit.display.d.ts +0 -30
- package/lib/mjs/components/datamap/fixtures/comp1.d.ts +0 -18
- package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +0 -87
- package/lib/mjs/components/datamap/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/datetime/DateTime.d.ts +0 -39
- package/lib/mjs/components/datetime/DateTime.form.d.ts +0 -3
- package/lib/mjs/components/datetime/editForm/DateTime.edit.data.d.ts +0 -24
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +0 -61
- package/lib/mjs/components/datetime/editForm/DateTime.edit.display.d.ts +0 -128
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.d.ts +0 -9
- package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +0 -40
- package/lib/mjs/components/datetime/fixtures/comp1.d.ts +0 -45
- package/lib/mjs/components/datetime/fixtures/comp10.d.ts +0 -102
- package/lib/mjs/components/datetime/fixtures/comp11.d.ts +0 -58
- package/lib/mjs/components/datetime/fixtures/comp12.d.ts +0 -57
- package/lib/mjs/components/datetime/fixtures/comp2.d.ts +0 -42
- package/lib/mjs/components/datetime/fixtures/comp3.d.ts +0 -51
- package/lib/mjs/components/datetime/fixtures/comp5.d.ts +0 -57
- package/lib/mjs/components/datetime/fixtures/comp6.d.ts +0 -55
- package/lib/mjs/components/datetime/fixtures/comp7.d.ts +0 -59
- package/lib/mjs/components/datetime/fixtures/comp8.d.ts +0 -59
- package/lib/mjs/components/datetime/fixtures/comp9.d.ts +0 -64
- package/lib/mjs/components/datetime/fixtures/index.d.ts +0 -12
- package/lib/mjs/components/datetime/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/day/Day.d.ts +0 -163
- package/lib/mjs/components/day/Day.form.d.ts +0 -3
- package/lib/mjs/components/day/editForm/Day.edit.data.d.ts +0 -5
- package/lib/mjs/components/day/editForm/Day.edit.day.d.ts +0 -40
- package/lib/mjs/components/day/editForm/Day.edit.display.d.ts +0 -40
- package/lib/mjs/components/day/editForm/Day.edit.month.d.ts +0 -40
- package/lib/mjs/components/day/editForm/Day.edit.validation.d.ts +0 -29
- package/lib/mjs/components/day/editForm/Day.edit.year.d.ts +0 -40
- package/lib/mjs/components/day/fixtures/comp1.d.ts +0 -46
- package/lib/mjs/components/day/fixtures/comp2.d.ts +0 -46
- package/lib/mjs/components/day/fixtures/comp3.d.ts +0 -48
- package/lib/mjs/components/day/fixtures/comp4.d.ts +0 -53
- package/lib/mjs/components/day/fixtures/comp5.d.ts +0 -29
- package/lib/mjs/components/day/fixtures/comp6.d.ts +0 -81
- package/lib/mjs/components/day/fixtures/index.d.ts +0 -7
- package/lib/mjs/components/day/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/editgrid/EditGrid.d.ts +0 -103
- package/lib/mjs/components/editgrid/EditGrid.form.d.ts +0 -3
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +0 -18
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +0 -82
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +0 -58
- package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +0 -29
- package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +0 -34
- package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +0 -327
- package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +0 -77
- package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +0 -190
- package/lib/mjs/components/editgrid/fixtures/comp1.d.ts +0 -89
- package/lib/mjs/components/editgrid/fixtures/comp10.d.ts +0 -49
- package/lib/mjs/components/editgrid/fixtures/comp11.d.ts +0 -53
- package/lib/mjs/components/editgrid/fixtures/comp12.d.ts +0 -57
- package/lib/mjs/components/editgrid/fixtures/comp13.d.ts +0 -64
- package/lib/mjs/components/editgrid/fixtures/comp14.d.ts +0 -88
- package/lib/mjs/components/editgrid/fixtures/comp15.d.ts +0 -54
- package/lib/mjs/components/editgrid/fixtures/comp2.d.ts +0 -112
- package/lib/mjs/components/editgrid/fixtures/comp3.d.ts +0 -27
- package/lib/mjs/components/editgrid/fixtures/comp4.d.ts +0 -23
- package/lib/mjs/components/editgrid/fixtures/comp5.d.ts +0 -19
- package/lib/mjs/components/editgrid/fixtures/comp6.d.ts +0 -50
- package/lib/mjs/components/editgrid/fixtures/comp7.d.ts +0 -129
- package/lib/mjs/components/editgrid/fixtures/comp8.d.ts +0 -148
- package/lib/mjs/components/editgrid/fixtures/comp9.d.ts +0 -86
- package/lib/mjs/components/editgrid/fixtures/index.d.ts +0 -19
- package/lib/mjs/components/email/Email.d.ts +0 -4
- package/lib/mjs/components/email/Email.form.d.ts +0 -3
- package/lib/mjs/components/email/editForm/Email.edit.display.d.ts +0 -5
- package/lib/mjs/components/email/editForm/Email.edit.validation.d.ts +0 -24
- package/lib/mjs/components/email/fixtures/comp1.d.ts +0 -26
- package/lib/mjs/components/email/fixtures/comp2.d.ts +0 -23
- package/lib/mjs/components/email/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/email/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/fieldset/Fieldset.d.ts +0 -15
- package/lib/mjs/components/fieldset/Fieldset.form.d.ts +0 -3
- package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +0 -33
- package/lib/mjs/components/fieldset/fixtures/comp1.d.ts +0 -46
- package/lib/mjs/components/fieldset/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/file/File.d.ts +0 -81
- package/lib/mjs/components/file/File.form.d.ts +0 -3
- package/lib/mjs/components/file/editForm/File.edit.data.d.ts +0 -5
- package/lib/mjs/components/file/editForm/File.edit.display.d.ts +0 -5
- package/lib/mjs/components/file/editForm/File.edit.file.d.ts +0 -275
- package/lib/mjs/components/file/editForm/File.edit.validation.d.ts +0 -5
- package/lib/mjs/components/file/fixtures/comp1.d.ts +0 -15
- package/lib/mjs/components/file/fixtures/comp2.d.ts +0 -35
- package/lib/mjs/components/file/fixtures/comp3.d.ts +0 -29
- package/lib/mjs/components/file/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/file/fixtures/values.d.ts +0 -10
- package/lib/mjs/components/form/Form.d.ts +0 -94
- package/lib/mjs/components/form/Form.form.d.ts +0 -3
- package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +0 -82
- package/lib/mjs/components/form/editForm/Form.edit.display.d.ts +0 -5
- package/lib/mjs/components/form/editForm/Form.edit.form.d.ts +0 -89
- package/lib/mjs/components/form/fixtures/comp1.d.ts +0 -45
- package/lib/mjs/components/form/fixtures/comp2.d.ts +0 -14
- package/lib/mjs/components/form/fixtures/comp3.d.ts +0 -187
- package/lib/mjs/components/form/fixtures/comp4.d.ts +0 -107
- package/lib/mjs/components/form/fixtures/comp5.d.ts +0 -42
- package/lib/mjs/components/form/fixtures/comp6.d.ts +0 -74
- package/lib/mjs/components/form/fixtures/formModalEdit.d.ts +0 -42
- package/lib/mjs/components/form/fixtures/index.d.ts +0 -8
- package/lib/mjs/components/form/fixtures/values.d.ts +0 -6
- package/lib/mjs/components/hidden/Hidden.d.ts +0 -26
- package/lib/mjs/components/hidden/Hidden.form.d.ts +0 -3
- package/lib/mjs/components/hidden/editForm/Hidden.edit.data.d.ts +0 -5
- package/lib/mjs/components/hidden/editForm/Hidden.edit.display.d.ts +0 -5
- package/lib/mjs/components/hidden/fixtures/comp1.d.ts +0 -18
- package/lib/mjs/components/hidden/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/hidden/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/html/HTML.d.ts +0 -18
- package/lib/mjs/components/html/HTML.form.d.ts +0 -3
- package/lib/mjs/components/html/editForm/HTML.edit.display.d.ts +0 -77
- package/lib/mjs/components/html/editForm/HTML.edit.logic.d.ts +0 -48
- package/lib/mjs/components/html/fixtures/comp1.d.ts +0 -19
- package/lib/mjs/components/html/fixtures/comp2.d.ts +0 -21
- package/lib/mjs/components/html/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/index.d.ts +0 -98
- package/lib/mjs/components/number/Number.d.ts +0 -53
- package/lib/mjs/components/number/Number.form.d.ts +0 -3
- package/lib/mjs/components/number/editForm/Number.edit.data.d.ts +0 -18
- package/lib/mjs/components/number/editForm/Number.edit.display.d.ts +0 -5
- package/lib/mjs/components/number/editForm/Number.edit.validation.d.ts +0 -20
- package/lib/mjs/components/number/fixtures/comp1.d.ts +0 -33
- package/lib/mjs/components/number/fixtures/comp2.d.ts +0 -32
- package/lib/mjs/components/number/fixtures/comp3.d.ts +0 -14
- package/lib/mjs/components/number/fixtures/comp4.d.ts +0 -14
- package/lib/mjs/components/number/fixtures/comp5.d.ts +0 -20
- package/lib/mjs/components/number/fixtures/comp6.d.ts +0 -40
- package/lib/mjs/components/number/fixtures/comp7.d.ts +0 -15
- package/lib/mjs/components/number/fixtures/index.d.ts +0 -8
- package/lib/mjs/components/number/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/panel/Panel.d.ts +0 -14
- package/lib/mjs/components/panel/Panel.form.d.ts +0 -3
- package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +0 -75
- package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +0 -196
- package/lib/mjs/components/panel/fixtures/comp1.d.ts +0 -46
- package/lib/mjs/components/panel/fixtures/comp2.d.ts +0 -80
- package/lib/mjs/components/panel/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/password/Password.d.ts +0 -3
- package/lib/mjs/components/password/Password.form.d.ts +0 -3
- package/lib/mjs/components/password/editForm/Password.edit.data.d.ts +0 -18
- package/lib/mjs/components/password/editForm/Password.edit.display.d.ts +0 -5
- package/lib/mjs/components/password/editForm/Password.edit.validation.d.ts +0 -5
- package/lib/mjs/components/password/fixtures/comp1.d.ts +0 -22
- package/lib/mjs/components/password/fixtures/comp2.d.ts +0 -27
- package/lib/mjs/components/password/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/password/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/phonenumber/PhoneNumber.d.ts +0 -3
- package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +0 -3
- package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +0 -5
- package/lib/mjs/components/phonenumber/fixtures/comp1.d.ts +0 -27
- package/lib/mjs/components/phonenumber/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/phonenumber/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/radio/Radio.d.ts +0 -65
- package/lib/mjs/components/radio/Radio.form.d.ts +0 -3
- package/lib/mjs/components/radio/editForm/Radio.edit.data.d.ts +0 -134
- package/lib/mjs/components/radio/editForm/Radio.edit.display.d.ts +0 -40
- package/lib/mjs/components/radio/editForm/Radio.edit.validation.d.ts +0 -18
- package/lib/mjs/components/radio/fixtures/comp1.d.ts +0 -28
- package/lib/mjs/components/radio/fixtures/comp2.d.ts +0 -85
- package/lib/mjs/components/radio/fixtures/comp3.d.ts +0 -85
- package/lib/mjs/components/radio/fixtures/comp4.d.ts +0 -19
- package/lib/mjs/components/radio/fixtures/comp5.d.ts +0 -39
- package/lib/mjs/components/radio/fixtures/comp6.d.ts +0 -38
- package/lib/mjs/components/radio/fixtures/comp7.d.ts +0 -23
- package/lib/mjs/components/radio/fixtures/comp8.d.ts +0 -118
- package/lib/mjs/components/radio/fixtures/comp9.d.ts +0 -35
- package/lib/mjs/components/radio/fixtures/index.d.ts +0 -10
- package/lib/mjs/components/radio/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +0 -23
- package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +0 -3
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -44
- package/lib/mjs/components/recaptcha/fixtures/comp1.d.ts +0 -8
- package/lib/mjs/components/recaptcha/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/resource/Resource.d.ts +0 -10
- package/lib/mjs/components/resource/Resource.form.d.ts +0 -3
- package/lib/mjs/components/resource/editForm/Resource.edit.display.d.ts +0 -173
- package/lib/mjs/components/resource/fixtures/comp1.d.ts +0 -30
- package/lib/mjs/components/resource/fixtures/comp2.d.ts +0 -35
- package/lib/mjs/components/resource/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/select/Select.d.ts +0 -145
- package/lib/mjs/components/select/Select.form.d.ts +0 -3
- package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +0 -1039
- package/lib/mjs/components/select/editForm/Select.edit.display.d.ts +0 -27
- package/lib/mjs/components/select/editForm/Select.edit.validation.d.ts +0 -30
- package/lib/mjs/components/select/fixtures/comp1.d.ts +0 -40
- package/lib/mjs/components/select/fixtures/comp10.d.ts +0 -41
- package/lib/mjs/components/select/fixtures/comp11.d.ts +0 -28
- package/lib/mjs/components/select/fixtures/comp12.d.ts +0 -53
- package/lib/mjs/components/select/fixtures/comp13.d.ts +0 -28
- package/lib/mjs/components/select/fixtures/comp14.d.ts +0 -40
- package/lib/mjs/components/select/fixtures/comp15.d.ts +0 -50
- package/lib/mjs/components/select/fixtures/comp16.d.ts +0 -34
- package/lib/mjs/components/select/fixtures/comp17.d.ts +0 -51
- package/lib/mjs/components/select/fixtures/comp18.d.ts +0 -49
- package/lib/mjs/components/select/fixtures/comp19.d.ts +0 -23
- package/lib/mjs/components/select/fixtures/comp2.d.ts +0 -41
- package/lib/mjs/components/select/fixtures/comp3.d.ts +0 -35
- package/lib/mjs/components/select/fixtures/comp4.d.ts +0 -103
- package/lib/mjs/components/select/fixtures/comp5.d.ts +0 -21
- package/lib/mjs/components/select/fixtures/comp6.d.ts +0 -20
- package/lib/mjs/components/select/fixtures/comp7.d.ts +0 -63
- package/lib/mjs/components/select/fixtures/comp8.d.ts +0 -72
- package/lib/mjs/components/select/fixtures/comp9.d.ts +0 -88
- package/lib/mjs/components/select/fixtures/index.d.ts +0 -20
- package/lib/mjs/components/select/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -51
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +0 -3
- package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +0 -9
- package/lib/mjs/components/selectboxes/fixtures/comp1.d.ts +0 -24
- package/lib/mjs/components/selectboxes/fixtures/comp2.d.ts +0 -24
- package/lib/mjs/components/selectboxes/fixtures/comp3.d.ts +0 -23
- package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +0 -66
- package/lib/mjs/components/selectboxes/fixtures/comp5.d.ts +0 -37
- package/lib/mjs/components/selectboxes/fixtures/comp6.d.ts +0 -14
- package/lib/mjs/components/selectboxes/fixtures/comp7.d.ts +0 -18
- package/lib/mjs/components/selectboxes/fixtures/index.d.ts +0 -8
- package/lib/mjs/components/selectboxes/fixtures/values.d.ts +0 -6
- package/lib/mjs/components/signature/Signature.d.ts +0 -46
- package/lib/mjs/components/signature/Signature.form.d.ts +0 -3
- package/lib/mjs/components/signature/editForm/Signature.edit.data.d.ts +0 -5
- package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -51
- package/lib/mjs/components/signature/editForm/Signature.edit.validation.d.ts +0 -5
- package/lib/mjs/components/signature/fixtures/comp1.d.ts +0 -30
- package/lib/mjs/components/signature/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/signature/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/survey/Survey.d.ts +0 -37
- package/lib/mjs/components/survey/Survey.form.d.ts +0 -3
- package/lib/mjs/components/survey/editForm/Survey.edit.data.d.ts +0 -44
- package/lib/mjs/components/survey/editForm/Survey.edit.display.d.ts +0 -5
- package/lib/mjs/components/survey/editForm/Survey.edit.validation.d.ts +0 -5
- package/lib/mjs/components/survey/fixtures/comp1.d.ts +0 -31
- package/lib/mjs/components/survey/fixtures/comp2.d.ts +0 -31
- package/lib/mjs/components/survey/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/survey/fixtures/values.d.ts +0 -5
- package/lib/mjs/components/table/Table.d.ts +0 -23
- package/lib/mjs/components/table/Table.form.d.ts +0 -3
- package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +0 -84
- package/lib/mjs/components/table/fixtures/comp1.d.ts +0 -53
- package/lib/mjs/components/table/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/tabs/Tabs.d.ts +0 -30
- package/lib/mjs/components/tabs/Tabs.form.d.ts +0 -3
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +0 -77
- package/lib/mjs/components/tabs/fixtures/comp1.d.ts +0 -23
- package/lib/mjs/components/tabs/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/tags/Tags.d.ts +0 -41
- package/lib/mjs/components/tags/Tags.form.d.ts +0 -3
- package/lib/mjs/components/tags/editForm/Tags.edit.data.d.ts +0 -51
- package/lib/mjs/components/tags/fixtures/comp1.d.ts +0 -20
- package/lib/mjs/components/tags/fixtures/comp2.d.ts +0 -10
- package/lib/mjs/components/tags/fixtures/comp3.d.ts +0 -23
- package/lib/mjs/components/tags/fixtures/comp4.d.ts +0 -9
- package/lib/mjs/components/tags/fixtures/comp5.d.ts +0 -24
- package/lib/mjs/components/tags/fixtures/comp6.d.ts +0 -17
- package/lib/mjs/components/tags/fixtures/index.d.ts +0 -7
- package/lib/mjs/components/tags/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/textarea/TextArea.d.ts +0 -37
- package/lib/mjs/components/textarea/TextArea.form.d.ts +0 -3
- package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +0 -355
- package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.d.ts +0 -10
- package/lib/mjs/components/textarea/fixtures/comp1.d.ts +0 -31
- package/lib/mjs/components/textarea/fixtures/comp2.d.ts +0 -29
- package/lib/mjs/components/textarea/fixtures/comp3.d.ts +0 -27
- package/lib/mjs/components/textarea/fixtures/comp4.d.ts +0 -30
- package/lib/mjs/components/textarea/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/textarea/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/textfield/TextField.d.ts +0 -60
- package/lib/mjs/components/textfield/TextField.form.d.ts +0 -3
- package/lib/mjs/components/textfield/editForm/TextField.edit.data.d.ts +0 -46
- package/lib/mjs/components/textfield/editForm/TextField.edit.display.d.ts +0 -248
- package/lib/mjs/components/textfield/editForm/TextField.edit.validation.d.ts +0 -10
- package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +0 -47
- package/lib/mjs/components/textfield/fixtures/comp1.d.ts +0 -33
- package/lib/mjs/components/textfield/fixtures/comp2.d.ts +0 -33
- package/lib/mjs/components/textfield/fixtures/comp3.d.ts +0 -33
- package/lib/mjs/components/textfield/fixtures/comp4.d.ts +0 -23
- package/lib/mjs/components/textfield/fixtures/comp5.d.ts +0 -12
- package/lib/mjs/components/textfield/fixtures/comp6.d.ts +0 -25
- package/lib/mjs/components/textfield/fixtures/comp7.d.ts +0 -37
- package/lib/mjs/components/textfield/fixtures/index.d.ts +0 -9
- package/lib/mjs/components/textfield/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/time/Time.d.ts +0 -27
- package/lib/mjs/components/time/Time.form.d.ts +0 -3
- package/lib/mjs/components/time/editForm/Time.edit.data.d.ts +0 -10
- package/lib/mjs/components/time/editForm/Time.edit.display.d.ts +0 -52
- package/lib/mjs/components/time/fixtures/comp1.d.ts +0 -24
- package/lib/mjs/components/time/fixtures/comp2.d.ts +0 -10
- package/lib/mjs/components/time/fixtures/comp3.d.ts +0 -15
- package/lib/mjs/components/time/fixtures/index.d.ts +0 -6
- package/lib/mjs/components/time/fixtures/timeForm.d.ts +0 -47
- package/lib/mjs/components/time/fixtures/timeForm2.d.ts +0 -38
- package/lib/mjs/components/time/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/unknown/Unknown.d.ts +0 -28
- package/lib/mjs/components/unknown/Unknown.form.d.ts +0 -34
- package/lib/mjs/components/unknown/editForm/Unknown.edit.display.d.ts +0 -24
- package/lib/mjs/components/unknown/fixtures/comp1.d.ts +0 -7
- package/lib/mjs/components/unknown/fixtures/index.d.ts +0 -2
- package/lib/mjs/components/url/Url.d.ts +0 -3
- package/lib/mjs/components/url/Url.form.d.ts +0 -3
- package/lib/mjs/components/url/editForm/Url.edit.data.d.ts +0 -5
- package/lib/mjs/components/url/editForm/Url.edit.display.d.ts +0 -5
- package/lib/mjs/components/url/editForm/Url.edit.validation.d.ts +0 -5
- package/lib/mjs/components/url/fixtures/comp1.d.ts +0 -26
- package/lib/mjs/components/url/fixtures/comp2.d.ts +0 -26
- package/lib/mjs/components/url/fixtures/index.d.ts +0 -3
- package/lib/mjs/components/url/fixtures/values.d.ts +0 -2
- package/lib/mjs/components/well/Well.d.ts +0 -15
- package/lib/mjs/components/well/Well.form.d.ts +0 -3
- package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +0 -28
- package/lib/mjs/components/well/fixtures/comp1.d.ts +0 -43
- package/lib/mjs/components/well/fixtures/index.d.ts +0 -2
- package/lib/mjs/displays/Displays.d.ts +0 -18
- package/lib/mjs/displays/index.d.ts +0 -2
- package/lib/mjs/formio.embed.d.ts +0 -2
- package/lib/mjs/formio.form.d.ts +0 -17
- package/lib/mjs/i18n.d.ts +0 -13
- package/lib/mjs/index.d.ts +0 -5
- package/lib/mjs/licenses/Licenses.d.ts +0 -7
- package/lib/mjs/licenses/index.d.ts +0 -2
- package/lib/mjs/pdf.image.d.ts +0 -2
- package/lib/mjs/providers/Providers.d.ts +0 -80
- package/lib/mjs/providers/address/AddressProvider.d.ts +0 -17
- package/lib/mjs/providers/address/AzureAddressProvider.d.ts +0 -12
- package/lib/mjs/providers/address/CustomAddressProvider.d.ts +0 -7
- package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +0 -18
- package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +0 -11
- package/lib/mjs/providers/address/index.d.ts +0 -6
- package/lib/mjs/providers/auth/index.d.ts +0 -2
- package/lib/mjs/providers/index.d.ts +0 -2
- package/lib/mjs/providers/processor/fileProcessor.d.ts +0 -2
- package/lib/mjs/providers/storage/azure.d.ts +0 -15
- package/lib/mjs/providers/storage/base64.d.ts +0 -10
- package/lib/mjs/providers/storage/dropbox.d.ts +0 -8
- package/lib/mjs/providers/storage/googleDrive.d.ts +0 -8
- package/lib/mjs/providers/storage/index.d.ts +0 -15
- package/lib/mjs/providers/storage/indexeddb.d.ts +0 -11
- package/lib/mjs/providers/storage/s3.d.ts +0 -17
- package/lib/mjs/providers/storage/uploadAdapter.d.ts +0 -1
- package/lib/mjs/providers/storage/url.d.ts +0 -11
- package/lib/mjs/providers/storage/xhr.d.ts +0 -7
- package/lib/mjs/templates/Templates.d.ts +0 -1
- package/lib/mjs/templates/index.d.ts +0 -229
- package/lib/mjs/translations/en.d.ts +0 -71
- package/lib/mjs/utils/ChoicesWrapper.d.ts +0 -38
- package/lib/mjs/utils/Evaluator.d.ts +0 -4
- package/lib/mjs/utils/builder.d.ts +0 -22
- package/lib/mjs/utils/calendarUtils.d.ts +0 -41
- package/lib/mjs/utils/conditionOperators/ConditionOperator.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/DateGreaterThan.d.ts +0 -13
- package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/DateLessThan.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/EndsWith.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/GreaterThan.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/Includes.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/IsDateEqual.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/IsEmptyValue.d.ts +0 -9
- package/lib/mjs/utils/conditionOperators/IsEqualTo.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/IsNotDateEqual.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/IsNotEqualTo.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/LessThan.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/LessThanOrEqual.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/NotIncludes.d.ts +0 -4
- package/lib/mjs/utils/conditionOperators/StartsWith.d.ts +0 -7
- package/lib/mjs/utils/conditionOperators/index.d.ts +0 -7
- package/lib/mjs/utils/formUtils.d.ts +0 -173
- package/lib/mjs/utils/i18n.d.ts +0 -16
- package/lib/mjs/utils/index.d.ts +0 -3
- package/lib/mjs/utils/jsonlogic/operators.d.ts +0 -1
- package/lib/mjs/utils/utils.d.ts +0 -375
- package/lib/mjs/widgets/CalendarWidget.d.ts +0 -97
- package/lib/mjs/widgets/InputWidget.d.ts +0 -24
- package/lib/mjs/widgets/index.d.ts +0 -7
package/dist/formio.utils.js
CHANGED
@@ -37,7 +37,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
37
37
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
38
38
|
|
39
39
|
"use strict";
|
40
|
-
eval("\
|
40
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Evaluator = exports.BaseEvaluator = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n// BaseEvaluator is for extending.\nclass BaseEvaluator {\n static evaluator(func, ...params) {\n if (Evaluator.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return lodash_1.noop;\n }\n if (typeof func === 'function') {\n return func;\n }\n if (typeof params[0] === 'object') {\n params = (0, lodash_1.keys)(params[0]);\n }\n return new Function(...params, func);\n }\n ;\n static interpolateString(rawTemplate, data, options = {}) {\n return rawTemplate.replace(/({{\\s*(.*?)\\s*}})/g, (match, $1, $2) => {\n // If this is a function call and we allow evals.\n if ($2.indexOf('(') !== -1) {\n return $2.replace(/([^\\(]+)\\(([^\\)]+)\\s*\\);?/, (evalMatch, funcName, args) => {\n funcName = (0, lodash_1.trim)(funcName);\n const func = (0, lodash_1.get)(data, funcName);\n if (func) {\n if (args) {\n args = args.split(',').map((arg) => {\n arg = (0, lodash_1.trim)(arg);\n if ((arg.indexOf('\"') === 0) || (arg.indexOf(\"'\") === 0)) {\n return arg.substring(1, arg.length - 1);\n }\n return (0, lodash_1.get)(data, arg);\n });\n }\n return Evaluator.evaluate(func, args, '', false, data, options);\n }\n return '';\n });\n }\n else {\n let dataPath = $2;\n if ($2.indexOf('?') !== -1) {\n dataPath = $2.replace(/\\?\\./g, '.');\n }\n // Allow for conditional values.\n const parts = dataPath.split('||').map((item) => item.trim());\n let value = '';\n let path = '';\n for (let i = 0; i < parts.length; i++) {\n path = parts[i];\n value = (0, lodash_1.get)(data, path);\n if (value) {\n break;\n }\n }\n if (options.data) {\n (0, lodash_1.set)(options.data, path, value);\n }\n return value;\n }\n });\n }\n static interpolate(rawTemplate, data, options = {}) {\n if (typeof rawTemplate === 'function') {\n try {\n return rawTemplate(data);\n }\n catch (err) {\n console.warn('Error interpolating template', err, data);\n return err.message;\n }\n }\n return Evaluator.interpolateString(String(rawTemplate), data, options);\n }\n ;\n /**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\n static evaluate(func, args = {}, ret = '', interpolate = false, context = {}, options = {}) {\n let returnVal = null;\n options = (0, lodash_1.isObject)(options) ? options : { noeval: options };\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = (0, lodash_1.get)(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (interpolate) {\n func = BaseEvaluator.interpolate(func, args, options);\n }\n try {\n if (Evaluator.noeval || options.noeval) {\n func = lodash_1.noop;\n }\n else {\n func = Evaluator.evaluator(func, args, context);\n }\n args = (0, lodash_1.values)(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator.execute(func, args, context, options);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n }\n /**\n * Execute a function.\n *\n * @param func\n * @param args\n * @returns\n */\n static execute(func, args, context = {}, options = {}) {\n options = (0, lodash_1.isObject)(options) ? options : { noeval: options };\n if (Evaluator.noeval || options.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return;\n }\n return Array.isArray(args) ? func.apply(context, args) : func.call(context, args);\n }\n ;\n}\nexports.BaseEvaluator = BaseEvaluator;\nBaseEvaluator.templateSettings = {\n interpolate: /{{([\\s\\S]+?)}}/g,\n evaluate: /\\{%([\\s\\S]+?)%\\}/g,\n escape: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g\n};\nBaseEvaluator.noeval = false;\n// The extendable evaluator\nclass Evaluator extends BaseEvaluator {\n /**\n * Allow external modules the ability to extend the Evaluator.\n * @param evaluator\n */\n static registerEvaluator(evaluator) {\n Object.keys(evaluator).forEach((key) => {\n Evaluator[key] = evaluator[key];\n });\n }\n}\nexports.Evaluator = Evaluator;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/Evaluator.js?");
|
41
41
|
|
42
42
|
/***/ }),
|
43
43
|
|
@@ -48,7 +48,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
|
|
48
48
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
49
49
|
|
50
50
|
"use strict";
|
51
|
-
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.dayjs = exports.isPartialDay = exports.getDateValidationFormat = exports.getDateSetting = exports.formatDate = exports.momentDate = exports.convertFormatToMoment = exports.currentTimezone = void 0;\nconst dayjs_1 = __importDefault(__webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\"));\nexports.dayjs = dayjs_1.default;\nconst timezone_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\"));\nconst utc_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\"));\nconst customParseFormat_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/customParseFormat */ \"./node_modules/dayjs/plugin/customParseFormat.js\"));\nconst lodash_1 = __webpack_require__(/*!
|
51
|
+
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.dayjs = exports.isPartialDay = exports.getDateValidationFormat = exports.getDateSetting = exports.formatDate = exports.momentDate = exports.convertFormatToMoment = exports.currentTimezone = void 0;\nconst dayjs_1 = __importDefault(__webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\"));\nexports.dayjs = dayjs_1.default;\nconst timezone_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\"));\nconst utc_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\"));\nconst customParseFormat_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/customParseFormat */ \"./node_modules/dayjs/plugin/customParseFormat.js\"));\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./node_modules/@formio/core/lib/utils/Evaluator.js\");\ndayjs_1.default.extend(utc_1.default);\ndayjs_1.default.extend(timezone_1.default);\ndayjs_1.default.extend(customParseFormat_1.default);\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n return dayjs_1.default.tz.guess();\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return dayjs_1.default.utc();\n }\n if (timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return `${dayjs_1.default.utc().format(convertFormatToMoment(format))} UTC`;\n }\n if (timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n return momentDate.format(convertFormatToMoment(format));\n}\nexports.formatDate = formatDate;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if ((0, lodash_1.isNil)(date) || (0, lodash_1.isNaN)(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, dayjs_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.Evaluator.evaluator(`return ${date};`, 'moment')(dayjs_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, dayjs_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, dayjs_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, dayjs_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nconst getDateValidationFormat = (component) => {\n return component.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';\n};\nexports.getDateValidationFormat = getDateValidationFormat;\nconst isPartialDay = (component, value) => {\n if (!value) {\n return false;\n }\n const [DAY, MONTH, YEAR] = component.dayFirst ? [0, 1, 2] : [1, 0, 2];\n const values = value.split('/');\n return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';\n};\nexports.isPartialDay = isPartialDay;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/date.js?");
|
52
52
|
|
53
53
|
/***/ }),
|
54
54
|
|
@@ -63,6 +63,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
63
63
|
|
64
64
|
/***/ }),
|
65
65
|
|
66
|
+
/***/ "./node_modules/@formio/core/lib/utils/fastCloneDeep.js":
|
67
|
+
/*!**************************************************************!*\
|
68
|
+
!*** ./node_modules/@formio/core/lib/utils/fastCloneDeep.js ***!
|
69
|
+
\**************************************************************/
|
70
|
+
/***/ (function(__unused_webpack_module, exports) {
|
71
|
+
|
72
|
+
"use strict";
|
73
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.fastCloneDeep = void 0;\n/**\n * Performs a fast clone deep operation.\n *\n * @param obj\n */\nfunction fastCloneDeep(obj) {\n try {\n return JSON.parse(JSON.stringify(obj));\n }\n catch (err) {\n console.log(`Clone Failed: ${err.message}`);\n return null;\n }\n}\nexports.fastCloneDeep = fastCloneDeep;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/fastCloneDeep.js?");
|
74
|
+
|
75
|
+
/***/ }),
|
76
|
+
|
66
77
|
/***/ "./node_modules/@formio/core/lib/utils/formUtil.js":
|
67
78
|
/*!*********************************************************!*\
|
68
79
|
!*** ./node_modules/@formio/core/lib/utils/formUtil.js ***!
|
@@ -92,7 +103,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
|
|
92
103
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
93
104
|
|
94
105
|
"use strict";
|
95
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.matchInputMask = exports.getInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*!
|
106
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.matchInputMask = exports.getInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i];\n const charPart = inputMask[i];\n if (!((0, lodash_1.isRegExp)(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/mask.js?");
|
96
107
|
|
97
108
|
/***/ }),
|
98
109
|
|
@@ -125,7 +136,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
|
|
125
136
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
126
137
|
|
127
138
|
"use strict";
|
128
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.unwind = exports.rewind = exports.mergeArray = exports.mergeObject = void 0;\nconst lodash_1 = __webpack_require__(/*!
|
139
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.unwind = exports.rewind = exports.mergeArray = exports.mergeObject = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nconst fastCloneDeep_1 = __webpack_require__(/*! ./fastCloneDeep */ \"./node_modules/@formio/core/lib/utils/fastCloneDeep.js\");\nconst formUtil_1 = __webpack_require__(/*! ./formUtil */ \"./node_modules/@formio/core/lib/utils/formUtil.js\");\nfunction mergeObject(src, dst) {\n (0, lodash_1.each)(src, function (value, key) {\n if (!Array.isArray(value)) {\n dst[key] = value;\n }\n else {\n if (!dst[key]) {\n dst[key] = [];\n }\n mergeArray(value, dst[key]);\n }\n });\n}\nexports.mergeObject = mergeObject;\nfunction mergeArray(src, dst) {\n src.forEach(function (value) {\n var query = {};\n (0, lodash_1.each)(value, function (subValue, key) {\n if (!Array.isArray(subValue)) {\n query[key] = subValue;\n }\n });\n var dstValue = (0, lodash_1.find)(dst, query);\n if (dstValue) {\n mergeObject(value, dstValue);\n }\n else {\n dst.push(value);\n }\n });\n}\nexports.mergeArray = mergeArray;\nfunction rewind(submissions) {\n var submission = { data: {} };\n if (submissions && submissions.length) {\n submissions.forEach((sub) => mergeObject(sub.data, submission.data));\n }\n return submission;\n}\nexports.rewind = rewind;\nfunction unwind(form, submission) {\n var dataPaths = {};\n var locked = {};\n var submissions = [(0, fastCloneDeep_1.fastCloneDeep)(submission)];\n // Set the data value for a data path.\n /* eslint-disable no-use-before-define */\n var setDataValue = function (dataPath, values, parent, offset, current) {\n offset = offset || 0;\n current = current || 0;\n // Make sure we don't overwrite any locked values.\n while ((0, lodash_1.has)(locked, \"[\" + current + \"].\" + parent)) {\n if ((current + 1) >= submissions.length) {\n submissions.push((0, fastCloneDeep_1.fastCloneDeep)(submissions[current]));\n }\n current++;\n }\n // Ensure that all parents have been copied over to this path.\n /* eslint-disable no-useless-escape */\n var parentPath = parent.replace(/\\.[^\\.]+$/, '');\n if (!(0, lodash_1.has)(submissions[current].data, parentPath) &&\n submissions[current - 1] &&\n (0, lodash_1.has)(submissions[(current - 1)].data, parentPath)) {\n (0, lodash_1.set)(submissions[current].data, parentPath, (0, fastCloneDeep_1.fastCloneDeep)((0, lodash_1.get)(submissions[(current - 1)].data, parentPath)));\n }\n /* eslint-enable no-useless-escape */\n var pathValue = [];\n (0, lodash_1.set)(submissions[current].data, parent, pathValue);\n (0, lodash_1.set)(locked, \"[\" + current + \"].\" + parent, true);\n for (var i = offset; i < values.length; i++) {\n if ((i - offset) <= dataPath.max) {\n pathValue.push(values[i]);\n if (dataPath.paths && Object.keys(dataPath.paths).length) {\n addData(dataPath.paths, values[i], parent + \"[\" + (i - offset) + \"]\", current);\n }\n }\n else {\n setDataValue(dataPath, values, parent, i, current);\n break;\n }\n }\n };\n /* eslint-enable no-use-before-define */\n // Add data to a series of data paths.\n var addData = function (dataPaths, data, parent, current) {\n for (var path in dataPaths) {\n var dataPath = dataPaths[path];\n if (data[path] && Array.isArray(data[path])) {\n setDataValue(dataPath, data[path], (parent ? parent + \".\" + path : path), 0, current);\n }\n }\n };\n var addDataPaths = function (dataPath, paths, index, parentDataPath) {\n index = index || 0;\n var path = paths[index];\n /* eslint-disable no-useless-escape */\n var matches = path.match(/([^\\[]+)\\[?([0-9]+)?\\]?/);\n /* eslint-enable no-useless-escape */\n if (matches && (matches.length === 3)) {\n var dataParam = matches[1];\n var dataIndex = parseInt(matches[2], 10) || 0;\n if (dataPath[dataParam]) {\n if (dataIndex > dataPath[dataParam].max) {\n dataPath[dataParam].max = dataIndex;\n }\n }\n else {\n dataPath[dataParam] = {\n max: dataIndex,\n param: dataParam,\n parent: parentDataPath || null,\n paths: {}\n };\n }\n if ((index + 1) < paths.length) {\n addDataPaths(dataPath[dataParam].paths, paths, (index + 1), dataPath[dataParam]);\n }\n }\n };\n // Iterate through all components.\n (0, formUtil_1.eachComponent)(form.components, function (component, path) {\n var _a;\n if (component.type === 'form' && ((_a = component.components) === null || _a === void 0 ? void 0 : _a.length)) {\n (0, formUtil_1.eachComponent)(component.components, (comp) => {\n comp.isInsideNestedForm = true;\n });\n }\n if (!component.overlay || (!component.overlay.width && !component.overlay.height)) {\n return;\n }\n var hasDataPath = component.properties && component.properties.dataPath;\n var key = component.key;\n if (hasDataPath) {\n path = component.properties.dataPath;\n key = component.properties.dataPath;\n }\n /* eslint-disable no-useless-escape */\n var paths = (0, lodash_1.filter)(path.replace(new RegExp(\".?\" + component.key + \"$\"), '').split('.'));\n /* eslint-enable no-useless-escape */\n if (!hasDataPath && paths.length && !component.isInsideNestedForm) {\n key = paths.map(function (subpath) { return subpath + \"[0]\"; }).join('.') + \".\" + component.key;\n }\n if (component.multiple) {\n paths.push(component.key);\n }\n component.key = key;\n if (paths && paths.length) {\n addDataPaths(dataPaths, paths);\n }\n }, true);\n addData(dataPaths, submission.data);\n return submissions;\n}\nexports.unwind = unwind;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/unwind.js?");
|
129
140
|
|
130
141
|
/***/ }),
|
131
142
|
|
@@ -136,84 +147,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
136
147
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
137
148
|
|
138
149
|
"use strict";
|
139
|
-
eval("\
|
140
|
-
|
141
|
-
/***/ }),
|
142
|
-
|
143
|
-
/***/ "./node_modules/@formio/lodash/lib/array.js":
|
144
|
-
/*!**************************************************!*\
|
145
|
-
!*** ./node_modules/@formio/lodash/lib/array.js ***!
|
146
|
-
\**************************************************/
|
147
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
148
|
-
|
149
|
-
"use strict";
|
150
|
-
eval("\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.intersection = exports.map = exports.head = exports.last = exports.filter = exports.findEach = exports.matches = exports.findIndex = exports.find = exports.each = exports.dropRight = exports.drop = exports.difference = exports.concat = exports.compact = exports.chunk = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"./node_modules/@formio/lodash/lib/lang.js\");\nvar object_1 = __webpack_require__(/*! ./object */ \"./node_modules/@formio/lodash/lib/object.js\");\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_chunk\nfunction chunk(input, size) {\n return input.reduce(function (arr, item, idx) {\n return idx % size === 0\n ? __spreadArray(__spreadArray([], arr, true), [[item]], false) : __spreadArray(__spreadArray([], arr.slice(0, -1), true), [__spreadArray(__spreadArray([], arr.slice(-1)[0], true), [item], false)], false);\n }, []);\n}\nexports.chunk = chunk;\n;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_compact\nfunction compact(input) {\n return input.filter(Boolean);\n}\nexports.compact = compact;\n/**\n * @link https://lodash.com/docs/4.17.15#concat\n * @param input\n * @param args\n * @returns\n */\nfunction concat(input) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return input.concat.apply(input, args);\n}\nexports.concat = concat;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_difference\nfunction difference() {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n return arrays.reduce(function (a, b) {\n return a.filter(function (value) {\n return !b.includes(value);\n });\n });\n}\nexports.difference = difference;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_drop\nfunction drop(arr, index) {\n if (index === void 0) { index = 1; }\n return (index > 0) ? arr.slice(index) : arr;\n}\nexports.drop = drop;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_dropright\nfunction dropRight(arr, index) {\n if (index === void 0) { index = 1; }\n return (index > 0) ? arr.slice(0, -index) : arr;\n}\nexports.dropRight = dropRight;\n/**\n * Iterate through a collection or array.\n * @param collection\n * @param _each\n */\nfunction each(collection, _each) {\n var isArray = Array.isArray(collection);\n for (var i in collection) {\n if (collection.hasOwnProperty(i)) {\n if (_each(collection[i], isArray ? Number(i) : i) === true) {\n break;\n }\n ;\n }\n }\n}\nexports.each = each;\n/**\n * Perform a find operation.\n * @param arr\n * @param query\n */\nfunction find(arr, query, findIndex) {\n if (findIndex === void 0) { findIndex = false; }\n if (!arr) {\n return undefined;\n }\n if (Array.isArray(arr) && typeof query === 'function') {\n return findIndex ? arr.findIndex(query) : arr.find(query);\n }\n var found = undefined;\n var foundIndex = 0;\n findEach(arr, query, function (item, index) {\n found = item;\n foundIndex = index;\n return true;\n });\n return findIndex ? foundIndex : found;\n}\nexports.find = find;\n/**\n * Find an index.\n *\n * @param arr\n * @param query\n * @returns\n */\nfunction findIndex(arr, query) {\n return find(arr, query, true);\n}\nexports.findIndex = findIndex;\n/**\n * Returns a function to perform matches.\n * @param query\n * @returns\n */\nfunction matches(query) {\n var keys = [];\n var compare = {};\n if (typeof query === 'string') {\n keys = [query];\n compare[query] = true;\n }\n else {\n keys = Object.keys(query);\n compare = query;\n }\n return function (comp) {\n return (0, lang_1.isEqual)((0, object_1.pick)(comp, keys), compare);\n };\n}\nexports.matches = matches;\n/**\n * Perform a find operation on each item in an array.\n * @param arr\n * @param query\n * @param fn\n */\nfunction findEach(arr, query, fn) {\n each(arr, function (item, index) {\n if (matches(query)(item)) {\n if (fn(item, index) === true) {\n return true;\n }\n }\n });\n}\nexports.findEach = findEach;\n/**\n * Perform a filter operation.\n * @param arr\n * @param fn\n */\nfunction filter(arr, fn) {\n if (!arr) {\n return [];\n }\n if (!fn) {\n fn = function (val) { return !!val; };\n }\n if (Array.isArray(arr) && typeof fn === 'function') {\n return arr.filter(fn);\n }\n var found = [];\n findEach(arr, fn, function (item, index) {\n found.push(item);\n if (Array.isArray(item)) {\n arr.splice(index, 1);\n }\n else {\n delete arr[index];\n }\n });\n return found;\n}\nexports.filter = filter;\n/**\n * Get the last item in an array.\n * @param arr\n */\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexports.last = last;\n/**\n * https://lodash.com/docs/4.17.15#head\n * @param arr\n * @returns\n */\nfunction head(arr) {\n return arr[0];\n}\nexports.head = head;\n/**\n * https://lodash.com/docs/4.17.15#map\n * @param arr\n * @param fn\n * @returns\n */\nfunction map(arr, fn) {\n return arr.map(fn);\n}\nexports.map = map;\n/**\n * Get the intersection of two objects.\n * @param a\n * @param b\n */\nfunction intersection(a, b) {\n return a.filter(function (value) { return b.includes(value); });\n}\nexports.intersection = intersection;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/array.js?");
|
151
|
-
|
152
|
-
/***/ }),
|
153
|
-
|
154
|
-
/***/ "./node_modules/@formio/lodash/lib/function.js":
|
155
|
-
/*!*****************************************************!*\
|
156
|
-
!*** ./node_modules/@formio/lodash/lib/function.js ***!
|
157
|
-
\*****************************************************/
|
158
|
-
/***/ (function(__unused_webpack_module, exports) {
|
159
|
-
|
160
|
-
"use strict";
|
161
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.debounce = void 0;\n/**\n * Debounc the call of a function for a given amount of time.\n *\n * @param func\n * @param wait\n * @returns\n */\nfunction debounce(func, wait) {\n if (wait === void 0) { wait = 100; }\n var timeout;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n timeout = null;\n func.apply(void 0, args);\n }, wait);\n };\n}\nexports.debounce = debounce;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/function.js?");
|
162
|
-
|
163
|
-
/***/ }),
|
164
|
-
|
165
|
-
/***/ "./node_modules/@formio/lodash/lib/index.js":
|
166
|
-
/*!**************************************************!*\
|
167
|
-
!*** ./node_modules/@formio/lodash/lib/index.js ***!
|
168
|
-
\**************************************************/
|
169
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
170
|
-
|
171
|
-
"use strict";
|
172
|
-
eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.chain = void 0;\nvar ArrayFunctions = __importStar(__webpack_require__(/*! ./array */ \"./node_modules/@formio/lodash/lib/array.js\"));\nvar Chainable = /** @class */ (function () {\n function Chainable(val) {\n this.chain = [];\n this.currentValue = [];\n this.currentValue = val;\n }\n Chainable.prototype.value = function () {\n return this.chain.reduce(function (current, func) {\n var _a;\n return (_a = ArrayFunctions)[func.method].apply(_a, __spreadArray([current], func.args, false));\n }, this.currentValue);\n };\n return Chainable;\n}());\nvar _loop_1 = function (method) {\n if (ArrayFunctions.hasOwnProperty(method)) {\n Chainable.prototype[method] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.chain.push({ method: method, args: args });\n return this;\n };\n }\n};\nfor (var method in ArrayFunctions) {\n _loop_1(method);\n}\n/**\n * Create a chainable array of methods.\n * @param val\n * @returns\n */\nfunction chain(val) {\n return new Chainable(val);\n}\nexports.chain = chain;\nexports[\"default\"] = chain;\n__exportStar(__webpack_require__(/*! ./array */ \"./node_modules/@formio/lodash/lib/array.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function */ \"./node_modules/@formio/lodash/lib/function.js\"), exports);\n__exportStar(__webpack_require__(/*! ./lang */ \"./node_modules/@formio/lodash/lib/lang.js\"), exports);\n__exportStar(__webpack_require__(/*! ./math */ \"./node_modules/@formio/lodash/lib/math.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object */ \"./node_modules/@formio/lodash/lib/object.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string */ \"./node_modules/@formio/lodash/lib/string.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/index.js?");
|
173
|
-
|
174
|
-
/***/ }),
|
175
|
-
|
176
|
-
/***/ "./node_modules/@formio/lodash/lib/lang.js":
|
177
|
-
/*!*************************************************!*\
|
178
|
-
!*** ./node_modules/@formio/lodash/lib/lang.js ***!
|
179
|
-
\*************************************************/
|
180
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
181
|
-
|
182
|
-
"use strict";
|
183
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isRegExp = exports.isBoolean = exports.isNumber = exports.isPlainObject = exports.isObject = exports.isObjectLike = exports.isArray = exports.isNull = exports.isNil = exports.isNaN = exports.isInteger = exports.isEmpty = exports.isString = exports.isEqual = exports.noop = void 0;\nvar array_1 = __webpack_require__(/*! ./array */ \"./node_modules/@formio/lodash/lib/array.js\");\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n return Object.prototype.toString.call(value);\n}\n/**\n * A no-operation function.\n */\nfunction noop() {\n return;\n}\nexports.noop = noop;\n;\n/**\n * Determines equality of a value or complex object.\n * @param a\n * @param b\n */\nfunction isEqual(a, b) {\n var equal = false;\n if (a === b) {\n return true;\n }\n if (a && b && (Array.isArray(a) || isObject(a)) && Object.keys(a).length === Object.keys(b).length) {\n equal = true;\n (0, array_1.each)(a, function (val, key) {\n if ((Array.isArray(val) || isObject(val)) && !isEqual(b[key], val)) {\n equal = false;\n return true;\n }\n if (b[key] !== val) {\n equal = false;\n return true;\n }\n });\n }\n return equal;\n}\nexports.isEqual = isEqual;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isempty\nfunction isEmpty(val) {\n return [Object, Array].includes((val || {}).constructor) && !Object.entries((val || {})).length;\n}\nexports.isEmpty = isEmpty;\nfunction isInteger(val) {\n return Number.isInteger(val);\n}\nexports.isInteger = isInteger;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isNil(val) {\n return val == null;\n}\nexports.isNil = isNil;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isObjectLike(val) {\n return typeof val === 'object' && (val !== null);\n}\nexports.isObjectLike = isObjectLike;\nfunction isObject(val) {\n var type = typeof val;\n return val != null && (type === 'object' || type === 'function');\n}\nexports.isObject = isObject;\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || getTag(value) != '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\nexports.isPlainObject = isPlainObject;\nfunction isNumber(val) {\n return typeof val === 'number' || (isObjectLike(val) && getTag(val) == '[object Number]');\n}\nexports.isNumber = isNumber;\nfunction isBoolean(val) {\n return val === true || val === false || (isObjectLike(val) && getTag(val) == '[object Boolean]');\n}\nexports.isBoolean = isBoolean;\nfunction isRegExp(val) {\n return isObjectLike(val) && getTag(val) == '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/lang.js?");
|
184
|
-
|
185
|
-
/***/ }),
|
186
|
-
|
187
|
-
/***/ "./node_modules/@formio/lodash/lib/math.js":
|
188
|
-
/*!*************************************************!*\
|
189
|
-
!*** ./node_modules/@formio/lodash/lib/math.js ***!
|
190
|
-
\*************************************************/
|
191
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
192
|
-
|
193
|
-
"use strict";
|
194
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sumBy = exports.sum = exports.mod = exports.subtract = exports.round = exports.multiply = exports.minBy = exports.min = exports.meanBy = exports.mean = exports.maxBy = exports.max = exports.floor = exports.divide = exports.ceil = exports.add = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"./node_modules/@formio/lodash/lib/lang.js\");\nvar object_1 = __webpack_require__(/*! ./object */ \"./node_modules/@formio/lodash/lib/object.js\");\nfunction mathOp(a, op, precision) {\n if (precision === void 0) { precision = 0; }\n if (!precision) {\n return op(a);\n }\n precision = Math.pow(10, precision);\n return op(a * precision) / precision;\n}\nfunction compareBy(arr, fn, op) {\n var first = arr[0];\n if (arr.length <= 1) {\n return first;\n }\n var fnString = (0, lang_1.isString)(fn);\n return arr.slice(1).reduce(function (current, next) {\n var currentValue = fnString ? (0, object_1.get)(current, fn) : fn(current);\n var nextValue = fnString ? (0, object_1.get)(next, fn) : fn(next);\n var result = op(currentValue, nextValue);\n return (result === nextValue) ? next : current;\n }, first);\n}\nfunction valueBy(arr, fn, op) {\n var first = arr[0];\n if (arr.length <= 1) {\n return first;\n }\n var fnString = (0, lang_1.isString)(fn);\n return arr.slice(1).reduce(function (current, next) { return op(current, fnString ? (0, object_1.get)(next, fn) : fn(next)); }, fnString ? (0, object_1.get)(first, fn) : fn(first));\n}\n/**\n * @link https://lodash.com/docs/4.17.15#add\n * @param augend\n * @param addend\n * @returns\n */\nfunction add(augend, addend) {\n return augend + addend;\n}\nexports.add = add;\n/**\n * @link https://lodash.com/docs/4.17.15#ceil\n * @param num\n * @param precision\n * @returns\n */\nfunction ceil(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.ceil, precision);\n}\nexports.ceil = ceil;\n/**\n * https://lodash.com/docs/4.17.15#divide\n * @param dividend\n * @param divisor\n * @returns\n */\nfunction divide(dividend, divisor) {\n return dividend / divisor;\n}\nexports.divide = divide;\n/**\n * @link https://lodash.com/docs/4.17.15#floor\n * @param num\n * @param precision\n * @returns\n */\nfunction floor(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.floor, precision);\n}\nexports.floor = floor;\n/**\n * @link https://lodash.com/docs/4.17.15#max\n * @param arr\n * @returns\n */\nfunction max(arr) {\n return Math.max.apply(Math, arr);\n}\nexports.max = max;\n/**\n * @link https://lodash.com/docs/4.17.15#maxBy\n */\nfunction maxBy(arr, fn) {\n return compareBy(arr, fn, Math.max);\n}\nexports.maxBy = maxBy;\n/**\n * @link https://lodash.com/docs/4.17.15#mean\n * @param arr\n * @returns\n */\nfunction mean(arr) {\n return sum(arr) / arr.length;\n}\nexports.mean = mean;\n/**\n * @link https://lodash.com/docs/4.17.15#meanBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction meanBy(arr, fn) {\n return sumBy(arr, fn) / arr.length;\n}\nexports.meanBy = meanBy;\n/**\n * @link https://lodash.com/docs/4.17.15#min\n * @param arr\n * @returns\n */\nfunction min(arr) {\n return Math.min.apply(Math, arr);\n}\nexports.min = min;\n/**\n * @link https://lodash.com/docs/4.17.15#minBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction minBy(arr, fn) {\n return compareBy(arr, fn, Math.min);\n}\nexports.minBy = minBy;\n/**\n * @link https://lodash.com/docs/4.17.15#multiply\n * @param multiplier\n * @param multiplicand\n * @returns\n */\nfunction multiply(multiplier, multiplicand) {\n return multiplier * multiplicand;\n}\nexports.multiply = multiply;\n/**\n * @link https://lodash.com/docs/4.17.15#round\n * @param num\n * @param precision\n * @returns\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.round, precision);\n}\nexports.round = round;\n/**\n * @link https://lodash.com/docs/4.17.15#subtract\n * @param a\n * @param b\n * @returns\n */\nfunction subtract(minuend, subtrahend) {\n return minuend - subtrahend;\n}\nexports.subtract = subtract;\n/**\n * Perform a modulus operation between two numbers.\n * @param a\n * @param b\n * @returns\n */\nfunction mod(a, b) {\n return a % b;\n}\nexports.mod = mod;\n/**\n * @link https://lodash.com/docs/4.17.15#sum\n * @param arr\n * @returns\n */\nfunction sum(arr) {\n return arr.reduce(add, 0);\n}\nexports.sum = sum;\n/**\n * @link https://lodash.com/docs/4.17.15#sumBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction sumBy(arr, fn) {\n return valueBy(arr, fn, function (a, b) { return (a + b); });\n}\nexports.sumBy = sumBy;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/math.js?");
|
195
|
-
|
196
|
-
/***/ }),
|
197
|
-
|
198
|
-
/***/ "./node_modules/@formio/lodash/lib/object.js":
|
199
|
-
/*!***************************************************!*\
|
200
|
-
!*** ./node_modules/@formio/lodash/lib/object.js ***!
|
201
|
-
\***************************************************/
|
202
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
203
|
-
|
204
|
-
"use strict";
|
205
|
-
eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.pick = exports.defaults = exports.cloneDeep = exports.clone = exports.fastCloneDeep = exports.merge = exports.set = exports.has = exports.propertyOf = exports.property = exports.get = exports.pathParts = exports.values = exports.keys = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"./node_modules/@formio/lodash/lib/lang.js\");\nvar array_1 = __webpack_require__(/*! ./array */ \"./node_modules/@formio/lodash/lib/array.js\");\n/**\n * Get the keys of an Object.\n * @param obj\n */\nfunction keys(obj) {\n return Object.keys(obj);\n}\nexports.keys = keys;\n;\n/**\n * Return the values of an object or an array.\n * @param obj\n * @returns\n */\nfunction values(obj) {\n return (0, lang_1.isArray)(obj) ? obj : Object.values(obj);\n}\nexports.values = values;\n/**\n * Retrieve the path parts provided a path string.\n * @param path\n */\nfunction pathParts(path) {\n if (!path) {\n return [];\n }\n if (path[0] === '[') {\n path = path.replace(/^\\[([^\\]]+)\\]/, '$1');\n }\n return path.\n replace(/\\[/g, '.').\n replace(/\\]/g, '').\n split('.');\n}\nexports.pathParts = pathParts;\n/**\n * Get the value from an object or an array provided a path.\n *\n * @param obj\n * @param path\n * @param def\n */\nfunction get(obj, path, def) {\n var val = pathParts(path).reduce(function (o, k) { return (o || {})[k]; }, obj);\n return (typeof def !== 'undefined' &&\n typeof val === 'undefined') ? def : val;\n}\nexports.get = get;\nfunction property(path) {\n return function (obj) { return get(obj, path); };\n}\nexports.property = property;\nfunction propertyOf(obj) {\n return function (path) { return get(obj, path); };\n}\nexports.propertyOf = propertyOf;\n/**\n * Determine if a value is set.\n *\n * @param obj\n * @param path\n */\nfunction has(obj, path) {\n return get(obj, path, undefined) !== undefined;\n}\nexports.has = has;\n/**\n * Sets the value of an item within an array or object.\n * @param obj\n * @param path\n * @param value\n */\nfunction set(obj, path, value) {\n var parts = pathParts(path);\n parts.reduce(function (o, k, i) {\n if (!isNaN(Number(k))) {\n k = Number(k);\n }\n if ((Array.isArray(o) ? (k >= o.length) : !o.hasOwnProperty(k)) ||\n ((i < (parts.length - 1)) && !Array.isArray(o[k]) && !(0, lang_1.isObject)(o[k]))) {\n o[k] = !isNaN(Number(parts[i + 1])) ? [] : {};\n }\n if (i === (parts.length - 1)) {\n o[k] = value;\n }\n return o[k];\n }, obj);\n return obj;\n}\nexports.set = set;\n;\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n }\n catch (_) {\n return false;\n }\n}\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\n/**\n * Merge a single object.\n *\n * @param target\n * @param source\n * @returns\n */\nfunction mergeObject(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key)) {\n target[key] = merge(target[key], source[key]);\n }\n else {\n target[key] = cloneDeep(source[key]);\n }\n }\n }\n return target;\n}\n/**\n * Merge two arrays.\n * @param target\n * @param source\n */\nfunction mergeArray(target, source) {\n source.forEach(function (subSource, index) {\n target[index] = merge(target[index], subSource);\n });\n return target;\n}\n/**\n * Merges a complex data object.\n *\n * @param a\n * @param b\n * @param options\n */\nfunction merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var first = args.shift();\n return args.reduce(function (target, source, index) {\n if (!target || (target === source)) {\n return cloneDeep(source);\n }\n else if ((0, lang_1.isArray)(source)) {\n // If there is no target array, then make it one.\n if (!(0, lang_1.isArray)(target)) {\n args[index] = target = [];\n }\n return mergeArray(target, source);\n }\n else if ((0, lang_1.isPlainObject)(source)) {\n return mergeObject(target, source);\n }\n else {\n return cloneDeep(source);\n }\n }, first);\n}\nexports.merge = merge;\n/**\n * Performs a fast clone deep operation.\n *\n * @param obj\n */\nfunction fastCloneDeep(obj) {\n try {\n return JSON.parse(JSON.stringify(obj));\n }\n catch (err) {\n console.log(\"Clone Failed: \".concat(err.message));\n return null;\n }\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Performs a shallow clone of an object.\n * @param src\n */\nfunction clone(src) {\n if (Array.isArray(src)) { // for arrays\n return __spreadArray([], src, true);\n }\n else {\n return __assign({}, src);\n }\n}\nexports.clone = clone;\n/**\n * Performs a recursive cloneDeep operation.\n * @param src\n * @returns\n */\nfunction cloneDeep(src) {\n if (Array.isArray(src)) { // for arrays\n return src.map(cloneDeep);\n }\n if (src === null || typeof src !== 'object') { // for primitives / functions / non-references/pointers\n return src;\n }\n return Object.fromEntries(Object.entries(src).map(function (_a) {\n var key = _a[0], val = _a[1];\n return ([key, cloneDeep(val)]);\n }));\n}\nexports.cloneDeep = cloneDeep;\n/**\n * Sets the defaults of an object.\n *\n * @param obj\n * @param defs\n */\nfunction defaults(obj, defs) {\n (0, array_1.each)(defs, function (value, key) {\n if (!obj.hasOwnProperty(key)) {\n obj[key] = value;\n }\n });\n return obj;\n}\nexports.defaults = defaults;\n/**\n * Pick an item in an object.\n * @param object\n * @param keys\n */\nfunction pick(object, keys) {\n return keys.reduce(function (obj, key) {\n if (object && object.hasOwnProperty(key)) {\n obj[key] = object[key];\n }\n return obj;\n }, {});\n}\nexports.pick = pick;\n;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/object.js?");
|
206
|
-
|
207
|
-
/***/ }),
|
208
|
-
|
209
|
-
/***/ "./node_modules/@formio/lodash/lib/string.js":
|
210
|
-
/*!***************************************************!*\
|
211
|
-
!*** ./node_modules/@formio/lodash/lib/string.js ***!
|
212
|
-
\***************************************************/
|
213
|
-
/***/ (function(__unused_webpack_module, exports) {
|
214
|
-
|
215
|
-
"use strict";
|
216
|
-
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.endsWith = exports.trim = void 0;\n// From https://youmightnotneed.com/lodash/#trim\nfunction trim(str, c) {\n if (c === void 0) { c = '\\\\s'; }\n return str.replace(new RegExp(\"^([\".concat(c, \"]*)(.*?)([\").concat(c, \"]*)$\")), '$2');\n}\nexports.trim = trim;\n// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nif (!String.prototype.endsWith) {\n String.prototype.endsWith = function (search, this_len) {\n if (this_len === undefined || this_len > this.length) {\n this_len = this.length;\n }\n // @ts-ignore: Object is possibly 'undefined'\n return this.substring(this_len - search.length, this_len) === search;\n };\n}\n// From https://youmightnotneed.com/lodash/#endsWith\nfunction endsWith(str, c) {\n return str.endsWith(c);\n}\nexports.endsWith = endsWith;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/lodash/lib/string.js?");
|
150
|
+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.boolValue = exports.escapeRegExCharacters = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if ((0, lodash_1.isBoolean)(value)) {\n return value;\n }\n else if ((0, lodash_1.isString)(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/core/lib/utils/utils.js?");
|
217
151
|
|
218
152
|
/***/ }),
|
219
153
|
|
@@ -2156,7 +2090,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
|
|
2156
2090
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2157
2091
|
|
2158
2092
|
"use strict";
|
2159
|
-
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.flattenComponents = exports.applyFormChanges = exports.generateFormChange = exports.removeComponent = exports.findComponent = exports.findComponents = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.eachComponent = exports.isLayoutComponent = void 0;\nconst get_1 = __importDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nconst set_1 = __importDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\nconst has_1 = __importDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\nconst clone_1 = __importDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\nconst forOwn_1 = __importDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\nconst isString_1 = __importDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\nconst isNaN_1 = __importDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\nconst isNil_1 = __importDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\nconst round_1 = __importDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\nconst chunk_1 = __importDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\nconst pad_1 = __importDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\nconst fast_json_patch_1 = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\");\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean((component.columns && Array.isArray(component.columns)) ||\n (component.rows && Array.isArray(component.rows)) ||\n (component.components && Array.isArray(component.components)));\n}\nexports.isLayoutComponent = isLayoutComponent;\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components)\n return;\n path = path || '';\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n components.noRecurse = true;\n }\n components.forEach((component) => {\n if (!component) {\n return;\n }\n const hasColumns = component.columns && Array.isArray(component.columns);\n const hasRows = component.rows && Array.isArray(component.rows);\n const hasComps = component.components && Array.isArray(component.components);\n let noRecurse = false;\n const newPath = component.key ? (path ? (`${path}.${component.key}`) : component.key) : '';\n // Keep track of parent references.\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, clone_1.default)(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n }\n // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n const layoutTypes = ['htmlelement', 'content'];\n const isLayoutComponent = hasColumns || hasRows || (hasComps && !component.input) || layoutTypes.indexOf(component.type) > -1;\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n const subPath = () => {\n if (component.key &&\n !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) &&\n (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable', 'tagpad'].includes(component.type) ||\n component.tree)) {\n return newPath;\n }\n else if (component.key &&\n component.type === 'form') {\n return `${newPath}.data`;\n }\n return path;\n };\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n else if (hasRows) {\n component.rows.forEach((row) => {\n if (Array.isArray(row)) {\n row.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n });\n }\n else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\nexports.eachComponent = eachComponent;\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\nfunction matchComponent(component, query) {\n if ((0, isString_1.default)(query)) {\n return (component.key === query) || (component.path === query);\n }\n else {\n let matches = false;\n (0, forOwn_1.default)(query, (value, key) => {\n matches = ((0, get_1.default)(component, key) === value);\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\nexports.matchComponent = matchComponent;\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\nfunction getComponent(components, key, includeAll) {\n let result;\n eachComponent(components, (component, path) => {\n if ((path === key) || (component.path === key)) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\nexports.getComponent = getComponent;\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\nfunction searchComponents(components, query) {\n const results = [];\n eachComponent(components, (component) => {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\nexports.searchComponents = searchComponents;\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\nexports.findComponents = findComponents;\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\nfunction findComponent(components, key, path, fn) {\n if (!components)\n return;\n path = path || [];\n if (!key) {\n return fn(components);\n }\n components.forEach(function (component, index) {\n var newPath = path.slice();\n // Add an index of the component it iterates through in nested structure\n newPath.push(index);\n if (!component)\n return;\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\nexports.findComponent = findComponent;\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n if (path.length !== 0) {\n components = (0, get_1.default)(components, path);\n }\n components.splice(index, 1);\n}\nexports.removeComponent = removeComponent;\nfunction generateFormChange(type, data) {\n let change;\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n path: data.path,\n index: data.index,\n component: data.component\n };\n break;\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, fast_json_patch_1.compare)(data.originalComponent, data.component)\n };\n // Don't save if nothing changed.\n if (!change.patches.length) {\n change = null;\n }\n break;\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key,\n };\n break;\n }\n return change;\n}\nexports.generateFormChange = generateFormChange;\nfunction applyFormChanges(form, changes) {\n const failed = [];\n changes.forEach(function (change) {\n var found = false;\n switch (change.op) {\n case 'add':\n var newComponent = change.component;\n // Find the container to set the component in.\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n }\n // A move will first run an add so remove any existing components with matching key before inserting.\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, get_1.default)(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n const oldComponent = (0, get_1.default)(form.components, path);\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n removeComponent(form.components, path);\n });\n break;\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n try {\n const oldComponent = (0, get_1.default)(form.components, path);\n const newComponent = (0, fast_json_patch_1.applyPatch)(component, change.patches).newDocument;\n if (oldComponent.key !== newComponent.key) {\n path.pop();\n }\n (0, set_1.default)(form.components, path, newComponent);\n }\n catch (err) {\n failed.push(change);\n }\n });\n break;\n case 'move':\n break;\n }\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form,\n failed\n };\n}\nexports.applyFormChanges = applyFormChanges;\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\nfunction flattenComponents(components, includeAll) {\n const flattened = {};\n eachComponent(components, (component, path) => {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\nexports.flattenComponents = flattenComponents;\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\nfunction hasCondition(component) {\n return Boolean((component.customConditional) ||\n (component.conditional && (component.conditional.when ||\n (lodash_1.default.some(component.conditional.conditions || [], (condition => condition.component && condition.operator))) ||\n component.conditional.json ||\n component.conditional.condition)));\n}\nexports.hasCondition = hasCondition;\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\nfunction parseFloatExt(value) {\n return parseFloat((0, isString_1.default)(value)\n ? value.replace(/[^\\de.+-]/gi, '')\n : value);\n}\nexports.parseFloatExt = parseFloatExt;\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\nfunction formatAsCurrency(value) {\n const parsedValue = parseFloatExt(value);\n if ((0, isNaN_1.default)(parsedValue)) {\n return '';\n }\n const parts = (0, round_1.default)(parsedValue, 2)\n .toString()\n .split('.');\n parts[0] = (0, chunk_1.default)(Array.from(parts[0]).reverse(), 3)\n .reverse()\n .map((part) => part\n .reverse()\n .join(''))\n .join(',');\n parts[1] = (0, pad_1.default)(parts[1], 2, '0');\n return parts.join('.');\n}\nexports.formatAsCurrency = formatAsCurrency;\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\nfunction getValue(submission, key) {\n const search = (data) => {\n if ((0, isPlainObject_1.default)(data)) {\n if ((0, has_1.default)(data, key)) {\n return lodash_1.default.get(data, key);\n }\n let value = null;\n (0, forOwn_1.default)(data, (prop) => {\n const result = search(prop);\n if (!(0, isNil_1.default)(result)) {\n value = result;\n return false;\n }\n });\n return value;\n }\n else {\n return null;\n }\n };\n return search(submission.data);\n}\nexports.getValue = getValue;\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\nfunction getStrings(form) {\n const properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n const strings = [];\n eachComponent(form.components, component => {\n properties.forEach(property => {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property,\n string: component[property]\n });\n }\n });\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach((value, index) => {\n strings.push({\n key: component.key,\n property: `value[${index}].label`,\n string: component.values[index].label\n });\n });\n }\n // Hard coded values from Day component\n if (component.type === 'day') {\n [\n 'day',\n 'month',\n 'year',\n 'Day',\n 'Month',\n 'Year',\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'day',\n string,\n });\n });\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder,\n });\n }\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder,\n });\n }\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder,\n });\n }\n }\n if (component.type === 'editgrid') {\n const string = component.addAnother || 'Add Another';\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string,\n });\n }\n }\n if (component.type === 'select') {\n [\n 'loading...',\n 'Type to search'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'select',\n string,\n });\n });\n }\n }, true);\n return strings;\n}\nexports.getStrings = getStrings;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?");
|
2093
|
+
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.flattenComponents = exports.applyFormChanges = exports.generateFormChange = exports.removeComponent = exports.findComponent = exports.findComponents = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.eachComponent = exports.isLayoutComponent = void 0;\nconst get_1 = __importDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nconst set_1 = __importDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\nconst has_1 = __importDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\nconst clone_1 = __importDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\nconst forOwn_1 = __importDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\nconst isString_1 = __importDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\nconst isNaN_1 = __importDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\nconst isNil_1 = __importDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\nconst round_1 = __importDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\nconst chunk_1 = __importDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\nconst pad_1 = __importDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\nconst fast_json_patch_1 = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\");\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean((component.columns && Array.isArray(component.columns)) ||\n (component.rows && Array.isArray(component.rows)) ||\n (component.components && Array.isArray(component.components)));\n}\nexports.isLayoutComponent = isLayoutComponent;\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components)\n return;\n path = path || '';\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n components.noRecurse = true;\n }\n components.forEach((component) => {\n if (!component) {\n return;\n }\n const hasColumns = component.columns && Array.isArray(component.columns);\n const hasRows = component.rows && Array.isArray(component.rows);\n const hasComps = component.components && Array.isArray(component.components);\n let noRecurse = false;\n const newPath = component.key ? (path ? (`${path}.${component.key}`) : component.key) : '';\n // Keep track of parent references.\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, clone_1.default)(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n }\n // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n const layoutTypes = ['htmlelement', 'content'];\n const isLayoutComponent = hasColumns || hasRows || (hasComps && !component.input) || layoutTypes.indexOf(component.type) > -1;\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n const subPath = () => {\n if (component.key &&\n !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) &&\n (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable', 'tagpad'].includes(component.type) ||\n component.tree)) {\n return newPath;\n }\n else if (component.key &&\n component.type === 'form') {\n return `${newPath}.data`;\n }\n return path;\n };\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n else if (hasRows) {\n component.rows.forEach((row) => {\n if (Array.isArray(row)) {\n row.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n });\n }\n else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\nexports.eachComponent = eachComponent;\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\nfunction matchComponent(component, query) {\n if ((0, isString_1.default)(query)) {\n return (component.key === query) || (component.path === query);\n }\n else {\n let matches = false;\n (0, forOwn_1.default)(query, (value, key) => {\n matches = ((0, get_1.default)(component, key) === value);\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\nexports.matchComponent = matchComponent;\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\nfunction getComponent(components, key, includeAll) {\n let result;\n eachComponent(components, (component, path) => {\n if ((path === key) || (component.path === key)) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\nexports.getComponent = getComponent;\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\nfunction searchComponents(components, query) {\n const results = [];\n eachComponent(components, (component) => {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\nexports.searchComponents = searchComponents;\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\nexports.findComponents = findComponents;\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\nfunction findComponent(components, key, path, fn) {\n if (!components)\n return;\n path = path || [];\n if (!key) {\n return fn(components);\n }\n components.forEach(function (component, index) {\n var newPath = path.slice();\n // Add an index of the component it iterates through in nested structure\n newPath.push(index);\n if (!component)\n return;\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\nexports.findComponent = findComponent;\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n if (path.length !== 0) {\n components = (0, get_1.default)(components, path);\n }\n components.splice(index, 1);\n}\nexports.removeComponent = removeComponent;\nfunction generateFormChange(type, data) {\n let change;\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n path: data.path,\n index: data.index,\n component: data.component\n };\n break;\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, fast_json_patch_1.compare)(data.originalComponent, data.component)\n };\n // Don't save if nothing changed.\n if (!change.patches.length) {\n change = null;\n }\n break;\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key,\n };\n break;\n }\n return change;\n}\nexports.generateFormChange = generateFormChange;\nfunction applyFormChanges(form, changes) {\n const failed = [];\n changes.forEach(function (change) {\n var found = false;\n switch (change.op) {\n case 'add':\n var newComponent = change.component;\n // Find the container to set the component in.\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n }\n // A move will first run an add so remove any existing components with matching key before inserting.\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, get_1.default)(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n const oldComponent = (0, get_1.default)(form.components, path);\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n removeComponent(form.components, path);\n });\n break;\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n try {\n const oldComponent = (0, get_1.default)(form.components, path);\n const newComponent = (0, fast_json_patch_1.applyPatch)(component, change.patches).newDocument;\n if (oldComponent.key !== newComponent.key) {\n path.pop();\n }\n (0, set_1.default)(form.components, path, newComponent);\n }\n catch (err) {\n failed.push(change);\n }\n });\n break;\n case 'move':\n break;\n }\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form,\n failed\n };\n}\nexports.applyFormChanges = applyFormChanges;\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\nfunction flattenComponents(components, includeAll = false) {\n const flattened = {};\n eachComponent(components, (component, path) => {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\nexports.flattenComponents = flattenComponents;\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\nfunction hasCondition(component) {\n return Boolean((component.customConditional) ||\n (component.conditional && (component.conditional.when ||\n (lodash_1.default.some(component.conditional.conditions || [], (condition => condition.component && condition.operator))) ||\n component.conditional.json ||\n component.conditional.condition)));\n}\nexports.hasCondition = hasCondition;\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\nfunction parseFloatExt(value) {\n return parseFloat((0, isString_1.default)(value)\n ? value.replace(/[^\\de.+-]/gi, '')\n : value);\n}\nexports.parseFloatExt = parseFloatExt;\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\nfunction formatAsCurrency(value) {\n const parsedValue = parseFloatExt(value);\n if ((0, isNaN_1.default)(parsedValue)) {\n return '';\n }\n const parts = (0, round_1.default)(parsedValue, 2)\n .toString()\n .split('.');\n parts[0] = (0, chunk_1.default)(Array.from(parts[0]).reverse(), 3)\n .reverse()\n .map((part) => part\n .reverse()\n .join(''))\n .join(',');\n parts[1] = (0, pad_1.default)(parts[1], 2, '0');\n return parts.join('.');\n}\nexports.formatAsCurrency = formatAsCurrency;\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\nfunction getValue(submission, key) {\n const search = (data) => {\n if ((0, isPlainObject_1.default)(data)) {\n if ((0, has_1.default)(data, key)) {\n return lodash_1.default.get(data, key);\n }\n let value = null;\n (0, forOwn_1.default)(data, (prop) => {\n const result = search(prop);\n if (!(0, isNil_1.default)(result)) {\n value = result;\n return false;\n }\n });\n return value;\n }\n else {\n return null;\n }\n };\n return search(submission.data);\n}\nexports.getValue = getValue;\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\nfunction getStrings(form) {\n const properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n const strings = [];\n eachComponent(form.components, component => {\n properties.forEach(property => {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property,\n string: component[property]\n });\n }\n });\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach((value, index) => {\n strings.push({\n key: component.key,\n property: `value[${index}].label`,\n string: component.values[index].label\n });\n });\n }\n // Hard coded values from Day component\n if (component.type === 'day') {\n [\n 'day',\n 'month',\n 'year',\n 'Day',\n 'Month',\n 'Year',\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'day',\n string,\n });\n });\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder,\n });\n }\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder,\n });\n }\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder,\n });\n }\n }\n if (component.type === 'editgrid') {\n const string = component.addAnother || 'Add Another';\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string,\n });\n }\n }\n if (component.type === 'select') {\n [\n 'loading...',\n 'Type to search'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'select',\n string,\n });\n });\n }\n }, true);\n return strings;\n}\nexports.getStrings = getStrings;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?");
|
2160
2094
|
|
2161
2095
|
/***/ }),
|
2162
2096
|
|
@@ -2178,7 +2112,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
|
|
2178
2112
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2179
2113
|
|
2180
2114
|
"use strict";
|
2181
|
-
eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nexports.Evaluator = Evaluator_1.default;\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.default.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\nfunction evaluate(func, args, ret, tokenize) {\n let returnVal = null;\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = lodash_1.default.get(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, (match, $1, $2) => {\n if ($2.indexOf('data.') === 0) {\n return lodash_1.default.get(args.data, $2.replace('data.', ''));\n }\n else if ($2.indexOf('row.') === 0) {\n return lodash_1.default.get(args.row, $2.replace('row.', ''));\n }\n // Support legacy...\n return lodash_1.default.get(args.data, $2);\n });\n }\n try {\n func = Evaluator_1.default.evaluator(func, args);\n args = lodash_1.default.values(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator_1.default.evaluate(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (typeof func === 'object') {\n try {\n returnVal = json_logic_js_1.default.apply(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n}\nexports.evaluate = evaluate;\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @param instance\n * @returns {boolean}\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.default.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like <, >, & and etc.\n * @param str\n * @returns {string}\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.default.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.default.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {Date}\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n *\n * @return {Promise<any> | *}\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n function cancel() {\n clearTimeout(timer);\n }\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection;\n *\n * @return {T}\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n function get() {\n return state;\n }\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.default.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number;\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {FieldError[]} errors\n * @param firstPass\n * @returns {[]}\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
|
2115
|
+
eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nexports.Evaluator = Evaluator_1.default;\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.default.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\nfunction evaluate(func, args, ret, tokenize) {\n let returnVal = null;\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = lodash_1.default.get(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, (match, $1, $2) => {\n if ($2.indexOf('data.') === 0) {\n return lodash_1.default.get(args.data, $2.replace('data.', ''));\n }\n else if ($2.indexOf('row.') === 0) {\n return lodash_1.default.get(args.row, $2.replace('row.', ''));\n }\n // Support legacy...\n return lodash_1.default.get(args.data, $2);\n });\n }\n try {\n func = Evaluator_1.default.evaluator(func, args);\n args = lodash_1.default.values(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator_1.default.evaluate(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (typeof func === 'object') {\n try {\n returnVal = json_logic_js_1.default.apply(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n}\nexports.evaluate = evaluate;\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @param instance\n * @returns {boolean}\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.default.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like <, >, & and etc.\n * @param str\n * @returns {string}\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.default.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.default.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {Date}\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n *\n * @return {Promise<any> | *}\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n function cancel() {\n clearTimeout(timer);\n }\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection;\n *\n * @return {T}\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n function get() {\n return state;\n }\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.default.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Use profiles\n if (options.sanitizeConfig && options.sanitizeConfig.useProfiles) {\n Object.keys(options.sanitizeConfig.useProfiles).forEach(key => {\n sanitizeOptions.USE_PROFILES[key] = options.sanitizeConfig.useProfiles[key];\n });\n }\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number;\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {FieldError[]} errors\n * @param firstPass\n * @returns {[]}\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
|
2182
2116
|
|
2183
2117
|
/***/ }),
|
2184
2118
|
|