@liquidcommerce/elements-sdk 2.2.0-beta.3 → 2.2.0-beta.31

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 (69) hide show
  1. package/README.md +1681 -568
  2. package/dist/index.esm.js +10716 -8124
  3. package/dist/types/core/auth.service.d.ts +10 -4
  4. package/dist/types/core/base-component.service.d.ts +3 -0
  5. package/dist/types/core/circuit-breaker.service.d.ts +54 -0
  6. package/dist/types/core/client/client-action.service.d.ts +16 -13
  7. package/dist/types/core/client/client-config.service.d.ts +5 -3
  8. package/dist/types/core/command/common-command.service.d.ts +2 -1
  9. package/dist/types/core/debug-panel/debug-panel.service.d.ts +43 -0
  10. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -0
  11. package/dist/types/core/fingerprint.service.d.ts +4 -9
  12. package/dist/types/core/google-tag-manager.service.d.ts +127 -2
  13. package/dist/types/core/logger/logger-factory.d.ts +3 -0
  14. package/dist/types/core/logger/logger.service.d.ts +8 -5
  15. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -0
  16. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +46 -6
  17. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +2 -3
  18. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +43 -6
  19. package/dist/types/core/store/interfaces/cart.interface.d.ts +1 -1
  20. package/dist/types/core/store/interfaces/checkout.interface.d.ts +0 -1
  21. package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
  22. package/dist/types/core/store/interfaces/product.interface.d.ts +18 -7
  23. package/dist/types/core/store/store.service.d.ts +1 -0
  24. package/dist/types/core/telemetry/telemetry.interface.d.ts +80 -0
  25. package/dist/types/core/telemetry/telemetry.service.d.ts +27 -0
  26. package/dist/types/elements-client-helper.d.ts +3 -0
  27. package/dist/types/enums/core.enum.d.ts +0 -1
  28. package/dist/types/enums/debug.enum.d.ts +6 -0
  29. package/dist/types/enums/index.d.ts +1 -0
  30. package/dist/types/interfaces/cloud/product.interface.d.ts +2 -0
  31. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -1
  32. package/dist/types/interfaces/core.interface.d.ts +17 -11
  33. package/dist/types/modules/address/address.command.d.ts +1 -3
  34. package/dist/types/modules/cart/cart.commands.d.ts +1 -1
  35. package/dist/types/modules/cart/cart.component.d.ts +1 -2
  36. package/dist/types/modules/cart/components/cart-footer.component.d.ts +1 -0
  37. package/dist/types/modules/cart/components/cart-item.component.d.ts +2 -6
  38. package/dist/types/modules/checkout/checkout.commands.d.ts +3 -2
  39. package/dist/types/modules/checkout/checkout.component.d.ts +1 -2
  40. package/dist/types/modules/checkout/components/checkout-summary-section.component.d.ts +2 -0
  41. package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +1 -1
  42. package/dist/types/modules/checkout/components/summary/checkout-item-quantity.component.d.ts +0 -2
  43. package/dist/types/modules/checkout/components/summary/checkout-item.component.d.ts +2 -1
  44. package/dist/types/modules/checkout/components/summary/checkout-items.component.d.ts +1 -0
  45. package/dist/types/modules/checkout/components/summary/checkout-place-order-button.component.d.ts +0 -1
  46. package/dist/types/modules/checkout/constant.d.ts +0 -1
  47. package/dist/types/modules/product/components/index.d.ts +1 -0
  48. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
  49. package/dist/types/modules/product/components/product-interactions.component.d.ts +4 -1
  50. package/dist/types/modules/product/components/product-price.component.d.ts +1 -0
  51. package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
  52. package/dist/types/modules/product/product.commands.d.ts +1 -1
  53. package/dist/types/modules/theme-provider/services/font-manager.service.d.ts +1 -0
  54. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +13 -11
  55. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +4 -9
  56. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -0
  57. package/dist/types/static/icon/index.d.ts +0 -1
  58. package/dist/types/utils/format.d.ts +2 -1
  59. package/docs/ACTIONS.md +1273 -0
  60. package/docs/BROWSER_SUPPORT.md +279 -0
  61. package/docs/CONFIGURATION.md +613 -0
  62. package/docs/DOCUMENTATION_INDEX.md +311 -0
  63. package/docs/EVENTS.md +765 -0
  64. package/docs/PROXY.md +228 -0
  65. package/docs/THEMING.md +592 -0
  66. package/docs/TROUBLESHOOTING.md +772 -0
  67. package/package.json +17 -17
  68. package/umd/elements.js +1 -1
  69. package/dist/types/static/icon/completed.icon.d.ts +0 -2
