@vtex/country-forms 1.23.0 → 1.25.0
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/CHANGELOG.md +19 -1
- package/README.md +4 -2
- package/dist/CZE-BI2GZU6N.mjs +78 -0
- package/dist/CZE-BI2GZU6N.mjs.map +1 -0
- package/dist/CZE-EXVEBWAH.js +80 -0
- package/dist/CZE-EXVEBWAH.js.map +1 -0
- package/dist/CZE-LPYWBSII.js +83 -0
- package/dist/CZE-LPYWBSII.js.map +1 -0
- package/dist/CZE-PFVYZM4U.mjs +81 -0
- package/dist/CZE-PFVYZM4U.mjs.map +1 -0
- package/dist/DNK-ELGBVVOS.mjs +58 -0
- package/dist/DNK-ELGBVVOS.mjs.map +1 -0
- package/dist/DNK-L3WQZIXL.js +83 -0
- package/dist/DNK-L3WQZIXL.js.map +1 -0
- package/dist/DNK-N7H7LUTY.js +60 -0
- package/dist/DNK-N7H7LUTY.js.map +1 -0
- package/dist/DNK-V26N5G42.mjs +81 -0
- package/dist/DNK-V26N5G42.mjs.map +1 -0
- package/dist/{ar-SA-IEGQB6BY.js → ar-SA-7KSQEYLH.js} +9 -2
- package/dist/ar-SA-7KSQEYLH.js.map +1 -0
- package/dist/{ar-SA-WSXPCMR3.mjs → ar-SA-RVG5UAKJ.mjs} +9 -2
- package/dist/ar-SA-RVG5UAKJ.mjs.map +1 -0
- package/dist/{bg-BG-SZQSMA73.js → bg-BG-DRKZTENZ.js} +9 -2
- package/dist/bg-BG-DRKZTENZ.js.map +1 -0
- package/dist/{bg-BG-VTTAEDOE.mjs → bg-BG-ESQ7WUTM.mjs} +9 -2
- package/dist/bg-BG-ESQ7WUTM.mjs.map +1 -0
- package/dist/{ca-ES-BCDKYNVO.mjs → ca-ES-5REALSDY.mjs} +9 -2
- package/dist/ca-ES-5REALSDY.mjs.map +1 -0
- package/dist/{ca-ES-4QW66LUW.js → ca-ES-BOK5OOK3.js} +9 -2
- package/dist/ca-ES-BOK5OOK3.js.map +1 -0
- package/dist/chunk-4NJSKDFQ.js +77 -0
- package/dist/chunk-4NJSKDFQ.js.map +1 -0
- package/dist/chunk-CCAUFALV.mjs +72 -0
- package/dist/chunk-CCAUFALV.mjs.map +1 -0
- package/dist/chunk-JUYNUJZO.mjs +113 -0
- package/dist/chunk-JUYNUJZO.mjs.map +1 -0
- package/dist/chunk-PPL2SYJS.js +118 -0
- package/dist/chunk-PPL2SYJS.js.map +1 -0
- package/dist/{cs-CZ-QNQBWIKM.js → cs-CZ-5KX5Q5V2.js} +9 -2
- package/dist/cs-CZ-5KX5Q5V2.js.map +1 -0
- package/dist/{cs-CZ-X6SIAGNS.mjs → cs-CZ-WZDIVWNC.mjs} +9 -2
- package/dist/cs-CZ-WZDIVWNC.mjs.map +1 -0
- package/dist/cze-DUMS6ZNG.js +30 -0
- package/dist/cze-DUMS6ZNG.js.map +1 -0
- package/dist/cze-FRZK72XI.js +31 -0
- package/dist/cze-FRZK72XI.js.map +1 -0
- package/dist/cze-Y6OBG2OR.mjs +26 -0
- package/dist/cze-Y6OBG2OR.mjs.map +1 -0
- package/dist/cze-YRSFWYV4.mjs +27 -0
- package/dist/cze-YRSFWYV4.mjs.map +1 -0
- package/dist/cze-regions-5Z2OOMYB.js +26 -0
- package/dist/cze-regions-5Z2OOMYB.js.map +1 -0
- package/dist/cze-regions-DHQX3VRK.mjs +24 -0
- package/dist/cze-regions-DHQX3VRK.mjs.map +1 -0
- package/dist/{da-DK-NSFMEKKW.js → da-DK-3GEIP3YH.js} +9 -2
- package/dist/da-DK-3GEIP3YH.js.map +1 -0
- package/dist/{da-DK-O54BG75N.mjs → da-DK-IVS4RS4F.mjs} +9 -2
- package/dist/da-DK-IVS4RS4F.mjs.map +1 -0
- package/dist/{de-DE-RY452J27.mjs → de-DE-24WRW72L.mjs} +9 -2
- package/dist/de-DE-24WRW72L.mjs.map +1 -0
- package/dist/{de-DE-FY5JCEAC.js → de-DE-BIK32NYT.js} +9 -2
- package/dist/de-DE-BIK32NYT.js.map +1 -0
- package/dist/dnk-6OLQZMIC.js +30 -0
- package/dist/dnk-6OLQZMIC.js.map +1 -0
- package/dist/dnk-FYN7NW3A.mjs +27 -0
- package/dist/dnk-FYN7NW3A.mjs.map +1 -0
- package/dist/dnk-ORLIHGBW.mjs +16 -0
- package/dist/dnk-ORLIHGBW.mjs.map +1 -0
- package/dist/dnk-ZZTSUB5I.js +19 -0
- package/dist/dnk-ZZTSUB5I.js.map +1 -0
- package/dist/{el-GR-TCXVBJ4F.js → el-GR-AMRMYSFX.js} +9 -2
- package/dist/el-GR-AMRMYSFX.js.map +1 -0
- package/dist/{el-GR-CBLIHI4P.mjs → el-GR-QKDU2D3G.mjs} +9 -2
- package/dist/el-GR-QKDU2D3G.mjs.map +1 -0
- package/dist/{en-US-3CFG2KRF.mjs → en-US-6ZK7FONL.mjs} +9 -2
- package/dist/en-US-6ZK7FONL.mjs.map +1 -0
- package/dist/{en-US-5QCJWY4J.js → en-US-OE7KW7VI.js} +9 -2
- package/dist/en-US-OE7KW7VI.js.map +1 -0
- package/dist/{es-MX-HDUDEGD7.mjs → es-MX-R3ZN2K23.mjs} +9 -2
- package/dist/es-MX-R3ZN2K23.mjs.map +1 -0
- package/dist/{es-MX-53KOZZXO.js → es-MX-ZTZJK6JR.js} +9 -2
- package/dist/es-MX-ZTZJK6JR.js.map +1 -0
- package/dist/{fi-FI-6EJLVRMX.js → fi-FI-HRJSXG36.js} +9 -2
- package/dist/fi-FI-HRJSXG36.js.map +1 -0
- package/dist/{fi-FI-XDCHSHLC.mjs → fi-FI-RY5HB6KE.mjs} +9 -2
- package/dist/fi-FI-RY5HB6KE.mjs.map +1 -0
- package/dist/{fr-FR-VU7Z7KAT.js → fr-FR-6R4PUHBP.js} +9 -2
- package/dist/fr-FR-6R4PUHBP.js.map +1 -0
- package/dist/{fr-FR-BXUO33XN.mjs → fr-FR-G4AQNRPV.mjs} +9 -2
- package/dist/fr-FR-G4AQNRPV.mjs.map +1 -0
- package/dist/{hu-HU-YPP2CBG3.mjs → hu-HU-FLZ2Q6I7.mjs} +9 -2
- package/dist/hu-HU-FLZ2Q6I7.mjs.map +1 -0
- package/dist/{hu-HU-N5ALPVZ7.js → hu-HU-XGPRCSC5.js} +9 -2
- package/dist/hu-HU-XGPRCSC5.js.map +1 -0
- package/dist/{id-ID-PZJTWY3I.mjs → id-ID-5L2HU3EK.mjs} +9 -2
- package/dist/id-ID-5L2HU3EK.mjs.map +1 -0
- package/dist/{id-ID-2K3YR4X3.js → id-ID-UGFKGOP7.js} +9 -2
- package/dist/id-ID-UGFKGOP7.js.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +98 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -60
- package/dist/index.mjs.map +1 -1
- package/dist/{it-IT-MH5HDUO2.mjs → it-IT-RHW7CU2A.mjs} +9 -2
- package/dist/it-IT-RHW7CU2A.mjs.map +1 -0
- package/dist/{it-IT-ISA3E2HT.js → it-IT-Y4EQ3ANL.js} +9 -2
- package/dist/it-IT-Y4EQ3ANL.js.map +1 -0
- package/dist/{ja-JP-X3M5SZD3.mjs → ja-JP-GR23HUB6.mjs} +9 -2
- package/dist/ja-JP-GR23HUB6.mjs.map +1 -0
- package/dist/{ja-JP-GCAVQ5UG.js → ja-JP-NBVYGT5G.js} +9 -2
- package/dist/ja-JP-NBVYGT5G.js.map +1 -0
- package/dist/{ko-KR-CCTIJ6NS.mjs → ko-KR-AAW7ZL7Y.mjs} +9 -2
- package/dist/ko-KR-AAW7ZL7Y.mjs.map +1 -0
- package/dist/{ko-KR-FJ4IR3XP.js → ko-KR-STZPDTUM.js} +9 -2
- package/dist/ko-KR-STZPDTUM.js.map +1 -0
- package/dist/{nb-NO-VG6MK52V.mjs → nb-NO-5WALLOUX.mjs} +9 -2
- package/dist/nb-NO-5WALLOUX.mjs.map +1 -0
- package/dist/{nb-NO-MOBWA5LR.js → nb-NO-OOQKMELM.js} +9 -2
- package/dist/nb-NO-OOQKMELM.js.map +1 -0
- package/dist/{nl-NL-7NIR4ZZO.mjs → nl-NL-3WDYYDB6.mjs} +9 -2
- package/dist/nl-NL-3WDYYDB6.mjs.map +1 -0
- package/dist/{nl-NL-WKMVJ3LI.js → nl-NL-YPNAVXWA.js} +9 -2
- package/dist/nl-NL-YPNAVXWA.js.map +1 -0
- package/dist/{pl-PL-CLJHUTQA.js → pl-PL-PE6OG7PR.js} +9 -2
- package/dist/pl-PL-PE6OG7PR.js.map +1 -0
- package/dist/{pl-PL-GN5SWMIK.mjs → pl-PL-WBUUZ7WF.mjs} +9 -2
- package/dist/pl-PL-WBUUZ7WF.mjs.map +1 -0
- package/dist/{pt-BR-BEQGQZZW.js → pt-BR-43QBC7IB.js} +9 -2
- package/dist/pt-BR-43QBC7IB.js.map +1 -0
- package/dist/{pt-BR-FHJBQY6X.mjs → pt-BR-AKWFE7AJ.mjs} +9 -2
- package/dist/pt-BR-AKWFE7AJ.mjs.map +1 -0
- package/dist/{pt-PT-DNHZVLG5.js → pt-PT-FV5VKPU7.js} +9 -2
- package/dist/pt-PT-FV5VKPU7.js.map +1 -0
- package/dist/{pt-PT-7OMY5IQP.mjs → pt-PT-UB6VEVFI.mjs} +9 -2
- package/dist/pt-PT-UB6VEVFI.mjs.map +1 -0
- package/dist/{ro-RO-V77KFXJZ.js → ro-RO-CBGUP5P3.js} +9 -2
- package/dist/ro-RO-CBGUP5P3.js.map +1 -0
- package/dist/{ro-RO-B6AXZTXZ.mjs → ro-RO-G3JGHIZB.mjs} +9 -2
- package/dist/ro-RO-G3JGHIZB.mjs.map +1 -0
- package/dist/{ru-RU-MXXQZPLA.js → ru-RU-OARLSUDV.js} +9 -2
- package/dist/ru-RU-OARLSUDV.js.map +1 -0
- package/dist/{ru-RU-ATPZ4HH4.mjs → ru-RU-VTWGUOZR.mjs} +9 -2
- package/dist/ru-RU-VTWGUOZR.mjs.map +1 -0
- package/dist/{sk-SK-6GERLGCW.js → sk-SK-KBCTVULT.js} +9 -2
- package/dist/sk-SK-KBCTVULT.js.map +1 -0
- package/dist/{sk-SK-XVG2CREI.mjs → sk-SK-NMWK4CZB.mjs} +9 -2
- package/dist/sk-SK-NMWK4CZB.mjs.map +1 -0
- package/dist/{sl-SI-PETIHHHI.mjs → sl-SI-CV57CZYW.mjs} +9 -2
- package/dist/sl-SI-CV57CZYW.mjs.map +1 -0
- package/dist/{sl-SI-RM5OLAQT.js → sl-SI-ZUGM5OWQ.js} +9 -2
- package/dist/sl-SI-ZUGM5OWQ.js.map +1 -0
- package/dist/{sv-SE-QKVVGIPP.js → sv-SE-6H3744ZL.js} +9 -2
- package/dist/sv-SE-6H3744ZL.js.map +1 -0
- package/dist/{sv-SE-NXGZPLEP.mjs → sv-SE-EFOH655F.mjs} +9 -2
- package/dist/sv-SE-EFOH655F.mjs.map +1 -0
- package/dist/{th-TH-LJZKIINE.js → th-TH-7UTDS643.js} +9 -2
- package/dist/th-TH-7UTDS643.js.map +1 -0
- package/dist/{th-TH-BOVANB3J.mjs → th-TH-DDZG3RHM.mjs} +9 -2
- package/dist/th-TH-DDZG3RHM.mjs.map +1 -0
- package/dist/{uk-UA-GKW4N56K.mjs → uk-UA-C6BSO5TF.mjs} +9 -2
- package/dist/uk-UA-C6BSO5TF.mjs.map +1 -0
- package/dist/{uk-UA-W2RNRWWR.js → uk-UA-II2G6MIN.js} +9 -2
- package/dist/uk-UA-II2G6MIN.js.map +1 -0
- package/package.json +1 -1
- package/dist/ar-SA-IEGQB6BY.js.map +0 -1
- package/dist/ar-SA-WSXPCMR3.mjs.map +0 -1
- package/dist/bg-BG-SZQSMA73.js.map +0 -1
- package/dist/bg-BG-VTTAEDOE.mjs.map +0 -1
- package/dist/ca-ES-4QW66LUW.js.map +0 -1
- package/dist/ca-ES-BCDKYNVO.mjs.map +0 -1
- package/dist/cs-CZ-QNQBWIKM.js.map +0 -1
- package/dist/cs-CZ-X6SIAGNS.mjs.map +0 -1
- package/dist/da-DK-NSFMEKKW.js.map +0 -1
- package/dist/da-DK-O54BG75N.mjs.map +0 -1
- package/dist/de-DE-FY5JCEAC.js.map +0 -1
- package/dist/de-DE-RY452J27.mjs.map +0 -1
- package/dist/el-GR-CBLIHI4P.mjs.map +0 -1
- package/dist/el-GR-TCXVBJ4F.js.map +0 -1
- package/dist/en-US-3CFG2KRF.mjs.map +0 -1
- package/dist/en-US-5QCJWY4J.js.map +0 -1
- package/dist/es-MX-53KOZZXO.js.map +0 -1
- package/dist/es-MX-HDUDEGD7.mjs.map +0 -1
- package/dist/fi-FI-6EJLVRMX.js.map +0 -1
- package/dist/fi-FI-XDCHSHLC.mjs.map +0 -1
- package/dist/fr-FR-BXUO33XN.mjs.map +0 -1
- package/dist/fr-FR-VU7Z7KAT.js.map +0 -1
- package/dist/hu-HU-N5ALPVZ7.js.map +0 -1
- package/dist/hu-HU-YPP2CBG3.mjs.map +0 -1
- package/dist/id-ID-2K3YR4X3.js.map +0 -1
- package/dist/id-ID-PZJTWY3I.mjs.map +0 -1
- package/dist/it-IT-ISA3E2HT.js.map +0 -1
- package/dist/it-IT-MH5HDUO2.mjs.map +0 -1
- package/dist/ja-JP-GCAVQ5UG.js.map +0 -1
- package/dist/ja-JP-X3M5SZD3.mjs.map +0 -1
- package/dist/ko-KR-CCTIJ6NS.mjs.map +0 -1
- package/dist/ko-KR-FJ4IR3XP.js.map +0 -1
- package/dist/nb-NO-MOBWA5LR.js.map +0 -1
- package/dist/nb-NO-VG6MK52V.mjs.map +0 -1
- package/dist/nl-NL-7NIR4ZZO.mjs.map +0 -1
- package/dist/nl-NL-WKMVJ3LI.js.map +0 -1
- package/dist/pl-PL-CLJHUTQA.js.map +0 -1
- package/dist/pl-PL-GN5SWMIK.mjs.map +0 -1
- package/dist/pt-BR-BEQGQZZW.js.map +0 -1
- package/dist/pt-BR-FHJBQY6X.mjs.map +0 -1
- package/dist/pt-PT-7OMY5IQP.mjs.map +0 -1
- package/dist/pt-PT-DNHZVLG5.js.map +0 -1
- package/dist/ro-RO-B6AXZTXZ.mjs.map +0 -1
- package/dist/ro-RO-V77KFXJZ.js.map +0 -1
- package/dist/ru-RU-ATPZ4HH4.mjs.map +0 -1
- package/dist/ru-RU-MXXQZPLA.js.map +0 -1
- package/dist/sk-SK-6GERLGCW.js.map +0 -1
- package/dist/sk-SK-XVG2CREI.mjs.map +0 -1
- package/dist/sl-SI-PETIHHHI.mjs.map +0 -1
- package/dist/sl-SI-RM5OLAQT.js.map +0 -1
- package/dist/sv-SE-NXGZPLEP.mjs.map +0 -1
- package/dist/sv-SE-QKVVGIPP.js.map +0 -1
- package/dist/th-TH-BOVANB3J.mjs.map +0 -1
- package/dist/th-TH-LJZKIINE.js.map +0 -1
- package/dist/uk-UA-GKW4N56K.mjs.map +0 -1
- package/dist/uk-UA-W2RNRWWR.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.25.0] - 2026-11-13
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- DNK address schema (`address-DNK`). Field order: postalCode → street → complement → city. Postal code is optional (the legacy field does not set `required`); when filled, `validatePostalCodeDNK` requires exactly 4 digits after trim, including a leading zero (parity with `address-form` `DNK.ts` `/^\d{4}$/`). No postal mask. Hidden `number` and `state` are omitted. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). City is required (`maxLength` 100). `DNK` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
15
|
+
- DNK personal-data schema (`personal-data-DNK`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` `DNK.js` has none). Adds `validatePhoneDNK` and masks `formatPhoneDNK`/`unformatPhoneDNK` (national display `32 12 34 56`). There is no `front.phone` DNK module. With `+`/`00`, country code `45` is always stripped, and it is not stripped a second time. Without a prefix it is stripped only at 10 digits, so an 8-digit national `45…` (fixed-line series `45`) stays intact. There is no trunk prefix, so a leading `0` is not removed. Foreign `+`/`00` prefixes are rejected, including Sweden `+46`. The national number is 8 digits in `2`–`9`, matching libphonenumber fixed-line and mobile. A `0` in the third position is accepted only on `26`–`28`, `67`, `68`, and `96` (`32012345` and `20012345` fail). Freephone `80`, premium `90`, M2M `37`, and `83`–`85` / `95` are rejected. `67`, `68`, and `94` are accepted. `DNK` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
16
|
+
- New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.DNK`, `country-forms.personal-data.phone.placeholder.DNK`, `country-forms.validation.postalCode.DNK`.
|
|
17
|
+
|
|
18
|
+
## [1.24.0] - 2026-11-12
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- CZE address schema (`address-CZE`). Field order: postalCode → street → number → complement → city → state. Postal code validated by `validatePostalCodeCZE` (after trim, `/^[1-7]\d{2} ?\d{2}$/`: `110 00` or `11000`; a space in any other position is rejected; first digit `1`–`7`, and `0`/`8`/`9` are Slovakia). Mask `formatPostalCodeCZE`/`unformatPostalCodeCZE` displays `110 00` and stores the 5 digits. The space is inserted only when 5 digits are present. Subdivision: 14 kraje via `CZE.regions`. `value` is the Czech name address-form stores (`Hlavní město Praha`, not an ISO code; label Region / Kraj). `number` is required (`maxLength` 750). Street is required (`maxLength` 750; the legacy field has no max). `CZE` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
23
|
+
- CZE personal-data schema (`personal-data-CZE`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` `CZE.js` `document` is required free text with no check digit and no document type). Adds `validatePhoneCZE` and masks `formatPhoneCZE`/`unformatPhoneCZE` (national display `720 222 124`). With `+`/`00`, country code `420` is always stripped, and it is not stripped a second time. Without a prefix it is stripped only at 12 digits. No valid national number starts with `420` (`42` is not an NDC; Prague is `2` + 8 digits, e.g. `212 345 678`). An optional trunk `0` is removed and is not shown on a complete number. Foreign `+`/`00` prefixes are rejected, including Slovakia `+421`. Mobile prefixes follow the legacy `Phone.validate` regex: `60[1-8]`, `70[2-5]`, and every `72x`/`73x`/`77x`/`79x` (so `737…` and `777…` are valid; `nationalDestinationCode` omits those). Geographic prefixes stay that destination list, which is stricter than the regex's any-`2xx`–`5xx` (so `521…` fails here and also fails `getPhoneInternational`). `CZE` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
24
|
+
- New i18n keys in all locale bundles: `country-forms.address.state.label.CZE`, `country-forms.address.postalCode.placeholder.CZE`, `country-forms.personal-data.phone.placeholder.CZE`, `country-forms.validation.postalCode.CZE`.
|
|
25
|
+
|
|
10
26
|
## [1.23.0] - 2026-11-11
|
|
11
27
|
|
|
12
28
|
### Added
|
|
@@ -314,7 +330,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
314
330
|
- `examples/react-minimal/` — React example with country/locale selection, form rendering, validation, and i18n overrides
|
|
315
331
|
|
|
316
332
|
|
|
317
|
-
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.
|
|
333
|
+
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.25.0...HEAD
|
|
334
|
+
[1.25.0]: https://github.com/vtex/country-forms/compare/v1.24.0...v1.25.0
|
|
335
|
+
[1.24.0]: https://github.com/vtex/country-forms/compare/v1.23.0...v1.24.0
|
|
318
336
|
[1.23.0]: https://github.com/vtex/country-forms/compare/v1.22.0...v1.23.0
|
|
319
337
|
[1.22.0]: https://github.com/vtex/country-forms/compare/v1.21.0...v1.22.0
|
|
320
338
|
[1.21.0]: https://github.com/vtex/country-forms/compare/v1.20.0...v1.21.0
|
package/README.md
CHANGED
|
@@ -89,8 +89,8 @@ Both `loadSchema` and `loadLocale` use dynamic `import()` internally — only th
|
|
|
89
89
|
|
|
90
90
|
| Constant | Type | Description |
|
|
91
91
|
|----------|------|-------------|
|
|
92
|
-
| `SUPPORTED_ADDRESS_COUNTRIES` | `readonly string[]` | Countries with a dedicated address schema (`['AGO', 'ARE', 'ARG', 'ASM', 'AUS', 'AUT', 'BEL', 'BGR', 'BOL', 'BRA', 'CAN', 'CHL', 'COL', 'CRI', 'DEU', 'ECU', 'ESP', 'FRA', 'GBR', 'IRL', 'ITA', 'MEX', 'PER', 'USA']`). |
|
|
93
|
-
| `SUPPORTED_PERSONAL_DATA_COUNTRIES` | `readonly string[]` | Countries with a dedicated personal-data schema (`['AGO', 'ARE', 'ARG', 'ASM', 'AUS', 'AUT', 'BEL', 'BGR', 'BOL', 'BRA', 'CAN', 'CHL', 'COL', 'CRI', 'DEU', 'ECU', 'ESP', 'FRA', 'GBR', 'ITA', 'MEX', 'PER', 'USA']`). |
|
|
92
|
+
| `SUPPORTED_ADDRESS_COUNTRIES` | `readonly string[]` | Countries with a dedicated address schema (`['AGO', 'ARE', 'ARG', 'ASM', 'AUS', 'AUT', 'BEL', 'BGR', 'BOL', 'BRA', 'CAN', 'CHL', 'COL', 'CRI', 'CZE', 'DEU', 'DNK', 'ECU', 'ESP', 'FRA', 'GBR', 'IRL', 'ITA', 'MEX', 'PER', 'USA']`). |
|
|
93
|
+
| `SUPPORTED_PERSONAL_DATA_COUNTRIES` | `readonly string[]` | Countries with a dedicated personal-data schema (`['AGO', 'ARE', 'ARG', 'ASM', 'AUS', 'AUT', 'BEL', 'BGR', 'BOL', 'BRA', 'CAN', 'CHL', 'COL', 'CRI', 'CZE', 'DEU', 'DNK', 'ECU', 'ESP', 'FRA', 'GBR', 'ITA', 'MEX', 'PER', 'USA']`). |
|
|
94
94
|
| `SUPPORTED_LOCALES` | `readonly string[]` | Every locale tag `loadLocale` accepts (including checkout aliases). See [Supported Locales](#supported-locales). |
|
|
95
95
|
| `CANONICAL_LOCALES` | `readonly string[]` | Dedicated bundle tags only — use for locale selectors. |
|
|
96
96
|
| `LOCALE_ALIASES` | `readonly string[]` | Alias tags that fall through to a canonical bundle in `loadLocale`. |
|
|
@@ -143,6 +143,8 @@ import type {
|
|
|
143
143
|
| Mexico | `MEX` | Yes | Yes | Postal code, RFC, Phone | RFC, Phone |
|
|
144
144
|
| Colombia | `COL` | Yes | Yes | Postal code, Cédula, NIT, Phone | Phone, Cédula, NIT |
|
|
145
145
|
| Costa Rica | `CRI` | Yes | Yes | Postal code, Cédula, Phone | Phone |
|
|
146
|
+
| Czech Republic | `CZE` | Yes | Yes | Postal code, Phone | Postal code, Phone |
|
|
147
|
+
| Denmark | `DNK` | Yes | Yes | Postal code, Phone | Phone |
|
|
146
148
|
| Spain | `ESP` | Yes | Yes | Código Postal, DNI/NIE, CIF, Phone | Phone, DNI, CIF |
|
|
147
149
|
| United Kingdom | `GBR` | Yes | Yes | Postcode, Phone | Postcode, Phone |
|
|
148
150
|
| Ireland | `IRL` | Yes | — | Eircode | Eircode |
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/schemas/address/CZE.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-CZE",
|
|
4
|
+
country: "CZE",
|
|
5
|
+
formType: "address",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "postalCode",
|
|
9
|
+
type: "text",
|
|
10
|
+
label: "country-forms.address.postalCode.label",
|
|
11
|
+
placeholder: "country-forms.address.postalCode.placeholder.CZE",
|
|
12
|
+
required: true,
|
|
13
|
+
inputMode: "numeric",
|
|
14
|
+
maxLength: 6,
|
|
15
|
+
formatRef: "formatPostalCodeCZE",
|
|
16
|
+
unformatRef: "unformatPostalCodeCZE",
|
|
17
|
+
validation: {
|
|
18
|
+
customValidator: "validatePostalCodeCZE"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "street",
|
|
23
|
+
type: "text",
|
|
24
|
+
label: "country-forms.address.street.label",
|
|
25
|
+
required: true,
|
|
26
|
+
inputMode: "text",
|
|
27
|
+
maxLength: 750,
|
|
28
|
+
validation: {
|
|
29
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "number",
|
|
34
|
+
type: "text",
|
|
35
|
+
label: "country-forms.address.number.label",
|
|
36
|
+
required: true,
|
|
37
|
+
inputMode: "text",
|
|
38
|
+
maxLength: 750,
|
|
39
|
+
validation: {
|
|
40
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "complement",
|
|
45
|
+
type: "text",
|
|
46
|
+
label: "country-forms.address.complement.label",
|
|
47
|
+
required: false,
|
|
48
|
+
inputMode: "text",
|
|
49
|
+
maxLength: 750,
|
|
50
|
+
validation: {
|
|
51
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "city",
|
|
56
|
+
type: "text",
|
|
57
|
+
label: "country-forms.address.city.label",
|
|
58
|
+
required: true,
|
|
59
|
+
inputMode: "text",
|
|
60
|
+
maxLength: 100,
|
|
61
|
+
validation: {
|
|
62
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "state",
|
|
67
|
+
type: "select",
|
|
68
|
+
label: "country-forms.address.state.label.CZE",
|
|
69
|
+
required: true,
|
|
70
|
+
options: "CZE.regions"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
};
|
|
74
|
+
var CZE_default = schema;
|
|
75
|
+
|
|
76
|
+
export { CZE_default as default };
|
|
77
|
+
//# sourceMappingURL=CZE-BI2GZU6N.mjs.map
|
|
78
|
+
//# sourceMappingURL=CZE-BI2GZU6N.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/CZE.ts"],"names":[],"mappings":";AA8BA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,a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AAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,kCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,KAAA,EAAO,uCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,OAAA,EAAS;AAAA;AACX;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"CZE-BI2GZU6N.mjs","sourcesContent":["/**\n * Address schema for the Czech Republic (CZE).\n *\n * Field order: postalCode → street → number → complement → city → state\n * (matches the visible legacy `address-form` CZE fields; omits hidden\n * `country` / `reference` / `neighborhood` and `receiverName`, which are\n * outside this library's address model).\n *\n * Postal code: PSČ, 5 digits with a space after the third (`\"110 00\"`),\n * first digit `1`–`7` (`0` / `8` / `9` are Slovakia). Validated by\n * `validatePostalCodeCZE` as `/^[1-7]\\d{2} ?\\d{2}$/` after trim (`\"110 00\"`\n * or `\"11000\"`). A space in any other position is rejected. Mask\n * `formatPostalCodeCZE` / `unformatPostalCodeCZE` inserts the space only\n * when 5 digits are present. The stored value is the 5 digits; address-form's\n * regex requires the space in the field.\n * Subdivision: 14 kraje — options ref `\"CZE.regions\"`. `value` is the Czech\n * name address-form already stores (`\"Hlavní město Praha\"`, not an ISO code).\n * Label: `country-forms.address.state.label.CZE` (Region / Kraj). The legacy\n * label key is the shared `province` string.\n *\n * Street is required. The legacy field has no max length; this schema caps it\n * at 750, the same cap used for other countries. `number` is required\n * (`maxLength` 750). Complement is optional (`maxLength` 750). The legacy\n * complement label is `floorAndLetter` (\"Floor and suite\").\n *\n * Required rule modules: `rules/validators/cze`, `rules/masks/cze`,\n * `rules/options/cze-regions`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-CZE',\n country: 'CZE',\n formType: 'address',\n fields: [\n {\n name: 'postalCode',\n type: 'text',\n label: 'country-forms.address.postalCode.label',\n placeholder: 'country-forms.address.postalCode.placeholder.CZE',\n required: true,\n inputMode: 'numeric',\n maxLength: 6,\n formatRef: 'formatPostalCodeCZE',\n unformatRef: 'unformatPostalCodeCZE',\n validation: {\n customValidator: 'validatePostalCodeCZE',\n },\n },\n {\n name: 'street',\n type: 'text',\n label: 'country-forms.address.street.label',\n required: true,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'number',\n type: 'text',\n label: 'country-forms.address.number.label',\n required: true,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'complement',\n type: 'text',\n label: 'country-forms.address.complement.label',\n required: false,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'city',\n type: 'text',\n label: 'country-forms.address.city.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'state',\n type: 'select',\n label: 'country-forms.address.state.label.CZE',\n required: true,\n options: 'CZE.regions',\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/address/CZE.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "address-CZE",
|
|
6
|
+
country: "CZE",
|
|
7
|
+
formType: "address",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
name: "postalCode",
|
|
11
|
+
type: "text",
|
|
12
|
+
label: "country-forms.address.postalCode.label",
|
|
13
|
+
placeholder: "country-forms.address.postalCode.placeholder.CZE",
|
|
14
|
+
required: true,
|
|
15
|
+
inputMode: "numeric",
|
|
16
|
+
maxLength: 6,
|
|
17
|
+
formatRef: "formatPostalCodeCZE",
|
|
18
|
+
unformatRef: "unformatPostalCodeCZE",
|
|
19
|
+
validation: {
|
|
20
|
+
customValidator: "validatePostalCodeCZE"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "street",
|
|
25
|
+
type: "text",
|
|
26
|
+
label: "country-forms.address.street.label",
|
|
27
|
+
required: true,
|
|
28
|
+
inputMode: "text",
|
|
29
|
+
maxLength: 750,
|
|
30
|
+
validation: {
|
|
31
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "number",
|
|
36
|
+
type: "text",
|
|
37
|
+
label: "country-forms.address.number.label",
|
|
38
|
+
required: true,
|
|
39
|
+
inputMode: "text",
|
|
40
|
+
maxLength: 750,
|
|
41
|
+
validation: {
|
|
42
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "complement",
|
|
47
|
+
type: "text",
|
|
48
|
+
label: "country-forms.address.complement.label",
|
|
49
|
+
required: false,
|
|
50
|
+
inputMode: "text",
|
|
51
|
+
maxLength: 750,
|
|
52
|
+
validation: {
|
|
53
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "city",
|
|
58
|
+
type: "text",
|
|
59
|
+
label: "country-forms.address.city.label",
|
|
60
|
+
required: true,
|
|
61
|
+
inputMode: "text",
|
|
62
|
+
maxLength: 100,
|
|
63
|
+
validation: {
|
|
64
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "state",
|
|
69
|
+
type: "select",
|
|
70
|
+
label: "country-forms.address.state.label.CZE",
|
|
71
|
+
required: true,
|
|
72
|
+
options: "CZE.regions"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
var CZE_default = schema;
|
|
77
|
+
|
|
78
|
+
module.exports = CZE_default;
|
|
79
|
+
//# sourceMappingURL=CZE-EXVEBWAH.js.map
|
|
80
|
+
//# sourceMappingURL=CZE-EXVEBWAH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/CZE.ts"],"names":[],"mappings":";;;AA8BA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,aAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,SAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,wCAAA;AAAA,MACP,WAAA,EAAa,kDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,SAAA;AAAA,MACX,SAAA,EAAW,CAAA;AAAA,MACX,SAAA,EAAW,qBAAA;AAAA,MACX,WAAA,EAAa,uBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,oCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,oCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,wCAAA;AAAA,MACP,QAAA,EAAU,KAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,kCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,KAAA,EAAO,uCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,OAAA,EAAS;AAAA;AACX;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"CZE-EXVEBWAH.js","sourcesContent":["/**\n * Address schema for the Czech Republic (CZE).\n *\n * Field order: postalCode → street → number → complement → city → state\n * (matches the visible legacy `address-form` CZE fields; omits hidden\n * `country` / `reference` / `neighborhood` and `receiverName`, which are\n * outside this library's address model).\n *\n * Postal code: PSČ, 5 digits with a space after the third (`\"110 00\"`),\n * first digit `1`–`7` (`0` / `8` / `9` are Slovakia). Validated by\n * `validatePostalCodeCZE` as `/^[1-7]\\d{2} ?\\d{2}$/` after trim (`\"110 00\"`\n * or `\"11000\"`). A space in any other position is rejected. Mask\n * `formatPostalCodeCZE` / `unformatPostalCodeCZE` inserts the space only\n * when 5 digits are present. The stored value is the 5 digits; address-form's\n * regex requires the space in the field.\n * Subdivision: 14 kraje — options ref `\"CZE.regions\"`. `value` is the Czech\n * name address-form already stores (`\"Hlavní město Praha\"`, not an ISO code).\n * Label: `country-forms.address.state.label.CZE` (Region / Kraj). The legacy\n * label key is the shared `province` string.\n *\n * Street is required. The legacy field has no max length; this schema caps it\n * at 750, the same cap used for other countries. `number` is required\n * (`maxLength` 750). Complement is optional (`maxLength` 750). The legacy\n * complement label is `floorAndLetter` (\"Floor and suite\").\n *\n * Required rule modules: `rules/validators/cze`, `rules/masks/cze`,\n * `rules/options/cze-regions`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-CZE',\n country: 'CZE',\n formType: 'address',\n fields: [\n {\n name: 'postalCode',\n type: 'text',\n label: 'country-forms.address.postalCode.label',\n placeholder: 'country-forms.address.postalCode.placeholder.CZE',\n required: true,\n inputMode: 'numeric',\n maxLength: 6,\n formatRef: 'formatPostalCodeCZE',\n unformatRef: 'unformatPostalCodeCZE',\n validation: {\n customValidator: 'validatePostalCodeCZE',\n },\n },\n {\n name: 'street',\n type: 'text',\n label: 'country-forms.address.street.label',\n required: true,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'number',\n type: 'text',\n label: 'country-forms.address.number.label',\n required: true,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'complement',\n type: 'text',\n label: 'country-forms.address.complement.label',\n required: false,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'city',\n type: 'text',\n label: 'country-forms.address.city.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'state',\n type: 'select',\n label: 'country-forms.address.state.label.CZE',\n required: true,\n options: 'CZE.regions',\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/CZE.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-CZE",
|
|
6
|
+
country: "CZE",
|
|
7
|
+
formType: "personal-data",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
name: "personType",
|
|
11
|
+
type: "radio-group",
|
|
12
|
+
label: "country-forms.personal-data.personType.label",
|
|
13
|
+
required: true,
|
|
14
|
+
options: [
|
|
15
|
+
{ value: "individual", displayValue: "country-forms.personal-data.personType.individual" },
|
|
16
|
+
{ value: "business", displayValue: "country-forms.personal-data.personType.business" }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "firstName",
|
|
21
|
+
type: "text",
|
|
22
|
+
label: "country-forms.personal-data.firstName.label",
|
|
23
|
+
required: true,
|
|
24
|
+
inputMode: "text",
|
|
25
|
+
maxLength: 100,
|
|
26
|
+
dependsOn: "personType",
|
|
27
|
+
conditionalLabel: {
|
|
28
|
+
individual: "country-forms.personal-data.firstName.label.individual",
|
|
29
|
+
business: "country-forms.personal-data.firstName.label.business"
|
|
30
|
+
},
|
|
31
|
+
validation: {
|
|
32
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "lastName",
|
|
37
|
+
type: "text",
|
|
38
|
+
label: "country-forms.personal-data.lastName.label",
|
|
39
|
+
required: true,
|
|
40
|
+
inputMode: "text",
|
|
41
|
+
maxLength: 100,
|
|
42
|
+
conditionalVisibility: {
|
|
43
|
+
field: "personType",
|
|
44
|
+
operator: "equals",
|
|
45
|
+
value: "individual"
|
|
46
|
+
},
|
|
47
|
+
validation: {
|
|
48
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "email",
|
|
53
|
+
type: "email",
|
|
54
|
+
label: "country-forms.personal-data.email.label",
|
|
55
|
+
required: true,
|
|
56
|
+
inputMode: "email",
|
|
57
|
+
validation: {
|
|
58
|
+
customValidator: "validateEmail"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "phone",
|
|
63
|
+
type: "text",
|
|
64
|
+
// 22 chars fits "00420 (0) 720 222 124" (21) and
|
|
65
|
+
// "+420 (0) 720 222 124" (20) before the mask normalizes.
|
|
66
|
+
maxLength: 22,
|
|
67
|
+
label: "country-forms.personal-data.phone.label",
|
|
68
|
+
placeholder: "country-forms.personal-data.phone.placeholder.CZE",
|
|
69
|
+
required: true,
|
|
70
|
+
inputMode: "tel",
|
|
71
|
+
formatRef: "formatPhoneCZE",
|
|
72
|
+
unformatRef: "unformatPhoneCZE",
|
|
73
|
+
validation: {
|
|
74
|
+
customValidator: "validatePhoneCZE"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
var CZE_default = schema;
|
|
80
|
+
|
|
81
|
+
module.exports = CZE_default;
|
|
82
|
+
//# sourceMappingURL=CZE-LPYWBSII.js.map
|
|
83
|
+
//# sourceMappingURL=CZE-LPYWBSII.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/CZE.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AO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,OAAA;AAAA,MACN,KAAA,EAAO,yCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,OAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA;AAAA;AAAA,MAGN,SAAA,EAAW,EAAA;AAAA,MACX,KAAA,EAAO,yCAAA;AAAA,MACP,WAAA,EAAa,mDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,KAAA;AAAA,MACX,SAAA,EAAW,gBAAA;AAAA,MACX,WAAA,EAAa,kBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"CZE-LPYWBSII.js","sourcesContent":["/**\n * Personal-data schema for the Czech Republic (CZE).\n *\n * Field order: personType → firstName → lastName → email → phone\n *\n * `personType` drives conditional visibility:\n * - `\"individual\"` → `lastName` visible\n * - `\"business\"` → `lastName` hidden; `firstName` labelled as company name\n *\n * Legacy `profile-form` `CZE.js` collects a required free-text `document`\n * (max 50, no check digit, no document type) plus optional gender and birth\n * date. Business fields (`corporateName`, `tradeName`, `corporateDocument`,\n * `businessPhone`) are optional. This schema follows the library document\n * model: no `document` / `documentType` when there is no structured identity\n * document. Email is hidden there; here it is required. `homePhone` is\n * optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `720 222 124` — validated by `validatePhoneCZE`, masked by\n * `formatPhoneCZE`/`unformatPhoneCZE`. 9 digits: mobile `60[1-8]`, `70[2-5]`,\n * and every `72x`/`73x`/`77x`/`79x` (the legacy `Phone.validate` regex; the\n * destination list omits some of those), or a geographic NDC from that list,\n * or Prague `2`. `+420` / `00420` are\n * stripped, and only once, so a remainder that still starts with `420` is\n * not reduced again. A bare `420` is stripped only at 12 digits. No valid\n * NSN starts with `420` (`42` is not an NDC). An optional trunk `0` is\n * removed and is not shown on a complete number. A foreign `+` / `00`\n * prefix (including Slovakia `+421`) is rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/cze`,\n * `rules/masks/cze`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-CZE',\n country: 'CZE',\n formType: 'personal-data',\n fields: [\n {\n name: 'personType',\n type: 'radio-group',\n label: 'country-forms.personal-data.personType.label',\n required: true,\n options: [\n { value: 'individual', displayValue: 'country-forms.personal-data.personType.individual' },\n { value: 'business', displayValue: 'country-forms.personal-data.personType.business' },\n ],\n },\n {\n name: 'firstName',\n type: 'text',\n label: 'country-forms.personal-data.firstName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n dependsOn: 'personType',\n conditionalLabel: {\n individual: 'country-forms.personal-data.firstName.label.individual',\n business: 'country-forms.personal-data.firstName.label.business',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'lastName',\n type: 'text',\n label: 'country-forms.personal-data.lastName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n conditionalVisibility: {\n field: 'personType',\n operator: 'equals',\n value: 'individual',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'email',\n type: 'email',\n label: 'country-forms.personal-data.email.label',\n required: true,\n inputMode: 'email',\n validation: {\n customValidator: 'validateEmail',\n },\n },\n {\n name: 'phone',\n type: 'text',\n // 22 chars fits \"00420 (0) 720 222 124\" (21) and\n // \"+420 (0) 720 222 124\" (20) before the mask normalizes.\n maxLength: 22,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.CZE',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneCZE',\n unformatRef: 'unformatPhoneCZE',\n validation: {\n customValidator: 'validatePhoneCZE',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// src/schemas/personal-data/CZE.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-CZE",
|
|
4
|
+
country: "CZE",
|
|
5
|
+
formType: "personal-data",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "personType",
|
|
9
|
+
type: "radio-group",
|
|
10
|
+
label: "country-forms.personal-data.personType.label",
|
|
11
|
+
required: true,
|
|
12
|
+
options: [
|
|
13
|
+
{ value: "individual", displayValue: "country-forms.personal-data.personType.individual" },
|
|
14
|
+
{ value: "business", displayValue: "country-forms.personal-data.personType.business" }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "firstName",
|
|
19
|
+
type: "text",
|
|
20
|
+
label: "country-forms.personal-data.firstName.label",
|
|
21
|
+
required: true,
|
|
22
|
+
inputMode: "text",
|
|
23
|
+
maxLength: 100,
|
|
24
|
+
dependsOn: "personType",
|
|
25
|
+
conditionalLabel: {
|
|
26
|
+
individual: "country-forms.personal-data.firstName.label.individual",
|
|
27
|
+
business: "country-forms.personal-data.firstName.label.business"
|
|
28
|
+
},
|
|
29
|
+
validation: {
|
|
30
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "lastName",
|
|
35
|
+
type: "text",
|
|
36
|
+
label: "country-forms.personal-data.lastName.label",
|
|
37
|
+
required: true,
|
|
38
|
+
inputMode: "text",
|
|
39
|
+
maxLength: 100,
|
|
40
|
+
conditionalVisibility: {
|
|
41
|
+
field: "personType",
|
|
42
|
+
operator: "equals",
|
|
43
|
+
value: "individual"
|
|
44
|
+
},
|
|
45
|
+
validation: {
|
|
46
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "email",
|
|
51
|
+
type: "email",
|
|
52
|
+
label: "country-forms.personal-data.email.label",
|
|
53
|
+
required: true,
|
|
54
|
+
inputMode: "email",
|
|
55
|
+
validation: {
|
|
56
|
+
customValidator: "validateEmail"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "phone",
|
|
61
|
+
type: "text",
|
|
62
|
+
// 22 chars fits "00420 (0) 720 222 124" (21) and
|
|
63
|
+
// "+420 (0) 720 222 124" (20) before the mask normalizes.
|
|
64
|
+
maxLength: 22,
|
|
65
|
+
label: "country-forms.personal-data.phone.label",
|
|
66
|
+
placeholder: "country-forms.personal-data.phone.placeholder.CZE",
|
|
67
|
+
required: true,
|
|
68
|
+
inputMode: "tel",
|
|
69
|
+
formatRef: "formatPhoneCZE",
|
|
70
|
+
unformatRef: "unformatPhoneCZE",
|
|
71
|
+
validation: {
|
|
72
|
+
customValidator: "validatePhoneCZE"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var CZE_default = schema;
|
|
78
|
+
|
|
79
|
+
export { CZE_default as default };
|
|
80
|
+
//# sourceMappingURL=CZE-PFVYZM4U.mjs.map
|
|
81
|
+
//# sourceMappingURL=CZE-PFVYZM4U.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/CZE.ts"],"names":[],"mappings":";AAkCA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,mBAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,eAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN,KAAA,EAAO,8CAAA;AAAA,MACP,QAAA,EAAU,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AAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA;AAAA;AAAA,MAGN,SAAA,EAAW,EAAA;AAAA,MACX,KAAA,EAAO,yCAAA;AAAA,MACP,WAAA,EAAa,mDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,KAAA;AAAA,MACX,SAAA,EAAW,gBAAA;AAAA,MACX,WAAA,EAAa,kBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"CZE-PFVYZM4U.mjs","sourcesContent":["/**\n * Personal-data schema for the Czech Republic (CZE).\n *\n * Field order: personType → firstName → lastName → email → phone\n *\n * `personType` drives conditional visibility:\n * - `\"individual\"` → `lastName` visible\n * - `\"business\"` → `lastName` hidden; `firstName` labelled as company name\n *\n * Legacy `profile-form` `CZE.js` collects a required free-text `document`\n * (max 50, no check digit, no document type) plus optional gender and birth\n * date. Business fields (`corporateName`, `tradeName`, `corporateDocument`,\n * `businessPhone`) are optional. This schema follows the library document\n * model: no `document` / `documentType` when there is no structured identity\n * document. Email is hidden there; here it is required. `homePhone` is\n * optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `720 222 124` — validated by `validatePhoneCZE`, masked by\n * `formatPhoneCZE`/`unformatPhoneCZE`. 9 digits: mobile `60[1-8]`, `70[2-5]`,\n * and every `72x`/`73x`/`77x`/`79x` (the legacy `Phone.validate` regex; the\n * destination list omits some of those), or a geographic NDC from that list,\n * or Prague `2`. `+420` / `00420` are\n * stripped, and only once, so a remainder that still starts with `420` is\n * not reduced again. A bare `420` is stripped only at 12 digits. No valid\n * NSN starts with `420` (`42` is not an NDC). An optional trunk `0` is\n * removed and is not shown on a complete number. A foreign `+` / `00`\n * prefix (including Slovakia `+421`) is rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/cze`,\n * `rules/masks/cze`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-CZE',\n country: 'CZE',\n formType: 'personal-data',\n fields: [\n {\n name: 'personType',\n type: 'radio-group',\n label: 'country-forms.personal-data.personType.label',\n required: true,\n options: [\n { value: 'individual', displayValue: 'country-forms.personal-data.personType.individual' },\n { value: 'business', displayValue: 'country-forms.personal-data.personType.business' },\n ],\n },\n {\n name: 'firstName',\n type: 'text',\n label: 'country-forms.personal-data.firstName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n dependsOn: 'personType',\n conditionalLabel: {\n individual: 'country-forms.personal-data.firstName.label.individual',\n business: 'country-forms.personal-data.firstName.label.business',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'lastName',\n type: 'text',\n label: 'country-forms.personal-data.lastName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n conditionalVisibility: {\n field: 'personType',\n operator: 'equals',\n value: 'individual',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'email',\n type: 'email',\n label: 'country-forms.personal-data.email.label',\n required: true,\n inputMode: 'email',\n validation: {\n customValidator: 'validateEmail',\n },\n },\n {\n name: 'phone',\n type: 'text',\n // 22 chars fits \"00420 (0) 720 222 124\" (21) and\n // \"+420 (0) 720 222 124\" (20) before the mask normalizes.\n maxLength: 22,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.CZE',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneCZE',\n unformatRef: 'unformatPhoneCZE',\n validation: {\n customValidator: 'validatePhoneCZE',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/schemas/address/DNK.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-DNK",
|
|
4
|
+
country: "DNK",
|
|
5
|
+
formType: "address",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "postalCode",
|
|
9
|
+
type: "text",
|
|
10
|
+
label: "country-forms.address.postalCode.label",
|
|
11
|
+
placeholder: "country-forms.address.postalCode.placeholder.DNK",
|
|
12
|
+
required: false,
|
|
13
|
+
inputMode: "numeric",
|
|
14
|
+
maxLength: 4,
|
|
15
|
+
validation: {
|
|
16
|
+
customValidator: "validatePostalCodeDNK"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "street",
|
|
21
|
+
type: "text",
|
|
22
|
+
label: "country-forms.address.street.label",
|
|
23
|
+
required: true,
|
|
24
|
+
inputMode: "text",
|
|
25
|
+
maxLength: 750,
|
|
26
|
+
validation: {
|
|
27
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "complement",
|
|
32
|
+
type: "text",
|
|
33
|
+
label: "country-forms.address.complement.label",
|
|
34
|
+
required: false,
|
|
35
|
+
inputMode: "text",
|
|
36
|
+
maxLength: 750,
|
|
37
|
+
validation: {
|
|
38
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "city",
|
|
43
|
+
type: "text",
|
|
44
|
+
label: "country-forms.address.city.label",
|
|
45
|
+
required: true,
|
|
46
|
+
inputMode: "text",
|
|
47
|
+
maxLength: 100,
|
|
48
|
+
validation: {
|
|
49
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
};
|
|
54
|
+
var DNK_default = schema;
|
|
55
|
+
|
|
56
|
+
export { DNK_default as default };
|
|
57
|
+
//# sourceMappingURL=DNK-ELGBVVOS.mjs.map
|
|
58
|
+
//# sourceMappingURL=DNK-ELGBVVOS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"DNK-ELGBVVOS.mjs","sourcesContent":["/**\n * Address schema for Denmark (DNK).\n *\n * Field order: postalCode → street → complement → city\n * (matches the visible legacy `address-form` DNK fields; omits hidden\n * `country` / `number` / `reference` / `neighborhood` / `state` and\n * `receiverName`, which are outside this library's address model).\n *\n * Postal code: 4 digits (`\"2000\"`), validated by `validatePostalCodeDNK` as\n * `/^\\d{4}$/` after trim, including a leading zero. The legacy field does not\n * set `required`, so an empty postal code is allowed; a filled value must\n * still be 4 digits. No mask — the legacy mask string is `\"1234\"` (not\n * `\"9999\"`). `maxLength` is 4.\n *\n * Street is required. The legacy field has no max length; this schema caps it\n * at 750, the same cap used for other countries. Complement is optional\n * (`maxLength` 750). The legacy complement label is `addressLine2`. City is\n * required (`maxLength` 100). There is no subdivision field on the form.\n *\n * Required rule modules: `rules/validators/dnk`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-DNK',\n country: 'DNK',\n formType: 'address',\n fields: [\n {\n name: 'postalCode',\n type: 'text',\n label: 'country-forms.address.postalCode.label',\n placeholder: 'country-forms.address.postalCode.placeholder.DNK',\n required: false,\n inputMode: 'numeric',\n maxLength: 4,\n validation: {\n customValidator: 'validatePostalCodeDNK',\n },\n },\n {\n name: 'street',\n type: 'text',\n label: 'country-forms.address.street.label',\n required: true,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'complement',\n type: 'text',\n label: 'country-forms.address.complement.label',\n required: false,\n inputMode: 'text',\n maxLength: 750,\n validation: {\n maxLength: { value: 750, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'city',\n type: 'text',\n label: 'country-forms.address.city.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/DNK.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-DNK",
|
|
6
|
+
country: "DNK",
|
|
7
|
+
formType: "personal-data",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
name: "personType",
|
|
11
|
+
type: "radio-group",
|
|
12
|
+
label: "country-forms.personal-data.personType.label",
|
|
13
|
+
required: true,
|
|
14
|
+
options: [
|
|
15
|
+
{ value: "individual", displayValue: "country-forms.personal-data.personType.individual" },
|
|
16
|
+
{ value: "business", displayValue: "country-forms.personal-data.personType.business" }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "firstName",
|
|
21
|
+
type: "text",
|
|
22
|
+
label: "country-forms.personal-data.firstName.label",
|
|
23
|
+
required: true,
|
|
24
|
+
inputMode: "text",
|
|
25
|
+
maxLength: 100,
|
|
26
|
+
dependsOn: "personType",
|
|
27
|
+
conditionalLabel: {
|
|
28
|
+
individual: "country-forms.personal-data.firstName.label.individual",
|
|
29
|
+
business: "country-forms.personal-data.firstName.label.business"
|
|
30
|
+
},
|
|
31
|
+
validation: {
|
|
32
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "lastName",
|
|
37
|
+
type: "text",
|
|
38
|
+
label: "country-forms.personal-data.lastName.label",
|
|
39
|
+
required: true,
|
|
40
|
+
inputMode: "text",
|
|
41
|
+
maxLength: 100,
|
|
42
|
+
conditionalVisibility: {
|
|
43
|
+
field: "personType",
|
|
44
|
+
operator: "equals",
|
|
45
|
+
value: "individual"
|
|
46
|
+
},
|
|
47
|
+
validation: {
|
|
48
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "email",
|
|
53
|
+
type: "email",
|
|
54
|
+
label: "country-forms.personal-data.email.label",
|
|
55
|
+
required: true,
|
|
56
|
+
inputMode: "email",
|
|
57
|
+
validation: {
|
|
58
|
+
customValidator: "validateEmail"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "phone",
|
|
63
|
+
type: "text",
|
|
64
|
+
// 16 chars fits "0045 32 12 34 56". "+45 32 12 34 56" is 15.
|
|
65
|
+
// There is no trunk prefix, so a pasted "(0)" is not a supported form.
|
|
66
|
+
maxLength: 16,
|
|
67
|
+
label: "country-forms.personal-data.phone.label",
|
|
68
|
+
placeholder: "country-forms.personal-data.phone.placeholder.DNK",
|
|
69
|
+
required: true,
|
|
70
|
+
inputMode: "tel",
|
|
71
|
+
formatRef: "formatPhoneDNK",
|
|
72
|
+
unformatRef: "unformatPhoneDNK",
|
|
73
|
+
validation: {
|
|
74
|
+
customValidator: "validatePhoneDNK"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
var DNK_default = schema;
|
|
80
|
+
|
|
81
|
+
module.exports = DNK_default;
|
|
82
|
+
//# sourceMappingURL=DNK-L3WQZIXL.js.map
|
|
83
|
+
//# sourceMappingURL=DNK-L3WQZIXL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/DNK.ts"],"names":[],"mappings":";;;AA6BA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,mBAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,eAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,aAAA;AAAA,MACN,KAAA,EAAO,8C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AAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,OAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA;AAAA;AAAA,MAGN,SAAA,EAAW,EAAA;AAAA,MACX,KAAA,EAAO,yCAAA;AAAA,MACP,WAAA,EAAa,mDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,KAAA;AAAA,MACX,SAAA,EAAW,gBAAA;AAAA,MACX,WAAA,EAAa,kBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"DNK-L3WQZIXL.js","sourcesContent":["/**\n * Personal-data schema for Denmark (DNK).\n *\n * Field order: personType → firstName → lastName → email → phone\n *\n * `personType` drives conditional visibility:\n * - `\"individual\"` → `lastName` visible\n * - `\"business\"` → `lastName` hidden; `firstName` labelled as company name\n *\n * Legacy `profile-form` `DNK.js` has no identity document. Optional gender\n * and birth date are omitted. Business fields (`corporateName`, `tradeName`,\n * `businessPhone`) are optional there. Email is hidden there; here it is\n * required. `homePhone` is optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `32 12 34 56` — validated by `validatePhoneDNK`, masked by\n * `formatPhoneDNK`/`unformatPhoneDNK`. 8 digits, no trunk prefix. `+45` /\n * `0045` are stripped, and only once. A bare `45` is stripped only at 10\n * digits, because the national series `45` is itself an 8-digit number.\n * A foreign `+` / `00` prefix (including Sweden `+46`) is rejected. There is\n * no `front.phone` DNK module. Valid ranges match libphonenumber fixed-line\n * and mobile: third digit `0` only on `26`–`28`, `67`, `68`, and `96`.\n * `80`, `90`, `37`, `83`–`85`, and `95` are rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/dnk`,\n * `rules/masks/dnk`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-DNK',\n country: 'DNK',\n formType: 'personal-data',\n fields: [\n {\n name: 'personType',\n type: 'radio-group',\n label: 'country-forms.personal-data.personType.label',\n required: true,\n options: [\n { value: 'individual', displayValue: 'country-forms.personal-data.personType.individual' },\n { value: 'business', displayValue: 'country-forms.personal-data.personType.business' },\n ],\n },\n {\n name: 'firstName',\n type: 'text',\n label: 'country-forms.personal-data.firstName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n dependsOn: 'personType',\n conditionalLabel: {\n individual: 'country-forms.personal-data.firstName.label.individual',\n business: 'country-forms.personal-data.firstName.label.business',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'lastName',\n type: 'text',\n label: 'country-forms.personal-data.lastName.label',\n required: true,\n inputMode: 'text',\n maxLength: 100,\n conditionalVisibility: {\n field: 'personType',\n operator: 'equals',\n value: 'individual',\n },\n validation: {\n maxLength: { value: 100, message: 'country-forms.validation.maxLength' },\n },\n },\n {\n name: 'email',\n type: 'email',\n label: 'country-forms.personal-data.email.label',\n required: true,\n inputMode: 'email',\n validation: {\n customValidator: 'validateEmail',\n },\n },\n {\n name: 'phone',\n type: 'text',\n // 16 chars fits \"0045 32 12 34 56\". \"+45 32 12 34 56\" is 15.\n // There is no trunk prefix, so a pasted \"(0)\" is not a supported form.\n maxLength: 16,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.DNK',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneDNK',\n unformatRef: 'unformatPhoneDNK',\n validation: {\n customValidator: 'validatePhoneDNK',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|