@liquidcommerce/elements-sdk 2.6.0-beta.17 → 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.
- package/README.md +7 -7
- package/dist/index.esm.js +10511 -10682
- package/dist/types/core/api/api-client.service.d.ts +6 -6
- package/dist/types/core/client/client-action.service.d.ts +1 -2
- package/dist/types/core/client/client-config.service.d.ts +2 -0
- package/dist/types/core/google-tag-manager.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +35 -51
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +15 -106
- package/dist/types/core/store/interfaces/core.interface.d.ts +3 -2
- package/dist/types/enums/cloud.enum.d.ts +0 -77
- package/dist/types/enums/core.enum.d.ts +24 -0
- package/dist/types/interfaces/api/cart.interface.d.ts +11 -7
- package/dist/types/interfaces/api/checkout.interface.d.ts +211 -0
- package/dist/types/interfaces/api/product.interface.d.ts +2 -2
- package/dist/types/interfaces/cloud/index.d.ts +0 -2
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +9 -1
- package/dist/types/interfaces/core.interface.d.ts +7 -1
- package/dist/types/modules/cart/cart.commands.d.ts +4 -4
- package/dist/types/modules/checkout/checkout.commands.d.ts +12 -7
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/constant.d.ts +3 -0
- package/dist/types/modules/product/product.commands.d.ts +1 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
- package/docs/ACTIONS.md +13 -13
- package/docs/EVENTS.md +7 -7
- package/package.json +5 -5
- package/umd/elements.js +1 -1
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- 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 {
|
|
1018
|
-
console.log(`✅ Promo applied! Discount: $${
|
|
1019
|
-
showSavingsMessage(
|
|
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 {
|
|
1079
|
-
console.log(`✅ Checkout promo applied! Saved: $${
|
|
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 {
|
|
1522
|
-
console.log(`Promo applied! Saved $${
|
|
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) => {
|