@liquidcommerce/elements-sdk 2.6.0-beta.9 → 2.6.0-beta.90

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 (225) hide show
  1. package/README.md +84 -2520
  2. package/dist/index.checkout.esm.js +16940 -0
  3. package/dist/index.esm.js +24189 -20939
  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 +2 -6
  14. package/dist/types/core/api/api-client.service.d.ts +20 -18
  15. package/dist/types/core/api/api-result.d.ts +19 -0
  16. package/dist/types/core/api/auth-client.service.d.ts +37 -13
  17. package/dist/types/core/api/http-client.service.d.ts +0 -8
  18. package/dist/types/core/base-component.service.d.ts +2 -1
  19. package/dist/types/core/client/actions/base-action.service.d.ts +22 -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 +38 -0
  22. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +69 -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 -74
  25. package/dist/types/core/client/client-config.service.d.ts +8 -5
  26. package/dist/types/core/google-tag-manager.service.d.ts +2 -1
  27. package/dist/types/core/logger/logger.service.d.ts +1 -1
  28. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -0
  29. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -1
  30. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +36 -51
  31. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +11 -6
  32. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  33. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  34. package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
  35. package/dist/types/core/store/interfaces/checkout.interface.d.ts +18 -108
  36. package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
  37. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  38. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  39. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  40. package/dist/types/core/store/store.constant.d.ts +5 -0
  41. package/dist/types/core/store/store.service.d.ts +1 -0
  42. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  43. package/dist/types/enums/core.enum.d.ts +39 -1
  44. package/dist/types/enums/index.d.ts +0 -1
  45. package/dist/types/index.checkout.d.ts +8 -0
  46. package/dist/types/index.checkout.umd.d.ts +4 -0
  47. package/dist/types/index.d.ts +8 -3
  48. package/dist/types/interfaces/api/cart.interface.d.ts +12 -7
  49. package/dist/types/interfaces/api/checkout.interface.d.ts +239 -0
  50. package/dist/types/interfaces/api/index.d.ts +5 -0
  51. package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
  52. package/dist/types/interfaces/api/product.interface.d.ts +10 -4
  53. package/dist/types/interfaces/client.interface.d.ts +72 -0
  54. package/dist/types/interfaces/component.interface.d.ts +7 -0
  55. package/dist/types/interfaces/config.interface.d.ts +40 -0
  56. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  57. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  58. package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
  59. package/dist/types/interfaces/configs/global.interface.d.ts +5 -3
  60. package/dist/types/interfaces/configs/index.d.ts +1 -0
  61. package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
  62. package/dist/types/interfaces/configs/product.interface.d.ts +3 -1
  63. package/dist/types/interfaces/injection.interface.d.ts +49 -0
  64. package/dist/types/modules/address/address.command.d.ts +2 -1
  65. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  66. package/dist/types/modules/cart/cart.commands.d.ts +4 -4
  67. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  68. package/dist/types/modules/checkout/checkout.commands.d.ts +26 -10
  69. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  70. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  71. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +3 -0
  72. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  73. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +3 -0
  74. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  75. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +1 -1
  76. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  77. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  78. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  79. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  80. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  81. package/dist/types/modules/checkout/constant.d.ts +3 -0
  82. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  83. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
  84. package/dist/types/modules/product/components/product-description.component.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-options.component.d.ts +2 -1
  87. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
  88. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +5 -2
  89. package/dist/types/modules/product/product.commands.d.ts +3 -3
  90. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  91. package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
  92. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  93. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  94. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  95. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  96. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +13 -0
  97. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  98. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  99. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  100. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  101. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  102. 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
  103. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  104. package/dist/types/modules/product-list/components/index.d.ts +6 -2
  105. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  106. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +39 -31
  107. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  108. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +55 -36
  109. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  110. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +50 -0
  111. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  112. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  113. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  114. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -8
  115. package/dist/types/modules/product-list/product-list.component.d.ts +14 -47
  116. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  117. package/dist/types/modules/product-list/product-list.interface.d.ts +20 -35
  118. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  119. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  120. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  121. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  122. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  123. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  124. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  125. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  126. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  127. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +1 -0
  128. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +6 -1
  129. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +6 -1
  130. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  131. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  132. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  133. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  134. package/dist/types/modules/ui-components/ui.commands.d.ts +5 -1
  135. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  136. package/dist/types/ssr/stub.d.ts +10 -0
  137. package/dist/types/static/icon/check.icon.d.ts +2 -0
  138. package/dist/types/static/icon/index.d.ts +1 -0
  139. package/dist/types/utils/dom-compat.d.ts +2 -0
  140. package/dist/types/utils/format.d.ts +0 -14
  141. package/dist/types/utils/product-selection.d.ts +16 -0
  142. package/dist/types/utils/product.d.ts +15 -0
  143. package/docs/v1/README.md +210 -0
  144. package/docs/v1/api/actions/address-actions.md +286 -0
  145. package/docs/v1/api/actions/cart-actions.md +357 -0
  146. package/docs/v1/api/actions/checkout-actions.md +525 -0
  147. package/docs/v1/api/actions/product-actions.md +204 -0
  148. package/docs/v1/api/client.md +517 -0
  149. package/docs/v1/api/configuration.md +532 -0
  150. package/docs/v1/api/injection-methods.md +292 -0
  151. package/docs/v1/api/typescript-types.md +419 -0
  152. package/docs/v1/api/ui-helpers.md +200 -0
  153. package/docs/v1/examples/advanced-patterns.md +199 -0
  154. package/docs/v1/examples/checkout-flow.md +90 -0
  155. package/docs/v1/examples/custom-theming.md +63 -0
  156. package/docs/v1/examples/multi-product-page.md +90 -0
  157. package/docs/v1/examples/simple-product-page.md +89 -0
  158. package/docs/v1/getting-started/concepts.md +502 -0
  159. package/docs/v1/getting-started/installation.md +328 -0
  160. package/docs/v1/getting-started/quick-start.md +405 -0
  161. package/docs/v1/guides/address-component.md +435 -0
  162. package/docs/v1/guides/best-practices.md +365 -0
  163. package/docs/v1/guides/cart-component.md +725 -0
  164. package/docs/v1/guides/checkout-component.md +670 -0
  165. package/docs/v1/guides/events.md +926 -0
  166. package/docs/v1/guides/product-component.md +731 -0
  167. package/docs/v1/guides/product-list-component.md +631 -0
  168. package/docs/v1/guides/theming.md +213 -0
  169. package/docs/v1/integration/angular.md +39 -0
  170. package/docs/v1/integration/laravel.md +41 -0
  171. package/docs/v1/integration/nextjs.md +69 -0
  172. package/docs/v1/integration/proxy-setup.md +106 -0
  173. package/docs/v1/integration/react.md +64 -0
  174. package/docs/v1/integration/vanilla-js.md +84 -0
  175. package/docs/v1/integration/vue.md +58 -0
  176. package/docs/v1/reference/browser-support.md +45 -0
  177. package/docs/v1/reference/error-handling.md +75 -0
  178. package/docs/v1/reference/performance.md +52 -0
  179. package/docs/v1/reference/troubleshooting.md +136 -0
  180. package/package.json +33 -37
  181. package/dist/types/elements-builder-client.d.ts +0 -2
  182. package/dist/types/elements-client.d.ts +0 -2
  183. package/dist/types/enums/cloud.enum.d.ts +0 -106
  184. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -42
  185. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
  186. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  187. package/dist/types/interfaces/cloud/index.d.ts +0 -4
  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/checkout/components/checkout.type.d.ts +0 -4
  192. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  193. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  194. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  195. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.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/utils/helper.d.ts +0 -28
  205. package/docs/ACTIONS.md +0 -1300
  206. package/docs/BROWSER_SUPPORT.md +0 -279
  207. package/docs/CONFIGURATION.md +0 -853
  208. package/docs/DOCUMENTATION_INDEX.md +0 -311
  209. package/docs/EVENTS.md +0 -798
  210. package/docs/PROXY.md +0 -228
  211. package/docs/THEMING.md +0 -592
  212. package/docs/TROUBLESHOOTING.md +0 -793
  213. package/umd/elements.js +0 -1
  214. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  215. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  216. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  217. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  218. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  219. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  220. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  221. /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
  222. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  223. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  224. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  225. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,18 @@
