@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,21 +1,81 @@
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";
4
5
  import { resolveSiteRelativeHref } from "../../utils/safe-href.js";
6
+ import { resolveStorefrontHref } from "../../sdk/navigation/resolve-storefront-href.js";
7
+ import { useStorefrontContext } from "../../sdk/context/storefront-context.js";
8
+ import { useMessageFormatter } from "../../sdk/i18n/use-message-formatter.js";
9
+ import { useRouteMap } from "../../sdk/navigation/route-map-provider.js";
5
10
  import { useStorefrontNavigation } from "../../sdk/navigation/use-storefront-navigation.js";
6
11
  import { useActionsOverride } from "../../sdk/actions/actions-override-context.js";
12
+ import { formatErrorCode } from "../../sdk/i18n/format-error-code.js";
7
13
  import { useDataOverride } from "../../sdk/data/data-override-context.js";
8
14
  import { Button } from "../../particles/button/button.js";
9
15
  import { usePayment } from "../payment/payment.js";
10
16
  import { refusalTargetOf, usePaymentSubmitGate } from "../payment/use-payment-submit-gate.js";
17
+ import { buildChallengeReturnQuery } from "../../sdk/payment/challenge-return.js";
18
+ import { useSettledOrderRead } from "../../sdk/payment/resumed-purchase.js";
11
19
  import { usePlaceOrder } from "../../sdk/payment/use-place-order.js";
