@vtex/country-forms 1.41.0 → 1.43.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/LTU-7WPIL34P.js +86 -0
- package/dist/LTU-7WPIL34P.js.map +1 -0
- package/dist/LTU-AHJYVHMI.mjs +84 -0
- package/dist/LTU-AHJYVHMI.mjs.map +1 -0
- package/dist/LTU-LIAP6BF3.mjs +71 -0
- package/dist/LTU-LIAP6BF3.mjs.map +1 -0
- package/dist/LTU-RKEISTKU.js +73 -0
- package/dist/LTU-RKEISTKU.js.map +1 -0
- package/dist/LVA-DQGMIINN.js +87 -0
- package/dist/LVA-DQGMIINN.js.map +1 -0
- package/dist/LVA-JD56KWXG.mjs +85 -0
- package/dist/LVA-JD56KWXG.mjs.map +1 -0
- package/dist/LVA-O3TOWTGM.js +73 -0
- package/dist/LVA-O3TOWTGM.js.map +1 -0
- package/dist/LVA-SDY6YHR2.mjs +71 -0
- package/dist/LVA-SDY6YHR2.mjs.map +1 -0
- package/dist/{ar-SA-3DYCPLI6.mjs → ar-SA-47EXNPL7.mjs} +8 -2
- package/dist/ar-SA-47EXNPL7.mjs.map +1 -0
- package/dist/{ar-SA-T7OWMBLY.js → ar-SA-ISI4QELL.js} +8 -2
- package/dist/ar-SA-ISI4QELL.js.map +1 -0
- package/dist/{bg-BG-F5V66RA2.mjs → bg-BG-F6MFP5DB.mjs} +8 -2
- package/dist/bg-BG-F6MFP5DB.mjs.map +1 -0
- package/dist/{bg-BG-6J3PSSS3.js → bg-BG-VO4AOZ24.js} +8 -2
- package/dist/bg-BG-VO4AOZ24.js.map +1 -0
- package/dist/{ca-ES-X353PUV5.js → ca-ES-M7NQ3MES.js} +8 -2
- package/dist/ca-ES-M7NQ3MES.js.map +1 -0
- package/dist/{ca-ES-SCJBJONE.mjs → ca-ES-SW6CEJJN.mjs} +8 -2
- package/dist/ca-ES-SW6CEJJN.mjs.map +1 -0
- package/dist/chunk-62V5NOF3.js +87 -0
- package/dist/chunk-62V5NOF3.js.map +1 -0
- package/dist/chunk-NQ4VYSJB.mjs +106 -0
- package/dist/chunk-NQ4VYSJB.mjs.map +1 -0
- package/dist/chunk-OAEWMTO2.mjs +81 -0
- package/dist/chunk-OAEWMTO2.mjs.map +1 -0
- package/dist/chunk-XYX3DDFW.js +112 -0
- package/dist/chunk-XYX3DDFW.js.map +1 -0
- package/dist/{cs-CZ-W3ANF3SV.js → cs-CZ-PJK54FAD.js} +8 -2
- package/dist/cs-CZ-PJK54FAD.js.map +1 -0
- package/dist/{cs-CZ-TBZCNSAI.mjs → cs-CZ-YZBDMW2T.mjs} +8 -2
- package/dist/cs-CZ-YZBDMW2T.mjs.map +1 -0
- package/dist/{da-DK-RM2QMBHH.mjs → da-DK-TXPFGQUA.mjs} +8 -2
- package/dist/da-DK-TXPFGQUA.mjs.map +1 -0
- package/dist/{da-DK-6ERHHBKZ.js → da-DK-UBJBO24Z.js} +8 -2
- package/dist/da-DK-UBJBO24Z.js.map +1 -0
- package/dist/{de-DE-QNJTX4M2.mjs → de-DE-66OMXHFB.mjs} +8 -2
- package/dist/de-DE-66OMXHFB.mjs.map +1 -0
- package/dist/{de-DE-FMQCLZ6G.js → de-DE-BHCC6ZDU.js} +8 -2
- package/dist/de-DE-BHCC6ZDU.js.map +1 -0
- package/dist/{el-GR-ND2JTVEV.js → el-GR-R3NSIHZW.js} +8 -2
- package/dist/el-GR-R3NSIHZW.js.map +1 -0
- package/dist/{el-GR-N3VK7OBB.mjs → el-GR-Z3LE4THR.mjs} +8 -2
- package/dist/el-GR-Z3LE4THR.mjs.map +1 -0
- package/dist/{en-US-QHKPC5UD.mjs → en-US-3K7NVDFH.mjs} +8 -2
- package/dist/en-US-3K7NVDFH.mjs.map +1 -0
- package/dist/{en-US-PN2M3Y76.js → en-US-TO7P6DNQ.js} +8 -2
- package/dist/en-US-TO7P6DNQ.js.map +1 -0
- package/dist/{es-MX-VGQ5SJYQ.mjs → es-MX-2H2UZEPL.mjs} +8 -2
- package/dist/es-MX-2H2UZEPL.mjs.map +1 -0
- package/dist/{es-MX-6REIFSJX.js → es-MX-QYZO2OVY.js} +8 -2
- package/dist/es-MX-QYZO2OVY.js.map +1 -0
- package/dist/{fi-FI-TXMWB4IT.js → fi-FI-7AYQ45KY.js} +8 -2
- package/dist/fi-FI-7AYQ45KY.js.map +1 -0
- package/dist/{fi-FI-LJNZXXG3.mjs → fi-FI-I4WZBQ5I.mjs} +8 -2
- package/dist/fi-FI-I4WZBQ5I.mjs.map +1 -0
- package/dist/{fr-FR-4MB46JJX.mjs → fr-FR-S4C732WF.mjs} +8 -2
- package/dist/fr-FR-S4C732WF.mjs.map +1 -0
- package/dist/{fr-FR-DF6JXCW3.js → fr-FR-YBHV3J5O.js} +8 -2
- package/dist/fr-FR-YBHV3J5O.js.map +1 -0
- package/dist/{hu-HU-OPGXHI75.js → hu-HU-7IBYWPPK.js} +8 -2
- package/dist/hu-HU-7IBYWPPK.js.map +1 -0
- package/dist/{hu-HU-EULWGSYG.mjs → hu-HU-7OVQJN2V.mjs} +8 -2
- package/dist/hu-HU-7OVQJN2V.mjs.map +1 -0
- package/dist/{id-ID-IRVBQF5K.mjs → id-ID-VYZPJRWC.mjs} +8 -2
- package/dist/id-ID-VYZPJRWC.mjs.map +1 -0
- package/dist/{id-ID-NSESIJ3N.js → id-ID-WX3SK3EX.js} +8 -2
- package/dist/id-ID-WX3SK3EX.js.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +98 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -60
- package/dist/index.mjs.map +1 -1
- package/dist/{it-IT-LXKZTXSH.js → it-IT-4FCH4AIN.js} +8 -2
- package/dist/it-IT-4FCH4AIN.js.map +1 -0
- package/dist/{it-IT-ATSHDGQY.mjs → it-IT-WOZHLKPE.mjs} +8 -2
- package/dist/it-IT-WOZHLKPE.mjs.map +1 -0
- package/dist/{ja-JP-2XDTTXCU.js → ja-JP-LNM3ZOKA.js} +8 -2
- package/dist/ja-JP-LNM3ZOKA.js.map +1 -0
- package/dist/{ja-JP-IPM2CIB3.mjs → ja-JP-ZVPK7VME.mjs} +8 -2
- package/dist/ja-JP-ZVPK7VME.mjs.map +1 -0
- package/dist/{ko-KR-IO6VLI4Q.js → ko-KR-FEEJDE52.js} +8 -2
- package/dist/ko-KR-FEEJDE52.js.map +1 -0
- package/dist/{ko-KR-5FVYJ7XR.mjs → ko-KR-YSCKUPQX.mjs} +8 -2
- package/dist/ko-KR-YSCKUPQX.mjs.map +1 -0
- package/dist/ltu-2IH5E4CP.js +33 -0
- package/dist/ltu-2IH5E4CP.js.map +1 -0
- package/dist/ltu-2J4IBPSJ.mjs +24 -0
- package/dist/ltu-2J4IBPSJ.mjs.map +1 -0
- package/dist/ltu-3Q2ZWIFX.mjs +30 -0
- package/dist/ltu-3Q2ZWIFX.mjs.map +1 -0
- package/dist/ltu-QBLT2Y4R.js +29 -0
- package/dist/ltu-QBLT2Y4R.js.map +1 -0
- package/dist/lva-5322U5XO.mjs +24 -0
- package/dist/lva-5322U5XO.mjs.map +1 -0
- package/dist/lva-6ZBFRQQO.js +29 -0
- package/dist/lva-6ZBFRQQO.js.map +1 -0
- package/dist/lva-7QY6ZXJM.mjs +30 -0
- package/dist/lva-7QY6ZXJM.mjs.map +1 -0
- package/dist/lva-J52Y5DMB.js +33 -0
- package/dist/lva-J52Y5DMB.js.map +1 -0
- package/dist/{nb-NO-3V47TYPX.mjs → nb-NO-2XRC3IPC.mjs} +8 -2
- package/dist/nb-NO-2XRC3IPC.mjs.map +1 -0
- package/dist/{nb-NO-XKPUZZUY.js → nb-NO-6VTX6GNF.js} +8 -2
- package/dist/nb-NO-6VTX6GNF.js.map +1 -0
- package/dist/{nl-NL-JZHIEEOL.js → nl-NL-42P555J5.js} +8 -2
- package/dist/nl-NL-42P555J5.js.map +1 -0
- package/dist/{nl-NL-NZDPBZVZ.mjs → nl-NL-D274BV5Q.mjs} +8 -2
- package/dist/nl-NL-D274BV5Q.mjs.map +1 -0
- package/dist/{pl-PL-Z43BYW6A.mjs → pl-PL-LFJNI6YV.mjs} +8 -2
- package/dist/pl-PL-LFJNI6YV.mjs.map +1 -0
- package/dist/{pl-PL-C3MCPH2L.js → pl-PL-YAA2YVSB.js} +8 -2
- package/dist/pl-PL-YAA2YVSB.js.map +1 -0
- package/dist/{pt-BR-5SUANU5Y.js → pt-BR-FBNLDMFI.js} +8 -2
- package/dist/pt-BR-FBNLDMFI.js.map +1 -0
- package/dist/{pt-BR-YYURDP5H.mjs → pt-BR-L5QCQNWO.mjs} +8 -2
- package/dist/pt-BR-L5QCQNWO.mjs.map +1 -0
- package/dist/{pt-PT-QHZ74EXZ.mjs → pt-PT-NKUYIIX5.mjs} +8 -2
- package/dist/pt-PT-NKUYIIX5.mjs.map +1 -0
- package/dist/{pt-PT-4JSEXT3B.js → pt-PT-XI3AZ5E7.js} +8 -2
- package/dist/pt-PT-XI3AZ5E7.js.map +1 -0
- package/dist/{ro-RO-YAERULHQ.js → ro-RO-IIMTFORI.js} +8 -2
- package/dist/ro-RO-IIMTFORI.js.map +1 -0
- package/dist/{ro-RO-UFANIJY2.mjs → ro-RO-RC7DZMSI.mjs} +8 -2
- package/dist/ro-RO-RC7DZMSI.mjs.map +1 -0
- package/dist/{ru-RU-QUVD4627.js → ru-RU-BRRYJDYM.js} +8 -2
- package/dist/ru-RU-BRRYJDYM.js.map +1 -0
- package/dist/{ru-RU-UY5H6INW.mjs → ru-RU-FVD2ROTB.mjs} +8 -2
- package/dist/ru-RU-FVD2ROTB.mjs.map +1 -0
- package/dist/{sk-SK-XI76HS4B.mjs → sk-SK-7RVRFHCA.mjs} +8 -2
- package/dist/sk-SK-7RVRFHCA.mjs.map +1 -0
- package/dist/{sk-SK-GQSJ6J27.js → sk-SK-RF7ODFX2.js} +8 -2
- package/dist/sk-SK-RF7ODFX2.js.map +1 -0
- package/dist/{sl-SI-LZPI7M4I.mjs → sl-SI-MOPOD6A7.mjs} +8 -2
- package/dist/sl-SI-MOPOD6A7.mjs.map +1 -0
- package/dist/{sl-SI-UZGBYNZS.js → sl-SI-N2ZASQVP.js} +8 -2
- package/dist/sl-SI-N2ZASQVP.js.map +1 -0
- package/dist/{sv-SE-J43IFX6D.js → sv-SE-3PDIEUAU.js} +8 -2
- package/dist/sv-SE-3PDIEUAU.js.map +1 -0
- package/dist/{sv-SE-QKO2D2GK.mjs → sv-SE-UESXXVJD.mjs} +8 -2
- package/dist/sv-SE-UESXXVJD.mjs.map +1 -0
- package/dist/{th-TH-WEXLGVKL.js → th-TH-FML24MXY.js} +8 -2
- package/dist/th-TH-FML24MXY.js.map +1 -0
- package/dist/{th-TH-B7AQYSMT.mjs → th-TH-PWIN74BV.mjs} +8 -2
- package/dist/th-TH-PWIN74BV.mjs.map +1 -0
- package/dist/{uk-UA-FYHCCGMG.mjs → uk-UA-4ZUN4PFL.mjs} +8 -2
- package/dist/uk-UA-4ZUN4PFL.mjs.map +1 -0
- package/dist/{uk-UA-F5ZP6SJJ.js → uk-UA-QJINQ6LG.js} +8 -2
- package/dist/uk-UA-QJINQ6LG.js.map +1 -0
- package/package.json +1 -1
- package/dist/ar-SA-3DYCPLI6.mjs.map +0 -1
- package/dist/ar-SA-T7OWMBLY.js.map +0 -1
- package/dist/bg-BG-6J3PSSS3.js.map +0 -1
- package/dist/bg-BG-F5V66RA2.mjs.map +0 -1
- package/dist/ca-ES-SCJBJONE.mjs.map +0 -1
- package/dist/ca-ES-X353PUV5.js.map +0 -1
- package/dist/cs-CZ-TBZCNSAI.mjs.map +0 -1
- package/dist/cs-CZ-W3ANF3SV.js.map +0 -1
- package/dist/da-DK-6ERHHBKZ.js.map +0 -1
- package/dist/da-DK-RM2QMBHH.mjs.map +0 -1
- package/dist/de-DE-FMQCLZ6G.js.map +0 -1
- package/dist/de-DE-QNJTX4M2.mjs.map +0 -1
- package/dist/el-GR-N3VK7OBB.mjs.map +0 -1
- package/dist/el-GR-ND2JTVEV.js.map +0 -1
- package/dist/en-US-PN2M3Y76.js.map +0 -1
- package/dist/en-US-QHKPC5UD.mjs.map +0 -1
- package/dist/es-MX-6REIFSJX.js.map +0 -1
- package/dist/es-MX-VGQ5SJYQ.mjs.map +0 -1
- package/dist/fi-FI-LJNZXXG3.mjs.map +0 -1
- package/dist/fi-FI-TXMWB4IT.js.map +0 -1
- package/dist/fr-FR-4MB46JJX.mjs.map +0 -1
- package/dist/fr-FR-DF6JXCW3.js.map +0 -1
- package/dist/hu-HU-EULWGSYG.mjs.map +0 -1
- package/dist/hu-HU-OPGXHI75.js.map +0 -1
- package/dist/id-ID-IRVBQF5K.mjs.map +0 -1
- package/dist/id-ID-NSESIJ3N.js.map +0 -1
- package/dist/it-IT-ATSHDGQY.mjs.map +0 -1
- package/dist/it-IT-LXKZTXSH.js.map +0 -1
- package/dist/ja-JP-2XDTTXCU.js.map +0 -1
- package/dist/ja-JP-IPM2CIB3.mjs.map +0 -1
- package/dist/ko-KR-5FVYJ7XR.mjs.map +0 -1
- package/dist/ko-KR-IO6VLI4Q.js.map +0 -1
- package/dist/nb-NO-3V47TYPX.mjs.map +0 -1
- package/dist/nb-NO-XKPUZZUY.js.map +0 -1
- package/dist/nl-NL-JZHIEEOL.js.map +0 -1
- package/dist/nl-NL-NZDPBZVZ.mjs.map +0 -1
- package/dist/pl-PL-C3MCPH2L.js.map +0 -1
- package/dist/pl-PL-Z43BYW6A.mjs.map +0 -1
- package/dist/pt-BR-5SUANU5Y.js.map +0 -1
- package/dist/pt-BR-YYURDP5H.mjs.map +0 -1
- package/dist/pt-PT-4JSEXT3B.js.map +0 -1
- package/dist/pt-PT-QHZ74EXZ.mjs.map +0 -1
- package/dist/ro-RO-UFANIJY2.mjs.map +0 -1
- package/dist/ro-RO-YAERULHQ.js.map +0 -1
- package/dist/ru-RU-QUVD4627.js.map +0 -1
- package/dist/ru-RU-UY5H6INW.mjs.map +0 -1
- package/dist/sk-SK-GQSJ6J27.js.map +0 -1
- package/dist/sk-SK-XI76HS4B.mjs.map +0 -1
- package/dist/sl-SI-LZPI7M4I.mjs.map +0 -1
- package/dist/sl-SI-UZGBYNZS.js.map +0 -1
- package/dist/sv-SE-J43IFX6D.js.map +0 -1
- package/dist/sv-SE-QKO2D2GK.mjs.map +0 -1
- package/dist/th-TH-B7AQYSMT.mjs.map +0 -1
- package/dist/th-TH-WEXLGVKL.js.map +0 -1
- package/dist/uk-UA-F5ZP6SJJ.js.map +0 -1
- package/dist/uk-UA-FYHCCGMG.mjs.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.43.0] - 2026-11-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- LVA address schema (`address-LVA`). Field order: postalCode → street → complement → city → state, following the visible `address-form` `LVA.ts` fields. Postal code is optional, as in `address-form` (the legacy field has no `required`): 4 digits with an optional `LV-` prefix (`validatePostalCodeLVA`, `/^(LV-)?\d{4}$/i` after trim, the legacy regex `^((L|l)(V|v)-|)\d{4}$`). Masks `formatPostalCodeLVA` / `unformatPostalCodeLVA` only upper-case the code, so a typed `LV-` prefix is kept in the stored value. The legacy mask `AA-9999` is not reproduced: on blur it rewrites a code typed without the prefix (`1050`) into `10-50`, which the legacy regex then rejects. `maxLength` is 8 (the legacy field uses 50): the 7 characters of `LV-1050` plus one for a pasted space, so `LV-10500` is rejected instead of being cut to `LV-1050`. State is required free text (`maxLength` 100) with the shared "State" label, as in the legacy form, so Latvia's municipalities and state cities are not offered as options. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). City is required (`maxLength` 100). The legacy labels `addressLine1` / `addressLine2` map to the shared street and complement labels. Hidden `country`, `reference`, and `neighborhood` are omitted, along with the hidden `number` and `receiverName`. `LVA` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
15
|
+
- LVA personal-data schema (`personal-data-LVA`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no `LVA.js`, so it falls back to the generic default rules with a free-text `document` and no check digit). Adds `validatePhoneLVA` and masks `formatPhoneLVA`/`unformatPhoneLVA` (national display `21 234 567`, grouped like libphonenumber's `LV` format). `front.phone` has no LVA module, so the rules follow the Latvian numbering plan (country code `371`, no trunk prefix, 8-digit national numbers) and libphonenumber's `LV` ranges: mobile is `2` + 7 digits and fixed line is `6` + 7 digits. Toll-free (`80`), shared-cost (`81`), and premium-rate (`90`) ranges are rejected. `+371` / `00371` are stripped once; a bare `371` is stripped only when the remainder is a complete valid number (no valid national number starts with `371`); a leading `0` is rejected because there is no trunk prefix. A foreign `+` / `00` prefix (Lithuania `+370`, Estonia `+372`, Russia `+7`) is rejected; letters and other non-phone characters are rejected (not stripped), and the mask returns such input unchanged. When `+371` / `00371` is followed by another `371` the mask keeps the input on screen so typing a value key by key gives the same result as pasting it. `maxLength` is 22: the widest valid paste (`00 (+371) 21 23 45 67`, 21 characters; the plain `00 (371) 21 23 45 67` has 20) fits, and one more digit fits and is rejected instead of being cut to a different valid number. A `+` before the first digit counts as the international prefix even after `(`, and a `00` after that `+` is not stripped, so `+00 (371) 21 23 45 67` is rejected as a foreign prefix. When the remainder after `+371` / `00371` starts with `0` (`+371 00 371 21 234 567`), the mask keeps the input on screen so the leftover `00` is not read as a new international prefix. `LVA` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
16
|
+
- New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.LVA`, `country-forms.personal-data.phone.placeholder.LVA`, `country-forms.validation.postalCode.LVA`.
|
|
17
|
+
|
|
18
|
+
## [1.42.0] - 2026-11-27
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- LTU address schema (`address-LTU`). Field order: postalCode → street → complement → city → state, following the visible `address-form` `LTU.ts` fields. Postal code is optional, as in `address-form` (the legacy field has no `required`): 5 digits with an optional `LT-` prefix (`validatePostalCodeLTU`, `/^(LT-)?\d{5}$/i` after trim, the legacy regex `^((L|l)(T|t)-|)\d{5}$`). Masks `formatPostalCodeLTU` / `unformatPostalCodeLTU` only upper-case the code (the legacy `autoUpperCase`; the old `AA-99999` mask was removed from `address-form` in 3.40.0), so a typed `LT-` prefix is kept in the stored value. `maxLength` is 9 (the legacy field uses 50): the 8 characters of `LT-01100` plus one for a pasted space, so `LT-011000` is rejected instead of being cut to `LT-01100`. State is required free text (`maxLength` 100) with the shared "State" label, as in the legacy form, so the 10 counties are not offered as options. Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750). City is required (`maxLength` 100). The legacy labels `addressLine1` / `addressLine2` map to the shared street and complement labels. Hidden `country`, `reference`, and `neighborhood` are omitted, along with the hidden `number` and `receiverName`. `LTU` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
|
|
23
|
+
- LTU personal-data schema (`personal-data-LTU`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no `LTU.js`, so it falls back to the generic default rules with a free-text `document` and no check digit). Adds `validatePhoneLTU` and masks `formatPhoneLTU`/`unformatPhoneLTU` (national display `612 34567` mobile, `5 212 3456` Vilnius, `37 123456` Kaunas, grouped like libphonenumber's `LT` formats). `front.phone` has no LTU module, so the rules follow the Lithuanian numbering plan (country code `370`, trunk prefix `8`) and libphonenumber's `LT` ranges: mobile is `6` + 7 digits and fixed line is `31`, `34`, `37`, `38`, `41`, `42`, `44`, `45`, `46`, `52` + 6 digits. Toll-free, premium-rate, shared-cost, personal, and UAN ranges are rejected. `+370` / `00370` are stripped once and one trunk `8` (or `0`, which libphonenumber also reads as a trunk) is removed; a typed trunk stays on screen and none is inserted. A bare `370` is stripped only when the remainder is a complete valid number, because a Kaunas number can itself start with `370`. A foreign `+` / `00` prefix (Latvia `+371`, Estonia `+372`, Poland `+48`) is rejected; letters and other non-phone characters are rejected (not stripped), and the mask returns such input unchanged. While `+370` / `00370` is followed by an incomplete remainder that is still the start of `370`, the mask keeps the input on screen so typing a value key by key gives the same result as pasting it. `maxLength` is 25: the widest valid pastes (`00 (370) (8) 61 23 45 67`, 24 characters) fit, and one more digit fits and is rejected instead of being cut to a different valid number. A `+` before the first digit counts as the international prefix even after `(`. `LTU` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
|
|
24
|
+
- New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.LTU`, `country-forms.personal-data.phone.placeholder.LTU`, `country-forms.validation.postalCode.LTU`.
|
|
25
|
+
|
|
10
26
|
## [1.41.0] - 2026-11-27
|
|
11
27
|
|
|
12
28
|
### Added
|
|
@@ -458,7 +474,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
458
474
|
- `examples/react-minimal/` — React example with country/locale selection, form rendering, validation, and i18n overrides
|
|
459
475
|
|
|
460
476
|
|
|
461
|
-
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.
|
|
477
|
+
[Unreleased]: https://github.com/vtex/country-forms/compare/v1.43.0...HEAD
|
|
478
|
+
[1.43.0]: https://github.com/vtex/country-forms/compare/v1.42.0...v1.43.0
|
|
479
|
+
[1.42.0]: https://github.com/vtex/country-forms/compare/v1.41.0...v1.42.0
|
|
462
480
|
[1.41.0]: https://github.com/vtex/country-forms/compare/v1.40.0...v1.41.0
|
|
463
481
|
[1.40.0]: https://github.com/vtex/country-forms/compare/v1.39.0...v1.40.0
|
|
464
482
|
[1.39.0]: https://github.com/vtex/country-forms/compare/v1.38.0...v1.39.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', 'GUM', 'HND', 'HRV', 'HUN', 'IDN', 'IND', 'IRL', 'IRQ', 'ITA', 'JAM', 'JPN', 'KOR', 'LUX', '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', 'IND', 'IRQ', 'ITA', 'JAM', 'JPN', 'KOR', 'LUX', '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', 'IND', 'IRL', 'IRQ', 'ITA', 'JAM', 'JPN', 'KOR', 'LTU', 'LUX', 'LVA', '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', 'IND', 'IRQ', 'ITA', 'JAM', 'JPN', 'KOR', 'LTU', 'LUX', 'LVA', '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`. |
|
|
@@ -164,7 +164,9 @@ import type {
|
|
|
164
164
|
| Italy | `ITA` | Yes | Yes | CAP, Phone | Phone |
|
|
165
165
|
| Jamaica | `JAM` | Yes | Yes | Postal code, Phone | Phone |
|
|
166
166
|
| Japan | `JPN` | Yes | Yes | Postal code, Phone | Phone |
|
|
167
|
+
| Lithuania | `LTU` | Yes | Yes | Postal code, Phone | Postal code, Phone |
|
|
167
168
|
| Luxembourg | `LUX` | Yes | Yes | Phone | Phone |
|
|
169
|
+
| Latvia | `LVA` | Yes | Yes | Postal code, Phone | Postal code, Phone |
|
|
168
170
|
|
|
169
171
|
For unknown countries, `loadSchema` returns a generic fallback schema with basic address or personal-data fields.
|
|
170
172
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/LTU.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-LTU",
|
|
6
|
+
country: "LTU",
|
|
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
|
+
// 25 chars: the widest valid pastes are 24 characters ("00 (370) (8) 61 23 45 67",
|
|
65
|
+
// "00 (370) (8) 612 34 56 7"), so one more digit fits and is rejected
|
|
66
|
+
// instead of being cut down to a different valid number. The limit is one
|
|
67
|
+
// character of slack, not a guarantee: a 25-character valid value followed
|
|
68
|
+
// by more characters is still cut (JPN, KOR and LUX have the same gap).
|
|
69
|
+
maxLength: 25,
|
|
70
|
+
label: "country-forms.personal-data.phone.label",
|
|
71
|
+
placeholder: "country-forms.personal-data.phone.placeholder.LTU",
|
|
72
|
+
required: true,
|
|
73
|
+
inputMode: "tel",
|
|
74
|
+
formatRef: "formatPhoneLTU",
|
|
75
|
+
unformatRef: "unformatPhoneLTU",
|
|
76
|
+
validation: {
|
|
77
|
+
customValidator: "validatePhoneLTU"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
};
|
|
82
|
+
var LTU_default = schema;
|
|
83
|
+
|
|
84
|
+
module.exports = LTU_default;
|
|
85
|
+
//# sourceMappingURL=LTU-7WPIL34P.js.map
|
|
86
|
+
//# sourceMappingURL=LTU-7WPIL34P.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/LTU.ts"],"names":[],"mappings":";;;AAiCA,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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Aa,kBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB;AACF;AAEJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"LTU-7WPIL34P.js","sourcesContent":["/**\n * Personal-data schema for Lithuania (LTU).\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 `LTU.js`, so it falls back to the generic default\n * rules (required free-text `document`, no check digit). No tax/identity\n * document field is modelled here. Optional gender and birth date are omitted.\n * Business fields (`corporateName`, `tradeName`, `corporateDocument`,\n * `businessPhone`) are optional there. Email is hidden there; here it is\n * required. `homePhone` is optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `612 34567` mobile / `5 212 3456` Vilnius / `37 123456` Kaunas —\n * validated by `validatePhoneLTU`, masked by `formatPhoneLTU`/`unformatPhoneLTU`.\n * There is no `front.phone` LTU module; rules follow the Lithuanian numbering\n * plan (country code `370`, trunk prefix `8`) and libphonenumber's `LT` ranges.\n * Mobile is `6` + 7 digits; fixed line is `31`/`34`/`37`/`38`/`41`/`42`/`44`/\n * `45`/`46`/`52` + 6 digits. `+370` / `00370` are stripped once and one trunk\n * `8` (or `0`) is removed. A bare `370` is stripped only when the remainder is\n * a complete valid number (a Kaunas number can start with `370`). A foreign\n * `+` / `00` prefix (including Latvia `+371`, Estonia `+372`, Poland `+48`) is\n * rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/ltu`,\n * `rules/masks/ltu`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-LTU',\n country: 'LTU',\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 // 25 chars: the widest valid pastes are 24 characters (\"00 (370) (8) 61 23 45 67\",\n // \"00 (370) (8) 612 34 56 7\"), so one more digit fits and is rejected\n // instead of being cut down to a different valid number. The limit is one\n // character of slack, not a guarantee: a 25-character valid value followed\n // by more characters is still cut (JPN, KOR and LUX have the same gap).\n maxLength: 25,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.LTU',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneLTU',\n unformatRef: 'unformatPhoneLTU',\n validation: {\n customValidator: 'validatePhoneLTU',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// src/schemas/personal-data/LTU.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-LTU",
|
|
4
|
+
country: "LTU",
|
|
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
|
+
// 25 chars: the widest valid pastes are 24 characters ("00 (370) (8) 61 23 45 67",
|
|
63
|
+
// "00 (370) (8) 612 34 56 7"), so one more digit fits and is rejected
|
|
64
|
+
// instead of being cut down to a different valid number. The limit is one
|
|
65
|
+
// character of slack, not a guarantee: a 25-character valid value followed
|
|
66
|
+
// by more characters is still cut (JPN, KOR and LUX have the same gap).
|
|
67
|
+
maxLength: 25,
|
|
68
|
+
label: "country-forms.personal-data.phone.label",
|
|
69
|
+
placeholder: "country-forms.personal-data.phone.placeholder.LTU",
|
|
70
|
+
required: true,
|
|
71
|
+
inputMode: "tel",
|
|
72
|
+
formatRef: "formatPhoneLTU",
|
|
73
|
+
unformatRef: "unformatPhoneLTU",
|
|
74
|
+
validation: {
|
|
75
|
+
customValidator: "validatePhoneLTU"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
};
|
|
80
|
+
var LTU_default = schema;
|
|
81
|
+
|
|
82
|
+
export { LTU_default as default };
|
|
83
|
+
//# sourceMappingURL=LTU-AHJYVHMI.mjs.map
|
|
84
|
+
//# sourceMappingURL=LTU-AHJYVHMI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/LTU.ts"],"names":[],"mappings":";AAiCA,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;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,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":"LTU-AHJYVHMI.mjs","sourcesContent":["/**\n * Personal-data schema for Lithuania (LTU).\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 `LTU.js`, so it falls back to the generic default\n * rules (required free-text `document`, no check digit). No tax/identity\n * document field is modelled here. Optional gender and birth date are omitted.\n * Business fields (`corporateName`, `tradeName`, `corporateDocument`,\n * `businessPhone`) are optional there. Email is hidden there; here it is\n * required. `homePhone` is optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `612 34567` mobile / `5 212 3456` Vilnius / `37 123456` Kaunas —\n * validated by `validatePhoneLTU`, masked by `formatPhoneLTU`/`unformatPhoneLTU`.\n * There is no `front.phone` LTU module; rules follow the Lithuanian numbering\n * plan (country code `370`, trunk prefix `8`) and libphonenumber's `LT` ranges.\n * Mobile is `6` + 7 digits; fixed line is `31`/`34`/`37`/`38`/`41`/`42`/`44`/\n * `45`/`46`/`52` + 6 digits. `+370` / `00370` are stripped once and one trunk\n * `8` (or `0`) is removed. A bare `370` is stripped only when the remainder is\n * a complete valid number (a Kaunas number can start with `370`). A foreign\n * `+` / `00` prefix (including Latvia `+371`, Estonia `+372`, Poland `+48`) is\n * rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/ltu`,\n * `rules/masks/ltu`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-LTU',\n country: 'LTU',\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 // 25 chars: the widest valid pastes are 24 characters (\"00 (370) (8) 61 23 45 67\",\n // \"00 (370) (8) 612 34 56 7\"), so one more digit fits and is rejected\n // instead of being cut down to a different valid number. The limit is one\n // character of slack, not a guarantee: a 25-character valid value followed\n // by more characters is still cut (JPN, KOR and LUX have the same gap).\n maxLength: 25,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.LTU',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneLTU',\n unformatRef: 'unformatPhoneLTU',\n validation: {\n customValidator: 'validatePhoneLTU',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/schemas/address/LTU.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "address-LTU",
|
|
4
|
+
country: "LTU",
|
|
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.LTU",
|
|
12
|
+
required: false,
|
|
13
|
+
inputMode: "text",
|
|
14
|
+
maxLength: 9,
|
|
15
|
+
formatRef: "formatPostalCodeLTU",
|
|
16
|
+
unformatRef: "unformatPostalCodeLTU",
|
|
17
|
+
validation: {
|
|
18
|
+
customValidator: "validatePostalCodeLTU"
|
|
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 LTU_default = schema;
|
|
68
|
+
|
|
69
|
+
export { LTU_default as default };
|
|
70
|
+
//# sourceMappingURL=LTU-LIAP6BF3.mjs.map
|
|
71
|
+
//# sourceMappingURL=LTU-LIAP6BF3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/LTU.ts"],"names":[],"mappings":";AAyCA,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,KAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,CAAA;AAAA,MACX,SAAA,EAAW,qBAAA;AAAA,MACX,WAAA,EAAa,uBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,oCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,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":"LTU-LIAP6BF3.mjs","sourcesContent":["/**\n * Address schema for Lithuania (LTU).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` LTU fields; omits hidden\n * `country` / `number` / `reference` / `neighborhood` and `receiverName`,\n * which are outside this library's address model). The legacy `number` is\n * hidden and marked not applicable for geolocation, so the house number is\n * part of the street line, as in GBR and JPN.\n *\n * Postal code: 5 digits (`\"01100\"`), optionally preceded by `LT-`\n * (`\"LT-01100\"`), validated by `validatePostalCodeLTU` (parity with\n * `address-form` `LTU.ts` regex `/^((L|l)(T|t)-|)\\d{5}$/`, so the prefix is\n * accepted in any letter case). The field is optional, as in `address-form`\n * (the legacy field has no `required`), and `postalCodeAPI` is false there.\n * Masks `formatPostalCodeLTU` / `unformatPostalCodeLTU` only upper-case the\n * code, like the legacy `autoUpperCase`; the legacy separator mask\n * (`AA-99999`) was removed in `address-form` 3.40.0 so the prefix stays\n * optional. The stored value keeps the `LT-` prefix when the user typed it.\n * `maxLength` is 9 (the legacy field uses 50): the 8 characters of\n * `\"LT-01100\"` plus one for a space pasted before or after it\n * (`\" LT-01100\"` is valid after trim). A code with one more digit\n * (`\"LT-011000\"`) fits and is rejected by the validator instead of being cut\n * down to the different, valid `\"LT-01100\"`. The limit is one character of\n * slack, not a guarantee: a paste with both surrounding whitespace and an\n * extra digit is still cut (JPN and LUX have the same gap).\n *\n * Subdivision: required free text (`maxLength` 100) with the shared \"State\"\n * label, as in the legacy form. The legacy field is not a select, so the 10\n * counties (apskritys) are not offered as options 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). City is required (`maxLength` 100). The legacy labels\n * `addressLine1` / `addressLine2` map to the shared street and complement\n * labels.\n *\n * Required rule modules: `rules/validators/ltu`, `rules/masks/ltu`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-LTU',\n country: 'LTU',\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.LTU',\n required: false,\n inputMode: 'text',\n maxLength: 9,\n formatRef: 'formatPostalCodeLTU',\n unformatRef: 'unformatPostalCodeLTU',\n validation: {\n customValidator: 'validatePostalCodeLTU',\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,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/address/LTU.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "address-LTU",
|
|
6
|
+
country: "LTU",
|
|
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.LTU",
|
|
14
|
+
required: false,
|
|
15
|
+
inputMode: "text",
|
|
16
|
+
maxLength: 9,
|
|
17
|
+
formatRef: "formatPostalCodeLTU",
|
|
18
|
+
unformatRef: "unformatPostalCodeLTU",
|
|
19
|
+
validation: {
|
|
20
|
+
customValidator: "validatePostalCodeLTU"
|
|
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 LTU_default = schema;
|
|
70
|
+
|
|
71
|
+
module.exports = LTU_default;
|
|
72
|
+
//# sourceMappingURL=LTU-RKEISTKU.js.map
|
|
73
|
+
//# sourceMappingURL=LTU-RKEISTKU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/address/LTU.ts"],"names":[],"mappings":";;;AAyCA,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,KAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,CAAA;AAAA,MACX,SAAA,EAAW,qBAAA;AAAA,MACX,WAAA,EAAa,uBAAA;AAAA,MACb,UAAA,EAAY;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AO,WAAA,GAAQ","file":"LTU-RKEISTKU.js","sourcesContent":["/**\n * Address schema for Lithuania (LTU).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` LTU fields; omits hidden\n * `country` / `number` / `reference` / `neighborhood` and `receiverName`,\n * which are outside this library's address model). The legacy `number` is\n * hidden and marked not applicable for geolocation, so the house number is\n * part of the street line, as in GBR and JPN.\n *\n * Postal code: 5 digits (`\"01100\"`), optionally preceded by `LT-`\n * (`\"LT-01100\"`), validated by `validatePostalCodeLTU` (parity with\n * `address-form` `LTU.ts` regex `/^((L|l)(T|t)-|)\\d{5}$/`, so the prefix is\n * accepted in any letter case). The field is optional, as in `address-form`\n * (the legacy field has no `required`), and `postalCodeAPI` is false there.\n * Masks `formatPostalCodeLTU` / `unformatPostalCodeLTU` only upper-case the\n * code, like the legacy `autoUpperCase`; the legacy separator mask\n * (`AA-99999`) was removed in `address-form` 3.40.0 so the prefix stays\n * optional. The stored value keeps the `LT-` prefix when the user typed it.\n * `maxLength` is 9 (the legacy field uses 50): the 8 characters of\n * `\"LT-01100\"` plus one for a space pasted before or after it\n * (`\" LT-01100\"` is valid after trim). A code with one more digit\n * (`\"LT-011000\"`) fits and is rejected by the validator instead of being cut\n * down to the different, valid `\"LT-01100\"`. The limit is one character of\n * slack, not a guarantee: a paste with both surrounding whitespace and an\n * extra digit is still cut (JPN and LUX have the same gap).\n *\n * Subdivision: required free text (`maxLength` 100) with the shared \"State\"\n * label, as in the legacy form. The legacy field is not a select, so the 10\n * counties (apskritys) are not offered as options 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). City is required (`maxLength` 100). The legacy labels\n * `addressLine1` / `addressLine2` map to the shared street and complement\n * labels.\n *\n * Required rule modules: `rules/validators/ltu`, `rules/masks/ltu`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-LTU',\n country: 'LTU',\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.LTU',\n required: false,\n inputMode: 'text',\n maxLength: 9,\n formatRef: 'formatPostalCodeLTU',\n unformatRef: 'unformatPostalCodeLTU',\n validation: {\n customValidator: 'validatePostalCodeLTU',\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,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/schemas/personal-data/LVA.ts
|
|
4
|
+
var schema = {
|
|
5
|
+
id: "personal-data-LVA",
|
|
6
|
+
country: "LVA",
|
|
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: the widest valid paste is 21 characters ("00 (+371) 21 23 45 67"; the
|
|
65
|
+
// plain "00 (371) 21 23 45 67" has 20), so one more digit fits and is rejected
|
|
66
|
+
// instead of being cut down to a different valid number. "+00 (371) …" is not
|
|
67
|
+
// valid, because a "00" after "+" is not an international prefix. The limit is
|
|
68
|
+
// one character of slack, not a guarantee: a 22-character valid value followed
|
|
69
|
+
// by more characters is still cut (JPN, KOR, LTU and LUX have the same gap).
|
|
70
|
+
maxLength: 22,
|
|
71
|
+
label: "country-forms.personal-data.phone.label",
|
|
72
|
+
placeholder: "country-forms.personal-data.phone.placeholder.LVA",
|
|
73
|
+
required: true,
|
|
74
|
+
inputMode: "tel",
|
|
75
|
+
formatRef: "formatPhoneLVA",
|
|
76
|
+
unformatRef: "unformatPhoneLVA",
|
|
77
|
+
validation: {
|
|
78
|
+
customValidator: "validatePhoneLVA"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
var LVA_default = schema;
|
|
84
|
+
|
|
85
|
+
module.exports = LVA_default;
|
|
86
|
+
//# sourceMappingURL=LVA-DQGMIINN.js.map
|
|
87
|
+
//# sourceMappingURL=LVA-DQGMIINN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/personal-data/LVA.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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EJ,CAAA;AAEA,IAAO,WAAA,GAAQ","file":"LVA-DQGMIINN.js","sourcesContent":["/**\n * Personal-data schema for Latvia (LVA).\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 `LVA.js`, so it falls back to the generic default\n * rules (required free-text `document`, no check digit). No tax/identity\n * document field is modelled here. Optional gender and birth date are omitted.\n * Business fields (`corporateName`, `tradeName`, `corporateDocument`,\n * `businessPhone`) are optional there. Email is hidden there; here it is\n * required. `homePhone` is optional there; `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `21 234 567` mobile / `67 123 456` fixed line — validated by\n * `validatePhoneLVA`, masked by `formatPhoneLVA`/`unformatPhoneLVA`. There is\n * no `front.phone` LVA module; rules follow the Latvian numbering plan\n * (country code `371`, no trunk prefix) and libphonenumber's `LV` ranges.\n * Mobile is `2` + 7 digits and fixed line is `6` + 7 digits. `+371` / `00371`\n * are stripped once; a bare `371` is stripped only when the remainder is a\n * complete valid number (no national number starts with `371`). A foreign `+` /\n * `00` prefix (including Lithuania `+370`, Estonia `+372`, Russia `+7`) is\n * rejected, and so is `+00…`: a `00` after a `+` is not an international prefix.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/lva`,\n * `rules/masks/lva`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-LVA',\n country: 'LVA',\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: the widest valid paste is 21 characters (\"00 (+371) 21 23 45 67\"; the\n // plain \"00 (371) 21 23 45 67\" has 20), so one more digit fits and is rejected\n // instead of being cut down to a different valid number. \"+00 (371) …\" is not\n // valid, because a \"00\" after \"+\" is not an international prefix. The limit is\n // one character of slack, not a guarantee: a 22-character valid value followed\n // by more characters is still cut (JPN, KOR, LTU and LUX have the same gap).\n maxLength: 22,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.LVA',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneLVA',\n unformatRef: 'unformatPhoneLVA',\n validation: {\n customValidator: 'validatePhoneLVA',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/schemas/personal-data/LVA.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
id: "personal-data-LVA",
|
|
4
|
+
country: "LVA",
|
|
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: the widest valid paste is 21 characters ("00 (+371) 21 23 45 67"; the
|
|
63
|
+
// plain "00 (371) 21 23 45 67" has 20), so one more digit fits and is rejected
|
|
64
|
+
// instead of being cut down to a different valid number. "+00 (371) …" is not
|
|
65
|
+
// valid, because a "00" after "+" is not an international prefix. The limit is
|
|
66
|
+
// one character of slack, not a guarantee: a 22-character valid value followed
|
|
67
|
+
// by more characters is still cut (JPN, KOR, LTU and LUX have the same gap).
|
|
68
|
+
maxLength: 22,
|
|
69
|
+
label: "country-forms.personal-data.phone.label",
|
|
70
|
+
placeholder: "country-forms.personal-data.phone.placeholder.LVA",
|
|
71
|
+
required: true,
|
|
72
|
+
inputMode: "tel",
|
|
73
|
+
formatRef: "formatPhoneLVA",
|
|
74
|
+
unformatRef: "unformatPhoneLVA",
|
|
75
|
+
validation: {
|
|
76
|
+
customValidator: "validatePhoneLVA"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
};
|
|
81
|
+
var LVA_default = schema;
|
|
82
|
+
|
|
83
|
+
export { LVA_default as default };
|
|
84
|
+
//# sourceMappingURL=LVA-JD56KWXG.mjs.map
|
|
85
|
+
//# sourceMappingURL=LVA-JD56KWXG.mjs.map
|