@vtex/country-forms 1.32.0 → 1.35.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 +28 -1
- package/README.md +5 -2
- package/dist/GUM-7557HHMG.mjs +68 -0
- package/dist/GUM-7557HHMG.mjs.map +1 -0
- package/dist/GUM-MIV7RTLR.js +70 -0
- package/dist/GUM-MIV7RTLR.js.map +1 -0
- package/dist/GUM-TRBQ2IMT.mjs +81 -0
- package/dist/GUM-TRBQ2IMT.mjs.map +1 -0
- package/dist/GUM-XAM6SYUZ.js +83 -0
- package/dist/GUM-XAM6SYUZ.js.map +1 -0
- package/dist/HUN-BCEKKWN6.mjs +80 -0
- package/dist/HUN-BCEKKWN6.mjs.map +1 -0
- package/dist/HUN-MGRLWVRW.js +83 -0
- package/dist/HUN-MGRLWVRW.js.map +1 -0
- package/dist/HUN-PGM7MTQV.js +82 -0
- package/dist/HUN-PGM7MTQV.js.map +1 -0
- package/dist/HUN-VNMH3WUK.mjs +81 -0
- package/dist/HUN-VNMH3WUK.mjs.map +1 -0
- package/dist/IDN-3HXN44X2.mjs +68 -0
- package/dist/IDN-3HXN44X2.mjs.map +1 -0
- package/dist/IDN-HPW7D6NA.js +83 -0
- package/dist/IDN-HPW7D6NA.js.map +1 -0
- package/dist/IDN-S4GA3GUX.js +70 -0
- package/dist/IDN-S4GA3GUX.js.map +1 -0
- package/dist/IDN-UEBMZBRF.mjs +81 -0
- package/dist/IDN-UEBMZBRF.mjs.map +1 -0
- package/dist/{ar-SA-UH7NUGTS.mjs → ar-SA-JHKDH2K4.mjs} +8 -2
- package/dist/ar-SA-JHKDH2K4.mjs.map +1 -0
- package/dist/{ar-SA-HDXW3FFU.js → ar-SA-TVORFJSC.js} +8 -2
- package/dist/ar-SA-TVORFJSC.js.map +1 -0
- package/dist/{bg-BG-4LR2PYON.js → bg-BG-ASGC7CV6.js} +8 -2
- package/dist/bg-BG-ASGC7CV6.js.map +1 -0
- package/dist/{bg-BG-NX6BKFWH.mjs → bg-BG-SN7HWAVT.mjs} +8 -2
- package/dist/bg-BG-SN7HWAVT.mjs.map +1 -0
- package/dist/{ca-ES-PHWTTEGI.mjs → ca-ES-P2JUMRCA.mjs} +8 -2
- package/dist/ca-ES-P2JUMRCA.mjs.map +1 -0
- package/dist/{ca-ES-UPOT242J.js → ca-ES-X3Q5EBDF.js} +8 -2
- package/dist/ca-ES-X3Q5EBDF.js.map +1 -0
- package/dist/chunk-6QUQ7OYE.js +121 -0
- package/dist/chunk-6QUQ7OYE.js.map +1 -0
- package/dist/chunk-HHDTM2GE.js +60 -0
- package/dist/chunk-HHDTM2GE.js.map +1 -0
- package/dist/chunk-NLO52VCZ.js +114 -0
- package/dist/chunk-NLO52VCZ.js.map +1 -0
- package/dist/chunk-RLKC6BON.mjs +109 -0
- package/dist/chunk-RLKC6BON.mjs.map +1 -0
- package/dist/chunk-TPIOKF76.mjs +116 -0
- package/dist/chunk-TPIOKF76.mjs.map +1 -0
- package/dist/chunk-VZNKLOVR.mjs +56 -0
- package/dist/chunk-VZNKLOVR.mjs.map +1 -0
- package/dist/{cs-CZ-NTD5EEAZ.js → cs-CZ-D3XQPTNX.js} +8 -2
- package/dist/cs-CZ-D3XQPTNX.js.map +1 -0
- package/dist/{cs-CZ-HH4C27LS.mjs → cs-CZ-MCUFPJUS.mjs} +8 -2
- package/dist/cs-CZ-MCUFPJUS.mjs.map +1 -0
- package/dist/{da-DK-QBIPZ62T.js → da-DK-KZGV344N.js} +8 -2
- package/dist/da-DK-KZGV344N.js.map +1 -0
- package/dist/{da-DK-N42MXTYW.mjs → da-DK-X2VL2UGU.mjs} +8 -2
- package/dist/da-DK-X2VL2UGU.mjs.map +1 -0
- package/dist/{de-DE-TOPEGD3C.mjs → de-DE-45V2GZTI.mjs} +8 -2
- package/dist/de-DE-45V2GZTI.mjs.map +1 -0
- package/dist/{de-DE-DQ7E6MMP.js → de-DE-WUSGI647.js} +8 -2
- package/dist/de-DE-WUSGI647.js.map +1 -0
- package/dist/{el-GR-PPCCGPN2.js → el-GR-3IIHBSGH.js} +8 -2
- package/dist/el-GR-3IIHBSGH.js.map +1 -0
- package/dist/{el-GR-BWRBGGOT.mjs → el-GR-YCEJ7YJM.mjs} +8 -2
- package/dist/el-GR-YCEJ7YJM.mjs.map +1 -0
- package/dist/{en-US-A7PRTEXY.mjs → en-US-5HA7ONKF.mjs} +8 -2
- package/dist/en-US-5HA7ONKF.mjs.map +1 -0
- package/dist/{en-US-MRRCKVHK.js → en-US-BTSYDFJF.js} +8 -2
- package/dist/en-US-BTSYDFJF.js.map +1 -0
- package/dist/{es-MX-7RIE6OUS.mjs → es-MX-2CSBHXSG.mjs} +8 -2
- package/dist/es-MX-2CSBHXSG.mjs.map +1 -0
- package/dist/{es-MX-KJY754II.js → es-MX-L25D76UQ.js} +8 -2
- package/dist/es-MX-L25D76UQ.js.map +1 -0
- package/dist/{fi-FI-2HV6HQRC.js → fi-FI-FDKX5GSR.js} +8 -2
- package/dist/fi-FI-FDKX5GSR.js.map +1 -0
- package/dist/{fi-FI-UUS2LHBZ.mjs → fi-FI-NQ2X6RM3.mjs} +8 -2
- package/dist/fi-FI-NQ2X6RM3.mjs.map +1 -0
- package/dist/{fr-FR-42XVDNYP.mjs → fr-FR-33GYCC67.mjs} +8 -2
- package/dist/fr-FR-33GYCC67.mjs.map +1 -0
- package/dist/{fr-FR-UZDW6NGZ.js → fr-FR-YLZ6MJXG.js} +8 -2
- package/dist/fr-FR-YLZ6MJXG.js.map +1 -0
- package/dist/gum-F6KNMEQE.mjs +20 -0
- package/dist/gum-F6KNMEQE.mjs.map +1 -0
- package/dist/gum-S242HOB7.js +22 -0
- package/dist/gum-S242HOB7.js.map +1 -0
- package/dist/gum-UO7DPBW6.mjs +16 -0
- package/dist/gum-UO7DPBW6.mjs.map +1 -0
- package/dist/gum-Y23Y7MPO.js +19 -0
- package/dist/gum-Y23Y7MPO.js.map +1 -0
- package/dist/{hu-HU-WXLUF2CO.mjs → hu-HU-HFR5CB7C.mjs} +8 -2
- package/dist/hu-HU-HFR5CB7C.mjs.map +1 -0
- package/dist/{hu-HU-4SIP4BCP.js → hu-HU-MQ3WWBPS.js} +8 -2
- package/dist/hu-HU-MQ3WWBPS.js.map +1 -0
- package/dist/hun-6FAAZNFD.js +19 -0
- package/dist/hun-6FAAZNFD.js.map +1 -0
- package/dist/hun-CQOJQESF.js +30 -0
- package/dist/hun-CQOJQESF.js.map +1 -0
- package/dist/hun-FG3VRS7L.mjs +27 -0
- package/dist/hun-FG3VRS7L.mjs.map +1 -0
- package/dist/hun-KPJJF5OH.mjs +16 -0
- package/dist/hun-KPJJF5OH.mjs.map +1 -0
- package/dist/{id-ID-QEDMLKVB.js → id-ID-DM35U2NE.js} +8 -2
- package/dist/id-ID-DM35U2NE.js.map +1 -0
- package/dist/{id-ID-PVJN4GHI.mjs → id-ID-ICAJMYYJ.mjs} +8 -2
- package/dist/id-ID-ICAJMYYJ.mjs.map +1 -0
- package/dist/idn-6M2P2KXQ.js +19 -0
- package/dist/idn-6M2P2KXQ.js.map +1 -0
- package/dist/idn-7O7JS3YV.js +21 -0
- package/dist/idn-7O7JS3YV.js.map +1 -0
- package/dist/idn-RGMNEHVI.mjs +16 -0
- package/dist/idn-RGMNEHVI.mjs.map +1 -0
- package/dist/idn-SCBKAEUE.mjs +19 -0
- package/dist/idn-SCBKAEUE.mjs.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +108 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -60
- package/dist/index.mjs.map +1 -1
- package/dist/{it-IT-XGOBVXBM.js → it-IT-DHA24EP4.js} +8 -2
- package/dist/it-IT-DHA24EP4.js.map +1 -0
- package/dist/{it-IT-UJRDBJ23.mjs → it-IT-ZCOJPV5T.mjs} +8 -2
- package/dist/it-IT-ZCOJPV5T.mjs.map +1 -0
- package/dist/{ja-JP-H3YCPAGO.js → ja-JP-W32DUAO6.js} +8 -2
- package/dist/ja-JP-W32DUAO6.js.map +1 -0
- package/dist/{ja-JP-DSDWKOIH.mjs → ja-JP-ZGTVCRDO.mjs} +8 -2
- package/dist/ja-JP-ZGTVCRDO.mjs.map +1 -0
- package/dist/{ko-KR-TGFPKMNQ.mjs → ko-KR-4ILVLVPA.mjs} +8 -2
- package/dist/ko-KR-4ILVLVPA.mjs.map +1 -0
- package/dist/{ko-KR-IQZWKZXP.js → ko-KR-AE5ISMNK.js} +8 -2
- package/dist/ko-KR-AE5ISMNK.js.map +1 -0
- package/dist/{nb-NO-HP2TTSRI.js → nb-NO-6UEHSVVP.js} +8 -2
- package/dist/nb-NO-6UEHSVVP.js.map +1 -0
- package/dist/{nb-NO-EWVJEFDN.mjs → nb-NO-VS2DSSXD.mjs} +8 -2
- package/dist/nb-NO-VS2DSSXD.mjs.map +1 -0
- package/dist/{nl-NL-LCL2SUHS.mjs → nl-NL-CFKF4X4H.mjs} +8 -2
- package/dist/nl-NL-CFKF4X4H.mjs.map +1 -0
- package/dist/{nl-NL-KT2AJ2EH.js → nl-NL-JA3CVG3A.js} +8 -2
- package/dist/nl-NL-JA3CVG3A.js.map +1 -0
- package/dist/{pl-PL-54SCOVIJ.mjs → pl-PL-3R3MCCZM.mjs} +8 -2
- package/dist/pl-PL-3R3MCCZM.mjs.map +1 -0
- package/dist/{pl-PL-U6UIZJSO.js → pl-PL-O2VEGZFL.js} +8 -2
- package/dist/pl-PL-O2VEGZFL.js.map +1 -0
- package/dist/{pt-BR-IO4XO4LD.mjs → pt-BR-ASIAQADW.mjs} +8 -2
- package/dist/pt-BR-ASIAQADW.mjs.map +1 -0
- package/dist/{pt-BR-Y24ZQAXF.js → pt-BR-W2N6T7SB.js} +8 -2
- package/dist/pt-BR-W2N6T7SB.js.map +1 -0
- package/dist/{pt-PT-BTCLBV4X.mjs → pt-PT-E6V6DV35.mjs} +8 -2
- package/dist/pt-PT-E6V6DV35.mjs.map +1 -0
- package/dist/{pt-PT-5WVG45HJ.js → pt-PT-O5BUBEKJ.js} +8 -2
- package/dist/pt-PT-O5BUBEKJ.js.map +1 -0
- package/dist/{ro-RO-Q4EXWZPL.mjs → ro-RO-F52E52LP.mjs} +8 -2
- package/dist/ro-RO-F52E52LP.mjs.map +1 -0
- package/dist/{ro-RO-V7OGRGJO.js → ro-RO-MZXTB6OB.js} +8 -2
- package/dist/ro-RO-MZXTB6OB.js.map +1 -0
- package/dist/{ru-RU-LQU4SMC5.mjs → ru-RU-M5FGNR6A.mjs} +8 -2
- package/dist/ru-RU-M5FGNR6A.mjs.map +1 -0
- package/dist/{ru-RU-IYYWAAYK.js → ru-RU-PA7HFVCT.js} +8 -2
- package/dist/ru-RU-PA7HFVCT.js.map +1 -0
- package/dist/{sk-SK-AAHMLUS2.js → sk-SK-ADXNNF4Z.js} +8 -2
- package/dist/sk-SK-ADXNNF4Z.js.map +1 -0
- package/dist/{sk-SK-LADE3I36.mjs → sk-SK-OGLUWGKV.mjs} +8 -2
- package/dist/sk-SK-OGLUWGKV.mjs.map +1 -0
- package/dist/{sl-SI-KPM2UDYD.js → sl-SI-543O2YW4.js} +8 -2
- package/dist/sl-SI-543O2YW4.js.map +1 -0
- package/dist/{sl-SI-BBQTBRG6.mjs → sl-SI-NBUOOSWK.mjs} +8 -2
- package/dist/sl-SI-NBUOOSWK.mjs.map +1 -0
- package/dist/{sv-SE-UFZFJ2JY.mjs → sv-SE-22ROICFP.mjs} +8 -2
- package/dist/sv-SE-22ROICFP.mjs.map +1 -0
- package/dist/{sv-SE-NOGSPZTH.js → sv-SE-7SBHLFAO.js} +8 -2
- package/dist/sv-SE-7SBHLFAO.js.map +1 -0
- package/dist/{th-TH-TZYENYYS.js → th-TH-4B7TENS6.js} +8 -2
- package/dist/th-TH-4B7TENS6.js.map +1 -0
- package/dist/{th-TH-ZHJW2EWR.mjs → th-TH-7JAN3KDC.mjs} +8 -2
- package/dist/th-TH-7JAN3KDC.mjs.map +1 -0
- package/dist/{uk-UA-XM5CBOA4.mjs → uk-UA-OX7EWGKT.mjs} +8 -2
- package/dist/uk-UA-OX7EWGKT.mjs.map +1 -0
- package/dist/{uk-UA-QDVQL4OC.js → uk-UA-PWEBDMJ2.js} +8 -2
- package/dist/uk-UA-PWEBDMJ2.js.map +1 -0
- package/package.json +1 -1
- package/dist/ar-SA-HDXW3FFU.js.map +0 -1
- package/dist/ar-SA-UH7NUGTS.mjs.map +0 -1
- package/dist/bg-BG-4LR2PYON.js.map +0 -1
- package/dist/bg-BG-NX6BKFWH.mjs.map +0 -1
- package/dist/ca-ES-PHWTTEGI.mjs.map +0 -1
- package/dist/ca-ES-UPOT242J.js.map +0 -1
- package/dist/cs-CZ-HH4C27LS.mjs.map +0 -1
- package/dist/cs-CZ-NTD5EEAZ.js.map +0 -1
- package/dist/da-DK-N42MXTYW.mjs.map +0 -1
- package/dist/da-DK-QBIPZ62T.js.map +0 -1
- package/dist/de-DE-DQ7E6MMP.js.map +0 -1
- package/dist/de-DE-TOPEGD3C.mjs.map +0 -1
- package/dist/el-GR-BWRBGGOT.mjs.map +0 -1
- package/dist/el-GR-PPCCGPN2.js.map +0 -1
- package/dist/en-US-A7PRTEXY.mjs.map +0 -1
- package/dist/en-US-MRRCKVHK.js.map +0 -1
- package/dist/es-MX-7RIE6OUS.mjs.map +0 -1
- package/dist/es-MX-KJY754II.js.map +0 -1
- package/dist/fi-FI-2HV6HQRC.js.map +0 -1
- package/dist/fi-FI-UUS2LHBZ.mjs.map +0 -1
- package/dist/fr-FR-42XVDNYP.mjs.map +0 -1
- package/dist/fr-FR-UZDW6NGZ.js.map +0 -1
- package/dist/hu-HU-4SIP4BCP.js.map +0 -1
- package/dist/hu-HU-WXLUF2CO.mjs.map +0 -1
- package/dist/id-ID-PVJN4GHI.mjs.map +0 -1
- package/dist/id-ID-QEDMLKVB.js.map +0 -1
- package/dist/it-IT-UJRDBJ23.mjs.map +0 -1
- package/dist/it-IT-XGOBVXBM.js.map +0 -1
- package/dist/ja-JP-DSDWKOIH.mjs.map +0 -1
- package/dist/ja-JP-H3YCPAGO.js.map +0 -1
- package/dist/ko-KR-IQZWKZXP.js.map +0 -1
- package/dist/ko-KR-TGFPKMNQ.mjs.map +0 -1
- package/dist/nb-NO-EWVJEFDN.mjs.map +0 -1
- package/dist/nb-NO-HP2TTSRI.js.map +0 -1
- package/dist/nl-NL-KT2AJ2EH.js.map +0 -1
- package/dist/nl-NL-LCL2SUHS.mjs.map +0 -1
- package/dist/pl-PL-54SCOVIJ.mjs.map +0 -1
- package/dist/pl-PL-U6UIZJSO.js.map +0 -1
- package/dist/pt-BR-IO4XO4LD.mjs.map +0 -1
- package/dist/pt-BR-Y24ZQAXF.js.map +0 -1
- package/dist/pt-PT-5WVG45HJ.js.map +0 -1
- package/dist/pt-PT-BTCLBV4X.mjs.map +0 -1
- package/dist/ro-RO-Q4EXWZPL.mjs.map +0 -1
- package/dist/ro-RO-V7OGRGJO.js.map +0 -1
- package/dist/ru-RU-IYYWAAYK.js.map +0 -1
- package/dist/ru-RU-LQU4SMC5.mjs.map +0 -1
- package/dist/sk-SK-AAHMLUS2.js.map +0 -1
- package/dist/sk-SK-LADE3I36.mjs.map +0 -1
- package/dist/sl-SI-BBQTBRG6.mjs.map +0 -1
- package/dist/sl-SI-KPM2UDYD.js.map +0 -1
- package/dist/sv-SE-NOGSPZTH.js.map +0 -1
- package/dist/sv-SE-UFZFJ2JY.mjs.map +0 -1
- package/dist/th-TH-TZYENYYS.js.map +0 -1
- package/dist/th-TH-ZHJW2EWR.mjs.map +0 -1
- package/dist/uk-UA-QDVQL4OC.js.map +0 -1
- package/dist/uk-UA-XM5CBOA4.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.35.0] - 2026-11-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- IDN address schema (`address-IDN`). Field order: postalCode → street → complement → city → state, following the visible `address-form` `IDN.ts` fields. Postal code is optional free text (`maxLength` 50, no regex, no mask), as in the legacy rules (`postalCodeAPI` is false). State is required free text (`maxLength` 100) with the shared "State" label. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750); the legacy labels `addressLine1` / `addressLine2` map to the shared street and complement labels. City is required (`maxLength` 100). Hidden `country`, `number`, `reference`, and `neighborhood` are omitted, along with `receiverName`. `IDN` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
15
|
+
- IDN personal-data schema (`personal-data-IDN`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` `IDN.js` is the generic default rules: a required free-text `document` with no check digit). Adds `validatePhoneIDN` and masks `formatPhoneIDN`/`unformatPhoneIDN` (national display `0812 3456 7890` / `021 3456 7890` / `0361 849 6655`), mirroring `front.phone` `IDN.coffee` (country code `62`, optional trunk `0`, NDC list, `splitNumber`). `front.phone` checks a number two ways that disagree (`Phone.validate` tests only a loosened regex; `getPhoneInternational` tests only the NDC list, with no length limit); the validator requires a listed NDC **and** an accepted length. Mobile (3-digit `8xx` NDC) follows the regex (NSN of 9–13 digits). Geographic numbers follow the regex or a 5–8 digit subscriber part, so Denpasar `0361 849 6655`, which the `front.phone` spec formats but the regex rejects, is valid. NDC `84` is in the `front.phone` list but is dropped here (the regex never matches it and it is not an allocated area code). With `+`/`00`, country code `62` is always stripped, and it is not stripped a second time. A bare `62…` is the country code when the remainder is a valid mobile number (`62812345678` → `0812 345 678`), or when the digits are not already a valid national number and the remainder is; `62x` is also a real NDC (`620`–`629`), so a complete bare `62x` number is grouped without a trunk (`628 123 456`) to stay valid when typed key by key. NDC `628` with an 8-digit subscriber (11-digit NSN) is rejected only when its digits equal `62` + a valid 9-digit mobile, i.e. the subscriber starts with `11`–`19`, `21`–`23`, `27`, `28`, `31`–`33`, `38`, `51`–`53`, `55`–`59`, `77`, `78`, `81`–`89`, `95`–`99` (`0628 1234 5678` is `62` + `812345678`): the stored bare number would reopen as `0812 345 678` and break `unformat(format(raw)) === raw`. Other 8-digit `628` numbers, such as `0628 4123 4567`, stay valid. One trunk `0` is removed and is shown again on a complete number. A lone `0` is not a trunk. Foreign `+`/`00` prefixes are rejected, including Malaysia `+60`, Australia `+61`, and Singapore `+65`. `IDN` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
16
|
+
- New i18n key in all locale bundles: `country-forms.personal-data.phone.placeholder.IDN`.
|
|
17
|
+
|
|
18
|
+
## [1.34.0] - 2026-11-23
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- HUN address schema (`address-HUN`). Field order: postalCode → street → number → complement → city → state. Postal code is required; `validatePostalCodeHUN` matches address-form `HUN.ts` (`/^[1-9]\d{3}$/` after trim, so `1051` passes and `0123` fails). No postal mask — the legacy mask is `"9999"`, which adds no separator. `maxLength` is 4. State is required free text (`maxLength` 100). Label is County in English (megye; hu Megye, de/da/sv/nb/sl Komitat, fr Comitat, nl Comitaat, pl Komitat, cs/sk Komitát, ro Comitat, ru/bg Медье, uk Медьє, el Κομιτάτο, fi Komitaatti, ja 県, ko 주). The legacy label key is the shared `province` string. `number` is required (`maxLength` 750). Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750) and uses the shared complement label; the legacy label is `floorAndLetter`. City is required (`maxLength` 100). Hidden `country`, `reference`, and `neighborhood` are omitted, along with `receiverName`. `HUN` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
23
|
+
- HUN personal-data schema (`personal-data-HUN`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no HUN rules and falls back to a required free-text `document` with no check digit). Adds `validatePhoneHUN` and masks `formatPhoneHUN`/`unformatPhoneHUN` (national display `(06 1) 234 5678` / `(06 22) 123 456` / `06 30 123 4567`). There is no `front.phone` HUN module. With `+`/`00`, country code `36` is always stripped, and it is not stripped a second time. Without a prefix it is stripped only at 10 digits or more, so Eger (`36` + 6 digits) stays intact. A bare 8-digit `36…` is grouped without a trunk (`36 123 456`), as FIN does for a bare `358…`, so `36` + NSN typed key by key (`36301234567`) stays valid. Eger gets `(06 36) 123 456` when `06` is typed or a `+36` / `0036` number is pasted; typed after `+36`, the prefix has already left the screen and it shows as `36 123 456`. One trunk `06` is removed and is shown again on a complete number. A lone `0` is not a trunk. Foreign `+`/`00` prefixes are rejected, including Austria `+43`, Germany `+49`, and Slovakia `+421`. The national number is an 8-digit geographic number (Budapest `1` + 7, or a 2-digit area code + 6) or a 9-digit mobile (`20` / `30` / `31` / `50` / `70`), nomadic `21`, or corporate UAN `38`, following libphonenumber's HU patterns. Test NDC `55` is rejected even though it sits inside libphonenumber's fixed-line regex. Toll-free `40` / `80` / `6802` / `6809`, premium `90` / `91`, and M2M `71` are rejected. `HUN` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
24
|
+
- New i18n keys in all locale bundles: `country-forms.address.state.label.HUN`, `country-forms.address.postalCode.placeholder.HUN`, `country-forms.personal-data.phone.placeholder.HUN`, `country-forms.validation.postalCode.HUN`.
|
|
25
|
+
|
|
26
|
+
## [1.33.0] - 2026-11-19
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- GUM address schema (`address-GUM`). `address-form` has no GUM file, so the field order follows `country/default.ts`: postalCode → street → complement → city → state. Postal code is optional free text (`maxLength` 50, no regex, no mask). State is required free text with the shared "State" label. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). Hidden legacy fields are omitted (`country`, `number`, `reference`, `neighborhood`) along with `receiverName`. `GUM` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
31
|
+
- GUM personal-data schema (`personal-data-GUM`). `personType` toggles individual/business visibility for `lastName`; no tax/identity document field (legacy `profile-form` has no GUM rules, and the generic default document is free text with no check digit). Adds `validatePhoneGUM` and masks `formatPhoneGUM`/`unformatPhoneGUM` (national display `(671) 989 8656`). With `+`/`00`, country code `1` is always stripped (the mask keeps `+`/`00`/`001` on screen until that strip happens); without a prefix it is stripped only past 10 digits. Foreign `+`/`00` prefixes are rejected. The national number is NANP area code `671` plus 7 subscriber digits, and the central-office code must start with `2`–`9` (same structural rule as USA and CAN; `front.phone` GUM accepts any 7 digits, including `(671) 123 1234`). Other NANP area codes are rejected. `GUM` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
32
|
+
- New i18n key in all locale bundles: `country-forms.personal-data.phone.placeholder.GUM`.
|
|
33
|
+
|
|
10
34
|
## [1.32.0] - 2026-11-19
|
|
11
35
|
|
|
12
36
|
### Added
|
|
@@ -386,7 +410,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
386
410
|
- `examples/react-minimal/` — React example with country/locale selection, form rendering, validation, and i18n overrides
|
|
387
411
|
|
|
388
412
|
|
|
389
|
-
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.
|
|
413
|
+
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.35.0...HEAD
|
|
414
|
+
[1.35.0]: https://github.com/vtex/country-forms/compare/v1.34.0...v1.35.0
|
|
415
|
+
[1.34.0]: https://github.com/vtex/country-forms/compare/v1.33.0...v1.34.0
|
|
416
|
+
[1.33.0]: https://github.com/vtex/country-forms/compare/v1.32.0...v1.33.0
|
|
390
417
|
[1.32.0]: https://github.com/vtex/country-forms/compare/v1.31.0...v1.32.0
|
|
391
418
|
[1.31.0]: https://github.com/vtex/country-forms/compare/v1.30.0...v1.31.0
|
|
392
419
|
[1.30.0]: https://github.com/vtex/country-forms/compare/v1.29.0...v1.30.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', 'CZE', 'DEU', 'DNK', 'DOM', 'ECU', 'ESP', 'FIN', 'FRA', 'GBR', 'GIB', 'GRC', 'GTM', 'HND', 'HRV', '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', 'DOM', 'ECU', 'ESP', 'FIN', 'FRA', 'GBR', 'GIB', 'GRC', 'GTM', 'HND', 'HRV', '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', 'DOM', 'ECU', 'ESP', 'FIN', 'FRA', 'GBR', 'GIB', 'GRC', 'GTM', 'GUM', 'HND', 'HRV', 'HUN', 'IDN', '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', 'DOM', 'ECU', 'ESP', 'FIN', 'FRA', 'GBR', 'GIB', 'GRC', 'GTM', 'GUM', 'HND', 'HRV', 'HUN', 'IDN', '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`. |
|
|
@@ -147,12 +147,15 @@ import type {
|
|
|
147
147
|
| Denmark | `DNK` | Yes | Yes | Postal code, Phone | Phone |
|
|
148
148
|
| Finland | `FIN` | Yes | Yes | Postal code, Phone | Phone |
|
|
149
149
|
| Honduras | `HND` | Yes | Yes | Phone | Phone |
|
|
150
|
+
| Hungary | `HUN` | Yes | Yes | Postal code, Phone | Phone |
|
|
151
|
+
| Indonesia | `IDN` | Yes | Yes | Phone | Phone |
|
|
150
152
|
| Guatemala | `GTM` | Yes | Yes | Postal code, DPI, NIT, Phone | DPI, NIT, Phone |
|
|
151
153
|
| Dominican Republic | `DOM` | Yes | Yes | Postal code, Phone | Phone |
|
|
152
154
|
| Spain | `ESP` | Yes | Yes | Código Postal, DNI/NIE, CIF, Phone | Phone, DNI, CIF |
|
|
153
155
|
| United Kingdom | `GBR` | Yes | Yes | Postcode, Phone | Postcode, Phone |
|
|
154
156
|
| Gibraltar | `GIB` | Yes | Yes | Postcode, Phone | Postcode, Phone |
|
|
155
157
|
| Greece | `GRC` | Yes | Yes | Postal code, Phone | Phone |
|
|
158
|
+
| Guam | `GUM` | Yes | Yes | Phone | Phone |
|
|
156
159
|
| Croatia | `HRV` | Yes | Yes | Postal code, Phone | Phone |
|
|
157
160
|
| Ireland | `IRL` | Yes | — | Eircode | Eircode |
|
|
158
161
|
| Italy | `ITA` | Yes | Yes | CAP, Phone | Phone |
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// src/schemas/address/GUM.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-GUM",
|
|
4
|
+
country: "GUM",
|
|
5
|
+
formType: "address",
|
|
6
|
+
fields: [
|
|
7
|
+
{
|
|
8
|
+
name: "postalCode",
|
|
9
|
+
type: "text",
|
|
10
|
+
label: "country-forms.address.postalCode.label",
|
|
11
|
+
required: false,
|
|
12
|
+
inputMode: "text",
|
|
13
|
+
maxLength: 50,
|
|
14
|
+
validation: {
|
|
15
|
+
maxLength: { value: 50, message: "country-forms.validation.maxLength" }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "street",
|
|
20
|
+
type: "text",
|
|
21
|
+
label: "country-forms.address.street.label",
|
|
22
|
+
required: true,
|
|
23
|
+
inputMode: "text",
|
|
24
|
+
maxLength: 750,
|
|
25
|
+
validation: {
|
|
26
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "complement",
|
|
31
|
+
type: "text",
|
|
32
|
+
label: "country-forms.address.complement.label",
|
|
33
|
+
required: false,
|
|
34
|
+
inputMode: "text",
|
|
35
|
+
maxLength: 750,
|
|
36
|
+
validation: {
|
|
37
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "city",
|
|
42
|
+
type: "text",
|
|
43
|
+
label: "country-forms.address.city.label",
|
|
44
|
+
required: true,
|
|
45
|
+
inputMode: "text",
|
|
46
|
+
maxLength: 100,
|
|
47
|
+
validation: {
|
|
48
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "state",
|
|
53
|
+
type: "text",
|
|
54
|
+
label: "country-forms.address.state.label",
|
|
55
|
+
required: true,
|
|
56
|
+
inputMode: "text",
|
|
57
|
+
maxLength: 100,
|
|
58
|
+
validation: {
|
|
59
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
};
|
|
64
|
+
var GUM_default = schema;
|
|
65
|
+
|
|
66
|
+
export { GUM_default as default };
|
|
67
|
+
//# sourceMappingURL=GUM-7557HHMG.mjs.map
|
|
68
|
+
//# sourceMappingURL=GUM-7557HHMG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/GUM.ts"],"names":[],"mappings":";AAmBA,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,QAAA,EAAU,KAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,EAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,EAAA,EAAI,SAAS,oCAAA;AAAqC;AACxE,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,MAAA;AAAA,MACN,KAAA,EAAO,mCAAA;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;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"GUM-7557HHMG.mjs","sourcesContent":["/**\n * Address schema for Guam (GUM).\n *\n * `address-form` has no `GUM.ts`. The checkout form is `country/default.ts`.\n * Visible field order: postalCode → street → complement → city → state.\n * Hidden legacy fields are omitted: `country`, `number`, `reference`,\n * `neighborhood`, and `receiverName` (outside this library's address model).\n *\n * Postal code: optional free text, `maxLength` 50, no regex and no mask\n * (the default rules do not validate it). USPS ZIPs `96910`–`96932` are\n * the usual Guam codes, but the legacy field also accepts any other string.\n * Subdivision: required free text (`maxLength` 100), label \"State\" — the\n * default form is not a village select.\n * Street is required. The legacy field has no max length; this schema caps\n * it at 750, the same cap used for other countries. Complement is optional\n * (`maxLength` 750). City is required (`maxLength` 100).\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-GUM',\n country: 'GUM',\n formType: 'address',\n fields: [\n {\n name: 'postalCode',\n type: 'text',\n label: 'country-forms.address.postalCode.label',\n required: false,\n inputMode: 'text',\n maxLength: 50,\n validation: {\n maxLength: { value: 50, message: 'country-forms.validation.maxLength' },\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 name: 'state',\n type: 'text',\n label: 'country-forms.address.state.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,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/address/GUM.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "address-GUM",
|
|
6
|
+
country: "GUM",
|
|
7
|
+
formType: "address",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
name: "postalCode",
|
|
11
|
+
type: "text",
|
|
12
|
+
label: "country-forms.address.postalCode.label",
|
|
13
|
+
required: false,
|
|
14
|
+
inputMode: "text",
|
|
15
|
+
maxLength: 50,
|
|
16
|
+
validation: {
|
|
17
|
+
maxLength: { value: 50, message: "country-forms.validation.maxLength" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "street",
|
|
22
|
+
type: "text",
|
|
23
|
+
label: "country-forms.address.street.label",
|
|
24
|
+
required: true,
|
|
25
|
+
inputMode: "text",
|
|
26
|
+
maxLength: 750,
|
|
27
|
+
validation: {
|
|
28
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "complement",
|
|
33
|
+
type: "text",
|
|
34
|
+
label: "country-forms.address.complement.label",
|
|
35
|
+
required: false,
|
|
36
|
+
inputMode: "text",
|
|
37
|
+
maxLength: 750,
|
|
38
|
+
validation: {
|
|
39
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "city",
|
|
44
|
+
type: "text",
|
|
45
|
+
label: "country-forms.address.city.label",
|
|
46
|
+
required: true,
|
|
47
|
+
inputMode: "text",
|
|
48
|
+
maxLength: 100,
|
|
49
|
+
validation: {
|
|
50
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "state",
|
|
55
|
+
type: "text",
|
|
56
|
+
label: "country-forms.address.state.label",
|
|
57
|
+
required: true,
|
|
58
|
+
inputMode: "text",
|
|
59
|
+
maxLength: 100,
|
|
60
|
+
validation: {
|
|
61
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
var GUM_default = schema;
|
|
67
|
+
|
|
68
|
+
module.exports = GUM_default;
|
|
69
|
+
//# sourceMappingURL=GUM-MIV7RTLR.js.map
|
|
70
|
+
//# sourceMappingURL=GUM-MIV7RTLR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/GUM.ts"],"names":[],"mappings":";;;AAmBA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,aAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,SAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN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A,MACN,KAAA,EAAO,mCAAA;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;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"GUM-MIV7RTLR.js","sourcesContent":["/**\n * Address schema for Guam (GUM).\n *\n * `address-form` has no `GUM.ts`. The checkout form is `country/default.ts`.\n * Visible field order: postalCode → street → complement → city → state.\n * Hidden legacy fields are omitted: `country`, `number`, `reference`,\n * `neighborhood`, and `receiverName` (outside this library's address model).\n *\n * Postal code: optional free text, `maxLength` 50, no regex and no mask\n * (the default rules do not validate it). USPS ZIPs `96910`–`96932` are\n * the usual Guam codes, but the legacy field also accepts any other string.\n * Subdivision: required free text (`maxLength` 100), label \"State\" — the\n * default form is not a village select.\n * Street is required. The legacy field has no max length; this schema caps\n * it at 750, the same cap used for other countries. Complement is optional\n * (`maxLength` 750). City is required (`maxLength` 100).\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-GUM',\n country: 'GUM',\n formType: 'address',\n fields: [\n {\n name: 'postalCode',\n type: 'text',\n label: 'country-forms.address.postalCode.label',\n required: false,\n inputMode: 'text',\n maxLength: 50,\n validation: {\n maxLength: { value: 50, message: 'country-forms.validation.maxLength' },\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 name: 'state',\n type: 'text',\n label: 'country-forms.address.state.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,81 @@
|
|
|
1
|
+
// src/schemas/personal-data/GUM.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-GUM",
|
|
4
|
+
country: "GUM",
|
|
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
|
+
// 20 chars fits "001 (671) 989 8656" (18) and a hyphenated paste
|
|
63
|
+
// before the mask normalizes to the 14-char display "(671) 989 8656".
|
|
64
|
+
maxLength: 20,
|
|
65
|
+
label: "country-forms.personal-data.phone.label",
|
|
66
|
+
placeholder: "country-forms.personal-data.phone.placeholder.GUM",
|
|
67
|
+
required: true,
|
|
68
|
+
inputMode: "tel",
|
|
69
|
+
formatRef: "formatPhoneGUM",
|
|
70
|
+
unformatRef: "unformatPhoneGUM",
|
|
71
|
+
validation: {
|
|
72
|
+
customValidator: "validatePhoneGUM"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var GUM_default = schema;
|
|
78
|
+
|
|
79
|
+
export { GUM_default as default };
|
|
80
|
+
//# sourceMappingURL=GUM-TRBQ2IMT.mjs.map
|
|
81
|
+
//# sourceMappingURL=GUM-TRBQ2IMT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/GUM.ts"],"names":[],"mappings":";AA4BA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,mBAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,eAAA;AAAA,EACV,MAAA,EAAQ;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AAA,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":"GUM-TRBQ2IMT.mjs","sourcesContent":["/**\n * Personal-data schema for Guam (GUM).\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 * `profile-form` has no GUM rules. The generic default collects a required\n * free-text `document` (max 50, no check digit, no document type) plus\n * optional gender and birth date, and hides email. This schema follows the\n * library document model: no `document` / `documentType` without a structured\n * identity document. Email is required and validated.\n *\n * Phone: `(671) 989 8656` — validated by `validatePhoneGUM`, masked by\n * `formatPhoneGUM`/`unformatPhoneGUM`. Area code `671` plus 7 subscriber\n * digits, and the central-office code must start with `2`–`9` (same NANP\n * structure as USA and CAN; stricter than `front.phone`, which accepts\n * `(671) 123 1234`). `+1` / `001` always strip the country code; a bare `1`\n * is stripped only past 10 digits. A foreign `+` / `00` prefix is rejected.\n * Other NANP area codes are rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/gum`,\n * `rules/masks/gum`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-GUM',\n country: 'GUM',\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 // 20 chars fits \"001 (671) 989 8656\" (18) and a hyphenated paste\n // before the mask normalizes to the 14-char display \"(671) 989 8656\".\n maxLength: 20,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.GUM',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneGUM',\n unformatRef: 'unformatPhoneGUM',\n validation: {\n customValidator: 'validatePhoneGUM',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/GUM.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-GUM",
|
|
6
|
+
country: "GUM",
|
|
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
|
+
// 20 chars fits "001 (671) 989 8656" (18) and a hyphenated paste
|
|
65
|
+
// before the mask normalizes to the 14-char display "(671) 989 8656".
|
|
66
|
+
maxLength: 20,
|
|
67
|
+
label: "country-forms.personal-data.phone.label",
|
|
68
|
+
placeholder: "country-forms.personal-data.phone.placeholder.GUM",
|
|
69
|
+
required: true,
|
|
70
|
+
inputMode: "tel",
|
|
71
|
+
formatRef: "formatPhoneGUM",
|
|
72
|
+
unformatRef: "unformatPhoneGUM",
|
|
73
|
+
validation: {
|
|
74
|
+
customValidator: "validatePhoneGUM"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
var GUM_default = schema;
|
|
80
|
+
|
|
81
|
+
module.exports = GUM_default;
|
|
82
|
+
//# sourceMappingURL=GUM-XAM6SYUZ.js.map
|
|
83
|
+
//# sourceMappingURL=GUM-XAM6SYUZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/GUM.ts"],"names":[],"mappings":";;;AA4BA,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,IAAA;AAAA,MACV,OAAA,EAAS;AAAA,QACP,EAAE,KAAA,EAAO,YAAA,EAAc,YAAA,EAAc,mDAAA,EAAoD;AAAA,QACzF,EAAE,KAAA,EAAO,UAAA,EAAY,YAAA,EAAc,iDAAA;AAAkD;AACvF,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,WAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,6CAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MA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;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"GUM-XAM6SYUZ.js","sourcesContent":["/**\n * Personal-data schema for Guam (GUM).\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 * `profile-form` has no GUM rules. The generic default collects a required\n * free-text `document` (max 50, no check digit, no document type) plus\n * optional gender and birth date, and hides email. This schema follows the\n * library document model: no `document` / `documentType` without a structured\n * identity document. Email is required and validated.\n *\n * Phone: `(671) 989 8656` — validated by `validatePhoneGUM`, masked by\n * `formatPhoneGUM`/`unformatPhoneGUM`. Area code `671` plus 7 subscriber\n * digits, and the central-office code must start with `2`–`9` (same NANP\n * structure as USA and CAN; stricter than `front.phone`, which accepts\n * `(671) 123 1234`). `+1` / `001` always strip the country code; a bare `1`\n * is stripped only past 10 digits. A foreign `+` / `00` prefix is rejected.\n * Other NANP area codes are rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/gum`,\n * `rules/masks/gum`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-GUM',\n country: 'GUM',\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 // 20 chars fits \"001 (671) 989 8656\" (18) and a hyphenated paste\n // before the mask normalizes to the 14-char display \"(671) 989 8656\".\n maxLength: 20,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.GUM',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneGUM',\n unformatRef: 'unformatPhoneGUM',\n validation: {\n customValidator: 'validatePhoneGUM',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// src/schemas/address/HUN.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-HUN",
|
|
4
|
+
country: "HUN",
|
|
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.HUN",
|
|
12
|
+
required: true,
|
|
13
|
+
inputMode: "numeric",
|
|
14
|
+
maxLength: 4,
|
|
15
|
+
validation: {
|
|
16
|
+
customValidator: "validatePostalCodeHUN"
|
|
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: "number",
|
|
32
|
+
type: "text",
|
|
33
|
+
label: "country-forms.address.number.label",
|
|
34
|
+
required: true,
|
|
35
|
+
inputMode: "text",
|
|
36
|
+
maxLength: 750,
|
|
37
|
+
validation: {
|
|
38
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "complement",
|
|
43
|
+
type: "text",
|
|
44
|
+
label: "country-forms.address.complement.label",
|
|
45
|
+
required: false,
|
|
46
|
+
inputMode: "text",
|
|
47
|
+
maxLength: 750,
|
|
48
|
+
validation: {
|
|
49
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "city",
|
|
54
|
+
type: "text",
|
|
55
|
+
label: "country-forms.address.city.label",
|
|
56
|
+
required: true,
|
|
57
|
+
inputMode: "text",
|
|
58
|
+
maxLength: 100,
|
|
59
|
+
validation: {
|
|
60
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "state",
|
|
65
|
+
type: "text",
|
|
66
|
+
label: "country-forms.address.state.label.HUN",
|
|
67
|
+
required: true,
|
|
68
|
+
inputMode: "text",
|
|
69
|
+
maxLength: 100,
|
|
70
|
+
validation: {
|
|
71
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
var HUN_default = schema;
|
|
77
|
+
|
|
78
|
+
export { HUN_default as default };
|
|
79
|
+
//# sourceMappingURL=HUN-BCEKKWN6.mjs.map
|
|
80
|
+
//# sourceMappingURL=HUN-BCEKKWN6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/HUN.ts"],"names":[],"mappings":";AA0BA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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,MAAA;AAAA,MACN,KAAA,EAAO,uCAAA;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;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"HUN-BCEKKWN6.mjs","sourcesContent":["/**\n * Address schema for Hungary (HUN).\n *\n * Field order: postalCode → street → number → complement → city → state\n * (matches the visible legacy `address-form` HUN fields; omits hidden\n * `country` / `reference` / `neighborhood` and `receiverName`, which are\n * outside this library's address model).\n *\n * Postal code: 4 digits whose first digit is `1`–`9` (`\"1051\"`), validated by\n * `validatePostalCodeHUN` as the address-form regex `/^[1-9]\\d{3}$/` after\n * trim. No mask — the legacy mask `\"9999\"` adds no separator. `maxLength`\n * is 4. The field is required. `postalCodeAPI` is false in the legacy rules.\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\"); this schema uses\n * the shared complement label. City is required (`maxLength` 100).\n * Subdivision: required free text (`maxLength` 100). The legacy field is not\n * a select. Label is `country-forms.address.state.label.HUN`. English is\n * County (megye). The legacy label key is the shared `province` string.\n *\n * Required rule modules: `rules/validators/hun`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-HUN',\n country: 'HUN',\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.HUN',\n required: true,\n inputMode: 'numeric',\n maxLength: 4,\n validation: {\n customValidator: 'validatePostalCodeHUN',\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: 'text',\n label: 'country-forms.address.state.label.HUN',\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/HUN.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-HUN",
|
|
6
|
+
country: "HUN",
|
|
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 "0036 (06 1) 234 5678" (20) with room so a longer
|
|
65
|
+
// paste is not cut down into a different number.
|
|
66
|
+
maxLength: 22,
|
|
67
|
+
label: "country-forms.personal-data.phone.label",
|
|
68
|
+
placeholder: "country-forms.personal-data.phone.placeholder.HUN",
|
|
69
|
+
required: true,
|
|
70
|
+
inputMode: "tel",
|
|
71
|
+
formatRef: "formatPhoneHUN",
|
|
72
|
+
unformatRef: "unformatPhoneHUN",
|
|
73
|
+
validation: {
|
|
74
|
+
customValidator: "validatePhoneHUN"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
var HUN_default = schema;
|
|
80
|
+
|
|
81
|
+
module.exports = HUN_default;
|
|
82
|
+
//# sourceMappingURL=HUN-MGRLWVRW.js.map
|
|
83
|
+
//# sourceMappingURL=HUN-MGRLWVRW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/HUN.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,IAAA;AAAA,MACV,OAAA,EAAS;AAAA,QACP,EAAE,KAAA,EAAO,YAAA,EAAc,YAAA,EAAc,mDAAA,EAAoD;AAAA,QACzF,EAAE,KAAA,EAAO,UAAA,EAAY,YAAA,EAAc,iDAAA;AAAkD;AACvF,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,WAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,6CAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA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AiB;AAAA;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"HUN-MGRLWVRW.js","sourcesContent":["/**\n * Personal-data schema for Hungary (HUN).\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 * `profile-form` has no HUN rules and falls back to `default.js`: a required\n * free-text `document` (max 50, no check digit), hidden email, optional\n * `homePhone`, gender, and birth date, plus optional business fields. This\n * schema follows the library document model: no `document` / `documentType`\n * when there is no structured identity document. Email is required here.\n * `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `06 30 123 4567` — validated by `validatePhoneHUN`, masked by\n * `formatPhoneHUN`/`unformatPhoneHUN`. Budapest is `(06 1) 234 5678`. Other\n * geographic numbers are `(06 22) 123 456`. Mobile, nomadic `21`, and\n * corporate `38` display as `06 xx xxx xxxx`. `+36` / `0036` are stripped,\n * and only once, so a remainder that still starts with `36` is not reduced\n * again (Eger is area code `36`). A bare `36` is stripped only at 10 digits\n * or more, and a bare 8-digit `36…` is grouped without a trunk (`36 123 456`)\n * so `36` + NSN typed key by key stays valid. One trunk `06` is removed and is\n * shown again on a complete number.\n * A lone `0` is not a trunk. A foreign `+` / `00` prefix (including Austria\n * `+43`) is rejected. There is no `front.phone` HUN module.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/hun`,\n * `rules/masks/hun`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-HUN',\n country: 'HUN',\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 \"0036 (06 1) 234 5678\" (20) with room so a longer\n // paste is not cut down into a different number.\n maxLength: 22,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.HUN',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneHUN',\n unformatRef: 'unformatPhoneHUN',\n validation: {\n customValidator: 'validatePhoneHUN',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|