@digigov/form 1.2.0-dcbd7ded → 2.0.0-07ee8440
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/Field/ErrorGroup/index.js +48 -0
- package/{Questions/index.spec → Field/ErrorGroup}/package.json +1 -1
- package/Field/ErrorGroup.d.ts +15 -0
- package/Field/ErrorGroup.js.map +7 -0
- package/Field/FieldBase/index.js +112 -76
- package/Field/FieldBase.js.map +7 -0
- package/Field/FieldBaseContainer/index.js +30 -37
- package/Field/FieldBaseContainer.js.map +7 -0
- package/Field/FieldConditional/index.js +79 -53
- package/Field/FieldConditional.js.map +7 -0
- package/Field/index.js +107 -63
- package/Field/index.js.map +7 -0
- package/Field/types/index.js +1 -1
- package/Field/types.d.ts +44 -5
- package/Field/types.js.map +7 -0
- package/Field/utils/calculateField/index.js +27 -0
- package/{FieldArray/FieldArray.stories → Field/utils/calculateField}/package.json +1 -1
- package/Field/utils/calculateField.d.ts +2 -0
- package/Field/utils/calculateField.js.map +7 -0
- package/Field/utils/evaluateFieldWithConditions/index.js +26 -0
- package/{inputs/DateInput/__stories__/Default → Field/utils/evaluateFieldWithConditions}/package.json +1 -1
- package/Field/utils/evaluateFieldWithConditions.d.ts +2 -0
- package/Field/utils/evaluateFieldWithConditions.js.map +7 -0
- package/Field/utils/index.d.ts +4 -0
- package/Field/utils/index.js +47 -116
- package/Field/utils/index.js.map +7 -0
- package/Field/utils/useField/index.js +57 -0
- package/{FormBuilder/FormBuilder → Field/utils/useField}/package.json +1 -1
- package/Field/utils/useField.d.ts +2 -0
- package/Field/utils/useField.js.map +7 -0
- package/FieldArray/FieldArray.stories.d.ts +3 -2
- package/FieldArray/FormDialog/index.js +279 -0
- package/{validators/validators.spec → FieldArray/FormDialog}/package.json +1 -1
- package/FieldArray/FormDialog.d.ts +53 -0
- package/FieldArray/FormDialog.js.map +7 -0
- package/FieldArray/__stories__/Default.d.ts +2 -2
- package/FieldArray/__stories__/WithExactLength.d.ts +2 -2
- package/FieldArray/__stories__/WithModal.d.ts +2 -0
- package/FieldArray/index.d.ts +6 -0
- package/FieldArray/index.js +108 -59
- package/FieldArray/index.js.map +7 -0
- package/FieldArray/index.test.d.ts +1 -0
- package/FieldObject/index.d.ts +5 -0
- package/FieldObject/index.js +74 -52
- package/FieldObject/index.js.map +7 -0
- package/Fieldset/FieldsetWithContext/index.js +27 -31
- package/Fieldset/FieldsetWithContext.js.map +7 -0
- package/Fieldset/index.d.ts +1 -1
- package/Fieldset/index.js +27 -29
- package/Fieldset/index.js.map +7 -0
- package/Fieldset/types/index.js +1 -1
- package/Fieldset/types.d.ts +3 -2
- package/Fieldset/types.js.map +7 -0
- package/FormBuilder/FormBuilder.stories.d.ts +3 -1
- package/FormBuilder/__stories__/AutoErrorGrouping.d.ts +3 -0
- package/FormBuilder/__stories__/Default.d.ts +2 -2
- package/FormBuilder/__stories__/ErrorGrouping.d.ts +3 -0
- package/FormBuilder/index.d.ts +8 -1
- package/FormBuilder/index.js +237 -2
- package/FormBuilder/index.js.map +7 -0
- package/FormBuilder/index.test.d.ts +1 -0
- package/FormBuilder/interaction.test.d.ts +1 -0
- package/FormBuilder/scenarios.test.d.ts +88 -0
- package/FormContext/index.js +7 -3
- package/FormContext.js.map +7 -0
- package/MultiplicityField/MultiplicityField.stories.d.ts +6 -6
- package/MultiplicityField/__stories__/Default.d.ts +2 -2
- package/MultiplicityField/__stories__/PreviewDisplay.d.ts +2 -2
- package/MultiplicityField/__stories__/WithExactLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMaxLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMinAndMaxLength.d.ts +2 -2
- package/MultiplicityField/__stories__/WithMinLength.d.ts +2 -2
- package/MultiplicityField/add-objects/index.js +137 -132
- package/MultiplicityField/add-objects.d.ts +2 -1
- package/MultiplicityField/add-objects.js.map +7 -0
- package/MultiplicityField/index.d.ts +2 -19
- package/MultiplicityField/index.js +114 -106
- package/MultiplicityField/index.js.map +7 -0
- package/MultiplicityField/index.test.d.ts +1 -0
- package/MultiplicityField/types/index.js +1 -0
- package/MultiplicityField/types/package.json +6 -0
- package/MultiplicityField/types.d.ts +18 -0
- package/MultiplicityField/types.js.map +7 -0
- package/Questions/Questions/index.js +48 -56
- package/Questions/Questions.js.map +7 -0
- package/Questions/Questions.stories.d.ts +1 -1
- package/Questions/QuestionsContext/index.js +9 -9
- package/Questions/QuestionsContext.d.ts +0 -1
- package/Questions/QuestionsContext.js.map +7 -0
- package/Questions/Step/ReviewStep/index.js +35 -47
- package/Questions/Step/ReviewStep.js.map +7 -0
- package/Questions/Step/Step/index.js +39 -47
- package/Questions/Step/Step.js.map +7 -0
- package/Questions/Step/StepArrayReview/index.js +41 -45
- package/Questions/Step/StepArrayReview.js.map +7 -0
- package/Questions/Step/StepContext/index.js +15 -19
- package/Questions/Step/StepContext.d.ts +0 -1
- package/Questions/Step/StepContext.js.map +7 -0
- package/Questions/Step/StepDescription/index.js +22 -22
- package/Questions/Step/StepDescription.js.map +7 -0
- package/Questions/Step/StepForm/index.js +33 -43
- package/Questions/Step/StepForm.js.map +7 -0
- package/Questions/Step/StepQuote/index.js +10 -9
- package/Questions/Step/StepQuote.js.map +7 -0
- package/Questions/Step/StepTitle/index.js +41 -38
- package/Questions/Step/StepTitle.d.ts +2 -1
- package/Questions/Step/StepTitle.js.map +7 -0
- package/Questions/Step/getAddMoreFields/index.js +28 -20
- package/Questions/Step/getAddMoreFields.js.map +7 -0
- package/Questions/Step/index.d.ts +0 -1
- package/Questions/Step/index.js +16 -13
- package/Questions/Step/index.js.map +7 -0
- package/Questions/Step/types/index.js +1 -1
- package/Questions/Step/types.d.ts +1 -0
- package/Questions/Step/types.js.map +7 -0
- package/Questions/__stories__/Default.d.ts +2 -2
- package/Questions/getNextStep/index.js +12 -10
- package/Questions/getNextStep.js.map +7 -0
- package/Questions/index.js +7 -3
- package/Questions/index.js.map +7 -0
- package/Questions/index.test.d.ts +1 -0
- package/Questions/types/index.js +1 -1
- package/Questions/types.d.ts +1 -0
- package/Questions/types.js.map +7 -0
- package/cjs/Field/ErrorGroup/index.js +82 -0
- package/cjs/Field/ErrorGroup.js.map +7 -0
- package/cjs/Field/FieldBase/index.js +144 -82
- package/cjs/Field/FieldBase.js.map +7 -0
- package/cjs/Field/FieldBaseContainer/index.js +62 -43
- package/cjs/Field/FieldBaseContainer.js.map +7 -0
- package/cjs/Field/FieldConditional/index.js +111 -59
- package/cjs/Field/FieldConditional.js.map +7 -0
- package/cjs/Field/index.js +136 -72
- package/cjs/Field/index.js.map +7 -0
- package/cjs/Field/types/index.js +16 -5
- package/cjs/Field/types.js.map +7 -0
- package/cjs/Field/utils/calculateField/index.js +50 -0
- package/cjs/Field/utils/calculateField.js.map +7 -0
- package/cjs/Field/utils/evaluateFieldWithConditions/index.js +49 -0
- package/cjs/Field/utils/evaluateFieldWithConditions.js.map +7 -0
- package/cjs/Field/utils/index.js +91 -139
- package/cjs/Field/utils/index.js.map +7 -0
- package/cjs/Field/utils/useField/index.js +80 -0
- package/cjs/Field/utils/useField.js.map +7 -0
- package/cjs/FieldArray/FormDialog/index.js +301 -0
- package/cjs/FieldArray/FormDialog.js.map +7 -0
- package/cjs/FieldArray/index.js +140 -65
- package/cjs/FieldArray/index.js.map +7 -0
- package/cjs/FieldObject/index.js +103 -61
- package/cjs/FieldObject/index.js.map +7 -0
- package/cjs/Fieldset/FieldsetWithContext/index.js +54 -40
- package/cjs/Fieldset/FieldsetWithContext.js.map +7 -0
- package/cjs/Fieldset/index.js +61 -39
- package/cjs/Fieldset/index.js.map +7 -0
- package/cjs/Fieldset/types/index.js +16 -5
- package/cjs/Fieldset/types.js.map +7 -0
- package/cjs/FormBuilder/index.js +273 -8
- package/cjs/FormBuilder/index.js.map +7 -0
- package/cjs/FormContext/index.js +29 -8
- package/cjs/FormContext.js.map +7 -0
- package/cjs/MultiplicityField/add-objects/index.js +164 -138
- package/cjs/MultiplicityField/add-objects.js.map +7 -0
- package/cjs/MultiplicityField/index.js +142 -115
- package/cjs/MultiplicityField/index.js.map +7 -0
- package/cjs/MultiplicityField/types/index.js +16 -0
- package/cjs/MultiplicityField/types.js.map +7 -0
- package/cjs/Questions/Questions/index.js +80 -65
- package/cjs/Questions/Questions.js.map +7 -0
- package/cjs/Questions/QuestionsContext/index.js +31 -14
- package/cjs/Questions/QuestionsContext.js.map +7 -0
- package/cjs/Questions/Step/ReviewStep/index.js +61 -56
- package/cjs/Questions/Step/ReviewStep.js.map +7 -0
- package/cjs/Questions/Step/Step/index.js +71 -56
- package/cjs/Questions/Step/Step.js.map +7 -0
- package/cjs/Questions/Step/StepArrayReview/index.js +65 -54
- package/cjs/Questions/Step/StepArrayReview.js.map +7 -0
- package/cjs/Questions/Step/StepContext/index.js +37 -24
- package/cjs/Questions/Step/StepContext.js.map +7 -0
- package/cjs/Questions/Step/StepDescription/index.js +55 -31
- package/cjs/Questions/Step/StepDescription.js.map +7 -0
- package/cjs/Questions/Step/StepForm/index.js +65 -52
- package/cjs/Questions/Step/StepForm.js.map +7 -0
- package/cjs/Questions/Step/StepQuote/index.js +42 -15
- package/cjs/Questions/Step/StepQuote.js.map +7 -0
- package/cjs/Questions/Step/StepTitle/index.js +72 -47
- package/cjs/Questions/Step/StepTitle.js.map +7 -0
- package/cjs/Questions/Step/getAddMoreFields/index.js +50 -25
- package/cjs/Questions/Step/getAddMoreFields.js.map +7 -0
- package/cjs/Questions/Step/index.js +59 -143
- package/cjs/Questions/Step/index.js.map +7 -0
- package/cjs/Questions/Step/types/index.js +16 -5
- package/cjs/Questions/Step/types.js.map +7 -0
- package/cjs/Questions/getNextStep/index.js +33 -14
- package/cjs/Questions/getNextStep.js.map +7 -0
- package/cjs/Questions/index.js +29 -19
- package/cjs/Questions/index.js.map +7 -0
- package/cjs/Questions/types/index.js +16 -5
- package/cjs/Questions/types.js.map +7 -0
- package/cjs/index.js +47 -20
- package/cjs/index.js.map +7 -0
- package/cjs/inputs/AutoCompleteInput/index.js +92 -46
- package/cjs/inputs/AutoCompleteInput/index.js.map +7 -0
- package/cjs/inputs/Checkboxes/index.js +101 -96
- package/cjs/inputs/Checkboxes/index.js.map +7 -0
- package/cjs/inputs/DateInput/index.js +121 -109
- package/cjs/inputs/DateInput/index.js.map +7 -0
- package/cjs/inputs/DateTimeInput/index.js +206 -0
- package/cjs/inputs/DateTimeInput/index.js.map +7 -0
- package/cjs/inputs/FileInput/index.js +75 -63
- package/cjs/inputs/FileInput/index.js.map +7 -0
- package/cjs/inputs/ImageInput/index.js +95 -83
- package/cjs/inputs/ImageInput/index.js.map +7 -0
- package/cjs/inputs/Input/index.js +105 -71
- package/cjs/inputs/Input/index.js.map +7 -0
- package/cjs/inputs/Input/inputsInputScenarios/index.js +439 -0
- package/cjs/inputs/Input/inputsInputScenarios.js.map +7 -0
- package/cjs/inputs/Label/index.js +45 -24
- package/cjs/inputs/Label/index.js.map +7 -0
- package/cjs/inputs/OtpInput/index.js +142 -112
- package/cjs/inputs/OtpInput/index.js.map +7 -0
- package/cjs/inputs/Radio/index.js +131 -61
- package/cjs/inputs/Radio/index.js.map +7 -0
- package/cjs/inputs/Select/index.js +59 -36
- package/cjs/inputs/Select/index.js.map +7 -0
- package/cjs/inputs/index.js +62 -69
- package/cjs/inputs/index.js.map +7 -0
- package/cjs/inputs/inputsScenarios/index.js +533 -0
- package/cjs/inputs/inputsScenarios.js.map +7 -0
- package/cjs/internal/index.js +36 -346
- package/cjs/internal.js.map +7 -0
- package/cjs/lazy/index.js +109 -516
- package/cjs/lazy.js.map +7 -0
- package/cjs/locales/el/index.js +35 -0
- package/cjs/locales/el.js.map +7 -0
- package/cjs/registry/index.js +190 -142
- package/cjs/registry.js.map +7 -0
- package/cjs/types/index.js +22 -5
- package/cjs/types.js.map +7 -0
- package/cjs/utils/index.js +79 -83
- package/cjs/utils.js.map +7 -0
- package/cjs/validators/index.js +131 -164
- package/cjs/validators/index.js.map +7 -0
- package/cjs/validators/types/index.js +16 -5
- package/cjs/validators/types.js.map +7 -0
- package/cjs/validators/utils/afm/index.js +38 -21
- package/cjs/validators/utils/afm.js.map +7 -0
- package/cjs/validators/utils/date/index.js +138 -0
- package/cjs/validators/utils/date.js.map +7 -0
- package/cjs/validators/utils/datetime/index.js +151 -0
- package/cjs/validators/utils/datetime.js.map +7 -0
- package/cjs/validators/utils/file/index.js +44 -47
- package/cjs/validators/utils/file.js.map +7 -0
- package/cjs/validators/utils/iban/index.js +36 -17
- package/cjs/validators/utils/iban.js.map +7 -0
- package/cjs/validators/utils/image/index.js +88 -112
- package/cjs/validators/utils/image.js.map +7 -0
- package/cjs/validators/utils/index.js +99 -159
- package/cjs/validators/utils/index.js.map +7 -0
- package/cjs/validators/utils/int/index.js +35 -13
- package/cjs/validators/utils/int.js.map +7 -0
- package/cjs/validators/utils/number/index.js +34 -12
- package/cjs/validators/utils/number.js.map +7 -0
- package/cjs/validators/utils/otp/index.js +35 -13
- package/cjs/validators/utils/otp.js.map +7 -0
- package/cjs/validators/utils/phone/index.js +113 -58
- package/cjs/validators/utils/phone.js.map +7 -0
- package/cjs/validators/utils/postal_code/index.js +36 -16
- package/cjs/validators/utils/postal_code.js.map +7 -0
- package/cjs/validators/utils/text_limit/index.js +40 -25
- package/cjs/validators/utils/text_limit.js.map +7 -0
- package/cjs/validators/utils/uuid4/index.js +34 -13
- package/cjs/validators/utils/uuid4.js.map +7 -0
- package/index.d.ts +4 -1
- package/index.js +13 -4
- package/index.js.map +7 -0
- package/inputs/AutoCompleteInput/AutoComplete.stories.d.ts +2 -1
- package/inputs/AutoCompleteInput/__stories__/Default.d.ts +3 -2
- package/inputs/AutoCompleteInput/__stories__/Multiple.d.ts +3 -0
- package/inputs/AutoCompleteInput/index.d.ts +2 -2
- package/inputs/AutoCompleteInput/index.js +62 -37
- package/inputs/AutoCompleteInput/index.js.map +7 -0
- package/inputs/AutoCompleteInput/index.test.d.ts +1 -0
- package/inputs/Checkboxes/Checkboxes.stories.d.ts +3 -3
- package/inputs/Checkboxes/__stories__/Conditional.d.ts +3 -2
- package/inputs/Checkboxes/__stories__/Default.d.ts +2 -2
- package/inputs/Checkboxes/__stories__/WithDivider.d.ts +2 -2
- package/inputs/Checkboxes/index.d.ts +2 -1
- package/inputs/Checkboxes/index.js +73 -87
- package/inputs/Checkboxes/index.js.map +7 -0
- package/inputs/Checkboxes/index.test.d.ts +1 -0
- package/inputs/DateInput/DateInput.stories.d.ts +1 -1
- package/inputs/DateInput/__stories__/Default.d.ts +2 -2
- package/inputs/DateInput/index.d.ts +3 -4
- package/inputs/DateInput/index.js +91 -99
- package/inputs/DateInput/index.js.map +7 -0
- package/inputs/DateInput/index.test.d.ts +1 -0
- package/inputs/DateTimeInput/DateTimeInput.stories.d.ts +7 -0
- package/inputs/DateTimeInput/__stories__/Default.d.ts +3 -0
- package/inputs/DateTimeInput/index.d.ts +13 -0
- package/inputs/DateTimeInput/index.js +176 -0
- package/inputs/DateTimeInput/index.js.map +7 -0
- package/inputs/DateTimeInput/index.test.d.ts +1 -0
- package/inputs/DateTimeInput/package.json +6 -0
- package/inputs/FileInput/FileInput.stories.d.ts +1 -1
- package/inputs/FileInput/__stories__/Default.d.ts +2 -2
- package/inputs/FileInput/index.js +43 -54
- package/inputs/FileInput/index.js.map +7 -0
- package/inputs/FileInput/index.test.d.ts +1 -0
- package/inputs/ImageInput/ImageInput.stories.d.ts +3 -3
- package/inputs/ImageInput/__stories__/Default.d.ts +2 -2
- package/inputs/ImageInput/__stories__/MaxSize.d.ts +3 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension.d.ts +2 -2
- package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +2 -2
- package/inputs/ImageInput/index.js +63 -75
- package/inputs/ImageInput/index.js.map +7 -0
- package/inputs/ImageInput/index.test.d.ts +1 -0
- package/inputs/Input/Input.stories.d.ts +11 -10
- package/inputs/Input/__stories__/AFM.d.ts +2 -2
- package/inputs/Input/__stories__/Boolean.d.ts +2 -2
- package/inputs/Input/__stories__/IBAN.d.ts +2 -2
- package/inputs/Input/__stories__/Integer.d.ts +2 -2
- package/inputs/Input/__stories__/LandlineNumber.d.ts +2 -2
- package/inputs/Input/__stories__/MobilePhone.d.ts +2 -2
- package/inputs/Input/__stories__/PhoneNumber.d.ts +2 -2
- package/inputs/Input/__stories__/PostalCode.d.ts +2 -2
- package/inputs/Input/__stories__/String.d.ts +3 -0
- package/inputs/Input/__stories__/StringWithTrimValidation.d.ts +3 -0
- package/inputs/Input/__stories__/TextWithLimit.d.ts +3 -0
- package/inputs/Input/index.js +74 -66
- package/inputs/Input/index.js.map +7 -0
- package/inputs/Input/index.test.d.ts +1 -0
- package/inputs/Input/inputsInputScenarios/index.js +406 -0
- package/{FieldArray/__stories__/Default → inputs/Input/inputsInputScenarios}/package.json +1 -1
- package/inputs/Input/inputsInputScenarios.d.ts +57 -0
- package/inputs/Input/inputsInputScenarios.js.map +7 -0
- package/inputs/Label/Label.stories.d.ts +1 -1
- package/inputs/Label/__stories__/Default.d.ts +2 -2
- package/inputs/Label/index.d.ts +1 -3
- package/inputs/Label/index.js +12 -17
- package/inputs/Label/index.js.map +7 -0
- package/inputs/Label/index.test.d.ts +1 -0
- package/inputs/OtpInput/OtpInput.stories.d.ts +1 -1
- package/inputs/OtpInput/__stories__/Default.d.ts +2 -2
- package/inputs/OtpInput/index.d.ts +9 -2
- package/inputs/OtpInput/index.js +109 -103
- package/inputs/OtpInput/index.js.map +7 -0
- package/inputs/OtpInput/index.test.d.ts +1 -0
- package/inputs/Radio/Radio.stories.d.ts +3 -3
- package/inputs/Radio/__stories__/Conditional.d.ts +3 -2
- package/inputs/Radio/__stories__/Default.d.ts +2 -2
- package/inputs/Radio/__stories__/WithDivider.d.ts +2 -2
- package/inputs/Radio/index.d.ts +6 -1
- package/inputs/Radio/index.js +102 -55
- package/inputs/Radio/index.js.map +7 -0
- package/inputs/Radio/index.test.d.ts +1 -0
- package/inputs/Select/Select.stories.d.ts +1 -1
- package/inputs/Select/__stories__/Default.d.ts +2 -2
- package/inputs/Select/index.d.ts +1 -1
- package/inputs/Select/index.js +31 -31
- package/inputs/Select/index.js.map +7 -0
- package/inputs/Select/index.test.d.ts +1 -0
- package/inputs/index.js +21 -9
- package/inputs/index.js.map +7 -0
- package/inputs/inputsScenarios/index.js +499 -0
- package/inputs/inputsScenarios/package.json +6 -0
- package/inputs/inputsScenarios.d.ts +296 -0
- package/inputs/inputsScenarios.js.map +7 -0
- package/internal/index.js +10 -34
- package/internal.d.ts +2 -31
- package/internal.js.map +7 -0
- package/lazy/index.js +75 -393
- package/locales/el/index.js +6 -0
- package/{Form.stories → locales/el}/package.json +1 -1
- package/locales/el.d.ts +2 -0
- package/locales/el.js.map +7 -0
- package/package.json +7 -8
- package/registry/index.js +126 -99
- package/src/Field/ErrorGroup.tsx +84 -0
- package/src/Field/FieldBase.tsx +36 -22
- package/src/Field/FieldBaseContainer.tsx +7 -4
- package/src/Field/FieldConditional.tsx +5 -1
- package/src/Field/index.tsx +27 -3
- package/src/Field/types.tsx +73 -5
- package/src/Field/utils/calculateField.ts +49 -0
- package/src/Field/utils/evaluateFieldWithConditions.ts +30 -0
- package/src/Field/utils/index.ts +82 -0
- package/src/Field/utils/useField.ts +58 -0
- package/src/FieldArray/FieldArray.stories.js +3 -2
- package/src/FieldArray/FormDialog.tsx +378 -0
- package/src/FieldArray/__stories__/Default.tsx +1 -0
- package/src/FieldArray/__stories__/WithExactLength.tsx +1 -0
- package/src/FieldArray/__stories__/WithModal.tsx +159 -0
- package/src/FieldArray/index.test.tsx +28 -0
- package/src/FieldArray/index.tsx +92 -39
- package/src/FieldObject/index.tsx +27 -8
- package/src/Fieldset/index.tsx +5 -5
- package/src/Fieldset/types.tsx +5 -3
- package/src/FormBuilder/FormBuilder.stories.js +3 -1
- package/src/FormBuilder/__stories__/AutoErrorGrouping.tsx +63 -0
- package/src/FormBuilder/__stories__/ErrorGrouping.tsx +43 -0
- package/{FormBuilder/FormBuilder.mdx → src/FormBuilder/doc.mdx} +20 -33
- package/src/FormBuilder/index.test.tsx +28 -0
- package/src/FormBuilder/index.tsx +263 -1
- package/src/FormBuilder/interaction.test.tsx +32 -0
- package/src/FormBuilder/scenarios.test.tsx +1978 -0
- package/src/FormContext.tsx +1 -2
- package/src/MultiplicityField/MultiplicityField.stories.js +6 -6
- package/src/MultiplicityField/__stories__/PreviewDisplay.tsx +2 -2
- package/src/MultiplicityField/__stories__/WithExactLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMaxLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMinAndMaxLength.tsx +1 -1
- package/src/MultiplicityField/__stories__/WithMinLength.tsx +1 -1
- package/src/MultiplicityField/add-objects.tsx +31 -15
- package/{MultiplicityField/MultiplicityField.mdx → src/MultiplicityField/doc.mdx} +12 -16
- package/src/MultiplicityField/index.test.tsx +40 -0
- package/src/MultiplicityField/index.tsx +21 -34
- package/src/MultiplicityField/types.ts +21 -0
- package/src/Questions/Questions.stories.js +1 -1
- package/src/Questions/Questions.tsx +4 -4
- package/src/Questions/Step/StepArrayReview.tsx +1 -1
- package/src/Questions/Step/StepTitle.tsx +5 -3
- package/src/Questions/Step/index.ts +0 -1
- package/src/Questions/Step/types.tsx +1 -0
- package/src/Questions/__snapshots__/index.spec.tsx.snap +73 -587
- package/src/Questions/{index.mdx → doc.mdx} +13 -16
- package/src/Questions/index.spec.tsx +17 -5
- package/src/Questions/index.test.tsx +20 -0
- package/src/Questions/types.tsx +1 -0
- package/src/create-simple-form.mdx +2 -6
- package/{index.mdx → src/doc.mdx} +4 -8
- package/src/index.ts +4 -1
- package/src/inputs/AutoCompleteInput/AutoComplete.stories.js +2 -1
- package/src/inputs/AutoCompleteInput/__stories__/Default.tsx +19 -18
- package/src/inputs/AutoCompleteInput/__stories__/Multiple.tsx +47 -0
- package/src/inputs/AutoCompleteInput/doc.mdx +18 -0
- package/src/inputs/AutoCompleteInput/index.test.tsx +24 -0
- package/src/inputs/AutoCompleteInput/index.tsx +46 -29
- package/src/inputs/Checkboxes/Checkboxes.stories.js +3 -3
- package/src/inputs/Checkboxes/__stories__/Conditional.tsx +2 -3
- package/src/inputs/Checkboxes/doc.mdx +23 -0
- package/src/inputs/Checkboxes/index.test.tsx +28 -0
- package/src/inputs/Checkboxes/index.tsx +39 -33
- package/src/inputs/DateInput/DateInput.stories.js +1 -1
- package/src/inputs/DateInput/__stories__/Default.tsx +16 -15
- package/src/inputs/DateInput/doc.mdx +16 -0
- package/src/inputs/DateInput/index.test.tsx +20 -0
- package/src/inputs/DateInput/index.tsx +11 -9
- package/src/inputs/DateTimeInput/DateTimeInput.stories.js +8 -0
- package/src/inputs/DateTimeInput/__stories__/Default.tsx +25 -0
- package/src/inputs/DateTimeInput/doc.mdx +16 -0
- package/src/inputs/DateTimeInput/index.test.tsx +20 -0
- package/src/inputs/DateTimeInput/index.tsx +189 -0
- package/src/inputs/FileInput/FileInput.stories.js +1 -1
- package/src/inputs/FileInput/doc.mdx +15 -0
- package/src/inputs/FileInput/index.test.tsx +20 -0
- package/src/inputs/FileInput/index.tsx +8 -9
- package/src/inputs/ImageInput/ImageInput.stories.js +3 -3
- package/src/inputs/ImageInput/__stories__/MaxSize.tsx +37 -0
- package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +2 -0
- package/src/inputs/ImageInput/doc.mdx +23 -0
- package/src/inputs/ImageInput/index.test.tsx +32 -0
- package/src/inputs/ImageInput/index.tsx +16 -16
- package/src/inputs/Input/Input.stories.js +11 -10
- package/src/inputs/Input/__stories__/LandlineNumber.tsx +2 -1
- package/src/inputs/Input/__stories__/MobilePhone.tsx +1 -0
- package/src/inputs/Input/__stories__/PhoneNumber.tsx +1 -0
- package/src/inputs/Input/__stories__/PostalCode.tsx +1 -0
- package/src/inputs/Input/__stories__/{Default.tsx → String.tsx} +2 -2
- package/src/inputs/Input/__stories__/StringWithTrimValidation.tsx +26 -0
- package/src/inputs/Input/__stories__/{TextWithCharacterLimit.tsx → TextWithLimit.tsx} +3 -2
- package/src/inputs/Input/doc.mdx +56 -0
- package/src/inputs/Input/index.test.tsx +60 -0
- package/src/inputs/Input/index.tsx +40 -30
- package/src/inputs/Input/inputsInputScenarios.ts +404 -0
- package/src/inputs/Label/Label.stories.js +1 -1
- package/src/inputs/Label/__stories__/Default.tsx +3 -1
- package/src/inputs/Label/doc.mdx +14 -0
- package/src/inputs/Label/index.test.tsx +20 -0
- package/src/inputs/Label/index.tsx +3 -10
- package/src/inputs/OtpInput/OtpInput.stories.js +1 -1
- package/src/inputs/OtpInput/doc.mdx +16 -0
- package/src/inputs/OtpInput/index.test.tsx +20 -0
- package/src/inputs/OtpInput/index.tsx +4 -3
- package/src/inputs/Radio/Radio.stories.js +3 -3
- package/src/inputs/Radio/__stories__/Conditional.tsx +4 -1
- package/src/inputs/Radio/doc.mdx +23 -0
- package/src/inputs/Radio/index.test.tsx +28 -0
- package/src/inputs/Radio/index.tsx +79 -9
- package/src/inputs/Select/Select.stories.js +1 -1
- package/src/inputs/Select/doc.mdx +13 -0
- package/src/inputs/Select/index.test.tsx +20 -0
- package/src/inputs/Select/index.tsx +11 -4
- package/src/inputs/inputsScenarios.ts +496 -0
- package/src/installation.mdx +2 -5
- package/src/internal.ts +2 -31
- package/src/lazy.js +76 -59
- package/src/locales/el.ts +3 -0
- package/src/registry.js +109 -89
- package/src/types.tsx +11 -64
- package/src/utils.ts +34 -33
- package/src/validators/index.ts +90 -84
- package/src/validators/utils/date.ts +107 -0
- package/src/validators/utils/datetime.ts +130 -0
- package/src/validators/utils/file.ts +11 -9
- package/src/validators/utils/index.ts +2 -0
- package/src/validators/utils/int.ts +1 -1
- package/src/validators/utils/number.ts +1 -1
- package/src/validators/utils/phone.ts +63 -72
- package/src/validators/utils/postal_code.ts +1 -1
- package/src/validators/utils/uuid4.ts +2 -1
- package/src/validators/validators.spec.ts +6 -40
- package/types/index.js +2 -1
- package/types.d.ts +6 -35
- package/types.js.map +7 -0
- package/utils/index.js +57 -77
- package/utils.js.map +7 -0
- package/validators/index.js +112 -150
- package/validators/index.js.map +7 -0
- package/validators/types/index.js +1 -1
- package/validators/types.js.map +7 -0
- package/validators/utils/afm/index.js +16 -16
- package/validators/utils/afm.js.map +7 -0
- package/validators/utils/date/index.js +103 -0
- package/validators/utils/date/package.json +6 -0
- package/validators/utils/date.d.ts +9 -0
- package/validators/utils/date.js.map +7 -0
- package/validators/utils/datetime/index.js +116 -0
- package/{Questions/Questions.stories → validators/utils/datetime}/package.json +1 -1
- package/validators/utils/datetime.d.ts +9 -0
- package/validators/utils/datetime.js.map +7 -0
- package/validators/utils/file/index.js +22 -42
- package/validators/utils/file.js.map +7 -0
- package/validators/utils/iban/index.js +14 -12
- package/validators/utils/iban.js.map +7 -0
- package/validators/utils/image/index.js +66 -106
- package/validators/utils/image.js.map +7 -0
- package/validators/utils/index.d.ts +2 -0
- package/validators/utils/index.js +56 -48
- package/validators/utils/index.js.map +7 -0
- package/validators/utils/int/index.js +13 -8
- package/validators/utils/int.js.map +7 -0
- package/validators/utils/number/index.js +12 -7
- package/validators/utils/number.js.map +7 -0
- package/validators/utils/otp/index.js +13 -8
- package/validators/utils/otp.js.map +7 -0
- package/validators/utils/phone/index.js +89 -51
- package/validators/utils/phone.d.ts +1 -1
- package/validators/utils/phone.js.map +7 -0
- package/validators/utils/postal_code/index.js +14 -11
- package/validators/utils/postal_code.d.ts +1 -1
- package/validators/utils/postal_code.js.map +7 -0
- package/validators/utils/text_limit/index.js +18 -20
- package/validators/utils/text_limit.js.map +7 -0
- package/validators/utils/uuid4/index.js +12 -8
- package/validators/utils/uuid4.js.map +7 -0
- package/Field/utils.d.ts +0 -5
- package/FieldArray/FieldArray.stories/index.js +0 -8
- package/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/FieldArray/__stories__/Default/index.js +0 -88
- package/FieldArray/__stories__/WithExactLength/index.js +0 -88
- package/FieldArray/__stories__/WithExactLength/package.json +0 -6
- package/Form.stories/index.js +0 -3
- package/FormBuilder/FormBuilder/index.js +0 -152
- package/FormBuilder/FormBuilder.d.ts +0 -5
- package/FormBuilder/FormBuilder.stories/index.js +0 -7
- package/FormBuilder/FormBuilder.stories/package.json +0 -6
- package/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/FormBuilder/__stories__/Default/index.js +0 -26
- package/FormBuilder/__stories__/Default/package.json +0 -6
- package/MultiplicityField/MultiplicityField.stories/index.js +0 -12
- package/MultiplicityField/MultiplicityField.stories/package.json +0 -6
- package/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/MultiplicityField/__stories__/Default/index.js +0 -95
- package/MultiplicityField/__stories__/Default/package.json +0 -6
- package/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -72
- package/MultiplicityField/__stories__/PreviewDisplay/package.json +0 -6
- package/MultiplicityField/__stories__/WithExactLength/index.js +0 -90
- package/MultiplicityField/__stories__/WithExactLength/package.json +0 -6
- package/MultiplicityField/__stories__/WithMaxLength/index.js +0 -93
- package/MultiplicityField/__stories__/WithMaxLength/package.json +0 -6
- package/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -94
- package/MultiplicityField/__stories__/WithMinAndMaxLength/package.json +0 -6
- package/MultiplicityField/__stories__/WithMinLength/index.js +0 -93
- package/MultiplicityField/__stories__/WithMinLength/package.json +0 -6
- package/Questions/Questions.stories/index.js +0 -7
- package/Questions/__snapshots__/index.spec.tsx.snap +0 -596
- package/Questions/__stories__/Default/index.js +0 -102
- package/Questions/__stories__/Default/package.json +0 -6
- package/Questions/index.mdx +0 -415
- package/Questions/index.spec/index.js +0 -59
- package/cjs/Field/index.mdx +0 -6
- package/cjs/FieldArray/FieldArray.stories/index.js +0 -38
- package/cjs/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/cjs/FieldArray/__stories__/Default/index.js +0 -98
- package/cjs/FieldArray/__stories__/WithExactLength/index.js +0 -98
- package/cjs/Form.stories/index.js +0 -9
- package/cjs/FormBuilder/FormBuilder/index.js +0 -162
- package/cjs/FormBuilder/FormBuilder.mdx +0 -256
- package/cjs/FormBuilder/FormBuilder.stories/index.js +0 -26
- package/cjs/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/cjs/FormBuilder/__stories__/Default/index.js +0 -36
- package/cjs/MultiplicityField/MultiplicityField.mdx +0 -590
- package/cjs/MultiplicityField/MultiplicityField.stories/index.js +0 -86
- package/cjs/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/cjs/MultiplicityField/__stories__/Default/index.js +0 -105
- package/cjs/MultiplicityField/__stories__/PreviewDisplay/index.js +0 -82
- package/cjs/MultiplicityField/__stories__/WithExactLength/index.js +0 -100
- package/cjs/MultiplicityField/__stories__/WithMaxLength/index.js +0 -103
- package/cjs/MultiplicityField/__stories__/WithMinAndMaxLength/index.js +0 -104
- package/cjs/MultiplicityField/__stories__/WithMinLength/index.js +0 -103
- package/cjs/Questions/Questions.stories/index.js +0 -26
- package/cjs/Questions/__snapshots__/index.spec.tsx.snap +0 -596
- package/cjs/Questions/__stories__/Default/index.js +0 -113
- package/cjs/Questions/index.mdx +0 -415
- package/cjs/Questions/index.spec/index.js +0 -63
- package/cjs/create-simple-form.mdx +0 -539
- package/cjs/index.mdx +0 -51
- package/cjs/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -26
- package/cjs/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -56
- package/cjs/inputs/Checkboxes/Checkboxes.stories/index.js +0 -50
- package/cjs/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/cjs/inputs/Checkboxes/__stories__/Conditional/index.js +0 -102
- package/cjs/inputs/Checkboxes/__stories__/Default/index.js +0 -50
- package/cjs/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -51
- package/cjs/inputs/Checkboxes/index.mdx +0 -0
- package/cjs/inputs/DateInput/DateInput.stories/index.js +0 -26
- package/cjs/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/cjs/inputs/DateInput/__stories__/Default/index.js +0 -33
- package/cjs/inputs/FileInput/FileInput.stories/index.js +0 -26
- package/cjs/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/cjs/inputs/FileInput/__stories__/Default/index.js +0 -30
- package/cjs/inputs/ImageInput/ImageInput.stories/index.js +0 -50
- package/cjs/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/cjs/inputs/ImageInput/__stories__/Default/index.js +0 -38
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -46
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -43
- package/cjs/inputs/Input/Input.stories/index.js +0 -134
- package/cjs/inputs/Input/Input.stories.playwright.json +0 -376
- package/cjs/inputs/Input/__stories__/AFM/index.js +0 -32
- package/cjs/inputs/Input/__stories__/Boolean/index.js +0 -33
- package/cjs/inputs/Input/__stories__/Default/index.js +0 -33
- package/cjs/inputs/Input/__stories__/IBAN/index.js +0 -33
- package/cjs/inputs/Input/__stories__/Integer/index.js +0 -41
- package/cjs/inputs/Input/__stories__/LandlineNumber/index.js +0 -36
- package/cjs/inputs/Input/__stories__/MobilePhone/index.js +0 -36
- package/cjs/inputs/Input/__stories__/PhoneNumber/index.js +0 -35
- package/cjs/inputs/Input/__stories__/PostalCode/index.js +0 -35
- package/cjs/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -39
- package/cjs/inputs/Input/index.mdx +0 -8
- package/cjs/inputs/Label/Label.stories/index.js +0 -26
- package/cjs/inputs/Label/Label.stories.playwright.json +0 -40
- package/cjs/inputs/Label/__stories__/Default/index.js +0 -37
- package/cjs/inputs/Label/index.mdx +0 -0
- package/cjs/inputs/OtpInput/OtpInput.stories/index.js +0 -26
- package/cjs/inputs/OtpInput/__stories__/Default/index.js +0 -39
- package/cjs/inputs/Radio/Radio.stories/index.js +0 -50
- package/cjs/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/cjs/inputs/Radio/__stories__/Conditional/index.js +0 -102
- package/cjs/inputs/Radio/__stories__/Default/index.js +0 -55
- package/cjs/inputs/Radio/__stories__/WithDivider/index.js +0 -56
- package/cjs/inputs/Radio/index.mdx +0 -0
- package/cjs/inputs/Select/Select.stories/index.js +0 -26
- package/cjs/inputs/Select/Select.stories.playwright.json +0 -22
- package/cjs/inputs/Select/__stories__/Default/index.js +0 -61
- package/cjs/installation.mdx +0 -68
- package/cjs/validators/validators.spec/index.js +0 -87
- package/create-simple-form.mdx +0 -539
- package/inputs/AutoCompleteInput/AutoComplete.stories/index.js +0 -7
- package/inputs/AutoCompleteInput/AutoComplete.stories/package.json +0 -6
- package/inputs/AutoCompleteInput/__stories__/Default/index.js +0 -46
- package/inputs/AutoCompleteInput/__stories__/Default/package.json +0 -6
- package/inputs/Checkboxes/Checkboxes.stories/index.js +0 -9
- package/inputs/Checkboxes/Checkboxes.stories/package.json +0 -6
- package/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/inputs/Checkboxes/__stories__/Conditional/index.js +0 -92
- package/inputs/Checkboxes/__stories__/Conditional/package.json +0 -6
- package/inputs/Checkboxes/__stories__/Default/index.js +0 -40
- package/inputs/Checkboxes/__stories__/Default/package.json +0 -6
- package/inputs/Checkboxes/__stories__/WithDivider/index.js +0 -41
- package/inputs/Checkboxes/__stories__/WithDivider/package.json +0 -6
- package/inputs/Checkboxes/index.mdx +0 -0
- package/inputs/DateInput/DateInput.stories/index.js +0 -7
- package/inputs/DateInput/DateInput.stories/package.json +0 -6
- package/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/inputs/DateInput/__stories__/Default/index.js +0 -23
- package/inputs/FileInput/FileInput.stories/index.js +0 -7
- package/inputs/FileInput/FileInput.stories/package.json +0 -6
- package/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/inputs/FileInput/__stories__/Default/index.js +0 -20
- package/inputs/FileInput/__stories__/Default/package.json +0 -6
- package/inputs/ImageInput/ImageInput.stories/index.js +0 -9
- package/inputs/ImageInput/ImageInput.stories/package.json +0 -6
- package/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/inputs/ImageInput/__stories__/Default/index.js +0 -28
- package/inputs/ImageInput/__stories__/Default/package.json +0 -6
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +0 -36
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension/package.json +0 -6
- package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +0 -33
- package/inputs/ImageInput/__stories__/WithInvalidImageSize/package.json +0 -6
- package/inputs/Input/Input.stories/index.js +0 -16
- package/inputs/Input/Input.stories/package.json +0 -6
- package/inputs/Input/Input.stories.playwright.json +0 -376
- package/inputs/Input/__stories__/AFM/index.js +0 -22
- package/inputs/Input/__stories__/AFM/package.json +0 -6
- package/inputs/Input/__stories__/Boolean/index.js +0 -23
- package/inputs/Input/__stories__/Boolean/package.json +0 -6
- package/inputs/Input/__stories__/Default/index.js +0 -23
- package/inputs/Input/__stories__/Default/package.json +0 -6
- package/inputs/Input/__stories__/Default.d.ts +0 -3
- package/inputs/Input/__stories__/IBAN/index.js +0 -23
- package/inputs/Input/__stories__/IBAN/package.json +0 -6
- package/inputs/Input/__stories__/Integer/index.js +0 -31
- package/inputs/Input/__stories__/Integer/package.json +0 -6
- package/inputs/Input/__stories__/LandlineNumber/index.js +0 -26
- package/inputs/Input/__stories__/LandlineNumber/package.json +0 -6
- package/inputs/Input/__stories__/MobilePhone/index.js +0 -26
- package/inputs/Input/__stories__/MobilePhone/package.json +0 -6
- package/inputs/Input/__stories__/PhoneNumber/index.js +0 -25
- package/inputs/Input/__stories__/PhoneNumber/package.json +0 -6
- package/inputs/Input/__stories__/PostalCode/index.js +0 -25
- package/inputs/Input/__stories__/PostalCode/package.json +0 -6
- package/inputs/Input/__stories__/TextWithCharacterLimit/index.js +0 -29
- package/inputs/Input/__stories__/TextWithCharacterLimit/package.json +0 -6
- package/inputs/Input/__stories__/TextWithCharacterLimit.d.ts +0 -3
- package/inputs/Input/index.mdx +0 -8
- package/inputs/Label/Label.stories/index.js +0 -7
- package/inputs/Label/Label.stories/package.json +0 -6
- package/inputs/Label/Label.stories.playwright.json +0 -40
- package/inputs/Label/__stories__/Default/index.js +0 -27
- package/inputs/Label/__stories__/Default/package.json +0 -6
- package/inputs/Label/index.mdx +0 -0
- package/inputs/OtpInput/OtpInput.stories/index.js +0 -7
- package/inputs/OtpInput/OtpInput.stories/package.json +0 -6
- package/inputs/OtpInput/__stories__/Default/index.js +0 -29
- package/inputs/OtpInput/__stories__/Default/package.json +0 -6
- package/inputs/Radio/Radio.stories/index.js +0 -9
- package/inputs/Radio/Radio.stories/package.json +0 -6
- package/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/inputs/Radio/__stories__/Conditional/index.js +0 -92
- package/inputs/Radio/__stories__/Conditional/package.json +0 -6
- package/inputs/Radio/__stories__/Default/index.js +0 -45
- package/inputs/Radio/__stories__/Default/package.json +0 -6
- package/inputs/Radio/__stories__/WithDivider/index.js +0 -46
- package/inputs/Radio/__stories__/WithDivider/package.json +0 -6
- package/inputs/Radio/index.mdx +0 -0
- package/inputs/Select/Select.stories/index.js +0 -7
- package/inputs/Select/Select.stories/package.json +0 -6
- package/inputs/Select/Select.stories.playwright.json +0 -22
- package/inputs/Select/__stories__/Default/index.js +0 -51
- package/inputs/Select/__stories__/Default/package.json +0 -6
- package/installation.mdx +0 -68
- package/lazy.d.ts +0 -69
- package/registry.d.ts +0 -64
- package/src/Field/index.mdx +0 -6
- package/src/Field/utils.ts +0 -191
- package/src/FieldArray/FieldArray.stories.playwright.json +0 -353
- package/src/FormBuilder/FormBuilder.mdx +0 -256
- package/src/FormBuilder/FormBuilder.stories.playwright.json +0 -52
- package/src/FormBuilder/FormBuilder.tsx +0 -166
- package/src/MultiplicityField/MultiplicityField.mdx +0 -590
- package/src/MultiplicityField/MultiplicityField.stories.playwright.json +0 -1370
- package/src/index.mdx +0 -51
- package/src/inputs/Checkboxes/Checkboxes.stories.playwright.json +0 -85
- package/src/inputs/Checkboxes/index.mdx +0 -0
- package/src/inputs/DateInput/DateInput.stories.playwright.json +0 -72
- package/src/inputs/FileInput/FileInput.stories.playwright.json +0 -75
- package/src/inputs/ImageInput/ImageInput.stories.playwright.json +0 -77
- package/src/inputs/Input/Input.stories.playwright.json +0 -376
- package/src/inputs/Input/index.mdx +0 -8
- package/src/inputs/Label/Label.stories.playwright.json +0 -40
- package/src/inputs/Label/index.mdx +0 -0
- package/src/inputs/Radio/Radio.stories.playwright.json +0 -73
- package/src/inputs/Radio/index.mdx +0 -0
- package/src/inputs/Select/Select.stories.playwright.json +0 -22
- package/validators/validators.spec/index.js +0 -85
- /package/{Field/index.mdx → src/Field/doc.mdx} +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.Default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _form = _interopRequireWildcard(require("@digigov/form"));
|
|
12
|
-
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
var fields = [{
|
|
16
|
-
key: 'string',
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: {
|
|
19
|
-
primary: 'Πεδίο κειμένου',
|
|
20
|
-
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
key: 'multiplicity',
|
|
24
|
-
type: 'array',
|
|
25
|
-
multiplicity: true,
|
|
26
|
-
label: {
|
|
27
|
-
primary: 'Συνυπογράφοντες',
|
|
28
|
-
secondary: 'Οι συνυπογράφοντες είναι άνθρωποι σαν και εμάς'
|
|
29
|
-
},
|
|
30
|
-
extra: {
|
|
31
|
-
border: true,
|
|
32
|
-
label: {
|
|
33
|
-
object: {
|
|
34
|
-
title: 'Συνυπογράφοντας',
|
|
35
|
-
title_added: 'Οι συνυπογράφοντες που έχετε προσθέσει',
|
|
36
|
-
add: 'Προσθήκη',
|
|
37
|
-
"delete": 'Αφαίρεση συνυπογράφοντος'
|
|
38
|
-
},
|
|
39
|
-
question: {
|
|
40
|
-
title: 'Θέλετε να προσθέσετε επιπλέον συνυπογράφοντες;',
|
|
41
|
-
objectLabel: {
|
|
42
|
-
primary: 'Προσθήκη νέου συνυπογράφοντα',
|
|
43
|
-
secondary: 'Συμπληρώστε τα στοιχεία και μετά πατήστε «Προσθήκη»'
|
|
44
|
-
},
|
|
45
|
-
yes: 'Ναι',
|
|
46
|
-
no: 'Όχι'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
of: {
|
|
50
|
-
type: 'object',
|
|
51
|
-
label: {
|
|
52
|
-
primary: 'Στοιχεία συνυπογράφοντα',
|
|
53
|
-
secondary: 'Δείτε και αλλάξτε τα στοιχεία του συνυπογράφοντα'
|
|
54
|
-
},
|
|
55
|
-
extra: {
|
|
56
|
-
fields: [{
|
|
57
|
-
key: 'afm',
|
|
58
|
-
type: 'afm',
|
|
59
|
-
required: true,
|
|
60
|
-
label: {
|
|
61
|
-
primary: 'ΑΦΜ'
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
key: 'firstName',
|
|
65
|
-
required: true,
|
|
66
|
-
type: 'string',
|
|
67
|
-
label: {
|
|
68
|
-
primary: 'Όνομα'
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: 'lastName',
|
|
72
|
-
required: true,
|
|
73
|
-
type: 'string',
|
|
74
|
-
label: {
|
|
75
|
-
primary: 'Επώνυμο'
|
|
76
|
-
}
|
|
77
|
-
}]
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: 'phonenumber',
|
|
83
|
-
type: 'phone_number',
|
|
84
|
-
required: true,
|
|
85
|
-
label: {
|
|
86
|
-
primary: 'Σταθερό τηλέφωνο',
|
|
87
|
-
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
88
|
-
}
|
|
89
|
-
}];
|
|
90
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
91
|
-
type: "submit"
|
|
92
|
-
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
93
|
-
var Default = exports.Default = function Default() {
|
|
94
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
95
|
-
onSubmit: function onSubmit(data) {
|
|
96
|
-
console.log(data);
|
|
97
|
-
}
|
|
98
|
-
}, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
99
|
-
name: "string"
|
|
100
|
-
}, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
101
|
-
name: "multiplicity"
|
|
102
|
-
}, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
103
|
-
name: "phonenumber"
|
|
104
|
-
}, fields[2])), _ref);
|
|
105
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.PreviewDisplay = void 0;
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _ui = require("@digigov/ui");
|
|
11
|
-
var _SummaryList = _interopRequireWildcard(require("@digigov/ui/cjs/content/SummaryList"));
|
|
12
|
-
var _Footer = _interopRequireDefault(require("@digigov/ui/cjs/govgr/Footer"));
|
|
13
|
-
var _GovGRLogo = _interopRequireDefault(require("@digigov/ui/cjs/govgr/GovGRLogo"));
|
|
14
|
-
var _Basic = _interopRequireWildcard(require("@digigov/ui/cjs/layouts/Basic/"));
|
|
15
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
17
|
-
var fields = [{
|
|
18
|
-
name: 'Όνομα',
|
|
19
|
-
value: 'ΜΑΡΙΟΣ'
|
|
20
|
-
}, {
|
|
21
|
-
name: 'Επώνυμο',
|
|
22
|
-
value: 'ΜΕΝΕΞΕΣ'
|
|
23
|
-
}, {
|
|
24
|
-
name: 'Όνομα Πατέρα',
|
|
25
|
-
value: 'ΝΙΚΟΣ'
|
|
26
|
-
}, {
|
|
27
|
-
name: 'Όνομα Μητέρα',
|
|
28
|
-
value: 'ΜΑΡΙΑ'
|
|
29
|
-
}, {
|
|
30
|
-
name: 'Α.Φ.Μ',
|
|
31
|
-
value: '12030454'
|
|
32
|
-
}, {
|
|
33
|
-
name: 'Τηλέφωνο',
|
|
34
|
-
value: '6984386756'
|
|
35
|
-
}, {
|
|
36
|
-
name: 'Ημερομηνία Γέννησης',
|
|
37
|
-
value: '22/03/78'
|
|
38
|
-
}, {
|
|
39
|
-
name: 'Α.Δ.Τ',
|
|
40
|
-
value: 'Ψ456789'
|
|
41
|
-
}, {
|
|
42
|
-
name: 'Τύπος A.Δ.Τ',
|
|
43
|
-
value: 'ΚΑΡΤΑ'
|
|
44
|
-
}];
|
|
45
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_ui.Header, null, /*#__PURE__*/_react["default"].createElement(_ui.HeaderContent, null, /*#__PURE__*/_react["default"].createElement(_ui.HeaderSection, null, /*#__PURE__*/_react["default"].createElement(_GovGRLogo["default"], {
|
|
46
|
-
href: "#"
|
|
47
|
-
}), /*#__PURE__*/_react["default"].createElement(_ui.HeaderTitle, null, "\u03A0\u03C1\u03CC\u03C4\u03C5\u03C0\u03BF-\u0391\u03BD\u03B1\u03C6\u03BF\u03C1\u03AC\u03C2"))));
|
|
48
|
-
var _ref2 = /*#__PURE__*/_react["default"].createElement(_ui.HeadingCaption, null, "\u03A8\u03B7\u03C6\u03B9\u03B1\u03BA\u03AE \u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7 \u03B9\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03BF\u03CD \u03C3\u03C5\u03BC\u03C6\u03C9\u03BD\u03B7\u03C4\u03B9\u03BA\u03BF\u03CD");
|
|
49
|
-
var _ref3 = /*#__PURE__*/_react["default"].createElement(_ui.Heading, null, "\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7");
|
|
50
|
-
var _ref4 = /*#__PURE__*/_react["default"].createElement(_ui.Paragraph, null, /*#__PURE__*/_react["default"].createElement(_ui.Paragraph, null, "\u03A0\u03B1\u03C1\u03B1\u03BA\u03AC\u03C4\u03C9 \u03B5\u03BC\u03C6\u03B1\u03BD\u03AF\u03B6\u03BF\u03BD\u03C4\u03B1\u03B9 \u03BF\u03B9 \u03C3\u03C5\u03BD\u03C5\u03C0\u03BF\u03B3\u03C1\u03AC\u03C6\u03BF\u03BD\u03C4\u03B5\u03C2 \u03C4\u03BF\u03C5 \u03B9\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03BF\u03CD \u03C3\u03C5\u03BC\u03C6\u03C9\u03BD\u03B7\u03C4\u03B9\u03BA\u03BF\u03CD"));
|
|
51
|
-
var _ref5 = /*#__PURE__*/_react["default"].createElement(_ui.CardHeading, null, "\u03A3\u03C5\u03BD\u03C5\u03C0\u03BF\u03B3\u03C1\u03AC\u03C6\u03BF\u03BD\u03C4\u03B1\u03C2 1");
|
|
52
|
-
var _ref6 = /*#__PURE__*/_react["default"].createElement(_ui.CardHeading, null, "\u03A3\u03C5\u03BD\u03C5\u03C0\u03BF\u03B3\u03C1\u03AC\u03C6\u03BF\u03BD\u03C4\u03B1\u03C2 2");
|
|
53
|
-
var _ref7 = /*#__PURE__*/_react["default"].createElement(_ui.Card, {
|
|
54
|
-
variant: "border",
|
|
55
|
-
borderColor: "dark"
|
|
56
|
-
}, /*#__PURE__*/_react["default"].createElement(_ui.CardHeading, null, "\u03A3\u03C5\u03BD\u03C5\u03C0\u03BF\u03B3\u03C1\u03AC\u03C6\u03BF\u03BD\u03C4\u03B1\u03C2 3"), /*#__PURE__*/_react["default"].createElement(_ui.CardContent, null, /*#__PURE__*/_react["default"].createElement(_SummaryList["default"], null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u038C\u03BD\u03BF\u03BC\u03B1"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, "\u039C\u03AC\u03C1\u03B9\u03BF\u03C2")))));
|
|
57
|
-
var _ref8 = /*#__PURE__*/_react["default"].createElement(_ui.Heading, {
|
|
58
|
-
size: "md"
|
|
59
|
-
}, "\u03A3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1 \u0394\u03AE\u03BB\u03C9\u03C3\u03B7\u03C2");
|
|
60
|
-
var _ref9 = /*#__PURE__*/_react["default"].createElement(_SummaryList["default"], null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u038C\u03BD\u03BF\u03BC\u03B1"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, "\u039C\u0391\u03A1\u0399\u039F\u03A3")), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u0395\u03C0\u03CE\u03BD\u03C5\u03BC\u03BF"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, "\u039C\u0395\u039D\u0395\u039E\u0395\u03A3")), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u0397\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u0393\u03AD\u03BD\u03BD\u03B7\u03C3\u03B7\u03C2"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, "15/12/1988")), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u03A3\u03C7\u03BF\u03BB\u03B5\u03AF\u03B1"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, /*#__PURE__*/_react["default"].createElement(_ui.List, {
|
|
61
|
-
marginBottom: 0,
|
|
62
|
-
marginTop: 0,
|
|
63
|
-
listStyle: "bullet"
|
|
64
|
-
}, /*#__PURE__*/_react["default"].createElement(_ui.ListItem, null, "2o \u0397\u039C\u0395\u03A1\u0397\u03A3\u0399\u039F \u0393\u0395\u039D\u0399\u039A\u039F \u039B\u03A5\u039A\u0395\u0399\u039F \u039E\u0391\u039D\u0398\u0397\u03A3"), /*#__PURE__*/_react["default"].createElement(_ui.ListItem, null, "2o \u0397\u039C\u0395\u03A1\u0397\u03A3\u0399\u039F \u0393\u0395\u039D\u0399\u039A\u039F \u039B\u03A5\u039A\u0395\u0399\u039F \u039E\u0391\u039D\u0398\u0397\u03A3"), /*#__PURE__*/_react["default"].createElement(_ui.ListItem, null, "2o \u0397\u039C\u0395\u03A1\u0397\u03A3\u0399\u039F \u0393\u0395\u039D\u0399\u039A\u039F \u039B\u03A5\u039A\u0395\u0399\u039F \u039E\u0391\u039D\u0398\u0397\u03A3"), /*#__PURE__*/_react["default"].createElement(_ui.ListItem, null, "15o \u0397\u039C\u0395\u03A1\u0397\u03A3\u0399\u039F \u0393\u0395\u039D\u0399\u039A\u039F \u0393\u03A5\u039C\u039D\u0391\u03A3\u0399\u039F \u0391\u0398\u0397\u039D\u03A9\u039D")))), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, null, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, "\u038C\u03BD\u03BF\u03BC\u03B1"), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, "\u039C\u03AC\u03C1\u03B9\u03BF\u03C2")));
|
|
65
|
-
var _ref10 = /*#__PURE__*/_react["default"].createElement(_Footer["default"], null);
|
|
66
|
-
var PreviewDisplay = exports.PreviewDisplay = function PreviewDisplay() {
|
|
67
|
-
return /*#__PURE__*/_react["default"].createElement(_Basic["default"], null, _ref, /*#__PURE__*/_react["default"].createElement(_Basic.Container, null, /*#__PURE__*/_react["default"].createElement(_Basic.Main, null, _ref2, _ref3, _ref4, /*#__PURE__*/_react["default"].createElement(_ui.Card, {
|
|
68
|
-
variant: "border",
|
|
69
|
-
borderColor: "dark"
|
|
70
|
-
}, _ref5, /*#__PURE__*/_react["default"].createElement(_ui.CardContent, null, /*#__PURE__*/_react["default"].createElement(_SummaryList["default"], null, fields && fields.map(function (field, index) {
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, {
|
|
72
|
-
key: index
|
|
73
|
-
}, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, field.name), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, field.value));
|
|
74
|
-
})))), /*#__PURE__*/_react["default"].createElement(_ui.Card, {
|
|
75
|
-
variant: "border",
|
|
76
|
-
borderColor: "dark"
|
|
77
|
-
}, _ref6, /*#__PURE__*/_react["default"].createElement(_ui.CardContent, null, /*#__PURE__*/_react["default"].createElement(_SummaryList["default"], null, fields && fields.map(function (field, index) {
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItem, {
|
|
79
|
-
key: index
|
|
80
|
-
}, /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemKey, null, field.name), /*#__PURE__*/_react["default"].createElement(_SummaryList.SummaryListItemValue, null, field.value));
|
|
81
|
-
})))), _ref7, "Contentw", _ref8, _ref9)), _ref10);
|
|
82
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.WithExactLength = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _form = _interopRequireWildcard(require("@digigov/form"));
|
|
12
|
-
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
var fields = [{
|
|
16
|
-
key: 'string',
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: {
|
|
19
|
-
primary: 'Πεδίο κειμένου',
|
|
20
|
-
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
key: 'multiplicity',
|
|
24
|
-
type: 'array',
|
|
25
|
-
multiplicity: true,
|
|
26
|
-
label: {
|
|
27
|
-
primary: 'Εξαρτώμενα μέλη',
|
|
28
|
-
secondary: 'Τα εξαρτώμενα μέλη είναι φυσικά πρόσωπα που υπάγονται στη φορολογική σας δήλωση'
|
|
29
|
-
},
|
|
30
|
-
extra: {
|
|
31
|
-
label: {
|
|
32
|
-
object: {
|
|
33
|
-
title: 'Εξαρτώμενο μέλος',
|
|
34
|
-
add: 'Προσθήκη',
|
|
35
|
-
"delete": 'Αφαίρεση μέλους'
|
|
36
|
-
},
|
|
37
|
-
question: {
|
|
38
|
-
title: 'Θέλετε να προσθέσετε εξαρτώμενα μέλη;',
|
|
39
|
-
yes: 'Ναι',
|
|
40
|
-
no: 'Όχι'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
length: 2,
|
|
44
|
-
of: {
|
|
45
|
-
type: 'object',
|
|
46
|
-
label: {
|
|
47
|
-
primary: 'Στοιχεία εξαρτώμενου μέλους',
|
|
48
|
-
secondary: 'Συμπληρώστε τα στοιχεία παρακάτω και μετά πατήστε το κουμπί «Προσθήκη»'
|
|
49
|
-
},
|
|
50
|
-
extra: {
|
|
51
|
-
fields: [{
|
|
52
|
-
key: 'firstName',
|
|
53
|
-
required: true,
|
|
54
|
-
type: 'string',
|
|
55
|
-
label: {
|
|
56
|
-
primary: 'Όνομα'
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: 'lastName',
|
|
60
|
-
required: true,
|
|
61
|
-
type: 'string',
|
|
62
|
-
label: {
|
|
63
|
-
primary: 'Επώνυμο'
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
key: 'bod',
|
|
67
|
-
required: true,
|
|
68
|
-
type: 'date',
|
|
69
|
-
label: {
|
|
70
|
-
primary: 'Ημερομηνία γέννησης'
|
|
71
|
-
}
|
|
72
|
-
}]
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: 'phonenumber',
|
|
78
|
-
type: 'phone_number',
|
|
79
|
-
required: true,
|
|
80
|
-
label: {
|
|
81
|
-
primary: 'Σταθερό τηλέφωνο',
|
|
82
|
-
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
83
|
-
}
|
|
84
|
-
}];
|
|
85
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
86
|
-
type: "submit"
|
|
87
|
-
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
88
|
-
var WithExactLength = exports.WithExactLength = function WithExactLength() {
|
|
89
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
90
|
-
onSubmit: function onSubmit(data) {
|
|
91
|
-
console.log(data);
|
|
92
|
-
}
|
|
93
|
-
}, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
94
|
-
name: "string"
|
|
95
|
-
}, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
96
|
-
name: "multiplicity"
|
|
97
|
-
}, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
98
|
-
name: "phonenumber"
|
|
99
|
-
}, fields[2])), _ref);
|
|
100
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.WithMaxLength = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _form = _interopRequireWildcard(require("@digigov/form"));
|
|
12
|
-
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
var fields = [{
|
|
16
|
-
key: 'string',
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: {
|
|
19
|
-
primary: 'Πεδίο κειμένου',
|
|
20
|
-
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
key: 'multiplicity',
|
|
24
|
-
type: 'array',
|
|
25
|
-
multiplicity: true,
|
|
26
|
-
label: {
|
|
27
|
-
primary: 'Εξαρτώμενα μέλη',
|
|
28
|
-
secondary: 'Τα εξαρτώμενα μέλη είναι φυσικά πρόσωπα που υπάγονται στη φορολογική σας δήλωση'
|
|
29
|
-
},
|
|
30
|
-
extra: {
|
|
31
|
-
label: {
|
|
32
|
-
object: {
|
|
33
|
-
title: 'Εξαρτώμενο μέλος',
|
|
34
|
-
add: 'Προσθήκη',
|
|
35
|
-
"delete": 'Αφαίρεση μέλους'
|
|
36
|
-
},
|
|
37
|
-
question: {
|
|
38
|
-
title: 'Θέλετε να προσθέσετε εξαρτώμενα μέλη;',
|
|
39
|
-
yes: 'Ναι',
|
|
40
|
-
no: 'Όχι'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
max: 2,
|
|
44
|
-
of: {
|
|
45
|
-
type: 'object',
|
|
46
|
-
label: {
|
|
47
|
-
primary: 'Στοιχεία εξαρτώμενου μέλους',
|
|
48
|
-
secondary: 'Συμπληρώστε τα στοιχεία παρακάτω και μετά πατήστε το κουμπί «Προσθήκη»'
|
|
49
|
-
},
|
|
50
|
-
extra: {
|
|
51
|
-
fields: [{
|
|
52
|
-
key: 'firstName',
|
|
53
|
-
required: true,
|
|
54
|
-
type: 'string',
|
|
55
|
-
label: {
|
|
56
|
-
primary: 'Όνομα'
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: 'lastName',
|
|
60
|
-
required: true,
|
|
61
|
-
type: 'string',
|
|
62
|
-
label: {
|
|
63
|
-
primary: 'Επώνυμο'
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
key: 'bod',
|
|
67
|
-
required: true,
|
|
68
|
-
type: 'date',
|
|
69
|
-
label: {
|
|
70
|
-
primary: 'Ημερομηνία γέννησης'
|
|
71
|
-
},
|
|
72
|
-
extra: {
|
|
73
|
-
max: 'now'
|
|
74
|
-
}
|
|
75
|
-
}]
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: 'phonenumber',
|
|
81
|
-
type: 'phone_number',
|
|
82
|
-
required: true,
|
|
83
|
-
label: {
|
|
84
|
-
primary: 'Σταθερό τηλέφωνο',
|
|
85
|
-
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
86
|
-
}
|
|
87
|
-
}];
|
|
88
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
89
|
-
type: "submit"
|
|
90
|
-
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
91
|
-
var WithMaxLength = exports.WithMaxLength = function WithMaxLength() {
|
|
92
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
93
|
-
onSubmit: function onSubmit(data) {
|
|
94
|
-
console.log(data);
|
|
95
|
-
}
|
|
96
|
-
}, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
97
|
-
name: "string"
|
|
98
|
-
}, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
99
|
-
name: "multiplicity"
|
|
100
|
-
}, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
101
|
-
name: "phonenumber"
|
|
102
|
-
}, fields[2])), _ref);
|
|
103
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.WithMinAndMaxLength = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _form = _interopRequireWildcard(require("@digigov/form"));
|
|
12
|
-
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
var fields = [{
|
|
16
|
-
key: 'string',
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: {
|
|
19
|
-
primary: 'Πεδίο κειμένου',
|
|
20
|
-
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
key: 'multiplicity',
|
|
24
|
-
type: 'array',
|
|
25
|
-
multiplicity: true,
|
|
26
|
-
label: {
|
|
27
|
-
primary: 'Εξαρτώμενα μέλη',
|
|
28
|
-
secondary: 'Τα εξαρτώμενα μέλη είναι φυσικά πρόσωπα που υπάγονται στη φορολογική σας δήλωση'
|
|
29
|
-
},
|
|
30
|
-
extra: {
|
|
31
|
-
label: {
|
|
32
|
-
object: {
|
|
33
|
-
title: 'Εξαρτώμενο μέλος',
|
|
34
|
-
add: 'Προσθήκη',
|
|
35
|
-
"delete": 'Αφαίρεση μέλους'
|
|
36
|
-
},
|
|
37
|
-
question: {
|
|
38
|
-
title: 'Θέλετε να προσθέσετε εξαρτώμενα μέλη;',
|
|
39
|
-
yes: 'Ναι',
|
|
40
|
-
no: 'Όχι'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
min: 2,
|
|
44
|
-
max: 3,
|
|
45
|
-
of: {
|
|
46
|
-
type: 'object',
|
|
47
|
-
label: {
|
|
48
|
-
primary: 'Στοιχεία εξαρτώμενου μέλους',
|
|
49
|
-
secondary: 'Συμπληρώστε τα στοιχεία παρακάτω και μετά πατήστε το κουμπί «Προσθήκη»'
|
|
50
|
-
},
|
|
51
|
-
extra: {
|
|
52
|
-
fields: [{
|
|
53
|
-
key: 'firstName',
|
|
54
|
-
required: true,
|
|
55
|
-
type: 'string',
|
|
56
|
-
label: {
|
|
57
|
-
primary: 'Όνομα'
|
|
58
|
-
}
|
|
59
|
-
}, {
|
|
60
|
-
key: 'lastName',
|
|
61
|
-
required: true,
|
|
62
|
-
type: 'string',
|
|
63
|
-
label: {
|
|
64
|
-
primary: 'Επώνυμο'
|
|
65
|
-
}
|
|
66
|
-
}, {
|
|
67
|
-
key: 'bod',
|
|
68
|
-
required: true,
|
|
69
|
-
type: 'date',
|
|
70
|
-
label: {
|
|
71
|
-
primary: 'Ημερομηνία γέννησης'
|
|
72
|
-
},
|
|
73
|
-
extra: {
|
|
74
|
-
max: 'now'
|
|
75
|
-
}
|
|
76
|
-
}]
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
81
|
-
key: 'phonenumber',
|
|
82
|
-
type: 'phone_number',
|
|
83
|
-
required: true,
|
|
84
|
-
label: {
|
|
85
|
-
primary: 'Σταθερό τηλέφωνο',
|
|
86
|
-
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
87
|
-
}
|
|
88
|
-
}];
|
|
89
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
90
|
-
type: "submit"
|
|
91
|
-
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
92
|
-
var WithMinAndMaxLength = exports.WithMinAndMaxLength = function WithMinAndMaxLength() {
|
|
93
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
94
|
-
onSubmit: function onSubmit(data) {
|
|
95
|
-
console.log(data);
|
|
96
|
-
}
|
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
98
|
-
name: "string"
|
|
99
|
-
}, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
100
|
-
name: "multiplicity"
|
|
101
|
-
}, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
102
|
-
name: "phonenumber"
|
|
103
|
-
}, fields[2])), _ref);
|
|
104
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.WithMinLength = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _form = _interopRequireWildcard(require("@digigov/form"));
|
|
12
|
-
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
-
var fields = [{
|
|
16
|
-
key: 'string',
|
|
17
|
-
type: 'string',
|
|
18
|
-
label: {
|
|
19
|
-
primary: 'Πεδίο κειμένου',
|
|
20
|
-
secondary: 'Το multiplicity field είναι ένα πεδίο οπότε φαίνεται και είναι μέρος της φόρμας'
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
key: 'multiplicity',
|
|
24
|
-
type: 'array',
|
|
25
|
-
multiplicity: true,
|
|
26
|
-
label: {
|
|
27
|
-
primary: 'Εξαρτώμενα μέλη',
|
|
28
|
-
secondary: 'Τα εξαρτώμενα μέλη είναι φυσικά πρόσωπα που υπάγονται στη φορολογική σας δήλωση'
|
|
29
|
-
},
|
|
30
|
-
extra: {
|
|
31
|
-
label: {
|
|
32
|
-
object: {
|
|
33
|
-
title: 'Εξαρτώμενο μέλος',
|
|
34
|
-
add: 'Προσθήκη',
|
|
35
|
-
"delete": 'Αφαίρεση μέλους'
|
|
36
|
-
},
|
|
37
|
-
question: {
|
|
38
|
-
title: 'Θέλετε να προσθέσετε εξαρτώμενα μέλη;',
|
|
39
|
-
yes: 'Ναι',
|
|
40
|
-
no: 'Όχι'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
min: 3,
|
|
44
|
-
of: {
|
|
45
|
-
type: 'object',
|
|
46
|
-
label: {
|
|
47
|
-
primary: 'Στοιχεία εξαρτώμενου μέλους',
|
|
48
|
-
secondary: 'Συμπληρώστε τα στοιχεία παρακάτω και μετά πατήστε το κουμπί «Προσθήκη»'
|
|
49
|
-
},
|
|
50
|
-
extra: {
|
|
51
|
-
fields: [{
|
|
52
|
-
key: 'firstName',
|
|
53
|
-
required: true,
|
|
54
|
-
type: 'string',
|
|
55
|
-
label: {
|
|
56
|
-
primary: 'Όνομα'
|
|
57
|
-
}
|
|
58
|
-
}, {
|
|
59
|
-
key: 'lastName',
|
|
60
|
-
required: true,
|
|
61
|
-
type: 'string',
|
|
62
|
-
label: {
|
|
63
|
-
primary: 'Επώνυμο'
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
key: 'bod',
|
|
67
|
-
required: true,
|
|
68
|
-
type: 'date',
|
|
69
|
-
label: {
|
|
70
|
-
primary: 'Ημερομηνία γέννησης'
|
|
71
|
-
},
|
|
72
|
-
extra: {
|
|
73
|
-
max: 'now'
|
|
74
|
-
}
|
|
75
|
-
}]
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: 'phonenumber',
|
|
81
|
-
type: 'phone_number',
|
|
82
|
-
required: true,
|
|
83
|
-
label: {
|
|
84
|
-
primary: 'Σταθερό τηλέφωνο',
|
|
85
|
-
secondary: 'Συμπληρώστε τον αριθμό τηλεφώνου σας'
|
|
86
|
-
}
|
|
87
|
-
}];
|
|
88
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
89
|
-
type: "submit"
|
|
90
|
-
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
91
|
-
var WithMinLength = exports.WithMinLength = function WithMinLength() {
|
|
92
|
-
return /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
93
|
-
onSubmit: function onSubmit(data) {
|
|
94
|
-
console.log(data);
|
|
95
|
-
}
|
|
96
|
-
}, /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
97
|
-
name: "string"
|
|
98
|
-
}, fields[0])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
99
|
-
name: "multiplicity"
|
|
100
|
-
}, fields[1])), /*#__PURE__*/_react["default"].createElement(_form.Field, (0, _extends2["default"])({
|
|
101
|
-
name: "phonenumber"
|
|
102
|
-
}, fields[2])), _ref);
|
|
103
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
var _exportNames = {};
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _Questions = _interopRequireDefault(require("@digigov/form/Questions"));
|
|
10
|
-
var _Default = require("@digigov/form/Questions/__stories__/Default");
|
|
11
|
-
Object.keys(_Default).forEach(function (key) {
|
|
12
|
-
if (key === "default" || key === "__esModule") return;
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
|
-
if (key in exports && exports[key] === _Default[key]) return;
|
|
15
|
-
Object.defineProperty(exports, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function get() {
|
|
18
|
-
return _Default[key];
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
var _default = exports["default"] = {
|
|
23
|
-
title: 'Digigov Form/Questions',
|
|
24
|
-
component: _Questions["default"],
|
|
25
|
-
displayName: 'Questions'
|
|
26
|
-
};
|