@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 @@
|
|
|
1
|
+
export * from './product.component';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
+
import type { IBaseProductEventData } from '@/core/pubsub';
|
|
3
|
+
import type { IProductDrawerContentConfig } from '@/core/store';
|
|
4
|
+
import { type FulfillmentType } from '@/enums';
|
|
5
|
+
import type { IProductData } from '@/interfaces/cloud';
|
|
6
|
+
import { type AddItemParams } from '@/modules/cart/cart.commands';
|
|
7
|
+
export declare class ProductCommands extends BaseCommand {
|
|
8
|
+
private readonly themeProvider;
|
|
9
|
+
private readonly uiCommands;
|
|
10
|
+
private readonly cartCommands;
|
|
11
|
+
constructor();
|
|
12
|
+
static getInstance(): ProductCommands;
|
|
13
|
+
createProductInstance(productId: string, firstTime?: boolean): Promise<void>;
|
|
14
|
+
loadMultipleProducts(productIds: string[]): Promise<void>;
|
|
15
|
+
loadProduct(productId: string, customProductData?: IProductData | null): Promise<void>;
|
|
16
|
+
selectSize(productId: string, sizeId: string): Promise<void>;
|
|
17
|
+
selectFulfillment(productId: string, selectedFulfillmentId: string): Promise<void>;
|
|
18
|
+
updateQuantity(productId: string, delta: number): Promise<void>;
|
|
19
|
+
changeFulfillmentType(productId: string, selectedFulfillmentType: FulfillmentType): Promise<void>;
|
|
20
|
+
removeProduct(productId: string): Promise<void>;
|
|
21
|
+
updateEngravingLines(productId: string, engravingLines: string[]): Promise<void>;
|
|
22
|
+
openProductDrawer(productId: string, contentType: IProductDrawerContentConfig['type'], data?: Record<string, any>): Promise<void>;
|
|
23
|
+
closeProductDrawer(productId: string): Promise<void>;
|
|
24
|
+
rerenderAllProducts(): Promise<void>;
|
|
25
|
+
addToCart(productId: string, params: AddItemParams): Promise<void>;
|
|
26
|
+
addPresaleToCart(productId: string, params: AddItemParams): Promise<void>;
|
|
27
|
+
productDataForEventFromStore(identifier: string): IBaseProductEventData;
|
|
28
|
+
private loadProductStoreUpdate;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface IProductComponentParams {
|
|
4
|
+
productId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class ProductComponent extends BaseComponent<IProductComponentParams, IProductComponent> {
|
|
7
|
+
private titleElement;
|
|
8
|
+
constructor();
|
|
9
|
+
private getProductId;
|
|
10
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
11
|
+
protected template(): HTMLElement;
|
|
12
|
+
disconnected(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IProductFulfillmentStore } from '@/core/store';
|
|
2
|
+
import { type FulfillmentType } from '@/enums';
|
|
3
|
+
import type { IProductSize, IRetailer } from '@/interfaces/cloud';
|
|
4
|
+
export declare const filterRetailersByFulfillmentType: ({ retailers, selectedSize, engravingLines, fulfillmentType, }: {
|
|
5
|
+
retailers: IRetailer[];
|
|
6
|
+
selectedSize: IProductSize | null;
|
|
7
|
+
engravingLines: string[];
|
|
8
|
+
fulfillmentType: FulfillmentType;
|
|
9
|
+
}) => IRetailer[];
|
|
10
|
+
export declare function fulfillmentAddress(address: IProductFulfillmentStore['retailerAddress'], selectedFulfillmentType: FulfillmentType): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IProductFulfillmentStore } from '@/core/store';
|
|
2
|
+
export interface RetailerStatus {
|
|
3
|
+
message: string | null;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
openTime?: string;
|
|
6
|
+
closeTime?: string;
|
|
7
|
+
isClosed: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function getRetailerOffHours(fulfillment: IProductFulfillmentStore): RetailerStatus;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentType } from '@/enums';
|
|
2
|
+
export declare const mainComponents: ComponentType[];
|
|
3
|
+
export declare const productGroupComponents: ComponentType[];
|
|
4
|
+
export declare const addressGroupComponents: ComponentType[];
|
|
5
|
+
export declare const cartGroupComponents: ComponentType[];
|
|
6
|
+
export declare const checkoutGroupComponents: ComponentType[];
|
|
7
|
+
export declare const isMainComponent: (componentType: ComponentType) => boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface ICSSVariableMap {
|
|
2
|
+
[key: string]: string | number;
|
|
3
|
+
}
|
|
4
|
+
export declare class CssVariableProcessorService {
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor();
|
|
7
|
+
private readonly opacityLevels;
|
|
8
|
+
extractVariablesFromTheme(themeObj: any, prefix: string): ICSSVariableMap;
|
|
9
|
+
extractVariablesFromPartialTheme(themeObj: any, prefix: string): ICSSVariableMap;
|
|
10
|
+
generateCSSVariablesString(variables: ICSSVariableMap): string;
|
|
11
|
+
updateCSSVariablesInStylesheet(stylesheet: CSSStyleSheet, variables: ICSSVariableMap): void;
|
|
12
|
+
private getValueByPath;
|
|
13
|
+
private hasValueAtPath;
|
|
14
|
+
private findOrCreateRule;
|
|
15
|
+
private isCSSValue;
|
|
16
|
+
private generateOpacityVariants;
|
|
17
|
+
private isColorVariable;
|
|
18
|
+
private addOpacityToHexColor;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IFontFamily } from '@/interfaces/configs';
|
|
2
|
+
export declare class FontManagerService {
|
|
3
|
+
private googleFontsUrl;
|
|
4
|
+
private defaultFontFamilies;
|
|
5
|
+
loadGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
|
|
6
|
+
updateGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
|
|
7
|
+
private injectGoogleFontsResourceHints;
|
|
8
|
+
private injectGoogleFontsLink;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StylesheetType } from '../constants/css-variable-mappings';
|
|
2
|
+
export type GeneratedStylesheet = CSSStyleSheet | string;
|
|
3
|
+
export declare class StylesheetGeneratorService {
|
|
4
|
+
private cssProcessor;
|
|
5
|
+
private styleSheets;
|
|
6
|
+
constructor();
|
|
7
|
+
getStylesheet(type: StylesheetType): GeneratedStylesheet | undefined;
|
|
8
|
+
generateSpecificStylesheet(type: StylesheetType, componentTheme: any): void;
|
|
9
|
+
private createStylesheet;
|
|
10
|
+
private isCSSStyleSheetSupported;
|
|
11
|
+
updateVariablesInStylesheet(type: StylesheetType, themeConfig: any, prefix: string): void;
|
|
12
|
+
private getStylesheetStyles;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getAddressStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './address.style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCartStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cart.style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCheckoutStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkout.style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getGlobalStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getImageCarouselStyle: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductRetailersStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDrawerStyles(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductLoadingStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPromoCodeTickerStyles(): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentType } from '@/enums';
|
|
2
|
+
import type { ConfigsKeyType, ConfigsType, IAllConfigs, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from '@/interfaces/configs';
|
|
3
|
+
import { type GeneratedStylesheet } from './services/stylesheet-generator.service';
|
|
4
|
+
export declare class ThemeProviderService {
|
|
5
|
+
private data;
|
|
6
|
+
private readonly logger;
|
|
7
|
+
private stylesheetGenerator;
|
|
8
|
+
private fontManager;
|
|
9
|
+
constructor();
|
|
10
|
+
static getInstance(): ThemeProviderService;
|
|
11
|
+
initialize(data: IAllConfigs): Promise<void>;
|
|
12
|
+
updateComponentGlobalConfigs(data: UpdateComponentGlobalConfigs): void;
|
|
13
|
+
updateProductComponent(data: UpdateProductComponent): void;
|
|
14
|
+
updateAddressComponent(data: UpdateAddressComponent): void;
|
|
15
|
+
updateCartComponent(data: UpdateCartComponent): void;
|
|
16
|
+
updateCheckoutComponent(data: UpdateCheckoutComponent): void;
|
|
17
|
+
getConfigs<T = any>(type: ConfigsKeyType): T;
|
|
18
|
+
getComponentConfig(componentType: ComponentType): ConfigsType | undefined;
|
|
19
|
+
getStylesheet(componentType: ComponentType): GeneratedStylesheet[];
|
|
20
|
+
private getBaseStylesheets;
|
|
21
|
+
private deepMerge;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { StorePaths } from '@/core/store';
|
|
3
|
+
export interface IAlertComponentParams {
|
|
4
|
+
errorStorePath: StorePaths;
|
|
5
|
+
fromEvents?: boolean;
|
|
6
|
+
showFirstEvent?: boolean;
|
|
7
|
+
autoHideDelay?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class AlertComponent extends BaseComponent<IAlertComponentParams, null> {
|
|
10
|
+
private hideTimeout;
|
|
11
|
+
private elements;
|
|
12
|
+
get hostClasses(): string[];
|
|
13
|
+
get hostAttributes(): Record<string, string>;
|
|
14
|
+
beforeSetupStoreWatchers(): void;
|
|
15
|
+
afterRender(): void;
|
|
16
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
17
|
+
private getErrorMessages;
|
|
18
|
+
private createErrorElement;
|
|
19
|
+
private scheduleHide;
|
|
20
|
+
private hideAllErrors;
|
|
21
|
+
private updateAlert;
|
|
22
|
+
protected template(): HTMLElement[];
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert.component';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
export interface IButtonsOpenCartComponentParams {
|
|
3
|
+
classes?: string[];
|
|
4
|
+
showItemsCount?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class ButtonsOpenCartComponent extends BaseComponent<IButtonsOpenCartComponentParams, null> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
protected template(): HTMLElement[];
|
|
9
|
+
protected afterRender(): void;
|
|
10
|
+
private setupCartBadge;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './buttons-open-cart.component';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export declare class DrawerComponent extends BaseComponent {
|
|
3
|
+
private isOpen;
|
|
4
|
+
private wrapperElement;
|
|
5
|
+
private drawerElement;
|
|
6
|
+
private backdropElement;
|
|
7
|
+
private contentContainer;
|
|
8
|
+
private currentContentType;
|
|
9
|
+
private isTransitioning;
|
|
10
|
+
private readonly boundHandleKeydown;
|
|
11
|
+
constructor();
|
|
12
|
+
disconnected(): void;
|
|
13
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean;
|
|
14
|
+
private openWithContent;
|
|
15
|
+
private animateContentSwap;
|
|
16
|
+
private open;
|
|
17
|
+
private close;
|
|
18
|
+
private cleanupCurrentContent;
|
|
19
|
+
private handleBackdropClick;
|
|
20
|
+
private handleKeydown;
|
|
21
|
+
private updateDrawerState;
|
|
22
|
+
protected template(): HTMLElement;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drawer.component';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
export interface IEngravingFormComponentParams {
|
|
3
|
+
identifier: string;
|
|
4
|
+
context: 'product' | 'cart' | 'checkout';
|
|
5
|
+
lines: string[];
|
|
6
|
+
maxLines: number;
|
|
7
|
+
maxCharsPerLine: number;
|
|
8
|
+
fee: number;
|
|
9
|
+
location?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class EngravingFormComponent extends BaseComponent<IEngravingFormComponentParams, null> {
|
|
12
|
+
private inputs;
|
|
13
|
+
private charCountElements;
|
|
14
|
+
get hostClasses(): string[];
|
|
15
|
+
protected afterRender(): void;
|
|
16
|
+
private handleClick;
|
|
17
|
+
private handleInput;
|
|
18
|
+
private updateCharacterCount;
|
|
19
|
+
private initializeCharacterCounts;
|
|
20
|
+
private closeDrawer;
|
|
21
|
+
private collectEngravingLines;
|
|
22
|
+
private handleSave;
|
|
23
|
+
protected template(): HTMLElement[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { StorePaths } from '@/core/store';
|
|
3
|
+
import type { IProductComponent } from '@/interfaces/configs';
|
|
4
|
+
export interface IEngravingViewComponentParams {
|
|
5
|
+
identifier: string;
|
|
6
|
+
context: 'product' | 'cart' | 'checkout';
|
|
7
|
+
watchStorePaths?: StorePaths[];
|
|
8
|
+
}
|
|
9
|
+
export declare class EngravingViewComponent extends BaseComponent<IEngravingViewComponentParams, IProductComponent> {
|
|
10
|
+
get hostClasses(): string[];
|
|
11
|
+
beforeSetupStoreWatchers(): void;
|
|
12
|
+
private createEngravingFormParams;
|
|
13
|
+
private openEngravingDrawer;
|
|
14
|
+
private createEngravingContainer;
|
|
15
|
+
private isEngravingAvailable;
|
|
16
|
+
private engravingFee;
|
|
17
|
+
private engravingLines;
|
|
18
|
+
protected template(): HTMLElement | HTMLElement[] | string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType } from '@/enums';
|
|
2
|
+
export declare function componentError({ componentType, message }: {
|
|
3
|
+
componentType: ComponentType;
|
|
4
|
+
message: string;
|
|
5
|
+
}): HTMLElement;
|
|
6
|
+
export declare function productionComponentError({ titleText, messageText }: {
|
|
7
|
+
titleText: string;
|
|
8
|
+
messageText: string;
|
|
9
|
+
}): HTMLElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './error-view';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface IBirthdateValidation {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
minYear?: number;
|
|
5
|
+
maxYear?: number;
|
|
6
|
+
minAge?: number;
|
|
7
|
+
maxAge?: number;
|
|
8
|
+
customValidator?: (date: string) => string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface IBirthdateInputComponentParams {
|
|
11
|
+
value?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
validation?: IBirthdateValidation;
|
|
14
|
+
onValidation?: (isValid: boolean, errors: string[]) => void;
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
label?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
storePath?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInputComponentParams, null> {
|
|
22
|
+
get hostClasses(): string[];
|
|
23
|
+
private monthInput;
|
|
24
|
+
private dayInput;
|
|
25
|
+
private yearInput;
|
|
26
|
+
private errorContainer;
|
|
27
|
+
constructor();
|
|
28
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
29
|
+
afterRender(): void;
|
|
30
|
+
private populateInitialValue;
|
|
31
|
+
private setupEventListeners;
|
|
32
|
+
private formatMonth;
|
|
33
|
+
private formatDay;
|
|
34
|
+
private formatYear;
|
|
35
|
+
private handleNavigation;
|
|
36
|
+
private handleChange;
|
|
37
|
+
private getFormattedValue;
|
|
38
|
+
private validateDate;
|
|
39
|
+
private calculateAge;
|
|
40
|
+
private validateInput;
|
|
41
|
+
private showErrors;
|
|
42
|
+
private clearErrors;
|
|
43
|
+
getValue(): string;
|
|
44
|
+
setValue(value: string): void;
|
|
45
|
+
validate(): boolean;
|
|
46
|
+
focus(): void;
|
|
47
|
+
disable(): void;
|
|
48
|
+
enable(): void;
|
|
49
|
+
clear(): void;
|
|
50
|
+
protected template(): HTMLElement[];
|
|
51
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface IInputValidation {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
pattern?: string;
|
|
7
|
+
customValidator?: (value: string) => string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface IInputComponentParams {
|
|
10
|
+
inputType: 'text' | 'number' | 'email' | 'tel' | 'date';
|
|
11
|
+
value?: string | null;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
hostClassName?: string;
|
|
15
|
+
validation?: IInputValidation;
|
|
16
|
+
onValidation?: (isValid: boolean, errors: string[]) => void;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
label?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
autocomplete?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
storePath?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class InputComponent extends BaseComponent<IInputComponentParams, null> {
|
|
25
|
+
get hostClasses(): string[];
|
|
26
|
+
private inputElement;
|
|
27
|
+
private errorContainer;
|
|
28
|
+
constructor();
|
|
29
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean;
|
|
30
|
+
private handlePhoneKeydown;
|
|
31
|
+
private formatPhoneNumber;
|
|
32
|
+
private formatDate;
|
|
33
|
+
private validateEmail;
|
|
34
|
+
private validateTel;
|
|
35
|
+
private validateDate;
|
|
36
|
+
private validateInput;
|
|
37
|
+
private showErrors;
|
|
38
|
+
private clearErrors;
|
|
39
|
+
getValue(): string;
|
|
40
|
+
setValue(value: string): void;
|
|
41
|
+
validate(): boolean;
|
|
42
|
+
focus(): void;
|
|
43
|
+
disable(): void;
|
|
44
|
+
enable(): void;
|
|
45
|
+
protected template(): HTMLElement[];
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lce-element.component';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentType } from '@/enums';
|
|
2
|
+
export declare class LceElementComponent extends HTMLElement {
|
|
3
|
+
private _initialized;
|
|
4
|
+
protected _container: ShadowRoot | null;
|
|
5
|
+
constructor();
|
|
6
|
+
initialize(contentType: ComponentType, contentElement: HTMLElement): void;
|
|
7
|
+
private applyBasicStyles;
|
|
8
|
+
private isCSSStyleSheetSupported;
|
|
9
|
+
private applyThemeStyles;
|
|
10
|
+
private createFallbackStylesheet;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './product-loading.component';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductComponent } from '@/interfaces/configs';
|
|
3
|
+
export declare class ProductLoadingComponent extends BaseComponent<null, IProductComponent> {
|
|
4
|
+
protected template(): HTMLElement;
|
|
5
|
+
private createImageSkeletons;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './powered-by.component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IElementsConfigurations } from '@/interfaces/configs';
|
|
3
|
+
export interface IPoweredByComponentParams {
|
|
4
|
+
context: 'checkout' | 'general';
|
|
5
|
+
}
|
|
6
|
+
export declare class PoweredByComponent extends BaseComponent<IPoweredByComponentParams, IElementsConfigurations> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
private createPoweredBySection;
|
|
9
|
+
private createDisclaimerSection;
|
|
10
|
+
private getDisclaimerConfig;
|
|
11
|
+
private createLink;
|
|
12
|
+
protected template(): HTMLElement[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promo-code-ticker.component';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
export interface IPromoCodeTickerParams {
|
|
3
|
+
context: 'cart' | 'checkout';
|
|
4
|
+
promoCode: string;
|
|
5
|
+
text: string[];
|
|
6
|
+
separator?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class PromoCodeTickerComponent extends BaseComponent<IPromoCodeTickerParams, null> {
|
|
9
|
+
get hostClasses(): string[];
|
|
10
|
+
private applyButton;
|
|
11
|
+
private promoCodeApplied;
|
|
12
|
+
beforeSetupStoreWatchers(): void;
|
|
13
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
14
|
+
private generateTextContent;
|
|
15
|
+
private handlePromoClick;
|
|
16
|
+
protected template(): HTMLElement[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IRetailerFulfillmentStore } from '@/core/store';
|
|
2
|
+
export declare const shouldShowMinimumPurchaseAlert: (fulfillment: IRetailerFulfillmentStore, isPack?: boolean) => boolean;
|
|
3
|
+
export declare const getMinimumPurchaseMessage: (fulfillment: IRetailerFulfillmentStore, isPack?: boolean) => {
|
|
4
|
+
message: string;
|
|
5
|
+
type: "warning" | "info";
|
|
6
|
+
};
|
|
7
|
+
export declare const getFeeDisplayText: (fulfillment: IRetailerFulfillmentStore, isPack?: boolean) => string;
|
|
8
|
+
export declare const hasUnmetMinimum: (fulfillment: IRetailerFulfillmentStore, isPack?: boolean) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
export interface IRetailerAlertParams {
|
|
3
|
+
message: string;
|
|
4
|
+
messageType: 'warning' | 'success' | 'info';
|
|
5
|
+
currentTotal?: number;
|
|
6
|
+
targetAmount?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IRetailerAlertConfig {
|
|
9
|
+
showIcon?: boolean;
|
|
10
|
+
alertType?: 'minimal' | 'detailed';
|
|
11
|
+
}
|
|
12
|
+
export declare class PurchaseMinAlertComponent extends BaseComponent<IRetailerAlertParams, IRetailerAlertConfig> {
|
|
13
|
+
get hostClasses(): string[];
|
|
14
|
+
private getIconElement;
|
|
15
|
+
protected template(): HTMLElement[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
+
import type { IDrawerContentConfig } from '@/core/store';
|
|
3
|
+
export declare class UICommands extends BaseCommand {
|
|
4
|
+
static getInstance(): UICommands;
|
|
5
|
+
openDrawer(contentType: IDrawerContentConfig['type'], data?: Record<string, any>): void;
|
|
6
|
+
closeDrawer(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './arrow-right.icon';
|
|
2
|
+
export * from './bag.icon';
|
|
3
|
+
export * from './checkbox.icon';
|
|
4
|
+
export * from './chevron-down.icon';
|
|
5
|
+
export * from './chevron-left.icon';
|
|
6
|
+
export * from './close.icon';
|
|
7
|
+
export * from './completed.icon';
|
|
8
|
+
export * from './error-info.icon';
|
|
9
|
+
export * from './icon.types';
|
|
10
|
+
export * from './info.icon';
|
|
11
|
+
export * from './loading-spinner.icon';
|
|
12
|
+
export * from './search.icon';
|
|
13
|
+
export * from './success.icon';
|
|
14
|
+
export * from './trash.icon';
|
|
15
|
+
export * from './warning.icon';
|