@liquidcommerce/elements-sdk 2.6.0-beta.1 → 2.6.0-beta.100

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 (274) hide show
  1. package/README.md +99 -2517
  2. package/dist/index.checkout.esm.js +17794 -0
  3. package/dist/index.esm.js +26010 -20601
  4. package/dist/ssr-stub.checkout.esm.js +18 -0
  5. package/dist/ssr-stub.esm.js +270 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +50 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +15 -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/{elements-client-helper.d.ts → clients/helpers.d.ts} +2 -1
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -6
  14. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  15. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  16. package/dist/types/core/a11y/focusable.d.ts +5 -0
  17. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  18. package/dist/types/core/a11y/index.d.ts +5 -0
  19. package/dist/types/core/a11y/single-select.d.ts +16 -0
  20. package/dist/types/core/api/api-client.service.d.ts +23 -22
  21. package/dist/types/core/api/api-result.d.ts +19 -0
  22. package/dist/types/core/api/auth-client.service.d.ts +39 -26
  23. package/dist/types/core/api/http-client.service.d.ts +0 -8
  24. package/dist/types/core/base-component.service.d.ts +4 -1
  25. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  26. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  27. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  28. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +69 -0
  29. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  30. package/dist/types/core/client/client-action.service.d.ts +6 -67
  31. package/dist/types/core/client/client-config.service.d.ts +9 -5
  32. package/dist/types/core/command/base-command.service.d.ts +2 -2
  33. package/dist/types/core/command/common-command.service.d.ts +2 -1
  34. package/dist/types/core/google-tag-manager.service.d.ts +15 -11
  35. package/dist/types/core/logger/logger.service.d.ts +1 -1
  36. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +6 -12
  37. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  38. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -50
  39. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +11 -6
  40. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  41. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  42. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  43. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  44. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  45. package/dist/types/core/store/interfaces/checkout.interface.d.ts +18 -108
  46. package/dist/types/core/store/interfaces/core.interface.d.ts +16 -5
  47. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  48. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  49. package/dist/types/core/store/interfaces/product.interface.d.ts +13 -66
  50. package/dist/types/core/store/store.constant.d.ts +6 -1
  51. package/dist/types/core/store/store.service.d.ts +1 -0
  52. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +40 -1
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +8 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +8 -3
  59. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +96 -0
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +239 -0
  62. package/dist/types/interfaces/{cloud → api}/index.d.ts +1 -3
  63. package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
  64. package/dist/types/interfaces/api/product.interface.d.ts +112 -0
  65. package/dist/types/interfaces/client.interface.d.ts +72 -0
  66. package/dist/types/interfaces/component.interface.d.ts +7 -0
  67. package/dist/types/interfaces/config.interface.d.ts +40 -0
  68. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  69. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  72. package/dist/types/interfaces/configs/global.interface.d.ts +10 -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 +4 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +49 -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 +10 -1
  79. package/dist/types/modules/address/address.command.d.ts +4 -4
  80. package/dist/types/modules/address/address.interface.d.ts +0 -7
  81. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  82. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  83. package/dist/types/modules/cart/components/cart-body.component.d.ts +3 -1
  84. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  85. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  86. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  87. package/dist/types/modules/cart/components/cart-item.component.d.ts +6 -0
  88. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  89. package/dist/types/modules/checkout/checkout.commands.d.ts +27 -10
  90. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  91. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  92. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +5 -0
  93. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  94. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  95. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  96. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +2 -1
  97. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +2 -0
  98. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  99. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  100. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  101. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  102. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  103. package/dist/types/modules/checkout/constant.d.ts +3 -0
  104. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  105. package/dist/types/modules/product/components/components.d.ts +7 -4
  106. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +7 -1
  107. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  108. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  109. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  110. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  111. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +4 -0
  112. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +10 -2
  113. package/dist/types/modules/product/product.commands.d.ts +7 -7
  114. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  115. package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
  116. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  117. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  118. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  119. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  120. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  121. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  122. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  123. package/dist/types/modules/product-list/components/filter-components/product-list-checkbox-filter.d.ts +7 -0
  124. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  125. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  126. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  127. package/dist/types/modules/product-list/components/filter-components/product-list-price-filter.d.ts +22 -0
  128. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  129. package/dist/types/modules/product-list/components/index.d.ts +6 -0
  130. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  131. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +36 -30
  132. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  133. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +56 -14
  134. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  135. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +53 -0
  136. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  137. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  138. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  139. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -7
  140. package/dist/types/modules/product-list/product-list.component.d.ts +17 -39
  141. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  142. package/dist/types/modules/product-list/product-list.interface.d.ts +65 -0
  143. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  144. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  145. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  146. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  147. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  148. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  149. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  150. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  151. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  152. package/dist/types/modules/ui-components/alert/alert.component.d.ts +1 -1
  153. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  154. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  155. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +8 -1
  156. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  157. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  158. package/dist/types/modules/ui-components/input/input.component.d.ts +14 -1
  159. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  160. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  161. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  162. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  163. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  164. package/dist/types/ssr/stub.d.ts +10 -0
  165. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  166. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  167. package/dist/types/static/icon/check.icon.d.ts +2 -0
  168. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  169. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  170. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  171. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  172. package/dist/types/static/icon/close.icon.d.ts +1 -1
  173. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  174. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  175. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  176. package/dist/types/static/icon/icon.types.d.ts +1 -0
  177. package/dist/types/static/icon/index.d.ts +3 -0
  178. package/dist/types/static/icon/info.icon.d.ts +1 -1
  179. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  180. package/dist/types/static/icon/search.icon.d.ts +1 -1
  181. package/dist/types/static/icon/success.icon.d.ts +1 -1
  182. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  183. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  184. package/dist/types/utils/dom-compat.d.ts +2 -0
  185. package/dist/types/utils/format.d.ts +4 -14
  186. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  187. package/dist/types/utils/product-selection.d.ts +16 -0
  188. package/dist/types/utils/product.d.ts +15 -0
  189. package/docs/v1/README.md +213 -0
  190. package/docs/v1/api/actions/address-actions.md +286 -0
  191. package/docs/v1/api/actions/cart-actions.md +364 -0
  192. package/docs/v1/api/actions/checkout-actions.md +527 -0
  193. package/docs/v1/api/actions/product-actions.md +204 -0
  194. package/docs/v1/api/client.md +596 -0
  195. package/docs/v1/api/configuration.md +555 -0
  196. package/docs/v1/api/injection-methods.md +292 -0
  197. package/docs/v1/api/typescript-types.md +423 -0
  198. package/docs/v1/api/ui-helpers.md +200 -0
  199. package/docs/v1/examples/advanced-patterns.md +199 -0
  200. package/docs/v1/examples/checkout-flow.md +90 -0
  201. package/docs/v1/examples/custom-theming.md +63 -0
  202. package/docs/v1/examples/multi-product-page.md +90 -0
  203. package/docs/v1/examples/simple-product-page.md +89 -0
  204. package/docs/v1/getting-started/concepts.md +521 -0
  205. package/docs/v1/getting-started/installation.md +349 -0
  206. package/docs/v1/getting-started/quick-start.md +410 -0
  207. package/docs/v1/guides/accessibility.md +173 -0
  208. package/docs/v1/guides/address-component.md +435 -0
  209. package/docs/v1/guides/best-practices.md +365 -0
  210. package/docs/v1/guides/cart-component.md +757 -0
  211. package/docs/v1/guides/checkout-component.md +670 -0
  212. package/docs/v1/guides/events.md +939 -0
  213. package/docs/v1/guides/product-component.md +735 -0
  214. package/docs/v1/guides/product-list-component.md +630 -0
  215. package/docs/v1/guides/theming.md +228 -0
  216. package/docs/v1/integration/angular.md +39 -0
  217. package/docs/v1/integration/laravel.md +41 -0
  218. package/docs/v1/integration/nextjs.md +69 -0
  219. package/docs/v1/integration/proxy-setup.md +106 -0
  220. package/docs/v1/integration/react.md +64 -0
  221. package/docs/v1/integration/vanilla-js.md +84 -0
  222. package/docs/v1/integration/vue.md +58 -0
  223. package/docs/v1/reference/analytics.md +108 -0
  224. package/docs/v1/reference/browser-support.md +47 -0
  225. package/docs/v1/reference/error-handling.md +83 -0
  226. package/docs/v1/reference/performance.md +52 -0
  227. package/docs/v1/reference/telemetry.md +85 -0
  228. package/docs/v1/reference/troubleshooting.md +135 -0
  229. package/package.json +69 -45
  230. package/dist/types/elements-builder-client.d.ts +0 -2
  231. package/dist/types/elements-client.d.ts +0 -2
  232. package/dist/types/enums/cloud.enum.d.ts +0 -77
  233. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  234. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  235. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  236. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  237. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  238. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  239. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  240. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  241. package/dist/types/interfaces/core.interface.d.ts +0 -111
  242. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  243. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  244. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  245. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  246. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  247. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  248. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  249. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  250. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  251. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  252. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  253. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  254. package/dist/types/utils/helper.d.ts +0 -27
  255. package/docs/ACTIONS.md +0 -1300
  256. package/docs/BROWSER_SUPPORT.md +0 -279
  257. package/docs/CONFIGURATION.md +0 -853
  258. package/docs/DOCUMENTATION_INDEX.md +0 -311
  259. package/docs/EVENTS.md +0 -798
  260. package/docs/PROXY.md +0 -228
  261. package/docs/THEMING.md +0 -589
  262. package/docs/TROUBLESHOOTING.md +0 -793
  263. package/umd/elements.js +0 -1
  264. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  265. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  266. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  267. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  268. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  269. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  270. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  271. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  272. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  273. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  274. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -1,22 +0,0 @@
