@liquidcommerce/elements-sdk 2.6.0-beta.6 → 2.6.0-beta.61

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 (226) hide show
  1. package/README.md +83 -2519
  2. package/dist/index.checkout.esm.js +16576 -0
  3. package/dist/index.esm.js +23632 -21083
  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 +46 -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 +2 -6
  14. package/dist/types/core/api/api-client.service.d.ts +21 -20
  15. package/dist/types/core/api/api-result.d.ts +19 -0
  16. package/dist/types/core/api/auth-client.service.d.ts +40 -13
  17. package/dist/types/core/api/http-client.service.d.ts +0 -1
  18. package/dist/types/core/base-component.service.d.ts +2 -1
  19. package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
  20. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  21. package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
  22. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +56 -0
  23. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  24. package/dist/types/core/client/client-action.service.d.ts +6 -70
  25. package/dist/types/core/client/client-config.service.d.ts +8 -2
  26. package/dist/types/core/command/common-command.service.d.ts +2 -1
  27. package/dist/types/core/google-tag-manager.service.d.ts +4 -1
  28. package/dist/types/core/logger/logger.service.d.ts +1 -1
  29. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  30. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -50
  31. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +9 -4
  32. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
  33. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  34. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  35. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
  36. package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
  37. package/dist/types/core/store/interfaces/core.interface.d.ts +14 -3
  38. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  39. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  40. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  41. package/dist/types/core/store/store.constant.d.ts +5 -0
  42. package/dist/types/core/store/store.service.d.ts +1 -0
  43. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  44. package/dist/types/enums/core.enum.d.ts +39 -1
  45. package/dist/types/enums/index.d.ts +0 -1
  46. package/dist/types/index.checkout.d.ts +8 -0
  47. package/dist/types/index.checkout.umd.d.ts +4 -0
  48. package/dist/types/index.d.ts +8 -3
  49. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  50. package/dist/types/interfaces/api/checkout.interface.d.ts +238 -0
  51. package/dist/types/interfaces/api/index.d.ts +5 -0
  52. package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
  53. package/dist/types/interfaces/api/product.interface.d.ts +9 -4
  54. package/dist/types/interfaces/client.interface.d.ts +72 -0
  55. package/dist/types/interfaces/component.interface.d.ts +7 -0
  56. package/dist/types/interfaces/config.interface.d.ts +41 -0
  57. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  58. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  59. package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
  60. package/dist/types/interfaces/configs/global.interface.d.ts +5 -3
  61. package/dist/types/interfaces/configs/index.d.ts +1 -0
  62. package/dist/types/interfaces/configs/product-list.interface.d.ts +47 -0
  63. package/dist/types/interfaces/configs/product.interface.d.ts +2 -1
  64. package/dist/types/interfaces/injection.interface.d.ts +47 -0
  65. package/dist/types/modules/address/address.command.d.ts +2 -1
  66. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  67. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  68. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  69. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  70. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  71. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  72. package/dist/types/modules/checkout/checkout.commands.d.ts +23 -9
  73. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  74. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  75. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +3 -0
  76. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  77. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  78. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  79. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  80. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  81. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  82. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  83. package/dist/types/modules/checkout/constant.d.ts +3 -0
  84. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  85. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +3 -0
  86. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
  87. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +5 -2
  88. package/dist/types/modules/product/product.commands.d.ts +2 -3
  89. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  90. package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
  91. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  92. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +9 -0
  93. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  94. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +9 -0
  95. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +13 -0
  96. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  97. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  98. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  99. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  100. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  101. 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} +1 -1
  102. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  103. package/dist/types/modules/product-list/components/index.d.ts +6 -2
  104. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
  105. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +27 -30
  106. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  107. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +55 -36
  108. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  109. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +47 -0
  110. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-search.component.d.ts → product-list-search.component.d.ts} +11 -4
  111. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  112. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -8
  113. package/dist/types/modules/product-list/product-list.component.d.ts +10 -45
  114. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  115. package/dist/types/modules/product-list/product-list.interface.d.ts +20 -35
  116. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  117. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  118. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  119. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  120. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  121. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  122. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  123. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  124. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  125. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +1 -0
  126. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +6 -1
  127. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +5 -1
  128. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  129. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  130. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  131. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  132. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  133. package/dist/types/modules/ui-components/ui.commands.d.ts +5 -1
  134. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  135. package/dist/types/ssr/stub.d.ts +10 -0
  136. package/dist/types/static/icon/check.icon.d.ts +2 -0
  137. package/dist/types/static/icon/index.d.ts +1 -0
  138. package/dist/types/utils/dom-compat.d.ts +2 -0
  139. package/dist/types/utils/format.d.ts +0 -14
  140. package/dist/types/utils/product-selection.d.ts +16 -0
  141. package/dist/types/utils/product.d.ts +10 -0
  142. package/docs/v1/README.md +210 -0
  143. package/docs/v1/api/actions/address-actions.md +281 -0
  144. package/docs/v1/api/actions/cart-actions.md +337 -0
  145. package/docs/v1/api/actions/checkout-actions.md +387 -0
  146. package/docs/v1/api/actions/product-actions.md +115 -0
  147. package/docs/v1/api/client.md +482 -0
  148. package/docs/v1/api/configuration.md +1 -0
  149. package/docs/v1/api/injection-methods.md +247 -0
  150. package/docs/v1/api/typescript-types.md +1 -0
  151. package/docs/v1/api/ui-helpers.md +200 -0
  152. package/docs/v1/examples/advanced-patterns.md +96 -0
  153. package/docs/v1/examples/checkout-flow.md +91 -0
  154. package/docs/v1/examples/custom-theming.md +63 -0
  155. package/docs/v1/examples/multi-product-page.md +90 -0
  156. package/docs/v1/examples/simple-product-page.md +89 -0
  157. package/docs/v1/getting-started/concepts.md +507 -0
  158. package/docs/v1/getting-started/installation.md +328 -0
  159. package/docs/v1/getting-started/quick-start.md +405 -0
  160. package/docs/v1/guides/address-component.md +431 -0
  161. package/docs/v1/guides/best-practices.md +324 -0
  162. package/docs/v1/guides/cart-component.md +737 -0
  163. package/docs/v1/guides/checkout-component.md +672 -0
  164. package/docs/v1/guides/events.md +926 -0
  165. package/docs/v1/guides/product-component.md +686 -0
  166. package/docs/v1/guides/product-list-component.md +598 -0
  167. package/docs/v1/guides/theming.md +216 -0
  168. package/docs/v1/integration/angular.md +39 -0
  169. package/docs/v1/integration/laravel.md +41 -0
  170. package/docs/v1/integration/nextjs.md +69 -0
  171. package/docs/v1/integration/proxy-setup.md +89 -0
  172. package/docs/v1/integration/react.md +64 -0
  173. package/docs/v1/integration/vanilla-js.md +84 -0
  174. package/docs/v1/integration/vue.md +58 -0
  175. package/docs/v1/reference/browser-support.md +44 -0
  176. package/docs/v1/reference/error-handling.md +70 -0
  177. package/docs/v1/reference/performance.md +54 -0
  178. package/docs/v1/reference/troubleshooting.md +72 -0
  179. package/package.json +28 -17
  180. package/dist/types/elements-builder-client.d.ts +0 -2
  181. package/dist/types/elements-client.d.ts +0 -2
  182. package/dist/types/enums/cloud.enum.d.ts +0 -106
  183. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  184. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -42
  185. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
  186. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  187. package/dist/types/interfaces/cloud/index.d.ts +0 -5
  188. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  189. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  190. package/dist/types/interfaces/core.interface.d.ts +0 -111
  191. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  192. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  193. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  194. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  195. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  196. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  197. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  198. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  199. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  200. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  201. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  202. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  203. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  204. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  205. package/dist/types/utils/helper.d.ts +0 -27
  206. package/docs/ACTIONS.md +0 -1300
  207. package/docs/BROWSER_SUPPORT.md +0 -279
  208. package/docs/CONFIGURATION.md +0 -853
  209. package/docs/DOCUMENTATION_INDEX.md +0 -311
  210. package/docs/EVENTS.md +0 -798
  211. package/docs/PROXY.md +0 -228
  212. package/docs/THEMING.md +0 -592
  213. package/docs/TROUBLESHOOTING.md +0 -793
  214. package/umd/elements.js +0 -1
  215. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  216. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  217. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  218. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  219. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  220. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  221. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  222. /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} +0 -0
  223. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  224. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  225. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  226. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,95 @@
