@vtex/faststore 0.0.10 → 0.0.11

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 (506) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +0 -1
  3. package/dist/actions.json +6 -1
  4. package/dist/catalog.json +789 -1701
  5. package/dist/cli/index.d.ts +66 -28
  6. package/dist/cli/index.js +7371 -512
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/cli/server-runtime.js +41 -60
  9. package/dist/cli/server-runtime.js.map +1 -1
  10. package/dist/client.d.ts +3 -3
  11. package/dist/client.js +2 -2
  12. package/dist/components.d.ts +63 -57
  13. package/dist/components.js +60 -54
  14. package/dist/content-types.json +5785 -754
  15. package/dist/core/dist/define-component.d.ts +1 -1
  16. package/dist/core/dist/define-content-type.d.ts +50 -2
  17. package/dist/core/dist/define-content-type.js +107 -3
  18. package/dist/core/dist/define-content-type.js.map +1 -1
  19. package/dist/core/dist/index.d.ts +2 -2
  20. package/dist/docs/access-code-field.md +1 -1
  21. package/dist/docs/access-code-sign-in.md +126 -77
  22. package/dist/docs/account-address-book.md +210 -95
  23. package/dist/docs/account-menu.md +14 -15
  24. package/dist/docs/account-saved-cards.md +44 -39
  25. package/dist/docs/alert-dialog.md +3 -1
  26. package/dist/docs/avatar.md +4 -2
  27. package/dist/docs/billing-address.md +99 -30
  28. package/dist/docs/binding-switcher.md +5 -2
  29. package/dist/docs/buy-button.md +7 -8
  30. package/dist/docs/card-entry.md +39 -26
  31. package/dist/docs/card-summary.md +18 -8
  32. package/dist/docs/cardholder-document.md +5 -3
  33. package/dist/docs/carousel.md +5 -4
  34. package/dist/docs/cart-destination.md +39 -26
  35. package/dist/docs/cart-item.md +29 -14
  36. package/dist/docs/cart-totalizer.md +7 -5
  37. package/dist/docs/cart.md +135 -41
  38. package/dist/docs/challenge-return.md +135 -0
  39. package/dist/docs/client-preferences-fieldset.md +10 -5
  40. package/dist/docs/client-preferences.md +31 -8
  41. package/dist/docs/client-profile-fieldset.md +20 -6
  42. package/dist/docs/client-profile.md +12 -3
  43. package/dist/docs/copy-text.md +9 -7
  44. package/dist/docs/document-field.md +1 -1
  45. package/dist/docs/email-field.md +2 -1
  46. package/dist/docs/email-identification.md +12 -2
  47. package/dist/docs/footer-copyright.md +4 -2
  48. package/dist/docs/form.md +54 -18
  49. package/dist/docs/free-shipping-progress.md +6 -5
  50. package/dist/docs/identity-edit.md +8 -2
  51. package/dist/docs/identity-summary.md +18 -5
  52. package/dist/docs/installments.md +46 -32
  53. package/dist/docs/my-account-profile.md +16 -11
  54. package/dist/docs/navigation-link.md +5 -3
  55. package/dist/docs/order-cancel.md +3 -1
  56. package/dist/docs/order-delivery-address.md +7 -5
  57. package/dist/docs/order-delivery-group.md +1 -3
  58. package/dist/docs/order-details-back.md +1 -1
  59. package/dist/docs/order-details-header.md +1 -4
  60. package/dist/docs/order-invoice-download.md +60 -0
  61. package/dist/docs/order-list-row.md +1 -1
  62. package/dist/docs/order-list-search.md +13 -20
  63. package/dist/docs/order-list-views.md +11 -17
  64. package/dist/docs/order-list.md +12 -5
  65. package/dist/docs/order-payment.md +9 -7
  66. package/dist/docs/order-placed-date.md +1 -1
  67. package/dist/docs/order-placed-payment-summary.md +28 -15
  68. package/dist/docs/order-placed.md +49 -14
  69. package/dist/docs/order-progress.md +1 -1
  70. package/dist/docs/order-status-badge.md +20 -9
  71. package/dist/docs/order-summary.md +2 -2
  72. package/dist/docs/order-tracking-link.md +58 -0
  73. package/dist/docs/payment-method-badges.md +30 -4
  74. package/dist/docs/payment-methods.md +1 -1
  75. package/dist/docs/payment.md +36 -17
  76. package/dist/docs/phone-field.md +4 -4
  77. package/dist/docs/place-order.md +84 -36
  78. package/dist/docs/postal-code-field.md +3 -1
  79. package/dist/docs/pricing.md +21 -23
  80. package/dist/docs/product-gallery.md +19 -20
  81. package/dist/docs/product-information.md +13 -9
  82. package/dist/docs/product-list.md +7 -6
  83. package/dist/docs/product-shelf.md +0 -1
  84. package/dist/docs/promotion.md +4 -2
  85. package/dist/docs/region.md +23 -15
  86. package/dist/docs/save-card.md +7 -6
  87. package/dist/docs/saved-cards.md +65 -36
  88. package/dist/docs/shipping-address.md +57 -21
  89. package/dist/docs/shipping-simulator.md +53 -15
  90. package/dist/docs/sign-in-disclosure.md +176 -0
  91. package/dist/docs/sign-in-form.md +78 -47
  92. package/dist/docs/sign-in-redirect.md +4 -2
  93. package/dist/docs/sign-in.md +173 -0
  94. package/dist/docs/toast.md +15 -4
  95. package/dist/docs/variant-selector.md +15 -11
  96. package/dist/graphql/types.d.ts +4 -14
  97. package/dist/index.d.ts +2 -2
  98. package/dist/internal/client.d.ts +1 -3
  99. package/dist/internal/client.js +1 -1
  100. package/dist/internal/server.d.ts +7 -4
  101. package/dist/internal/server.js +7 -4
  102. package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
  103. package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
  104. package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
  105. package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
  106. package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
  107. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
  108. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
  109. package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
  110. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
  111. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
  112. package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
  113. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
  114. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
  115. package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
  116. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
  117. package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
  118. package/dist/matter/account-address-book/account-address-book.js +74 -33
  119. package/dist/matter/account-address-book/account-address-book.js.map +1 -1
  120. package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
  121. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
  122. package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
  123. package/dist/matter/account-address-book/account-address-country.js +83 -49
  124. package/dist/matter/account-address-book/account-address-country.js.map +1 -1
  125. package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
  126. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
  127. package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
  128. package/dist/matter/account-address-book/account-address-form.js +518 -155
  129. package/dist/matter/account-address-book/account-address-form.js.map +1 -1
  130. package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
  131. package/dist/matter/account-address-book/account-address-record.js +32 -17
  132. package/dist/matter/account-address-book/account-address-record.js.map +1 -1
  133. package/dist/matter/account-menu/account-menu.d.ts +34 -17
  134. package/dist/matter/account-menu/account-menu.js +46 -54
  135. package/dist/matter/account-menu/account-menu.js.map +1 -1
  136. package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
  137. package/dist/matter/account-saved-cards/account-saved-cards.d.ts +108 -28
  138. package/dist/matter/account-saved-cards/account-saved-cards.js +177 -122
  139. package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -1
  140. package/dist/matter/billing-address/billing-address.d.ts +156 -74
  141. package/dist/matter/billing-address/billing-address.js +227 -156
  142. package/dist/matter/billing-address/billing-address.js.map +1 -1
  143. package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
  144. package/dist/matter/breadcrumb/breadcrumb.js +24 -9
  145. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  146. package/dist/matter/buy-button/buy-button.d.ts +8 -11
  147. package/dist/matter/buy-button/buy-button.js +10 -19
  148. package/dist/matter/buy-button/buy-button.js.map +1 -1
  149. package/dist/matter/card-entry/card-capture.js +12 -4
  150. package/dist/matter/card-entry/card-capture.js.map +1 -1
  151. package/dist/matter/card-entry/card-entry.d.ts +123 -32
  152. package/dist/matter/card-entry/card-entry.js +348 -221
  153. package/dist/matter/card-entry/card-entry.js.map +1 -1
  154. package/dist/matter/cart/cart-namespace.d.ts +7 -1
  155. package/dist/matter/cart/cart-namespace.js +7 -1
  156. package/dist/matter/cart/cart-namespace.js.map +1 -1
  157. package/dist/matter/cart/cart.d.ts +402 -61
  158. package/dist/matter/cart/cart.js +624 -153
  159. package/dist/matter/cart/cart.js.map +1 -1
  160. package/dist/matter/cart-destination/cart-destination.d.ts +30 -19
  161. package/dist/matter/cart-destination/cart-destination.js +160 -70
  162. package/dist/matter/cart-destination/cart-destination.js.map +1 -1
  163. package/dist/matter/cart-item/cart-item.d.ts +144 -17
  164. package/dist/matter/cart-item/cart-item.js +166 -49
  165. package/dist/matter/cart-item/cart-item.js.map +1 -1
  166. package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
  167. package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
  168. package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
  169. package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
  170. package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
  171. package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
  172. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
  173. package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
  174. package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
  175. package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
  176. package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
  177. package/dist/matter/cart-totalizer/cart-totalizer.js +46 -17
  178. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
  179. package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
  180. package/dist/matter/challenge-return/challenge-return.js +241 -0
  181. package/dist/matter/challenge-return/challenge-return.js.map +1 -0
  182. package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
  183. package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
  184. package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
  185. package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
  186. package/dist/matter/client-preferences/client-preferences.js +84 -15
  187. package/dist/matter/client-preferences/client-preferences.js.map +1 -1
  188. package/dist/matter/client-profile/client-profile.d.ts +44 -9
  189. package/dist/matter/client-profile/client-profile.js +64 -24
  190. package/dist/matter/client-profile/client-profile.js.map +1 -1
  191. package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
  192. package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
  193. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  194. package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
  195. package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
  196. package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
  197. package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
  198. package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
  199. package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
  200. package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
  201. package/dist/matter/delivery-options/delivery-options.js +75 -12
  202. package/dist/matter/delivery-options/delivery-options.js.map +1 -1
  203. package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
  204. package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
  205. package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
  206. package/dist/matter/email-identification/email-identification.d.ts +25 -3
  207. package/dist/matter/email-identification/email-identification.js +49 -12
  208. package/dist/matter/email-identification/email-identification.js.map +1 -1
  209. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +79 -7
  210. package/dist/matter/free-shipping-progress/free-shipping-progress.js +77 -20
  211. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
  212. package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
  213. package/dist/matter/identity-edit/identity-edit.js +47 -19
  214. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  215. package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
  216. package/dist/matter/identity-summary/identity-summary.js +95 -45
  217. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  218. package/dist/matter/installments/installments-select.d.ts +98 -16
  219. package/dist/matter/installments/installments-select.js +156 -48
  220. package/dist/matter/installments/installments-select.js.map +1 -1
  221. package/dist/matter/installments/installments.d.ts +96 -16
  222. package/dist/matter/installments/installments.js +115 -40
  223. package/dist/matter/installments/installments.js.map +1 -1
  224. package/dist/matter/installments/use-installments-selection.d.ts +1 -0
  225. package/dist/matter/installments/use-installments-selection.js +8 -3
  226. package/dist/matter/installments/use-installments-selection.js.map +1 -1
  227. package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
  228. package/dist/matter/my-account-profile/my-account-profile.js +370 -174
  229. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  230. package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
  231. package/dist/matter/order-cancel/order-cancel.js +118 -51
  232. package/dist/matter/order-cancel/order-cancel.js.map +1 -1
  233. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
  234. package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
  235. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
  236. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
  237. package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
  238. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
  239. package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
  240. package/dist/matter/order-details-header/order-details-header.js +66 -58
  241. package/dist/matter/order-details-header/order-details-header.js.map +1 -1
  242. package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
  243. package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
  244. package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
  245. package/dist/matter/order-list/order-list.d.ts +164 -19
  246. package/dist/matter/order-list/order-list.js +229 -87
  247. package/dist/matter/order-list/order-list.js.map +1 -1
  248. package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
  249. package/dist/matter/order-list-row/order-list-row.js +3 -2
  250. package/dist/matter/order-list-row/order-list-row.js.map +1 -1
  251. package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
  252. package/dist/matter/order-list-search/order-list-search.js +30 -69
  253. package/dist/matter/order-list-search/order-list-search.js.map +1 -1
  254. package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
  255. package/dist/matter/order-list-views/order-list-views.js +22 -68
  256. package/dist/matter/order-list-views/order-list-views.js.map +1 -1
  257. package/dist/matter/order-payment/order-payment.d.ts +33 -10
  258. package/dist/matter/order-payment/order-payment.js +44 -39
  259. package/dist/matter/order-payment/order-payment.js.map +1 -1
  260. package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
  261. package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
  262. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
  263. package/dist/matter/order-placed/order-placed.d.ts +198 -31
  264. package/dist/matter/order-placed/order-placed.js +230 -139
  265. package/dist/matter/order-placed/order-placed.js.map +1 -1
  266. package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
  267. package/dist/matter/order-placed-date/order-placed-date.js +7 -8
  268. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
  269. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
  270. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
  271. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  272. package/dist/matter/order-progress/order-progress.d.ts +19 -8
  273. package/dist/matter/order-progress/order-progress.js +37 -45
  274. package/dist/matter/order-progress/order-progress.js.map +1 -1
  275. package/dist/matter/order-summary/order-summary.d.ts +19 -9
  276. package/dist/matter/order-summary/order-summary.js +38 -44
  277. package/dist/matter/order-summary/order-summary.js.map +1 -1
  278. package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
  279. package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
  280. package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
  281. package/dist/matter/payment/payment-card-capture.js +17 -10
  282. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  283. package/dist/matter/payment/payment-controller.d.ts +4 -2
  284. package/dist/matter/payment/payment-controller.js +30 -9
  285. package/dist/matter/payment/payment-controller.js.map +1 -1
  286. package/dist/matter/payment/payment-method-badges.js +1 -1
  287. package/dist/matter/payment/payment.d.ts +69 -19
  288. package/dist/matter/payment/payment.js +101 -35
  289. package/dist/matter/payment/payment.js.map +1 -1
  290. package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
  291. package/dist/matter/payment/use-payment-method-selection.js +94 -32
  292. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  293. package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
  294. package/dist/matter/payment/use-payment-submit-gate.js +47 -8
  295. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  296. package/dist/matter/place-order/place-order.d.ts +171 -57
  297. package/dist/matter/place-order/place-order.js +376 -185
  298. package/dist/matter/place-order/place-order.js.map +1 -1
  299. package/dist/matter/pricing/pricing.d.ts +152 -13
  300. package/dist/matter/pricing/pricing.js +153 -52
  301. package/dist/matter/pricing/pricing.js.map +1 -1
  302. package/dist/matter/product-information/product-information.d.ts +27 -4
  303. package/dist/matter/product-information/product-information.js +32 -15
  304. package/dist/matter/product-information/product-information.js.map +1 -1
  305. package/dist/matter/product-list/product-list.d.ts +24 -6
  306. package/dist/matter/product-list/product-list.js +32 -26
  307. package/dist/matter/product-list/product-list.js.map +1 -1
  308. package/dist/matter/product-shelf/product-shelf.d.ts +1 -3
  309. package/dist/matter/product-shelf/product-shelf.js +2 -15
  310. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  311. package/dist/matter/region/region.d.ts +33 -16
  312. package/dist/matter/region/region.js +59 -52
  313. package/dist/matter/region/region.js.map +1 -1
  314. package/dist/matter/save-card/save-card.d.ts +43 -8
  315. package/dist/matter/save-card/save-card.js +61 -23
  316. package/dist/matter/save-card/save-card.js.map +1 -1
  317. package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
  318. package/dist/matter/saved-cards/saved-cards.js +349 -77
  319. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  320. package/dist/matter/shipping-address/address-payload.js +25 -0
  321. package/dist/matter/shipping-address/address-payload.js.map +1 -0
  322. package/dist/matter/shipping-address/country-descriptors.js +71 -71
  323. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  324. package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
  325. package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
  326. package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
  327. package/dist/matter/shipping-address/shipping-address.js +443 -188
  328. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  329. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +250 -24
  330. package/dist/matter/shipping-simulator/shipping-simulator.js +257 -51
  331. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  332. package/dist/matter/sign-in/sign-in.d.ts +108 -0
  333. package/dist/matter/sign-in/sign-in.js +285 -0
  334. package/dist/matter/sign-in/sign-in.js.map +1 -0
  335. package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
  336. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
  337. package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
  338. package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
  339. package/dist/matter/sign-in-form/sign-in-form.js +134 -144
  340. package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
  341. package/dist/particles/binding-switcher/binding-switcher.d.ts +29 -8
  342. package/dist/particles/binding-switcher/binding-switcher.js +37 -26
  343. package/dist/particles/binding-switcher/binding-switcher.js.map +1 -1
  344. package/dist/particles/card-summary/card-summary.d.ts +38 -8
  345. package/dist/particles/card-summary/card-summary.js +55 -22
  346. package/dist/particles/card-summary/card-summary.js.map +1 -1
  347. package/dist/particles/carousel/carousel.d.ts +99 -11
  348. package/dist/particles/carousel/carousel.js +103 -35
  349. package/dist/particles/carousel/carousel.js.map +1 -1
  350. package/dist/particles/copy-text/copy-text.js +5 -15
  351. package/dist/particles/copy-text/copy-text.js.map +1 -1
  352. package/dist/particles/dialog/dialog.d.ts +14 -6
  353. package/dist/particles/dialog/dialog.js +6 -3
  354. package/dist/particles/dialog/dialog.js.map +1 -1
  355. package/dist/particles/drawer/drawer.js +1 -1
  356. package/dist/particles/drawer/drawer.js.map +1 -1
  357. package/dist/particles/email-field/email-field.d.ts +2 -1
  358. package/dist/particles/email-field/email-field.js +2 -1
  359. package/dist/particles/email-field/email-field.js.map +1 -1
  360. package/dist/particles/footer-link-group/footer-link-group.js +1 -0
  361. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  362. package/dist/particles/form/form.d.ts +85 -13
  363. package/dist/particles/form/form.js +91 -42
  364. package/dist/particles/form/form.js.map +1 -1
  365. package/dist/particles/gallery/gallery.d.ts +129 -12
  366. package/dist/particles/gallery/gallery.js +121 -34
  367. package/dist/particles/gallery/gallery.js.map +1 -1
  368. package/dist/particles/order-details-back/order-details-back.d.ts +5 -3
  369. package/dist/particles/order-details-back/order-details-back.js +8 -10
  370. package/dist/particles/order-details-back/order-details-back.js.map +1 -1
  371. package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
  372. package/dist/particles/order-status-badge/order-status-badge.js +4 -20
  373. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
  374. package/dist/particles/password-field/password-field.d.ts +1 -1
  375. package/dist/particles/password-field/password-field.js +2 -4
  376. package/dist/particles/password-field/password-field.js.map +1 -1
  377. package/dist/particles/phone-field/phone-field.d.ts +4 -4
  378. package/dist/particles/phone-field/phone-field.js +8 -11
  379. package/dist/particles/phone-field/phone-field.js.map +1 -1
  380. package/dist/particles/spinner/spinner.d.ts +24 -4
  381. package/dist/particles/spinner/spinner.js +25 -9
  382. package/dist/particles/spinner/spinner.js.map +1 -1
  383. package/dist/particles/switch/switch.d.ts +4 -1
  384. package/dist/particles/switch/switch.js +3 -1
  385. package/dist/particles/switch/switch.js.map +1 -1
  386. package/dist/particles/toast/toast.d.ts +29 -3
  387. package/dist/particles/toast/toast.js +34 -10
  388. package/dist/particles/toast/toast.js.map +1 -1
  389. package/dist/schema.graphql +164 -56
  390. package/dist/sdk/address/address-fields.js +4 -4
  391. package/dist/sdk/address/address-fields.js.map +1 -1
  392. package/dist/sdk/address/constants.js +1 -6
  393. package/dist/sdk/address/constants.js.map +1 -1
  394. package/dist/sdk/address/messages.js +44 -44
  395. package/dist/sdk/address/messages.js.map +1 -1
  396. package/dist/sdk/address/postal-code.js +15 -2
  397. package/dist/sdk/address/postal-code.js.map +1 -1
  398. package/dist/sdk/address/types.d.ts +5 -3
  399. package/dist/sdk/address/validate-address.js +3 -3
  400. package/dist/sdk/address/validate-address.js.map +1 -1
  401. package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
  402. package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
  403. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  404. package/dist/sdk/data/index.js +2 -2
  405. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  406. package/dist/sdk/generated/gql.js +1 -1
  407. package/dist/sdk/generated/gql.js.map +1 -1
  408. package/dist/sdk/generated/graphql.d.ts +20 -5
  409. package/dist/sdk/generated/graphql.js +6 -0
  410. package/dist/sdk/generated/graphql.js.map +1 -1
  411. package/dist/sdk/i18n/format-error-code.js +23 -0
  412. package/dist/sdk/i18n/format-error-code.js.map +1 -0
  413. package/dist/sdk/i18n/message-formatter.d.ts +22 -0
  414. package/dist/sdk/i18n/message-formatter.js +140 -0
  415. package/dist/sdk/i18n/message-formatter.js.map +1 -0
  416. package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
  417. package/dist/sdk/i18n/use-message-formatter.js +18 -0
  418. package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
  419. package/dist/sdk/identity/use-identity-actions.js.map +1 -1
  420. package/dist/sdk/navigation/redirect.d.ts +2 -0
  421. package/dist/sdk/navigation/redirect.js +19 -1
  422. package/dist/sdk/navigation/redirect.js.map +1 -1
  423. package/dist/sdk/navigation/types.d.ts +13 -0
  424. package/dist/sdk/payment/bin-format.js +20 -0
  425. package/dist/sdk/payment/bin-format.js.map +1 -0
  426. package/dist/sdk/payment/challenge-return.js +37 -0
  427. package/dist/sdk/payment/challenge-return.js.map +1 -0
  428. package/dist/sdk/payment/confirmation-last-four.js +39 -0
  429. package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
  430. package/dist/sdk/payment/gateway.d.ts +1 -1
  431. package/dist/sdk/payment/gateway.js +8 -2
  432. package/dist/sdk/payment/gateway.js.map +1 -1
  433. package/dist/sdk/payment/operations.d.ts +1 -0
  434. package/dist/sdk/payment/operations.js +28 -6
  435. package/dist/sdk/payment/operations.js.map +1 -1
  436. package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
  437. package/dist/sdk/payment/resumed-purchase.js +119 -0
  438. package/dist/sdk/payment/resumed-purchase.js.map +1 -0
  439. package/dist/sdk/payment/security-code-mask.js +16 -23
  440. package/dist/sdk/payment/security-code-mask.js.map +1 -1
  441. package/dist/sdk/payment/submission-registry.js +6 -2
  442. package/dist/sdk/payment/submission-registry.js.map +1 -1
  443. package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
  444. package/dist/sdk/payment/use-payment-actions.js +23 -3
  445. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  446. package/dist/sdk/payment/use-place-order.d.ts +10 -2
  447. package/dist/sdk/payment/use-place-order.js +138 -76
  448. package/dist/sdk/payment/use-place-order.js.map +1 -1
  449. package/dist/sdk/provider/storefront-provider.d.ts +1 -7
  450. package/dist/sdk/provider/storefront-provider.js +4 -11
  451. package/dist/sdk/provider/storefront-provider.js.map +1 -1
  452. package/dist/sdk/seo/entity-landing.d.ts +24 -0
  453. package/dist/sdk/seo/entity-landing.js +30 -0
  454. package/dist/sdk/seo/entity-landing.js.map +1 -0
  455. package/dist/sdk/seo/page-alternates.d.ts +3 -2
  456. package/dist/sdk/seo/page-alternates.js +4 -2
  457. package/dist/sdk/seo/page-alternates.js.map +1 -1
  458. package/dist/sdk/seo/search-landing.d.ts +42 -0
  459. package/dist/sdk/seo/search-landing.js +85 -0
  460. package/dist/sdk/seo/search-landing.js.map +1 -0
  461. package/dist/sdk/session/mock-session.d.ts +9 -0
  462. package/dist/sdk/session/mock-session.js +31 -0
  463. package/dist/sdk/session/mock-session.js.map +1 -0
  464. package/dist/sdk/session/read-server-session.d.ts +3 -0
  465. package/dist/sdk/session/read-server-session.js +5 -0
  466. package/dist/sdk/session/read-server-session.js.map +1 -1
  467. package/dist/sdk/session/return-path-segment.d.ts +10 -0
  468. package/dist/sdk/session/return-path-segment.js +15 -0
  469. package/dist/sdk/session/return-path-segment.js.map +1 -0
  470. package/dist/sdk/session/use-session-actions.js.map +1 -1
  471. package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -1
  472. package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
  473. package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
  474. package/dist/utils/safe-href.d.ts +2 -0
  475. package/package.json +4 -3
  476. package/skills/storefront-asset/SKILL.md +2 -2
  477. package/skills/storefront-asset/references/api-side.md +27 -14
  478. package/skills/storefront-asset/references/findings.md +5 -2
  479. package/src/styles/tailwind.css +8 -0
  480. package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
  481. package/dist/message-locales.json +0 -7
  482. package/dist/sdk/i18n/client.d.ts +0 -4
  483. package/dist/sdk/i18n/client.js +0 -4
  484. package/dist/sdk/i18n/locales.d.ts +0 -8
  485. package/dist/sdk/i18n/locales.js +0 -57
  486. package/dist/sdk/i18n/locales.js.map +0 -1
  487. package/dist/sdk/i18n/messages/en-US.js +0 -183
  488. package/dist/sdk/i18n/messages/en-US.js.map +0 -1
  489. package/dist/sdk/i18n/messages/en-US.json +0 -178
  490. package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -182
  491. package/dist/sdk/i18n/messages/es-ES.js +0 -183
  492. package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
  493. package/dist/sdk/i18n/messages/es-ES.json +0 -178
  494. package/dist/sdk/i18n/messages/pt-BR.js +0 -183
  495. package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
  496. package/dist/sdk/i18n/messages/pt-BR.json +0 -178
  497. package/dist/sdk/i18n/provider.d.ts +0 -1
  498. package/dist/sdk/i18n/provider.js +0 -30
  499. package/dist/sdk/i18n/provider.js.map +0 -1
  500. package/dist/sdk/i18n/server.d.ts +0 -28
  501. package/dist/sdk/i18n/server.js +0 -59
  502. package/dist/sdk/i18n/server.js.map +0 -1
  503. package/dist/utils/resolve-authored-copy.js +0 -18
  504. package/dist/utils/resolve-authored-copy.js.map +0 -1
  505. package/dist/utils/substitute-template.js +0 -33
  506. package/dist/utils/substitute-template.js.map +0 -1
