@thorprovider/storefront 0.6.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +22 -2
  2. package/assets/templates/AGENTS.md +14 -2
  3. package/assets/templates/app/app/[[...slug]]/page.tsx +9 -2
  4. package/assets/templates/app/lib/__STOREFRONT__/account-address.ts +129 -0
  5. package/assets/templates/app/lib/__STOREFRONT__/account-lifecycle.client.tsx +2 -2
  6. package/assets/templates/app/lib/__STOREFRONT__/account-private.core.ts +143 -0
  7. package/assets/templates/app/lib/__STOREFRONT__/account-profile.ts +220 -0
  8. package/assets/templates/app/lib/__STOREFRONT__/actions.ts +1234 -75
  9. package/assets/templates/app/lib/__STOREFRONT__/addresses-port.ts +107 -0
  10. package/assets/templates/app/lib/__STOREFRONT__/checkout-shipping.core.ts +37 -0
  11. package/assets/templates/app/lib/__STOREFRONT__/commerce.ts +460 -35
  12. package/assets/templates/app/lib/__STOREFRONT__/confirmation.core.ts +240 -0
  13. package/assets/templates/app/lib/__STOREFRONT__/customer-profile-port.ts +103 -0
  14. package/assets/templates/app/lib/__STOREFRONT__/order-detail-port.ts +26 -0
  15. package/assets/templates/app/lib/__STOREFRONT__/orders-port.ts +30 -0
  16. package/assets/templates/app/lib/__STOREFRONT__/ports.ts +18 -0
  17. package/assets/templates/app/lib/__STOREFRONT__/projection-ownership.client.tsx +4 -4
  18. package/assets/templates/app/lib/__STOREFRONT__/session.ts +24 -6
  19. package/assets/templates/app/lib/__STOREFRONT__/state.core.ts +28 -1
  20. package/assets/templates/app/lib/__STOREFRONT__/views/sections/address-book-advanced.client.tsx +29 -0
  21. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.client.tsx +19 -0
  22. package/assets/templates/app/lib/__STOREFRONT__/views/sections/checkout-commerce-v1.tsx +16 -0
  23. package/assets/templates/app/lib/__STOREFRONT__/views/sections/customer-profile.client.tsx +27 -0
  24. package/assets/templates/app/lib/__STOREFRONT__/views/sections/index.ts +5 -1
  25. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.client.tsx +19 -0
  26. package/assets/templates/app/lib/__STOREFRONT__/views/sections/marketplace-product-card.tsx +16 -0
  27. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.client.tsx +19 -0
  28. package/assets/templates/app/lib/__STOREFRONT__/views/sections/mega-menu-universal.tsx +16 -0
  29. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.address-book-advanced.ts +437 -0
  30. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.checkout-commerce-v1.ts +398 -0
  31. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.customer-profile.ts +138 -0
  32. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.marketplace-product-card.ts +67 -0
  33. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.mega-menu-universal.ts +76 -0
  34. package/assets/templates/app/lib/__STOREFRONT__/views/sections/schema.universal-banner.ts +217 -0
  35. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.client.tsx +24 -0
  36. package/assets/templates/app/lib/__STOREFRONT__/views/sections/universal-banner.tsx +16 -0
  37. package/assets/templates/features/checkout/handlers.ts +348 -33
  38. package/assets/templates/features/checkout/state.ts +79 -3
  39. package/assets/templates/features/customer-addresses/handlers.ts +11 -0
  40. package/assets/templates/features/customer-addresses/state.ts +33 -0
  41. package/assets/templates/features/customer-auth/state.ts +10 -0
  42. package/assets/templates/features/customer-profile/handlers.ts +11 -0
  43. package/assets/templates/features/customer-profile/state.ts +18 -0
  44. package/assets/templates/views/account/address-book-advanced.defaults.ts +534 -0
  45. package/assets/templates/views/account/assembly/assembly.json +41 -0
  46. package/assets/templates/views/account/assembly/index.skeleton.tsx +229 -0
  47. package/assets/templates/views/account/assembly/registry.skeleton.tsx +1116 -0
  48. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/binding.json +5 -0
  49. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/catalog.part +4 -0
  50. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/element.part +5 -0
  51. package/assets/templates/views/account/assembly/slots/addresses/AddressBookAdvanced/registry.part +1 -0
  52. package/assets/templates/views/account/assembly/slots/addresses/cards/catalog.part +5 -0
  53. package/assets/templates/views/account/assembly/slots/addresses/cards/element.part +10 -0
  54. package/assets/templates/views/account/assembly/slots/addresses/cards/registry.part +1 -0
  55. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/catalog.part +5 -0
  56. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/element.part +5 -0
  57. package/assets/templates/views/account/assembly/slots/boot/AccountBoot/registry.part +1 -0
  58. package/assets/templates/views/account/assembly/slots/login/card/catalog.part +4 -0
  59. package/assets/templates/views/account/assembly/slots/login/card/element.part +13 -0
  60. package/assets/templates/views/account/assembly/slots/login/card/registry.part +1 -0
  61. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/catalog.part +5 -0
  62. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/element.part +5 -0
  63. package/assets/templates/views/account/assembly/slots/orders/OrderHistory/registry.part +2 -0
  64. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/binding.json +5 -0
  65. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/catalog.part +5 -0
  66. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/element.part +5 -0
  67. package/assets/templates/views/account/assembly/slots/orders/OrderHistoryAdvanced/registry.part +1 -0
  68. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/binding.json +5 -0
  69. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/catalog.part +4 -0
  70. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/element.part +5 -0
  71. package/assets/templates/views/account/assembly/slots/profile/CustomerProfileAdvanced/registry.part +1 -0
  72. package/assets/templates/views/account/assembly/slots/profile/form/catalog.part +5 -0
  73. package/assets/templates/views/account/assembly/slots/profile/form/element.part +10 -0
  74. package/assets/templates/views/account/assembly/slots/profile/form/registry.part +1 -0
  75. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/catalog.part +4 -0
  76. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/element.part +13 -0
  77. package/assets/templates/views/account/assembly/slots/register/SignUpPage1/registry.part +1 -0
  78. package/assets/templates/views/account/assembly/slots/summary/stack/catalog.part +5 -0
  79. package/assets/templates/views/account/assembly/slots/summary/stack/element.part +5 -0
  80. package/assets/templates/views/account/assembly/slots/summary/stack/registry.part +1 -0
  81. package/assets/templates/views/account/assembly/slots/summary/tabs/catalog.part +5 -0
  82. package/assets/templates/views/account/assembly/slots/summary/tabs/element.part +5 -0
  83. package/assets/templates/views/account/assembly/slots/summary/tabs/registry.part +1 -0
  84. package/assets/templates/views/account/content.ts +326 -0
  85. package/assets/templates/views/account/customer-profile.defaults.ts +136 -0
  86. package/assets/templates/views/account/index.tsx +218 -35
  87. package/assets/templates/views/account/order-detail.client.tsx +35 -0
  88. package/assets/templates/views/account/order-detail.defaults.ts +457 -0
  89. package/assets/templates/views/account/orders-advanced.client.tsx +166 -0
  90. package/assets/templates/views/account/orders-advanced.defaults.ts +230 -0
  91. package/assets/templates/views/account/registry.tsx +944 -369
  92. package/assets/templates/views/account/schema.ts +50 -0
  93. package/assets/templates/views/account/sections-data.ts +2 -0
  94. package/assets/templates/views/cart/content.ts +1 -0
  95. package/assets/templates/views/category/assembly/index.skeleton.tsx +1 -0
  96. package/assets/templates/views/category/assembly/slots/filter/CategoryListing/element.part +1 -0
  97. package/assets/templates/views/category/content.ts +2 -0
  98. package/assets/templates/views/category/index.tsx +2 -0
  99. package/assets/templates/views/category/sections-data.ts +2 -0
  100. package/assets/templates/views/checkout/checkout-commerce-hosted.tsx +1089 -0
  101. package/assets/templates/views/checkout/content.ts +114 -2
  102. package/assets/templates/views/checkout/index.tsx +7 -1
  103. package/assets/templates/views/checkout/props.ts +70 -22
  104. package/assets/templates/views/checkout/registry.tsx +400 -71
  105. package/assets/templates/views/checkout/schema.ts +260 -9
  106. package/assets/templates/views/home/assembly/assembly.json +28 -0
  107. package/assets/templates/views/home/assembly/index.skeleton.tsx +1 -0
  108. package/assets/templates/views/home/content.ts +2 -0
  109. package/assets/templates/views/home/index.tsx +1 -0
  110. package/assets/templates/views/home/sections-data.ts +2 -0
  111. package/assets/templates/views/product/content.ts +1 -0
  112. package/assets/templates/views/static/content.ts +1 -0
  113. package/bin/storefront.js +343 -13
  114. package/package.json +2 -1
  115. package/recipes/adapter-surface.json +158 -0
  116. package/recipes/archetypes.json +38 -3
  117. package/recipes/catalog.json +138 -1
  118. package/recipes/feature.schema.json +9 -0
  119. package/recipes/features.json +72 -1
  120. package/recipes/manifest.schema.json +5 -0
  121. package/recipes/recipe.schema.json +14 -2
  122. package/recipes/recipes.json +35 -5
  123. package/recipes/section.schema.json +112 -0
  124. package/recipes/sections.json +289 -3
  125. package/recipes/validate.mjs +83 -1
  126. package/scripts/adapter-surface.mjs +41 -0
  127. package/scripts/agent-blocks.mjs +700 -0
  128. package/scripts/block-validator.mjs +45 -0
  129. package/scripts/candidate.mjs +5 -4
  130. package/scripts/composers.mjs +7 -2
  131. package/scripts/default-sections.mjs +78 -0
  132. package/scripts/file-classes.mjs +15 -0
  133. package/scripts/generate-adapter-surface.mjs +148 -0
  134. package/scripts/operations.mjs +100 -0
  135. package/scripts/reconcile.mjs +67 -39
  136. package/scripts/section-configure.mjs +316 -0
  137. package/scripts/sync-assets.mjs +1 -0
  138. package/scripts/view-assembly.mjs +101 -14
  139. package/skills/sf-feature/SKILL.md +19 -0
  140. package/skills/sf-view-gen/SKILL.md +79 -7
  141. package/skills/sf-view-gen/assets/recipes/archetypes.json +38 -3
  142. package/skills/sf-view-gen/assets/recipes/catalog.json +138 -1
  143. package/skills/sf-view-gen/assets/recipes/features.json +72 -1
  144. package/skills/sf-view-gen/assets/recipes/recipes.json +35 -5
  145. package/skills/sf-view-gen/assets/recipes/section.schema.json +112 -0
  146. package/skills/sf-view-gen/assets/recipes/sections.json +289 -3
  147. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.client.tsx +19 -0
  148. package/skills/sf-view-gen/assets/templates/views/sections/checkout-commerce-v1.tsx +16 -0
  149. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.client.tsx +19 -0
  150. package/skills/sf-view-gen/assets/templates/views/sections/marketplace-product-card.tsx +16 -0
  151. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.client.tsx +19 -0
  152. package/skills/sf-view-gen/assets/templates/views/sections/mega-menu-universal.tsx +16 -0
  153. package/skills/sf-view-gen/assets/templates/views/sections/schema.checkout-commerce-v1.ts +398 -0
  154. package/skills/sf-view-gen/assets/templates/views/sections/schema.marketplace-product-card.ts +67 -0
  155. package/skills/sf-view-gen/assets/templates/views/sections/schema.mega-menu-universal.ts +76 -0
  156. package/skills/sf-view-gen/assets/templates/views/sections/schema.universal-banner.ts +217 -0
  157. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.client.tsx +24 -0
  158. package/skills/sf-view-gen/assets/templates/views/sections/universal-banner.tsx +16 -0
  159. package/skills/sf-view-gen/scripts/validate.mjs +83 -1
  160. package/skills/storefront-workflow/SKILL.md +5 -0
  161. package/skills/storefront-workflow/references/mobile-responsiveness.md +1 -1
