@liquidcommerce/elements-sdk 2.6.0-beta.13 → 2.6.0-beta.131

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 (304) hide show
  1. package/README.md +102 -2518
  2. package/dist/index.checkout.esm.js +22524 -0
  3. package/dist/index.esm.js +30689 -20632
  4. package/dist/ssr-stub.checkout.esm.js +17 -0
  5. package/dist/ssr-stub.esm.js +281 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +51 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +16 -2
  9. package/dist/types/clients/builder.d.ts +3 -0
  10. package/dist/types/clients/checkout.d.ts +6 -0
  11. package/dist/types/clients/helpers.d.ts +8 -0
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -18
  14. package/dist/types/constants/index.d.ts +1 -0
  15. package/dist/types/constants/prop65.constant.d.ts +8 -0
  16. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  17. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  18. package/dist/types/core/a11y/focusable.d.ts +5 -0
  19. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  20. package/dist/types/core/a11y/index.d.ts +6 -0
  21. package/dist/types/core/a11y/required.d.ts +1 -0
  22. package/dist/types/core/a11y/single-select.d.ts +20 -0
  23. package/dist/types/core/api/api-client.service.d.ts +23 -18
  24. package/dist/types/core/api/api-result.d.ts +20 -0
  25. package/dist/types/core/api/auth-client.service.d.ts +37 -13
  26. package/dist/types/core/api/http-client.service.d.ts +0 -8
  27. package/dist/types/core/base-component.service.d.ts +4 -1
  28. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  29. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  30. package/dist/types/core/client/actions/client-analytics-action.service.d.ts +35 -0
  31. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  32. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +81 -0
  33. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  34. package/dist/types/core/client/client-action.service.d.ts +7 -74
  35. package/dist/types/core/client/client-config.service.d.ts +12 -5
  36. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
  37. package/dist/types/core/google-tag-manager.service.d.ts +13 -3
  38. package/dist/types/core/logger/logger.service.d.ts +1 -1
  39. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -0
  40. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +6 -1
  41. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +54 -48
  42. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +18 -7
  43. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  44. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  45. package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
  46. package/dist/types/core/store/interfaces/checkout.interface.d.ts +40 -107
  47. package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
  48. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  49. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  50. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  51. package/dist/types/core/store/store.constant.d.ts +5 -0
  52. package/dist/types/core/store/store.service.d.ts +1 -0
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +51 -2
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +11 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +9 -3
  59. package/dist/types/interfaces/analytics.interface.d.ts +41 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +14 -7
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +277 -0
  62. package/dist/types/interfaces/api/delivery.interface.d.ts +24 -0
  63. package/dist/types/interfaces/api/index.d.ts +6 -0
  64. package/dist/types/interfaces/api/product-list.interface.d.ts +15 -6
  65. package/dist/types/interfaces/api/product.interface.d.ts +12 -4
  66. package/dist/types/interfaces/client.interface.d.ts +79 -0
  67. package/dist/types/interfaces/component.interface.d.ts +7 -0
  68. package/dist/types/interfaces/config.interface.d.ts +45 -0
  69. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/cart.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/checkout.interface.d.ts +3 -1
  72. package/dist/types/interfaces/configs/global.interface.d.ts +9 -3
  73. package/dist/types/interfaces/configs/index.d.ts +1 -0
  74. package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
  75. package/dist/types/interfaces/configs/product.interface.d.ts +7 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +56 -0
  77. package/dist/types/modules/address/address-display.component.d.ts +3 -1
  78. package/dist/types/modules/address/address-input.component.d.ts +11 -1
  79. package/dist/types/modules/address/address.command.d.ts +3 -2
  80. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  81. package/dist/types/modules/cart/cart.commands.d.ts +11 -5
  82. package/dist/types/modules/cart/components/cart-body.component.d.ts +1 -0
  83. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +1 -1
  84. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  85. package/dist/types/modules/cart/components/cart-item.component.d.ts +8 -0
  86. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  87. package/dist/types/modules/checkout/checkout.commands.d.ts +134 -12
  88. package/dist/types/modules/checkout/checkout.component.d.ts +7 -1
  89. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +5 -2
  90. package/dist/types/modules/checkout/components/checkout-buyer.component.d.ts +1 -0
  91. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +9 -0
  92. package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +1 -0
  93. package/dist/types/modules/checkout/components/checkout-delivery-method.component.d.ts +24 -0
  94. package/dist/types/modules/checkout/components/checkout-delivery-scheduling.component.d.ts +53 -0
  95. package/dist/types/modules/checkout/components/checkout-express-checkout.component.d.ts +63 -0
  96. package/dist/types/modules/checkout/components/checkout-express-completion.component.d.ts +21 -0
  97. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  98. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  99. package/dist/types/modules/checkout/components/checkout-item.component.d.ts +2 -0
  100. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  101. package/dist/types/modules/checkout/components/checkout-order-summary.component.d.ts +3 -0
  102. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +9 -1
  103. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +1 -5
  104. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +15 -1
  105. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  106. package/dist/types/modules/checkout/components/checkout-prop65-warning.component.d.ts +8 -0
  107. package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +3 -0
  108. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +7 -3
  109. package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +4 -0
  110. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +4 -2
  111. package/dist/types/modules/checkout/components/index.d.ts +5 -0
  112. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  113. package/dist/types/modules/checkout/components/required-fields-legend.d.ts +1 -0
  114. package/dist/types/modules/checkout/constant.d.ts +15 -0
  115. package/dist/types/modules/checkout/customer-prefill.d.ts +5 -0
  116. package/dist/types/modules/checkout/express-wallet.d.ts +12 -0
  117. package/dist/types/modules/checkout/payment-session-error.d.ts +4 -0
  118. package/dist/types/modules/checkout/stripe-js.d.ts +2 -0
  119. package/dist/types/modules/checkout/styles/delivery-method.style.d.ts +1 -0
  120. package/dist/types/modules/checkout/styles/express-checkout.style.d.ts +1 -0
  121. package/dist/types/modules/checkout/styles/express-completion.style.d.ts +1 -0
  122. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  123. package/dist/types/modules/product/components/components.d.ts +26 -2
  124. package/dist/types/modules/product/components/index.d.ts +1 -0
  125. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +8 -1
  126. package/dist/types/modules/product/components/product-delivery-estimate.component.d.ts +11 -0
  127. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  128. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  129. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  130. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  131. package/dist/types/modules/product/components/product-prop65-warning.d.ts +1 -0
  132. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +6 -0
  133. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +12 -2
  134. package/dist/types/modules/product/components/product-retailers-popup.component.d.ts +1 -0
  135. package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
  136. package/dist/types/modules/product/product.commands.d.ts +5 -5
  137. package/dist/types/modules/product/product.component.d.ts +3 -0
  138. package/dist/types/modules/product/styles/prop65-warning.style.d.ts +1 -0
  139. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  140. package/dist/types/modules/product-list/components/card-components/index.d.ts +6 -0
  141. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  142. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  143. package/dist/types/modules/product-list/components/card-components/product-fulfillment-text.d.ts +2 -0
  144. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  145. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  146. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  147. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  148. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  149. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +1 -0
  150. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  151. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  152. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  153. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +2 -1
  154. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  155. package/dist/types/modules/product-list/components/index.d.ts +6 -2
  156. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  157. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +39 -31
  158. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  159. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -36
  160. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  161. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +54 -0
  162. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  163. package/dist/types/modules/product-list/product-list-filter.registry.d.ts +42 -0
  164. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +7 -0
  165. package/dist/types/modules/product-list/product-list-order.utils.d.ts +3 -0
  166. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  167. package/dist/types/modules/product-list/product-list.commands.d.ts +27 -7
  168. package/dist/types/modules/product-list/product-list.component.d.ts +23 -47
  169. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  170. package/dist/types/modules/product-list/product-list.interface.d.ts +17 -28
  171. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  172. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  173. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  174. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  175. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  176. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  177. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  178. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  179. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  180. package/dist/types/modules/ui-components/alert/alert.component.d.ts +10 -10
  181. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  182. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  183. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +9 -1
  184. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  185. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  186. package/dist/types/modules/ui-components/input/input.component.d.ts +15 -2
  187. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  188. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  189. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  190. package/dist/types/ssr/stub.checkout.d.ts +8 -0
  191. package/dist/types/ssr/stub.d.ts +12 -0
  192. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  193. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  194. package/dist/types/static/icon/check.icon.d.ts +2 -0
  195. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  196. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  197. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  198. package/dist/types/static/icon/chevron-up.icon.d.ts +1 -1
  199. package/dist/types/static/icon/close.icon.d.ts +1 -1
  200. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  201. package/dist/types/static/icon/filter.icon.d.ts +1 -1
  202. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  203. package/dist/types/static/icon/icon.types.d.ts +1 -0
  204. package/dist/types/static/icon/index.d.ts +2 -0
  205. package/dist/types/static/icon/info.icon.d.ts +1 -1
  206. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  207. package/dist/types/static/icon/search.icon.d.ts +1 -1
  208. package/dist/types/static/icon/success.icon.d.ts +1 -1
  209. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  210. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  211. package/dist/types/utils/delivery-scheduling.d.ts +72 -0
  212. package/dist/types/utils/dom-compat.d.ts +2 -0
  213. package/dist/types/utils/format.d.ts +9 -14
  214. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  215. package/dist/types/utils/places-session-token.d.ts +1 -0
  216. package/dist/types/utils/product-selection.d.ts +16 -0
  217. package/dist/types/utils/product.d.ts +21 -0
  218. package/dist/types/utils/timezone.d.ts +6 -0
  219. package/docs/v1/README.md +214 -0
  220. package/docs/v1/api/actions/address-actions.md +290 -0
  221. package/docs/v1/api/actions/analytics-actions.md +326 -0
  222. package/docs/v1/api/actions/cart-actions.md +364 -0
  223. package/docs/v1/api/actions/checkout-actions.md +629 -0
  224. package/docs/v1/api/actions/product-actions.md +205 -0
  225. package/docs/v1/api/client.md +671 -0
  226. package/docs/v1/api/configuration.md +587 -0
  227. package/docs/v1/api/injection-methods.md +331 -0
  228. package/docs/v1/api/typescript-types.md +610 -0
  229. package/docs/v1/api/ui-helpers.md +200 -0
  230. package/docs/v1/examples/advanced-patterns.md +199 -0
  231. package/docs/v1/examples/checkout-flow.md +90 -0
  232. package/docs/v1/examples/custom-theming.md +76 -0
  233. package/docs/v1/examples/multi-product-page.md +90 -0
  234. package/docs/v1/examples/simple-product-page.md +89 -0
  235. package/docs/v1/getting-started/concepts.md +521 -0
  236. package/docs/v1/getting-started/installation.md +351 -0
  237. package/docs/v1/getting-started/quick-start.md +410 -0
  238. package/docs/v1/guides/accessibility.md +298 -0
  239. package/docs/v1/guides/address-component.md +441 -0
  240. package/docs/v1/guides/best-practices.md +365 -0
  241. package/docs/v1/guides/cart-component.md +802 -0
  242. package/docs/v1/guides/checkout-component.md +920 -0
  243. package/docs/v1/guides/events.md +1061 -0
  244. package/docs/v1/guides/product-component.md +767 -0
  245. package/docs/v1/guides/product-list-component.md +730 -0
  246. package/docs/v1/guides/theming.md +243 -0
  247. package/docs/v1/integration/angular.md +39 -0
  248. package/docs/v1/integration/laravel.md +41 -0
  249. package/docs/v1/integration/nextjs.md +69 -0
  250. package/docs/v1/integration/proxy-setup.md +106 -0
  251. package/docs/v1/integration/react.md +64 -0
  252. package/docs/v1/integration/vanilla-js.md +84 -0
  253. package/docs/v1/integration/vue.md +58 -0
  254. package/docs/v1/reference/analytics.md +176 -0
  255. package/docs/v1/reference/browser-support.md +47 -0
  256. package/docs/v1/reference/error-handling.md +83 -0
  257. package/docs/v1/reference/performance.md +52 -0
  258. package/docs/v1/reference/telemetry.md +85 -0
  259. package/docs/v1/reference/troubleshooting.md +135 -0
  260. package/package.json +75 -45
  261. package/dist/types/elements-builder-client.d.ts +0 -2
  262. package/dist/types/elements-client-helper.d.ts +0 -4
  263. package/dist/types/elements-client.d.ts +0 -2
  264. package/dist/types/enums/cloud.enum.d.ts +0 -97
  265. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
  266. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  267. package/dist/types/interfaces/cloud/index.d.ts +0 -3
  268. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  269. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  270. package/dist/types/interfaces/core.interface.d.ts +0 -111
  271. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  272. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  273. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  274. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  275. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  276. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  277. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  278. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  279. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  280. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  281. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  282. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  283. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  284. package/dist/types/utils/helper.d.ts +0 -28
  285. package/docs/ACTIONS.md +0 -1300
  286. package/docs/BROWSER_SUPPORT.md +0 -279
  287. package/docs/CONFIGURATION.md +0 -853
  288. package/docs/DOCUMENTATION_INDEX.md +0 -311
  289. package/docs/EVENTS.md +0 -798
  290. package/docs/PROXY.md +0 -228
  291. package/docs/THEMING.md +0 -592
  292. package/docs/TROUBLESHOOTING.md +0 -793
  293. package/umd/elements.js +0 -1
  294. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  295. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  296. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  297. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  298. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  299. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  300. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  301. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  302. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  303. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  304. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,1061 @@
