@liquidcommerce/elements-sdk 2.5.11 → 2.6.0-beta.10
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 +1 -0
- package/dist/index.esm.js +10852 -10205
- package/dist/types/constants/core.constant.d.ts +11 -0
- package/dist/types/core/{api-client.service.d.ts → api/api-client.service.d.ts} +13 -13
- package/dist/types/core/{auth.service.d.ts → api/auth-client.service.d.ts} +5 -16
- package/dist/types/core/api/http-client.service.d.ts +45 -0
- package/dist/types/core/client/client-action.service.d.ts +18 -11
- package/dist/types/core/client/client-config.service.d.ts +3 -0
- package/dist/types/core/command/base-command.service.d.ts +3 -3
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
- package/dist/types/core/google-tag-manager.service.d.ts +12 -10
- package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +26 -63
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +11 -1
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
- package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -54
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +4 -2
- package/dist/types/core/store/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/store/interfaces/product.interface.d.ts +12 -66
- package/dist/types/core/store/store.constant.d.ts +1 -1
- package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
- package/dist/types/elements-base-client.d.ts +4 -4
- package/dist/types/enums/cloud.enum.d.ts +20 -0
- package/dist/types/enums/core.enum.d.ts +1 -0
- package/dist/types/interfaces/api/address.interface.d.ts +28 -0
- package/dist/types/interfaces/api/cart.interface.d.ts +91 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
- package/dist/types/interfaces/api/product.interface.d.ts +106 -0
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +14 -10
- package/dist/types/interfaces/cloud/index.d.ts +0 -4
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +2 -2
- package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
- package/dist/types/interfaces/configs/global.interface.d.ts +1 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
- package/dist/types/interfaces/core.interface.d.ts +1 -0
- package/dist/types/modules/address/address.command.d.ts +2 -3
- package/dist/types/modules/address/address.interface.d.ts +0 -7
- package/dist/types/modules/cart/cart.commands.d.ts +0 -1
- 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/product/components/components.d.ts +2 -4
- package/dist/types/modules/product/product.commands.d.ts +2 -2
- package/dist/types/modules/product-list/components/index.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
- package/dist/types/modules/product-list/product-list.commands.d.ts +3 -2
- package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
- package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
- package/dist/types/static/icon/filter.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/helper.d.ts +2 -1
- package/docs/THEMING.md +3 -0
- package/package.json +5 -6
- package/umd/elements.js +1 -1
- package/dist/types/core/utils.d.ts +0 -23
- package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
- 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/product.interface.d.ts +0 -158
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/product/utils/helpers.d.ts +0 -3
- package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { IFilterValue } from '@/interfaces/api/product-list.interface';
|
|
2
|
+
export interface IProductListFilters {
|
|
3
|
+
personalized: boolean;
|
|
4
|
+
preOrder: boolean;
|
|
5
|
+
deliveryOptions: 'all' | 'shipping' | 'onDemand';
|
|
6
|
+
price?: {
|
|
7
|
+
min?: string;
|
|
8
|
+
max?: string;
|
|
9
|
+
};
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface IExtendedFilterSchema {
|
|
13
|
+
category: string;
|
|
14
|
+
values: IFilterValue[];
|
|
15
|
+
}
|
|
16
|
+
export interface IProductListSearch {
|
|
17
|
+
searchTerm?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IPagination {
|
|
20
|
+
currentPage: number;
|
|
21
|
+
totalPages: number;
|
|
22
|
+
hasMorePages: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ICheckboxLabelStates {
|
|
25
|
+
isExpanded: boolean;
|
|
26
|
+
selectedValues: Set<string>;
|
|
27
|
+
searchInput: HTMLInputElement | null;
|
|
28
|
+
checkboxList: HTMLElement | null;
|
|
29
|
+
filteredItems: IFilterValue[];
|
|
30
|
+
contentElement: HTMLElement | null;
|
|
31
|
+
iconElement: HTMLElement | null;
|
|
32
|
+
hasUserInteraction: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ICurrentFilters {
|
|
35
|
+
personalized: boolean;
|
|
36
|
+
preOrder: boolean;
|
|
37
|
+
deliveryOptions: 'all' | 'shipping' | 'onDemand';
|
|
38
|
+
price?: {
|
|
39
|
+
min?: string;
|
|
40
|
+
max?: string;
|
|
41
|
+
};
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}
|
|
44
|
+
export interface IPriceConfig {
|
|
45
|
+
min: string;
|
|
46
|
+
max: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ICreateCheckboxItemParams {
|
|
49
|
+
filter: IExtendedFilterSchema;
|
|
50
|
+
state: ICheckboxLabelStates;
|
|
51
|
+
item: IFilterValue;
|
|
52
|
+
onChange: VoidFunction;
|
|
53
|
+
}
|
|
54
|
+
export interface IHandleCheckboxFilterSearchParams {
|
|
55
|
+
filter: IExtendedFilterSchema;
|
|
56
|
+
state: ICheckboxLabelStates;
|
|
57
|
+
searchTerm: string;
|
|
58
|
+
renderCheckboxItems: VoidFunction;
|
|
59
|
+
}
|
|
60
|
+
export interface ICreateCheckboxFilterHeaderParams {
|
|
61
|
+
filter: IExtendedFilterSchema;
|
|
62
|
+
state: ICheckboxLabelStates;
|
|
63
|
+
onToggle: (bucket: string) => void;
|
|
64
|
+
}
|
|
65
|
+
export interface ICreateCheckboxFilterSearchContainerParams {
|
|
66
|
+
filter: IExtendedFilterSchema;
|
|
67
|
+
state: ICheckboxLabelStates;
|
|
68
|
+
onSearch: (searchTerm: string) => void;
|
|
69
|
+
}
|
|
70
|
+
export interface IRenderCheckboxItemsParams {
|
|
71
|
+
filter: IExtendedFilterSchema;
|
|
72
|
+
state: ICheckboxLabelStates;
|
|
73
|
+
onCheckboxChange: (value: string, checked: boolean) => void;
|
|
74
|
+
}
|
|
75
|
+
export interface ICreateFiltersContainerParams {
|
|
76
|
+
isDrawerMode?: boolean;
|
|
77
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from './bag.icon';
|
|
|
3
3
|
export * from './checkbox.icon';
|
|
4
4
|
export * from './chevron-down.icon';
|
|
5
5
|
export * from './chevron-left.icon';
|
|
6
|
+
export * from './chevron-up.icon';
|
|
6
7
|
export * from './close.icon';
|
|
7
8
|
export * from './error-info.icon';
|
|
8
9
|
export * from './icon.types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CartEventEnum, CheckoutEventEnum } from 'enums';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ICheckoutEvents } from 'interfaces/cloud';
|
|
3
|
+
import type { ICartEvent } from '@/interfaces/api/cart.interface';
|
|
3
4
|
export type ElementEventLevel = 'success' | 'warning' | 'error';
|
|
4
5
|
export interface IElementsCartEvent {
|
|
5
6
|
type: CartEventEnum;
|
package/docs/THEMING.md
CHANGED
|
@@ -37,6 +37,7 @@ interface IGlobalTheme {
|
|
|
37
37
|
accentColor: string;
|
|
38
38
|
defaultTextColor: string;
|
|
39
39
|
selectedTextColor: string;
|
|
40
|
+
linkTextColor: string;
|
|
40
41
|
errorColor: string;
|
|
41
42
|
warningColor: string;
|
|
42
43
|
successColor: string;
|
|
@@ -68,6 +69,7 @@ customTheme: {
|
|
|
68
69
|
accentColor: '#6c757d',
|
|
69
70
|
defaultTextColor: '#212529',
|
|
70
71
|
selectedTextColor: '#ffffff',
|
|
72
|
+
linkTextColor: '#1d4ed8',
|
|
71
73
|
errorColor: '#dc3545',
|
|
72
74
|
warningColor: '#ffc107',
|
|
73
75
|
successColor: '#28a745',
|
|
@@ -367,6 +369,7 @@ const client = await Elements('YOUR_API_KEY', {
|
|
|
367
369
|
accentColor: '#6c757d',
|
|
368
370
|
defaultTextColor: '#212529',
|
|
369
371
|
selectedTextColor: '#ffffff',
|
|
372
|
+
linkTextColor: '#1d4ed8',
|
|
370
373
|
errorColor: '#dc3545',
|
|
371
374
|
warningColor: '#ffc107',
|
|
372
375
|
successColor: '#28a745',
|
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.
|
|
6
|
+
"version": "2.6.0-beta.10",
|
|
7
7
|
"homepage": "https://docs.liquidcommerce.co/elements-sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -53,8 +53,7 @@
|
|
|
53
53
|
"check": "pnpm biome check --write .",
|
|
54
54
|
"fl": "pnpm check && pnpm build:dev",
|
|
55
55
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
56
|
-
"clean": "rm -rf dist umd",
|
|
57
|
-
"clean:hard": "rm -rf dist umd node_modules && pnpm install && pnpm build",
|
|
56
|
+
"clean": "rm -rf dist umd node_modules && pnpm install && pnpm build",
|
|
58
57
|
"prepublishOnly": "pnpm run build",
|
|
59
58
|
"deprecate:old": "npm deprecate @liquidcommerceteam/elements-sdk@\"*\" \"Package moved to @liquidcommerce/elements-sdk\"",
|
|
60
59
|
"prepare": "husky"
|
|
@@ -72,8 +71,8 @@
|
|
|
72
71
|
],
|
|
73
72
|
"devDependencies": {
|
|
74
73
|
"@biomejs/biome": "2.3.5",
|
|
75
|
-
"@commitlint/cli": "^20.
|
|
76
|
-
"@commitlint/config-conventional": "^20.
|
|
74
|
+
"@commitlint/cli": "^20.2.0",
|
|
75
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
77
76
|
"@rollup/plugin-alias": "^6.0.0",
|
|
78
77
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
79
78
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -91,7 +90,7 @@
|
|
|
91
90
|
"conventional-changelog-cli": "^5.0.0",
|
|
92
91
|
"husky": "^9.1.7",
|
|
93
92
|
"process": "^0.11.10",
|
|
94
|
-
"rollup": "^4.53.
|
|
93
|
+
"rollup": "^4.53.3",
|
|
95
94
|
"rollup-obfuscator": "^4.1.1",
|
|
96
95
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
97
96
|
"semantic-release": "^25.0.2",
|