@liquidcommerce/elements-sdk 2.5.8 → 2.5.9

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 (63) hide show
  1. package/README.md +18 -15
  2. package/dist/index.esm.js +12564 -11521
  3. package/dist/types/constants/core.constant.d.ts +1 -0
  4. package/dist/types/core/api-client.service.d.ts +1 -1
  5. package/dist/types/core/client/client-action.service.d.ts +0 -4
  6. package/dist/types/core/client/client-config.service.d.ts +4 -0
  7. package/dist/types/core/fingerprint.service.d.ts +2 -1
  8. package/dist/types/core/google-tag-manager.service.d.ts +0 -19
  9. package/dist/types/core/logger/logger.service.d.ts +0 -2
  10. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +0 -2
  11. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +0 -10
  12. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +14 -8
  13. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +0 -6
  14. package/dist/types/core/singleton-manager.service.d.ts +6 -1
  15. package/dist/types/core/store/interfaces/checkout.interface.d.ts +75 -80
  16. package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
  17. package/dist/types/core/store/store.constant.d.ts +1 -1
  18. package/dist/types/enums/core.enum.d.ts +16 -10
  19. package/dist/types/interfaces/cloud/checkout.interface.d.ts +1 -1
  20. package/dist/types/interfaces/configs/checkout.interface.d.ts +0 -1
  21. package/dist/types/interfaces/core.interface.d.ts +2 -0
  22. package/dist/types/modules/cart/components/cart-retailer.component.d.ts +0 -2
  23. package/dist/types/modules/checkout/checkout.commands.d.ts +28 -25
  24. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +14 -0
  25. package/dist/types/modules/checkout/components/checkout-buyer-summary.component.d.ts +7 -0
  26. package/dist/types/modules/checkout/components/{checkout-information-section.component.d.ts → checkout-buyer.component.d.ts} +5 -5
  27. package/dist/types/modules/checkout/components/checkout-deliver-to-summary.component.d.ts +7 -0
  28. package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +13 -0
  29. package/dist/types/modules/checkout/components/checkout-information.component.d.ts +17 -0
  30. package/dist/types/modules/checkout/components/{checkout-summary-section.component.d.ts → checkout-order-summary.component.d.ts} +1 -1
  31. package/dist/types/modules/checkout/components/checkout-payment-summary.component.d.ts +7 -0
  32. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +30 -0
  33. package/dist/types/modules/checkout/components/{summary/checkout-place-order-button.component.d.ts → checkout-place-order-button.component.d.ts} +1 -5
  34. package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +7 -0
  35. package/dist/types/modules/checkout/components/{information/checkout-stripe-form.component.d.ts → checkout-stripe-form.component.d.ts} +5 -3
  36. package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +50 -0
  37. package/dist/types/modules/checkout/components/index.d.ts +23 -18
  38. package/dist/types/modules/checkout/constant.d.ts +0 -1
  39. package/dist/types/modules/product/components/components.d.ts +1 -1
  40. package/dist/types/modules/product/utils/helpers.d.ts +0 -7
  41. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +4 -4
  42. package/dist/types/modules/ui-components/input/input.component.d.ts +4 -4
  43. package/docs/ACTIONS.md +29 -29
  44. package/docs/EVENTS.md +62 -29
  45. package/docs/THEMING.md +2 -5
  46. package/package.json +7 -7
  47. package/umd/elements.js +1 -1
  48. package/dist/types/modules/checkout/checkout.commands.helper.d.ts +0 -13
  49. package/dist/types/modules/checkout/components/information/checkout-billing-form.component.d.ts +0 -18
  50. package/dist/types/modules/checkout/components/information/checkout-buyer-information-form.component.d.ts +0 -12
  51. package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +0 -17
  52. package/dist/types/modules/checkout/components/information/checkout-payment-form.component.d.ts +0 -21
  53. package/dist/types/modules/product/utils/index.d.ts +0 -2
  54. /package/dist/types/modules/checkout/components/{summary/checkout-amounts.component.d.ts → checkout-amounts.component.d.ts} +0 -0
  55. /package/dist/types/modules/checkout/components/{summary/checkout-completed.component.d.ts → checkout-completed.component.d.ts} +0 -0
  56. /package/dist/types/modules/checkout/components/{summary/checkout-gift-cards.component.d.ts → checkout-gift-cards.component.d.ts} +0 -0
  57. /package/dist/types/modules/checkout/components/{summary/checkout-item-quantity.component.d.ts → checkout-item-quantity.component.d.ts} +0 -0
  58. /package/dist/types/modules/checkout/components/{summary/checkout-item.component.d.ts → checkout-item.component.d.ts} +0 -0
  59. /package/dist/types/modules/checkout/components/{summary/checkout-items.component.d.ts → checkout-items.component.d.ts} +0 -0
  60. /package/dist/types/modules/checkout/components/{summary/checkout-presale-expired.component.d.ts → checkout-presale-expired.component.d.ts} +0 -0
  61. /package/dist/types/modules/checkout/components/{summary/checkout-promo-code.component.d.ts → checkout-promo-code.component.d.ts} +0 -0
  62. /package/dist/types/modules/checkout/components/{summary/checkout-tips.component.d.ts → checkout-tips.component.d.ts} +0 -0
  63. /package/dist/types/modules/checkout/components/{summary/promo-pc-gc.component.d.ts → promo-pc-gc.component.d.ts} +0 -0
