@liquidcommerce/elements-sdk 2.6.0-beta.16 → 2.6.0-beta.18

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 (38) hide show
  1. package/README.md +7 -7
  2. package/dist/index.esm.js +10495 -10660
  3. package/dist/types/core/api/api-client.service.d.ts +6 -6
  4. package/dist/types/core/client/client-action.service.d.ts +1 -2
  5. package/dist/types/core/client/client-config.service.d.ts +2 -0
  6. package/dist/types/core/google-tag-manager.service.d.ts +1 -1
  7. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -1
  8. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +35 -51
  9. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  10. package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
  11. package/dist/types/core/store/interfaces/checkout.interface.d.ts +15 -106
  12. package/dist/types/core/store/interfaces/core.interface.d.ts +3 -2
  13. package/dist/types/enums/cloud.enum.d.ts +0 -77
  14. package/dist/types/enums/core.enum.d.ts +24 -0
  15. package/dist/types/interfaces/api/cart.interface.d.ts +11 -7
  16. package/dist/types/interfaces/api/checkout.interface.d.ts +211 -0
  17. package/dist/types/interfaces/api/product.interface.d.ts +2 -2
  18. package/dist/types/interfaces/cloud/index.d.ts +0 -2
  19. package/dist/types/interfaces/cloud/retailer.interface.d.ts +9 -1
  20. package/dist/types/interfaces/core.interface.d.ts +7 -1
  21. package/dist/types/modules/cart/cart.commands.d.ts +4 -4
  22. package/dist/types/modules/checkout/checkout.commands.d.ts +12 -7
  23. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  24. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  25. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  26. package/dist/types/modules/checkout/constant.d.ts +3 -0
  27. package/dist/types/modules/product/product.commands.d.ts +1 -0
  28. package/dist/types/modules/product-list/product-list.commands.d.ts +1 -0
  29. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
  30. package/docs/ACTIONS.md +13 -13
  31. package/docs/EVENTS.md +7 -7
  32. package/package.json +5 -5
  33. package/umd/elements.js +1 -1
  34. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
  35. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  36. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  37. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  38. package/dist/types/utils/helper.d.ts +0 -28
package/README.md CHANGED
@@ -1014,9 +1014,9 @@ await actions.cart.applyPromoCode('WELCOME10');
1014
1014
 
1015
1015
  // Listen for promo code feedback
1016
1016
  window.addEventListener('lce:actions.cart_promo_code_applied', function(event) {
1017
- const { discountAmount, newTotal } = event.detail.data;
1018
- console.log(`✅ Promo applied! Discount: $${discountAmount}, New total: $${newTotal}`);
1019
- showSavingsMessage(discountAmount);
1017
+ const { discount, newTotal } = event.detail.data;
1018
+ console.log(`✅ Promo applied! Discount: $${discount}, New total: $${newTotal}`);
1019
+ showSavingsMessage(discount);
1020
1020
  });
1021
1021
 
1022
1022
  window.addEventListener('lce:actions.cart_promo_code_failed', function(event) {
@@ -1075,8 +1075,8 @@ await actions.checkout.applyGiftCard('GIFT123');
1075
1075
 
1076
1076
  // Listen for checkout promo code feedback
1077
1077
  window.addEventListener('lce:actions.checkout_promo_code_applied', function(event) {
1078
- const { discountAmount, newTotal } = event.detail.data;
1079
- console.log(`✅ Checkout promo applied! Saved: $${discountAmount}`);
1078
+ const { discount, newTotal } = event.detail.data;
1079
+ console.log(`✅ Checkout promo applied! Saved: $${discount}`);
1080
1080
  updateCheckoutTotal(newTotal);
1081
1081
  });
1082
1082
 
@@ -1518,8 +1518,8 @@ await client.actions.cart.removePromoCode();
1518
1518
 
1519
1519
  // Listen for promo events
1520
1520
  window.addEventListener('lce:actions.cart_promo_code_applied', (event) => {
1521
- const { discountAmount, newTotal } = event.detail.data;
1522
- console.log(`Promo applied! Saved $${discountAmount}! New total: $${newTotal}`);
1521
+ const { discount, newTotal } = event.detail.data;
1522
+ console.log(`Promo applied! Saved $${discount}! New total: $${newTotal}`);
1523
1523
  });
1524
1524
 
1525
1525
  window.addEventListener('lce:actions.cart_promo_code_failed', (event) => {