@salla.sa/twilight-components 2.14.549 → 2.14.551
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/{Helper-6RI07gZo.js → Helper-D1YsoJud.js} +46 -0
- package/dist/cjs/{filepond-COUccQWv.js → filepond-C99K1KEB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-B_yyvbJ6.js → filepond-plugin-file-poster-CggRjTNg.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-KDZtJpSs.js → filepond-plugin-file-validate-size-B009kdAV.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Dbm_-1V2.js → filepond-plugin-file-validate-type-DZs9-bai.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-C-q8yFXi.js → filepond-plugin-image-edit-DNNheErX.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C2Q2chpj.js → filepond-plugin-image-exif-orientation-ChN0IpOy.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DVK8eIMv.js → filepond-plugin-image-preview-BZo2ftGo.js} +1 -1
- package/dist/cjs/{index-CSq9uCjw.js → index-0JUvtl0d.js} +6 -2
- package/dist/cjs/{intlTelInput-NQOLNYxO.js → intlTelInput-D84-rI5D.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
- 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-applied-filters.cjs.entry.js +175 -0
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +10 -11
- package/dist/cjs/salla-filters.cjs.entry.js +14 -79
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +2 -2
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-My41190Y.js → vanilla-picker-D8r5xyK7.js} +1 -1
- package/dist/collection/Helpers/Helper.js +28 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-applied-filters/salla-applied-filters.css +115 -0
- package/dist/collection/components/salla-applied-filters/salla-applied-filters.js +185 -0
- package/dist/collection/components/salla-filters/salla-filters.css +0 -119
- package/dist/collection/components/salla-filters/salla-filters.js +27 -73
- package/dist/components/Helper.js +47 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-applied-filters.d.ts +11 -0
- package/dist/components/salla-applied-filters.js +195 -0
- package/dist/components/salla-filters-widget2.js +2 -21
- package/dist/components/salla-filters.js +10 -76
- package/dist/esm/{Helper-CBmYxrzX.js → Helper-DsjZ6kte.js} +47 -1
- package/dist/esm/{filepond-CA4TWKuz.js → filepond-DuMUHI7t.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-C4_NyGjO.js → filepond-plugin-file-poster-Dv25V2UU.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DVV7mZ-K.js → filepond-plugin-file-validate-size-Dxl4yPm6.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DT1IX9KM.js → filepond-plugin-file-validate-type-C602myuq.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-RrqhOPfq.js → filepond-plugin-image-edit-DLd3ht_R.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-Dc9_Qlva.js → filepond-plugin-image-exif-orientation-BaQ5DNLu.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Iu7ULzAy.js → filepond-plugin-image-preview-C-RFNs7l.js} +1 -1
- package/dist/esm/{index-C0qiFNJn.js → index-BsIeN-bg.js} +6 -2
- package/dist/esm/{intlTelInput-CrkMI_sC.js → intlTelInput-Cf6zBu5Y.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +2 -2
- 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-applied-filters.entry.js +173 -0
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +11 -11
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +2 -2
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -3
- package/dist/esm/salla-filters.entry.js +8 -73
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +2 -2
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +2 -2
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Cf9pEgos.js → vanilla-picker-S7qZ7YZm.js} +1 -1
- package/dist/twilight/{p-2a64e50b.entry.js → p-01406425.entry.js} +1 -1
- package/dist/twilight/{p-i-tkvIE0.js → p-035DwuUC.js} +1 -1
- package/dist/twilight/{p-bbd2cb8c.entry.js → p-07adeb89.entry.js} +1 -1
- package/dist/twilight/{p-e806b976.entry.js → p-0944d367.entry.js} +1 -1
- package/dist/twilight/{p-e190e1cf.entry.js → p-0a332226.entry.js} +1 -1
- package/dist/twilight/{p-adbf6324.entry.js → p-0e3d72ab.entry.js} +1 -1
- package/dist/twilight/{p-368beadc.entry.js → p-1118bee2.entry.js} +1 -1
- package/dist/twilight/{p-a37a692a.entry.js → p-13c4b450.entry.js} +1 -1
- package/dist/twilight/{p-e36310e2.entry.js → p-18639885.entry.js} +1 -1
- package/dist/twilight/{p-dc7f11e4.entry.js → p-18a604c5.entry.js} +1 -1
- package/dist/twilight/{p-5364f42e.entry.js → p-1abe8321.entry.js} +1 -1
- package/dist/twilight/{p-27b6fd51.entry.js → p-1bf18c56.entry.js} +1 -1
- package/dist/twilight/{p-c3bed022.entry.js → p-211324e6.entry.js} +1 -1
- package/dist/twilight/p-22cb8a9c.entry.js +4 -0
- package/dist/twilight/{p-c2005d4a.entry.js → p-2331e63a.entry.js} +1 -1
- package/dist/twilight/{p-ab86dc29.entry.js → p-27456209.entry.js} +1 -1
- package/dist/twilight/{p-c72a1861.entry.js → p-2a3d30d1.entry.js} +1 -1
- package/dist/twilight/{p-4d149e9e.entry.js → p-2a683382.entry.js} +1 -1
- package/dist/twilight/{p-7e26332e.entry.js → p-2bef08e8.entry.js} +1 -1
- package/dist/twilight/{p-73db9793.entry.js → p-2c48bb97.entry.js} +1 -1
- package/dist/twilight/p-2df31e90.entry.js +4 -0
- package/dist/twilight/{p-7122a097.entry.js → p-2ff7bb22.entry.js} +1 -1
- package/dist/twilight/{p-ed5d8787.entry.js → p-357b5593.entry.js} +1 -1
- package/dist/twilight/{p-8c086859.entry.js → p-3aa6fa7d.entry.js} +1 -1
- package/dist/twilight/{p-a5185029.entry.js → p-3c2cc4fe.entry.js} +1 -1
- package/dist/twilight/{p-c15eeb62.entry.js → p-3fb485a6.entry.js} +1 -1
- package/dist/twilight/{p-e4c3ca60.entry.js → p-43f8f33b.entry.js} +1 -1
- package/dist/twilight/{p-354da069.entry.js → p-47713dd1.entry.js} +1 -1
- package/dist/twilight/{p-86cec54b.entry.js → p-49738042.entry.js} +1 -1
- package/dist/twilight/{p-499ccb8b.entry.js → p-49f9e536.entry.js} +1 -1
- package/dist/twilight/{p-945b3f38.entry.js → p-4ef06a6f.entry.js} +1 -1
- package/dist/twilight/{p-55c716a4.entry.js → p-501c0798.entry.js} +1 -1
- package/dist/twilight/{p-a5f477fd.entry.js → p-523572e9.entry.js} +1 -1
- package/dist/twilight/{p-f3bd1c09.entry.js → p-54974d98.entry.js} +1 -1
- package/dist/twilight/{p-a9554697.entry.js → p-56845467.entry.js} +1 -1
- package/dist/twilight/{p-3c99951e.entry.js → p-569c6d6c.entry.js} +1 -1
- package/dist/twilight/{p-14f2c393.entry.js → p-56f164bb.entry.js} +1 -1
- package/dist/twilight/{p-8fa81b10.entry.js → p-5918dd8d.entry.js} +1 -1
- package/dist/twilight/{p-95117a08.entry.js → p-5ba2eb55.entry.js} +1 -1
- package/dist/twilight/{p-28efc3a8.entry.js → p-5cd4b67f.entry.js} +1 -1
- package/dist/twilight/{p-bf9cc549.entry.js → p-5dfd449d.entry.js} +1 -1
- package/dist/twilight/{p-a30ae3e6.entry.js → p-683db553.entry.js} +1 -1
- package/dist/twilight/{p-d322a3e8.entry.js → p-68d754be.entry.js} +1 -1
- package/dist/twilight/{p-84181d45.entry.js → p-6a746b8a.entry.js} +1 -1
- package/dist/twilight/{p-0357b501.entry.js → p-6c5a1ded.entry.js} +1 -1
- package/dist/twilight/{p-4358c48e.entry.js → p-6d787fa0.entry.js} +1 -1
- package/dist/twilight/{p-6da4a9b3.entry.js → p-6edd1008.entry.js} +1 -1
- package/dist/twilight/{p-7bdf543a.entry.js → p-6f3516a1.entry.js} +1 -1
- package/dist/twilight/{p-a72bf47b.entry.js → p-6f58ac6a.entry.js} +1 -1
- package/dist/twilight/{p-4cfccc31.entry.js → p-704553fb.entry.js} +1 -1
- package/dist/twilight/{p-f51a1326.entry.js → p-709c2184.entry.js} +1 -1
- package/dist/twilight/{p-453f92f9.entry.js → p-83a5b8a4.entry.js} +1 -1
- package/dist/twilight/{p-c0d89d74.entry.js → p-847cdd79.entry.js} +1 -1
- package/dist/twilight/p-84cffb13.entry.js +4 -0
- package/dist/twilight/{p-dc51e991.entry.js → p-869fe4c0.entry.js} +1 -1
- package/dist/twilight/{p-32af49cd.entry.js → p-8711224a.entry.js} +1 -1
- package/dist/twilight/{p-ee7530fe.entry.js → p-8ebb86ce.entry.js} +1 -1
- package/dist/twilight/{p-875beddd.entry.js → p-9025e5d9.entry.js} +1 -1
- package/dist/twilight/{p-4a8b3e89.entry.js → p-906b36e3.entry.js} +1 -1
- package/dist/twilight/{p-a9b9deb9.entry.js → p-90f29c99.entry.js} +1 -1
- package/dist/twilight/{p-42efd1b1.entry.js → p-9dd126e2.entry.js} +1 -1
- package/dist/twilight/{p-a909aff5.entry.js → p-9f431f78.entry.js} +1 -1
- package/dist/twilight/{p-5be5be8b.entry.js → p-9fdbe8a0.entry.js} +1 -1
- package/dist/twilight/{p-CW2JQnYK.js → p-B3oo4tIx.js} +1 -1
- package/dist/twilight/p-BRZVMxhy.js +9 -0
- package/dist/twilight/{p-C0qiFNJn.js → p-BsIeN-bg.js} +1 -1
- package/dist/twilight/{p-ClV-F79e.js → p-CPiqlSTo.js} +1 -1
- package/dist/twilight/{p-CyO2XGkr.js → p-CaCiueRc.js} +1 -1
- package/dist/twilight/p-D6rFREuQ.js +4 -0
- package/dist/twilight/{p-BeFR_h3q.js → p-DNS31w5e.js} +1 -1
- package/dist/twilight/{p-l7Rr63jq.js → p-DeX830vG.js} +1 -1
- package/dist/twilight/{p-b5028411.entry.js → p-a01f64e7.entry.js} +1 -1
- package/dist/twilight/{p-344f751a.entry.js → p-a037e47d.entry.js} +1 -1
- package/dist/twilight/{p-709af483.entry.js → p-a0ed97f5.entry.js} +1 -1
- package/dist/twilight/{p-8f2f8693.entry.js → p-a30390a7.entry.js} +1 -1
- package/dist/twilight/{p-b3ba53c5.entry.js → p-a344db00.entry.js} +1 -1
- package/dist/twilight/{p-b6d259be.entry.js → p-a3579980.entry.js} +1 -1
- package/dist/twilight/{p-7a1169f6.entry.js → p-a46a9d28.entry.js} +1 -1
- package/dist/twilight/{p-33c2f3bc.entry.js → p-a64771f7.entry.js} +1 -1
- package/dist/twilight/{p-a243d3cc.entry.js → p-a8316527.entry.js} +1 -1
- package/dist/twilight/{p-e2d501f5.entry.js → p-a9ef3c52.entry.js} +1 -1
- package/dist/twilight/{p-ecaf7d87.entry.js → p-aa8962f8.entry.js} +1 -1
- package/dist/twilight/{p-0dea4239.entry.js → p-aa91a230.entry.js} +1 -1
- package/dist/twilight/{p-b2662a4f.entry.js → p-af348a67.entry.js} +1 -1
- package/dist/twilight/{p-1adf1893.entry.js → p-b1e0bc90.entry.js} +1 -1
- package/dist/twilight/{p-0d44c47f.entry.js → p-b238c74b.entry.js} +1 -1
- package/dist/twilight/{p-6da0b2b3.entry.js → p-b5a2342c.entry.js} +1 -1
- package/dist/twilight/{p-b73b7e15.entry.js → p-be0ac755.entry.js} +1 -1
- package/dist/twilight/{p-6bedb896.entry.js → p-cdba9d35.entry.js} +1 -1
- package/dist/twilight/{p-fba13fd5.entry.js → p-d5215891.entry.js} +1 -1
- package/dist/twilight/{p-a8561cc8.entry.js → p-e3e2baa2.entry.js} +1 -1
- package/dist/twilight/{p-7f11af86.entry.js → p-e875f53e.entry.js} +1 -1
- package/dist/twilight/{p-ae96e338.entry.js → p-ea968ba3.entry.js} +1 -1
- package/dist/twilight/{p-88148fed.entry.js → p-eb3a095b.entry.js} +1 -1
- package/dist/twilight/{p-c82b8aa7.entry.js → p-ebc6ba28.entry.js} +1 -1
- package/dist/twilight/{p-b8da968d.entry.js → p-ecdbd18f.entry.js} +1 -1
- package/dist/twilight/{p-4ebdef90.entry.js → p-ef145c1e.entry.js} +1 -1
- package/dist/twilight/{p-5d71c16a.entry.js → p-efe6493f.entry.js} +1 -1
- package/dist/twilight/{p-5d261682.entry.js → p-f037e508.entry.js} +1 -1
- package/dist/twilight/{p-34889d17.entry.js → p-f4f355e5.entry.js} +1 -1
- package/dist/twilight/{p-862f7fda.entry.js → p-fed3efba.entry.js} +1 -1
- package/dist/twilight/{p-b217fea1.entry.js → p-ff37c2af.entry.js} +1 -1
- package/dist/twilight/{p-yV2X3Oc1.js → p-mgSPapOV.js} +1 -1
- package/dist/twilight/{p-C7NprL2x.js → p-wqmCmzsY.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/Helper.d.ts +10 -0
- package/dist/types/components/salla-applied-filters/salla-applied-filters.d.ts +37 -0
- package/dist/types/components/salla-filters/salla-filters.d.ts +3 -11
- package/dist/types/components.d.ts +17 -0
- package/package.json +5 -5
- package/dist/cjs/interfaces-DZDQwN6-.js +0 -23
- package/dist/esm/interfaces-DL4h2bc3.js +0 -23
- package/dist/twilight/p-01b52f2f.entry.js +0 -4
- package/dist/twilight/p-B3th5No1.js +0 -9
- package/dist/twilight/p-DL4h2bc3.js +0 -4
- package/dist/twilight/p-DOBDDG4K.js +0 -4
- package/dist/twilight/p-c55c576c.entry.js +0 -4
|
@@ -13,9 +13,6 @@ export declare class SallaFilters {
|
|
|
13
13
|
isSidebarOpen: boolean;
|
|
14
14
|
filtersData: object | any;
|
|
15
15
|
apply: string;
|
|
16
|
-
reset: string;
|
|
17
|
-
selectedTitle: string;
|
|
18
|
-
appliedOpen: boolean;
|
|
19
16
|
/**
|
|
20
17
|
* Custom event fired when the selected filters are changed.
|
|
21
18
|
*/
|
|
@@ -41,17 +38,12 @@ export declare class SallaFilters {
|
|
|
41
38
|
* @private
|
|
42
39
|
*/
|
|
43
40
|
private handleOptionChange;
|
|
44
|
-
/**
|
|
45
|
-
* Flatten the selected filtersData into displayable chips, resolving the
|
|
46
|
-
* human label for each group + option from `this.filters`. Selections that
|
|
47
|
-
* can't be resolved to a known option (e.g. the auto-added base category)
|
|
48
|
-
* are skipped.
|
|
49
|
-
*/
|
|
50
|
-
private getAppliedFilters;
|
|
51
41
|
/**
|
|
52
42
|
* Remove a single applied filter — the direct inverse of handleOptionChange.
|
|
43
|
+
* Public so salla-applied-filters (which owns the applied-chips UI) can
|
|
44
|
+
* drive removal on the live salla-filters element it reads chips from.
|
|
53
45
|
*/
|
|
54
|
-
|
|
46
|
+
removeFilter(chip: any): Promise<void>;
|
|
55
47
|
render(): any;
|
|
56
48
|
componentDidLoad(): void;
|
|
57
49
|
}
|
|
@@ -188,6 +188,8 @@ export namespace Components {
|
|
|
188
188
|
}
|
|
189
189
|
interface SallaAppInstallAlert {
|
|
190
190
|
}
|
|
191
|
+
interface SallaAppliedFilters {
|
|
192
|
+
}
|
|
191
193
|
interface SallaAppsIcons {
|
|
192
194
|
/**
|
|
193
195
|
* The title to display.
|
|
@@ -1389,6 +1391,10 @@ export namespace Components {
|
|
|
1389
1391
|
* Method to get filter data.
|
|
1390
1392
|
*/
|
|
1391
1393
|
"getFilters": () => Promise<any>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Remove a single applied filter — the direct inverse of handleOptionChange. Public so salla-applied-filters (which owns the applied-chips UI) can drive removal on the live salla-filters element it reads chips from.
|
|
1396
|
+
*/
|
|
1397
|
+
"removeFilter": (chip: any) => Promise<void>;
|
|
1392
1398
|
/**
|
|
1393
1399
|
* Reset selected filters.
|
|
1394
1400
|
*/
|
|
@@ -3805,6 +3811,12 @@ declare global {
|
|
|
3805
3811
|
prototype: HTMLSallaAppInstallAlertElement;
|
|
3806
3812
|
new (): HTMLSallaAppInstallAlertElement;
|
|
3807
3813
|
};
|
|
3814
|
+
interface HTMLSallaAppliedFiltersElement extends Components.SallaAppliedFilters, HTMLStencilElement {
|
|
3815
|
+
}
|
|
3816
|
+
var HTMLSallaAppliedFiltersElement: {
|
|
3817
|
+
prototype: HTMLSallaAppliedFiltersElement;
|
|
3818
|
+
new (): HTMLSallaAppliedFiltersElement;
|
|
3819
|
+
};
|
|
3808
3820
|
interface HTMLSallaAppsIconsElement extends Components.SallaAppsIcons, HTMLStencilElement {
|
|
3809
3821
|
}
|
|
3810
3822
|
var HTMLSallaAppsIconsElement: {
|
|
@@ -5177,6 +5189,7 @@ declare global {
|
|
|
5177
5189
|
"salla-advertisement": HTMLSallaAdvertisementElement;
|
|
5178
5190
|
"salla-alert": HTMLSallaAlertElement;
|
|
5179
5191
|
"salla-app-install-alert": HTMLSallaAppInstallAlertElement;
|
|
5192
|
+
"salla-applied-filters": HTMLSallaAppliedFiltersElement;
|
|
5180
5193
|
"salla-apps-icons": HTMLSallaAppsIconsElement;
|
|
5181
5194
|
"salla-attachment-view": HTMLSallaAttachmentViewElement;
|
|
5182
5195
|
"salla-attachments": HTMLSallaAttachmentsElement;
|
|
@@ -5448,6 +5461,8 @@ declare namespace LocalJSX {
|
|
|
5448
5461
|
}
|
|
5449
5462
|
interface SallaAppInstallAlert {
|
|
5450
5463
|
}
|
|
5464
|
+
interface SallaAppliedFilters {
|
|
5465
|
+
}
|
|
5451
5466
|
interface SallaAppsIcons {
|
|
5452
5467
|
/**
|
|
5453
5468
|
* The title to display.
|
|
@@ -8585,6 +8600,7 @@ declare namespace LocalJSX {
|
|
|
8585
8600
|
"salla-advertisement": SallaAdvertisement;
|
|
8586
8601
|
"salla-alert": SallaAlert;
|
|
8587
8602
|
"salla-app-install-alert": SallaAppInstallAlert;
|
|
8603
|
+
"salla-applied-filters": SallaAppliedFilters;
|
|
8588
8604
|
"salla-apps-icons": SallaAppsIcons;
|
|
8589
8605
|
"salla-attachment-view": SallaAttachmentView;
|
|
8590
8606
|
"salla-attachments": SallaAttachments;
|
|
@@ -8746,6 +8762,7 @@ declare module "@stencil/core" {
|
|
|
8746
8762
|
"salla-advertisement": LocalJSX.SallaAdvertisement & JSXBase.HTMLAttributes<HTMLSallaAdvertisementElement>;
|
|
8747
8763
|
"salla-alert": LocalJSX.SallaAlert & JSXBase.HTMLAttributes<HTMLSallaAlertElement>;
|
|
8748
8764
|
"salla-app-install-alert": LocalJSX.SallaAppInstallAlert & JSXBase.HTMLAttributes<HTMLSallaAppInstallAlertElement>;
|
|
8765
|
+
"salla-applied-filters": LocalJSX.SallaAppliedFilters & JSXBase.HTMLAttributes<HTMLSallaAppliedFiltersElement>;
|
|
8749
8766
|
"salla-apps-icons": LocalJSX.SallaAppsIcons & JSXBase.HTMLAttributes<HTMLSallaAppsIconsElement>;
|
|
8750
8767
|
/**
|
|
8751
8768
|
* A reusable lightbox for viewing image/video attachments in a modal with a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.551",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@googlemaps/markerclusterer": "2.6.2",
|
|
85
|
-
"@salla.sa/applepay": "2.14.
|
|
86
|
-
"@salla.sa/twilight": "2.14.
|
|
87
|
-
"@salla.sa/twilight-tailwind-theme": "2.14.
|
|
85
|
+
"@salla.sa/applepay": "2.14.551",
|
|
86
|
+
"@salla.sa/twilight": "2.14.551",
|
|
87
|
+
"@salla.sa/twilight-tailwind-theme": "2.14.551",
|
|
88
88
|
"@salla.sa/ui-address-autocomplete-widget": "1.2.1",
|
|
89
89
|
"@salla.sa/ui-google-map-render": "1.2.1",
|
|
90
90
|
"@types/node": "^20.4.8",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vanilla-lazyload": "^17.8.5",
|
|
106
106
|
"vanilla-picker": "^2.12.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "c1ab60fdb55aa6ae57cbf3a1f15788ade114b701"
|
|
109
109
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
exports.FilterOptionTypes = void 0;
|
|
7
|
-
(function (FilterOptionTypes) {
|
|
8
|
-
// CATEGORIES = "categories",
|
|
9
|
-
// BRANDs = "brands",
|
|
10
|
-
// RATING = "rating",
|
|
11
|
-
// PRICE = "price",
|
|
12
|
-
// RADIO = "radio",
|
|
13
|
-
FilterOptionTypes["VALUES"] = "values";
|
|
14
|
-
FilterOptionTypes["VARIANTS"] = "variants";
|
|
15
|
-
FilterOptionTypes["MINIMUM"] = "minimum";
|
|
16
|
-
FilterOptionTypes["RANGE"] = "range";
|
|
17
|
-
})(exports.FilterOptionTypes || (exports.FilterOptionTypes = {}));
|
|
18
|
-
var FilterOptionInputType;
|
|
19
|
-
(function (FilterOptionInputType) {
|
|
20
|
-
FilterOptionInputType["VALUES"] = "values";
|
|
21
|
-
FilterOptionInputType["VARIANT"] = "variants";
|
|
22
|
-
FilterOptionInputType["RANGE"] = "range";
|
|
23
|
-
})(FilterOptionInputType || (FilterOptionInputType = {}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
var FilterOptionTypes;
|
|
5
|
-
(function (FilterOptionTypes) {
|
|
6
|
-
// CATEGORIES = "categories",
|
|
7
|
-
// BRANDs = "brands",
|
|
8
|
-
// RATING = "rating",
|
|
9
|
-
// PRICE = "price",
|
|
10
|
-
// RADIO = "radio",
|
|
11
|
-
FilterOptionTypes["VALUES"] = "values";
|
|
12
|
-
FilterOptionTypes["VARIANTS"] = "variants";
|
|
13
|
-
FilterOptionTypes["MINIMUM"] = "minimum";
|
|
14
|
-
FilterOptionTypes["RANGE"] = "range";
|
|
15
|
-
})(FilterOptionTypes || (FilterOptionTypes = {}));
|
|
16
|
-
var FilterOptionInputType;
|
|
17
|
-
(function (FilterOptionInputType) {
|
|
18
|
-
FilterOptionInputType["VALUES"] = "values";
|
|
19
|
-
FilterOptionInputType["VARIANT"] = "variants";
|
|
20
|
-
FilterOptionInputType["RANGE"] = "range";
|
|
21
|
-
})(FilterOptionInputType || (FilterOptionInputType = {}));
|
|
22
|
-
|
|
23
|
-
export { FilterOptionTypes as F };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as e,h as i,H as r,a as s}from"./p-C0qiFNJn.js";import{F as o}from"./p-DL4h2bc3.js";import{H as a}from"./p-DOBDDG4K.js";import"./p-CgtvEd63.js";const l=class{constructor(i){t(this,i),this.changed=e(this,"changed"),this.isReady=!1,this.isInitialFetch=!0,this.filtersData={},this.appliedOpen=!0,salla.event.on("filters::hidden",(()=>this.host.style.display="none")),salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply"),this.reset=salla.lang.get("pages.categories.filters_reset"),this.selectedTitle=salla.lang.getWithDefault("pages.categories.selected_filters","لقد اخترت")})),salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let e={};this.filters=t.map((t=>{if(t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label,"rating"==t.key){t.type=o.VALUES;let{max:e,min:i}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=i||t<=e))}this.filtersData.variants&&t.type==o.VARIANTS&&(e.variants=this.filtersData.variants),this.filtersData[t.key]&&t.type!==o.VARIANTS&&(e[t.key]=this.filtersData[t.key]);let i=new URLSearchParams(window.location.search),r=!1;for(let t of i.keys())if(t.includes("filters")){r=!0;break}if(this.isInitialFetch&&"product.index"==salla.config.get("page.slug")&&0==Object.keys(e).length&&!r){let t=window.location.href,i=salla.config.get("page.id"),r=-1!==t.indexOf("?")?"&":"?",s=t+r+"filters[category_id]="+i;e.category_id=i,window.history.pushState({path:s},"",s)}return t})),this.isInitialFetch=!1,this.filtersData=e,this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await a.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady)return;let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{if(t){let t=new URL(window.location.href);for(const[e]of t.searchParams.entries())e.startsWith("filters")&&t.searchParams.delete(e);let e=this.encodeFilters(this.filtersData),i=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");t.search=i?t.search.split("&filters")[0]+"&"+e:`?${e}`,window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);t.searchParams?.delete("filters"),window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData),this.changed.emit(this.filtersData)}),300)}encodeFilters(t,e="filters"){const i=[];for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=t[r],o=e?`${e}[${r}]`:r;Array.isArray(s)?s.forEach((t=>i.push(`${o}[]=${t}`))):i.push("object"==typeof s&&null!==s?this.encodeFilters(s,o):`${o}=${s}`)}return i.join("&")}async resetFilters(){return this.removeFiltersQueryParams(),this.filtersData={},this.host.childNodes.forEach((t=>t.reset&&t.reset())),salla.event.emit("salla-filters::reset"),this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search),e=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t.get(e))}`)).join("&"),i=e?`${window.location.pathname}?${e}`:window.location.pathname;window.history.pushState({},"",i)}handleOptionChange(t,e,i){e.type===o.RANGE&&(this.filtersData[e.key]=i);let r=t.target.checked;if(e.type===o.VARIANTS)this.filtersData.variants=this.filtersData.variants||{},r&&(this.filtersData.variants[e.key]=i),r||delete this.filtersData.variants[e.key];else if("radio"==t.target.type)r&&(this.filtersData[e.key]=i),r||delete this.filtersData[e.key];else if("checkbox"==t.target.type){const t=this.filtersData[e.key];this.filtersData[e.key]=Array.isArray(t)?t:null!=t?[t]:[],r?this.filtersData[e.key].push(i):this.filtersData[e.key]=this.filtersData[e.key].filter((t=>t!=i)),this.filtersData[e.key].length||delete this.filtersData[e.key]}this.filtersData={...this.filtersData},this.applyFilters()}getAppliedFilters(){const t=[],e=this.filtersData||{};for(const i of Object.keys(e)){if("variants"===i){const r=this.filters?.find((t=>t.type===o.VARIANTS));for(const s of Object.keys(e.variants||{})){const a=e.variants[s],l=r?.values?.find((t=>(t.key||t.value)==a));l&&t.push({key:i,variantKey:s,value:a,type:o.VARIANTS,groupLabel:r?.label,optionLabel:l.value})}continue}const r=this.filters?.find((t=>t.key===i));if(!r)continue;const s=e[i];if(r.type===o.RANGE||s&&"object"==typeof s&&!Array.isArray(s)){t.push({key:i,value:s,type:o.RANGE,groupLabel:r.label,optionLabel:`${s.min} - ${s.max}`});continue}if("category_id"===i&&!Array.isArray(s)&&"product.index"==salla.config.get("page.slug")&&s==salla.config.get("page.id"))continue;const a=Array.isArray(s)?s:[s];for(const e of a){const s=r.values?.find((t=>("number"==typeof t?t:t.key||t.value)==e)),o="rating"===r.key?`${e}`:s&&"number"!=typeof s?s.value:void 0;null!=o&&t.push({key:i,value:e,type:r.type,groupLabel:r.label,optionLabel:o})}}return t}removeFilter(t){if(t.type===o.VARIANTS)this.filtersData.variants&&(delete this.filtersData.variants[t.variantKey],Object.keys(this.filtersData.variants).length||delete this.filtersData.variants);else if(t.type===o.RANGE)delete this.filtersData[t.key];else{const e=this.filtersData[t.key];Array.isArray(e)?(this.filtersData[t.key]=e.filter((e=>e!=t.value)),this.filtersData[t.key].length||delete this.filtersData[t.key]):delete this.filtersData[t.key]}this.filtersData={...this.filtersData},this.applyFilters()}render(){const t=this.getAppliedFilters(),e=salla.lang.getWithDefault("common.elements.delete","Remove");return i(r,{key:"f0493d0e85ebb9e6612a1edc6cd7f45e7473017e"},t.length?i("div",{class:"s-filters-applied s-filters-widget-container"},i("h3",{class:"s-filters-widget-title",onClick:()=>this.appliedOpen=!this.appliedOpen},i("span",null,this.selectedTitle),i("span",{class:"s-filters-widget-plusminus "+(this.appliedOpen?"s-filters-widget-plusminus-active":"")})),i("div",{class:"s-filters-widget-content "+(this.appliedOpen?"s-filters-widget-opened":"s-filters-widget-closed")},i("div",{class:"s-filters-widget-values"},t.map((t=>i("div",{class:"s-filters-label s-filters-applied-item"},i("span",{class:"s-filters-option-name"},t.groupLabel,": ",t.optionLabel),i("button",{type:"button",class:"s-filters-applied-remove","aria-label":`${e} ${t.groupLabel}: ${t.optionLabel}`,onClick:()=>this.removeFilter(t)},i("i",{class:"sicon-cancel","aria-hidden":"true"})))))),i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)))):"",this.filters?.map((t=>i("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:e,value:i}})=>{this.handleOptionChange(t,e,i)}}))))}componentDidLoad(){this.isReady=!0}get host(){return s(this)}};l.style='/*!twlt*/:host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}.s-filters-applied-remove{pointer-events:auto !important;cursor:pointer}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-filters-checkbox{height:1.25rem;width:1.25rem;border-radius:6px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));color:var(--color-primary)}.s-filters-checkbox:focus{--tw-ring-color:transparent}.s-filters-radio{position:relative;height:1rem;width:1rem;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1)) !important;color:var(--color-primary)}.s-filters-radio:focus{--tw-ring-color:transparent}.s-filters-radio:where([dir="ltr"],[dir="ltr"] *){margin-right:0.75rem}.s-filters-radio:where([dir="rtl"],[dir="rtl"] *){margin-left:0.75rem}.s-filters-radio:checked{border-color:var(--color-primary)}.s-filters-radio:checked::after{position:absolute;left:0.125rem;top:0.125rem;display:block;height:0.625rem;width:0.625rem;border-radius:9999px;background-color:var(--color-primary);--tw-content:\'\';content:var(--tw-content)}.s-filters-radio:checked:hover{border-color:var(--color-primary)}.s-filters-radio:checked:focus{border-color:var(--color-primary)}.s-filters-label{position:relative;margin-bottom:0.75rem;display:flex;cursor:pointer;align-items:center;font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-filters-label:last-child{margin-bottom:0px}.s-filters-option-name{margin-left:0.5rem;margin-right:0.5rem;--tw-text-opacity:1;color:rgb(129 127 127 / var(--tw-text-opacity, 1))}.s-filters-footer{margin-top:1rem;display:flex}.s-filters-footer salla-button{flex:1 1 0%}.s-filters-footer salla-button button{width:100%}.s-filters-applied-item{justify-content:space-between}.s-filters-applied-remove{cursor:pointer;border-width:0px;background-color:transparent;padding:0px;color:inherit}.s-filters-widget-container{display:block;overflow:hidden;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1.25rem;padding-bottom:0.5rem}@media (min-width: 768px){.s-filters-widget-container{margin-bottom:1.25rem;padding-bottom:1.25rem;padding-top:1.25rem}}.s-filters-widget-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-opened{visibility:visible;opacity:1}.s-filters-widget-closed{visibility:hidden;height:0px !important;padding:0px;opacity:0}.s-filters-widget-title{display:flex;cursor:pointer;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:700}.s-filters-widget-values{overflow:hidden;padding-top:1rem;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-plusminus{position:relative;height:0.75rem;width:0.75rem;--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-filters-widget-plusminus::before{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:\'\';content:var(--tw-content)}.s-filters-widget-plusminus::after{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:\'\';content:var(--tw-content)}.s-filters-widget-plusminus-active:before{transform:translatey(-50%) rotate(-90deg);opacity:0}.s-filters-widget-plusminus-active:after{transform:translatey(-50%) rotate(0);background-color:var(--color-primary)}.s-filters-widget-plusminus:before{transform:translatey(-50%)}.s-filters-widget-plusminus:after{transform:translatey(-50%) rotate(90deg)}';export{l as salla_filters}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{d as e}from"./p-C0qiFNJn.js";function n(e,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in e)){var i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(e)}var t,i,E={exports:{}},r=t?E.exports:(t=1,E.exports=(i=function(e){var n=e.addFilter,t=e.utils,i=t.Type,E=t.isString,r=t.replaceInString,T=t.guesstimateMimeType,u=t.getExtensionFromFilename,o=t.getFilenameFromURL,_=function(e,n){return e.some((function(e){return/\*$/.test(e)?(t=e,(/^[^/]+/.exec(n)||[]).pop()===t.slice(0,-2)):e===n;var t}))},a=function(e,n,t){if(0===n.length)return!0;var i=function(e){var n="";if(E(e)){var t=o(e),i=u(t);i&&(n=T(i))}else n=e.type;return n}(e);return t?new Promise((function(E,r){t(e,i).then((function(e){_(n,e)?E():r()})).catch(r)})):_(n,i)};return n("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),n("ALLOW_HOPPER_ITEM",(function(e,n){var t=n.query;return!t("GET_ALLOW_FILE_TYPE_VALIDATION")||a(e,t("GET_ACCEPTED_FILE_TYPES"))})),n("LOAD_FILE",(function(e,n){var t=n.query;return new Promise((function(n,i){if(t("GET_ALLOW_FILE_TYPE_VALIDATION")){var E=t("GET_ACCEPTED_FILE_TYPES"),T=t("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),u=a(e,E,T),o=function(){var e,n=E.map((e=t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(n){return null!==e[n]&&(e[n]||n)})).filter((function(e){return!1!==e})),T=n.filter((function(e,t){return n.indexOf(e)===t}));i({status:{main:t("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(t("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:T.join(", "),allButLastType:T.slice(0,-1).join(", "),lastType:T[T.length-1]})}})};if("boolean"==typeof u)return u?n(e):o();u.then((function(){n(e)})).catch(o)}else n(e)}))})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:i})),i)),T=n({__proto__:null,default:e(r)},[r]);
|
|
5
|
-
/*!
|
|
6
|
-
* FilePondPluginFileValidateType 1.2.9
|
|
7
|
-
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
8
|
-
* Please visit https://pqina.nl/filepond/ for details.
|
|
9
|
-
*/export{T as f}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{a as e}from"./p-CgtvEd63.js";salla.event.setMaxListeners(100);var t=new class{setIncludes(e){return this.includes=e,this}toggleElementClassIf(e,t,r,a){t=Array.isArray(t)?t:t.split(" "),r=Array.isArray(r)?r:r.split(" ");let s=a(e);return e?.classList.remove(...s?r:t),e?.classList.add(...s?t:r),this}toggleClassIf(e,t,r,a){return document.querySelectorAll(e).forEach((e=>this.toggleElementClassIf(e,t,r,a))),this}isValidEmail(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}filterEmojies(e){return e.replace(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g,"")}debounce(e,...t){return this.debounce_||(this.debounce_=salla.helpers.debounce(((e,...t)=>e(...t)),500)),this.debounce_(e,...t)}getProductsSource(e){return{"brands.single":"brands","product.index":"categories","product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","customer.wishlist":"wishlist","landing-page":"landing-page","product.index.tag":"tags","product.index.sales":"sales","components.most_sales_products":"sales"}[e||salla.config.get("page.slug")]||e||"latest"}getApiSource(e){return{recently:"selected"}[e]||e}getPageTitleForSource(e){return(e={brands:"common.titles.brands",latest:"blocks.home.latest_products",offers:"common.titles.discounts",reorder:"common.titles.products",sales:"common.titles.most_sales"}[e])?salla.lang.get(e):""}getProductsSourceValue(e,t){const r=this.getProductsSource(e);let a=null;if(t)try{a="string"==typeof t?JSON.parse(t):t}catch(e){console.error("Failed to parse JSON string in sourceValue:",e)}if(!["search","json","offers","latest","sales","related"].includes(r)){if(Array.isArray(a)&&a.length)return a;if(Array.isArray(a)&&!a.length)return"";if("number"==typeof a)return[a];if(!t&&["categories","tags","brands"].includes(e))return[salla.config.get("page.id")]}return a||t?a||t:"search"===r?new URLSearchParams(window.location.search).get("q")||"":salla.config.get("page.id")}extractFiltersFromUrl(e){let t={};return e.forEach(((e,r)=>{const a=r.match(/^filters\[(.*?)\](\[(.*?)\])?$/u);if(a){const r=a[1],s=a[3];""===s||/^\d+$/.test(s)?(t[r]=Array.isArray(t[r])?t[r]:[],t[r].push(e)):s?(t[r]=t[r]||{},t[r][s]=e):t[r]=e}else{const a=r.match(/^(.*?)$/u);a&&(t[a[1]]=e)}})),t}async injectExtraFieldsToResponse(e){if(!e||!this.includes)return e;const t=e.data.map((e=>e.id));try{const{data:r}=await this.fetchImagesAndOptions(t);if(this.injectOptionsAndImages(e.data,r),!this.includes.includes("metadata"))return e;const a=await salla.api.metadata.fetchValues("product",t);return e.data.forEach((e=>{e.metadata=a.data.find((t=>parseInt(t.entity_id)===parseInt(e.id)))})),e}catch(e){throw console.error("Error in injectExtraFieldsToResponse:",e),e}}fetchImagesAndOptions(e){return this.productsIncludes().length?salla.api.product.fetchOptions(e,{with:this.productsIncludes()}):Promise.resolve({data:[]})}injectOptionsAndImages(e,t){return t.length?e.map((e=>(this.includes.filter((e=>"metadata"!==e)).forEach((r=>{const a=t.find((t=>parseInt(t.id)===parseInt(e.id)));e[r]=a?a[r]:null})),e))):null}productsIncludes(){return this.includes?.filter((e=>"metadata"!=e))}saveSource(e,t){if(t)try{sessionStorage.setItem(e,t)}catch(e){salla.logger.warn("Error saving source to session storage")}}saveProductSource(e){this.saveSource("s-viewed-source",e)}saveProductPosition(e){if(null!=e&&""!==e)try{sessionStorage.setItem("s-viewed-position",String(e))}catch(e){salla.logger.warn("Error saving position to session storage")}}saveAddToCartSource(e){this.saveSource("s-add-to-cart-source",e)}parseJson(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(e){salla.logger.error("Failed to parse includes as JSON:",e)}return null}getProductSchemaMarkupScript(e){const t=document.createElement("script");return t.type="application/ld+json",t.text=JSON.stringify({"@context":"http://schema.org","@type":"Product",name:e?.name,image:e?.image?.url||e?.thumbnail,description:e?.description,brand:{"@type":"Brand",logo:e?.brand?.logo},offers:{"@type":"Offer",price:e?.price}}),t}createProductSchema(e,t){let r={productID:`${e.id}`,"@type":"Product",name:e.name,url:e.url,image:e.image.url||e.image,description:e.description||e.subtitle||e.name,...e.sku&&e.sku.length>0&&{sku:e.sku},offers:{"@type":"Offer",url:e.url,priceCurrency:e.currency,price:e.price,itemCondition:"NewCondition",availability:e.is_available?"InStock":"OutOfStock",priceValidUntil:e.discount_ends||new Date((new Date).setDate((new Date).getDate()+7)).toISOString().split("T")[0],priceSpecification:{"@type":"PriceSpecification",price:e.regular_price,priceCurrency:e.currency,valueAddedTaxIncluded:e.is_taxable},seller:{"@type":"Organization",name:salla.config.get("store.name")},shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:"0",currency:e.currency||"SAR"},deliveryTime:{"@type":"ShippingDeliveryTime",businessDays:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]},cutoffTime:"14:00"}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",returnPolicyCategory:"https://schema.org/MerchantReturnFiniteReturnWindow",merchantReturnDays:30,returnMethod:"https://schema.org/ReturnByMail",returnFees:"https://schema.org/FreeReturn"}}};return e.rating?.stars&&(r.aggregateRating={"@type":"AggregateRating",ratingValue:e.rating.stars,reviewCount:e.rating.count}),{"@type":"ListItem",position:t,item:r}}generateProductSchema(e){const t="salla-product-schema-script";if(document.getElementById(t))return void salla.logger.warn(`already added schema-script with id (${t})!`);const r=document.createElement("script");r.type="application/ld+json",r.id=t;const a={"@context":"https://schema.org","@type":"ItemList",name:salla.config.get("page.title"),itemListElement:e.map(((e,t)=>this.createProductSchema(e,t+1)))};r.textContent=JSON.stringify(a),document.head.appendChild(r)}formatDateFromString(e,t,r="en"){const a={en:"Invalid Date",ar:"تاريخ غير صالح"};if(!e||"string"!=typeof e||""===e.trim())return a[r];let s;if(/^\d+$/.test(e)){const t=parseInt(e);s=new Date(t>1e12?t:1e3*t)}else s=new Date(e);return isNaN(s.getTime())?a[r]:`${{en:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ar:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"]}[r][s.getDay()]} ${t(s.getDate(),"en"===r)} ${{en:["January","February","March","April","May","June","July","August","September","October","November","December"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"]}[r][s.getMonth()]} ${t(s.getFullYear(),"en"===r)}`}copyToClipboard(e){var t=e.target.innerText;navigator.clipboard.writeText(t).then((()=>{console.log("Text copied to clipboard: "+t)})).catch((e=>{console.error("Unable to copy text to clipboard",e)}))}animateItems(t){t&&e({targets:t,opacity:[0,1],duration:1200,translateY:[20,0],delay:function(e,t){return 100*t},easing:"easeOutExpo",complete:function(){t.forEach((e=>{e.classList.add("animated")}))}})}createReviewObject(e){return{"@type":"Review",author:{"@type":"Person",name:e.name},reviewBody:e.content,reviewRating:{"@type":"Rating",bestRating:"5",ratingValue:e.stars,worstRating:"1"}}}generateReviewSchema(e){const t=document.createElement("script");t.type="application/ld+json";const r={"@context":"http://schema.org/","@type":"Store",name:salla.config.get("store.name"),url:salla.config.get("store.url"),address:"الرياض",review:e.map((e=>this.createReviewObject(e))),aggregateRating:{"@type":"AggregateRating",ratingValue:e.reduce(((e,t)=>e+t.stars),0)/e.length,reviewCount:e.length}};t.textContent=JSON.stringify(r),document.head.appendChild(t)}availabilityChannels(){let e=salla.config.get("store.settings.product.availability_notify");if(!e)return"";let t=[];return e.email&&t.push("email"),(e.sms||e.mobile||e.whatsapp)&&t.push("sms"),t.join(",")}syncWishlistIcons(e,t){e?.querySelectorAll(t).forEach((e=>{const t=e.product?.id,r="number"==typeof t?t:Number(t);if(Number.isNaN(r))return;const a=salla.wishlist.api.has(r);e.querySelectorAll(".s-product-card-wishlist-btn, .btn--wishlist").forEach((e=>{e.classList.toggle("s-product-card-wishlist-added",a),e.classList.toggle("wishlist-added",a)}))}))}};export{t as H}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as i,h as e,H as s,a as r}from"./p-C0qiFNJn.js";import{H as a}from"./p-DOBDDG4K.js";import{F as o}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const n=class{constructor(e){t(this,e),this.changed=i(this,"changed"),this.initialItemCount=10,this.expandedItemCount=15,this.calculatedInitialHeight=0,this.calculatedExpandedHeight=0,this.isOpen=!0,this.isShowMore=!1,this.showMoreLabel="عرض المزيد",this.showLessLabel="عرض أقل",this.page=salla.config.get("page"),this.searchQuery="",this.filteredCount=0}connectedCallback(){this.withLoadMore="price"!=this.option.key&&Array.isArray(this.option.values)&&this.option.values.length>this.initialItemCount,salla.onReady((()=>{this.page=salla.config.get("page")})),salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel),this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){const t=this.widgetValues.querySelectorAll(".s-filters-label");if(t.length>0){const i=Math.min(this.initialItemCount,t.length);this.calculatedInitialHeight=35*this.initialItemCount,this.calculatedExpandedHeight=t.length>this.initialItemCount?35*this.expandedItemCount:35*i}this.widgetValues.scrollHeight<this.calculatedInitialHeight&&(this.withLoadMore=!1),this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.calculatedInitialHeight}px`),this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(t=250){this.widgetContent.removeAttribute("style"),setTimeout((()=>{this.widgetContent.style.height=this.widgetContent.scrollHeight+"px"}),t)}async reset(){this.option.type===o.RANGE&&this.priceRange.reset(),Array.from(this.host.querySelectorAll("input")).forEach((t=>t.checked=!1))}async showMore(){this.isShowMore=!this.isShowMore,this.widgetContent.style.height="auto",this.isShowMore||(this.widgetValues.scrollTop=0);const t=this.isShowMore?this.calculatedExpandedHeight:this.calculatedInitialHeight,i=this.searchQuery?this.filteredCount:Array.isArray(this.option.values)?this.option.values.length:0;this.widgetValues.style.maxHeight=`${t}px`,this.widgetValues.style.overflowY=this.isShowMore&&i>this.expandedItemCount?"auto":"hidden",setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen,a.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(t){if(![o.VALUES,o.MINIMUM,o.VARIANTS].includes(t.type))return"";const i=t.values.filter((t=>{if(!this.searchQuery)return!0;const i="number"==typeof t?String(t):t?.value||t?.key||"";return String(i).toLowerCase().includes(this.searchQuery.toLowerCase())}));return this.filteredCount=i.length,0===i.length?e("div",{class:"s-filters-widget-empty-state"},salla.lang.get("common.elements.no_options")||"لا توجد نتائج"):i.map((i=>{let s="number"==typeof i?i:i.key||i.value;return e("label",{class:"s-filters-label",htmlFor:`${t.key}-option-${s}`,key:`${t.key}-option-${s}`},e("input",{id:`${t.key}-option-${s}`,name:t.key,type:t.type===o.VALUES?"checkbox":"radio",checked:this.isSelectedOption(t,s),class:t.type===o.VALUES?"s-filters-checkbox":"s-filters-radio",onChange:i=>this.changed.emit({event:i,option:t,value:s})}),this.getOptionLabel(t,i))}))}isSelectedOption(t,i){if(t.type===o.MINIMUM)return this.filtersData[t.key]==i;if(t.type===o.VARIANTS)return this.filtersData[t.type]&&this.filtersData[t.type][t.key]==i;if(t.type===o.RANGE)return this.filtersData[t.key]&&this.filtersData[t.key].min==i.min&&this.filtersData[t.key].max==i.max;if(t.type===o.VALUES){const e=this.filtersData[t.key];return Array.isArray(e)?e.some((t=>Number(t)===Number(i))):null!=e&&Number(e)===Number(i)}return!1}getOptionLabel(t,i){if("rating"==t.key)return e("salla-rating-stars",{size:"small",value:i});let s=i.value||"null";return null!=i.count&&(s+=` (${salla.helpers.number(i.count)})`),e("span",{class:"s-filters-option-name"},s)}render(){return e(s,{key:"831f7655b903634e0eb3abc7338ea3296883cbbf",class:"s-filters-widget-container"},e("h3",{key:"72a31fb2c9adab3df37550e930d5be981aafd8f6",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},e("span",{key:"7512914e8a7348d146384d67f117c8b06507def0"},this.option.label),e("span",{key:"50d62723255618a2a51512722388ff686c92bdab",class:"s-filters-widget-plusminus "+(this.isOpen?"s-filters-widget-plusminus-active":"")})),e("div",{key:"76792390d33c2051082541e18e9b354b2b63c644",class:"s-filters-widget-content",ref:t=>this.widgetContent=t},Array.isArray(this.option.values)&&this.option.values.length>5&&e("div",{key:"b39462721ff4572b3572c0ed6171c07fa53b57a9",class:"s-filters-widget-search-wrapper",style:{padding:"8px 0",marginBottom:"8px"}},e("input",{key:"759b2ab6b80d0fd0bb03fcd3746414d9e4b80c7d",type:"text",class:"s-filters-widget-search-input",placeholder:salla.lang.get("blocks.header.search_placeholder")||"بحث...",value:this.searchQuery,onInput:t=>this.searchQuery=t.target.value})),e("div",{key:"db918c4a43bebc35c23810dc97736584504d0e47",class:"s-filters-widget-values",ref:t=>this.widgetValues=t},e("slot",{key:"92dc440b79ed0929a39db7a4a96a1981f3b49974"}),this.option.type!==o.RANGE?this.renderFilterOption(this.option):e("salla-price-range",{onChanged:t=>{this.changed.emit(t.detail)},ref:t=>this.priceRange=t,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&(!this.searchQuery||this.filteredCount>this.initialItemCount)&&e("a",{key:"885668e717441581cd1b92494ebc3927cd70daf1",class:"s-filters-widget-more",onClick:()=>this.showMore()},this.isShowMore?this.showLessLabel:this.showMoreLabel)))}get host(){return r(this)}};n.style="/*!twlt*/:host{display:block}.collapse{visibility:collapse}.fixed{position:fixed}.hidden{display:none}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.duration-300{transition-duration:300ms}.s-filters-widget-container{display:block;overflow:hidden;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;padding-top:1.25rem;padding-bottom:0.5rem}@media (min-width: 768px){.s-filters-widget-container{margin-bottom:1.25rem;padding-bottom:1.25rem;padding-top:1.25rem}}.s-filters-widget-content{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-opened{visibility:visible;opacity:1}.s-filters-widget-closed{visibility:hidden;height:0px !important;padding:0px;opacity:0}.s-filters-widget-title{display:flex;cursor:pointer;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:700}.s-filters-widget-arrow{font-size:1.25rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-arrow svg{height:1.25rem;width:1.25rem}.s-filters-widget-active-arrow{--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-filters-widget-values{overflow:hidden;padding-top:1rem;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-filters-widget-more{margin-top:0.5rem;display:block;cursor:pointer;font-size:0.875rem;line-height:1.25rem;color:var(--color-primary)}.s-filters-widget-plusminus{position:relative;height:0.75rem;width:0.75rem;--tw-rotate:90deg;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-filters-widget-plusminus::before{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:'';content:var(--tw-content)}.s-filters-widget-plusminus::after{position:absolute;left:0px;top:50%;display:block;height:0.125rem;width:100%;--tw-bg-opacity:1;background-color:rgb(153 153 153 / var(--tw-bg-opacity, 1));transition-property:0.35s;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;--tw-content:'';content:var(--tw-content)}.s-filters-widget-plusminus-active:before{transform:translatey(-50%) rotate(-90deg);opacity:0}.s-filters-widget-plusminus-active:after{transform:translatey(-50%) rotate(0);background-color:var(--color-primary)}.s-filters-widget-plusminus:before{transform:translatey(-50%)}.s-filters-widget-plusminus:after{transform:translatey(-50%) rotate(90deg)}.s-filters-widget-search-input{width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:0.5rem}.s-filters-widget-search-input:focus{border-color:var(--color-primary);outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-color:var(--color-primary)}.s-filters-widget-empty-state{padding:0.5rem;text-align:center;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}";export{n as salla_filters_widget}
|