@salla.sa/twilight-components 2.14.499 → 2.14.501
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/catalog-recommendations-Bzt0HRy8.js +94 -0
- package/dist/cjs/{filepond-D03qhsrx.js → filepond-YItpCyss.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BYNMDvVv.js → filepond-plugin-file-poster-BAPK8RK2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CzffjUzS.js → filepond-plugin-file-validate-size--RuyRQn1.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-LygxJING.js → filepond-plugin-file-validate-type-CBvJsWh4.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Dz_UgE3p.js → filepond-plugin-image-edit-CIZ-WDGk.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C9S6CL_q.js → filepond-plugin-image-exif-orientation-RE8rudTp.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CoshLC_A.js → filepond-plugin-image-preview-C17RG4r1.js} +1 -1
- package/dist/cjs/{functions-BuqfSCqe.js → functions-BYc4IT8l.js} +1 -1
- package/dist/cjs/{index-BiuRQfha.js → index-CB_WYB8k.js} +1 -1
- package/dist/cjs/{index-pecK0haA.js → index-CuQpJRcD.js} +6 -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 +8 -20
- 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-basket-gap.cjs.entry.js +269 -0
- 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 +4 -3
- 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-XZchciB1.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-NZhSBHbI.js → vanilla-picker-DcFuBceg.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/salla-basket-gap/salla-basket-gap.css +3 -0
- package/dist/collection/components/salla-basket-gap/salla-basket-gap.js +306 -0
- package/dist/collection/components/salla-bought-together/salla-bought-together.js +5 -17
- 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 +3 -2
- 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/collection/shared/catalog-recommendations.js +89 -0
- package/dist/components/catalog-recommendations.js +91 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-basket-gap.d.ts +11 -0
- package/dist/components/salla-basket-gap.js +402 -0
- package/dist/components/salla-bought-together.js +5 -17
- 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 +3 -2
- 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/catalog-recommendations-9fzJJ_Ox.js +91 -0
- package/dist/esm/{filepond-CJFgTJm9.js → filepond-DQgEXp69.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-2z52H04r.js → filepond-plugin-file-poster-BE5-JUQb.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DEKIzgzx.js → filepond-plugin-file-validate-size-CwWpBym0.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type--IuNAFuU.js → filepond-plugin-file-validate-type-CovRSsjJ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DV4s4m_8.js → filepond-plugin-image-edit-DY-5oWCU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BicBedUH.js → filepond-plugin-image-exif-orientation-DQROYLkj.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-68UNym7e.js → filepond-plugin-image-preview-CZCR-9d7.js} +1 -1
- package/dist/esm/{functions-sMyBqXp4.js → functions-DWD7tnLk.js} +1 -1
- package/dist/esm/{index-C_ccgsYC.js → index-DW5RMC3M.js} +6 -2
- package/dist/esm/{index-CZQUg3wR.js → index-VUPjm0uj.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 +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +8 -20
- 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-basket-gap.entry.js +267 -0
- 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 +4 -3
- 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-CZ98bqyM.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-UVrpERET.js → vanilla-picker-DKozn4lm.js} +1 -1
- package/dist/twilight/{p-a7140774.entry.js → p-015a4d45.entry.js} +1 -1
- package/dist/twilight/{p-63441a3a.entry.js → p-0708708b.entry.js} +1 -1
- package/dist/twilight/{p-a9b57fbb.entry.js → p-0aea93dd.entry.js} +1 -1
- package/dist/twilight/{p-cac7ce02.entry.js → p-0f2f8564.entry.js} +1 -1
- package/dist/twilight/{p-02b057fa.entry.js → p-12f14fe5.entry.js} +1 -1
- package/dist/twilight/{p-aeb6d92c.entry.js → p-1453e674.entry.js} +1 -1
- package/dist/twilight/{p-18b40b2c.entry.js → p-17edd677.entry.js} +1 -1
- package/dist/twilight/{p-4a233372.entry.js → p-18209070.entry.js} +1 -1
- package/dist/twilight/p-1decfdb8.entry.js +4 -0
- package/dist/twilight/p-210de87e.entry.js +4 -0
- package/dist/twilight/{p-ffddd8cc.entry.js → p-234752f4.entry.js} +1 -1
- package/dist/twilight/{p-ffe26a36.entry.js → p-24f1c04b.entry.js} +1 -1
- package/dist/twilight/{p-bba5e521.entry.js → p-254d24b3.entry.js} +1 -1
- package/dist/twilight/{p-76290b12.entry.js → p-29b848f7.entry.js} +1 -1
- package/dist/twilight/p-2abf736c.entry.js +4 -0
- package/dist/twilight/{p-b925e462.entry.js → p-2bc1991c.entry.js} +1 -1
- package/dist/twilight/{p-71a539e8.entry.js → p-2fe13b65.entry.js} +1 -1
- package/dist/twilight/{p-85a4c32c.entry.js → p-33710edf.entry.js} +1 -1
- package/dist/twilight/{p-4f2c15c6.entry.js → p-3f47b71b.entry.js} +1 -1
- package/dist/twilight/{p-608dc0ae.entry.js → p-41b9b2ef.entry.js} +1 -1
- package/dist/twilight/{p-ff24a697.entry.js → p-42fb6aaa.entry.js} +1 -1
- package/dist/twilight/{p-296482fa.entry.js → p-44403dab.entry.js} +1 -1
- package/dist/twilight/{p-09542930.entry.js → p-47dd7a56.entry.js} +1 -1
- package/dist/twilight/{p-f1e49f36.entry.js → p-485cd05f.entry.js} +1 -1
- package/dist/twilight/{p-6ef8bbba.entry.js → p-494f93d5.entry.js} +1 -1
- package/dist/twilight/{p-f4678181.entry.js → p-4aaba2ae.entry.js} +1 -1
- package/dist/twilight/{p-aa0d53c8.entry.js → p-4e60702f.entry.js} +1 -1
- package/dist/twilight/p-4ed58afc.entry.js +4 -0
- package/dist/twilight/{p-59b38e97.entry.js → p-4f1b17ce.entry.js} +1 -1
- package/dist/twilight/{p-d62ac6c8.entry.js → p-4ff3fcc2.entry.js} +1 -1
- package/dist/twilight/{p-a0bcc854.entry.js → p-52465888.entry.js} +1 -1
- package/dist/twilight/{p-efa1e206.entry.js → p-527c985e.entry.js} +1 -1
- package/dist/twilight/{p-44f7f2a2.entry.js → p-5803461f.entry.js} +1 -1
- package/dist/twilight/{p-25fffbe6.entry.js → p-5c81f957.entry.js} +1 -1
- package/dist/twilight/{p-d09bcc84.entry.js → p-5f363172.entry.js} +1 -1
- package/dist/twilight/p-60096faf.entry.js +4 -0
- package/dist/twilight/{p-3d141203.entry.js → p-629b0300.entry.js} +1 -1
- package/dist/twilight/{p-022e10ba.entry.js → p-64bddbd4.entry.js} +1 -1
- package/dist/twilight/p-66b8ffe5.entry.js +4 -0
- package/dist/twilight/{p-0b6ae26e.entry.js → p-686e0e20.entry.js} +1 -1
- package/dist/twilight/{p-75fe9e68.entry.js → p-693d1afd.entry.js} +1 -1
- package/dist/twilight/{p-72bf2467.entry.js → p-6c2bd4d3.entry.js} +1 -1
- package/dist/twilight/{p-50d50a69.entry.js → p-6ea59d29.entry.js} +1 -1
- package/dist/twilight/p-753c2036.entry.js +4 -0
- package/dist/twilight/{p-dd2831f5.entry.js → p-7d4ea0b4.entry.js} +1 -1
- package/dist/twilight/{p-0e9b8853.entry.js → p-7d778acb.entry.js} +1 -1
- package/dist/twilight/{p-44f68d4a.entry.js → p-7fa1bb43.entry.js} +1 -1
- package/dist/twilight/{p-0bf87990.entry.js → p-8091c1bb.entry.js} +1 -1
- package/dist/twilight/{p-3d7adaef.entry.js → p-85238859.entry.js} +1 -1
- package/dist/twilight/{p-55ebca48.entry.js → p-86b6bf59.entry.js} +1 -1
- package/dist/twilight/p-8a550a9b.entry.js +4 -0
- package/dist/twilight/{p-644ff503.entry.js → p-8bd21221.entry.js} +1 -1
- package/dist/twilight/p-8c0b1195.entry.js +4 -0
- package/dist/twilight/p-8fded8e8.entry.js +4 -0
- package/dist/twilight/{p-e7f7e8cb.entry.js → p-90039201.entry.js} +1 -1
- package/dist/twilight/{p-C0fioW0d.js → p-9Gnw86AG.js} +2 -2
- package/dist/twilight/{p-253dcced.entry.js → p-9adcfb8f.entry.js} +1 -1
- package/dist/twilight/{p-f671cd4e.entry.js → p-9b4a8482.entry.js} +1 -1
- package/dist/twilight/{p-c1a45217.entry.js → p-9bfb9e67.entry.js} +1 -1
- package/dist/twilight/{p-3d38f2d2.entry.js → p-9c7ed057.entry.js} +1 -1
- package/dist/twilight/{p-07fb47b0.entry.js → p-9ea31b28.entry.js} +1 -1
- package/dist/twilight/p-9fzJJ_Ox.js +4 -0
- package/dist/twilight/{p-BFxC_J0K.js → p-BEd1gsDo.js} +1 -1
- package/dist/twilight/{p-CQB4Iqwr.js → p-BOGl7WKm.js} +1 -1
- package/dist/twilight/{p-eb_g_RAR.js → p-BOsr_t6U.js} +1 -1
- package/dist/twilight/{p-D_u6j3vO.js → p-Bk7FtCRB.js} +1 -1
- package/dist/twilight/{p-gPMLoyk9.js → p-BmLFLdi9.js} +1 -1
- package/dist/twilight/{p-CKa-ux_j.js → p-CTz-tTY_.js} +1 -1
- package/dist/twilight/{p-CirvTQDu.js → p-D6IFHeYy.js} +1 -1
- package/dist/twilight/{p-CkVpJQZp.js → p-DKReyChR.js} +1 -1
- package/dist/twilight/{p-C_ccgsYC.js → p-DW5RMC3M.js} +1 -1
- package/dist/twilight/{p-DVIjdKki.js → p-Dha9oJHi.js} +1 -1
- package/dist/twilight/{p-D6FE69fV.js → p-MxH_-y8s.js} +1 -1
- package/dist/twilight/{p-0755a7eb.entry.js → p-a7da83e9.entry.js} +1 -1
- package/dist/twilight/{p-ff2aa9cf.entry.js → p-a9d1a6ab.entry.js} +1 -1
- package/dist/twilight/{p-fced2ec8.entry.js → p-abffebe7.entry.js} +1 -1
- package/dist/twilight/{p-8cb54383.entry.js → p-b9babfe5.entry.js} +1 -1
- package/dist/twilight/{p-591a9387.entry.js → p-bc890bf3.entry.js} +1 -1
- package/dist/twilight/{p-0a4110f4.entry.js → p-bc935da0.entry.js} +1 -1
- package/dist/twilight/{p-fc25b7fa.entry.js → p-bd2359a7.entry.js} +1 -1
- package/dist/twilight/{p-b0dc296d.entry.js → p-bd7ba620.entry.js} +1 -1
- package/dist/twilight/{p-0828cbfb.entry.js → p-bdfb4b2b.entry.js} +1 -1
- package/dist/twilight/{p-a5cbcc70.entry.js → p-be13f6cf.entry.js} +1 -1
- package/dist/twilight/{p-1678ff12.entry.js → p-c0373e93.entry.js} +1 -1
- package/dist/twilight/{p-89069e7e.entry.js → p-c2019c1f.entry.js} +1 -1
- package/dist/twilight/{p-7470e25f.entry.js → p-c66582de.entry.js} +1 -1
- package/dist/twilight/{p-eebe8378.entry.js → p-cb675f91.entry.js} +1 -1
- package/dist/twilight/{p-fd50a634.entry.js → p-cc0b8dec.entry.js} +1 -1
- package/dist/twilight/{p-db12f03d.entry.js → p-ce06372f.entry.js} +1 -1
- package/dist/twilight/{p-9cc8570a.entry.js → p-ceb44ad7.entry.js} +1 -1
- package/dist/twilight/{p-65f517fa.entry.js → p-cfe4f808.entry.js} +2 -2
- package/dist/twilight/{p-eaf4df85.entry.js → p-d047a409.entry.js} +1 -1
- package/dist/twilight/p-d63533f2.entry.js +4 -0
- package/dist/twilight/{p-80ad24c8.entry.js → p-d649f426.entry.js} +1 -1
- package/dist/twilight/{p-38662602.entry.js → p-d89e140a.entry.js} +1 -1
- package/dist/twilight/{p-c067cc58.entry.js → p-daaa9ef7.entry.js} +1 -1
- package/dist/twilight/{p-dc215a04.entry.js → p-dbc38d79.entry.js} +1 -1
- package/dist/twilight/{p-41a439ab.entry.js → p-dd7a835b.entry.js} +1 -1
- package/dist/twilight/{p-ae55de48.entry.js → p-ddbaca65.entry.js} +1 -1
- package/dist/twilight/{p-4ab125bd.entry.js → p-e47540e1.entry.js} +1 -1
- package/dist/twilight/{p-3d58194d.entry.js → p-e8ada41e.entry.js} +1 -1
- package/dist/twilight/{p-b0f81a93.entry.js → p-e9a35a7f.entry.js} +1 -1
- package/dist/twilight/{p-fe95f82d.entry.js → p-ef77963a.entry.js} +1 -1
- package/dist/twilight/{p-bc66d65f.entry.js → p-f2416b6d.entry.js} +1 -1
- package/dist/twilight/{p-fe909382.entry.js → p-f9c12172.entry.js} +1 -1
- package/dist/twilight/{p-3a99909c.entry.js → p-fbc91885.entry.js} +1 -1
- package/dist/twilight/p-ff5a82a3.entry.js +4 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-basket-gap/salla-basket-gap.d.ts +52 -0
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +31 -3
- package/dist/types/components.d.ts +23 -0
- package/dist/types/shared/catalog-recommendations.d.ts +2 -0
- 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-82c60a4d.entry.js +0 -4
- package/dist/twilight/p-8e2ff581.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-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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
|
-
const sallaCartCouponsCss = "";
|
|
6
|
+
const sallaCartCouponsCss = ".s-cart-coupons-applied-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.s-cart-coupons-applied-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;border-inline-start:3px solid #10b981}.s-cart-coupons-applied-code{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:#111827}.s-cart-coupons-applied-code::before{content:\"\";width:7px;height:7px;border-radius:9999px;background:#10b981}.s-cart-coupons-applied-remove{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;color:#ef4444;background:transparent;border:0;border-radius:9999px;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease}.s-cart-coupons-applied-remove:hover{background:#fef2f2}.s-cart-coupons-applied-remove:disabled{opacity:0.5;cursor:not-allowed}";
|
|
7
7
|
|
|
8
8
|
const SallaCartCoupons = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -14,22 +14,46 @@ const SallaCartCoupons = class {
|
|
|
14
14
|
this.couponInputValue = '';
|
|
15
15
|
this.couponError = '';
|
|
16
16
|
this.isApplying = false;
|
|
17
|
+
// Applied coupon codes rendered as removable chips below the input.
|
|
18
|
+
// - Single-coupon (default): holds at most the one cart coupon.
|
|
19
|
+
// - Multi-coupon (features::multi_coupon on): holds every applied code,
|
|
20
|
+
// sourced from the cart's `coupons` array so it survives a page refresh.
|
|
21
|
+
this.appliedCoupons = [];
|
|
22
|
+
// Whether the store has multi-coupon enabled. Read ONCE from the store config
|
|
23
|
+
// (Salla.config.get('store.settings.cart.multi_coupon')) — a stable store-level setting,
|
|
24
|
+
// exactly like cart.apply_coupon_enabled — not from the per-cart payload or localStorage.
|
|
25
|
+
this.multiCoupon = false;
|
|
17
26
|
this.isHandlingInternalError = false;
|
|
18
27
|
// Store cart event listener references for cleanup
|
|
19
28
|
this.cartUpdatedHandler = (cartData) => {
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
// cart::updated carries the server-side cart. The multi-coupon flag comes from store
|
|
30
|
+
// config (set once in componentWillLoad), so only refresh total + chips here.
|
|
31
|
+
this.cartTotal = cartData?.summary?.sub_total ?? cartData?.sub_total ?? cartData?.total ?? this.cartTotal;
|
|
32
|
+
// Re-sync applied coupon state from the payload — mirroring refreshFromServer's guard:
|
|
33
|
+
// - Multi-coupon: only a real `coupons` array re-seeds the chips, so a summary-only
|
|
34
|
+
// cart::updated can't shrink them (add/remove refreshes the chips from the server).
|
|
35
|
+
// - Single-coupon (flag off): any payload carrying `coupon` re-syncs the input, so a
|
|
36
|
+
// server-side invalidation (e.g. cart drops below the coupon minimum) that emits
|
|
37
|
+
// `coupon: ''` clears the stale code instead of leaving it stuck until a reload.
|
|
38
|
+
const carriesCoupons = this.multiCoupon
|
|
39
|
+
? Array.isArray(cartData?.coupons)
|
|
40
|
+
: (cartData && 'coupon' in cartData);
|
|
41
|
+
if (carriesCoupons) {
|
|
42
|
+
this.syncAppliedFromCart(cartData);
|
|
27
43
|
}
|
|
28
44
|
// Clear error when cart updates
|
|
29
45
|
this.couponError = '';
|
|
30
46
|
};
|
|
31
47
|
this.couponAddedHandler = () => {
|
|
32
|
-
//
|
|
48
|
+
// Skip while an internal apply/remove is in flight — handleApplyClick/removeCoupon already
|
|
49
|
+
// refresh from the server, so this handler only needs to cover EXTERNAL coupon changes
|
|
50
|
+
// (e.g. the checkout page). Prevents a duplicate salla.cart.details() call per action.
|
|
51
|
+
if (this.isApplying || this.isHandlingInternalError) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// Re-read the applied set + flag from the SERVER (not storage), so the chips reflect
|
|
55
|
+
// the real cart — a stale storage cache (e.g. after a checkout-page removal) never shows.
|
|
56
|
+
this.refreshFromServer();
|
|
33
57
|
};
|
|
34
58
|
this.couponAdditionFailedHandler = (error) => {
|
|
35
59
|
// Only handle external coupon failures when no internal operation is handling errors
|
|
@@ -39,7 +63,12 @@ const SallaCartCoupons = class {
|
|
|
39
63
|
// Internal operations handle their own errors to prevent double display
|
|
40
64
|
};
|
|
41
65
|
this.couponDeletedHandler = () => {
|
|
42
|
-
//
|
|
66
|
+
// Same guard as couponAddedHandler: internal removeCoupon already refreshes; only cover
|
|
67
|
+
// EXTERNAL deletions here, so an internal remove doesn't fire two salla.cart.details() calls.
|
|
68
|
+
if (this.isApplying || this.isHandlingInternalError) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
this.refreshFromServer();
|
|
43
72
|
};
|
|
44
73
|
// Arrow functions to maintain context for event listeners
|
|
45
74
|
this.onKeyUp = (event) => {
|
|
@@ -55,15 +84,20 @@ const SallaCartCoupons = class {
|
|
|
55
84
|
async componentWillLoad() {
|
|
56
85
|
await Salla.onReady();
|
|
57
86
|
await Salla.lang.onLoaded();
|
|
87
|
+
// Multi-coupon is a store-level setting — read it ONCE from config here (like
|
|
88
|
+
// apply_coupon_enabled), so it never depends on the per-cart payload or localStorage.
|
|
89
|
+
this.multiCoupon = !!salla.config.get('store.settings.cart.multi_coupon');
|
|
58
90
|
//then set your logic here to avoid any race condition
|
|
59
91
|
this.loadCouponsData(); // Load async without blocking render - shows empty until loaded
|
|
92
|
+
// Synchronous first-paint seed from the storage cart so an applied coupon shows on the very
|
|
93
|
+
// first render instead of flashing empty → applied while the async server fetch is in flight
|
|
94
|
+
// (the old loadCartTotal read storage synchronously). loadCartTotal() then reconciles with the
|
|
95
|
+
// authoritative server payload, which also corrects a storage coupon that was stale.
|
|
96
|
+
this.seedFromStorage();
|
|
60
97
|
this.loadCartTotal();
|
|
61
98
|
this.setupCartEventListeners();
|
|
62
99
|
// Note: No store feature gate needed - coupon availability controlled by backend API response
|
|
63
100
|
}
|
|
64
|
-
componentDidLoad() {
|
|
65
|
-
this.setupCouponInputEvents();
|
|
66
|
-
}
|
|
67
101
|
setupCartEventListeners() {
|
|
68
102
|
// Listen for cart updates to refresh cart total
|
|
69
103
|
salla.event.on('cart::updated', this.cartUpdatedHandler);
|
|
@@ -73,10 +107,8 @@ const SallaCartCoupons = class {
|
|
|
73
107
|
salla.event.on('cart::coupon.deleted', this.couponDeletedHandler);
|
|
74
108
|
}
|
|
75
109
|
disconnectedCallback() {
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
this.couponInputRef?.removeEventListener('input', this.onInput);
|
|
79
|
-
// Clean up cart event listeners using reliable global event system
|
|
110
|
+
// Input events are bound via JSX (onInput/onKeyUp) — Stencil cleans those up. Only the
|
|
111
|
+
// global cart event listeners need explicit teardown here.
|
|
80
112
|
salla.event.off('cart::updated', this.cartUpdatedHandler);
|
|
81
113
|
salla.event.off('cart::coupon.added', this.couponAddedHandler);
|
|
82
114
|
salla.event.off('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
@@ -122,21 +154,118 @@ const SallaCartCoupons = class {
|
|
|
122
154
|
this.availableCoupons = [];
|
|
123
155
|
}
|
|
124
156
|
}
|
|
125
|
-
loadCartTotal() {
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
//
|
|
129
|
-
|
|
157
|
+
async loadCartTotal() {
|
|
158
|
+
// Multi-coupon needs the SERVER-authoritative applied list (localStorage can be stale, e.g.
|
|
159
|
+
// coupons removed on the checkout page). Single-coupon (flag off — the default, and the hot
|
|
160
|
+
// path at billions req/day) is fully seeded synchronously by seedFromStorage() with NO network
|
|
161
|
+
// call, exactly as the original implementation read from storage — so skip the
|
|
162
|
+
// salla.cart.details() round-trip for it.
|
|
163
|
+
if (!this.multiCoupon) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
await this.refreshFromServer();
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Synchronous first-paint seed from the storage cart — SINGLE-COUPON (flag-off) ONLY.
|
|
170
|
+
*
|
|
171
|
+
* It restores the old synchronous first paint Greptile flagged for the default single-coupon
|
|
172
|
+
* stores (the input shows the applied code immediately instead of flashing empty).
|
|
173
|
+
*
|
|
174
|
+
* With multi-coupon ON the applied coupons are SERVER-authoritative: storage can still list a
|
|
175
|
+
* coupon that was invalidated or removed server-side (e.g. dropped below the cart minimum, or
|
|
176
|
+
* removed on another surface), so seeding the chips from it would render a STALE list — e.g.
|
|
177
|
+
* two chips when the server holds one — until the refresh lands. In that mode we skip the seed
|
|
178
|
+
* entirely and let refreshFromServer/cart::updated populate the chips from the server.
|
|
179
|
+
*/
|
|
180
|
+
seedFromStorage() {
|
|
181
|
+
if (this.multiCoupon) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const stored = salla.storage.get('cart');
|
|
185
|
+
if (stored && typeof stored === 'object' && 'coupon' in stored) {
|
|
186
|
+
this.applyCart(stored);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Fetch the cart fresh from the server (salla.cart.details -> CartPresenter::forApi) and
|
|
191
|
+
* seed the applied codes + total from its authoritative payload (cart.coupons). Falls back
|
|
192
|
+
* to the storage cart ONLY if the request fails, and never wipes the chips on an odd shape.
|
|
193
|
+
*/
|
|
194
|
+
async refreshFromServer() {
|
|
195
|
+
try {
|
|
196
|
+
const response = await salla.cart.details();
|
|
197
|
+
// cart-details nests the cart under data.cart (same shape addCoupon/deleteCoupon read).
|
|
198
|
+
const cart = response?.data?.cart ?? response?.data ?? response;
|
|
199
|
+
if (cart && typeof cart === 'object' &&
|
|
200
|
+
(Array.isArray(cart.coupons) || 'coupon' in cart)) {
|
|
201
|
+
this.applyCart(cart);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
catch (e) {
|
|
206
|
+
// ignore — fall back to storage below
|
|
207
|
+
}
|
|
208
|
+
const stored = salla.storage.get('cart');
|
|
209
|
+
if (stored) {
|
|
210
|
+
this.applyCart(stored);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/** Apply an authoritative cart object: total + applied chips (flag comes from store config). */
|
|
214
|
+
applyCart(cart) {
|
|
215
|
+
this.cartTotal = cart?.summary?.sub_total ?? cart?.sub_total ?? this.cartTotal;
|
|
216
|
+
this.syncAppliedFromCart(cart);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Seed the chip list and the active coupon from a cart object.
|
|
220
|
+
* Multi-coupon: use the cart's `coupons` array (survives refresh).
|
|
221
|
+
* Single-coupon (default): use the single `coupon` code.
|
|
222
|
+
*/
|
|
223
|
+
syncAppliedFromCart(cart) {
|
|
130
224
|
this.currentCoupon = cart?.coupon || '';
|
|
131
|
-
this.
|
|
225
|
+
if (this.multiCoupon) {
|
|
226
|
+
this.appliedCoupons = Array.isArray(cart?.coupons)
|
|
227
|
+
? cart.coupons.filter(Boolean)
|
|
228
|
+
: (this.currentCoupon ? [this.currentCoupon] : []);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
// Single-coupon (flag off): mirror the applied code into the (disabled) input, matching the
|
|
232
|
+
// original production UX. Only set at sync points (load / after apply-remove), never on a
|
|
233
|
+
// keystroke, so it won't clobber what the user is typing.
|
|
234
|
+
this.couponInputValue = this.currentCoupon;
|
|
235
|
+
this.appliedCoupons = this.currentCoupon ? [this.currentCoupon] : [];
|
|
132
236
|
}
|
|
133
|
-
|
|
134
|
-
if (
|
|
237
|
+
async handleApplyClick() {
|
|
238
|
+
if (this.isApplying) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const code = this.couponInputValue.trim();
|
|
242
|
+
if (!code) {
|
|
243
|
+
this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
|
|
135
244
|
return;
|
|
136
245
|
}
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
246
|
+
this.isApplying = true;
|
|
247
|
+
this.isHandlingInternalError = true;
|
|
248
|
+
try {
|
|
249
|
+
// Apply the coupon. Multi-coupon: the backend appends it; single-coupon:
|
|
250
|
+
// it replaces the existing one. Re-read the applied set from the SERVER (not storage)
|
|
251
|
+
// for the chip list, and clear the input for the next code.
|
|
252
|
+
await salla.cart.addCoupon(code);
|
|
253
|
+
await this.refreshFromServer();
|
|
254
|
+
this.couponInputValue = '';
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
258
|
+
}
|
|
259
|
+
finally {
|
|
260
|
+
this.isApplying = false;
|
|
261
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
262
|
+
setTimeout(() => {
|
|
263
|
+
this.isHandlingInternalError = false;
|
|
264
|
+
}, 100);
|
|
265
|
+
}
|
|
139
266
|
}
|
|
267
|
+
// Single-coupon (flag off) toggle button: apply the typed code, or remove the applied one.
|
|
268
|
+
// Mirrors the original production behavior; the SDK coupon.added/deleted events then refresh.
|
|
140
269
|
async handleCouponButtonClick() {
|
|
141
270
|
if (this.isApplying) {
|
|
142
271
|
return;
|
|
@@ -150,13 +279,42 @@ const SallaCartCoupons = class {
|
|
|
150
279
|
this.isHandlingInternalError = true;
|
|
151
280
|
try {
|
|
152
281
|
if (hasCoupon) {
|
|
153
|
-
// Remove existing coupon
|
|
154
282
|
await salla.cart.deleteCoupon();
|
|
155
283
|
}
|
|
156
284
|
else {
|
|
157
|
-
// Apply new coupon
|
|
158
285
|
await salla.cart.addCoupon(this.couponInputValue.trim());
|
|
159
286
|
}
|
|
287
|
+
// Refresh the UI directly for the single-coupon toggle. The coupon.added/deleted event
|
|
288
|
+
// handlers skip internal actions (isApplying guard), and cartUpdatedHandler doesn't
|
|
289
|
+
// re-seed from a summary-only payload — so without this refresh the input/button would
|
|
290
|
+
// stay stuck after a successful apply/remove on the default (flag-off) path.
|
|
291
|
+
await this.refreshFromServer();
|
|
292
|
+
}
|
|
293
|
+
catch (error) {
|
|
294
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
295
|
+
}
|
|
296
|
+
finally {
|
|
297
|
+
this.isApplying = false;
|
|
298
|
+
setTimeout(() => {
|
|
299
|
+
this.isHandlingInternalError = false;
|
|
300
|
+
}, 100);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
async removeCoupon(code) {
|
|
304
|
+
if (this.isApplying) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
this.isApplying = true;
|
|
308
|
+
this.isHandlingInternalError = true;
|
|
309
|
+
try {
|
|
310
|
+
// Multi-coupon: remove just this code. Single-coupon: reset the cart coupon.
|
|
311
|
+
if (this.multiCoupon) {
|
|
312
|
+
await salla.cart.deleteCoupon(code);
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
await salla.cart.deleteCoupon();
|
|
316
|
+
}
|
|
317
|
+
await this.refreshFromServer();
|
|
160
318
|
}
|
|
161
319
|
catch (error) {
|
|
162
320
|
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
@@ -195,6 +353,16 @@ const SallaCartCoupons = class {
|
|
|
195
353
|
try {
|
|
196
354
|
// Apply the coupon directly without checking for existing coupon
|
|
197
355
|
await salla.cart.addCoupon(couponCode.trim());
|
|
356
|
+
// Refresh the chips/input directly — the guarded coupon.added handler skips internal
|
|
357
|
+
// actions, so the coupon-card / selectCoupon path must refresh here or the chip list
|
|
358
|
+
// stays stale in multi-coupon mode until the next cart::updated with a coupons[] array.
|
|
359
|
+
await this.refreshFromServer();
|
|
360
|
+
// Multi-coupon: clear the input for the next code. Single-coupon: refreshFromServer
|
|
361
|
+
// already set the input to the applied code (shown disabled), so keep it — clearing
|
|
362
|
+
// here would blank the disabled field on the default flag-off path.
|
|
363
|
+
if (this.multiCoupon) {
|
|
364
|
+
this.couponInputValue = '';
|
|
365
|
+
}
|
|
198
366
|
}
|
|
199
367
|
catch (error) {
|
|
200
368
|
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
@@ -240,7 +408,18 @@ const SallaCartCoupons = class {
|
|
|
240
408
|
: `${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'))))));
|
|
241
409
|
}
|
|
242
410
|
render() {
|
|
243
|
-
return (h(Host, { key: '
|
|
411
|
+
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 ? [
|
|
412
|
+
// Multi-coupon: input stays active to append more codes; applied coupons render
|
|
413
|
+
// as removable chips below.
|
|
414
|
+
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" }),
|
|
415
|
+
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'))),
|
|
416
|
+
] : [
|
|
417
|
+
// Single-coupon (flag off): the ORIGINAL production UX — the field is disabled and
|
|
418
|
+
// shows the applied code, and the button toggles to a red X (danger) to remove it;
|
|
419
|
+
// a new code can only be entered after removing. Reuses the existing master classes.
|
|
420
|
+
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" }),
|
|
421
|
+
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')))),
|
|
422
|
+
]), 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))))))));
|
|
244
423
|
}
|
|
245
424
|
get host() { return getElement(this); }
|
|
246
425
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
import { S as SpecialDiscountIcon } from './special-discount-Ctkfc4K-.js';
|
|
6
6
|
import { S as SIGift } from './gift-CXRKXFgT.js';
|
|
7
7
|
import { T as TagMoneyIcon } from './tag-money-CJUR4sUM.js';
|
|
@@ -229,7 +229,7 @@ const SallaCartSummary = class {
|
|
|
229
229
|
return cartUrl;
|
|
230
230
|
}
|
|
231
231
|
render() {
|
|
232
|
-
return (h(Host, { key: '
|
|
232
|
+
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: PendingOrdersIcon }))), 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) })))));
|
|
233
233
|
}
|
|
234
234
|
get host() { return getElement(this); }
|
|
235
235
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
const SKELETON_ROWS = [
|
|
7
7
|
{ label: '100px', value: '56px' },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
var StarFilledIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<g clip-path="url(#clip0_5667_2008)">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
const sallaCommentsCss = ":host{display:block}.s-comments-item-review-factors-toggle{display:inline-flex;align-items:center;gap:0.35rem;padding:0;border:0;background:transparent;color:#0f6a7c;font-size:0.9rem;font-weight:500;cursor:pointer}.s-comments-item-review-factors-chevron{line-height:1;transform:rotate(180deg);transition:transform 0.2s ease}.s-comments-item-review-factors-chevron.is-open{transform:rotate(0deg)}.s-comments-item-review-factors{border:1px solid #e8e8e8;background:rgba(255, 255, 255, 0.3);border-radius:0.6rem;width:min(100%, 26rem);max-width:100%;margin:0 0 1rem;padding:0.85rem 1rem}@media (max-width: 767px){.s-comments-item-review-factors{width:100%;padding:0.75rem}}.s-comments-item-review-factor-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;direction:ltr;min-width:0}@media (max-width: 767px){.s-comments-item-review-factor-row{flex-direction:row;align-items:stretch;gap:0.35rem}}.s-comments-item-review-factor-row+.s-comments-item-review-factor-row{margin-top:0.5rem}.s-comments-item-review-factor-label,.s-comments-item-review-factor-name{color:#4b5563;font-size:0.9rem;line-height:1.45}.s-comments-item-review-factor-name{min-width:6.5rem;text-align:end;flex-shrink:0}@media (max-width: 767px){.s-comments-item-review-factor-name{min-width:5rem;text-align:end}}.s-comments-item-review-factor-label{display:inline-block;min-width:4.75rem}@media (max-width: 767px){.s-comments-item-review-factor-label{min-width:0;flex:1 1 auto}}.s-comments-item-review-factor-value{display:inline-flex;align-items:center;gap:0.35rem;min-width:0}@media (max-width: 767px){.s-comments-item-review-factor-value{width:100%;justify-content:space-between;gap:0.25rem}}.s-comments-item-review-factor-stars{flex-shrink:0}.s-comments-item-review-factor-stars .s-rating-stars-wrapper{gap:0}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, i as require_root, j as requireIsObject, k as requireIsSymbol, d as getDefaultExportFromCjs } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, i as require_root, j as requireIsObject, k as requireIsSymbol, d as getDefaultExportFromCjs } from './index-DW5RMC3M.js';
|
|
5
5
|
import { S as SICheck } from './check-BZp0rKEO.js';
|
|
6
6
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
7
7
|
import { H as Helper } from './Helper-BQ9mvrt9.js';
|
|
@@ -49,7 +49,7 @@ const SallaCommentForm = class {
|
|
|
49
49
|
.finally(() => this.submitBtn.stop());
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '0e3a24dcfe8922106b9479aa559cf0e126bc3fcf' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
|
|
53
53
|
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))))) : ''));
|
|
54
54
|
}
|
|
55
55
|
};
|
|
@@ -912,7 +912,7 @@ const SallaReviewCard = class {
|
|
|
912
912
|
return (h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, h("img", { alt: product.image?.alt || "Product", src: product.image?.url, class: "s-review-card-product-image", width: 60, height: 60, loading: "lazy", decoding: "async", draggable: false }), h("div", { class: "s-review-card-product-details" }, h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? h("p", { class: "s-review-card-product-details-purchase-count" }, h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
|
|
913
913
|
}
|
|
914
914
|
render() {
|
|
915
|
-
return h("div", { key: '
|
|
915
|
+
return h("div", { key: '3fd3fe6c1bdb3a160c9f267ba0653155d0334e44', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '63b0be0923c9f4db0195f91a24e4ed05591cdb3b', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: '9b16ebeb60b400a8afcd1eaa0b8097a9b0c3b062', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
|
|
916
916
|
}
|
|
917
917
|
get el() { return getElement(this); }
|
|
918
918
|
};
|
|
@@ -1009,7 +1009,7 @@ const SallaReviews = class {
|
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
1011
|
render() {
|
|
1012
|
-
return (h("div", { key: '
|
|
1012
|
+
return (h("div", { key: '24e50ca2634208ad3ffcb9ca503aa7e18331b3a1', class: "s-reviews-container" }, h("div", { key: 'a1632306fc1a92051d030707aab075c825537e01', class: "s-reviews-header-wrapper" }, h("h1", { key: 'e2a4df75011da111e89c1b732e7741ddf452b9d5', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft }))) : null), h("salla-slider", { key: '89009e55e3a5121c241295efd510405b623f45c3', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: '8b6b8df42043c8ecdb05dbbc30ecacde297f0dda', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
SallaReviews.style = sallaReviewsCss;
|
|
@@ -1689,7 +1689,7 @@ const SallaReviewsPage = class {
|
|
|
1689
1689
|
return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
|
|
1690
1690
|
}
|
|
1691
1691
|
render() {
|
|
1692
|
-
return (h("host", { key: '
|
|
1692
|
+
return (h("host", { key: 'b82b491ae189f825367881b7b4f03ad64e471aae' }, h("div", { key: 'd124f10806cfabd1c1f85044786541011edff3ff', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '30c58bb14bea27da968e874a0c1454a35e8db207', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: '8850771469ae20d1b07efcb45be58738de377e6d', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: '5a0060c5bdbfe4d37003b04d4c6368460be8cd38', class: "s-reviews-page-filter-wrapper" }, h("label", { key: '637d1aeec005ae662c6019c423ef3f1c3a6ff264', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '5b68b9441d4647f12583c71da61958c30c0dcda6', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
|
|
1693
1693
|
this.wrapper = el;
|
|
1694
1694
|
} }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
|
|
1695
1695
|
: h("div", { class: "s-products-list-placeholder" }, h("span", { innerHTML: ShoppingBag }), h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (h("div", { class: "s-reviews-page-load-more-container" }, h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
import { W as WhatsappIcon } from './whatsapp2-CgR-T_ZS.js';
|
|
6
6
|
import { e as email } from './mail-DzAIgzdz.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}.s-cookies-bar-btn--active{box-shadow:0 0 0 2px rgba(0, 0, 0, 0.08)}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
const sallaCountDownCss = ".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";
|
|
7
7
|
|
|
@@ -129,7 +129,8 @@ const SallaCountDown = class {
|
|
|
129
129
|
return !isNaN(Date.parse(testedDate));
|
|
130
130
|
}
|
|
131
131
|
number(digit) {
|
|
132
|
-
|
|
132
|
+
const value = String(Math.max(0, Math.floor(digit))).padStart(2, '0');
|
|
133
|
+
return salla.helpers.number(value, this.digits === 'en');
|
|
133
134
|
}
|
|
134
135
|
startCountDown() {
|
|
135
136
|
const normalized = this.normalizeDate(this.date);
|
|
@@ -232,7 +233,7 @@ const SallaCountDown = class {
|
|
|
232
233
|
return this.renderCountDown();
|
|
233
234
|
}
|
|
234
235
|
render() {
|
|
235
|
-
return (h(Host, { key: '
|
|
236
|
+
return (h(Host, { key: 'e2805e528a52b71ad71f4f1f16a473947dafb5bc', 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()));
|
|
236
237
|
}
|
|
237
238
|
};
|
|
238
239
|
SallaCountDown.style = sallaCountDownCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h } from './index-DW5RMC3M.js';
|
|
5
5
|
import { C as CameraIcon } from './camera-C6jIkM-X.js';
|
|
6
6
|
import { F as FormFieldTypes } from './interfaces-OF8QcbMM.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
|
|
6
6
|
const DEBUG_KEY = 'salla-delivery-promise-debug';
|
|
7
7
|
function log(message, data) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
import { H as Helper } from './Helper-BQ9mvrt9.js';
|
|
6
6
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
@@ -176,12 +176,12 @@ const SallaFiltersWidget = class {
|
|
|
176
176
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
|
-
return (h(Host, { key: '
|
|
179
|
+
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
|
|
180
180
|
? this.renderFilterOption(this.option)
|
|
181
181
|
: h("salla-price-range", { onChanged: (event) => {
|
|
182
182
|
this.changed.emit(event.detail);
|
|
183
183
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
184
|
-
h("a", { key: '
|
|
184
|
+
h("a", { key: '885668e717441581cd1b92494ebc3927cd70daf1', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
185
185
|
}
|
|
186
186
|
get host() { return getElement(this); }
|
|
187
187
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DW5RMC3M.js';
|
|
5
5
|
import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
|
|
6
6
|
import { H as Helper } from './Helper-BQ9mvrt9.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
@@ -281,7 +281,7 @@ const SallaFilters = class {
|
|
|
281
281
|
render() {
|
|
282
282
|
const appliedFilters = this.getAppliedFilters();
|
|
283
283
|
const removeText = salla.lang.getWithDefault('common.elements.delete', 'Remove');
|
|
284
|
-
return h(Host, { key: '
|
|
284
|
+
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 } }) => {
|
|
285
285
|
this.handleOptionChange(event, option, value);
|
|
286
286
|
} })));
|
|
287
287
|
}
|