@liquidcommerce/elements-sdk 2.6.0-beta.2 → 2.6.0-beta.21

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 (88) hide show
  1. package/README.md +7 -7
  2. package/dist/index.esm.js +11602 -11122
  3. package/dist/types/constants/core.constant.d.ts +11 -0
  4. package/dist/types/core/api/api-client.service.d.ts +15 -15
  5. package/dist/types/core/api/auth-client.service.d.ts +34 -23
  6. package/dist/types/core/api/http-client.service.d.ts +0 -1
  7. package/dist/types/core/client/client-action.service.d.ts +18 -12
  8. package/dist/types/core/client/client-config.service.d.ts +3 -0
  9. package/dist/types/core/command/base-command.service.d.ts +2 -2
  10. package/dist/types/core/command/common-command.service.d.ts +2 -1
  11. package/dist/types/core/google-tag-manager.service.d.ts +14 -11
  12. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
  13. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  14. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  15. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  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 -55
  19. package/dist/types/core/store/interfaces/checkout.interface.d.ts +16 -107
  20. package/dist/types/core/store/interfaces/core.interface.d.ts +7 -5
  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 +1 -1
  25. package/dist/types/enums/cloud.enum.d.ts +19 -76
  26. package/dist/types/enums/core.enum.d.ts +25 -0
  27. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  28. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  29. package/dist/types/interfaces/api/checkout.interface.d.ts +213 -0
  30. package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
  31. package/dist/types/interfaces/api/product.interface.d.ts +106 -0
  32. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  33. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  34. package/dist/types/interfaces/core.interface.d.ts +7 -1
  35. package/dist/types/modules/address/address.command.d.ts +3 -3
  36. package/dist/types/modules/address/address.interface.d.ts +0 -7
  37. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  38. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  39. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  40. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  41. package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
  42. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  43. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  44. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  45. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  46. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  47. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  48. package/dist/types/modules/checkout/constant.d.ts +3 -0
  49. package/dist/types/modules/product/components/components.d.ts +2 -4
  50. package/dist/types/modules/product/product.commands.d.ts +3 -2
  51. package/dist/types/modules/product-list/components/index.d.ts +2 -0
  52. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
  53. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
  54. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
  55. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
  56. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
  57. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
  58. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
  59. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
  60. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
  61. package/dist/types/modules/product-list/product-list.commands.d.ts +4 -2
  62. package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
  63. package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
  64. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
  65. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  66. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  67. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  68. package/dist/types/static/icon/index.d.ts +1 -0
  69. package/dist/types/utils/format.d.ts +0 -13
  70. package/docs/ACTIONS.md +13 -13
  71. package/docs/EVENTS.md +7 -7
  72. package/package.json +8 -9
  73. package/umd/elements.js +1 -1
  74. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  75. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  76. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  77. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  78. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  79. package/dist/types/interfaces/cloud/index.d.ts +0 -7
  80. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  81. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  82. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  83. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  84. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  85. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  86. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  87. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  88. package/dist/types/utils/helper.d.ts +0 -27
package/docs/ACTIONS.md CHANGED
@@ -26,8 +26,8 @@ await actions.cart.applyPromoCode('SAVE20');
26
26
 
27
27
  // 2. Listen for success/failure feedback via events
28
28
  window.addEventListener('lce:actions.cart_promo_code_applied', function(event) {
29
- const { discountAmount, newTotal } = event.detail.data;
30
- showSuccessMessage(`🎉 Promo applied! You saved $${discountAmount}!`);
29
+ const { discount, newTotal } = event.detail.data;
30
+ showSuccessMessage(`🎉 Promo applied! You saved $${discount}!`);
31
31
  updateCartDisplay(newTotal);
32
32
  });
33
33
 
@@ -262,7 +262,7 @@ All actions provide feedback through events. Here are all available success/fail
262
262
  'lce:actions.cart_product_add_failed' // { identifiers: string[], error: string }
