@vtex/country-forms 1.39.0 → 1.41.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.
Files changed (221) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/README.md +4 -2
  3. package/dist/JPN-5PHYLP6Q.js +73 -0
  4. package/dist/JPN-5PHYLP6Q.js.map +1 -0
  5. package/dist/JPN-PY4HBIM5.js +85 -0
  6. package/dist/JPN-PY4HBIM5.js.map +1 -0
  7. package/dist/JPN-UEVH66XN.mjs +71 -0
  8. package/dist/JPN-UEVH66XN.mjs.map +1 -0
  9. package/dist/JPN-YFL2HVAY.mjs +83 -0
  10. package/dist/JPN-YFL2HVAY.mjs.map +1 -0
  11. package/dist/LUX-CJAE5BFO.js +83 -0
  12. package/dist/LUX-CJAE5BFO.js.map +1 -0
  13. package/dist/LUX-JGZOGB3E.mjs +81 -0
  14. package/dist/LUX-JGZOGB3E.mjs.map +1 -0
  15. package/dist/LUX-RLCIBEFF.js +78 -0
  16. package/dist/LUX-RLCIBEFF.js.map +1 -0
  17. package/dist/LUX-TZQPABT4.mjs +76 -0
  18. package/dist/LUX-TZQPABT4.mjs.map +1 -0
  19. package/dist/{ar-SA-D6LZNTM6.mjs → ar-SA-3DYCPLI6.mjs} +9 -2
  20. package/dist/ar-SA-3DYCPLI6.mjs.map +1 -0
  21. package/dist/{ar-SA-Q2IRKMIT.js → ar-SA-T7OWMBLY.js} +9 -2
  22. package/dist/ar-SA-T7OWMBLY.js.map +1 -0
  23. package/dist/{bg-BG-N5ZAKKH3.js → bg-BG-6J3PSSS3.js} +9 -2
  24. package/dist/bg-BG-6J3PSSS3.js.map +1 -0
  25. package/dist/{bg-BG-HHMTVL2W.mjs → bg-BG-F5V66RA2.mjs} +9 -2
  26. package/dist/bg-BG-F5V66RA2.mjs.map +1 -0
  27. package/dist/{ca-ES-B27U6AKI.mjs → ca-ES-SCJBJONE.mjs} +9 -2
  28. package/dist/ca-ES-SCJBJONE.mjs.map +1 -0
  29. package/dist/{ca-ES-MQN2HJII.js → ca-ES-X353PUV5.js} +9 -2
  30. package/dist/ca-ES-X353PUV5.js.map +1 -0
  31. package/dist/chunk-3RBNPIO2.js +108 -0
  32. package/dist/chunk-3RBNPIO2.js.map +1 -0
  33. package/dist/chunk-NTECNAPE.mjs +87 -0
  34. package/dist/chunk-NTECNAPE.mjs.map +1 -0
  35. package/dist/chunk-S33WNV2E.mjs +101 -0
  36. package/dist/chunk-S33WNV2E.mjs.map +1 -0
  37. package/dist/chunk-YTHZTXZ7.js +93 -0
  38. package/dist/chunk-YTHZTXZ7.js.map +1 -0
  39. package/dist/{cs-CZ-K6WX7AZG.mjs → cs-CZ-TBZCNSAI.mjs} +9 -2
  40. package/dist/cs-CZ-TBZCNSAI.mjs.map +1 -0
  41. package/dist/{cs-CZ-UNWVQ5D5.js → cs-CZ-W3ANF3SV.js} +9 -2
  42. package/dist/cs-CZ-W3ANF3SV.js.map +1 -0
  43. package/dist/{da-DK-GX2NTHHA.js → da-DK-6ERHHBKZ.js} +9 -2
  44. package/dist/da-DK-6ERHHBKZ.js.map +1 -0
  45. package/dist/{da-DK-XWZ7VHFB.mjs → da-DK-RM2QMBHH.mjs} +9 -2
  46. package/dist/da-DK-RM2QMBHH.mjs.map +1 -0
  47. package/dist/{de-DE-BO67HHNW.js → de-DE-FMQCLZ6G.js} +9 -2
  48. package/dist/de-DE-FMQCLZ6G.js.map +1 -0
  49. package/dist/{de-DE-RWD23GSP.mjs → de-DE-QNJTX4M2.mjs} +9 -2
  50. package/dist/de-DE-QNJTX4M2.mjs.map +1 -0
  51. package/dist/{el-GR-6DMFZEYV.mjs → el-GR-N3VK7OBB.mjs} +9 -2
  52. package/dist/el-GR-N3VK7OBB.mjs.map +1 -0
  53. package/dist/{el-GR-RFT24UXL.js → el-GR-ND2JTVEV.js} +9 -2
  54. package/dist/el-GR-ND2JTVEV.js.map +1 -0
  55. package/dist/{en-US-HSKAWNST.js → en-US-PN2M3Y76.js} +9 -2
  56. package/dist/en-US-PN2M3Y76.js.map +1 -0
  57. package/dist/{en-US-3CAXT5KG.mjs → en-US-QHKPC5UD.mjs} +9 -2
  58. package/dist/en-US-QHKPC5UD.mjs.map +1 -0
  59. package/dist/{es-MX-PTVX2KLV.js → es-MX-6REIFSJX.js} +9 -2
  60. package/dist/es-MX-6REIFSJX.js.map +1 -0
  61. package/dist/{es-MX-IVGVND53.mjs → es-MX-VGQ5SJYQ.mjs} +9 -2
  62. package/dist/es-MX-VGQ5SJYQ.mjs.map +1 -0
  63. package/dist/{fi-FI-MYOCUZXN.mjs → fi-FI-LJNZXXG3.mjs} +9 -2
  64. package/dist/fi-FI-LJNZXXG3.mjs.map +1 -0
  65. package/dist/{fi-FI-PZ4EK3MS.js → fi-FI-TXMWB4IT.js} +9 -2
  66. package/dist/fi-FI-TXMWB4IT.js.map +1 -0
  67. package/dist/{fr-FR-F5SQAPXT.mjs → fr-FR-4MB46JJX.mjs} +9 -2
  68. package/dist/fr-FR-4MB46JJX.mjs.map +1 -0
  69. package/dist/{fr-FR-ZRI26A5X.js → fr-FR-DF6JXCW3.js} +9 -2
  70. package/dist/fr-FR-DF6JXCW3.js.map +1 -0
  71. package/dist/{hu-HU-G2LJ7EVD.mjs → hu-HU-EULWGSYG.mjs} +9 -2
  72. package/dist/hu-HU-EULWGSYG.mjs.map +1 -0
  73. package/dist/{hu-HU-TVO4WG52.js → hu-HU-OPGXHI75.js} +9 -2
  74. package/dist/hu-HU-OPGXHI75.js.map +1 -0
  75. package/dist/{id-ID-YBPJJ72C.mjs → id-ID-IRVBQF5K.mjs} +9 -2
  76. package/dist/id-ID-IRVBQF5K.mjs.map +1 -0
  77. package/dist/{id-ID-ELUOJBLY.js → id-ID-NSESIJ3N.js} +9 -2
  78. package/dist/id-ID-NSESIJ3N.js.map +1 -0
  79. package/dist/index.d.mts +2 -2
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.js +98 -60
  82. package/dist/index.js.map +1 -1
  83. package/dist/index.mjs +98 -60
  84. package/dist/index.mjs.map +1 -1
  85. package/dist/{it-IT-BIKXUFAN.mjs → it-IT-ATSHDGQY.mjs} +9 -2
  86. package/dist/it-IT-ATSHDGQY.mjs.map +1 -0
  87. package/dist/{it-IT-2YIXQNVM.js → it-IT-LXKZTXSH.js} +9 -2
  88. package/dist/it-IT-LXKZTXSH.js.map +1 -0
  89. package/dist/{ja-JP-DGYQGFYF.js → ja-JP-2XDTTXCU.js} +9 -2
  90. package/dist/ja-JP-2XDTTXCU.js.map +1 -0
  91. package/dist/{ja-JP-56WU2TJX.mjs → ja-JP-IPM2CIB3.mjs} +9 -2
  92. package/dist/ja-JP-IPM2CIB3.mjs.map +1 -0
  93. package/dist/jpn-BDG22AKQ.js +33 -0
  94. package/dist/jpn-BDG22AKQ.js.map +1 -0
  95. package/dist/jpn-DPR32ATZ.js +29 -0
  96. package/dist/jpn-DPR32ATZ.js.map +1 -0
  97. package/dist/jpn-OCMU5ZDJ.mjs +28 -0
  98. package/dist/jpn-OCMU5ZDJ.mjs.map +1 -0
  99. package/dist/jpn-P4GULX44.mjs +26 -0
  100. package/dist/jpn-P4GULX44.mjs.map +1 -0
  101. package/dist/{ko-KR-JHA35NGG.mjs → ko-KR-5FVYJ7XR.mjs} +9 -2
  102. package/dist/ko-KR-5FVYJ7XR.mjs.map +1 -0
  103. package/dist/{ko-KR-CC6LXBPY.js → ko-KR-IO6VLI4Q.js} +9 -2
  104. package/dist/ko-KR-IO6VLI4Q.js.map +1 -0
  105. package/dist/lux-3BFDBUCW.mjs +16 -0
  106. package/dist/lux-3BFDBUCW.mjs.map +1 -0
  107. package/dist/lux-4NITUWDW.mjs +30 -0
  108. package/dist/lux-4NITUWDW.mjs.map +1 -0
  109. package/dist/lux-CBEVHERK.js +19 -0
  110. package/dist/lux-CBEVHERK.js.map +1 -0
  111. package/dist/lux-SMZLW36J.js +33 -0
  112. package/dist/lux-SMZLW36J.js.map +1 -0
  113. package/dist/lux-cantons-GSBIYGEI.mjs +22 -0
  114. package/dist/lux-cantons-GSBIYGEI.mjs.map +1 -0
  115. package/dist/lux-cantons-ZHG5E2CU.js +24 -0
  116. package/dist/lux-cantons-ZHG5E2CU.js.map +1 -0
  117. package/dist/{nb-NO-AWMEVGRN.mjs → nb-NO-3V47TYPX.mjs} +9 -2
  118. package/dist/nb-NO-3V47TYPX.mjs.map +1 -0
  119. package/dist/{nb-NO-QC4AQIL5.js → nb-NO-XKPUZZUY.js} +9 -2
  120. package/dist/nb-NO-XKPUZZUY.js.map +1 -0
  121. package/dist/{nl-NL-QOUGYLLO.js → nl-NL-JZHIEEOL.js} +9 -2
  122. package/dist/nl-NL-JZHIEEOL.js.map +1 -0
  123. package/dist/{nl-NL-W2MDW3FU.mjs → nl-NL-NZDPBZVZ.mjs} +9 -2
  124. package/dist/nl-NL-NZDPBZVZ.mjs.map +1 -0
  125. package/dist/{pl-PL-OCFM5ZWW.js → pl-PL-C3MCPH2L.js} +9 -2
  126. package/dist/pl-PL-C3MCPH2L.js.map +1 -0
  127. package/dist/{pl-PL-CSACSNQU.mjs → pl-PL-Z43BYW6A.mjs} +9 -2
  128. package/dist/pl-PL-Z43BYW6A.mjs.map +1 -0
  129. package/dist/{pt-BR-PMGF55FE.js → pt-BR-5SUANU5Y.js} +9 -2
  130. package/dist/pt-BR-5SUANU5Y.js.map +1 -0
  131. package/dist/{pt-BR-6HSAFARC.mjs → pt-BR-YYURDP5H.mjs} +9 -2
  132. package/dist/pt-BR-YYURDP5H.mjs.map +1 -0
  133. package/dist/{pt-PT-OX45OTGX.js → pt-PT-4JSEXT3B.js} +9 -2
  134. package/dist/pt-PT-4JSEXT3B.js.map +1 -0
  135. package/dist/{pt-PT-IJ7FRKDI.mjs → pt-PT-QHZ74EXZ.mjs} +9 -2
  136. package/dist/pt-PT-QHZ74EXZ.mjs.map +1 -0
  137. package/dist/{ro-RO-DWURBTJW.mjs → ro-RO-UFANIJY2.mjs} +9 -2
  138. package/dist/ro-RO-UFANIJY2.mjs.map +1 -0
  139. package/dist/{ro-RO-4GSBAIN7.js → ro-RO-YAERULHQ.js} +9 -2
  140. package/dist/ro-RO-YAERULHQ.js.map +1 -0
  141. package/dist/{ru-RU-VCT77JFK.js → ru-RU-QUVD4627.js} +9 -2
  142. package/dist/ru-RU-QUVD4627.js.map +1 -0
  143. package/dist/{ru-RU-OR5QV433.mjs → ru-RU-UY5H6INW.mjs} +9 -2
  144. package/dist/ru-RU-UY5H6INW.mjs.map +1 -0
  145. package/dist/{sk-SK-ASARP7XS.js → sk-SK-GQSJ6J27.js} +9 -2
  146. package/dist/sk-SK-GQSJ6J27.js.map +1 -0
  147. package/dist/{sk-SK-GPOXDXEY.mjs → sk-SK-XI76HS4B.mjs} +9 -2
  148. package/dist/sk-SK-XI76HS4B.mjs.map +1 -0
  149. package/dist/{sl-SI-SAEAMBFD.mjs → sl-SI-LZPI7M4I.mjs} +9 -2
  150. package/dist/sl-SI-LZPI7M4I.mjs.map +1 -0
  151. package/dist/{sl-SI-QZYFL4ZL.js → sl-SI-UZGBYNZS.js} +9 -2
  152. package/dist/sl-SI-UZGBYNZS.js.map +1 -0
  153. package/dist/{sv-SE-K2JAKBUB.js → sv-SE-J43IFX6D.js} +9 -2
  154. package/dist/sv-SE-J43IFX6D.js.map +1 -0
  155. package/dist/{sv-SE-FVTLNXSM.mjs → sv-SE-QKO2D2GK.mjs} +9 -2
  156. package/dist/sv-SE-QKO2D2GK.mjs.map +1 -0
  157. package/dist/{th-TH-N3BAAI6Q.mjs → th-TH-B7AQYSMT.mjs} +9 -2
  158. package/dist/th-TH-B7AQYSMT.mjs.map +1 -0
  159. package/dist/{th-TH-CW357JIJ.js → th-TH-WEXLGVKL.js} +9 -2
  160. package/dist/th-TH-WEXLGVKL.js.map +1 -0
  161. package/dist/{uk-UA-JNKABMTQ.js → uk-UA-F5ZP6SJJ.js} +9 -2
  162. package/dist/uk-UA-F5ZP6SJJ.js.map +1 -0
  163. package/dist/{uk-UA-UCL2CSTG.mjs → uk-UA-FYHCCGMG.mjs} +9 -2
  164. package/dist/uk-UA-FYHCCGMG.mjs.map +1 -0
  165. package/package.json +1 -1
  166. package/dist/ar-SA-D6LZNTM6.mjs.map +0 -1
  167. package/dist/ar-SA-Q2IRKMIT.js.map +0 -1
  168. package/dist/bg-BG-HHMTVL2W.mjs.map +0 -1
  169. package/dist/bg-BG-N5ZAKKH3.js.map +0 -1
  170. package/dist/ca-ES-B27U6AKI.mjs.map +0 -1
  171. package/dist/ca-ES-MQN2HJII.js.map +0 -1
  172. package/dist/cs-CZ-K6WX7AZG.mjs.map +0 -1
  173. package/dist/cs-CZ-UNWVQ5D5.js.map +0 -1
  174. package/dist/da-DK-GX2NTHHA.js.map +0 -1
  175. package/dist/da-DK-XWZ7VHFB.mjs.map +0 -1
  176. package/dist/de-DE-BO67HHNW.js.map +0 -1
  177. package/dist/de-DE-RWD23GSP.mjs.map +0 -1
  178. package/dist/el-GR-6DMFZEYV.mjs.map +0 -1
  179. package/dist/el-GR-RFT24UXL.js.map +0 -1
  180. package/dist/en-US-3CAXT5KG.mjs.map +0 -1
  181. package/dist/en-US-HSKAWNST.js.map +0 -1
  182. package/dist/es-MX-IVGVND53.mjs.map +0 -1
  183. package/dist/es-MX-PTVX2KLV.js.map +0 -1
  184. package/dist/fi-FI-MYOCUZXN.mjs.map +0 -1
  185. package/dist/fi-FI-PZ4EK3MS.js.map +0 -1
  186. package/dist/fr-FR-F5SQAPXT.mjs.map +0 -1
  187. package/dist/fr-FR-ZRI26A5X.js.map +0 -1
  188. package/dist/hu-HU-G2LJ7EVD.mjs.map +0 -1
  189. package/dist/hu-HU-TVO4WG52.js.map +0 -1
  190. package/dist/id-ID-ELUOJBLY.js.map +0 -1
  191. package/dist/id-ID-YBPJJ72C.mjs.map +0 -1
  192. package/dist/it-IT-2YIXQNVM.js.map +0 -1
  193. package/dist/it-IT-BIKXUFAN.mjs.map +0 -1
  194. package/dist/ja-JP-56WU2TJX.mjs.map +0 -1
  195. package/dist/ja-JP-DGYQGFYF.js.map +0 -1
  196. package/dist/ko-KR-CC6LXBPY.js.map +0 -1
  197. package/dist/ko-KR-JHA35NGG.mjs.map +0 -1
  198. package/dist/nb-NO-AWMEVGRN.mjs.map +0 -1
  199. package/dist/nb-NO-QC4AQIL5.js.map +0 -1
  200. package/dist/nl-NL-QOUGYLLO.js.map +0 -1
  201. package/dist/nl-NL-W2MDW3FU.mjs.map +0 -1
  202. package/dist/pl-PL-CSACSNQU.mjs.map +0 -1
  203. package/dist/pl-PL-OCFM5ZWW.js.map +0 -1
  204. package/dist/pt-BR-6HSAFARC.mjs.map +0 -1
  205. package/dist/pt-BR-PMGF55FE.js.map +0 -1
  206. package/dist/pt-PT-IJ7FRKDI.mjs.map +0 -1
  207. package/dist/pt-PT-OX45OTGX.js.map +0 -1
  208. package/dist/ro-RO-4GSBAIN7.js.map +0 -1
  209. package/dist/ro-RO-DWURBTJW.mjs.map +0 -1
  210. package/dist/ru-RU-OR5QV433.mjs.map +0 -1
  211. package/dist/ru-RU-VCT77JFK.js.map +0 -1
  212. package/dist/sk-SK-ASARP7XS.js.map +0 -1
  213. package/dist/sk-SK-GPOXDXEY.mjs.map +0 -1
  214. package/dist/sl-SI-QZYFL4ZL.js.map +0 -1
  215. package/dist/sl-SI-SAEAMBFD.mjs.map +0 -1
  216. package/dist/sv-SE-FVTLNXSM.mjs.map +0 -1
  217. package/dist/sv-SE-K2JAKBUB.js.map +0 -1
  218. package/dist/th-TH-CW357JIJ.js.map +0 -1
  219. package/dist/th-TH-N3BAAI6Q.mjs.map +0 -1
  220. package/dist/uk-UA-JNKABMTQ.js.map +0 -1
  221. package/dist/uk-UA-UCL2CSTG.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.41.0] - 2026-11-27