package/README.md CHANGED
@@ -1014,13 +1014,13 @@ 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 { applied, discountAmount, newTotal } = event.detail.data;
1017
+ const { discountAmount, newTotal } = event.detail.data;
1018
1018
  console.log(`✅ Promo applied! Discount: $${discountAmount}, New total: $${newTotal}`);
1019
1019
  showSavingsMessage(discountAmount);
1020
1020
  });
1021
1021
 
1022
1022
  window.addEventListener('lce:actions.cart_promo_code_failed', function(event) {
1023
- const { attempted, error } = event.detail.data;
1023
+ const { error } = event.detail.data;
1024
1024
  console.log(`❌ Promo failed:`, error);
1025
1025
  showErrorMessage('Promo code could not be applied');
1026
1026
  });
@@ -1075,27 +1075,27 @@ 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 { applied, discountAmount, newTotal } = event.detail.data;
1078
+ const { discountAmount, newTotal } = event.detail.data;
1079
1079
  console.log(`✅ Checkout promo applied! Saved: $${discountAmount}`);
1080
1080
  updateCheckoutTotal(newTotal);
1081
1081
  });
1082
1082
 
1083
1083
  window.addEventListener('lce:actions.checkout_promo_code_failed', function(event) {
1084
- const { attempted, error } = event.detail.data;
1084
+ const { error } = event.detail.data;
1085
1085
  console.log(`❌ Checkout promo failed:`, error);
1086
1086
  showCheckoutError('Promo code could not be applied');
1087
1087
  });
1088
1088
 
1089
1089
  // Listen for gift card feedback
1090
1090
  window.addEventListener('lce:actions.checkout_gift_card_applied', function(event) {
1091
- const { applied, newTotal } = event.detail.data;
1091
+ const { newTotal } = event.detail.data;
1092
1092
  console.log('✅ Gift card applied successfully!');
1093
1093
  updateCheckoutTotal(newTotal);
1094
1094
  showSuccessMessage('Gift card applied to your order');
1095
1095
  });
1096
1096
 
1097
1097
  window.addEventListener('lce:actions.checkout_gift_card_failed', function(event) {
1098
- const { attempted, error } = event.detail.data;
1098
+ const { error } = event.detail.data;
1099
1099
  console.log(`❌ Gift card failed:`, error);
1100
1100
  showCheckoutError('Gift card could not be applied');
1101
1101
  });
@@ -1168,8 +1168,11 @@ window.elements.onAllActions((data, metadata) => {
1168
1168
  - `lce:actions.checkout_submit_started` - Order submission began
1169
1169
  - `lce:actions.checkout_submit_completed` - Order completed successfully
1170
1170
  - `lce:actions.checkout_submit_failed` - Order failed
1171
- - `lce:actions.checkout_customer_information_updated` - Customer info entered
1172
- - `lce:actions.checkout_billing_information_updated` - Billing info entered
1171
+ - `lce:actions.checkout_customer_information_updated` - Customer info entered (returns boolean only, no sensitive data)
1172
+ - `lce:actions.checkout_gift_information_updated` - Gift recipient info entered (returns boolean only, no sensitive data)
1173
+ - `lce:actions.checkout_billing_information_updated` - Billing info entered (returns boolean only, no sensitive data)
1174
+
1175
+ **Security Note:** Form update events return only `boolean: true` to track completion without exposing sensitive customer information (names, emails, phone numbers, addresses, etc.). This protects your customers from malicious scripts and data breaches.
1173
1176
 
1174
1177
  #### Address Events
1175
1178
  - `lce:actions.address_updated` - Address information changed
@@ -1488,12 +1491,12 @@ await client.actions.checkout.removeGiftCard('GIFT-1234-5678-9012');
1488
1491
 
1489
1492
  // Listen for gift card events
1490
1493
  window.addEventListener('lce:actions.checkout_gift_card_applied', (event) => {
1491
- const { code, appliedAmount, remainingBalance } = event.detail.data;
1492
- console.log(`Applied $${appliedAmount}, Remaining: $${remainingBalance}`);
1494
+ const { newTotal } = event.detail.data;
1495
+ console.log(`Gift card applied! New total: $${newTotal}`);
1493
1496
  });
1494
1497
 
1495
1498
  window.addEventListener('lce:actions.checkout_gift_card_failed', (event) => {
1496
- const { code, error } = event.detail.data;
1499
+ const { error } = event.detail.data;
1497
1500
  console.log('Gift card failed:', error);
1498
1501
  });
1499
1502
  ```
@@ -1514,13 +1517,13 @@ await client.actions.cart.removePromoCode();
1514
1517
 
1515
1518
  // Listen for promo events
1516
1519
  window.addEventListener('lce:actions.cart_promo_code_applied', (event) => {
1517
- const { code, discountAmount, newTotal } = event.detail.data;
1518
- console.log(`${code} saved $${discountAmount}! New total: $${newTotal}`);
1520
+ const { discountAmount, newTotal } = event.detail.data;
1521
+ console.log(`Promo applied! Saved $${discountAmount}! New total: $${newTotal}`);
1519
1522
  });
1520
1523
 
1521
1524
  window.addEventListener('lce:actions.cart_promo_code_failed', (event) => {
1522
- const { code, error } = event.detail.data;
1523
- console.log('Promo failed:', error.message);
1525
+ const { error } = event.detail.data;
1526
+ console.log('Promo failed:', error);
1524
1527
  });
1525
1528
  ```
1526
1529