263
263
 
264
264
  // Promo code management
265
- 'lce:actions.cart_promo_code_applied' // { discountAmount?: number, newTotal?: number }
265
+ 'lce:actions.cart_promo_code_applied' // { discount?: number, newTotal?: number }
266
266
  'lce:actions.cart_promo_code_removed' // { newTotal?: number }
267
267
  'lce:actions.cart_promo_code_failed' // { error: string }
268
268
  ```
@@ -274,7 +274,7 @@ All actions provide feedback through events. Here are all available success/fail
274
274
  'lce:actions.checkout_product_add_failed' // { identifiers: string[], error: string, isPresale?: boolean }
275
275
 
276
276
  // Promo code management
277
- 'lce:actions.checkout_promo_code_applied' // { discountAmount?: number, newTotal?: number }
277
+ 'lce:actions.checkout_promo_code_applied' // { discount?: number, newTotal?: number }
278
278
  'lce:actions.checkout_promo_code_removed' // { newTotal?: number }
279
279
  'lce:actions.checkout_promo_code_failed' // { error: string }
280
280
 
@@ -335,10 +335,10 @@ window.addEventListener('lce:actions.cart_product_add_success', function(event)
335
335
  ```javascript
336
336
  // ✅ Create reusable handlers
337
337
  const handlePromoSuccess = (event) => {
338
- const { discountAmount, newTotal } = event.detail.data;
339
- showSuccessMessage(`Discount applied! Saved: $${discountAmount}`);
338
+ const { discount, newTotal } = event.detail.data;
339
+ showSuccessMessage(`Discount applied! Saved: $${discount}`);
340
340
  updatePriceDisplay(newTotal);
341
- trackPromoSuccess(discountAmount);
341
+ trackPromoSuccess(discount);
342
342
  };
343
343
 