11
+
12
+ ### Added
13
+
14
+ - LUX address schema (`address-LUX`). Field order: postalCode → street → number → complement → city → state, following the visible `address-form` `LUX.ts` fields. Postal code is the required 4-digit code (`validatePostalCodeLUX`, `^\d{4}$`, no mask, `maxLength` 5 so `16100` is rejected instead of being cut to `1610`; the legacy mask `9999` adds no separator). State is a required select (`LUX.cantons`, the 12 cantons, stored as the two-letter code `address-form` already uses, e.g. `LU`, `ES`) with the new label `country-forms.address.state.label.LUX` ("Canton"). Street is required (`maxLength` 750; the legacy field has no max). Number is required (`maxLength` 750). Complement is optional (`maxLength` 750); the legacy label `floorAndLetter` maps to the shared complement label. City is required (`maxLength` 100). Hidden `country`, `reference`, and `neighborhood` are omitted, along with `receiverName`. `LUX` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
15
+ - LUX personal-data schema (`personal-data-LUX`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no `LUX.js`, so it falls back to the generic default rules with a free-text `document` and no check digit). Adds `validatePhoneLUX` and masks `formatPhoneLUX`/`unformatPhoneLUX` (national display `621 123 456` mobile / `26 12 34 56` fixed line). `front.phone` has no LUX module, so the rules follow the Luxembourg numbering plan (country code `352`, no trunk prefix) and libphonenumber's `LU` ranges. Mobile is 9 digits in the allocated `6x1` ranges (`621`, `628`, `651`, `655`, `656`, `658`, `661`, `668`, `671`, `678`, `679`, `681`, `691`, `692`, `698`). Fixed line is 6–11 digits in the allocated geographic/business series (the ITU plan allows 4–11; 4–5 digit fragments are not accepted). `+352` / `00352` are stripped once; a bare `352` is stripped only when the remainder is a complete valid number (no valid national number starts with `352`); a foreign `+` / `00` prefix (Belgium `+32`, France `+33`, Germany `+49`) is rejected; a leading `0` is rejected because there is no trunk prefix; letters and other non-phone characters are rejected (not stripped), and the mask returns such input unchanged. When `+352` / `00352` is followed by another `352` the mask keeps the input on screen so it never turns a rejected value into an accepted one, and typing a value key by key gives the same result as pasting it (`+352 352 26 12 34` is rejected both ways). `maxLength` is 24, so `00352 26 12 34 56789` and `(+352) 26 12 34 56` are not truncated. A `+` before the first digit counts as the international prefix even after `(` (`(+32) 470 12 34 56` is foreign). `LUX` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
16
+ - New i18n keys in all locale bundles: `country-forms.address.state.label.LUX`, `country-forms.address.postalCode.placeholder.LUX`, `country-forms.personal-data.phone.placeholder.LUX`, `country-forms.validation.postalCode.LUX`.
17
+
18
+ ## [1.40.0] - 2026-11-27
19
+
20
+ ### Added
21
+
22
+ - JPN address schema (`address-JPN`). Field order: postalCode → street → complement → city → state, following the visible `address-form` `JPN.ts` fields. Postal code is required, 7 digits with an optional hyphen after the third (`validatePostalCodeJPN`, `/^\d{3}-?\d{4}$/` after trim, the legacy regex `^([\d]{3})\-?([\d]{4})$`). Unlike the legacy regex, full-width digits and IME hyphens (`100-0001`) are read as ASCII by the validator and the masks; circled, superscript, and other-script digits are still rejected. Masks `formatPostalCodeJPN` / `unformatPostalCodeJPN` insert the hyphen only when 7 digits are present (the legacy mask is `"999-9999"`) and store the 7 digits; a typed hyphen is dropped until the code is complete, and input with letters or a hyphen in another position is left unchanged so the validator still rejects it. `maxLength` is 9 (the legacy field uses 50): the 8 characters of `100-0001` plus one for a pasted space, so an over-long code such as `100-00012` is rejected instead of being cut down to a different valid code. State is required free text (`maxLength` 100) with the shared "State" label, as in the legacy form, so the 47 prefectures 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` (default `"N/A"`) and `receiverName`. `JPN` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
23
+ - JPN personal-data schema (`personal-data-JPN`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` has no JPN rules, and its generic default document is free text with no check digit or mask). Adds `validatePhoneJPN` and masks `formatPhoneJPN`/`unformatPhoneJPN` (national display `090 1234 5678`, `03 1234 5678`, `052 123 4567`). `front.phone` has no Japanese module, so the numbering plan comes from the public plan for Japan and libphonenumber's JP ranges: mobile `70` / `80` / `90` and IP `50` numbers (10 digits, third digit `1`–`9`), and fixed lines (9 digits starting with an assigned prefix from libphonenumber's JP `fixedLine` pattern). Toll-free `0120` / `0800`, navigation dial `0570`, premium `0990`, and the non-geographic `0170` / `0171` / `0180` / `0181` ranges are rejected (none is in the `fixedLine` pattern). Tokyo (`3`) and Osaka (`6`) are shown with a 1-digit area code; other fixed lines are grouped 3 + 3 + 4 because area codes run from 2 to 5 digits, so the grouping does not claim an area code. `+81` / `0081` are stripped once and one trunk `0` is removed (shown again on a complete number). No national number starts with `81`, so a bare `81…` is read as the country code when a valid number follows it. A foreign `+` / `00` prefix is rejected, and when a stripped `+81` / `0081` leaves a remainder that is `8` or starts with `81` or `0` the mask keeps the original input on screen so it never turns a rejected value into an accepted one, and typing a value key by key gives the same result as pasting it (`+352 352 26 12 34` is rejected both ways). Input is read the same way by the mask and the validator: NFKC turns full-width digits and `+` into ASCII, and also maps superscript, mathematical, and circled digits (`⁰⁹⁰`, `①`) to the digit they show; whitespace, invisible marks and typographic separators (including the IME hyphen `ー`) are ignored; letters and any other character are rejected, as is a character NFKC expands to several (`㈱`, `⑩`), and the mask returns such a value unchanged. A `+` before the first digit is the international prefix even after `(` or `-`. `maxLength` is 25, so `0081 (0) 90 - 1234 - 5678` is not truncated. `JPN` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
24
+ - New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.JPN`, `country-forms.personal-data.phone.placeholder.JPN`, `country-forms.validation.postalCode.JPN`.
25
+
10
26
  ## [1.39.0] - 2026-11-26
11
27
 
12
28
  ### Added
@@ -20,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
36
  ### Added
21
37
 
22
38
  - KOR address schema (`address-KOR`). Field order: postalCode → street → complement → city → state, following the visible `address-form` `KOR.ts` fields. Postal code is required, 5 digits (`validatePostalCodeKOR`, `^\d{5}$` after trim, no mask, `maxLength` 5; the legacy field uses 50 and mask `"99999"`, which adds no separator). State is required free text (`maxLength` 100) with the shared "State" label, as in the legacy form (the USA states once offered for South Korea were removed upstream). Street is required (`maxLength` 750; the legacy field has no max). Complement is optional (`maxLength` 750); the legacy labels `addressLine1` / `addressLine2` map to the shared street and complement labels. City is required (`maxLength` 100). Hidden `country`, `reference`, and `neighborhood` are omitted, along with the hidden `number` (default `"N/A"`) and `receiverName`. `KOR` is now part of `SUPPORTED_ADDRESS_COUNTRIES`.
23
- - KOR personal-data schema (`personal-data-KOR`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` `KOR.js` has a required free-text `document` with no check digit or mask). Adds `validatePhoneKOR` and masks `formatPhoneKOR`/`unformatPhoneKOR` (national display `010 1234 5678`, `02 1234 5678`, `031 123 4567`), based on `front.phone` `KOR.coffee` (country code `82`, optional trunk `0`, 17 area codes, `splitNumber` 3 + 4 / 4 + 4). `front.phone` `Phone.validate` only accepts `0` + 5–9 digits (so `0000000000` and `039 3323333` pass, while every 11-digit number such as `010 1234 5678` fails), and its area-code list has no mobile or `070` numbers; this schema accepts Seoul `2` and `31`–`33`, `41`–`44`, `51`–`55`, `61`–`64` with a 7- or 8-digit subscriber that does not start with `0`, mobile `10` / `11` / `16`–`19` + 7 or 8 digits (the subscriber may start with `0`, as in libphonenumber's KR ranges), and `70` + 8 digits. Toll-free `080`, premium `060`, personal `050`, and `15xx` numbers are rejected. `+82` / `0082` are stripped once and one trunk `0` is removed (shown again on a complete number). No national number starts with `8`, so a bare `82…` is read as the country code when a valid number follows it. A foreign `+` / `00` prefix is rejected, and when a stripped `+82` / `0082` leaves a remainder that starts with `8` or `0` (`+82 82 10…`) the mask keeps the original input on screen so it never turns a rejected value into an accepted one. Input is read the same way by the mask and the validator: NFKC turns full-width digits and `+` into ASCII; whitespace, invisible marks (RTL mark, zero-width space) and typographic separators are ignored; letters and any other character (other-script digits, Hangul, `x`, `!`) are rejected, as is a character NFKC expands to several (`㈜`, `⑩`) — `front.phone` strips letters before testing — and the mask returns such a value unchanged instead of dropping those characters. A `+` before the first digit is the international prefix even after `(` or `-` (`(+1) 1 234 5678` is foreign). `maxLength` is 25, so `0082 (0) 31 - 1234 - 5678` is not truncated. `KOR` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
39
+ - KOR personal-data schema (`personal-data-KOR`). `personType` toggles individual/business visibility for `lastName`. No tax/identity document field (`profile-form` `KOR.js` has a required free-text `document` with no check digit or mask). Adds `validatePhoneKOR` and masks `formatPhoneKOR`/`unformatPhoneKOR` (national display `010 1234 5678`, `02 1234 5678`, `031 123 4567`), based on `front.phone` `KOR.coffee` (country code `82`, optional trunk `0`, 17 area codes, `splitNumber` 3 + 4 / 4 + 4). `front.phone` `Phone.validate` only accepts `0` + 5–9 digits (so `0000000000` and `039 3323333` pass, while every 11-digit number such as `010 1234 5678` fails), and its area-code list has no mobile or `070` numbers; this schema accepts Seoul `2` and `31`–`33`, `41`–`44`, `51`–`55`, `61`–`64` with a 7- or 8-digit subscriber that does not start with `0`, mobile `10` / `11` / `16`–`19` + 7 or 8 digits (the subscriber may start with `0`, as in libphonenumber's KR ranges), and `70` + 8 digits. Toll-free `080`, premium `060`, personal `050`, and `15xx` numbers are rejected. `+82` / `0082` are stripped once and one trunk `0` is removed (shown again on a complete number). No national number starts with `8`, so a bare `82…` is read as the country code when a valid number follows it. A foreign `+` / `00` prefix is rejected, and when a stripped `+82` / `0082` leaves a remainder that starts with `8` or `0` (`+82 82 10…`) the mask keeps the original input on screen so it never turns a rejected value into an accepted one, and typing a value key by key gives the same result as pasting it (`+352 352 26 12 34` is rejected both ways). Input is read the same way by the mask and the validator: NFKC turns full-width digits and `+` into ASCII; whitespace, invisible marks (RTL mark, zero-width space) and typographic separators are ignored; letters and any other character (other-script digits, Hangul, `x`, `!`) are rejected, as is a character NFKC expands to several (`㈜`, `⑩`) — `front.phone` strips letters before testing — and the mask returns such a value unchanged instead of dropping those characters. A `+` before the first digit is the international prefix even after `(` or `-` (`(+1) 1 234 5678` is foreign). `maxLength` is 25, so `0082 (0) 31 - 1234 - 5678` is not truncated. `KOR` is now part of `SUPPORTED_PERSONAL_DATA_COUNTRIES`.
24
40
  - New i18n keys in all locale bundles: `country-forms.address.postalCode.placeholder.KOR`, `country-forms.personal-data.phone.placeholder.KOR`, `country-forms.validation.postalCode.KOR`.
25
41
 
26
42
  ## [1.37.0] - 2026-11-26
@@ -442,7 +458,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
442
458
  - `examples/react-minimal/` — React example with country/locale selection, form rendering, validation, and i18n overrides
443
459
 
444
460
 
445
- [Unreleased]: https://github.com/vtex/country-forms/compare/v1.39.0...HEAD
461
+ [Unreleased]: https://github.com/vtex/country-forms/compare/v1.41.0...HEAD
462
+ [1.41.0]: https://github.com/vtex/country-forms/compare/v1.40.0...v1.41.0
463
+ [1.40.0]: https://github.com/vtex/country-forms/compare/v1.39.0...v1.40.0
446
464
  [1.39.0]: https://github.com/vtex/country-forms/compare/v1.38.0...v1.39.0
447
465
  [1.38.0]: https://github.com/vtex/country-forms/compare/v1.37.0...v1.38.0
448
466
  [1.37.0]: https://github.com/vtex/country-forms/compare/v1.36.0...v1.37.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', 'KOR', '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', 'KOR', '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', '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']`). |
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`. |
@@ -163,6 +163,8 @@ import type {
163
163
  | Ireland | `IRL` | Yes | — | Eircode | Eircode |
164
164
  | Italy | `ITA` | Yes | Yes | CAP, Phone | Phone |
165
165
  | Jamaica | `JAM` | Yes | Yes | Postal code, Phone | Phone |
166
+ | Japan | `JPN` | Yes | Yes | Postal code, Phone | Phone |
167
+ | Luxembourg | `LUX` | Yes | Yes | Phone | Phone |
166
168
 
167
169
  For unknown countries, `loadSchema` returns a generic fallback schema with basic address or personal-data fields.
168
170
 
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ // src/schemas/address/JPN.ts
4
+ var schema = {
5
+ id: "address-JPN",
6
+ country: "JPN",
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.JPN",
14
+ required: true,
15
+ inputMode: "numeric",
16
+ maxLength: 9,
17
+ formatRef: "formatPostalCodeJPN",
18
+ unformatRef: "unformatPostalCodeJPN",
19
+ validation: {
20
+ customValidator: "validatePostalCodeJPN"
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 JPN_default = schema;
70
+
71
+ module.exports = JPN_default;
72
+ //# sourceMappingURL=JPN-5PHYLP6Q.js.map
73
+ //# sourceMappingURL=JPN-5PHYLP6Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/address/JPN.ts"],"names":[],"mappings":";;;AAoCA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,aAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,SAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,wCAAA;AAAA,MACP,WAAA,EAAa,kDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,SAAA;AAAA,MACX,SAAA,EAAW,CAAA;AAAA,MACX,SAAA,EAAW,qBAAA;AAAA,MACX,WAAA,EAAa,uBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,oCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,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":"JPN-5PHYLP6Q.js","sourcesContent":["/**\n * Address schema for Japan (JPN).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` JPN fields; omits hidden\n * `country` / `reference` / `neighborhood`, the hidden `number` (default\n * `\"N/A\"`), and `receiverName`, which are outside this library's address\n * model).\n *\n * Postal code: required 7 digits with a hyphen after the third (`\"100-0001\"`).\n * Validated by `validatePostalCodeJPN` as `/^\\d{3}-?\\d{4}$/` after trim (the\n * legacy regex `^([\\d]{3})\\-?([\\d]{4})$`), so `\"100-0001\"` and `\"1000001\"`\n * both pass; a hyphen in any other position is rejected. Unlike the legacy\n * regex, full-width digits and IME hyphens (`\"100-0001\"`) are read as\n * ASCII. Mask `formatPostalCodeJPN` / `unformatPostalCodeJPN` inserts the hyphen\n * only when 7 digits are present (the legacy mask is `\"999-9999\"`); the stored\n * value is the 7 digits.\n * `maxLength` is 9: the 8 characters of `\"100-0001\"` plus one for a space\n * pasted before or after it (`\" 100-0001\"` is valid after trim). A code with\n * one more character (`\"100-00012\"`) fits and is rejected by the validator\n * instead of being cut down to the different, valid `\"100-0001\"`. The legacy\n * field has `maxLength` 50. `postalCodeAPI` is false in the legacy rules.\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 47\n * prefectures are not offered as options here.\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/jpn`, `rules/masks/jpn`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-JPN',\n country: 'JPN',\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.JPN',\n required: true,\n inputMode: 'numeric',\n maxLength: 9,\n formatRef: 'formatPostalCodeJPN',\n unformatRef: 'unformatPostalCodeJPN',\n validation: {\n customValidator: 'validatePostalCodeJPN',\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,85 @@
1
+ 'use strict';
2
+
3
+ // src/schemas/personal-data/JPN.ts
4
+ var schema = {
5
+ id: "personal-data-JPN",
6
+ country: "JPN",
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 fits the longest common paste, "0081 (0) 90 - 1234 - 5678"
65
+ // (25), so it is not cut down into a different valid number. Spaced
66
+ // hyphens and a spaced "(0)" are the widest formats seen; a value longer
67
+ // than that is not a number anyone would paste.
68
+ maxLength: 25,
69
+ label: "country-forms.personal-data.phone.label",
70
+ placeholder: "country-forms.personal-data.phone.placeholder.JPN",
71
+ required: true,
72
+ inputMode: "tel",
73
+ formatRef: "formatPhoneJPN",
74
+ unformatRef: "unformatPhoneJPN",
75
+ validation: {
76
+ customValidator: "validatePhoneJPN"
77
+ }
78
+ }
79
+ ]
80
+ };
81
+ var JPN_default = schema;
82
+
83
+ module.exports = JPN_default;
84
+ //# sourceMappingURL=JPN-PY4HBIM5.js.map
85
+ //# sourceMappingURL=JPN-PY4HBIM5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/personal-data/JPN.ts"],"names":[],"mappings":";;;AAuCA,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;AAAA;AAAA,MAKN,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":"JPN-PY4HBIM5.js","sourcesContent":["/**\n * Personal-data schema for Japan (JPN).\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 JPN rules (there is no `JPN.js`), so it falls back to\n * the generic default: a required free-text `document` (max 50, no check\n * digit, no mask), a hidden email, optional free-text `homePhone`, gender, and\n * birth date, plus optional business fields. This schema follows the library\n * document model: no `document` / `documentType` when there is no structured\n * identity document. Email is required here. `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `090 1234 5678` — validated by `validatePhoneJPN`, masked by\n * `formatPhoneJPN`/`unformatPhoneJPN`. `front.phone` has no Japanese module\n * (and so no `profile-form` phone rules either), so the numbering plan comes\n * from the public plan for Japan (country code `81`, trunk `0`): mobile\n * `70` / `80` / `90` and IP `50` numbers (10 digits), and fixed lines\n * (9 digits starting with an assigned prefix from libphonenumber's JP\n * `fixedLine` pattern). Toll-free `0120` / `0800`, `0570`, `0990`, and `0170` /\n * `0171` / `0180` / `0181` are rejected. Input is NFKC-normalized (full-width\n * digits work, and so do superscript, mathematical, and circled digits, which\n * become the digit they show); letters and other unreadable characters are\n * rejected, and the mask leaves them untouched. Display is `090 1234 5678`, `03 1234 5678` (Tokyo,\n * Osaka), and `052 123 4567` (other fixed lines, whose area codes vary from 2\n * to 5 digits). `+81` / `0081` are stripped once, and one trunk `0` is removed\n * and shown again on a complete number. A bare `81` is read as the country\n * code when a valid number follows it. A foreign `+` / `00` prefix is\n * rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/jpn`,\n * `rules/masks/jpn`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-JPN',\n country: 'JPN',\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 fits the longest common paste, \"0081 (0) 90 - 1234 - 5678\"\n // (25), so it is not cut down into a different valid number. Spaced\n // hyphens and a spaced \"(0)\" are the widest formats seen; a value longer\n // than that is not a number anyone would paste.\n maxLength: 25,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.JPN',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneJPN',\n unformatRef: 'unformatPhoneJPN',\n validation: {\n customValidator: 'validatePhoneJPN',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
@@ -0,0 +1,71 @@
1
+ // src/schemas/address/JPN.ts
2
+ var schema = {
3
+ id: "address-JPN",
4
+ country: "JPN",
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.JPN",
12
+ required: true,
13
+ inputMode: "numeric",
14
+ maxLength: 9,
15
+ formatRef: "formatPostalCodeJPN",
16
+ unformatRef: "unformatPostalCodeJPN",
17
+ validation: {
18
+ customValidator: "validatePostalCodeJPN"
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 JPN_default = schema;
68
+
69
+ export { JPN_default as default };
70
+ //# sourceMappingURL=JPN-UEVH66XN.mjs.map
71
+ //# sourceMappingURL=JPN-UEVH66XN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/address/JPN.ts"],"names":[],"mappings":";AAoCA,IAAM,MAAA,GAAS;AAAA,EACb,EAAA,EAAI,aAAA;AAAA,EACJ,OAAA,EAAS,KAAA;AAAA,EACT,QAAA,EAAU,SAAA;AAAA,EACV,MAAA,EAAQ;AAAA,IACN;AAAA,MACE,IAAA,EAAM,YAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,wCAAA;AAAA,MACP,WAAA,EAAa,kDAAA;AAAA,MACb,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,SAAA;AAAA,MACX,SAAA,EAAW,CAAA;AAAA,MACX,SAAA,EAAW,qBAAA;AAAA,MACX,WAAA,EAAa,uBAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,eAAA,EAAiB;AAAA;AACnB,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,KAAA,EAAO,oCAAA;AAAA,MACP,QAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAW,MAAA;AAAA,MACX,SAAA,EAAW,GAAA;AAAA,MACX,UAAA,EAAY;AAAA,QACV,SAAA,EAAW,EAAE,KAAA,EAAO,GAAA,EAAK,SAAS,oCAAA;AAAqC;AACzE,KACF;AAAA,IACA;AAAA,MACE,IAAA,EAAM,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":"JPN-UEVH66XN.mjs","sourcesContent":["/**\n * Address schema for Japan (JPN).\n *\n * Field order: postalCode → street → complement → city → state\n * (matches the visible legacy `address-form` JPN fields; omits hidden\n * `country` / `reference` / `neighborhood`, the hidden `number` (default\n * `\"N/A\"`), and `receiverName`, which are outside this library's address\n * model).\n *\n * Postal code: required 7 digits with a hyphen after the third (`\"100-0001\"`).\n * Validated by `validatePostalCodeJPN` as `/^\\d{3}-?\\d{4}$/` after trim (the\n * legacy regex `^([\\d]{3})\\-?([\\d]{4})$`), so `\"100-0001\"` and `\"1000001\"`\n * both pass; a hyphen in any other position is rejected. Unlike the legacy\n * regex, full-width digits and IME hyphens (`\"100-0001\"`) are read as\n * ASCII. Mask `formatPostalCodeJPN` / `unformatPostalCodeJPN` inserts the hyphen\n * only when 7 digits are present (the legacy mask is `\"999-9999\"`); the stored\n * value is the 7 digits.\n * `maxLength` is 9: the 8 characters of `\"100-0001\"` plus one for a space\n * pasted before or after it (`\" 100-0001\"` is valid after trim). A code with\n * one more character (`\"100-00012\"`) fits and is rejected by the validator\n * instead of being cut down to the different, valid `\"100-0001\"`. The legacy\n * field has `maxLength` 50. `postalCodeAPI` is false in the legacy rules.\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 47\n * prefectures are not offered as options here.\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/jpn`, `rules/masks/jpn`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'address-JPN',\n country: 'JPN',\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.JPN',\n required: true,\n inputMode: 'numeric',\n maxLength: 9,\n formatRef: 'formatPostalCodeJPN',\n unformatRef: 'unformatPostalCodeJPN',\n validation: {\n customValidator: 'validatePostalCodeJPN',\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,83 @@
1
+ // src/schemas/personal-data/JPN.ts
2
+ var schema = {
3
+ id: "personal-data-JPN",
4
+ country: "JPN",
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 fits the longest common paste, "0081 (0) 90 - 1234 - 5678"
63
+ // (25), so it is not cut down into a different valid number. Spaced
64
+ // hyphens and a spaced "(0)" are the widest formats seen; a value longer
65
+ // than that is not a number anyone would paste.
66
+ maxLength: 25,
67
+ label: "country-forms.personal-data.phone.label",
68
+ placeholder: "country-forms.personal-data.phone.placeholder.JPN",
69
+ required: true,
70
+ inputMode: "tel",
71
+ formatRef: "formatPhoneJPN",
72
+ unformatRef: "unformatPhoneJPN",
73
+ validation: {
74
+ customValidator: "validatePhoneJPN"
75
+ }
76
+ }
77
+ ]
78
+ };
79
+ var JPN_default = schema;
80
+
81
+ export { JPN_default as default };
82
+ //# sourceMappingURL=JPN-YFL2HVAY.mjs.map
83
+ //# sourceMappingURL=JPN-YFL2HVAY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/personal-data/JPN.ts"],"names":[],"mappings":";AAuCA,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;AAAA;AAAA,MAKN,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":"JPN-YFL2HVAY.mjs","sourcesContent":["/**\n * Personal-data schema for Japan (JPN).\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 JPN rules (there is no `JPN.js`), so it falls back to\n * the generic default: a required free-text `document` (max 50, no check\n * digit, no mask), a hidden email, optional free-text `homePhone`, gender, and\n * birth date, plus optional business fields. This schema follows the library\n * document model: no `document` / `documentType` when there is no structured\n * identity document. Email is required here. `phone` is required here.\n *\n * Email: validated by `validateEmail` (shared).\n * Phone: `090 1234 5678` — validated by `validatePhoneJPN`, masked by\n * `formatPhoneJPN`/`unformatPhoneJPN`. `front.phone` has no Japanese module\n * (and so no `profile-form` phone rules either), so the numbering plan comes\n * from the public plan for Japan (country code `81`, trunk `0`): mobile\n * `70` / `80` / `90` and IP `50` numbers (10 digits), and fixed lines\n * (9 digits starting with an assigned prefix from libphonenumber's JP\n * `fixedLine` pattern). Toll-free `0120` / `0800`, `0570`, `0990`, and `0170` /\n * `0171` / `0180` / `0181` are rejected. Input is NFKC-normalized (full-width\n * digits work, and so do superscript, mathematical, and circled digits, which\n * become the digit they show); letters and other unreadable characters are\n * rejected, and the mask leaves them untouched. Display is `090 1234 5678`, `03 1234 5678` (Tokyo,\n * Osaka), and `052 123 4567` (other fixed lines, whose area codes vary from 2\n * to 5 digits). `+81` / `0081` are stripped once, and one trunk `0` is removed\n * and shown again on a complete number. A bare `81` is read as the country\n * code when a valid number follows it. A foreign `+` / `00` prefix is\n * rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/jpn`,\n * `rules/masks/jpn`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-JPN',\n country: 'JPN',\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 fits the longest common paste, \"0081 (0) 90 - 1234 - 5678\"\n // (25), so it is not cut down into a different valid number. Spaced\n // hyphens and a spaced \"(0)\" are the widest formats seen; a value longer\n // than that is not a number anyone would paste.\n maxLength: 25,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.JPN',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneJPN',\n unformatRef: 'unformatPhoneJPN',\n validation: {\n customValidator: 'validatePhoneJPN',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ // src/schemas/personal-data/LUX.ts
4
+ var schema = {
5
+ id: "personal-data-LUX",
6
+ country: "LUX",
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
+ // 24 chars fits "00352 26 12 34 56789" (20) and a pasted "(+352) 26 12 34 56".
65
+ // There is no trunk prefix, so a pasted "(0)" is not a supported form.
66
+ maxLength: 24,
67
+ label: "country-forms.personal-data.phone.label",
68
+ placeholder: "country-forms.personal-data.phone.placeholder.LUX",
69
+ required: true,
70
+ inputMode: "tel",
71
+ formatRef: "formatPhoneLUX",
72
+ unformatRef: "unformatPhoneLUX",
73
+ validation: {
74
+ customValidator: "validatePhoneLUX"
75
+ }
76
+ }
77
+ ]
78
+ };
79
+ var LUX_default = schema;
80
+
81
+ module.exports = LUX_default;
82
+ //# sourceMappingURL=LUX-CJAE5BFO.js.map
83
+ //# sourceMappingURL=LUX-CJAE5BFO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas/personal-data/LUX.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":"LUX-CJAE5BFO.js","sourcesContent":["/**\n * Personal-data schema for Luxembourg (LUX).\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 `LUX.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: `621 123 456` mobile / `26 12 34 56` fixed line — validated by\n * `validatePhoneLUX`, masked by `formatPhoneLUX`/`unformatPhoneLUX`. There is\n * no `front.phone` LUX module; rules follow the Luxembourg numbering plan\n * (country code `352`, no trunk prefix) and libphonenumber's `LU` ranges.\n * Mobile is 9 digits in the allocated `6x1` ranges. Fixed line is 6–11 digits.\n * `+352` / `00352` are stripped once; a bare `352` is stripped only when the\n * remainder is a complete valid number (no national number starts with `352`).\n * A foreign `+` / `00` prefix (including Belgium `+32`, France `+33`, Germany\n * `+49`) is rejected.\n *\n * Required rule modules: `rules/validators/common`, `rules/validators/lux`,\n * `rules/masks/lux`\n */\nimport type { FormSchema } from '../../types'\n\nconst schema = {\n id: 'personal-data-LUX',\n country: 'LUX',\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 // 24 chars fits \"00352 26 12 34 56789\" (20) and a pasted \"(+352) 26 12 34 56\".\n // There is no trunk prefix, so a pasted \"(0)\" is not a supported form.\n maxLength: 24,\n label: 'country-forms.personal-data.phone.label',\n placeholder: 'country-forms.personal-data.phone.placeholder.LUX',\n required: true,\n inputMode: 'tel',\n formatRef: 'formatPhoneLUX',\n unformatRef: 'unformatPhoneLUX',\n validation: {\n customValidator: 'validatePhoneLUX',\n },\n },\n ],\n} satisfies FormSchema\n\nexport default schema\n"]}
@@ -0,0 +1,81 @@
1
+ // src/schemas/personal-data/LUX.ts
2
+ var schema = {
3
+ id: "personal-data-LUX",
4
+ country: "LUX",
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
+ // 24 chars fits "00352 26 12 34 56789" (20) and a pasted "(+352) 26 12 34 56".
63
+ // There is no trunk prefix, so a pasted "(0)" is not a supported form.
64
+ maxLength: 24,
65
+ label: "country-forms.personal-data.phone.label",
66
+ placeholder: "country-forms.personal-data.phone.placeholder.LUX",
67
+ required: true,
68
+ inputMode: "tel",
69
+ formatRef: "formatPhoneLUX",
70
+ unformatRef: "unformatPhoneLUX",
71
+ validation: {
72
+ customValidator: "validatePhoneLUX"
73
+ }
74
+ }
75
+ ]
76
+ };
77
+ var LUX_default = schema;
78
+
79
+ export { LUX_default as default };
80
+ //# sourceMappingURL=LUX-JGZOGB3E.mjs.map
81
+ //# sourceMappingURL=LUX-JGZOGB3E.mjs.map