12
- import { useEffect, useId, useLayoutEffect, useState } from "react";
20
+ import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
13
21
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
14
- const PlaceOrderDefinition = defineComponent({
15
- name: "PlaceOrder",
16
- importPath: "@vtex/faststore/components",
17
- component: PlaceOrder,
18
- fragment: `
22
+ //#region src/matter/place-order/place-order.tsx
23
+ /**
24
+ * The `PlaceOrder` CTA matter (specs/place-order.md, T14 of the Credit Card epic;
25
+ * docs/features/credit-card/rfc.md § D9). Drives T13's `usePlaceOrder` orchestration hook and renders
26
+ * the three v1 states the RFC names: the idle CTA, a blocking loading state while the three-call
27
+ * sequence runs, and an inline outcome (error or success) once it settles.
28
+ *
29
+ * **Composes as a sibling of the card entry (T7) and the saved cards list (T12) under the payment
30
+ * root, never nested inside either.** That placement is what lets this one CTA serve both the
31
+ * new-card and saved-card paths — nesting it inside a card form, as the legacy `CardForm` does,
32
+ * would force a second CTA for the saved-card path. This is a documented authoring convention, not a
33
+ * compiler guarantee: `requiresContext: 'payment'` (ADR-0009) only fails the build when *no* ancestor
34
+ * at any depth declares `providesContext: 'payment'` — there is no `forbidsAncestor` token, so a
35
+ * schema that nests this component inside `CardEntry`/`SavedCards` instead of beside them still
36
+ * compiles and still resolves the context from the payment root further up. This component throws
37
+ * at runtime only when rendered entirely outside a `PaymentSectionRoot`/`Controller` subtree — both
38
+ * `usePayment()` (read directly below, for `draft.billingAddressDifferent`) and `usePlaceOrder` (via
39
+ * the submission channel those roots provide) enforce that guard, with `usePayment()` throwing first
40
+ * since its value feeds `usePlaceOrder`'s own argument — a real, load-bearing guard, but a weaker one
41
+ * than "must be a sibling." See specs/place-order.md's open items for this gap.
42
+ *
43
+ * **This component never touches card data.** It declares its own thin fragment for the read-model
44
+ * slice `usePlaceOrder` needs (`selectedMethodId`, `selectedInstallment`, `methods` — ADR-0011,
45
+ * mirroring `PaymentSummaryData`/`PaymentSectionData`) and forwards it plus `$actions` straight into
46
+ * the hook. The one fact it reads off `usePayment()`'s context directly is `draft.billingAddressDifferent`
47
+ * (T11's widening of `PaymentDraft`), forwarded into `usePlaceOrder`'s own optional argument of the
48
+ * same name so the gateway descriptor carries the shopper's choice (fix pass, PR #544 review F1) —
49
+ * still not a card field, since `PaymentDraft` never carries one. `usePaymentSubmitGate()` (T24)
50
+ * resolves the client-side document/billing refusal off that same context and is forwarded as
51
+ * `usePlaceOrder`'s `submitGate` argument — an opaque `PaymentUserError | null`, never the facts
52
+ * behind it. The hook already owns `placing`, `userErrors`, and `orderId` — including releasing
53
+ * `placing` on every failure path — so this component only reflects that state, never re-implements it.
54
+ *
55
+ * `attempted` is the one bit of state this component adds, and it is not a duplicate of anything the
56
+ * hook owns: `usePlaceOrder`'s `userErrors: []` is both the pre-attempt state and the settled-success
57
+ * state (T13 does not disambiguate the two, by design — see `UsePlaceOrder`'s doc), so distinguishing
58
+ * "never attempted" from "attempted and succeeded" is exactly this component's job. `succeeded` is
59
+ * derived, not stored: `attempted && !placing && userErrors.length === 0`.
60
+ *
61
+ * **T29 widens both `succeeded` and the button label with the surviving `attempt` record read off
62
+ * `usePayment()`** (specs/make-an-order-attempt-survive-a.md), never mirrored into local state:
63
+ * `attempted`/`userErrors`/`orderId` all restart at their pre-attempt defaults on every mount, but the
64
+ * attempt record does not, so a remount renders its truth rather than this instance's own fresh state.
65
+ * `succeeded` is `true` whenever the record's own phase is `'settled'`, independent of `attempted`; the
66
+ * button shows `resumeLabel` instead of `label` whenever the phase is `'sent'` or `'unresolved'` — the
67
+ * card already left the browser (or its fate is unknown) and the next click finalizes it through
68
+ * `usePlaceOrder`'s `resume()` rather than opening a new transaction.
69
+ *
70
+ * The button disables on `placing` (the required blocking state) and, deliberately, on `succeeded`
71
+ * too — an already-placed order has nothing left to submit, and a second click risks exactly the
72
+ * duplicate-transaction outcome T13's own concurrency guard (Decision 6) calls "the worst outcome
73
+ * this task's surface has". `usePlaceOrder`'s in-flight ref is the inner guard; this is the outer one.
74
+ * Fix pass, finding S-F1: it also disables on the *shared* `usePayment().placing`, since a second
75
+ * composed `PlaceOrder` has no other way to learn a sibling instance already opened a transaction —
76
+ * each `usePlaceOrder()` call owns its own, independent `inFlight` ref.
77
+ */
78
+ const fragment = `
19
79
  fragment PlaceOrderData on Query {
20
80
  payment {
21
81
  __typename
@@ -37,7 +97,168 @@ const PlaceOrderDefinition = defineComponent({
37
97
  }
38
98
  }
39
99
  }
40
- `,
100
+ `;
101
+ const PlaceOrderContent = defineContentType({
102
+ id: "place-order",
103
+ title: "Place Order",
104
+ description: "The place-order button labels, the message while placing, the success message, and the message for each refusal it words.",
105
+ schema: {
106
+ type: "object",
107
+ additionalProperties: false,
108
+ properties: {
109
+ label: {
110
+ type: "string",
111
+ title: "Button label",
112
+ format: "icu-message",
113
+ messageSource: "Place order"
114
+ },
115
+ placingLabel: {
116
+ type: "string",
117
+ title: "Button label while placing",
118
+ format: "icu-message",
119
+ messageSource: "Placing order..."
120
+ },
121
+ placingMessage: {
122
+ type: "string",
123
+ title: "Message while placing",
124
+ format: "icu-message",
125
+ messageSource: "Processing your payment. Please keep this page open.",
126
+ messageOptional: true
127
+ },
128
+ resumeLabel: {
129
+ type: "string",
130
+ title: "Button label while a surviving attempt offers a resume",
131
+ format: "icu-message",
132
+ messageSource: "Complete your order"
133
+ },
134
+ successMessage: {
135
+ type: "string",
136
+ title: "Success message",
137
+ format: "icu-message",
138
+ messageSource: "Order placed successfully."
139
+ },
140
+ missingSubmissionMessage: {
141
+ type: "string",
142
+ title: "Missing payment submission message",
143
+ format: "icu-message",
144
+ messageSource: "Enter your payment details before placing the order."
145
+ },
146
+ missingMethodMessage: {
147
+ type: "string",
148
+ title: "Missing payment method message",
149
+ format: "icu-message",
150
+ messageSource: "Choose a payment method before placing the order."
151
+ },
152
+ invalidTransactionMessage: {
153
+ type: "string",
154
+ title: "Invalid transaction message",
155
+ format: "icu-message",
156
+ messageSource: "Unable to start the payment. Please try again."
157
+ },
158
+ networkErrorMessage: {
159
+ type: "string",
160
+ title: "Network error message",
161
+ format: "icu-message",
162
+ messageSource: "Unable to complete the request. Please try again."
163
+ },
164
+ missingDocumentMessage: {
165
+ type: "string",
166
+ title: "Missing document message",
167
+ format: "icu-message",
168
+ messageSource: "Enter your document before placing the order."
169
+ },
170
+ invalidDocumentMessage: {
171
+ type: "string",
172
+ title: "Invalid document message",
173
+ format: "icu-message",
174
+ messageSource: "Enter a valid document before placing the order."
175
+ },
176
+ unavailableMethodMessage: {
177
+ type: "string",
178
+ title: "Unavailable payment method message",
179
+ format: "icu-message",
180
+ messageSource: "Choose another payment method before placing the order."
181
+ },
182
+ unsavedBillingAddressMessage: {
183
+ type: "string",
184
+ title: "Unsaved billing address message",
185
+ format: "icu-message",
186
+ messageSource: "Save your billing address before placing the order."
187
+ },
188
+ missingProfileNameMessage: {
189
+ type: "string",
190
+ title: "Missing name message",
191
+ format: "icu-message",
192
+ messageSource: "Enter your first and last name before placing the order."
193
+ },
194
+ missingProfilePhoneMessage: {
195
+ type: "string",
196
+ title: "Missing phone message",
197
+ format: "icu-message",
198
+ messageSource: "Enter your phone number before placing the order."
199
+ },
200
+ invalidCardDataMessage: {
201
+ type: "string",
202
+ title: "Invalid card data message",
203
+ format: "icu-message",
204
+ messageSource: "Enter valid card details before placing the order."
205
+ },
206
+ unsupportedNetworkMessage: {
207
+ type: "string",
208
+ title: "Unsupported card network message",
209
+ format: "icu-message",
210
+ messageSource: "This card is not from a network the store accepts. Use another card or choose another payment method."
211
+ },
212
+ invalidSecurityCodeMessage: {
213
+ type: "string",
214
+ title: "Invalid security code message",
215
+ format: "icu-message",
216
+ messageSource: "Enter a valid security code before placing the order."
217
+ },
218
+ gatewayErrorMessage: {
219
+ type: "string",
220
+ title: "Gateway error message",
221
+ format: "icu-message",
222
+ messageSource: "Unable to complete the payment. Please try again."
223
+ },
224
+ inFlightMessage: {
225
+ type: "string",
226
+ title: "Order already in flight message",
227
+ format: "icu-message",
228
+ messageSource: "This order is already being placed. Please wait."
229
+ },
230
+ unconfirmedMessage: {
231
+ type: "string",
232
+ title: "Unconfirmed order message",
233
+ format: "icu-message",
234
+ messageSource: "We could not confirm your order yet. Your payment may still be processing, so please do not pay again."
235
+ },
236
+ declinedMessage: {
237
+ type: "string",
238
+ title: "Declined payment message",
239
+ format: "icu-message",
240
+ messageSource: "Check your payment information or choose another payment method."
241
+ },
242
+ lapsedTransactionMessage: {
243
+ type: "string",
244
+ title: "Lapsed payment window message",
245
+ format: "icu-message",
246
+ messageSource: "We could not confirm your order yet. Your payment may still be processing, so please do not pay again."
247
+ },
248
+ challengeUnavailableMessage: {
249
+ type: "string",
250
+ title: "Unavailable bank verification message",
251
+ format: "icu-message",
252
+ messageSource: "Your bank asked for an extra verification step that we could not open. Your payment may still be processing, so please do not pay again."
253
+ }
254
+ }
255
+ }
256
+ });
257
+ const PlaceOrderDefinition = defineComponent({
258
+ name: "PlaceOrder",
259
+ importPath: "@vtex/faststore/components",
260
+ component: PlaceOrder,
261
+ fragment,
41
262
  fetchStrategy: "reactive",
42
263
  actions: {
43
264
  payment: ["startTransaction", "gatewayCallback"],
@@ -48,116 +269,27 @@ const PlaceOrderDefinition = defineComponent({
48
269
  label: "Place Order",
49
270
  category: "commerce"
50
271
  },
272
+ content: PlaceOrderContent,
51
273
  schema: {
52
- label: {
53
- type: "string",
54
- default: "Place order",
55
- label: "Button label"
56
- },
57
- placingLabel: {
58
- type: "string",
59
- default: "Placing order...",
60
- label: "Button label while placing"
61
- },
62
- placingMessage: {
63
- type: "string",
64
- label: "Message shown while placing the order"
65
- },
66
- resumeLabel: {
67
- type: "string",
68
- default: "Complete your order",
69
- label: "Button label while a surviving attempt offers a resume"
70
- },
71
- successMessage: {
72
- type: "string",
73
- default: "Order placed successfully.",
74
- label: "Success message"
75
- },
76
- missingSubmissionMessage: {
77
- type: "string",
78
- default: "Enter your payment details before placing the order.",
79
- label: "Missing payment submission message"
80
- },
81
- missingMethodMessage: {
82
- type: "string",
83
- default: "Choose a payment method before placing the order.",
84
- label: "Missing payment method message"
85
- },
86
- invalidTransactionMessage: {
87
- type: "string",
88
- default: "Unable to start the payment. Please try again.",
89
- label: "Invalid transaction message"
90
- },
91
- networkErrorMessage: {
92
- type: "string",
93
- default: "Unable to complete the request. Please try again.",
94
- label: "Network error message"
95
- },
96
- missingDocumentMessage: {
97
- type: "string",
98
- default: "Enter your document before placing the order.",
99
- label: "Missing document message"
100
- },
101
- invalidDocumentMessage: {
102
- type: "string",
103
- default: "Enter a valid document before placing the order.",
104
- label: "Invalid document message"
105
- },
106
- unavailableMethodMessage: {
107
- type: "string",
108
- default: "Choose another payment method before placing the order.",
109
- label: "Unavailable payment method message"
110
- },
111
- unsavedBillingAddressMessage: {
112
- type: "string",
113
- default: "Save your billing address before placing the order.",
114
- label: "Unsaved billing address message"
115
- },
116
- invalidCardDataMessage: {
117
- type: "string",
118
- default: "Enter valid card details before placing the order.",
119
- label: "Invalid card data message"
120
- },
121
- unsupportedNetworkMessage: {
122
- type: "string",
123
- default: "This card is not from a network the store accepts. Use another card or choose another payment method.",
124
- label: "Unsupported card network message"
125
- },
126
- invalidSecurityCodeMessage: {
127
- type: "string",
128
- default: "Enter a valid security code before placing the order.",
129
- label: "Invalid security code message"
130
- },
131
- gatewayErrorMessage: {
132
- type: "string",
133
- default: "Unable to complete the payment. Please try again.",
134
- label: "Gateway error message"
135
- },
136
- inFlightMessage: {
137
- type: "string",
138
- default: "This order is already being placed. Please wait.",
139
- label: "Order already in flight message"
140
- },
141
- unconfirmedMessage: {
142
- type: "string",
143
- default: "We could not confirm your order yet. Your payment may still be processing, so please do not pay again.",
144
- label: "Unconfirmed order message"
145
- },
146
274
  successHref: {
147
275
  type: "link",
148
276
  default: { standard: "order-placed" },
149
- fills: ["orderGroup"],
277
+ fills: ["orderId"],
150
278
  label: "Confirmation Page"
279
+ },
280
+ challengeReturnHref: {
281
+ type: "link",
282
+ label: "Bank challenge return page"
151
283
  }
152
284
  },
153
- guideline: "The place-order CTA: invokes usePlaceOrder's three-call sequence (start transaction, the registered submission's own direct-to-gateway leg, then the gateway callback) and blocks interaction while it runs. Compose it as a sibling — never a child — of every other payment-entry leaf under the same PaymentSectionRoot or PaymentSectionController, so the one CTA serves every entry path. Renders one inline outcome after settling: the first userError's message, or successMessage on a clean settle. While the order is being placed it renders nothing but the button, unless placingMessage is set: then a status message shows beside the button, and the rest of the payment form is blocked for as long as it shows. This component reaches no payment-sensitive input. Must be inside a payment root. See place-order.md."
285
+ guideline: "The place-order CTA: invokes usePlaceOrder's three-call sequence (start transaction, the registered submission's own direct-to-gateway leg, then the gateway callback) and blocks interaction while it runs. Compose it as a sibling — never a child — of every other payment-entry leaf under the same PaymentSectionRoot or PaymentSectionController, so the one CTA serves every entry path. Its button labels and messages are $content fields (label, placingLabel, placingMessage, resumeLabel, successMessage, and one message per refusal code it words). Renders one inline outcome after settling: the message for the first userError's code (networkErrorMessage for a code it does not word), or successMessage on a clean settle. While the order is being placed it renders nothing but the button, unless the placingMessage message is authored: then a status message shows beside the button, and the rest of the payment form is blocked for as long as it shows. When challengeReturnHref names a return page of the store and the bank asks for a challenge, the shopper is sent to the bank with the form blocked and no success or error shown; the return page finishes the order. This component reaches no payment-sensitive input. Must be inside a payment root. See place-order.md."
154
286
  });
155
287
  /** The default confirmation page. */
156
288
  const ORDER_PLACED_PAGE = { standard: "order-placed" };
157
289
  /**
158
290
  * Fail-closed warning for a string `successHref` that is not a path of this store. Nothing upstream
159
291
  * validates a string prop's shape, and an absolute or protocol-relative value would turn this CTA into
160
- * an open redirect that fires right after a real purchase, carrying the shopper's own order group to
292
+ * an open redirect that fires right after a real purchase, carrying the shopper's own order id to
161
293
  * another origin. Dev-only, like every other authoring warning in this component.
162
294
  */
163
295
  function warnUnsafeSuccessHref(successHref, reason) {
@@ -167,38 +299,109 @@ function warnUnsafeSuccessHref(successHref, reason) {
167
299
  /**
168
300
  * Fail-closed warning for a string `successHref` that still carries a `{token}`, the template form this
169
301
  * prop took before page references. Nothing fills the token any more, so navigating would land the
170
- * shopper on a literal `%7BorderGroup%7D` 404 right after paying. Dev-only.
302
+ * shopper on a literal `%7BorderId%7D` 404 right after paying. Dev-only.
171
303
  */
172
304
  function warnTemplateSuccessHref(successHref) {
173
305
  if (process.env.NODE_ENV === "production") return;
174
306
  console.warn(`[PlaceOrder] successHref "${successHref}" is a route template; refusing to navigate there. Reference the confirmation page instead: { standard: 'order-placed' }.`);
175
307
  }
176
308
  /**
177
- * Navigates once `orderId` transitions to a non-empty value — not on `succeeded` (Decision 4) — so a
178
- * null or empty order group and every failure path never navigate. `userErrors` is also consulted
309
+ * Dev-only warning for a `challengeReturnHref` this CTA cannot build a return URL from. Nothing upstream
310
+ * validates a link prop's shape at runtime, and a string would have to be turned into an absolute URL the
311
+ * bank must come back to; so the prop is a page reference or nothing, and the shopper keeps the refusal
312
+ * a challenge answer gets without a return page.
313
+ */
314
+ function warnUnusableChallengeReturnHref(reason) {
315
+ if (process.env.NODE_ENV === "production") return;
316
+ console.warn(`[PlaceOrder] challengeReturnHref ${reason}; sending no return URL, so a bank challenge cannot be followed. Reference a page of this store instead: { page: 'checkout-challenge-return' }.`);
317
+ }
318
+ function isPageRef(value) {
319
+ return typeof value === "object" && value !== null && !Array.isArray(value);
320
+ }
321
+ /**
322
+ * The builder `usePlaceOrder` calls with an opened order's group: the absolute URL of the authored return
323
+ * page, carrying the group and the literal flag, or `null` when the store authored none or it cannot be
324
+ * built. Resolved through `resolveStorefrontHref`, which never logs, so an unusable prop warns exactly once
325
+ * here, naming itself. Keyed on the serialized reference, not its identity: a reference authored in a
326
+ * schema arrives as a new object on every server render.
327
+ */
328
+ function useChallengeReturn(challengeReturnHref) {
329
+ const { bindingId, basePath } = useStorefrontContext();
330
+ const { routeMap } = useRouteMap();
331
+ const authoredKey = challengeReturnHref === void 0 ? null : JSON.stringify(challengeReturnHref);
332
+ return useCallback((orderGroup) => {
333
+ if (authoredKey === null) return null;
334
+ const authored = JSON.parse(authoredKey);
335
+ if (!isPageRef(authored)) {
336
+ warnUnusableChallengeReturnHref("is not a page reference");
337
+ return null;
338
+ }
339
+ const query = buildChallengeReturnQuery(orderGroup);
340
+ if (query === null) return null;
341
+ const resolved = resolveStorefrontHref({
342
+ bindingId,
343
+ basePath
344
+ }, routeMap, {
345
+ ...authored,
346
+ query: {
347
+ ...authored.query,
348
+ ...query
349
+ }
350
+ });
351
+ if (resolved.href === null) {
352
+ warnUnusableChallengeReturnHref(`names a page this store does not serve (${resolved.reason})`);
353
+ return null;
354
+ }
355
+ return `${globalThis.location.origin}${resolved.href}`;
356
+ }, [
357
+ authoredKey,
358
+ bindingId,
359
+ basePath,
360
+ routeMap
361
+ ]);
362
+ }
363
+ /**
364
+ * Hands the document to the bank once `redirectUrl` is set. `useStorefrontNavigation().push` makes an
365
+ * absolute URL a document load, which unloads this page: nothing here draws a success or an error, and the
366
+ * hook keeps `placing` true so the form stays blocked until the browser leaves. A ref remembers the URL
367
+ * already navigated to, so neither a re-render nor StrictMode's second effect pass navigates twice.
368
+ */
369
+ function PlaceOrderNavigateOnRedirect({ redirectUrl }) {
370
+ const { push } = useStorefrontNavigation();
371
+ const navigatedTo = useRef(null);
372
+ useEffect(() => {
373
+ if (!redirectUrl || navigatedTo.current === redirectUrl) return;
374
+ navigatedTo.current = redirectUrl;
375
+ push(redirectUrl);
376
+ }, [redirectUrl, push]);
377
+ return null;
378
+ }
379
+ /**
380
+ * Navigates once `orderNodeId` transitions to a non-empty value — not on `succeeded` (Decision 4) — so a
381
+ * null or empty order Node id and every failure path never navigate. `userErrors` is also consulted
179
382
  * directly (INV-1): this component does not own `usePlaceOrder`, so it does not rely on that hook never
180
383
  * settling an order id beside an error.
181
384
  *
182
- * The call site passes `displayOrderId` (`orderId ?? the surviving attempt's own orderId`), not the
183
- * mount-local `orderId` this type is named for: a remounted CTA whose own `usePlaceOrder()` never ran
184
- * has an empty local `orderId` forever, and would otherwise leave the shopper on the payment page.
385
+ * The call site passes `displayOrderNodeId` (`orderNodeId ?? the surviving attempt's own orderNodeId`),
386
+ * not the mount-local `orderNodeId` this type is named for: a remounted CTA whose own `usePlaceOrder()`
387
+ * never ran has an empty local `orderNodeId` forever, and would otherwise leave the shopper on the payment page.
185
388
  *
186
389
  * The effect keys on the serialized `successHref`, not on its identity: a reference authored in a
187
390
  * schema arrives as a new object on every server render, and keying on it would navigate again on a
188
391
  * `router.refresh()`.
189
392
  */
190
- function PlaceOrderNavigateOnSuccess({ successHref, orderId, userErrors }) {
393
+ function PlaceOrderNavigateOnSuccess({ successHref, orderNodeId, userErrors }) {
191
394
  const { replace } = useStorefrontNavigation();
192
395
  const successKey = JSON.stringify(successHref);
193
396
  useEffect(() => {
194
- if (!orderId || userErrors.length > 0) return;
397
+ if (!orderNodeId || userErrors.length > 0) return;
195
398
  const authored = JSON.parse(successKey);
196
399
  if (typeof authored !== "string") {
197
400
  replace({
198
401
  ...authored,
199
402
  params: {
200
403
  ...authored.params,
201
- orderGroup: orderId
404
+ orderId: orderNodeId
202
405
  }
203
406
  });
204
407
  return;
@@ -214,7 +417,7 @@ function PlaceOrderNavigateOnSuccess({ successHref, orderId, userErrors }) {
214
417
  }
215
418
  replace(destination.href);
216
419
  }, [
217
- orderId,
420
+ orderNodeId,
218
421
  successKey,
219
422
  userErrors,
220
423
  replace
@@ -222,75 +425,70 @@ function PlaceOrderNavigateOnSuccess({ successHref, orderId, userErrors }) {
222
425
  return null;
223
426
  }
224
427
  /**
225
- * Builds the code -> copy map `resolveErrorMessage` reads (Decision 1, FR-4). The codes are literal
226
- * strings, never imported constants: importing them from card-entry.tsx / saved-cards.tsx /
227
- * use-place-order.ts / use-payment-submit-gate.ts / gateway.ts here would make this file a matter ->
228
- * matter dependency (R5) — `resolvePaymentSubmitGate` and `use-place-order.ts` stay untouched and this
229
- * component still imports nothing from either module beyond the hooks it already called. Exported for
230
- * direct unit testing, mirroring card-entry.tsx's convention for its own pure helpers:
231
- * place-order.test.tsx imports the five files' own real exported code constants and asserts this
232
- * function's returned key set equals their union.
428
+ * The message field for each code in `PlaceOrderErrorCode`. The codes are literal strings, never imported
429
+ * constants: importing them from card-entry.tsx / saved-cards.tsx / use-place-order.ts /
430
+ * use-payment-submit-gate.ts / gateway.ts would make this file a matter -> matter dependency (R5).
431
+ * `CARD_ENTRY_COLLAPSED` reads as an unavailable method; the two cart codes and `NETWORK_ERROR` share the
432
+ * generic message; `ORDER_GROUP_MISMATCH`, like a lapsed cookie, means the card POST was accepted.
233
433
  */
234
- function buildAuthoredErrorMessages(messages) {
235
- return {
236
- MISSING_PAYMENT_SUBMISSION: messages.missingSubmissionMessage,
237
- MISSING_PAYMENT_METHOD_SELECTION: messages.missingMethodMessage,
238
- INVALID_TRANSACTION_DATA: messages.invalidTransactionMessage,
239
- NETWORK_ERROR: messages.networkErrorMessage,
240
- MISSING_CARDHOLDER_DOCUMENT: messages.missingDocumentMessage,
241
- INVALID_CARDHOLDER_DOCUMENT: messages.invalidDocumentMessage,
242
- UNSAVED_BILLING_ADDRESS: messages.unsavedBillingAddressMessage,
243
- INVALID_CARD_DATA: messages.invalidCardDataMessage,
244
- UNSUPPORTED_CARD_NETWORK: messages.unsupportedNetworkMessage,
245
- INVALID_SECURITY_CODE: messages.invalidSecurityCodeMessage,
246
- GATEWAY_ERROR: messages.gatewayErrorMessage,
247
- PLACE_ORDER_IN_FLIGHT: messages.inFlightMessage,
248
- PLACE_ORDER_UNCONFIRMED: messages.unconfirmedMessage,
249
- UNAVAILABLE_PAYMENT_METHOD: messages.unavailableMethodMessage
250
- };
251
- }
434
+ const PLACE_ORDER_ERROR_FIELDS = {
435
+ MISSING_PAYMENT_SUBMISSION: "missingSubmissionMessage",
436
+ MISSING_PAYMENT_METHOD_SELECTION: "missingMethodMessage",
437
+ INVALID_TRANSACTION_DATA: "invalidTransactionMessage",
438
+ NETWORK_ERROR: "networkErrorMessage",
439
+ MISSING_CARDHOLDER_DOCUMENT: "missingDocumentMessage",
440
+ INVALID_CARDHOLDER_DOCUMENT: "invalidDocumentMessage",
441
+ UNSAVED_BILLING_ADDRESS: "unsavedBillingAddressMessage",
442
+ MISSING_PROFILE_NAME: "missingProfileNameMessage",
443
+ MISSING_PROFILE_PHONE: "missingProfilePhoneMessage",
444
+ INVALID_CARD_DATA: "invalidCardDataMessage",
445
+ UNSUPPORTED_CARD_NETWORK: "unsupportedNetworkMessage",
446
+ CARD_ENTRY_COLLAPSED: "unavailableMethodMessage",
447
+ INVALID_SECURITY_CODE: "invalidSecurityCodeMessage",
448
+ GATEWAY_ERROR: "gatewayErrorMessage",
449
+ PLACE_ORDER_IN_FLIGHT: "inFlightMessage",
450
+ PLACE_ORDER_UNCONFIRMED: "unconfirmedMessage",
451
+ UNAVAILABLE_PAYMENT_METHOD: "unavailableMethodMessage",
452
+ MISSING_CART_CONTEXT: "networkErrorMessage",
453
+ CART_NOT_FOUND: "networkErrorMessage",
454
+ PAYMENT_DECLINED: "declinedMessage",
455
+ MISSING_TRANSACTION_COOKIES: "lapsedTransactionMessage",
456
+ ORDER_GROUP_MISMATCH: "lapsedTransactionMessage",
457
+ REDIRECT_REQUIRED: "challengeUnavailableMessage"
458
+ };
252
459
  /**
253
- * Resolves the alert's rendered message for one client-synthesized `PaymentUserError`: the authored
254
- * copy for its `code` when this component owns one, otherwise the error's own `message` unchanged
255
- * (US-2 AC2 — a server-returned code this component does not author must render verbatim).
256
- *
257
- * `||`, not `??` (fix pass, finding 7): a store author can write `""` for a code's authored message —
258
- * a valid, if unusual, `type: 'string'` prop value — and `??` only falls through on `null`/`undefined`,
259
- * so an authored empty string would render as an empty `role="alert"` on a genuine gateway refusal,
260
- * leaving the shopper with no feedback at all where the unauthored default always rendered
261
- * `error.message`. Falling through on any falsy authored value is the exception on this surface, not
262
- * the rule: eight sibling `??` resolutions elsewhere (`access-code-sign-in.tsx`, `region.tsx`) stay on
263
- * `??`; `billing-address.tsx`'s `fieldLabels` fallback (fix pass round 2, finding N1) is fixed the
264
- * same way, for the same reason.
460
+ * The alert's message for one `PaymentUserError`: the message field for its `code`, or networkErrorMessage
461
+ * for a code this CTA does not word. A missing message renders empty and the formatter logs it.
265
462
  */
266
- function resolveErrorMessage(error, authored) {
267
- return authored[error.code] || error.message;
463
+ function resolveErrorMessage(error, format) {
464
+ return formatErrorCode(PlaceOrderContent, PLACE_ORDER_ERROR_FIELDS, error, format, "networkErrorMessage");
268
465
  }
269
466
  /**
270
467
  * The CTA's feedback nodes: the authored placing message, the alert for a refusal, the status notice for
271
468
  * an order that could not be confirmed (T176), and the success line. Rendered as the CTA's own children,
272
469
  * so none of them adds a wrapper.
273
470
  */
274
- function PlaceOrderFeedback({ placing, placingMessage, firstError, unconfirmed, succeeded, successMessage, displayOrderId, authoredErrorMessages }) {
471
+ function PlaceOrderFeedback({ placing, firstError, unconfirmed, succeeded, displayOrderId, format }) {
472
+ const placingMessage = placing ? format("placingMessage") : "";
275
473
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
276
- placing && placingMessage?.trim() ? /* @__PURE__ */ jsx("output", {
474
+ placingMessage.trim() ? /* @__PURE__ */ jsx("output", {
277
475
  "data-fs-place-order-placing": "",
278
476
  children: placingMessage
279
477
  }) : null,
280
478
  firstError && !unconfirmed ? /* @__PURE__ */ jsx("div", {
281
479
  role: "alert",
282
480
  "data-fs-place-order-error": "",
283
- children: resolveErrorMessage(firstError, authoredErrorMessages)
481
+ children: resolveErrorMessage(firstError, format)
284
482
  }) : null,
285
483
  firstError && unconfirmed && !succeeded ? /* @__PURE__ */ jsx("output", {
286
484
  "data-fs-place-order-unconfirmed": "",
287
- children: resolveErrorMessage(firstError, authoredErrorMessages)
485
+ children: resolveErrorMessage(firstError, format)
288
486
  }) : null,
289
487
  succeeded ? /* @__PURE__ */ jsxs("output", {
290
488
  "data-fs-place-order-success": "",
291
489
  children: [/* @__PURE__ */ jsx("span", {
292
490
  "data-fs-place-order-success-message": "",
293
- children: successMessage
491
+ children: format("successMessage")
294
492
  }), displayOrderId ? /* @__PURE__ */ jsx("span", {
295
493
  "data-fs-place-order-success-order-id": "",
296
494
  children: displayOrderId
@@ -307,36 +505,25 @@ function refusalFocusTarget(refusals, reachedGateway) {
307
505
  const [refusal] = refusals;
308
506
  return reachedGateway === false && refusal ? refusalTargetOf(refusal) : null;
309
507
  }
310
- function PlaceOrder({ label = "Place order", placingLabel = "Placing order...", placingMessage, resumeLabel = "Complete your order", successMessage = "Order placed successfully.", missingSubmissionMessage = "Enter your payment details before placing the order.", missingMethodMessage = "Choose a payment method before placing the order.", invalidTransactionMessage = "Unable to start the payment. Please try again.", networkErrorMessage = "Unable to complete the request. Please try again.", missingDocumentMessage = "Enter your document before placing the order.", invalidDocumentMessage = "Enter a valid document before placing the order.", unavailableMethodMessage = "Choose another payment method before placing the order.", unsavedBillingAddressMessage = "Save your billing address before placing the order.", invalidCardDataMessage = "Enter valid card details before placing the order.", unsupportedNetworkMessage = "This card is not from a network the store accepts. Use another card or choose another payment method.", invalidSecurityCodeMessage = "Enter a valid security code before placing the order.", gatewayErrorMessage = "Unable to complete the payment. Please try again.", inFlightMessage = "This order is already being placed. Please wait.", unconfirmedMessage = "We could not confirm your order yet. Your payment may still be processing, so please do not pay again.", successHref = ORDER_PLACED_PAGE, $data: $dataProp, $actions: $actionsProp, className, ...props }) {
508
+ function PlaceOrder({ successHref = ORDER_PLACED_PAGE, challengeReturnHref, $data: $dataProp, $actions: $actionsProp, $content, $locale, className, ...props }) {
311
509
  const $data = useDataOverride($dataProp);
312
510
  const $actions = useActionsOverride($actionsProp);
313
511
  const instanceKey = useId();
314
512
  const { draft, placing: sectionPlacing, setPlacing, attempt, setAttempt, focusRefusal } = usePayment();
315
513
  const submitGate = usePaymentSubmitGate();
316
- const { placeOrder, placing, userErrors, orderId } = usePlaceOrder({
514
+ const challengeReturn = useChallengeReturn(challengeReturnHref);
515
+ const readSettledOrder = useSettledOrderRead();
516
+ const { placeOrder, placing, userErrors, orderId, orderNodeId, redirectUrl } = usePlaceOrder({
317
517
  $data,
318
518
  $actions,
319
519
  attempt,
320
520
  setAttempt,
321
521
  billingAddressDifferent: draft.billingAddressDifferent,
322
- submitGate
323
- });
324
- const authoredErrorMessages = buildAuthoredErrorMessages({
325
- missingSubmissionMessage,
326
- missingMethodMessage,
327
- invalidTransactionMessage,
328
- networkErrorMessage,
329
- missingDocumentMessage,
330
- invalidDocumentMessage,
331
- unsavedBillingAddressMessage,
332
- invalidCardDataMessage,
333
- unsupportedNetworkMessage,
334
- invalidSecurityCodeMessage,
335
- gatewayErrorMessage,
336
- inFlightMessage,
337
- unconfirmedMessage,
338
- unavailableMethodMessage
522
+ submitGate,
523
+ challengeReturn,
524
+ readSettledOrder
339
525
  });
526
+ const { format } = useMessageFormatter(PlaceOrderContent, $content);
340
527
  const [attempted, setAttempted] = useState(false);
341
528
  useLayoutEffect(() => {
342
529
  setPlacing(instanceKey, placing);
@@ -351,9 +538,11 @@ function PlaceOrder({ label = "Place order", placingLabel = "Placing order...",
351
538
  ]);
352
539
  const [firstError] = userErrors;
353
540
  const settledAttemptOrderId = attempt?.phase === "settled" ? attempt.orderId : null;
541
+ const settledAttemptOrderNodeId = attempt?.phase === "settled" ? attempt.orderNodeId ?? null : null;
354
542
  const succeeded = attempted && !placing && userErrors.length === 0 || attempt?.phase === "settled";
355
543
  const resumable = attempt?.phase === "sent" || attempt?.phase === "unresolved";
356
544
  const displayOrderId = orderId ?? settledAttemptOrderId;
545
+ const displayOrderNodeId = orderNodeId ?? settledAttemptOrderNodeId;
357
546
  const unconfirmed = firstError?.code === "PLACE_ORDER_UNCONFIRMED";
358
547
  const blockedByOtherInstance = sectionPlacing && !resumable;
359
548
  function handleClick() {
@@ -364,6 +553,9 @@ function PlaceOrder({ label = "Place order", placingLabel = "Placing order...",
364
553
  if (target) focusRefusal(target);
365
554
  });
366
555
  }
556
+ let buttonLabelField = "label";
557
+ if (placing) buttonLabelField = "placingLabel";
558
+ else if (resumable) buttonLabelField = "resumeLabel";
367
559
  return /* @__PURE__ */ jsxs("div", {
368
560
  ...props,
369
561
  className,
@@ -376,27 +568,26 @@ function PlaceOrder({ label = "Place order", placingLabel = "Placing order...",
376
568
  "aria-busy": placing || void 0,
377
569
  "data-fs-place-order-button": "",
378
570
  ...placing ? { "data-fs-place-order-button-pending": "" } : {},
379
- children: placing ? placingLabel : resumable ? resumeLabel : label
571
+ children: format(buttonLabelField)
380
572
  }),
381
573
  /* @__PURE__ */ jsx(PlaceOrderFeedback, {
382
574
  placing,
383
- placingMessage,
384
575
  firstError,
385
576
  unconfirmed,
386
577
  succeeded,
387
- successMessage,
388
578
  displayOrderId,
389
- authoredErrorMessages
579
+ format
390
580
  }),
391
581
  /* @__PURE__ */ jsx(PlaceOrderNavigateOnSuccess, {
392
582
  successHref,
393
- orderId: displayOrderId,
583
+ orderNodeId: displayOrderNodeId,
394
584
  userErrors
395
- })
585
+ }),
586
+ /* @__PURE__ */ jsx(PlaceOrderNavigateOnRedirect, { redirectUrl })
396
587
  ]
397
588
  });
398
589
  }
399
590
  //#endregion
400
- export { PlaceOrder, PlaceOrderDefinition, buildAuthoredErrorMessages, resolveErrorMessage };
591
+ export { PLACE_ORDER_ERROR_FIELDS, PlaceOrder, PlaceOrderContent, PlaceOrderDefinition, resolveErrorMessage };
401
592
 
402
593
  //# sourceMappingURL=place-order.js.map