344
344
  const handlePromoFailure = (event) => {
@@ -472,12 +472,12 @@ await actions.cart.applyPromoCode('WELCOME10');
472
472
 
473
473
  // Listen for success
474
474
  window.addEventListener('lce:actions.cart_promo_code_applied', function(event) {
475
- const { discountAmount, newTotal } = event.detail.data;
476
- showMessage(`Welcome discount applied! You saved $${discountAmount}!`);
475
+ const { discount, newTotal } = event.detail.data;
476
+ showMessage(`Welcome discount applied! You saved $${discount}!`);
477
477
  updateCartDisplay(newTotal);
478
478
 
479
479
  // Track successful promo usage
480
- analytics.track('Promo Applied', { discount: discountAmount });
480
+ analytics.track('Promo Applied', { discount: discount });
481
481
  });
482
482
 
483
483
  // Listen for failure and try fallback
@@ -624,12 +624,12 @@ const customer = getCurrentCustomer();
624
624
 
625
625
  // Set up event listeners first
626
626
  window.addEventListener('lce:actions.checkout_promo_code_applied', function(event) {
627
- const { discountAmount, newTotal } = event.detail.data;
628
- showCheckoutSuccess(`Discount applied! You saved $${discountAmount}`);
627
+ const { discount, newTotal } = event.detail.data;
628
+ showCheckoutSuccess(`Discount applied! You saved $${discount}`);
629
629
  updateCheckoutTotal(newTotal);
630
630
 
631
631
  // Track successful conversion optimization
632
- analytics.track('Checkout Discount Applied', { discount: discountAmount });
632
+ analytics.track('Checkout Discount Applied', { discount: discount });
633
633
  });
634
634
 
635
635
  window.addEventListener('lce:actions.checkout_promo_code_failed', function(event) {
package/docs/EVENTS.md CHANGED
@@ -470,7 +470,7 @@ These events fire when programmatic actions succeed or fail, giving you complete
470
470
 
471
471
  // Promo code feedback
472
472
  'lce:actions.cart_promo_code_applied' // → "Promo code worked - show success!"
473
- // Data: { discountAmount?: number, newTotal?: number }
473
+ // Data: { discount?: number, newTotal?: number }
474
474
 
475
475
  'lce:actions.cart_promo_code_removed' // → "Promo code removed successfully"
476
476
  // Data: { newTotal?: number }
@@ -490,7 +490,7 @@ These events fire when programmatic actions succeed or fail, giving you complete
490
490
 
491
491
  // Promo code feedback
492
492
  'lce:actions.checkout_promo_code_applied' // → "Checkout discount applied!"
493
- // Data: { discountAmount?: number, newTotal?: number }
493
+ // Data: { discount?: number, newTotal?: number }
494
494
 
495
495
  'lce:actions.checkout_promo_code_removed' // → "Checkout discount removed"
496
496
  // Data: { newTotal?: number }
@@ -519,11 +519,11 @@ await actions.cart.applyPromoCode('SECRET20');
519
519
 
520
520
  // Get feedback (secure)
521
521
  window.addEventListener('lce:actions.cart_promo_code_applied', function(event) {
522
- const { discountAmount, newTotal } = event.detail.data;
522
+ const { discount, newTotal } = event.detail.data;
523
523
  // ✅ You get: discount amount, new total
524
524
  // 🚫 You DON'T get: 'SECRET20' (secure!)
525
525
 
526
- showSuccessMessage(`🎉 Discount applied! You saved $${discountAmount}!`);
526
+ showSuccessMessage(`🎉 Discount applied! You saved $${discount}!`);
527
527
  updateCartTotal(newTotal);
528
528
  });
529
529
  ```
@@ -539,14 +539,14 @@ async function applyPromoCodeWithFeedback(code) {
539
539
 
540
540
  // Set up event listeners BEFORE firing action
541
541
  const successHandler = (event) => {
542
- const { discountAmount, newTotal } = event.detail.data;
542
+ const { discount, newTotal } = event.detail.data;
543
543
  hideLoadingMessage();
544
- showSuccessMessage(`🎉 Success! You saved $${discountAmount}!`);
544
+ showSuccessMessage(`🎉 Success! You saved $${discount}!`);
545
545
  updatePriceDisplay(newTotal);
546
546
 
547
547
  // Track successful promo usage
548
548
  analytics.track('Promo Applied', {
549
- discount: discountAmount,
549
+ discount: discount,
550
550
  newTotal: newTotal
551
551
  });
552
552
 
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.0-beta.2",
6
+ "version": "2.6.0-beta.21",
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"
@@ -71,9 +70,9 @@
71
70
  "embeddable commerce"
72
71
  ],
73
72
  "devDependencies": {
74
- "@biomejs/biome": "2.3.5",
75
- "@commitlint/cli": "^20.1.0",
76
- "@commitlint/config-conventional": "^20.0.0",
73
+ "@biomejs/biome": "2.3.10",
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",
@@ -84,14 +83,14 @@
84
83
  "@semantic-release/commit-analyzer": "^13.0.1",
85
84
  "@semantic-release/git": "^10.0.1",
86
85
  "@semantic-release/github": "^12.0.2",
87
- "@semantic-release/npm": "^13.1.2",
86
+ "@semantic-release/npm": "^13.1.3",
88
87
  "@semantic-release/release-notes-generator": "^14.1.0",
89
88
  "@types/core-js": "^2.5.8",
90
- "@types/node": "^24.10.1",
89
+ "@types/node": "^25.0.3",
91
90
  "conventional-changelog-cli": "^5.0.0",
92
91
  "husky": "^9.1.7",
93
92
  "process": "^0.11.10",
94
- "rollup": "^4.53.3",
93
+ "rollup": "^4.53.5",
95
94
  "rollup-obfuscator": "^4.1.1",
96
95
  "rollup-plugin-typescript2": "^0.36.0",
97
96
  "semantic-release": "^25.0.2",