@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.
Files changed (373) hide show
  1. package/dist/{esm/cart-DY4LZmNP.js → cjs/cart-DSvlJXCH.js} +4 -2
  2. package/dist/cjs/{filepond-plugin-file-poster-CY6apY0i.js → filepond-plugin-file-poster-DTiAXF5c.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-D4ROC-Be.js → filepond-plugin-file-validate-size-BuMc19fV.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-6lBH-fIm.js → filepond-plugin-file-validate-type-5CKRAI6_.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-zEOX3Sjw.js → filepond-plugin-image-edit-CXXhiTdn.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-y0OgGNND.js → filepond-plugin-image-exif-orientation-DvMNhQGm.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C-amHd3H.js → filepond-plugin-image-preview-nHwj0lr7.js} +1 -1
  8. package/dist/cjs/{filepond-B0WltAUU.js → filepond-vI0B-67n.js} +1 -1
  9. package/dist/cjs/{index-CyKUnNvM.js → index-CwneDx5o.js} +10 -14
  10. package/dist/cjs/{intlTelInput-CTwMzcpE.js → intlTelInput-CzMsUlkW.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +9 -4
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +29 -8
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +3 -3
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +35 -17
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/{salla-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +4 -4
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card.cjs.entry.js +48 -13
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-search.cjs.entry.js +279 -33
  91. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  92. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  93. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/{vanilla-picker-B_r1mvJW.js → vanilla-picker-BSGZg-Y0.js} +1 -1
  106. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +3 -3
  107. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +23 -2
  108. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.css +3 -0
  109. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +38 -16
  110. package/dist/collection/components/salla-modal/salla-modal.css +34 -16
  111. package/dist/collection/components/salla-modal/salla-modal.js +27 -2
  112. package/dist/collection/components/salla-payments/salla-payments.js +3 -3
  113. package/dist/collection/components/salla-product-card/salla-product-card.css +22 -2
  114. package/dist/collection/components/salla-product-card/salla-product-card.js +106 -11
  115. package/dist/collection/components/salla-search/interfaces.js +1 -0
  116. package/dist/collection/components/salla-search/salla-search.css +324 -14
  117. package/dist/collection/components/salla-search/salla-search.js +179 -32
  118. package/dist/collection/components/salla-search/utils.js +111 -0
  119. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
  120. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  121. package/dist/collection/components/salla-social/salla-social.js +1 -1
  122. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  123. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  124. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  125. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  126. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  127. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  128. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  129. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  130. package/dist/components/index.js +2 -2
  131. package/dist/components/salla-bullet-delivery.js +24 -3
  132. package/dist/components/salla-fulfillment-methods.js +34 -16
  133. package/dist/components/salla-modal2.js +9 -3
  134. package/dist/components/salla-payments.js +3 -3
  135. package/dist/components/salla-product-card2.js +50 -12
  136. package/dist/components/salla-search.js +392 -39
  137. package/dist/components/salla-searchable-dropdown2.js +4 -4
  138. package/dist/components/salla-skeleton2.js +1 -1
  139. package/dist/components/salla-social-share2.js +1 -1
  140. package/dist/components/salla-social.js +1 -1
  141. package/dist/components/salla-tab-content2.js +1 -1
  142. package/dist/components/salla-tab-header2.js +1 -1
  143. package/dist/components/salla-tabs2.js +1 -1
  144. package/dist/components/salla-tel-input2.js +1 -1
  145. package/dist/components/salla-tooltip2.js +1 -1
  146. package/dist/components/salla-user-settings.js +1 -1
  147. package/dist/components/salla-wishlist-actions.js +1 -1
  148. package/dist/{cjs/cart-s-x1Fshk.js → esm/cart-gFG8By9O.js} +2 -4
  149. package/dist/esm/{filepond-B9wUqRiS.js → filepond-BkGwWgIk.js} +1 -1
  150. package/dist/esm/{filepond-plugin-file-poster-Cms0jrkz.js → filepond-plugin-file-poster-TmS7u3EZ.js} +1 -1
  151. package/dist/esm/{filepond-plugin-file-validate-size-B2gy-nn6.js → filepond-plugin-file-validate-size-DzPOS-Ef.js} +1 -1
  152. package/dist/esm/{filepond-plugin-file-validate-type-D_AqfbaS.js → filepond-plugin-file-validate-type-tOom5t-_.js} +1 -1
  153. package/dist/esm/{filepond-plugin-image-edit-ChS3tv_T.js → filepond-plugin-image-edit-F_8PCaA1.js} +1 -1
  154. package/dist/esm/{filepond-plugin-image-exif-orientation-iLQFxzEc.js → filepond-plugin-image-exif-orientation-myByjSqP.js} +1 -1
  155. package/dist/esm/{filepond-plugin-image-preview-Dm1gYrYZ.js → filepond-plugin-image-preview-qqR31pR_.js} +1 -1
  156. package/dist/esm/{index-BLzx0e6P.js → index-D6VagDRi.js} +10 -14
  157. package/dist/esm/{intlTelInput-BTOzA2B4.js → intlTelInput-B1ulDRaQ.js} +1 -1
  158. package/dist/esm/loader.js +3 -3
  159. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  160. package/dist/esm/salla-accordion_6.entry.js +9 -4
  161. package/dist/esm/salla-add-product-button_5.entry.js +3 -3
  162. package/dist/esm/salla-advertisement.entry.js +1 -1
  163. package/dist/esm/salla-alert_2.entry.js +3 -3
  164. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  165. package/dist/esm/salla-applied-filters.entry.js +1 -1
  166. package/dist/esm/salla-apps-icons.entry.js +1 -1
  167. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  168. package/dist/esm/salla-badge.entry.js +1 -1
  169. package/dist/esm/salla-basket-gap.entry.js +1 -1
  170. package/dist/esm/salla-bullet-delivery_3.entry.js +29 -8
  171. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  172. package/dist/esm/salla-cart-item-offers_2.entry.js +3 -3
  173. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  174. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  175. package/dist/esm/salla-comment-factors.entry.js +1 -1
  176. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  177. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  178. package/dist/esm/salla-contacts.entry.js +1 -1
  179. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  180. package/dist/esm/salla-count-down_2.entry.js +1 -1
  181. package/dist/esm/salla-custom-fields.entry.js +1 -1
  182. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  183. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  184. package/dist/esm/salla-filters-widget.entry.js +1 -1
  185. package/dist/esm/salla-filters.entry.js +1 -1
  186. package/dist/esm/salla-fulfillment-methods.entry.js +35 -17
  187. package/dist/esm/salla-gifting.entry.js +1 -1
  188. package/dist/esm/salla-hook.entry.js +1 -1
  189. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  190. package/dist/esm/salla-installment.entry.js +1 -1
  191. package/dist/esm/salla-list-tile.entry.js +1 -1
  192. package/dist/esm/salla-localization-modal.entry.js +1 -1
  193. package/dist/esm/salla-login-modal.entry.js +1 -1
  194. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  195. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  196. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  197. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  198. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  199. package/dist/esm/salla-loyalty.entry.js +1 -1
  200. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  201. package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
  202. package/dist/esm/salla-menu.entry.js +1 -1
  203. package/dist/esm/salla-metadata.entry.js +1 -1
  204. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  205. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  206. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  207. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  208. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  209. package/dist/esm/salla-offer-modal.entry.js +1 -1
  210. package/dist/esm/salla-offer.entry.js +1 -1
  211. package/dist/esm/salla-order-branch.entry.js +1 -1
  212. package/dist/esm/salla-order-cancel.entry.js +1 -1
  213. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  214. package/dist/esm/salla-order-details-options.entry.js +1 -1
  215. package/dist/esm/salla-order-details.entry.js +1 -1
  216. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  217. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  218. package/dist/esm/salla-order-edit.entry.js +1 -1
  219. package/dist/esm/salla-order-shipments.entry.js +1 -1
  220. package/dist/esm/salla-order-summary.entry.js +1 -1
  221. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  222. package/dist/esm/salla-orders.entry.js +1 -1
  223. package/dist/esm/salla-payments.entry.js +4 -4
  224. package/dist/esm/salla-placeholder.entry.js +1 -1
  225. package/dist/esm/salla-price-range.entry.js +1 -1
  226. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  227. package/dist/esm/salla-product-card.entry.js +48 -13
  228. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  229. package/dist/esm/salla-products-list.entry.js +1 -1
  230. package/dist/esm/salla-products-slider.entry.js +1 -1
  231. package/dist/esm/salla-quick-order.entry.js +1 -1
  232. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  233. package/dist/esm/salla-rating-modal.entry.js +1 -1
  234. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  235. package/dist/esm/salla-review-order-item.entry.js +1 -1
  236. package/dist/esm/salla-scopes.entry.js +1 -1
  237. package/dist/esm/salla-search.entry.js +279 -33
  238. package/dist/esm/salla-skeleton.entry.js +2 -2
  239. package/dist/esm/salla-social-share.entry.js +2 -2
  240. package/dist/esm/salla-social.entry.js +2 -2
  241. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  242. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  243. package/dist/esm/salla-tooltip.entry.js +2 -2
  244. package/dist/esm/salla-trust-badges.entry.js +1 -1
  245. package/dist/esm/salla-user-menu.entry.js +3 -3
  246. package/dist/esm/salla-user-profile.entry.js +1 -1
  247. package/dist/esm/salla-user-settings.entry.js +2 -2
  248. package/dist/esm/salla-verify.entry.js +1 -1
  249. package/dist/esm/salla-wallet.entry.js +1 -1
  250. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  251. package/dist/esm/twilight.js +3 -3
  252. package/dist/esm/{vanilla-picker-CbIzx8P3.js → vanilla-picker-DvtnWkFb.js} +1 -1
  253. package/dist/twilight/{p-7767f3a7.entry.js → p-00dfdb20.entry.js} +1 -1
  254. package/dist/twilight/{p-1420e962.entry.js → p-019183b8.entry.js} +1 -1
  255. package/dist/twilight/{p-8e2f52b2.entry.js → p-02153797.entry.js} +1 -1
  256. package/dist/twilight/{p-67caf54b.entry.js → p-02a00a9d.entry.js} +1 -1
  257. package/dist/twilight/{p-eb9fca37.entry.js → p-04e90ca8.entry.js} +1 -1
  258. package/dist/twilight/{p-cb7bc39f.entry.js → p-06ba1041.entry.js} +1 -1
  259. package/dist/twilight/{p-2bd06384.entry.js → p-0d8c219a.entry.js} +1 -1
  260. package/dist/twilight/{p-ee463cf9.entry.js → p-0f1abf9a.entry.js} +1 -1
  261. package/dist/twilight/{p-809a0076.entry.js → p-13adff5c.entry.js} +1 -1
  262. package/dist/twilight/{p-d84a11b8.entry.js → p-155ec7a7.entry.js} +1 -1
  263. package/dist/twilight/{p-06c1c936.entry.js → p-16706fe0.entry.js} +1 -1
  264. package/dist/twilight/{p-96ded4cf.entry.js → p-17a708fc.entry.js} +1 -1
  265. package/dist/twilight/{p-6866b3d6.entry.js → p-18e32c1b.entry.js} +1 -1
  266. package/dist/twilight/{p-7ffa452c.entry.js → p-19fe876a.entry.js} +1 -1
  267. package/dist/twilight/{p-932e3bff.entry.js → p-267f1daf.entry.js} +1 -1
  268. package/dist/twilight/{p-2a5b180a.entry.js → p-3532893e.entry.js} +1 -1
  269. package/dist/twilight/{p-0416a2a8.entry.js → p-3cad36ef.entry.js} +1 -1
  270. package/dist/twilight/{p-18d0c69f.entry.js → p-3feabe9a.entry.js} +1 -1
  271. package/dist/twilight/{p-738ec366.entry.js → p-43c67b9f.entry.js} +1 -1
  272. package/dist/twilight/{p-c428c44b.entry.js → p-44d7890d.entry.js} +1 -1
  273. package/dist/twilight/{p-5f6c10d6.entry.js → p-451c2f06.entry.js} +1 -1
  274. package/dist/twilight/{p-1bfb9675.entry.js → p-466b2437.entry.js} +1 -1
  275. package/dist/twilight/{p-ed3fc3bb.entry.js → p-4dbed954.entry.js} +1 -1
  276. package/dist/twilight/{p-a0c97ac9.entry.js → p-4f29e469.entry.js} +1 -1
  277. package/dist/twilight/{p-f276a319.entry.js → p-51429c21.entry.js} +1 -1
  278. package/dist/twilight/{p-de3b3e41.entry.js → p-52212098.entry.js} +1 -1
  279. package/dist/twilight/{p-05490b44.entry.js → p-522a6125.entry.js} +1 -1
  280. package/dist/twilight/p-5381aac3.entry.js +4 -0
  281. package/dist/twilight/{p-a51931ba.entry.js → p-54034038.entry.js} +1 -1
  282. package/dist/twilight/{p-595bfef8.entry.js → p-56425cd0.entry.js} +1 -1
  283. package/dist/twilight/{p-9ef91e6b.entry.js → p-56cc9936.entry.js} +1 -1
  284. package/dist/twilight/{p-7f077279.entry.js → p-57a0bb62.entry.js} +1 -1
  285. package/dist/twilight/{p-f87ba34e.entry.js → p-5b22403c.entry.js} +1 -1
  286. package/dist/twilight/{p-a7801576.entry.js → p-5d247f18.entry.js} +1 -1
  287. package/dist/twilight/{p-6ea62f2b.entry.js → p-5dc636e9.entry.js} +1 -1
  288. package/dist/twilight/{p-210095ee.entry.js → p-61035e79.entry.js} +1 -1
  289. package/dist/twilight/{p-c4f963ea.entry.js → p-61ad5ff4.entry.js} +1 -1
  290. package/dist/twilight/{p-0c80fbcf.entry.js → p-685b00b1.entry.js} +1 -1
  291. package/dist/twilight/{p-6d8b0678.entry.js → p-7275e7da.entry.js} +1 -1
  292. package/dist/twilight/{p-c0fc7756.entry.js → p-731ac823.entry.js} +1 -1
  293. package/dist/twilight/{p-8d8c84d8.entry.js → p-7348f7e3.entry.js} +1 -1
  294. package/dist/twilight/{p-98e83214.entry.js → p-738d4d73.entry.js} +1 -1
  295. package/dist/twilight/{p-8b81811b.entry.js → p-75778e67.entry.js} +1 -1
  296. package/dist/twilight/{p-ada5f9db.entry.js → p-77305493.entry.js} +1 -1
  297. package/dist/twilight/{p-5bb8c263.entry.js → p-797317f9.entry.js} +1 -1
  298. package/dist/twilight/{p-407a73f4.entry.js → p-7cfcac49.entry.js} +1 -1
  299. package/dist/twilight/{p-3b4b1f29.entry.js → p-7e8965c3.entry.js} +1 -1
  300. package/dist/twilight/{p-fad4aa22.entry.js → p-879aeb99.entry.js} +1 -1
  301. package/dist/twilight/{p-9ddcdf20.entry.js → p-87baa963.entry.js} +1 -1
  302. package/dist/twilight/{p-be424137.entry.js → p-890845d7.entry.js} +1 -1
  303. package/dist/twilight/{p-c9d10c9f.entry.js → p-891abd9a.entry.js} +1 -1
  304. package/dist/twilight/{p-4cabeff6.entry.js → p-8fd6c03b.entry.js} +1 -1
  305. package/dist/twilight/{p-894fdcdd.entry.js → p-9060cf90.entry.js} +1 -1
  306. package/dist/twilight/{p-99a757ac.entry.js → p-90b20e78.entry.js} +1 -1
  307. package/dist/twilight/{p-46ba098a.entry.js → p-91daba79.entry.js} +1 -1
  308. package/dist/twilight/{p-a4175383.entry.js → p-96a761f3.entry.js} +1 -1
  309. package/dist/twilight/{p-a4b7ee47.entry.js → p-978695b4.entry.js} +1 -1
  310. package/dist/twilight/{p-96a13e17.entry.js → p-9bd0780a.entry.js} +1 -1
  311. package/dist/twilight/{p-CBW4kczX.js → p-B8n9WvuU.js} +1 -1
  312. package/dist/twilight/{p-BTjFfROl.js → p-BBCnGXmN.js} +1 -1
  313. package/dist/twilight/{p-BBCmWsAH.js → p-BE6LvdyS.js} +1 -1
  314. package/dist/twilight/{p-Bi7BjntU.js → p-CFzua46A.js} +1 -1
  315. package/dist/twilight/{p-oVUukCva.js → p-CsLeYzSv.js} +1 -1
  316. package/dist/twilight/{p-BLzx0e6P.js → p-D6VagDRi.js} +1 -1
  317. package/dist/twilight/{p-BqaOIJsE.js → p-DJ8VhVEV.js} +1 -1
  318. package/dist/twilight/{p-C_G6bYCk.js → p-DoD9b-8A.js} +1 -1
  319. package/dist/twilight/{p-BQGQ9tVS.js → p-Xs77W4g6.js} +1 -1
  320. package/dist/twilight/{p-47597499.entry.js → p-a07f577f.entry.js} +1 -1
  321. package/dist/twilight/{p-c69e0669.entry.js → p-a0ac1fbf.entry.js} +1 -1
  322. package/dist/twilight/{p-07b67ef6.entry.js → p-a1b0bcae.entry.js} +1 -1
  323. package/dist/twilight/{p-eb10186c.entry.js → p-ab11570d.entry.js} +1 -1
  324. package/dist/twilight/{p-2b7ca018.entry.js → p-aede1dd3.entry.js} +1 -1
  325. package/dist/twilight/{p-3a97face.entry.js → p-af61bed0.entry.js} +1 -1
  326. package/dist/twilight/{p-365745de.entry.js → p-b46fa954.entry.js} +1 -1
  327. package/dist/twilight/p-b5184b83.entry.js +4 -0
  328. package/dist/twilight/{p-86cd2898.entry.js → p-b55d6ca9.entry.js} +1 -1
  329. package/dist/twilight/{p-b36ca739.entry.js → p-b731bd2b.entry.js} +1 -1
  330. package/dist/twilight/{p-34f2d378.entry.js → p-b8739111.entry.js} +1 -1
  331. package/dist/twilight/{p-fa7966bd.entry.js → p-b8f46367.entry.js} +1 -1
  332. package/dist/twilight/{p-7d86bc77.entry.js → p-bb3df4d4.entry.js} +1 -1
  333. package/dist/twilight/{p-5cc80969.entry.js → p-bcc6a2c7.entry.js} +1 -1
  334. package/dist/twilight/{p-d1ba8e6e.entry.js → p-bf0e5c4b.entry.js} +1 -1
  335. package/dist/twilight/{p-bba884dc.entry.js → p-c0c80157.entry.js} +1 -1
  336. package/dist/twilight/{p-3cc1a9b8.entry.js → p-cbe27157.entry.js} +1 -1
  337. package/dist/twilight/{p-53285f66.entry.js → p-ce60b709.entry.js} +1 -1
  338. package/dist/twilight/{p-59ccfd64.entry.js → p-ced0ad45.entry.js} +1 -1
  339. package/dist/twilight/{p-6af36173.entry.js → p-d09195ba.entry.js} +1 -1
  340. package/dist/twilight/{p-3ba22519.entry.js → p-d25c8aeb.entry.js} +1 -1
  341. package/dist/twilight/{p-f602c556.entry.js → p-da8c1307.entry.js} +1 -1
  342. package/dist/twilight/{p-2c0870cb.entry.js → p-dd6a5747.entry.js} +1 -1
  343. package/dist/twilight/{p-5cbd36fb.entry.js → p-de5c4eb3.entry.js} +1 -1
  344. package/dist/twilight/{p-cd86c231.entry.js → p-e01c1fb9.entry.js} +1 -1
  345. package/dist/twilight/{p-61b6c754.entry.js → p-e1965ea1.entry.js} +1 -1
  346. package/dist/twilight/{p-7c859f0c.entry.js → p-e64d3e62.entry.js} +1 -1
  347. package/dist/twilight/{p-bc0bc63f.entry.js → p-e7b32e74.entry.js} +1 -1
  348. package/dist/twilight/p-e8393076.entry.js +4 -0
  349. package/dist/twilight/{p-45706908.entry.js → p-ebfb0b99.entry.js} +1 -1
  350. package/dist/twilight/{p-fa459971.entry.js → p-ef2354f0.entry.js} +1 -1
  351. package/dist/twilight/{p-81f8537a.entry.js → p-ef33b218.entry.js} +21 -21
  352. package/dist/twilight/p-f3540850.entry.js +4 -0
  353. package/dist/twilight/{p-7a19cb93.entry.js → p-f3cbbe3e.entry.js} +1 -1
  354. package/dist/twilight/{p-DY4LZmNP.js → p-gFG8By9O.js} +1 -1
  355. package/dist/twilight/{p-iB9dUe00.js → p-uMDizIlo.js} +1 -1
  356. package/dist/twilight/twilight.esm.js +1 -1
  357. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +10 -0
  358. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
  359. package/dist/types/components/salla-fulfillment-methods/salla-fulfillment-methods.d.ts +8 -2
  360. package/dist/types/components/salla-modal/salla-modal.d.ts +5 -0
  361. package/dist/types/components/salla-product-card/salla-product-card.d.ts +18 -0
  362. package/dist/types/components/salla-search/interfaces.d.ts +21 -0
  363. package/dist/types/components/salla-search/salla-search.d.ts +40 -2
  364. package/dist/types/components/salla-search/utils.d.ts +19 -0
  365. package/dist/types/components.d.ts +60 -4
  366. package/package.json +5 -5
  367. package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
  368. package/dist/esm/salla-map_2.entry.js +0 -832
  369. package/dist/twilight/p-05b66ce1.entry.js +0 -4
  370. package/dist/twilight/p-33e0d7b8.entry.js +0 -4
  371. package/dist/twilight/p-56b2f8d7.entry.js +0 -4
  372. package/dist/twilight/p-8a7bb785.entry.js +0 -4
  373. 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.querySelector('[slot="product"]')?.innerHTML || this.getDefaultProductSlot();
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.open().then(() => setTimeout(() => this.searchInput.focus(), 300));
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.value = '';
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.classList.remove('s-search-no-results');
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 = salla.url.get('search?q=' + encodeURI(this.search_term));
99
+ window.location.href = getSearchResultsUrl(this.search_term);
63
100
  }
64
101
  }
