@salla.sa/twilight-components 2.14.557 → 2.14.558
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-B0WltAUU.js → filepond-LS8ytqmE.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CY6apY0i.js → filepond-plugin-file-poster-DexU9y97.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D4ROC-Be.js → filepond-plugin-file-validate-size-BJJ_spY7.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-6lBH-fIm.js → filepond-plugin-file-validate-type-BYz_biwv.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-zEOX3Sjw.js → filepond-plugin-image-edit-C3R9xG9P.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-y0OgGNND.js → filepond-plugin-image-exif-orientation-DC7e2K9l.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C-amHd3H.js → filepond-plugin-image-preview-DLbo1P7r.js} +1 -1
- package/dist/cjs/{index-CyKUnNvM.js → index-BkcJlC9S.js} +10 -14
- package/dist/cjs/{intlTelInput-CTwMzcpE.js → intlTelInput-DvZz7cvU.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 +5 -5
- 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 +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 +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 +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-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-COagKVR0.js} +1 -1
- 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-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-modal2.js +9 -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-D5Fnwsco.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Cms0jrkz.js → filepond-plugin-file-poster-BfePPO64.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B2gy-nn6.js → filepond-plugin-file-validate-size-CVpLCDVB.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D_AqfbaS.js → filepond-plugin-file-validate-type-BhzMnQfH.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-ChS3tv_T.js → filepond-plugin-image-edit-Bvj3qwXE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-iLQFxzEc.js → filepond-plugin-image-exif-orientation-NlBBLgPL.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Dm1gYrYZ.js → filepond-plugin-image-preview-CA1k8ex-.js} +1 -1
- package/dist/esm/{index-BLzx0e6P.js → index-B6Lo-Jz2.js} +10 -14
- package/dist/esm/{intlTelInput-BTOzA2B4.js → intlTelInput-nu7FH85H.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 +5 -5
- 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 +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 +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 +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-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-Dn7Q0By-.js} +1 -1
- package/dist/twilight/{p-d1ba8e6e.entry.js → p-00f3dc2a.entry.js} +1 -1
- package/dist/twilight/{p-7d86bc77.entry.js → p-051740db.entry.js} +1 -1
- package/dist/twilight/{p-595bfef8.entry.js → p-05f65278.entry.js} +1 -1
- package/dist/twilight/{p-c9d10c9f.entry.js → p-0e9845d3.entry.js} +1 -1
- package/dist/twilight/{p-46ba098a.entry.js → p-0ea66288.entry.js} +1 -1
- package/dist/twilight/{p-3b4b1f29.entry.js → p-0f9d25c2.entry.js} +1 -1
- package/dist/twilight/{p-6866b3d6.entry.js → p-100cb969.entry.js} +1 -1
- package/dist/twilight/{p-96a13e17.entry.js → p-11234d66.entry.js} +1 -1
- package/dist/twilight/{p-365745de.entry.js → p-1546f64d.entry.js} +1 -1
- package/dist/twilight/{p-c0fc7756.entry.js → p-191b4fa6.entry.js} +1 -1
- package/dist/twilight/{p-5cbd36fb.entry.js → p-19607f60.entry.js} +1 -1
- package/dist/twilight/p-1d1bbac7.entry.js +4 -0
- package/dist/twilight/{p-932e3bff.entry.js → p-1d220636.entry.js} +1 -1
- package/dist/twilight/{p-eb10186c.entry.js → p-1d9aa36c.entry.js} +1 -1
- package/dist/twilight/{p-53285f66.entry.js → p-257717f5.entry.js} +1 -1
- package/dist/twilight/{p-4cabeff6.entry.js → p-289574f0.entry.js} +1 -1
- package/dist/twilight/{p-f276a319.entry.js → p-28aeea5d.entry.js} +1 -1
- package/dist/twilight/{p-6ea62f2b.entry.js → p-29a9ff44.entry.js} +1 -1
- package/dist/twilight/{p-7767f3a7.entry.js → p-2cb160a8.entry.js} +1 -1
- package/dist/twilight/{p-0416a2a8.entry.js → p-2dc5f115.entry.js} +1 -1
- package/dist/twilight/{p-8d8c84d8.entry.js → p-2de7945d.entry.js} +1 -1
- package/dist/twilight/{p-9ef91e6b.entry.js → p-2ebe428c.entry.js} +1 -1
- package/dist/twilight/{p-2a5b180a.entry.js → p-31c017ae.entry.js} +1 -1
- package/dist/twilight/p-344e7a53.entry.js +4 -0
- package/dist/twilight/{p-59ccfd64.entry.js → p-3661b790.entry.js} +1 -1
- package/dist/twilight/{p-47597499.entry.js → p-3c312812.entry.js} +1 -1
- package/dist/twilight/{p-7ffa452c.entry.js → p-3f12a3a2.entry.js} +1 -1
- package/dist/twilight/{p-8e2f52b2.entry.js → p-400c631e.entry.js} +1 -1
- package/dist/twilight/{p-a4175383.entry.js → p-44f20e64.entry.js} +1 -1
- package/dist/twilight/{p-738ec366.entry.js → p-4604590c.entry.js} +1 -1
- package/dist/twilight/{p-07b67ef6.entry.js → p-4c422a3d.entry.js} +1 -1
- package/dist/twilight/{p-c428c44b.entry.js → p-4f645457.entry.js} +1 -1
- package/dist/twilight/{p-86cd2898.entry.js → p-529a60e2.entry.js} +1 -1
- package/dist/twilight/{p-cd86c231.entry.js → p-5a2150e8.entry.js} +1 -1
- package/dist/twilight/{p-de3b3e41.entry.js → p-5d6db148.entry.js} +1 -1
- package/dist/twilight/{p-fa459971.entry.js → p-5d6f9c3e.entry.js} +1 -1
- package/dist/twilight/{p-1bfb9675.entry.js → p-5dcf8a71.entry.js} +1 -1
- package/dist/twilight/{p-bba884dc.entry.js → p-5f4331f0.entry.js} +1 -1
- package/dist/twilight/{p-06c1c936.entry.js → p-5ffdb544.entry.js} +1 -1
- package/dist/twilight/{p-fa7966bd.entry.js → p-63b48fb1.entry.js} +1 -1
- package/dist/twilight/{p-eb9fca37.entry.js → p-647a1b63.entry.js} +1 -1
- package/dist/twilight/{p-cb7bc39f.entry.js → p-6840449d.entry.js} +1 -1
- package/dist/twilight/{p-5bb8c263.entry.js → p-747fdf8c.entry.js} +1 -1
- package/dist/twilight/{p-7f077279.entry.js → p-7512638e.entry.js} +1 -1
- package/dist/twilight/{p-f602c556.entry.js → p-75ba562a.entry.js} +1 -1
- package/dist/twilight/{p-3a97face.entry.js → p-7639c5a8.entry.js} +1 -1
- package/dist/twilight/{p-6d8b0678.entry.js → p-778f38ce.entry.js} +1 -1
- package/dist/twilight/{p-7c859f0c.entry.js → p-785ac87d.entry.js} +1 -1
- package/dist/twilight/{p-34f2d378.entry.js → p-78cba566.entry.js} +1 -1
- package/dist/twilight/{p-ed3fc3bb.entry.js → p-7a78cbcd.entry.js} +1 -1
- package/dist/twilight/{p-96ded4cf.entry.js → p-7b286e8d.entry.js} +1 -1
- package/dist/twilight/{p-ada5f9db.entry.js → p-8284d68b.entry.js} +1 -1
- package/dist/twilight/{p-6af36173.entry.js → p-86622485.entry.js} +1 -1
- package/dist/twilight/{p-67caf54b.entry.js → p-8ca39b58.entry.js} +1 -1
- package/dist/twilight/{p-a51931ba.entry.js → p-8e10a9a9.entry.js} +1 -1
- package/dist/twilight/{p-98e83214.entry.js → p-8ee698cc.entry.js} +1 -1
- package/dist/twilight/{p-a7801576.entry.js → p-8f11c556.entry.js} +1 -1
- package/dist/twilight/{p-18d0c69f.entry.js → p-91ab3a03.entry.js} +1 -1
- package/dist/twilight/{p-iB9dUe00.js → p-9L0Aq4PZ.js} +1 -1
- package/dist/twilight/{p-BLzx0e6P.js → p-B6Lo-Jz2.js} +1 -1
- package/dist/twilight/{p-BBCmWsAH.js → p-Ble2-eBI.js} +1 -1
- package/dist/twilight/{p-BTjFfROl.js → p-BopTxsQ2.js} +1 -1
- package/dist/twilight/{p-Bi7BjntU.js → p-CMHD60jb.js} +1 -1
- package/dist/twilight/{p-oVUukCva.js → p-CUuXQJdT.js} +1 -1
- package/dist/twilight/{p-BQGQ9tVS.js → p-CvrBhStg.js} +1 -1
- package/dist/twilight/{p-CBW4kczX.js → p-DexDAAf1.js} +1 -1
- package/dist/twilight/{p-C_G6bYCk.js → p-Dgq6RHqV.js} +1 -1
- package/dist/twilight/{p-BqaOIJsE.js → p-VJGJYEfb.js} +1 -1
- package/dist/twilight/{p-ee463cf9.entry.js → p-a1035984.entry.js} +1 -1
- package/dist/twilight/{p-61b6c754.entry.js → p-a50073b5.entry.js} +1 -1
- package/dist/twilight/{p-1420e962.entry.js → p-a82db499.entry.js} +1 -1
- package/dist/twilight/{p-c69e0669.entry.js → p-a8d3ae7e.entry.js} +1 -1
- package/dist/twilight/{p-bc0bc63f.entry.js → p-a8d90638.entry.js} +1 -1
- package/dist/twilight/{p-0c80fbcf.entry.js → p-abce7e02.entry.js} +1 -1
- package/dist/twilight/{p-7a19cb93.entry.js → p-ad12ab8c.entry.js} +1 -1
- package/dist/twilight/{p-fad4aa22.entry.js → p-adb31a76.entry.js} +1 -1
- package/dist/twilight/{p-9ddcdf20.entry.js → p-b5a68a1a.entry.js} +1 -1
- package/dist/twilight/{p-407a73f4.entry.js → p-b695db2e.entry.js} +1 -1
- package/dist/twilight/{p-f87ba34e.entry.js → p-ba941354.entry.js} +1 -1
- package/dist/twilight/{p-3ba22519.entry.js → p-bb94c4e4.entry.js} +1 -1
- package/dist/twilight/{p-33e0d7b8.entry.js → p-bbfaf5ac.entry.js} +1 -1
- package/dist/twilight/{p-809a0076.entry.js → p-be292e0b.entry.js} +1 -1
- package/dist/twilight/{p-b36ca739.entry.js → p-be34bd30.entry.js} +1 -1
- package/dist/twilight/{p-5f6c10d6.entry.js → p-bf2f2a36.entry.js} +1 -1
- package/dist/twilight/{p-2b7ca018.entry.js → p-bfa7a257.entry.js} +1 -1
- package/dist/twilight/{p-be424137.entry.js → p-c39c8112.entry.js} +1 -1
- package/dist/twilight/{p-99a757ac.entry.js → p-c56e1aa1.entry.js} +1 -1
- package/dist/twilight/{p-d84a11b8.entry.js → p-c8c09f5c.entry.js} +1 -1
- package/dist/twilight/{p-a0c97ac9.entry.js → p-c8c34286.entry.js} +1 -1
- package/dist/twilight/{p-5cc80969.entry.js → p-d41903f9.entry.js} +1 -1
- package/dist/twilight/{p-c4f963ea.entry.js → p-d55b86b5.entry.js} +1 -1
- package/dist/twilight/{p-3cc1a9b8.entry.js → p-d72e0350.entry.js} +1 -1
- package/dist/twilight/{p-2c0870cb.entry.js → p-d96bc0c1.entry.js} +1 -1
- package/dist/twilight/{p-81f8537a.entry.js → p-db9f8104.entry.js} +2 -2
- package/dist/twilight/{p-45706908.entry.js → p-dd734bcb.entry.js} +1 -1
- package/dist/twilight/p-df9d5f85.entry.js +4 -0
- package/dist/twilight/{p-05490b44.entry.js → p-e3a45456.entry.js} +1 -1
- package/dist/twilight/{p-2bd06384.entry.js → p-e5169250.entry.js} +1 -1
- package/dist/twilight/{p-a4b7ee47.entry.js → p-ea606acc.entry.js} +1 -1
- package/dist/twilight/{p-8b81811b.entry.js → p-effc8ceb.entry.js} +1 -1
- package/dist/twilight/{p-894fdcdd.entry.js → p-f2fb1121.entry.js} +1 -1
- package/dist/twilight/{p-210095ee.entry.js → p-fa7c358f.entry.js} +1 -1
- package/dist/twilight/{p-DY4LZmNP.js → p-gFG8By9O.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- 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 +40 -0
- 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-56b2f8d7.entry.js +0 -4
- package/dist/twilight/p-8a7bb785.entry.js +0 -4
- package/dist/twilight/p-a8b41edc.entry.js +0 -4
|
@@ -3,17 +3,39 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import Search from "../../assets/svg/search.svg";
|
|
6
|
+
import Cancel from "../../assets/svg/cancel.svg";
|
|
7
|
+
import KeyBoardArrowLeftIcon from "../../assets/svg/keyboard_arrow_left.svg";
|
|
8
|
+
import KeyBoardArrowRightIcon from "../../assets/svg/keyboard_arrow_right.svg";
|
|
6
9
|
import Helper from "../../Helpers/Helper";
|
|
10
|
+
import { DEFAULT_LABELS, addToSearchHistory, getDefaultProductSlot, getSearchResultsUrl, isNewSearchFeatureEnabled, loadLabels, loadSearchHistory, registerTranslationDefaults, saveSearchHistory, } from "./utils";
|
|
7
11
|
/**
|
|
8
12
|
* @slot product - Replaces products card in the results, has replaceable props `{name}`, `{price}`, `{regular_price}`, `{image}`.
|
|
9
13
|
*/
|
|
10
14
|
export class SallaSearch {
|
|
11
15
|
constructor() {
|
|
16
|
+
this.newSearchEnabled = isNewSearchFeatureEnabled();
|
|
12
17
|
this.inputValue = '';
|
|
18
|
+
this.hasTrackedFocus = false;
|
|
13
19
|
this.translationLoaded = false;
|
|
20
|
+
this.labels = DEFAULT_LABELS;
|
|
14
21
|
this.loading = false;
|
|
15
22
|
this.typing = false;
|
|
16
23
|
this.debounce = setTimeout(() => '', 1000);
|
|
24
|
+
this.search_term = '';
|
|
25
|
+
this.hasInputValue = false;
|
|
26
|
+
this.searchHistory = loadSearchHistory();
|
|
27
|
+
/**
|
|
28
|
+
* Most-searched categories to surface before the customer types a query.
|
|
29
|
+
* Not wired to a live endpoint yet - stays empty (and hidden) until a future
|
|
30
|
+
* story populates it.
|
|
31
|
+
*/
|
|
32
|
+
this.trendingCategories = [];
|
|
33
|
+
/**
|
|
34
|
+
* Most-searched terms, reused both as the pre-search "most searched" list and
|
|
35
|
+
* as the results-view "search suggestions" sidebar. Same not-wired-yet status
|
|
36
|
+
* as trendingCategories.
|
|
37
|
+
*/
|
|
38
|
+
this.mostSearchedTerms = [];
|
|
17
39
|
/**
|
|
18
40
|
* Set the component to display as a placeholder (button) that will open the modal. Defaults to `false`
|
|
19
41
|
*/
|
|
@@ -38,37 +60,72 @@ export class SallaSearch {
|
|
|
38
60
|
* Show submit action buttons at the end.
|
|
39
61
|
*/
|
|
40
62
|
this.showAction = false;
|
|
63
|
+
this.tracking = {
|
|
64
|
+
searchFocus: () => {
|
|
65
|
+
if (this.hasTrackedFocus) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.hasTrackedFocus = true;
|
|
69
|
+
salla.event.emit('salla-search::input.focused');
|
|
70
|
+
},
|
|
71
|
+
productClick: (product, position) => {
|
|
72
|
+
salla.event.emit('salla-search::product.clicked', [{ product, position }]);
|
|
73
|
+
},
|
|
74
|
+
recommendationClick: (term, source) => {
|
|
75
|
+
salla.event.emit('salla-search::recommendation.clicked', { term, source });
|
|
76
|
+
},
|
|
77
|
+
};
|
|
41
78
|
this.productSlot =
|
|
42
|
-
this.host
|
|
79
|
+
this.host?.querySelector('[slot="product"]')?.innerHTML || getDefaultProductSlot();
|
|
43
80
|
salla.event.on('search::open', () => this.open());
|
|
44
|
-
salla.lang.onLoaded(() => {
|
|
45
|
-
this.translationLoaded = true;
|
|
46
|
-
});
|
|
47
81
|
salla.event.on('modalClosed', () => this.onModalClose());
|
|
48
82
|
}
|
|
49
83
|
async open() {
|
|
50
|
-
if (!this.inline) {
|
|
51
|
-
await this.modal
|
|
84
|
+
if (this.newSearchEnabled || !this.inline) {
|
|
85
|
+
await this.modal?.open().then(() => setTimeout(() => this.searchInput?.focus(), 300));
|
|
52
86
|
}
|
|
53
87
|
}
|
|
54
88
|
onModalClose() {
|
|
55
|
-
this.searchInput
|
|
89
|
+
if (this.searchInput) {
|
|
90
|
+
this.searchInput.value = '';
|
|
91
|
+
}
|
|
56
92
|
this.results = undefined;
|
|
93
|
+
this.hasInputValue = false;
|
|
57
94
|
this.afterSearching();
|
|
58
|
-
this.container
|
|
95
|
+
this.container?.classList.remove('s-search-no-results');
|
|
59
96
|
}
|
|
60
97
|
handleKeyDown(ev) {
|
|
61
98
|
if (ev.key === 'Enter' && this.search_term?.length) {
|
|
62
|
-
window.location.href =
|
|
99
|
+
window.location.href = getSearchResultsUrl(this.search_term);
|
|
63
100
|
}
|
|
64
101
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
102
|
+
clearSearch() {
|
|
103
|
+
if (this.searchInput) {
|
|
104
|
+
this.searchInput.value = '';
|
|
105
|
+
}
|
|
106
|
+
this.hasInputValue = false;
|
|
107
|
+
this.search_term = '';
|
|
108
|
+
this.searchInput?.focus();
|
|
109
|
+
}
|
|
110
|
+
removeFromSearchHistory(term) {
|
|
111
|
+
this.searchHistory = this.searchHistory.filter(existing => existing !== term);
|
|
112
|
+
saveSearchHistory(this.searchHistory);
|
|
113
|
+
this.afterSearching(!this.results);
|
|
114
|
+
}
|
|
115
|
+
applySuggestedTerm(term, source) {
|
|
116
|
+
this.tracking.recommendationClick(term, source);
|
|
117
|
+
if (this.searchInput) {
|
|
118
|
+
this.searchInput.value = term;
|
|
119
|
+
}
|
|
120
|
+
this.hasInputValue = true;
|
|
121
|
+
this.search_term = term;
|
|
122
|
+
this.searchInput?.focus();
|
|
123
|
+
}
|
|
124
|
+
async componentWillLoad() {
|
|
125
|
+
await salla.lang.onLoaded();
|
|
126
|
+
registerTranslationDefaults();
|
|
127
|
+
this.labels = loadLabels();
|
|
128
|
+
this.translationLoaded = true;
|
|
72
129
|
}
|
|
73
130
|
debounceSearch(event) {
|
|
74
131
|
this.typing = true;
|
|
@@ -80,10 +137,13 @@ export class SallaSearch {
|
|
|
80
137
|
}
|
|
81
138
|
limitWordsAndSearch(event) {
|
|
82
139
|
let value = event.target.value;
|
|
140
|
+
this.hasInputValue = value.length > 0;
|
|
83
141
|
const words = value.trim().split(/\s+/);
|
|
84
142
|
if (words.length > this.maxWords) {
|
|
85
143
|
const truncatedInput = words.slice(0, this.maxWords).join(' ');
|
|
86
|
-
this.searchInput
|
|
144
|
+
if (this.searchInput) {
|
|
145
|
+
this.searchInput.value = truncatedInput;
|
|
146
|
+
}
|
|
87
147
|
}
|
|
88
148
|
this.debounceSearch(event);
|
|
89
149
|
}
|
|
@@ -107,7 +167,7 @@ export class SallaSearch {
|
|
|
107
167
|
}
|
|
108
168
|
}
|
|
109
169
|
search(val) {
|
|
110
|
-
this.noResults.style.display = 'none';
|
|
170
|
+
this.noResults && (this.noResults.style.display = 'none');
|
|
111
171
|
//run loading spinner or stop it
|
|
112
172
|
this.loading = true;
|
|
113
173
|
salla.product
|
|
@@ -115,22 +175,29 @@ export class SallaSearch {
|
|
|
115
175
|
.then(response => {
|
|
116
176
|
this.results = response;
|
|
117
177
|
salla.event.emit('Products Searched', val);
|
|
178
|
+
if (this.newSearchEnabled) {
|
|
179
|
+
this.searchHistory = addToSearchHistory(this.searchHistory, val);
|
|
180
|
+
saveSearchHistory(this.searchHistory);
|
|
181
|
+
}
|
|
118
182
|
})
|
|
119
183
|
.catch(err => (err !== 'Query is same as previous one!' ? (this.results = undefined) : null))
|
|
120
184
|
.finally(() => this.afterSearching(/*isEmpty*/ false));
|
|
121
185
|
}
|
|
122
186
|
afterSearching(isEmpty = true) {
|
|
123
|
-
this.noResults
|
|
124
|
-
|
|
187
|
+
if (this.noResults) {
|
|
188
|
+
this.noResults.style.display = isEmpty || !!this.results?.data?.length ? 'none' : 'block';
|
|
189
|
+
}
|
|
190
|
+
// The new search experience is always a fully-visible modal panel (no collapsed/expanded
|
|
191
|
+
// input trick needed), so this open/no-results cosmetic toggle only applies to the legacy UI.
|
|
192
|
+
if (!this.newSearchEnabled) {
|
|
193
|
+
Helper.toggleElementClassIf(this.container, 's-search-container-open', 's-search-no-results', () => this.results?.data.length);
|
|
194
|
+
}
|
|
125
195
|
this.loading = false;
|
|
126
196
|
salla.product.api.previousQuery = ''; //avoid having error 'Query is same as previous one!' after reopen modal;
|
|
127
|
-
this.inputValue.length < 3 ? this.container
|
|
197
|
+
this.inputValue.length < 3 ? this.container?.classList.remove('s-search-no-results') : '';
|
|
128
198
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
height: this.height + 'px',
|
|
132
|
-
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
133
|
-
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: 'f3b40ce4ec24678f6d8421f3da8ac9e1bd631c3a', class: "s-search-results" }, this.results?.data.map(product => (h("a", { href: product.url + '?from=search-bar', class: {
|
|
199
|
+
renderLegacyResults() {
|
|
200
|
+
return (h("div", { class: "s-search-results" }, this.results?.data.map(product => (h("a", { href: product.url + '?from=search-bar', class: {
|
|
134
201
|
's-search-product': true,
|
|
135
202
|
's-search-product-not-available': !product.is_available,
|
|
136
203
|
}, innerHTML: this.productSlot
|
|
@@ -139,12 +206,83 @@ export class SallaSearch {
|
|
|
139
206
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price
|
|
140
207
|
? salla.money(product.regular_price)
|
|
141
208
|
: '')
|
|
142
|
-
.replace(/\{image\}/g, product.image.url) }))), h("p", {
|
|
143
|
-
|
|
144
|
-
|
|
209
|
+
.replace(/\{image\}/g, product.image.url) }))), h("p", { ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, this.labels.noOptions)));
|
|
210
|
+
}
|
|
211
|
+
renderCategoriesSection(title) {
|
|
212
|
+
if (!this.trendingCategories.length) {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
return (h("div", null, h("p", { class: "s-search-idle-section-title" }, title), h("div", { class: "s-search-idle-categories-list" }, this.trendingCategories.map(category => (h("a", { class: "s-search-idle-category-chip", href: category.url, onClick: () => this.tracking.recommendationClick(category.name, 'category') }, category.name, category.count ? (h("span", { class: "s-search-idle-category-count" }, category.count)) : null))))));
|
|
216
|
+
}
|
|
217
|
+
renderTermsSection(title, source) {
|
|
218
|
+
if (!this.mostSearchedTerms.length) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
return (h("div", null, h("p", { class: "s-search-idle-section-title" }, title), h("ul", { class: "s-search-most-searched-list" }, this.mostSearchedTerms.map(term => (h("li", null, h("button", { type: "button", class: "s-search-most-searched-item", onClick: () => this.applySuggestedTerm(term, source) }, h("span", { class: "s-search-most-searched-icon", innerHTML: Search }), term)))))));
|
|
222
|
+
}
|
|
223
|
+
renderSearchHistorySection() {
|
|
224
|
+
// Only in the empty/zero state - hidden as soon as there's input text or results.
|
|
225
|
+
if (!this.searchHistory.length || this.hasInputValue) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return (h("div", null, h("p", { class: "s-search-idle-section-title" }, this.labels.searchHistory), h("div", { class: "s-search-history-list" }, this.searchHistory.map(term => (h("span", { class: "s-search-history-chip" }, h("button", { type: "button", class: "s-search-history-chip-term", onClick: () => this.applySuggestedTerm(term, 'history') }, term), h("button", { type: "button", class: "s-search-history-chip-remove", "aria-label": this.labels.remove, onClick: () => this.removeFromSearchHistory(term) }, h("span", { innerHTML: Cancel }))))))));
|
|
229
|
+
}
|
|
230
|
+
renderIdlePanel() {
|
|
231
|
+
// Always renders - even with nothing in history/trending yet - so the panel opens as a
|
|
232
|
+
// visible (if empty) container rather than disappearing until there's something to show.
|
|
233
|
+
return (h("div", { class: "s-search-idle-panel" }, this.renderSearchHistorySection(), this.renderCategoriesSection(this.labels.trendingCategories), this.renderTermsSection(this.labels.mostSearched, 'trending')));
|
|
234
|
+
}
|
|
235
|
+
renderResultsBody() {
|
|
236
|
+
// Search history never shows here (only in the empty/zero state), so the sidebar's
|
|
237
|
+
// visibility depends only on categories/terms - not the full idle-panel content check.
|
|
238
|
+
const hasSidebarContent = this.trendingCategories.length > 0 || this.mostSearchedTerms.length > 0;
|
|
239
|
+
return (h("div", { class: "s-search-results-body" }, hasSidebarContent ? (h("div", { class: "s-search-sidebar" }, this.renderTermsSection(this.labels.searchSuggestions, 'suggestion'), this.renderCategoriesSection(this.labels.categories))) : null, h("div", { class: "s-search-results-grid-wrap" }, h("p", { class: "s-search-idle-section-title" }, this.labels.searchResults), h("div", { class: "s-search-results-grid" }, this.results?.data.map((product, position) => (h("div", { class: "s-search-grid-item", onClick: () => this.tracking.productClick(product, position) }, 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 ? (h("p", { class: "s-search-no-results-placeholder" }, this.labels.noOptions)) : null))));
|
|
240
|
+
}
|
|
241
|
+
renderViewAllLink() {
|
|
242
|
+
if (!this.results?.data.length) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
return (h("a", { class: "s-search-view-all", href: getSearchResultsUrl(this.search_term) }, this.labels.searchViewAllTemplate.replace(':word', this.search_term), h("span", { class: "s-search-view-all-icon", innerHTML: salla.config.get('theme.is_rtl', true) ? KeyBoardArrowLeftIcon : KeyBoardArrowRightIcon })));
|
|
246
|
+
}
|
|
247
|
+
renderDropdown() {
|
|
248
|
+
if (!this.newSearchEnabled) {
|
|
249
|
+
return this.renderLegacyResults();
|
|
250
|
+
}
|
|
251
|
+
return this.results ? this.renderResultsBody() : this.renderIdlePanel();
|
|
252
|
+
}
|
|
253
|
+
renderInputWrapper() {
|
|
254
|
+
const inputWrapper = (h("div", { class: "s-search-input-wrapper" }, h("span", { class: "s-search-icon-wrap" }, h("span", { class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), 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: {
|
|
145
255
|
height: this.height + 'px',
|
|
146
256
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
147
|
-
} },
|
|
257
|
+
} }), this.newSearchEnabled && this.hasInputValue ? (h("button", { type: "button", class: "s-search-clear-icon", "aria-label": this.labels.close, onClick: () => this.clearSearch() }, h("span", { innerHTML: Cancel }))) : null, this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null));
|
|
258
|
+
if (!this.newSearchEnabled) {
|
|
259
|
+
return inputWrapper;
|
|
260
|
+
}
|
|
261
|
+
return (h("div", { class: "s-search-input-row" }, h("button", { type: "button", class: "s-search-back-btn", "aria-label": this.labels.back, onClick: () => this.modal?.close() }, h("span", { innerHTML: salla.config.get('theme.is_rtl', true)
|
|
262
|
+
? KeyBoardArrowRightIcon
|
|
263
|
+
: KeyBoardArrowLeftIcon })), inputWrapper));
|
|
264
|
+
}
|
|
265
|
+
renderPlaceholderTrigger() {
|
|
266
|
+
return (h("div", { class: "s-search-input-wrapper" }, h("span", { class: "s-search-icon-wrap" }, h("span", { class: "s-search-icon", innerHTML: Search })), h("button", { type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
|
|
267
|
+
height: this.height + 'px',
|
|
268
|
+
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
269
|
+
} }, this.labels.searchPlaceholder)));
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The new search UI is always a modal opened from a placeholder trigger (never inline,
|
|
273
|
+
* never a bare/self-triggering modal), with its own padded panel layout - the input and
|
|
274
|
+
* dropdown content share one bordered card instead of the legacy floating-dropdown look.
|
|
275
|
+
*/
|
|
276
|
+
renderNewSearchExperience() {
|
|
277
|
+
return (h("div", { class: "s-search-placeholder-wrapper s-search-inline" }, this.renderPlaceholderTrigger(), h("salla-modal", { position: "top", class: "s-search-modal s-search-modal-new", "hide-close-button": true, ref: modal => (this.modal = modal) }, h("div", { class: "s-search-panel", ref: container => (this.container = container) }, this.renderInputWrapper(), this.renderDropdown(), this.renderViewAllLink()))));
|
|
278
|
+
}
|
|
279
|
+
render() {
|
|
280
|
+
if (this.newSearchEnabled) {
|
|
281
|
+
return this.renderNewSearchExperience();
|
|
282
|
+
}
|
|
283
|
+
const searchContent = (h("div", { class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, this.renderInputWrapper(), this.renderDropdown()));
|
|
284
|
+
const modalContent = (h("salla-modal", { position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
|
|
285
|
+
const placeholderContent = (h("div", { class: "s-search-placeholder-wrapper s-search-inline" }, this.renderPlaceholderTrigger(), modalContent));
|
|
148
286
|
return this.placeholder ? (placeholderContent) : this.inline ? (h("div", { class: "s-search-modal" }, searchContent)) : (modalContent);
|
|
149
287
|
}
|
|
150
288
|
/**
|
|
@@ -152,7 +290,11 @@ export class SallaSearch {
|
|
|
152
290
|
*/
|
|
153
291
|
componentDidLoad() {
|
|
154
292
|
this.afterSearching();
|
|
155
|
-
|
|
293
|
+
const initialQuery = this.getQueryParam('q');
|
|
294
|
+
if (initialQuery && this.searchInput) {
|
|
295
|
+
this.searchInput.value = initialQuery;
|
|
296
|
+
this.hasInputValue = true;
|
|
297
|
+
}
|
|
156
298
|
}
|
|
157
299
|
static get is() { return "salla-search"; }
|
|
158
300
|
static get originalStyleUrls() {
|
|
@@ -292,11 +434,16 @@ export class SallaSearch {
|
|
|
292
434
|
static get states() {
|
|
293
435
|
return {
|
|
294
436
|
"translationLoaded": {},
|
|
437
|
+
"labels": {},
|
|
295
438
|
"results": {},
|
|
296
439
|
"loading": {},
|
|
297
440
|
"typing": {},
|
|
298
441
|
"debounce": {},
|
|
299
|
-
"search_term": {}
|
|
442
|
+
"search_term": {},
|
|
443
|
+
"hasInputValue": {},
|
|
444
|
+
"searchHistory": {},
|
|
445
|
+
"trendingCategories": {},
|
|
446
|
+
"mostSearchedTerms": {}
|
|
300
447
|
};
|
|
301
448
|
}
|
|
302
449
|
static get elementRef() { return "host"; }
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
export const NEW_SEARCH_FEATURE_FLAG = 'new-search-ui-enabled';
|
|
5
|
+
export const SEARCH_HISTORY_KEY = 'salla::search-history';
|
|
6
|
+
export const SEARCH_HISTORY_LIMIT = 10;
|
|
7
|
+
// Multi-market stores scope search history per market via the `scope` query param.
|
|
8
|
+
export function getSearchHistoryKey() {
|
|
9
|
+
if (typeof window === 'undefined') {
|
|
10
|
+
return SEARCH_HISTORY_KEY;
|
|
11
|
+
}
|
|
12
|
+
const scope = new URLSearchParams(window.location.search).get('scope');
|
|
13
|
+
return scope ? `${SEARCH_HISTORY_KEY}-${scope}` : SEARCH_HISTORY_KEY;
|
|
14
|
+
}
|
|
15
|
+
export const DEFAULT_LABELS = {
|
|
16
|
+
searchPlaceholder: '',
|
|
17
|
+
noOptions: '',
|
|
18
|
+
outOfStock: '',
|
|
19
|
+
close: '',
|
|
20
|
+
back: '',
|
|
21
|
+
remove: '',
|
|
22
|
+
searchHistory: '',
|
|
23
|
+
trendingCategories: '',
|
|
24
|
+
mostSearched: '',
|
|
25
|
+
searchSuggestions: '',
|
|
26
|
+
categories: '',
|
|
27
|
+
searchResults: '',
|
|
28
|
+
searchViewAllTemplate: '',
|
|
29
|
+
};
|
|
30
|
+
// Labels not yet in the central translation files - seeded via addBulk only when missing.
|
|
31
|
+
export const TRANSLATION_DEFAULTS = {
|
|
32
|
+
'common.elements.search_history': { ar: 'آخر ما تم البحث عنه', en: 'Recently Searched' },
|
|
33
|
+
'common.elements.trending_categories': {
|
|
34
|
+
ar: 'التصنيفات الأكثر بحثاً',
|
|
35
|
+
en: 'Trending categories',
|
|
36
|
+
},
|
|
37
|
+
'common.elements.most_searched': { ar: 'الأكثر بحثاً', en: 'Most searched' },
|
|
38
|
+
'common.elements.search_suggestions': { ar: 'اقتراحات البحث', en: 'Search suggestions' },
|
|
39
|
+
'common.elements.categories': { ar: 'التصنيفات', en: 'Categories' },
|
|
40
|
+
'common.elements.search_results': { ar: 'نتائج البحث', en: 'Search results' },
|
|
41
|
+
'common.elements.search_view_all': {
|
|
42
|
+
ar: 'عرض كل النتائج لـ ":word"',
|
|
43
|
+
en: 'View all results for ":word"',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export function isNewSearchFeatureEnabled() {
|
|
47
|
+
const flag = salla.storage.get(NEW_SEARCH_FEATURE_FLAG, false);
|
|
48
|
+
return flag === true || flag === 'true';
|
|
49
|
+
}
|
|
50
|
+
export function getSearchResultsUrl(term) {
|
|
51
|
+
return salla.url.get('search?q=' + encodeURI(term));
|
|
52
|
+
}
|
|
53
|
+
export function loadSearchHistory() {
|
|
54
|
+
const key = getSearchHistoryKey();
|
|
55
|
+
const stored = salla.storage.get(key, []);
|
|
56
|
+
return Array.isArray(stored) ? stored.filter(term => typeof term === 'string') : [];
|
|
57
|
+
}
|
|
58
|
+
export function saveSearchHistory(history) {
|
|
59
|
+
const key = getSearchHistoryKey();
|
|
60
|
+
salla.storage.set(key, history);
|
|
61
|
+
}
|
|
62
|
+
export function addToSearchHistory(history, term) {
|
|
63
|
+
const trimmed = term.trim();
|
|
64
|
+
if (!trimmed) {
|
|
65
|
+
return history;
|
|
66
|
+
}
|
|
67
|
+
const withoutDuplicate = history.filter(existing => existing.toLowerCase() !== trimmed.toLowerCase());
|
|
68
|
+
return [trimmed, ...withoutDuplicate].slice(0, SEARCH_HISTORY_LIMIT);
|
|
69
|
+
}
|
|
70
|
+
export function hasIdlePanelContent(searchHistory, trendingCategories, mostSearchedTerms) {
|
|
71
|
+
return searchHistory.length > 0 || trendingCategories.length > 0 || mostSearchedTerms.length > 0;
|
|
72
|
+
}
|
|
73
|
+
export function registerTranslationDefaults() {
|
|
74
|
+
if (!salla?.lang?.addBulk) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const missing = Object.entries(TRANSLATION_DEFAULTS).reduce((acc, [key, value]) => {
|
|
78
|
+
if (salla.lang.get(key) === key) {
|
|
79
|
+
acc[key] = value;
|
|
80
|
+
}
|
|
81
|
+
return acc;
|
|
82
|
+
}, {});
|
|
83
|
+
if (Object.keys(missing).length) {
|
|
84
|
+
salla.lang.addBulk(missing);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export function loadLabels() {
|
|
88
|
+
return {
|
|
89
|
+
searchPlaceholder: salla.lang.get('blocks.header.search_placeholder'),
|
|
90
|
+
noOptions: salla.lang.get('common.elements.no_options'),
|
|
91
|
+
outOfStock: salla.lang.get('pages.products.out_of_stock'),
|
|
92
|
+
close: salla.lang.get('common.elements.close'),
|
|
93
|
+
back: salla.lang.get('common.elements.back'),
|
|
94
|
+
remove: salla.lang.get('common.elements.remove'),
|
|
95
|
+
searchHistory: salla.lang.get('common.elements.search_history'),
|
|
96
|
+
trendingCategories: salla.lang.get('common.elements.trending_categories'),
|
|
97
|
+
mostSearched: salla.lang.get('common.elements.most_searched'),
|
|
98
|
+
searchSuggestions: salla.lang.get('common.elements.search_suggestions'),
|
|
99
|
+
categories: salla.lang.get('common.elements.categories'),
|
|
100
|
+
searchResults: salla.lang.get('common.elements.search_results'),
|
|
101
|
+
searchViewAllTemplate: salla.lang.get('common.elements.search_view_all'),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export function getDefaultProductSlot() {
|
|
105
|
+
return ('<div class="s-search-product-image-container">' +
|
|
106
|
+
' <img class="s-search-product-image" src="{image}" alt="{name}"/>' +
|
|
107
|
+
'</div>' +
|
|
108
|
+
'<div class="s-search-product-details">' +
|
|
109
|
+
' <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>' +
|
|
110
|
+
'</div>');
|
|
111
|
+
}
|
|
@@ -188,18 +188,18 @@ export class SallaSearchableDropdown {
|
|
|
188
188
|
render() {
|
|
189
189
|
const hasSelection = this.selectedItem != null;
|
|
190
190
|
const listboxId = `${this.inputId}-listbox`;
|
|
191
|
-
return (h(Host, { key: '
|
|
191
|
+
return (h(Host, { key: '6661631ca1fbc9dee2c634fffa720e5f90ce3483', class: "s-searchable-dropdown" }, h("div", { key: '201df6fb1c7d201d93681acc3819d76be5da4c6a', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (h("label", { key: '2a5a78700cb7c4f498140f91525e7264bcfa7555', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: 'ae3395c452ced56a8754466a5962acfaaef0c3b5', class: "s-searchable-dropdown-required" }, " *"))), h("div", { key: 'ca363dd594a146e9dedd6940c736e832f465d495', class: {
|
|
192
192
|
's-searchable-dropdown-trigger': true,
|
|
193
193
|
's-searchable-dropdown-trigger--disabled': this.disabled || this.loading,
|
|
194
194
|
's-searchable-dropdown-trigger--open': this.isOpen,
|
|
195
|
-
}, role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": listboxId, "aria-disabled": this.disabled || this.loading ? 'true' : 'false', tabIndex: this.disabled || this.loading ? -1 : 0, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hasSelection ? (h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), h("i", { key: '
|
|
195
|
+
}, role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": listboxId, "aria-disabled": this.disabled || this.loading ? 'true' : 'false', tabIndex: this.disabled || this.loading ? -1 : 0, onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, hasSelection ? (h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), h("i", { key: '84e041b879c392a82bbaf0ebd21b50a1e035218d', class: {
|
|
196
196
|
'sicon-keyboard_arrow_down': true,
|
|
197
197
|
's-searchable-dropdown-trigger-icon': true,
|
|
198
198
|
's-searchable-dropdown-trigger-icon--open': this.isOpen,
|
|
199
|
-
}, "aria-hidden": "true" })), this.isOpen && (h("div", { key: '
|
|
199
|
+
}, "aria-hidden": "true" })), this.isOpen && (h("div", { key: 'eeeb7a2c5f3ff05966150fada86eb26d38f38699', class: {
|
|
200
200
|
's-searchable-dropdown-panel': true,
|
|
201
201
|
's-searchable-dropdown-panel--up': this.dropUp,
|
|
202
|
-
}, ref: (el) => (this.panelRef = el) }, this.searchable && (h("div", { key: '
|
|
202
|
+
}, ref: (el) => (this.panelRef = el) }, this.searchable && (h("div", { key: '28bd784d25d2bb9928c2316aac029257140d19e9', class: "s-searchable-dropdown-search-wrap" }, h("i", { key: '78add1451d050ce225fc3e14af352af4891735a3', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), h("input", { key: '94644b386f64d1312511349f1eebafb56566754a', ref: (el) => (this.searchInputRef = el), id: this.inputId, type: "text", class: "s-searchable-dropdown-search-input", placeholder: this.placeholder, value: this.clientSearch ? this.clientSearchQuery : this.searchQuery, onInput: this.handleSearchInputChange, onKeyDown: this.handleSearchKeyDown, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-controls": listboxId }))), h("div", { key: '5e7f218ded5baac0ad6fd92a04eae8948f7c9430', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
|
|
203
203
|
}
|
|
204
204
|
renderListContent() {
|
|
205
205
|
if (this.searching || this.loading) {
|
|
@@ -22,7 +22,7 @@ export class SallaSkeleton {
|
|
|
22
22
|
's-skeleton-item': true,
|
|
23
23
|
's-skeleton-item-circular': this.type == 'circle',
|
|
24
24
|
};
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '363b803ca0428a575313a96b569ddab7f67b3703', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: 'bd1e4607e4753ef8b148a125b8d9bc60ca20dc72', class: classes }, "\u00A0")));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-skeleton"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -31,7 +31,7 @@ export class SallaSocial {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const linksArray = this.getLinksArray();
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: 'd084cee5461e8e68ca735b86b6d453fe761280ad' }, h("ul", { key: 'e83912816c1b2f2ec1f00f1991b2ca1afd21ffe5', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
35
35
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
36
36
|
.replace(/\{type\}/g, link.type)
|
|
37
37
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|
|
@@ -355,7 +355,7 @@ export class SallaSocialShare {
|
|
|
355
355
|
})));
|
|
356
356
|
}
|
|
357
357
|
render() {
|
|
358
|
-
return (h("div", { key: '
|
|
358
|
+
return (h("div", { key: '4de560059da2e2dd232bbcd693cd8ad937da9c8e', class: "s-social-share-wrapper" }, h("slot", { key: '7ab0a6d03088e0c741c5f432c6c8991db1f0e7b8', name: "widget" }, h("salla-button", { key: '574fc864d8552114ead6061740581d72521fd38d', "aria-label": "Share", onClick: () => this.handleShareClick(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: 'c8456382fec13bf8b9a429ca199780b242d7992e', innerHTML: this.opened ? Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
|
|
359
359
|
}
|
|
360
360
|
static get is() { return "salla-social-share"; }
|
|
361
361
|
static get originalStyleUrls() {
|
|
@@ -30,7 +30,7 @@ export class SallaTabContent {
|
|
|
30
30
|
's-tabs-content': true,
|
|
31
31
|
's-tabs-content-selected': this.isSelected
|
|
32
32
|
};
|
|
33
|
-
return (h("div", { key: '
|
|
33
|
+
return (h("div", { key: '12884a255f05baac9d70e8b0d2144a369fdd3cfc', class: classes }, h("slot", { key: '331d86d51ec576614e69e7190ab3cd9c31ed9117' })));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "salla-tab-content"; }
|
|
36
36
|
static get originalStyleUrls() {
|
|
@@ -52,7 +52,7 @@ export class SallaTabHeader {
|
|
|
52
52
|
's-tabs-active': this.isSelected,
|
|
53
53
|
};
|
|
54
54
|
return [
|
|
55
|
-
h("div", { key: '
|
|
55
|
+
h("div", { key: 'd9f961d47da1347b5b5f4677b3a3905f073b7b63', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '056593968bd13d806fa34a481e5ab773e23e8084' })),
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "salla-tab-header"; }
|
|
@@ -50,7 +50,7 @@ export class SallaTabs {
|
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
return [
|
|
53
|
-
h("div", { key: '
|
|
53
|
+
h("div", { key: '84647185ccebd52494bfff8cf9468a833dfda468', class: "s-tabs" }, h("div", { key: 'bfec0faae20e236920197fc9a518cb3fae7e820e', class: "s-tabs-header" }, h("slot", { key: '51c0297a5c75395e867e7621780fd030253393dc', name: "header" })), h("div", { key: 'b3c155ba7de23b62de2f23d0b3ac4232937f7a57', class: "s-tabs-content-wrapper" }, h("slot", { key: '2d1d90a7bed705c01efb05a8ab1ea5be543d71dc', name: "content" })))
|
|
54
54
|
];
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "salla-tabs"; }
|
|
@@ -138,7 +138,7 @@ export class SallaTelInput {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
render() {
|
|
141
|
-
return (h(Host, { key: '
|
|
141
|
+
return (h(Host, { key: '6e279f9a491d7ee129f4ccb7f64017c17bbb2229', class: "s-tel-input" }, h("input", { key: '5b0eabc113b9a766218be76e055d2cbc2f83365a', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: 'f609b8bf28bceb61d06f9eaf3d06c26a4cabcc4e', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '10bc24025a5932b85bfa5a1ede6e203e33dddb6f', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
142
142
|
}
|
|
143
143
|
componentDidLoad() {
|
|
144
144
|
this.initPromise = this.initTelInput();
|
|
@@ -27,7 +27,7 @@ export class SallaTooltip {
|
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
29
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: 'c2172752ccc5634d2223042d359571d4ba4e6816', class: "s-tooltip-container" }, h("div", { key: 'b37b92c725bdad1ff3fc10caedd2fe98b506f5e7', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "salla-tooltip"; }
|
|
33
33
|
static get originalStyleUrls() {
|
|
@@ -532,7 +532,7 @@ export class SallaUserSettings {
|
|
|
532
532
|
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
|
|
533
533
|
}
|
|
534
534
|
render() {
|
|
535
|
-
return (h(Host, { key: '
|
|
535
|
+
return (h(Host, { key: 'ec31f48a8214240020804541d58e1745c429f2a5', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: '1a4fb3a3e47729891772838df0dca41f52e5d017', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'f965243eca4953d588ea6ef27a581f00839482ff' }, h("div", { key: 'd08fb75de39b78c02455b9ede326e0563a675762', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '4bacfb410376c98a14c7289968293a5c06520bbd', innerHTML: UserCancel })), h("div", { key: '61bbccd47940a87db9faee8a6a305aff0b5f0783', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '3b02ec766d677d37d09df8ae91fae883b3e8b35d', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: 'da7358399c5e1e8a94082585820f44e2de9d352d', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: 'f64e96e150cd78ed41b104d845774ae31187a33e', class: "s-toggle" }, h("input", { key: '69b07baebf7c0869c37b29a920851be99dbfddc8', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: '94e8675dcb56084c0581fb26f96ce0122c8898e5', class: "s-toggle-switcher" })))))), h("div", { key: '940db4113264ca36dc5283d17597a85d85c4b5b4', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'f6c8e5cbebb295826be0bfac8ae427df9cf692bf' }, h("div", { key: 'c81a3c392df36b97777d74521482266a9444a79c', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '1a5a19818579890be2ecb12848e30cf034f8569b', innerHTML: Bullhorn })), h("div", { key: '5849731b90184af7225d120b5e1077e49301e379', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: '3aeda4ebfa9715d81272dd4be1e5b223f43d79fe', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '60db45c279de365c10ae40ba486afd8609f5d2b2', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '1b855ffd24570fe90badbd18bbab2c8032f320b7', class: "s-toggle" }, h("input", { key: '9cdd0d736ed9baf0f5628803a9a4b93c5389cc51', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '35ba9556185bb4991fc91b343573e723cd888115', class: "s-toggle-switcher" }))))), this.isDeleteAccountEnabled ? (h("div", { class: "s-user-settings-section s-user-settings-section-delete-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, this.renderUserDeleteIcon()), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deleteAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.isDeletePending ? this.deleteAccountPending : this.deleteAccountDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, this.renderDeleteSectionAction())))) : (h("div", { class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, h("span", { innerHTML: UserOff })), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount)))))), this.isDeleteAccountEnabled ? (h("salla-modal", { id: "salla-user-settings-delete-modal", width: "xs", centered: true, showBack: this.currentStep === 'otp', isClosable: this.currentStep !== 'success', iconStyle: this.currentStep === 'success' ? 'success' : undefined, onModalVisibilityChanged: e => this.handleModalVisibilityChanged(e), onModalBack: () => this.goBackFromOtp(), ref: modal => (this.confirmationModal = modal) }, this.currentStep !== 'success' ? (h("span", { slot: "icon", class: "s-user-settings-delete-icon" }, this.renderUserDeleteIcon())) : null, h("div", { key: this.currentStep, class: "s-user-settings-delete-step" }, this.renderDeleteStep()))) : (h("salla-modal", { width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => (this.confirmationModal = modal) }, h("span", { slot: "icon", class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { class: "s-user-settings-confirmation" }, h("div", { class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { class: "s-user-settings-confirmation-actions" }, h("salla-button", { width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { fill: "outline", loading: this.buttonLoading, width: "wide", onClick: () => this.confirmDeactivateAccount() }, this.capitalizeText(this.deactivateAccount))))))));
|
|
536
536
|
}
|
|
537
537
|
static get is() { return "salla-user-settings"; }
|
|
538
538
|
static get originalStyleUrls() {
|