@salla.sa/twilight-components 2.14.386 → 2.14.388
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-Dz0w3b0-.js → filepond-JwtIy_PZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Bc2hFAJm.js → filepond-plugin-file-poster-HbVPHajC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D-ntIPdx.js → filepond-plugin-file-validate-size-BfnCLQbe.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-1TnSvBgD.js → filepond-plugin-file-validate-type-ZlRC1VfY.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DGi3QY5x.js → filepond-plugin-image-edit-DiQE1wz9.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CzMQBbqX.js → filepond-plugin-image-exif-orientation-DIwNNDxM.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-D555a4un.js → filepond-plugin-image-preview-C51b46QP.js} +1 -1
- package/dist/cjs/{index--a5myRaH.js → index-ByBROVOr.js} +1 -1
- package/dist/cjs/{index-Oy30xVAt.js → index-DO-q5keQ.js} +6 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_4.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-booking-field_7.cjs.entry.js +17 -17
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +251 -0
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +42 -28
- 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 +7 -7
- package/dist/cjs/salla-custom-fields.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-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-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
- 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-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-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-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-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-size-guide.cjs.entry.js +3 -3
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
- 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/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-BjBHEsil.js → vanilla-picker-DiJq-dd5.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-cart-coupons/interfaces.js +1 -0
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +0 -0
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +293 -0
- 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-comments/salla-comment-item.js +3 -3
- package/dist/collection/components/salla-comments/salla-comments.js +34 -20
- 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-program/salla-loyalty-program.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-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-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-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- 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/components/index.js +2 -2
- package/dist/components/salla-cart-coupons.d.ts +11 -0
- package/dist/components/salla-cart-coupons.js +287 -0
- 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-comment-item2.js +3 -3
- package/dist/components/salla-comments.js +34 -20
- 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-prize-item.js +1 -1
- package/dist/components/salla-loyalty-program.js +1 -1
- 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-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-card2.js +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input.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-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share.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/esm/{filepond-BXxeKj-9.js → filepond-CtRmlCu3.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B5BTs5Ly.js → filepond-plugin-file-poster-CMkOcEkV.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-_PyCg3tk.js → filepond-plugin-file-validate-size-DzG8gDvA.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-uSrSfAxF.js → filepond-plugin-file-validate-type-DSshuV-e.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Cke6iTN3.js → filepond-plugin-image-edit-soyMBqQc.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DKLDaeeL.js → filepond-plugin-image-exif-orientation-Bt8OVYG8.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-KfxXXS81.js → filepond-plugin-image-preview-N0oEw9xZ.js} +1 -1
- package/dist/esm/{index-D4I5TLtE.js → index-CvIpy7Cj.js} +6 -2
- package/dist/esm/{index-B2mHcqWp.js → index-Cw-jhhOv.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_3.entry.js +4 -4
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_4.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-booking-field_7.entry.js +17 -17
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +249 -0
- package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
- package/dist/esm/salla-comment-form_8.entry.js +42 -28
- 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 +7 -7
- package/dist/esm/salla-custom-fields.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-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-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +2 -2
- 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-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-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-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-size-guide.entry.js +3 -3
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +2 -2
- 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/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CM1O2U8w.js → vanilla-picker-CGGBRKTl.js} +1 -1
- package/dist/twilight/p-02aa05b3.entry.js +4 -0
- package/dist/twilight/{p-d8510bea.entry.js → p-04072cae.entry.js} +1 -1
- package/dist/twilight/{p-7a874935.entry.js → p-06eb15e2.entry.js} +1 -1
- package/dist/twilight/{p-bd3ed9f5.entry.js → p-073ee1c3.entry.js} +1 -1
- package/dist/twilight/p-189b3238.entry.js +4 -0
- package/dist/twilight/{p-15c7e73a.entry.js → p-1b097cea.entry.js} +1 -1
- package/dist/twilight/{p-0127cd6e.entry.js → p-1cb9d96c.entry.js} +1 -1
- package/dist/twilight/p-2200f944.entry.js +4 -0
- package/dist/twilight/{p-0e82b9cd.entry.js → p-221456be.entry.js} +1 -1
- package/dist/twilight/{p-90dc7be8.entry.js → p-23099ba2.entry.js} +1 -1
- package/dist/twilight/{p-ba723c9d.entry.js → p-242b6421.entry.js} +1 -1
- package/dist/twilight/{p-ebc8b253.entry.js → p-249c9d98.entry.js} +1 -1
- package/dist/twilight/{p-e8601f3e.entry.js → p-2dfe2197.entry.js} +1 -1
- package/dist/twilight/{p-7424ba6e.entry.js → p-300be242.entry.js} +1 -1
- package/dist/twilight/{p-33727c81.entry.js → p-306c4986.entry.js} +1 -1
- package/dist/twilight/p-31458cbf.entry.js +4 -0
- package/dist/twilight/p-348106f0.entry.js +4 -0
- package/dist/twilight/{p-37996e21.entry.js → p-3589bed2.entry.js} +1 -1
- package/dist/twilight/{p-f5004752.entry.js → p-3c8e6e9f.entry.js} +1 -1
- package/dist/twilight/{p-6c1eb2aa.entry.js → p-3c982608.entry.js} +1 -1
- package/dist/twilight/{p-a2b440ae.entry.js → p-3d3b3856.entry.js} +1 -1
- package/dist/twilight/{p-5338f5de.entry.js → p-402fc86d.entry.js} +1 -1
- package/dist/twilight/p-48c94220.entry.js +4 -0
- package/dist/twilight/{p-fe2adfd8.entry.js → p-49b7c969.entry.js} +1 -1
- package/dist/twilight/{p-a751f592.entry.js → p-4a4c1969.entry.js} +1 -1
- package/dist/twilight/p-4c007dc0.entry.js +4 -0
- package/dist/twilight/{p-d4035f22.entry.js → p-4da987fc.entry.js} +1 -1
- package/dist/twilight/{p-653b2dac.entry.js → p-4fc10acd.entry.js} +1 -1
- package/dist/twilight/{p-408f439d.entry.js → p-507fac68.entry.js} +1 -1
- package/dist/twilight/{p-89635370.entry.js → p-540297d6.entry.js} +1 -1
- package/dist/twilight/{p-7b18c9e0.entry.js → p-5638111c.entry.js} +1 -1
- package/dist/twilight/{p-29da0820.entry.js → p-59758658.entry.js} +1 -1
- package/dist/twilight/{p-6a8ae21b.entry.js → p-5f52e482.entry.js} +1 -1
- package/dist/twilight/{p-4ede0af7.entry.js → p-6257e0cd.entry.js} +1 -1
- package/dist/twilight/{p-0537ad3e.entry.js → p-694aa670.entry.js} +1 -1
- package/dist/twilight/{p-a56efe37.entry.js → p-6ca09b34.entry.js} +1 -1
- package/dist/twilight/{p-f8693f42.entry.js → p-7020a339.entry.js} +1 -1
- package/dist/twilight/{p-a32e417b.entry.js → p-73113e85.entry.js} +1 -1
- package/dist/twilight/{p-283727c3.entry.js → p-7a87c0a9.entry.js} +1 -1
- package/dist/twilight/{p-4b34c403.entry.js → p-7c8fe050.entry.js} +1 -1
- package/dist/twilight/{p-4d80d014.entry.js → p-8043f8ea.entry.js} +1 -1
- package/dist/twilight/{p-dbb2069c.entry.js → p-8bd3ba9e.entry.js} +1 -1
- package/dist/twilight/{p-08c37adc.entry.js → p-93623f07.entry.js} +1 -1
- package/dist/twilight/{p-06e10077.entry.js → p-9f3f2ac3.entry.js} +1 -1
- package/dist/twilight/p-B1ZkITMY.js +9 -0
- package/dist/twilight/{p-BjbWnZaV.js → p-BXOq5BwG.js} +1 -1
- package/dist/twilight/{p-BbjmfFRJ.js → p-BlMSs0A2.js} +1 -1
- package/dist/twilight/{p-D4I5TLtE.js → p-CvIpy7Cj.js} +1 -1
- package/dist/twilight/{p-Ym28Ytut.js → p-D26J1_uI.js} +1 -1
- package/dist/twilight/{p-D339DoJY.js → p-DWxyBEuT.js} +2 -2
- package/dist/twilight/{p-Dr8Bgm1u.js → p-NiLajaRX.js} +1 -1
- package/dist/twilight/{p-Q1_LG8_l.js → p-VRwnn1Qc.js} +1 -1
- package/dist/twilight/{p-503a0362.entry.js → p-a248f209.entry.js} +1 -1
- package/dist/twilight/{p-9cf8788e.entry.js → p-a2c5e7bc.entry.js} +1 -1
- package/dist/twilight/{p-5bc80a29.entry.js → p-a41f0590.entry.js} +1 -1
- package/dist/twilight/{p-181da663.entry.js → p-a97f10a1.entry.js} +1 -1
- package/dist/twilight/{p-6b66894c.entry.js → p-aa5bf3b5.entry.js} +1 -1
- package/dist/twilight/{p-72ebeb8b.entry.js → p-b1e8296d.entry.js} +1 -1
- package/dist/twilight/{p-0476b736.entry.js → p-b2537237.entry.js} +1 -1
- package/dist/twilight/{p-70799a42.entry.js → p-b4f431bf.entry.js} +1 -1
- package/dist/twilight/{p-a348dd40.entry.js → p-bc65bb02.entry.js} +1 -1
- package/dist/twilight/p-be1c54e6.entry.js +4 -0
- package/dist/twilight/{p-91f1e6df.entry.js → p-c43be30b.entry.js} +1 -1
- package/dist/twilight/{p-5bc914c3.entry.js → p-ce560f66.entry.js} +1 -1
- package/dist/twilight/p-d00fc4bf.entry.js +4 -0
- package/dist/twilight/{p-d0e38089.entry.js → p-d07f5e44.entry.js} +1 -1
- package/dist/twilight/{p-30bdeebc.entry.js → p-d215b7d2.entry.js} +1 -1
- package/dist/twilight/{p-35bab511.entry.js → p-d4b83f2a.entry.js} +1 -1
- package/dist/twilight/{p-9ac3d8e7.entry.js → p-da155135.entry.js} +1 -1
- package/dist/twilight/{p-3a67bf02.entry.js → p-e0b13c19.entry.js} +1 -1
- package/dist/twilight/{p-c52ad0b1.entry.js → p-e3b4a179.entry.js} +1 -1
- package/dist/twilight/{p-95afe7b9.entry.js → p-e46cb169.entry.js} +1 -1
- package/dist/twilight/{p-cfa77298.entry.js → p-e79ad638.entry.js} +1 -1
- package/dist/twilight/{p-c3c51233.entry.js → p-e9be8c03.entry.js} +1 -1
- package/dist/twilight/{p-12e9e619.entry.js → p-ed08f5e5.entry.js} +1 -1
- package/dist/twilight/{p-2c5880fe.entry.js → p-f7f592ab.entry.js} +1 -1
- package/dist/twilight/p-f81195ae.entry.js +4 -0
- package/dist/twilight/{p-Bm_ows1a.js → p-uADDAGsE.js} +1 -1
- package/dist/twilight/{p-OQFknQfe.js → p-wnPgaQoR.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cart-coupons/interfaces.d.ts +26 -0
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +39 -0
- package/dist/types/components/salla-comments/salla-comments.d.ts +2 -0
- package/dist/types/components.d.ts +19 -0
- package/package.json +5 -5
- package/dist/twilight/p-15732417.entry.js +0 -4
- package/dist/twilight/p-28665675.entry.js +0 -4
- package/dist/twilight/p-3cf6308d.entry.js +0 -4
- package/dist/twilight/p-48db8cc1.entry.js +0 -4
- package/dist/twilight/p-4f5c85b6.entry.js +0 -4
- package/dist/twilight/p-7ac9fe96.entry.js +0 -4
- package/dist/twilight/p-9b68f4f7.entry.js +0 -4
- package/dist/twilight/p-D_Ov4zes.js +0 -9
- package/dist/twilight/p-d6dccd1f.entry.js +0 -4
- package/dist/twilight/p-e8b67cc3.entry.js +0 -4
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
|
+
|
|
8
|
+
const sallaCartCouponsCss = "";
|
|
9
|
+
|
|
10
|
+
const SallaCartCoupons = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.availableCoupons = [];
|
|
14
|
+
this.cartTotal = 0;
|
|
15
|
+
this.currentCoupon = '';
|
|
16
|
+
this.couponInputValue = '';
|
|
17
|
+
this.couponError = '';
|
|
18
|
+
this.isApplying = false;
|
|
19
|
+
this.isHandlingInternalError = false;
|
|
20
|
+
// Store cart event listener references for cleanup
|
|
21
|
+
this.cartUpdatedHandler = (cartData) => {
|
|
22
|
+
this.cartTotal = cartData.sub_total ?? cartData.total ?? 0;
|
|
23
|
+
// Update current coupon state
|
|
24
|
+
const couponCode = cartData.coupon || '';
|
|
25
|
+
// Only overwrite the user's typed value when the cart-level coupon itself changes
|
|
26
|
+
if (couponCode !== this.currentCoupon) {
|
|
27
|
+
this.currentCoupon = couponCode;
|
|
28
|
+
this.couponInputValue = couponCode;
|
|
29
|
+
}
|
|
30
|
+
// Clear error when cart updates
|
|
31
|
+
this.couponError = '';
|
|
32
|
+
};
|
|
33
|
+
this.couponAddedHandler = () => {
|
|
34
|
+
// Coupon was successfully added - state is managed by cartUpdatedHandler
|
|
35
|
+
};
|
|
36
|
+
this.couponAdditionFailedHandler = (error) => {
|
|
37
|
+
// Only handle external coupon failures when no internal operation is handling errors
|
|
38
|
+
if (!this.isApplying && !this.isHandlingInternalError) {
|
|
39
|
+
this.showCouponError(error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
40
|
+
}
|
|
41
|
+
// Internal operations handle their own errors to prevent double display
|
|
42
|
+
};
|
|
43
|
+
this.couponDeletedHandler = () => {
|
|
44
|
+
// Coupon was removed - state is managed by cartUpdatedHandler
|
|
45
|
+
};
|
|
46
|
+
// Arrow functions to maintain context for event listeners
|
|
47
|
+
this.onKeyUp = (event) => {
|
|
48
|
+
if (event.key === 'Enter') {
|
|
49
|
+
this.couponButtonRef?.click();
|
|
50
|
+
}
|
|
51
|
+
this.couponError = '';
|
|
52
|
+
};
|
|
53
|
+
this.onInput = (event) => {
|
|
54
|
+
this.couponInputValue = event.target.value;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async componentWillLoad() {
|
|
58
|
+
await Salla.onReady();
|
|
59
|
+
await Salla.lang.onLoaded();
|
|
60
|
+
//then set your logic here to avoid any race condition
|
|
61
|
+
this.loadCouponsData(); // Load async without blocking render - shows empty until loaded
|
|
62
|
+
this.loadCartTotal();
|
|
63
|
+
this.setupCartEventListeners();
|
|
64
|
+
// Note: No store feature gate needed - coupon availability controlled by backend API response
|
|
65
|
+
}
|
|
66
|
+
componentDidLoad() {
|
|
67
|
+
this.setupCouponInputEvents();
|
|
68
|
+
}
|
|
69
|
+
setupCartEventListeners() {
|
|
70
|
+
// Listen for cart updates to refresh cart total
|
|
71
|
+
salla.event.on('cart::updated', this.cartUpdatedHandler);
|
|
72
|
+
// Listen for coupon events
|
|
73
|
+
salla.event.on('cart::coupon.added', this.couponAddedHandler);
|
|
74
|
+
salla.event.on('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
75
|
+
salla.event.on('cart::coupon.deleted', this.couponDeletedHandler);
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
// Clean up DOM event listeners
|
|
79
|
+
this.couponInputRef?.removeEventListener('keyup', this.onKeyUp);
|
|
80
|
+
this.couponInputRef?.removeEventListener('input', this.onInput);
|
|
81
|
+
// Clean up cart event listeners using reliable global event system
|
|
82
|
+
salla.event.off('cart::updated', this.cartUpdatedHandler);
|
|
83
|
+
salla.event.off('cart::coupon.added', this.couponAddedHandler);
|
|
84
|
+
salla.event.off('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
85
|
+
salla.event.off('cart::coupon.deleted', this.couponDeletedHandler);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Business Decision: No visual selected state needed
|
|
89
|
+
* UX Flow: Click coupon → populate input → auto-apply (streamlined experience)
|
|
90
|
+
*/
|
|
91
|
+
async selectCoupon(couponCode) {
|
|
92
|
+
const selectedCoupon = this.availableCoupons.find(coupon => coupon.code === couponCode);
|
|
93
|
+
if (selectedCoupon) {
|
|
94
|
+
if (!this.isEligible(selectedCoupon)) {
|
|
95
|
+
throw new Error(`Coupon not eligible: minimum cart amount not met`);
|
|
96
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
// Actually apply the coupon to the cart first
|
|
99
|
+
await this.applyCoupon(couponCode);
|
|
100
|
+
// Only dispatch event after successful API call
|
|
101
|
+
this.host.dispatchEvent(new CustomEvent('salla::cart-coupons.coupon.selected', {
|
|
102
|
+
detail: selectedCoupon,
|
|
103
|
+
bubbles: true
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
// Rethrow to let caller handle the error
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return selectedCoupon;
|
|
112
|
+
}
|
|
113
|
+
async loadCouponsData() {
|
|
114
|
+
try {
|
|
115
|
+
// Load coupons from API
|
|
116
|
+
const response = await salla.api.request('coupons');
|
|
117
|
+
const raw = response?.data;
|
|
118
|
+
const coupons = Array.isArray(raw) ? raw : (Array.isArray(raw?.data) ? raw.data : []);
|
|
119
|
+
this.availableCoupons = coupons;
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
console.warn('Failed to load coupons:', error);
|
|
123
|
+
// No coupons available on error
|
|
124
|
+
this.availableCoupons = [];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
loadCartTotal() {
|
|
128
|
+
// Get cart total and current coupon from Salla storage
|
|
129
|
+
const cart = salla.storage.get('cart');
|
|
130
|
+
// Check summary first (more accurate), then cart level, fallback to 0
|
|
131
|
+
this.cartTotal = cart?.summary?.sub_total ?? cart?.sub_total ?? 0;
|
|
132
|
+
this.currentCoupon = cart?.coupon || '';
|
|
133
|
+
this.couponInputValue = cart?.coupon || '';
|
|
134
|
+
}
|
|
135
|
+
setupCouponInputEvents() {
|
|
136
|
+
if (!this.couponInputRef || !this.couponButtonRef) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.couponInputRef.addEventListener('keyup', this.onKeyUp);
|
|
140
|
+
this.couponInputRef.addEventListener('input', this.onInput);
|
|
141
|
+
}
|
|
142
|
+
async handleCouponButtonClick() {
|
|
143
|
+
if (this.isApplying) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const hasCoupon = !!this.currentCoupon;
|
|
147
|
+
if (!hasCoupon && !this.couponInputValue.trim()) {
|
|
148
|
+
this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
this.isApplying = true;
|
|
152
|
+
this.isHandlingInternalError = true;
|
|
153
|
+
try {
|
|
154
|
+
if (hasCoupon) {
|
|
155
|
+
// Remove existing coupon
|
|
156
|
+
await salla.cart.deleteCoupon();
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
// Apply new coupon
|
|
160
|
+
await salla.cart.addCoupon(this.couponInputValue.trim());
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
165
|
+
}
|
|
166
|
+
finally {
|
|
167
|
+
this.isApplying = false;
|
|
168
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
this.isHandlingInternalError = false;
|
|
171
|
+
}, 100);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
showCouponError(message) {
|
|
175
|
+
this.couponError = message;
|
|
176
|
+
}
|
|
177
|
+
handleCouponClick(coupon) {
|
|
178
|
+
this.applyCoupon(coupon.code, false).catch(() => {
|
|
179
|
+
// Error already displayed by applyCoupon
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
async applyCoupon(couponCode, shouldThrow = true) {
|
|
183
|
+
if (this.isApplying) {
|
|
184
|
+
if (shouldThrow) {
|
|
185
|
+
throw new Error('Coupon application already in progress');
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
return; // Silent return for card clicks when operation is already in progress
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// Update the input field with the coupon code
|
|
192
|
+
this.couponInputValue = couponCode;
|
|
193
|
+
// Clear any existing errors
|
|
194
|
+
this.couponError = '';
|
|
195
|
+
this.isApplying = true;
|
|
196
|
+
this.isHandlingInternalError = true;
|
|
197
|
+
try {
|
|
198
|
+
// Apply the coupon directly without checking for existing coupon
|
|
199
|
+
await salla.cart.addCoupon(couponCode.trim());
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
203
|
+
// Re-throw error only if requested (for selectCoupon API)
|
|
204
|
+
if (shouldThrow) {
|
|
205
|
+
throw error;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
finally {
|
|
209
|
+
this.isApplying = false;
|
|
210
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
211
|
+
setTimeout(() => {
|
|
212
|
+
this.isHandlingInternalError = false;
|
|
213
|
+
}, 100);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
formatMainAmount(coupon) {
|
|
217
|
+
if (coupon.type === 'percentage') {
|
|
218
|
+
// For percentage coupons, amount should be a string or number
|
|
219
|
+
const percentageValue = typeof coupon.amount === 'object' ? coupon.amount.amount : coupon.amount;
|
|
220
|
+
return `${salla.helpers.number(percentageValue)}%`;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
// For fixed coupons, amount is an object with amount and currency
|
|
224
|
+
const amountData = typeof coupon.amount === 'object' ? coupon.amount : {
|
|
225
|
+
amount: coupon.amount,
|
|
226
|
+
currency: coupon.minimum_amount?.currency || salla.config.get('store.currency.code', 'SAR')
|
|
227
|
+
};
|
|
228
|
+
return (index.h("span", { innerHTML: salla.money(amountData.amount, amountData.currency) }));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
isEligible(coupon) {
|
|
232
|
+
if (coupon.minimum_amount && this.cartTotal < parseFloat(coupon.minimum_amount.amount)) {
|
|
233
|
+
return false; // Coupon is not eligible due to minimum amount requirement
|
|
234
|
+
}
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
renderCouponCard(coupon) {
|
|
238
|
+
const isEligible = this.isEligible(coupon);
|
|
239
|
+
// Note: Card notches (ticket-style pseudo-elements) match card background, not page background - this is intentional design
|
|
240
|
+
return (index.h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, index.h("div", { class: `s-cart-coupons-card ${!isEligible || this.isApplying ? 's-cart-coupons-disabled' : ''}`, onClick: () => isEligible && !this.isApplying && this.handleCouponClick(coupon) }, index.h("div", { class: "s-cart-coupons-top-section" }, index.h("div", { class: "s-cart-coupons-discount-values" }, index.h("div", { class: "s-cart-coupons-main-amount" }, this.formatMainAmount(coupon)), coupon.free_shipping ? (index.h("div", { class: "s-cart-coupons-secondary-info" }, "+ ", salla.lang.get('pages.cart.free_shipping'))) : coupon.maximum_amount && (index.h("div", { class: "s-cart-coupons-secondary-info" }, salla.lang.get('pages.cart.up_to'), " ", index.h("span", { innerHTML: salla.money(coupon.maximum_amount.amount, coupon.maximum_amount.currency) })))), index.h("div", { class: "s-cart-coupons-code" }, coupon.code)), index.h("div", { class: "s-cart-coupons-divider" }), index.h("div", { class: "s-cart-coupons-bottom-section" }, index.h("div", { class: "s-cart-coupons-terms" }, coupon.remaining_days !== undefined && coupon.remaining_days !== null && (index.h("div", { class: `s-cart-coupons-expiry ${coupon.remaining_days <= 3 ? 's-cart-coupons-expiry-warning' : ''}` }, coupon.remaining_days === 0
|
|
241
|
+
? salla.lang.get('pages.cart.expires_today')
|
|
242
|
+
: `${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 && (index.h("div", { class: "s-cart-coupons-minimum" }, salla.lang.get('pages.cart.minimum'), " ", index.h("span", { innerHTML: salla.money(coupon.minimum_amount.amount, coupon.minimum_amount.currency) })))), index.h("div", { class: "s-cart-coupons-action" }, isEligible ? salla.lang.get('pages.cart.save_coupon') : salla.lang.get('pages.cart.coupon_not_compatible'))))));
|
|
243
|
+
}
|
|
244
|
+
render() {
|
|
245
|
+
return (index.h(index.Host, { key: 'f3f3d943ab2c1a6488a1da02d2cc031dbc88b482' }, index.h("div", { key: 'abf88828017041b19a6c54ba2f99e6c246bd8d04', class: "s-cart-coupons-wrapper" }, index.h("div", { key: 'c2946579a7cca935722997229f50ede603acb8b2', class: "s-cart-coupons-input-section" }, index.h("label", { key: '50042d827c86daf853babd4e41ba3a920aceda9d', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), index.h("div", { key: '4b01047727bd3a83f6cfbac37221e7732076248f', class: "s-cart-coupons-coupon-input-container" }, index.h("input", { key: '555108f68b7a60c618d9a904905ef321cd274c7a', 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, ref: el => this.couponInputRef = el, "aria-label": salla.lang.get('pages.cart.apply_coupon') }), index.h("salla-button", { key: '0416bbaf029f7d8951ca6a419cdc676ae50ee792', 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() }, this.currentCoupon ? (index.h("i", { class: "sicon-cancel" })) : (index.h("span", null, salla.lang.get('pages.cart.save_coupon'))))), this.couponError && (index.h("span", { key: 'f7c77e8676cb07b4820b571dbd8ee25dca79a1b1', class: "s-cart-coupons-coupon-error" }, this.couponError))), this.availableCoupons && this.availableCoupons.length > 0 && (index.h("salla-slider", { key: 'daee9c6705de734d5f81ff86d92ad6952b5a7332', type: "carousel", showControls: false, class: "s-cart-coupons-slider" }, index.h("div", { key: '5d5ef30a6ff7f7c2b406cc5cec6622c2f028d17e', slot: "items" }, this.availableCoupons.map(coupon => this.renderCouponCard(coupon))))))));
|
|
246
|
+
}
|
|
247
|
+
get host() { return index.getElement(this); }
|
|
248
|
+
};
|
|
249
|
+
SallaCartCoupons.style = sallaCartCouponsCss;
|
|
250
|
+
|
|
251
|
+
exports.salla_cart_coupons = SallaCartCoupons;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
7
|
var specialDiscount = require('./special-discount-DC2oXurL.js');
|
|
8
8
|
var gift = require('./gift-CJ-3Yw_x.js');
|
|
9
9
|
var keyboard_arrow_down = require('./keyboard_arrow_down-DHJ3FFZq.js');
|
|
@@ -217,7 +217,7 @@ const SallaCartSummary = class {
|
|
|
217
217
|
return cartUrl;
|
|
218
218
|
}
|
|
219
219
|
render() {
|
|
220
|
-
return (index.h(index.Host, { key: '
|
|
220
|
+
return (index.h(index.Host, { key: '918f027fd28cd25d653b8419f97223daaf22d428' }, index.h("a", { key: 'b74a2724ada356a01b915044d56dfb0f9953338e', class: "s-cart-summary-wrapper", href: this.getCartLink() }, index.h("div", { key: 'b9332fe1b66b895c1e9950efaa548f04eb053d46', id: "s-cart-icon" }, index.h("slot", { key: '2b5c1cf8dea4ca23a54beeb83cfad44538ca3ab7', name: "icon" }, index.h("i", { key: 'f3145ed4a994762441d925280a3234d78c378bef', class: "s-cart-summary-icon", innerHTML: cart.PendingOrdersIcon }))), index.h("span", { key: '26a78adf9b279019504e995216ea5373b6866876', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), index.h("p", { key: '60ad091221ed5cd3e2ac0d27ebc53ec9917ccd64', class: "s-cart-summary-content" }, this.showCartLabel && index.h("span", { key: '66819086b9ed7f6f21be2cd5e8baf0bc88021e40', class: "s-cart-summary-label" }, this.cartLabel), index.h("b", { key: 'a07c85971e50add3cdd5b51942e642d4daf19d82', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
|
|
221
221
|
}
|
|
222
222
|
get host() { return index.getElement(this); }
|
|
223
223
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
7
|
var check = require('./check-x3w3-gpj.js');
|
|
8
8
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
9
9
|
var Helper = require('./Helper-CU4Xuiki.js');
|
|
@@ -38,7 +38,7 @@ const SallaCommentForm = class {
|
|
|
38
38
|
.finally(() => this.submitBtn.stop);
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (index.h(index.Host, { key: '
|
|
41
|
+
return (index.h(index.Host, { key: '24b73030ff1828a6f21c1c36a00be2c8651f6edf' }, !!this.canComment ? index.h("form", { ref: frm => this.commentForm = frm }, index.h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
|
|
42
42
|
index.h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', index.h("div", { class: "s-comment-form-content" }, index.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 }), index.h("br", null), index.h("div", { class: "s-comment-form-action" }, index.h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -177,15 +177,15 @@ const SallaCommentItem = class {
|
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
179
|
let isAdmin = this.comment.type == 'admin';
|
|
180
|
-
return (index.h(index.Host, { key: '
|
|
180
|
+
return (index.h(index.Host, { key: '3f9d4b98cff2dd49259d3386b4996b905f92d7db', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, index.h("div", { key: '1348f11b2e553be483f60c5c558d3e800f050700', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, index.h("div", { key: '0587afd7ae1fc27b12fc4fd2c9ef4bf9e919d04a', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && index.h("span", { key: '40009b2b3b9af60481d0e40d5fb919076ab43b10', class: "s-comments-item-reply-icon", innerHTML: Reply }), index.h("div", { key: '8f0563811445046ecf5ce3abe6ee6d7d1ec4a235', class: "s-comments-item-avatar" }, index.h("img", { key: '5f82bb9d3a5c4c340f37b8e48af3edce42c133f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), index.h("div", { key: '34581ee9fddaa2f79ee933efb65c2e354010f37a', class: "s-comments-flex-1" }, index.h("div", { key: 'e03fc074d5ac8ddf183e3b081001e73dd62a7116', class: "s-comments-item-user-wrapper" }, index.h("div", { key: '6ea5e07eb9fa35d7673019628e6fde4605b74e0c', class: "s-comments-item-user-info" }, index.h("h3", { key: '18d7cf8c8b8125138a544bd10027ae7503f2f3a6', class: this.comment.is_pinned ? "s-comments-item-user-info-name" : "s-comments-item-user-info-name-with-margin" }, this.comment?.name), this.comment.is_pinned ?
|
|
181
181
|
index.h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
|
|
182
182
|
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
183
183
|
index.h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
184
184
|
[index.h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: check.iconCheck }), index.h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
185
185
|
index.h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
186
|
-
: null), index.h("p", { key: '
|
|
186
|
+
: null), index.h("p", { key: '694c2079d3379966994af7040fe4542481a53e66', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), index.h("span", { key: '734ca2eb6bf846c661007a1b9c41f22c47923b27', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
|
|
187
187
|
index.h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
|
|
188
|
-
: null), index.h("div", { key: '
|
|
188
|
+
: null), index.h("div", { key: '45e32a0759536f8c9e8bc8b823d50c931bdd1e23', class: "s-comments-item-content" }, index.h("p", { key: '9edf2cdfd489f77214d7a1ecae8a99943dfd4ece', innerHTML: this.comment.content }), this.allowAttachImages && index.h("div", { key: 'bbba6c62c4d13289137c634f5413880dfa572ab4', class: "s-comments-item-images" }, this.comment.images.map((image, index$1) => (index.h("img", { key: index$1, src: image, alt: "", onClick: () => this.modal.open() }))), index.h("salla-modal", { key: 'cd5c48b8cf3e1c9457a2fb60a42859cbd91aa996', ref: modal => this.modal = modal, width: "sm" }, index.h("salla-slider", { key: '304bc9417e6d7fd0e310127dce4e56a1c6ce00ea', id: `s-comments-item-${this.comment.id}-images`, class: "s-comments-item-images-slider", type: "thumbs", "auto-height": true, showControls: this.comment.images.length > 1 ? true : false, "show-thumbs-controls": "false" }, index.h("div", { key: '50401766737293c42fa7ba3b351b6db736fd92eb', slot: 'items' }, this.comment.images.map((image, index$1) => (index.h("img", { key: index$1, src: image, alt: "" })))), index.h("div", { key: '6b9a50da0b67497dfae21b52044850329d8712b5', slot: "thumbs" }, this.comment.images.map((image, index$1) => (index.h("div", { class: "s-comments-item-images-slider-thumb" }, index.h("img", { key: index$1, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? index.h("salla-button", { ref: el => this.likeBtn = el, class: `s-comments-item-like-btn ${this.likedComments.includes(this.comment.id) ? 'liked' : ''}`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleLike() }, index.h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), index.h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
|
|
189
189
|
index.h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
|
|
190
190
|
this.getReplies().map((reply) => {
|
|
191
191
|
return index.h("div", null, index.h("salla-comment-item", { comment: reply }));
|
|
@@ -230,6 +230,7 @@ const SallaComments = class {
|
|
|
230
230
|
* Determines if the comments are testimonials
|
|
231
231
|
*/
|
|
232
232
|
this.testimonials = false;
|
|
233
|
+
this.customerId = null;
|
|
233
234
|
// Translations
|
|
234
235
|
this.noComments = salla.lang.get('blocks.comments.no_comments');
|
|
235
236
|
this.comment_title = salla.lang.get('blocks.comments.title');
|
|
@@ -295,6 +296,32 @@ const SallaComments = class {
|
|
|
295
296
|
})();
|
|
296
297
|
Salla.infiniteScroll.errorWrapped = true;
|
|
297
298
|
}
|
|
299
|
+
// Preserve sort and private_comments params in next page URL for infinite scroll
|
|
300
|
+
patchNextPageUrl() {
|
|
301
|
+
if (!this.nextPage)
|
|
302
|
+
return;
|
|
303
|
+
try {
|
|
304
|
+
const url = new URL(this.nextPage, window.location.origin);
|
|
305
|
+
if (this.sort && !url.searchParams.get('sort')) {
|
|
306
|
+
url.searchParams.set('sort', this.sort);
|
|
307
|
+
}
|
|
308
|
+
if (this.customerId && !url.searchParams.get('private_comments')) {
|
|
309
|
+
url.searchParams.set('private_comments', this.customerId);
|
|
310
|
+
}
|
|
311
|
+
this.nextPage = url.toString();
|
|
312
|
+
}
|
|
313
|
+
catch (_e) {
|
|
314
|
+
// fallback for relative next links
|
|
315
|
+
const hasQuery = this.nextPage.includes('?');
|
|
316
|
+
if (this.sort && !/[?&]sort=/.test(this.nextPage)) {
|
|
317
|
+
this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
|
|
318
|
+
}
|
|
319
|
+
if (this.customerId && !/[?&]private_comments=/.test(this.nextPage)) {
|
|
320
|
+
const sep = this.nextPage.includes('?') ? '&' : '?';
|
|
321
|
+
this.nextPage = this.nextPage + sep + `private_comments=${this.customerId}`;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
298
325
|
// Initiate infinite scroll
|
|
299
326
|
initiateInfiniteScroll() {
|
|
300
327
|
if (!this.wrapper) {
|
|
@@ -314,6 +341,7 @@ const SallaComments = class {
|
|
|
314
341
|
this.infiniteScroll?.on('load', response => {
|
|
315
342
|
this.pagination = response.pagination;
|
|
316
343
|
this.nextPage = typeof response.pagination.links === 'object' && !!response.pagination.links.next ? response.pagination.links.next : null;
|
|
344
|
+
this.patchNextPageUrl();
|
|
317
345
|
for (const card of this.handleResponse(response)) {
|
|
318
346
|
this.wrapper.append(card);
|
|
319
347
|
}
|
|
@@ -401,8 +429,11 @@ const SallaComments = class {
|
|
|
401
429
|
resp = await salla.api.request('reviews', { params }, 'get');
|
|
402
430
|
}
|
|
403
431
|
else {
|
|
404
|
-
|
|
405
|
-
|
|
432
|
+
const showPrivateComments = searchParams.get('private_comments');
|
|
433
|
+
this.customerId = (showPrivateComments && Salla.config.get('user.type') === 'user' && Salla.config.get('user.id'))
|
|
434
|
+
? Salla.config.get('user.id')
|
|
435
|
+
: null;
|
|
436
|
+
resp = await salla.api.comment.getComments(this.type, this.itemId, 1, 5, this.sort, this.customerId);
|
|
406
437
|
}
|
|
407
438
|
if (!resp.data || !resp.data.length) {
|
|
408
439
|
this.showPlaceholder = false;
|
|
@@ -416,24 +447,7 @@ const SallaComments = class {
|
|
|
416
447
|
this.pagination = resp.pagination;
|
|
417
448
|
this.total = resp.pagination.total;
|
|
418
449
|
this.nextPage = typeof resp.pagination.links === 'object' && !!resp.pagination.links.next ? resp.pagination.links.next : null;
|
|
419
|
-
|
|
420
|
-
if (this.nextPage && this.sort) {
|
|
421
|
-
try {
|
|
422
|
-
const url = new URL(this.nextPage, window.location.origin);
|
|
423
|
-
if (!url.searchParams.get('sort')) {
|
|
424
|
-
url.searchParams.set('sort', this.sort);
|
|
425
|
-
this.nextPage = url.toString();
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
catch (_e) {
|
|
429
|
-
// fallback for relative next links
|
|
430
|
-
const hasQuery = this.nextPage.includes('?');
|
|
431
|
-
const hasSort = /[?&]sort=/.test(this.nextPage);
|
|
432
|
-
if (!hasSort) {
|
|
433
|
-
this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
450
|
+
this.patchNextPageUrl();
|
|
437
451
|
setTimeout(() => {
|
|
438
452
|
for (const card of this.handleResponse(resp)) {
|
|
439
453
|
this.wrapper.append(card);
|
|
@@ -773,7 +787,7 @@ const SallaReviewCard = class {
|
|
|
773
787
|
return (index.h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, index.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 }), index.h("div", { class: "s-review-card-product-details" }, index.h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? index.h("p", { class: "s-review-card-product-details-purchase-count" }, index.h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
|
|
774
788
|
}
|
|
775
789
|
render() {
|
|
776
|
-
return index.h("div", { key: '
|
|
790
|
+
return index.h("div", { key: '2c239df97aea1d28e160ede3e06bd283874bbaea', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), index.h("div", { key: '227c1fad17d6d2bf26316cabf69b854bb23cca52', class: "s-review-card-content" }, this.renderHeader(), index.h("p", { key: '74b06a8c24767d8e8cd7101915055d3861c5d0fd', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
|
|
777
791
|
}
|
|
778
792
|
get el() { return index.getElement(this); }
|
|
779
793
|
};
|
|
@@ -870,7 +884,7 @@ const SallaReviews = class {
|
|
|
870
884
|
});
|
|
871
885
|
}
|
|
872
886
|
render() {
|
|
873
|
-
return (index.h("div", { key: '
|
|
887
|
+
return (index.h("div", { key: '70962f093fe86f8d24c4c7127aea2393753ae0dd', class: "s-reviews-container" }, index.h("div", { key: 'e462464473514c515b4406205f28759101755874', class: "s-reviews-header-wrapper" }, index.h("h1", { key: '4f1d93865eaede37f8c54f82f094b28abf59512c', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (index.h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, index.h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft.arrowLeft }))) : null), index.h("salla-slider", { key: 'a3bb1307ec589cbd33c854ef339addfd00c3782d', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, index.h("div", { key: '2b0739018657616475e85c6c9413365939be33c6', slot: "items" }, this.reviews.map((item, index$1) => (index.h("div", { key: index$1, class: "s-reviews-swiper-slide" }, index.h("div", { class: "s-reviews-testimonial" }, index.h("div", { class: "s-reviews-testimonial__inner" }, index.h("div", { class: "s-reviews-testimonial__avatar" }, index.h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index$1, class: "lazy" })), index.h("div", { class: "s-reviews-testimonial__text" }, index.h("p", { innerHTML: item.content }), index.h("div", { class: "s-reviews-testimonial__name_wrapper" }, index.h("div", { class: "s-reviews-testimonial__info" }, item.name && index.h("h2", null, `${item.name}`)), index.h("div", { class: "s-reviews-testimonial__rating" }, index.h("salla-rating-stars", { size: "small", value: item.stars })))), index.h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
874
888
|
}
|
|
875
889
|
};
|
|
876
890
|
SallaReviews.style = sallaReviewsCss;
|
|
@@ -1550,7 +1564,7 @@ const SallaReviewsPage = class {
|
|
|
1550
1564
|
return options.map(option => (index.h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
|
|
1551
1565
|
}
|
|
1552
1566
|
render() {
|
|
1553
|
-
return (index.h("host", { key: '
|
|
1567
|
+
return (index.h("host", { key: '9e93c876f4cf9d49748bc219cd81c871ddfcb9ba' }, index.h("div", { key: '322e9487de2da90e78ef96eaf126c5ab9839255f', class: "s-reviews-page-header-wrapper" }, index.h("h2", { key: '7f2cc0885d83123bd1a2c0e7d795a7e61987b4a7', class: "s-reviews-page-title" }, this.langTitlesReviews, index.h("span", { key: 'e61048238b21b6645f4799ae1dcd5f9e6d660088', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), index.h("div", { key: 'ce8a0de87512c023f623604c0b486ea4f37ac8ab', class: "s-reviews-page-filter-wrapper" }, index.h("label", { key: '35bcbffd914e811ebf73253d93e7b972f3b56cbc', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), index.h("select", { key: 'e57ea01b2aba04e82c63e51edf952e5c6ee460e6', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? index.h("main", { class: "s-reviews-page-grid", ref: el => {
|
|
1554
1568
|
this.wrapper = el;
|
|
1555
1569
|
} }, this.reviews.map(review => (index.h("salla-review-card", { key: review.id, review: review }))))
|
|
1556
1570
|
: index.h("div", { class: "s-products-list-placeholder" }, index.h("span", { innerHTML: shoppingBag.ShoppingBag }), index.h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (index.h("div", { class: "s-reviews-page-load-more-container" }, index.h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
7
|
var star2 = require('./star2-R146a27p.js');
|
|
8
8
|
|
|
9
9
|
const sallaCountDownCss = "";
|
|
@@ -159,7 +159,7 @@ const SallaCountDown = class {
|
|
|
159
159
|
return this.renderCountDown();
|
|
160
160
|
}
|
|
161
161
|
render() {
|
|
162
|
-
return (index.h(index.Host, { key: '
|
|
162
|
+
return (index.h(index.Host, { key: '0cfdbb009d256be108123cabf3cb4311866bdc17', 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.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
165
|
SallaCountDown.style = sallaCountDownCss;
|
|
@@ -272,14 +272,14 @@ const SallaProductCard = class {
|
|
|
272
272
|
's-product-card-out-of-stock': this.productData?.is_out_of_stock,
|
|
273
273
|
};
|
|
274
274
|
const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
|
|
275
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: '6c9b39e50f045c2511188597128546e440431b24', id: `product-${this.productData?.id}`, class: classes }, index.h("div", { key: '69813dd46d8df8298835d6de6faca959f2645c6b', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, index.h("a", { key: '67080662eb9a5ff4af903b6e57f029925565138b', ...hrefProp }, index.h("img", { key: '8e7a60fff16a8e4f7b27f19aae1c39a16ce8cadd', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
|
|
276
276
|
? 'contain'
|
|
277
277
|
: this.fitImageHeight
|
|
278
278
|
? this.fitImageHeight
|
|
279
|
-
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && index.h("a", { key: '
|
|
280
|
-
index.h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, index.h("span", { innerHTML: Heart })) : ''), index.h("div", { key: '
|
|
279
|
+
: 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && index.h("a", { key: '648cf477ab6ded2d2c02dbf6957d68365524c847', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
|
|
280
|
+
index.h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, index.h("span", { innerHTML: Heart })) : ''), index.h("div", { key: 'a2ed73abfe91993ded6e84f6f493ea50ee0899a9', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
|
|
281
281
|
index.h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, index.h("span", null, index.h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), index.h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
|
|
282
|
-
: '', index.h("div", { key: '
|
|
282
|
+
: '', index.h("div", { key: '09fd5336d5c9d454620a91be8271399b938bb1f4', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, index.h("h3", { key: 'c915604dafa02d6ba50e6e9933edbd57149e7a56', class: "s-product-card-content-title" }, index.h("a", { key: '2b80635accb51545b72baf7ff57a115a62457613', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
|
|
283
283
|
index.h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
|
|
284
284
|
: ''), this.productData?.donation && !this.minimal && !this.fullImage ?
|
|
285
285
|
[index.h("salla-progress-bar", { donation: this.productData?.donation }), index.h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
|
|
@@ -288,7 +288,7 @@ const SallaProductCard = class {
|
|
|
288
288
|
this.addBtn.donatingAmount = e.target.value;
|
|
289
289
|
}, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
|
|
290
290
|
: '')]
|
|
291
|
-
: '', index.h("div", { key: '
|
|
291
|
+
: '', index.h("div", { key: '12613a96e7d914ea156470305c28a7449a3dcb9b', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
|
|
292
292
|
index.h("div", { class: "s-product-card-rating" }, index.h("span", { innerHTML: star2.Star }), index.h("span", null, this.productData.rating.stars))
|
|
293
293
|
: ''), this.isSpecial && this.productData.discount_ends
|
|
294
294
|
? index.h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
7
|
var Helper = require('./Helper-CU4Xuiki.js');
|
|
8
8
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
@@ -171,12 +171,12 @@ const SallaFiltersWidget = class {
|
|
|
171
171
|
return index.h("span", { class: "s-filters-option-name" }, label);
|
|
172
172
|
}
|
|
173
173
|
render() {
|
|
174
|
-
return (index.h(index.Host, { key: '
|
|
174
|
+
return (index.h(index.Host, { key: 'e93cfb9f1f6daeb8a2121ccb36a3cf135a55e902', class: "s-filters-widget-container" }, index.h("h3", { key: 'd5ef45d78e0119e2ac997ded417e310c0a797c34', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, index.h("span", { key: 'fe4df56fad0d290395d78588456fb7d00a20ed43' }, this.option.label), index.h("span", { key: 'c961f86b5e06437dfdd145e164da5fe326500032', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), index.h("div", { key: '7cf1ed1b562bf16acc481f682965567d8bc1813c', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (index.h("div", { key: '275427371f48fdfc8ef8b80b9d3e11fa247f7d7a', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, index.h("input", { key: '473c082ed9f7415beba445d36a121027eaadbbe1', 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 }))), index.h("div", { key: 'e45654731cdd801345acc5b3311d9ddab3020035', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, index.h("slot", { key: '5ae673157a4b579a000901b04db8e375a52565e7' }), this.option.type !== interfaces.FilterOptionTypes.RANGE
|
|
175
175
|
? this.renderFilterOption(this.option)
|
|
176
176
|
: index.h("salla-price-range", { onChanged: (event) => {
|
|
177
177
|
this.changed.emit(event.detail);
|
|
178
178
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
179
|
-
index.h("a", { key: '
|
|
179
|
+
index.h("a", { key: '8ec08429d8fb31b338e6f9f9cf455b5ba2155cb8', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
180
180
|
}
|
|
181
181
|
get host() { return index.getElement(this); }
|
|
182
182
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DO-q5keQ.js');
|
|
7
7
|
var interfaces = require('./interfaces-DZDQwN6-.js');
|
|
8
8
|
var Helper = require('./Helper-CU4Xuiki.js');
|
|
9
9
|
require('./anime.es-BqW8JHZi.js');
|
|
@@ -195,7 +195,7 @@ const SallaFilters = class {
|
|
|
195
195
|
this.applyFilters();
|
|
196
196
|
}
|
|
197
197
|
render() {
|
|
198
|
-
return index.h(index.Host, { key: '
|
|
198
|
+
return index.h(index.Host, { key: 'f3c454fc20472dca6fe646c9121028a2c045808f' }, this.filters?.map(option => index.h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
|
|
199
199
|
this.handleOptionChange(event, option, value);
|
|
200
200
|
} })), this.filters?.length ? index.h("div", { class: "s-filters-footer" }, index.h("salla-button", { color: 'gray', fill: 'outline', onClick: () => this.resetFilters() }, this.reset)) : '');
|
|
201
201
|
}
|