1
+ import type { IAddressAddress, IAddressCoordinates, IAddressData } from '@/interfaces/api/address.interface';
2
+ import { BaseActionService } from './base-action.service';
3
+ export interface IAddressActions {
4
+ setAddressByPlacesId: (placesId: string) => Promise<void>;
5
+ setAddressManually: (address: IAddressAddress, coordinates: IAddressCoordinates) => Promise<void>;
6
+ clear: () => Promise<void>;
7
+ getDetails: () => IAddressData | null;
8
+ }
9
+ export declare class ClientAddressActionService extends BaseActionService {
10
+ private readonly command;
11
+ constructor();
12
+ static getInstance(): ClientAddressActionService;
13
+ get actions(): IAddressActions;
14
+ private setAddressByPlacesId;
15
+ private setAddressManually;
16
+ private clear;
17
+ private getDetails;
18
+ }
@@ -0,0 +1,38 @@
1
+ import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
2
+ import { type FulfillmentType } from '@/enums';
3
+ import { BaseActionService } from './base-action.service';
4
+ export interface IAddProductParams {
5
+ identifier: string;
6
+ fulfillmentType: FulfillmentType;
7
+ quantity: number;
8
+ engravingLines?: string[];
9
+ }
10
+ export interface ICartActions {
11
+ openCart: () => void;
12
+ closeCart: () => void;
13
+ toggleCart: () => void;
14
+ addProduct: (params: IAddProductParams[], openCart?: boolean) => Promise<void>;
15
+ applyPromoCode: (promoCode: string) => Promise<void>;
16
+ removePromoCode: () => Promise<void>;
17
+ resetCart: () => Promise<void>;
18
+ getDetails: () => IBaseCartEventData;
19
+ }
20
+ export declare class ClientCartActionService extends BaseActionService {
21
+ private readonly command;
22
+ private pendingCartParams;
23
+ private pendingCartOpenFlag;
24
+ constructor();
25
+ static getInstance(): ClientCartActionService;
26
+ get actions(): ICartActions;
27
+ private setupAddressUpdateListener;
28
+ private retryPendingCartOperation;
29
+ private clearPendingCartOperation;
30
+ private openCart;
31
+ private closeCart;
32
+ private toggleCart;
33
+ private addProduct;
34
+ private applyPromoCode;
35
+ private removePromoCode;
36
+ private resetCart;
37
+ private getDetails;
38
+ }
@@ -0,0 +1,69 @@
1
+ import type { ICheckoutDetailsEventData } from '@/core/pubsub/interfaces/checkout.interface';
2
+ import type { IAnonymousCheckoutAddProductParams, IAnonymousCheckoutAddProductResponse } from '@/interfaces/api/checkout.interface';
3
+ import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
4
+ import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/constant';
5
+ import { BaseActionService } from './base-action.service';
6
+ import type { IAddProductParams } from './client-cart-action.service';
7
+ export interface ISavedPaymentMethodInput {
8
+ id: string;
9
+ card: {
10
+ brand: string;
11
+ last4: string;
12
+ expMonth?: string | number;
13
+ expYear?: string | number;
14
+ };
15
+ }
16
+ export interface ICheckoutActions {
17
+ openCheckout: () => void;
18
+ closeCheckout: () => void;
19
+ toggleCheckout: () => void;
20
+ exitCheckout: () => void;
21
+ setSavedPaymentMethod: (params: ISavedPaymentMethodInput) => void;
22
+ clearSavedPaymentMethod: () => void;
23
+ addProduct: (params: IAddProductParams[], openCheckout?: boolean) => Promise<void>;
24
+ applyPromoCode: (promoCode: string) => Promise<void>;
25
+ removePromoCode: () => Promise<void>;
26
+ applyGiftCard: (code: string) => Promise<void>;
27
+ removeGiftCard: (code: string) => Promise<void>;
28
+ toggleIsGift: (active?: boolean) => Promise<void>;
29
+ toggleBillingSameAsShipping: (active?: boolean) => Promise<void>;
30
+ toggleMarketingPreferences: (field: 'canEmail' | 'canSms', active: boolean) => Promise<void>;
31
+ updateCustomerInfo: (params: Record<CustomerFieldName, string>) => void;
32
+ updateBillingInfo: (params: Record<BillingFieldName, string>) => void;
33
+ updateGiftInfo: (params: Record<GiftFieldName, string>) => void;
34
+ getDetails: () => ICheckoutDetailsEventData;
35
+ getProductAvailabilityByState: (identifiers: string[], state?: string) => Promise<IProductAvailabilityResponse>;
36
+ addAnonymousProduct: (params: IAnonymousCheckoutAddProductParams) => Promise<IAnonymousCheckoutAddProductResponse>;
37
+ }
38
+ export declare class ClientCheckoutActionService extends BaseActionService {
39
+ private readonly command;
40
+ private readonly allowedCustomerFields;
41
+ private readonly allowedBillingFields;
42
+ private readonly allowedGiftFields;
43
+ private cartActionsAddProduct;
44
+ constructor();
45
+ static getInstance(): ClientCheckoutActionService;
46
+ setCartActionsAddProduct(addProductFn: (params: IAddProductParams[]) => Promise<void>): void;
47
+ get actions(): ICheckoutActions;
48
+ private normalizeCheckoutFieldValue;
49
+ private openCheckout;
50
+ private closeCheckout;
51
+ private toggleCheckout;
52
+ private exitCheckout;
53
+ private setSavedPaymentMethod;
54
+ private clearSavedPaymentMethod;
55
+ private addProduct;
56
+ private applyPromoCode;
57
+ private removePromoCode;
58
+ private applyGiftCard;
59
+ private removeGiftCard;
60
+ private toggleIsGift;
61
+ private toggleBillingSameAsShipping;
62
+ private toggleMarketingPreferences;
63
+ private updateCustomerInfo;
64
+ private updateBillingInfo;
65
+ private updateGiftInfo;
66
+ private getDetails;
67
+ private addAnonymousProduct;
68
+ private getProductAvailabilityByState;
69
+ }
@@ -0,0 +1,15 @@
1
+ import type { IBaseProductEventData } from '@/core/pubsub/interfaces/product.interface';
2
+ import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
3
+ import { BaseActionService } from './base-action.service';
4
+ export interface IProductActions {
5
+ getDetails: (identifier: string) => IBaseProductEventData;
6
+ getProductAvailabilityByState: (identifiers: string[], state?: string) => Promise<IProductAvailabilityResponse>;
7
+ }
8
+ export declare class ClientProductActionService extends BaseActionService {
9
+ private readonly command;
10
+ constructor();
11
+ static getInstance(): ClientProductActionService;
12
+ get actions(): IProductActions;
13
+ private getDetails;
14
+ private getProductAvailabilityByState;
15
+ }
@@ -1,78 +1,10 @@
1
- import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
2
- import type { ICheckoutDetailsEventData } from '@/core/pubsub/interfaces/checkout.interface';
3
- import type { IBaseProductEventData } from '@/core/pubsub/interfaces/product.interface';
4
- import { type FulfillmentType } from '@/enums';
5
- import type { IAddressAddress, IAddressCoordinates, IAddressData } from '@/interfaces/api/address.interface';
6
- import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
7
- export interface IAddProductParams {
8
- identifier: string;
9
- fulfillmentType: FulfillmentType;
10
- quantity: number;
11
- }
12
- export interface IAddressActions {
13
- setAddressByPlacesId: (placesId: string) => Promise<void>;
14
- setAddressManually: (address: IAddressAddress, coordinates: IAddressCoordinates) => Promise<void>;
15
- clear: () => Promise<void>;
16
- getDetails: () => IAddressData | null;
17
- }
18
- export interface ICartActions {
19
- openCart: () => void;
20
- closeCart: () => void;
21
- toggleCart: () => void;
22
- addProduct: (params: IAddProductParams[], openCart?: boolean) => Promise<void>;
23
- applyPromoCode: (promoCode: string) => Promise<void>;
24
- removePromoCode: () => Promise<void>;
25
- resetCart: () => Promise<void>;
26
- getDetails: () => IBaseCartEventData;
27
- }
28
- export interface ICheckoutActions {
29
- openCheckout: () => void;
30
- closeCheckout: () => void;
31
- toggleCheckout: () => void;
32
- addProduct: (params: IAddProductParams[], openCheckout?: boolean) => Promise<void>;
33
- addPresaleProduct: (params: IAddProductParams) => Promise<void>;
34
- applyPromoCode: (promoCode: string) => Promise<void>;
35
- removePromoCode: () => Promise<void>;
36
- applyGiftCard: (code: string) => Promise<void>;
37
- removeGiftCard: (code: string) => Promise<void>;
38
- toggleIsGift: (active?: boolean) => Promise<void>;
39
- toggleBillingSameAsShipping: (active?: boolean) => Promise<void>;
40
- toggleMarketingPreferences: (field: 'canEmail' | 'canSms', active: boolean) => Promise<void>;
41
- updateCustomerInfo: (params: Record<CustomerFieldName, string>) => void;
42
- updateBillingInfo: (params: Record<BillingFieldName, string>) => void;
43
- updateGiftInfo: (params: Record<GiftFieldName, string>) => void;
44
- getDetails: () => ICheckoutDetailsEventData;
45
- }
46
- export interface IProductActions {
47
- getDetails: (identifier: string) => IBaseProductEventData;
48
- }
1
+ import type { ILiquidCommerceElementsActions } from '@/interfaces/client.interface';
49
2
  export declare class ClientActionService {
50
- private readonly pubSub;
51
- private readonly command;
52
- private readonly store;
53
- private readonly api;
54
- private readonly themeProvider;
55
- private readonly logger;
56
- private readonly allowedCustomerFields;
57
- private readonly allowedBillingFields;
58
- private readonly allowedGiftFields;
59
- private pendingCartParams;
60
- private pendingCartOpenFlag;
3
+ private readonly productActionService;
4
+ private readonly addressActionService;
5
+ private readonly cartActionService;
6
+ private readonly checkoutActionService;
61
7
  constructor();
62
8
  static getInstance(): ClientActionService;
63
- private setupAddressUpdateListener;
64
- private retryPendingCartOperation;
65
- private clearPendingCartOperation;
66
- private getLocation;
67
- private normalizeCheckoutFieldValue;
68
- private productActions;
69
- private addressActions;
70
- private cartActions;
71
- private checkoutActions;
72
- actions: {
73
- product: IProductActions;
74
- address: IAddressActions;
75
- cart: ICartActions;
76
- checkout: ICheckoutActions;
77
- };
9
+ get actions(): ILiquidCommerceElementsActions;
78
10
  }