65
- getDefaultProductSlot() {
66
- return ('<div class="s-search-product-image-container">' +
67
- ' <img class="s-search-product-image" src="{image}" alt="{name}"/>' +
68
- '</div>' +
69
- '<div class="s-search-product-details">' +
70
- ' <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>' +
71
- '</div>');
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.value = truncatedInput;
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.style.display = isEmpty || this.results?.data.length > 0 ? 'none' : 'block';
124
- Helper.toggleElementClassIf(this.container, 's-search-container-open', 's-search-no-results', () => this.results?.data.length);
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.classList.remove('s-search-no-results') : '';
197
+ this.inputValue.length < 3 ? this.container?.classList.remove('s-search-no-results') : '';
128
198
  }
129
- render() {
130
- const searchContent = (h("div", { key: 'ca8dec5eb90cd0893a1a3364df34ba0ee4d60891', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, h("div", { key: '212f8180ecca220a8b89231311dec6cdf3ef0b06', class: "s-search-input-wrapper" }, h("span", { key: '51fb0f9a2e342afd35eb82b57f55471aa9e1519f', class: "s-search-icon-wrap" }, h("span", { key: 'e75117068c51c6d200e8e20fa0f00ca02ed0c61d', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), h("input", { key: '442b1704b75a33e8c9e02da8200151a1d8e8db72', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => (this.searchInput = input), style: {
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", { key: 'fdbb21061c599a59c6d828eec80e8d591a708cca', ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options')))));
143
- const modalContent = (h("salla-modal", { key: 'ca90aea3fb92d1ba7d8270c26e2ecd82d5018784', position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
144
- const placeholderContent = (h("div", { key: '73333ce51cabadc4963a9fe9d1372bb7d63925c8', class: "s-search-placeholder-wrapper s-search-inline" }, h("div", { key: '77a66e9bba504557160c8c50d91f1216cc68f253', class: "s-search-input-wrapper" }, h("span", { key: '18fb5ce6e3e72874e76dd1ef2c6db8718a68f778', class: "s-search-icon-wrap" }, h("span", { key: '63b9e9af1c51647df734cc4d5cf7a825b922ce38', class: "s-search-icon", innerHTML: Search })), h("button", { key: 'b70169ed2d80ec2ad6b09952ad104824610212df', type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
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
- } }, salla.lang.get('blocks.header.search_placeholder'))), modalContent));
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
- this.searchInput.value = this.getQueryParam('q');
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: '813e07447e4b3c51180345a38e82ffe135b6aec0', class: "s-searchable-dropdown" }, h("div", { key: '34eb275b53d173015a68bd2eeb93f1621eae47d1', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (h("label", { key: '3659b3ca3a882ea94656c37d2862cf2ebd0a6690', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: '9bbce65147d41fad44282ad04c0707b34ee12526', class: "s-searchable-dropdown-required" }, " *"))), h("div", { key: '177b983bf879eae9a4d191226c480cbb3abe21c1', class: {
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: '7887cee514ce9220a5974816700e7519c201183b', class: {
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: 'cbca93a72a5ec382903844c60f8fef8e77d46d92', class: {
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: '06f901a77c0ac9e2bfcfaa2823df51370163925c', class: "s-searchable-dropdown-search-wrap" }, h("i", { key: '5bc57c4e8022f53d1c7b64cde61fdc386c94bd65', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), h("input", { key: 'b6a3db42d1785326c4be15c58f3d37c34d221f9e', 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: 'aac10f08cd4ed51829f254990d11c103861f0984', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
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: '7b36da96585cfefe9aa96df6262be14f6a03c585', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: '568ae1bc0aeae182bb32468b19601c0245e9617d', class: classes }, "\u00A0")));
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: 'e7d69dbae46ef54588471875ada751103d14d393' }, h("ul", { key: 'ff4b15127e6664cca17fa7f6f49e4cda25829d74', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
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: 'cd2d10a50c7d07fb261471e7ca8e81891bc489e9', class: "s-social-share-wrapper" }, h("slot", { key: '94627cdb3aa11d3844c984d8890b13dc7e1f0e3c', name: "widget" }, h("salla-button", { key: '3b5ea25966484669a935e62ccbc3d383078337d8', "aria-label": "Share", onClick: () => this.handleShareClick(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: '3de3ea0b6f4843a24eeab1f7d6f0be3c8f85de41', innerHTML: this.opened ? Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
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: 'f5cfa9676bc8314149cb78e103b9ef580c0d7559', class: classes }, h("slot", { key: '1b86591377c09f1acb25cda20024b3af9c6a874d' })));
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: 'a9548ed2a74d30e6fcf365dbe26aa5f7fdab2468', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '547edd40aab5843c6035bd3c36a34d9449dc12d3' })),
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: 'e9054cb114c2bd66940b6afa98d7c7c230353a74', class: "s-tabs" }, h("div", { key: 'd245f64aef9b7fd77c9c51eb1d86ddfd9202e5fb', class: "s-tabs-header" }, h("slot", { key: 'f1b9a982cd746d637db5d514cb691f188af0cb7e', name: "header" })), h("div", { key: '0ba8441707b087a8c4d068b1a72bf10c8efb41cc', class: "s-tabs-content-wrapper" }, h("slot", { key: 'afcee28724a5a9ce263fcc3a38d624a631069945', name: "content" })))
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: '1b928e13a8d7784cba93a8a9295d5e2da59380ec', class: "s-tel-input" }, h("input", { key: '351a4e2ba8865b613a7c52127ef312f834116a59', 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: 'cac78f5eede19008d46a126c8c96cd963947de1f', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '7aedcb3f86d491f4789226f12812c7023d749eba', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
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: '84dfb23d4eb2689ff71b65c4a8b24dd36f8cb6ca', class: "s-tooltip-container" }, h("div", { key: '59d3bac320e20f99de1c4bf49531a61962190efc', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
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: '8a30c7a63785447ce4b5a37233a851056489b7a0', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: 'df325aab1249e9c6fbae8c9218cebe44cf3c627a', class: "s-user-settings-section" }, h("salla-list-tile", { key: '00b155f3cbdb38b97baaebc81b2f3f8ae41926c9' }, h("div", { key: '79e8eaf77e59e8228bc8a68adb55975a1400aea0', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '98e985a057595b1e136d77c8bda2951fb82b1d3e', innerHTML: UserCancel })), h("div", { key: '9c05bf47eda1764880948705b1c78af50b973c94', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '4656a31e4818d1a0678400408c1082f5e738f764', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '636e6882149c8b692c01cb97ece48014bf284631', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '5633324ba6128911e955fbf53774f324a37ff136', class: "s-toggle" }, h("input", { key: 'cae5ee95e39ffc7ff3a1ecb86ca8cae9dc9583d9', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'd0cdd16ca6104f73f1653088cdf43d7a1d10da34', class: "s-toggle-switcher" })))))), h("div", { key: '781043a116e44c9e60c127faf121f59c010fad17', class: "s-user-settings-section" }, h("salla-list-tile", { key: '72784431a6acd24d12a2a66e9563c603900a1f4d' }, h("div", { key: '0f5ec3452bfb20918b44d99aad5146c2a8595286', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'cef5ba0f4cd4e64f995e654b0f566a11ed2e2f48', innerHTML: Bullhorn })), h("div", { key: '8632c4f75da95d01a2cbb8a89c415c3bdd6c10ff', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'd93b1336e6d09e32d620376083bc704e1edac337', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '7c4f5a8102521d98a230dec0b92ded0a37ff8eea', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '1b3419f9c933f1e20540fc70a79bdeba338e3dc6', class: "s-toggle" }, h("input", { key: '87ceb43f847b99552566579e2d0d878dbc8bf80a', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '15ddef5bcefe2b062983b0021cfaf03ad9f6cf95', 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))))))));
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() {