1
+ # Events Guide
2
+
3
+ The SDK publishes browser events for user interactions and state changes. Use them to react to product selections, cart updates, and checkout progress.
4
+
5
+ ## Event Format
6
+
7
+ All SDK events are dispatched as native `CustomEvent` objects. The payload lives in `event.detail`:
8
+
9
+ ```javascript
10
+ window.addEventListener('lce:actions.client_ready', (event) => {
11
+ const { data, metadata } = event.detail;
12
+
13
+ const {
14
+ event: eventName,
15
+ namespace,
16
+ originalEvent,
17
+ actionNamespace,
18
+ eventId,
19
+ timestamp,
20
+ sdkVersion,
21
+ env,
22
+ tenantName,
23
+ tenantCode
24
+ } = metadata;
25
+ }, { once: true });
26
+ ```
27
+
28
+ `data` is event-specific. `metadata` carries the same ten fields on **every** event — including
29
+ `sdkVersion`, `env`, `tenantName` and `tenantCode`, so partner/tenant identification is already
30
+ present and does not need to be re-derived in your analytics layer.
31
+
32
+ ## Event Namespaces
33
+
34
+ - `lce:actions.*` - User actions and state changes
35
+ - `lce:forms.*` - Form field interactions (checkout)
36
+ - `lce:actions` - All action events (namespace-level listener)
37
+ - `lce:forms` - All form events (namespace-level listener)
38
+
39
+ Example: listen to every action event:
40
+
41
+ ```javascript
42
+ window.addEventListener('lce:actions', (event) => {
43
+ const { metadata } = event.detail;
44
+ console.log('Action event:', metadata.event);
45
+ });
46
+ ```
47
+
48
+ ## Core Events
49
+
50
+ ### `lce:actions.client_ready`
51
+
52
+ Fires when the SDK finishes initializing and is ready for actions.
53
+
54
+ > **Always register this listener with `{ once: true }`.** The specific topic
55
+ > `lce:actions.client_ready` is dispatched **twice** — once synchronously, and once again on a
56
+ > microtask, so that listeners attached immediately after `await Elements(...)` resolves still catch
57
+ > it. Without `{ once: true }`, a handler registered before initialization runs **twice**, which
58
+ > double-injects components and double-counts analytics. (The namespace-level `lce:actions` listener
59
+ > receives it only once.)
60
+
61
+ **Data includes:** `isReady`, `message`, `timestamp`, `version`.
62
+
63
+ **Example**
64
+
65
+ ```javascript
66
+ window.addEventListener('lce:actions.client_ready', (event) => {
67
+ const { data } = event.detail;
68
+ if (data.isReady) {
69
+ console.log('Elements SDK ready', data.version);
70
+ }
71
+ }, { once: true });
72
+ ```
73
+
74
+ ## Product Events
75
+
76
+ ### `lce:actions.product_loaded`
77
+
78
+ Fires when a product component finishes loading and product data is available.
79
+
80
+ **Data includes:** `identifier`, `name`, `priceInfo`, `selectedSizeId`, `selectedFulfillmentType`.
81
+
82
+ **Example**
83
+
84
+ ```javascript
85
+ window.addEventListener('lce:actions.product_loaded', (event) => {
86
+ const { data } = event.detail;
87
+ console.log(`Loaded ${data.name} (${data.identifier})`);
88
+ });
89
+ ```
90
+
91
+ ### `lce:actions.product_add_to_cart`
92
+
93
+ Fires when the user triggers add-to-cart from a product component. Use cart events to confirm success or failure.
94
+
95
+ **Data includes:** `identifier`, `quantity`, `fulfillmentId`, `partNumber`, `engravingLines`.
96
+
97
+ **Example**
98
+
99
+ ```javascript
100
+ window.addEventListener('lce:actions.product_add_to_cart', (event) => {
101
+ const { data } = event.detail;
102
+ gtag('event', 'add_to_cart_click', { item_id: data.identifier, quantity: data.quantity });
103
+ });
104
+ ```
105
+
106
+ ### `lce:actions.product_size_changed`
107
+
108
+ Fires when the user changes the selected size.
109
+
110
+ **Data includes:** `identifier`, `selectedSizeId`, `selectedSize`, `previousSizeId`, `previousSize`.
111
+
112
+ **Example**
113
+
114
+ ```javascript
115
+ window.addEventListener('lce:actions.product_size_changed', (event) => {
116
+ const { data } = event.detail;
117
+ console.log(`Size changed to ${data.selectedSize}`);
118
+ });
119
+ ```
120
+
121
+ ### `lce:actions.product_fulfillment_type_changed`
122
+
123
+ Fires when the user switches between fulfillment types (for example shipping vs onDemand).
124
+
125
+ **Data includes:** `identifier`, `selectedFulfillmentType`, `previousFulfillmentType`, `selectedFulfillmentId`, `previousFulfillmentId`.
126
+
127
+ **Example**
128
+
129
+ ```javascript
130
+ window.addEventListener('lce:actions.product_fulfillment_type_changed', (event) => {
131
+ const { data } = event.detail;
132
+ console.log('Fulfillment type:', data.selectedFulfillmentType);
133
+ });
134
+ ```
135
+
136
+ ### `lce:actions.product_fulfillment_changed`
137
+
138
+ Fires when the user selects a different fulfillment option or retailer.
139
+
140
+ **Data includes:** `identifier`, `selectedFulfillmentId`, `previousFulfillmentId`, `selectedFulfillmentType`, `previousFulfillmentType`.
141
+
142
+ **Example**
143
+
144
+ ```javascript
145
+ window.addEventListener('lce:actions.product_fulfillment_changed', (event) => {
146
+ const { data } = event.detail;
147
+ console.log('Fulfillment changed:', data.selectedFulfillmentId);
148
+ });
149
+ ```
150
+
151
+ ### `lce:actions.product_quantity_increase`
152
+
153
+ Fires when the product quantity is increased.
154
+
155
+ **Data includes:** `identifier`, `quantity`, `previousQuantity`.
156
+
157
+ **Example**
158
+
159
+ ```javascript
160
+ window.addEventListener('lce:actions.product_quantity_increase', (event) => {
161
+ const { data } = event.detail;
162
+ console.log('Quantity increased to', data.quantity);
163
+ });
164
+ ```
165
+
166
+ ### `lce:actions.product_quantity_decrease`
167
+
168
+ Fires when the product quantity is decreased.
169
+
170
+ **Data includes:** `identifier`, `quantity`, `previousQuantity`.
171
+
172
+ **Example**
173
+
174
+ ```javascript
175
+ window.addEventListener('lce:actions.product_quantity_decrease', (event) => {
176
+ const { data } = event.detail;
177
+ console.log('Quantity decreased to', data.quantity);
178
+ });
179
+ ```
180
+
181
+ ## Address Events
182
+
183
+ ### `lce:actions.address_updated`
184
+
185
+ Fires when an address is successfully set.
186
+
187
+ **Data includes:** `googlePlacesId`, `formattedAddress`, `address`, `coordinates`.
188
+
189
+ **Example**
190
+
191
+ ```javascript
192
+ window.addEventListener('lce:actions.address_updated', (event) => {
193
+ const { data } = event.detail;
194
+ console.log('Address set:', data.formattedAddress);
195
+ });
196
+ ```
197
+
198
+ ### `lce:actions.address_cleared`
199
+
200
+ Fires when the current address is cleared.
201
+
202
+ **Data includes:** `true`.
203
+
204
+ **Example**
205
+
206
+ ```javascript
207
+ window.addEventListener('lce:actions.address_cleared', () => {
208
+ console.log('Address cleared');
209
+ });
210
+ ```
211
+
212
+ ### `lce:actions.address_failed`
213
+
214
+ Fires when setting the address fails.
215
+
216
+ **Data includes:** `googlePlacesId`, `formattedAddress`, `address`, `coordinates`, `error`.
217
+
218
+ **Example**
219
+
220
+ ```javascript
221
+ window.addEventListener('lce:actions.address_failed', (event) => {
222
+ const { data } = event.detail;
223
+ console.error('Address error:', data.error);
224
+ });
225
+ ```
226
+
227
+ ## Cart Events
228
+
229
+ ### `lce:actions.cart_shop_retailer`
230
+
231
+ A shopper activated **Shop {retailer}** from an unmet cart fulfillment minimum. Opt in with
232
+ `customTheme.cart.layout.showShopRetailerButton: true` (default `false`). The cart command
233
+ revalidates the fulfillment, its current retailer and items, fulfillment type, and remaining
234
+ minimum before emitting. Unsupported, empty, stale or already-satisfied fulfillments emit nothing.
235
+
236
+ ```typescript
237
+ interface ICartShopRetailerEventData {
238
+ retailerId: string;
239
+ fulfillmentId: string;
240
+ fulfillmentType: 'onDemand' | 'shipping';
241
+ }
242
+ ```
243
+
244
+ Listen with the exported constant; the usual event envelope is `{ data, metadata }`:
245
+
246
+ ```javascript
247
+ window.addEventListener(`lce:actions.${ELEMENTS_ACTIONS_EVENT.CART_SHOP_RETAILER}`, (event) => {
248
+ const { retailerId, fulfillmentId, fulfillmentType } = event.detail.data;
249
+ // Revalidate against client.actions.cart.getDetails(), then close the drawer
250
+ // and route to your catalog scoped to this retailer and fulfillment type.
251
+ });
252
+ ```
253
+
254
+ The SDK leaves the drawer open and does not navigate. The host handles routing and derives
255
+ retailer names, totals and minimums from current cart details. The event is also sent to `lce:actions`.
256
+
257
+
258
+
259
+ ### `lce:actions.cart_loaded`
260
+
261
+ Fires when the cart is fully loaded or synced.
262
+
263
+ **Data includes:** `cartId`, `itemCount`, `subtotal`, `items`, `promoCodeDiscount`.
264
+
265
+ **Example**
266
+
267
+ ```javascript
268
+ window.addEventListener('lce:actions.cart_loaded', (event) => {
269
+ const { data } = event.detail;
270
+ console.log(`Cart ${data.cartId} has ${data.itemCount} items`);
271
+ });
272
+ ```
273
+
274
+ ### `lce:actions.cart_opened`
275
+
276
+ Fires when the cart drawer opens.
277
+
278
+ **Data includes:** `true`.
279
+
280
+ **Example**
281
+
282
+ ```javascript
283
+ window.addEventListener('lce:actions.cart_opened', () => {
284
+ document.body.classList.add('cart-open');
285
+ });
286
+ ```
287
+
288
+ ### `lce:actions.cart_closed`
289
+
290
+ Fires when the cart drawer closes.
291
+
292
+ **Data includes:** `true`.
293
+
294
+ **Example**
295
+
296
+ ```javascript
297
+ window.addEventListener('lce:actions.cart_closed', () => {
298
+ document.body.classList.remove('cart-open');
299
+ });
300
+ ```
301
+
302
+ ### `lce:actions.cart_updated`
303
+
304
+ Fires when cart contents or totals change.
305
+
306
+ **Data includes:** `previous`, `current`.
307
+
308
+ **Example**
309
+
310
+ ```javascript
311
+ window.addEventListener('lce:actions.cart_updated', (event) => {
312
+ const { data } = event.detail;
313
+ const delta = data.current.itemCount - data.previous.itemCount;
314
+ if (delta !== 0) {
315
+ console.log('Item count changed by', delta);
316
+ }
317
+ });
318
+ ```
319
+
320
+ ### `lce:actions.cart_reset`
321
+
322
+ Fires when the cart is cleared.
323
+
324
+ **Data includes:** `true`.
325
+
326
+ **Example**
327
+
328
+ ```javascript
329
+ window.addEventListener('lce:actions.cart_reset', () => {
330
+ console.log('Cart reset');
331
+ });
332
+ ```
333
+
334
+ ### `lce:actions.cart_failed`
335
+
336
+ Fires when a cart operation fails.
337
+
338
+ **Data includes:** `cartId`, `message`.
339
+
340
+ **Example**
341
+
342
+ ```javascript
343
+ window.addEventListener('lce:actions.cart_failed', (event) => {
344
+ const { data } = event.detail;
345
+ console.error('Cart error:', data.message);
346
+ });
347
+ ```
348
+
349
+ ### `lce:actions.cart_item_added`
350
+
351
+ Fires when an item is added to the cart.
352
+
353
+ **Data includes:** `cartId`, `itemId`, `quantity`, `fulfillmentId`, `partNumber`.
354
+
355
+ **Example**
356
+
357
+ ```javascript
358
+ window.addEventListener('lce:actions.cart_item_added', (event) => {
359
+ const { data } = event.detail;
360
+ console.log(`Added item ${data.itemId} (qty ${data.quantity})`);
361
+ });
362
+ ```
363
+
364
+ ### `lce:actions.cart_item_removed`
365
+
366
+ Fires when an item is removed from the cart.
367
+
368
+ **Data includes:** `cartId`, `itemId`.
369
+
370
+ **Example**
371
+
372
+ ```javascript
373
+ window.addEventListener('lce:actions.cart_item_removed', (event) => {
374
+ const { data } = event.detail;
375
+ console.log('Removed item', data.itemId);
376
+ });
377
+ ```
378
+
379
+ ### `lce:actions.cart_item_quantity_increase`
380
+
381
+ Fires when a cart item quantity increases.
382
+
383
+ **Data includes:** `cartId`, `itemId`, `quantity`, `previousQuantity`.
384
+
385
+ **Example**
386
+
387
+ ```javascript
388
+ window.addEventListener('lce:actions.cart_item_quantity_increase', (event) => {
389
+ const { data } = event.detail;
390
+ console.log('Quantity increased to', data.quantity);
391
+ });
392
+ ```
393
+
394
+ ### `lce:actions.cart_item_quantity_decrease`
395
+
396
+ Fires when a cart item quantity decreases.
397
+
398
+ **Data includes:** `cartId`, `itemId`, `quantity`, `previousQuantity`.
399
+
400
+ **Example**
401
+
402
+ ```javascript
403
+ window.addEventListener('lce:actions.cart_item_quantity_decrease', (event) => {
404
+ const { data } = event.detail;
405
+ console.log('Quantity decreased to', data.quantity);
406
+ });
407
+ ```
408
+
409
+ ### `lce:actions.cart_item_engraving_updated`
410
+
411
+ Fires when engraving text is updated for a cart item.
412
+
413
+ **Data includes:** `cartId`, `itemId`, `engravingLines`, `previousEngravingLines`.
414
+
415
+ **Example**
416
+
417
+ ```javascript
418
+ window.addEventListener('lce:actions.cart_item_engraving_updated', (event) => {
419
+ const { data } = event.detail;
420
+ console.log('Updated engraving for', data.itemId);
421
+ });
422
+ ```
423
+
424
+ ### `lce:actions.cart_promo_code_applied`
425
+
426
+ Fires when a promo code is applied to the cart.
427
+
428
+ **Data includes:** `cartId`, `discount`, `newSubtotal`.
429
+
430
+ **Example**
431
+
432
+ ```javascript
433
+ window.addEventListener('lce:actions.cart_promo_code_applied', (event) => {
434
+ const { data } = event.detail;
435
+ console.log('Promo applied, discount:', data.discount);
436
+ });
437
+ ```
438
+
439
+ ### `lce:actions.cart_promo_code_removed`
440
+
441
+ Fires when a promo code is removed from the cart.
442
+
443
+ **Data includes:** `cartId`, `discount`, `newSubtotal`.
444
+
445
+ **Example**
446
+
447
+ ```javascript
448
+ window.addEventListener('lce:actions.cart_promo_code_removed', (event) => {
449
+ const { data } = event.detail;
450
+ console.log('Promo removed');
451
+ });
452
+ ```
453
+
454
+ ### `lce:actions.cart_promo_code_failed`
455
+
456
+ Fires when a promo code fails to apply.
457
+
458
+ **Data includes:** `cartId`, `error`.
459
+
460
+ **Example**
461
+
462
+ ```javascript
463
+ window.addEventListener('lce:actions.cart_promo_code_failed', (event) => {
464
+ const { data } = event.detail;
465
+ console.error('Promo code failed:', data.error);
466
+ });
467
+ ```
468
+
469
+ ### `lce:actions.cart_product_add_success`
470
+
471
+ Fires when adding products via the actions API succeeds.
472
+
473
+ **Data includes:** `cartId`, `itemsAdded`, `identifiers`.
474
+
475
+ **Example**
476
+
477
+ ```javascript
478
+ window.addEventListener('lce:actions.cart_product_add_success', (event) => {
479
+ const { data } = event.detail;
480
+ console.log(`Added ${data.itemsAdded} products`);
481
+ });
482
+ ```
483
+
484
+ ### `lce:actions.cart_product_add_failed`
485
+
486
+ Fires when adding products via the actions API fails.
487
+
488
+ **Data includes:** `cartId`, `identifiers`, `error`.
489
+
490
+ **Example**
491
+
492
+ ```javascript
493
+ window.addEventListener('lce:actions.cart_product_add_failed', (event) => {
494
+ const { data } = event.detail;
495
+ console.error('Product add failed:', data.error);
496
+ });
497
+ ```
498
+
499
+ ## Checkout Events
500
+
501
+ ### `lce:actions.checkout_loaded`
502
+
503
+ Fires when checkout data loads.
504
+
505
+ **Data includes:** `cartId`, `amounts`, `itemCount`, `isGift`, `billingSameAsShipping`, `deliveryScheduling` (keyed by fulfillment ID).
506
+
507
+ **Example**
508
+
509
+ ```javascript
510
+ window.addEventListener('lce:actions.checkout_loaded', (event) => {
511
+ const { data } = event.detail;
512
+ console.log('Checkout loaded for cart', data.cartId);
513
+ });
514
+ ```
515
+
516
+ ### `lce:actions.checkout_opened`
517
+
518
+ Fires when the checkout drawer opens.
519
+
520
+ **Data includes:** `true`.
521
+
522
+ **Example**
523
+
524
+ ```javascript
525
+ window.addEventListener('lce:actions.checkout_opened', () => {
526
+ console.log('Checkout opened');
527
+ });
528
+ ```
529
+
530
+ ### `lce:actions.checkout_closed`
531
+
532
+ Fires when the checkout drawer closes.
533
+
534
+ **Data includes:** `true`.
535
+
536
+ **Example**
537
+
538
+ ```javascript
539
+ window.addEventListener('lce:actions.checkout_closed', () => {
540
+ console.log('Checkout closed');
541
+ });
542
+ ```
543
+
544
+ ### `lce:actions.checkout_failed`
545
+
546
+ Fires when checkout fails to load or operate.
547
+
548
+ **Data includes:** `message`.
549
+
550
+ **Example**
551
+
552
+ ```javascript
553
+ window.addEventListener('lce:actions.checkout_failed', (event) => {
554
+ const { data } = event.detail;
555
+ console.error('Checkout error:', data.message);
556
+ });
557
+ ```
558
+
559
+ ### `lce:actions.checkout_customer_information_updated`
560
+
561
+ Fires when customer info (email, phone, name) is updated.
562
+
563
+ **Data includes:** `cartId`.
564
+
565
+ **Example**
566
+
567
+ ```javascript
568
+ window.addEventListener('lce:actions.checkout_customer_information_updated', (event) => {
569
+ const { data } = event.detail;
570
+ console.log('Customer info updated for cart', data.cartId);
571
+ });
572
+ ```
573
+
574
+ ### `lce:actions.checkout_billing_information_updated`
575
+
576
+ Fires when billing info is updated.
577
+
578
+ **Data includes:** `cartId`.
579
+
580
+ **Example**
581
+
582
+ ```javascript
583
+ window.addEventListener('lce:actions.checkout_billing_information_updated', (event) => {
584
+ const { data } = event.detail;
585
+ console.log('Billing info updated for cart', data.cartId);
586
+ });
587
+ ```
588
+
589
+ ### `lce:actions.checkout_gift_information_updated`
590
+
591
+ Fires when gift recipient info is updated.
592
+
593
+ **Data includes:** `cartId`.
594
+
595
+ **Example**
596
+
597
+ ```javascript
598
+ window.addEventListener('lce:actions.checkout_gift_information_updated', (event) => {
599
+ const { data } = event.detail;
600
+ console.log('Gift info updated for cart', data.cartId);
601
+ });
602
+ ```
603
+
604
+ ### `lce:actions.checkout_is_gift_toggled`
605
+
606
+ Fires when gift mode is toggled.
607
+
608
+ **Data includes:** `cartId`, `isActive`, `previousIsActive`.
609
+
610
+ **Example**
611
+
612
+ ```javascript
613
+ window.addEventListener('lce:actions.checkout_is_gift_toggled', (event) => {
614
+ const { data } = event.detail;
615
+ console.log('Gift mode:', data.isActive);
616
+ });
617
+ ```
618
+
619
+ ### `lce:actions.checkout_billing_same_as_shipping_toggled`
620
+
621
+ Fires when the billing same-as-shipping option is toggled.
622
+
623
+ **Data includes:** `cartId`, `isActive`, `previousIsActive`.
624
+
625
+ **Example**
626
+
627
+ ```javascript
628
+ window.addEventListener('lce:actions.checkout_billing_same_as_shipping_toggled', (event) => {
629
+ const { data } = event.detail;
630
+ console.log('Billing same as shipping:', data.isActive);
631
+ });
632
+ ```
633
+
634
+ ### `lce:actions.checkout_marketing_preferences_toggled`
635
+
636
+ Fires when a marketing preference is toggled.
637
+
638
+ **Data includes:** `cartId`, `fieldName`, `isActive`, `previousIsActive`.
639
+
640
+ **Example**
641
+
642
+ ```javascript
643
+ window.addEventListener('lce:actions.checkout_marketing_preferences_toggled', (event) => {
644
+ const { data } = event.detail;
645
+ console.log(`Marketing ${data.fieldName}:`, data.isActive);
646
+ });
647
+ ```
648
+
649
+ ### `lce:actions.checkout_item_removed`
650
+
651
+ Fires when an item is removed during checkout.
652
+
653
+ **Data includes:** `cartId`, `cartItemId`.
654
+
655
+ **Example**
656
+
657
+ ```javascript
658
+ window.addEventListener('lce:actions.checkout_item_removed', (event) => {
659
+ const { data } = event.detail;
660
+ console.log('Checkout item removed', data.cartItemId);
661
+ });
662
+ ```
663
+
664
+ ### `lce:actions.checkout_item_quantity_increase`
665
+
666
+ Fires when a checkout item quantity increases.
667
+
668
+ **Data includes:** `cartId`, `cartItemId`, `quantity`, `previousQuantity`.
669
+
670
+ **Example**
671
+
672
+ ```javascript
673
+ window.addEventListener('lce:actions.checkout_item_quantity_increase', (event) => {
674
+ const { data } = event.detail;
675
+ console.log('Checkout quantity increased to', data.quantity);
676
+ });
677
+ ```
678
+
679
+ ### `lce:actions.checkout_item_quantity_decrease`
680
+
681
+ Fires when a checkout item quantity decreases.
682
+
683
+ **Data includes:** `cartId`, `cartItemId`, `quantity`, `previousQuantity`.
684
+
685
+ **Example**
686
+
687
+ ```javascript
688
+ window.addEventListener('lce:actions.checkout_item_quantity_decrease', (event) => {
689
+ const { data } = event.detail;
690
+ console.log('Checkout quantity decreased to', data.quantity);
691
+ });
692
+ ```
693
+
694
+ ### `lce:actions.checkout_item_engraving_updated`
695
+
696
+ Fires when engraving text is updated for a checkout item.
697
+
698
+ **Data includes:** `cartId`, `cartItemId`, `engravingLines`, `previousEngravingLines`.
699
+
700
+ **Example**
701
+
702
+ ```javascript
703
+ window.addEventListener('lce:actions.checkout_item_engraving_updated', (event) => {
704
+ const { data } = event.detail;
705
+ console.log('Checkout engraving updated for', data.cartItemId);
706
+ });
707
+ ```
708
+
709
+ ### `lce:actions.checkout_delivery_method_updated`
710
+
711
+ Fires when the shopper moves a single-item checkout between same-day delivery and shipping. The order
712
+ is re-priced, so the totals change with it. The switch is shown only with
713
+ `development.enableExpressCheckout: true`.
714
+
715
+ **Data includes:** `cartId`, `fulfillmentType`, `previousFulfillmentType`, `fulfillmentId`.
716
+
717
+ **Example**
718
+
719
+ ```javascript
720
+ window.addEventListener('lce:actions.checkout_delivery_method_updated', (event) => {
721
+ const { data } = event.detail;
722
+ console.log('Delivery method now', data.fulfillmentType);
723
+ });
724
+ ```
725
+
726
+ ### `lce:actions.checkout_tip_updated`
727
+
728
+ Fires when delivery tips are updated.
729
+
730
+ **Data includes:** `cartId`, `deliveryTips`, `previousDeliveryTips`.
731
+
732
+ **Example**
733
+
734
+ ```javascript
735
+ window.addEventListener('lce:actions.checkout_tip_updated', (event) => {
736
+ const { data } = event.detail;
737
+ console.log('Tips updated for cart', data.cartId);
738
+ });
739
+ ```
740
+
741
+ ### `lce:actions.checkout_submit_started`
742
+
743
+ Fires when checkout submission starts.
744
+
745
+ **Data includes:** `started`.
746
+
747
+ **Example**
748
+
749
+ ```javascript
750
+ window.addEventListener('lce:actions.checkout_submit_started', (event) => {
751
+ const { data } = event.detail;
752
+ if (data.started) {
753
+ console.log('Checkout submission started');
754
+ }
755
+ });
756
+ ```
757
+
758
+ ### `lce:actions.checkout_submit_completed`
759
+
760
+ Fires when checkout submission completes successfully.
761
+
762
+ **Data includes:** `orderNumber`, `orderTotal`.
763
+
764
+ **Example**
765
+
766
+ ```javascript
767
+ window.addEventListener('lce:actions.checkout_submit_completed', (event) => {
768
+ const { data } = event.detail;
769
+ console.log('Order completed:', data.orderNumber);
770
+ });
771
+ ```
772
+
773
+ ### `lce:actions.checkout_submit_failed`
774
+
775
+ Fires when checkout submission fails.
776
+
777
+ **Data includes:** `message`.
778
+
779
+ **Example**
780
+
781
+ ```javascript
782
+ window.addEventListener('lce:actions.checkout_submit_failed', (event) => {
783
+ const { data } = event.detail;
784
+ console.error('Checkout submit failed:', data.message);
785
+ });
786
+ ```
787
+
788
+ ### `lce:actions.checkout_promo_code_applied`
789
+
790
+ Fires when a promo code is applied during checkout.
791
+
792
+ **Data includes:** `cartId`, `discount`, `newTotal`.
793
+
794
+ **Example**
795
+
796
+ ```javascript
797
+ window.addEventListener('lce:actions.checkout_promo_code_applied', (event) => {
798
+ const { data } = event.detail;
799
+ console.log('Checkout promo applied:', data.discount);
800
+ });
801
+ ```
802
+
803
+ ### `lce:actions.checkout_promo_code_removed`
804
+
805
+ Fires when a promo code is removed during checkout.
806
+
807
+ **Data includes:** `cartId`, `discount`, `newTotal`.
808
+
809
+ **Example**
810
+
811
+ ```javascript
812
+ window.addEventListener('lce:actions.checkout_promo_code_removed', (event) => {
813
+ const { data } = event.detail;
814
+ console.log('Checkout promo removed');
815
+ });
816
+ ```
817
+
818
+ ### `lce:actions.checkout_promo_code_failed`
819
+
820
+ Fires when a promo code fails during checkout.
821
+
822
+ **Data includes:** `cartId`, `error`.
823
+
824
+ **Example**
825
+
826
+ ```javascript
827
+ window.addEventListener('lce:actions.checkout_promo_code_failed', (event) => {
828
+ const { data } = event.detail;
829
+ console.error('Checkout promo failed:', data.error);
830
+ });
831
+ ```
832
+
833
+ ### `lce:actions.checkout_gift_card_applied`
834
+
835
+ Fires when a gift card is applied during checkout.
836
+
837
+ **Data includes:** `cartId`, `newTotal`.
838
+
839
+ **Example**
840
+
841
+ ```javascript
842
+ window.addEventListener('lce:actions.checkout_gift_card_applied', (event) => {
843
+ const { data } = event.detail;
844
+ console.log('Gift card applied, new total:', data.newTotal);
845
+ });
846
+ ```
847
+
848
+ ### `lce:actions.checkout_gift_card_removed`
849
+
850
+ Fires when a gift card is removed during checkout.
851
+
852
+ **Data includes:** `cartId`, `newTotal`.
853
+
854
+ **Example**
855
+
856
+ ```javascript
857
+ window.addEventListener('lce:actions.checkout_gift_card_removed', (event) => {
858
+ const { data } = event.detail;
859
+ console.log('Gift card removed');
860
+ });
861
+ ```
862
+
863
+ ### `lce:actions.checkout_gift_card_failed`
864
+
865
+ Fires when a gift card fails during checkout.
866
+
867
+ **Data includes:** `cartId`, `error`.
868
+
869
+ **Example**
870
+
871
+ ```javascript
872
+ window.addEventListener('lce:actions.checkout_gift_card_failed', (event) => {
873
+ const { data } = event.detail;
874
+ console.error('Gift card failed:', data.error);
875
+ });
876
+ ```
877
+
878
+ ### `lce:actions.checkout_express_checkout_availability`
879
+
880
+ Fires once the express checkout block has settled which wallet buttons the shopper can reach, and
881
+ again whenever that changes. It always fires at least once per block. `available` is `false` on a
882
+ device or browser that offers no wallet, on a gift order, when a payment method is already bound to
883
+ the checkout, and when Stripe.js cannot load; in every case the SDK hides the whole block including
884
+ its divider.
885
+
886
+ **Data includes:** `cartId`, `available`, `wallets`.
887
+
888
+ **Example**
889
+
890
+ ```javascript
891
+ window.addEventListener('lce:actions.checkout_express_checkout_availability', (event) => {
892
+ const { data } = event.detail;
893
+ console.log(data.available ? `Wallets: ${data.wallets.join(', ')}` : 'No wallets available');
894
+ });
895
+ ```
896
+
897
+ ### `lce:actions.checkout_express_checkout_started`
898
+
899
+ Fires when the shopper taps a wallet button and the SDK opens the wallet sheet, inside the checkout
900
+ or on a block placed with `injectExpressCheckout` / `injectExpressCheckoutElement`. It fires for every
901
+ tap, and not for a tap the block refuses (a total that moved, an unmet order minimum, a second tap
902
+ while an order is being placed). The tap happens inside Stripe's frame, so this is the only way a host
903
+ page learns of it — for instance, to report `add_to_cart` for a product-page wallet with
904
+ [`actions.analytics`](../api/actions/analytics-actions.md).
905
+
906
+ **Data includes:** `cartId`, `wallet` (Stripe's name for it: `'apple_pay'`, `'google_pay'`, …).
907
+
908
+ **Example**
909
+
910
+ ```javascript
911
+ window.addEventListener('lce:actions.checkout_express_checkout_started', (event) => {
912
+ const { wallet } = event.detail.data;
913
+ console.log(`Wallet sheet opened: ${wallet}`);
914
+ });
915
+ ```
916
+
917
+ ### `lce:actions.checkout_payment_form_failed`
918
+
919
+ Fires when the card form cannot load Stripe.js, so the card fields cannot appear. The shopper sees a
920
+ message and a **Try again** button where the card form would be; each attempt that fails fires the
921
+ event again. `reason` is `blocked` when something on the page held the script back before it was
922
+ fetched — typically a cookie-consent tool with auto-blocking, for a shopper who has not accepted the
923
+ category Stripe is filed under — and `timeout` or `error` when the load stalled or failed (`error` also when Stripe.js loads but cannot
924
+ build the card form, as when `api.stripe.com` is blocked). See
925
+ [Cookie consent and Content Security Policy](./checkout-component.md#cookie-consent-and-content-security-policy).
926
+
927
+ **Data includes:** `cartId`, `reason` (`'blocked' | 'timeout' | 'error'`).
928
+
929
+ **Example**
930
+
931
+ ```javascript
932
+ window.addEventListener('lce:actions.checkout_payment_form_failed', (event) => {
933
+ const { data } = event.detail;
934
+ if (data.reason === 'blocked') {
935
+ // For example, reopen your consent tool's preferences so the shopper can allow Stripe.
936
+ }
937
+ });
938
+ ```
939
+
940
+ ### `lce:actions.checkout_product_add_success`
941
+
942
+ Fires when products are added to checkout via the actions API.
943
+
944
+ **Data includes:** `cartId`, `itemsAdded`, `identifiers`.
945
+
946
+ **Example**
947
+
948
+ ```javascript
949
+ window.addEventListener('lce:actions.checkout_product_add_success', (event) => {
950
+ const { data } = event.detail;
951
+ console.log(`Checkout added ${data.itemsAdded} products`);
952
+ });
953
+ ```
954
+
955
+ ### `lce:actions.checkout_product_add_failed`
956
+
957
+ Fires when adding products to checkout via the actions API fails.
958
+
959
+ **Data includes:** `cartId`, `identifiers`, `error`.
960
+
961
+ **Example**
962
+
963
+ ```javascript
964
+ window.addEventListener('lce:actions.checkout_product_add_failed', (event) => {
965
+ const { data } = event.detail;
966
+ console.error('Checkout product add failed:', data.error);
967
+ });
968
+ ```
969
+
970
+ ### `lce:actions.checkout_delivery_selection_updated`
971
+
972
+ Emitted once after checkout prepare accepts a delivery window or ASAP choice, from the built-in picker or from `actions.checkout.chooseDeliverySlot`. Draft choices in the picker and failed saves do not emit it.
973
+
974
+ **Data:** `ICheckoutDetailsEventData`, including `deliveryScheduling: Record<string, CheckoutDeliveryScheduling>` keyed by fulfillment ID, with each accepted `selectedSlotId` and `selectedSlot`.
975
+
976
+ ```javascript
977
+ window.addEventListener('lce:actions.checkout_delivery_selection_updated', (event) => {
978
+ const scheduling = event.detail.data.deliveryScheduling;
979
+ console.log('Delivery windows:', scheduling);
980
+ });
981
+ ```
982
+
983
+ ## Form Events
984
+
985
+ ### `lce:forms.customer`
986
+
987
+ Fires when a customer form field changes in checkout.
988
+
989
+ **Data includes:** `fieldName`, `fieldValue`.
990
+
991
+ **Example**
992
+
993
+ ```javascript
994
+ window.addEventListener('lce:forms.customer', (event) => {
995
+ const { data } = event.detail;
996
+ console.log('Customer field changed:', data.fieldName);
997
+ });
998
+ ```
999
+
1000
+ ### `lce:forms.billing`
1001
+
1002
+ Fires when a billing form field changes in checkout.
1003
+
1004
+ **Data includes:** `fieldName`, `fieldValue`.
1005
+
1006
+ **Example**
1007
+
1008
+ ```javascript
1009
+ window.addEventListener('lce:forms.billing', (event) => {
1010
+ const { data } = event.detail;
1011
+ console.log('Billing field changed:', data.fieldName);
1012
+ });
1013
+ ```
1014
+
1015
+ ### `lce:forms.gift`
1016
+
1017
+ Fires when a gift form field changes in checkout.
1018
+
1019
+ **Data includes:** `fieldName`, `fieldValue`.
1020
+
1021
+ **Example**
1022
+
1023
+ ```javascript
1024
+ window.addEventListener('lce:forms.gift', (event) => {
1025
+ const { data } = event.detail;
1026
+ console.log('Gift field changed:', data.fieldName);
1027
+ });
1028
+ ```
1029
+
1030
+ ## Use Cases
1031
+
1032
+ ### Analytics Integration
1033
+
1034
+ ```javascript
1035
+ // Track product views
1036
+ window.addEventListener('lce:actions.product_loaded', (event) => {
1037
+ const { data } = event.detail;
1038
+ gtag('event', 'view_item', {
1039
+ items: [{
1040
+ item_id: data.identifier,
1041
+ item_name: data.name,
1042
+ price: data.priceInfo?.minimum / 100
1043
+ }]
1044
+ });
1045
+ });
1046
+
1047
+ // Track purchases
1048
+ window.addEventListener('lce:actions.checkout_submit_completed', (event) => {
1049
+ const { data } = event.detail;
1050
+ gtag('event', 'purchase', {
1051
+ transaction_id: data.orderNumber,
1052
+ value: data.orderTotal / 100,
1053
+ currency: 'USD'
1054
+ });
1055
+ });
1056
+ ```
1057
+
1058
+ ## See Also
1059
+
1060
+ - [Component Guides](../guides/)
1061
+ - [Actions API](../api/actions/)