@liquidcommerce/elements-sdk 2.6.0-beta.2 → 2.6.0-beta.20
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 +11630 -11155
- package/dist/types/constants/core.constant.d.ts +11 -0
- package/dist/types/core/api/api-client.service.d.ts +15 -15
- package/dist/types/core/api/auth-client.service.d.ts +34 -23
- package/dist/types/core/api/http-client.service.d.ts +0 -1
- package/dist/types/core/client/client-action.service.d.ts +18 -12
- package/dist/types/core/client/client-config.service.d.ts +3 -0
- package/dist/types/core/command/base-command.service.d.ts +2 -2
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +14 -11
- package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
- package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +16 -107
- package/dist/types/core/store/interfaces/core.interface.d.ts +7 -5
- package/dist/types/core/store/interfaces/product.interface.d.ts +12 -66
- package/dist/types/core/store/store.constant.d.ts +1 -1
- package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
- package/dist/types/elements-base-client.d.ts +1 -1
- package/dist/types/enums/cloud.enum.d.ts +19 -76
- package/dist/types/enums/core.enum.d.ts +25 -0
- package/dist/types/interfaces/api/address.interface.d.ts +28 -0
- package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
- package/dist/types/interfaces/api/checkout.interface.d.ts +213 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
- package/dist/types/interfaces/api/product.interface.d.ts +106 -0
- package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
- package/dist/types/interfaces/core.interface.d.ts +7 -1
- package/dist/types/modules/address/address.command.d.ts +3 -3
- package/dist/types/modules/address/address.interface.d.ts +0 -7
- package/dist/types/modules/cart/cart.commands.d.ts +4 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- 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/components/components.d.ts +2 -4
- package/dist/types/modules/product/product.commands.d.ts +3 -2
- package/dist/types/modules/product-list/components/index.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
- package/dist/types/modules/product-list/product-list.commands.d.ts +4 -2
- package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
- package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
- package/dist/types/static/icon/filter.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/format.d.ts +0 -13
- package/docs/ACTIONS.md +13 -13
- package/docs/EVENTS.md +7 -7
- package/package.json +8 -9
- package/umd/elements.js +1 -1
- package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -7
- package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product/utils/helpers.d.ts +0 -3
- package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
- package/dist/types/utils/helper.d.ts +0 -27
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) => {
|