@@ -1,8 +1,11 @@
1
1
  "use client";
2
2
  import { defineComponent } from "../../core/dist/define-component.js";
3
+ import { defineContentType } from "../../core/dist/define-content-type.js";
3
4
  import "../../core/dist/index.js";
5
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
4
6
  import { Field } from "../../particles/field/field.js";
5
7
  import { useActionsOverride } from "../../sdk/actions/actions-override-context.js";
8
+ import { formatErrorCode } from "../../sdk/i18n/format-error-code.js";
6
9
  import { useDataOverride } from "../../sdk/data/data-override-context.js";
7
10
  import { useSession } from "../session/session.js";
8
11
  import { loggableErrorName } from "../../utils/loggable-error-name.js";
@@ -42,6 +45,264 @@ const fragment = `
42
45
  }
43
46
  }
44
47
  `;
48
+ const MyAccountProfileRootContent = defineContentType({
49
+ id: "my-account-profile-root",
50
+ title: "My Account Profile Root",
51
+ description: "The toasts the profile Save raises.",
52
+ schema: {
53
+ type: "object",
54
+ additionalProperties: false,
55
+ properties: {
56
+ saveFailedMessage: {
57
+ type: "string",
58
+ title: "Save failure message",
59
+ description: "Shown for a network failure, and when the save cannot be dispatched at all.",
60
+ format: "icu-message",
61
+ messageSource: "Unable to save your profile. Please try again."
62
+ },
63
+ invalidValueMessage: {
64
+ type: "string",
65
+ title: "Refused value message",
66
+ description: "Shown when the account refuses one or more of the submitted values.",
67
+ format: "icu-message",
68
+ messageSource: "Some of your details were not accepted. Check them and try again."
69
+ },
70
+ sessionExpiredMessage: {
71
+ type: "string",
72
+ title: "Session expired message",
73
+ description: "Shown when the session ended before the save, so the shopper must sign in again.",
74
+ format: "icu-message",
75
+ messageSource: "Your session has expired. Please sign in again."
76
+ },
77
+ savedMessage: {
78
+ type: "string",
79
+ title: "Save success message",
80
+ format: "icu-message",
81
+ messageSource: "Your profile has been saved."
82
+ }
83
+ }
84
+ }
85
+ });
86
+ /**
87
+ * `CustomerProfileErrorCode` of API Core's schema plus the two codes the sdk mints: the transport failure
88
+ * and the expired session, which the write answers with a top-level `UNAUTHORIZED`.
89
+ */
90
+ const MY_ACCOUNT_PROFILE_ERROR_FIELDS = {
91
+ INVALID_VALUE: "invalidValueMessage",
92
+ UNAUTHORIZED: "sessionExpiredMessage",
93
+ NETWORK_ERROR: "saveFailedMessage"
94
+ };
95
+ const MyAccountProfileEditButtonContent = defineContentType({
96
+ id: "my-account-profile-edit",
97
+ title: "My Account Profile Edit Button",
98
+ description: "The edit button's label.",
99
+ schema: {
100
+ type: "object",
101
+ additionalProperties: false,
102
+ properties: { label: {
103
+ type: "string",
104
+ title: "Button label",
105
+ format: "icu-message",
106
+ messageSource: "Edit"
107
+ } }
108
+ }
109
+ });
110
+ const MyAccountProfileSaveButtonContent = defineContentType({
111
+ id: "my-account-profile-save",
112
+ title: "My Account Profile Save Button",
113
+ description: "The save button's label.",
114
+ schema: {
115
+ type: "object",
116
+ additionalProperties: false,
117
+ properties: { label: {
118
+ type: "string",
119
+ title: "Button label",
120
+ format: "icu-message",
121
+ messageSource: "Save"
122
+ } }
123
+ }
124
+ });
125
+ const MyAccountProfileCancelButtonContent = defineContentType({
126
+ id: "my-account-profile-cancel",
127
+ title: "My Account Profile Cancel Button",
128
+ description: "The cancel button's label.",
129
+ schema: {
130
+ type: "object",
131
+ additionalProperties: false,
132
+ properties: { label: {
133
+ type: "string",
134
+ title: "Button label",
135
+ format: "icu-message",
136
+ messageSource: "Cancel"
137
+ } }
138
+ }
139
+ });
140
+ const MyAccountProfileFirstNameControlContent = defineContentType({
141
+ id: "my-account-profile-first-name",
142
+ title: "My Account Profile First Name Control",
143
+ description: "The first-name field's label and required message.",
144
+ schema: {
145
+ type: "object",
146
+ additionalProperties: false,
147
+ properties: {
148
+ label: {
149
+ type: "string",
150
+ title: "Label",
151
+ format: "icu-message",
152
+ messageSource: "First name"
153
+ },
154
+ requiredMessage: {
155
+ type: "string",
156
+ title: "Required message",
157
+ format: "icu-message",
158
+ messageSource: "First name is required."
159
+ }
160
+ }
161
+ }
162
+ });
163
+ const MyAccountProfileLastNameControlContent = defineContentType({
164
+ id: "my-account-profile-last-name",
165
+ title: "My Account Profile Last Name Control",
166
+ description: "The last-name field's label and required message.",
167
+ schema: {
168
+ type: "object",
169
+ additionalProperties: false,
170
+ properties: {
171
+ label: {
172
+ type: "string",
173
+ title: "Label",
174
+ format: "icu-message",
175
+ messageSource: "Last name"
176
+ },
177
+ requiredMessage: {
178
+ type: "string",
179
+ title: "Required message",
180
+ format: "icu-message",
181
+ messageSource: "Last name is required."
182
+ }
183
+ }
184
+ }
185
+ });
186
+ const MyAccountProfilePhoneControlContent = defineContentType({
187
+ id: "my-account-profile-phone",
188
+ title: "My Account Profile Phone Control",
189
+ description: "The phone field's label and invalid message.",
190
+ schema: {
191
+ type: "object",
192
+ additionalProperties: false,
193
+ properties: {
194
+ label: {
195
+ type: "string",
196
+ title: "Label",
197
+ format: "icu-message",
198
+ messageSource: "Phone"
199
+ },
200
+ invalidMessage: {
201
+ type: "string",
202
+ title: "Invalid message",
203
+ format: "icu-message",
204
+ messageSource: "Invalid phone number"
205
+ }
206
+ }
207
+ }
208
+ });
209
+ const MyAccountProfileTaxIdControlContent = defineContentType({
210
+ id: "my-account-profile-tax-id",
211
+ title: "My Account Profile Tax ID Control",
212
+ description: "The tax-ID field's label, invalid message and the reason a saved document is locked.",
213
+ schema: {
214
+ type: "object",
215
+ additionalProperties: false,
216
+ properties: {
217
+ label: {
218
+ type: "string",
219
+ title: "Label",
220
+ format: "icu-message",
221
+ messageSource: "National tax ID"
222
+ },
223
+ invalidMessage: {
224
+ type: "string",
225
+ title: "Invalid message",
226
+ format: "icu-message",
227
+ messageSource: "Invalid document number."
228
+ },
229
+ lockedReason: {
230
+ type: "string",
231
+ title: "Locked reason",
232
+ format: "icu-message",
233
+ messageSource: "Your document ID can't be edited."
234
+ }
235
+ }
236
+ }
237
+ });
238
+ const MyAccountProfileBirthDateControlContent = defineContentType({
239
+ id: "my-account-profile-birth-date",
240
+ title: "My Account Profile Birth Date Control",
241
+ description: "The birth-date field's label.",
242
+ schema: {
243
+ type: "object",
244
+ additionalProperties: false,
245
+ properties: { label: {
246
+ type: "string",
247
+ title: "Label",
248
+ format: "icu-message",
249
+ messageSource: "Birth date"
250
+ } }
251
+ }
252
+ });
253
+ const MyAccountProfileGenderControlContent = defineContentType({
254
+ id: "my-account-profile-gender",
255
+ title: "My Account Profile Gender Control",
256
+ description: "The gender field's label, placeholder, clear button label and the default options' labels.",
257
+ schema: {
258
+ type: "object",
259
+ additionalProperties: false,
260
+ properties: {
261
+ label: {
262
+ type: "string",
263
+ title: "Label",
264
+ format: "icu-message",
265
+ messageSource: "Gender"
266
+ },
267
+ placeholder: {
268
+ type: "string",
269
+ title: "Placeholder",
270
+ format: "icu-message",
271
+ messageSource: "Select"
272
+ },
273
+ clearLabel: {
274
+ type: "string",
275
+ title: "Clear button label",
276
+ format: "icu-message",
277
+ messageSource: "Clear"
278
+ },
279
+ femaleLabel: {
280
+ type: "string",
281
+ title: "Female option label",
282
+ format: "icu-message",
283
+ messageSource: "Female"
284
+ },
285
+ maleLabel: {
286
+ type: "string",
287
+ title: "Male option label",
288
+ format: "icu-message",
289
+ messageSource: "Male"
290
+ },
291
+ otherLabel: {
292
+ type: "string",
293
+ title: "Other option label",
294
+ format: "icu-message",
295
+ messageSource: "Other"
296
+ },
297
+ preferNotToSayLabel: {
298
+ type: "string",
299
+ title: "Prefer-not-to-say option label",
300
+ format: "icu-message",
301
+ messageSource: "Prefer not to say"
302
+ }
303
+ }
304
+ }
305
+ });
45
306
  const FIELD_KEYS = [
46
307
  "firstName",
47
308
  "lastName",
@@ -51,8 +312,6 @@ const FIELD_KEYS = [
51
312
  "birthDate",
52
313
  "gender"
53
314
  ];
54
- const DEFAULT_SAVE_FAILED_MESSAGE = "Unable to save your profile. Please try again.";
55
- const DEFAULT_SAVED_MESSAGE = "Your profile has been saved.";
56
315
  function buildSavedValues($data) {
57
316
  return {
58
317
  firstName: $data?.firstName ?? "",
@@ -77,22 +336,23 @@ function toNativeDate(stored) {
77
336
  function toStoredDate(native) {
78
337
  return native;
79
338
  }
339
+ /** The default option set, each value labelled by a message field; used only when no `options` are authored. */
80
340
  const DEFAULT_GENDER_OPTIONS = [
81
341
  {
82
342
  value: "female",
83
- label: "Female"
343
+ field: "femaleLabel"
84
344
  },
85
345
  {
86
346
  value: "male",
87
- label: "Male"
347
+ field: "maleLabel"
88
348
  },
89
349
  {
90
350
  value: "other",
91
- label: "Other"
351
+ field: "otherLabel"
92
352
  },
93
353
  {
94
354
  value: "prefer_not_to_say",
95
- label: "Prefer not to say"
355
+ field: "preferNotToSayLabel"
96
356
  }
97
357
  ];
98
358
  const MY_ACCOUNT_PROFILE_UNSET = Symbol("MyAccountProfileContextUnset");
@@ -107,6 +367,7 @@ const MyAccountProfileRootDefinition = defineComponent({
107
367
  name: "MyAccountProfileRoot",
108
368
  importPath: "@vtex/faststore/components",
109
369
  component: MyAccountProfileRoot,
370
+ content: MyAccountProfileRootContent,
110
371
  fragment,
111
372
  fetchStrategy: "reactive",
112
373
  requiresContext: "session",
@@ -117,25 +378,14 @@ const MyAccountProfileRootDefinition = defineComponent({
117
378
  label: "My Account Profile Root",
118
379
  category: "identity"
119
380
  },
120
- schema: {
121
- documentType: {
122
- type: "string",
123
- label: "Default document type (e.g. CPF)"
124
- },
125
- saveFailedMessage: {
126
- type: "string",
127
- default: "Unable to save your profile. Please try again.",
128
- label: "Save failure message"
129
- },
130
- savedMessage: {
131
- type: "string",
132
- default: "Your profile has been saved.",
133
- label: "Save success message"
134
- }
135
- },
136
- guideline: "Data root + form mechanics for the persistent My Account profile: owns the saved profile, the draft, the view/edit toggle, and the single batched Save (dispatches only dirty, registered fields; an empty string erases, an omitted field is untouched). Self-gates on the authenticated (loggedIn) session; requires a SessionRoot ancestor and a mounted ToastProvider ancestor — Save success/failure surface as a toast, not an inline part. Field Controls register their key plus an optional validator and normalizer through useMyAccountProfile() — the field set is a merchant composition decision, never enumerated here. Compose EditButton (view state), SaveButton/CancelButton (edit state), and Email as children in any order. See my-account-profile.md."
381
+ schema: { documentType: {
382
+ type: "string",
383
+ label: "Default document type (e.g. CPF)"
384
+ } },
385
+ guideline: "Data root + form mechanics for the persistent My Account profile: owns the saved profile, the draft, the view/edit toggle, and the single batched Save (dispatches only dirty, registered fields; an empty string erases, an omitted field is untouched). Self-gates on the authenticated (loggedIn) session; requires a SessionRoot ancestor and a mounted ToastProvider ancestor — Save success/failure surface as a toast (the $content fields savedMessage, saveFailedMessage, invalidValueMessage and sessionExpiredMessage, by refusal code), not an inline part. Field Controls register their key plus an optional validator and normalizer through useMyAccountProfile() — the field set is a merchant composition decision, never enumerated here. Compose EditButton (view state), SaveButton/CancelButton (edit state), and Email as children in any order. See my-account-profile.md."
137
386
  });
138
- function MyAccountProfileRoot({ $data: $dataProp, $actions: $actionsProp, documentType: documentTypeProp, saveFailedMessage = DEFAULT_SAVE_FAILED_MESSAGE, savedMessage = DEFAULT_SAVED_MESSAGE, className, children }) {
387
+ function MyAccountProfileRoot({ $data: $dataProp, $actions: $actionsProp, documentType: documentTypeProp, $content, $locale, className, children }) {
388
+ const { format } = useMessageFormatter(MyAccountProfileRootContent, $content);
139
389
  const { state } = useSession();
140
390
  const toast = useToast();
141
391
  const $data = useDataOverride($dataProp);
@@ -221,7 +471,7 @@ function MyAccountProfileRoot({ $data: $dataProp, $actions: $actionsProp, docume
221
471
  setFieldErrors({});
222
472
  setMode("view");
223
473
  toast.add({
224
- title: savedMessage,
474
+ title: format("savedMessage"),
225
475
  type: "success"
226
476
  });
227
477
  return;
@@ -240,7 +490,7 @@ function MyAccountProfileRoot({ $data: $dataProp, $actions: $actionsProp, docume
240
490
  const identity = $actions?.identity;
241
491
  if (!identity?.customerProfileUpdate) {
242
492
  toast.add({
243
- title: saveFailedMessage,
493
+ title: format("saveFailedMessage"),
244
494
  type: "error"
245
495
  });
246
496
  return;
@@ -253,23 +503,24 @@ function MyAccountProfileRoot({ $data: $dataProp, $actions: $actionsProp, docume
253
503
  }
254
504
  setPending(true);
255
505
  try {
256
- const userErrors = await identity.customerProfileUpdate(payload);
257
- if (userErrors.length > 0) {
506
+ const [firstError] = await identity.customerProfileUpdate(payload);
507
+ if (firstError) {
508
+ const title = formatErrorCode(MyAccountProfileRootContent, MY_ACCOUNT_PROFILE_ERROR_FIELDS, firstError, format, "saveFailedMessage");
258
509
  toast.add({
259
- title: userErrors[0]?.message ?? saveFailedMessage,
510
+ title,
260
511
  type: "error"
261
512
  });
262
513
  return;
263
514
  }
264
515
  setMode("view");
265
516
  toast.add({
266
- title: savedMessage,
517
+ title: format("savedMessage"),
267
518
  type: "success"
268
519
  });
269
520
  } catch (error) {
270
521
  console.error("[MyAccountProfileRoot] customerProfileUpdate failed", loggableErrorName(error));
271
522
  toast.add({
272
- title: saveFailedMessage,
523
+ title: format("saveFailedMessage"),
273
524
  type: "error"
274
525
  });
275
526
  } finally {
@@ -320,74 +571,68 @@ const MyAccountProfileEditButtonDefinition = defineComponent({
320
571
  name: "MyAccountProfileEditButton",
321
572
  importPath: "@vtex/faststore/components",
322
573
  component: MyAccountProfileEditButton,
574
+ content: MyAccountProfileEditButtonContent,
323
575
  requiresContext: "my-account-profile",
324
576
  editor: {
325
577
  label: "My Account Profile Edit Button",
326
578
  category: "identity"
327
579
  },
328
- schema: { label: {
329
- type: "string",
330
- default: "Edit",
331
- label: "Button label"
332
- } },
333
- guideline: "Switches MyAccountProfileRoot from the view state to the edit state. Renders only in the view state. Must be a descendant of MyAccountProfileRoot."
580
+ schema: {},
581
+ guideline: "Its label is the $content field label unless children are composed. Switches MyAccountProfileRoot from the view state to the edit state. Renders only in the view state. Must be a descendant of MyAccountProfileRoot."
334
582
  });
335
- function MyAccountProfileEditButton({ label = "Edit", className, children }) {
583
+ function MyAccountProfileEditButton({ $content, $locale, className, children }) {
336
584
  const { mode, edit } = useMyAccountProfile();
585
+ const { format } = useMessageFormatter(MyAccountProfileEditButtonContent, $content);
337
586
  if (mode !== "view") return null;
338
587
  return /* @__PURE__ */ jsx("button", {
339
588
  type: "button",
340
589
  onClick: edit,
341
590
  className,
342
591
  "data-fs-my-account-profile-edit": "",
343
- children: children ?? label
592
+ children: children ?? format("label")
344
593
  });
345
594
  }
346
595
  const MyAccountProfileSaveButtonDefinition = defineComponent({
347
596
  name: "MyAccountProfileSaveButton",
348
597
  importPath: "@vtex/faststore/components",
349
598
  component: MyAccountProfileSaveButton,
599
+ content: MyAccountProfileSaveButtonContent,
350
600
  requiresContext: "my-account-profile",
351
601
  editor: {
352
602
  label: "My Account Profile Save Button",
353
603
  category: "identity"
354
604
  },
355
- schema: { label: {
356
- type: "string",
357
- default: "Save",
358
- label: "Button label"
359
- } },
360
- guideline: "Submits MyAccountProfileRoot's batched Save. Renders only in the edit state; disabled while the write is pending. Must be a descendant of MyAccountProfileRoot."
605
+ schema: {},
606
+ guideline: "Its label is the $content field label unless children are composed. Submits MyAccountProfileRoot's batched Save. Renders only in the edit state; disabled while the write is pending. Must be a descendant of MyAccountProfileRoot."
361
607
  });
362
- function MyAccountProfileSaveButton({ label = "Save", className, children }) {
608
+ function MyAccountProfileSaveButton({ $content, $locale, className, children }) {
363
609
  const { mode, pending } = useMyAccountProfile();
610
+ const { format } = useMessageFormatter(MyAccountProfileSaveButtonContent, $content);
364
611
  if (mode !== "edit") return null;
365
612
  return /* @__PURE__ */ jsx("button", {
366
613
  type: "submit",
367
614
  disabled: pending,
368
615
  className,
369
616
  "data-fs-my-account-profile-save": "",
370
- children: children ?? label
617
+ children: children ?? format("label")
371
618
  });
372
619
  }
373
620
  const MyAccountProfileCancelButtonDefinition = defineComponent({
374
621
  name: "MyAccountProfileCancelButton",
375
622
  importPath: "@vtex/faststore/components",
376
623
  component: MyAccountProfileCancelButton,
624
+ content: MyAccountProfileCancelButtonContent,
377
625
  requiresContext: "my-account-profile",
378
626
  editor: {
379
627
  label: "My Account Profile Cancel Button",
380
628
  category: "identity"
381
629
  },
382
- schema: { label: {
383
- type: "string",
384
- default: "Cancel",
385
- label: "Button label"
386
- } },
387
- guideline: "Reverts every field to its last saved value and returns MyAccountProfileRoot to the view state, without persisting. Renders only in the edit state; disabled while the write is pending. Must be a descendant of MyAccountProfileRoot."
630
+ schema: {},
631
+ guideline: "Its label is the $content field label unless children are composed. Reverts every field to its last saved value and returns MyAccountProfileRoot to the view state, without persisting. Renders only in the edit state; disabled while the write is pending. Must be a descendant of MyAccountProfileRoot."
388
632
  });
389
- function MyAccountProfileCancelButton({ label = "Cancel", className, children }) {
633
+ function MyAccountProfileCancelButton({ $content, $locale, className, children }) {
390
634
  const { mode, pending, cancel } = useMyAccountProfile();
635
+ const { format } = useMessageFormatter(MyAccountProfileCancelButtonContent, $content);
391
636
  if (mode !== "edit") return null;
392
637
  return /* @__PURE__ */ jsx("button", {
393
638
  type: "button",
@@ -395,7 +640,7 @@ function MyAccountProfileCancelButton({ label = "Cancel", className, children })
395
640
  onClick: cancel,
396
641
  className,
397
642
  "data-fs-my-account-profile-cancel": "",
398
- children: children ?? label
643
+ children: children ?? format("label")
399
644
  });
400
645
  }
401
646
  const MyAccountProfileEmailDefinition = defineComponent({
@@ -448,33 +693,24 @@ const MyAccountProfileFirstNameControlDefinition = defineComponent({
448
693
  name: "MyAccountProfileFirstNameControl",
449
694
  importPath: "@vtex/faststore/components",
450
695
  component: MyAccountProfileFirstNameControl,
696
+ content: MyAccountProfileFirstNameControlContent,
451
697
  requiresContext: "my-account-profile",
452
698
  editor: {
453
699
  label: "My Account Profile First Name Control",
454
700
  category: "identity"
455
701
  },
456
- schema: {
457
- label: {
458
- type: "string",
459
- default: "First name",
460
- label: "Label"
461
- },
462
- requiredMessage: {
463
- type: "string",
464
- default: "First name is required.",
465
- label: "Required message"
466
- }
467
- },
468
- guideline: "Draft-bound, required first-name field. Blocks Save with an inline message and focus when left empty. Must be a descendant of MyAccountProfileRoot."
702
+ schema: {},
703
+ guideline: "Draft-bound, required first-name field, labelled by the $content field label. Blocks Save with the inline $content field requiredMessage and focus when left empty. Must be a descendant of MyAccountProfileRoot."
469
704
  });
470
- function MyAccountProfileFirstNameControl({ label = "First name", requiredMessage = "First name is required.", className }) {
705
+ function MyAccountProfileFirstNameControl({ $content, $locale, className }) {
471
706
  const { mode, draft, savedValues, fieldErrors, pending, registerField, setField } = useMyAccountProfile();
707
+ const { format } = useMessageFormatter(MyAccountProfileFirstNameControlContent, $content);
472
708
  useEffect(() => {
473
709
  return registerField({
474
710
  key: "firstName",
475
- validate: (value) => value.trim() ? null : requiredMessage
711
+ validate: (value) => value.trim() ? null : format("requiredMessage")
476
712
  });
477
- }, [requiredMessage, registerField]);
713
+ }, [format, registerField]);
478
714
  const error = fieldErrors.firstName;
479
715
  if (mode === "view") return /* @__PURE__ */ jsx("p", {
480
716
  className,
@@ -489,7 +725,7 @@ function MyAccountProfileFirstNameControl({ label = "First name", requiredMessag
489
725
  "data-fs-my-account-profile-first-name": "",
490
726
  "data-fs-my-account-profile-field": "firstName",
491
727
  children: [
492
- /* @__PURE__ */ jsx(Field.Label, { children: label }),
728
+ /* @__PURE__ */ jsx(Field.Label, { children: format("label") }),
493
729
  /* @__PURE__ */ jsx(Field.Control, {
494
730
  value: draft.firstName,
495
731
  onChange: (event) => setField("firstName", event.target.value),
@@ -506,33 +742,24 @@ const MyAccountProfileLastNameControlDefinition = defineComponent({
506
742
  name: "MyAccountProfileLastNameControl",
507
743
  importPath: "@vtex/faststore/components",
508
744
  component: MyAccountProfileLastNameControl,
745
+ content: MyAccountProfileLastNameControlContent,
509
746
  requiresContext: "my-account-profile",
510
747
  editor: {
511
748
  label: "My Account Profile Last Name Control",
512
749
  category: "identity"
513
750
  },
514
- schema: {
515
- label: {
516
- type: "string",
517
- default: "Last name",
518
- label: "Label"
519
- },
520
- requiredMessage: {
521
- type: "string",
522
- default: "Last name is required.",
523
- label: "Required message"
524
- }
525
- },
526
- guideline: "Draft-bound, required last-name field. Blocks Save with an inline message and focus when left empty. Must be a descendant of MyAccountProfileRoot."
751
+ schema: {},
752
+ guideline: "Draft-bound, required last-name field, labelled by the $content field label. Blocks Save with the inline $content field requiredMessage and focus when left empty. Must be a descendant of MyAccountProfileRoot."
527
753
  });
528
- function MyAccountProfileLastNameControl({ label = "Last name", requiredMessage = "Last name is required.", className }) {
754
+ function MyAccountProfileLastNameControl({ $content, $locale, className }) {
529
755
  const { mode, draft, savedValues, fieldErrors, pending, registerField, setField } = useMyAccountProfile();
756
+ const { format } = useMessageFormatter(MyAccountProfileLastNameControlContent, $content);
530
757
  useEffect(() => {
531
758
  return registerField({
532
759
  key: "lastName",
533
- validate: (value) => value.trim() ? null : requiredMessage
760
+ validate: (value) => value.trim() ? null : format("requiredMessage")
534
761
  });
535
- }, [requiredMessage, registerField]);
762
+ }, [format, registerField]);
536
763
  const error = fieldErrors.lastName;
537
764
  if (mode === "view") return /* @__PURE__ */ jsx("p", {
538
765
  className,
@@ -547,7 +774,7 @@ function MyAccountProfileLastNameControl({ label = "Last name", requiredMessage
547
774
  "data-fs-my-account-profile-last-name": "",
548
775
  "data-fs-my-account-profile-field": "lastName",
549
776
  children: [
550
- /* @__PURE__ */ jsx(Field.Label, { children: label }),
777
+ /* @__PURE__ */ jsx(Field.Label, { children: format("label") }),
551
778
  /* @__PURE__ */ jsx(Field.Control, {
552
779
  value: draft.lastName,
553
780
  onChange: (event) => setField("lastName", event.target.value),
@@ -564,17 +791,13 @@ const MyAccountProfilePhoneControlDefinition = defineComponent({
564
791
  name: "MyAccountProfilePhoneControl",
565
792
  importPath: "@vtex/faststore/components",
566
793
  component: MyAccountProfilePhoneControl,
794
+ content: MyAccountProfilePhoneControlContent,
567
795
  requiresContext: "my-account-profile",
568
796
  editor: {
569
797
  label: "My Account Profile Phone Control",
570
798
  category: "identity"
571
799
  },
572
800
  schema: {
573
- label: {
574
- type: "string",
575
- default: "Phone",
576
- label: "Label"
577
- },
578
801
  field: {
579
802
  type: ["homePhone", "mobilePhone"],
580
803
  default: "mobilePhone",
@@ -584,27 +807,23 @@ const MyAccountProfilePhoneControlDefinition = defineComponent({
584
807
  type: ["US", "BR"],
585
808
  default: "US",
586
809
  label: "Country"
587
- },
588
- invalidMessage: {
589
- type: "string",
590
- default: "Invalid phone number",
591
- label: "Invalid message"
592
810
  }
593
811
  },
594
- guideline: "Draft-bound, optional phone field bound to either homePhone or mobilePhone via the field prop (Decision 1) — compose it twice to expose both numbers. Normalizes to E.164 on the Root's Save. Absent from the composition means absent from the payload. Must be a descendant of MyAccountProfileRoot."
812
+ guideline: "Draft-bound, optional phone field bound to either homePhone or mobilePhone via the field prop (Decision 1) — compose it twice to expose both numbers. Its copy is the $content fields label and invalidMessage. Normalizes to E.164 on the Root's Save. Absent from the composition means absent from the payload. Must be a descendant of MyAccountProfileRoot."
595
813
  });
596
- function MyAccountProfilePhoneControl({ label = "Phone", field = "mobilePhone", country = "US", invalidMessage = "Invalid phone number", className }) {
814
+ function MyAccountProfilePhoneControl({ field = "mobilePhone", country = "US", $content, $locale, className }) {
597
815
  const { mode, draft, savedValues, fieldErrors, pending, registerField, setField } = useMyAccountProfile();
816
+ const { format } = useMessageFormatter(MyAccountProfilePhoneControlContent, $content);
598
817
  useEffect(() => {
599
818
  return registerField({
600
819
  key: field,
601
- validate: (value) => value.trim() && !validatePhoneNumber(value, country) ? invalidMessage : null,
820
+ validate: (value) => value.trim() && !validatePhoneNumber(value, country) ? format("invalidMessage") : null,
602
821
  normalize: (value) => value.trim() ? toE164(value, country) : value
603
822
  });
604
823
  }, [
605
824
  field,
606
825
  country,
607
- invalidMessage,
826
+ format,
608
827
  registerField
609
828
  ]);
610
829
  const error = fieldErrors[field];
@@ -618,14 +837,14 @@ function MyAccountProfilePhoneControl({ label = "Phone", field = "mobilePhone",
618
837
  "data-fs-my-account-profile-field": field,
619
838
  children: /* @__PURE__ */ jsx(PhoneField, {
620
839
  className,
621
- label,
840
+ label: format("label"),
622
841
  country,
623
842
  requirement: "optional",
624
843
  value: draft[field],
625
844
  onValueChange: (value) => setField(field, value),
626
845
  invalid: !!error,
627
846
  error: error ?? void 0,
628
- errorInvalid: invalidMessage,
847
+ errorInvalid: format("invalidMessage"),
629
848
  isDisabled: pending,
630
849
  "data-fs-my-account-profile-phone": field
631
850
  })
@@ -635,45 +854,31 @@ const MyAccountProfileTaxIdControlDefinition = defineComponent({
635
854
  name: "MyAccountProfileTaxIdControl",
636
855
  importPath: "@vtex/faststore/components",
637
856
  component: MyAccountProfileTaxIdControl,
857
+ content: MyAccountProfileTaxIdControlContent,
638
858
  requiresContext: "my-account-profile",
639
859
  editor: {
640
860
  label: "My Account Profile Tax ID Control",
641
861
  category: "identity"
642
862
  },
643
- schema: {
644
- label: {
645
- type: "string",
646
- default: "National tax ID",
647
- label: "Label"
648
- },
649
- invalidMessage: {
650
- type: "string",
651
- default: "Invalid document number.",
652
- label: "Invalid message"
653
- },
654
- lockedReason: {
655
- type: "string",
656
- default: "Your document ID can't be edited.",
657
- label: "Locked reason"
658
- }
659
- },
660
- guideline: "Draft-bound, optional national tax-ID field for the Root's active document type: CPF, SSN, SIN or RFC, each with its own mask and validation. Self-gates on that type and renders nothing when it is unset or unknown. A saved value renders as a disabled, locked input in the edit state rather than disappearing (Decision 4); an unsaved value renders as an editable field. Must be a descendant of MyAccountProfileRoot."
863
+ schema: {},
864
+ guideline: "Draft-bound, optional national tax-ID field for the Root's active document type: CPF, SSN, SIN or RFC, each with its own mask and validation. Self-gates on that type and renders nothing when it is unset or unknown. Its copy is the $content fields label, invalidMessage and lockedReason. A saved value renders as a disabled, locked input in the edit state rather than disappearing (Decision 4); an unsaved value renders as an editable field. Must be a descendant of MyAccountProfileRoot."
661
865
  });
662
- function MyAccountProfileTaxIdControl({ label = "National tax ID", invalidMessage = "Invalid document number.", lockedReason = "Your document ID can't be edited.", className }) {
866
+ function MyAccountProfileTaxIdControl({ $content, $locale, className }) {
663
867
  const { mode, draft, savedValues, fieldErrors, pending, activeDocumentType, registerField, setField } = useMyAccountProfile();
868
+ const { format } = useMessageFormatter(MyAccountProfileTaxIdControlContent, $content);
664
869
  const documentType = activeDocumentType && isSupportedDocumentType(activeDocumentType) ? activeDocumentType : void 0;
665
870
  const hasSavedDocument = savedValues.document.trim() !== "";
666
871
  useEffect(() => {
667
872
  if (!documentType || hasSavedDocument) return;
668
873
  return registerField({
669
874
  key: "document",
670
- validate: (value) => value.trim() && !isValidDocument(value, documentType) ? invalidMessage : null,
875
+ validate: (value) => value.trim() && !isValidDocument(value, documentType) ? format("invalidMessage") : null,
671
876
  normalize: (value) => DOCUMENTS[documentType].sanitize(value)
672
877
  });
673
878
  }, [
674
879
  documentType,
675
880
  hasSavedDocument,
676
- invalidMessage,
881
+ format,
677
882
  registerField
678
883
  ]);
679
884
  if (!documentType) return null;
@@ -684,25 +889,28 @@ function MyAccountProfileTaxIdControl({ label = "National tax ID", invalidMessag
684
889
  "data-fs-my-account-profile-field": "document",
685
890
  children: savedValues.document ? maskDocumentValue(savedValues.document, documentType) : ""
686
891
  });
687
- if (hasSavedDocument) return /* @__PURE__ */ jsxs(Field.Root, {
688
- className,
689
- "data-fs-my-account-profile-tax-id": "",
690
- "data-fs-my-account-profile-field": "document",
691
- children: [
692
- /* @__PURE__ */ jsx(Field.Label, { children: label }),
693
- /* @__PURE__ */ jsx(Field.Control, {
694
- readOnly: true,
695
- "aria-disabled": "true",
696
- title: lockedReason,
697
- value: maskDocumentValue(savedValues.document, documentType),
698
- "data-fs-my-account-profile-tax-id-readonly": ""
699
- }),
700
- /* @__PURE__ */ jsx(Field.Description, { children: lockedReason })
701
- ]
702
- });
892
+ if (hasSavedDocument) {
893
+ const lockedReason = format("lockedReason");
894
+ return /* @__PURE__ */ jsxs(Field.Root, {
895
+ className,
896
+ "data-fs-my-account-profile-tax-id": "",
897
+ "data-fs-my-account-profile-field": "document",
898
+ children: [
899
+ /* @__PURE__ */ jsx(Field.Label, { children: format("label") }),
900
+ /* @__PURE__ */ jsx(Field.Control, {
901
+ readOnly: true,
902
+ "aria-disabled": "true",
903
+ title: lockedReason,
904
+ value: maskDocumentValue(savedValues.document, documentType),
905
+ "data-fs-my-account-profile-tax-id-readonly": ""
906
+ }),
907
+ /* @__PURE__ */ jsx(Field.Description, { children: lockedReason })
908
+ ]
909
+ });
910
+ }
703
911
  return /* @__PURE__ */ jsx(DocumentField, {
704
912
  className,
705
- label,
913
+ label: format("label"),
706
914
  documentType,
707
915
  value: draft.document,
708
916
  onValueChange: (value) => setField("document", value),
@@ -717,20 +925,18 @@ const MyAccountProfileBirthDateControlDefinition = defineComponent({
717
925
  name: "MyAccountProfileBirthDateControl",
718
926
  importPath: "@vtex/faststore/components",
719
927
  component: MyAccountProfileBirthDateControl,
928
+ content: MyAccountProfileBirthDateControlContent,
720
929
  requiresContext: "my-account-profile",
721
930
  editor: {
722
931
  label: "My Account Profile Birth Date Control",
723
932
  category: "identity"
724
933
  },
725
- schema: { label: {
726
- type: "string",
727
- default: "Birth date",
728
- label: "Label"
729
- } },
730
- guideline: "Draft-bound, optional birth-date field over a native date input. Maps the native yyyy-mm-dd value to the stored profile format on read and write. Must be a descendant of MyAccountProfileRoot."
934
+ schema: {},
935
+ guideline: "Draft-bound, optional birth-date field over a native date input, labelled by the $content field label. Maps the native yyyy-mm-dd value to the stored profile format on read and write. Must be a descendant of MyAccountProfileRoot."
731
936
  });
732
- function MyAccountProfileBirthDateControl({ label = "Birth date", className }) {
937
+ function MyAccountProfileBirthDateControl({ $content, $locale, className }) {
733
938
  const { mode, draft, savedValues, pending, registerField, setField } = useMyAccountProfile();
939
+ const { format } = useMessageFormatter(MyAccountProfileBirthDateControlContent, $content);
734
940
  useEffect(() => {
735
941
  return registerField({
736
942
  key: "birthDate",
@@ -750,7 +956,7 @@ function MyAccountProfileBirthDateControl({ label = "Birth date", className }) {
750
956
  className,
751
957
  "data-fs-my-account-profile-birth-date": "",
752
958
  "data-fs-my-account-profile-field": "birthDate",
753
- children: [/* @__PURE__ */ jsx(Field.Label, { children: label }), /* @__PURE__ */ jsx(Input, {
959
+ children: [/* @__PURE__ */ jsx(Field.Label, { children: format("label") }), /* @__PURE__ */ jsx(Input, {
754
960
  type: "date",
755
961
  value: toNativeDate(draft.birthDate),
756
962
  onChange: handleChange,
@@ -762,32 +968,22 @@ const MyAccountProfileGenderControlDefinition = defineComponent({
762
968
  name: "MyAccountProfileGenderControl",
763
969
  importPath: "@vtex/faststore/components",
764
970
  component: MyAccountProfileGenderControl,
971
+ content: MyAccountProfileGenderControlContent,
765
972
  requiresContext: "my-account-profile",
766
973
  editor: {
767
974
  label: "My Account Profile Gender Control",
768
975
  category: "identity"
769
976
  },
770
- schema: {
771
- label: {
772
- type: "string",
773
- default: "Gender",
774
- label: "Label"
775
- },
776
- placeholder: {
777
- type: "string",
778
- default: "Select",
779
- label: "Placeholder"
780
- },
781
- clearLabel: {
782
- type: "string",
783
- default: "Clear",
784
- label: "Clear button label"
785
- }
786
- },
787
- guideline: "Draft-bound, optional gender field over a store-configurable set of options (the options prop). Free-string storage — no server-side enum. A Clear button erases a selected value back to empty, since the Select itself offers no such option. Must be a descendant of MyAccountProfileRoot."
977
+ schema: {},
978
+ guideline: "Draft-bound, optional gender field over a store-configurable set of options (the options prop); its label, placeholder and clear label are the $content fields label, placeholder and clearLabel. Without authored options it offers female, male, other and prefer not to say, labelled by the $content fields femaleLabel, maleLabel, otherLabel and preferNotToSayLabel. Free-string storage — no server-side enum. A Clear button erases a selected value back to empty, since the Select itself offers no such option. Must be a descendant of MyAccountProfileRoot."
788
979
  });
789
- function MyAccountProfileGenderControl({ label = "Gender", placeholder = "Select", clearLabel = "Clear", options = DEFAULT_GENDER_OPTIONS, className }) {
980
+ function MyAccountProfileGenderControl({ options: authoredOptions, $content, $locale, className }) {
790
981
  const { mode, draft, savedValues, pending, registerField, setField } = useMyAccountProfile();
982
+ const { format } = useMessageFormatter(MyAccountProfileGenderControlContent, $content);
983
+ const options = useMemo(() => authoredOptions ?? DEFAULT_GENDER_OPTIONS.map(({ value, field }) => ({
984
+ value,
985
+ label: format(field)
986
+ })), [authoredOptions, format]);
791
987
  useEffect(() => {
792
988
  return registerField({ key: "gender" });
793
989
  }, [registerField]);
@@ -809,8 +1005,8 @@ function MyAccountProfileGenderControl({ label = "Gender", placeholder = "Select
809
1005
  onValueChange: (value) => setField("gender", value ?? ""),
810
1006
  disabled: pending,
811
1007
  children: [
812
- /* @__PURE__ */ jsx(Select.Label, { children: label }),
813
- /* @__PURE__ */ jsxs(Select.Trigger, { children: [/* @__PURE__ */ jsx(Select.Value, { placeholder }), /* @__PURE__ */ jsx(Select.Icon, {})] }),
1008
+ /* @__PURE__ */ jsx(Select.Label, { children: format("label") }),
1009
+ /* @__PURE__ */ jsxs(Select.Trigger, { children: [/* @__PURE__ */ jsx(Select.Value, { placeholder: format("placeholder") }), /* @__PURE__ */ jsx(Select.Icon, {})] }),
814
1010
  /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(Select.Popup, { children: /* @__PURE__ */ jsx(Select.List, { children: options.map((option) => /* @__PURE__ */ jsx(Select.Item, {
815
1011
  value: option.value,
816
1012
  children: /* @__PURE__ */ jsx(Select.ItemText, { children: option.label })
@@ -821,7 +1017,7 @@ function MyAccountProfileGenderControl({ label = "Gender", placeholder = "Select
821
1017
  onClick: () => setField("gender", ""),
822
1018
  disabled: pending,
823
1019
  "data-fs-my-account-profile-gender-clear": "",
824
- children: clearLabel
1020
+ children: format("clearLabel")
825
1021
  }) : null]
826
1022
  });
827
1023
  }
@@ -852,6 +1048,6 @@ const MyAccountProfile = {
852
1048
  GenderControlDefinition: MyAccountProfileGenderControlDefinition
853
1049
  };
854
1050
  //#endregion
855
- export { MyAccountProfile, MyAccountProfileBirthDateControl, MyAccountProfileBirthDateControlDefinition, MyAccountProfileCancelButton, MyAccountProfileCancelButtonDefinition, MyAccountProfileEditButton, MyAccountProfileEditButtonDefinition, MyAccountProfileEmail, MyAccountProfileEmailDefinition, MyAccountProfileFirstNameControl, MyAccountProfileFirstNameControlDefinition, MyAccountProfileGenderControl, MyAccountProfileGenderControlDefinition, MyAccountProfileLastNameControl, MyAccountProfileLastNameControlDefinition, MyAccountProfilePhoneControl, MyAccountProfilePhoneControlDefinition, MyAccountProfileRoot, MyAccountProfileRootDefinition, MyAccountProfileSaveButton, MyAccountProfileSaveButtonDefinition, MyAccountProfileSkeleton, MyAccountProfileSkeletonDefinition, MyAccountProfileTaxIdControl, MyAccountProfileTaxIdControlDefinition, useMyAccountProfile };
1051
+ export { MY_ACCOUNT_PROFILE_ERROR_FIELDS, MyAccountProfile, MyAccountProfileBirthDateControl, MyAccountProfileBirthDateControlContent, MyAccountProfileBirthDateControlDefinition, MyAccountProfileCancelButton, MyAccountProfileCancelButtonContent, MyAccountProfileCancelButtonDefinition, MyAccountProfileEditButton, MyAccountProfileEditButtonContent, MyAccountProfileEditButtonDefinition, MyAccountProfileEmail, MyAccountProfileEmailDefinition, MyAccountProfileFirstNameControl, MyAccountProfileFirstNameControlContent, MyAccountProfileFirstNameControlDefinition, MyAccountProfileGenderControl, MyAccountProfileGenderControlContent, MyAccountProfileGenderControlDefinition, MyAccountProfileLastNameControl, MyAccountProfileLastNameControlContent, MyAccountProfileLastNameControlDefinition, MyAccountProfilePhoneControl, MyAccountProfilePhoneControlContent, MyAccountProfilePhoneControlDefinition, MyAccountProfileRoot, MyAccountProfileRootContent, MyAccountProfileRootDefinition, MyAccountProfileSaveButton, MyAccountProfileSaveButtonContent, MyAccountProfileSaveButtonDefinition, MyAccountProfileSkeleton, MyAccountProfileSkeletonDefinition, MyAccountProfileTaxIdControl, MyAccountProfileTaxIdControlContent, MyAccountProfileTaxIdControlDefinition, useMyAccountProfile };
856
1052
 
857
1053
  //# sourceMappingURL=my-account-profile.js.map