@formio/js 5.0.0-rc.27 → 5.0.0-rc.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fonts/bootstrap-icons.woff +0 -0
- package/dist/fonts/bootstrap-icons.woff2 +0 -0
- 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 +957 -2270
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +4 -2
- package/dist/formio.full.css +100 -3
- package/dist/formio.full.js +961 -2231
- package/dist/formio.full.min.css +2 -2
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +4 -2
- package/dist/formio.js +101 -1966
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -3
- package/dist/formio.utils.js +145 -104
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +4 -2
- package/lib/cjs/CDN.d.ts +1 -1
- package/lib/cjs/CDN.js +2 -2
- package/lib/cjs/Embed.d.ts +16 -7
- package/lib/cjs/Embed.js +76 -24
- package/lib/cjs/Formio.d.ts +0 -1
- package/lib/cjs/Formio.js +27 -19
- package/lib/cjs/PDF.js +2 -2
- package/lib/cjs/Webform.d.ts +6 -9
- package/lib/cjs/Webform.js +59 -81
- package/lib/cjs/WebformBuilder.d.ts +1 -1
- package/lib/cjs/WebformBuilder.js +33 -16
- package/lib/cjs/Wizard.d.ts +5 -4
- package/lib/cjs/Wizard.js +37 -26
- package/lib/cjs/WizardBuilder.d.ts +1 -0
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
- package/lib/cjs/addons/index.d.ts +1 -0
- package/lib/cjs/addons/index.js +5 -1
- package/lib/cjs/components/Components.d.ts +7 -0
- package/lib/cjs/components/Components.js +30 -0
- package/lib/cjs/components/_classes/component/Component.d.ts +57 -27
- package/lib/cjs/components/_classes/component/Component.js +193 -119
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +28 -11
- package/lib/cjs/components/_classes/nested/NestedComponent.js +88 -57
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
- package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +17 -4
- package/lib/cjs/components/builder.js +0 -2
- package/lib/cjs/components/button/Button.js +2 -1
- package/lib/cjs/components/columns/Columns.d.ts +1 -0
- package/lib/cjs/components/columns/Columns.js +2 -3
- package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
- package/lib/cjs/components/columns/editForm/Columns.edit.display.js +23 -1
- package/lib/cjs/components/container/Container.d.ts +1 -0
- package/lib/cjs/components/container/Container.js +2 -6
- package/lib/cjs/components/content/Content.d.ts +1 -0
- package/lib/cjs/components/content/Content.js +1 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -8
- package/lib/cjs/components/datagrid/DataGrid.js +9 -26
- package/lib/cjs/components/datamap/DataMap.js +2 -1
- package/lib/cjs/components/datetime/DateTime.js +0 -2
- package/lib/cjs/components/day/Day.js +2 -3
- package/lib/cjs/components/editgrid/EditGrid.d.ts +8 -4
- package/lib/cjs/components/editgrid/EditGrid.js +96 -73
- package/lib/cjs/components/email/Email.js +0 -1
- package/lib/cjs/components/file/File.js +1 -1
- package/lib/cjs/components/file/fixtures/comp3.d.ts +29 -0
- package/lib/cjs/components/file/fixtures/comp3.js +31 -0
- package/lib/cjs/components/form/Form.d.ts +2 -6
- package/lib/cjs/components/form/Form.js +43 -14
- package/lib/cjs/components/index.d.ts +0 -2
- package/lib/cjs/components/index.js +0 -2
- package/lib/cjs/components/number/Number.d.ts +1 -2
- package/lib/cjs/components/number/Number.js +5 -6
- package/lib/cjs/components/panel/Panel.d.ts +0 -1
- package/lib/cjs/components/panel/Panel.js +2 -9
- package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
- package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -16
- package/lib/cjs/components/phonenumber/PhoneNumber.js +17 -0
- package/lib/cjs/components/radio/Radio.js +0 -2
- package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/cjs/components/select/Select.js +3 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +31 -2
- package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -0
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
- package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
- package/lib/cjs/components/textfield/TextField.js +20 -6
- package/lib/cjs/components/time/Time.js +0 -6
- package/lib/cjs/components/url/Url.js +0 -1
- package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +25 -2
- package/lib/cjs/components/well/editForm/Well.edit.display.js +18 -0
- package/lib/cjs/formio.embed.js +5 -3
- package/lib/cjs/formio.form.d.ts +1 -7
- package/lib/cjs/formio.form.js +3 -38
- package/lib/cjs/index.d.ts +2 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/providers/Providers.d.ts +0 -4
- package/lib/cjs/providers/storage/azure.d.ts +0 -2
- package/lib/cjs/providers/storage/azure.js +1 -6
- package/lib/cjs/providers/storage/googleDrive.d.ts +0 -1
- package/lib/cjs/providers/storage/googleDrive.js +0 -4
- package/lib/cjs/providers/storage/s3.d.ts +0 -1
- package/lib/cjs/providers/storage/s3.js +0 -4
- package/lib/cjs/templates/Templates.d.ts +1 -11
- package/lib/cjs/templates/Templates.js +4 -41
- package/lib/cjs/translations/en.d.ts +5 -0
- package/lib/cjs/translations/en.js +5 -0
- package/lib/cjs/utils/formUtils.js +1 -0
- package/lib/cjs/utils/index.d.ts +1 -0
- package/lib/cjs/utils/index.js +2 -0
- package/lib/cjs/utils/utils.d.ts +2 -1
- package/lib/cjs/utils/utils.js +27 -9
- package/lib/mjs/CDN.d.ts +1 -1
- package/lib/mjs/CDN.js +2 -2
- package/lib/mjs/Embed.d.ts +16 -7
- package/lib/mjs/Embed.js +75 -18
- package/lib/mjs/Formio.d.ts +0 -1
- package/lib/mjs/Formio.js +11 -3
- package/lib/mjs/PDF.js +2 -2
- package/lib/mjs/Webform.d.ts +6 -9
- package/lib/mjs/Webform.js +58 -82
- package/lib/mjs/WebformBuilder.d.ts +1 -1
- package/lib/mjs/WebformBuilder.js +31 -10
- package/lib/mjs/Wizard.d.ts +5 -4
- package/lib/mjs/Wizard.js +36 -27
- package/lib/mjs/WizardBuilder.d.ts +1 -0
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
- package/lib/mjs/addons/index.d.ts +1 -0
- package/lib/mjs/addons/index.js +5 -1
- package/lib/mjs/components/Components.d.ts +7 -0
- package/lib/mjs/components/Components.js +29 -0
- package/lib/mjs/components/_classes/component/Component.d.ts +57 -27
- package/lib/mjs/components/_classes/component/Component.js +191 -118
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +28 -11
- package/lib/mjs/components/_classes/nested/NestedComponent.js +88 -57
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
- package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +18 -5
- package/lib/mjs/components/builder.js +0 -2
- package/lib/mjs/components/button/Button.js +2 -1
- package/lib/mjs/components/columns/Columns.d.ts +1 -0
- package/lib/mjs/components/columns/Columns.js +2 -3
- package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
- package/lib/mjs/components/columns/editForm/Columns.edit.display.js +23 -1
- package/lib/mjs/components/container/Container.d.ts +1 -0
- package/lib/mjs/components/container/Container.js +2 -6
- package/lib/mjs/components/content/Content.d.ts +1 -0
- package/lib/mjs/components/content/Content.js +1 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -8
- package/lib/mjs/components/datagrid/DataGrid.js +9 -26
- package/lib/mjs/components/datamap/DataMap.js +2 -1
- package/lib/mjs/components/datetime/DateTime.js +0 -2
- package/lib/mjs/components/day/Day.js +2 -3
- package/lib/mjs/components/editgrid/EditGrid.d.ts +8 -4
- package/lib/mjs/components/editgrid/EditGrid.js +97 -76
- package/lib/mjs/components/email/Email.js +0 -1
- package/lib/mjs/components/file/File.js +1 -1
- package/lib/mjs/components/file/fixtures/comp3.d.ts +29 -0
- package/lib/mjs/components/file/fixtures/comp3.js +29 -0
- package/lib/mjs/components/form/Form.d.ts +2 -6
- package/lib/mjs/components/form/Form.js +45 -14
- package/lib/mjs/components/index.d.ts +0 -2
- package/lib/mjs/components/index.js +0 -2
- package/lib/mjs/components/number/Number.d.ts +1 -2
- package/lib/mjs/components/number/Number.js +4 -5
- package/lib/mjs/components/panel/Panel.d.ts +0 -1
- package/lib/mjs/components/panel/Panel.js +3 -9
- package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
- package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -16
- package/lib/mjs/components/phonenumber/PhoneNumber.js +17 -0
- package/lib/mjs/components/radio/Radio.js +0 -2
- package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
- package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
- package/lib/mjs/components/select/Select.js +3 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +1 -2
- package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
- package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +31 -2
- package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -0
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
- package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
- package/lib/mjs/components/textfield/TextField.js +20 -6
- package/lib/mjs/components/time/Time.js +0 -6
- package/lib/mjs/components/url/Url.js +0 -1
- package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +25 -2
- package/lib/mjs/components/well/editForm/Well.edit.display.js +18 -0
- package/lib/mjs/formio.embed.js +5 -3
- package/lib/mjs/formio.form.d.ts +1 -7
- package/lib/mjs/formio.form.js +3 -32
- package/lib/mjs/index.d.ts +2 -1
- package/lib/mjs/index.js +2 -1
- package/lib/mjs/providers/Providers.d.ts +0 -4
- package/lib/mjs/providers/storage/azure.d.ts +0 -2
- package/lib/mjs/providers/storage/azure.js +1 -6
- package/lib/mjs/providers/storage/googleDrive.d.ts +0 -1
- package/lib/mjs/providers/storage/googleDrive.js +0 -4
- package/lib/mjs/providers/storage/s3.d.ts +0 -1
- package/lib/mjs/providers/storage/s3.js +0 -4
- package/lib/mjs/templates/Templates.d.ts +1 -11
- package/lib/mjs/templates/Templates.js +4 -40
- package/lib/mjs/translations/en.d.ts +5 -0
- package/lib/mjs/translations/en.js +5 -0
- package/lib/mjs/utils/formUtils.js +1 -0
- package/lib/mjs/utils/index.d.ts +1 -0
- package/lib/mjs/utils/index.js +1 -0
- package/lib/mjs/utils/utils.d.ts +2 -1
- package/lib/mjs/utils/utils.js +24 -7
- package/package.json +13 -13
- package/lib/cjs/components/tree/Node.d.ts +0 -55
- package/lib/cjs/components/tree/Node.js +0 -185
- package/lib/cjs/components/tree/Tree.d.ts +0 -48
- package/lib/cjs/components/tree/Tree.form.d.ts +0 -3
- package/lib/cjs/components/tree/Tree.form.js +0 -21
- package/lib/cjs/components/tree/Tree.js +0 -383
- package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
- package/lib/cjs/components/tree/editForm/Tree.edit.data.js +0 -9
- package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
- package/lib/cjs/components/tree/editForm/Tree.edit.display.js +0 -12
- package/lib/cjs/components/tree/fixtures/comp1.d.ts +0 -23
- package/lib/cjs/components/tree/fixtures/comp1.js +0 -24
- package/lib/cjs/components/tree/fixtures/comp2.d.ts +0 -116
- package/lib/cjs/components/tree/fixtures/comp2.js +0 -82
- package/lib/cjs/components/tree/fixtures/comp3.d.ts +0 -24
- package/lib/cjs/components/tree/fixtures/comp3.js +0 -25
- package/lib/cjs/components/tree/fixtures/comp4.d.ts +0 -42
- package/lib/cjs/components/tree/fixtures/comp4.js +0 -47
- package/lib/cjs/components/tree/fixtures/index.d.ts +0 -5
- package/lib/cjs/components/tree/fixtures/index.js +0 -14
- package/lib/cjs/validator/Rules.d.ts +0 -53
- package/lib/cjs/validator/Rules.js +0 -22
- package/lib/cjs/validator/Validator.d.ts +0 -228
- package/lib/cjs/validator/Validator.js +0 -1113
- package/lib/cjs/validator/conjunctions/index.d.ts +0 -7
- package/lib/cjs/validator/conjunctions/index.js +0 -18
- package/lib/cjs/validator/operators/index.d.ts +0 -7
- package/lib/cjs/validator/operators/index.js +0 -18
- package/lib/cjs/validator/quickRules/index.d.ts +0 -7
- package/lib/cjs/validator/quickRules/index.js +0 -18
- package/lib/cjs/validator/rules/Custom.d.ts +0 -5
- package/lib/cjs/validator/rules/Custom.js +0 -30
- package/lib/cjs/validator/rules/Date.d.ts +0 -5
- package/lib/cjs/validator/rules/Date.js +0 -25
- package/lib/cjs/validator/rules/Day.d.ts +0 -5
- package/lib/cjs/validator/rules/Day.js +0 -58
- package/lib/cjs/validator/rules/Email.d.ts +0 -5
- package/lib/cjs/validator/rules/Email.js +0 -24
- package/lib/cjs/validator/rules/JSON.d.ts +0 -5
- package/lib/cjs/validator/rules/JSON.js +0 -29
- package/lib/cjs/validator/rules/Mask.d.ts +0 -5
- package/lib/cjs/validator/rules/Mask.js +0 -32
- package/lib/cjs/validator/rules/Max.d.ts +0 -5
- package/lib/cjs/validator/rules/Max.js +0 -21
- package/lib/cjs/validator/rules/MaxDate.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxDate.js +0 -34
- package/lib/cjs/validator/rules/MaxLength.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxLength.js +0 -20
- package/lib/cjs/validator/rules/MaxWords.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxWords.js +0 -20
- package/lib/cjs/validator/rules/MaxYear.d.ts +0 -5
- package/lib/cjs/validator/rules/MaxYear.js +0 -22
- package/lib/cjs/validator/rules/Min.d.ts +0 -5
- package/lib/cjs/validator/rules/Min.js +0 -21
- package/lib/cjs/validator/rules/MinDate.d.ts +0 -5
- package/lib/cjs/validator/rules/MinDate.js +0 -30
- package/lib/cjs/validator/rules/MinLength.d.ts +0 -5
- package/lib/cjs/validator/rules/MinLength.js +0 -20
- package/lib/cjs/validator/rules/MinWords.d.ts +0 -5
- package/lib/cjs/validator/rules/MinWords.js +0 -20
- package/lib/cjs/validator/rules/MinYear.d.ts +0 -5
- package/lib/cjs/validator/rules/MinYear.js +0 -22
- package/lib/cjs/validator/rules/Pattern.d.ts +0 -5
- package/lib/cjs/validator/rules/Pattern.js +0 -20
- package/lib/cjs/validator/rules/Required.d.ts +0 -5
- package/lib/cjs/validator/rules/Required.js +0 -17
- package/lib/cjs/validator/rules/Rule.d.ts +0 -7
- package/lib/cjs/validator/rules/Rule.js +0 -12
- package/lib/cjs/validator/rules/Select.d.ts +0 -5
- package/lib/cjs/validator/rules/Select.js +0 -95
- package/lib/cjs/validator/rules/Time.d.ts +0 -5
- package/lib/cjs/validator/rules/Time.js +0 -19
- package/lib/cjs/validator/rules/Unique.d.ts +0 -5
- package/lib/cjs/validator/rules/Unique.js +0 -69
- package/lib/cjs/validator/rules/Url.d.ts +0 -5
- package/lib/cjs/validator/rules/Url.js +0 -23
- package/lib/cjs/validator/rules/index.d.ts +0 -47
- package/lib/cjs/validator/rules/index.js +0 -51
- package/lib/cjs/validator/transformers/index.d.ts +0 -7
- package/lib/cjs/validator/transformers/index.js +0 -18
- package/lib/cjs/validator/valueSources/index.d.ts +0 -7
- package/lib/cjs/validator/valueSources/index.js +0 -18
- package/lib/mjs/components/tree/Node.d.ts +0 -55
- package/lib/mjs/components/tree/Node.js +0 -179
- package/lib/mjs/components/tree/Tree.d.ts +0 -48
- package/lib/mjs/components/tree/Tree.form.d.ts +0 -3
- package/lib/mjs/components/tree/Tree.form.js +0 -15
- package/lib/mjs/components/tree/Tree.js +0 -384
- package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
- package/lib/mjs/components/tree/editForm/Tree.edit.data.js +0 -7
- package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
- package/lib/mjs/components/tree/editForm/Tree.edit.display.js +0 -10
- package/lib/mjs/components/tree/fixtures/comp1.d.ts +0 -23
- package/lib/mjs/components/tree/fixtures/comp1.js +0 -22
- package/lib/mjs/components/tree/fixtures/comp2.d.ts +0 -116
- package/lib/mjs/components/tree/fixtures/comp2.js +0 -80
- package/lib/mjs/components/tree/fixtures/comp3.d.ts +0 -24
- package/lib/mjs/components/tree/fixtures/comp3.js +0 -23
- package/lib/mjs/components/tree/fixtures/comp4.d.ts +0 -42
- package/lib/mjs/components/tree/fixtures/comp4.js +0 -45
- package/lib/mjs/components/tree/fixtures/index.d.ts +0 -5
- package/lib/mjs/components/tree/fixtures/index.js +0 -5
- package/lib/mjs/validator/Rules.d.ts +0 -53
- package/lib/mjs/validator/Rules.js +0 -17
- package/lib/mjs/validator/Validator.d.ts +0 -228
- package/lib/mjs/validator/Validator.js +0 -1103
- package/lib/mjs/validator/conjunctions/index.d.ts +0 -7
- package/lib/mjs/validator/conjunctions/index.js +0 -16
- package/lib/mjs/validator/operators/index.d.ts +0 -7
- package/lib/mjs/validator/operators/index.js +0 -16
- package/lib/mjs/validator/quickRules/index.d.ts +0 -7
- package/lib/mjs/validator/quickRules/index.js +0 -16
- package/lib/mjs/validator/rules/Custom.d.ts +0 -5
- package/lib/mjs/validator/rules/Custom.js +0 -21
- package/lib/mjs/validator/rules/Date.d.ts +0 -5
- package/lib/mjs/validator/rules/Date.js +0 -16
- package/lib/mjs/validator/rules/Day.d.ts +0 -5
- package/lib/mjs/validator/rules/Day.js +0 -49
- package/lib/mjs/validator/rules/Email.d.ts +0 -5
- package/lib/mjs/validator/rules/Email.js +0 -15
- package/lib/mjs/validator/rules/JSON.d.ts +0 -5
- package/lib/mjs/validator/rules/JSON.js +0 -20
- package/lib/mjs/validator/rules/Mask.d.ts +0 -5
- package/lib/mjs/validator/rules/Mask.js +0 -23
- package/lib/mjs/validator/rules/Max.d.ts +0 -5
- package/lib/mjs/validator/rules/Max.js +0 -12
- package/lib/mjs/validator/rules/MaxDate.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxDate.js +0 -25
- package/lib/mjs/validator/rules/MaxLength.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxLength.js +0 -11
- package/lib/mjs/validator/rules/MaxWords.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxWords.js +0 -11
- package/lib/mjs/validator/rules/MaxYear.d.ts +0 -5
- package/lib/mjs/validator/rules/MaxYear.js +0 -13
- package/lib/mjs/validator/rules/Min.d.ts +0 -5
- package/lib/mjs/validator/rules/Min.js +0 -12
- package/lib/mjs/validator/rules/MinDate.d.ts +0 -5
- package/lib/mjs/validator/rules/MinDate.js +0 -21
- package/lib/mjs/validator/rules/MinLength.d.ts +0 -5
- package/lib/mjs/validator/rules/MinLength.js +0 -11
- package/lib/mjs/validator/rules/MinWords.d.ts +0 -5
- package/lib/mjs/validator/rules/MinWords.js +0 -11
- package/lib/mjs/validator/rules/MinYear.d.ts +0 -5
- package/lib/mjs/validator/rules/MinYear.js +0 -13
- package/lib/mjs/validator/rules/Pattern.d.ts +0 -5
- package/lib/mjs/validator/rules/Pattern.js +0 -11
- package/lib/mjs/validator/rules/Required.d.ts +0 -5
- package/lib/mjs/validator/rules/Required.js +0 -8
- package/lib/mjs/validator/rules/Rule.d.ts +0 -7
- package/lib/mjs/validator/rules/Rule.js +0 -9
- package/lib/mjs/validator/rules/Select.d.ts +0 -5
- package/lib/mjs/validator/rules/Select.js +0 -86
- package/lib/mjs/validator/rules/Time.d.ts +0 -5
- package/lib/mjs/validator/rules/Time.js +0 -10
- package/lib/mjs/validator/rules/Unique.d.ts +0 -5
- package/lib/mjs/validator/rules/Unique.js +0 -60
- package/lib/mjs/validator/rules/Url.d.ts +0 -5
- package/lib/mjs/validator/rules/Url.js +0 -14
- package/lib/mjs/validator/rules/index.d.ts +0 -47
- package/lib/mjs/validator/rules/index.js +0 -46
- package/lib/mjs/validator/transformers/index.d.ts +0 -7
- package/lib/mjs/validator/transformers/index.js +0 -16
- package/lib/mjs/validator/valueSources/index.d.ts +0 -7
- package/lib/mjs/validator/valueSources/index.js +0 -16
@@ -45,9 +45,10 @@ export default class NumberComponent extends Input {
|
|
45
45
|
}
|
46
46
|
constructor(...args) {
|
47
47
|
super(...args);
|
48
|
-
this.validators = this.validators.concat(['min', 'max']);
|
49
48
|
const separators = getNumberSeparators(this.options.language || navigator.language);
|
50
|
-
|
49
|
+
this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
|
50
|
+
|| this.options.properties?.decimalSeparator
|
51
|
+
|| separators.decimalSeparator;
|
51
52
|
if (this.component.delimiter) {
|
52
53
|
if (this.options.hasOwnProperty('thousandsSeparator')) {
|
53
54
|
console.warn("Property 'thousandsSeparator' is deprecated. Please use i18n to specify delimiter.");
|
@@ -57,10 +58,8 @@ export default class NumberComponent extends Input {
|
|
57
58
|
else {
|
58
59
|
this.delimiter = '';
|
59
60
|
}
|
61
|
+
const requireDecimal = _.get(this.component, 'requireDecimal', false);
|
60
62
|
this.decimalLimit = getNumberDecimalLimit(this.component, requireDecimal ? 2 : 20);
|
61
|
-
this.decimalSeparator = this.decimalLimit !== 0 ?
|
62
|
-
this.options.decimalSeparator || this.options.properties?.decimalSeparator || separators.decimalSeparator :
|
63
|
-
'';
|
64
63
|
// Currencies to override BrowserLanguage Config. Object key {}
|
65
64
|
if (_.has(this.options, `languageOverride.${this.options.language}`)) {
|
66
65
|
const override = _.get(this.options, `languageOverride.${this.options.language}`);
|
@@ -10,6 +10,5 @@ export default class PanelComponent extends NestedComponent {
|
|
10
10
|
static savedValueTypes(): never[];
|
11
11
|
constructor(...args: any[]);
|
12
12
|
noField: boolean;
|
13
|
-
getComponent(path: any, fn: any, originalPath: any): Object;
|
14
13
|
}
|
15
14
|
import NestedComponent from '../_classes/nested/NestedComponent';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import NestedComponent from '../_classes/nested/NestedComponent';
|
2
|
-
import {
|
2
|
+
import { isChildOf } from '../../utils/utils';
|
3
3
|
import FormComponent from '../form/Form';
|
4
4
|
export default class PanelComponent extends NestedComponent {
|
5
5
|
static schema(...extend) {
|
@@ -39,17 +39,11 @@ export default class PanelComponent extends NestedComponent {
|
|
39
39
|
constructor(...args) {
|
40
40
|
super(...args);
|
41
41
|
this.noField = true;
|
42
|
-
this.on('componentError', () => {
|
42
|
+
this.on('componentError', (err) => {
|
43
43
|
//change collapsed value only when the panel is collapsed to avoid additional redrawing that prevents validation messages
|
44
|
-
if (
|
44
|
+
if (isChildOf(err.instance, this) && this.collapsed) {
|
45
45
|
this.collapsed = false;
|
46
46
|
}
|
47
47
|
});
|
48
48
|
}
|
49
|
-
getComponent(path, fn, originalPath) {
|
50
|
-
if (this.root?.parent instanceof FormComponent) {
|
51
|
-
path = path.replace(this._parentPath, '');
|
52
|
-
}
|
53
|
-
return super.getComponent(path, fn, originalPath);
|
54
|
-
}
|
55
49
|
}
|
@@ -79,42 +79,17 @@ declare const _default: ({
|
|
79
79
|
type: string;
|
80
80
|
input: boolean;
|
81
81
|
components: ({
|
82
|
-
type: string;
|
83
|
-
input: boolean;
|
84
|
-
label: string;
|
85
|
-
key: string;
|
86
|
-
dataSrc: string;
|
87
|
-
data: {
|
88
|
-
values: {
|
89
|
-
label: string;
|
90
|
-
value: string;
|
91
|
-
}[];
|
92
|
-
};
|
93
|
-
defaultValue?: undefined;
|
94
|
-
conditional?: undefined;
|
95
|
-
tooltip?: undefined;
|
96
|
-
weight?: undefined;
|
97
|
-
optionsLabelPosition?: undefined;
|
98
|
-
values?: undefined;
|
99
|
-
inline?: undefined;
|
100
|
-
inputType?: undefined;
|
101
|
-
} | {
|
102
82
|
input: boolean;
|
103
83
|
type: string;
|
104
84
|
label: string;
|
105
85
|
key: string;
|
106
86
|
defaultValue: boolean;
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
})[];
|
112
|
-
'==='?: undefined;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
dataSrc?: undefined;
|
116
|
-
data?: undefined;
|
87
|
+
customConditional({ data, buildingForm }: {
|
88
|
+
data?: {} | undefined;
|
89
|
+
buildingForm?: {} | undefined;
|
90
|
+
}): boolean;
|
117
91
|
tooltip?: undefined;
|
92
|
+
conditional?: undefined;
|
118
93
|
weight?: undefined;
|
119
94
|
optionsLabelPosition?: undefined;
|
120
95
|
values?: undefined;
|
@@ -132,11 +107,8 @@ declare const _default: ({
|
|
132
107
|
'===': (boolean | {
|
133
108
|
var: string;
|
134
109
|
})[];
|
135
|
-
'!=='?: undefined;
|
136
110
|
};
|
137
111
|
};
|
138
|
-
dataSrc?: undefined;
|
139
|
-
data?: undefined;
|
140
112
|
weight?: undefined;
|
141
113
|
optionsLabelPosition?: undefined;
|
142
114
|
values?: undefined;
|
@@ -160,10 +132,8 @@ declare const _default: ({
|
|
160
132
|
cancel: boolean;
|
161
133
|
next: boolean;
|
162
134
|
};
|
163
|
-
dataSrc?: undefined;
|
164
|
-
data?: undefined;
|
165
|
-
conditional?: undefined;
|
166
135
|
tooltip?: undefined;
|
136
|
+
conditional?: undefined;
|
167
137
|
} | {
|
168
138
|
weight: number;
|
169
139
|
label: string;
|
@@ -173,8 +143,6 @@ declare const _default: ({
|
|
173
143
|
inputType: string;
|
174
144
|
defaultValue: boolean;
|
175
145
|
tooltip: string;
|
176
|
-
dataSrc?: undefined;
|
177
|
-
data?: undefined;
|
178
146
|
conditional?: undefined;
|
179
147
|
optionsLabelPosition?: undefined;
|
180
148
|
values?: undefined;
|
@@ -75,28 +75,15 @@ export default [
|
|
75
75
|
type: 'fieldset',
|
76
76
|
input: false,
|
77
77
|
components: [
|
78
|
-
{
|
79
|
-
type: 'select',
|
80
|
-
input: true,
|
81
|
-
label: 'Breadcrumb Type',
|
82
|
-
key: 'breadcrumb',
|
83
|
-
dataSrc: 'values',
|
84
|
-
data: {
|
85
|
-
values: [
|
86
|
-
{ label: 'Default', value: 'default' },
|
87
|
-
{ label: 'Condensed', value: 'condensed' },
|
88
|
-
{ label: 'Hidden', value: 'none' },
|
89
|
-
]
|
90
|
-
}
|
91
|
-
},
|
92
78
|
{
|
93
79
|
input: true,
|
94
80
|
type: 'checkbox',
|
95
81
|
label: 'Allow click on Breadcrumb',
|
96
82
|
key: 'breadcrumbClickable',
|
97
83
|
defaultValue: true,
|
98
|
-
|
99
|
-
|
84
|
+
customConditional({ data = {}, buildingForm = {} }) {
|
85
|
+
const formSettings = buildingForm.settings || {};
|
86
|
+
return ![data.breadcrumb, formSettings.wizardBreadcrumbsType].includes('none');
|
100
87
|
}
|
101
88
|
},
|
102
89
|
{
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import TextFieldComponent from '../textfield/TextField';
|
2
|
+
import _ from 'lodash';
|
2
3
|
export default class PhoneNumberComponent extends TextFieldComponent {
|
3
4
|
static schema(...extend) {
|
4
5
|
return TextFieldComponent.schema({
|
@@ -24,4 +25,20 @@ export default class PhoneNumberComponent extends TextFieldComponent {
|
|
24
25
|
get defaultSchema() {
|
25
26
|
return PhoneNumberComponent.schema();
|
26
27
|
}
|
28
|
+
getValueAsString(value, options) {
|
29
|
+
if (options?.email && this.visible && !this.skipInEmail && _.isObject(value)) {
|
30
|
+
const result = (`
|
31
|
+
<table border="1" style="width:100%">
|
32
|
+
<tbody>
|
33
|
+
<tr>
|
34
|
+
<th style="padding: 5px 10px;">${value.maskName}</th>
|
35
|
+
<td style="width:100%;padding:5px 10px;">${value.value}</td>
|
36
|
+
</tr>
|
37
|
+
</tbody>
|
38
|
+
</table>
|
39
|
+
`);
|
40
|
+
return result;
|
41
|
+
}
|
42
|
+
return super.getValueAsString(value, options);
|
43
|
+
}
|
27
44
|
}
|
@@ -97,7 +97,6 @@ export default class RadioComponent extends ListComponent {
|
|
97
97
|
init() {
|
98
98
|
super.init();
|
99
99
|
this.templateData = {};
|
100
|
-
this.validators = this.validators.concat(['select', 'onlyAvailableItems', 'availableValueProperty']);
|
101
100
|
// Trigger an update.//
|
102
101
|
let updateArgs = [];
|
103
102
|
const triggerUpdate = _.debounce((...args) => {
|
@@ -253,7 +252,6 @@ export default class RadioComponent extends ListComponent {
|
|
253
252
|
Formio.makeRequest(this.options.formio, 'select', url, method, body, options)
|
254
253
|
.then((response) => {
|
255
254
|
this.loading = false;
|
256
|
-
this.error = null;
|
257
255
|
this.setItems(response);
|
258
256
|
this.optionsLoaded = true;
|
259
257
|
this.redraw();
|
@@ -17,7 +17,7 @@ export default class ReCaptchaComponent extends Component {
|
|
17
17
|
recaptchaVerifiedPromise: Promise<void> | undefined;
|
18
18
|
isLoading: boolean | undefined;
|
19
19
|
sendVerificationRequest(token: any): any;
|
20
|
-
checkComponentValidity(data: any, dirty: any, row: any, options?: {}): any;
|
20
|
+
checkComponentValidity(data: any, dirty: any, row: any, options?: {}, errors?: any[]): any;
|
21
21
|
normalizeValue(newValue: any): any;
|
22
22
|
}
|
23
23
|
import Component from '../_classes/component/Component';
|
@@ -108,13 +108,13 @@ export default class ReCaptchaComponent extends Component {
|
|
108
108
|
return Formio.makeStaticRequest(`${Formio.projectUrl}/recaptcha?recaptchaToken=${token}`)
|
109
109
|
.then((verificationResult) => ({ verificationResult, token }));
|
110
110
|
}
|
111
|
-
checkComponentValidity(data, dirty, row, options = {}) {
|
111
|
+
checkComponentValidity(data, dirty, row, options = {}, errors = []) {
|
112
112
|
data = data || this.rootValue;
|
113
113
|
row = row || this.data;
|
114
114
|
const { async = false } = options;
|
115
115
|
// Verification could be async only
|
116
116
|
if (!async) {
|
117
|
-
return super.checkComponentValidity(data, dirty, row, options);
|
117
|
+
return super.checkComponentValidity(data, dirty, row, options, errors);
|
118
118
|
}
|
119
119
|
const componentData = row[this.component.key];
|
120
120
|
if (!componentData || !componentData.token) {
|
@@ -86,7 +86,6 @@ export default class SelectComponent extends ListComponent {
|
|
86
86
|
init() {
|
87
87
|
super.init();
|
88
88
|
this.templateData = {};
|
89
|
-
this.validators = this.validators.concat(['select', 'onlyAvailableItems']);
|
90
89
|
// Trigger an update.
|
91
90
|
let updateArgs = [];
|
92
91
|
const triggerUpdate = _.debounce((...args) => {
|
@@ -546,7 +545,6 @@ export default class SelectComponent extends ListComponent {
|
|
546
545
|
Formio.makeRequest(this.options.formio, 'select', url, method, body, options)
|
547
546
|
.then((response) => {
|
548
547
|
this.loading = false;
|
549
|
-
this.error = null;
|
550
548
|
this.setItems(response, !!search);
|
551
549
|
})
|
552
550
|
.catch((err) => {
|
@@ -1459,6 +1457,9 @@ export default class SelectComponent extends ListComponent {
|
|
1459
1457
|
return '-';
|
1460
1458
|
}
|
1461
1459
|
}
|
1460
|
+
if (this.isEntireObjectDisplay() && _.isObject(value)) {
|
1461
|
+
return JSON.stringify(value);
|
1462
|
+
}
|
1462
1463
|
return !_.isNil(value)
|
1463
1464
|
? this.itemTemplate(value)
|
1464
1465
|
: '-';
|
@@ -37,7 +37,6 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
37
37
|
};
|
38
38
|
static savedValueTypes(schema: any): string[];
|
39
39
|
constructor(...args: any[]);
|
40
|
-
validators: string[];
|
41
40
|
get emptyValue(): any;
|
42
41
|
/**
|
43
42
|
* Only empty if the values are all false.
|
@@ -47,6 +46,6 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
47
46
|
*/
|
48
47
|
isEmpty(value?: any): boolean;
|
49
48
|
setInputsDisabled(value: any, onlyUnchecked: any): void;
|
50
|
-
checkComponentValidity(data: any, dirty: any, rowData: any, options: any): boolean;
|
49
|
+
checkComponentValidity(data: any, dirty: any, rowData: any, options: any, errors?: any[]): boolean;
|
51
50
|
}
|
52
51
|
import RadioComponent from '../radio/Radio';
|
@@ -44,7 +44,6 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
44
44
|
}
|
45
45
|
constructor(...args) {
|
46
46
|
super(...args);
|
47
|
-
this.validators = this.validators.concat('minSelectedCount', 'maxSelectedCount', 'availableValueProperty');
|
48
47
|
}
|
49
48
|
init() {
|
50
49
|
super.init();
|
@@ -209,10 +208,10 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
209
208
|
});
|
210
209
|
}
|
211
210
|
}
|
212
|
-
checkComponentValidity(data, dirty, rowData, options) {
|
211
|
+
checkComponentValidity(data, dirty, rowData, options, errors = []) {
|
213
212
|
const minCount = this.component.validate.minSelectedCount;
|
214
213
|
const maxCount = this.component.validate.maxSelectedCount;
|
215
|
-
if (!this.shouldSkipValidation(data,
|
214
|
+
if (!this.shouldSkipValidation(data, rowData, options)) {
|
216
215
|
const isValid = this.isValid(data, dirty);
|
217
216
|
if ((maxCount || minCount)) {
|
218
217
|
const count = Object.keys(this.validationValue).reduce((total, key) => {
|
@@ -229,19 +228,21 @@ export default class SelectBoxesComponent extends RadioComponent {
|
|
229
228
|
this.setInputsDisabled(false);
|
230
229
|
}
|
231
230
|
if (!isValid && maxCount && count > maxCount) {
|
232
|
-
const message = this.t(this.component.maxSelectedCountMessage || 'You
|
231
|
+
const message = this.t(this.component.maxSelectedCountMessage || 'You may only select up to {{maxCount}} items', { maxCount });
|
232
|
+
this.errors.push({ message });
|
233
233
|
this.setCustomValidity(message, dirty);
|
234
234
|
return false;
|
235
235
|
}
|
236
236
|
else if (!isValid && minCount && count < minCount) {
|
237
237
|
this.setInputsDisabled(false);
|
238
|
-
const message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items
|
238
|
+
const message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items', { minCount });
|
239
|
+
this.errors.push({ message });
|
239
240
|
this.setCustomValidity(message, dirty);
|
240
241
|
return false;
|
241
242
|
}
|
242
243
|
}
|
243
244
|
}
|
244
|
-
return super.checkComponentValidity(data, dirty, rowData, options);
|
245
|
+
return super.checkComponentValidity(data, dirty, rowData, options, errors);
|
245
246
|
}
|
246
247
|
validateValueAvailability(setting, value) {
|
247
248
|
if (!boolValue(setting) || !value) {
|
@@ -1,12 +1,32 @@
|
|
1
1
|
declare const _default: ({
|
2
2
|
key: string;
|
3
3
|
ignore: boolean;
|
4
|
+
weight?: undefined;
|
4
5
|
type?: undefined;
|
5
|
-
label?: undefined;
|
6
6
|
input?: undefined;
|
7
|
-
|
7
|
+
label?: undefined;
|
8
8
|
placeholder?: undefined;
|
9
9
|
tooltip?: undefined;
|
10
|
+
validate?: undefined;
|
11
|
+
autofocus?: undefined;
|
12
|
+
overrideEditForm?: undefined;
|
13
|
+
dataSrc?: undefined;
|
14
|
+
data?: undefined;
|
15
|
+
defaultValue?: undefined;
|
16
|
+
} | {
|
17
|
+
weight: number;
|
18
|
+
type: string;
|
19
|
+
input: boolean;
|
20
|
+
key: string;
|
21
|
+
label: string;
|
22
|
+
placeholder: string;
|
23
|
+
tooltip: string;
|
24
|
+
validate: {
|
25
|
+
required: boolean;
|
26
|
+
};
|
27
|
+
autofocus: boolean;
|
28
|
+
overrideEditForm: boolean;
|
29
|
+
ignore?: undefined;
|
10
30
|
dataSrc?: undefined;
|
11
31
|
data?: undefined;
|
12
32
|
defaultValue?: undefined;
|
@@ -19,6 +39,9 @@ declare const _default: ({
|
|
19
39
|
placeholder: string;
|
20
40
|
tooltip: string;
|
21
41
|
ignore?: undefined;
|
42
|
+
validate?: undefined;
|
43
|
+
autofocus?: undefined;
|
44
|
+
overrideEditForm?: undefined;
|
22
45
|
dataSrc?: undefined;
|
23
46
|
data?: undefined;
|
24
47
|
defaultValue?: undefined;
|
@@ -31,6 +54,9 @@ declare const _default: ({
|
|
31
54
|
tooltip: string;
|
32
55
|
ignore?: undefined;
|
33
56
|
placeholder?: undefined;
|
57
|
+
validate?: undefined;
|
58
|
+
autofocus?: undefined;
|
59
|
+
overrideEditForm?: undefined;
|
34
60
|
dataSrc?: undefined;
|
35
61
|
data?: undefined;
|
36
62
|
defaultValue?: undefined;
|
@@ -51,5 +77,8 @@ declare const _default: ({
|
|
51
77
|
weight: number;
|
52
78
|
ignore?: undefined;
|
53
79
|
placeholder?: undefined;
|
80
|
+
validate?: undefined;
|
81
|
+
autofocus?: undefined;
|
82
|
+
overrideEditForm?: undefined;
|
54
83
|
})[];
|
55
84
|
export default _default;
|
@@ -31,6 +31,24 @@ export default [
|
|
31
31
|
key: 'tableView',
|
32
32
|
ignore: true
|
33
33
|
},
|
34
|
+
{
|
35
|
+
key: 'hideLabel',
|
36
|
+
ignore: true
|
37
|
+
},
|
38
|
+
{
|
39
|
+
weight: 0,
|
40
|
+
type: 'textfield',
|
41
|
+
input: true,
|
42
|
+
key: 'label',
|
43
|
+
label: 'Label',
|
44
|
+
placeholder: 'Field Label',
|
45
|
+
tooltip: 'The label for this field.',
|
46
|
+
validate: {
|
47
|
+
required: true
|
48
|
+
},
|
49
|
+
autofocus: true,
|
50
|
+
overrideEditForm: true
|
51
|
+
},
|
34
52
|
{
|
35
53
|
type: 'number',
|
36
54
|
label: 'Number of Rows',
|
@@ -106,4 +124,8 @@ export default [
|
|
106
124
|
tooltip: 'Condense the size of the table.',
|
107
125
|
weight: 704
|
108
126
|
},
|
127
|
+
{
|
128
|
+
key: 'hideLabel',
|
129
|
+
ignore: true
|
130
|
+
},
|
109
131
|
];
|
@@ -1,13 +1,33 @@
|
|
1
1
|
declare const _default: ({
|
2
2
|
key: string;
|
3
3
|
ignore: boolean;
|
4
|
+
weight?: undefined;
|
4
5
|
type?: undefined;
|
5
6
|
input?: undefined;
|
6
7
|
label?: undefined;
|
7
|
-
|
8
|
+
placeholder?: undefined;
|
9
|
+
tooltip?: undefined;
|
10
|
+
validate?: undefined;
|
11
|
+
autofocus?: undefined;
|
12
|
+
overrideEditForm?: undefined;
|
13
|
+
reorder?: undefined;
|
14
|
+
components?: undefined;
|
15
|
+
} | {
|
16
|
+
weight: number;
|
17
|
+
type: string;
|
18
|
+
input: boolean;
|
19
|
+
key: string;
|
20
|
+
label: string;
|
21
|
+
placeholder: string;
|
22
|
+
tooltip: string;
|
23
|
+
validate: {
|
24
|
+
required: boolean;
|
25
|
+
};
|
26
|
+
autofocus: boolean;
|
27
|
+
overrideEditForm: boolean;
|
28
|
+
ignore?: undefined;
|
8
29
|
reorder?: undefined;
|
9
30
|
components?: undefined;
|
10
|
-
tooltip?: undefined;
|
11
31
|
} | {
|
12
32
|
key: string;
|
13
33
|
type: string;
|
@@ -34,7 +54,11 @@ declare const _default: ({
|
|
34
54
|
};
|
35
55
|
})[];
|
36
56
|
ignore?: undefined;
|
57
|
+
placeholder?: undefined;
|
37
58
|
tooltip?: undefined;
|
59
|
+
validate?: undefined;
|
60
|
+
autofocus?: undefined;
|
61
|
+
overrideEditForm?: undefined;
|
38
62
|
} | {
|
39
63
|
weight: number;
|
40
64
|
type: string;
|
@@ -43,6 +67,10 @@ declare const _default: ({
|
|
43
67
|
key: string;
|
44
68
|
input: boolean;
|
45
69
|
ignore?: undefined;
|
70
|
+
placeholder?: undefined;
|
71
|
+
validate?: undefined;
|
72
|
+
autofocus?: undefined;
|
73
|
+
overrideEditForm?: undefined;
|
46
74
|
reorder?: undefined;
|
47
75
|
components?: undefined;
|
48
76
|
})[];
|
@@ -31,6 +31,24 @@ export default [
|
|
31
31
|
key: 'tableView',
|
32
32
|
ignore: true
|
33
33
|
},
|
34
|
+
{
|
35
|
+
key: 'hideLabel',
|
36
|
+
ignore: true
|
37
|
+
},
|
38
|
+
{
|
39
|
+
weight: 0,
|
40
|
+
type: 'textfield',
|
41
|
+
input: true,
|
42
|
+
key: 'label',
|
43
|
+
label: 'Label',
|
44
|
+
placeholder: 'Field Label',
|
45
|
+
tooltip: 'The label for this field.',
|
46
|
+
validate: {
|
47
|
+
required: true
|
48
|
+
},
|
49
|
+
autofocus: true,
|
50
|
+
overrideEditForm: true
|
51
|
+
},
|
34
52
|
{
|
35
53
|
key: 'components',
|
36
54
|
type: 'datagrid',
|
@@ -63,4 +81,8 @@ export default [
|
|
63
81
|
key: 'verticalLayout',
|
64
82
|
input: true
|
65
83
|
},
|
84
|
+
{
|
85
|
+
key: 'hideLabel',
|
86
|
+
ignore: true
|
87
|
+
},
|
66
88
|
];
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import Input from '../_classes/input/Input';
|
2
2
|
import { conformToMask } from '@formio/vanilla-text-mask';
|
3
3
|
import * as FormioUtils from '../../utils/utils';
|
4
|
+
import _ from 'lodash';
|
4
5
|
export default class TextFieldComponent extends Input {
|
5
6
|
static schema(...extend) {
|
6
7
|
return Input.schema({
|
@@ -186,12 +187,6 @@ export default class TextFieldComponent extends Input {
|
|
186
187
|
maskName: maskInput ? maskInput.value : undefined
|
187
188
|
};
|
188
189
|
}
|
189
|
-
getValueAsString(value, options) {
|
190
|
-
if (value && this.component.inputFormat === 'plain' && /<[^<>]+>/g.test(value)) {
|
191
|
-
value = value.replaceAll('<', '<').replaceAll('>', '>');
|
192
|
-
}
|
193
|
-
return super.getValueAsString(value, options);
|
194
|
-
}
|
195
190
|
isHtmlRenderMode() {
|
196
191
|
return super.isHtmlRenderMode() ||
|
197
192
|
((this.options.readOnly || this.disabled) &&
|
@@ -226,4 +221,23 @@ export default class TextFieldComponent extends Input {
|
|
226
221
|
this.dataValue = value;
|
227
222
|
return Promise.resolve(value).then(() => super.beforeSubmit());
|
228
223
|
}
|
224
|
+
getValueAsString(value, options) {
|
225
|
+
if (options?.email && this.visible && !this.skipInEmail && _.isObject(value)) {
|
226
|
+
const result = (`
|
227
|
+
<table border="1" style="width:100%">
|
228
|
+
<tbody>
|
229
|
+
<tr>
|
230
|
+
<th style="padding: 5px 10px;">${value.maskName}</th>
|
231
|
+
<td style="width:100%;padding:5px 10px;">${value.value}</td>
|
232
|
+
</tr>
|
233
|
+
</tbody>
|
234
|
+
</table>
|
235
|
+
`);
|
236
|
+
return result;
|
237
|
+
}
|
238
|
+
if (value && this.component.inputFormat === 'plain' && /<[^<>]+>/g.test(value)) {
|
239
|
+
value = value.replaceAll('<', '<').replaceAll('>', '>');
|
240
|
+
}
|
241
|
+
return super.getValueAsString(value, options);
|
242
|
+
}
|
229
243
|
}
|
@@ -33,12 +33,6 @@ export default class TimeComponent extends TextFieldComponent {
|
|
33
33
|
: (this.component.inputType || 'time');
|
34
34
|
this.rawData = this.component.multiple ? [] : this.emptyValue;
|
35
35
|
}
|
36
|
-
init() {
|
37
|
-
super.init();
|
38
|
-
if (this.component.inputType === 'text') {
|
39
|
-
this.validators.push('time');
|
40
|
-
}
|
41
|
-
}
|
42
36
|
static get builderInfo() {
|
43
37
|
return {
|
44
38
|
title: 'Time',
|
@@ -1,5 +1,28 @@
|
|
1
|
-
declare const _default: {
|
1
|
+
declare const _default: ({
|
2
2
|
key: string;
|
3
3
|
ignore: boolean;
|
4
|
-
|
4
|
+
weight?: undefined;
|
5
|
+
type?: undefined;
|
6
|
+
input?: undefined;
|
7
|
+
label?: undefined;
|
8
|
+
placeholder?: undefined;
|
9
|
+
tooltip?: undefined;
|
10
|
+
validate?: undefined;
|
11
|
+
autofocus?: undefined;
|
12
|
+
overrideEditForm?: undefined;
|
13
|
+
} | {
|
14
|
+
weight: number;
|
15
|
+
type: string;
|
16
|
+
input: boolean;
|
17
|
+
key: string;
|
18
|
+
label: string;
|
19
|
+
placeholder: string;
|
20
|
+
tooltip: string;
|
21
|
+
validate: {
|
22
|
+
required: boolean;
|
23
|
+
};
|
24
|
+
autofocus: boolean;
|
25
|
+
overrideEditForm: boolean;
|
26
|
+
ignore?: undefined;
|
27
|
+
})[];
|
5
28
|
export default _default;
|
@@ -27,4 +27,22 @@ export default [
|
|
27
27
|
key: 'tableView',
|
28
28
|
ignore: true
|
29
29
|
},
|
30
|
+
{
|
31
|
+
key: 'hideLabel',
|
32
|
+
ignore: true
|
33
|
+
},
|
34
|
+
{
|
35
|
+
weight: 0,
|
36
|
+
type: 'textfield',
|
37
|
+
input: true,
|
38
|
+
key: 'label',
|
39
|
+
label: 'Label',
|
40
|
+
placeholder: 'Field Label',
|
41
|
+
tooltip: 'The label for this field.',
|
42
|
+
validate: {
|
43
|
+
required: true
|
44
|
+
},
|
45
|
+
autofocus: true,
|
46
|
+
overrideEditForm: true
|
47
|
+
},
|
30
48
|
];
|
package/lib/mjs/formio.embed.js
CHANGED
@@ -22,9 +22,11 @@ if (thisScript) {
|
|
22
22
|
config.formioPath(scriptSrc);
|
23
23
|
}
|
24
24
|
scriptSrc = scriptSrc.join('/');
|
25
|
+
const debug = (query.debug === 'true' || query.debug === '1');
|
26
|
+
const renderer = debug ? 'formio.form' : 'formio.form.min';
|
25
27
|
Formio.config = Object.assign({
|
26
|
-
script: query.script || (`${config.updatePath ? config.updatePath() : scriptSrc}
|
27
|
-
style: query.styles || (`${config.updatePath ? config.updatePath() : scriptSrc}
|
28
|
+
script: query.script || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.js`),
|
29
|
+
style: query.styles || (`${config.updatePath ? config.updatePath() : scriptSrc}/${renderer}.css`),
|
28
30
|
cdn: query.cdn,
|
29
31
|
class: (query.class || 'formio-form-wrapper'),
|
30
32
|
src: query.src,
|
@@ -35,7 +37,7 @@ if (thisScript) {
|
|
35
37
|
submit: query.submit,
|
36
38
|
includeLibs: (query.libs === 'true' || query.libs === '1'),
|
37
39
|
template: query.template,
|
38
|
-
debug:
|
40
|
+
debug: debug,
|
39
41
|
config: {},
|
40
42
|
redirect: (query.return || query.redirect),
|
41
43
|
embedCSS: (`${config.updatePath ? config.updatePath() : scriptSrc}/formio.embed.css`),
|