@salla.sa/twilight-components 2.14.557 → 2.14.559
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/{esm/cart-DY4LZmNP.js → cjs/cart-DSvlJXCH.js} +4 -2
- package/dist/cjs/{filepond-plugin-file-poster-CY6apY0i.js → filepond-plugin-file-poster-DTiAXF5c.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D4ROC-Be.js → filepond-plugin-file-validate-size-BuMc19fV.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-6lBH-fIm.js → filepond-plugin-file-validate-type-5CKRAI6_.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-zEOX3Sjw.js → filepond-plugin-image-edit-CXXhiTdn.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-y0OgGNND.js → filepond-plugin-image-exif-orientation-DvMNhQGm.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C-amHd3H.js → filepond-plugin-image-preview-nHwj0lr7.js} +1 -1
- package/dist/cjs/{filepond-B0WltAUU.js → filepond-vI0B-67n.js} +1 -1
- package/dist/cjs/{index-CyKUnNvM.js → index-CwneDx5o.js} +10 -14
- package/dist/cjs/{intlTelInput-CTwMzcpE.js → intlTelInput-CzMsUlkW.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 +9 -4
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- 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_3.cjs.entry.js +29 -8
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +3 -3
- 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 +1 -1
- 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 +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 +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +35 -17
- 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 +1 -1
- 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-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -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 +1 -1
- 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-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 +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +4 -4
- 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-card.cjs.entry.js +48 -13
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- 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-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +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 +279 -33
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-B_r1mvJW.js → vanilla-picker-BSGZg-Y0.js} +1 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +3 -3
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +23 -2
- package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.css +3 -0
- package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +38 -16
- package/dist/collection/components/salla-modal/salla-modal.css +34 -16
- package/dist/collection/components/salla-modal/salla-modal.js +27 -2
- package/dist/collection/components/salla-payments/salla-payments.js +3 -3
- package/dist/collection/components/salla-product-card/salla-product-card.css +22 -2
- package/dist/collection/components/salla-product-card/salla-product-card.js +106 -11
- package/dist/collection/components/salla-search/interfaces.js +1 -0
- package/dist/collection/components/salla-search/salla-search.css +324 -14
- package/dist/collection/components/salla-search/salla-search.js +179 -32
- package/dist/collection/components/salla-search/utils.js +111 -0
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery.js +24 -3
- package/dist/components/salla-fulfillment-methods.js +34 -16
- package/dist/components/salla-modal2.js +9 -3
- package/dist/components/salla-payments.js +3 -3
- package/dist/components/salla-product-card2.js +50 -12
- package/dist/components/salla-search.js +392 -39
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/{cjs/cart-s-x1Fshk.js → esm/cart-gFG8By9O.js} +2 -4
- package/dist/esm/{filepond-B9wUqRiS.js → filepond-BkGwWgIk.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Cms0jrkz.js → filepond-plugin-file-poster-TmS7u3EZ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B2gy-nn6.js → filepond-plugin-file-validate-size-DzPOS-Ef.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D_AqfbaS.js → filepond-plugin-file-validate-type-tOom5t-_.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-ChS3tv_T.js → filepond-plugin-image-edit-F_8PCaA1.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-iLQFxzEc.js → filepond-plugin-image-exif-orientation-myByjSqP.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Dm1gYrYZ.js → filepond-plugin-image-preview-qqR31pR_.js} +1 -1
- package/dist/esm/{index-BLzx0e6P.js → index-D6VagDRi.js} +10 -14
- package/dist/esm/{intlTelInput-BTOzA2B4.js → intlTelInput-B1ulDRaQ.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 +9 -4
- package/dist/esm/salla-add-product-button_5.entry.js +3 -3
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +3 -3
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- 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_3.entry.js +29 -8
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +3 -3
- 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 +1 -1
- 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 +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 +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +35 -17
- 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 +1 -1
- 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-slider.entry.js → salla-map_3.entry.js} +828 -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 +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 +1 -1
- 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-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 +1 -1
- package/dist/esm/salla-payments.entry.js +4 -4
- 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-card.entry.js +48 -13
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +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 +279 -33
- package/dist/esm/salla-skeleton.entry.js +2 -2
- 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 +3 -3
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CbIzx8P3.js → vanilla-picker-DvtnWkFb.js} +1 -1
- package/dist/twilight/{p-7767f3a7.entry.js → p-00dfdb20.entry.js} +1 -1
- package/dist/twilight/{p-1420e962.entry.js → p-019183b8.entry.js} +1 -1
- package/dist/twilight/{p-8e2f52b2.entry.js → p-02153797.entry.js} +1 -1
- package/dist/twilight/{p-67caf54b.entry.js → p-02a00a9d.entry.js} +1 -1
- package/dist/twilight/{p-eb9fca37.entry.js → p-04e90ca8.entry.js} +1 -1
- package/dist/twilight/{p-cb7bc39f.entry.js → p-06ba1041.entry.js} +1 -1
- package/dist/twilight/{p-2bd06384.entry.js → p-0d8c219a.entry.js} +1 -1
- package/dist/twilight/{p-ee463cf9.entry.js → p-0f1abf9a.entry.js} +1 -1
- package/dist/twilight/{p-809a0076.entry.js → p-13adff5c.entry.js} +1 -1
- package/dist/twilight/{p-d84a11b8.entry.js → p-155ec7a7.entry.js} +1 -1
- package/dist/twilight/{p-06c1c936.entry.js → p-16706fe0.entry.js} +1 -1
- package/dist/twilight/{p-96ded4cf.entry.js → p-17a708fc.entry.js} +1 -1
- package/dist/twilight/{p-6866b3d6.entry.js → p-18e32c1b.entry.js} +1 -1
- package/dist/twilight/{p-7ffa452c.entry.js → p-19fe876a.entry.js} +1 -1
- package/dist/twilight/{p-932e3bff.entry.js → p-267f1daf.entry.js} +1 -1
- package/dist/twilight/{p-2a5b180a.entry.js → p-3532893e.entry.js} +1 -1
- package/dist/twilight/{p-0416a2a8.entry.js → p-3cad36ef.entry.js} +1 -1
- package/dist/twilight/{p-18d0c69f.entry.js → p-3feabe9a.entry.js} +1 -1
- package/dist/twilight/{p-738ec366.entry.js → p-43c67b9f.entry.js} +1 -1
- package/dist/twilight/{p-c428c44b.entry.js → p-44d7890d.entry.js} +1 -1
- package/dist/twilight/{p-5f6c10d6.entry.js → p-451c2f06.entry.js} +1 -1
- package/dist/twilight/{p-1bfb9675.entry.js → p-466b2437.entry.js} +1 -1
- package/dist/twilight/{p-ed3fc3bb.entry.js → p-4dbed954.entry.js} +1 -1
- package/dist/twilight/{p-a0c97ac9.entry.js → p-4f29e469.entry.js} +1 -1
- package/dist/twilight/{p-f276a319.entry.js → p-51429c21.entry.js} +1 -1
- package/dist/twilight/{p-de3b3e41.entry.js → p-52212098.entry.js} +1 -1
- package/dist/twilight/{p-05490b44.entry.js → p-522a6125.entry.js} +1 -1
- package/dist/twilight/p-5381aac3.entry.js +4 -0
- package/dist/twilight/{p-a51931ba.entry.js → p-54034038.entry.js} +1 -1
- package/dist/twilight/{p-595bfef8.entry.js → p-56425cd0.entry.js} +1 -1
- package/dist/twilight/{p-9ef91e6b.entry.js → p-56cc9936.entry.js} +1 -1
- package/dist/twilight/{p-7f077279.entry.js → p-57a0bb62.entry.js} +1 -1
- package/dist/twilight/{p-f87ba34e.entry.js → p-5b22403c.entry.js} +1 -1
- package/dist/twilight/{p-a7801576.entry.js → p-5d247f18.entry.js} +1 -1
- package/dist/twilight/{p-6ea62f2b.entry.js → p-5dc636e9.entry.js} +1 -1
- package/dist/twilight/{p-210095ee.entry.js → p-61035e79.entry.js} +1 -1
- package/dist/twilight/{p-c4f963ea.entry.js → p-61ad5ff4.entry.js} +1 -1
- package/dist/twilight/{p-0c80fbcf.entry.js → p-685b00b1.entry.js} +1 -1
- package/dist/twilight/{p-6d8b0678.entry.js → p-7275e7da.entry.js} +1 -1
- package/dist/twilight/{p-c0fc7756.entry.js → p-731ac823.entry.js} +1 -1
- package/dist/twilight/{p-8d8c84d8.entry.js → p-7348f7e3.entry.js} +1 -1
- package/dist/twilight/{p-98e83214.entry.js → p-738d4d73.entry.js} +1 -1
- package/dist/twilight/{p-8b81811b.entry.js → p-75778e67.entry.js} +1 -1
- package/dist/twilight/{p-ada5f9db.entry.js → p-77305493.entry.js} +1 -1
- package/dist/twilight/{p-5bb8c263.entry.js → p-797317f9.entry.js} +1 -1
- package/dist/twilight/{p-407a73f4.entry.js → p-7cfcac49.entry.js} +1 -1
- package/dist/twilight/{p-3b4b1f29.entry.js → p-7e8965c3.entry.js} +1 -1
- package/dist/twilight/{p-fad4aa22.entry.js → p-879aeb99.entry.js} +1 -1
- package/dist/twilight/{p-9ddcdf20.entry.js → p-87baa963.entry.js} +1 -1
- package/dist/twilight/{p-be424137.entry.js → p-890845d7.entry.js} +1 -1
- package/dist/twilight/{p-c9d10c9f.entry.js → p-891abd9a.entry.js} +1 -1
- package/dist/twilight/{p-4cabeff6.entry.js → p-8fd6c03b.entry.js} +1 -1
- package/dist/twilight/{p-894fdcdd.entry.js → p-9060cf90.entry.js} +1 -1
- package/dist/twilight/{p-99a757ac.entry.js → p-90b20e78.entry.js} +1 -1
- package/dist/twilight/{p-46ba098a.entry.js → p-91daba79.entry.js} +1 -1
- package/dist/twilight/{p-a4175383.entry.js → p-96a761f3.entry.js} +1 -1
- package/dist/twilight/{p-a4b7ee47.entry.js → p-978695b4.entry.js} +1 -1
- package/dist/twilight/{p-96a13e17.entry.js → p-9bd0780a.entry.js} +1 -1
- package/dist/twilight/{p-CBW4kczX.js → p-B8n9WvuU.js} +1 -1
- package/dist/twilight/{p-BTjFfROl.js → p-BBCnGXmN.js} +1 -1
- package/dist/twilight/{p-BBCmWsAH.js → p-BE6LvdyS.js} +1 -1
- package/dist/twilight/{p-Bi7BjntU.js → p-CFzua46A.js} +1 -1
- package/dist/twilight/{p-oVUukCva.js → p-CsLeYzSv.js} +1 -1
- package/dist/twilight/{p-BLzx0e6P.js → p-D6VagDRi.js} +1 -1
- package/dist/twilight/{p-BqaOIJsE.js → p-DJ8VhVEV.js} +1 -1
- package/dist/twilight/{p-C_G6bYCk.js → p-DoD9b-8A.js} +1 -1
- package/dist/twilight/{p-BQGQ9tVS.js → p-Xs77W4g6.js} +1 -1
- package/dist/twilight/{p-47597499.entry.js → p-a07f577f.entry.js} +1 -1
- package/dist/twilight/{p-c69e0669.entry.js → p-a0ac1fbf.entry.js} +1 -1
- package/dist/twilight/{p-07b67ef6.entry.js → p-a1b0bcae.entry.js} +1 -1
- package/dist/twilight/{p-eb10186c.entry.js → p-ab11570d.entry.js} +1 -1
- package/dist/twilight/{p-2b7ca018.entry.js → p-aede1dd3.entry.js} +1 -1
- package/dist/twilight/{p-3a97face.entry.js → p-af61bed0.entry.js} +1 -1
- package/dist/twilight/{p-365745de.entry.js → p-b46fa954.entry.js} +1 -1
- package/dist/twilight/p-b5184b83.entry.js +4 -0
- package/dist/twilight/{p-86cd2898.entry.js → p-b55d6ca9.entry.js} +1 -1
- package/dist/twilight/{p-b36ca739.entry.js → p-b731bd2b.entry.js} +1 -1
- package/dist/twilight/{p-34f2d378.entry.js → p-b8739111.entry.js} +1 -1
- package/dist/twilight/{p-fa7966bd.entry.js → p-b8f46367.entry.js} +1 -1
- package/dist/twilight/{p-7d86bc77.entry.js → p-bb3df4d4.entry.js} +1 -1
- package/dist/twilight/{p-5cc80969.entry.js → p-bcc6a2c7.entry.js} +1 -1
- package/dist/twilight/{p-d1ba8e6e.entry.js → p-bf0e5c4b.entry.js} +1 -1
- package/dist/twilight/{p-bba884dc.entry.js → p-c0c80157.entry.js} +1 -1
- package/dist/twilight/{p-3cc1a9b8.entry.js → p-cbe27157.entry.js} +1 -1
- package/dist/twilight/{p-53285f66.entry.js → p-ce60b709.entry.js} +1 -1
- package/dist/twilight/{p-59ccfd64.entry.js → p-ced0ad45.entry.js} +1 -1
- package/dist/twilight/{p-6af36173.entry.js → p-d09195ba.entry.js} +1 -1
- package/dist/twilight/{p-3ba22519.entry.js → p-d25c8aeb.entry.js} +1 -1
- package/dist/twilight/{p-f602c556.entry.js → p-da8c1307.entry.js} +1 -1
- package/dist/twilight/{p-2c0870cb.entry.js → p-dd6a5747.entry.js} +1 -1
- package/dist/twilight/{p-5cbd36fb.entry.js → p-de5c4eb3.entry.js} +1 -1
- package/dist/twilight/{p-cd86c231.entry.js → p-e01c1fb9.entry.js} +1 -1
- package/dist/twilight/{p-61b6c754.entry.js → p-e1965ea1.entry.js} +1 -1
- package/dist/twilight/{p-7c859f0c.entry.js → p-e64d3e62.entry.js} +1 -1
- package/dist/twilight/{p-bc0bc63f.entry.js → p-e7b32e74.entry.js} +1 -1
- package/dist/twilight/p-e8393076.entry.js +4 -0
- package/dist/twilight/{p-45706908.entry.js → p-ebfb0b99.entry.js} +1 -1
- package/dist/twilight/{p-fa459971.entry.js → p-ef2354f0.entry.js} +1 -1
- package/dist/twilight/{p-81f8537a.entry.js → p-ef33b218.entry.js} +21 -21
- package/dist/twilight/p-f3540850.entry.js +4 -0
- package/dist/twilight/{p-7a19cb93.entry.js → p-f3cbbe3e.entry.js} +1 -1
- package/dist/twilight/{p-DY4LZmNP.js → p-gFG8By9O.js} +1 -1
- package/dist/twilight/{p-iB9dUe00.js → p-uMDizIlo.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +10 -0
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
- package/dist/types/components/salla-fulfillment-methods/salla-fulfillment-methods.d.ts +8 -2
- package/dist/types/components/salla-modal/salla-modal.d.ts +5 -0
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +18 -0
- package/dist/types/components/salla-search/interfaces.d.ts +21 -0
- package/dist/types/components/salla-search/salla-search.d.ts +40 -2
- package/dist/types/components/salla-search/utils.d.ts +19 -0
- package/dist/types/components.d.ts +60 -4
- package/package.json +5 -5
- package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
- package/dist/esm/salla-map_2.entry.js +0 -832
- package/dist/twilight/p-05b66ce1.entry.js +0 -4
- package/dist/twilight/p-33e0d7b8.entry.js +0 -4
- package/dist/twilight/p-56b2f8d7.entry.js +0 -4
- package/dist/twilight/p-8a7bb785.entry.js +0 -4
- package/dist/twilight/p-a8b41edc.entry.js +0 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var checkCircle2 = require('./check-circle2-BDvlT4_n.js');
|
|
9
9
|
var image = require('./image-BoZ6Hums.js');
|
|
@@ -3,21 +3,147 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
var search = require('./search-c7Aa7lM9.js');
|
|
8
|
+
var cancel = require('./cancel-De6vslRA.js');
|
|
9
|
+
var keyboard_arrow_right = require('./keyboard_arrow_right-BayM_Il2.js');
|
|
8
10
|
var Helper = require('./Helper-N5wrs9vm.js');
|
|
9
11
|
require('./anime.es-BqW8JHZi.js');
|
|
10
12
|
|
|
11
|
-
const
|
|
13
|
+
const NEW_SEARCH_FEATURE_FLAG = 'new-search-ui-enabled';
|
|
14
|
+
const SEARCH_HISTORY_KEY = 'salla::search-history';
|
|
15
|
+
const SEARCH_HISTORY_LIMIT = 10;
|
|
16
|
+
// Multi-market stores scope search history per market via the `scope` query param.
|
|
17
|
+
function getSearchHistoryKey() {
|
|
18
|
+
if (typeof window === 'undefined') {
|
|
19
|
+
return SEARCH_HISTORY_KEY;
|
|
20
|
+
}
|
|
21
|
+
const scope = new URLSearchParams(window.location.search).get('scope');
|
|
22
|
+
return scope ? `${SEARCH_HISTORY_KEY}-${scope}` : SEARCH_HISTORY_KEY;
|
|
23
|
+
}
|
|
24
|
+
const DEFAULT_LABELS = {
|
|
25
|
+
searchPlaceholder: '',
|
|
26
|
+
noOptions: '',
|
|
27
|
+
outOfStock: '',
|
|
28
|
+
close: '',
|
|
29
|
+
back: '',
|
|
30
|
+
remove: '',
|
|
31
|
+
searchHistory: '',
|
|
32
|
+
trendingCategories: '',
|
|
33
|
+
mostSearched: '',
|
|
34
|
+
searchSuggestions: '',
|
|
35
|
+
categories: '',
|
|
36
|
+
searchResults: '',
|
|
37
|
+
searchViewAllTemplate: '',
|
|
38
|
+
};
|
|
39
|
+
// Labels not yet in the central translation files - seeded via addBulk only when missing.
|
|
40
|
+
const TRANSLATION_DEFAULTS = {
|
|
41
|
+
'common.elements.search_history': { ar: 'آخر ما تم البحث عنه', en: 'Recently Searched' },
|
|
42
|
+
'common.elements.trending_categories': {
|
|
43
|
+
ar: 'التصنيفات الأكثر بحثاً',
|
|
44
|
+
en: 'Trending categories',
|
|
45
|
+
},
|
|
46
|
+
'common.elements.most_searched': { ar: 'الأكثر بحثاً', en: 'Most searched' },
|
|
47
|
+
'common.elements.search_suggestions': { ar: 'اقتراحات البحث', en: 'Search suggestions' },
|
|
48
|
+
'common.elements.categories': { ar: 'التصنيفات', en: 'Categories' },
|
|
49
|
+
'common.elements.search_results': { ar: 'نتائج البحث', en: 'Search results' },
|
|
50
|
+
'common.elements.search_view_all': {
|
|
51
|
+
ar: 'عرض كل النتائج لـ ":word"',
|
|
52
|
+
en: 'View all results for ":word"',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
function isNewSearchFeatureEnabled() {
|
|
56
|
+
const flag = salla.storage.get(NEW_SEARCH_FEATURE_FLAG, false);
|
|
57
|
+
return flag === true || flag === 'true';
|
|
58
|
+
}
|
|
59
|
+
function getSearchResultsUrl(term) {
|
|
60
|
+
return salla.url.get('search?q=' + encodeURI(term));
|
|
61
|
+
}
|
|
62
|
+
function loadSearchHistory() {
|
|
63
|
+
const key = getSearchHistoryKey();
|
|
64
|
+
const stored = salla.storage.get(key, []);
|
|
65
|
+
return Array.isArray(stored) ? stored.filter(term => typeof term === 'string') : [];
|
|
66
|
+
}
|
|
67
|
+
function saveSearchHistory(history) {
|
|
68
|
+
const key = getSearchHistoryKey();
|
|
69
|
+
salla.storage.set(key, history);
|
|
70
|
+
}
|
|
71
|
+
function addToSearchHistory(history, term) {
|
|
72
|
+
const trimmed = term.trim();
|
|
73
|
+
if (!trimmed) {
|
|
74
|
+
return history;
|
|
75
|
+
}
|
|
76
|
+
const withoutDuplicate = history.filter(existing => existing.toLowerCase() !== trimmed.toLowerCase());
|
|
77
|
+
return [trimmed, ...withoutDuplicate].slice(0, SEARCH_HISTORY_LIMIT);
|
|
78
|
+
}
|
|
79
|
+
function registerTranslationDefaults() {
|
|
80
|
+
if (!salla?.lang?.addBulk) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const missing = Object.entries(TRANSLATION_DEFAULTS).reduce((acc, [key, value]) => {
|
|
84
|
+
if (salla.lang.get(key) === key) {
|
|
85
|
+
acc[key] = value;
|
|
86
|
+
}
|
|
87
|
+
return acc;
|
|
88
|
+
}, {});
|
|
89
|
+
if (Object.keys(missing).length) {
|
|
90
|
+
salla.lang.addBulk(missing);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function loadLabels() {
|
|
94
|
+
return {
|
|
95
|
+
searchPlaceholder: salla.lang.get('blocks.header.search_placeholder'),
|
|
96
|
+
noOptions: salla.lang.get('common.elements.no_options'),
|
|
97
|
+
outOfStock: salla.lang.get('pages.products.out_of_stock'),
|
|
98
|
+
close: salla.lang.get('common.elements.close'),
|
|
99
|
+
back: salla.lang.get('common.elements.back'),
|
|
100
|
+
remove: salla.lang.get('common.elements.remove'),
|
|
101
|
+
searchHistory: salla.lang.get('common.elements.search_history'),
|
|
102
|
+
trendingCategories: salla.lang.get('common.elements.trending_categories'),
|
|
103
|
+
mostSearched: salla.lang.get('common.elements.most_searched'),
|
|
104
|
+
searchSuggestions: salla.lang.get('common.elements.search_suggestions'),
|
|
105
|
+
categories: salla.lang.get('common.elements.categories'),
|
|
106
|
+
searchResults: salla.lang.get('common.elements.search_results'),
|
|
107
|
+
searchViewAllTemplate: salla.lang.get('common.elements.search_view_all'),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function getDefaultProductSlot() {
|
|
111
|
+
return ('<div class="s-search-product-image-container">' +
|
|
112
|
+
' <img class="s-search-product-image" src="{image}" alt="{name}"/>' +
|
|
113
|
+
'</div>' +
|
|
114
|
+
'<div class="s-search-product-details">' +
|
|
115
|
+
' <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div>' +
|
|
116
|
+
'</div>');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const sallaSearchCss = "/*!twlt*/.s-search-placeholder-wrapper{position:relative;display:inline-block}.s-search-input-wrapper{position:relative}.s-search-placeholder-trigger{cursor:pointer;appearance:none;text-align:start}.visible{visibility:visible}.block{display:block}.inline{display:inline}.hidden{display:none}.border{border-width:1px}.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-search-container{position:relative;z-index:99;max-height:14rem;border-radius:0.375rem;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:150ms}.s-search-oval{border-radius:20px}.s-search-inline{min-width:220px}.s-search-container-open{max-height:24rem;border-radius:0px !important}.s-search-container-open .s-search-input{border-top-left-radius:0.375rem !important;border-top-right-radius:0.375rem !important;border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-no-results .s-search-input{border-bottom-right-radius:0px;border-bottom-left-radius:0px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-search-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-top:0px;padding-bottom:0.125rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-input:focus{--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-ring-color:transparent}.s-search-input:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-left:2.5rem}.s-search-input:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-right:2.5rem}.s-search-modal-new .s-search-input{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-icon-wrap{position:absolute;top:50%;--tw-translate-y:-50%;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));line-height:1;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-icon-wrap:where([dir=\"ltr\"],[dir=\"ltr\"] *){left:1rem}.s-search-icon-wrap:where([dir=\"rtl\"],[dir=\"rtl\"] *){right:1rem}.s-search-icon svg{height:1rem;width:1rem;fill:#9ca3af}.s-search-spinner-loader{display:block;height:1rem;width:1rem}@keyframes spin{to{transform:rotate(360deg)}}.s-search-spinner-loader{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));border-right-color:var(--color-primary)}.s-search-results{position:absolute;margin:auto;max-height:24rem;width:100%;max-width:100%;overflow-y:auto;border-bottom-right-radius:0.375rem;border-bottom-left-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow:0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.s-search-no-results{border-bottom-right-radius:0px !important;border-bottom-left-radius:0px !important}.s-search-no-results-placeholder{grid-column:1 / -1;padding:1rem;text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product{display:flex;height:100%;justify-content:space-around;overflow:hidden;border-bottom-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));background-color:transparent;padding-left:1rem;padding-right:1rem;padding-top:0.75rem;padding-bottom:0.75rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product:last-child{border-bottom-width:0px}.s-search-product:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 480px){.s-search-product{padding-left:1.25rem;padding-right:1.25rem}}.s-search-product-image-container{position:relative;height:3.5rem;width:5rem;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-image{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-search-product-image::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-search-product-details{flex:1 1 0%;padding-top:0.25rem}.s-search-product-details:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-left:1rem}@media (min-width: 480px){.s-search-product-details:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-left:1.25rem}}.s-search-product-details:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-right:1rem}@media (min-width: 480px){.s-search-product-details:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-right:1.25rem}}.s-search-product-title{margin-bottom:0.375rem;display:flex;flex-direction:column;align-items:baseline;justify-content:flex-start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-price{display:flex;width:100%;align-items:center;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary)}.s-search-product-regular-price{padding-left:0.75rem;padding-right:0.75rem;font-weight:500;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-not-available{--tw-grayscale:grayscale(100%);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-search-action{position:absolute;height:100%}.s-search-action:where([dir=\"ltr\"],[dir=\"ltr\"] *){right:0px}.s-search-action:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:0px;border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-action-oval:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-top-right-radius:9999px;border-bottom-right-radius:9999px}.s-search-action-oval:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-top-left-radius:9999px;border-bottom-left-radius:9999px}.s-search-input-row{display:flex;align-items:center;gap:0.25rem}.s-search-back-btn{display:flex;flex-shrink:0;align-items:center;justify-content:center;padding:0.25rem;line-height:1;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-back-btn:hover{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.s-search-back-btn{display:none}}.s-search-back-btn svg{height:1.5rem;width:1.5rem;fill:#6b7280}.s-search-input-wrapper{position:relative;display:flex;flex-grow:1;align-items:center}.s-search-input-clearable:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-right:2.25rem}.s-search-input-clearable:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:2.25rem}.s-search-input-clearable::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.s-search-clear-icon{position:absolute;top:50%;--tw-translate-y:-50%;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));padding:0.25rem;line-height:1;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-clear-icon:hover{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-clear-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){right:0.75rem}.s-search-clear-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:0.75rem}.s-search-clear-icon svg{height:1rem;width:1rem;fill:#9ca3af}.s-search-panel{display:flex;flex-direction:column;gap:0.75rem;padding:0px}@media (min-width: 640px){.s-search-panel{padding:1rem}}.s-search-results-body{display:flex;max-height:24rem;gap:0.75rem;overflow-y:auto}.s-search-results-grid-wrap{min-width:0px;flex:1 1 0%}.s-search-results-grid{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));align-content:flex-start;column-gap:0.75rem;row-gap:0.25rem}@media (min-width: 640px){.s-search-results-grid{grid-template-columns:repeat(2, minmax(0, 1fr))}}.s-search-grid-item{cursor:pointer;border-radius:0.375rem;padding:0.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-grid-item:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.s-search-grid-item .s-product-card-out-badge{--tw-bg-opacity:1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1));--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-search-view-all{display:flex;flex-shrink:0;align-items:center;justify-content:center;gap:0.25rem;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1));padding-top:0.75rem;text-align:center;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-view-all:hover{text-decoration-line:underline}.s-search-view-all-icon{line-height:1}.s-search-view-all-icon svg{height:1rem;width:1rem;fill:#6b7280}.s-search-sidebar{width:7rem;flex-shrink:0}.s-search-sidebar>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.s-search-sidebar{--tw-border-opacity:1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}@media (min-width: 480px){.s-search-sidebar{width:8rem}}.s-search-sidebar:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-right-width:1px;padding-right:0.75rem}.s-search-sidebar:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-left-width:1px;padding-left:0.75rem}.s-search-idle-panel{max-height:24rem;min-height:6rem}.s-search-idle-panel>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.s-search-idle-panel{overflow-y:auto}.s-search-idle-section-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-history-list{display:flex;flex-wrap:wrap;gap:0.5rem}.s-search-history-chip{display:inline-flex;align-items:center;gap:0.375rem;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding-top:0.375rem;padding-bottom:0.375rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-history-chip:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-left:0.75rem;padding-right:0.5rem}.s-search-history-chip:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-right:0.75rem;padding-left:0.5rem}.s-search-history-chip-term{line-height:1}.s-search-history-chip-remove svg{height:0.625rem;width:0.625rem;fill:#9ca3af}.s-search-idle-categories-list{display:flex;flex-wrap:wrap;gap:0.5rem}.s-search-idle-category-chip{display:inline-flex;align-items:center;gap:0.25rem;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding-left:0.75rem;padding-right:0.75rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-idle-category-chip:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-search-idle-category-count{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-most-searched-list{display:flex;flex-direction:column}.s-search-most-searched-item{display:flex;width:100%;align-items:center;gap:0.5rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-most-searched-item:hover{color:var(--color-primary)}.s-search-most-searched-icon svg{height:0.875rem;width:0.875rem;fill:#9ca3af}@media (min-width: 640px){.s-search-modal .s-modal-wrapper{align-items:flex-start;padding:0}.s-search-modal .s-modal-spacer{display:inline}}@media (max-width: 639px){.s-search-modal .s-modal-body{height:100dvh;max-height:100dvh !important}}@media (min-width: 640px){.s-search-modal .s-modal-body{padding:0;width:700px;max-width:90%;margin-top:3.2rem;border-radius:0.5rem;background:transparent;overflow:visible;position:relative !important}}.s-search-modal .s-modal-close{top:50%;transform:translateY(-50%)}@media (min-width: 640px){.s-search-modal.s-search-modal-new .s-modal-body{background:white;overflow:hidden;width:1100px;max-width:95%}}";
|
|
12
120
|
|
|
13
121
|
const SallaSearch = class {
|
|
14
122
|
constructor(hostRef) {
|
|
15
123
|
index.registerInstance(this, hostRef);
|
|
124
|
+
this.newSearchEnabled = isNewSearchFeatureEnabled();
|
|
16
125
|
this.inputValue = '';
|
|
126
|
+
this.hasTrackedFocus = false;
|
|
17
127
|
this.translationLoaded = false;
|
|
128
|
+
this.labels = DEFAULT_LABELS;
|
|
18
129
|
this.loading = false;
|
|
19
130
|
this.typing = false;
|
|
20
131
|
this.debounce = setTimeout(() => '', 1000);
|
|
132
|
+
this.search_term = '';
|
|
133
|
+
this.hasInputValue = false;
|
|
134
|
+
this.searchHistory = loadSearchHistory();
|
|
135
|
+
/**
|
|
136
|
+
* Most-searched categories to surface before the customer types a query.
|
|
137
|
+
* Not wired to a live endpoint yet - stays empty (and hidden) until a future
|
|
138
|
+
* story populates it.
|
|
139
|
+
*/
|
|
140
|
+
this.trendingCategories = [];
|
|
141
|
+
/**
|
|
142
|
+
* Most-searched terms, reused both as the pre-search "most searched" list and
|
|
143
|
+
* as the results-view "search suggestions" sidebar. Same not-wired-yet status
|
|
144
|
+
* as trendingCategories.
|
|
145
|
+
*/
|
|
146
|
+
this.mostSearchedTerms = [];
|
|
21
147
|
/**
|
|
22
148
|
* Set the component to display as a placeholder (button) that will open the modal. Defaults to `false`
|
|
23
149
|
*/
|
|
@@ -42,37 +168,72 @@ const SallaSearch = class {
|
|
|
42
168
|
* Show submit action buttons at the end.
|
|
43
169
|
*/
|
|
44
170
|
this.showAction = false;
|
|
171
|
+
this.tracking = {
|
|
172
|
+
searchFocus: () => {
|
|
173
|
+
if (this.hasTrackedFocus) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.hasTrackedFocus = true;
|
|
177
|
+
salla.event.emit('salla-search::input.focused');
|
|
178
|
+
},
|
|
179
|
+
productClick: (product, position) => {
|
|
180
|
+
salla.event.emit('salla-search::product.clicked', [{ product, position }]);
|
|
181
|
+
},
|
|
182
|
+
recommendationClick: (term, source) => {
|
|
183
|
+
salla.event.emit('salla-search::recommendation.clicked', { term, source });
|
|
184
|
+
},
|
|
185
|
+
};
|
|
45
186
|
this.productSlot =
|
|
46
|
-
this.host
|
|
187
|
+
this.host?.querySelector('[slot="product"]')?.innerHTML || getDefaultProductSlot();
|
|
47
188
|
salla.event.on('search::open', () => this.open());
|
|
48
|
-
salla.lang.onLoaded(() => {
|
|
49
|
-
this.translationLoaded = true;
|
|
50
|
-
});
|
|
51
189
|
salla.event.on('modalClosed', () => this.onModalClose());
|
|
52
190
|
}
|
|
53
191
|
async open() {
|
|
54
|
-
if (!this.inline) {
|
|
55
|
-
await this.modal
|
|
192
|
+
if (this.newSearchEnabled || !this.inline) {
|
|
193
|
+
await this.modal?.open().then(() => setTimeout(() => this.searchInput?.focus(), 300));
|
|
56
194
|
}
|
|
57
195
|
}
|
|
58
196
|
onModalClose() {
|
|
59
|
-
this.searchInput
|
|
197
|
+
if (this.searchInput) {
|
|
198
|
+
this.searchInput.value = '';
|
|
199
|
+
}
|
|
60
200
|
this.results = undefined;
|
|
201
|
+
this.hasInputValue = false;
|
|
61
202
|
this.afterSearching();
|
|
62
|
-
this.container
|
|
203
|
+
this.container?.classList.remove('s-search-no-results');
|
|
63
204
|
}
|
|
64
205
|
handleKeyDown(ev) {
|
|
65
206
|
if (ev.key === 'Enter' && this.search_term?.length) {
|
|
66
|
-
window.location.href =
|
|
207
|
+
window.location.href = getSearchResultsUrl(this.search_term);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
clearSearch() {
|
|
211
|
+
if (this.searchInput) {
|
|
212
|
+
this.searchInput.value = '';
|
|
213
|
+
}
|
|
214
|
+
this.hasInputValue = false;
|
|
215
|
+
this.search_term = '';
|
|
216
|
+
this.searchInput?.focus();
|
|
217
|
+
}
|
|
218
|
+
removeFromSearchHistory(term) {
|
|
219
|
+
this.searchHistory = this.searchHistory.filter(existing => existing !== term);
|
|
220
|
+
saveSearchHistory(this.searchHistory);
|
|
221
|
+
this.afterSearching(!this.results);
|
|
222
|
+
}
|
|
223
|
+
applySuggestedTerm(term, source) {
|
|
224
|
+
this.tracking.recommendationClick(term, source);
|
|
225
|
+
if (this.searchInput) {
|
|
226
|
+
this.searchInput.value = term;
|
|
67
227
|
}
|
|
228
|
+
this.hasInputValue = true;
|
|
229
|
+
this.search_term = term;
|
|
230
|
+
this.searchInput?.focus();
|
|
68
231
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
' <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div>' +
|
|
75
|
-
'</div>');
|
|
232
|
+
async componentWillLoad() {
|
|
233
|
+
await salla.lang.onLoaded();
|
|
234
|
+
registerTranslationDefaults();
|
|
235
|
+
this.labels = loadLabels();
|
|
236
|
+
this.translationLoaded = true;
|
|
76
237
|
}
|
|
77
238
|
debounceSearch(event) {
|
|
78
239
|
this.typing = true;
|
|
@@ -84,10 +245,13 @@ const SallaSearch = class {
|
|
|
84
245
|
}
|
|
85
246
|
limitWordsAndSearch(event) {
|
|
86
247
|
let value = event.target.value;
|
|
248
|
+
this.hasInputValue = value.length > 0;
|
|
87
249
|
const words = value.trim().split(/\s+/);
|
|
88
250
|
if (words.length > this.maxWords) {
|
|
89
251
|
const truncatedInput = words.slice(0, this.maxWords).join(' ');
|
|
90
|
-
this.searchInput
|
|
252
|
+
if (this.searchInput) {
|
|
253
|
+
this.searchInput.value = truncatedInput;
|
|
254
|
+
}
|
|
91
255
|
}
|
|
92
256
|
this.debounceSearch(event);
|
|
93
257
|
}
|
|
@@ -111,7 +275,7 @@ const SallaSearch = class {
|
|
|
111
275
|
}
|
|
112
276
|
}
|
|
113
277
|
search(val) {
|
|
114
|
-
this.noResults.style.display = 'none';
|
|
278
|
+
this.noResults && (this.noResults.style.display = 'none');
|
|
115
279
|
//run loading spinner or stop it
|
|
116
280
|
this.loading = true;
|
|
117
281
|
salla.product
|
|
@@ -119,22 +283,29 @@ const SallaSearch = class {
|
|
|
119
283
|
.then(response => {
|
|
120
284
|
this.results = response;
|
|
121
285
|
salla.event.emit('Products Searched', val);
|
|
286
|
+
if (this.newSearchEnabled) {
|
|
287
|
+
this.searchHistory = addToSearchHistory(this.searchHistory, val);
|
|
288
|
+
saveSearchHistory(this.searchHistory);
|
|
289
|
+
}
|
|
122
290
|
})
|
|
123
291
|
.catch(err => (err !== 'Query is same as previous one!' ? (this.results = undefined) : null))
|
|
124
292
|
.finally(() => this.afterSearching(/*isEmpty*/ false));
|
|
125
293
|
}
|
|
126
294
|
afterSearching(isEmpty = true) {
|
|
127
|
-
this.noResults
|
|
128
|
-
|
|
295
|
+
if (this.noResults) {
|
|
296
|
+
this.noResults.style.display = isEmpty || !!this.results?.data?.length ? 'none' : 'block';
|
|
297
|
+
}
|
|
298
|
+
// The new search experience is always a fully-visible modal panel (no collapsed/expanded
|
|
299
|
+
// input trick needed), so this open/no-results cosmetic toggle only applies to the legacy UI.
|
|
300
|
+
if (!this.newSearchEnabled) {
|
|
301
|
+
Helper.Helper.toggleElementClassIf(this.container, 's-search-container-open', 's-search-no-results', () => this.results?.data.length);
|
|
302
|
+
}
|
|
129
303
|
this.loading = false;
|
|
130
304
|
salla.product.api.previousQuery = ''; //avoid having error 'Query is same as previous one!' after reopen modal;
|
|
131
|
-
this.inputValue.length < 3 ? this.container
|
|
305
|
+
this.inputValue.length < 3 ? this.container?.classList.remove('s-search-no-results') : '';
|
|
132
306
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
height: this.height + 'px',
|
|
136
|
-
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
137
|
-
} }), this.showAction ? (index.h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && index.h("span", { innerHTML: search.Search }))) : null), index.h("div", { key: 'f3b40ce4ec24678f6d8421f3da8ac9e1bd631c3a', class: "s-search-results" }, this.results?.data.map(product => (index.h("a", { href: product.url + '?from=search-bar', class: {
|
|
307
|
+
renderLegacyResults() {
|
|
308
|
+
return (index.h("div", { class: "s-search-results" }, this.results?.data.map(product => (index.h("a", { href: product.url + '?from=search-bar', class: {
|
|
138
309
|
's-search-product': true,
|
|
139
310
|
's-search-product-not-available': !product.is_available,
|
|
140
311
|
}, innerHTML: this.productSlot
|
|
@@ -143,12 +314,83 @@ const SallaSearch = class {
|
|
|
143
314
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price
|
|
144
315
|
? salla.money(product.regular_price)
|
|
145
316
|
: '')
|
|
146
|
-
.replace(/\{image\}/g, product.image.url) }))), index.h("p", {
|
|
147
|
-
|
|
148
|
-
|
|
317
|
+
.replace(/\{image\}/g, product.image.url) }))), index.h("p", { ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, this.labels.noOptions)));
|
|
318
|
+
}
|
|
319
|
+
renderCategoriesSection(title) {
|
|
320
|
+
if (!this.trendingCategories.length) {
|
|
321
|
+
return null;
|
|
322
|
+
}
|
|
323
|
+
return (index.h("div", null, index.h("p", { class: "s-search-idle-section-title" }, title), index.h("div", { class: "s-search-idle-categories-list" }, this.trendingCategories.map(category => (index.h("a", { class: "s-search-idle-category-chip", href: category.url, onClick: () => this.tracking.recommendationClick(category.name, 'category') }, category.name, category.count ? (index.h("span", { class: "s-search-idle-category-count" }, category.count)) : null))))));
|
|
324
|
+
}
|
|
325
|
+
renderTermsSection(title, source) {
|
|
326
|
+
if (!this.mostSearchedTerms.length) {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
return (index.h("div", null, index.h("p", { class: "s-search-idle-section-title" }, title), index.h("ul", { class: "s-search-most-searched-list" }, this.mostSearchedTerms.map(term => (index.h("li", null, index.h("button", { type: "button", class: "s-search-most-searched-item", onClick: () => this.applySuggestedTerm(term, source) }, index.h("span", { class: "s-search-most-searched-icon", innerHTML: search.Search }), term)))))));
|
|
330
|
+
}
|
|
331
|
+
renderSearchHistorySection() {
|
|
332
|
+
// Only in the empty/zero state - hidden as soon as there's input text or results.
|
|
333
|
+
if (!this.searchHistory.length || this.hasInputValue) {
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
return (index.h("div", null, index.h("p", { class: "s-search-idle-section-title" }, this.labels.searchHistory), index.h("div", { class: "s-search-history-list" }, this.searchHistory.map(term => (index.h("span", { class: "s-search-history-chip" }, index.h("button", { type: "button", class: "s-search-history-chip-term", onClick: () => this.applySuggestedTerm(term, 'history') }, term), index.h("button", { type: "button", class: "s-search-history-chip-remove", "aria-label": this.labels.remove, onClick: () => this.removeFromSearchHistory(term) }, index.h("span", { innerHTML: cancel.Cancel }))))))));
|
|
337
|
+
}
|
|
338
|
+
renderIdlePanel() {
|
|
339
|
+
// Always renders - even with nothing in history/trending yet - so the panel opens as a
|
|
340
|
+
// visible (if empty) container rather than disappearing until there's something to show.
|
|
341
|
+
return (index.h("div", { class: "s-search-idle-panel" }, this.renderSearchHistorySection(), this.renderCategoriesSection(this.labels.trendingCategories), this.renderTermsSection(this.labels.mostSearched, 'trending')));
|
|
342
|
+
}
|
|
343
|
+
renderResultsBody() {
|
|
344
|
+
// Search history never shows here (only in the empty/zero state), so the sidebar's
|
|
345
|
+
// visibility depends only on categories/terms - not the full idle-panel content check.
|
|
346
|
+
const hasSidebarContent = this.trendingCategories.length > 0 || this.mostSearchedTerms.length > 0;
|
|
347
|
+
return (index.h("div", { class: "s-search-results-body" }, hasSidebarContent ? (index.h("div", { class: "s-search-sidebar" }, this.renderTermsSection(this.labels.searchSuggestions, 'suggestion'), this.renderCategoriesSection(this.labels.categories))) : null, index.h("div", { class: "s-search-results-grid-wrap" }, index.h("p", { class: "s-search-idle-section-title" }, this.labels.searchResults), index.h("div", { class: "s-search-results-grid" }, this.results?.data.map((product, position) => (index.h("div", { class: "s-search-grid-item", onClick: () => this.tracking.productClick(product, position) }, index.h("salla-product-card", { product: { ...product, url: product.url + '?from=search-bar' }, horizontal: true, compact: true, "show-quantity": !product.is_available, "show-out-of-stock-beside-price": true, hideAddBtn: true })))), this.results?.data.length === 0 ? (index.h("p", { class: "s-search-no-results-placeholder" }, this.labels.noOptions)) : null))));
|
|
348
|
+
}
|
|
349
|
+
renderViewAllLink() {
|
|
350
|
+
if (!this.results?.data.length) {
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
353
|
+
return (index.h("a", { class: "s-search-view-all", href: getSearchResultsUrl(this.search_term) }, this.labels.searchViewAllTemplate.replace(':word', this.search_term), index.h("span", { class: "s-search-view-all-icon", innerHTML: salla.config.get('theme.is_rtl', true) ? keyboard_arrow_right.ArrowLeftIcon : keyboard_arrow_right.ArrowRightIcon })));
|
|
354
|
+
}
|
|
355
|
+
renderDropdown() {
|
|
356
|
+
if (!this.newSearchEnabled) {
|
|
357
|
+
return this.renderLegacyResults();
|
|
358
|
+
}
|
|
359
|
+
return this.results ? this.renderResultsBody() : this.renderIdlePanel();
|
|
360
|
+
}
|
|
361
|
+
renderInputWrapper() {
|
|
362
|
+
const inputWrapper = (index.h("div", { class: "s-search-input-wrapper" }, index.h("span", { class: "s-search-icon-wrap" }, index.h("span", { class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : search.Search })), index.h("input", { type: "search", enterkeyhint: "search", autocomplete: "off", class: { 's-search-input': true, 's-search-input-clearable': this.newSearchEnabled }, placeholder: this.labels.searchPlaceholder, onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), onFocus: () => this.newSearchEnabled && this.tracking.searchFocus(), ref: input => (this.searchInput = input), style: {
|
|
149
363
|
height: this.height + 'px',
|
|
150
364
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
151
|
-
} },
|
|
365
|
+
} }), this.newSearchEnabled && this.hasInputValue ? (index.h("button", { type: "button", class: "s-search-clear-icon", "aria-label": this.labels.close, onClick: () => this.clearSearch() }, index.h("span", { innerHTML: cancel.Cancel }))) : null, this.showAction ? (index.h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && index.h("span", { innerHTML: search.Search }))) : null));
|
|
366
|
+
if (!this.newSearchEnabled) {
|
|
367
|
+
return inputWrapper;
|
|
368
|
+
}
|
|
369
|
+
return (index.h("div", { class: "s-search-input-row" }, index.h("button", { type: "button", class: "s-search-back-btn", "aria-label": this.labels.back, onClick: () => this.modal?.close() }, index.h("span", { innerHTML: salla.config.get('theme.is_rtl', true)
|
|
370
|
+
? keyboard_arrow_right.ArrowRightIcon
|
|
371
|
+
: keyboard_arrow_right.ArrowLeftIcon })), inputWrapper));
|
|
372
|
+
}
|
|
373
|
+
renderPlaceholderTrigger() {
|
|
374
|
+
return (index.h("div", { class: "s-search-input-wrapper" }, index.h("span", { class: "s-search-icon-wrap" }, index.h("span", { class: "s-search-icon", innerHTML: search.Search })), index.h("button", { type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
|
|
375
|
+
height: this.height + 'px',
|
|
376
|
+
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
377
|
+
} }, this.labels.searchPlaceholder)));
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The new search UI is always a modal opened from a placeholder trigger (never inline,
|
|
381
|
+
* never a bare/self-triggering modal), with its own padded panel layout - the input and
|
|
382
|
+
* dropdown content share one bordered card instead of the legacy floating-dropdown look.
|
|
383
|
+
*/
|
|
384
|
+
renderNewSearchExperience() {
|
|
385
|
+
return (index.h("div", { class: "s-search-placeholder-wrapper s-search-inline" }, this.renderPlaceholderTrigger(), index.h("salla-modal", { position: "top", class: "s-search-modal s-search-modal-new", "hide-close-button": true, ref: modal => (this.modal = modal) }, index.h("div", { class: "s-search-panel", ref: container => (this.container = container) }, this.renderInputWrapper(), this.renderDropdown(), this.renderViewAllLink()))));
|
|
386
|
+
}
|
|
387
|
+
render() {
|
|
388
|
+
if (this.newSearchEnabled) {
|
|
389
|
+
return this.renderNewSearchExperience();
|
|
390
|
+
}
|
|
391
|
+
const searchContent = (index.h("div", { class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, this.renderInputWrapper(), this.renderDropdown()));
|
|
392
|
+
const modalContent = (index.h("salla-modal", { position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
|
|
393
|
+
const placeholderContent = (index.h("div", { class: "s-search-placeholder-wrapper s-search-inline" }, this.renderPlaceholderTrigger(), modalContent));
|
|
152
394
|
return this.placeholder ? (placeholderContent) : this.inline ? (index.h("div", { class: "s-search-modal" }, searchContent)) : (modalContent);
|
|
153
395
|
}
|
|
154
396
|
/**
|
|
@@ -156,7 +398,11 @@ const SallaSearch = class {
|
|
|
156
398
|
*/
|
|
157
399
|
componentDidLoad() {
|
|
158
400
|
this.afterSearching();
|
|
159
|
-
|
|
401
|
+
const initialQuery = this.getQueryParam('q');
|
|
402
|
+
if (initialQuery && this.searchInput) {
|
|
403
|
+
this.searchInput.value = initialQuery;
|
|
404
|
+
this.hasInputValue = true;
|
|
405
|
+
}
|
|
160
406
|
}
|
|
161
407
|
get host() { return index.getElement(this); }
|
|
162
408
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
|
|
8
8
|
const sallaSkeletonCss = "/*!twlt*/:host{display:block}.s-loyalty-skeleton .s-loyalty-prize-item .s-skeleton-wrapper{margin-left:auto;margin-right:auto}.s-skeleton-wrapper{display:block}@keyframes pulse{50%{opacity:.5}}.s-skeleton-wrapper{animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite}.s-skeleton-item{height:100%;width:100%;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-skeleton-item:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-skeleton-item-circular{border-radius:9999px}";
|
|
9
9
|
|
|
@@ -28,7 +28,7 @@ const SallaSkeleton = class {
|
|
|
28
28
|
's-skeleton-item': true,
|
|
29
29
|
's-skeleton-item-circular': this.type == 'circle',
|
|
30
30
|
};
|
|
31
|
-
return (index.h(index.Host, { key: '
|
|
31
|
+
return (index.h(index.Host, { key: '363b803ca0428a575313a96b569ddab7f67b3703', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, index.h("div", { key: 'bd1e4607e4753ef8b148a125b8d9bc60ca20dc72', class: classes }, "\u00A0")));
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
SallaSkeleton.style = sallaSkeletonCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var facebook = require('./facebook-DbXua6B9.js');
|
|
9
9
|
var mail = require('./mail-CO8cFZH7.js');
|
|
@@ -383,7 +383,7 @@ const SallaSocialShare = class {
|
|
|
383
383
|
})));
|
|
384
384
|
}
|
|
385
385
|
render() {
|
|
386
|
-
return (index.h("div", { key: '
|
|
386
|
+
return (index.h("div", { key: '4de560059da2e2dd232bbcd693cd8ad937da9c8e', class: "s-social-share-wrapper" }, index.h("slot", { key: '7ab0a6d03088e0c741c5f432c6c8991db1f0e7b8', name: "widget" }, index.h("salla-button", { key: '574fc864d8552114ead6061740581d72521fd38d', "aria-label": "Share", onClick: () => this.handleShareClick(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, index.h("span", { key: 'c8456382fec13bf8b9a429ca199780b242d7992e', innerHTML: this.opened ? cancel.Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
|
|
387
387
|
}
|
|
388
388
|
get host() { return index.getElement(this); }
|
|
389
389
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
var facebook = require('./facebook-DbXua6B9.js');
|
|
8
8
|
|
|
9
9
|
var instagram = `<!-- Generated by IcoMoon.io -->
|
|
@@ -57,7 +57,7 @@ const SallaSocial = class {
|
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
const linksArray = this.getLinksArray();
|
|
60
|
-
return (index.h(index.Host, { key: '
|
|
60
|
+
return (index.h(index.Host, { key: 'd084cee5461e8e68ca735b86b6d453fe761280ad' }, index.h("ul", { key: 'e83912816c1b2f2ec1f00f1991b2ca1afd21ffe5', class: "s-social-list" }, linksArray.map((link) => (index.h("li", { class: "s-social-link" }, index.h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
61
61
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
62
62
|
.replace(/\{type\}/g, link.type)
|
|
63
63
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
|
|
8
8
|
const sallaTabContentCss = "";
|
|
9
9
|
|
|
@@ -33,7 +33,7 @@ const SallaTabContent = class {
|
|
|
33
33
|
's-tabs-content': true,
|
|
34
34
|
's-tabs-content-selected': this.isSelected
|
|
35
35
|
};
|
|
36
|
-
return (index.h("div", { key: '
|
|
36
|
+
return (index.h("div", { key: '12884a255f05baac9d70e8b0d2144a369fdd3cfc', class: classes }, index.h("slot", { key: '331d86d51ec576614e69e7190ab3cd9c31ed9117' })));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
SallaTabContent.style = sallaTabContentCss;
|
|
@@ -92,7 +92,7 @@ const SallaTabHeader = class {
|
|
|
92
92
|
's-tabs-active': this.isSelected,
|
|
93
93
|
};
|
|
94
94
|
return [
|
|
95
|
-
index.h("div", { key: '
|
|
95
|
+
index.h("div", { key: 'd9f961d47da1347b5b5f4677b3a3905f073b7b63', class: classes, onClick: this.onClick.bind(this) }, index.h("slot", { key: '056593968bd13d806fa34a481e5ab773e23e8084' })),
|
|
96
96
|
];
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -145,7 +145,7 @@ const SallaTabs = class {
|
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
147
|
return [
|
|
148
|
-
index.h("div", { key: '
|
|
148
|
+
index.h("div", { key: '84647185ccebd52494bfff8cf9468a833dfda468', class: "s-tabs" }, index.h("div", { key: 'bfec0faae20e236920197fc9a518cb3fae7e820e', class: "s-tabs-header" }, index.h("slot", { key: '51c0297a5c75395e867e7621780fd030253393dc', name: "header" })), index.h("div", { key: 'b3c155ba7de23b62de2f23d0b3ac4232937f7a57', class: "s-tabs-content-wrapper" }, index.h("slot", { key: '2d1d90a7bed705c01efb05a8ab1ea5be543d71dc', name: "content" })))
|
|
149
149
|
];
|
|
150
150
|
}
|
|
151
151
|
get host() { return index.getElement(this); }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
|
|
8
8
|
const sallaTooltipCss = "/*!twlt*/.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-63%) translateY(-50%);background-color:var(--color-primary);color:var(--color-primary-reverse);bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:var(--color-primary) transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}.block{display:block}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";
|
|
9
9
|
|
|
@@ -33,7 +33,7 @@ const SallaTooltip = class {
|
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
36
|
-
return (index.h("div", { key: '
|
|
36
|
+
return (index.h("div", { key: 'c2172752ccc5634d2223042d359571d4ba4e6816', class: "s-tooltip-container" }, index.h("div", { key: 'b37b92c725bdad1ff3fc10caedd2fe98b506f5e7', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? index.h("span", null, this.text) : index.h("slot", null))));
|
|
37
37
|
}
|
|
38
38
|
get el() { return index.getElement(this); }
|
|
39
39
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CwneDx5o.js');
|
|
7
7
|
|
|
8
8
|
const sallaTrustBadgesCss = "/*!twlt*/.s-trust-badges-wrapper{display:flex;align-items:center}.s-trust-badges-wrapper>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-trust-badges-wrapper:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-trust-badges-label{margin-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-trust-badges-number{font-size:0.875rem;line-height:1.25rem}";
|
|
9
9
|
|