@vtex/country-forms 1.29.0 → 1.31.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/GIB-7TWUJDV4.js +83 -0
- package/dist/GIB-7TWUJDV4.js.map +1 -0
- package/dist/GIB-EVKJG34Q.js +73 -0
- package/dist/GIB-EVKJG34Q.js.map +1 -0
- package/dist/GIB-NK4LL7FB.mjs +71 -0
- package/dist/GIB-NK4LL7FB.mjs.map +1 -0
- package/dist/GIB-POLFLNJ3.mjs +81 -0
- package/dist/GIB-POLFLNJ3.mjs.map +1 -0
- package/dist/GRC-C5VAQV45.mjs +80 -0
- package/dist/GRC-C5VAQV45.mjs.map +1 -0
- package/dist/GRC-G2OYGTNF.mjs +81 -0
- package/dist/GRC-G2OYGTNF.mjs.map +1 -0
- package/dist/GRC-H7MPM2BA.js +82 -0
- package/dist/GRC-H7MPM2BA.js.map +1 -0
- package/dist/GRC-SR2YF7H3.js +83 -0
- package/dist/GRC-SR2YF7H3.js.map +1 -0
- package/dist/{ar-SA-R5MRZUK5.js → ar-SA-6DOOYLI3.js} +9 -2
- package/dist/ar-SA-6DOOYLI3.js.map +1 -0
- package/dist/{ar-SA-ZBQHTZEB.mjs → ar-SA-MCOYPX3K.mjs} +9 -2
- package/dist/ar-SA-MCOYPX3K.mjs.map +1 -0
- package/dist/{bg-BG-AALOSP3P.js → bg-BG-7EGQSRD5.js} +9 -2
- package/dist/bg-BG-7EGQSRD5.js.map +1 -0
- package/dist/{bg-BG-QXKJAB2C.mjs → bg-BG-FIL43Z5G.mjs} +9 -2
- package/dist/bg-BG-FIL43Z5G.mjs.map +1 -0
- package/dist/{ca-ES-O7UMEQZU.js → ca-ES-CBCME2EE.js} +9 -2
- package/dist/ca-ES-CBCME2EE.js.map +1 -0
- package/dist/{ca-ES-5YBGPBON.mjs → ca-ES-CO65RHQV.mjs} +9 -2
- package/dist/ca-ES-CO65RHQV.mjs.map +1 -0
- package/dist/chunk-533IAULN.mjs +79 -0
- package/dist/chunk-533IAULN.mjs.map +1 -0
- package/dist/chunk-GCZLMLCG.js +84 -0
- package/dist/chunk-GCZLMLCG.js.map +1 -0
- package/dist/chunk-J4NXMRM5.js +369 -0
- package/dist/chunk-J4NXMRM5.js.map +1 -0
- package/dist/chunk-OQJNOWQZ.mjs +364 -0
- package/dist/chunk-OQJNOWQZ.mjs.map +1 -0
- package/dist/{cs-CZ-CBNXHNDK.js → cs-CZ-BWYWFUQ3.js} +9 -2
- package/dist/cs-CZ-BWYWFUQ3.js.map +1 -0
- package/dist/{cs-CZ-LX3M54CI.mjs → cs-CZ-NWG622FG.mjs} +9 -2
- package/dist/cs-CZ-NWG622FG.mjs.map +1 -0
- package/dist/{da-DK-LJJAW2ZX.js → da-DK-7VYDX2FX.js} +9 -2
- package/dist/da-DK-7VYDX2FX.js.map +1 -0
- package/dist/{da-DK-GSMHKLBS.mjs → da-DK-FY6G2GCX.mjs} +9 -2
- package/dist/da-DK-FY6G2GCX.mjs.map +1 -0
- package/dist/{de-DE-HN453SF6.mjs → de-DE-KGHFDVHJ.mjs} +9 -2
- package/dist/de-DE-KGHFDVHJ.mjs.map +1 -0
- package/dist/{de-DE-T3X2D4PE.js → de-DE-SDJUKGN4.js} +9 -2
- package/dist/de-DE-SDJUKGN4.js.map +1 -0
- package/dist/{el-GR-UTHRT5DC.mjs → el-GR-BXT55FIZ.mjs} +9 -2
- package/dist/el-GR-BXT55FIZ.mjs.map +1 -0
- package/dist/{el-GR-LEVHCHEV.js → el-GR-NTL27KLY.js} +9 -2
- package/dist/el-GR-NTL27KLY.js.map +1 -0
- package/dist/{en-US-5MFFIXZ5.mjs → en-US-D5MT5TLU.mjs} +9 -2
- package/dist/en-US-D5MT5TLU.mjs.map +1 -0
- package/dist/{en-US-ONJWEKWP.js → en-US-HDLPLKC6.js} +9 -2
- package/dist/en-US-HDLPLKC6.js.map +1 -0
- package/dist/{es-MX-SUYWQR55.js → es-MX-P2XTP4TE.js} +9 -2
- package/dist/es-MX-P2XTP4TE.js.map +1 -0
- package/dist/{es-MX-6THW6L37.mjs → es-MX-SYVHUHEG.mjs} +9 -2
- package/dist/es-MX-SYVHUHEG.mjs.map +1 -0
- package/dist/{fi-FI-LTG33KFG.mjs → fi-FI-OD2DJXE2.mjs} +9 -2
- package/dist/fi-FI-OD2DJXE2.mjs.map +1 -0
- package/dist/{fi-FI-YN3JKBBA.js → fi-FI-Q7LOKOGB.js} +9 -2
- package/dist/fi-FI-Q7LOKOGB.js.map +1 -0
- package/dist/{fr-FR-RLSFI7XJ.js → fr-FR-6LLHW3RE.js} +9 -2
- package/dist/fr-FR-6LLHW3RE.js.map +1 -0
- package/dist/{fr-FR-YN26K2MG.mjs → fr-FR-TPQZAZT6.mjs} +9 -2
- package/dist/fr-FR-TPQZAZT6.mjs.map +1 -0
- package/dist/gib-4DUCCVUD.mjs +28 -0
- package/dist/gib-4DUCCVUD.mjs.map +1 -0
- package/dist/gib-HZTKTLNY.js +32 -0
- package/dist/gib-HZTKTLNY.js.map +1 -0
- package/dist/gib-YWCCOVAX.js +31 -0
- package/dist/gib-YWCCOVAX.js.map +1 -0
- package/dist/gib-ZUM2XNYK.mjs +27 -0
- package/dist/gib-ZUM2XNYK.mjs.map +1 -0
- package/dist/grc-3SBZYFWM.mjs +27 -0
- package/dist/grc-3SBZYFWM.mjs.map +1 -0
- package/dist/grc-RLC7XLMD.mjs +16 -0
- package/dist/grc-RLC7XLMD.mjs.map +1 -0
- package/dist/grc-WF2ATKTN.js +30 -0
- package/dist/grc-WF2ATKTN.js.map +1 -0
- package/dist/grc-XOBMYW4O.js +19 -0
- package/dist/grc-XOBMYW4O.js.map +1 -0
- package/dist/{hu-HU-EH4UYVM5.mjs → hu-HU-D4XZ3JYX.mjs} +9 -2
- package/dist/hu-HU-D4XZ3JYX.mjs.map +1 -0
- package/dist/{hu-HU-DEAEBZ4Y.js → hu-HU-ONZHOGOD.js} +9 -2
- package/dist/hu-HU-ONZHOGOD.js.map +1 -0
- package/dist/{id-ID-5BMPGMUB.mjs → id-ID-2R5TEYLC.mjs} +9 -2
- package/dist/id-ID-2R5TEYLC.mjs.map +1 -0
- package/dist/{id-ID-HCDTRCE5.js → id-ID-YUJZXM45.js} +9 -2
- package/dist/id-ID-YUJZXM45.js.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +97 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -60
- package/dist/index.mjs.map +1 -1
- package/dist/{it-IT-RVF4JFAP.js → it-IT-RARWF56P.js} +9 -2
- package/dist/it-IT-RARWF56P.js.map +1 -0
- package/dist/{it-IT-U5HUSMU2.mjs → it-IT-X7AEVJ74.mjs} +9 -2
- package/dist/it-IT-X7AEVJ74.mjs.map +1 -0
- package/dist/{ja-JP-URWLVWD6.mjs → ja-JP-2ZGVYTBU.mjs} +9 -2
- package/dist/ja-JP-2ZGVYTBU.mjs.map +1 -0
- package/dist/{ja-JP-ZBJ622TK.js → ja-JP-SQX4A2TT.js} +9 -2
- package/dist/ja-JP-SQX4A2TT.js.map +1 -0
- package/dist/{ko-KR-A6NZIGKQ.js → ko-KR-RUQ7AUTI.js} +9 -2
- package/dist/ko-KR-RUQ7AUTI.js.map +1 -0
- package/dist/{ko-KR-MPVPPDHT.mjs → ko-KR-WHFZWRDX.mjs} +9 -2
- package/dist/ko-KR-WHFZWRDX.mjs.map +1 -0
- package/dist/{nb-NO-BUT5ETRH.mjs → nb-NO-SMAV346W.mjs} +9 -2
- package/dist/nb-NO-SMAV346W.mjs.map +1 -0
- package/dist/{nb-NO-I2KQ3MMA.js → nb-NO-YBTX5V3Z.js} +9 -2
- package/dist/nb-NO-YBTX5V3Z.js.map +1 -0
- package/dist/{nl-NL-GOYOJ2J2.mjs → nl-NL-FIKWA73Y.mjs} +9 -2
- package/dist/nl-NL-FIKWA73Y.mjs.map +1 -0
- package/dist/{nl-NL-NPJ6VG32.js → nl-NL-SL6MK276.js} +9 -2
- package/dist/nl-NL-SL6MK276.js.map +1 -0
- package/dist/{pl-PL-JUPFCWH4.mjs → pl-PL-5N3XKEP3.mjs} +9 -2
- package/dist/pl-PL-5N3XKEP3.mjs.map +1 -0
- package/dist/{pl-PL-2LJWJNQZ.js → pl-PL-WGUTYPEC.js} +9 -2
- package/dist/pl-PL-WGUTYPEC.js.map +1 -0
- package/dist/{pt-BR-K7HGTOZ5.js → pt-BR-37PBXFES.js} +9 -2
- package/dist/pt-BR-37PBXFES.js.map +1 -0
- package/dist/{pt-BR-OE4IIWLK.mjs → pt-BR-S5NJ7DCL.mjs} +9 -2
- package/dist/pt-BR-S5NJ7DCL.mjs.map +1 -0
- package/dist/{pt-PT-K4YZCK3U.js → pt-PT-DZZ23V3C.js} +9 -2
- package/dist/pt-PT-DZZ23V3C.js.map +1 -0
- package/dist/{pt-PT-N5PKF7OC.mjs → pt-PT-OSH6NVYH.mjs} +9 -2
- package/dist/pt-PT-OSH6NVYH.mjs.map +1 -0
- package/dist/{ro-RO-RHS4ORCD.mjs → ro-RO-RS74ANDE.mjs} +9 -2
- package/dist/ro-RO-RS74ANDE.mjs.map +1 -0
- package/dist/{ro-RO-PV3VR7VE.js → ro-RO-W64F6NOA.js} +9 -2
- package/dist/ro-RO-W64F6NOA.js.map +1 -0
- package/dist/{ru-RU-P5E6LLSB.js → ru-RU-TYXDYDUJ.js} +9 -2
- package/dist/ru-RU-TYXDYDUJ.js.map +1 -0
- package/dist/{ru-RU-PAWIC42R.mjs → ru-RU-YO35PPQ7.mjs} +9 -2
- package/dist/ru-RU-YO35PPQ7.mjs.map +1 -0
- package/dist/{sk-SK-CRDM6WDA.js → sk-SK-LHBLOFUK.js} +9 -2
- package/dist/sk-SK-LHBLOFUK.js.map +1 -0
- package/dist/{sk-SK-H4DEFTKX.mjs → sk-SK-MC5KEBL7.mjs} +9 -2
- package/dist/sk-SK-MC5KEBL7.mjs.map +1 -0
- package/dist/{sl-SI-RDKEUWOK.mjs → sl-SI-66LZKA3O.mjs} +9 -2
- package/dist/sl-SI-66LZKA3O.mjs.map +1 -0
- package/dist/{sl-SI-4J7ZU2EY.js → sl-SI-UU54KYKG.js} +9 -2
- package/dist/sl-SI-UU54KYKG.js.map +1 -0
- package/dist/{sv-SE-EU2YNROO.mjs → sv-SE-RJZC3ERT.mjs} +9 -2
- package/dist/sv-SE-RJZC3ERT.mjs.map +1 -0
- package/dist/{sv-SE-ENK5VVA6.js → sv-SE-VOADI2HB.js} +9 -2
- package/dist/sv-SE-VOADI2HB.js.map +1 -0
- package/dist/{th-TH-Q37RW4TG.mjs → th-TH-SKFWDYVG.mjs} +9 -2
- package/dist/th-TH-SKFWDYVG.mjs.map +1 -0
- package/dist/{th-TH-IEZG2RMT.js → th-TH-TU4G5RWT.js} +9 -2
- package/dist/th-TH-TU4G5RWT.js.map +1 -0
- package/dist/{uk-UA-6Z4YVM4H.mjs → uk-UA-44DNX2P6.mjs} +9 -2
- package/dist/uk-UA-44DNX2P6.mjs.map +1 -0
- package/dist/{uk-UA-BEG5YP4Q.js → uk-UA-LUT4HXIZ.js} +9 -2
- package/dist/uk-UA-LUT4HXIZ.js.map +1 -0
- package/package.json +1 -1
- package/dist/ar-SA-R5MRZUK5.js.map +0 -1
- package/dist/ar-SA-ZBQHTZEB.mjs.map +0 -1
- package/dist/bg-BG-AALOSP3P.js.map +0 -1
- package/dist/bg-BG-QXKJAB2C.mjs.map +0 -1
- package/dist/ca-ES-5YBGPBON.mjs.map +0 -1
- package/dist/ca-ES-O7UMEQZU.js.map +0 -1
- package/dist/cs-CZ-CBNXHNDK.js.map +0 -1
- package/dist/cs-CZ-LX3M54CI.mjs.map +0 -1
- package/dist/da-DK-GSMHKLBS.mjs.map +0 -1
- package/dist/da-DK-LJJAW2ZX.js.map +0 -1
- package/dist/de-DE-HN453SF6.mjs.map +0 -1
- package/dist/de-DE-T3X2D4PE.js.map +0 -1
- package/dist/el-GR-LEVHCHEV.js.map +0 -1
- package/dist/el-GR-UTHRT5DC.mjs.map +0 -1
- package/dist/en-US-5MFFIXZ5.mjs.map +0 -1
- package/dist/en-US-ONJWEKWP.js.map +0 -1
- package/dist/es-MX-6THW6L37.mjs.map +0 -1
- package/dist/es-MX-SUYWQR55.js.map +0 -1
- package/dist/fi-FI-LTG33KFG.mjs.map +0 -1
- package/dist/fi-FI-YN3JKBBA.js.map +0 -1
- package/dist/fr-FR-RLSFI7XJ.js.map +0 -1
- package/dist/fr-FR-YN26K2MG.mjs.map +0 -1
- package/dist/hu-HU-DEAEBZ4Y.js.map +0 -1
- package/dist/hu-HU-EH4UYVM5.mjs.map +0 -1
- package/dist/id-ID-5BMPGMUB.mjs.map +0 -1
- package/dist/id-ID-HCDTRCE5.js.map +0 -1
- package/dist/it-IT-RVF4JFAP.js.map +0 -1
- package/dist/it-IT-U5HUSMU2.mjs.map +0 -1
- package/dist/ja-JP-URWLVWD6.mjs.map +0 -1
- package/dist/ja-JP-ZBJ622TK.js.map +0 -1
- package/dist/ko-KR-A6NZIGKQ.js.map +0 -1
- package/dist/ko-KR-MPVPPDHT.mjs.map +0 -1
- package/dist/nb-NO-BUT5ETRH.mjs.map +0 -1
- package/dist/nb-NO-I2KQ3MMA.js.map +0 -1
- package/dist/nl-NL-GOYOJ2J2.mjs.map +0 -1
- package/dist/nl-NL-NPJ6VG32.js.map +0 -1
- package/dist/pl-PL-2LJWJNQZ.js.map +0 -1
- package/dist/pl-PL-JUPFCWH4.mjs.map +0 -1
- package/dist/pt-BR-K7HGTOZ5.js.map +0 -1
- package/dist/pt-BR-OE4IIWLK.mjs.map +0 -1
- package/dist/pt-PT-K4YZCK3U.js.map +0 -1
- package/dist/pt-PT-N5PKF7OC.mjs.map +0 -1
- package/dist/ro-RO-PV3VR7VE.js.map +0 -1
- package/dist/ro-RO-RHS4ORCD.mjs.map +0 -1
- package/dist/ru-RU-P5E6LLSB.js.map +0 -1
- package/dist/ru-RU-PAWIC42R.mjs.map +0 -1
- package/dist/sk-SK-CRDM6WDA.js.map +0 -1
- package/dist/sk-SK-H4DEFTKX.mjs.map +0 -1
- package/dist/sl-SI-4J7ZU2EY.js.map +0 -1
- package/dist/sl-SI-RDKEUWOK.mjs.map +0 -1
- package/dist/sv-SE-ENK5VVA6.js.map +0 -1
- package/dist/sv-SE-EU2YNROO.mjs.map +0 -1
- package/dist/th-TH-IEZG2RMT.js.map +0 -1
- package/dist/th-TH-Q37RW4TG.mjs.map +0 -1
- package/dist/uk-UA-6Z4YVM4H.mjs.map +0 -1
- package/dist/uk-UA-BEG5YP4Q.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.31.0] - 2026-11-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- GIB address schema (`address-GIB`). Field order: postalCode → street → complement → city → state. Postal code is optional (the legacy field does not set `required`). When filled, `validatePostalCodeGIB` accepts only `GX11 1AA` (space optional, case ignored), the single generic postcode from the Royal Gibraltar Post Office and the UPU. Mask `formatPostalCodeGIB`/`unformatPostalCodeGIB` displays `GX11 1AA` and stores `GX111AA`. The space is inserted only when the code is complete. `maxLength` is 8. The legacy field is `maxLength` 50, `autoUpperCase`, and has no regex, so other strings (including domestic `E/V`) are rejected here. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). City is required (`maxLength` 100). State is required free text (`maxLength` 100) with the shared State label. Hidden `country`, `number`, `reference`, and `neighborhood` are omitted, along with `receiverName`. `GIB` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
15
|
+
- GIB personal-data schema (`personal-data-GIB`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no GIB rules; the generic default `document` is required free text with no check digit). Adds `validatePhoneGIB` and masks `formatPhoneGIB`/`unformatPhoneGIB` (national display `2005 2200`). There is no `front.phone` GIB module. With `+`/`00`, country code `350` is always stripped, and it is not stripped a second time. Without a prefix it is stripped only at 11 digits. There is no trunk `0`. Foreign `+`/`00` prefixes are rejected, including Spain `+34`, the United Kingdom `+44`, and Portugal `+351`. The national number is 8 digits in a block the GRA Numbering Plan (March 2024) allocates to local fixed or mobile subscribers: `200`, `2030`–`2031`, protected `2162` and `2164`–`2167`, `21680000`–`21684999`, `21690000`–`21694999`, `2222`/`2224`/`2225`/`2227`, `2250`, `22510000`–`22514999`, `22550000`–`22554999`, `510`, `52500000`–`52509999`, `52510000`–`52514999`, and `54`/`56`/`57`/`58`. Reserved blocks, withdrawn `606` and `629`, special-rate `8`, and MCOM `601` (not for local subscriber use) are rejected. `GIB` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
16
|
+
- New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.GIB`, `country-forms.personal-data.phone.placeholder.GIB`, `country-forms.validation.postalCode.GIB`.
|
|
17
|
+
|
|
18
|
+
## [1.30.0] - 2026-11-18
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- GRC address schema (`address-GRC`). Field order: postalCode → street → number → complement → city → state. Postal code is required; `validatePostalCodeGRC` requires exactly 5 digits after trim (`10682`), including `00000`. A space is rejected (`106 82` is the geolocation example, not the field regex `/^([\d]{5})$/`). No postal mask. `number` is optional (`maxLength` 750). State is required free text (`maxLength` 100, label Province). Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). Hidden `country`, `reference`, and `neighborhood` are omitted, along with `receiverName`. `GRC` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
23
|
+
- GRC personal-data schema (`personal-data-GRC`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no GRC rules; the generic default `document` is required free text with no check digit). Adds `validatePhoneGRC` and masks `formatPhoneGRC`/`unformatPhoneGRC` (national display `(2310) 722297` / `(697) 2148716`). With `+`/`00`, country code `30` is always stripped, and it is not stripped a second time. Without a prefix it is stripped only at 12 digits. One trunk `0` is removed and is not shown on a complete number. Foreign `+`/`00` prefixes are rejected, including Italy `+39`, Cyprus `+357`, and Bulgaria `+359`. The national number is 10 digits starting with `2` or `6` (`/^[26]\d{9}$/`), matching `Phone.validate` restricted to 10 digits. The coffee regex also accepts 7–9 digits and a leading comma (`[2,6]`); those fail here. Destination codes from `GRC.coffee` only group a complete number as `(NDC) subscriber`. A valid number whose prefix is not in that list (`6912345678`, `2511234567`) stays valid and is shown without parentheses. `getPhoneInternational` returning null does not reject the number. `GRC` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
24
|
+
- New i18n keys in all locale bundles: `country-forms.address.state.label.GRC`, `country-forms.address.postalCode.placeholder.GRC`, `country-forms.personal-data.phone.placeholder.GRC`, `country-forms.validation.postalCode.GRC`.
|
|
25
|
+
|
|
10
26
|
## [1.29.0] - 2026-11-17
|
|
11
27
|
|
|
12
28
|
### Added
|
|
@@ -362,7 +378,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
362
378
|
- `examples/react-minimal/` — React example with country/locale selection, form rendering, validation, and i18n overrides
|
|
363
379
|
|
|
364
380
|
|
|
365
|
-
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.
|
|
381
|
+
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.31.0...HEAD
|
|
382
|
+
[1.31.0]: https://github.com/vtex/country-forms/compare/v1.30.0...v1.31.0
|
|
383
|
+
[1.30.0]: https://github.com/vtex/country-forms/compare/v1.29.0...v1.30.0
|
|
366
384
|
[1.29.0]: https://github.com/vtex/country-forms/compare/v1.28.0...v1.29.0
|
|
367
385
|
[1.28.0]: https://github.com/vtex/country-forms/compare/v1.27.0...v1.28.0
|
|
368
386
|
[1.27.0]: https://github.com/vtex/country-forms/compare/v1.26.0...v1.27.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', 'GTM', 'HND', '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', 'GTM', 'HND', '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', 'HND', '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', '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`. |
|
|
@@ -151,6 +151,8 @@ import type {
|
|
|
151
151
|
| Dominican Republic | `DOM` | Yes | Yes | Postal code, Phone | Phone |
|
|
152
152
|
| Spain | `ESP` | Yes | Yes | Código Postal, DNI/NIE, CIF, Phone | Phone, DNI, CIF |
|
|
153
153
|
| United Kingdom | `GBR` | Yes | Yes | Postcode, Phone | Postcode, Phone |
|
|
154
|
+
| Gibraltar | `GIB` | Yes | Yes | Postcode, Phone | Postcode, Phone |
|
|
155
|
+
| Greece | `GRC` | Yes | Yes | Postal code, Phone | Phone |
|
|
154
156
|
| Ireland | `IRL` | Yes | — | Eircode | Eircode |
|
|
155
157
|
| Italy | `ITA` | Yes | Yes | CAP, Phone | Phone |
|
|
156
158
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/GIB.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-GIB",
|
|
6
|
+
country: "GIB",
|
|
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 "00350 2005 2200" (15) and "+350 2005 2200" (14).
|
|
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.GIB",
|
|
69
|
+
required: true,
|
|
70
|
+
inputMode: "tel",
|
|
71
|
+
formatRef: "formatPhoneGIB",
|
|
72
|
+
unformatRef: "unformatPhoneGIB",
|
|
73
|
+
validation: {
|
|
74
|
+
customValidator: "validatePhoneGIB"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
var GIB_default = schema;
|
|
80
|
+
|
|
81
|
+
module.exports = GIB_default;
|
|
82
|
+
//# sourceMappingURL=GIB-7TWUJDV4.js.map
|
|
83
|
+
//# sourceMappingURL=GIB-7TWUJDV4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/GIB.ts"],"names":[],"mappings":";;;AAgCA,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,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,SAAA,EAAW,YAAA;AAAA,MACX,gBAAA,EAAkB;AAAA,QAChB,UAAA,EAAY,wDAAA;AAAA,QACZ,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,UAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,4CAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,qBAAA,EAAuB;AAAA,QACrB,KAAA,EAAO,YAAA;AAAA,QACP,QAAA,EAAU,QAAA;AAAA,QACV,KAAA,EAAO;AAAA,OACT;AAAA,MACA,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,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":"GIB-7TWUJDV4.js","sourcesContent":["/**\n * Personal-data schema for Gibraltar (GIB).\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 GIB 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. Business fields\n * (`corporateName`, `tradeName`, `corporateDocument`, `businessPhone`) are\n * optional there. This schema follows the library document model: no\n * `document` / `documentType` without a structured identity document. Email\n * is required and validated. `homePhone` is optional there; `phone` is\n * required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `2005 2200` — validated by `validatePhoneGIB`, masked by\n * `formatPhoneGIB`/`unformatPhoneGIB`. 8 digits, no trunk prefix. There is\n * no `front.phone` GIB module. `+350` / `00350` are stripped, and only once.\n * A bare `350` is stripped only at 11 digits. A foreign `+` / `00` prefix\n * (including Spain `+34`, the United Kingdom `+44`, and Portugal `+351`) is\n * rejected. Accepted ranges are the local fixed and mobile blocks in the\n * GRA Numbering Plan (March 2024).\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/gib`,\n * `rules/masks/gib`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-GIB',\n country: 'GIB',\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 \"00350 2005 2200\" (15) and \"+350 2005 2200\" (14).\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.GIB',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneGIB',\n unformatRef: 'unformatPhoneGIB',\n validation: {\n customValidator: 'validatePhoneGIB',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/address/GIB.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "address-GIB",
|
|
6
|
+
country: "GIB",
|
|
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.GIB",
|
|
14
|
+
required: false,
|
|
15
|
+
inputMode: "text",
|
|
16
|
+
maxLength: 8,
|
|
17
|
+
formatRef: "formatPostalCodeGIB",
|
|
18
|
+
unformatRef: "unformatPostalCodeGIB",
|
|
19
|
+
validation: {
|
|
20
|
+
customValidator: "validatePostalCodeGIB"
|
|
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: "complement",
|
|
36
|
+
type: "text",
|
|
37
|
+
label: "country-forms.address.complement.label",
|
|
38
|
+
required: false,
|
|
39
|
+
inputMode: "text",
|
|
40
|
+
maxLength: 750,
|
|
41
|
+
validation: {
|
|
42
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "city",
|
|
47
|
+
type: "text",
|
|
48
|
+
label: "country-forms.address.city.label",
|
|
49
|
+
required: true,
|
|
50
|
+
inputMode: "text",
|
|
51
|
+
maxLength: 100,
|
|
52
|
+
validation: {
|
|
53
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "state",
|
|
58
|
+
type: "text",
|
|
59
|
+
label: "country-forms.address.state.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
|
+
};
|
|
69
|
+
var GIB_default = schema;
|
|
70
|
+
|
|
71
|
+
module.exports = GIB_default;
|
|
72
|
+
//# sourceMappingURL=GIB-EVKJG34Q.js.map
|
|
73
|
+
//# sourceMappingURL=GIB-EVKJG34Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/GIB.ts"],"names":[],"mappings":";;;AA6BA,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,E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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":"GIB-EVKJG34Q.js","sourcesContent":["/**\n * Address schema for Gibraltar (GIB).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` GIB fields; omits hidden\n * `country` / `number` / `reference` / `neighborhood` and `receiverName`,\n * which are outside this library's address model).\n *\n * Postal code: optional (the legacy field does not set `required`). When\n * filled, `validatePostalCodeGIB` accepts only `GX11 1AA`, the single\n * generic postcode published by the Royal Gibraltar Post Office and the UPU.\n * The space is optional and case is ignored. Mask\n * `formatPostalCodeGIB`/`unformatPostalCodeGIB` displays `GX11 1AA` and\n * stores `GX111AA`. The space is inserted only when the code is complete.\n * `maxLength` is 8 (the masked form). The legacy field is `maxLength` 50,\n * `autoUpperCase`, and has no regex, so other strings (including the\n * domestic abbreviation `E/V`) are rejected here.\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). State is required free text (`maxLength` 100).\n * The legacy field is not a select and its label is `state`, so the shared\n * State label is used.\n *\n * Required rule modules: `rules/validators/gib`, `rules/masks/gib`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-GIB',\n country: 'GIB',\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.GIB',\n required: false,\n inputMode: 'text',\n maxLength: 8,\n formatRef: 'formatPostalCodeGIB',\n unformatRef: 'unformatPostalCodeGIB',\n validation: {\n customValidator: 'validatePostalCodeGIB',\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,71 @@
|
|
|
1
|
+
// src/schemas/address/GIB.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-GIB",
|
|
4
|
+
country: "GIB",
|
|
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.GIB",
|
|
12
|
+
required: false,
|
|
13
|
+
inputMode: "text",
|
|
14
|
+
maxLength: 8,
|
|
15
|
+
formatRef: "formatPostalCodeGIB",
|
|
16
|
+
unformatRef: "unformatPostalCodeGIB",
|
|
17
|
+
validation: {
|
|
18
|
+
customValidator: "validatePostalCodeGIB"
|
|
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: "complement",
|
|
34
|
+
type: "text",
|
|
35
|
+
label: "country-forms.address.complement.label",
|
|
36
|
+
required: false,
|
|
37
|
+
inputMode: "text",
|
|
38
|
+
maxLength: 750,
|
|
39
|
+
validation: {
|
|
40
|
+
maxLength: { value: 750, message: "country-forms.validation.maxLength" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "city",
|
|
45
|
+
type: "text",
|
|
46
|
+
label: "country-forms.address.city.label",
|
|
47
|
+
required: true,
|
|
48
|
+
inputMode: "text",
|
|
49
|
+
maxLength: 100,
|
|
50
|
+
validation: {
|
|
51
|
+
maxLength: { value: 100, message: "country-forms.validation.maxLength" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "state",
|
|
56
|
+
type: "text",
|
|
57
|
+
label: "country-forms.address.state.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
|
+
};
|
|
67
|
+
var GIB_default = schema;
|
|
68
|
+
|
|
69
|
+
export { GIB_default as default };
|
|
70
|
+
//# sourceMappingURL=GIB-NK4LL7FB.mjs.map
|
|
71
|
+
//# sourceMappingURL=GIB-NK4LL7FB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/GIB.ts"],"names":[],"mappings":";AA6BA,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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A,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":"GIB-NK4LL7FB.mjs","sourcesContent":["/**\n * Address schema for Gibraltar (GIB).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` GIB fields; omits hidden\n * `country` / `number` / `reference` / `neighborhood` and `receiverName`,\n * which are outside this library's address model).\n *\n * Postal code: optional (the legacy field does not set `required`). When\n * filled, `validatePostalCodeGIB` accepts only `GX11 1AA`, the single\n * generic postcode published by the Royal Gibraltar Post Office and the UPU.\n * The space is optional and case is ignored. Mask\n * `formatPostalCodeGIB`/`unformatPostalCodeGIB` displays `GX11 1AA` and\n * stores `GX111AA`. The space is inserted only when the code is complete.\n * `maxLength` is 8 (the masked form). The legacy field is `maxLength` 50,\n * `autoUpperCase`, and has no regex, so other strings (including the\n * domestic abbreviation `E/V`) are rejected here.\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). State is required free text (`maxLength` 100).\n * The legacy field is not a select and its label is `state`, so the shared\n * State label is used.\n *\n * Required rule modules: `rules/validators/gib`, `rules/masks/gib`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-GIB',\n country: 'GIB',\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.GIB',\n required: false,\n inputMode: 'text',\n maxLength: 8,\n formatRef: 'formatPostalCodeGIB',\n unformatRef: 'unformatPostalCodeGIB',\n validation: {\n customValidator: 'validatePostalCodeGIB',\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/GIB.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-GIB",
|
|
4
|
+
country: "GIB",
|
|
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
|
+
// 16 chars fits "00350 2005 2200" (15) and "+350 2005 2200" (14).
|
|
63
|
+
// There is no trunk prefix, so a pasted "(0)" is not a supported form.
|
|
64
|
+
maxLength: 16,
|
|
65
|
+
label: "country-forms.personal-data.phone.label",
|
|
66
|
+
placeholder: "country-forms.personal-data.phone.placeholder.GIB",
|
|
67
|
+
required: true,
|
|
68
|
+
inputMode: "tel",
|
|
69
|
+
formatRef: "formatPhoneGIB",
|
|
70
|
+
unformatRef: "unformatPhoneGIB",
|
|
71
|
+
validation: {
|
|
72
|
+
customValidator: "validatePhoneGIB"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var GIB_default = schema;
|
|
78
|
+
|
|
79
|
+
export { GIB_default as default };
|
|
80
|
+
//# sourceM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rB,KAAA,EAAO,YAAA;AAAA,QACP,QAAA,EAAU,QAAA;AAAA,QACV,KAAA,EAAO;AAAA,OACT;AAAA,MACA,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,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":"GIB-POLFLNJ3.mjs","sourcesContent":["/**\n * Personal-data schema for Gibraltar (GIB).\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 GIB 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. Business fields\n * (`corporateName`, `tradeName`, `corporateDocument`, `businessPhone`) are\n * optional there. This schema follows the library document model: no\n * `document` / `documentType` without a structured identity document. Email\n * is required and validated. `homePhone` is optional there; `phone` is\n * required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `2005 2200` — validated by `validatePhoneGIB`, masked by\n * `formatPhoneGIB`/`unformatPhoneGIB`. 8 digits, no trunk prefix. There is\n * no `front.phone` GIB module. `+350` / `00350` are stripped, and only once.\n * A bare `350` is stripped only at 11 digits. A foreign `+` / `00` prefix\n * (including Spain `+34`, the United Kingdom `+44`, and Portugal `+351`) is\n * rejected. Accepted ranges are the local fixed and mobile blocks in the\n * GRA Numbering Plan (March 2024).\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/gib`,\n * `rules/masks/gib`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-GIB',\n country: 'GIB',\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 \"00350 2005 2200\" (15) and \"+350 2005 2200\" (14).\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.GIB',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneGIB',\n unformatRef: 'unformatPhoneGIB',\n validation: {\n customValidator: 'validatePhoneGIB',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// src/schemas/address/GRC.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-GRC",
|
|
4
|
+
country: "GRC",
|
|
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.GRC",
|
|
12
|
+
required: true,
|
|
13
|
+
inputMode: "numeric",
|
|
14
|
+
maxLength: 5,
|
|
15
|
+
validation: {
|
|
16
|
+
customValidator: "validatePostalCodeGRC"
|
|
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: false,
|
|
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.GRC",
|
|
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 GRC_default = schema;
|
|
77
|
+
|
|
78
|
+
export { GRC_default as default };
|
|
79
|
+
//# sourceMappingURL=GRC-C5VAQV45.mjs.map
|
|
80
|
+
//# sourceMappingURL=GRC-C5VAQV45.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/GRC.ts"],"names":[],"mappings":";AA2BA,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;AAA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AA,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":"GRC-C5VAQV45.mjs","sourcesContent":["/**\n * Address schema for Greece (GRC).\n *\n * Field order: postalCode → street → number → complement → city → state\n * (matches the visible legacy `address-form` GRC fields; omits hidden\n * `country` / `reference` / `neighborhood` and `receiverName`, which are\n * outside this library's address model).\n *\n * Postal code: exactly 5 digits (`\"10682\"`), validated by\n * `validatePostalCodeGRC` as `/^\\d{5}$/` after trim (parity with\n * `address-form` `GRC.ts` `/^([\\d]{5})$/`). A space is rejected (`\"106 82\"`\n * is the geolocation example, not the field regex). No mask. `maxLength`\n * is 5. The field is required.\n *\n * `number` is optional (`maxLength` 750). Street is required. The legacy\n * street field has no max length; this schema caps it at 750, the same cap\n * used for other countries. Complement is optional (`maxLength` 750). The\n * legacy complement label is `addressLine2`. City is required (`maxLength`\n * 100).\n * Subdivision: required free text (`maxLength` 100). The legacy field is not\n * a select. Label is `country-forms.address.state.label.GRC` (Province),\n * matching the legacy `province` label.\n *\n * Required rule modules: `rules/validators/grc`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-GRC',\n country: 'GRC',\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.GRC',\n required: true,\n inputMode: 'numeric',\n maxLength: 5,\n validation: {\n customValidator: 'validatePostalCodeGRC',\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: false,\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.GRC',\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/GRC.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-GRC",
|
|
4
|
+
country: "GRC",
|
|
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 "0030 (0) 2310 722297" (20) and "+30 (0) 2310 722297" (19)
|
|
63
|
+
// before the mask normalizes to "(2310) 722297".
|
|
64
|
+
maxLength: 22,
|
|
65
|
+
label: "country-forms.personal-data.phone.label",
|
|
66
|
+
placeholder: "country-forms.personal-data.phone.placeholder.GRC",
|
|
67
|
+
required: true,
|
|
68
|
+
inputMode: "tel",
|
|
69
|
+
formatRef: "formatPhoneGRC",
|
|
70
|
+
unformatRef: "unformatPhoneGRC",
|
|
71
|
+
validation: {
|
|
72
|
+
customValidator: "validatePhoneGRC"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var GRC_default = schema;
|
|
78
|
+
|
|
79
|
+
export { GRC_default as default };
|
|
80
|
+
//# sourceMappingURL=GRC-G2OYGTNF.mjs.map
|
|
81
|
+
//# sourceMappingURL=GRC-G2OYGTNF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/GRC.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,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,SAAA,EAAW,YAAA;AAAA,MACX,gBAAA,EAAkB;AAAA,QAChB,UAAA,EAAY,wDAAA;AAAA,QACZ,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,UAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,4CAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,qBAAA,EAAuB;AAAA,QACrB,KAAA,EAAO,YAAA;AAAA,QACP,QAAA,EAAU,QAAA;AAAA,QACV,KAAA,EAAO;AAAA,OACT;AAAA,MACA,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,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":"GRC-G2OYGTNF.mjs","sourcesContent":["/**\n * Personal-data schema for Greece (GRC).\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 GRC 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. Business fields\n * (`corporateName`, `tradeName`, `corporateDocument`, `businessPhone`) are\n * optional there. This schema follows the library document model: no\n * `document` / `documentType` without a structured identity document. Email\n * is required and validated. `homePhone` is optional there; `phone` is\n * required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `(2310) 722297` — validated by `validatePhoneGRC`, masked by\n * `formatPhoneGRC`/`unformatPhoneGRC`. 10 digits starting with `2` or `6`\n * (`Phone.validate`, restricted to 10 digits). Destination codes from\n * `front.phone` `GRC.coffee` only group the display; an unlisted prefix\n * (`6912345678`, `2511234567`) stays valid and is shown without parentheses.\n * Country code `30`, optional trunk `0`.\n * `+30` / `0030` are stripped, and only once. A bare `30` is stripped only\n * at 12 digits. A foreign `+` / `00` prefix (including Italy `+39`, Cyprus\n * `+357`, and Bulgaria `+359`) is rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/grc`,\n * `rules/masks/grc`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-GRC',\n country: 'GRC',\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 \"0030 (0) 2310 722297\" (20) and \"+30 (0) 2310 722297\" (19)\n // before the mask normalizes to \"(2310) 722297\".\n maxLength: 22,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.GRC',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneGRC',\n unformatRef: 'unformatPhoneGRC',\n validation: {\n customValidator: 'validatePhoneGRC',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|