@@ -1,6 +1,6 @@
1
1
  import { type DebugMode, type ElementsEnv } from '@/enums';
2
+ import type { IClientCustomThemeConfig, IElementsProxyConfig, ILiquidCommerceElementsCheckoutConfig } from '@/interfaces/config.interface';
2
3
  import type { IPromoTicker } from '@/interfaces/configs';
3
- import type { IClientCustomThemeConfig, IElementsProxyConfig } from '@/interfaces/core.interface';
4
4
  export type DeviceType = 'desktop' | 'tablet' | 'mobile';
5
5
  export interface IClientConfigs {
6
6
  apiKey: string;
@@ -19,9 +19,11 @@ export interface IClientConfigs {
19
19
  version?: string;
20
20
  clientPrepared: boolean;
21
21
  promoTicker: IPromoTicker[] | null;
22
- paymentMethodId?: string;
23
22
  openShadowDom?: boolean;
24
23
  hasCustomApiUrl?: boolean;
24
+ mockMode: boolean;
25
+ checkout: ILiquidCommerceElementsCheckoutConfig | null;
26
+ isCheckoutOnly: boolean;
25
27
  }
26
28
  export interface IClientConfigInput {
27
29
  env?: ElementsEnv;
@@ -32,9 +34,11 @@ export interface IClientConfigInput {
32
34
  promoTicker?: IPromoTicker[];
33
35
  development?: {
34
36
  customApiUrl?: string;
35
- paymentMethodId?: string;
36
37
  openShadowDom?: boolean;
38
+ mockMode?: boolean;
37
39
  };
40
+ checkout?: ILiquidCommerceElementsCheckoutConfig;
41
+ isCheckoutOnly?: boolean;
38
42
  }
39
43
  export declare class ClientConfigService {
40
44
  private config;
@@ -43,16 +47,15 @@ export declare class ClientConfigService {
43
47
  getConfigs(): IClientConfigs;
44
48
  get<K extends keyof IClientConfigs>(key: K): IClientConfigs[K];
45
49
  set<K extends keyof IClientConfigs>(key: K, value: IClientConfigs[K]): void;
46
- isDevelopment(): boolean;
47
50
  isStaging(): boolean;
48
51
  isProduction(): boolean;
49
52
  isBuilder(): boolean;
53
+ isCheckoutOnly(): boolean;
50
54
  isDebuggingEnabled(): boolean;
51
55
  isDebugPanelEnabled(): boolean;
52
56
  debuggingDisabled(): boolean;
53
57
  hasCustomTheme(): boolean;
54
58
  isMobile(): boolean;
55
- isLocalStorageAvailable(): boolean;
56
59
  getProxyConfig(): IElementsProxyConfig | null;
57
60
  private validateInputs;
58
61
  private buildConfiguration;
@@ -33,6 +33,7 @@ interface BaseItem {
33
33
  quantity?: number;
34
34
  item_type?: string;
35
35
  item_subtype?: string;
36
+ item_image?: string;
36
37
  upc?: string;
37
38
  grouping_id?: string;
38
39
  product_id?: string;
@@ -93,7 +94,7 @@ export declare class GoogleTagManagerService {
93
94
  net_total?: number;
94
95
  }): void;
95
96
  promoCodeAttempt(code: string): void;
96
- promoCodeApplied(code: string, discountAmount?: number): void;
97
+ promoCodeApplied(code: string, discount?: number): void;
97
98
  promoCodeFailed(code: string, reason?: string): void;
98
99
  giftCardAttempt(code: string): void;
99
100
  giftCardApplied(code: string, appliedAmount?: number): void;
@@ -13,6 +13,6 @@ export declare class LoggerService {
13
13
  debug(message: string, data?: Record<string, any>): void;
14
14
  info(message: string, data?: Record<string, any>): void;
15
15
  warn(message: string, data?: Record<string, any>): void;
16
- error(message: string, error?: Error | Record<string, any>): void;
16
+ error(message: string, errorOrData?: Error | Record<string, any>): void;
17
17
  private sendToTelemetry;
18
18
  }
@@ -5,3 +5,6 @@ export interface IAddressActionEventData {
5
5
  address: IAddressAddress;
6
6
  coordinates: IAddressCoordinates;
7
7
  }
8
+ export interface IAddressFailedEventData extends IAddressActionEventData {
9
+ error: string;
10
+ }
@@ -50,7 +50,7 @@ export interface ICartItemEngravingUpdatedEventData {
50
50
  }
51
51
  export interface ICartPromoCodeEventData {
52
52
  cartId: string;
53
- discountAmount?: number;
53
+ discount?: number;
54
54
  newSubtotal?: number;
55
55
  }
56
56
  export interface ICartPromoCodeFailedEventData {
@@ -1,25 +1,56 @@
1
- import type { ICartItemAttributes } from '@/interfaces/api/cart.interface';
2
- import type { ICheckoutTotalAmounts } from '@/interfaces/cloud';
1
+ import type { ICheckoutAmounts, ICheckoutItem } from '@/interfaces/api/checkout.interface';
3
2
  export interface IBaseCheckoutEventData {
3
+ token: string;
4
4
  cartId: string;
5
+ isGift: boolean;
6
+ billingSameAsShipping: boolean;
7
+ marketingPreferences: {
8
+ canEmail: boolean;
9
+ canSms: boolean;
10
+ };
11
+ hasPromoCode: boolean;
12
+ hasGiftCards: boolean;
13
+ amounts: ICheckoutAmounts;
14
+ itemCount: number;
15
+ items: Record<string, ICheckoutItem>;
5
16
  }
6
17
  export interface ICheckoutLoadedEventData extends IBaseCheckoutEventData {
7
18
  }
19
+ export interface ICheckoutDetailsEventData extends IBaseCheckoutEventData {
20
+ }
21
+ export interface ICheckoutCustomerInformationUpdatedEventData {
22
+ cartId: string;
23
+ }
24
+ export interface ICheckoutGiftInformationUpdatedEventData {
25
+ cartId: string;
26
+ }
27
+ export interface ICheckoutBillingInformationUpdatedEventData {
28
+ cartId: string;
29
+ }
8
30
  export interface ICheckoutTipUpdatedEventData {
31
+ cartId: string;
9
32
  deliveryTips: Array<{
10
- fulfillmentId?: string;
11
- tipAmount?: number;
33
+ fulfillmentId: string;
34
+ tip: number;
35
+ }>;
36
+ previousDeliveryTips: Array<{
37
+ fulfillmentId: string;
38
+ tip: number;
12
39
  }>;
13
40
  }
14
41
  export interface ICheckoutFailedEventData {
15
42
  message: string;
16
43
  }
17
44
  export interface ICheckoutToggleEventData {
45
+ cartId: string;
18
46
  isActive: boolean;
47
+ previousIsActive: boolean;
19
48
  }
20
49
  export interface ICheckoutMarketingPreferencesToggleEventData {
50
+ cartId: string;
21
51
  fieldName: 'canEmail' | 'canSms';
22
52
  isActive: boolean;
53
+ previousIsActive: boolean;
23
54
  }
24
55
  export interface ICheckoutSubmitStartedEventData {
25
56
  started: boolean;
@@ -49,7 +80,7 @@ export interface ICheckoutItemEngravingUpdatedEventData {
49
80
  }
50
81
  export interface ICheckoutPromoCodeEventData {
51
82
  cartId: string;
52
- discountAmount?: number;
83
+ discount?: number;
53
84
  newTotal?: number;
54
85
  }
55
86
  export interface ICheckoutPromoCodeFailedEventData {
@@ -76,49 +107,3 @@ export interface ICheckoutProductAddFailedEventData {
76
107
  error: string;
77
108
  isPresale?: boolean;
78
109
  }
79
- export interface ICheckoutItemEventData {
80
- liquidId: string;
81
- variantId: string;
82
- cartItemId: string;
83
- retailerId: string;
84
- fulfillmentId: string;
85
- salsifyGrouping: string;
86
- name: string;
87
- catPath: string;
88
- volume: string;
89
- uom: string;
90
- proof: string;
91
- abv: string;
92
- containerType: string;
93
- container: string;
94
- size: string;
95
- pack: boolean;
96
- packDesc: string;
97
- mainImage: string;
98
- brand: string;
99
- partNumber: string;
100
- upc: string;
101
- sku: string;
102
- price: number;
103
- unitPrice: number;
104
- quantity: number;
105
- unitTax: number;
106
- bottleDeposits: number;
107
- attributes: ICartItemAttributes;
108
- retailerName: string;
109
- expectationDetail: string;
110
- }
111
- export interface ICheckoutDetailsEventData {
112
- cartId: string;
113
- isGift: boolean;
114
- billingSameAsShipping: boolean;
115
- marketingPreferences: {
116
- canEmail: boolean;
117
- canSms: boolean;
118
- };
119
- hasPromoCode: boolean;
120
- hasGiftCards: boolean;
121
- amounts: ICheckoutTotalAmounts;
122
- itemCount: number;
123
- items: Record<string, ICheckoutItemEventData>;
124
- }
@@ -1,6 +1,6 @@
1
- import type { IAddressActionEventData } from '@/core/pubsub/interfaces/address.interface';
1
+ import type { IAddressActionEventData, IAddressFailedEventData } from '@/core/pubsub/interfaces/address.interface';
2
2
  import type { ICartFailedEventData, ICartItemAddedEventData, ICartItemEngravingUpdatedEventData, ICartItemQuantityChangedEventData, ICartItemRemovedEventData, ICartLoadedEventData, ICartProductAddEventData, ICartProductAddFailedEventData, ICartPromoCodeEventData, ICartPromoCodeFailedEventData, ICartUpdatedEventData } from '@/core/pubsub/interfaces/cart.interface';
3
- import type { ICheckoutFailedEventData, ICheckoutGiftCardEventData, ICheckoutGiftCardFailedEventData, ICheckoutItemEngravingUpdatedEventData, ICheckoutItemQuantityChangedEventData, ICheckoutItemRemovedEventData, ICheckoutLoadedEventData, ICheckoutMarketingPreferencesToggleEventData, ICheckoutProductAddEventData, ICheckoutProductAddFailedEventData, ICheckoutPromoCodeEventData, ICheckoutPromoCodeFailedEventData, ICheckoutSubmitCompletedEventData, ICheckoutSubmitFailedEventData, ICheckoutSubmitStartedEventData, ICheckoutTipUpdatedEventData, ICheckoutToggleEventData } from '@/core/pubsub/interfaces/checkout.interface';
3
+ import type { ICheckoutBillingInformationUpdatedEventData, ICheckoutCustomerInformationUpdatedEventData, ICheckoutFailedEventData, ICheckoutGiftCardEventData, ICheckoutGiftCardFailedEventData, ICheckoutGiftInformationUpdatedEventData, ICheckoutItemEngravingUpdatedEventData, ICheckoutItemQuantityChangedEventData, ICheckoutItemRemovedEventData, ICheckoutLoadedEventData, ICheckoutMarketingPreferencesToggleEventData, ICheckoutProductAddEventData, ICheckoutProductAddFailedEventData, ICheckoutPromoCodeEventData, ICheckoutPromoCodeFailedEventData, ICheckoutSubmitCompletedEventData, ICheckoutSubmitFailedEventData, ICheckoutSubmitStartedEventData, ICheckoutTipUpdatedEventData, ICheckoutToggleEventData } from '@/core/pubsub/interfaces/checkout.interface';
4
4
  import type { IProductAddToCartEventData, IProductFulfillmentChangedEventData, IProductFulfillmentTypeChangedEventData, IProductLoadedEventData, IProductQuantityChangedEventData, IProductSizeChangedEventData } from '@/core/pubsub/interfaces/product.interface';
5
5
  import { ELEMENTS_ACTIONS_EVENT } from '@/enums';
6
6
  export interface IElementsClientIsReadyEventData {
@@ -16,6 +16,10 @@ export interface IEventMetadata {
16
16
  originalEvent: string;
17
17
  actionNamespace?: 'address' | 'product' | 'cart' | 'checkout' | 'other';
18
18
  timestamp: number;
19
+ sdkVersion: string;
20
+ env: string;
21
+ tenantName: string;
22
+ tenantCode: string;
19
23
  }
20
24
  export interface IEnhancedEventData<T> {
21
25
  data: T;
@@ -25,7 +29,7 @@ export interface IElementsActionsEventsMap {
25
29
  [ELEMENTS_ACTIONS_EVENT.CLIENT_READY]: IElementsClientIsReadyEventData;
26
30
  [ELEMENTS_ACTIONS_EVENT.ADDRESS_UPDATED]: IAddressActionEventData;
27
31
  [ELEMENTS_ACTIONS_EVENT.ADDRESS_CLEARED]: boolean;
28
- [ELEMENTS_ACTIONS_EVENT.ADDRESS_FAILED]: IAddressActionEventData;
32
+ [ELEMENTS_ACTIONS_EVENT.ADDRESS_FAILED]: IAddressFailedEventData;
29
33
  [ELEMENTS_ACTIONS_EVENT.PRODUCT_LOADED]: IProductLoadedEventData;
30
34
  [ELEMENTS_ACTIONS_EVENT.PRODUCT_QUANTITY_DECREASE]: IProductQuantityChangedEventData;
31
35
  [ELEMENTS_ACTIONS_EVENT.PRODUCT_QUANTITY_INCREASE]: IProductQuantityChangedEventData;
@@ -49,6 +53,7 @@ export interface IElementsActionsEventsMap {
49
53
  [ELEMENTS_ACTIONS_EVENT.CART_PROMO_CODE_FAILED]: ICartPromoCodeFailedEventData;
50
54
  [ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_SUCCESS]: ICartProductAddEventData;
51
55
  [ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_FAILED]: ICartProductAddFailedEventData;
56
+ [ELEMENTS_ACTIONS_EVENT.INTERNAL_CART_TO_CHECKOUT]: object;
52
57
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_OPENED]: boolean;
53
58
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CLOSED]: boolean;
54
59
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_LOADED]: ICheckoutLoadedEventData;
@@ -56,9 +61,9 @@ export interface IElementsActionsEventsMap {
56
61
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_IS_GIFT_TOGGLED]: ICheckoutToggleEventData;
57
62
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_SAME_AS_SHIPPING_TOGGLED]: ICheckoutToggleEventData;
58
63
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_MARKETING_PREFERENCES_TOGGLED]: ICheckoutMarketingPreferencesToggleEventData;
59
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]: boolean;
60
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_GIFT_INFORMATION_UPDATED]: boolean;
61
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_INFORMATION_UPDATED]: boolean;
64
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]: ICheckoutCustomerInformationUpdatedEventData;
65
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_GIFT_INFORMATION_UPDATED]: ICheckoutGiftInformationUpdatedEventData;
66
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_INFORMATION_UPDATED]: ICheckoutBillingInformationUpdatedEventData;
62
67
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_REMOVED]: ICheckoutItemRemovedEventData;
63
68
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_INCREASE]: ICheckoutItemQuantityChangedEventData;
64
69
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_DECREASE]: ICheckoutItemQuantityChangedEventData;
@@ -1,7 +1,7 @@
1
1
  import type { IElementsActionsEventsMap, IElementsFormsEventsMap, SpecificActionEvent, SpecificFormEvent } from '@/core/pubsub/interfaces/core.interface';
