@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,441 @@
1
+ # Address Component
2
+
3
+ The Address component manages delivery location for availability checking and accurate pricing throughout the SDK.
4
+
5
+ ## Overview
6
+
7
+ The Address component:
8
+ - Provides location input via Google Places integration
9
+ - Allows manual address entry
10
+ - Stores location for cart/checkout
11
+ - Enables location-based pricing
12
+ - Determines product availability
13
+ - Supports fulfillment type selection
14
+
15
+ ## How It Works
16
+
17
+ The address component is **embedded in the product component by default**. Users set their address when viewing products, and this address is used throughout the cart and checkout flow.
18
+
19
+ ### Automatic Address Prompting
20
+
21
+ When a user tries to add a product to cart without setting an address:
22
+
23
+ 1. Address input drawer opens automatically
24
+ 2. User enters their address
25
+ 3. Address is saved
26
+ 4. Add-to-cart action resumes automatically
27
+
28
+ No additional code needed - this is handled automatically.
29
+
30
+ ## Standalone Usage
31
+
32
+ Use the standalone address component when you need a dedicated address selection page:
33
+
34
+ ```javascript
35
+ const client = await Elements('YOUR_API_KEY', { env: 'production' });
36
+
37
+ await client.injectAddressElement('address-container');
38
+
39
+ // React to address selection by listening for the address_updated event
40
+ window.addEventListener('lce:actions.address_updated', (event) => {
41
+ console.log('Address set:', event.detail.data);
42
+ });
43
+ ```
44
+
45
+ ```html
46
+ <div id="address-container"></div>
47
+ ```
48
+
49
+ ## Address Actions
50
+
51
+ ### Set Address via Google Places ID
52
+
53
+ The recommended method - provides accurate geocoding:
54
+
55
+ ```javascript
56
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId('ChIJOwg_06VPwokRYv534QaPC8g');
57
+ ```
58
+
59
+ If you run Google Places Autocomplete yourself with a [session token](https://developers.google.com/maps/documentation/places/web-service/session-tokens), pass the same token as the second argument. The details request then ends your session, and Google bills the autocomplete requests as one session instead of per request. Google only groups requests whose API keys belong to the same Google Cloud project, so this applies only when your autocomplete requests used the same project as LiquidCommerce's address service; a token from autocomplete requests made with an API key in another project doesn't change billing:
60
+
61
+ ```javascript
62
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(placesId, sessionToken);
63
+ ```
64
+
65
+ **How to get a Places ID:**
66
+
67
+ Visit [Google Place IDs](https://developers.google.com/maps/documentation/places/web-service/place-id#find-id) for details on obtaining a Places ID.
68
+
69
+ ### Set Address Manually
70
+
71
+ For custom address flows without Google Places:
72
+
73
+ ```javascript
74
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(
75
+ {
76
+ one: '123 Main Street',
77
+ two: 'Apt 4', // Optional at runtime
78
+ city: 'New York',
79
+ state: 'NY',
80
+ zip: '10001',
81
+ country: 'US'
82
+ },
83
+ {
84
+ latitude: 40.7128,
85
+ longitude: -74.0060
86
+ }
87
+ );
88
+ ```
89
+
90
+ **Requirements:**
91
+ - `one`: Street address (required)
92
+ - `two`: Apartment, suite, etc. (optional)
93
+ - `city`: City name (required)
94
+ - `state`: Two-letter state code (required)
95
+ - `zip`: ZIP/postal code (required)
96
+ - `country`: Country code, e.g. `'US'` (required by the `IAddressAddress` type)
97
+ - `latitude`: Number between -90 and 90 (required)
98
+ - `longitude`: Number between -180 and 180 (required)
99
+
100
+ ### Get Address Details
101
+
102
+ Retrieve the current address:
103
+
104
+ ```javascript
105
+ const addressData = window.LiquidCommerce.elements.actions.address.getDetails();
106
+
107
+ console.log(addressData);
108
+ // {
109
+ // id: 'ChIJ...',
110
+ // address: {
111
+ // one: '123 Main Street',
112
+ // two: 'Apt 4',
113
+ // city: 'New York',
114
+ // state: 'NY',
115
+ // zip: '10001',
116
+ // country: 'US'
117
+ // },
118
+ // coordinates: {
119
+ // latitude: 40.7128,
120
+ // longitude: -74.0060
121
+ // },
122
+ // formattedAddress: '123 Main Street, Apt 4, New York, NY 10001'
123
+ // }
124
+
125
+ // Returns null if no address is set
126
+ ```
127
+
128
+ ### Clear Address
129
+
130
+ Remove the current address:
131
+
132
+ ```javascript
133
+ await window.LiquidCommerce.elements.actions.address.clear();
134
+ ```
135
+
136
+ This will:
137
+ - Clear stored address
138
+ - Trigger address prompts on next cart action
139
+ - Update all components that depend on location
140
+
141
+ ## Events
142
+
143
+ ### Address Updated
144
+
145
+ Fired when a new address is set:
146
+
147
+ ```javascript
148
+ window.addEventListener('lce:actions.address_updated', (event) => {
149
+ const { address, coordinates, formattedAddress } = event.detail.data;
150
+
151
+ console.log('New address:', formattedAddress);
152
+ console.log('Coordinates:', coordinates);
153
+ });
154
+ ```
155
+
156
+ ### Address Cleared
157
+
158
+ Fired when address is removed:
159
+
160
+ ```javascript
161
+ window.addEventListener('lce:actions.address_cleared', (event) => {
162
+ console.log('Address has been cleared');
163
+ });
164
+ ```
165
+
166
+ ### Address Failed
167
+
168
+ Fired when address setting fails:
169
+
170
+ ```javascript
171
+ window.addEventListener('lce:actions.address_failed', (event) => {
172
+ const { error } = event.detail.data;
173
+ console.error('Address error:', error);
174
+ });
175
+ ```
176
+
177
+ ## Customization
178
+
179
+ ### Theme Configuration
180
+
181
+ Customize address component appearance:
182
+
183
+ ```javascript
184
+ const client = await Elements('YOUR_API_KEY', {
185
+ env: 'production',
186
+ customTheme: {
187
+ address: {
188
+ theme: {
189
+ backgroundColor: '#ffffff'
190
+ }
191
+ }
192
+ }
193
+ });
194
+ ```
195
+
196
+ ## Use Cases
197
+
198
+ ### Dedicated Location Page
199
+
200
+ Create a dedicated page for address selection:
201
+
202
+ ```html
203
+ <!DOCTYPE html>
204
+ <html>
205
+ <head>
206
+ <title>Set Delivery Location</title>
207
+ <script
208
+ defer
209
+ data-liquid-commerce-elements
210
+ data-token="YOUR_API_KEY"
211
+ data-env="production"
212
+ type="text/javascript"
213
+ src="https://elements.reservebar-worker.workers.dev/all/elements.js"
214
+ ></script>
215
+ </head>
216
+ <body>
217
+ <h1>Where should we deliver?</h1>
218
+ <div id="address"></div>
219
+
220
+ <script>
221
+ window.addEventListener('lce:actions.client_ready', async () => {
222
+ await window.LiquidCommerce.elements.injectAddressElement('address');
223
+ }, { once: true });
224
+
225
+ window.addEventListener('lce:actions.address_updated', () => {
226
+ // Redirect to product page after address is set
227
+ window.location.href = '/products';
228
+ });
229
+ </script>
230
+ </body>
231
+ </html>
232
+ ```
233
+
234
+ ### Custom Address Input with Validation
235
+
236
+ ```javascript
237
+ document.getElementById('save-address-btn').addEventListener('click', async () => {
238
+ const address = {
239
+ one: document.getElementById('street').value,
240
+ two: document.getElementById('apt').value,
241
+ city: document.getElementById('city').value,
242
+ state: document.getElementById('state').value,
243
+ zip: document.getElementById('zip').value
244
+ };
245
+
246
+ // Get coordinates from your geocoding service
247
+ const coords = await geocodeAddress(address);
248
+
249
+ try {
250
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(address, coords);
251
+ showSuccessMessage('Address saved!');
252
+ } catch (error) {
253
+ showErrorMessage('Invalid address');
254
+ }
255
+ });
256
+ ```
257
+
258
+ ### Pre-fill Address from User Account
259
+
260
+ ```javascript
261
+ // After user logs in, set their saved address
262
+ window.addEventListener('lce:actions.client_ready', async () => {
263
+ if (userIsLoggedIn && !currentAddressSet) {
264
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(
265
+ user.savedAddress,
266
+ user.savedCoordinates
267
+ );
268
+ }
269
+ }, { once: true });
270
+ ```
271
+
272
+ ### Location-Based Product Filtering
273
+
274
+ ```javascript
275
+ window.addEventListener('lce:actions.address_updated', async (event) => {
276
+ const { coordinates } = event.detail.data;
277
+
278
+ // Fetch products available in this location
279
+ const availableProducts = await fetch('/api/products', {
280
+ method: 'POST',
281
+ body: JSON.stringify({ latitude: coordinates.latitude, longitude: coordinates.longitude })
282
+ }).then(r => r.json());
283
+
284
+ // Update UI with available products
285
+ displayProducts(availableProducts);
286
+ });
287
+ ```
288
+
289
+ ### Multi-Location Switcher
290
+
291
+ ```javascript
292
+ const locations = [
293
+ { name: 'Home', placesId: 'ChIJ...' },
294
+ { name: 'Work', placesId: 'ChIJ...' },
295
+ { name: 'Mom\'s House', placesId: 'ChIJ...' }
296
+ ];
297
+
298
+ document.getElementById('location-select').addEventListener('change', async (e) => {
299
+ const selectedLocation = locations[e.target.value];
300
+
301
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(
302
+ selectedLocation.placesId
303
+ );
304
+
305
+ showNotification(`Switched to ${selectedLocation.name}`);
306
+ });
307
+ ```
308
+
309
+ ## Address Persistence
310
+
311
+ ### Storage
312
+
313
+ Addresses are stored in:
314
+ - SDK internal store
315
+ - LocalStorage (for persistence)
316
+ - Session (until explicitly cleared)
317
+
318
+ ### Lifespan
319
+
320
+ Addresses persist:
321
+ - Across page refreshes
322
+ - Across browser sessions
323
+ - Until explicitly cleared by user or code
324
+
325
+ ### Privacy
326
+
327
+ Addresses are:
328
+ - Stored locally in the browser
329
+ - Sent to LiquidCommerce servers for availability/product loading; the address id (with the cart id) may also be persisted server-side as a session fallback when localStorage is unavailable (and a delete request is sent when the address is cleared)
330
+ - Cleared when user logs out (if you implement logout handling)
331
+
332
+ ## Best Practices
333
+
334
+ ### Request Early
335
+
336
+ Set address as early as possible in the user flow:
337
+
338
+ ```javascript
339
+ // On homepage or landing page
340
+ window.addEventListener('lce:actions.client_ready', () => {
341
+ const currentAddress = window.LiquidCommerce.elements.actions.address.getDetails();
342
+
343
+ if (!currentAddress) {
344
+ // Show address prompt
345
+ showAddressPrompt();
346
+ }
347
+ }, { once: true });
348
+ ```
349
+
350
+ ### Provide Context
351
+
352
+ Explain why you need the address:
353
+
354
+ ```html
355
+ <div class="address-explainer">
356
+ <h2>Where should we deliver?</h2>
357
+ <p>We need your location to show available products and accurate pricing.</p>
358
+ <div id="address"></div>
359
+ </div>
360
+ ```
361
+
362
+ ### Validate Manually Entered Addresses
363
+
364
+ When using manual address entry, validate before setting:
365
+
366
+ ```javascript
367
+ async function setAddress(address, coords) {
368
+ // Validate format
369
+ if (!address.one || !address.city || !address.state || !address.zip) {
370
+ throw new Error('Missing required address fields');
371
+ }
372
+
373
+ // Validate state code
374
+ if (address.state.length !== 2) {
375
+ throw new Error('State must be 2-letter code');
376
+ }
377
+
378
+ // Validate ZIP
379
+ if (!/^\d{5}(-\d{4})?$/.test(address.zip)) {
380
+ throw new Error('Invalid ZIP code');
381
+ }
382
+
383
+ // Validate coordinates
384
+ if (coords.latitude < -90 || coords.latitude > 90) {
385
+ throw new Error('Invalid latitude');
386
+ }
387
+
388
+ if (coords.longitude < -180 || coords.longitude > 180) {
389
+ throw new Error('Invalid longitude');
390
+ }
391
+
392
+ // Set address
393
+ await window.LiquidCommerce.elements.actions.address.setAddressManually(address, coords);
394
+ }
395
+ ```
396
+
397
+ ### Handle Errors Gracefully
398
+
399
+ ```javascript
400
+ try {
401
+ await window.LiquidCommerce.elements.actions.address.setAddressByPlacesId(placesId);
402
+ } catch (error) {
403
+ console.error('Failed to set address:', error);
404
+
405
+ // Show user-friendly error
406
+ showError('Unable to set that address. Please try again or enter manually.');
407
+
408
+ // Fall back to manual entry
409
+ showManualAddressForm();
410
+ }
411
+ ```
412
+ ## Troubleshooting
413
+
414
+ ### Address Not Persisting
415
+
416
+ 1. Check localStorage is not disabled
417
+ 2. Verify no errors in console
418
+ 3. Ensure `clear()` is not being called unintentionally
419
+ 4. Check that address was set successfully (no errors thrown)
420
+
421
+ ### Products Not Updating After Address Change
422
+
423
+ 1. Products should automatically rerender when address changes
424
+ 2. Check console for errors
425
+ 3. Verify address was actually set (not just input changed)
426
+ 4. Try manually rerendering product components
427
+
428
+ ### Invalid Address Errors
429
+
430
+ 1. Ensure all required fields are provided
431
+ 2. Verify coordinates are within valid ranges
432
+ 3. Check state code is 2 letters
433
+ 4. Validate ZIP code format
434
+ 5. Use Places ID method for most accurate results
435
+
436
+ ## See Also
437
+
438
+ - [Product Component](./product-component.md) - Uses address for availability
439
+ - [Cart Component](./cart-component.md) - Requires address for adding items
440
+ - [Actions API](../api/actions/address-actions.md) - Address actions reference
441
+ - [Events](./events.md) - All available events