@@ -9,6 +9,8 @@ export interface IElementsClientIsReadyEventData {
9
9
  export interface IBaseProductFulfillmentEventData {
10
10
  price: number;
11
11
  partNumber: string;
12
+ stock: number;
13
+ isEngravable: boolean;
12
14
  fulfillmentId: string;
13
15
  fulfillmentType: FulfillmentType;
14
16
  modalities: FulfillmentType[];
@@ -17,6 +19,23 @@ export interface IBaseProductFulfillmentEventData {
17
19
  retailerAddress: (IAddress & ICoords) | null;
18
20
  retailerTimezone: string;
19
21
  }
22
+ export interface IBaseProductSizeAttributesEventData {
23
+ engraving?: {
24
+ status: boolean;
25
+ maxLines: number;
26
+ maxCharsPerLine: number;
27
+ fee: number;
28
+ location: string;
29
+ };
30
+ presale?: {
31
+ canPurchaseOn: null | string;
32
+ estimatedShipBy: null | string;
33
+ isActive: boolean;
34
+ language: string;
35
+ presaleLimit: number;
36
+ price: number;
37
+ };
38
+ }
20
39
  export interface IBaseProductSizeEventData {
21
40
  id: string;
22
41
  upc: string;
@@ -29,17 +48,40 @@ export interface IBaseProductSizeEventData {
29
48
  image: string;
30
49
  uom: string;
31
50
  volume: string;
51
+ attributes: IBaseProductSizeAttributesEventData;
32
52
  shippingFulfillments: Record<string, IBaseProductFulfillmentEventData>;
33
53
  onDemandFulfillments: Record<string, IBaseProductFulfillmentEventData>;
34
54
  }
35
55
  export interface IBaseProductEventData {
36
56
  identifier: string;
57
+ selectedSizeId: string | null;
58
+ selectedFulfillmentId: string | null;
59
+ selectedFulfillmentType: FulfillmentType;
37
60
  id: string;
38
61
  name: string;
39
62
  brand: string;
40
- category: string;
41
63
  catPath: string;
64
+ category: string;
42
65
  classification: string;
66
+ type: string;
67
+ salsifyGrouping: string;
68
+ subType: string;
69
+ mainImage: string | null;
70
+ images: string[];
71
+ region: string;
72
+ country: string;
73
+ material: string;
74
+ abv: string;
75
+ proof: string;
76
+ age: string;
77
+ color: string;
78
+ flavor: string;
79
+ variety: string;
80
+ appellation: string;
81
+ vintage: string;
82
+ description: string;
83
+ htmlDescription: string;
84
+ tastingNotes: string;
43
85
  priceInfo: {
44
86
  min: number;
45
87
  max: number;
@@ -84,8 +126,3 @@ export interface IProductFulfillmentChangedEventData {
84
126
  previousFulfillmentId: string;
85
127
  previousFulfillmentType: FulfillmentType;
86
128
  }
87
- export interface IProductEngravingUpdatedEventData {
88
- identifier: string;
89
- engravingLines: string[];
90
- previousEngravingLines: string[];
91
- }
@@ -36,6 +36,7 @@ export interface ICartTotalsStore {
36
36
  total: number;
37
37
  shippingFee: number;
38
38
  platformFee: number;
39
+ giftCardTotal: number;
39
40
  engravingFee: number;
40
41
  deliveryFee: number;
41
42
  discounts: number;
@@ -75,7 +76,6 @@ export interface IRetailerStore {
75
76
  export interface ICartPromoCodeStore {
76
77
  code: string;
77
78
  discountAmount: number;
78
- error: string | null;
79
79
  }
80
80
  export interface ICartStore {
81
81
  id: string | null;
@@ -25,7 +25,6 @@ export interface ICheckoutGiftRecipientStore {
25
25
  phone: string;
26
26
  birthDate: string;
27
27
  addressTwo: string | null;
28
- company: string | null;
29
28
  message: string | null;
30
29
  }
31
30
  export interface ICheckoutCustomerStore {
@@ -1,4 +1,4 @@
1
- import type { IAddressStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutStore, IProductSizeStore, IProductStore } from '@/core/store';
1
+ import type { IAddressStore, ICartPromoCodeStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutPromoCodeStore, ICheckoutReadyForSubmitStore, ICheckoutStore, ICheckoutStripeFormStatusStore, IProductSizeStore, IProductStore } from '@/core/store';
2
2
  import type { ComponentType } from '@/enums';
3
3
  import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
4
4
  export interface IDrawerContentConfig {
@@ -23,7 +23,7 @@ export interface IPersistedStore {
23
23
  p: string;
24
24
  c: string;
25
25
  }
26
- export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartStore['promoCode']}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customer.${keyof ICheckoutCustomerStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.payment.${keyof ICheckoutPaymentStore}` | `checkout.billing.${keyof ICheckoutBillingStore}` | `checkout.giftRecipient.${keyof ICheckoutStore['giftRecipient']}` | `checkout.giftCards.${string}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.readyForSubmit.${keyof ICheckoutStore['readyForSubmit']}` | `checkout.onDemandFulfillmentTipInfo.${string}` | `checkout.readyForSubmit.${string}` | `checkout.stripeFormStatus.${keyof ICheckoutStore['stripeFormStatus']}`;
26
+ export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customer.${keyof ICheckoutCustomerStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.payment.${keyof ICheckoutPaymentStore}` | `checkout.billing.${keyof ICheckoutBillingStore}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipientStore}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCodeStore}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.readyForSubmit.${keyof ICheckoutReadyForSubmitStore}` | `checkout.onDemandFulfillmentTipInfo.${string}` | `checkout.readyForSubmit.${string}` | `checkout.stripeFormStatus.${keyof ICheckoutStripeFormStatusStore}`;
27
27
  interface MiddlewareContext {
28
28
  action: string;
29
29
  payload: any;
@@ -49,20 +49,33 @@ export interface IProductStore {
49
49
  id: string;
50
50
  name: string;
51
51
  brand: string;
52
- category: string;
53
52
  catPath: string;
53
+ category: string;
54
54
  classification: string;
55
55
  type: string;
56
- subType: string;
57
56
  salsifyGrouping: string;
57
+ subType: string;
58
+ mainImage: string | null;
59
+ images: string[];
60
+ region: string;
61
+ country: string;
62
+ material: string;
63
+ abv: string;
64
+ proof: string;
65
+ age: string;
66
+ color: string;
67
+ flavor: string;
68
+ variety: string;
69
+ appellation: string;
70
+ vintage: string;
71
+ description: string;
72
+ htmlDescription: string;
73
+ tastingNotes: string;
58
74
  priceInfo?: {
59
75
  min: number;
60
76
  max: number;
61
77
  avg: number;
62
78
  };
63
- description: string;
64
- htmlDescription: string;
65
- images: string[];
66
79
  quantity: number;
67
80
  sizes: Record<string, IProductSizeStore>;
68
81
  productHasAvailability: boolean;
@@ -74,8 +87,6 @@ export interface IProductStore {
74
87
  loading: boolean;
75
88
  updating: boolean;
76
89
  error: string | null;
77
- engravingLines: string[];
78
90
  drawer: IProductDrawerStore;
79
91
  rerender: boolean;
80
- mainImage: string | null;
81
92
  }
@@ -36,6 +36,7 @@ export declare class StoreService {
36
36
  private notifyListeners;
37
37
  private debouncedSave;
38
38
  forceSave(): void;
39
+ persist(): Promise<void>;
39
40
  private saveStore;
40
41
  private loadPersistedState;
41
42
  private loadFromDBPersistence;
@@ -0,0 +1,80 @@
1
+ import type { DeviceType } from '@/core/client/client-config.service';
2
+ import type { ComponentType, ElementsEnv } from '@/enums';
3
+ export type TelemetryLevel = 'debug' | 'log' | 'info' | 'warn' | 'error' | 'fatal';
4
+ export interface ITelemetryConfig {
5
+ enabled: boolean;
6
+ endpoint: string;
7
+ batchSize: number;
8
+ batchInterval: number;
9
+ includeDebugLogs: boolean;
10
+ includeWarnings: boolean;
11
+ includeErrors: boolean;
12
+ maxQueueSize: number;
13
+ }
14
+ export interface ITelemetryEventOptions {
15
+ context?: string;
16
+ error?: Error;
17
+ component?: ITelemetryComponentContext;
18
+ data?: Record<string, any>;
19
+ }
20
+ export interface ITelemetryEvent {
21
+ eventId: string;
22
+ timestamp: number;
23
+ level: TelemetryLevel;
24
+ message: string;
25
+ context?: string;
26
+ error?: ITelemetryError;
27
+ component?: ITelemetryComponentContext;
28
+ data?: Record<string, any>;
29
+ metadata: {
30
+ sdk: ITelemetrySDKContext;
31
+ user: ITelemetryUserContext;
32
+ browser: ITelemetryBrowserContext;
33
+ };
34
+ }
35
+ export interface ITelemetryError {
36
+ name: string;
37
+ message: string;
38
+ stack?: string;
39
+ code?: string | number;
40
+ statusCode?: number;
41
+ }
42
+ export interface ITelemetrySDKContext {
43
+ version: string;
44
+ env: ElementsEnv;
45
+ isBuilder: boolean;
46
+ partnerCode?: string;
47
+ }
48
+ export interface ITelemetryComponentContext {
49
+ type: ComponentType;
50
+ tagName: string;
51
+ renderCount?: number;
52
+ renderTrigger?: string;
53
+ renderDuration?: number;
54
+ useShadowDom?: boolean;
55
+ }
56
+ export interface ITelemetryUserContext {
57
+ deviceId: string;
58
+ sessionId?: string;
59
+ isLocalStorageAvailable: boolean;
60
+ }
61
+ export interface ITelemetryBrowserContext {
62
+ userAgent: string;
63
+ deviceType: DeviceType;
64
+ url: string;
65
+ referrer?: string;
66
+ timezone?: string;
67
+ }
68
+ export interface ITelemetryBatchPayload {
69
+ batchId: string;
70
+ timestamp: number;
71
+ events: ITelemetryEvent[];
72
+ }
73
+ export interface ITelemetryStats {
74
+ totalEvents: number;
75
+ eventsByLevel: Record<TelemetryLevel, number>;
76
+ batchesSent: number;
77
+ failedBatches: number;
78
+ queuedEvents: number;
79
+ droppedEvents: number;
80
+ }
@@ -0,0 +1,27 @@
1
+ import type { ITelemetryEventOptions, TelemetryLevel } from './telemetry.interface';
2
+ export declare class TelemetryService {
3
+ private config;
4
+ private eventQueue;
5
+ private batchTimer;
6
+ private readonly clientConfig;
7
+ private stats;
8
+ private isShuttingDown;
9
+ constructor();
10
+ static getInstance(): TelemetryService;
11
+ isEnabled(): boolean;
12
+ captureEvent(level: TelemetryLevel, message: string, options?: ITelemetryEventOptions): void;
13
+ private buildErrorContext;
14
+ private buildSDKContext;
15
+ private buildUserContext;
16
+ private buildBrowserContext;
17
+ private shouldCapture;
18
+ private addToQueue;
19
+ private startBatchTimer;
20
+ private flushQueue;
21
+ private createBatch;
22
+ private sendBatch;
23
+ private sendBatchViaXHR;
24
+ private truncateStackTrace;
25
+ private handleInternalError;
26
+ private shutdown;
27
+ }
@@ -1 +1,4 @@
1
+ import { type ComponentType } from '@/enums';
1
2
  export declare function deepMergeConfigs<T extends Record<string, any>>(target: T, source: Partial<T>): T;
3
+ export declare const layoutFieldToComponentTypes: Map<string, ComponentType[]>;
4
+ export declare function getComponentTypesForLayoutFields(parentPath: string, layoutFields: Record<string, any>): ComponentType[];
@@ -14,7 +14,6 @@ export declare const ELEMENTS_ACTIONS_EVENT: {
14
14
  readonly PRODUCT_SIZE_CHANGED: "product_size_changed";
15
15
  readonly PRODUCT_FULFILLMENT_TYPE_CHANGED: "product_fulfillment_type_changed";
16
16
  readonly PRODUCT_FULFILLMENT_CHANGED: "product_fulfillment_changed";
17
- readonly PRODUCT_ENGRAVING_UPDATED: "product_engraving_updated";
18
17
  readonly CART_LOADED: "cart_loaded";
19
18
  readonly CART_CLOSED: "cart_closed";
20
19
  readonly CART_OPENED: "cart_opened";
@@ -0,0 +1,6 @@
1
+ export declare const DEBUG_MODE: {
2
+ readonly NONE: "none";
3
+ readonly CONSOLE: "console";
4
+ readonly PANEL: "panel";
5
+ };
6
+ export type DebugMode = (typeof DEBUG_MODE)[keyof typeof DEBUG_MODE];
@@ -1,2 +1,3 @@
1
1
  export * from './cloud.enum';
2
2
  export * from './core.enum';
3
+ export * from './debug.enum';
@@ -153,4 +153,6 @@ export interface IProductPresale {
153
153
  estimatedShipBy: null | string;
154
154
  isActive: boolean;
155
155
  language: string;
156
+ presaleLimit: number;
157
+ price: number;
156
158
  }
@@ -18,6 +18,7 @@ export interface ICheckoutLayout {
18
18
  drawerHeaderText: string;
19
19
  placeOrderButtonText: string;
20
20
  placeOrderButtonShowRequiredFields: boolean;
21
+ checkoutCompleted: ICheckoutCompleted;
21
22
  }
22
23
  export interface ICheckoutCompleted {
23
24
  customLogo: string;
@@ -25,7 +26,6 @@ export interface ICheckoutCompleted {
25
26
  }
26
27
  export interface ICheckoutTheme {
27
28
  backgroundColor: string;
28
- checkoutCompleted: ICheckoutCompleted;
29
29
  }
30
30
  export interface ICheckoutComponent {
31
31
  theme: ICheckoutTheme;
@@ -1,6 +1,6 @@
1
1
  import type { IAddressActions, ICartActions, ICheckoutActions, IProductActions } from '@/core/client/client-action.service';
2
2
  import type { IClientConfigs } from '@/core/client/client-config.service';
3
- import type { ComponentType, ElementsEnv } from '@/enums';
3
+ import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
4
4
  import type { IAddressOptions } from '@/modules/address/address.interface';
5
5
  import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
6
6
  export type DeepPartial<T> = {
@@ -23,7 +23,7 @@ export interface ILiquidCommerceElementsConfig {
23
23
  customTheme?: IClientCustomThemeConfig;
24
24
  proxy?: IElementsProxyConfig;
25
25
  isBuilder?: boolean;
26
- enableDebugging?: boolean;
26
+ debugMode?: DebugMode;
27
27
  }
28
28
  export interface IInjectProductElement {
29
29
  containerId: string;
@@ -34,17 +34,22 @@ export interface IBuilderInjectElementParams {
34
34
  containerId: string;
35
35
  [key: string]: any;
36
36
  }
37
+ export interface IInjectedComponent {
38
+ getType(): ComponentType;
39
+ getElement(): HTMLElement;
40
+ rerender(): void;
41
+ }
37
42
  export interface ILiquidCommerceElementsBuilderMethod {
38
43
  updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
39
44
  updateProductComponent(configs: UpdateProductComponent): Promise<void>;
40
45
  updateAddressComponent(configs: UpdateAddressComponent): void;
41
46
  updateCartComponent(configs: UpdateCartComponent): void;
42
47
  updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
43
- injectElement(params: IBuilderInjectElementParams): Promise<void>;
44
- injectProductElement(params: IInjectProductElement[]): Promise<void>;
45
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
46
- injectCartElement(containerId: string): Promise<void>;
47
- injectCheckoutElement(containerId: string): Promise<void>;
48
+ injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
49
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
50
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
51
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
52
+ injectCheckoutElement(containerId: string): Promise<IInjectedComponent | null>;
48
53
  }
49
54
  export interface IProcessInjectElementParams {
50
55
  type: ComponentType;
@@ -66,11 +71,12 @@ export interface ILiquidCommerceElementsActions {
66
71
  }
67
72
  export interface ILiquidCommerceElementsClient {
68
73
  builder: ILiquidCommerceElementsBuilderMethod;
69
- injectProductElement(params: IInjectProductElement[]): Promise<void>;
70
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
71
- injectCartElement(containerId: string): Promise<void>;
72
- injectCheckoutElement(containerId: string): Promise<void>;
74
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
75
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
76
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
77
+ injectCheckoutElement(containerId: string): Promise<IInjectedComponent | null>;
73
78
  ui: ILiquidCommerceElementsUIMethod;
74
79
  actions: ILiquidCommerceElementsActions;
80
+ getInjectedComponents(): Map<string, IInjectedComponent>;
75
81
  }
76
82
  export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
@@ -10,8 +10,6 @@ export declare class AddressCommands extends BaseCommand {
10
10
  getAddressDetails(addressId: string): Promise<IAddressDetailsResult>;
11
11
  setSelectedAddress(addressData: IAddressData): Promise<void>;
12
12
  setAddressManually(address: Omit<IAddress, 'id'>, coordinates: ICoords): Promise<void>;
13
- clearSelectedAddress(): void;
14
- private shouldResetCartForAddressChange;
15
- private persistSessionData;
13
+ clearSelectedAddress(): Promise<void>;
16
14
  getDetails(): IAddressData | null;
17
15
  }
@@ -23,13 +23,13 @@ export declare class CartCommands extends BaseCommand {
23
23
  handleGoToCheckout(): Promise<void>;
24
24
  applyPromoCode(promoCode: string): Promise<void>;
25
25
  removePromoCode(): Promise<void>;
26
- clearPromoCodeError(): Promise<void>;
27
26
  rerenderCart(): void;
28
27
  resetCart(): Promise<void>;
29
28
  getDetails(): IBaseCartEventData;
30
29
  private buildItemUpdate;
31
30
  private syncItemsFromApiResponse;
32
31
  private syncCartMetaFromApiResponse;
32
+ private syncRetailersFromApiResponse;
33
33
  private updateFulfillment;
34
34
  private addNewFulfillmentAndRetailer;
35
35
  private cleanupAfterItemRemoval;
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICartComponent } from '@/interfaces/configs';
3
3
  export interface ICartComponentParams {
4
4
  isIndependentComponent: boolean;
@@ -6,6 +6,5 @@ export interface ICartComponentParams {
6
6
  export declare class CartComponent extends BaseComponent<ICartComponentParams, ICartComponent> {
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
10
9
  protected template(): HTMLElement[];
11
10
  }
@@ -16,5 +16,6 @@ export declare class CartFooterComponent extends BaseComponent<ICartFooterCompon
16
16
  private shouldDisableCheckout;
17
17
  private updateCheckoutButtonState;
18
18
  private updateSubtotalItemsCount;
19
+ private handleCheckout;
19
20
  protected template(): HTMLElement[];
20
21
  }
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  export interface ICartItemComponentParams {
3
3
  itemId: string;
4
4
  }
@@ -6,10 +6,6 @@ export declare class CartItemComponent extends BaseComponent<ICartItemComponentP
6
6
  get hostClasses(): string[];
7
7
  get hostAttributes(): Record<string, string>;
8
8
  constructor();
9
- private getItemId;
10
- onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
11
- private handleEngravingElement;
12
- private updateShippingTime;
9
+ private handleOpenEngravingForm;
13
10
  protected template(): HTMLElement[];
14
- afterRender(): void;
15
11
  }
@@ -1,6 +1,6 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
2
  import type { ICheckoutItemStore, ICheckoutStripeFormStatusStore } from '@/core/store';
3
- import type { ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
3
+ import type { ICart, ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
4
4
  import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
5
5
  export declare function buildCheckoutItemStore(apiItem: ICheckoutItem, retailer: ICheckoutRetailer, fulfillment: ICheckoutFulfillment): ICheckoutItemStore;
6
6
  export declare class CheckoutCommands extends BaseCommand {
@@ -13,6 +13,7 @@ export declare class CheckoutCommands extends BaseCommand {
13
13
  partialLoadCheckout(params?: {
14
14
  cartId?: string;
15
15
  response?: ICheckoutPrepareResponse;
16
+ cartResponse?: ICart;
16
17
  }): Promise<void>;
17
18
  toggleIsGift(active?: boolean): Promise<void>;
18
19
  toggleBillingSameAsShipping(active?: boolean): Promise<void>;
@@ -22,7 +23,7 @@ export declare class CheckoutCommands extends BaseCommand {
22
23
  applyPromoCode(code: string): Promise<void>;
23
24
  clearPromoCodeError(): Promise<void>;
24
25
  removePromoCode(): Promise<void>;
25
- applyGiftCard(code?: string): Promise<void>;
26
+ applyGiftCard(code: string): Promise<void>;
26
27
  clearGiftCardError(): Promise<void>;
27
28
  removeGiftCard(code: string): Promise<void>;
28
29
  updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export interface ICheckoutComponentParams {
4
4
  checkoutId: string;
@@ -6,6 +6,5 @@ export interface ICheckoutComponentParams {
6
6
  }
7
7
  export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
10
9
  protected template(): HTMLElement[];
11
10
  }
@@ -6,6 +6,8 @@ export declare class CheckoutSummarySectionComponent extends BaseComponent<null,
6
6
  onStoreWatch(changes: IOnStoreChanged[]): void;
7
7
  private updateZeroAmountElement;
8
8
  protected afterRender(): void;
9
+ private handleEmailToggle;
10
+ private handleSmsToggle;
9
11
  private marketingOptInsContainer;
10
12
  private hasOnDemandOrder;
11
13
  protected template(): HTMLElement[];
@@ -1,8 +1,8 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export declare class CheckoutDeliveryInformationComponent extends BaseComponent<null, ICheckoutComponent> {
4
- constructor();
5
4
  get hostClasses(): string[];
5
+ constructor();
6
6
  private hasOnDemandFulfillments;
7
7
  private handleDeliveryInstructionsChange;
8
8
  private handleFirstNameChange;
@@ -9,11 +9,9 @@ export declare class CheckoutItemQuantityComponent extends BaseComponent<IChecko
9
9
  get hostClasses(): string[];
10
10
  constructor();
11
11
  onStoreWatch(changes: IOnStoreChanged[]): void;
12
- private getCheckoutItemStore;
13
12
  private getAvailableQuantity;
14
13
  private calculateQuantityLimits;
15
14
  private updateButtonStates;
16
15
  private handleQuantityChange;
17
- private createQuantityContainer;
18
16
  protected template(): HTMLElement[];
19
17
  }
@@ -6,7 +6,8 @@ export declare class CheckoutItemComponent extends BaseComponent<ICheckoutItemCo
6
6
  private trashButton;
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
9
+ onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
10
+ private updateEngravingElement;
10
11
  private setupMinimumPurchaseAlert;
11
12
  private updateTrashButtonState;
12
13
  private createLoadingOverlay;
@@ -10,6 +10,7 @@ export declare class CheckoutItemsComponent extends BaseComponent<null, ICheckou
10
10
  private syncItemsWithStore;
11
11
  private updateItemCount;
12
12
  onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
13
+ private handleToggle;
13
14
  private setupToggler;
14
15
  protected afterRender(): void;
15
16
  protected template(): HTMLElement[];
@@ -16,7 +16,6 @@ export declare class CheckoutPlaceOrderButtonComponent extends BaseComponent<nul
16
16
  private determineButtonState;
17
17
  private applyButtonState;
18
18
  private handlePlaceOrderClick;
19
- private focusFirstInvalidField;
20
19
  private showPaymentError;
21
20
  private handleCheckoutReadyForSubmit;
22
21
  protected template(): HTMLElement[];
@@ -15,7 +15,6 @@ export declare const giftFormFields: {
15
15
  readonly phone: "phone";
16
16
  readonly birthDate: "birthDate";
17
17
  readonly addressTwo: "addressTwo";
18
- readonly company: "company";
19
18
  readonly message: "message";
20
19
  };
21
20
  export declare const billingFormFields: {
@@ -1,3 +1,4 @@
1
+ export * from '../../ui-components/engraving/engraving-form.component';
1
2
  export * from '../../ui-components/engraving/engraving-view.component';
2
3
  export * from './components';
3
4
  export * from './product-add-to-cart-section.component';
@@ -9,6 +9,7 @@ export declare class ProductAddToCartSectionComponent extends BaseComponent<IAdd
9
9
  private qtyDecreaseButton;
10
10
  private quantityText;
11
11
  get hostClasses(): string[];
12
+ get hostAttributes(): Record<string, string>;
12
13
  constructor();
13
14
  private getProductId;
14
15
  private getAvailableQuantity;
@@ -1,10 +1,13 @@
1
- import { BaseComponent } from '@/core/base-component.service';
1
+ import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
2
  import type { IProductComponent } from '@/interfaces/configs';
3
3
  export interface IProductInteractionsComponent {
4
4
  productId: string;
5
5
  }
6
6
  export declare class ProductInteractionsComponent extends BaseComponent<IProductInteractionsComponent, IProductComponent> {
7
7
  get hostClasses(): string[];
8
+ private addPersonalizationSpan;
9
+ constructor();
10
+ onStoreWatch(changedPaths: IOnStoreChanged[]): void;
8
11
  private getProductId;
9
12
  afterRender(): void;
10
13
  private setupSizeButtonsEventListener;
@@ -5,6 +5,7 @@ export interface IProductPriceComponentParams {
5
5
  }
6
6
  export declare class ProductPriceComponent extends BaseComponent<IProductPriceComponentParams, IProductComponent> {
7
7
  get hostClasses(): string[];
8
+ get hostAttributes(): Record<string, string>;
8
9
  constructor();
9
10
  private getProductId;
10
11
  protected template(): string;
@@ -6,6 +6,7 @@ export interface IProductRetailersComponent {
6
6
  export declare class ProductRetailersComponent extends BaseComponent<IProductRetailersComponent, IProductComponent> {
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
+ get hostAttributes(): Record<string, string>;
9
10
  private getProductId;
10
11
  protected template(): HTMLElement | HTMLElement[];
11
12
  }
@@ -18,12 +18,12 @@ export declare class ProductCommands extends BaseCommand {
18
18
  updateQuantity(productId: string, delta: number): Promise<void>;
19
19
  changeFulfillmentType(productId: string, selectedFulfillmentType: FulfillmentType): Promise<void>;
20
20
  removeProduct(productId: string): Promise<void>;
21
- updateEngravingLines(productId: string, engravingLines: string[]): Promise<void>;
22
21
  openProductDrawer(productId: string, contentType: IProductDrawerContentConfig['type'], data?: Record<string, any>): Promise<void>;
23
22
  closeProductDrawer(productId: string): Promise<void>;
24
23
  rerenderAllProducts(): Promise<void>;
25
24
  addToCart(productId: string, params: AddItemParams): Promise<void>;
26
25
  addPresaleToCart(productId: string, params: AddItemParams): Promise<void>;
27
26
  productDataForEventFromStore(identifier: string): IBaseProductEventData;
27
+ private findFirstAvailableSize;
28
28
  private loadProductStoreUpdate;
29
29
  }