1
- export interface ICoreParams {
2
- refresh?: boolean;
3
- isLean?: boolean;
4
- isLegacy?: boolean;
5
- }
6
- export interface ILiquidPaymentToken {
7
- id?: string;
8
- type?: string;
9
- card?: {
10
- brand: string | null;
11
- country: string | null;
12
- expMonth: number | null;
13
- expYear: number | null;
14
- last4: string | null;
15
- funding: string | null;
16
- };
17
- created?: number;
18
- error?: {
19
- message: string;
20
- code?: string;
21
- };
22
- }
@@ -1,158 +0,0 @@
1
- import type { FulfillmentType } from '@/enums';
2
- import type { ILocBase } from './address.interface';
3
- import type { IRetailer } from './retailer.interface';
4
- export interface IAvailabilityParams extends ILocBase {
5
- upcs?: string[];
6
- grouping?: string[];
7
- ids?: string[];
8
- shouldShowOffHours?: boolean;
9
- }
10
- export interface IAvailabilityResponse {
11
- products: IProduct[];
12
- retailers: IRetailer[];
13
- }
14
- export interface IAttributesImage {
15
- backOfBottle: string;
16
- frontOfBottle: string;
17
- lifestyle: string[];
18
- }
19
- export interface IAttributesAward {
20
- image: string;
21
- statement: string;
22
- title: string;
23
- }
24
- export interface IAttributesRecipeIngredient {
25
- name: string;
26
- amount: string;
27
- }
28
- export interface IAttributesRecipe {
29
- image: string;
30
- ingredients: IAttributesRecipeIngredient[];
31
- steps: string[];
32
- title: string;
33
- }
34
- export interface IAttributesVideo {
35
- link: string;
36
- image: string;
37
- title: string;
38
- }
39
- export interface IAttributesTastingNote {
40
- statement: string;
41
- image: string;
42
- title: string;
43
- }
44
- export interface IAttributesPersonalization {
45
- type: string;
46
- engravingMaxLines: number;
47
- engravingMaxCharsPerLine: number;
48
- location: string[];
49
- width: number;
50
- height: number;
51
- image: string;
52
- fee: number;
53
- availableFrom: Date;
54
- availableTo: Date;
55
- }
56
- export interface IAttributes {
57
- brandOrigin: string;
58
- originStatement: string;
59
- ownershipType: string[];
60
- tags: string[];
61
- images: IAttributesImage;
62
- awards: IAttributesAward[];
63
- recipes: IAttributesRecipe[];
64
- video: IAttributesVideo[];
65
- tastingNotes: IAttributesTastingNote[];
66
- personalizations: IAttributesPersonalization[];
67
- }
68
- export interface IProductFulfillmentTypes {
69
- shipping: string;
70
- onDemand: string;
71
- }
72
- export interface IProductVariant {
73
- partNumber: string;
74
- retailerId: string;
75
- price: number;
76
- modalities?: FulfillmentType[];
77
- salePrice: number;
78
- isEngravable: boolean;
79
- stock: number;
80
- fulfillments: string[];
81
- fulfillmentTypes: IProductFulfillmentTypes;
82
- }
83
- export interface IProductSizeEngraving {
84
- status: boolean;
85
- validated?: boolean;
86
- maxLines: number;
87
- maxCharsPerLine: number;
88
- fee: number;
89
- location: string;
90
- }
91
- export interface IProductSizeAttributes {
92
- engraving?: IProductSizeEngraving;
93
- presale?: IProductPresale;
94
- maxQuantityPerOrder?: number;
95
- }
96
- export interface IProductSize {
97
- id: string;
98
- salsifyPid?: string;
99
- upc: string;
100
- size: string;
101
- volume: string;
102
- uom: string;
103
- image: string;
104
- pack: boolean;
105
- packDesc: string;
106
- container: string;
107
- maxQuantityPerOrder: number;
108
- containerType: string;
109
- attributes: IProductSizeAttributes;
110
- variants: IProductVariant[];
111
- }
112
- export interface IProductPriceInfo {
113
- currency: string;
114
- minimum: number;
115
- average: number;
116
- maximum: number;
117
- }
118
- export interface IProduct {
119
- id?: string;
120
- name: string;
121
- brand: string;
122
- catPath: string;
123
- category: string;
124
- classification: string;
125
- type: string;
126
- salsifyGrouping: string;
127
- subType: string;
128
- region: string;
129
- country: string;
130
- material: string;
131
- abv: string;
132
- proof: string;
133
- age: string;
134
- color: string;
135
- flavor: string;
136
- variety: string;
137
- appellation: string;
138
- vintage: string;
139
- description: string;
140
- htmlDescription: string;
141
- tastingNotes: string;
142
- images: string[];
143
- sizes: IProductSize[];
144
- attributes?: Partial<IAttributes>;
145
- priceInfo: IProductPriceInfo | null;
146
- }
147
- export interface IProductData {
148
- products: IProduct[];
149
- retailers: IRetailer[];
150
- }
151
- export interface IProductPresale {
152
- canPurchaseOn: null | string;
153
- estimatedShipBy: null | string;
154
- isActive: boolean;
155
- language: string;
156
- presaleLimit: number;
157
- price: number;
158
- }
@@ -1,67 +0,0 @@
1
- import type { FulfillmentType } from '@/enums';
2
- import type { DAYS_OF_WEEK } from '@/enums/cloud.enum';
3
- import type { IAddress, ICoords } from './address.interface';
4
- export interface IRetailerTimes {
5
- startsAt: string;
6
- endsAt: string;
7
- }
8
- export interface IRetailerHoursConfig {
9
- active: boolean;
10
- times: IRetailerTimes[];
11
- }
12
- export type RetailerHours = {
13
- [day in DAYS_OF_WEEK]: IRetailerHoursConfig;
14
- };
15
- export interface IRetailerExpectation {
16
- detail: string;
17
- short: string;
18
- engraving: string;
19
- }
20
- export interface IRetailerFreeDelivery {
21
- min: number;
22
- active: boolean;
23
- }
24
- export interface IFeeShippingConfig {
25
- maxQuantity: number;
26
- fee: number;
27
- active: boolean;
28
- min: number;
29
- }
30
- export interface IRetailerFeeShipping {
31
- individual: IFeeShippingConfig;
32
- pack: IFeeShippingConfig;
33
- free: IRetailerFreeDelivery;
34
- }
35
- export interface IRetailerFeeDelivery {
36
- min: number;
37
- fee: number;
38
- free: IRetailerFreeDelivery;
39
- }
40
- export type IRetailerFees = IRetailerFeeShipping | IRetailerFeeDelivery;
41
- export interface IRetailerFulfillments {
42
- id: string;
43
- type: FulfillmentType;
44
- deliveryFee?: number;
45
- shippingFee?: number;
46
- engravingFee?: number;
47
- subtotal?: number;
48
- timezone?: string;
49
- fees: IRetailerFees;
50
- expectation: IRetailerExpectation;
51
- canEngrave?: boolean;
52
- hours: RetailerHours;
53
- breaks: IRetailerTimes[];
54
- items: string[];
55
- }
56
- export interface IRetailer {
57
- name: string;
58
- id: string;
59
- platformFee?: number;
60
- deliveryFee?: number;
61
- shippingFee?: number;
62
- engravingFee?: number;
63
- subtotal?: number;
64
- total?: number;
65
- address?: IAddress & ICoords;
66
- fulfillments: IRetailerFulfillments[];
67
- }
@@ -1,100 +0,0 @@
1
- import type { AddressType } from '@/enums';
2
- import type { ICoreParams } from '@/interfaces/cloud/core.interface';
3
- export interface IUserSessionOb {
4
- values?: [string, string[]];
5
- createdAt: Date;
6
- }
7
- export interface IUserSession {
8
- key: string | null;
9
- secret: string | null;
10
- createdAt: Date;
11
- }
12
- export interface IUserAddressBase {
13
- placesId: string;
14
- one: string;
15
- two: string;
16
- city: string;
17
- state: string;
18
- zip: string;
19
- country: string;
20
- lat: number;
21
- long: number;
22
- }
23
- export interface IUserAddress extends IUserAddressBase {
24
- id: string;
25
- createdAt: Date;
26
- updatedAt: Date;
27
- isDefault?: boolean;
28
- }
29
- export interface ISavedCard {
30
- brand: string | null;
31
- country: string | null;
32
- expMonth: number | null;
33
- expYear: number | null;
34
- last4: string | null;
35
- funding: string | null;
36
- }
37
- export interface IUserPayment {
38
- id: string;
39
- type: string;
40
- isDefault: boolean;
41
- card?: ISavedCard;
42
- createdAt: Date;
43
- }
44
- export interface IUser {
45
- id: string;
46
- email: string;
47
- firstName: string | null;
48
- lastName: string | null;
49
- phone: string | null;
50
- company: string | null;
51
- profileImage: string | null;
52
- birthDate: string | null;
53
- createdAt: Date;
54
- updatedAt: Date;
55
- addresses: IUserAddress[];
56
- savedPayments: IUserPayment[];
57
- session: IUserSession;
58
- }
59
- export type BaseUser = Omit<IUser, 'session'>;
60
- export interface IUserSessionParams extends ICoreParams {
61
- id?: string;
62
- email?: string;
63
- firstName?: string | null;
64
- lastName?: string | null;
65
- phone?: string | null;
66
- company?: string | null;
67
- profileImage?: string | null;
68
- birthDate?: string | null;
69
- }
70
- export interface IUserPaymentSession {
71
- cartId?: string;
72
- checkoutToken?: string;
73
- customerId?: string;
74
- customerEmail?: string;
75
- }
76
- export interface IPurgeResponse {
77
- deleted: boolean;
78
- message: string;
79
- }
80
- export interface IUserAddressParams extends ICoreParams {
81
- customerId: string;
82
- placesId?: string;
83
- one?: string;
84
- two?: string;
85
- city?: string;
86
- state?: string;
87
- zip?: string;
88
- country?: string;
89
- lat?: number;
90
- long?: number;
91
- type: AddressType;
92
- isDefault?: boolean;
93
- }
94
- export interface IUserPaymentParams extends ICoreParams {
95
- customerId: string;
96
- paymentMethodId: string;
97
- }
98
- export interface IUserPaymentAddParams extends IUserPaymentParams {
99
- isDefault?: boolean;
100
- }
@@ -1,111 +0,0 @@
1
- import type { PRODUCT_LIST_CARD_VARIANT, PRODUCT_LIST_FILTER_TYPES } from '@/constants';
2
- import type { IAddressActions, ICartActions, ICheckoutActions, IProductActions } from '@/core/client/client-action.service';
3
- import type { IClientConfigs } from '@/core/client/client-config.service';
4
- import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
5
- import type { IAddressOptions } from '@/modules/address/address.interface';
6
- import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
7
- export type DeepPartial<T> = {
8
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
9
- };
10
- export interface IElementsProxyConfig {
11
- baseUrl: string;
12
- headers?: Record<string, string>;
13
- }
14
- export interface ILiquidCommerceElementsDevelopmentConfig {
15
- customApiUrl?: string;
16
- paymentMethodId?: string;
17
- openShadowDom?: boolean;
18
- }
19
- export interface IClientCustomThemeConfig {
20
- global?: UpdateComponentGlobalConfigs;
21
- product?: UpdateProductComponent;
22
- address?: UpdateAddressComponent;
23
- cart?: UpdateCartComponent;
24
- checkout?: UpdateCheckoutComponent;
25
- }
26
- export interface ILiquidCommerceElementsBaseConfig {
27
- env?: ElementsEnv;
28
- promoTicker?: IPromoTicker[];
29
- customTheme?: IClientCustomThemeConfig;
30
- debugMode?: DebugMode;
31
- }
32
- export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
33
- }
34
- export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
35
- proxy?: IElementsProxyConfig;
36
- development?: ILiquidCommerceElementsDevelopmentConfig;
37
- }
38
- export interface IInjectProductElement {
39
- containerId: string;
40
- identifier: string;
41
- }
42
- export type ProductListCardVariantType = (typeof PRODUCT_LIST_CARD_VARIANT)[keyof typeof PRODUCT_LIST_CARD_VARIANT];
43
- export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
44
- export interface IInjectProductListParams {
45
- containerId: string;
46
- rows?: number;
47
- columns?: number;
48
- cardVariant?: ProductListCardVariantType;
49
- fillCard?: boolean;
50
- filters?: ProductListFilterType[];
51
- productUrl?: string;
52
- }
53
- export interface IBuilderInjectElementParams {
54
- type: ComponentType;
55
- containerId: string;
56
- [key: string]: any;
57
- }
58
- export interface IInjectedComponent {
59
- getType(): ComponentType;
60
- getElement(): HTMLElement;
61
- rerender(): void;
62
- }
63
- export interface IProcessInjectElementParams {
64
- type: ComponentType;
65
- containerId: string;
66
- identifier?: string;
67
- options?: IAddressOptions;
68
- }
69
- export interface ILiquidCommerceElementsUIMethod {
70
- cartButton(containerId: string, showItemsCount?: boolean): void;
71
- floatingCartButton(showItemsCount?: boolean): void;
72
- cartSubtotal(elementId: string): void;
73
- cartItemsCount(elementId: string, options?: {
74
- hideZero: boolean;
75
- }): void;
76
- }
77
- export interface ILiquidCommerceElementsActions {
78
- product: IProductActions;
79
- address: IAddressActions;
80
- cart: ICartActions;
81
- checkout: ICheckoutActions;
82
- }
83
- export interface ILiquidCommerceElementsBuilderClient {
84
- updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
85
- updateProductComponent(configs: UpdateProductComponent): Promise<void>;
86
- updateAddressComponent(configs: UpdateAddressComponent): void;
87
- updateCartComponent(configs: UpdateCartComponent): void;
88
- updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
89
- injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
90
- injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
91
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
92
- injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
93
- injectCheckoutElement(containerId: string, options?: {
94
- simulatePresale?: boolean;
95
- presaleExpiresInMinutes?: number;
96
- }): Promise<IInjectedComponent | null>;
97
- injectProductList(params: IInjectProductListParams): Promise<void>;
98
- actions: ILiquidCommerceElementsActions;
99
- }
100
- export interface ILiquidCommerceElementsClient {
101
- injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
102
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
103
- injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
104
- injectCheckoutElement(containerId: string): Promise<IInjectedComponent | null>;
105
- injectProductList(params: IInjectProductListParams): Promise<void>;
106
- ui: ILiquidCommerceElementsUIMethod;
107
- actions: ILiquidCommerceElementsActions;
108
- getInjectedComponents(): Map<string, IInjectedComponent>;
109
- }
110
- export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
111
- export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
@@ -1,9 +0,0 @@
1
- import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
2
- import type { IAddressStore } from '@/core/store/interfaces/address.interface';
3
- import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store/interfaces/cart.interface';
4
- import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
5
- export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
6
- export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
7
- export declare function buildRetailerStore(retailer: ICartRetailer): IRetailerStore;
8
- export declare function buildFulfillmentStore(fulfillment: IRetailerFulfillments, retailer: ICartRetailer): IRetailerFulfillmentStore;
9
- export declare function cartDataForEventFromStore(cartStore: ICartStore, addressStore: IAddressStore): IBaseCartEventData;
@@ -1,4 +0,0 @@
1
- import type { billingFormFields, customerFormFields, giftFormFields } from '@/modules/checkout/constant';
2
- export type BillingFieldName = (typeof billingFormFields)[keyof typeof billingFormFields];
3
- export type CustomerFieldName = (typeof customerFormFields)[keyof typeof customerFormFields];
4
- export type GiftFieldName = (typeof giftFormFields)[keyof typeof giftFormFields];
@@ -1,3 +0,0 @@
1
- import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
- import { type FulfillmentType } from '@/enums';
3
- export declare function fulfillmentAddress(address: IProductFulfillmentStore['retailerAddress'], selectedFulfillmentType: FulfillmentType): string;
@@ -1,9 +0,0 @@
1
- import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
- export interface RetailerStatus {
3
- message: string | null;
4
- isOpen: boolean;
5
- openTime?: string;
6
- closeTime?: string;
7
- isClosed: boolean;
8
- }
9
- export declare function getRetailerOffHours(fulfillment: IProductFulfillmentStore): RetailerStatus;
@@ -1 +0,0 @@
1
- export * from './address.style';
@@ -1 +0,0 @@
1
- export * from './cart.style';
@@ -1 +0,0 @@
1
- export * from './checkout.style';
@@ -1,3 +0,0 @@
1
- export * from './image-carousel.style';
2
- export * from './product.style';
3
- export * from './retailers.style';
@@ -1 +0,0 @@
1
- export * from './product-list.style';
@@ -1,3 +0,0 @@
1
- export * from './drawer.style';
2
- export * from './loading.style';
3
- export * from './promo-code-ticker.style';
@@ -1,53 +0,0 @@
1
- import { BaseComponent } from '@/core/base-component.service';
2
- export interface IBirthdateValidation {
3
- required?: boolean;
4
- minYear?: number;
5
- maxYear?: number;
6
- minAge?: number;
7
- maxAge?: number;
8
- customValidator?: (date: string) => string | null;
9
- }
10
- export interface IBirthdateInputComponentParams {
11
- value?: string;
12
- className?: string;
13
- validation?: IBirthdateValidation;
14
- onValidation?: (isValid: boolean, errors: string[]) => void;
15
- onChange?: (value: string) => void;
16
- label?: string;
17
- name: string;
18
- disabled?: boolean;
19
- }
20
- export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInputComponentParams, null> {
21
- get hostClasses(): string[];
22
- private monthInput;
23
- private dayInput;
24
- private yearInput;
25
- private errorContainer;
26
- private validationTimeout;
27
- afterRender(): void;
28
- private populateInitialValue;
29
- private setupEventListeners;
30
- private formatMonth;
31
- private formatDay;
32
- private formatYear;
33
- private padMonthOnBlur;
34
- private padDayOnBlur;
35
- private handleNavigation;
36
- private handleChange;
37
- private isFieldsComplete;
38
- private scheduleValidation;
39
- private getFormattedValue;
40
- private validateDate;
41
- private calculateAge;
42
- private validateInput;
43
- private showErrors;
44
- private clearErrors;
45
- getValue(): string;
46
- setValue(value: string): void;
47
- validate(): boolean;
48
- focus(): void;
49
- disable(): void;
50
- enable(): void;
51
- clear(): void;
52
- protected template(): HTMLElement[];
53
- }
@@ -1,7 +0,0 @@
1
- import type { IRetailerFulfillmentStore } from '@/core/store/interfaces/cart.interface';
2
- export declare const shouldShowMinimumPurchaseAlert: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
3
- export declare const getMinimumPurchaseMessage: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => {
4
- message: string;
5
- type: "warning" | "info";
6
- };
7
- export declare const hasUnmetMinimum: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
@@ -1,27 +0,0 @@
1
- import type { CartEventEnum, CheckoutEventEnum } from 'enums';
2
- import type { ICartEvent, ICheckoutEvents } from 'interfaces/cloud';
3
- export type ElementEventLevel = 'success' | 'warning' | 'error';
4
- export interface IElementsCartEvent {
5
- type: CartEventEnum;
6
- message: string;
7
- level: ElementEventLevel;
8
- }
9
- export interface IElementsCheckoutEvents {
10
- type: CheckoutEventEnum;
11
- message: string;
12
- level: ElementEventLevel;
13
- }
14
- export declare const includeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
15
- export declare const excludeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
16
- export declare const eventsForCart: (events: ICartEvent[]) => ICartEvent[];
17
- export declare const hasCartAnyPromoCodeEvents: (events: ICartEvent[]) => boolean;
18
- export declare const includeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
19
- export declare const excludeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
20
- export declare const eventsForCheckout: (events: ICheckoutEvents[]) => ICheckoutEvents[];
21
- export declare const promoCodeCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
22
- export declare const giftCardCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
23
- export declare const hasAnyRetailerGiftCardRestriction: (events: ICheckoutEvents[]) => boolean;
24
- export declare const transformEventsForCart: (events: ICartEvent[]) => IElementsCartEvent[];
25
- export declare const transformEventsForCheckout: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
26
- export declare const transformPromoCodeCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
27
- export declare const transformGiftCardCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];