@liquidcommerce/elements-sdk 2.2.0-beta.7 → 2.2.0-beta.9
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/dist/index.esm.js +7522 -7458
- package/dist/types/core/google-tag-manager.service.d.ts +26 -2
- 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/modules/address/address.command.d.ts +0 -1
- package/dist/types/modules/checkout/checkout.commands.d.ts +1 -1
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +1 -1
- package/dist/types/modules/checkout/constant.d.ts +0 -1
- package/dist/types/static/icon/index.d.ts +0 -1
- package/dist/types/utils/format.d.ts +2 -1
- package/package.json +4 -4
- package/umd/elements.js +1 -1
- package/dist/types/static/icon/completed.icon.d.ts +0 -2
|
@@ -83,10 +83,34 @@ export declare class GoogleTagManagerService {
|
|
|
83
83
|
email?: string;
|
|
84
84
|
birth_date?: string;
|
|
85
85
|
customer_id?: string;
|
|
86
|
+
}, amounts?: {
|
|
87
|
+
subtotal?: number;
|
|
88
|
+
total_before_discounts?: number;
|
|
89
|
+
discounts?: number;
|
|
90
|
+
gift_cards?: number;
|
|
91
|
+
net_total?: number;
|
|
86
92
|
}): void;
|
|
87
93
|
addPaymentInfo(items: BaseItem[], paymentType?: string, coupon?: string): void;
|
|
88
|
-
addPaymentInfoWithoutItems(value: number, paymentType?: string, coupon?: string
|
|
89
|
-
|
|
94
|
+
addPaymentInfoWithoutItems(value: number, paymentType?: string, coupon?: string, amounts?: {
|
|
95
|
+
subtotal?: number;
|
|
96
|
+
total_before_discounts?: number;
|
|
97
|
+
discounts?: number;
|
|
98
|
+
gift_cards?: number;
|
|
99
|
+
net_total?: number;
|
|
100
|
+
}): void;
|
|
101
|
+
purchase(purchaseData: PurchaseData & {
|
|
102
|
+
subtotal?: number;
|
|
103
|
+
total_before_discounts?: number;
|
|
104
|
+
discounts?: number;
|
|
105
|
+
gift_cards?: number;
|
|
106
|
+
net_total?: number;
|
|
107
|
+
}): void;
|
|
108
|
+
promoCodeAttempt(code: string): void;
|
|
109
|
+
promoCodeApplied(code: string, discountAmount?: number): void;
|
|
110
|
+
promoCodeFailed(code: string, reason?: string): void;
|
|
111
|
+
giftCardAttempt(code: string): void;
|
|
112
|
+
giftCardApplied(code: string, appliedAmount?: number): void;
|
|
113
|
+
giftCardFailed(code: string, reason?: string): void;
|
|
90
114
|
increaseQuantity(item: BaseItem): void;
|
|
91
115
|
decreaseQuantity(item: BaseItem): void;
|
|
92
116
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAddressStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutStore, IProductSizeStore, IProductStore } from '@/core/store';
|
|
1
|
+
import type { IAddressStore, ICartPromoCodeStore, ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentStore, ICheckoutPromoCodeStore, ICheckoutReadyForSubmitStore, ICheckoutStore, ICheckoutStripeFormStatusStore, IProductSizeStore, IProductStore } from '@/core/store';
|
|
2
2
|
import type { ComponentType } from '@/enums';
|
|
3
3
|
import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
|
|
4
4
|
export interface IDrawerContentConfig {
|
|
@@ -23,7 +23,7 @@ export interface IPersistedStore {
|
|
|
23
23
|
p: string;
|
|
24
24
|
c: string;
|
|
25
25
|
}
|
|
26
|
-
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof
|
|
26
|
+
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customer.${keyof ICheckoutCustomerStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.payment.${keyof ICheckoutPaymentStore}` | `checkout.billing.${keyof ICheckoutBillingStore}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipientStore}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCodeStore}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.readyForSubmit.${keyof ICheckoutReadyForSubmitStore}` | `checkout.onDemandFulfillmentTipInfo.${string}` | `checkout.readyForSubmit.${string}` | `checkout.stripeFormStatus.${keyof ICheckoutStripeFormStatusStore}`;
|
|
27
27
|
interface MiddlewareContext {
|
|
28
28
|
action: string;
|
|
29
29
|
payload: any;
|
|
@@ -11,7 +11,6 @@ export declare class AddressCommands extends BaseCommand {
|
|
|
11
11
|
setSelectedAddress(addressData: IAddressData): Promise<void>;
|
|
12
12
|
setAddressManually(address: Omit<IAddress, 'id'>, coordinates: ICoords): Promise<void>;
|
|
13
13
|
clearSelectedAddress(): Promise<void>;
|
|
14
|
-
private shouldResetCartForAddressChange;
|
|
15
14
|
private persistSessionData;
|
|
16
15
|
getDetails(): IAddressData | null;
|
|
17
16
|
}
|
|
@@ -22,7 +22,7 @@ export declare class CheckoutCommands extends BaseCommand {
|
|
|
22
22
|
applyPromoCode(code: string): Promise<void>;
|
|
23
23
|
clearPromoCodeError(): Promise<void>;
|
|
24
24
|
removePromoCode(): Promise<void>;
|
|
25
|
-
applyGiftCard(code
|
|
25
|
+
applyGiftCard(code: string): Promise<void>;
|
|
26
26
|
clearGiftCardError(): Promise<void>;
|
|
27
27
|
removeGiftCard(code: string): Promise<void>;
|
|
28
28
|
updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
|
|
@@ -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;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "LiquidCommerce Elements SDK",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "LiquidCommerce Team",
|
|
6
|
-
"version": "2.2.0-beta.
|
|
6
|
+
"version": "2.2.0-beta.9",
|
|
7
7
|
"homepage": "https://docs.liquidcommerce.co/elements-sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
"@semantic-release/npm": "^12.0.2",
|
|
85
85
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
86
86
|
"@types/core-js": "^2.5.8",
|
|
87
|
-
"@types/node": "^24.
|
|
87
|
+
"@types/node": "^24.6.1",
|
|
88
88
|
"conventional-changelog-cli": "^5.0.0",
|
|
89
89
|
"husky": "^9.1.7",
|
|
90
90
|
"process": "^0.11.10",
|
|
91
|
-
"rollup": "^4.52.
|
|
91
|
+
"rollup": "^4.52.3",
|
|
92
92
|
"rollup-obfuscator": "^4.1.1",
|
|
93
93
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
94
94
|
"semantic-release": "^24.2.9",
|
|
95
95
|
"ts-node": "^10.9.2",
|
|
96
|
-
"typescript": "^5.9.
|
|
96
|
+
"typescript": "^5.9.3"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
99
|
"node": ">=20"
|