@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,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaCartCoupons extends Components.SallaCartCoupons, HTMLElement {}
|
|
4
|
+
export const SallaCartCoupons: {
|
|
5
|
+
prototype: SallaCartCoupons;
|
|
6
|
+
new (): SallaCartCoupons;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$3 } from './salla-button2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './salla-slider2.js';
|
|
7
|
+
|
|
8
|
+
const sallaCartCouponsCss = "";
|
|
9
|
+
|
|
10
|
+
const SallaCartCoupons$1 = /*@__PURE__*/ proxyCustomElement(class SallaCartCoupons extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.availableCoupons = [];
|
|
15
|
+
this.cartTotal = 0;
|
|
16
|
+
this.currentCoupon = '';
|
|
17
|
+
this.couponInputValue = '';
|
|
18
|
+
this.couponError = '';
|
|
19
|
+
this.isApplying = false;
|
|
20
|
+
this.isHandlingInternalError = false;
|
|
21
|
+
// Store cart event listener references for cleanup
|
|
22
|
+
this.cartUpdatedHandler = (cartData) => {
|
|
23
|
+
this.cartTotal = cartData.sub_total ?? cartData.total ?? 0;
|
|
24
|
+
// Update current coupon state
|
|
25
|
+
const couponCode = cartData.coupon || '';
|
|
26
|
+
// Only overwrite the user's typed value when the cart-level coupon itself changes
|
|
27
|
+
if (couponCode !== this.currentCoupon) {
|
|
28
|
+
this.currentCoupon = couponCode;
|
|
29
|
+
this.couponInputValue = couponCode;
|
|
30
|
+
}
|
|
31
|
+
// Clear error when cart updates
|
|
32
|
+
this.couponError = '';
|
|
33
|
+
};
|
|
34
|
+
this.couponAddedHandler = () => {
|
|
35
|
+
// Coupon was successfully added - state is managed by cartUpdatedHandler
|
|
36
|
+
};
|
|
37
|
+
this.couponAdditionFailedHandler = (error) => {
|
|
38
|
+
// Only handle external coupon failures when no internal operation is handling errors
|
|
39
|
+
if (!this.isApplying && !this.isHandlingInternalError) {
|
|
40
|
+
this.showCouponError(error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
41
|
+
}
|
|
42
|
+
// Internal operations handle their own errors to prevent double display
|
|
43
|
+
};
|
|
44
|
+
this.couponDeletedHandler = () => {
|
|
45
|
+
// Coupon was removed - state is managed by cartUpdatedHandler
|
|
46
|
+
};
|
|
47
|
+
// Arrow functions to maintain context for event listeners
|
|
48
|
+
this.onKeyUp = (event) => {
|
|
49
|
+
if (event.key === 'Enter') {
|
|
50
|
+
this.couponButtonRef?.click();
|
|
51
|
+
}
|
|
52
|
+
this.couponError = '';
|
|
53
|
+
};
|
|
54
|
+
this.onInput = (event) => {
|
|
55
|
+
this.couponInputValue = event.target.value;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async componentWillLoad() {
|
|
59
|
+
await Salla.onReady();
|
|
60
|
+
await Salla.lang.onLoaded();
|
|
61
|
+
//then set your logic here to avoid any race condition
|
|
62
|
+
this.loadCouponsData(); // Load async without blocking render - shows empty until loaded
|
|
63
|
+
this.loadCartTotal();
|
|
64
|
+
this.setupCartEventListeners();
|
|
65
|
+
// Note: No store feature gate needed - coupon availability controlled by backend API response
|
|
66
|
+
}
|
|
67
|
+
componentDidLoad() {
|
|
68
|
+
this.setupCouponInputEvents();
|
|
69
|
+
}
|
|
70
|
+
setupCartEventListeners() {
|
|
71
|
+
// Listen for cart updates to refresh cart total
|
|
72
|
+
salla.event.on('cart::updated', this.cartUpdatedHandler);
|
|
73
|
+
// Listen for coupon events
|
|
74
|
+
salla.event.on('cart::coupon.added', this.couponAddedHandler);
|
|
75
|
+
salla.event.on('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
76
|
+
salla.event.on('cart::coupon.deleted', this.couponDeletedHandler);
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
// Clean up DOM event listeners
|
|
80
|
+
this.couponInputRef?.removeEventListener('keyup', this.onKeyUp);
|
|
81
|
+
this.couponInputRef?.removeEventListener('input', this.onInput);
|
|
82
|
+
// Clean up cart event listeners using reliable global event system
|
|
83
|
+
salla.event.off('cart::updated', this.cartUpdatedHandler);
|
|
84
|
+
salla.event.off('cart::coupon.added', this.couponAddedHandler);
|
|
85
|
+
salla.event.off('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
|
|
86
|
+
salla.event.off('cart::coupon.deleted', this.couponDeletedHandler);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Business Decision: No visual selected state needed
|
|
90
|
+
* UX Flow: Click coupon → populate input → auto-apply (streamlined experience)
|
|
91
|
+
*/
|
|
92
|
+
async selectCoupon(couponCode) {
|
|
93
|
+
const selectedCoupon = this.availableCoupons.find(coupon => coupon.code === couponCode);
|
|
94
|
+
if (selectedCoupon) {
|
|
95
|
+
if (!this.isEligible(selectedCoupon)) {
|
|
96
|
+
throw new Error(`Coupon not eligible: minimum cart amount not met`);
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
// Actually apply the coupon to the cart first
|
|
100
|
+
await this.applyCoupon(couponCode);
|
|
101
|
+
// Only dispatch event after successful API call
|
|
102
|
+
this.host.dispatchEvent(new CustomEvent('salla::cart-coupons.coupon.selected', {
|
|
103
|
+
detail: selectedCoupon,
|
|
104
|
+
bubbles: true
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
// Rethrow to let caller handle the error
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return selectedCoupon;
|
|
113
|
+
}
|
|
114
|
+
async loadCouponsData() {
|
|
115
|
+
try {
|
|
116
|
+
// Load coupons from API
|
|
117
|
+
const response = await salla.api.request('coupons');
|
|
118
|
+
const raw = response?.data;
|
|
119
|
+
const coupons = Array.isArray(raw) ? raw : (Array.isArray(raw?.data) ? raw.data : []);
|
|
120
|
+
this.availableCoupons = coupons;
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
console.warn('Failed to load coupons:', error);
|
|
124
|
+
// No coupons available on error
|
|
125
|
+
this.availableCoupons = [];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
loadCartTotal() {
|
|
129
|
+
// Get cart total and current coupon from Salla storage
|
|
130
|
+
const cart = salla.storage.get('cart');
|
|
131
|
+
// Check summary first (more accurate), then cart level, fallback to 0
|
|
132
|
+
this.cartTotal = cart?.summary?.sub_total ?? cart?.sub_total ?? 0;
|
|
133
|
+
this.currentCoupon = cart?.coupon || '';
|
|
134
|
+
this.couponInputValue = cart?.coupon || '';
|
|
135
|
+
}
|
|
136
|
+
setupCouponInputEvents() {
|
|
137
|
+
if (!this.couponInputRef || !this.couponButtonRef) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this.couponInputRef.addEventListener('keyup', this.onKeyUp);
|
|
141
|
+
this.couponInputRef.addEventListener('input', this.onInput);
|
|
142
|
+
}
|
|
143
|
+
async handleCouponButtonClick() {
|
|
144
|
+
if (this.isApplying) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const hasCoupon = !!this.currentCoupon;
|
|
148
|
+
if (!hasCoupon && !this.couponInputValue.trim()) {
|
|
149
|
+
this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this.isApplying = true;
|
|
153
|
+
this.isHandlingInternalError = true;
|
|
154
|
+
try {
|
|
155
|
+
if (hasCoupon) {
|
|
156
|
+
// Remove existing coupon
|
|
157
|
+
await salla.cart.deleteCoupon();
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
// Apply new coupon
|
|
161
|
+
await salla.cart.addCoupon(this.couponInputValue.trim());
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
166
|
+
}
|
|
167
|
+
finally {
|
|
168
|
+
this.isApplying = false;
|
|
169
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
170
|
+
setTimeout(() => {
|
|
171
|
+
this.isHandlingInternalError = false;
|
|
172
|
+
}, 100);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
showCouponError(message) {
|
|
176
|
+
this.couponError = message;
|
|
177
|
+
}
|
|
178
|
+
handleCouponClick(coupon) {
|
|
179
|
+
this.applyCoupon(coupon.code, false).catch(() => {
|
|
180
|
+
// Error already displayed by applyCoupon
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async applyCoupon(couponCode, shouldThrow = true) {
|
|
184
|
+
if (this.isApplying) {
|
|
185
|
+
if (shouldThrow) {
|
|
186
|
+
throw new Error('Coupon application already in progress');
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return; // Silent return for card clicks when operation is already in progress
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// Update the input field with the coupon code
|
|
193
|
+
this.couponInputValue = couponCode;
|
|
194
|
+
// Clear any existing errors
|
|
195
|
+
this.couponError = '';
|
|
196
|
+
this.isApplying = true;
|
|
197
|
+
this.isHandlingInternalError = true;
|
|
198
|
+
try {
|
|
199
|
+
// Apply the coupon directly without checking for existing coupon
|
|
200
|
+
await salla.cart.addCoupon(couponCode.trim());
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
|
|
204
|
+
// Re-throw error only if requested (for selectCoupon API)
|
|
205
|
+
if (shouldThrow) {
|
|
206
|
+
throw error;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
finally {
|
|
210
|
+
this.isApplying = false;
|
|
211
|
+
// Keep internal error flag active briefly to prevent race condition with SDK event
|
|
212
|
+
setTimeout(() => {
|
|
213
|
+
this.isHandlingInternalError = false;
|
|
214
|
+
}, 100);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
formatMainAmount(coupon) {
|
|
218
|
+
if (coupon.type === 'percentage') {
|
|
219
|
+
// For percentage coupons, amount should be a string or number
|
|
220
|
+
const percentageValue = typeof coupon.amount === 'object' ? coupon.amount.amount : coupon.amount;
|
|
221
|
+
return `${salla.helpers.number(percentageValue)}%`;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
// For fixed coupons, amount is an object with amount and currency
|
|
225
|
+
const amountData = typeof coupon.amount === 'object' ? coupon.amount : {
|
|
226
|
+
amount: coupon.amount,
|
|
227
|
+
currency: coupon.minimum_amount?.currency || salla.config.get('store.currency.code', 'SAR')
|
|
228
|
+
};
|
|
229
|
+
return (h("span", { innerHTML: salla.money(amountData.amount, amountData.currency) }));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
isEligible(coupon) {
|
|
233
|
+
if (coupon.minimum_amount && this.cartTotal < parseFloat(coupon.minimum_amount.amount)) {
|
|
234
|
+
return false; // Coupon is not eligible due to minimum amount requirement
|
|
235
|
+
}
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
renderCouponCard(coupon) {
|
|
239
|
+
const isEligible = this.isEligible(coupon);
|
|
240
|
+
// Note: Card notches (ticket-style pseudo-elements) match card background, not page background - this is intentional design
|
|
241
|
+
return (h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, h("div", { class: `s-cart-coupons-card ${!isEligible || this.isApplying ? 's-cart-coupons-disabled' : ''}`, onClick: () => isEligible && !this.isApplying && this.handleCouponClick(coupon) }, h("div", { class: "s-cart-coupons-top-section" }, h("div", { class: "s-cart-coupons-discount-values" }, h("div", { class: "s-cart-coupons-main-amount" }, this.formatMainAmount(coupon)), coupon.free_shipping ? (h("div", { class: "s-cart-coupons-secondary-info" }, "+ ", salla.lang.get('pages.cart.free_shipping'))) : coupon.maximum_amount && (h("div", { class: "s-cart-coupons-secondary-info" }, salla.lang.get('pages.cart.up_to'), " ", h("span", { innerHTML: salla.money(coupon.maximum_amount.amount, coupon.maximum_amount.currency) })))), h("div", { class: "s-cart-coupons-code" }, coupon.code)), h("div", { class: "s-cart-coupons-divider" }), h("div", { class: "s-cart-coupons-bottom-section" }, h("div", { class: "s-cart-coupons-terms" }, coupon.remaining_days !== undefined && coupon.remaining_days !== null && (h("div", { class: `s-cart-coupons-expiry ${coupon.remaining_days <= 3 ? 's-cart-coupons-expiry-warning' : ''}` }, coupon.remaining_days === 0
|
|
242
|
+
? salla.lang.get('pages.cart.expires_today')
|
|
243
|
+
: `${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'))))));
|
|
244
|
+
}
|
|
245
|
+
render() {
|
|
246
|
+
return (h(Host, { key: 'f3f3d943ab2c1a6488a1da02d2cc031dbc88b482' }, h("div", { key: 'abf88828017041b19a6c54ba2f99e6c246bd8d04', class: "s-cart-coupons-wrapper" }, h("div", { key: 'c2946579a7cca935722997229f50ede603acb8b2', class: "s-cart-coupons-input-section" }, h("label", { key: '50042d827c86daf853babd4e41ba3a920aceda9d', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), h("div", { key: '4b01047727bd3a83f6cfbac37221e7732076248f', class: "s-cart-coupons-coupon-input-container" }, 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') }), 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 ? (h("i", { class: "sicon-cancel" })) : (h("span", null, salla.lang.get('pages.cart.save_coupon'))))), this.couponError && (h("span", { key: 'f7c77e8676cb07b4820b571dbd8ee25dca79a1b1', class: "s-cart-coupons-coupon-error" }, this.couponError))), this.availableCoupons && this.availableCoupons.length > 0 && (h("salla-slider", { key: 'daee9c6705de734d5f81ff86d92ad6952b5a7332', type: "carousel", showControls: false, class: "s-cart-coupons-slider" }, h("div", { key: '5d5ef30a6ff7f7c2b406cc5cec6622c2f028d17e', slot: "items" }, this.availableCoupons.map(coupon => this.renderCouponCard(coupon))))))));
|
|
247
|
+
}
|
|
248
|
+
get host() { return this; }
|
|
249
|
+
static get style() { return sallaCartCouponsCss; }
|
|
250
|
+
}, [0, "salla-cart-coupons", {
|
|
251
|
+
"availableCoupons": [32],
|
|
252
|
+
"cartTotal": [32],
|
|
253
|
+
"currentCoupon": [32],
|
|
254
|
+
"couponInputValue": [32],
|
|
255
|
+
"couponError": [32],
|
|
256
|
+
"isApplying": [32],
|
|
257
|
+
"selectCoupon": [64]
|
|
258
|
+
}]);
|
|
259
|
+
function defineCustomElement$1() {
|
|
260
|
+
if (typeof customElements === "undefined") {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const components = ["salla-cart-coupons", "salla-button", "salla-slider"];
|
|
264
|
+
components.forEach(tagName => { switch (tagName) {
|
|
265
|
+
case "salla-cart-coupons":
|
|
266
|
+
if (!customElements.get(tagName)) {
|
|
267
|
+
customElements.define(tagName, SallaCartCoupons$1);
|
|
268
|
+
}
|
|
269
|
+
break;
|
|
270
|
+
case "salla-button":
|
|
271
|
+
if (!customElements.get(tagName)) {
|
|
272
|
+
defineCustomElement$3();
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
case "salla-slider":
|
|
276
|
+
if (!customElements.get(tagName)) {
|
|
277
|
+
defineCustomElement$2();
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
} });
|
|
281
|
+
}
|
|
282
|
+
defineCustomElement$1();
|
|
283
|
+
|
|
284
|
+
const SallaCartCoupons = SallaCartCoupons$1;
|
|
285
|
+
const defineCustomElement = defineCustomElement$1;
|
|
286
|
+
|
|
287
|
+
export { SallaCartCoupons, defineCustomElement };
|
|
@@ -107,7 +107,7 @@ const SallaCartSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaCartSumma
|
|
|
107
107
|
return cartUrl;
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '918f027fd28cd25d653b8419f97223daaf22d428' }, h("a", { key: 'b74a2724ada356a01b915044d56dfb0f9953338e', class: "s-cart-summary-wrapper", href: this.getCartLink() }, h("div", { key: 'b9332fe1b66b895c1e9950efaa548f04eb053d46', id: "s-cart-icon" }, h("slot", { key: '2b5c1cf8dea4ca23a54beeb83cfad44538ca3ab7', name: "icon" }, h("i", { key: 'f3145ed4a994762441d925280a3234d78c378bef', class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { key: '26a78adf9b279019504e995216ea5373b6866876', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { key: '60ad091221ed5cd3e2ac0d27ebc53ec9917ccd64', class: "s-cart-summary-content" }, this.showCartLabel && h("span", { key: '66819086b9ed7f6f21be2cd5e8baf0bc88021e40', class: "s-cart-summary-label" }, this.cartLabel), h("b", { key: 'a07c85971e50add3cdd5b51942e642d4daf19d82', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
|
|
111
111
|
}
|
|
112
112
|
get host() { return this; }
|
|
113
113
|
static get style() { return sallaCartSummaryCss; }
|
|
@@ -208,7 +208,7 @@ const SallaColorPicker = /*@__PURE__*/ proxyCustomElement(class SallaColorPicker
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
render() {
|
|
211
|
-
return (h(Host, { key: '
|
|
211
|
+
return (h(Host, { key: '2f142fd64afd5571574a7e1c40de3be16ede62e6', class: "s-color-picker-main" }, h("slot", { key: '92acdf14b2f42ac52d0a632ba6840a5dcebfa4d4', name: "widget" }, h("div", { key: '7ba074040299a91802109d0e1d2e78604e39d3a8', class: "s-color-picker-widget" }, h("div", { key: 'a6272207f79fd28e33b66e415a3e05b969ace983', class: "s-color-picker-widget-canvas", ref: dv => (this.canvas = dv) }), h("span", { key: 'e6fed242bb84fae6221cdec525658b68f7514ce7', innerHTML: ArrowDown }))), h("input", { key: '9eb1673f44e663f939124da45fec79c401736203', class: "s-hidden", name: this.name, required: this.required, value: this.color, ref: color => (this.colorInput = color) })));
|
|
212
212
|
}
|
|
213
213
|
componentDidLoad() {
|
|
214
214
|
if (this.canvas)
|
|
@@ -32,7 +32,7 @@ const SallaCommentForm = /*@__PURE__*/ proxyCustomElement(class SallaCommentForm
|
|
|
32
32
|
.finally(() => this.submitBtn.stop);
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '24b73030ff1828a6f21c1c36a00be2c8651f6edf' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
|
|
36
36
|
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))))) : ''));
|
|
37
37
|
}
|
|
38
38
|
static get style() { return sallaCommentFormCss; }
|
|
@@ -143,15 +143,15 @@ const SallaCommentItem = /*@__PURE__*/ proxyCustomElement(class SallaCommentItem
|
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
145
|
let isAdmin = this.comment.type == 'admin';
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '3f9d4b98cff2dd49259d3386b4996b905f92d7db', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, h("div", { key: '1348f11b2e553be483f60c5c558d3e800f050700', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, h("div", { key: '0587afd7ae1fc27b12fc4fd2c9ef4bf9e919d04a', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && h("span", { key: '40009b2b3b9af60481d0e40d5fb919076ab43b10', class: "s-comments-item-reply-icon", innerHTML: Reply }), h("div", { key: '8f0563811445046ecf5ce3abe6ee6d7d1ec4a235', class: "s-comments-item-avatar" }, h("img", { key: '5f82bb9d3a5c4c340f37b8e48af3edce42c133f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), h("div", { key: '34581ee9fddaa2f79ee933efb65c2e354010f37a', class: "s-comments-flex-1" }, h("div", { key: 'e03fc074d5ac8ddf183e3b081001e73dd62a7116', class: "s-comments-item-user-wrapper" }, h("div", { key: '6ea5e07eb9fa35d7673019628e6fde4605b74e0c', class: "s-comments-item-user-info" }, 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 ?
|
|
147
147
|
h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
|
|
148
148
|
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
149
149
|
h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
150
150
|
[h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: IconVerified }), h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
151
151
|
h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
152
|
-
: null), h("p", { key: '
|
|
152
|
+
: null), h("p", { key: '694c2079d3379966994af7040fe4542481a53e66', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { key: '734ca2eb6bf846c661007a1b9c41f22c47923b27', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
|
|
153
153
|
h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
|
|
154
|
-
: null), h("div", { key: '
|
|
154
|
+
: null), h("div", { key: '45e32a0759536f8c9e8bc8b823d50c931bdd1e23', class: "s-comments-item-content" }, h("p", { key: '9edf2cdfd489f77214d7a1ecae8a99943dfd4ece', innerHTML: this.comment.content }), this.allowAttachImages && h("div", { key: 'bbba6c62c4d13289137c634f5413880dfa572ab4', class: "s-comments-item-images" }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "", onClick: () => this.modal.open() }))), h("salla-modal", { key: 'cd5c48b8cf3e1c9457a2fb60a42859cbd91aa996', ref: modal => this.modal = modal, width: "sm" }, 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" }, h("div", { key: '50401766737293c42fa7ba3b351b6db736fd92eb', slot: 'items' }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "" })))), h("div", { key: '6b9a50da0b67497dfae21b52044850329d8712b5', slot: "thumbs" }, this.comment.images.map((image, index) => (h("div", { class: "s-comments-item-images-slider-thumb" }, h("img", { key: index, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? 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() }, h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
|
|
155
155
|
h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
|
|
156
156
|
this.getReplies().map((reply) => {
|
|
157
157
|
return h("div", null, h("salla-comment-item", { comment: reply }));
|
|
@@ -50,6 +50,7 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
50
50
|
* Determines if the comments are testimonials
|
|
51
51
|
*/
|
|
52
52
|
this.testimonials = false;
|
|
53
|
+
this.customerId = null;
|
|
53
54
|
// Translations
|
|
54
55
|
this.noComments = salla.lang.get('blocks.comments.no_comments');
|
|
55
56
|
this.comment_title = salla.lang.get('blocks.comments.title');
|
|
@@ -115,6 +116,32 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
115
116
|
})();
|
|
116
117
|
Salla.infiniteScroll.errorWrapped = true;
|
|
117
118
|
}
|
|
119
|
+
// Preserve sort and private_comments params in next page URL for infinite scroll
|
|
120
|
+
patchNextPageUrl() {
|
|
121
|
+
if (!this.nextPage)
|
|
122
|
+
return;
|
|
123
|
+
try {
|
|
124
|
+
const url = new URL(this.nextPage, window.location.origin);
|
|
125
|
+
if (this.sort && !url.searchParams.get('sort')) {
|
|
126
|
+
url.searchParams.set('sort', this.sort);
|
|
127
|
+
}
|
|
128
|
+
if (this.customerId && !url.searchParams.get('private_comments')) {
|
|
129
|
+
url.searchParams.set('private_comments', this.customerId);
|
|
130
|
+
}
|
|
131
|
+
this.nextPage = url.toString();
|
|
132
|
+
}
|
|
133
|
+
catch (_e) {
|
|
134
|
+
// fallback for relative next links
|
|
135
|
+
const hasQuery = this.nextPage.includes('?');
|
|
136
|
+
if (this.sort && !/[?&]sort=/.test(this.nextPage)) {
|
|
137
|
+
this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
|
|
138
|
+
}
|
|
139
|
+
if (this.customerId && !/[?&]private_comments=/.test(this.nextPage)) {
|
|
140
|
+
const sep = this.nextPage.includes('?') ? '&' : '?';
|
|
141
|
+
this.nextPage = this.nextPage + sep + `private_comments=${this.customerId}`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
118
145
|
// Initiate infinite scroll
|
|
119
146
|
initiateInfiniteScroll() {
|
|
120
147
|
if (!this.wrapper) {
|
|
@@ -134,6 +161,7 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
134
161
|
this.infiniteScroll?.on('load', response => {
|
|
135
162
|
this.pagination = response.pagination;
|
|
136
163
|
this.nextPage = typeof response.pagination.links === 'object' && !!response.pagination.links.next ? response.pagination.links.next : null;
|
|
164
|
+
this.patchNextPageUrl();
|
|
137
165
|
for (const card of this.handleResponse(response)) {
|
|
138
166
|
this.wrapper.append(card);
|
|
139
167
|
}
|
|
@@ -221,8 +249,11 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
221
249
|
resp = await salla.api.request('reviews', { params }, 'get');
|
|
222
250
|
}
|
|
223
251
|
else {
|
|
224
|
-
|
|
225
|
-
|
|
252
|
+
const showPrivateComments = searchParams.get('private_comments');
|
|
253
|
+
this.customerId = (showPrivateComments && Salla.config.get('user.type') === 'user' && Salla.config.get('user.id'))
|
|
254
|
+
? Salla.config.get('user.id')
|
|
255
|
+
: null;
|
|
256
|
+
resp = await salla.api.comment.getComments(this.type, this.itemId, 1, 5, this.sort, this.customerId);
|
|
226
257
|
}
|
|
227
258
|
if (!resp.data || !resp.data.length) {
|
|
228
259
|
this.showPlaceholder = false;
|
|
@@ -236,24 +267,7 @@ const SallaComments$1 = /*@__PURE__*/ proxyCustomElement(class SallaComments ext
|
|
|
236
267
|
this.pagination = resp.pagination;
|
|
237
268
|
this.total = resp.pagination.total;
|
|
238
269
|
this.nextPage = typeof resp.pagination.links === 'object' && !!resp.pagination.links.next ? resp.pagination.links.next : null;
|
|
239
|
-
|
|
240
|
-
if (this.nextPage && this.sort) {
|
|
241
|
-
try {
|
|
242
|
-
const url = new URL(this.nextPage, window.location.origin);
|
|
243
|
-
if (!url.searchParams.get('sort')) {
|
|
244
|
-
url.searchParams.set('sort', this.sort);
|
|
245
|
-
this.nextPage = url.toString();
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
catch (_e) {
|
|
249
|
-
// fallback for relative next links
|
|
250
|
-
const hasQuery = this.nextPage.includes('?');
|
|
251
|
-
const hasSort = /[?&]sort=/.test(this.nextPage);
|
|
252
|
-
if (!hasSort) {
|
|
253
|
-
this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
270
|
+
this.patchNextPageUrl();
|
|
257
271
|
setTimeout(() => {
|
|
258
272
|
for (const card of this.handleResponse(resp)) {
|
|
259
273
|
this.wrapper.append(card);
|
|
@@ -118,7 +118,7 @@ const SallaConditionalFields = /*@__PURE__*/ proxyCustomElement(class SallaCondi
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (h(Host, { key: '
|
|
121
|
+
return (h(Host, { key: '92e48eb8f628ef8a2cde7e0480bbfe8fbb36f139' }, h("slot", { key: '439b9056ff00196e8e8b89ee8251afd4db7e2b64' })));
|
|
122
122
|
}
|
|
123
123
|
get host() { return this; }
|
|
124
124
|
}, [4, "salla-conditional-fields", undefined, [[0, "change", "changeHandler"], [0, "input", "changeHandler"]]]);
|
|
@@ -158,7 +158,7 @@ const SallaCountDown = /*@__PURE__*/ proxyCustomElement(class SallaCountDown ext
|
|
|
158
158
|
return this.renderCountDown();
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return (h(Host, { key: '
|
|
161
|
+
return (h(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()));
|
|
162
162
|
}
|
|
163
163
|
static get style() { return sallaCountDownCss; }
|
|
164
164
|
}, [0, "salla-count-down", {
|
|
@@ -211,7 +211,7 @@ const SallaDatetimePicker = /*@__PURE__*/ proxyCustomElement(class SallaDatetime
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
render() {
|
|
214
|
-
return h("div", { key: '
|
|
214
|
+
return h("div", { key: '184743feaf2af9f31cd3b5a864a86f1a561c12fd', class: "s-datetime-picker" }, h("input", { key: '1736e88363b379f872490641168f49090e976e03', type: "datetime", name: this.name, value: this.value, required: this.required, disabled: this.disabled, placeholder: this.placeholder, class: "s-datetime-picker-input", ref: (el) => this.dateInput = el }));
|
|
215
215
|
}
|
|
216
216
|
async componentDidLoad() {
|
|
217
217
|
// Load flatpickr before initializing
|
|
@@ -316,11 +316,11 @@ const SallaFileUpload = /*@__PURE__*/ proxyCustomElement(class SallaFileUpload e
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
render() {
|
|
319
|
-
return (h(Host, { key: '
|
|
319
|
+
return (h(Host, { key: '978e89fe8713e6b3db913ed8fb3c5d09f6caf705', class: {
|
|
320
320
|
"s-file-upload": true,
|
|
321
321
|
"s-file-upload-profile-image": this.profileImage,
|
|
322
322
|
"s-file-upload-multiple": this.allowMultiple,
|
|
323
|
-
} }, h("input", { key: '
|
|
323
|
+
} }, h("input", { key: 'acf6197d43b79a80e7a69219afda29271a86d4eb', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', h("input", { key: 'b8624b0fcaba14f14640acce0a28c12feb78701b', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
|
|
324
324
|
}
|
|
325
325
|
componentDidLoad() {
|
|
326
326
|
let files = this.getFiles();
|
|
@@ -190,12 +190,12 @@ const SallaFiltersWidget = /*@__PURE__*/ proxyCustomElement(class SallaFiltersWi
|
|
|
190
190
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
191
191
|
}
|
|
192
192
|
render() {
|
|
193
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: 'e93cfb9f1f6daeb8a2121ccb36a3cf135a55e902', class: "s-filters-widget-container" }, h("h3", { key: 'd5ef45d78e0119e2ac997ded417e310c0a797c34', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: 'fe4df56fad0d290395d78588456fb7d00a20ed43' }, this.option.label), h("span", { key: 'c961f86b5e06437dfdd145e164da5fe326500032', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '7cf1ed1b562bf16acc481f682965567d8bc1813c', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '275427371f48fdfc8ef8b80b9d3e11fa247f7d7a', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, 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 }))), h("div", { key: 'e45654731cdd801345acc5b3311d9ddab3020035', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '5ae673157a4b579a000901b04db8e375a52565e7' }), this.option.type !== FilterOptionTypes.RANGE
|
|
194
194
|
? this.renderFilterOption(this.option)
|
|
195
195
|
: h("salla-price-range", { onChanged: (event) => {
|
|
196
196
|
this.changed.emit(event.detail);
|
|
197
197
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
198
|
-
h("a", { key: '
|
|
198
|
+
h("a", { key: '8ec08429d8fb31b338e6f9f9cf455b5ba2155cb8', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
199
199
|
}
|
|
200
200
|
get host() { return this; }
|
|
201
201
|
static get style() { return sallaFiltersWidgetCss; }
|
|
@@ -196,7 +196,7 @@ const SallaFilters$1 = /*@__PURE__*/ proxyCustomElement(class SallaFilters exten
|
|
|
196
196
|
this.applyFilters();
|
|
197
197
|
}
|
|
198
198
|
render() {
|
|
199
|
-
return h(Host, { key: '
|
|
199
|
+
return h(Host, { key: 'f3c454fc20472dca6fe646c9121028a2c045808f' }, this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
|
|
200
200
|
this.handleOptionChange(event, option, value);
|
|
201
201
|
} })), this.filters?.length ? h("div", { class: "s-filters-footer" }, h("salla-button", { color: 'gray', fill: 'outline', onClick: () => this.resetFilters() }, this.reset)) : '');
|
|
202
202
|
}
|
|
@@ -497,7 +497,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
497
497
|
}
|
|
498
498
|
render() {
|
|
499
499
|
return [
|
|
500
|
-
h("div", { key: '
|
|
500
|
+
h("div", { key: '5959120e43b44cd294d9466003422efb26090897' }, h("salla-list-tile", { key: '6ba52f5157d734e4c8443a9b4a59703d69eb8e84', class: this.generateClass() }, h("div", { key: '26130f1b0e64f7dcc488f2865a19c04c4da28afe', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'b26949ce590efdeb7d364bbb65f04cc2e58eb396' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'bfa36868bc7681aa8fb218dcaa032a414609413c', slot: "subtitle" }, h("div", { key: 'b070fb428965fd7f2f58573970d5d0604564f682' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '343729605e7b97a7a35e63ca26b46ef2b48d5d8e', slot: "action" }, h("salla-button", { key: 'f8d6e1d5f60ea02a271b504fd3daa36215e9a8f3', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'c9cc5ec40b0e09aa99e15f464701deb5c9a3f486', name: "widget-btn-content" }, h("div", { key: '5b431294450b2c45bc5b3503e022d03872cd4252', class: "s-gifting-widget-action-content" }, h("span", { key: '4397140781cf6e311de760e384e1b0f3f429eeeb', innerHTML: GiftSharing }), " \u00A0", h("span", { key: 'e993b5010cca3eb5c09ab6abc592d29c149292bb' }, this.sectionBtnText)))))), h("salla-modal", { key: '13a1010f08acd0c9ef7bdd4eafd3488ae083b0a4', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '0eea1fa6d0ea8240d198e8e7fdd68dc7327fa817', slot: "loading" }, h("div", { key: '9e98de0165db06a39e51984419cb93dcb4bd40ad', class: "s-gifting-skeleton" }, h("div", { key: 'd302e19b737bc272ccece10bfca0eb019b6ca2cf', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '787d98c862475e7a263d4d501842d0b769e9be4a', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '86b67bbbe29fe5b1bad587432652f36480269c86', class: "s-gifting-modal-title" }, h("div", { key: 'af9eb2262a435ce110e355b75f5c0ebdd2a3acdc', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9311ddd1eb3afdc7c02530451eafc27bbba8b776', height: '15px', width: '150px' })))), h("div", { key: '5c87083930311249c7ea735697c3c7d20be4b2e7', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: 'f42adea83216bc972863bd56c5ba0b5f02df6eb1', height: '10px', width: '150px' }), h("salla-skeleton", { key: '7781766e62dedadff68943e69bc97b54fe6eb22b', height: '230px' }), h("salla-skeleton", { key: 'a61810158f2edf8b0f7ed0f44c4985ca1f4b01e7', height: '10px', width: '150px' }), h("salla-skeleton", { key: '2f2763deca90fcfe66a462befbfb7072decf63c1', height: '30px' }), h("salla-skeleton", { key: '2f34b53353830532c900e70660a81d9124bbc1e8', height: '40px' })))), h("slot", { key: 'd6f51bf3ee6a11019d25150e26c45fa80a534c43', name: "header" }), !!this.hasError ?
|
|
501
501
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
502
502
|
:
|
|
503
503
|
[
|
|
@@ -513,7 +513,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
513
513
|
h("div", null, h("div", { class: this.errors && this.errors['receiver.country'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
|
|
514
514
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), h("div", { class: this.errors && this.errors['receiver.city_id'] ? "s-form-group s-form-has-error anime-item opacity-0" : "s-form-group anime-item opacity-0" }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
|
|
515
515
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), h("div", { class: "s-gifting-info anime-item opacity-0" }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo))), !this.physicalProducts && h("div", { class: "anime-item opacity-0" }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: "s-gifting-step-two-footer anime-item opacity-0" }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
516
|
-
], h("slot", { key: '
|
|
516
|
+
], h("slot", { key: 'a08d6d434a1d144bd7aa5d3b13754980083a3f4d', name: "footer" })))
|
|
517
517
|
];
|
|
518
518
|
}
|
|
519
519
|
static get style() { return sallaGiftingCss; }
|
|
@@ -17,7 +17,7 @@ const SallaHook$1 = /*@__PURE__*/ proxyCustomElement(class SallaHook extends HTM
|
|
|
17
17
|
this.host.before(element);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return h(Host, { key: '
|
|
20
|
+
return h(Host, { key: '618467f6911198a5cbf4270694544575e585af27' });
|
|
21
21
|
}
|
|
22
22
|
async componentDidLoad() {
|
|
23
23
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -25,7 +25,7 @@ const SallaListTile = /*@__PURE__*/ proxyCustomElement(class SallaListTile exten
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: 'e1528afcea1eda05a5ce206e95791e7611d24dd0' }, h("a", { key: '749a73c76d68ad36f1a6609ada69778662d56566', class: this.generateClass(), href: this.href || "#", target: this.target, "aria-label": "List Tile Link" }, h("div", { key: '7bfd448f86790b2afe0b7a5b8a5460c3b2be66ee', class: "s-list-tile-item-icon" }, h("slot", { key: '383e28a8832483e8ecc61e4f48a3ff1fe5db1038', name: 'icon' })), h("div", { key: 'c42bf126a9ff4014a4e2d85ff12b41d1a88a0e03', class: "s-list-tile-item-content" }, h("div", { key: '18a4a9ebd39e3a710f70dc33554d24e3c2850e53', class: "s-list-tile-item-title" }, h("slot", { key: '7211d627511bf2448cf161f40cc82b1822dd1e7a', name: 'title' })), h("div", { key: '044a7d76e05841f484387c7ed299107f33c9bc21', class: "s-list-tile-item-subtitle" }, h("slot", { key: 'df131034f1c5434722543e25552caed142794d55', name: "subtitle" }))), h("div", { key: '37abe0abab720da11cd55660578ec256c062e763', class: "s-list-tile-item-action" }, h("slot", { key: 'fcac02da17981ef4c6fa3cea50c551e3010352d9', name: 'action' })))));
|
|
29
29
|
}
|
|
30
30
|
static get style() { return sallaListTileCss; }
|
|
31
31
|
}, [4, "salla-list-tile", {
|