@salla.sa/twilight-components 2.14.499 → 2.14.500
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-D03qhsrx.js → filepond-B9PtMjXt.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BYNMDvVv.js → filepond-plugin-file-poster-CMd-UUZx.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CzffjUzS.js → filepond-plugin-file-validate-size-DpJalosf.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-LygxJING.js → filepond-plugin-file-validate-type-CZjeYI0w.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Dz_UgE3p.js → filepond-plugin-image-edit-Bl6fwgrn.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C9S6CL_q.js → filepond-plugin-image-exif-orientation-BeQ8iCyg.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CoshLC_A.js → filepond-plugin-image-preview-BkGKXzOB.js} +1 -1
- package/dist/cjs/{functions-BuqfSCqe.js → functions-UaOjMOb2.js} +1 -1
- package/dist/cjs/{index-BiuRQfha.js → index-CQPk27Eg.js} +1 -1
- package/dist/cjs/{index-pecK0haA.js → index-Cd5xdrCT.js} +2 -2
- 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 +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
- 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 +17 -17
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +5 -5
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +210 -31
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- 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 +5 -5
- 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_2.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +10 -10
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +9 -9
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +4 -4
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
- package/dist/cjs/salla-map_2.cjs.entry.js +4 -4
- 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 +4 -4
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-card_2.cjs.entry.js +6 -6
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/{tracked-promise-D3H-BAQh.js → tracked-promise-DwUVHl1m.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-NZhSBHbI.js → vanilla-picker-BTiOI13l.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +63 -0
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +211 -30
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
- package/dist/collection/components/salla-filters/salla-filters.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
- package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
- package/dist/collection/components/salla-hook/salla-hook.js +1 -1
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
- package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
- package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -1
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
- package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
- package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
- package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +1 -1
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.js +1 -1
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cart-coupons.js +211 -30
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-conditional-fields2.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-file-upload2.js +2 -2
- package/dist/components/salla-filters-widget2.js +2 -2
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-gifting.js +2 -2
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +1 -1
- package/dist/components/salla-loyalty-exchange-product-card2.js +2 -2
- package/dist/components/salla-loyalty-hero2.js +3 -3
- package/dist/components/salla-loyalty-point2.js +4 -4
- package/dist/components/salla-loyalty-points-history.js +1 -1
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-reward.js +2 -2
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
- package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
- package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
- package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
- package/dist/components/salla-multiple-bundle-product.js +1 -1
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details.js +1 -1
- package/dist/components/salla-order-edit-product-card.js +1 -1
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card-embed.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input2.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-review-factors-tags.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-reward-card2.js +1 -1
- package/dist/components/salla-reward-details2.js +3 -3
- package/dist/components/salla-reward-exchange2.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/{filepond-CJFgTJm9.js → filepond-DjtqIoeD.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-2z52H04r.js → filepond-plugin-file-poster-CFxoEHLP.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DEKIzgzx.js → filepond-plugin-file-validate-size-BnBRYL0y.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type--IuNAFuU.js → filepond-plugin-file-validate-type-Dr5ofT9v.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DV4s4m_8.js → filepond-plugin-image-edit-DyMeCzTZ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BicBedUH.js → filepond-plugin-image-exif-orientation-ngtve06j.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-68UNym7e.js → filepond-plugin-image-preview-aqxBqAYf.js} +1 -1
- package/dist/esm/{functions-sMyBqXp4.js → functions-Drikk4uf.js} +1 -1
- package/dist/esm/{index-CZQUg3wR.js → index-CaZkz-p0.js} +1 -1
- package/dist/esm/{index-C_ccgsYC.js → index-DuoSRdS5.js} +2 -2
- 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 +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +3 -3
- 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 +17 -17
- package/dist/esm/salla-bullet-delivery_2.entry.js +5 -5
- package/dist/esm/salla-cart-coupons.entry.js +210 -31
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- 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 +5 -5
- 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_2.entry.js +2 -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 +3 -3
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +3 -3
- package/dist/esm/salla-hook.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-localization-modal.entry.js +2 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +10 -10
- package/dist/esm/salla-loyalty-hero_2.entry.js +9 -9
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +4 -4
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +2 -2
- package/dist/esm/salla-map_2.entry.js +4 -4
- 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 +4 -4
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
- package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +2 -2
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/salla-placeholder.entry.js +2 -2
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-card-embed.entry.js +2 -2
- package/dist/esm/salla-product-card_2.entry.js +6 -6
- package/dist/esm/salla-product-size-guide.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/{tracked-promise-Gd3pavcY.js → tracked-promise-CUM6cNiF.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-UVrpERET.js → vanilla-picker-kF8Cgi5q.js} +1 -1
- package/dist/twilight/{p-eaf4df85.entry.js → p-00d73870.entry.js} +1 -1
- package/dist/twilight/{p-75fe9e68.entry.js → p-01636f53.entry.js} +1 -1
- package/dist/twilight/{p-0e9b8853.entry.js → p-022343f3.entry.js} +1 -1
- package/dist/twilight/{p-a9b57fbb.entry.js → p-03db477f.entry.js} +1 -1
- package/dist/twilight/{p-f4678181.entry.js → p-04fadfb3.entry.js} +1 -1
- package/dist/twilight/{p-591a9387.entry.js → p-0604eb27.entry.js} +1 -1
- package/dist/twilight/{p-b0f81a93.entry.js → p-061fdc55.entry.js} +1 -1
- package/dist/twilight/{p-85a4c32c.entry.js → p-0a1f28c9.entry.js} +1 -1
- package/dist/twilight/{p-44f68d4a.entry.js → p-0b814320.entry.js} +1 -1
- package/dist/twilight/{p-ffe26a36.entry.js → p-0bc04e3f.entry.js} +1 -1
- package/dist/twilight/{p-dd2831f5.entry.js → p-0c1721e1.entry.js} +1 -1
- package/dist/twilight/p-0daa8221.entry.js +4 -0
- package/dist/twilight/{p-65f517fa.entry.js → p-0e6a0989.entry.js} +2 -2
- package/dist/twilight/{p-3d7adaef.entry.js → p-15c3b0cc.entry.js} +1 -1
- package/dist/twilight/{p-253dcced.entry.js → p-168e3ad8.entry.js} +1 -1
- package/dist/twilight/{p-3d38f2d2.entry.js → p-19c6d83a.entry.js} +1 -1
- package/dist/twilight/{p-4f2c15c6.entry.js → p-1d75fdd9.entry.js} +1 -1
- package/dist/twilight/{p-ff2aa9cf.entry.js → p-2104f800.entry.js} +1 -1
- package/dist/twilight/p-25ZR4Fc8.js +4 -0
- package/dist/twilight/p-286d9ba3.entry.js +4 -0
- package/dist/twilight/p-2985e01e.entry.js +4 -0
- package/dist/twilight/{p-3d141203.entry.js → p-2c4f4539.entry.js} +1 -1
- package/dist/twilight/{p-bba5e521.entry.js → p-2c9c0815.entry.js} +1 -1
- package/dist/twilight/{p-c1a45217.entry.js → p-39389b31.entry.js} +1 -1
- package/dist/twilight/{p-89069e7e.entry.js → p-3c96d5af.entry.js} +1 -1
- package/dist/twilight/{p-0a4110f4.entry.js → p-404d3645.entry.js} +1 -1
- package/dist/twilight/{p-a5cbcc70.entry.js → p-47c9e882.entry.js} +1 -1
- package/dist/twilight/{p-38662602.entry.js → p-4fb48be8.entry.js} +1 -1
- package/dist/twilight/{p-71a539e8.entry.js → p-4fff03a8.entry.js} +1 -1
- package/dist/twilight/{p-f1e49f36.entry.js → p-51bc9c4d.entry.js} +1 -1
- package/dist/twilight/{p-d62ac6c8.entry.js → p-54e43314.entry.js} +1 -1
- package/dist/twilight/{p-09542930.entry.js → p-56ba7f94.entry.js} +1 -1
- package/dist/twilight/{p-0755a7eb.entry.js → p-5a215130.entry.js} +1 -1
- package/dist/twilight/{p-cac7ce02.entry.js → p-5cb10852.entry.js} +1 -1
- package/dist/twilight/{p-1678ff12.entry.js → p-5f47eb12.entry.js} +1 -1
- package/dist/twilight/{p-e7f7e8cb.entry.js → p-5fe29fcf.entry.js} +1 -1
- package/dist/twilight/p-67d7bd8b.entry.js +4 -0
- package/dist/twilight/{p-db12f03d.entry.js → p-6e535738.entry.js} +1 -1
- package/dist/twilight/{p-3a99909c.entry.js → p-72291ad7.entry.js} +1 -1
- package/dist/twilight/{p-608dc0ae.entry.js → p-72c9cd44.entry.js} +1 -1
- package/dist/twilight/{p-41a439ab.entry.js → p-74cac8a8.entry.js} +1 -1
- package/dist/twilight/{p-0b6ae26e.entry.js → p-74e009df.entry.js} +1 -1
- package/dist/twilight/{p-b925e462.entry.js → p-77d816b8.entry.js} +1 -1
- package/dist/twilight/{p-0828cbfb.entry.js → p-7b9ed1e4.entry.js} +1 -1
- package/dist/twilight/{p-a0bcc854.entry.js → p-7df52f7b.entry.js} +1 -1
- package/dist/twilight/{p-644ff503.entry.js → p-7e730733.entry.js} +1 -1
- package/dist/twilight/{p-25fffbe6.entry.js → p-8658fefd.entry.js} +1 -1
- package/dist/twilight/{p-4ab125bd.entry.js → p-90d53c9b.entry.js} +1 -1
- package/dist/twilight/{p-50d50a69.entry.js → p-9196b7a9.entry.js} +1 -1
- package/dist/twilight/{p-07fb47b0.entry.js → p-92d37b3e.entry.js} +1 -1
- package/dist/twilight/{p-b0dc296d.entry.js → p-92ec265b.entry.js} +1 -1
- package/dist/twilight/{p-aa0d53c8.entry.js → p-930ff69a.entry.js} +1 -1
- package/dist/twilight/{p-8e2ff581.entry.js → p-931c44fb.entry.js} +1 -1
- package/dist/twilight/{p-d09bcc84.entry.js → p-953da0b5.entry.js} +1 -1
- package/dist/twilight/{p-c067cc58.entry.js → p-95d8a11b.entry.js} +1 -1
- package/dist/twilight/{p-4a233372.entry.js → p-98186fb3.entry.js} +1 -1
- package/dist/twilight/{p-82c60a4d.entry.js → p-982ccb80.entry.js} +1 -1
- package/dist/twilight/{p-6ef8bbba.entry.js → p-99ff235e.entry.js} +1 -1
- package/dist/twilight/{p-18b40b2c.entry.js → p-9a161a84.entry.js} +1 -1
- package/dist/twilight/{p-ff24a697.entry.js → p-9c798a1a.entry.js} +1 -1
- package/dist/twilight/{p-a7140774.entry.js → p-9cc2e54c.entry.js} +1 -1
- package/dist/twilight/{p-eebe8378.entry.js → p-9e27778a.entry.js} +1 -1
- package/dist/twilight/{p-D6FE69fV.js → p-BYpv9A8D.js} +1 -1
- package/dist/twilight/{p-eb_g_RAR.js → p-CHOv1Smw.js} +1 -1
- package/dist/twilight/{p-CirvTQDu.js → p-Ca84RIBI.js} +1 -1
- package/dist/twilight/{p-C0fioW0d.js → p-DMHhYV48.js} +2 -2
- package/dist/twilight/{p-CKa-ux_j.js → p-DQXp-sN5.js} +1 -1
- package/dist/twilight/{p-D_u6j3vO.js → p-DYcV7UW8.js} +1 -1
- package/dist/twilight/{p-gPMLoyk9.js → p-DYgnIxqR.js} +1 -1
- package/dist/twilight/{p-C_ccgsYC.js → p-DuoSRdS5.js} +1 -1
- package/dist/twilight/{p-DVIjdKki.js → p-KZ7SFw0C.js} +1 -1
- package/dist/twilight/{p-f671cd4e.entry.js → p-a1d3a45f.entry.js} +1 -1
- package/dist/twilight/{p-0bf87990.entry.js → p-a2e8a9d1.entry.js} +1 -1
- package/dist/twilight/{p-63441a3a.entry.js → p-a34c031b.entry.js} +1 -1
- package/dist/twilight/{p-80ad24c8.entry.js → p-a5eeb082.entry.js} +1 -1
- package/dist/twilight/{p-55ebca48.entry.js → p-a96e5e06.entry.js} +1 -1
- package/dist/twilight/{p-9cc8570a.entry.js → p-ae83c325.entry.js} +1 -1
- package/dist/twilight/{p-fe909382.entry.js → p-aed6d4eb.entry.js} +1 -1
- package/dist/twilight/{p-efa1e206.entry.js → p-b0437615.entry.js} +1 -1
- package/dist/twilight/{p-44f7f2a2.entry.js → p-bd2672ee.entry.js} +1 -1
- package/dist/twilight/{p-fced2ec8.entry.js → p-bdda14f6.entry.js} +1 -1
- package/dist/twilight/p-be973f87.entry.js +4 -0
- package/dist/twilight/{p-02b057fa.entry.js → p-c3530e7a.entry.js} +1 -1
- package/dist/twilight/{p-022e10ba.entry.js → p-c6b82041.entry.js} +1 -1
- package/dist/twilight/{p-59b38e97.entry.js → p-c6d64b53.entry.js} +1 -1
- package/dist/twilight/{p-fd50a634.entry.js → p-ca0a62f9.entry.js} +1 -1
- package/dist/twilight/{p-fe95f82d.entry.js → p-ca52add5.entry.js} +1 -1
- package/dist/twilight/{p-72bf2467.entry.js → p-cd65e560.entry.js} +1 -1
- package/dist/twilight/{p-bc66d65f.entry.js → p-d39bf8b5.entry.js} +1 -1
- package/dist/twilight/{p-ffddd8cc.entry.js → p-d3a9573e.entry.js} +1 -1
- package/dist/twilight/p-d49130fc.entry.js +4 -0
- package/dist/twilight/p-d54b75de.entry.js +4 -0
- package/dist/twilight/{p-aeb6d92c.entry.js → p-d8c9d454.entry.js} +1 -1
- package/dist/twilight/{p-7470e25f.entry.js → p-dc6b3dfb.entry.js} +1 -1
- package/dist/twilight/{p-296482fa.entry.js → p-e5c2df5a.entry.js} +1 -1
- package/dist/twilight/p-eb2e3e67.entry.js +4 -0
- package/dist/twilight/{p-fc25b7fa.entry.js → p-ecdf7027.entry.js} +1 -1
- package/dist/twilight/{p-dc215a04.entry.js → p-f060a3dd.entry.js} +1 -1
- package/dist/twilight/{p-8cb54383.entry.js → p-f4eba1d1.entry.js} +1 -1
- package/dist/twilight/{p-3d58194d.entry.js → p-f5ac65b4.entry.js} +1 -1
- package/dist/twilight/{p-76290b12.entry.js → p-f8d642b2.entry.js} +1 -1
- package/dist/twilight/{p-ae55de48.entry.js → p-f9912293.entry.js} +1 -1
- package/dist/twilight/p-f9a3f3f4.entry.js +4 -0
- package/dist/twilight/{p-CkVpJQZp.js → p-kflOqry6.js} +1 -1
- package/dist/twilight/{p-BFxC_J0K.js → p-lYj74H1f.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +31 -3
- package/package.json +5 -5
- package/dist/collection/components/salla-conditional-offer/test/salla-conditional-offer.js +0 -12
- package/dist/twilight/p-376a4409.entry.js +0 -4
- package/dist/twilight/p-3abd511f.entry.js +0 -4
- package/dist/twilight/p-7bf1a8cd.entry.js +0 -4
- package/dist/twilight/p-8f99e8cf.entry.js +0 -4
- package/dist/twilight/p-997a77b4.entry.js +0 -4
- package/dist/twilight/p-9cbf064d.entry.js +0 -4
- package/dist/twilight/p-CQB4Iqwr.js +0 -4
- package/dist/twilight/p-d2624bca.entry.js +0 -4
- package/dist/twilight/p-dbc5925e.entry.js +0 -4
- package/dist/twilight/p-fb8ba239.entry.js +0 -4
- package/dist/types/components/salla-conditional-offer/test/salla-conditional-offer.d.ts +0 -1
|
@@ -10,22 +10,46 @@ export class SallaCartCoupons {
|
|
|
10
10
|
this.couponInputValue = '';
|
|
11
11
|
this.couponError = '';
|
|
12
12
|
this.isApplying = false;
|
|
13
|
+
// Applied coupon codes rendered as removable chips below the input.
|
|
14
|
+
// - Single-coupon (default): holds at most the one cart coupon.
|
|
15
|
+
// - Multi-coupon (features::multi_coupon on): holds every applied code,
|
|
16
|
+
// sourced from the cart's `coupons` array so it survives a page refresh.
|
|
17
|
+
this.appliedCoupons = [];
|
|
18
|
+
// Whether the store has multi-coupon enabled. Read ONCE from the store config
|
|
19
|
+
// (Salla.config.get('store.settings.cart.multi_coupon')) — a stable store-level setting,
|
|
20
|
+
// exactly like cart.apply_coupon_enabled — not from the per-cart payload or localStorage.
|
|
21
|
+
this.multiCoupon = false;
|
|
13
22
|
this.isHandlingInternalError = false;
|
|
14
23
|
// Store cart event listener references for cleanup
|
|
15
24
|
this.cartUpdatedHandler = (cartData) => {
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
// cart::updated carries the server-side cart. The multi-coupon flag comes from store
|
|
26
|
+
// config (set once in componentWillLoad), so only refresh total + chips here.
|
|
27
|
+
this.cartTotal = cartData?.summary?.sub_total ?? cartData?.sub_total ?? cartData?.total ?? this.cartTotal;
|
|
28
|
+
// Re-sync applied coupon state from the payload — mirroring refreshFromServer's guard:
|
|
29
|
+
// - Multi-coupon: only a real `coupons` array re-seeds the chips, so a summary-only
|
|
30
|
+
// cart::updated can't shrink them (add/remove refreshes the chips from the server).
|
|
31
|
+
// - Single-coupon (flag off): any payload carrying `coupon` re-syncs the input, so a
|
|
32
|
+
// server-side invalidation (e.g. cart drops below the coupon minimum) that emits
|
|
33
|
+
// `coupon: ''` clears the stale code instead of leaving it stuck until a reload.
|
|
34
|
+
const carriesCoupons = this.multiCoupon
|
|
35
|
+
? Array.isArray(cartData?.coupons)
|
|
36
|
+
: (cartData && 'coupon' in cartData);
|
|
37
|
+
if (carriesCoupons) {
|
|
38
|
+
this.syncAppliedFromCart(cartData);
|
|
23
39
|
}
|
|
24
40
|
// Clear error when cart updates
|
|
25
41
|
this.couponError = '';
|
|
26
42
|
};
|
|
27
43
|
this.couponAddedHandler = () => {
|
|
28
|
-
//
|
|
44
|
+
// Skip while an internal apply/remove is in flight — handleApplyClick/removeCoupon already
|
|
45
|
+
// refresh from the server, so this handler only needs to cover EXTERNAL coupon changes
|
|
46
|
+
// (e.g. the checkout page). Prevents a duplicate salla.cart.details() call per action.
|
|
47
|
+
if (this.isApplying || this.isHandlingInternalError) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// Re-read the applied set + flag from the SERVER (not storage), so the chips reflect
|
|
51
|
+
// the real cart — a stale storage cache (e.g. after a checkout-page removal) never shows.
|
|
52
|
+
this.refreshFromServer();
|
|
29
53
|
};
|
|
30
54
|
this.couponAdditionFailedHandler = (error) => {
|
|
31
55
|
// Only handle external coupon failures when no internal operation is handling errors
|
|
@@ -35,7 +59,12 @@ export class SallaCartCoupons {
|
|
|
35
59
|
// Internal operations handle their own errors to prevent double display
|
|
36
60
|
};
|
|
37
61
|
this.couponDeletedHandler = () => {
|
|
38
|
-
//
|
|
62
|
+
// Same guard as couponAddedHandler: internal removeCoupon already refreshes; only cover
|
|
63
|
+
// EXTERNAL deletions here, so an internal remove doesn't fire two salla.cart.details() calls.
|
|
64
|
+
if (this.isApplying || this.isHandlingInternalError) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.refreshFromServer();
|
|
39
68
|
};
|
|
40
69
|
// Arrow functions to maintain context for event listeners
|
|
41
70
|
this.onKeyUp = (event) => {
|
|
@@ -51,15 +80,20 @@ export class SallaCartCoupons {
|
|
|
51
80
|
async componentWillLoad() {
|
|
52
81
|
await Salla.onReady();
|
|
53
82
|
await Salla.lang.onLoaded();
|
|
83
|
+
// Multi-coupon is a store-level setting — read it ONCE from config here (like
|
|
84
|
+
// apply_coupon_enabled), so it never depends on the per-cart payload or localStorage.
|
|
85
|
+
this.multiCoupon = !!salla.config.get('store.settings.cart.multi_coupon');
|
|
54
86
|
//then set your logic here to avoid any race condition
|
|
55
87
|
this.loadCouponsData(); // Load async without blocking render - shows empty until loaded
|
|
88
|
+
// Synchronous first-paint seed from the storage cart so an applied coupon shows on the very
|
|
89
|
+
// first render instead of flashing empty → applied while the async server fetch is in flight
|
|
90
|
+
// (the old loadCartTotal read storage synchronously). loadCartTotal() then reconciles with the
|
|
91
|
+
// authoritative server payload, which also corrects a storage coupon that was stale.
|
|
92
|
+
this.seedFromStorage();
|
|
56
93
|
this.loadCartTotal();
|
|
57
94
|
this.setupCartEventListeners();
|
|
58
95
|
// Note: No store feature gate needed - coupon availability controlled by backend API response
|
|
59
96
|
}
|
|
60
|
-
componentDidLoad() {
|
|
61
|
-
this.setupCouponInputEvents();
|
|
62
|
-
}
|
|
63
97
|
setupCartEventListeners() {
|
|
64
98
|
// Listen for cart updates to refresh cart total
|
|
65
99
|
salla.event.on('cart::updated', this.cartUpdatedHandler);
|
|
@@ -69,10 +103,8 @@ export class SallaCartCoupons {
|
|
|
69
103
|
salla.event.on('cart::coupon.deleted', this.couponDeletedHandler);
|
|
70
104
|
}
|
|
71
105
|
disconnectedCallback() {
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
this.couponInputRef?.removeEventListener('input', this.onInput);
|
|
75
|
-
// Clean up cart event listeners using reliable global event system
|
|
106
|
+
// Input events are bound via JSX (onInput/onKeyUp) — Stencil cleans those up. Only the
|
|
107
|
+
// global cart event listeners need explicit teardown here.
|
|
76
108
|
salla.event.off('cart::updated', this.cartUpdatedHandler);
|
|
77
109
|
salla.event.off('cart::coupon.added', this.couponAddedHandler);
|
|
78
110
|
salla.event.off('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
@@ -118,21 +150,118 @@ export class SallaCartCoupons {
|
|
|
118
150
|
this.availableCoupons = [];
|
|
119
151
|
}
|
|
120
152
|
}
|
|
121
|
-
loadCartTotal() {
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
//
|
|
125
|
-
|
|
153
|
+
async loadCartTotal() {
|
|
154
|
+
// Multi-coupon needs the SERVER-authoritative applied list (localStorage can be stale, e.g.
|
|
155
|
+
// coupons removed on the checkout page). Single-coupon (flag off — the default, and the hot
|
|
156
|
+
// path at billions req/day) is fully seeded synchronously by seedFromStorage() with NO network
|
|
157
|
+
// call, exactly as the original implementation read from storage — so skip the
|
|
158
|
+
// salla.cart.details() round-trip for it.
|
|
159
|
+
if (!this.multiCoupon) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
await this.refreshFromServer();
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Synchronous first-paint seed from the storage cart — SINGLE-COUPON (flag-off) ONLY.
|
|
166
|
+
*
|
|
167
|
+
* It restores the old synchronous first paint Greptile flagged for the default single-coupon
|
|
168
|
+
* stores (the input shows the applied code immediately instead of flashing empty).
|
|
169
|
+
*
|
|
170
|
+
* With multi-coupon ON the applied coupons are SERVER-authoritative: storage can still list a
|
|
171
|
+
* coupon that was invalidated or removed server-side (e.g. dropped below the cart minimum, or
|
|
172
|
+
* removed on another surface), so seeding the chips from it would render a STALE list — e.g.
|
|
173
|
+
* two chips when the server holds one — until the refresh lands. In that mode we skip the seed
|
|
174
|
+
* entirely and let refreshFromServer/cart::updated populate the chips from the server.
|
|
175
|
+
*/
|
|
176
|
+
seedFromStorage() {
|
|
177
|
+
if (this.multiCoupon) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const stored = salla.storage.get('cart');
|
|
181
|
+
if (stored && typeof stored === 'object' && 'coupon' in stored) {
|
|
182
|
+
this.applyCart(stored);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Fetch the cart fresh from the server (salla.cart.details -> CartPresenter::forApi) and
|
|
187
|
+
* seed the applied codes + total from its authoritative payload (cart.coupons). Falls back
|
|
188
|
+
* to the storage cart ONLY if the request fails, and never wipes the chips on an odd shape.
|
|
189
|
+
*/
|
|
190
|
+
async refreshFromServer() {
|
|
191
|
+
try {
|
|
192
|
+
const response = await salla.cart.details();
|
|
193
|
+
// cart-details nests the cart under data.cart (same shape addCoupon/deleteCoupon read).
|
|
194
|
+
const cart = response?.data?.cart ?? response?.data ?? response;
|
|
195
|
+
if (cart && typeof cart === 'object' &&
|
|
196
|
+
(Array.isArray(cart.coupons) || 'coupon' in cart)) {
|
|
197
|
+
this.applyCart(cart);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (e) {
|
|
202
|
+
// ignore — fall back to storage below
|
|
203
|
+
}
|
|
204
|
+
const stored = salla.storage.get('cart');
|
|
205
|
+
if (stored) {
|
|
206
|
+
this.applyCart(stored);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/** Apply an authoritative cart object: total + applied chips (flag comes from store config). */
|
|
210
|
+
applyCart(cart) {
|
|
211
|
+
this.cartTotal = cart?.summary?.sub_total ?? cart?.sub_total ?? this.cartTotal;
|
|
212
|
+
this.syncAppliedFromCart(cart);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Seed the chip list and the active coupon from a cart object.
|
|
216
|
+
* Multi-coupon: use the cart's `coupons` array (survives refresh).
|
|
217
|
+
* Single-coupon (default): use the single `coupon` code.
|
|
218
|
+
*/
|
|
219
|
+
syncAppliedFromCart(cart) {
|
|
126
220
|
this.currentCoupon = cart?.coupon || '';
|
|
127
|
-
this.
|
|
221
|
+
if (this.multiCoupon) {
|
|
222
|
+
this.appliedCoupons = Array.isArray(cart?.coupons)
|
|
223
|
+
? cart.coupons.filter(Boolean)
|
|
224
|
+
: (this.currentCoupon ? [this.currentCoupon] : []);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
// Single-coupon (flag off): mirror the applied code into the (disabled) input, matching the
|
|
228
|
+
// original production UX. Only set at sync points (load / after apply-remove), never on a
|
|
229
|
+
// keystroke, so it won't clobber what the user is typing.
|
|
230
|
+
this.couponInputValue = this.currentCoupon;
|
|
231
|
+
this.appliedCoupons = this.currentCoupon ? [this.currentCoupon] : [];
|
|
128
232
|
}
|
|
129
|
-
|
|
130
|
-
if (
|
|
233
|
+
async handleApplyClick() {
|
|
234
|
+
if (this.isApplying) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const code = this.couponInputValue.trim();
|
|
238
|
+
if (!code) {
|
|
239
|
+
this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
|
|
131
240
|
return;
|
|
132
241
|
}
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
242
|
+
this.isApplying = true;
|
|
243
|
+
this.isHandlingInternalError = true;
|
|
244
|
+
try {
|
|
245
|
+
// Apply the coupon. Multi-coupon: the backend appends it; single-coupon:
|
|
246
|
+
// it replaces the existing one. Re-read the applied set from the SERVER (not storage)
|
|
247
|
+
// for the chip list, and clear the input for the next code.
|
|
248
|
+
await salla.cart.addCoupon(code);
|
|
249
|
+
await this.refreshFromServer();
|
|
250
|
+
this.couponInputValue = '';
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
this.isApplying = false;
|
|
257
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
258
|
+
setTimeout(() => {
|
|
259
|
+
this.isHandlingInternalError = false;
|
|
260
|
+
}, 100);
|
|
261
|
+
}
|
|
135
262
|
}
|
|
263
|
+
// Single-coupon (flag off) toggle button: apply the typed code, or remove the applied one.
|
|
264
|
+
// Mirrors the original production behavior; the SDK coupon.added/deleted events then refresh.
|
|
136
265
|
async handleCouponButtonClick() {
|
|
137
266
|
if (this.isApplying) {
|
|
138
267
|
return;
|
|
@@ -146,13 +275,42 @@ export class SallaCartCoupons {
|
|
|
146
275
|
this.isHandlingInternalError = true;
|
|
147
276
|
try {
|
|
148
277
|
if (hasCoupon) {
|
|
149
|
-
// Remove existing coupon
|
|
150
278
|
await salla.cart.deleteCoupon();
|
|
151
279
|
}
|
|
152
280
|
else {
|
|
153
|
-
// Apply new coupon
|
|
154
281
|
await salla.cart.addCoupon(this.couponInputValue.trim());
|
|
155
282
|
}
|
|
283
|
+
// Refresh the UI directly for the single-coupon toggle. The coupon.added/deleted event
|
|
284
|
+
// handlers skip internal actions (isApplying guard), and cartUpdatedHandler doesn't
|
|
285
|
+
// re-seed from a summary-only payload — so without this refresh the input/button would
|
|
286
|
+
// stay stuck after a successful apply/remove on the default (flag-off) path.
|
|
287
|
+
await this.refreshFromServer();
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
291
|
+
}
|
|
292
|
+
finally {
|
|
293
|
+
this.isApplying = false;
|
|
294
|
+
setTimeout(() => {
|
|
295
|
+
this.isHandlingInternalError = false;
|
|
296
|
+
}, 100);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
async removeCoupon(code) {
|
|
300
|
+
if (this.isApplying) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
this.isApplying = true;
|
|
304
|
+
this.isHandlingInternalError = true;
|
|
305
|
+
try {
|
|
306
|
+
// Multi-coupon: remove just this code. Single-coupon: reset the cart coupon.
|
|
307
|
+
if (this.multiCoupon) {
|
|
308
|
+
await salla.cart.deleteCoupon(code);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
await salla.cart.deleteCoupon();
|
|
312
|
+
}
|
|
313
|
+
await this.refreshFromServer();
|
|
156
314
|
}
|
|
157
315
|
catch (error) {
|
|
158
316
|
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
@@ -191,6 +349,16 @@ export class SallaCartCoupons {
|
|
|
191
349
|
try {
|
|
192
350
|
// Apply the coupon directly without checking for existing coupon
|
|
193
351
|
await salla.cart.addCoupon(couponCode.trim());
|
|
352
|
+
// Refresh the chips/input directly — the guarded coupon.added handler skips internal
|
|
353
|
+
// actions, so the coupon-card / selectCoupon path must refresh here or the chip list
|
|
354
|
+
// stays stale in multi-coupon mode until the next cart::updated with a coupons[] array.
|
|
355
|
+
await this.refreshFromServer();
|
|
356
|
+
// Multi-coupon: clear the input for the next code. Single-coupon: refreshFromServer
|
|
357
|
+
// already set the input to the applied code (shown disabled), so keep it — clearing
|
|
358
|
+
// here would blank the disabled field on the default flag-off path.
|
|
359
|
+
if (this.multiCoupon) {
|
|
360
|
+
this.couponInputValue = '';
|
|
361
|
+
}
|
|
194
362
|
}
|
|
195
363
|
catch (error) {
|
|
196
364
|
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
@@ -236,7 +404,18 @@ export class SallaCartCoupons {
|
|
|
236
404
|
: `${salla.lang.get('pages.cart.expires_after')} ${coupon.remaining_days} ${salla.lang.get('pages.cart.day')}`)), coupon.minimum_amount && parseFloat(coupon.minimum_amount.amount) > 0 && (h("div", { class: "s-cart-coupons-minimum" }, salla.lang.get('pages.cart.minimum'), " ", h("span", { innerHTML: salla.money(coupon.minimum_amount.amount, coupon.minimum_amount.currency) })))), h("div", { class: "s-cart-coupons-action" }, isEligible ? salla.lang.get('pages.cart.save_coupon') : salla.lang.get('pages.cart.coupon_not_compatible'))))));
|
|
237
405
|
}
|
|
238
406
|
render() {
|
|
239
|
-
return (h(Host, { key: '
|
|
407
|
+
return (h(Host, { key: '30a1ee00e7ec27d12012823347cbcf3c477834e5' }, h("div", { key: '6f84298e9ebd6c50c84fb9a3736d734996e39c33', class: "s-cart-coupons-wrapper" }, h("div", { key: 'b95a1c2b29d2fed54fdf143eac8e37add062668b', class: "s-cart-coupons-input-section" }, h("label", { key: 'e6711fae70db31f8a5987cb58f0488e974394e1c', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), h("div", { key: '824b806c6aa40fb039f659fe81f6cb7686f46b10', class: "s-cart-coupons-coupon-input-container" }, this.multiCoupon ? [
|
|
408
|
+
// Multi-coupon: input stays active to append more codes; applied coupons render
|
|
409
|
+
// as removable chips below.
|
|
410
|
+
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
411
|
+
h("salla-button", { ref: el => this.couponButtonRef = el, class: "s-cart-coupons-coupon-button s-cart-coupons-coupon-button-apply", color: "primary", loading: this.isApplying, "loader-position": "center", onClick: () => this.handleApplyClick(), key: "apply-button" }, h("span", null, salla.lang.get('pages.cart.save_coupon'))),
|
|
412
|
+
] : [
|
|
413
|
+
// Single-coupon (flag off): the ORIGINAL production UX — the field is disabled and
|
|
414
|
+
// shows the applied code, and the button toggles to a red X (danger) to remove it;
|
|
415
|
+
// a new code can only be entered after removing. Reuses the existing master classes.
|
|
416
|
+
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: !!this.currentCoupon || this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
417
|
+
h("salla-button", { ref: el => this.couponButtonRef = el, class: `s-cart-coupons-coupon-button ${this.currentCoupon ? 's-cart-coupons-coupon-button-remove' : 's-cart-coupons-coupon-button-apply'}`, color: this.currentCoupon ? 'danger' : 'primary', loading: this.isApplying, "loader-position": "center", onClick: () => this.handleCouponButtonClick(), key: "apply-button" }, this.currentCoupon ? (h("i", { class: "sicon-cancel" })) : (h("span", null, salla.lang.get('pages.cart.save_coupon')))),
|
|
418
|
+
]), this.couponError && (h("span", { key: '0f3b36e8192777fb7e7d0a065fe720c009065f9d', class: "s-cart-coupons-coupon-error" }, this.couponError)), this.multiCoupon && this.appliedCoupons.length > 0 && (h("div", { key: 'b680e30bd1ae49db5e304440431cdc89c6e5d051', class: "s-cart-coupons-applied-list" }, this.appliedCoupons.map(code => (h("div", { class: "s-cart-coupons-applied-item", key: code }, h("span", { class: "s-cart-coupons-applied-code" }, code), h("button", { type: "button", class: "s-cart-coupons-applied-remove", "aria-label": `${salla.lang.get('pages.cart.delete')} ${code}`, disabled: this.isApplying, onClick: () => this.removeCoupon(code) }, h("i", { class: "sicon-cancel" })))))))), this.availableCoupons && this.availableCoupons.length > 0 && (h("salla-slider", { key: 'a2d312dbf6e997939f54c7867ef0d98091bbde4a', type: "carousel", showControls: false, class: "s-cart-coupons-slider" }, h("div", { key: 'b474dcbdeabc26bef5ecba94dd78ef72a60950df', slot: "items" }, this.availableCoupons.map(coupon => this.renderCouponCard(coupon))))))));
|
|
240
419
|
}
|
|
241
420
|
static get is() { return "salla-cart-coupons"; }
|
|
242
421
|
static get originalStyleUrls() {
|
|
@@ -256,7 +435,9 @@ export class SallaCartCoupons {
|
|
|
256
435
|
"currentCoupon": {},
|
|
257
436
|
"couponInputValue": {},
|
|
258
437
|
"couponError": {},
|
|
259
|
-
"isApplying": {}
|
|
438
|
+
"isApplying": {},
|
|
439
|
+
"appliedCoupons": {},
|
|
440
|
+
"multiCoupon": {}
|
|
260
441
|
};
|
|
261
442
|
}
|
|
262
443
|
static get methods() {
|
|
@@ -118,7 +118,7 @@ export class SallaCartSummary {
|
|
|
118
118
|
return cartUrl;
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '27e472fb912afff849c94a8a93a9a71778c6819d' }, h("a", { key: 'f9ef99f2a7205fcfdc0bdd799b1b751ab40bcb35', class: "s-cart-summary-wrapper", href: this.getCartLink(), onClick: this.handleCheckoutClick }, h("div", { key: '1b0d26d3e17b0fb5d6b2cbdc1cd14c079a5fb47b', id: "s-cart-icon" }, h("slot", { key: '3c64b2afa8782a4018dd086e657f16373a91f997', name: "icon" }, h("i", { key: '46f1cebfa346e20d27f8ffed1206c05828be004a', class: "s-cart-summary-icon", innerHTML: CartIcon }))), h("span", { key: '72bd9fc2d2949b74109b9e57e823c4c4cc99d287', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { key: 'd65efd069e4f5968c8f592bf341b35853b000bda', class: "s-cart-summary-content" }, this.showCartLabel && h("span", { key: 'ecbd5350d56131aee746913bb7c6e662431f7001', class: "s-cart-summary-label" }, this.cartLabel), h("b", { key: 'aeebd5d52966dc183111e49289061c3649087a8f', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
|
|
122
122
|
}
|
|
123
123
|
static get is() { return "salla-cart-summary"; }
|
|
124
124
|
static get originalStyleUrls() {
|
|
@@ -198,7 +198,7 @@ export class SallaColorPicker {
|
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
render() {
|
|
201
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: '516a09b2d219b7c12dd251c68e6e55a9a9f7624b', class: "s-color-picker-main" }, h("slot", { key: 'ce684e4b8a8a80710688e3f0c0e43271069fc920', name: "widget" }, h("div", { key: 'f95ff1d709d58e22a4a74ccc35f8db2e17be7e38', class: "s-color-picker-widget" }, h("div", { key: 'fd2347378990972269557593a7182f2bf4cd9f98', class: "s-color-picker-widget-canvas", ref: dv => (this.canvas = dv) }), h("span", { key: 'e22a7ed6738b5fcbc22453e5b091eeeb7720719a', innerHTML: ArrowDown }))), h("input", { key: 'b3f55c713a626808c6f36e4c1454abc26c97cb6e', class: "s-hidden", name: this.name, required: this.required, value: this.color, ref: color => (this.colorInput = color) })));
|
|
202
202
|
}
|
|
203
203
|
componentDidLoad() {
|
|
204
204
|
if (this.canvas)
|
|
@@ -38,7 +38,7 @@ export class SallaCommentForm {
|
|
|
38
38
|
.finally(() => this.submitBtn.stop());
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '0e3a24dcfe8922106b9479aa559cf0e126bc3fcf' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
|
|
42
42
|
h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', h("div", { class: "s-comment-form-content" }, h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), h("br", null), h("div", { class: "s-comment-form-action" }, h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "salla-comment-form"; }
|
|
@@ -129,7 +129,7 @@ export class SallaConditionalFields {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: 'badbb24a38a68127a6880ab4dbe0b0ae4730b11d' }, h("slot", { key: 'a9bdc41d3ded750f0ac5b0e4b5dea3618e02286a' })));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "salla-conditional-fields"; }
|
|
135
135
|
static get elementRef() { return "host"; }
|
|
@@ -228,7 +228,7 @@ export class SallaCountDown {
|
|
|
228
228
|
return this.renderCountDown();
|
|
229
229
|
}
|
|
230
230
|
render() {
|
|
231
|
-
return (h(Host, { key: '
|
|
231
|
+
return (h(Host, { key: '966a6ce961c0cc07b937d9b8e328211377084d44', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''} ${this.offerEnded ? 's-count-down-ended' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
|
|
232
232
|
}
|
|
233
233
|
static get is() { return "salla-count-down"; }
|
|
234
234
|
static get originalStyleUrls() {
|
|
@@ -204,7 +204,7 @@ export class SallaDatetimePicker {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
render() {
|
|
207
|
-
return h("div", { key: '
|
|
207
|
+
return h("div", { key: '10ac16506ca2b2b2a94227887a8d0b6593d7ac17', class: "s-datetime-picker" }, h("input", { key: 'fad4a5677edf21d9bd9a977392ebaf4ae2ad3b7b', type: "datetime", name: this.name, value: this.value, required: this.required, disabled: this.disabled, placeholder: this.placeholder, class: "s-datetime-picker-input", ref: (el) => this.dateInput = el }));
|
|
208
208
|
}
|
|
209
209
|
async componentDidLoad() {
|
|
210
210
|
// Load flatpickr before initializing
|
|
@@ -307,11 +307,11 @@ export class SallaFileUpload {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
render() {
|
|
310
|
-
return (h(Host, { key: '
|
|
310
|
+
return (h(Host, { key: '518fef1a108d79f9aeb9efdbce74e4e721a145dc', class: {
|
|
311
311
|
"s-file-upload": true,
|
|
312
312
|
"s-file-upload-profile-image": this.profileImage,
|
|
313
313
|
"s-file-upload-multiple": this.allowMultiple,
|
|
314
|
-
} }, h("input", { key: '
|
|
314
|
+
} }, h("input", { key: '0c01117f1e59577833b106d5825a08dd2ca51bd0', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: '69276b5e95c8bc35f42c3f1f307abea8c1761621', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
|
|
315
315
|
}
|
|
316
316
|
async componentDidLoad() {
|
|
317
317
|
await Salla.onReady();
|
|
@@ -275,7 +275,7 @@ export class SallaFilters {
|
|
|
275
275
|
render() {
|
|
276
276
|
const appliedFilters = this.getAppliedFilters();
|
|
277
277
|
const removeText = salla.lang.getWithDefault('common.elements.delete', 'Remove');
|
|
278
|
-
return h(Host, { key: '
|
|
278
|
+
return h(Host, { key: 'f0493d0e85ebb9e6612a1edc6cd7f45e7473017e' }, appliedFilters.length ? h("div", { class: "s-filters-applied s-filters-widget-container" }, h("h3", { class: "s-filters-widget-title", onClick: () => this.appliedOpen = !this.appliedOpen }, h("span", null, this.selectedTitle), h("span", { class: `s-filters-widget-plusminus ${this.appliedOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { class: `s-filters-widget-content ${this.appliedOpen ? 's-filters-widget-opened' : 's-filters-widget-closed'}` }, h("div", { class: "s-filters-widget-values" }, appliedFilters.map(chip => h("div", { class: "s-filters-label s-filters-applied-item" }, h("span", { class: "s-filters-option-name" }, chip.groupLabel, ": ", chip.optionLabel), h("button", { type: "button", class: "s-filters-applied-remove", "aria-label": `${removeText} ${chip.groupLabel}: ${chip.optionLabel}`, onClick: () => this.removeFilter(chip) }, h("i", { class: "sicon-cancel", "aria-hidden": "true" }))))), h("div", { class: "s-filters-footer" }, h("salla-button", { color: 'gray', fill: 'outline', onClick: () => this.resetFilters() }, this.reset)))) : '', this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
|
|
279
279
|
this.handleOptionChange(event, option, value);
|
|
280
280
|
} })));
|
|
281
281
|
}
|
|
@@ -170,12 +170,12 @@ export class SallaFiltersWidget {
|
|
|
170
170
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
171
171
|
}
|
|
172
172
|
render() {
|
|
173
|
-
return (h(Host, { key: '
|
|
173
|
+
return (h(Host, { key: '831f7655b903634e0eb3abc7338ea3296883cbbf', class: "s-filters-widget-container" }, h("h3", { key: '72a31fb2c9adab3df37550e930d5be981aafd8f6', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '7512914e8a7348d146384d67f117c8b06507def0' }, this.option.label), h("span", { key: '50d62723255618a2a51512722388ff686c92bdab', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '76792390d33c2051082541e18e9b354b2b63c644', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: 'b39462721ff4572b3572c0ed6171c07fa53b57a9', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '759b2ab6b80d0fd0bb03fcd3746414d9e4b80c7d', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: 'db918c4a43bebc35c23810dc97736584504d0e47', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '92dc440b79ed0929a39db7a4a96a1981f3b49974' }), this.option.type !== FilterOptionTypes.RANGE
|
|
174
174
|
? this.renderFilterOption(this.option)
|
|
175
175
|
: h("salla-price-range", { onChanged: (event) => {
|
|
176
176
|
this.changed.emit(event.detail);
|
|
177
177
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
178
|
-
h("a", { key: '
|
|
178
|
+
h("a", { key: '885668e717441581cd1b92494ebc3927cd70daf1', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
179
179
|
}
|
|
180
180
|
static get is() { return "salla-filters-widget"; }
|
|
181
181
|
static get originalStyleUrls() {
|
|
@@ -746,7 +746,7 @@ export class SallaGifting {
|
|
|
746
746
|
}
|
|
747
747
|
render() {
|
|
748
748
|
return [
|
|
749
|
-
h("div", { key: '
|
|
749
|
+
h("div", { key: 'b4d479166a0a7a8b7bf4d66fd39399eef0bbe1d8' }, h("salla-list-tile", { key: 'a526748e500753bc4e132b6d8cc5fe56d276378c', class: this.generateClass() }, h("div", { key: '3756943a7292552172dfe5fe112a987f9dff2128', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '769df65a33828cdb51270438885bd7554a93b18b' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '69c51851715c12002d0d70f936852bf6b6a064a4', slot: "subtitle" }, h("div", { key: 'ee7979030a5756a4ad74c87cebdb595decc12d48' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '374d33078ca9e9f4d26bc801abcb50d8271887bf', slot: "action" }, h("salla-button", { key: 'f5c53ce21a6e058e484f941d356e1c74bf337b5f', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '2b57632750b91dc720605c181e19a0329c8db3e9', name: "widget-btn-content" }, h("div", { key: '1d43f1351bc3323118c8eace681f382b753d009b', class: "s-gifting-widget-action-content" }, h("span", { key: 'f62808df38d07bf5db9d54f24a64c103dbcca3c2', innerHTML: GiftSharing }), " \u00A0", h("span", { key: 'd22429956200e68c8d588d0daddae201963ba47a' }, this.sectionBtnText)))))), h("salla-modal", { key: '0e1614ad210647ac77bbeb7e19104f5b9ce3b6b3', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '230c00dd750aa31d20e450086b26c11094305e0f', slot: "loading" }, h("div", { key: 'cb48aec5cf71db50ba003cb3607c27e7a629e9be', class: "s-gifting-skeleton" }, h("div", { key: 'e7aa596896cb841628bf35b4b5d8c9d22ed84dae', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '8e6dff5462dc1644bd89e56d51b3a353341b1741', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '5bdf4f1266938b319a5d4642773cb0e8fa772f88', class: "s-gifting-modal-title" }, h("div", { key: '2e3ea0e2589152059ec71f0e0a0b6537b0d32d8f', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '7cf08110d0535ec7b719251cf54f3a83d940772f', height: '15px', width: '150px' })))), h("div", { key: '3e341993dd31be4bfbcc272877c8167f50233dd0', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '74b584687ed715146e84a7107fb69f18ea78f31d', height: '10px', width: '150px' }), h("salla-skeleton", { key: '8acfdd240b397ea8e0d6c93c745786c68eb34f25', height: '230px' }), h("salla-skeleton", { key: 'c92cef763f9d2857429919434a56bbc9686d6a3a', height: '10px', width: '150px' }), h("salla-skeleton", { key: '22e6c56dbabf3f90fa608dcd42d11b463ae86a1c', height: '30px' }), h("salla-skeleton", { key: '8093fcbc09362879ac5afb38f1910bdddfd41390', height: '40px' })))), h("slot", { key: '10842023d5a5861fa1562784c77f718c8e257d80', name: "header" }), !!this.hasError ?
|
|
750
750
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
751
751
|
:
|
|
752
752
|
[
|
|
@@ -769,7 +769,7 @@ export class SallaGifting {
|
|
|
769
769
|
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
|
|
770
770
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
|
|
771
771
|
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: LeftArrow, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
772
|
-
], h("slot", { key: '
|
|
772
|
+
], h("slot", { key: 'ba5b5cc6e2b20d756ed5149757b23239455939f7', name: "footer" })))
|
|
773
773
|
];
|
|
774
774
|
}
|
|
775
775
|
static get is() { return "salla-gifting"; }
|
|
@@ -11,7 +11,7 @@ export class SallaHook {
|
|
|
11
11
|
this.host.before(element);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return h(Host, { key: '
|
|
14
|
+
return h(Host, { key: '1acc6e7c4e3e9695576a820cbc68c539e81fa36e' });
|
|
15
15
|
}
|
|
16
16
|
async componentDidLoad() {
|
|
17
17
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -26,7 +26,7 @@ export class SallaListTile {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'b1b2a6bf65c40643d59f392e91cc76acaea5e89e' }, h("a", { key: '4b2026fd739b243a41bfc37fcb55bc07a1a54636', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: 'bbc7a7133da0e471ad92a5466e9ec0481d74cdd7', class: "s-list-tile-item-icon" }, h("slot", { key: 'e4e338854bfc7e6843c4b87f419c9aa59970c77b', name: 'icon' })), h("div", { key: '1b7b2e0a65193be521cdf6cccc314c83f853216d', class: "s-list-tile-item-content" }, h("div", { key: '4e6a178d219827b1feef394ea5564769bf11ded2', class: "s-list-tile-item-title" }, h("slot", { key: '75b036812aca3e00162fc8c40459b67d4db2cc6f', name: 'title' })), h("div", { key: 'ab0959a43214ae0eb4cf092ea3738c71ed987709', class: "s-list-tile-item-subtitle" }, h("slot", { key: 'e13f66fb2a0e1c5ab2a9081c808973c9f9ecca45', name: "subtitle" }))), h("div", { key: '78c7542367a41a1f8bc74bca73d2581f5c0b7bfd', class: "s-list-tile-item-action" }, h("slot", { key: '14c8c0f31d29855d743b52f82d52a3bed300b25f', name: 'action' })))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "salla-list-tile"; }
|
|
32
32
|
static get originalStyleUrls() {
|
|
@@ -22,7 +22,7 @@ export class SallaLoading {
|
|
|
22
22
|
this.bgColor = "#e5e7eb";
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '0f3796a2a8f9610f40e20eb01e4d60fb56e11a03', class: "s-loading-container" }, h("svg", { key: 'd9d98cfa05e5c7d188237a0a4833c4cd13c2855c', "aria-hidden": "true", style: { width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }, class: "s-loading", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '75ea4d6f86456c86249dab53f3e18d21cc0380ef', d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), h("path", { key: '8bfd0b7ea965749ed9456742f36d2ffa28cff9f3', d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-loading"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -244,7 +244,7 @@ export class SallaLocalizationModal {
|
|
|
244
244
|
this.showTrigger
|
|
245
245
|
? h("button", { type: "button", onClick: () => this.open(), class: "s-localization-modal-trigger-btn" }, h("span", null, this.getLanguageName()), h("span", { class: "s-localization-modal-trigger-separator" }, "|"), " ", h("span", { innerHTML: this.getCurrencySymbol() }))
|
|
246
246
|
: '',
|
|
247
|
-
h("salla-modal", { key: '
|
|
247
|
+
h("salla-modal", { key: 'ef56534e6aadef517af7e5af725cd3b27afe8827', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: '47072c8447350fb18a5bd960335f9a907ffcdae5', slot: 'loading' }, h("div", { key: '96cf1ac3b2dc9f67ae831393285f20935d0312fd', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: '7c2ca11ecb4d3fd62ad4c74e5187acfa313d7dbf', width: '25%', height: '15px' }), h("div", { key: '96e7d7eadf414867716fd513b1daa3417b1a02c4', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '3e02caddbc6de924dc902516f74e93f488556545', width: '25%', height: '15px' }), h("div", { key: 'fd93fce5cd7ce64dfd356ea9f105f53368d7faf6', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '0a8a92e3a2d99c2188767f5065e4efdae26d21c1', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
248
248
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
249
249
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
250
250
|
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -7,7 +7,7 @@ export class SallaLoyaltyPrizeItem {
|
|
|
7
7
|
this.prizeItemSelected.emit(this.item);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '1a3463c51bf3e3e250f62b65d3a81815ec465923' }, h("div", { key: '03bf4d3e35b10d17a325ca4ef280cb384f3a76f4', onClick: this.onPrizeItemClick.bind(this) }, h("img", { key: 'a4d319b2daec5cdfec1c85910edea10bc1d1ab6c', class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), h("div", { key: '52059fafc318c1f5a6b0289669083476650f8761', class: "s-loyalty-prize-item-title" }, this.item.name), h("div", { key: 'a3e14e2d1bd86dc3e7dbd2e6c5115e119af965e5', class: "s-loyalty-prize-item-subtitle" }, this.item.description), h("div", { key: '55df95c028748c0387dc75dc4ad35c7285c907af', class: "s-loyalty-prize-item-points" }, this.item.cost_points, " ", salla.lang.get('pages.loyalty_program.point')))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "salla-loyalty-prize-item"; }
|
|
13
13
|
static get originalStyleUrls() {
|
package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js
CHANGED
|
@@ -79,7 +79,7 @@ export class SallaLoyaltyPointsHistory {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '2d1ecb37f0cc74c3d6c3c29bc95d6043b373155f' }, h("div", { key: '2c1a3e6af83fde1f55f6d5b5bed246a3206673c4' }, this.isLoadingLoyalty ? (h("salla-loading", null)) : (h("div", null, h("table", { class: "s-loyalty-points-history-table" }, h("tbody", null, h("tr", null, h("td", null, h("div", { class: "s-loyalty-points-history-balance-container" }, h("i", { class: "s-loyalty-points-history-balance-icon sicon-gift" }), h("div", null, h("div", { class: "s-loyalty-points-history-balance-value" }, this.balance, " ", salla.lang.get('pages.loyalty_program.point')), h("div", { class: "s-loyalty-points-history-balance-label" }, salla.lang.get('pages.loyalty_program.your_points')))))))), this.loyaltyPointsArray.length > 0 ? (h("div", null, h("table", { class: "s-loyalty-points-history-table" }, h("thead", { class: "s-loyalty-points-history-table-head" }, h("tr", null, h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.points')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.date')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('pages.wallet.expiry_date')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('common.elements.note')), h("th", { scope: "col", class: "s-loyalty-points-history-table-head-tr-th" }, salla.lang.get('common.elements.status')))), h("tbody", null, this.loyaltyPointsArray.map(point => (h("tr", { class: "s-loyalty-points-history-table-tbody-tr" }, h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.points'), ":"), h("span", null, point?.type === 'plus' ? '+' : '', point?.amount || '', " ", salla.lang.get('pages.loyalty_program.point')))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.date'), ":"), h("span", null, formatDate(point?.created_at ? Number(point.created_at) * 1000 : undefined)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('pages.wallet.expiry_date'), ":"), h("span", null, formatDate(point?.expires_at ? Number(point.expires_at) * 1000 : undefined)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('common.elements.note'), ":"), h("span", null, translateKey(point?.key)))), h("td", { class: "s-loyalty-points-history-table-tbody-tr-td" }, h("div", { class: "s-loyalty-points-history-table-tbody-tr-td-content" }, h("span", { class: "s-loyalty-points-history-mobile-title" }, salla.lang.get('common.elements.status'), ":"), h("div", { class: {
|
|
83
83
|
's-loyalty-points-history-table-transaction-status': true,
|
|
84
84
|
's-loyalty-points-history-table-transaction-status-pending': point?.status_key === 'pending',
|
|
85
85
|
's-loyalty-points-history-table-transaction-status-revoked': point?.status_key === 'revoked',
|