@liquidcommerce/elements-sdk 2.6.7 → 2.7.1

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 (170) hide show
  1. package/README.md +83 -2519
  2. package/dist/index.checkout.esm.js +16086 -0
  3. package/dist/index.esm.js +16267 -13788
  4. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  5. package/dist/types/auto-initialize/shared-utils.d.ts +27 -0
  6. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +11 -1
  7. package/dist/types/clients/checkout.d.ts +13 -0
  8. package/dist/types/constants/core.constant.d.ts +5 -3
  9. package/dist/types/core/api/api-client.service.d.ts +0 -2
  10. package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
  11. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  12. package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
  13. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +50 -0
  14. package/dist/types/core/client/actions/client-product-action.service.d.ts +12 -0
  15. package/dist/types/core/client/client-action.service.d.ts +6 -73
  16. package/dist/types/core/client/client-config.service.d.ts +3 -4
  17. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +1 -0
  18. package/dist/types/core/store/interfaces/core.interface.d.ts +14 -1
  19. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  20. package/dist/types/core/store/interfaces/product-list.interface.d.ts +45 -0
  21. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  22. package/dist/types/core/store/store.constant.d.ts +4 -0
  23. package/dist/types/enums/core.enum.d.ts +14 -1
  24. package/dist/types/enums/index.d.ts +0 -1
  25. package/dist/types/index.checkout.d.ts +7 -0
  26. package/dist/types/index.checkout.umd.d.ts +4 -0
  27. package/dist/types/index.d.ts +2 -2
  28. package/dist/types/interfaces/api/checkout.interface.d.ts +2 -1
  29. package/dist/types/interfaces/api/product-list.interface.d.ts +13 -5
  30. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -0
  31. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  32. package/dist/types/interfaces/configs/index.d.ts +1 -0
  33. package/dist/types/interfaces/configs/product-list.interface.d.ts +28 -0
  34. package/dist/types/interfaces/core.interface.d.ts +28 -6
  35. package/dist/types/modules/address/address-input.component.d.ts +11 -0
  36. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  37. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  38. package/dist/types/modules/checkout/checkout.commands.d.ts +6 -2
  39. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  40. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +2 -0
  41. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  42. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  43. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  44. package/dist/types/modules/product-list/components/card-components/index.d.ts +7 -0
  45. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
  46. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  47. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +12 -0
  48. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  49. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  50. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  51. package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -0
  52. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  53. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  54. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  55. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  56. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  57. 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
  58. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
  59. package/dist/types/modules/product-list/components/index.d.ts +7 -3
  60. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
  61. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +10 -0
  62. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -37
  63. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
  64. package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +26 -0
  65. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
  66. package/dist/types/modules/product-list/product-list-card.component.d.ts +30 -0
  67. package/dist/types/modules/product-list/product-list.commands.d.ts +62 -3
  68. package/dist/types/modules/product-list/product-list.component.d.ts +16 -43
  69. package/dist/types/{enums/cloud.enum.d.ts → modules/product-list/product-list.constants.d.ts} +20 -1
  70. package/dist/types/modules/product-list/product-list.interface.d.ts +33 -24
  71. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  72. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  73. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  74. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  75. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  76. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  77. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  78. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  79. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  80. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +13 -1
  81. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  82. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  83. package/dist/types/modules/ui-components/modal/modal.component.d.ts +23 -0
  84. package/dist/types/modules/ui-components/styles/modal.style.d.ts +1 -0
  85. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  86. package/dist/types/static/icon/check.icon.d.ts +2 -0
  87. package/dist/types/static/icon/index.d.ts +1 -0
  88. package/docs/gitbook/actions.md +160 -0
  89. package/docs/gitbook/address.md +48 -0
  90. package/docs/gitbook/cart.md +65 -0
  91. package/docs/gitbook/checkout.md +131 -0
  92. package/docs/gitbook/events.md +137 -0
  93. package/docs/gitbook/overview.md +166 -0
  94. package/docs/gitbook/product.md +64 -0
  95. package/docs/gitbook/quick-start-guide.md +393 -0
  96. package/docs/v1/README.md +210 -0
  97. package/docs/v1/api/actions/address-actions.md +281 -0
  98. package/docs/v1/api/actions/cart-actions.md +337 -0
  99. package/docs/v1/api/actions/checkout-actions.md +387 -0
  100. package/docs/v1/api/actions/product-actions.md +115 -0
  101. package/docs/v1/api/client.md +482 -0
  102. package/docs/v1/api/configuration.md +1 -0
  103. package/docs/v1/api/injection-methods.md +247 -0
  104. package/docs/v1/api/typescript-types.md +1 -0
  105. package/docs/v1/api/ui-helpers.md +200 -0
  106. package/docs/v1/examples/advanced-patterns.md +96 -0
  107. package/docs/v1/examples/checkout-flow.md +91 -0
  108. package/docs/v1/examples/custom-theming.md +63 -0
  109. package/docs/v1/examples/multi-product-page.md +90 -0
  110. package/docs/v1/examples/simple-product-page.md +89 -0
  111. package/docs/v1/getting-started/concepts.md +507 -0
  112. package/docs/v1/getting-started/installation.md +328 -0
  113. package/docs/v1/getting-started/quick-start.md +405 -0
  114. package/docs/v1/guides/address-component.md +431 -0
  115. package/docs/v1/guides/best-practices.md +324 -0
  116. package/docs/v1/guides/cart-component.md +737 -0
  117. package/docs/v1/guides/checkout-component.md +672 -0
  118. package/docs/v1/guides/events.md +191 -0
  119. package/docs/v1/guides/product-component.md +686 -0
  120. package/docs/v1/guides/product-list-component.md +598 -0
  121. package/docs/v1/guides/theming.md +216 -0
  122. package/docs/v1/integration/angular.md +39 -0
  123. package/docs/v1/integration/laravel.md +41 -0
  124. package/docs/v1/integration/nextjs.md +60 -0
  125. package/docs/v1/integration/proxy-setup.md +89 -0
  126. package/docs/v1/integration/react.md +64 -0
  127. package/docs/v1/integration/vanilla-js.md +84 -0
  128. package/docs/v1/integration/vue.md +34 -0
  129. package/docs/v1/reference/browser-support.md +35 -0
  130. package/docs/v1/reference/error-handling.md +70 -0
  131. package/docs/v1/reference/performance.md +54 -0
  132. package/docs/v1/reference/troubleshooting.md +64 -0
  133. package/package.json +19 -12
  134. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
  135. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  136. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  137. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  138. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  139. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  140. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  141. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  142. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  143. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  144. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  145. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  146. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  147. package/docs/ACTIONS.md +0 -1300
  148. package/docs/BROWSER_SUPPORT.md +0 -279
  149. package/docs/CONFIGURATION.md +0 -853
  150. package/docs/DOCUMENTATION_INDEX.md +0 -311
  151. package/docs/EVENTS.md +0 -798
  152. package/docs/PROXY.md +0 -228
  153. package/docs/THEMING.md +0 -592
  154. package/docs/TROUBLESHOOTING.md +0 -793
  155. package/umd/elements.js +0 -1
  156. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  157. /package/dist/types/{elements-builder-client.d.ts → clients/builder.d.ts} +0 -0
  158. /package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +0 -0
  159. /package/dist/types/{elements-client.d.ts → clients/main.d.ts} +0 -0
  160. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  161. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  162. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  163. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  164. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  165. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  166. /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
  167. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  168. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  169. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  170. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -0,0 +1,70 @@