@@ -5,6 +5,7 @@
5
5
  // imports it and wires it into the element tree, so your edits here survive
6
6
  // `storefront sync` and unit removal. Plain data only: no React and no server
7
7
  // imports.
8
+ // A configured `sections/<id>.json` sidecar wins over this map for that instance.
8
9
 
9
10
  export const checkoutContent = {
10
11
  title: 'Finalizar compra',
@@ -30,8 +31,9 @@ export const checkoutContent = {
30
31
  emailLabel: 'Email',
31
32
  firstNameLabel: 'Nombre',
32
33
  lastNameLabel: 'Apellidos',
33
- phoneLabel: 'Teléfono (opcional)',
34
- addressLabel: 'Dirección',
34
+ phoneLabel: 'Teléfono',
35
+ optionalIndicatorLabel: 'opcional',
36
+ addressLabel: 'Línea 1 de dirección',
35
37
  cityLabel: 'Ciudad',
36
38
  stateLabel: 'Estado / Provincia',
37
39
  zipCodeLabel: 'Código postal',
@@ -39,6 +41,8 @@ export const checkoutContent = {
39
41
  countryPlaceholder: 'Selecciona un país',
40
42
  shippingMethodLegend: 'Método de envío',
41
43
  paymentMethodLegend: 'Método de pago',
44
+ paymentChooseLabel: 'Selecciona un método de pago',
45
+ paymentSelectActionLabel: 'Seleccionar',
42
46
  noPaymentMethodsLabel: 'No hay métodos de pago disponibles para esta región.',
43
47
  unavailableMethodLabel: 'No disponible',
44
48
  requiresSetupLabel: 'Requiere configuración adicional',
@@ -68,6 +72,66 @@ export const checkoutContent = {
68
72
  completeOrderLabel: 'Completar pedido',
69
73
  processingLabel: 'Procesando pedido…',
70
74
  submitErrorActionLabel: 'Reintentar',
75
+ billingHeading: 'Dirección de facturación',
76
+ billingDescription: 'Indica la dirección de la factura.',
77
+ billingSameAsShippingLabel: 'La facturación es la misma que el envío',
78
+ address2Label: 'Línea 2 de dirección (opcional)',
79
+ companyLabel: 'Empresa (opcional)',
80
+ provincePlaceholder: 'Selecciona una provincia o estado',
81
+ cityPlaceholder: 'Selecciona una ciudad',
82
+ signedInAsLabel: 'Sesión iniciada como',
83
+ signOutLabel: 'Cerrar sesión',
84
+ signInLabel: 'Iniciar sesión',
85
+ savedAddressesLabel: 'Direcciones guardadas',
86
+ defaultAddressLabel: 'Predeterminada',
87
+ recipientHeading: 'Destinatario',
88
+ recipientDescription: '¿Quién recibirá este pedido? Puede ser otra persona.',
89
+ addressHeading: 'Dirección',
90
+ addAddressLabel: 'Añadir dirección',
91
+ useAddressLabel: 'Usar',
92
+ deleteAddressLabel: 'Eliminar',
93
+ deleteAddressConfirmLabel: '¿Eliminar esta dirección guardada?',
94
+ deleteAddressHintLabel: 'El pedido se enviará igualmente a la dirección actual.',
95
+ cancelAddressLabel: 'Cancelar',
96
+ updateSavedAddressLabel: 'Actualizar dirección guardada',
97
+ saveAsNewAddressLabel: 'Guardar como dirección nueva',
98
+ saveAddressLabel: 'Guardar en mis direcciones',
99
+ newAddressLabel: 'Nueva dirección',
100
+ savingAddressLabel: 'Guardando dirección…',
101
+ deletingAddressLabel: 'Eliminando…',
102
+ addressSaveErrorLabel: 'No pudimos guardar esta dirección.',
103
+ addressDeleteErrorLabel: 'No pudimos eliminar esta dirección.',
104
+ addressSavedLabel: 'Dirección guardada.',
105
+ addressDeletedLabel: 'Dirección eliminada.',
106
+ locationLoadingLabel: 'Cargando opciones…',
107
+ locationErrorLabel: 'No pudimos cargar estas opciones.',
108
+ locationUnavailableLabel: 'No hay opciones disponibles.',
109
+ locationOptionalLabel: 'Opcional para esta dirección.',
110
+ noShippingOptionsLabel: 'No hay opciones de entrega para esta dirección.',
111
+ groupUnavailableLabel: 'No disponible para esta dirección.',
112
+ deliveryLoadingLabel: 'Cargando opciones de entrega…',
113
+ deliveryErrorLabel: 'No pudimos cargar las opciones de entrega.',
114
+ deliveryUnavailableLabel: 'La entrega no está disponible para esta dirección.',
115
+ paymentLoadingLabel: 'Cargando métodos de pago…',
116
+ paymentErrorLabel: 'No pudimos cargar los métodos de pago.',
117
+ paymentUnavailableLabel: 'El pago no está disponible para esta región.',
118
+ giftCardLabel: 'Tarjeta de regalo',
119
+ giftCardPlaceholder: 'Ingresa el código de la tarjeta',
120
+ applyLabel: 'Aplicar',
121
+ removeLabel: 'Quitar',
122
+ storeCreditLabel: 'Saldo a favor',
123
+ availableCreditLabel: 'Saldo disponible',
124
+ reviewBillingLabel: 'Facturación',
125
+ reviewAdjustmentsLabel: 'Ajustes',
126
+ reviewSameAsShippingLabel: 'Igual que el envío',
127
+ reviewLinesLabel: 'Productos',
128
+ interruptionAcknowledgeLabel: 'Entendido',
129
+ interruptionRefreshLabel: 'Actualizar',
130
+ interruptionReturnToCartLabel: 'Volver al carrito',
131
+ interruptionRetryLabel: 'Reintentar',
132
+ availabilityEmptyLabel: 'Tu carrito está vacío.',
133
+ availabilityUnavailableLabel: 'El checkout no está disponible.',
134
+ availabilityErrorLabel: 'No pudimos cargar el checkout.',
71
135
  },
72
136
  validation: {
73
137
  email: {
@@ -163,3 +227,51 @@ export const confirmationContent = {
163
227
  },
164
228
  },
165
229
  }
230
+
231
+ /**
232
+ * Copy for the designer confirmation. The layout and labels are the
233
+ * designer's; the email line reports the contact supplied by the order instead
234
+ * of promising an email the backend may not send.
235
+ */
236
+ export const designerConfirmationContent = {
237
+ labels: {
238
+ confirmationBadge: 'Confirmado',
239
+ confirmationTitle: 'Pedido creado',
240
+ confirmationBody: 'Gracias, {name}. Hemos recibido tu pedido y ya estamos preparándolo.',
241
+ confirmationEmailNote: 'Correo de contacto: {email}.',
242
+ confirmationReference: 'Número de pedido',
243
+ confirmationTotal: 'Total del pedido',
244
+ confirmationReferenceNote: 'Guarda este número para cualquier consulta.',
245
+ confirmationNextTitle: '¿Qué pasa ahora?',
246
+ confirmationNextOneTitle: 'Pedido recibido',
247
+ confirmationNextOneBody: 'Ya tenemos tu compra registrada.',
248
+ confirmationNextTwoTitle: 'Preparando tu pedido',
249
+ confirmationNextTwoBody: 'Cada entrega se prepara desde su almacén de origen.',
250
+ confirmationNextThreeTitle: 'Seguimiento',
251
+ confirmationNextThreeBody:
252
+ 'Cuando el seguimiento esté disponible, podrás consultar el estado desde aquí.',
253
+ confirmationOrderTitle: 'Tu pedido',
254
+ confirmationDetailsTitle: 'Entrega y pago',
255
+ confirmationQuantity: '{count} × {price}/ud.',
256
+ confirmationAssociateTag: 'Asociado',
257
+ confirmationCta: 'Seguir comprando',
258
+ summaryTitle: 'Resumen',
259
+ summaryItemOne: '1 artículo',
260
+ summaryItems: '{count} artículos',
261
+ deliveriesOne: '1 entrega',
262
+ deliveriesMany: '{count} entregas',
263
+ purchaseBreakdown: '{items} · {deliveries}',
264
+ subtotal: 'Subtotal',
265
+ tax: 'Impuestos ({rate}%)',
266
+ shippingCost: 'Envío',
267
+ pickupCost: 'Recogida',
268
+ extraCost: 'Extra',
269
+ total: 'Total',
270
+ groupFree: 'Gratis',
271
+ addressDelivery: 'Dirección de entrega',
272
+ paymentTitle: 'Pago',
273
+ billingTitle: 'Facturación',
274
+ checkSymbol: '✓',
275
+ lineDiscount: '{label} -{amount}',
276
+ },
277
+ }
@@ -62,6 +62,12 @@ const elements: Record<string, StorefrontElement> = {
62
62
  placeOrder: { action: 'placeOrder' },
63
63
  reconcileOrder: { action: 'reconcileOrder' },
64
64
  syncCheckoutAddress: { action: 'syncCheckoutAddress' },
65
+ loadCheckoutLocations: { action: 'loadCheckoutLocations' },
66
+ createSavedAddress: { action: 'createSavedAddress' },
67
+ updateSavedAddress: { action: 'updateSavedAddress' },
68
+ deleteSavedAddress: { action: 'deleteSavedAddress' },
69
+ startNewAddress: { action: 'startNewAddress' },
70
+ cancelNewAddress: { action: 'cancelNewAddress' },
65
71
  selectShippingMethod: { action: 'selectShippingMethod' },
66
72
  },
67
73
  },
@@ -82,7 +88,7 @@ const catalog = {
82
88
  },
83
89
  CheckoutConfirmation: {
84
90
  props: checkoutConfirmationPropsSchema,
85
- description: 'Order confirmation with fulfilment progress.',
91
+ description: 'Designer order confirmation with delivery, payment and totals.',
86
92
  },
87
93
  }
88
94
 
@@ -5,44 +5,92 @@
5
5
  // `storefront sync` and unit removal. Plain data only: no React and no server
6
6
  // imports.
7
7
 
8
- import { checkoutContent, confirmationContent } from './content'
8
+ import {
9
+ checkoutContent,
10
+ confirmationContent,
11
+ designerConfirmationContent,
12
+ } from './content'
9
13
 
10
14
  export const checkoutViewProps = {
11
15
  ...checkoutContent,
12
- // Bounded structural presentation: the proven step-by-step flow. Change it
13
- // here to 'single-page' if this store wants every section visible at once.
16
+ // Bounded structural presentation. Options are 'single-page' (all sections
17
+ // visible), 'accordion' (one section open), and 'stepper' (one step at a time).
18
+ // The generated storefront keeps the proven step-by-step default.
14
19
  presentation: 'stepper' as const,
15
20
  showReviewStep: false,
21
+ // Phone requiredness is an explicit store policy; both fields are optional by default.
22
+ requireContactPhone: false,
23
+ requireShippingPhone: false,
16
24
  // Backend-authoritative summary: line totals and cart totals come from the
17
25
  // backend cart state, never computed here.
18
26
  orderSummary: {
19
27
  items: { $state: '/cart' },
20
28
  totals: { $state: '/cartTotals' },
21
29
  },
22
- countries: { $state: '/checkoutCountries' },
23
- shippingOptions: { $state: '/checkoutShippingOptions' },
24
- selectedShippingOptionId: { $state: '/checkoutSelectedShippingOptionId' },
30
+ contact: {
31
+ email: { $state: '/checkoutContact/email' },
32
+ firstName: { $state: '/checkoutContact/firstName' },
33
+ lastName: { $state: '/checkoutContact/lastName' },
34
+ phone: { $state: '/checkoutContact/phone' },
35
+ },
36
+ shippingAddress: {
37
+ firstName: { $state: '/checkoutShippingAddress/firstName' },
38
+ lastName: { $state: '/checkoutShippingAddress/lastName' },
39
+ company: { $state: '/checkoutShippingAddress/company' },
40
+ address1: { $state: '/checkoutShippingAddress/address1' },
41
+ address2: { $state: '/checkoutShippingAddress/address2' },
42
+ city: { $state: '/checkoutShippingAddress/city' },
43
+ province: { $state: '/checkoutShippingAddress/province' },
44
+ postalCode: { $state: '/checkoutShippingAddress/postalCode' },
45
+ countryCode: { $state: '/checkoutShippingAddress/countryCode' },
46
+ phone: { $state: '/checkoutShippingAddress/phone' },
47
+ },
48
+ billingAddress: {
49
+ firstName: { $state: '/checkoutBillingAddress/firstName' },
50
+ lastName: { $state: '/checkoutBillingAddress/lastName' },
51
+ company: { $state: '/checkoutBillingAddress/company' },
52
+ address1: { $state: '/checkoutBillingAddress/address1' },
53
+ address2: { $state: '/checkoutBillingAddress/address2' },
54
+ city: { $state: '/checkoutBillingAddress/city' },
55
+ province: { $state: '/checkoutBillingAddress/province' },
56
+ postalCode: { $state: '/checkoutBillingAddress/postalCode' },
57
+ countryCode: { $state: '/checkoutBillingAddress/countryCode' },
58
+ phone: { $state: '/checkoutBillingAddress/phone' },
59
+ },
60
+ sameAsShipping: { $state: '/checkoutSameAsShipping' },
61
+ paymentMethod: { $state: '/checkout/paymentMethod' },
25
62
  paymentMethods: { $state: '/checkoutPaymentMethods' },
26
- fieldErrors: { $state: '/checkoutFieldErrors' },
27
- values: {
28
- email: { $state: '/checkout/email' },
29
- firstName: { $state: '/checkout/firstName' },
30
- lastName: { $state: '/checkout/lastName' },
31
- phone: { $state: '/checkout/phone' },
32
- address: { $state: '/checkout/address' },
33
- city: { $state: '/checkout/city' },
34
- state: { $state: '/checkout/state' },
35
- zipCode: { $state: '/checkout/zipCode' },
36
- country: { $state: '/checkout/country' },
37
- paymentMethod: { $state: '/checkout/paymentMethod' },
38
- saveInfo: { $state: '/checkout/saveInfo' },
39
- newsletter: { $state: '/checkout/newsletter' },
40
- promoCode: { $state: '/checkout/promoCode' },
63
+ customer: { $state: '/checkoutCustomer' },
64
+ savedAddresses: { $state: '/checkoutSavedAddresses' },
65
+ savedAddressState: { $state: '/checkoutSavedAddressState' },
66
+ shippingLocations: {
67
+ countries: { $state: '/checkoutShippingLocations/countries' },
68
+ provinces: { $state: '/checkoutShippingLocations/provinces' },
69
+ cities: { $state: '/checkoutShippingLocations/cities' },
70
+ provincesState: { $state: '/checkoutShippingLocations/provincesState' },
71
+ citiesState: { $state: '/checkoutShippingLocations/citiesState' },
72
+ },
73
+ billingLocations: {
74
+ countries: { $state: '/checkoutBillingLocations/countries' },
75
+ provinces: { $state: '/checkoutBillingLocations/provinces' },
76
+ cities: { $state: '/checkoutBillingLocations/cities' },
77
+ provincesState: { $state: '/checkoutBillingLocations/provincesState' },
78
+ citiesState: { $state: '/checkoutBillingLocations/citiesState' },
41
79
  },
80
+ shippingGroups: { $state: '/checkoutShippingGroups' },
81
+ shippingState: { $state: '/checkoutShippingState' },
82
+ paymentState: { $state: '/checkoutPaymentState' },
83
+ adjustmentPayments: { $state: '/checkoutAdjustments' },
84
+ fieldErrors: { $state: '/checkoutFieldErrors' },
85
+ availability: { $state: '/checkoutAvailability' },
86
+ interruption: { $state: '/checkoutInterruption' },
42
87
  }
43
88
 
44
89
  export const checkoutConfirmationProps = {
45
- // One atomic state path carries the order and its backend lines together.
90
+ // One atomic state path carries the order, its backend lines and the
91
+ // host-confirmed confirmation model together.
46
92
  receipt: { $state: '/lastReceipt' },
93
+ labels: designerConfirmationContent.labels,
94
+ // Canonical labels remain for the legacy/rollback fallback only.
47
95
  ...confirmationContent,
48
96
  }