1
+ import type { CartEventLevel, CartEventType, FulfillmentType } from '@/enums';
2
+ import type { ILocation } from '@/interfaces/api/address.interface';
3
+ import type { IProductPresale } from '@/interfaces/api/product.interface';
4
+ export interface ICartUpdateItem {
5
+ id?: string;
6
+ partNumber: string;
7
+ quantity: number;
8
+ fulfillmentId: string;
9
+ engravingLines?: string[];
10
+ }
11
+ export interface ICartUpdateParams {
12
+ id: string;
13
+ items: ICartUpdateItem[];
14
+ promoCode?: string;
15
+ location?: ILocation;
16
+ }
17
+ export interface ICartFulfillment {
18
+ id: string;
19
+ canEngrave: boolean;
20
+ type: FulfillmentType;
21
+ expectation: string;
22
+ engravingExpectation: string;
23
+ itemIds: string[];
24
+ subtotal: number;
25
+ hasUnmetMinimumPurchaseAmount: boolean;
26
+ minimumPurchaseAmount: number;
27
+ }
28
+ export interface ICartRetailer {
29
+ id: string;
30
+ name: string;
31
+ subtotal: number;
32
+ itemsQuantity: number;
33
+ fulfillments: Record<string, ICartFulfillment>;
34
+ }
35
+ export interface ICartItemAttributes {
36
+ engraving: ICartItemEngraving;
37
+ presale: IProductPresale;
38
+ }
39
+ export interface ICartItem {
40
+ id: string;
41
+ variantId: string;
42
+ liquidId: string;
43
+ retailerId: string;
44
+ partNumber: string;
45
+ fulfillmentId: string;
46
+ upc: string;
47
+ sku: string;
48
+ salsifyGrouping: string;
49
+ catPath: string;
50
+ volume: string;
51
+ uom: string;
52
+ pack: boolean;
53
+ packDesc: string;
54
+ container: string;
55
+ containerType: string;
56
+ name: string;
57
+ brand: string;
58
+ size: string;
59
+ price: number;
60
+ quantity: number;
61
+ maxQuantity: number;
62
+ unitPrice: number;
63
+ mainImage: string;
64
+ attributes: ICartItemAttributes;
65
+ }
66
+ export interface ICartPromoCode {
67
+ code: string;
68
+ discount: number;
69
+ freeDelivery: boolean;
70
+ freeServiceFee: boolean;
71
+ freeShipping: boolean;
72
+ }
73
+ export interface ICartEvent {
74
+ type: CartEventType;
75
+ message: string;
76
+ level: CartEventLevel;
77
+ }
78
+ export interface ICart {
79
+ id: string;
80
+ subtotal: number;
81
+ itemsQuantity: number;
82
+ items: Record<string, ICartItem>;
83
+ retailers: Record<string, ICartRetailer>;
84
+ promoCode: ICartPromoCode | null;
85
+ events: ICartEvent[];
86
+ }
87
+ export interface ICartItemEngraving {
88
+ isEngravable: boolean;
89
+ hasEngraving: boolean;
90
+ fee: number;
91
+ maxCharsPerLine: number;
92
+ maxLines: number;
93
+ location: string;
94
+ lines: string[];
95
+ }
@@ -0,0 +1,238 @@
1
+ import type { CheckoutEventLevel, CheckoutEventType, FulfillmentType } from '@/enums';
2
+ import type { IAddressAddress, IAddressCoordinates, ILocation } from '@/interfaces/api/address.interface';
3
+ import type { ICart, ICartUpdateItem } from '@/interfaces/api/cart.interface';
4
+ import type { IProductPresale } from '@/interfaces/api/product.interface';
5
+ export interface ICheckoutComplete {
6
+ orderNumber: string;
7
+ }
8
+ export interface ICheckoutPaymentSession {
9
+ key: string;
10
+ secret: string;
11
+ }
12
+ export interface ICheckoutPaymentConfirmParams {
13
+ confirmationTokenId: string;
14
+ setupIntentId: string;
15
+ }
16
+ export interface ICheckoutPaymentConfirmCard {
17
+ brand: string;
18
+ expMonth: string;
19
+ expYear: string;
20
+ last4: string;
21
+ }
22
+ export interface ICheckoutPaymentConfirm {
23
+ id: string;
24
+ card: ICheckoutPaymentConfirmCard;
25
+ }
26
+ export interface ICheckoutCustomer {
27
+ email: string;
28
+ firstName: string;
29
+ lastName: string;
30
+ company: string;
31
+ phone: string;
32
+ birthDate: string;
33
+ }
34
+ export interface ICheckoutBilling {
35
+ firstName: string;
36
+ lastName: string;
37
+ email: string;
38
+ phone: string;
39
+ company: string;
40
+ one: string;
41
+ two: string;
42
+ city: string;
43
+ state: string;
44
+ zip: string;
45
+ }
46
+ export interface ICheckoutGiftRecipient {
47
+ firstName: string;
48
+ lastName: string;
49
+ email: string;
50
+ phone: string;
51
+ message: string;
52
+ }
53
+ export interface ICheckoutMarketingPreferences {
54
+ canEmail: boolean;
55
+ canSms: boolean;
56
+ }
57
+ export interface ICheckoutDeliveryTip {
58
+ fulfillmentId: string;
59
+ tip: number;
60
+ }
61
+ export interface ICheckoutDeliveryInstructions {
62
+ fulfillmentId: string;
63
+ instructions: string;
64
+ }
65
+ export interface ICheckoutPrepareParams {
66
+ cartId?: string;
67
+ token?: string;
68
+ customer?: ICheckoutCustomer;
69
+ shippingAddressTwo?: string;
70
+ billingAddress?: ICheckoutBilling;
71
+ isGift?: boolean;
72
+ billingSameAsShipping?: boolean;
73
+ giftOptions?: ICheckoutGiftRecipient;
74
+ marketingPreferences?: ICheckoutMarketingPreferences;
75
+ deliveryTips?: ICheckoutDeliveryTip[];
76
+ deliveryInstructions?: ICheckoutDeliveryInstructions[];
77
+ payment?: string;
78
+ promoCode?: string;
79
+ giftCards?: string[];
80
+ }
81
+ export interface ICheckoutUpdateItem {
82
+ id?: string;
83
+ partNumber: string;
84
+ quantity: number;
85
+ fulfillmentId: string;
86
+ engravingLines?: string[];
87
+ }
88
+ export interface ICheckoutItemsUpdateParams {
89
+ cartId: string;
90
+ items: ICheckoutUpdateItem[];
91
+ location?: ILocation;
92
+ }
93
+ export interface ICheckoutItemsUpdateResponse {
94
+ cart: ICart;
95
+ checkout: ICheckoutPrepare;
96
+ }
97
+ export interface IAnonymousCheckoutAddProductItem {
98
+ identifier: string;
99
+ fulfillmentType: FulfillmentType;
100
+ quantity: number;
101
+ }
102
+ export interface IAnonymousCheckoutAddProductParams {
103
+ items?: IAnonymousCheckoutAddProductItem[];
104
+ cartItems?: ICartUpdateItem[];
105
+ location: ILocation;
106
+ promoCode?: string;
107
+ }
108
+ export interface IAnonymousCheckoutUnavailableItem {
109
+ identifier: string;
110
+ productName: string | null;
111
+ fulfillmentType: FulfillmentType;
112
+ reason: 'product_not_available' | 'fulfillment_not_available';
113
+ }
114
+ export interface IAnonymousCheckoutAddProductResponse {
115
+ checkout: ICheckoutPrepare | null;
116
+ unavailableItems: IAnonymousCheckoutUnavailableItem[];
117
+ }
118
+ export interface ICheckoutAmounts {
119
+ subtotal: number;
120
+ engraving: number;
121
+ service: number;
122
+ shipping: number;
123
+ delivery: number;
124
+ platform: number;
125
+ discounts: number;
126
+ giftCards: number;
127
+ tax: number;
128
+ tip: number;
129
+ total: number;
130
+ }
131
+ export interface ICheckoutPromoCode {
132
+ code: string;
133
+ discount: number;
134
+ freeDelivery: boolean;
135
+ freeServiceFee: boolean;
136
+ freeShipping: boolean;
137
+ }
138
+ export interface ICheckoutGiftCard {
139
+ code: string;
140
+ applied: number;
141
+ }
142
+ export interface ICheckoutShippingAddress {
143
+ formattedAddress: string;
144
+ address: IAddressAddress;
145
+ coordinates: IAddressCoordinates;
146
+ }
147
+ export interface ICheckoutItemEngraving {
148
+ isEngravable: boolean;
149
+ hasEngraving: boolean;
150
+ fee: number;
151
+ maxCharsPerLine: number;
152
+ maxLines: number;
153
+ location: string;
154
+ lines: string[];
155
+ }
156
+ export interface ICheckoutItemAttributes {
157
+ engraving: ICheckoutItemEngraving;
158
+ presale: IProductPresale;
159
+ }
160
+ export interface ICheckoutItem {
161
+ variantId: string;
162
+ cartItemId: string;
163
+ liquidId: string;
164
+ retailerId: string;
165
+ fulfillmentId: string;
166
+ salsifyPid?: string;
167
+ salsifyGrouping?: string;
168
+ name: string;
169
+ catPath: string;
170
+ volume: string;
171
+ uom: string;
172
+ proof: string;
173
+ abv: string;
174
+ containerType: string;
175
+ container: string;
176
+ size: string;
177
+ pack: boolean;
178
+ packDesc: string;
179
+ mainImage: string;
180
+ brand: string;
181
+ partNumber: string;
182
+ upc: string;
183
+ sku: string;
184
+ price: number;
185
+ unitPrice: number;
186
+ quantity: number;
187
+ tax: number;
188
+ unitTax: number;
189
+ bottleDeposits: number;
190
+ attributes: ICheckoutItemAttributes;
191
+ }
192
+ export interface ICheckoutFulfillment {
193
+ id: string;
194
+ deliveryInstructions: string;
195
+ type: FulfillmentType;
196
+ expectation: string;
197
+ engravingExpectation: string;
198
+ itemIds: string[];
199
+ doesAllowPromos: boolean;
200
+ doesAllowGiftCards: boolean;
201
+ amounts: ICheckoutAmounts;
202
+ itemsQuantity: number;
203
+ }
204
+ export interface ICheckoutRetailer {
205
+ id: string;
206
+ name: string;
207
+ fulfillments: Record<string, ICheckoutFulfillment>;
208
+ amounts: ICheckoutAmounts;
209
+ }
210
+ export interface ICheckoutPresale {
211
+ isLocked: boolean;
212
+ expiresAt: string;
213
+ }
214
+ export interface ICheckoutEvent {
215
+ type: CheckoutEventType;
216
+ message: string;
217
+ level: CheckoutEventLevel;
218
+ }
219
+ export interface ICheckoutPrepare {
220
+ token: string;
221
+ cartId: string;
222
+ customer: ICheckoutCustomer;
223
+ isGift: boolean;
224
+ billingSameAsShipping: boolean;
225
+ payment?: string;
226
+ giftOptions: ICheckoutGiftRecipient;
227
+ marketingPreferences: ICheckoutMarketingPreferences;
228
+ shippingAddress: ICheckoutShippingAddress;
229
+ billingAddress: ICheckoutBilling;
230
+ promoCode: ICheckoutPromoCode | null;
231
+ amounts: ICheckoutAmounts;
232
+ giftCards: ICheckoutGiftCard[];
233
+ presale: ICheckoutPresale | null;
234
+ itemsQuantity: number;
235
+ items: Record<string, ICheckoutItem>;
236
+ retailers: Record<string, ICheckoutRetailer>;
237
+ events: ICheckoutEvent[];
238
+ }
@@ -0,0 +1,5 @@
1
+ export * from './address.interface';
2
+ export * from './cart.interface';
3
+ export * from './checkout.interface';
4
+ export * from './product.interface';
5
+ export * from './product-list.interface';
@@ -0,0 +1,39 @@
1
+ import type { ILocation } from '@/interfaces/api/address.interface';
2
+ import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
3
+ import type { FILTER_KEYS } from '@/modules/product-list/product-list.constants';
4
+ export interface IProductSearchParams {
5
+ slug: string;
6
+ location?: ILocation;
7
+ search?: string;
8
+ pageToken?: string;
9
+ page?: number;
10
+ perPage?: number;
11
+ filters?: IFilterParams[];
12
+ }
13
+ export type IFilterParamsValue = string | string[] | {
14
+ min?: string | number;
15
+ max?: string | number;
16
+ } | boolean;
17
+ export interface IFilterParams {
18
+ key: string;
19
+ values: IFilterParamsValue;
20
+ }
21
+ export type FacetFilterKeys = typeof FILTER_KEYS.BRANDS | typeof FILTER_KEYS.CATEGORIES | typeof FILTER_KEYS.FLAVOR | typeof FILTER_KEYS.REGION | typeof FILTER_KEYS.VARIETY | typeof FILTER_KEYS.VINTAGE | typeof FILTER_KEYS.COUNTRY | typeof FILTER_KEYS.APPELLATION | typeof FILTER_KEYS.TAGS | typeof FILTER_KEYS.MATERIALS | typeof FILTER_KEYS.SIZES | typeof FILTER_KEYS.ENGRAVING | typeof FILTER_KEYS.FULFILLMENT | typeof FILTER_KEYS.PRICE | typeof FILTER_KEYS.AVAILABILITY | typeof FILTER_KEYS.COLORS;
22
+ export interface IFilterSchema {
23
+ type: FacetFilterKeys;
24
+ values: IFilterValue[];
25
+ }
26
+ export interface IFilterValue {
27
+ value: string;
28
+ name: string;
29
+ count: number;
30
+ }
31
+ export interface INavigationResponse {
32
+ currentPage: number;
33
+ totalPages: number;
34
+ totalCount: number;
35
+ filters: IFilterSchema[];
36
+ }
37
+ export interface IProductSearchResponse extends IProductAvailabilityResponse {
38
+ navigation: INavigationResponse;
39
+ }
@@ -8,6 +8,12 @@ export interface IProductAvailabilityResponse {
8
8
  products: IProduct[];
9
9
  retailers: Record<string, IRetailer>;
10
10
  }
