@salla.sa/twilight-components 2.14.492 → 2.14.494
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/dist/cjs/{filepond-CMzI_Zn9.js → filepond-CYww4tEC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-ChvDhRiZ.js → filepond-plugin-file-poster-DPW9mW_l.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BM0ckfFB.js → filepond-plugin-file-validate-size-CK2KIHil.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CgTEjruH.js → filepond-plugin-file-validate-type-CPvzHnlO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BEAVKR6v.js → filepond-plugin-image-edit-DfYj0utx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CSPPm2wZ.js → filepond-plugin-image-exif-orientation-BPH4xTYe.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DfOg_WnI.js → filepond-plugin-image-preview-BbB7wI4M.js} +1 -1
- package/dist/cjs/{functions-NX0FxE-j.js → functions-C3W0O3Qh.js} +1 -1
- package/dist/cjs/{index-BLRU4abB.js → index-BQKhP5JS.js} +14 -14
- package/dist/cjs/{index-A4KCMRpm.js → index-CQRzEmek.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +23 -11
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/{salla-count-down.cjs.entry.js → salla-count-down_2.cjs.entry.js} +204 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +3 -3
- package/dist/cjs/{salla-reward-action_4.cjs.entry.js → salla-loyalty-exchange-product-card_5.cjs.entry.js} +63 -21
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +11 -11
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +6 -5
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +6 -5
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +5 -5
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/{salla-order-options-modal_3.cjs.entry.js → salla-product-card_2.cjs.entry.js} +1 -204
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-g2hwsJdv.js → tracked-promise-DYGNjn0V.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-ETt83j-1.js → vanilla-picker-CVraU_Ic.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +72 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-panel.js +4 -2
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.css +48 -0
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +3 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-reward-action.js +1 -4
- package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +58 -5
- package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js +22 -10
- package/dist/components/index.js +2 -2
- package/dist/components/salla-loyalty-banner.js +8 -2
- package/dist/components/salla-loyalty-exchange-product-card.d.ts +11 -0
- package/dist/components/salla-loyalty-exchange-product-card.js +9 -0
- package/dist/components/salla-loyalty-exchange-product-card2.js +151 -0
- package/dist/components/salla-loyalty-hero2.js +4 -4
- package/dist/components/salla-loyalty-panel.js +33 -25
- package/dist/components/salla-loyalty-point2.js +5 -5
- package/dist/components/salla-loyalty-program.js +30 -22
- package/dist/components/salla-loyalty-reward.js +3 -3
- package/dist/components/salla-product-options2.js +22 -10
- package/dist/components/salla-reward-action2.js +9 -6
- package/dist/components/salla-reward-card2.js +2 -2
- package/dist/components/salla-reward-details2.js +63 -27
- package/dist/components/salla-reward-exchange2.js +5 -9
- package/dist/esm/{filepond-DpAz9cLe.js → filepond-V-9YwoVf.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CG1OGxGU.js → filepond-plugin-file-poster-BBE8fAHq.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-D19g-XYh.js → filepond-plugin-file-validate-size-CR9iK259.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-CXHLmRma.js → filepond-plugin-file-validate-type-B4eStrHv.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Ba-AftT1.js → filepond-plugin-image-edit-B84jjo8b.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BRkxatOj.js → filepond-plugin-image-exif-orientation-BAaD5wJD.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BXud5dzw.js → filepond-plugin-image-preview-Bn4GgIpr.js} +1 -1
- package/dist/esm/{functions-cqVnlaVs.js → functions-Btrtoght.js} +1 -1
- package/dist/esm/{index-BpMToHtv.js → index-3omad4sF.js} +14 -14
- package/dist/esm/{index-CNDZOGrc.js → index-Co4ZrgLC.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +23 -11
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/{salla-count-down.entry.js → salla-count-down_2.entry.js} +204 -2
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +3 -3
- package/dist/esm/{salla-reward-action_4.entry.js → salla-loyalty-exchange-product-card_5.entry.js} +63 -22
- package/dist/esm/salla-loyalty-hero_2.entry.js +11 -11
- package/dist/esm/salla-loyalty-panel.entry.js +6 -5
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +6 -5
- package/dist/esm/salla-loyalty-reward.entry.js +5 -5
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/{salla-order-options-modal_3.entry.js → salla-product-card_2.entry.js} +2 -204
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/{tracked-promise-DOcrdjBg.js → tracked-promise-BPB6hr9g.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BkRDjm_J.js → vanilla-picker-CN8ge6Yh.js} +1 -1
- package/dist/twilight/p-03d231a1.entry.js +4 -0
- package/dist/twilight/p-07b25f79.entry.js +4 -0
- package/dist/twilight/{p-2720c2b7.entry.js → p-07cd3153.entry.js} +1 -1
- package/dist/twilight/{p-1d5f98eb.entry.js → p-07feb752.entry.js} +1 -1
- package/dist/twilight/p-0838e0cc.entry.js +4 -0
- package/dist/twilight/{p-749b88a6.entry.js → p-08a065d6.entry.js} +1 -1
- package/dist/twilight/{p-0251d899.entry.js → p-0a0f2340.entry.js} +1 -1
- package/dist/twilight/{p-cc394677.entry.js → p-0c55c5ed.entry.js} +1 -1
- package/dist/twilight/{p-12cf0042.entry.js → p-1072161d.entry.js} +1 -1
- package/dist/twilight/{p-269711db.entry.js → p-12d180be.entry.js} +1 -1
- package/dist/twilight/{p-461bc0b5.entry.js → p-13e1c331.entry.js} +1 -1
- package/dist/twilight/{p-7cf65f99.entry.js → p-16d6ee9b.entry.js} +1 -1
- package/dist/twilight/{p-67ff151d.entry.js → p-18005312.entry.js} +1 -1
- package/dist/twilight/{p-824ca27d.entry.js → p-185a97f2.entry.js} +1 -1
- package/dist/twilight/{p-17337fed.entry.js → p-19c8a5d5.entry.js} +1 -1
- package/dist/twilight/{p-d0941265.entry.js → p-1beb481d.entry.js} +1 -1
- package/dist/twilight/{p-CDfz5a3h.js → p-1qlEgGio.js} +1 -1
- package/dist/twilight/{p-bf21567e.entry.js → p-2c86bd20.entry.js} +1 -1
- package/dist/twilight/{p-d1877684.entry.js → p-30b7deca.entry.js} +1 -1
- package/dist/twilight/{p-962596fd.entry.js → p-3157e3dd.entry.js} +1 -1
- package/dist/twilight/{p-3c4cbc49.entry.js → p-32467a9d.entry.js} +1 -1
- package/dist/twilight/{p-9fc02a58.entry.js → p-342dad15.entry.js} +1 -1
- package/dist/twilight/{p-2704b823.entry.js → p-34741bf4.entry.js} +1 -1
- package/dist/twilight/{p-b0ec4004.entry.js → p-3a54d785.entry.js} +1 -1
- package/dist/twilight/{p-4c5afcea.entry.js → p-3ae98980.entry.js} +1 -1
- package/dist/twilight/{p-5e3fa632.entry.js → p-3d005581.entry.js} +1 -1
- package/dist/twilight/{p-eeb9b7ec.entry.js → p-3e01a221.entry.js} +1 -1
- package/dist/twilight/{p-BpMToHtv.js → p-3omad4sF.js} +1 -1
- package/dist/twilight/{p-b0bb526f.entry.js → p-44d95774.entry.js} +1 -1
- package/dist/twilight/{p-6c3654f7.entry.js → p-52556f85.entry.js} +1 -1
- package/dist/twilight/p-56a74d0a.entry.js +4 -0
- package/dist/twilight/{p-4f330750.entry.js → p-574c57c6.entry.js} +1 -1
- package/dist/twilight/{p-14ee219d.entry.js → p-57ace49d.entry.js} +1 -1
- package/dist/twilight/{p-d76e3af1.entry.js → p-57b87240.entry.js} +1 -1
- package/dist/twilight/p-5877797d.entry.js +4 -0
- package/dist/twilight/{p-64181bed.entry.js → p-59cf3d1c.entry.js} +1 -1
- package/dist/twilight/{p-c8778468.entry.js → p-59cf6efb.entry.js} +1 -1
- package/dist/twilight/{p-376f5734.entry.js → p-5acaee73.entry.js} +1 -1
- package/dist/twilight/{p-5d1b5a04.entry.js → p-6740cfb1.entry.js} +1 -1
- package/dist/twilight/{p-c77a657b.entry.js → p-67a304d4.entry.js} +1 -1
- package/dist/twilight/{p-5b474463.entry.js → p-6a7d7c6f.entry.js} +1 -1
- package/dist/twilight/{p-2d009c5d.entry.js → p-6aad9abe.entry.js} +1 -1
- package/dist/twilight/{p-bc9d30a6.entry.js → p-6c4d7933.entry.js} +1 -1
- package/dist/twilight/{p-97045b36.entry.js → p-6e9b255e.entry.js} +1 -1
- package/dist/twilight/p-729e2abe.entry.js +4 -0
- package/dist/twilight/{p-c6fcc9f5.entry.js → p-754d042b.entry.js} +1 -1
- package/dist/twilight/p-77676a5d.entry.js +4 -0
- package/dist/twilight/p-783d1a70.entry.js +4 -0
- package/dist/twilight/{p-5e2e12a0.entry.js → p-7971bc45.entry.js} +1 -1
- package/dist/twilight/{p-9ef89918.entry.js → p-7bb21315.entry.js} +1 -1
- package/dist/twilight/{p-36330e95.entry.js → p-7bb28f60.entry.js} +1 -1
- package/dist/twilight/{p-37e5f516.entry.js → p-7fae4a20.entry.js} +1 -1
- package/dist/twilight/{p-398f5f2d.entry.js → p-82b38a08.entry.js} +1 -1
- package/dist/twilight/{p-85f447f3.entry.js → p-842e61d7.entry.js} +1 -1
- package/dist/twilight/{p-0d945324.entry.js → p-85f9d064.entry.js} +1 -1
- package/dist/twilight/{p-59133a6d.entry.js → p-927448a3.entry.js} +1 -1
- package/dist/twilight/{p-e171f81f.entry.js → p-92d68ba1.entry.js} +1 -1
- package/dist/twilight/{p-e3625ea8.entry.js → p-94af7c15.entry.js} +1 -1
- package/dist/twilight/{p-1daddc57.entry.js → p-9a862593.entry.js} +1 -1
- package/dist/twilight/p-9c302701.entry.js +4 -0
- package/dist/twilight/{p-8571999e.entry.js → p-9d734c16.entry.js} +1 -1
- package/dist/twilight/{p-1db56957.entry.js → p-9d745f77.entry.js} +1 -1
- package/dist/twilight/{p-52c9ccff.entry.js → p-9f1c78ac.entry.js} +1 -1
- package/dist/twilight/{p-ed7486a5.entry.js → p-9f6081d4.entry.js} +1 -1
- package/dist/twilight/{p-BVzq9WqP.js → p-B1S798Uj.js} +1 -1
- package/dist/twilight/{p-BVeQloEV.js → p-BlJJbPc3.js} +2 -2
- package/dist/twilight/{p-BziVRCve.js → p-CAqUTN8N.js} +1 -1
- package/dist/twilight/{p-BUS6LvNX.js → p-CXp5fcIv.js} +1 -1
- package/dist/twilight/{p-GW15OFUZ.js → p-CwlNfhff.js} +1 -1
- package/dist/twilight/{p-C0DMTlx5.js → p-DnsL3smj.js} +1 -1
- package/dist/twilight/{p-D4AyNYj-.js → p-DzgGIUvs.js} +1 -1
- package/dist/twilight/{p-CizzR_38.js → p-MT8XYsK6.js} +2 -2
- package/dist/twilight/{p-BpU_apUf.js → p-RH6Ze2WQ.js} +1 -1
- package/dist/twilight/{p-BcEAswfu.js → p-YpsE7YiS.js} +1 -1
- package/dist/twilight/{p-e320738a.entry.js → p-a65a1d76.entry.js} +1 -1
- package/dist/twilight/p-b25643cf.entry.js +4 -0
- package/dist/twilight/{p-4cc5a4d9.entry.js → p-bddef859.entry.js} +1 -1
- package/dist/twilight/{p-55ae56af.entry.js → p-bdef80a3.entry.js} +1 -1
- package/dist/twilight/{p-56484fe4.entry.js → p-c2ab62c6.entry.js} +1 -1
- package/dist/twilight/{p-5a0ea7fd.entry.js → p-c6e28a21.entry.js} +1 -1
- package/dist/twilight/{p-f20ed887.entry.js → p-c842401c.entry.js} +1 -1
- package/dist/twilight/{p-8b61f79a.entry.js → p-c850756e.entry.js} +1 -1
- package/dist/twilight/{p-123a4b64.entry.js → p-d00c74c3.entry.js} +1 -1
- package/dist/twilight/{p-2cfd0c46.entry.js → p-d20eb5fe.entry.js} +1 -1
- package/dist/twilight/{p-6696f1fd.entry.js → p-d30dc29a.entry.js} +1 -1
- package/dist/twilight/{p-ec1dc1a4.entry.js → p-d5f7fc7c.entry.js} +1 -1
- package/dist/twilight/{p-0c21cbb0.entry.js → p-d5ffbaa7.entry.js} +1 -1
- package/dist/twilight/{p-44286c9c.entry.js → p-d63d41cc.entry.js} +1 -1
- package/dist/twilight/{p-b9492720.entry.js → p-d71e3ca9.entry.js} +1 -1
- package/dist/twilight/{p-c8dfa6d9.entry.js → p-d7c3072b.entry.js} +1 -1
- package/dist/twilight/{p-9f0fe98b.entry.js → p-d9685d52.entry.js} +1 -1
- package/dist/twilight/{p-b2847d8f.entry.js → p-dda98c7a.entry.js} +1 -1
- package/dist/twilight/{p-fa7577e6.entry.js → p-df605d75.entry.js} +1 -1
- package/dist/twilight/{p-292767bc.entry.js → p-e03e1c15.entry.js} +1 -1
- package/dist/twilight/{p-5b207505.entry.js → p-e260af73.entry.js} +1 -1
- package/dist/twilight/{p-fac12fc6.entry.js → p-e58f50ac.entry.js} +1 -1
- package/dist/twilight/{p-fd842648.entry.js → p-ec7b9c48.entry.js} +1 -1
- package/dist/twilight/{p-28dd3b59.entry.js → p-ef15918c.entry.js} +1 -1
- package/dist/twilight/p-f06c0fe7.entry.js +4 -0
- package/dist/twilight/{p-6926ae7c.entry.js → p-f2ba00a7.entry.js} +1 -1
- package/dist/twilight/{p-13f968e6.entry.js → p-fb94ea64.entry.js} +1 -1
- package/dist/twilight/{p-573c54b0.entry.js → p-fdc41755.entry.js} +1 -1
- package/dist/twilight/{p-9f7d6e66.entry.js → p-fdd6cba3.entry.js} +1 -1
- package/dist/twilight/{p-bf321bdd.entry.js → p-feebbd16.entry.js} +1 -1
- package/dist/twilight/{p-ad5b0b69.entry.js → p-ff5240b5.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-loyalty-program/salla-loyalty-exchange-product-card.d.ts +10 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-panel.d.ts +1 -0
- package/dist/types/components/salla-loyalty-program/salla-loyalty-program.d.ts +1 -0
- package/dist/types/components/salla-loyalty-program/salla-reward-details.d.ts +9 -0
- package/dist/types/components/salla-product-options/interfaces.d.ts +1 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +1 -1
- package/dist/types/components.d.ts +33 -0
- package/package.json +5 -5
- package/dist/twilight/p-15630397.entry.js +0 -4
- package/dist/twilight/p-31218883.entry.js +0 -4
- package/dist/twilight/p-6e464d52.entry.js +0 -4
- package/dist/twilight/p-718d6984.entry.js +0 -4
- package/dist/twilight/p-7c18a647.entry.js +0 -4
- package/dist/twilight/p-886db7dd.entry.js +0 -4
- package/dist/twilight/p-9dab82e9.entry.js +0 -4
- package/dist/twilight/p-ac1a08b3.entry.js +0 -4
- package/dist/twilight/p-b27551b5.entry.js +0 -4
- package/dist/twilight/p-cb17f82a.entry.js +0 -4
- package/dist/twilight/p-f3b98523.entry.js +0 -4
|
@@ -26,10 +26,7 @@ export class SallaRewardAction {
|
|
|
26
26
|
if (!this.isClickable(this.prize)) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
return (h("div", { class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (h("
|
|
30
|
-
's-loyalty-program-rewards-action-base': true,
|
|
31
|
-
's-loyalty-program-rewards-action-on': true,
|
|
32
|
-
} }, salla.lang.get('pages.loyalty_program.shop_now'))) : (h("button", { onClick: this.handleClick, class: {
|
|
29
|
+
return (h("div", { class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (h("salla-button", { fill: "outline", color: "light", class: "s-loyalty-program-rewards-action-base", onClick: () => closeModals() }, salla.lang.get('common.elements.cancel'))) : (h("button", { onClick: this.handleClick, class: {
|
|
33
30
|
's-loyalty-program-rewards-action-base': true,
|
|
34
31
|
's-loyalty-program-rewards-action-on': true,
|
|
35
32
|
} }, salla.lang.get('pages.loyalty_program.redeem_reward')))));
|
|
@@ -5,7 +5,7 @@ import { h, Host } from "@stencil/core";
|
|
|
5
5
|
import SIGift from "../../assets/svg/gift.svg";
|
|
6
6
|
export class SallaRewardCard {
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '9b1eecb431ab26fc6bfbd89d511294a230dd2aa9', class: "s-loyalty-program-reward-host" }, h("div", { key: '0793104978291566c136eb0e5b841224f97f25b6', class: "s-loyalty-program-reward-container" }, h("div", { key: 'f4572e5480d51f041af3e3b95bdfcc3a952c395e', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: 'ba3e6d1583219bfba80903d8b45a02c6f862efd2', class: "s-loyalty-program-reward-img" }, h("img", { key: '36e26b8fcf8d2f094b0ab990ad96c3722e23d4fd', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: 'b7f042b124044e8ca7eee15341d08ef175013b18', class: "s-loyalty-program-reward-content" }, h("div", { key: 'd3274d9bf3f53dfdc87e4f11cddd2abae5288333', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '4db76994541536d16e11a7e34bce9e06ce9aff4b', size: "xs" }, h("span", { key: 'a565b786c683bc5b076036c81494137ccaef0c18', innerHTML: SIGift }), h("span", { key: '481a4016c7ccea49a860df2a7b3a322302a2e5ad', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), h("div", { key: '5820431c80d0eee99da2592ef29685710b73a048', class: "s-loyalty-program-reward-title" }, h("span", { key: '82b99ec1244890b19930686c228ca56ecee7191b' }, this.prize.group_title)), h("div", { key: '08bc6a5f88365c23e07a20b858b4cda5430eb363', class: "s-loyalty-program-reward-name" }, h("div", { key: 'dd4ce5ed0097a746b91c74cdab38ca557c55194d', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: 'ae7cd30ae6794f0957db6cfca3a69403b5996183', class: "p-4" }, h("slot", { key: '41a4cce4cb28d91d038754f69ea42b25fda6427a', name: "action" }, h("button", { key: '353da11c1197ed3dafd85282cd3343c21f55c80b', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "salla-reward-card"; }
|
|
11
11
|
static get originalStyleUrls() {
|
|
@@ -22,9 +22,14 @@ const c = (...args) => args.map(i => 's-loyalty-program-' + i).join(' ');
|
|
|
22
22
|
export class SallaRewardDetails {
|
|
23
23
|
constructor() {
|
|
24
24
|
this.refreshKey = Date.now();
|
|
25
|
+
this.includedProductsData = [];
|
|
26
|
+
}
|
|
27
|
+
handleProductExchange(e) {
|
|
28
|
+
this.productActionClick.emit({ productId: e.detail.productId });
|
|
25
29
|
}
|
|
26
30
|
handlePrizeChange() {
|
|
27
31
|
this.refreshKey = Date.now();
|
|
32
|
+
this.fetchIncludedProducts();
|
|
28
33
|
}
|
|
29
34
|
componentWillLoad() {
|
|
30
35
|
if (this.category.status === 'idle') {
|
|
@@ -33,6 +38,23 @@ export class SallaRewardDetails {
|
|
|
33
38
|
if (this.brand.status === 'idle') {
|
|
34
39
|
this.brand();
|
|
35
40
|
}
|
|
41
|
+
this.fetchIncludedProducts();
|
|
42
|
+
}
|
|
43
|
+
async fetchIncludedProducts() {
|
|
44
|
+
this.includedProductsData = [];
|
|
45
|
+
const ids = this.prize?.included_product_ids;
|
|
46
|
+
if (!ids?.length)
|
|
47
|
+
return;
|
|
48
|
+
const requestedPrize = this.prize;
|
|
49
|
+
try {
|
|
50
|
+
const response = await salla.api.withoutNotifier(() => salla.product.api.fetch({ source: 'selected', source_value: ids }));
|
|
51
|
+
if (this.prize === requestedPrize) {
|
|
52
|
+
this.includedProductsData = response.data || [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
this.includedProductsData = [];
|
|
57
|
+
}
|
|
36
58
|
}
|
|
37
59
|
getTermsAndConditions() {
|
|
38
60
|
const minimumAmount = Number((this.prize.order_minimum_amount || '0').split('.')[0]) || 0;
|
|
@@ -111,23 +133,29 @@ export class SallaRewardDetails {
|
|
|
111
133
|
getProductsJsx(items, title) {
|
|
112
134
|
return !items?.length ? '' : h("div", { class: "s-loyalty-program-reward-details-items-products s-loyalty-program-slider-arrows-edges" }, h("h2", null, title), h("salla-products-slider", { source: "selected", sourceValue: JSON.stringify(items), "slider-config": '{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":0,"breakpoints":{"768":{"slidesPerView":3,"freeMode":false,"speed":300}}}' }));
|
|
113
135
|
}
|
|
136
|
+
getIncludedProductsJsx(title) {
|
|
137
|
+
const products = this.includedProductsData;
|
|
138
|
+
if (!products?.length)
|
|
139
|
+
return '';
|
|
140
|
+
return (h("div", { class: c('reward-details-items-products') }, h("h2", null, title), h("div", { class: c('reward-details-products-grid') }, products.map(product => h("salla-loyalty-exchange-product-card", { product: product })))));
|
|
141
|
+
}
|
|
114
142
|
render() {
|
|
115
143
|
const termsAndConditions = this.getTermsAndConditions();
|
|
116
|
-
return (h("div", { key: '
|
|
144
|
+
return (h("div", { key: 'e75387a83bdf558f087bfda4f8c7db15bf97ac5d', class: "s-loyalty-program-reward-modal" }, h("div", { key: '89caf02d9b28996177b5bc23a711986ad9da9208', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '455d0a2e6f5c08dbbdf063c1f243e7e041deb788', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
|
|
117
145
|
: h("button", { class: "s-loyalty-program-back-btn", onClick: () => closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, h("span", { class: {
|
|
118
146
|
'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
|
|
119
147
|
'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
|
|
120
|
-
} })), this.prize.name)), h("div", { key: '
|
|
148
|
+
} })), this.prize.name)), h("div", { key: '1e65d03e52071802ec396cc4838bdaf135303494', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: 'f6869249b21464296725644acd9a593fb6c5ea30', class: "s-loyalty-program-reward-details-header" }, h("div", { key: 'c93dfe4c362421f7f7d5938a86d043e6ee0f2369', class: "s-loyalty-program-aspect-container" }, h("img", { key: '0c86bde982fd627939e47b9cf1eed02285a041f1', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: '2be3695ee888ef65e0fec106e4b7845abc25491b', size: "sm", bg: "light" }, h("span", { key: '193ce34305780ecc2fd78d4e2d8572da06a0ebda', innerHTML: SIGift }), h("span", { key: 'aee708c7b484afa29392fe25768ae48051c8b211', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: 'add5d8a427511f9554f5d13a88bc5a4994021477', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: '723dd37428176057e6d9e315e2a29528df9b8b1f', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: 'ef1d7ea6af657ff4810c257d378aac35c106de66', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
|
|
121
149
|
h("salla-tab-header", { slot: "header", name: "included", style: {
|
|
122
150
|
display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
|
|
123
151
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICheck }), h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
|
|
124
|
-
h("salla-tab-content", { slot: "content", name: "included" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.categories, this.prize.included_category_ids), salla.lang.get('pages.loyalty_program.included_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.brands, this.prize.included_brand_ids), salla.lang.get('pages.loyalty_program.included_brands')), this.
|
|
152
|
+
h("salla-tab-content", { slot: "content", name: "included" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.categories, this.prize.included_category_ids), salla.lang.get('pages.loyalty_program.included_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.brands, this.prize.included_brand_ids), salla.lang.get('pages.loyalty_program.included_brands')), this.getIncludedProductsJsx(salla.lang.get('pages.loyalty_program.included_products')))),
|
|
125
153
|
], this.getItemsMarkers('excluded') === '000' ? '' : [
|
|
126
154
|
h("salla-tab-header", { slot: "header", name: "excluded", style: {
|
|
127
155
|
display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
|
|
128
156
|
} }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICancel }), h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
|
|
129
157
|
h("salla-tab-content", { slot: "content", name: "excluded" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
|
|
130
|
-
]))), h("salla-reward-action", { key: '
|
|
158
|
+
]))), h("salla-reward-action", { key: 'd1a0304c5229958d4a135affae27bb62c7419cd8', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
|
|
131
159
|
}
|
|
132
160
|
static get is() { return "salla-reward-details"; }
|
|
133
161
|
static get originalStyleUrls() {
|
|
@@ -170,7 +198,8 @@ export class SallaRewardDetails {
|
|
|
170
198
|
}
|
|
171
199
|
static get states() {
|
|
172
200
|
return {
|
|
173
|
-
"refreshKey": {}
|
|
201
|
+
"refreshKey": {},
|
|
202
|
+
"includedProductsData": {}
|
|
174
203
|
};
|
|
175
204
|
}
|
|
176
205
|
static get events() {
|
|
@@ -194,6 +223,21 @@ export class SallaRewardDetails {
|
|
|
194
223
|
}
|
|
195
224
|
}
|
|
196
225
|
}
|
|
226
|
+
}, {
|
|
227
|
+
"method": "productActionClick",
|
|
228
|
+
"name": "productActionClick",
|
|
229
|
+
"bubbles": true,
|
|
230
|
+
"cancelable": true,
|
|
231
|
+
"composed": true,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": ""
|
|
235
|
+
},
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "{ productId: number }",
|
|
238
|
+
"resolved": "{ productId: number; }",
|
|
239
|
+
"references": {}
|
|
240
|
+
}
|
|
197
241
|
}];
|
|
198
242
|
}
|
|
199
243
|
static get watchers() {
|
|
@@ -202,6 +246,15 @@ export class SallaRewardDetails {
|
|
|
202
246
|
"methodName": "handlePrizeChange"
|
|
203
247
|
}];
|
|
204
248
|
}
|
|
249
|
+
static get listeners() {
|
|
250
|
+
return [{
|
|
251
|
+
"name": "loyaltyProductExchange",
|
|
252
|
+
"method": "handleProductExchange",
|
|
253
|
+
"target": undefined,
|
|
254
|
+
"capture": false,
|
|
255
|
+
"passive": false
|
|
256
|
+
}];
|
|
257
|
+
}
|
|
205
258
|
}
|
|
206
259
|
__decorate([
|
|
207
260
|
TrackedPromise(async () => {
|
|
@@ -43,11 +43,7 @@ export class SallaRewardExchange {
|
|
|
43
43
|
this.reset(0);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
47
|
-
opacity: this.exchange.status !== 'pending' ? '1' : '0',
|
|
48
|
-
} }, salla.lang.get('common.elements.confirm')), h("span", { key: '80c30140959693b3d98dc2162e45d4089e81eb6b', class: "s-loyalty-program-exchange-loading", style: {
|
|
49
|
-
opacity: this.exchange.status === 'pending' ? '1' : '0',
|
|
50
|
-
} }, h("salla-loading", { key: '516e36b4271d8da0ad711732aa991a45633edea5', color: "primary", size: 24 }))), h("button", { key: '4642c008c656a662bd277829ef80db37cffa0b1a', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
|
|
46
|
+
return (h(Host, { key: '12288db4227af2c833b80a0a4b4df9192c56a9f4' }, h("div", { key: '0bb5b3037fb091e9f4b96e709ad6df3f97b7d7af', class: "s-loyalty-program-exchange-heading" }, h("div", { key: '5161c1961bd08e626e33780cf01efe5000d8e939', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '83429d754f37b2112ba2201b54a51349a98947df', innerHTML: SIGift })), h("h2", { key: '0437972cf3b853271042de844cb70bc49dd04abf' }, salla.lang.get('pages.loyalty_program.redeem_reward')), h("p", { key: '14c0dbd4b29d73082ee71703c0a794447f9ee40e' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", h("span", { key: '9128f2c88f20536ca5ddae84b2160024bb8b2fe9' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", h("span", { key: 'e323f1dbb02caf7e385ac68d3cb74b84a5e062da' }, "(", this.prize.name, ")"))), h("div", { key: 'e5895bd3e62bacf86077fe85932e85f4a313e9f6', class: "s-loyalty-program-exchange-btns" }, h("salla-button", { key: 'df88cc68a2a265fc5a0e9a84be7159d028cc22a9', width: "wide", loading: this.exchange.status === 'pending', onClick: () => this.handleConfirm() }, salla.lang.get('common.elements.confirm')), h("salla-button", { key: 'a99305e2bcde52b63da0b1102f3bd626d256ebbf', width: "wide", fill: "outline", color: "danger", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
|
|
51
47
|
}
|
|
52
48
|
static get is() { return "salla-reward-exchange"; }
|
|
53
49
|
static get originalStyleUrls() {
|
|
@@ -781,7 +781,7 @@ export class SallaProductOptions {
|
|
|
781
781
|
/**
|
|
782
782
|
* ============= Advanced options =============
|
|
783
783
|
*/
|
|
784
|
-
getOptionDetailName(detail, outOfStock = true, optionType) {
|
|
784
|
+
getOptionDetailName(detail, outOfStock = true, optionType, format) {
|
|
785
785
|
let detailName;
|
|
786
786
|
if (optionType && optionType === DisplayType.COLOR) {
|
|
787
787
|
detailName = detail.name
|
|
@@ -789,12 +789,20 @@ export class SallaProductOptions {
|
|
|
789
789
|
+ (detail.additional_price ? ` <p> (${salla.money(detail.additional_price, false)}) </p>` : '');
|
|
790
790
|
}
|
|
791
791
|
if (!detailName) {
|
|
792
|
-
|
|
793
|
-
+ ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page("cart")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')
|
|
792
|
+
const detailSuffix = ((outOfStock && this.isOptionDetailOut(detail) && !salla.url.is_page("cart")) && !this.hideOutLabel ? ` - ${this.outOfStockText}` : '')
|
|
794
793
|
+ (detail.additional_price ? ` (${salla.money(detail.additional_price, false)})` : '');
|
|
794
|
+
// Keep the Riyal icon markup for price-format radio options rendered via innerHTML.
|
|
795
|
+
if (format === "price") {
|
|
796
|
+
const normalizedPrice = salla.helpers.digitsOnly(detail.name);
|
|
797
|
+
const price = Number(normalizedPrice);
|
|
798
|
+
if (!normalizedPrice || !Number.isFinite(price)) {
|
|
799
|
+
return detailSuffix;
|
|
800
|
+
}
|
|
801
|
+
return salla.money(price, true) + detailSuffix;
|
|
802
|
+
}
|
|
803
|
+
detailName = detail.name + detailSuffix;
|
|
795
804
|
}
|
|
796
|
-
//
|
|
797
|
-
//and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol
|
|
805
|
+
// Text-rendered callers cannot display the icon, so use the store currency symbol.
|
|
798
806
|
return detailName.replace('<i class=sicon-sar></i>', salla.config.currency()?.symbol || 'ر.س');
|
|
799
807
|
}
|
|
800
808
|
computeAvailability() {
|
|
@@ -818,13 +826,17 @@ export class SallaProductOptions {
|
|
|
818
826
|
renderInput(type, detail, option, isRequired, name, buttonStyle) {
|
|
819
827
|
const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);
|
|
820
828
|
const isOutOfStock = this.isOptionDetailOut(detail);
|
|
829
|
+
const detailName = this.getOptionDetailName(detail, true, option.type, option.format);
|
|
830
|
+
const detailClass = {
|
|
831
|
+
"s-product-options-grid-mode-span": buttonStyle,
|
|
832
|
+
"s-product-options-disabled": this.canDisabled && isOutOfStock,
|
|
833
|
+
};
|
|
821
834
|
return (h("label", { class: {
|
|
822
835
|
"s-product-options-disabled": this.canDisabled && isOutOfStock,
|
|
823
836
|
"s-product-options-option-stock-out": isOutOfStock,
|
|
824
|
-
} }, h("input", { id: id, type: type, name: name, value: detail.id, disabled: this.canDisabled && isOutOfStock, required: isRequired, checked: detail.is_selected, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }),
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
} }, this.getOptionDetailName(detail))));
|
|
837
|
+
} }, h("input", { id: id, type: type, name: name, value: detail.id, disabled: this.canDisabled && isOutOfStock, required: isRequired, checked: detail.is_selected, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), option.format === "price"
|
|
838
|
+
? h("div", { class: detailClass, innerHTML: detailName })
|
|
839
|
+
: h("div", { class: detailClass }, detailName)));
|
|
828
840
|
}
|
|
829
841
|
/**
|
|
830
842
|
* Renders a collection of input elements for all details of an option.
|
|
@@ -862,7 +874,7 @@ export class SallaProductOptions {
|
|
|
862
874
|
* @returns HTMLElement - The rendered single-option element.
|
|
863
875
|
*/
|
|
864
876
|
singleOption(option) {
|
|
865
|
-
const buttonStyle = this.optionConfig?.['single-option']?.type === 'button';
|
|
877
|
+
const buttonStyle = this.optionConfig?.['single-option']?.type === 'button' || (option.type === DisplayType.SINGLE_OPTION && option.format === "price");
|
|
866
878
|
const isRequired = !option.visibility_condition && option.required;
|
|
867
879
|
return buttonStyle
|
|
868
880
|
? this.renderButtonStyle('radio', option, isRequired)
|