@liquidcommerce/elements-sdk 2.2.0-beta.4 → 2.2.0-beta.40
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/README.md +1715 -569
- package/dist/index.esm.js +11813 -9048
- package/dist/types/core/auth.service.d.ts +10 -4
- package/dist/types/core/base-component.service.d.ts +3 -0
- package/dist/types/core/circuit-breaker.service.d.ts +54 -0
- package/dist/types/core/client/client-action.service.d.ts +16 -13
- package/dist/types/core/client/client-config.service.d.ts +5 -3
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/debug-panel/debug-panel.service.d.ts +43 -0
- package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -0
- package/dist/types/core/fingerprint.service.d.ts +4 -9
- package/dist/types/core/google-tag-manager.service.d.ts +127 -2
- package/dist/types/core/logger/logger-factory.d.ts +3 -0
- package/dist/types/core/logger/logger.service.d.ts +8 -5
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -0
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +46 -6
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +2 -3
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +43 -6
- package/dist/types/core/pubsub/pubsub.service.d.ts +2 -1
- package/dist/types/core/singleton-manager.service.d.ts +3 -3
- package/dist/types/core/store/interfaces/cart.interface.d.ts +1 -1
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +0 -1
- package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
- package/dist/types/core/store/interfaces/product.interface.d.ts +18 -7
- package/dist/types/core/store/store.service.d.ts +2 -1
- package/dist/types/core/telemetry/telemetry.interface.d.ts +80 -0
- package/dist/types/core/telemetry/telemetry.service.d.ts +27 -0
- package/dist/types/elements-base-client.d.ts +49 -0
- package/dist/types/elements-builder-client.d.ts +2 -0
- package/dist/types/elements-client-helper.d.ts +3 -0
- package/dist/types/enums/core.enum.d.ts +0 -1
- package/dist/types/enums/debug.enum.d.ts +6 -0
- package/dist/types/enums/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.umd.d.ts +2 -2
- package/dist/types/interfaces/cloud/product.interface.d.ts +2 -0
- package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/product.interface.d.ts +2 -0
- package/dist/types/interfaces/core.interface.d.ts +34 -19
- package/dist/types/modules/address/address.command.d.ts +1 -3
- package/dist/types/modules/api-client/api-client.service.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +1 -1
- package/dist/types/modules/cart/cart.component.d.ts +1 -2
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +1 -0
- package/dist/types/modules/cart/components/cart-item.component.d.ts +2 -6
- package/dist/types/modules/cart/components/index.d.ts +2 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +3 -2
- package/dist/types/modules/checkout/checkout.component.d.ts +1 -2
- package/dist/types/modules/checkout/components/checkout-summary-section.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +1 -1
- package/dist/types/modules/checkout/components/summary/checkout-item-quantity.component.d.ts +0 -2
- package/dist/types/modules/checkout/components/summary/checkout-item.component.d.ts +2 -1
- package/dist/types/modules/checkout/components/summary/checkout-items.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/summary/checkout-place-order-button.component.d.ts +0 -1
- package/dist/types/modules/checkout/constant.d.ts +0 -1
- package/dist/types/modules/product/components/index.d.ts +1 -0
- package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-interactions.component.d.ts +4 -1
- package/dist/types/modules/product/components/product-price.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
- package/dist/types/modules/product/product.commands.d.ts +1 -1
- package/dist/types/modules/theme-provider/services/font-manager.service.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +13 -11
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +4 -9
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +0 -1
- package/dist/types/utils/format.d.ts +2 -1
- package/docs/ACTIONS.md +1300 -0
- package/docs/BROWSER_SUPPORT.md +279 -0
- package/docs/CONFIGURATION.md +740 -0
- package/docs/DOCUMENTATION_INDEX.md +311 -0
- package/docs/EVENTS.md +765 -0
- package/docs/PROXY.md +228 -0
- package/docs/THEMING.md +592 -0
- package/docs/TROUBLESHOOTING.md +793 -0
- package/package.json +18 -18
- package/umd/elements.js +1 -1
- package/dist/types/modules/product/constant.d.ts +0 -2
- package/dist/types/static/icon/completed.icon.d.ts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
2
|
import type { ICheckoutItemStore, ICheckoutStripeFormStatusStore } from '@/core/store';
|
|
3
|
-
import type { ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
|
|
3
|
+
import type { ICart, ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
|
|
4
4
|
import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
|
|
5
5
|
export declare function buildCheckoutItemStore(apiItem: ICheckoutItem, retailer: ICheckoutRetailer, fulfillment: ICheckoutFulfillment): ICheckoutItemStore;
|
|
6
6
|
export declare class CheckoutCommands extends BaseCommand {
|
|
@@ -13,6 +13,7 @@ export declare class CheckoutCommands extends BaseCommand {
|
|
|
13
13
|
partialLoadCheckout(params?: {
|
|
14
14
|
cartId?: string;
|
|
15
15
|
response?: ICheckoutPrepareResponse;
|
|
16
|
+
cartResponse?: ICart;
|
|
16
17
|
}): Promise<void>;
|
|
17
18
|
toggleIsGift(active?: boolean): Promise<void>;
|
|
18
19
|
toggleBillingSameAsShipping(active?: boolean): Promise<void>;
|
|
@@ -22,7 +23,7 @@ export declare class CheckoutCommands extends BaseCommand {
|
|
|
22
23
|
applyPromoCode(code: string): Promise<void>;
|
|
23
24
|
clearPromoCodeError(): Promise<void>;
|
|
24
25
|
removePromoCode(): Promise<void>;
|
|
25
|
-
applyGiftCard(code
|
|
26
|
+
applyGiftCard(code: string): Promise<void>;
|
|
26
27
|
clearGiftCardError(): Promise<void>;
|
|
27
28
|
removeGiftCard(code: string): Promise<void>;
|
|
28
29
|
updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponent
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
import type { ICheckoutComponent } from '@/interfaces/configs';
|
|
3
3
|
export interface ICheckoutComponentParams {
|
|
4
4
|
checkoutId: string;
|
|
@@ -6,6 +6,5 @@ export interface ICheckoutComponentParams {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
|
|
8
8
|
constructor();
|
|
9
|
-
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
10
9
|
protected template(): HTMLElement[];
|
|
11
10
|
}
|
|
@@ -6,6 +6,8 @@ export declare class CheckoutSummarySectionComponent extends BaseComponent<null,
|
|
|
6
6
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
7
7
|
private updateZeroAmountElement;
|
|
8
8
|
protected afterRender(): void;
|
|
9
|
+
private handleEmailToggle;
|
|
10
|
+
private handleSmsToggle;
|
|
9
11
|
private marketingOptInsContainer;
|
|
10
12
|
private hasOnDemandOrder;
|
|
11
13
|
protected template(): HTMLElement[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
import type { ICheckoutComponent } from '@/interfaces/configs';
|
|
3
3
|
export declare class CheckoutDeliveryInformationComponent extends BaseComponent<null, ICheckoutComponent> {
|
|
4
|
-
constructor();
|
|
5
4
|
get hostClasses(): string[];
|
|
5
|
+
constructor();
|
|
6
6
|
private hasOnDemandFulfillments;
|
|
7
7
|
private handleDeliveryInstructionsChange;
|
|
8
8
|
private handleFirstNameChange;
|
package/dist/types/modules/checkout/components/summary/checkout-item-quantity.component.d.ts
CHANGED
|
@@ -9,11 +9,9 @@ export declare class CheckoutItemQuantityComponent extends BaseComponent<IChecko
|
|
|
9
9
|
get hostClasses(): string[];
|
|
10
10
|
constructor();
|
|
11
11
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
12
|
-
private getCheckoutItemStore;
|
|
13
12
|
private getAvailableQuantity;
|
|
14
13
|
private calculateQuantityLimits;
|
|
15
14
|
private updateButtonStates;
|
|
16
15
|
private handleQuantityChange;
|
|
17
|
-
private createQuantityContainer;
|
|
18
16
|
protected template(): HTMLElement[];
|
|
19
17
|
}
|
|
@@ -6,7 +6,8 @@ export declare class CheckoutItemComponent extends BaseComponent<ICheckoutItemCo
|
|
|
6
6
|
private trashButton;
|
|
7
7
|
get hostClasses(): string[];
|
|
8
8
|
constructor();
|
|
9
|
-
|
|
9
|
+
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
10
|
+
private updateEngravingElement;
|
|
10
11
|
private setupMinimumPurchaseAlert;
|
|
11
12
|
private updateTrashButtonState;
|
|
12
13
|
private createLoadingOverlay;
|
|
@@ -10,6 +10,7 @@ export declare class CheckoutItemsComponent extends BaseComponent<null, ICheckou
|
|
|
10
10
|
private syncItemsWithStore;
|
|
11
11
|
private updateItemCount;
|
|
12
12
|
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
13
|
+
private handleToggle;
|
|
13
14
|
private setupToggler;
|
|
14
15
|
protected afterRender(): void;
|
|
15
16
|
protected template(): HTMLElement[];
|
package/dist/types/modules/checkout/components/summary/checkout-place-order-button.component.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export declare class CheckoutPlaceOrderButtonComponent extends BaseComponent<nul
|
|
|
16
16
|
private determineButtonState;
|
|
17
17
|
private applyButtonState;
|
|
18
18
|
private handlePlaceOrderClick;
|
|
19
|
-
private focusFirstInvalidField;
|
|
20
19
|
private showPaymentError;
|
|
21
20
|
private handleCheckoutReadyForSubmit;
|
|
22
21
|
protected template(): HTMLElement[];
|
|
@@ -9,6 +9,7 @@ export declare class ProductAddToCartSectionComponent extends BaseComponent<IAdd
|
|
|
9
9
|
private qtyDecreaseButton;
|
|
10
10
|
private quantityText;
|
|
11
11
|
get hostClasses(): string[];
|
|
12
|
+
get hostAttributes(): Record<string, string>;
|
|
12
13
|
constructor();
|
|
13
14
|
private getProductId;
|
|
14
15
|
private getAvailableQuantity;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { BaseComponent } from '@/core/base-component.service';
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
2
|
import type { IProductComponent } from '@/interfaces/configs';
|
|
3
3
|
export interface IProductInteractionsComponent {
|
|
4
4
|
productId: string;
|
|
5
5
|
}
|
|
6
6
|
export declare class ProductInteractionsComponent extends BaseComponent<IProductInteractionsComponent, IProductComponent> {
|
|
7
7
|
get hostClasses(): string[];
|
|
8
|
+
private addPersonalizationSpan;
|
|
9
|
+
constructor();
|
|
10
|
+
onStoreWatch(changedPaths: IOnStoreChanged[]): void;
|
|
8
11
|
private getProductId;
|
|
9
12
|
afterRender(): void;
|
|
10
13
|
private setupSizeButtonsEventListener;
|
|
@@ -5,6 +5,7 @@ export interface IProductPriceComponentParams {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class ProductPriceComponent extends BaseComponent<IProductPriceComponentParams, IProductComponent> {
|
|
7
7
|
get hostClasses(): string[];
|
|
8
|
+
get hostAttributes(): Record<string, string>;
|
|
8
9
|
constructor();
|
|
9
10
|
private getProductId;
|
|
10
11
|
protected template(): string;
|
|
@@ -6,6 +6,7 @@ export interface IProductRetailersComponent {
|
|
|
6
6
|
export declare class ProductRetailersComponent extends BaseComponent<IProductRetailersComponent, IProductComponent> {
|
|
7
7
|
get hostClasses(): string[];
|
|
8
8
|
constructor();
|
|
9
|
+
get hostAttributes(): Record<string, string>;
|
|
9
10
|
private getProductId;
|
|
10
11
|
protected template(): HTMLElement | HTMLElement[];
|
|
11
12
|
}
|
|
@@ -18,12 +18,12 @@ export declare class ProductCommands extends BaseCommand {
|
|
|
18
18
|
updateQuantity(productId: string, delta: number): Promise<void>;
|
|
19
19
|
changeFulfillmentType(productId: string, selectedFulfillmentType: FulfillmentType): Promise<void>;
|
|
20
20
|
removeProduct(productId: string): Promise<void>;
|
|
21
|
-
updateEngravingLines(productId: string, engravingLines: string[]): Promise<void>;
|
|
22
21
|
openProductDrawer(productId: string, contentType: IProductDrawerContentConfig['type'], data?: Record<string, any>): Promise<void>;
|
|
23
22
|
closeProductDrawer(productId: string): Promise<void>;
|
|
24
23
|
rerenderAllProducts(): Promise<void>;
|
|
25
24
|
addToCart(productId: string, params: AddItemParams): Promise<void>;
|
|
26
25
|
addPresaleToCart(productId: string, params: AddItemParams): Promise<void>;
|
|
27
26
|
productDataForEventFromStore(identifier: string): IBaseProductEventData;
|
|
27
|
+
private findFirstAvailableSize;
|
|
28
28
|
private loadProductStoreUpdate;
|
|
29
29
|
}
|
|
@@ -2,6 +2,7 @@ import type { IFontFamily } from '@/interfaces/configs';
|
|
|
2
2
|
export declare class FontManagerService {
|
|
3
3
|
private googleFontsUrl;
|
|
4
4
|
private defaultFontFamilies;
|
|
5
|
+
private readonly fontsLinkAttribute;
|
|
5
6
|
loadGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
|
|
6
7
|
updateGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
|
|
7
8
|
private injectGoogleFontsResourceHints;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
export interface IEngravingFormComponentParams {
|
|
3
3
|
identifier: string;
|
|
4
|
-
context: 'product' | 'cart'
|
|
4
|
+
context: 'product' | 'cart';
|
|
5
5
|
lines: string[];
|
|
6
6
|
maxLines: number;
|
|
7
7
|
maxCharsPerLine: number;
|
|
@@ -9,16 +9,18 @@ export interface IEngravingFormComponentParams {
|
|
|
9
9
|
location?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare class EngravingFormComponent extends BaseComponent<IEngravingFormComponentParams, null> {
|
|
12
|
-
private inputs;
|
|
13
|
-
private charCountElements;
|
|
14
12
|
get hostClasses(): string[];
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
|
|
21
|
-
private
|
|
22
|
-
private
|
|
13
|
+
private engravingLines;
|
|
14
|
+
private productPriceSpan;
|
|
15
|
+
private addToCartButton;
|
|
16
|
+
private fulfillmentId;
|
|
17
|
+
private partNumber;
|
|
18
|
+
beforeConnected(): void;
|
|
19
|
+
private calculateTotalPrice;
|
|
20
|
+
private productInformationSection;
|
|
21
|
+
private addToCartButtonText;
|
|
22
|
+
private retailersSection;
|
|
23
|
+
private engravingLinesSection;
|
|
24
|
+
private actionButtonsSection;
|
|
23
25
|
protected template(): HTMLElement[];
|
|
24
26
|
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
import type { StorePaths } from '@/core/store';
|
|
3
2
|
import type { IProductComponent } from '@/interfaces/configs';
|
|
4
3
|
export interface IEngravingViewComponentParams {
|
|
5
4
|
identifier: string;
|
|
6
|
-
context: '
|
|
7
|
-
watchStorePaths?: StorePaths[];
|
|
5
|
+
context: 'cart' | 'checkout';
|
|
8
6
|
}
|
|
9
7
|
export declare class EngravingViewComponent extends BaseComponent<IEngravingViewComponentParams, IProductComponent> {
|
|
10
8
|
get hostClasses(): string[];
|
|
11
|
-
|
|
12
|
-
private createEngravingFormParams;
|
|
13
|
-
private openEngravingDrawer;
|
|
14
|
-
private createEngravingContainer;
|
|
15
|
-
private isEngravingAvailable;
|
|
16
|
-
private engravingFee;
|
|
9
|
+
private engravingQuantityFee;
|
|
17
10
|
private engravingLines;
|
|
11
|
+
private handleEdit;
|
|
12
|
+
private handleRemove;
|
|
18
13
|
protected template(): HTMLElement | HTMLElement[] | string;
|
|
19
14
|
}
|
|
@@ -2,8 +2,10 @@ import type { ComponentType } from '@/enums';
|
|
|
2
2
|
export declare class LceElementComponent extends HTMLElement {
|
|
3
3
|
private _initialized;
|
|
4
4
|
protected _container: ShadowRoot | null;
|
|
5
|
+
private _wrappedComponentRerender;
|
|
5
6
|
constructor();
|
|
6
7
|
initialize(contentType: ComponentType, contentElement: HTMLElement): void;
|
|
8
|
+
rerender(context?: string): void;
|
|
7
9
|
private applyBasicStyles;
|
|
8
10
|
private isCSSStyleSheetSupported;
|
|
9
11
|
private applyThemeStyles;
|
|
@@ -4,7 +4,6 @@ export * from './checkbox.icon';
|
|
|
4
4
|
export * from './chevron-down.icon';
|
|
5
5
|
export * from './chevron-left.icon';
|
|
6
6
|
export * from './close.icon';
|
|
7
|
-
export * from './completed.icon';
|
|
8
7
|
export * from './error-info.icon';
|
|
9
8
|
export * from './icon.types';
|
|
10
9
|
export * from './info.icon';
|
|
@@ -16,7 +16,8 @@ export declare function buildFormattedAddressString(address: {
|
|
|
16
16
|
zip: string;
|
|
17
17
|
country?: string;
|
|
18
18
|
}): string;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function capitalizeFirstLetter(text: string): string;
|
|
20
|
+
export declare function splitCategoryPath(catPath?: string): {
|
|
20
21
|
category: string;
|
|
21
22
|
category2: string;
|
|
22
23
|
category3: string;
|