2
2
  export declare class PubSubService {
3
3
  private readonly logger;
4
- private clientReadyEvent;
4
+ private readonly clientConfig;
5
5
  constructor();
6
6
  private readonly eventPrefix;
7
7
  static getInstance(): PubSubService;
@@ -9,5 +9,4 @@ export declare class PubSubService {
9
9
  publishForm<K extends SpecificFormEvent>(eventType: K, data: IElementsFormsEventsMap[K]): void;
10
10
  private publishSpecific;
11
11
  private dispatchNativeEvents;
12
- private setupClientReadyBuffering;
13
12
  }
@@ -1,17 +1,21 @@
1
1
  import type { IClientConfigs } from '@/core/client/client-config.service';
2
- import type { LiquidCommerceElementsBuilderClientConstructor, LiquidCommerceElementsClientConstructor } from '@/interfaces/core.interface';
2
+ import type { LiquidCommerceElementsBuilderClientConstructor, LiquidCommerceElementsCheckoutClientConstructor, LiquidCommerceElementsClientConstructor } from '@/interfaces/client.interface';
3
+ type ClientConstructor = LiquidCommerceElementsClientConstructor | LiquidCommerceElementsBuilderClientConstructor | LiquidCommerceElementsCheckoutClientConstructor;
4
+ export type SDKContext = 'regular' | 'builder' | 'checkout';
3
5
  export declare class SingletonManager {
4
6
  private static clientConstructor;
5
- private static regularClientInstances;
6
- private static builderClientInstances;
7
+ private static contexts;
7
8
  private static currentContext;
9
+ private static initializationInProgress;
8
10
  private static getInstances;
9
11
  private constructor();
10
- static setContext({ isBuilder }: {
11
- isBuilder: boolean;
12
- }): void;
13
- static setClientConstructor(lceConstructor: LiquidCommerceElementsClientConstructor | LiquidCommerceElementsBuilderClientConstructor): void;
14
- static getClientConstructor(): LiquidCommerceElementsClientConstructor | LiquidCommerceElementsBuilderClientConstructor | null;
12
+ static setContext(context: SDKContext): void;
13
+ static finalizeInitialization(): void;
14
+ static hasContext(context: SDKContext): boolean;
15
+ static destroyContext(context: SDKContext): void;
16
+ static setClientConstructor(lceConstructor: ClientConstructor): void;
17
+ static getClientConstructor(): ClientConstructor | null;
15
18
  static getClassInstance<T>(className: string, instanceCreator: () => T): T;
16
19
  static getClient<T>(clientConfigs: IClientConfigs): Promise<T>;
17
20
  }
21
+ export {};
@@ -1,5 +1,4 @@
1
- import type { IElementsCartEvent } from 'utils/helper';
2
- import type { ICartFulfillment, ICartItemAttributes, ICartPromoCode, ICartRetailer } from '@/interfaces/api/cart.interface';
1
+ import type { ICartEvent, ICartFulfillment, ICartItemAttributes, ICartPromoCode, ICartRetailer } from '@/interfaces/api/cart.interface';
3
2
  export interface ICartItemStore {
4
3
  id: string;
5
4
  variantId: string;
@@ -48,7 +47,7 @@ export interface ICartStore {
48
47
  fulfillments: Record<string, ICartFulfillmentStore>;
49
48
  retailers: Record<string, ICartRetailerStore>;
50
49
  promoCode: ICartPromoCode | null;
51
- events: IElementsCartEvent[];
50
+ events: ICartEvent[];
52
51
  loading: boolean;
53
52
  error: string | null;
54
53
  rerender: boolean;