@liquidcommerce/elements-sdk 2.1.0-beta.49
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.
- package/LICENSE +24 -0
- package/README.md +1183 -0
- package/dist/index.esm.js +16834 -0
- package/dist/types/auto-initialize.d.ts +2 -0
- package/dist/types/constants/core.constant.d.ts +6 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/z-index.constant.d.ts +24 -0
- package/dist/types/core/auth.service.d.ts +29 -0
- package/dist/types/core/base-component.service.d.ts +93 -0
- package/dist/types/core/client/client-action.service.d.ts +70 -0
- package/dist/types/core/client/client-config.service.d.ts +47 -0
- package/dist/types/core/command/base-command.service.d.ts +17 -0
- package/dist/types/core/command/command.service.d.ts +16 -0
- package/dist/types/core/command/common-command.service.d.ts +5 -0
- package/dist/types/core/component-factory.service.d.ts +27 -0
- package/dist/types/core/fingerprint.service.d.ts +28 -0
- package/dist/types/core/google-tag-manager.service.d.ts +93 -0
- package/dist/types/core/logger/logger-factory.d.ts +8 -0
- package/dist/types/core/logger/logger.service.d.ts +17 -0
- package/dist/types/core/pubsub/index.d.ts +2 -0
- package/dist/types/core/pubsub/interfaces/address.interface.d.ts +16 -0
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +107 -0
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +84 -0
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +81 -0
- package/dist/types/core/pubsub/interfaces/index.d.ts +5 -0
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +91 -0
- package/dist/types/core/pubsub/pubsub.service.d.ts +12 -0
- package/dist/types/core/singleton-manager.service.d.ts +12 -0
- package/dist/types/core/store/index.d.ts +2 -0
- package/dist/types/core/store/interfaces/address.interface.d.ts +16 -0
- package/dist/types/core/store/interfaces/cart.interface.d.ts +94 -0
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +154 -0
- package/dist/types/core/store/interfaces/core.interface.d.ts +40 -0
- package/dist/types/core/store/interfaces/index.d.ts +5 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +81 -0
- package/dist/types/core/store/store.constant.d.ts +8 -0
- package/dist/types/core/store/store.service.d.ts +41 -0
- package/dist/types/core/utils.d.ts +27 -0
- package/dist/types/elements-client-helper.d.ts +1 -0
- package/dist/types/elements-client.d.ts +2 -0
- package/dist/types/enums/cloud.enum.d.ts +77 -0
- package/dist/types/enums/core.enum.d.ts +134 -0
- package/dist/types/enums/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.umd.d.ts +2 -0
- package/dist/types/interfaces/cloud/address.interface.d.ts +36 -0
- package/dist/types/interfaces/cloud/cart.interface.d.ts +132 -0
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +214 -0
- package/dist/types/interfaces/cloud/core.interface.d.ts +22 -0
- package/dist/types/interfaces/cloud/index.d.ts +6 -0
- package/dist/types/interfaces/cloud/product.interface.d.ts +156 -0
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +66 -0
- package/dist/types/interfaces/cloud/user.interface.d.ts +100 -0
- package/dist/types/interfaces/configs/address.interface.d.ts +8 -0
- package/dist/types/interfaces/configs/cart.interface.d.ts +15 -0
- package/dist/types/interfaces/configs/checkout.interface.d.ts +34 -0
- package/dist/types/interfaces/configs/configurations.interface.d.ts +13 -0
- package/dist/types/interfaces/configs/global.interface.d.ts +46 -0
- package/dist/types/interfaces/configs/index.d.ts +6 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +25 -0
- package/dist/types/interfaces/core.interface.d.ts +81 -0
- package/dist/types/modules/address/address-display.component.d.ts +13 -0
- package/dist/types/modules/address/address-input.component.d.ts +40 -0
- package/dist/types/modules/address/address.command.d.ts +15 -0
- package/dist/types/modules/address/address.component.d.ts +12 -0
- package/dist/types/modules/address/address.interface.d.ts +10 -0
- package/dist/types/modules/address/index.d.ts +4 -0
- package/dist/types/modules/api-client/api-client.interface.d.ts +21 -0
- package/dist/types/modules/api-client/api-client.service.d.ts +28 -0
- package/dist/types/modules/api-client/index.d.ts +2 -0
- package/dist/types/modules/cart/cart.commands.d.ts +36 -0
- package/dist/types/modules/cart/cart.commands.helper.d.ts +8 -0
- package/dist/types/modules/cart/cart.component.d.ts +11 -0
- package/dist/types/modules/cart/components/cart-body.component.d.ts +24 -0
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +21 -0
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +26 -0
- package/dist/types/modules/cart/components/cart-header.component.d.ts +6 -0
- package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +21 -0
- package/dist/types/modules/cart/components/cart-item.component.d.ts +13 -0
- package/dist/types/modules/cart/components/cart-promo-code.component.d.ts +17 -0
- package/dist/types/modules/cart/components/cart-retailer-subtotal.component.d.ts +10 -0
- package/dist/types/modules/cart/components/cart-retailer.component.d.ts +23 -0
- package/dist/types/modules/cart/components/index.d.ts +8 -0
- package/dist/types/modules/cart/index.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +50 -0
- package/dist/types/modules/checkout/checkout.commands.helper.d.ts +13 -0
- package/dist/types/modules/checkout/checkout.component.d.ts +11 -0
- package/dist/types/modules/checkout/components/checkout-header.component.d.ts +9 -0
- package/dist/types/modules/checkout/components/checkout-information-section.component.d.ts +12 -0
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +26 -0
- package/dist/types/modules/checkout/components/checkout-summary-section.component.d.ts +12 -0
- package/dist/types/modules/checkout/components/checkout.type.d.ts +4 -0
- package/dist/types/modules/checkout/components/index.d.ts +20 -0
- package/dist/types/modules/checkout/components/information/checkout-billing-form.component.d.ts +18 -0
- package/dist/types/modules/checkout/components/information/checkout-buyer-information-form.component.d.ts +12 -0
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +17 -0
- package/dist/types/modules/checkout/components/information/checkout-payment-form.component.d.ts +21 -0
- package/dist/types/modules/checkout/components/information/checkout-stripe-form.component.d.ts +52 -0
- package/dist/types/modules/checkout/components/summary/checkout-amounts.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/summary/checkout-completed.component.d.ts +12 -0
- package/dist/types/modules/checkout/components/summary/checkout-gift-cards.component.d.ts +14 -0
- package/dist/types/modules/checkout/components/summary/checkout-item-quantity.component.d.ts +19 -0
- package/dist/types/modules/checkout/components/summary/checkout-item.component.d.ts +21 -0
- package/dist/types/modules/checkout/components/summary/checkout-items.component.d.ts +16 -0
- package/dist/types/modules/checkout/components/summary/checkout-place-order-button.component.d.ts +23 -0
- package/dist/types/modules/checkout/components/summary/checkout-presale-expired.component.d.ts +16 -0
- package/dist/types/modules/checkout/components/summary/checkout-promo-code.component.d.ts +17 -0
- package/dist/types/modules/checkout/components/summary/checkout-tips.component.d.ts +19 -0
- package/dist/types/modules/checkout/components/summary/promo-pc-gc.component.d.ts +16 -0
- package/dist/types/modules/checkout/constant.d.ts +32 -0
- package/dist/types/modules/checkout/index.d.ts +1 -0
- package/dist/types/modules/product/components/components.d.ts +20 -0
- package/dist/types/modules/product/components/index.d.ts +13 -0
- package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +26 -0
- package/dist/types/modules/product/components/product-description.component.d.ts +9 -0
- package/dist/types/modules/product/components/product-drawer.component.d.ts +19 -0
- package/dist/types/modules/product/components/product-image-carousel.component.d.ts +36 -0
- package/dist/types/modules/product/components/product-interactions.component.d.ts +14 -0
- package/dist/types/modules/product/components/product-options.component.d.ts +12 -0
- package/dist/types/modules/product/components/product-price.component.d.ts +11 -0
- package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +32 -0
- package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +13 -0
- package/dist/types/modules/product/components/product-retailers-popup.component.d.ts +11 -0
- package/dist/types/modules/product/components/product-retailers.component.d.ts +11 -0
- package/dist/types/modules/product/constant.d.ts +2 -0
- package/dist/types/modules/product/index.d.ts +1 -0
- package/dist/types/modules/product/product.commands.d.ts +29 -0
- package/dist/types/modules/product/product.component.d.ts +13 -0
- package/dist/types/modules/product/utils/helpers.d.ts +10 -0
- package/dist/types/modules/product/utils/index.d.ts +2 -0
- package/dist/types/modules/product/utils/retailer-hours.d.ts +9 -0
- package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +7 -0
- package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +2 -0
- package/dist/types/modules/theme-provider/index.d.ts +2 -0
- package/dist/types/modules/theme-provider/services/css-variable-processor.service.d.ts +20 -0
- package/dist/types/modules/theme-provider/services/font-manager.service.d.ts +9 -0
- package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +13 -0
- package/dist/types/modules/theme-provider/styles/address/address.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/address/index.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/cart/cart.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/cart/index.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/checkout/checkout.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/global.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/product/image-carousel.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/product/index.d.ts +3 -0
- package/dist/types/modules/theme-provider/styles/product/product.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/product/retailers.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/ui/drawer.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/ui/index.d.ts +3 -0
- package/dist/types/modules/theme-provider/styles/ui/loading.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/styles/ui/promo-code-ticker.style.d.ts +1 -0
- package/dist/types/modules/theme-provider/theme-provider.service.d.ts +22 -0
- package/dist/types/modules/ui-components/alert/alert.component.d.ts +24 -0
- package/dist/types/modules/ui-components/alert/index.d.ts +1 -0
- package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +11 -0
- package/dist/types/modules/ui-components/buttons/index.d.ts +1 -0
- package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +23 -0
- package/dist/types/modules/ui-components/drawer/index.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +24 -0
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +19 -0
- package/dist/types/modules/ui-components/engraving/index.d.ts +2 -0
- package/dist/types/modules/ui-components/error-view/error-view.d.ts +9 -0
- package/dist/types/modules/ui-components/error-view/index.d.ts +1 -0
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +51 -0
- package/dist/types/modules/ui-components/input/index.d.ts +2 -0
- package/dist/types/modules/ui-components/input/input.component.d.ts +46 -0
- package/dist/types/modules/ui-components/lce-element/index.d.ts +1 -0
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +11 -0
- package/dist/types/modules/ui-components/loading/index.d.ts +1 -0
- package/dist/types/modules/ui-components/loading/product-loading.component.d.ts +6 -0
- package/dist/types/modules/ui-components/powered-by/index.d.ts +1 -0
- package/dist/types/modules/ui-components/powered-by/powered-by.component.d.ts +13 -0
- package/dist/types/modules/ui-components/promo-code-ticker/index.d.ts +1 -0
- package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +17 -0
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +8 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +2 -0
- package/dist/types/modules/ui-components/purchase-min-alert/purchase-min-alert.component.d.ts +16 -0
- package/dist/types/modules/ui-components/ui.commands.d.ts +7 -0
- package/dist/types/static/icon/arrow-right.icon.d.ts +2 -0
- package/dist/types/static/icon/bag.icon.d.ts +2 -0
- package/dist/types/static/icon/checkbox.icon.d.ts +2 -0
- package/dist/types/static/icon/chevron-down.icon.d.ts +2 -0
- package/dist/types/static/icon/chevron-left.icon.d.ts +2 -0
- package/dist/types/static/icon/close.icon.d.ts +2 -0
- package/dist/types/static/icon/completed.icon.d.ts +2 -0
- package/dist/types/static/icon/error-info.icon.d.ts +2 -0
- package/dist/types/static/icon/icon.types.d.ts +6 -0
- package/dist/types/static/icon/index.d.ts +15 -0
- package/dist/types/static/icon/info.icon.d.ts +2 -0
- package/dist/types/static/icon/loading-spinner.icon.d.ts +2 -0
- package/dist/types/static/icon/search.icon.d.ts +2 -0
- package/dist/types/static/icon/success.icon.d.ts +2 -0
- package/dist/types/static/icon/trash.icon.d.ts +2 -0
- package/dist/types/static/icon/warning.icon.d.ts +2 -0
- package/dist/types/utils/dom-polyfills.d.ts +10 -0
- package/dist/types/utils/format.d.ts +23 -0
- package/dist/types/utils/helper.d.ts +27 -0
- package/dist/types/utils/html-sanitizer.d.ts +2 -0
- package/package.json +110 -0
- package/umd/elements.js +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DeepPartial } from '@/interfaces/core.interface';
|
|
2
|
+
export type FulfillmentDisplayType = 'carousel' | 'popup';
|
|
3
|
+
export interface IProductLayout {
|
|
4
|
+
showImages: boolean;
|
|
5
|
+
showTitle: boolean;
|
|
6
|
+
showDescription: boolean;
|
|
7
|
+
showQuantityCounter: boolean;
|
|
8
|
+
showOffHours: boolean;
|
|
9
|
+
quantityCounterStyle: 'outlined' | 'ghost';
|
|
10
|
+
fulfillmentDisplay: FulfillmentDisplayType;
|
|
11
|
+
enableShippingFulfillment: boolean;
|
|
12
|
+
enableOnDemandFulfillment: boolean;
|
|
13
|
+
addToCartButtonText: string;
|
|
14
|
+
addToCartButtonShowTotalPrice: boolean;
|
|
15
|
+
buyNowButtonText: string;
|
|
16
|
+
preSaleButtonText: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IProductTheme {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
}
|
|
21
|
+
export interface IProductComponent {
|
|
22
|
+
theme: IProductTheme;
|
|
23
|
+
layout: IProductLayout;
|
|
24
|
+
}
|
|
25
|
+
export type UpdateProductComponent = DeepPartial<IProductComponent>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { IAddressActions, ICartActions, ICheckoutActions, IProductActions } from '@/core/client/client-action.service';
|
|
2
|
+
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
3
|
+
import type { ComponentType, ElementsEnv } from '@/enums';
|
|
4
|
+
import type { IAddressOptions } from '@/modules/address/address.interface';
|
|
5
|
+
import type { UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
|
|
6
|
+
export type DeepPartial<T> = {
|
|
7
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
8
|
+
};
|
|
9
|
+
export interface IElementsProxyConfig {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
headers?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export interface IClientCustomThemeConfig {
|
|
14
|
+
global?: UpdateComponentGlobalConfigs;
|
|
15
|
+
product?: UpdateProductComponent;
|
|
16
|
+
address?: UpdateAddressComponent;
|
|
17
|
+
cart?: UpdateCartComponent;
|
|
18
|
+
checkout?: UpdateCheckoutComponent;
|
|
19
|
+
}
|
|
20
|
+
export interface IPromoTicker {
|
|
21
|
+
promoCode: string;
|
|
22
|
+
text: string[];
|
|
23
|
+
separator?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ILiquidCommerceElementsConfig {
|
|
26
|
+
env?: ElementsEnv;
|
|
27
|
+
promoTicker?: IPromoTicker;
|
|
28
|
+
customTheme?: IClientCustomThemeConfig;
|
|
29
|
+
proxy?: IElementsProxyConfig;
|
|
30
|
+
isBuilder?: boolean;
|
|
31
|
+
enableDebugging?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface IInjectProductElement {
|
|
34
|
+
containerId: string;
|
|
35
|
+
identifier: string;
|
|
36
|
+
}
|
|
37
|
+
export interface IBuilderInjectElementParams {
|
|
38
|
+
type: ComponentType;
|
|
39
|
+
containerId: string;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
export interface ILiquidCommerceElementsBuilderMethod {
|
|
43
|
+
updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
|
|
44
|
+
updateProductComponent(configs: UpdateProductComponent): Promise<void>;
|
|
45
|
+
updateAddressComponent(configs: UpdateAddressComponent): void;
|
|
46
|
+
updateCartComponent(configs: UpdateCartComponent): void;
|
|
47
|
+
updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
|
|
48
|
+
injectElement(params: IBuilderInjectElementParams): Promise<void>;
|
|
49
|
+
injectProductElement(params: IInjectProductElement[]): Promise<void>;
|
|
50
|
+
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
|
|
51
|
+
injectCartElement(containerId: string): Promise<void>;
|
|
52
|
+
injectCheckoutElement(containerId: string): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export interface IProcessInjectElementParams {
|
|
55
|
+
type: ComponentType;
|
|
56
|
+
containerId: string;
|
|
57
|
+
identifier?: string;
|
|
58
|
+
options?: IAddressOptions;
|
|
59
|
+
}
|
|
60
|
+
export interface ILiquidCommerceElementsUIMethod {
|
|
61
|
+
cartButton(containerId: string, showItemsCount?: boolean): void;
|
|
62
|
+
floatingCartButton(showItemsCount?: boolean): void;
|
|
63
|
+
cartTotal(elementId: string): void;
|
|
64
|
+
cartItemsCount(elementId: string): void;
|
|
65
|
+
}
|
|
66
|
+
export interface ILiquidCommerceElementsActions {
|
|
67
|
+
product: IProductActions;
|
|
68
|
+
address: IAddressActions;
|
|
69
|
+
cart: ICartActions;
|
|
70
|
+
checkout: ICheckoutActions;
|
|
71
|
+
}
|
|
72
|
+
export interface ILiquidCommerceElementsClient {
|
|
73
|
+
builder: ILiquidCommerceElementsBuilderMethod;
|
|
74
|
+
injectProductElement(params: IInjectProductElement[]): Promise<void>;
|
|
75
|
+
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
|
|
76
|
+
injectCartElement(containerId: string): Promise<void>;
|
|
77
|
+
injectCheckoutElement(containerId: string): Promise<void>;
|
|
78
|
+
ui: ILiquidCommerceElementsUIMethod;
|
|
79
|
+
actions: ILiquidCommerceElementsActions;
|
|
80
|
+
}
|
|
81
|
+
export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IAddressComponent } from '@/interfaces/configs';
|
|
3
|
+
import type { IAddressOptions } from './address.interface';
|
|
4
|
+
export interface IAddressDisplayComponentParams {
|
|
5
|
+
productId?: string;
|
|
6
|
+
isIndependentComponent?: boolean;
|
|
7
|
+
options?: IAddressOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare class AddressDisplayComponent extends BaseComponent<IAddressDisplayComponentParams, IAddressComponent> {
|
|
10
|
+
get hostClasses(): string[];
|
|
11
|
+
constructor();
|
|
12
|
+
protected template(): HTMLElement[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IAddressComponent } from '@/interfaces/configs';
|
|
3
|
+
import type { IAddressOptions } from './address.interface';
|
|
4
|
+
export interface IAddressInputComponentParams {
|
|
5
|
+
productId?: string;
|
|
6
|
+
isIndependentComponent?: boolean;
|
|
7
|
+
options?: IAddressOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare class AddressInputComponent extends BaseComponent<IAddressInputComponentParams, IAddressComponent> {
|
|
10
|
+
private suggestions;
|
|
11
|
+
private error;
|
|
12
|
+
private selectedAddress;
|
|
13
|
+
private searchTimeout?;
|
|
14
|
+
private minSearchLength;
|
|
15
|
+
private inputElement;
|
|
16
|
+
private suggestionsContainer;
|
|
17
|
+
private errorContainer;
|
|
18
|
+
private inputContainer;
|
|
19
|
+
constructor();
|
|
20
|
+
get hostClasses(): string[];
|
|
21
|
+
private isIndependentComponent;
|
|
22
|
+
beforeConnected(): void;
|
|
23
|
+
private handleInputChange;
|
|
24
|
+
private closeDrawer;
|
|
25
|
+
private handleCancel;
|
|
26
|
+
private handleCheckAvailability;
|
|
27
|
+
private handleSuggestionClick;
|
|
28
|
+
private handleDocumentClick;
|
|
29
|
+
private searchAddresses;
|
|
30
|
+
private updateErrorDisplay;
|
|
31
|
+
private updateSuggestionsDisplay;
|
|
32
|
+
private showSuggestions;
|
|
33
|
+
private hideSuggestions;
|
|
34
|
+
private createElement;
|
|
35
|
+
private createErrorContainer;
|
|
36
|
+
private createCheckButton;
|
|
37
|
+
private createCancelButton;
|
|
38
|
+
protected template(): HTMLElement[];
|
|
39
|
+
disconnected(): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
+
import type { IAddress, IAddressAutocompleteResult, IAddressDetailsResult, ICoords } from '@/interfaces/cloud';
|
|
3
|
+
import type { IAddressData } from './address.interface';
|
|
4
|
+
export declare class AddressCommands extends BaseCommand {
|
|
5
|
+
private productCommands;
|
|
6
|
+
private cartCommands;
|
|
7
|
+
constructor();
|
|
8
|
+
static getInstance(): AddressCommands;
|
|
9
|
+
searchAddresses(query: string): Promise<IAddressAutocompleteResult[]>;
|
|
10
|
+
getAddressDetails(addressId: string): Promise<IAddressDetailsResult>;
|
|
11
|
+
setSelectedAddress(addressData: IAddressData): Promise<void>;
|
|
12
|
+
setAddressManually(address: Omit<IAddress, 'id'>, coordinates: ICoords): Promise<void>;
|
|
13
|
+
clearSelectedAddress(): void;
|
|
14
|
+
getDetails(): IAddressData | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IAddressComponent } from '@/interfaces/configs';
|
|
3
|
+
import type { IAddressOptions } from './address.interface';
|
|
4
|
+
interface IAddressComponentParams {
|
|
5
|
+
isIndependentComponent?: boolean;
|
|
6
|
+
options?: IAddressOptions;
|
|
7
|
+
}
|
|
8
|
+
export declare class AddressComponent extends BaseComponent<IAddressComponentParams, IAddressComponent> {
|
|
9
|
+
constructor();
|
|
10
|
+
protected template(): HTMLElement;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IAddress, ICoords } from '@/interfaces/cloud/address.interface';
|
|
2
|
+
export interface IAddressOptions {
|
|
3
|
+
showLabel?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IAddressData {
|
|
6
|
+
id: string;
|
|
7
|
+
formattedAddress: string;
|
|
8
|
+
address: Omit<IAddress, 'id'>;
|
|
9
|
+
coordinates: ICoords;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface IAuth {
|
|
2
|
+
token: string;
|
|
3
|
+
exp: number;
|
|
4
|
+
type: 'ACCESS_TOKEN';
|
|
5
|
+
}
|
|
6
|
+
export interface IResponseMetadata {
|
|
7
|
+
languages: string[];
|
|
8
|
+
timestamp: number;
|
|
9
|
+
timezone: string;
|
|
10
|
+
requestId: string;
|
|
11
|
+
path: string;
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
export interface IApiResponseBase {
|
|
15
|
+
statusCode: number;
|
|
16
|
+
message: string;
|
|
17
|
+
metadata: IResponseMetadata;
|
|
18
|
+
}
|
|
19
|
+
export type IApiResponseWithData<T> = IApiResponseBase & {
|
|
20
|
+
data: T;
|
|
21
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AuthService } from '@/core/auth.service';
|
|
2
|
+
import type { IPersistedStore } from '@/core/store/interfaces';
|
|
3
|
+
import type { IAddressAutocompleteResult, IAddressDetailsResult, ICart, ICartUpdateParams, ICheckoutCompleteParams, ICheckoutCompleteResponse, ICheckoutPrepareParams, ICheckoutPrepareResponse, ILiquidPaymentToken, ILoc, IProductData } from '@/interfaces/cloud';
|
|
4
|
+
import type { IUserPaymentSession, IUserSession } from '@/interfaces/cloud/user.interface';
|
|
5
|
+
import type { IAllConfigs } from '@/interfaces/configs';
|
|
6
|
+
export declare class ApiClientService {
|
|
7
|
+
private client;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor();
|
|
10
|
+
static getInstance(): ApiClientService;
|
|
11
|
+
setClient(client: AuthService): Promise<void>;
|
|
12
|
+
getAllConfigs(): Promise<IAllConfigs>;
|
|
13
|
+
setPersistedStore(userDeviceId: string, data: IPersistedStore): Promise<void>;
|
|
14
|
+
getPersistedStore(userDeviceId: string): Promise<IPersistedStore | null>;
|
|
15
|
+
getProductsData(identifier: string[], location?: ILoc): Promise<IProductData | null>;
|
|
16
|
+
getCartData(id: string | null): Promise<ICart>;
|
|
17
|
+
updateCart(params: ICartUpdateParams & {
|
|
18
|
+
loc?: ILoc;
|
|
19
|
+
}): Promise<ICart>;
|
|
20
|
+
getAddressSuggestions(query: string): Promise<IAddressAutocompleteResult[]>;
|
|
21
|
+
getAddressDetails(id: string): Promise<IAddressDetailsResult>;
|
|
22
|
+
prepareCheckout(params: ICheckoutPrepareParams): Promise<ICheckoutPrepareResponse>;
|
|
23
|
+
getPaymentSession(params: IUserPaymentSession): Promise<IUserSession>;
|
|
24
|
+
confirmPaymentSession(confirmationTokenId: string, setupIntentId: string): Promise<ILiquidPaymentToken>;
|
|
25
|
+
checkoutComplete(params: ICheckoutCompleteParams): Promise<ICheckoutCompleteResponse['order']>;
|
|
26
|
+
private validResponseData;
|
|
27
|
+
private ensureClientInitialized;
|
|
28
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
+
import type { IBaseCartEventData } from '@/core/pubsub';
|
|
3
|
+
export interface AddItemParams {
|
|
4
|
+
upc: string;
|
|
5
|
+
fulfillmentId: string;
|
|
6
|
+
partNumber: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
engravingLines?: string[];
|
|
9
|
+
identifier: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class CartCommands extends BaseCommand {
|
|
12
|
+
private readonly uiCommands;
|
|
13
|
+
private readonly checkoutCommands;
|
|
14
|
+
private readonly pubSubService;
|
|
15
|
+
private readonly commonCommands;
|
|
16
|
+
constructor();
|
|
17
|
+
static getInstance(): CartCommands;
|
|
18
|
+
updateItemQuantity(itemId: string, delta: number): Promise<void>;
|
|
19
|
+
removeItem(itemId: string, isNotStandAlone?: boolean): Promise<void>;
|
|
20
|
+
updateItemEngraving(productItemId: string, engravingLines: string[]): Promise<void>;
|
|
21
|
+
addItem(params: AddItemParams): Promise<void>;
|
|
22
|
+
addPresaleItem(params: AddItemParams): Promise<void>;
|
|
23
|
+
handleGoToCheckout(): Promise<void>;
|
|
24
|
+
applyPromoCode(promoCode: string): Promise<void>;
|
|
25
|
+
removePromoCode(): Promise<void>;
|
|
26
|
+
clearPromoCodeError(): Promise<void>;
|
|
27
|
+
rerenderCart(): void;
|
|
28
|
+
resetCart(): Promise<void>;
|
|
29
|
+
getDetails(): IBaseCartEventData;
|
|
30
|
+
private buildItemUpdate;
|
|
31
|
+
private syncItemsFromApiResponse;
|
|
32
|
+
private syncCartMetaFromApiResponse;
|
|
33
|
+
private updateFulfillment;
|
|
34
|
+
private addNewFulfillmentAndRetailer;
|
|
35
|
+
private cleanupAfterItemRemoval;
|
|
36
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IBaseCartEventData } from '@/core/pubsub';
|
|
2
|
+
import type { IAddressStore, ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store';
|
|
3
|
+
import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
|
|
4
|
+
export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
|
|
5
|
+
export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
|
|
6
|
+
export declare function buildRetailerStore(retailer: ICartRetailer): IRetailerStore;
|
|
7
|
+
export declare function buildFulfillmentStore(fulfillment: IRetailerFulfillments, retailer: ICartRetailer): IRetailerFulfillmentStore;
|
|
8
|
+
export declare function cartDataForEventFromStore(cartStore: ICartStore, addressStore: IAddressStore): IBaseCartEventData;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { ICartComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface ICartComponentParams {
|
|
4
|
+
isIndependentComponent: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class CartComponent extends BaseComponent<ICartComponentParams, ICartComponent> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
10
|
+
protected template(): HTMLElement[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export declare class CartBodyComponent extends BaseComponent<null, null> {
|
|
3
|
+
get hostClasses(): string[];
|
|
4
|
+
constructor();
|
|
5
|
+
private createEmptyCartElement;
|
|
6
|
+
private createLoadingElement;
|
|
7
|
+
private loadingTemplate;
|
|
8
|
+
private createRetailerElement;
|
|
9
|
+
private getRetailerElementById;
|
|
10
|
+
private getLoadingElement;
|
|
11
|
+
private showEmptyCartState;
|
|
12
|
+
private addLoadingOverlay;
|
|
13
|
+
private removeLoadingOverlay;
|
|
14
|
+
private setupEmptyCartListeners;
|
|
15
|
+
private addRetailerElement;
|
|
16
|
+
private removeRetailerElement;
|
|
17
|
+
private updateRetailerElement;
|
|
18
|
+
private hasRetailerDataChanged;
|
|
19
|
+
private getValidRetailers;
|
|
20
|
+
private getValidRetailerIds;
|
|
21
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
22
|
+
protected afterRender(): void;
|
|
23
|
+
protected template(): HTMLElement[] | HTMLElement;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { ICartComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface ICartFooterComponentParams {
|
|
4
|
+
itemId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class CartFooterComponent extends BaseComponent<ICartFooterComponentParams, ICartComponent> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
private subtotalText;
|
|
9
|
+
private subtotalPrice;
|
|
10
|
+
private checkoutButton;
|
|
11
|
+
private loadingIndicator;
|
|
12
|
+
constructor();
|
|
13
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
14
|
+
afterRender(): void;
|
|
15
|
+
private isAnythingLoading;
|
|
16
|
+
private hasUnmetMinimum;
|
|
17
|
+
private shouldDisableCheckout;
|
|
18
|
+
private updateCheckoutButtonState;
|
|
19
|
+
private updateSubtotalItemsCount;
|
|
20
|
+
protected template(): HTMLElement[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface ICartFulfillmentParams {
|
|
3
|
+
fulfillmentId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CartFulfillmentComponent extends BaseComponent<ICartFulfillmentParams, null> {
|
|
6
|
+
get hostClasses(): string[];
|
|
7
|
+
constructor();
|
|
8
|
+
private getFulfillmentId;
|
|
9
|
+
private getProductStore;
|
|
10
|
+
private addItemElement;
|
|
11
|
+
private handleItemsUpdate;
|
|
12
|
+
private setupItemElements;
|
|
13
|
+
private setupMinimumPurchaseAlert;
|
|
14
|
+
private createLoadingOverlay;
|
|
15
|
+
private hasLoadingOverlay;
|
|
16
|
+
private showLoadingOverlay;
|
|
17
|
+
private hideLoadingOverlay;
|
|
18
|
+
private isAnyItemUpdating;
|
|
19
|
+
private checkAndUpdateLoadingState;
|
|
20
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
21
|
+
private hasFulfillmentFeesChanged;
|
|
22
|
+
private hasFulfillmentDataChanged;
|
|
23
|
+
protected afterRender(): void;
|
|
24
|
+
protected disconnected(): void;
|
|
25
|
+
protected template(): HTMLElement;
|
|
26
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { ICartComponent } from '@/interfaces/configs';
|
|
3
|
+
export declare class CartHeaderComponent extends BaseComponent<null, ICartComponent> {
|
|
4
|
+
get hostClasses(): string[];
|
|
5
|
+
protected template(): HTMLElement[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { ICartComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface ICartItemQuantityPriceComponentParams {
|
|
4
|
+
itemId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class CartItemQuantityPriceComponent extends BaseComponent<ICartItemQuantityPriceComponentParams, ICartComponent> {
|
|
7
|
+
private qtyIncreaseButton;
|
|
8
|
+
private qtyDecreaseButton;
|
|
9
|
+
private quantitySpan;
|
|
10
|
+
get hostClasses(): string[];
|
|
11
|
+
constructor();
|
|
12
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
13
|
+
private getItemStore;
|
|
14
|
+
private calculateQuantityLimits;
|
|
15
|
+
private getAvailableQuantity;
|
|
16
|
+
private updateButtonStates;
|
|
17
|
+
private handleQuantityChange;
|
|
18
|
+
private createQuantityContainer;
|
|
19
|
+
private createPriceContainer;
|
|
20
|
+
protected template(): HTMLElement[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface ICartItemComponentParams {
|
|
3
|
+
itemId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CartItemComponent extends BaseComponent<ICartItemComponentParams, null> {
|
|
6
|
+
get hostClasses(): string[];
|
|
7
|
+
get hostAttributes(): Record<string, string>;
|
|
8
|
+
constructor();
|
|
9
|
+
private getItemId;
|
|
10
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
11
|
+
private updateShippingTime;
|
|
12
|
+
protected template(): HTMLElement[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export declare class CartPromoCodeComponent extends BaseComponent<null, null> {
|
|
3
|
+
private isApplying;
|
|
4
|
+
private promoInput;
|
|
5
|
+
private applyButton;
|
|
6
|
+
private promoCodePill;
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
10
|
+
private createAppliedContainer;
|
|
11
|
+
private createInputContainer;
|
|
12
|
+
private updateApplyButtonState;
|
|
13
|
+
private createPromoInput;
|
|
14
|
+
private createApplyButton;
|
|
15
|
+
protected template(): HTMLElement;
|
|
16
|
+
disconnected(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
export interface ICartRetailerSubtotalComponentParams {
|
|
3
|
+
retailerId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CartRetailerSubtotalComponent extends BaseComponent<ICartRetailerSubtotalComponentParams, null> {
|
|
6
|
+
get hostClasses(): string[];
|
|
7
|
+
constructor();
|
|
8
|
+
private getRetailerItemCount;
|
|
9
|
+
protected template(): HTMLElement[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface ICartRetailerParams {
|
|
3
|
+
retailerId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CartRetailerComponent extends BaseComponent<ICartRetailerParams, null> {
|
|
6
|
+
constructor();
|
|
7
|
+
private getRetailerId;
|
|
8
|
+
private createFulfillmentElement;
|
|
9
|
+
private getFulfillmentElementById;
|
|
10
|
+
private getFulfillmentContainer;
|
|
11
|
+
private getFulfillmentInsertionPoint;
|
|
12
|
+
private addFulfillmentElement;
|
|
13
|
+
private removeFulfillmentElement;
|
|
14
|
+
private handleFulfillmentsUpdate;
|
|
15
|
+
private setupFulfillmentElements;
|
|
16
|
+
private setupSubtotalElement;
|
|
17
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
18
|
+
afterRender(): void;
|
|
19
|
+
private setupSectionToggle;
|
|
20
|
+
protected beforeAutoDestroy(): void;
|
|
21
|
+
protected onAutoDestroy(): void;
|
|
22
|
+
protected template(): HTMLElement;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './cart-body.component';
|
|
2
|
+
export * from './cart-footer.component';
|
|
3
|
+
export * from './cart-header.component';
|
|
4
|
+
export * from './cart-item.component';
|
|
5
|
+
export * from './cart-item-quantity-price.component';
|
|
6
|
+
export * from './cart-promo-code.component';
|
|
7
|
+
export * from './cart-retailer.component';
|
|
8
|
+
export * from './cart-retailer-subtotal.component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cart.component';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
+
import type { ICheckoutItemStore, ICheckoutStripeFormStatusStore } from '@/core/store';
|
|
3
|
+
import type { ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
|
|
4
|
+
import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
|
|
5
|
+
export declare function buildCheckoutItemStore(apiItem: ICheckoutItem, retailer: ICheckoutRetailer, fulfillment: ICheckoutFulfillment): ICheckoutItemStore;
|
|
6
|
+
export declare class CheckoutCommands extends BaseCommand {
|
|
7
|
+
private readonly uiCommands;
|
|
8
|
+
private readonly themeProvider;
|
|
9
|
+
private readonly commonCommands;
|
|
10
|
+
constructor();
|
|
11
|
+
static getInstance(): CheckoutCommands;
|
|
12
|
+
loadCheckout(cartIdParam?: string): Promise<void>;
|
|
13
|
+
partialLoadCheckout(params?: {
|
|
14
|
+
cartId?: string;
|
|
15
|
+
response?: ICheckoutPrepareResponse;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
toggleIsGift(active?: boolean): Promise<void>;
|
|
18
|
+
toggleBillingSameAsShipping(active?: boolean): Promise<void>;
|
|
19
|
+
toggleMarketingPreferences(fieldName: 'canEmail' | 'canSms', active?: boolean): void;
|
|
20
|
+
getPaymentSession(): Promise<void>;
|
|
21
|
+
confirmPaymentSession(confirmationTokenId: string, setupIntentId: string): Promise<void>;
|
|
22
|
+
applyPromoCode(code: string): Promise<void>;
|
|
23
|
+
clearPromoCodeError(): Promise<void>;
|
|
24
|
+
removePromoCode(): Promise<void>;
|
|
25
|
+
applyGiftCard(code?: string): Promise<void>;
|
|
26
|
+
clearGiftCardError(): Promise<void>;
|
|
27
|
+
removeGiftCard(code: string): Promise<void>;
|
|
28
|
+
updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
|
|
29
|
+
updateBillingInfo(fieldName: BillingFieldName, fieldValue: string): void;
|
|
30
|
+
updateGiftInfo(fieldName: GiftFieldName, fieldValue: string): void;
|
|
31
|
+
private triggerAddShippingInfoEvent;
|
|
32
|
+
private validateAndUpdateFormStatus;
|
|
33
|
+
checkoutComplete(): Promise<void>;
|
|
34
|
+
startPreparingCheckoutSubmit(): Promise<void>;
|
|
35
|
+
openPresaleExpiredDrawer(): void;
|
|
36
|
+
rerenderCheckout(): void;
|
|
37
|
+
focusFirstInvalidField(): Promise<void>;
|
|
38
|
+
private buildItemUpdate;
|
|
39
|
+
updateCheckoutItemQuantity(itemId: string, delta: number): Promise<void>;
|
|
40
|
+
removeItemEngraving(productItemId: string): Promise<void>;
|
|
41
|
+
removeItem(itemId: string, isNotStandAlone?: boolean): Promise<void>;
|
|
42
|
+
updateTips(percentage: number): Promise<void>;
|
|
43
|
+
updateFulfillmentTip(fulfillmentId: string, tipAmount: number): Promise<void>;
|
|
44
|
+
removeFulfillmentTip(fulfillmentId: string): Promise<void>;
|
|
45
|
+
private updateStoreFromCheckoutResponse;
|
|
46
|
+
updateStripeFormStatus(status: Partial<ICheckoutStripeFormStatusStore>): Promise<void>;
|
|
47
|
+
removeCheckoutError(): Promise<void>;
|
|
48
|
+
updateDeliveryInstructions(instructions: string): Promise<void>;
|
|
49
|
+
private dataForCheckoutPrepare;
|
|
50
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore } from '@/core/store';
|
|
2
|
+
export declare function validateCustomerInfo(customer: ICheckoutCustomerStore): {
|
|
3
|
+
isValid: boolean;
|
|
4
|
+
invalidFields: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare function validateGiftRecipientInfo(giftInfo: ICheckoutGiftRecipientStore): {
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
invalidFields: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare function validateBillingInfo(billingInfo: ICheckoutBillingStore | null): {
|
|
11
|
+
isValid: boolean;
|
|
12
|
+
invalidFields: string[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { ICheckoutComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface ICheckoutComponentParams {
|
|
4
|
+
checkoutId: string;
|
|
5
|
+
isIndependentComponent: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
|
|
8
|
+
constructor();
|
|
9
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
10
|
+
protected template(): HTMLElement[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
export interface ICheckoutHeaderParams {
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
onBackToCart?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class CheckoutHeaderComponent extends BaseComponent<ICheckoutHeaderParams> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
protected template(): HTMLElement[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { ICheckoutComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface ICheckoutInformationSectionComponentParams {
|
|
4
|
+
isIndependentComponent: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class CheckoutInformationSectionComponent extends BaseComponent<ICheckoutInformationSectionComponentParams, ICheckoutComponent> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
10
|
+
private handleBuyerInformationVisibility;
|
|
11
|
+
protected template(): HTMLElement[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export declare class CheckoutPresaleCountdownComponent extends BaseComponent<null> {
|
|
3
|
+
private countdownInterval;
|
|
4
|
+
private expiresAt;
|
|
5
|
+
private totalDuration;
|
|
6
|
+
private rootElement;
|
|
7
|
+
private scrollHandler;
|
|
8
|
+
private scrollContainer;
|
|
9
|
+
private isCurrentlyScrolled;
|
|
10
|
+
private isUnderOneMinute;
|
|
11
|
+
get hostClasses(): string[];
|
|
12
|
+
constructor();
|
|
13
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean;
|
|
14
|
+
protected afterRender(): void;
|
|
15
|
+
protected disconnected(): void;
|
|
16
|
+
private setupDrawerScrollDetection;
|
|
17
|
+
private isScrollable;
|
|
18
|
+
private cleanupScrollListener;
|
|
19
|
+
private updateExpiresAt;
|
|
20
|
+
private startCountdown;
|
|
21
|
+
private stopCountdown;
|
|
22
|
+
private updateCountdown;
|
|
23
|
+
private formatTime;
|
|
24
|
+
private handleExpire;
|
|
25
|
+
protected template(): HTMLElement;
|
|
26
|
+
}
|