11
+ export interface IProductPriceInfo {
12
+ currency: string;
13
+ minimum: number;
14
+ average: number;
15
+ maximum: number;
16
+ }
11
17
  export interface IProductVariant {
12
18
  retailerId: string;
13
19
  shippingFulfillmentId: string;
@@ -34,7 +40,6 @@ export interface IProductSize {
34
40
  onDemandVariants: Record<string, IProductVariant>;
35
41
  }
36
42
  export interface IProductFulfillmentHourStatus {
37
- text: string;
38
43
  isOpen: boolean;
39
44
  openTime: string;
40
45
  isClosed: boolean;
@@ -65,7 +70,7 @@ export interface IProduct {
65
70
  type: string;
66
71
  subType: string;
67
72
  salsifyGrouping: string;
68
- noAvailabilityPrice: number;
73
+ priceInfo: IProductPriceInfo | null;
69
74
  sizes: Record<string, IProductSize>;
70
75
  }
71
76
  export interface IFulfillment {
@@ -73,8 +78,8 @@ export interface IFulfillment {
73
78
  type: FulfillmentType;
74
79
  doesAllowGiftCards: boolean;
75
80
  doesAllowPromos: boolean;
76
- expectationText: string;
77
- engravingExpectationText: string;
81
+ expectation: string;
82
+ engravingExpectation: string;
78
83
  fee: number;
79
84
  timezone: string;
80
85
  hourStatus: IProductFulfillmentHourStatus;
@@ -0,0 +1,72 @@
1
+ import type { IAddressActions } from '@/core/client/actions/client-address-action.service';
2
+ import type { ICartActions } from '@/core/client/actions/client-cart-action.service';
3
+ import type { ICheckoutActions } from '@/core/client/actions/client-checkout-action.service';
4
+ import type { IProductActions } from '@/core/client/actions/client-product-action.service';
5
+ import type { IClientConfigs } from '@/core/client/client-config.service';
6
+ import type { IAddressOptions } from '@/modules/address/address.interface';
7
+ import type { IInjectedComponent } from './component.interface';
8
+ import type { UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from './configs';
9
+ import type { IBuilderInjectElementParams, IInjectCheckoutBuilderParams, IInjectCheckoutParams, IInjectProductElement, IInjectProductListFiltersParams, IInjectProductListParams, IInjectProductListSearchParams } from './injection.interface';
10
+ export interface ILiquidCommerceElementsUIMethod {
11
+ cartButton(containerId: string, showItemsCount?: boolean): void;
12
+ floatingCartButton(showItemsCount?: boolean): void;
13
+ cartSubtotal(elementId: string): void;
14
+ cartItemsCount(elementId: string, options?: {
15
+ hideZero: boolean;
16
+ }): void;
17
+ }
18
+ export interface ILiquidCommerceElementsActions {
19
+ product: IProductActions;
20
+ address: IAddressActions;
21
+ cart: ICartActions;
22
+ checkout: ICheckoutActions;
23
+ }
24
+ export interface IElementsCheckoutActions extends Omit<ICheckoutActions, 'openCheckout' | 'closeCheckout' | 'toggleCheckout'> {
25
+ }
26
+ export interface IElementsCheckoutClient {
27
+ injectCheckout: (params: IInjectCheckoutParams) => Promise<IInjectedComponent | null>;
28
+ actions: {
29
+ checkout: IElementsCheckoutActions;
30
+ };
31
+ destroy(): void;
32
+ }
33
+ export interface ILiquidCommerceElementsBuilderClient {
34
+ updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
35
+ updateProductComponent(configs: UpdateProductComponent): Promise<void>;
36
+ updateAddressComponent(configs: UpdateAddressComponent): void;
37
+ updateCartComponent(configs: UpdateCartComponent): void;
38
+ updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
39
+ updateProductListComponent(configs: UpdateProductListComponent): void;
40
+ injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
41
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
42
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
43
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
44
+ injectCheckoutElement(params: IInjectCheckoutBuilderParams): Promise<IInjectedComponent | null>;
45
+ injectProductList(params: IInjectProductListParams): Promise<void>;
46
+ actions: ILiquidCommerceElementsActions;
47
+ destroy(): void;
48
+ }
49
+ export interface ILiquidCommerceElementsClient {
50
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
51
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
52
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
53
+ injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
54
+ injectProductList(params: IInjectProductListParams): Promise<void>;
55
+ injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
56
+ injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
57
+ ui: ILiquidCommerceElementsUIMethod;
58
+ actions: ILiquidCommerceElementsActions;
59
+ getInjectedComponents(): Map<string, IInjectedComponent>;
60
+ destroy(): void;
61
+ }
62
+ export interface ILiquidCommerceElementsCheckoutClient {
63
+ prepare(): Promise<void>;
64
+ injectCheckout(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
65
+ actions: {
66
+ checkout: IElementsCheckoutActions;
67
+ };
68
+ destroy(): void;
69
+ }
70
+ export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
71
+ export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
72
+ export type LiquidCommerceElementsCheckoutClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsCheckoutClient;
@@ -0,0 +1,7 @@
1
+ import type { ComponentType } from '@/enums';
2
+ export interface IInjectedComponent {
3
+ getType(): ComponentType;
4
+ getElement(): HTMLElement;
5
+ rerender(): void;
6
+ destroy(): void;
7
+ }
@@ -0,0 +1,41 @@
1
+ import type { DebugMode, ElementsEnv } from '@/enums';
2
+ import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from './configs';
3
+ export type DeepPartial<T> = {
4
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
5
+ };
6
+ export interface IElementsProxyConfig {
7
+ baseUrl: string;
8
+ headers?: Record<string, string>;
9
+ }
10
+ export interface ILiquidCommerceElementsDevelopmentConfig {
11
+ customApiUrl?: string;
12
+ paymentMethodId?: string;
13
+ openShadowDom?: boolean;
14
+ mockMode?: boolean;
15
+ }
16
+ export interface IClientCustomThemeConfig {
17
+ global?: UpdateComponentGlobalConfigs;
18
+ product?: UpdateProductComponent;
19
+ address?: UpdateAddressComponent;
20
+ cart?: UpdateCartComponent;
21
+ checkout?: UpdateCheckoutComponent;
22
+ productList?: UpdateProductListComponent;
23
+ }
24
+ export interface ILiquidCommerceElementsCheckoutConfig {
25
+ pageUrl?: string;
26
+ }
27
+ export interface ILiquidCommerceElementsBaseConfig {
28
+ env?: ElementsEnv;
29
+ promoTicker?: IPromoTicker[];
30
+ customTheme?: IClientCustomThemeConfig;
31
+ debugMode?: DebugMode;
32
+ checkout?: ILiquidCommerceElementsCheckoutConfig;
33
+ proxy?: IElementsProxyConfig;
34
+ development?: ILiquidCommerceElementsDevelopmentConfig;
35
+ }
36
+ export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
37
+ }
38
+ export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
39
+ }
40
+ export interface ILiquidCommerceElementsCheckoutClientConfig extends ILiquidCommerceElementsBaseConfig {
41
+ }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface IAddressTheme {
3
3
  backgroundColor: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface ICartTheme {
3
3
  backgroundColor: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface ICheckoutMarketingOptIn {
3
3
  show: boolean;
4
4
  checked: boolean;
@@ -13,6 +13,7 @@ export interface ICheckoutLayout {
13
13
  smsOptIn: ICheckoutMarketingOptIn;
14
14
  allowGiftCards: boolean;
15
15
  legalMessage: ICheckoutLegalMessage;
16
+ continueShoppingUrl: string;
16
17
  exitUrl: string;
17
18
  thankYouButtonText: string;
18
19
  drawerHeaderText: string;
@@ -1,9 +1,10 @@
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
1
2
  import type { IElementsConfigurations } from '@/interfaces/configs/configurations.interface';
2
- import type { DeepPartial } from '@/interfaces/core.interface';
3
3
  import type { IAddressComponent } from './address.interface';
4
4
  import type { ICartComponent } from './cart.interface';
5
5
  import type { ICheckoutComponent } from './checkout.interface';
6
6
  import type { IProductComponent } from './product.interface';
7
+ import type { IProductListComponent } from './product-list.interface';
7
8
  export interface IFontFamily {
8
9
  name: string;
9
10
  weights: number[];
@@ -52,9 +53,10 @@ export interface IAllConfigs {
52
53
  configurations: IElementsConfigurations;
53
54
  global: IComponentGlobalConfigs;
54
55
  product: IProductComponent;
56
+ productList: IProductListComponent;
55
57
  address: IAddressComponent;
56
58
  cart: ICartComponent;
57
59
  checkout: ICheckoutComponent;
58
60
  }
59
- export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout';
60
- export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent;
61
+ export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout' | 'productList';
62
+ export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent | IProductListComponent;
@@ -4,3 +4,4 @@ export * from './checkout.interface';
4
4
  export * from './configurations.interface';
5
5
  export * from './global.interface';
6
6
  export * from './product.interface';
7
+ export * from './product-list.interface';
@@ -0,0 +1,47 @@
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
+ import type { ProductListFilterType } from '@/interfaces/injection.interface';
3
+ export type PLCPresentationModeType = 'drawer' | 'modal';
4
+ export type PLCListType = 'curated' | 'dynamic';
5
+ export type PLCCardStyle = 'card' | 'ghost';
6
+ export interface IPLCProductCard {
7
+ style: PLCCardStyle;
8
+ cornerRadius: string;
9
+ showPrice: boolean;
10
+ showSizes: boolean;
11
+ showRetailerName: boolean;
12
+ showFulfillmentOptions: boolean;
13
+ enableShippingFulfillment: boolean;
14
+ enableOnDemandFulfillment: boolean;
15
+ enablePersonalization: boolean;
16
+ showQuantityCounter: boolean;
17
+ enablePreCart: boolean;
18
+ showCollectionTags: boolean;
19
+ }
20
+ export interface IPLCList {
21
+ type: PLCListType;
22
+ name: string;
23
+ slug: string;
24
+ filters: Record<string, string[]>;
25
+ productCard: IPLCProductCard;
26
+ presentationMode: PLCPresentationModeType;
27
+ availableFilters: ProductListFilterType[];
28
+ rows: number;
29
+ columns: number;
30
+ productUrl: string | null;
31
+ }
32
+ export interface IProductListLayout {
33
+ lists: IPLCList[];
34
+ }
35
+ export interface IProductListTheme {
36
+ backgroundColor: string;
37
+ }
38
+ export interface IProductListComponent {
39
+ theme: IProductListTheme;
40
+ layout: IProductListLayout;
41
+ }
42
+ export interface UpdateProductListComponent {
43
+ theme?: DeepPartial<IProductListTheme>;
44
+ layout?: {
45
+ lists?: Record<string, DeepPartial<IPLCList>>;
46
+ };
47
+ }
@@ -1,7 +1,8 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export type FulfillmentDisplayType = 'carousel' | 'popup';
3
3
  export interface IProductLayout {
4
4
  showImages: boolean;
5
+ showOnlyMainImage: boolean;
5
6
  showTitle: boolean;
6
7
  showDescription: boolean;
7
8
  showQuantityCounter: boolean;