@liquidcommerce/elements-sdk 2.6.0-beta.4 → 2.6.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 +156 -2500
- package/dist/index.checkout.esm.js +16087 -0
- package/dist/index.esm.js +16301 -14189
- package/dist/types/auto-initialize/checkout.d.ts +2 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +22 -0
- package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +11 -1
- package/dist/types/clients/checkout.d.ts +13 -0
- package/dist/types/constants/core.constant.d.ts +5 -3
- package/dist/types/core/api/api-client.service.d.ts +10 -12
- package/dist/types/core/api/auth-client.service.d.ts +31 -9
- package/dist/types/core/api/http-client.service.d.ts +0 -1
- package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
- package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
- package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
- package/dist/types/core/client/actions/client-checkout-action.service.d.ts +50 -0
- package/dist/types/core/client/actions/client-product-action.service.d.ts +12 -0
- package/dist/types/core/client/client-action.service.d.ts +6 -70
- package/dist/types/core/client/client-config.service.d.ts +3 -2
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +4 -1
- package/dist/types/core/logger/logger.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
- package/dist/types/core/store/interfaces/core.interface.d.ts +18 -3
- package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +45 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +3 -1
- package/dist/types/core/store/store.constant.d.ts +4 -0
- package/dist/types/enums/core.enum.d.ts +38 -1
- package/dist/types/enums/index.d.ts +0 -1
- package/dist/types/index.checkout.d.ts +7 -0
- package/dist/types/index.checkout.umd.d.ts +4 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
- package/dist/types/interfaces/api/checkout.interface.d.ts +217 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
- package/dist/types/interfaces/api/product.interface.d.ts +5 -7
- package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -0
- package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
- package/dist/types/interfaces/configs/index.d.ts +1 -0
- package/dist/types/interfaces/configs/product-list.interface.d.ts +28 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
- package/dist/types/interfaces/core.interface.d.ts +34 -6
- package/dist/types/modules/address/address-input.component.d.ts +11 -0
- package/dist/types/modules/address/address.command.d.ts +1 -0
- package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +4 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +22 -9
- package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/constant.d.ts +3 -0
- package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product/product.commands.d.ts +1 -0
- package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
- package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +12 -0
- package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -0
- package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +1 -1
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
- package/dist/types/modules/product-list/components/index.d.ts +7 -3
- package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +10 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -37
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
- package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +26 -0
- package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
- package/dist/types/modules/product-list/product-list-card.component.d.ts +30 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +64 -4
- package/dist/types/modules/product-list/product-list.component.d.ts +16 -44
- package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
- package/dist/types/modules/product-list/product-list.interface.d.ts +37 -31
- package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
- package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
- package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +14 -1
- package/dist/types/modules/ui-components/input/index.d.ts +0 -1
- package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
- package/dist/types/modules/ui-components/modal/modal.component.d.ts +23 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/modules/ui-components/styles/modal.style.d.ts +1 -0
- package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
- package/dist/types/static/icon/check.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/format.d.ts +0 -14
- package/docs/actions.md +320 -0
- package/docs/address.md +242 -0
- package/docs/cart.md +387 -0
- package/docs/checkout.md +420 -0
- package/docs/{CONFIGURATION.md → configuration.md} +212 -48
- package/docs/events.md +181 -0
- package/docs/product-list.md +311 -0
- package/docs/product.md +250 -0
- package/docs/{THEMING.md → theming.md} +110 -20
- package/docs/{TROUBLESHOOTING.md → troubleshooting.md} +6 -6
- package/package.json +20 -13
- package/dist/types/enums/cloud.enum.d.ts +0 -403
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -5
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
- package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
- package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
- package/dist/types/utils/helper.d.ts +0 -27
- package/docs/ACTIONS.md +0 -1300
- package/docs/DOCUMENTATION_INDEX.md +0 -311
- package/docs/EVENTS.md +0 -798
- package/umd/elements.js +0 -1
- /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
- /package/dist/types/{elements-builder-client.d.ts → clients/builder.d.ts} +0 -0
- /package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +0 -0
- /package/dist/types/{elements-client.d.ts → clients/main.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
- /package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
- /package/docs/{BROWSER_SUPPORT.md → browser-support.md} +0 -0
- /package/docs/{PROXY.md → proxy.md} +0 -0
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import type { CheckoutEventEnum } from '@/enums';
|
|
2
|
-
import type { IAddressAddress } from '@/interfaces/api/address.interface';
|
|
3
|
-
import type { ICoreParams } from '@/interfaces/cloud/core.interface';
|
|
4
|
-
import type { ICartAttributesPromoCode, ICartItemAttributes } from './cart.interface';
|
|
5
|
-
import type { IRetailerExpectation } from './retailer.interface';
|
|
6
|
-
export interface ICheckoutRecipient {
|
|
7
|
-
firstName?: string;
|
|
8
|
-
lastName?: string;
|
|
9
|
-
email?: string;
|
|
10
|
-
phone?: string;
|
|
11
|
-
birthDate?: string;
|
|
12
|
-
hasAgeVerify?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface IBillingAddress {
|
|
15
|
-
firstName?: string;
|
|
16
|
-
lastName?: string;
|
|
17
|
-
email?: string;
|
|
18
|
-
phone?: string;
|
|
19
|
-
one?: string;
|
|
20
|
-
two?: string;
|
|
21
|
-
city?: string;
|
|
22
|
-
state?: string;
|
|
23
|
-
zip?: string;
|
|
24
|
-
country?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface ICheckoutCustomer {
|
|
27
|
-
id?: string;
|
|
28
|
-
email?: string;
|
|
29
|
-
firstName?: string;
|
|
30
|
-
lastName?: string;
|
|
31
|
-
company?: string;
|
|
32
|
-
phone?: string;
|
|
33
|
-
profileImage?: string;
|
|
34
|
-
birthDate?: string;
|
|
35
|
-
hasAgeVerify?: boolean;
|
|
36
|
-
createdAt?: Date;
|
|
37
|
-
updatedAt?: Date;
|
|
38
|
-
}
|
|
39
|
-
interface ICheckoutBaseAddress {
|
|
40
|
-
id?: string;
|
|
41
|
-
one?: string;
|
|
42
|
-
two?: string;
|
|
43
|
-
city?: string;
|
|
44
|
-
state?: string;
|
|
45
|
-
zip?: string;
|
|
46
|
-
country?: string;
|
|
47
|
-
}
|
|
48
|
-
export type ICheckoutBillingAddress = ICheckoutBaseAddress & Omit<ICheckoutCustomer, 'birthDate' | 'id' | 'createdAt' | 'hasAgeVerify' | 'updatedAt' | 'profileImage'>;
|
|
49
|
-
export interface ICheckoutGiftOptionsRecipient {
|
|
50
|
-
name?: string;
|
|
51
|
-
email?: string;
|
|
52
|
-
phone?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface ICheckoutGiftOptions {
|
|
55
|
-
message?: string;
|
|
56
|
-
recipient?: ICheckoutGiftOptionsRecipient;
|
|
57
|
-
}
|
|
58
|
-
export interface ICheckoutMarketingPreferences {
|
|
59
|
-
canEmail?: boolean;
|
|
60
|
-
canSms?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export interface ICheckoutDeliveryTip {
|
|
63
|
-
fulfillmentId: string;
|
|
64
|
-
tip: number;
|
|
65
|
-
}
|
|
66
|
-
export interface ICheckoutDeliveryInstructions {
|
|
67
|
-
fulfillmentId: string;
|
|
68
|
-
instructions: string;
|
|
69
|
-
}
|
|
70
|
-
export interface ICheckoutPrepareParams extends ICoreParams {
|
|
71
|
-
cartId: string;
|
|
72
|
-
customer?: ICheckoutCustomer | string;
|
|
73
|
-
recipient?: ICheckoutRecipient;
|
|
74
|
-
hasAgeVerify?: boolean;
|
|
75
|
-
shippingAddressTwo?: string;
|
|
76
|
-
billingAddress?: ICheckoutBillingAddress | IBillingAddress;
|
|
77
|
-
hasSubstitutionPolicy?: boolean;
|
|
78
|
-
isGift?: boolean;
|
|
79
|
-
billingSameAsShipping?: boolean;
|
|
80
|
-
giftOptions?: ICheckoutGiftOptions;
|
|
81
|
-
marketingPreferences?: ICheckoutMarketingPreferences;
|
|
82
|
-
deliveryTips?: ICheckoutDeliveryTip[];
|
|
83
|
-
deliveryInstructions?: ICheckoutDeliveryInstructions[];
|
|
84
|
-
acceptedAccountCreation?: boolean;
|
|
85
|
-
scheduledDelivery?: string;
|
|
86
|
-
payment?: string;
|
|
87
|
-
promoCode?: string;
|
|
88
|
-
giftCards?: string[];
|
|
89
|
-
}
|
|
90
|
-
export interface ICheckoutTotalAmountsDiscounts {
|
|
91
|
-
products: number;
|
|
92
|
-
delivery: number;
|
|
93
|
-
shipping: number;
|
|
94
|
-
engraving: number;
|
|
95
|
-
service: number;
|
|
96
|
-
}
|
|
97
|
-
export interface ICheckoutTotalAmountsTaxes {
|
|
98
|
-
bag: number;
|
|
99
|
-
bottleDeposits: number;
|
|
100
|
-
retailDelivery: number;
|
|
101
|
-
products: number;
|
|
102
|
-
delivery: number;
|
|
103
|
-
shipping: number;
|
|
104
|
-
}
|
|
105
|
-
export interface ICheckoutTotalAmountsDetails {
|
|
106
|
-
taxes: ICheckoutTotalAmountsTaxes;
|
|
107
|
-
discounts: ICheckoutTotalAmountsDiscounts;
|
|
108
|
-
}
|
|
109
|
-
export interface ICheckoutTotalAmounts {
|
|
110
|
-
subtotal: number;
|
|
111
|
-
engraving: number;
|
|
112
|
-
service: number;
|
|
113
|
-
shipping: number;
|
|
114
|
-
delivery: number;
|
|
115
|
-
platform: number;
|
|
116
|
-
discounts: number;
|
|
117
|
-
giftCards: number;
|
|
118
|
-
tax: number;
|
|
119
|
-
tip: number;
|
|
120
|
-
total: number;
|
|
121
|
-
details: ICheckoutTotalAmountsDetails;
|
|
122
|
-
}
|
|
123
|
-
export interface ICheckoutFulfillment extends ICheckoutTotalAmounts {
|
|
124
|
-
id: string;
|
|
125
|
-
scheduledFor?: string | Date;
|
|
126
|
-
type: 'shipping' | 'onDemand';
|
|
127
|
-
expectation: IRetailerExpectation;
|
|
128
|
-
items: string[];
|
|
129
|
-
}
|
|
130
|
-
export interface ICheckoutRetailer extends ICheckoutTotalAmounts {
|
|
131
|
-
id: string;
|
|
132
|
-
name: string;
|
|
133
|
-
address?: IAddressAddress;
|
|
134
|
-
fulfillments: ICheckoutFulfillment[];
|
|
135
|
-
}
|
|
136
|
-
export interface ICheckoutItem {
|
|
137
|
-
variantId: string;
|
|
138
|
-
cartItemId: string;
|
|
139
|
-
liquidId: string;
|
|
140
|
-
retailerId: string;
|
|
141
|
-
fulfillmentId: string;
|
|
142
|
-
salsifyPid?: string;
|
|
143
|
-
salsifyGrouping: string;
|
|
144
|
-
name: string;
|
|
145
|
-
catPath: string;
|
|
146
|
-
volume: string;
|
|
147
|
-
uom: string;
|
|
148
|
-
proof: string;
|
|
149
|
-
abv: string;
|
|
150
|
-
containerType: string;
|
|
151
|
-
container: string;
|
|
152
|
-
size: string;
|
|
153
|
-
pack: boolean;
|
|
154
|
-
packDesc: string;
|
|
155
|
-
mainImage: string;
|
|
156
|
-
image: string;
|
|
157
|
-
brand: string;
|
|
158
|
-
partNumber: string;
|
|
159
|
-
upc: string;
|
|
160
|
-
sku: string;
|
|
161
|
-
price: number;
|
|
162
|
-
unitPrice: number;
|
|
163
|
-
quantity: number;
|
|
164
|
-
tax: number;
|
|
165
|
-
unitTax: number;
|
|
166
|
-
bottleDeposits: number;
|
|
167
|
-
attributes: ICartItemAttributes;
|
|
168
|
-
}
|
|
169
|
-
export interface ICheckoutGiftCard {
|
|
170
|
-
code: string;
|
|
171
|
-
applied: number;
|
|
172
|
-
balance: number;
|
|
173
|
-
}
|
|
174
|
-
export interface ICheckoutEvents {
|
|
175
|
-
type: CheckoutEventEnum;
|
|
176
|
-
message: string;
|
|
177
|
-
}
|
|
178
|
-
export interface ICheckoutPrepareResponse {
|
|
179
|
-
token: string;
|
|
180
|
-
cartId: string;
|
|
181
|
-
customer: ICheckoutCustomer;
|
|
182
|
-
hasAgeVerify: boolean;
|
|
183
|
-
hasSubstitutionPolicy: boolean;
|
|
184
|
-
isGift: boolean;
|
|
185
|
-
createdAt: string;
|
|
186
|
-
updatedAt: string;
|
|
187
|
-
billingSameAsShipping: boolean;
|
|
188
|
-
acceptedAccountCreation?: boolean;
|
|
189
|
-
giftOptions: ICheckoutGiftOptions;
|
|
190
|
-
marketingPreferences: ICheckoutMarketingPreferences;
|
|
191
|
-
shippingAddress: IAddressAddress;
|
|
192
|
-
billingAddress: ICheckoutBillingAddress;
|
|
193
|
-
amounts: ICheckoutTotalAmounts;
|
|
194
|
-
items: ICheckoutItem[];
|
|
195
|
-
retailers: ICheckoutRetailer[];
|
|
196
|
-
payment?: string;
|
|
197
|
-
giftCards: ICheckoutGiftCard[];
|
|
198
|
-
events: ICheckoutEvents[];
|
|
199
|
-
promoCode: ICartAttributesPromoCode;
|
|
200
|
-
isPresaleLocked: boolean;
|
|
201
|
-
presaleExpiresAt: string | null;
|
|
202
|
-
}
|
|
203
|
-
export interface ICheckoutCompleteParams extends ICoreParams {
|
|
204
|
-
token: string;
|
|
205
|
-
payment: string;
|
|
206
|
-
}
|
|
207
|
-
export interface ICheckoutCompleteResponse {
|
|
208
|
-
legacyOrderNumber: string;
|
|
209
|
-
referenceId: string;
|
|
210
|
-
}
|
|
211
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface ICoreParams {
|
|
2
|
-
refresh?: boolean;
|
|
3
|
-
isLean?: boolean;
|
|
4
|
-
isLegacy?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface ILiquidPaymentToken {
|
|
7
|
-
id?: string;
|
|
8
|
-
type?: string;
|
|
9
|
-
card?: {
|
|
10
|
-
brand: string | null;
|
|
11
|
-
country: string | null;
|
|
12
|
-
expMonth: number | null;
|
|
13
|
-
expYear: number | null;
|
|
14
|
-
last4: string | null;
|
|
15
|
-
funding: string | null;
|
|
16
|
-
};
|
|
17
|
-
created?: number;
|
|
18
|
-
error?: {
|
|
19
|
-
message: string;
|
|
20
|
-
code?: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { FulfillmentType } from '@/enums';
|
|
2
|
-
import type { DAYS_OF_WEEK } from '@/enums/cloud.enum';
|
|
3
|
-
import type { IAddressAddress, IAddressCoordinates } from '@/interfaces/api/address.interface';
|
|
4
|
-
export interface IRetailerTimes {
|
|
5
|
-
startsAt: string;
|
|
6
|
-
endsAt: string;
|
|
7
|
-
}
|
|
8
|
-
export interface IRetailerHoursConfig {
|
|
9
|
-
active: boolean;
|
|
10
|
-
times: IRetailerTimes[];
|
|
11
|
-
}
|
|
12
|
-
export type RetailerHours = {
|
|
13
|
-
[day in DAYS_OF_WEEK]: IRetailerHoursConfig;
|
|
14
|
-
};
|
|
15
|
-
export interface IRetailerExpectation {
|
|
16
|
-
detail: string;
|
|
17
|
-
short: string;
|
|
18
|
-
engraving: string;
|
|
19
|
-
}
|
|
20
|
-
export interface IRetailerFreeDelivery {
|
|
21
|
-
min: number;
|
|
22
|
-
active: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface IFeeShippingConfig {
|
|
25
|
-
maxQuantity: number;
|
|
26
|
-
fee: number;
|
|
27
|
-
active: boolean;
|
|
28
|
-
min: number;
|
|
29
|
-
}
|
|
30
|
-
export interface IRetailerFeeShipping {
|
|
31
|
-
individual: IFeeShippingConfig;
|
|
32
|
-
pack: IFeeShippingConfig;
|
|
33
|
-
free: IRetailerFreeDelivery;
|
|
34
|
-
}
|
|
35
|
-
export interface IRetailerFeeDelivery {
|
|
36
|
-
min: number;
|
|
37
|
-
fee: number;
|
|
38
|
-
free: IRetailerFreeDelivery;
|
|
39
|
-
}
|
|
40
|
-
export type IRetailerFees = IRetailerFeeShipping | IRetailerFeeDelivery;
|
|
41
|
-
export interface IRetailerFulfillments {
|
|
42
|
-
id: string;
|
|
43
|
-
type: FulfillmentType;
|
|
44
|
-
deliveryFee?: number;
|
|
45
|
-
shippingFee?: number;
|
|
46
|
-
engravingFee?: number;
|
|
47
|
-
subtotal?: number;
|
|
48
|
-
timezone?: string;
|
|
49
|
-
fees: IRetailerFees;
|
|
50
|
-
expectation: IRetailerExpectation;
|
|
51
|
-
canEngrave?: boolean;
|
|
52
|
-
hours: RetailerHours;
|
|
53
|
-
breaks: IRetailerTimes[];
|
|
54
|
-
items: string[];
|
|
55
|
-
}
|
|
56
|
-
export interface IRetailer {
|
|
57
|
-
name: string;
|
|
58
|
-
id: string;
|
|
59
|
-
platformFee?: number;
|
|
60
|
-
deliveryFee?: number;
|
|
61
|
-
shippingFee?: number;
|
|
62
|
-
engravingFee?: number;
|
|
63
|
-
subtotal?: number;
|
|
64
|
-
total?: number;
|
|
65
|
-
address?: IAddressAddress & IAddressCoordinates;
|
|
66
|
-
fulfillments: IRetailerFulfillments[];
|
|
67
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import type { AddressType } from '@/enums';
|
|
2
|
-
import type { ICoreParams } from '@/interfaces/cloud/core.interface';
|
|
3
|
-
export interface IUserSessionOb {
|
|
4
|
-
values?: [string, string[]];
|
|
5
|
-
createdAt: Date;
|
|
6
|
-
}
|
|
7
|
-
export interface IUserSession {
|
|
8
|
-
key: string | null;
|
|
9
|
-
secret: string | null;
|
|
10
|
-
createdAt: Date;
|
|
11
|
-
}
|
|
12
|
-
export interface IUserAddressBase {
|
|
13
|
-
placesId: string;
|
|
14
|
-
one: string;
|
|
15
|
-
two: string;
|
|
16
|
-
city: string;
|
|
17
|
-
state: string;
|
|
18
|
-
zip: string;
|
|
19
|
-
country: string;
|
|
20
|
-
lat: number;
|
|
21
|
-
long: number;
|
|
22
|
-
}
|
|
23
|
-
export interface IUserAddress extends IUserAddressBase {
|
|
24
|
-
id: string;
|
|
25
|
-
createdAt: Date;
|
|
26
|
-
updatedAt: Date;
|
|
27
|
-
isDefault?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface ISavedCard {
|
|
30
|
-
brand: string | null;
|
|
31
|
-
country: string | null;
|
|
32
|
-
expMonth: number | null;
|
|
33
|
-
expYear: number | null;
|
|
34
|
-
last4: string | null;
|
|
35
|
-
funding: string | null;
|
|
36
|
-
}
|
|
37
|
-
export interface IUserPayment {
|
|
38
|
-
id: string;
|
|
39
|
-
type: string;
|
|
40
|
-
isDefault: boolean;
|
|
41
|
-
card?: ISavedCard;
|
|
42
|
-
createdAt: Date;
|
|
43
|
-
}
|
|
44
|
-
export interface IUser {
|
|
45
|
-
id: string;
|
|
46
|
-
email: string;
|
|
47
|
-
firstName: string | null;
|
|
48
|
-
lastName: string | null;
|
|
49
|
-
phone: string | null;
|
|
50
|
-
company: string | null;
|
|
51
|
-
profileImage: string | null;
|
|
52
|
-
birthDate: string | null;
|
|
53
|
-
createdAt: Date;
|
|
54
|
-
updatedAt: Date;
|
|
55
|
-
addresses: IUserAddress[];
|
|
56
|
-
savedPayments: IUserPayment[];
|
|
57
|
-
session: IUserSession;
|
|
58
|
-
}
|
|
59
|
-
export type BaseUser = Omit<IUser, 'session'>;
|
|
60
|
-
export interface IUserSessionParams extends ICoreParams {
|
|
61
|
-
id?: string;
|
|
62
|
-
email?: string;
|
|
63
|
-
firstName?: string | null;
|
|
64
|
-
lastName?: string | null;
|
|
65
|
-
phone?: string | null;
|
|
66
|
-
company?: string | null;
|
|
67
|
-
profileImage?: string | null;
|
|
68
|
-
birthDate?: string | null;
|
|
69
|
-
}
|
|
70
|
-
export interface IUserPaymentSession {
|
|
71
|
-
cartId?: string;
|
|
72
|
-
checkoutToken?: string;
|
|
73
|
-
customerId?: string;
|
|
74
|
-
customerEmail?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface IPurgeResponse {
|
|
77
|
-
deleted: boolean;
|
|
78
|
-
message: string;
|
|
79
|
-
}
|
|
80
|
-
export interface IUserAddressParams extends ICoreParams {
|
|
81
|
-
customerId: string;
|
|
82
|
-
placesId?: string;
|
|
83
|
-
one?: string;
|
|
84
|
-
two?: string;
|
|
85
|
-
city?: string;
|
|
86
|
-
state?: string;
|
|
87
|
-
zip?: string;
|
|
88
|
-
country?: string;
|
|
89
|
-
lat?: number;
|
|
90
|
-
long?: number;
|
|
91
|
-
type: AddressType;
|
|
92
|
-
isDefault?: boolean;
|
|
93
|
-
}
|
|
94
|
-
export interface IUserPaymentParams extends ICoreParams {
|
|
95
|
-
customerId: string;
|
|
96
|
-
paymentMethodId: string;
|
|
97
|
-
}
|
|
98
|
-
export interface IUserPaymentAddParams extends IUserPaymentParams {
|
|
99
|
-
isDefault?: boolean;
|
|
100
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
|
|
2
|
-
import type { IAddressStore } from '@/core/store/interfaces/address.interface';
|
|
3
|
-
import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store/interfaces/cart.interface';
|
|
4
|
-
import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
|
|
5
|
-
export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
|
|
6
|
-
export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
|
|
7
|
-
export declare function buildRetailerStore(retailer: ICartRetailer): IRetailerStore;
|
|
8
|
-
export declare function buildFulfillmentStore(fulfillment: IRetailerFulfillments, retailer: ICartRetailer): IRetailerFulfillmentStore;
|
|
9
|
-
export declare function cartDataForEventFromStore(cartStore: ICartStore, addressStore: IAddressStore): IBaseCartEventData;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { billingFormFields, customerFormFields, giftFormFields } from '@/modules/checkout/constant';
|
|
2
|
-
export type BillingFieldName = (typeof billingFormFields)[keyof typeof billingFormFields];
|
|
3
|
-
export type CustomerFieldName = (typeof customerFormFields)[keyof typeof customerFormFields];
|
|
4
|
-
export type GiftFieldName = (typeof giftFormFields)[keyof typeof giftFormFields];
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
import type { IProduct } from '@/interfaces/api/product.interface';
|
|
3
|
-
import type { IRetailerFulfillments } from '@/interfaces/cloud';
|
|
4
|
-
import type { ProductListCardVariantType } from '@/interfaces/core.interface';
|
|
5
|
-
export interface IProductListCardParams {
|
|
6
|
-
variant: ProductListCardVariantType;
|
|
7
|
-
fillCard: boolean;
|
|
8
|
-
product: IProduct;
|
|
9
|
-
fulfillments: IRetailerFulfillments[];
|
|
10
|
-
productUrl?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface IProductAvailabilityData {
|
|
13
|
-
hasAvailability: boolean;
|
|
14
|
-
upc: string;
|
|
15
|
-
fulfillmentId: string;
|
|
16
|
-
partNumber: string;
|
|
17
|
-
quantity: number;
|
|
18
|
-
state: string;
|
|
19
|
-
isPresale: boolean;
|
|
20
|
-
isPresaleActive: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface IProductVariantParams {
|
|
23
|
-
image: string;
|
|
24
|
-
name: string;
|
|
25
|
-
size: string | null;
|
|
26
|
-
price: number;
|
|
27
|
-
availability: IProductAvailabilityData;
|
|
28
|
-
}
|
|
29
|
-
export declare class ProductListCardComponent extends BaseComponent<IProductListCardParams> {
|
|
30
|
-
get hostClasses(): string[];
|
|
31
|
-
private getAvailabilityData;
|
|
32
|
-
private isPresaleActive;
|
|
33
|
-
private handleAddToCart;
|
|
34
|
-
protected template(): HTMLElement[];
|
|
35
|
-
private generateProductUrl;
|
|
36
|
-
private createVariantStandard;
|
|
37
|
-
}
|
package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './product-list-apply-filter-button.component';
|
|
2
|
-
export * from './product-list-checkbox-filter.components';
|
|
3
|
-
export * from './product-list-delivery-options-filter.components';
|
|
4
|
-
export * from './product-list-price-filter.components';
|
|
5
|
-
export * from './product-list-search.component';
|
|
6
|
-
export * from './product-list-toggle-filters.components';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function createApplyFiltersButton(onCloseDrawer: VoidFunction): HTMLElement;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ICreateDeliveryOptionsFilterParams {
|
|
2
|
-
currentFilters?: {
|
|
3
|
-
deliveryOptions?: string;
|
|
4
|
-
personalized?: boolean;
|
|
5
|
-
preOrder?: boolean;
|
|
6
|
-
};
|
|
7
|
-
deliveryCollapsed: boolean;
|
|
8
|
-
isSameDayDeliveryDisabled: boolean;
|
|
9
|
-
onDeliveryOptionsChange?: (value: 'all' | 'shipping' | 'onDemand') => void;
|
|
10
|
-
onToggleCollapse: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare function createDeliveryOptionsFilter(params: ICreateDeliveryOptionsFilterParams): {
|
|
13
|
-
elements: HTMLElement[];
|
|
14
|
-
chevronContainer: HTMLElement;
|
|
15
|
-
deliveryOptionsList: HTMLElement;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
export interface IProductListSearchParams {
|
|
3
|
-
searchTerm?: string;
|
|
4
|
-
handleInputChange?: (search: string) => void;
|
|
5
|
-
clearSearch?: VoidFunction;
|
|
6
|
-
}
|
|
7
|
-
export declare class ProductListSearchComponent extends BaseComponent<IProductListSearchParams> {
|
|
8
|
-
private searchInput?;
|
|
9
|
-
private clearButton?;
|
|
10
|
-
private readonly ALLOWED_CHARACTERS;
|
|
11
|
-
private readonly MAX_LENGTH;
|
|
12
|
-
get hostClasses(): string[];
|
|
13
|
-
protected template(): HTMLElement[];
|
|
14
|
-
private sanitizeInput;
|
|
15
|
-
private updateClearButtonVisibility;
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface ICreatePersonalizedFilterParams {
|
|
2
|
-
currentFilters?: {
|
|
3
|
-
personalized?: boolean;
|
|
4
|
-
deliveryOptions?: string;
|
|
5
|
-
};
|
|
6
|
-
isPersonalizationDisabled: boolean;
|
|
7
|
-
onPersonalizedChange?: (enabled: boolean) => void;
|
|
8
|
-
}
|
|
9
|
-
export interface ICreatePreOrderFilterParams {
|
|
10
|
-
currentFilters?: {
|
|
11
|
-
preOrder?: boolean;
|
|
12
|
-
deliveryOptions?: string;
|
|
13
|
-
};
|
|
14
|
-
isPreOrderDisabled: boolean;
|
|
15
|
-
onPreOrderChange?: (enabled: boolean) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare function createPersonalizedFilter(params: ICreatePersonalizedFilterParams): HTMLElement[];
|
|
18
|
-
export declare function createPreOrderFilter(params: ICreatePreOrderFilterParams): HTMLElement[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './address.style';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cart.style';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './checkout.style';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './product-list.style';
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } 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
|
-
}
|
|
20
|
-
export declare class BirthdateInputComponent extends BaseComponent<IBirthdateInputComponentParams, null> {
|
|
21
|
-
get hostClasses(): string[];
|
|
22
|
-
private monthInput;
|
|
23
|
-
private dayInput;
|
|
24
|
-
private yearInput;
|
|
25
|
-
private errorContainer;
|
|
26
|
-
private validationTimeout;
|
|
27
|
-
afterRender(): void;
|
|
28
|
-
private populateInitialValue;
|
|
29
|
-
private setupEventListeners;
|
|
30
|
-
private formatMonth;
|
|
31
|
-
private formatDay;
|
|
32
|
-
private formatYear;
|
|
33
|
-
private padMonthOnBlur;
|
|
34
|
-
private padDayOnBlur;
|
|
35
|
-
private handleNavigation;
|
|
36
|
-
private handleChange;
|
|
37
|
-
private isFieldsComplete;
|
|
38
|
-
private scheduleValidation;
|
|
39
|
-
private getFormattedValue;
|
|
40
|
-
private validateDate;
|
|
41
|
-
private calculateAge;
|
|
42
|
-
private validateInput;
|
|
43
|
-
private showErrors;
|
|
44
|
-
private clearErrors;
|
|
45
|
-
getValue(): string;
|
|
46
|
-
setValue(value: string): void;
|
|
47
|
-
validate(): boolean;
|
|
48
|
-
focus(): void;
|
|
49
|
-
disable(): void;
|
|
50
|
-
enable(): void;
|
|
51
|
-
clear(): void;
|
|
52
|
-
protected template(): HTMLElement[];
|
|
53
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { IRetailerFulfillmentStore } from '@/core/store/interfaces/cart.interface';
|
|
2
|
-
export declare const shouldShowMinimumPurchaseAlert: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
|
|
3
|
-
export declare const getMinimumPurchaseMessage: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => {
|
|
4
|
-
message: string;
|
|
5
|
-
type: "warning" | "info";
|
|
6
|
-
};
|
|
7
|
-
export declare const hasUnmetMinimum: (fulfillment: IRetailerFulfillmentStore | undefined, isPack?: boolean) => boolean;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CartEventEnum, CheckoutEventEnum } from 'enums';
|
|
2
|
-
import type { ICartEvent, ICheckoutEvents } from 'interfaces/cloud';
|
|
3
|
-
export type ElementEventLevel = 'success' | 'warning' | 'error';
|
|
4
|
-
export interface IElementsCartEvent {
|
|
5
|
-
type: CartEventEnum;
|
|
6
|
-
message: string;
|
|
7
|
-
level: ElementEventLevel;
|
|
8
|
-
}
|
|
9
|
-
export interface IElementsCheckoutEvents {
|
|
10
|
-
type: CheckoutEventEnum;
|
|
11
|
-
message: string;
|
|
12
|
-
level: ElementEventLevel;
|
|
13
|
-
}
|
|
14
|
-
export declare const includeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
|
|
15
|
-
export declare const excludeCartEvents: (events: ICartEvent[], eventTypes: CartEventEnum[]) => ICartEvent[];
|
|
16
|
-
export declare const eventsForCart: (events: ICartEvent[]) => ICartEvent[];
|
|
17
|
-
export declare const hasCartAnyPromoCodeEvents: (events: ICartEvent[]) => boolean;
|
|
18
|
-
export declare const includeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
|
|
19
|
-
export declare const excludeCheckoutEvents: (events: ICheckoutEvents[], eventTypes: CheckoutEventEnum[]) => ICheckoutEvents[];
|
|
20
|
-
export declare const eventsForCheckout: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
21
|
-
export declare const promoCodeCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
22
|
-
export declare const giftCardCheckoutEvents: (events: ICheckoutEvents[]) => ICheckoutEvents[];
|
|
23
|
-
export declare const hasAnyRetailerGiftCardRestriction: (events: ICheckoutEvents[]) => boolean;
|
|
24
|
-
export declare const transformEventsForCart: (events: ICartEvent[]) => IElementsCartEvent[];
|
|
25
|
-
export declare const transformEventsForCheckout: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|
|
26
|
-
export declare const transformPromoCodeCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|
|
27
|
-
export declare const transformGiftCardCheckoutEvents: (events: ICheckoutEvents[]) => IElementsCheckoutEvents[];
|