@liquidcommerce/elements-sdk 2.5.6-beta.4 → 2.5.6-beta.6
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.
- package/README.md +18 -15
- package/dist/index.esm.js +11745 -10946
- package/dist/types/core/client/client-action.service.d.ts +0 -4
- package/dist/types/core/google-tag-manager.service.d.ts +0 -19
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +0 -2
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +0 -10
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +14 -8
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +0 -6
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +72 -80
- package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
- package/dist/types/enums/core.enum.d.ts +14 -10
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +0 -1
- package/dist/types/modules/checkout/checkout.commands.d.ts +25 -23
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +14 -0
- package/dist/types/modules/checkout/components/checkout-buyer-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{checkout-information-section.component.d.ts → checkout-buyer.component.d.ts} +5 -5
- package/dist/types/modules/checkout/components/checkout-deliver-to-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +13 -0
- package/dist/types/modules/checkout/components/checkout-information.component.d.ts +17 -0
- package/dist/types/modules/checkout/components/{checkout-summary-section.component.d.ts → checkout-order-summary.component.d.ts} +1 -1
- package/dist/types/modules/checkout/components/checkout-payment-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +47 -0
- package/dist/types/modules/checkout/components/{summary/checkout-place-order-button.component.d.ts → checkout-place-order-button.component.d.ts} +1 -5
- package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{information/checkout-stripe-form.component.d.ts → checkout-stripe-form.component.d.ts} +5 -3
- package/dist/types/modules/checkout/components/index.d.ts +22 -18
- package/dist/types/modules/checkout/constant.d.ts +0 -1
- package/dist/types/modules/product/utils/helpers.d.ts +0 -7
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +4 -4
- package/dist/types/modules/ui-components/input/input.component.d.ts +4 -4
- package/docs/ACTIONS.md +29 -29
- package/docs/EVENTS.md +62 -29
- package/docs/THEMING.md +2 -5
- package/package.json +7 -7
- package/umd/elements.js +1 -1
- package/dist/types/modules/checkout/checkout.commands.helper.d.ts +0 -13
- package/dist/types/modules/checkout/components/information/checkout-billing-form.component.d.ts +0 -18
- package/dist/types/modules/checkout/components/information/checkout-buyer-information-form.component.d.ts +0 -12
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +0 -17
- package/dist/types/modules/checkout/components/information/checkout-payment-form.component.d.ts +0 -21
- /package/dist/types/modules/checkout/components/{summary/checkout-amounts.component.d.ts → checkout-amounts.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-completed.component.d.ts → checkout-completed.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-gift-cards.component.d.ts → checkout-gift-cards.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item-quantity.component.d.ts → checkout-item-quantity.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item.component.d.ts → checkout-item.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-items.component.d.ts → checkout-items.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-presale-expired.component.d.ts → checkout-presale-expired.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-promo-code.component.d.ts → checkout-promo-code.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-tips.component.d.ts → checkout-tips.component.d.ts} +0 -0
- /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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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.
|
|
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 {
|
|
1492
|
-
console.log(`
|
|
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 {
|
|
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 {
|
|
1518
|
-
console.log(
|
|
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 {
|
|
1523
|
-
console.log('Promo failed:', error
|
|
1525
|
+
const { error } = event.detail.data;
|
|
1526
|
+
console.log('Promo failed:', error);
|
|
1524
1527
|
});
|
|
1525
1528
|
```
|
|
1526
1529
|
|