@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.
Files changed (75) hide show
  1. package/README.md +1 -0
  2. package/dist/index.esm.js +10852 -10205
  3. package/dist/types/constants/core.constant.d.ts +11 -0
  4. package/dist/types/core/{api-client.service.d.ts → api/api-client.service.d.ts} +13 -13
  5. package/dist/types/core/{auth.service.d.ts → api/auth-client.service.d.ts} +5 -16
  6. package/dist/types/core/api/http-client.service.d.ts +45 -0
  7. package/dist/types/core/client/client-action.service.d.ts +18 -11
  8. package/dist/types/core/client/client-config.service.d.ts +3 -0
  9. package/dist/types/core/command/base-command.service.d.ts +3 -3
  10. package/dist/types/core/command/common-command.service.d.ts +2 -1
  11. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
  12. package/dist/types/core/google-tag-manager.service.d.ts +12 -10
  13. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
  14. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +26 -63
  15. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +11 -1
  16. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  17. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  18. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -54
  19. package/dist/types/core/store/interfaces/checkout.interface.d.ts +4 -2
  20. package/dist/types/core/store/interfaces/core.interface.d.ts +5 -4
  21. package/dist/types/core/store/interfaces/product.interface.d.ts +12 -66
  22. package/dist/types/core/store/store.constant.d.ts +1 -1
  23. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  24. package/dist/types/elements-base-client.d.ts +4 -4
  25. package/dist/types/enums/cloud.enum.d.ts +20 -0
  26. package/dist/types/enums/core.enum.d.ts +1 -0
  27. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  28. package/dist/types/interfaces/api/cart.interface.d.ts +91 -0
  29. package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
  30. package/dist/types/interfaces/api/product.interface.d.ts +106 -0
  31. package/dist/types/interfaces/cloud/checkout.interface.d.ts +14 -10
  32. package/dist/types/interfaces/cloud/index.d.ts +0 -4
  33. package/dist/types/interfaces/cloud/retailer.interface.d.ts +2 -2
  34. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  35. package/dist/types/interfaces/configs/global.interface.d.ts +1 -0
  36. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  37. package/dist/types/interfaces/core.interface.d.ts +1 -0
  38. package/dist/types/modules/address/address.command.d.ts +2 -3
  39. package/dist/types/modules/address/address.interface.d.ts +0 -7
  40. package/dist/types/modules/cart/cart.commands.d.ts +0 -1
  41. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  42. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  43. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  44. package/dist/types/modules/product/components/components.d.ts +2 -4
  45. package/dist/types/modules/product/product.commands.d.ts +2 -2
  46. package/dist/types/modules/product-list/components/index.d.ts +2 -0
  47. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
  48. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
  49. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
  50. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
  51. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
  52. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
  53. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
  54. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
  55. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
  56. package/dist/types/modules/product-list/product-list.commands.d.ts +3 -2
  57. package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
  58. package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
  59. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  60. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  61. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  62. package/dist/types/static/icon/index.d.ts +1 -0
  63. package/dist/types/utils/helper.d.ts +2 -1
  64. package/docs/THEMING.md +3 -0
  65. package/package.json +5 -6
  66. package/umd/elements.js +1 -1
  67. package/dist/types/core/utils.d.ts +0 -23
  68. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  69. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  70. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  71. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  72. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  73. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  74. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  75. 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
+ }
@@ -1,2 +1 @@
1
- export * from './helpers';
2
1
  export * from './purchase-min-alert.component';
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './icon.types';
2
+ export declare const ChevronUpIcon: ({ width, height, className, color }: IconProps) => string;
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './icon.types';
2
+ export declare const FilterIcon: ({ width, height, className, color }: IconProps) => string;
@@ -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 { ICartEvent, ICheckoutEvents } from 'interfaces/cloud';
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.5.11",
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.1.0",
76
- "@commitlint/config-conventional": "^20.0.0",
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.2",
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",