1
+ # Error Handling
2
+
3
+ The SDK emits errors as events and (when applicable) throws a custom `SDKError`. Your app should handle both.
4
+
5
+ ## SDKError
6
+
7
+ All SDK errors use a custom error class:
8
+
9
+ ```typescript
10
+ class SDKError extends Error {
11
+ constructor(message: string, reThrow?: boolean);
12
+ name: 'SDKError';
13
+ isSdk: boolean;
14
+ reThrow: boolean;
15
+ }
16
+ ```
17
+
18
+ ## Catching Errors
19
+
20
+ ```javascript
21
+ try {
22
+ await window.elements.injectProductElement([
23
+ { containerId: 'product', identifier: 'invalid_id' }
24
+ ]);
25
+ } catch (error) {
26
+ if (error.name === 'SDKError') {
27
+ console.error('SDK Error:', error);
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Error Isolation
33
+
34
+ The SDK catches and contains its own errors so your app keeps running:
35
+
36
+ ```javascript
37
+ window.elements.actions.cart.addProduct([/* invalid */]);
38
+ console.log('App still working');
39
+ ```
40
+
41
+ ## Error Events
42
+
43
+ Listen for failure events to show user-friendly messages or trigger retries:
44
+
45
+ ```javascript
46
+ // Cart add failed
47
+ window.addEventListener('lce:actions.cart_product_add_failed', (event) => {
48
+ console.error('Failed to add:', event.detail.data.error);
49
+ });
50
+
51
+ // Address failed
52
+ window.addEventListener('lce:actions.address_failed', (event) => {
53
+ console.error('Address error:', event.detail.data.error);
54
+ });
55
+
56
+ // Checkout submit failed
57
+ window.addEventListener('lce:actions.checkout_submit_failed', (event) => {
58
+ console.error('Checkout failed:', event.detail.data.error);
59
+ });
60
+ ```
61
+
62
+ ## UI Errors
63
+
64
+ When a component fails to load, the SDK renders an error view inside the container and logs details to the console.
65
+
66
+ ## Related Docs
67
+
68
+ - [Events Guide](../guides/events.md)
69
+ - [Client API](../api/client.md)
70
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,54 @@
1
+ # Performance Guide
2
+
3
+ The SDK is optimized out of the box. These tweaks help reduce load time and layout shift.
4
+
5
+ ## 1) Load Non-Blocking
6
+
7
+ ```html
8
+ <script defer data-liquid-commerce-elements ...></script>
9
+ ```
10
+
11
+ ## 2) Use the Checkout-Only Build When Appropriate
12
+
13
+ If you only need checkout, use the tree-shaken build:
14
+
15
+ ```javascript
16
+ import { ElementsCheckout } from '@liquidcommerce/elements-sdk/checkout';
17
+ ```
18
+
19
+ ## 3) Inject Components When Needed
20
+
21
+ Inject above-the-fold products first, then load the rest:
22
+
23
+ ```javascript
24
+ await client.injectProductElement([
25
+ { containerId: 'hero-product', identifier: '001' }
26
+ ]);
27
+
28
+ setTimeout(async () => {
29
+ await client.injectProductElement([
30
+ { containerId: 'related-1', identifier: '002' },
31
+ { containerId: 'related-2', identifier: '003' }
32
+ ]);
33
+ }, 1000);
34
+ ```
35
+
36
+ ## 4) Reserve Space to Prevent Layout Shift
37
+
38
+ ```css
39
+ #product {
40
+ min-height: 600px;
41
+ }
42
+ ```
43
+
44
+ ## 5) Let the SDK Handle Media Optimization
45
+
46
+ The SDK automatically:
47
+ - Lazy loads images
48
+ - Uses responsive image sizes
49
+ - Virtualizes carousel images
50
+
51
+ ## Related Docs
52
+
53
+ - [Best Practices](../guides/best-practices.md)
54
+ - [Product Component](../guides/product-component.md)
@@ -0,0 +1,64 @@
1
+ # Troubleshooting
2
+
3
+ Common setup issues and how to resolve them.
4
+
5
+ ## SDK Script Not Loading
6
+
7
+ **Symptoms:** 404/CORS in Network tab, `window.elements` is undefined.
8
+
9
+ **Fixes:**
10
+ - Verify the script URL and that the tag includes `data-liquid-commerce-elements`.
11
+ - Check ad blockers; proxy the API if needed.
12
+ - Confirm `data-env` is set correctly.
13
+
14
+ ## Web Components Error
15
+
16
+ **Symptoms:** Console logs about Custom Elements or Shadow DOM.
17
+
18
+ **Fix:** Add the Web Components polyfill before the SDK:
19
+
20
+ ```html
21
+ <script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-bundle.js"></script>
22
+ <script defer data-liquid-commerce-elements ...></script>
23
+ ```
24
+
25
+ ## Product Not Showing
26
+
27
+ **Symptoms:** Empty container or error view.
28
+
29
+ **Fixes:**
30
+ - Confirm the container ID matches your HTML.
31
+ - Verify the product identifier exists.
32
+ - Check for errors in the console or network tab.
33
+
34
+ ## Cart Drawer Not Opening
35
+
36
+ **Symptoms:** Add to cart works but cart stays closed.
37
+
38
+ **Fixes:**
39
+ - Ensure a cart button is configured or call `window.elements.actions.cart.openCart()`.
40
+ - Check for JavaScript errors in the console.
41
+
42
+ ## Checkout Issues
43
+
44
+ **Symptoms:** Checkout fails to load or submit.
45
+
46
+ **Fixes:**
47
+ - Verify you are on a supported browser.
48
+ - Look for `checkout_*_failed` events in the console.
49
+ - Check for Stripe-related errors in the browser console.
50
+
51
+ ## Address/Availability Problems
52
+
53
+ **Symptoms:** Products show unavailable or address prompts fail.
54
+
55
+ **Fixes:**
56
+ - Make sure the address is set and valid.
57
+ - Listen for `lce:actions.address_failed` to surface errors.
58
+
59
+ ## Related Docs
60
+
61
+ - [Installation](../getting-started/installation.md)
62
+ - [Browser Support](./browser-support.md)
63
+ - [Error Handling](./error-handling.md)
64
+ - [Proxy Setup](../integration/proxy-setup.md)
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.7",
6
+ "version": "2.7.1",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -13,21 +13,23 @@
13
13
  "url": "https://github.com/liquidcommerce/elements-sdk/issues"
14
14
  },
15
15
  "module": "./dist/index.esm.js",
16
- "browser": "./umd/elements.js",
17
16
  "types": "./dist/types/index.d.ts",
18
17
  "packageManager": "pnpm@10.0.0",
19
18
  "exports": {
20
19
  ".": {
21
20
  "types": "./dist/types/index.d.ts",
22
21
  "import": "./dist/index.esm.js",
23
- "browser": "./umd/elements.js",
24
22
  "default": "./dist/index.esm.js"
25
23
  },
24
+ "./checkout": {
25
+ "types": "./dist/types/index.checkout.d.ts",
26
+ "import": "./dist/index.checkout.esm.js",
27
+ "default": "./dist/index.checkout.esm.js"
28
+ },
26
29
  "./package.json": "./package.json"
27
30
  },
28
31
  "files": [
29
32
  "dist",
30
- "umd",
31
33
  "docs",
32
34
  "README.md",
33
35
  "LICENSE"
@@ -39,21 +41,26 @@
39
41
  "type": "module",
40
42
  "sideEffects": [
41
43
  "dist/index.esm.js",
44
+ "dist/index.checkout.esm.js",
42
45
  "umd/elements.js",
46
+ "umd/elements-checkout.js",
43
47
  "src/index.ts",
44
- "src/index.umd.ts"
48
+ "src/index.umd.ts",
49
+ "src/index.checkout.ts",
50
+ "src/index.checkout.umd.ts"
45
51
  ],
46
52
  "scripts": {
47
53
  "build": "rollup -c",
54
+ "build:checkout": "rollup -c rollup.config.checkout.mjs",
48
55
  "build:dev": "rollup -c --environment NODE_ENV:development",
49
56
  "dev": "rollup -c -w",
50
57
  "type-check": "tsc --noEmit",
51
58
  "lint": "pnpm biome lint --write",
52
59
  "format": "biome format --write",
53
60
  "check": "pnpm biome check --write .",
54
- "fl": "pnpm check && pnpm build:dev",
61
+ "fl": "pnpm check && pnpm build && pnpm build:checkout",
55
62
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
56
- "clean": "rm -rf dist umd node_modules && pnpm install && pnpm build",
63
+ "clean": "rm -rf dist umd node_modules && pnpm install && pnpm build && pnpm build:checkout",
57
64
  "prepublishOnly": "pnpm run build",
58
65
  "deprecate:old": "npm deprecate @liquidcommerceteam/elements-sdk@\"*\" \"Package moved to @liquidcommerce/elements-sdk\"",
59
66
  "prepare": "husky"
@@ -70,9 +77,9 @@
70
77
  "embeddable commerce"
71
78
  ],
72
79
  "devDependencies": {
73
- "@biomejs/biome": "2.3.10",
74
- "@commitlint/cli": "^20.2.0",
75
- "@commitlint/config-conventional": "^20.2.0",
80
+ "@biomejs/biome": "2.3.12",
81
+ "@commitlint/cli": "^20.3.1",
82
+ "@commitlint/config-conventional": "^20.3.1",
76
83
  "@rollup/plugin-alias": "^6.0.0",
77
84
  "@rollup/plugin-commonjs": "^29.0.0",
78
85
  "@rollup/plugin-json": "^6.1.0",
@@ -86,11 +93,11 @@
86
93
  "@semantic-release/npm": "^13.1.3",
87
94
  "@semantic-release/release-notes-generator": "^14.1.0",
88
95
  "@types/core-js": "^2.5.8",
89
- "@types/node": "^25.0.3",
96
+ "@types/node": "^25.0.10",
90
97
  "conventional-changelog-cli": "^5.0.0",
91
98
  "husky": "^9.1.7",
92
99
  "process": "^0.11.10",
93
- "rollup": "^4.54.0",
100
+ "rollup": "^4.56.0",
94
101
  "rollup-obfuscator": "^4.1.1",
95
102
  "rollup-plugin-typescript2": "^0.36.0",
96
103
  "semantic-release": "^25.0.2",
@@ -1,37 +0,0 @@
1
- import { BaseComponent } from '@/core/base-component.service';
2
- import type { IFulfillment, IProduct } from '@/interfaces/api/product.interface';
3
- import type { ProductListCardVariantType } from '@/interfaces/core.interface';
4
- export interface IProductListCardParams {
5
- variant: ProductListCardVariantType;
6
- fillCard: boolean;
7
- product: IProduct;
8
- shippingFulfillment: IFulfillment | null;
9
- onDemandFulfillment: IFulfillment | null;
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
- }
@@ -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,3 +0,0 @@
1
- export * from './image-carousel.style';
2
- export * from './product.style';
3
- export * from './retailers.style';
@@ -1 +0,0 @@
1
- export * from './product-list.style';
@@ -1,3 +0,0 @@
1
- export * from './drawer.style';
2
- export * from './loading.style';
3
- export * from './promo-code-ticker.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
- }