@digigov/form 1.0.0-47312a12 → 1.0.0-51c931ab
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/FieldBase/package.json +6 -0
- package/Field/FieldBaseContainer/package.json +6 -0
- package/Field/FieldConditional/package.json +6 -0
- package/Field/types/package.json +6 -0
- package/Field/{utils.js → utils/index.js} +5 -0
- package/Field/utils/package.json +6 -0
- package/FieldArray/FieldArray.stories/package.json +6 -0
- package/FieldArray/__stories__/Default/package.json +6 -0
- package/FieldArray/__stories__/WithExactLength/package.json +6 -0
- package/Fieldset/FieldsetWithContext/package.json +6 -0
- package/Fieldset/types/package.json +6 -0
- package/Form.stories/package.json +6 -0
- package/FormBuilder/FormBuilder/package.json +6 -0
- package/FormBuilder/FormBuilder.stories/package.json +6 -0
- package/FormBuilder/__stories__/Default/package.json +6 -0
- package/FormContext/package.json +6 -0
- package/MultiplicityField/MultiplicityField.stories/package.json +6 -0
- package/MultiplicityField/__stories__/Default/package.json +6 -0
- package/MultiplicityField/__stories__/PreviewDisplay/package.json +6 -0
- package/MultiplicityField/__stories__/WithExactLength/package.json +6 -0
- package/MultiplicityField/__stories__/WithMaxLength/package.json +6 -0
- package/MultiplicityField/__stories__/WithMinAndMaxLength/package.json +6 -0
- package/MultiplicityField/__stories__/WithMinLength/package.json +6 -0
- package/MultiplicityField/add-objects/package.json +6 -0
- package/Questions/Questions/package.json +6 -0
- package/Questions/Questions.stories/package.json +6 -0
- package/Questions/QuestionsContext/package.json +6 -0
- package/Questions/Step/ReviewStep/package.json +6 -0
- package/Questions/Step/Step/package.json +6 -0
- package/Questions/Step/StepArrayReview/package.json +6 -0
- package/Questions/Step/StepContext/package.json +6 -0
- package/Questions/Step/StepDescription/package.json +6 -0
- package/Questions/Step/StepForm/package.json +6 -0
- package/Questions/Step/StepQuote/package.json +6 -0
- package/Questions/Step/StepTitle/package.json +6 -0
- package/Questions/Step/getAddMoreFields/package.json +6 -0
- package/Questions/Step/types/package.json +6 -0
- package/Questions/__stories__/Default/package.json +6 -0
- package/Questions/getNextStep/package.json +6 -0
- package/Questions/index.spec/package.json +6 -0
- package/Questions/types/package.json +6 -0
- package/cjs/Field/{utils.js → utils/index.js} +6 -0
- package/cjs/inputs/ImageInput/ImageInput.stories/index.js +59 -0
- package/cjs/inputs/ImageInput/ImageInput.stories.playwright.json +77 -0
- package/cjs/inputs/ImageInput/__stories__/Default/index.js +51 -0
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +59 -0
- package/cjs/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +56 -0
- package/cjs/inputs/ImageInput/index.js +116 -0
- package/cjs/inputs/index.js +8 -0
- package/cjs/{registry.js → registry/index.js} +6 -0
- package/cjs/validators/index.js +9 -0
- package/cjs/validators/utils/{file.js → file/index.js} +4 -2
- package/cjs/validators/utils/image/index.js +168 -0
- package/cjs/validators/utils/index.js +14 -0
- package/index.js +1 -1
- package/inputs/AutoComplete/AutoComplete.stories/package.json +6 -0
- package/inputs/AutoComplete/__stories__/Default/package.json +6 -0
- package/inputs/Checkboxes/Checkboxes.stories/package.json +6 -0
- package/inputs/Checkboxes/__stories__/Conditional/package.json +6 -0
- package/inputs/Checkboxes/__stories__/Default/package.json +6 -0
- package/inputs/Checkboxes/__stories__/WithDivider/package.json +6 -0
- package/inputs/DateInput/DateInput.stories/package.json +6 -0
- package/inputs/DateInput/__stories__/Default/package.json +6 -0
- package/inputs/FileInput/FileInput.stories/package.json +6 -0
- package/inputs/FileInput/__stories__/Default/package.json +6 -0
- package/inputs/FileInput/index.d.ts +3 -1
- package/inputs/ImageInput/ImageInput.stories/index.js +9 -0
- package/inputs/ImageInput/ImageInput.stories/package.json +6 -0
- package/inputs/ImageInput/ImageInput.stories.d.ts +10 -0
- package/inputs/ImageInput/ImageInput.stories.playwright.json +77 -0
- package/inputs/ImageInput/__stories__/Default/index.js +30 -0
- package/inputs/ImageInput/__stories__/Default/package.json +6 -0
- package/inputs/ImageInput/__stories__/Default.d.ts +2 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension/index.js +38 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension/package.json +6 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageDimension.d.ts +2 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageSize/index.js +35 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageSize/package.json +6 -0
- package/inputs/ImageInput/__stories__/WithInvalidImageSize.d.ts +2 -0
- package/inputs/ImageInput/index.d.ts +25 -0
- package/inputs/ImageInput/index.js +83 -0
- package/inputs/ImageInput/package.json +6 -0
- package/inputs/Input/Input.stories/package.json +6 -0
- package/inputs/Input/__stories__/AFM/package.json +6 -0
- package/inputs/Input/__stories__/Boolean/package.json +6 -0
- package/inputs/Input/__stories__/Default/package.json +6 -0
- package/inputs/Input/__stories__/IBAN/package.json +6 -0
- package/inputs/Input/__stories__/Integer/package.json +6 -0
- package/inputs/Input/__stories__/MobilePhone/package.json +6 -0
- package/inputs/Input/__stories__/PhoneNumber/package.json +6 -0
- package/inputs/Input/__stories__/PostalCode/package.json +6 -0
- package/inputs/Input/__stories__/TextWithCharacterLimit/package.json +6 -0
- package/inputs/Label/Label.stories/package.json +6 -0
- package/inputs/Label/__stories__/Default/package.json +6 -0
- package/inputs/OtpInput/OtpInput.stories/package.json +6 -0
- package/inputs/OtpInput/__stories__/Default/package.json +6 -0
- package/inputs/Radio/Radio.stories/package.json +6 -0
- package/inputs/Radio/__stories__/Conditional/package.json +6 -0
- package/inputs/Radio/__stories__/Default/package.json +6 -0
- package/inputs/Radio/__stories__/WithDivider/package.json +6 -0
- package/inputs/Select/Select.stories/package.json +6 -0
- package/inputs/Select/__stories__/Default/package.json +6 -0
- package/inputs/index.d.ts +1 -0
- package/inputs/index.js +1 -0
- package/internal/package.json +6 -0
- package/package.json +4 -4
- package/{registry.js → registry/index.js} +4 -0
- package/registry/package.json +6 -0
- package/registry.d.ts +2 -0
- package/src/Field/utils.ts +5 -0
- package/src/inputs/FileInput/index.tsx +4 -1
- package/src/inputs/ImageInput/ImageInput.stories.js +10 -0
- package/src/inputs/ImageInput/ImageInput.stories.playwright.json +77 -0
- package/src/inputs/ImageInput/__stories__/Default.tsx +31 -0
- package/src/inputs/ImageInput/__stories__/WithInvalidImageDimension.tsx +40 -0
- package/src/inputs/ImageInput/__stories__/WithInvalidImageSize.tsx +36 -0
- package/src/inputs/ImageInput/index.tsx +101 -0
- package/src/inputs/index.ts +1 -0
- package/src/registry.js +4 -0
- package/src/types.tsx +20 -18
- package/src/validators/index.ts +15 -1
- package/src/validators/utils/file.ts +2 -2
- package/src/validators/utils/image.ts +80 -0
- package/src/validators/utils/index.ts +1 -0
- package/types/package.json +6 -0
- package/types.d.ts +2 -1
- package/utils/package.json +6 -0
- package/validators/index.js +10 -1
- package/validators/types/package.json +6 -0
- package/validators/utils/afm/package.json +6 -0
- package/validators/utils/{file.js → file/index.js} +4 -2
- package/validators/utils/file/package.json +6 -0
- package/validators/utils/iban/package.json +6 -0
- package/validators/utils/image/index.js +155 -0
- package/validators/utils/image/package.json +6 -0
- package/validators/utils/image.d.ts +3 -0
- package/validators/utils/index.d.ts +1 -0
- package/validators/utils/index.js +1 -0
- package/validators/utils/int/package.json +6 -0
- package/validators/utils/number/package.json +6 -0
- package/validators/utils/otp/package.json +6 -0
- package/validators/utils/phone/package.json +6 -0
- package/validators/utils/postal_code/package.json +6 -0
- package/validators/utils/text_limit/package.json +6 -0
- package/validators/utils/uuid4/package.json +6 -0
- package/validators/validators.spec/package.json +6 -0
- /package/Field/{FieldBase.js → FieldBase/index.js} +0 -0
- /package/Field/{FieldBaseContainer.js → FieldBaseContainer/index.js} +0 -0
- /package/Field/{FieldConditional.js → FieldConditional/index.js} +0 -0
- /package/Field/{types.js → types/index.js} +0 -0
- /package/FieldArray/{FieldArray.stories.js → FieldArray.stories/index.js} +0 -0
- /package/FieldArray/__stories__/{Default.js → Default/index.js} +0 -0
- /package/FieldArray/__stories__/{WithExactLength.js → WithExactLength/index.js} +0 -0
- /package/Fieldset/{FieldsetWithContext.js → FieldsetWithContext/index.js} +0 -0
- /package/Fieldset/{types.js → types/index.js} +0 -0
- /package/{Form.stories.js → Form.stories/index.js} +0 -0
- /package/FormBuilder/{FormBuilder.js → FormBuilder/index.js} +0 -0
- /package/FormBuilder/{FormBuilder.stories.js → FormBuilder.stories/index.js} +0 -0
- /package/FormBuilder/__stories__/{Default.js → Default/index.js} +0 -0
- /package/{FormContext.js → FormContext/index.js} +0 -0
- /package/MultiplicityField/{MultiplicityField.stories.js → MultiplicityField.stories/index.js} +0 -0
- /package/MultiplicityField/__stories__/{Default.js → Default/index.js} +0 -0
- /package/MultiplicityField/__stories__/{PreviewDisplay.js → PreviewDisplay/index.js} +0 -0
- /package/MultiplicityField/__stories__/{WithExactLength.js → WithExactLength/index.js} +0 -0
- /package/MultiplicityField/__stories__/{WithMaxLength.js → WithMaxLength/index.js} +0 -0
- /package/MultiplicityField/__stories__/{WithMinAndMaxLength.js → WithMinAndMaxLength/index.js} +0 -0
- /package/MultiplicityField/__stories__/{WithMinLength.js → WithMinLength/index.js} +0 -0
- /package/MultiplicityField/{add-objects.js → add-objects/index.js} +0 -0
- /package/Questions/{Questions.js → Questions/index.js} +0 -0
- /package/Questions/{Questions.stories.js → Questions.stories/index.js} +0 -0
- /package/Questions/{QuestionsContext.js → QuestionsContext/index.js} +0 -0
- /package/Questions/Step/{ReviewStep.js → ReviewStep/index.js} +0 -0
- /package/Questions/Step/{Step.js → Step/index.js} +0 -0
- /package/Questions/Step/{StepArrayReview.js → StepArrayReview/index.js} +0 -0
- /package/Questions/Step/{StepContext.js → StepContext/index.js} +0 -0
- /package/Questions/Step/{StepDescription.js → StepDescription/index.js} +0 -0
- /package/Questions/Step/{StepForm.js → StepForm/index.js} +0 -0
- /package/Questions/Step/{StepQuote.js → StepQuote/index.js} +0 -0
- /package/Questions/Step/{StepTitle.js → StepTitle/index.js} +0 -0
- /package/Questions/Step/{getAddMoreFields.js → getAddMoreFields/index.js} +0 -0
- /package/Questions/Step/{types.js → types/index.js} +0 -0
- /package/Questions/__stories__/{Default.js → Default/index.js} +0 -0
- /package/Questions/{getNextStep.js → getNextStep/index.js} +0 -0
- /package/Questions/{index.spec.js → index.spec/index.js} +0 -0
- /package/Questions/{types.js → types/index.js} +0 -0
- /package/cjs/Field/{FieldBase.js → FieldBase/index.js} +0 -0
- /package/cjs/Field/{FieldBaseContainer.js → FieldBaseContainer/index.js} +0 -0
- /package/cjs/Field/{FieldConditional.js → FieldConditional/index.js} +0 -0
- /package/cjs/Field/{types.js → types/index.js} +0 -0
- /package/cjs/FieldArray/{FieldArray.stories.js → FieldArray.stories/index.js} +0 -0
- /package/cjs/FieldArray/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/FieldArray/__stories__/{WithExactLength.js → WithExactLength/index.js} +0 -0
- /package/cjs/Fieldset/{FieldsetWithContext.js → FieldsetWithContext/index.js} +0 -0
- /package/cjs/Fieldset/{types.js → types/index.js} +0 -0
- /package/cjs/{Form.stories.js → Form.stories/index.js} +0 -0
- /package/cjs/FormBuilder/{FormBuilder.js → FormBuilder/index.js} +0 -0
- /package/cjs/FormBuilder/{FormBuilder.stories.js → FormBuilder.stories/index.js} +0 -0
- /package/cjs/FormBuilder/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/{FormContext.js → FormContext/index.js} +0 -0
- /package/cjs/MultiplicityField/{MultiplicityField.stories.js → MultiplicityField.stories/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{PreviewDisplay.js → PreviewDisplay/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{WithExactLength.js → WithExactLength/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{WithMaxLength.js → WithMaxLength/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{WithMinAndMaxLength.js → WithMinAndMaxLength/index.js} +0 -0
- /package/cjs/MultiplicityField/__stories__/{WithMinLength.js → WithMinLength/index.js} +0 -0
- /package/cjs/MultiplicityField/{add-objects.js → add-objects/index.js} +0 -0
- /package/cjs/Questions/{Questions.js → Questions/index.js} +0 -0
- /package/cjs/Questions/{Questions.stories.js → Questions.stories/index.js} +0 -0
- /package/cjs/Questions/{QuestionsContext.js → QuestionsContext/index.js} +0 -0
- /package/cjs/Questions/Step/{ReviewStep.js → ReviewStep/index.js} +0 -0
- /package/cjs/Questions/Step/{Step.js → Step/index.js} +0 -0
- /package/cjs/Questions/Step/{StepArrayReview.js → StepArrayReview/index.js} +0 -0
- /package/cjs/Questions/Step/{StepContext.js → StepContext/index.js} +0 -0
- /package/cjs/Questions/Step/{StepDescription.js → StepDescription/index.js} +0 -0
- /package/cjs/Questions/Step/{StepForm.js → StepForm/index.js} +0 -0
- /package/cjs/Questions/Step/{StepQuote.js → StepQuote/index.js} +0 -0
- /package/cjs/Questions/Step/{StepTitle.js → StepTitle/index.js} +0 -0
- /package/cjs/Questions/Step/{getAddMoreFields.js → getAddMoreFields/index.js} +0 -0
- /package/cjs/Questions/Step/{types.js → types/index.js} +0 -0
- /package/cjs/Questions/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/Questions/{getNextStep.js → getNextStep/index.js} +0 -0
- /package/cjs/Questions/{index.spec.js → index.spec/index.js} +0 -0
- /package/cjs/Questions/{types.js → types/index.js} +0 -0
- /package/cjs/inputs/AutoComplete/{AutoComplete.stories.js → AutoComplete.stories/index.js} +0 -0
- /package/cjs/inputs/AutoComplete/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Checkboxes/{Checkboxes.stories.js → Checkboxes.stories/index.js} +0 -0
- /package/cjs/inputs/Checkboxes/__stories__/{Conditional.js → Conditional/index.js} +0 -0
- /package/cjs/inputs/Checkboxes/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Checkboxes/__stories__/{WithDivider.js → WithDivider/index.js} +0 -0
- /package/cjs/inputs/DateInput/{DateInput.stories.js → DateInput.stories/index.js} +0 -0
- /package/cjs/inputs/DateInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/FileInput/{FileInput.stories.js → FileInput.stories/index.js} +0 -0
- /package/cjs/inputs/FileInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Input/{Input.stories.js → Input.stories/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{AFM.js → AFM/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{Boolean.js → Boolean/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{IBAN.js → IBAN/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{Integer.js → Integer/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{MobilePhone.js → MobilePhone/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{PhoneNumber.js → PhoneNumber/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{PostalCode.js → PostalCode/index.js} +0 -0
- /package/cjs/inputs/Input/__stories__/{TextWithCharacterLimit.js → TextWithCharacterLimit/index.js} +0 -0
- /package/cjs/inputs/Label/{Label.stories.js → Label.stories/index.js} +0 -0
- /package/cjs/inputs/Label/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/OtpInput/{OtpInput.stories.js → OtpInput.stories/index.js} +0 -0
- /package/cjs/inputs/OtpInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Radio/{Radio.stories.js → Radio.stories/index.js} +0 -0
- /package/cjs/inputs/Radio/__stories__/{Conditional.js → Conditional/index.js} +0 -0
- /package/cjs/inputs/Radio/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/inputs/Radio/__stories__/{WithDivider.js → WithDivider/index.js} +0 -0
- /package/cjs/inputs/Select/{Select.stories.js → Select.stories/index.js} +0 -0
- /package/cjs/inputs/Select/__stories__/{Default.js → Default/index.js} +0 -0
- /package/cjs/{internal.js → internal/index.js} +0 -0
- /package/cjs/{types.js → types/index.js} +0 -0
- /package/cjs/{utils.js → utils/index.js} +0 -0
- /package/cjs/validators/{types.js → types/index.js} +0 -0
- /package/cjs/validators/utils/{afm.js → afm/index.js} +0 -0
- /package/cjs/validators/utils/{iban.js → iban/index.js} +0 -0
- /package/cjs/validators/utils/{int.js → int/index.js} +0 -0
- /package/cjs/validators/utils/{number.js → number/index.js} +0 -0
- /package/cjs/validators/utils/{otp.js → otp/index.js} +0 -0
- /package/cjs/validators/utils/{phone.js → phone/index.js} +0 -0
- /package/cjs/validators/utils/{postal_code.js → postal_code/index.js} +0 -0
- /package/cjs/validators/utils/{text_limit.js → text_limit/index.js} +0 -0
- /package/cjs/validators/utils/{uuid4.js → uuid4/index.js} +0 -0
- /package/cjs/validators/{validators.spec.js → validators.spec/index.js} +0 -0
- /package/inputs/AutoComplete/{AutoComplete.stories.js → AutoComplete.stories/index.js} +0 -0
- /package/inputs/AutoComplete/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Checkboxes/{Checkboxes.stories.js → Checkboxes.stories/index.js} +0 -0
- /package/inputs/Checkboxes/__stories__/{Conditional.js → Conditional/index.js} +0 -0
- /package/inputs/Checkboxes/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Checkboxes/__stories__/{WithDivider.js → WithDivider/index.js} +0 -0
- /package/inputs/DateInput/{DateInput.stories.js → DateInput.stories/index.js} +0 -0
- /package/inputs/DateInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/FileInput/{FileInput.stories.js → FileInput.stories/index.js} +0 -0
- /package/inputs/FileInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Input/{Input.stories.js → Input.stories/index.js} +0 -0
- /package/inputs/Input/__stories__/{AFM.js → AFM/index.js} +0 -0
- /package/inputs/Input/__stories__/{Boolean.js → Boolean/index.js} +0 -0
- /package/inputs/Input/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Input/__stories__/{IBAN.js → IBAN/index.js} +0 -0
- /package/inputs/Input/__stories__/{Integer.js → Integer/index.js} +0 -0
- /package/inputs/Input/__stories__/{MobilePhone.js → MobilePhone/index.js} +0 -0
- /package/inputs/Input/__stories__/{PhoneNumber.js → PhoneNumber/index.js} +0 -0
- /package/inputs/Input/__stories__/{PostalCode.js → PostalCode/index.js} +0 -0
- /package/inputs/Input/__stories__/{TextWithCharacterLimit.js → TextWithCharacterLimit/index.js} +0 -0
- /package/inputs/Label/{Label.stories.js → Label.stories/index.js} +0 -0
- /package/inputs/Label/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/OtpInput/{OtpInput.stories.js → OtpInput.stories/index.js} +0 -0
- /package/inputs/OtpInput/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Radio/{Radio.stories.js → Radio.stories/index.js} +0 -0
- /package/inputs/Radio/__stories__/{Conditional.js → Conditional/index.js} +0 -0
- /package/inputs/Radio/__stories__/{Default.js → Default/index.js} +0 -0
- /package/inputs/Radio/__stories__/{WithDivider.js → WithDivider/index.js} +0 -0
- /package/inputs/Select/{Select.stories.js → Select.stories/index.js} +0 -0
- /package/inputs/Select/__stories__/{Default.js → Default/index.js} +0 -0
- /package/{internal.js → internal/index.js} +0 -0
- /package/{types.js → types/index.js} +0 -0
- /package/{utils.js → utils/index.js} +0 -0
- /package/validators/{types.js → types/index.js} +0 -0
- /package/validators/utils/{afm.js → afm/index.js} +0 -0
- /package/validators/utils/{iban.js → iban/index.js} +0 -0
- /package/validators/utils/{int.js → int/index.js} +0 -0
- /package/validators/utils/{number.js → number/index.js} +0 -0
- /package/validators/utils/{otp.js → otp/index.js} +0 -0
- /package/validators/utils/{phone.js → phone/index.js} +0 -0
- /package/validators/utils/{postal_code.js → postal_code/index.js} +0 -0
- /package/validators/utils/{text_limit.js → text_limit/index.js} +0 -0
- /package/validators/utils/{uuid4.js → uuid4/index.js} +0 -0
- /package/validators/{validators.spec.js → validators.spec/index.js} +0 -0
|
@@ -4,6 +4,7 @@ import { FormContext } from "../FormContext";
|
|
|
4
4
|
import Checkboxes from "../inputs/Checkboxes";
|
|
5
5
|
import DateInput from "../inputs/DateInput";
|
|
6
6
|
import FileInput from "../inputs/FileInput";
|
|
7
|
+
import ImageInput from "../inputs/ImageInput";
|
|
7
8
|
import Input from "../inputs/Input";
|
|
8
9
|
import OtpInput from "../inputs/OtpInput";
|
|
9
10
|
import Radio from "../inputs/Radio";
|
|
@@ -22,6 +23,10 @@ var FIELD_COMPONENTS = {
|
|
|
22
23
|
wrapper: 'fieldset',
|
|
23
24
|
component: FileInput
|
|
24
25
|
},
|
|
26
|
+
image: {
|
|
27
|
+
wrapper: 'fieldset',
|
|
28
|
+
component: ImageInput
|
|
29
|
+
},
|
|
25
30
|
date: {
|
|
26
31
|
wrapper: 'fieldset',
|
|
27
32
|
controlled: true,
|
|
@@ -23,6 +23,8 @@ var _DateInput = _interopRequireDefault(require("../inputs/DateInput"));
|
|
|
23
23
|
|
|
24
24
|
var _FileInput = _interopRequireDefault(require("../inputs/FileInput"));
|
|
25
25
|
|
|
26
|
+
var _ImageInput = _interopRequireDefault(require("../inputs/ImageInput"));
|
|
27
|
+
|
|
26
28
|
var _Input = _interopRequireDefault(require("../inputs/Input"));
|
|
27
29
|
|
|
28
30
|
var _OtpInput = _interopRequireDefault(require("../inputs/OtpInput"));
|
|
@@ -51,6 +53,10 @@ var FIELD_COMPONENTS = {
|
|
|
51
53
|
wrapper: 'fieldset',
|
|
52
54
|
component: _FileInput["default"]
|
|
53
55
|
},
|
|
56
|
+
image: {
|
|
57
|
+
wrapper: 'fieldset',
|
|
58
|
+
component: _ImageInput["default"]
|
|
59
|
+
},
|
|
54
60
|
date: {
|
|
55
61
|
wrapper: 'fieldset',
|
|
56
62
|
controlled: true,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {};
|
|
9
|
+
exports["default"] = void 0;
|
|
10
|
+
|
|
11
|
+
var _ = _interopRequireDefault(require("./"));
|
|
12
|
+
|
|
13
|
+
var _Default = require("./__stories__/Default");
|
|
14
|
+
|
|
15
|
+
Object.keys(_Default).forEach(function (key) {
|
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
18
|
+
if (key in exports && exports[key] === _Default[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _Default[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _WithInvalidImageSize = require("./__stories__/WithInvalidImageSize");
|
|
28
|
+
|
|
29
|
+
Object.keys(_WithInvalidImageSize).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
32
|
+
if (key in exports && exports[key] === _WithInvalidImageSize[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _WithInvalidImageSize[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _WithInvalidImageDimension = require("./__stories__/WithInvalidImageDimension");
|
|
42
|
+
|
|
43
|
+
Object.keys(_WithInvalidImageDimension).forEach(function (key) {
|
|
44
|
+
if (key === "default" || key === "__esModule") return;
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
+
if (key in exports && exports[key] === _WithInvalidImageDimension[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _WithInvalidImageDimension[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var _default = {
|
|
55
|
+
title: 'Digigov Form/inputs/ImageInput',
|
|
56
|
+
component: _["default"],
|
|
57
|
+
displayName: 'ImageInput'
|
|
58
|
+
};
|
|
59
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4",
|
|
3
|
+
"stories": {
|
|
4
|
+
"digigov-form-inputs-imageinput--with-invalid-image-dimension": {
|
|
5
|
+
"actionSets": [
|
|
6
|
+
{
|
|
7
|
+
"actions": [
|
|
8
|
+
{
|
|
9
|
+
"name": "setImages",
|
|
10
|
+
"args": {
|
|
11
|
+
"file": {
|
|
12
|
+
"name": "image.jpg",
|
|
13
|
+
"size": 500,
|
|
14
|
+
"width": 500,
|
|
15
|
+
"height": 500
|
|
16
|
+
},
|
|
17
|
+
"selector": "html>body>div:nth-child(5)>form>fieldset>div>fieldset>div>div>label"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "click",
|
|
22
|
+
"args": {
|
|
23
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"id": "o22sSYzQqsMl",
|
|
28
|
+
"title": "Dimension image action"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"digigov-form-inputs-imageinput--with-invalid-image-size": {
|
|
33
|
+
"actionSets": [
|
|
34
|
+
{
|
|
35
|
+
"actions": [
|
|
36
|
+
{
|
|
37
|
+
"name": "setImages",
|
|
38
|
+
"args": {
|
|
39
|
+
"file": {
|
|
40
|
+
"name": "image.jpg",
|
|
41
|
+
"size": 500,
|
|
42
|
+
"width": 500,
|
|
43
|
+
"height": 500
|
|
44
|
+
},
|
|
45
|
+
"selector": "html>body>div:nth-child(5)>form>fieldset>div>fieldset>div>div>label"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "click",
|
|
50
|
+
"args": {
|
|
51
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"id": "0TewzMxhK1db",
|
|
56
|
+
"title": "Size image action"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"digigov-form-inputs-imageinput--default": {
|
|
61
|
+
"actionSets": [
|
|
62
|
+
{
|
|
63
|
+
"actions": [
|
|
64
|
+
{
|
|
65
|
+
"name": "click",
|
|
66
|
+
"args": {
|
|
67
|
+
"selector": "html>body>div:nth-child(5)>form>button"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"id": "Pvb2kqeg1fI3",
|
|
72
|
+
"title": "Invalid submit"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.Default = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _ = _interopRequireWildcard(require("../../.."));
|
|
15
|
+
|
|
16
|
+
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
var FIELDS = [{
|
|
23
|
+
key: 'image',
|
|
24
|
+
type: 'image',
|
|
25
|
+
required: true,
|
|
26
|
+
label: {
|
|
27
|
+
primary: 'Ανέβασμα φωτογραφίας'
|
|
28
|
+
}
|
|
29
|
+
}];
|
|
30
|
+
|
|
31
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
32
|
+
type: "submit"
|
|
33
|
+
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
34
|
+
|
|
35
|
+
var Default = function Default() {
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
37
|
+
fields: FIELDS,
|
|
38
|
+
onSubmit: function onSubmit(data) {
|
|
39
|
+
console.log(data);
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement(_.Fieldset, null, FIELDS.map(function (field) {
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement(_.Field, {
|
|
43
|
+
key: field.key,
|
|
44
|
+
name: field.key
|
|
45
|
+
});
|
|
46
|
+
})), _ref);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.Default = Default;
|
|
50
|
+
var _default = Default;
|
|
51
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.WithInvalidImageDimension = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _ = _interopRequireWildcard(require("../../.."));
|
|
15
|
+
|
|
16
|
+
var _Button = require("@digigov/ui/cjs/form/Button");
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
var FIELDS = [{
|
|
23
|
+
key: 'image',
|
|
24
|
+
type: 'image',
|
|
25
|
+
required: true,
|
|
26
|
+
label: {
|
|
27
|
+
primary: 'Ανέβασμα φωτογραφίας'
|
|
28
|
+
},
|
|
29
|
+
extra: {
|
|
30
|
+
limit: {
|
|
31
|
+
maxHeight: 400,
|
|
32
|
+
maxWidth: 400,
|
|
33
|
+
minHeight: 100,
|
|
34
|
+
minWidth: 100
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}];
|
|
38
|
+
|
|
39
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
40
|
+
type: "submit"
|
|
41
|
+
}, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
|
|
42
|
+
|
|
43
|
+
var WithInvalidImageDimension = function WithInvalidImageDimension() {
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
45
|
+
fields: FIELDS,
|
|
46
|
+
onSubmit: function onSubmit(data) {
|
|
47
|
+
console.log(data);
|
|
48
|
+
}
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement(_.Fieldset, null, FIELDS.map(function (field) {
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement(_.Field, {
|
|
51
|
+
key: field.key,
|
|
52
|
+
name: field.key
|
|
53
|
+
});
|
|
54
|
+
})), _ref);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.WithInvalidImageDimension = WithInvalidImageDimension;
|
|
58
|
+
var _default = WithInvalidImageDimension;
|
|
59
|
+
exports["default"] = _default;
|