@salla.sa/twilight-components 2.14.444 → 2.14.445

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 (315) hide show
  1. package/dist/cjs/{filepond-Bbj7PmYR.js → filepond-DHzf3TcL.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CmQuPQcY.js → filepond-plugin-file-poster-BXm87rQo.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-sGTAJHie.js → filepond-plugin-file-validate-size-C5UIq4A2.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DhXaHZZZ.js → filepond-plugin-file-validate-type-DuhBUbfK.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-Cj8JCfAN.js → filepond-plugin-image-edit-B9-VYsWc.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-32JSai7q.js → filepond-plugin-image-exif-orientation-DMpSTznq.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-BKmavM3U.js → filepond-plugin-image-preview-CMGkdkZi.js} +1 -1
  8. package/dist/cjs/{functions-lGTNolKl.js → functions-9Nj0nrLx.js} +1 -1
  9. package/dist/cjs/{index-BjjfvdmF.js → index-DQZXng_4.js} +2 -2
  10. package/dist/cjs/{index-BSEEzSJv.js → index-rElwQMYM.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 +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +58 -42
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-gifting.cjs.entry.js +144 -38
  37. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  44. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  46. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit.cjs.entry.js +15 -4
  69. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  83. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  98. package/dist/cjs/{tracked-promise-BLOn0DiZ.js → tracked-promise-YvbHmmFp.js} +1 -1
  99. package/dist/cjs/twilight.cjs.js +2 -2
  100. package/dist/cjs/{vanilla-picker-C5CI4VSj.js → vanilla-picker-C02drqC1.js} +1 -1
  101. package/dist/collection/components/salla-gifting/salla-gifting.css +15 -0
  102. package/dist/collection/components/salla-gifting/salla-gifting.js +149 -36
  103. package/dist/collection/components/salla-order-edit/salla-order-edit.js +16 -4
  104. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +97 -41
  105. package/dist/components/index.js +2 -2
  106. package/dist/components/salla-gifting.js +170 -51
  107. package/dist/components/salla-order-edit.js +16 -4
  108. package/dist/components/salla-searchable-dropdown2.js +59 -41
  109. package/dist/esm/{filepond-BFX6xxhJ.js → filepond-D3RXwxDJ.js} +1 -1
  110. package/dist/esm/{filepond-plugin-file-poster-DwMxJsyL.js → filepond-plugin-file-poster-Bn0h-4qC.js} +1 -1
  111. package/dist/esm/{filepond-plugin-file-validate-size-BFwbB1wr.js → filepond-plugin-file-validate-size-CN-3nZup.js} +1 -1
  112. package/dist/esm/{filepond-plugin-file-validate-type-9VetG0aO.js → filepond-plugin-file-validate-type-BbLjL14b.js} +1 -1
  113. package/dist/esm/{filepond-plugin-image-edit-DqIgezI-.js → filepond-plugin-image-edit-Dr_0Kpj1.js} +1 -1
  114. package/dist/esm/{filepond-plugin-image-exif-orientation-B97i5tWf.js → filepond-plugin-image-exif-orientation-Bo8gf--w.js} +1 -1
  115. package/dist/esm/{filepond-plugin-image-preview-eGkx8PnH.js → filepond-plugin-image-preview-CkgdmQBn.js} +1 -1
  116. package/dist/esm/{functions-C1QgrjTx.js → functions-CsLl2GF-.js} +1 -1
  117. package/dist/esm/{index-BU_MkqNl.js → index-BZR5x5kv.js} +1 -1
  118. package/dist/esm/{index-CjquqEh1.js → index-DNtvpIPH.js} +2 -2
  119. package/dist/esm/loader.js +3 -3
  120. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  121. package/dist/esm/salla-accordion_6.entry.js +1 -1
  122. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  123. package/dist/esm/salla-advertisement.entry.js +1 -1
  124. package/dist/esm/salla-alert_2.entry.js +1 -1
  125. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  126. package/dist/esm/salla-apps-icons.entry.js +1 -1
  127. package/dist/esm/salla-badge.entry.js +1 -1
  128. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  129. package/dist/esm/salla-bullet-delivery_2.entry.js +58 -42
  130. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  131. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  132. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  133. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  134. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  135. package/dist/esm/salla-contacts.entry.js +1 -1
  136. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  137. package/dist/esm/salla-count-down.entry.js +1 -1
  138. package/dist/esm/salla-custom-fields.entry.js +1 -1
  139. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  140. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  141. package/dist/esm/salla-filters-widget.entry.js +1 -1
  142. package/dist/esm/salla-filters.entry.js +1 -1
  143. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  144. package/dist/esm/salla-gifting.entry.js +144 -38
  145. package/dist/esm/salla-hook.entry.js +1 -1
  146. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  147. package/dist/esm/salla-installment.entry.js +1 -1
  148. package/dist/esm/salla-list-tile.entry.js +1 -1
  149. package/dist/esm/salla-localization-modal.entry.js +1 -1
  150. package/dist/esm/salla-login-modal.entry.js +1 -1
  151. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  152. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  153. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  154. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  155. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  156. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  157. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  158. package/dist/esm/salla-loyalty.entry.js +1 -1
  159. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  160. package/dist/esm/salla-map.entry.js +1 -1
  161. package/dist/esm/salla-menu.entry.js +1 -1
  162. package/dist/esm/salla-metadata.entry.js +1 -1
  163. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  164. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  165. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  166. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  167. package/dist/esm/salla-notification-item.entry.js +1 -1
  168. package/dist/esm/salla-notifications.entry.js +1 -1
  169. package/dist/esm/salla-offer-modal.entry.js +1 -1
  170. package/dist/esm/salla-offer.entry.js +1 -1
  171. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  172. package/dist/esm/salla-order-details-options.entry.js +1 -1
  173. package/dist/esm/salla-order-details.entry.js +1 -1
  174. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  175. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  176. package/dist/esm/salla-order-edit.entry.js +15 -4
  177. package/dist/esm/salla-order-summary.entry.js +1 -1
  178. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  179. package/dist/esm/salla-orders.entry.js +1 -1
  180. package/dist/esm/salla-payments.entry.js +1 -1
  181. package/dist/esm/salla-placeholder.entry.js +1 -1
  182. package/dist/esm/salla-price-range.entry.js +1 -1
  183. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  184. package/dist/esm/salla-product-card_2.entry.js +1 -1
  185. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  186. package/dist/esm/salla-products-list.entry.js +1 -1
  187. package/dist/esm/salla-progress-bar.entry.js +1 -1
  188. package/dist/esm/salla-quick-order.entry.js +1 -1
  189. package/dist/esm/salla-rating-modal.entry.js +1 -1
  190. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  191. package/dist/esm/salla-scopes.entry.js +1 -1
  192. package/dist/esm/salla-search.entry.js +1 -1
  193. package/dist/esm/salla-skeleton.entry.js +1 -1
  194. package/dist/esm/salla-slider.entry.js +1 -1
  195. package/dist/esm/salla-social-share.entry.js +1 -1
  196. package/dist/esm/salla-social.entry.js +1 -1
  197. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  198. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  199. package/dist/esm/salla-tooltip.entry.js +1 -1
  200. package/dist/esm/salla-trust-badges.entry.js +1 -1
  201. package/dist/esm/salla-user-menu.entry.js +1 -1
  202. package/dist/esm/salla-user-profile.entry.js +1 -1
  203. package/dist/esm/salla-user-settings.entry.js +1 -1
  204. package/dist/esm/salla-verify.entry.js +1 -1
  205. package/dist/esm/salla-wallet.entry.js +1 -1
  206. package/dist/esm/{tracked-promise-CHodYJuF.js → tracked-promise-BnC5Z9K7.js} +1 -1
  207. package/dist/esm/twilight.js +3 -3
  208. package/dist/esm/{vanilla-picker-Dz2cnaJm.js → vanilla-picker-CF_W6ne1.js} +1 -1
  209. package/dist/twilight/{p-12383fc2.entry.js → p-007bf4b3.entry.js} +1 -1
  210. package/dist/twilight/{p-3376ea68.entry.js → p-0418d2eb.entry.js} +1 -1
  211. package/dist/twilight/{p-4fbe9195.entry.js → p-058d72ba.entry.js} +1 -1
  212. package/dist/twilight/{p-0bc373c3.entry.js → p-062e5544.entry.js} +1 -1
  213. package/dist/twilight/p-06496953.entry.js +4 -0
  214. package/dist/twilight/{p-ce3c2d87.entry.js → p-08344e0e.entry.js} +1 -1
  215. package/dist/twilight/{p-7b2f6272.entry.js → p-09aa60ca.entry.js} +1 -1
  216. package/dist/twilight/{p-0f268a17.entry.js → p-0aea9987.entry.js} +1 -1
  217. package/dist/twilight/{p-efca806c.entry.js → p-108fff84.entry.js} +1 -1
  218. package/dist/twilight/{p-4da7a36e.entry.js → p-13cbd6eb.entry.js} +1 -1
  219. package/dist/twilight/{p-d876814e.entry.js → p-14b4b77f.entry.js} +1 -1
  220. package/dist/twilight/{p-22ac20fb.entry.js → p-16e2e0a8.entry.js} +1 -1
  221. package/dist/twilight/p-185b629e.entry.js +4 -0
  222. package/dist/twilight/{p-4f7a053b.entry.js → p-186df566.entry.js} +1 -1
  223. package/dist/twilight/{p-b07ea02e.entry.js → p-2134195f.entry.js} +1 -1
  224. package/dist/twilight/{p-98404ee2.entry.js → p-2282abc4.entry.js} +1 -1
  225. package/dist/twilight/{p-041739c7.entry.js → p-28e39ff0.entry.js} +1 -1
  226. package/dist/twilight/{p-736037bf.entry.js → p-2b9deb4c.entry.js} +1 -1
  227. package/dist/twilight/{p-86cdc4f0.entry.js → p-2fb3d665.entry.js} +1 -1
  228. package/dist/twilight/{p-4858fee7.entry.js → p-318e0847.entry.js} +1 -1
  229. package/dist/twilight/{p-30159ed2.entry.js → p-34c2e75f.entry.js} +1 -1
  230. package/dist/twilight/{p-46aecc23.entry.js → p-38c677fb.entry.js} +1 -1
  231. package/dist/twilight/{p-d6d1a44f.entry.js → p-3953d2cc.entry.js} +1 -1
  232. package/dist/twilight/{p-549792e6.entry.js → p-3af39ede.entry.js} +1 -1
  233. package/dist/twilight/{p-bdb97cd6.entry.js → p-3da82405.entry.js} +1 -1
  234. package/dist/twilight/{p-c02a27a5.entry.js → p-4168d56d.entry.js} +1 -1
  235. package/dist/twilight/{p-51e355f4.entry.js → p-42e59b60.entry.js} +1 -1
  236. package/dist/twilight/{p-28503efc.entry.js → p-43e90789.entry.js} +1 -1
  237. package/dist/twilight/{p-7e5bd688.entry.js → p-455c6c0b.entry.js} +1 -1
  238. package/dist/twilight/{p-345fade3.entry.js → p-45f78030.entry.js} +1 -1
  239. package/dist/twilight/{p-c65eb0ee.entry.js → p-46bd695f.entry.js} +1 -1
  240. package/dist/twilight/{p-2c270887.entry.js → p-46f82b50.entry.js} +1 -1
  241. package/dist/twilight/{p-0aa1fc10.entry.js → p-52686e7d.entry.js} +1 -1
  242. package/dist/twilight/{p-386f7262.entry.js → p-52d2d246.entry.js} +1 -1
  243. package/dist/twilight/{p-432b5dc2.entry.js → p-53c2b30e.entry.js} +1 -1
  244. package/dist/twilight/{p-556d563d.entry.js → p-554e905e.entry.js} +1 -1
  245. package/dist/twilight/{p-9a029ffb.entry.js → p-561b7f43.entry.js} +1 -1
  246. package/dist/twilight/{p-cafc416d.entry.js → p-564007ad.entry.js} +1 -1
  247. package/dist/twilight/{p-113e46ae.entry.js → p-56bdf925.entry.js} +1 -1
  248. package/dist/twilight/{p-44bcc6ef.entry.js → p-589b4b5e.entry.js} +1 -1
  249. package/dist/twilight/{p-7a8e7d0f.entry.js → p-5da3194a.entry.js} +1 -1
  250. package/dist/twilight/{p-da47b179.entry.js → p-67a36054.entry.js} +1 -1
  251. package/dist/twilight/{p-dec3e314.entry.js → p-68fa49cc.entry.js} +1 -1
  252. package/dist/twilight/{p-b86e2768.entry.js → p-69498df8.entry.js} +1 -1
  253. package/dist/twilight/{p-OpqsYFJ7.js → p-6Cm0Ixpa.js} +2 -2
  254. package/dist/twilight/{p-c9403f34.entry.js → p-6c45e8fa.entry.js} +1 -1
  255. package/dist/twilight/{p-89c54193.entry.js → p-717782f4.entry.js} +1 -1
  256. package/dist/twilight/{p-9dc45831.entry.js → p-73409575.entry.js} +1 -1
  257. package/dist/twilight/{p-a85d96e2.entry.js → p-788c870c.entry.js} +1 -1
  258. package/dist/twilight/{p-9c3ff0a1.entry.js → p-7f805c47.entry.js} +1 -1
  259. package/dist/twilight/{p-48f717e0.entry.js → p-7ffd3938.entry.js} +1 -1
  260. package/dist/twilight/{p-0cc907b6.entry.js → p-819992c7.entry.js} +1 -1
  261. package/dist/twilight/{p-f933dbd9.entry.js → p-83a08f07.entry.js} +1 -1
  262. package/dist/twilight/{p-1ce6baf8.entry.js → p-86be6cee.entry.js} +1 -1
  263. package/dist/twilight/{p-6e230a2b.entry.js → p-87978156.entry.js} +1 -1
  264. package/dist/twilight/{p-b8acec24.entry.js → p-89bdd5e6.entry.js} +1 -1
  265. package/dist/twilight/{p-a3b2c406.entry.js → p-8d942086.entry.js} +1 -1
  266. package/dist/twilight/{p-2aa656f0.entry.js → p-8f0d2c32.entry.js} +1 -1
  267. package/dist/twilight/{p-f5a99491.entry.js → p-9b4d472b.entry.js} +1 -1
  268. package/dist/twilight/{p-d6b42548.entry.js → p-9e1f454d.entry.js} +1 -1
  269. package/dist/twilight/{p-CHlhCr-2.js → p-BGCZ19oG.js} +1 -1
  270. package/dist/twilight/{p-BAeNPoQd.js → p-Bc7fLLSC.js} +1 -1
  271. package/dist/twilight/{p-CiZS53-6.js → p-BxtnkpUH.js} +1 -1
  272. package/dist/twilight/{p-CZmvt3JS.js → p-C5-SqAXv.js} +1 -1
  273. package/dist/twilight/{p-XxMmLD82.js → p-CCzp4vsg.js} +1 -1
  274. package/dist/twilight/p-D9eZofcJ.js +4 -0
  275. package/dist/twilight/{p-4z9238xc.js → p-DEbQVTrF.js} +1 -1
  276. package/dist/twilight/{p-CjquqEh1.js → p-DNtvpIPH.js} +1 -1
  277. package/dist/twilight/{p-DcGM6DYo.js → p-D_Gt_HbS.js} +1 -1
  278. package/dist/twilight/{p-lbla8oyU.js → p-J5XAqGwq.js} +1 -1
  279. package/dist/twilight/{p-DizhqBLB.js → p-NWWejksc.js} +1 -1
  280. package/dist/twilight/{p-61ae022e.entry.js → p-a8aea13b.entry.js} +1 -1
  281. package/dist/twilight/{p-c191d2fc.entry.js → p-ab4d2172.entry.js} +1 -1
  282. package/dist/twilight/{p-9586467e.entry.js → p-ab565608.entry.js} +1 -1
  283. package/dist/twilight/{p-9aa7503c.entry.js → p-ada82ecc.entry.js} +1 -1
  284. package/dist/twilight/{p-d65cd0ca.entry.js → p-b25fd2a3.entry.js} +1 -1
  285. package/dist/twilight/{p-d47b2e4a.entry.js → p-bb2ecab7.entry.js} +1 -1
  286. package/dist/twilight/{p-dff8a0d3.entry.js → p-be76e4e7.entry.js} +1 -1
  287. package/dist/twilight/{p-87eaf990.entry.js → p-beb60b7e.entry.js} +1 -1
  288. package/dist/twilight/{p-f141b189.entry.js → p-c583a907.entry.js} +1 -1
  289. package/dist/twilight/{p-2ea272a5.entry.js → p-c81203f3.entry.js} +1 -1
  290. package/dist/twilight/{p-4532ccc9.entry.js → p-c86c3e12.entry.js} +1 -1
  291. package/dist/twilight/{p-bca4bdc7.entry.js → p-ccf623d3.entry.js} +1 -1
  292. package/dist/twilight/{p-40da7379.entry.js → p-d34e48ce.entry.js} +1 -1
  293. package/dist/twilight/{p-96be7ad7.entry.js → p-d618c0ee.entry.js} +1 -1
  294. package/dist/twilight/{p-ea7e46e8.entry.js → p-d6dba947.entry.js} +1 -1
  295. package/dist/twilight/{p-22c4ec76.entry.js → p-d8c3e606.entry.js} +1 -1
  296. package/dist/twilight/{p-b8a680fa.entry.js → p-db06baf6.entry.js} +1 -1
  297. package/dist/twilight/{p-89f289b8.entry.js → p-dd706055.entry.js} +1 -1
  298. package/dist/twilight/{p-e88b5134.entry.js → p-df7d2c53.entry.js} +1 -1
  299. package/dist/twilight/{p-928752cf.entry.js → p-dfc9dac3.entry.js} +1 -1
  300. package/dist/twilight/{p-d5c2fe58.entry.js → p-e902b0b4.entry.js} +1 -1
  301. package/dist/twilight/{p-271228e8.entry.js → p-eb8a0d2f.entry.js} +1 -1
  302. package/dist/twilight/{p-2d771a56.entry.js → p-ecb8c538.entry.js} +1 -1
  303. package/dist/twilight/{p-656f5c9f.entry.js → p-ed107904.entry.js} +1 -1
  304. package/dist/twilight/{p-658af936.entry.js → p-ee83c195.entry.js} +1 -1
  305. package/dist/twilight/{p-b1555436.entry.js → p-f48a00a8.entry.js} +1 -1
  306. package/dist/twilight/{p-f6741e14.entry.js → p-fa350b8c.entry.js} +1 -1
  307. package/dist/twilight/twilight.esm.js +1 -1
  308. package/dist/types/components/salla-gifting/salla-gifting.d.ts +23 -4
  309. package/dist/types/components/salla-order-edit/salla-order-edit.d.ts +4 -0
  310. package/dist/types/components/salla-searchable-dropdown/salla-searchable-dropdown.d.ts +8 -0
  311. package/dist/types/components.d.ts +18 -0
  312. package/package.json +5 -5
  313. package/dist/twilight/p-2a75ac14.entry.js +0 -4
  314. package/dist/twilight/p-644ab356.entry.js +0 -4
  315. package/dist/twilight/p-vtSaduZY.js +0 -4
@@ -6,13 +6,14 @@ import { a as anime } from './anime.es.js';
6
6
  import { I as IconArrowLeft } from './arrow-left.js';
7
7
  import { C as Cancel } from './cancel.js';
8
8
  import { S as SIGiftSharing } from './gift-sharing.js';
9
- import { d as defineCustomElement$b } from './salla-button2.js';
10
- import { d as defineCustomElement$a } from './salla-datetime-picker2.js';
11
- import { d as defineCustomElement$9 } from './salla-file-upload2.js';
12
- import { d as defineCustomElement$8 } from './salla-list-tile2.js';
13
- import { d as defineCustomElement$7 } from './salla-loading2.js';
14
- import { d as defineCustomElement$6 } from './salla-modal2.js';
15
- import { d as defineCustomElement$5 } from './salla-placeholder2.js';
9
+ import { d as defineCustomElement$c } from './salla-button2.js';
10
+ import { d as defineCustomElement$b } from './salla-datetime-picker2.js';
11
+ import { d as defineCustomElement$a } from './salla-file-upload2.js';
12
+ import { d as defineCustomElement$9 } from './salla-list-tile2.js';
13
+ import { d as defineCustomElement$8 } from './salla-loading2.js';
14
+ import { d as defineCustomElement$7 } from './salla-modal2.js';
15
+ import { d as defineCustomElement$6 } from './salla-placeholder2.js';
16
+ import { d as defineCustomElement$5 } from './salla-searchable-dropdown2.js';
16
17
  import { d as defineCustomElement$4 } from './salla-skeleton2.js';
17
18
  import { d as defineCustomElement$3 } from './salla-slider2.js';
18
19
  import { d as defineCustomElement$2 } from './salla-tel-input2.js';
@@ -30,7 +31,7 @@ var Alert = `<!-- Generated by IcoMoon.io -->
30
31
  </svg>
31
32
  `;
32
33
 
33
- const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}";
34
+ const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}";
34
35
 
35
36
  const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
36
37
  constructor() {
@@ -53,7 +54,17 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
53
54
  this.regions = [];
54
55
  this.selectedRegionId = undefined;
55
56
  this.isKSA = false;
57
+ this.selectedCountry = null;
58
+ this.selectedRegion = null;
59
+ this.displayedCities = [];
60
+ this.selectedCity = null;
61
+ this.searchingCities = false;
62
+ this.enableCityAjaxSearch = false;
63
+ this.citySearchQuery = '';
56
64
  this.step2Animated = false;
65
+ this.citySearchTimer = null;
66
+ this.citySearchCounter = 0;
67
+ this.locationRequestCounter = 0;
57
68
  this.showTextArea = false;
58
69
  /// Gift Form Data
59
70
  this.selectedImage = undefined;
@@ -67,6 +78,50 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
67
78
  * The form selector to be used to get the form data
68
79
  */
69
80
  this.formSelector = 'form.product-form, form.form--product-options';
81
+ this.handleCitySearch = (query) => {
82
+ this.citySearchQuery = query;
83
+ if (!this.enableCityAjaxSearch)
84
+ return;
85
+ if (this.citySearchTimer)
86
+ clearTimeout(this.citySearchTimer);
87
+ const requestId = ++this.citySearchCounter;
88
+ this.citySearchTimer = setTimeout(async () => {
89
+ this.searchingCities = true;
90
+ try {
91
+ const cities = await this.fetchCities(query);
92
+ if (requestId === this.citySearchCounter) {
93
+ this.displayedCities = cities;
94
+ }
95
+ }
96
+ catch (e) {
97
+ if (requestId === this.citySearchCounter) {
98
+ this.displayedCities = [];
99
+ }
100
+ }
101
+ finally {
102
+ if (requestId === this.citySearchCounter) {
103
+ this.searchingCities = false;
104
+ }
105
+ }
106
+ }, SallaGifting.CITY_SEARCH_DEBOUNCE_MS);
107
+ };
108
+ this.handleCitySelected = (city) => {
109
+ this.selectedCity = city;
110
+ this.receiverCity = String(city.id);
111
+ this.clearError('receiver.city_id');
112
+ };
113
+ this.handleCityDropdownClosed = () => {
114
+ this.citySearchQuery = '';
115
+ if (this.citySearchTimer) {
116
+ clearTimeout(this.citySearchTimer);
117
+ this.citySearchTimer = null;
118
+ }
119
+ ++this.citySearchCounter;
120
+ this.displayedCities = this.gift?.cities ?? [];
121
+ this.searchingCities = false;
122
+ };
123
+ this.handleCountryDropdownClosed = () => { };
124
+ this.handleRegionDropdownClosed = () => { };
70
125
  salla.lang.onLoaded(() => {
71
126
  this.selectImageOrUpload = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');
72
127
  this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
@@ -340,24 +395,58 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
340
395
  this.receiverName = event.target.value;
341
396
  this.clearError('receiver.name');
342
397
  }
343
- handleReceiverCity(event) {
344
- this.receiverCity = event.target.value;
345
- this.clearError('receiver.city_id');
398
+ resetCityState() {
399
+ if (this.citySearchTimer) {
400
+ clearTimeout(this.citySearchTimer);
401
+ this.citySearchTimer = null;
402
+ }
403
+ ++this.citySearchCounter;
404
+ this.gift = { ...this.gift, cities: [] };
405
+ this.displayedCities = [];
406
+ this.receiverCity = undefined;
407
+ this.selectedCity = null;
408
+ this.citySearchQuery = '';
409
+ this.searchingCities = false;
410
+ this.enableCityAjaxSearch = false;
411
+ }
412
+ setInitialCities(cities) {
413
+ this.gift = { ...this.gift, cities };
414
+ this.displayedCities = cities;
415
+ this.enableCityAjaxSearch = cities.length >= SallaGifting.CITY_AJAX_THRESHOLD;
416
+ }
417
+ async fetchCities(query = '') {
418
+ if (!this.selectedCountryId)
419
+ return [];
420
+ if (this.isKSA && !this.selectedRegionId)
421
+ return [];
422
+ const params = [
423
+ 'for_branch=0',
424
+ `country_id=${this.selectedCountryId}`,
425
+ ];
426
+ if (this.isKSA && this.selectedRegionId) {
427
+ params.push(`region_id=${this.selectedRegionId}`);
428
+ }
429
+ if (query?.trim()) {
430
+ params.push(`query=${encodeURIComponent(query.trim())}`);
431
+ }
432
+ const response = await salla.api.request(`shipping/cities?${params.join('&')}`);
433
+ return response?.data ?? [];
346
434
  }
347
- async handleCountryChange(event) {
348
- const countryId = Number(event.target.value);
435
+ async handleCountrySelected(country) {
436
+ const countryId = country?.id;
437
+ this.selectedCountry = country ?? null;
349
438
  this.selectedCountryId = countryId;
439
+ this.selectedCountryCode = country?.country_code;
440
+ this.isKSA = country?.country_code === 'SA';
350
441
  this.clearError('receiver.country');
351
- // Find the selected country and store its country_code
352
- const selectedCountry = this.gift?.countries?.find(country => country.id == countryId);
353
- this.selectedCountryCode = selectedCountry?.country_code;
354
- this.isKSA = selectedCountry?.country_code === 'SA';
355
- // Reset region and city
442
+ // Reset region and city; bump request counter so in-flight loads from a
443
+ // previous country/region selection get discarded when they resolve.
356
444
  this.regions = [];
357
445
  this.selectedRegionId = undefined;
358
- this.gift = { ...this.gift, cities: [] };
359
- this.receiverCity = undefined;
360
- if (!countryId || this.gift?.countries?.length === 0) {
446
+ this.selectedRegion = null;
447
+ this.resetCityState();
448
+ const requestId = ++this.locationRequestCounter;
449
+ if (!countryId) {
361
450
  this.selectedCountryCode = undefined;
362
451
  this.isKSA = false;
363
452
  this.setWrapperHeight(2, 0, 0);
@@ -369,16 +458,22 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
369
458
  this.setWrapperHeight(2, 0, 0);
370
459
  try {
371
460
  const response = await salla.api.request(`shipping/countries/${countryId}/regions`);
461
+ if (requestId !== this.locationRequestCounter)
462
+ return;
372
463
  if (response && response.data) {
373
464
  this.regions = response.data;
374
465
  }
375
466
  }
376
467
  catch (error) {
468
+ if (requestId !== this.locationRequestCounter)
469
+ return;
377
470
  console.error('Error fetching regions:', error);
378
471
  }
379
472
  finally {
380
- this.loadingRegions = false;
381
- this.setWrapperHeight(2, 0, 0);
473
+ if (requestId === this.locationRequestCounter) {
474
+ this.loadingRegions = false;
475
+ this.setWrapperHeight(2, 0, 0);
476
+ }
382
477
  }
383
478
  }
384
479
  else {
@@ -386,41 +481,51 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
386
481
  this.loadingCities = true;
387
482
  this.setWrapperHeight(2, 0, 0);
388
483
  try {
389
- const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${countryId}`);
390
- if (response && response.data) {
391
- this.gift = { ...this.gift, cities: response.data };
392
- }
484
+ const cities = await this.fetchCities();
485
+ if (requestId !== this.locationRequestCounter)
486
+ return;
487
+ this.setInitialCities(cities);
393
488
  }
394
489
  catch (error) {
490
+ if (requestId !== this.locationRequestCounter)
491
+ return;
395
492
  console.error('Error fetching cities:', error);
396
493
  }
397
494
  finally {
398
- this.loadingCities = false;
495
+ if (requestId === this.locationRequestCounter) {
496
+ this.loadingCities = false;
497
+ }
399
498
  }
400
499
  }
401
500
  }
402
- async handleRegionChange(event) {
403
- const regionId = Number(event.target.value);
501
+ async handleRegionSelected(region) {
502
+ const regionId = region?.id;
503
+ this.selectedRegion = region ?? null;
404
504
  this.selectedRegionId = regionId;
405
505
  this.clearError('receiver.region');
406
- // Reset city when region changes
407
- this.gift = { ...this.gift, cities: [] };
408
- this.receiverCity = undefined;
506
+ // Reset city when region changes; bump request counter so any earlier
507
+ // in-flight city fetch (for a previous region) is discarded on resolve.
508
+ this.resetCityState();
509
+ const requestId = ++this.locationRequestCounter;
409
510
  if (!regionId)
410
511
  return;
411
512
  this.loadingCities = true;
412
513
  try {
413
- const response = await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}&region_id=${regionId}`);
414
- if (response && response.data) {
415
- this.gift = { ...this.gift, cities: response.data };
416
- }
514
+ const cities = await this.fetchCities();
515
+ if (requestId !== this.locationRequestCounter)
516
+ return;
517
+ this.setInitialCities(cities);
417
518
  }
418
519
  catch (error) {
520
+ if (requestId !== this.locationRequestCounter)
521
+ return;
419
522
  console.error('Error fetching cities:', error);
420
523
  }
421
524
  finally {
422
- this.loadingCities = false;
423
- this.setWrapperHeight(2, 0, 0);
525
+ if (requestId === this.locationRequestCounter) {
526
+ this.loadingCities = false;
527
+ this.setWrapperHeight(2, 0, 0);
528
+ }
424
529
  }
425
530
  }
426
531
  handleUploadImage(img) {
@@ -565,7 +670,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
565
670
  }
566
671
  render() {
567
672
  return [
568
- h("div", { key: '2bc4ff1b223c9b1f2e50e36c7f6e6f0448f5a51d' }, h("salla-list-tile", { key: 'b5cf74b6d00c292a1c654c695d316a0a34e70c30', class: this.generateClass() }, h("div", { key: '2e229e46039a9bbf071bc65534733c9da61545f8', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: 'b067244c213dd0c3c64f795f07b4c27f57c661f5' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'a8804b65526bfde36bbb82302d667bc10052ff4b', slot: "subtitle" }, h("div", { key: 'cf2ca350ab3884baa192ce1c043719eb8f9a0120' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'f68182d4324c4b56893b63e046e4298c519e449e', slot: "action" }, h("salla-button", { key: '6cf71ec0311dfe7804f4634ae1203e0ae65150be', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '9b00d0c0c7a594e7e9635a79a6b4a472da73ebe3', name: "widget-btn-content" }, h("div", { key: 'a73ed9d6322c4484180f68e7c8fb7a3b4e5bdb8a', class: "s-gifting-widget-action-content" }, h("span", { key: '0ce7ec753ab1ec30269127a8426a36d55d983a6e', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: 'ae35a5669a30e7abb61e5d540224c2be5baae82a' }, this.sectionBtnText)))))), h("salla-modal", { key: 'dee19984ecc71f6e10c330121361359d00408448', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '10eee2481652b157c44b16d34097ffcce9325d81', slot: "loading" }, h("div", { key: '325446006a0bf5d6d480c8935912fe976ccd453d', class: "s-gifting-skeleton" }, h("div", { key: 'f256cc302b946906262450f0bb023912d034aa13', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '75bf0e81841a4c41e4105f19bd3e4fbf67ece325', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '64661720e2f94f6d8b86087d3a03538a1a419202', class: "s-gifting-modal-title" }, h("div", { key: 'd5000d6903f5a7b61beb6a0a88291953e1344ba3', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '07efd33b877468df617bab4cd2f1b73e73f2d284', height: '15px', width: '150px' })))), h("div", { key: '6fb9d9abf7e211a6ecc45ee50283d37d1755b220', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: 'ed76848f4c017334dea4f12c07ec6556646c397f', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'cfe3e107536dac9e5b1524770eb6990ab3b6460b', height: '230px' }), h("salla-skeleton", { key: 'a35af25d98f5758bf442759841536fed09f6cdd2', height: '10px', width: '150px' }), h("salla-skeleton", { key: '6950704fb24a07807542723f2752b6a734090d42', height: '30px' }), h("salla-skeleton", { key: 'bd65f98a07ee8d041434b9b475ce4c355318f586', height: '40px' })))), h("slot", { key: 'e946b5c7a4146d0118d321d860d332d17c3f931e', name: "header" }), !!this.hasError ?
673
+ h("div", { key: 'db700f9ec96a6974f3b815bb017ebe97ae8fe5c0' }, h("salla-list-tile", { key: '1e2fd1c0b375c85fcd4af1ea071c36879e6913c5', class: this.generateClass() }, h("div", { key: 'a9d02c933bc13bf8765e7e91ce08b2c9495954e5', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: '56bd850368806c6ed5770ea5f6b0339749a77dfa' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'fbb4940fd3e3578f2f5a479d9d44be8dfbda7e43', slot: "subtitle" }, h("div", { key: 'fb7e8532984fbfc6fd61c55a6d44d7cdbb4bc9a2' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '04f27f1ddbfa0b06be111b6c3176fbda5ea6d43a', slot: "action" }, h("salla-button", { key: 'fe71a1a773e5275ede7d1b3ea535c330688028b7', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'd62127d30254df2d8add55e0e1dbcfefb686e359', name: "widget-btn-content" }, h("div", { key: '5ddbb695af142baf3bb6986627f97a7a7607eb31', class: "s-gifting-widget-action-content" }, h("span", { key: '7820fb6abd9d7a9c1035c0f80191a3ff2a4c5fe8', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: '2cfc69862d3d087375efaed3bcec0ff0c1587989' }, this.sectionBtnText)))))), h("salla-modal", { key: '32c19391248ba6186f43fea59493171079e7bf07', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'e4b5829416314f25793158dae0c530b8057b4085', slot: "loading" }, h("div", { key: '6ee873add5868f105b7ec7291c2a8c8fc033c588', class: "s-gifting-skeleton" }, h("div", { key: '40aae38f8b2d62b434394811a3ef6d8bc00f6f32', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'a652cd74a16d0db662ea4a518ebfab366a3c3899', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: 'edb4a1477893246e98207aeba7bfb5af686f20b9', class: "s-gifting-modal-title" }, h("div", { key: '83ef942b15450cc59ad32d8c5b3ba43a32bcb29c', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'd9041c777a2fa0aa7ffc752958c7441916a02f85', height: '15px', width: '150px' })))), h("div", { key: 'fe3bb9dad01becba87486c4886037fd67b059919', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '08bd8304b66264b70f6df68e64da3560a1f75461', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'bbea0d7ff0c846897af2ef5d3696b252a2f4e662', height: '230px' }), h("salla-skeleton", { key: '8cb1fde02e31a1accabd2e26409983e7ba56eeb1', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f80a986b953278bac41505506adf8d611566a167', height: '30px' }), h("salla-skeleton", { key: 'f7eccce69b619de385872642e1fb62b2cf6c3082', height: '40px' })))), h("slot", { key: 'd299e46040193b441f8171d05e0048849e3df8d5', name: "header" }), !!this.hasError ?
569
674
  h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
570
675
  :
571
676
  [
@@ -578,14 +683,14 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
578
683
  h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
579
684
  h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
580
685
  h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
581
- h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCountryFieldLabel), h("select", { name: "country", class: "s-form-control", onChange: (event) => this.handleCountryChange(event), required: true }, h("option", { value: "" }, this.selectCountry), this.gift?.countries?.map((country) => (h("option", { value: country.id }, country.name)))), this.errors && this.errors['receiver.country'] ?
686
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.country'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-country` }, this.receiverCountryFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCountry, items: this.gift?.countries ?? [], selectedItem: this.selectedCountry, disabled: !this.gift?.countries?.length, required: true, inputId: `${this.hostId}-country`, searchable: false, keepParentScroll: true, onItemSelected: (e) => this.handleCountrySelected(e.detail), onDropdownClosed: () => this.handleCountryDropdownClosed() }), this.errors && this.errors['receiver.country'] ?
582
687
  h("span", { class: "s-gifting-error" }, this.errors['receiver.country']) : ''), this.isPhysical() && this.isKSA &&
583
- h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverRegionFieldLabel), h("select", { name: "region", class: "s-form-control", onChange: (event) => this.handleRegionChange(event), disabled: this.loadingRegions }, h("option", { value: "", selected: true }, this.loadingRegions ? salla.lang.get('common.elements.loading') : this.selectRegion), this.regions?.map((region) => (h("option", { value: region.id }, region.name)))), this.errors && this.errors['receiver.region'] ?
688
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.region'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-region` }, this.receiverRegionFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectRegion, items: this.regions ?? [], selectedItem: this.selectedRegion, loading: this.loadingRegions, disabled: this.loadingRegions || !this.regions?.length, required: true, inputId: `${this.hostId}-region`, searchable: false, keepParentScroll: true, onItemSelected: (e) => this.handleRegionSelected(e.detail), onDropdownClosed: () => this.handleRegionDropdownClosed() }), this.errors && this.errors['receiver.region'] ?
584
689
  h("span", { class: "s-gifting-error" }, this.errors['receiver.region']) : ''), this.isPhysical() &&
585
- h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverCityFieldLabel), h("select", { name: "city", "aria-label": salla.lang.get('blocks.buy_as_gift.select_city'), class: "s-form-control", onChange: (event) => this.handleReceiverCity(event), disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId) }, h("option", { value: "", selected: true }, this.loadingCities ? salla.lang.get('common.elements.loading') : this.selectCity), this.gift?.cities?.map((city) => (h("option", { value: city.id }, city.name)))), this.errors && this.errors['receiver.city_id'] ?
690
+ h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
586
691
  h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() &&
587
692
  h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
588
- ], h("slot", { key: '579cbbcc59818051def887c38e4d0eed6e690737', name: "footer" })))
693
+ ], h("slot", { key: 'bd8cd1628ed4282b177f0ddcd5fb93289c47b4d6', name: "footer" })))
589
694
  ];
590
695
  }
591
696
  static get style() { return sallaGiftingCss; }
@@ -641,6 +746,13 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
641
746
  "regions": [32],
642
747
  "selectedRegionId": [32],
643
748
  "isKSA": [32],
749
+ "selectedCountry": [32],
750
+ "selectedRegion": [32],
751
+ "displayedCities": [32],
752
+ "selectedCity": [32],
753
+ "searchingCities": [32],
754
+ "enableCityAjaxSearch": [32],
755
+ "citySearchQuery": [32],
644
756
  "parsedFormData": [32],
645
757
  "showTextArea": [32],
646
758
  "selectedImage": [32],
@@ -662,11 +774,13 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
662
774
  "close": [64],
663
775
  "goToStep2": [64]
664
776
  }]);
777
+ SallaGifting$1.CITY_AJAX_THRESHOLD = 400;
778
+ SallaGifting$1.CITY_SEARCH_DEBOUNCE_MS = 100;
665
779
  function defineCustomElement$1() {
666
780
  if (typeof customElements === "undefined") {
667
781
  return;
668
782
  }
669
- const components = ["salla-gifting", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-skeleton", "salla-slider", "salla-tel-input"];
783
+ const components = ["salla-gifting", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
670
784
  components.forEach(tagName => { switch (tagName) {
671
785
  case "salla-gifting":
672
786
  if (!customElements.get(tagName)) {
@@ -675,35 +789,40 @@ function defineCustomElement$1() {
675
789
  break;
676
790
  case "salla-button":
677
791
  if (!customElements.get(tagName)) {
678
- defineCustomElement$b();
792
+ defineCustomElement$c();
679
793
  }
680
794
  break;
681
795
  case "salla-datetime-picker":
682
796
  if (!customElements.get(tagName)) {
683
- defineCustomElement$a();
797
+ defineCustomElement$b();
684
798
  }
685
799
  break;
686
800
  case "salla-file-upload":
687
801
  if (!customElements.get(tagName)) {
688
- defineCustomElement$9();
802
+ defineCustomElement$a();
689
803
  }
690
804
  break;
691
805
  case "salla-list-tile":
692
806
  if (!customElements.get(tagName)) {
693
- defineCustomElement$8();
807
+ defineCustomElement$9();
694
808
  }
695
809
  break;
696
810
  case "salla-loading":
697
811
  if (!customElements.get(tagName)) {
698
- defineCustomElement$7();
812
+ defineCustomElement$8();
699
813
  }
700
814
  break;
701
815
  case "salla-modal":
702
816
  if (!customElements.get(tagName)) {
703
- defineCustomElement$6();
817
+ defineCustomElement$7();
704
818
  }
705
819
  break;
706
820
  case "salla-placeholder":
821
+ if (!customElements.get(tagName)) {
822
+ defineCustomElement$6();
823
+ }
824
+ break;
825
+ case "salla-searchable-dropdown":
707
826
  if (!customElements.get(tagName)) {
708
827
  defineCustomElement$5();
709
828
  }
@@ -39,6 +39,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
39
39
  this.addProductConfirmLoading = false;
40
40
  this.mobileProductsModalMounted = false;
41
41
  this.isMobileViewport = false;
42
+ this.isRTL = true;
42
43
  // Plain field (not @State): scroll-loading guard never affects rendering, so avoid re-render churn.
43
44
  this.mobileProductsListLoading = false;
44
45
  this.confirming = false;
@@ -81,6 +82,9 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
81
82
  };
82
83
  this.defaultProductsListSource = 'latest';
83
84
  this.debouncedProductSearch = salla.helpers.debounce((query) => this.applyProductSearch(query), 500);
85
+ salla.onReady(() => {
86
+ this.isRTL = salla.config.get('theme.is_rtl', true);
87
+ });
84
88
  }
85
89
  getParsedExcludedCategories() {
86
90
  if (!this.excludedCategories) {
@@ -434,6 +438,13 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
434
438
  this.navigateToOrder();
435
439
  }
436
440
  }
441
+ returnToOrderDetails() {
442
+ this.confirming = true;
443
+ this.navigateToOrder();
444
+ }
445
+ getConfirmButtonIconClass() {
446
+ return this.isRTL ? 'sicon-keyboard_arrow_left' : 'sicon-keyboard_arrow_right';
447
+ }
437
448
  async cancelEditSession() {
438
449
  try {
439
450
  await salla.order.api.cancelEditSession(this.orderId);
@@ -483,7 +494,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
483
494
  const hasRemainingAmount = preview?.totals?.remaining_amount?.amount > 0;
484
495
  const hasRefundAmount = preview?.totals?.refund_amount?.amount > 0;
485
496
  const taxAmount = preview?.totals?.tax?.amount?.amount;
486
- return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", onModalVisibilityChanged: async (e) => {
497
+ return (h("salla-modal", { ref: modal => (this.saveModal = modal), width: "md", isClosable: false, onModalVisibilityChanged: async (e) => {
487
498
  if (!e.detail) {
488
499
  this.editPreview = null;
489
500
  if (!this.confirming) {
@@ -491,7 +502,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
491
502
  }
492
503
  this.confirming = false;
493
504
  }
494
- } }, h("div", { class: "s-order-edit-modal" }, h("h2", { class: "s-order-edit-modal-title" }, salla.lang.getWithDefault('pages.orders.edit_summary_title', 'ملخص الطلب بعد التعديل')), preview?.items?.length > 0 && (h("div", { class: "s-order-edit-modal-items" }, preview.items.map(item => {
505
+ } }, h("div", { class: "s-order-edit-modal" }, h("h2", { class: "s-order-edit-modal-title" }, salla.lang.getWithDefault('pages.orders.edit_summary_title', 'ملخص الطلب بعد التعديل')), h("p", { class: "s-order-edit-modal-subtitle" }, salla.lang.getWithDefault('pages.orders.cart_edits_saved', 'Your cart edits have been saved')), preview?.items?.length > 0 && (h("div", { class: "s-order-edit-modal-items" }, preview.items.map(item => {
495
506
  const orderItem = this.order?.items?.find(oi => oi.id == item.id);
496
507
  const imageUrl = orderItem?.product?.image?.url;
497
508
  const optionsLabel = item.options?.join('/ ');
@@ -500,7 +511,7 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
500
511
  ? salla.lang.getWithDefault('pages.orders.pay_difference', 'دفع فارق المبلغ')
501
512
  : hasRefundAmount
502
513
  ? salla.lang.getWithDefault('pages.orders.confirm_and_receive_difference', 'تأكيد واستلام فارق المبلغ')
503
- : salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class: "sicon-keyboard_arrow_left s-order-edit-modal-btn-icon" }))))));
514
+ : salla.lang.getWithDefault('pages.orders.confirm_changes', 'تأكيد التعديلات'), h("i", { class: `${this.getConfirmButtonIconClass()} s-order-edit-modal-btn-icon` })), h("salla-button", { color: 'gray', fill: "outline", onClick: () => this.returnToOrderDetails() }, salla.lang.getWithDefault('pages.orders.back_to_order_details', 'العودة إلى تفاصيل الطلب'))))));
504
515
  }
505
516
  render() {
506
517
  if (this.loading) {
@@ -540,7 +551,8 @@ const SallaOrderEdit$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderEdit e
540
551
  "addProductLoading": [32],
541
552
  "addProductConfirmLoading": [32],
542
553
  "mobileProductsModalMounted": [32],
543
- "isMobileViewport": [32]
554
+ "isMobileViewport": [32],
555
+ "isRTL": [32]
544
556
  }, [[0, "orderEditProductSelected", "handleProductSelected"], [0, "orderItemUpdated", "handleItemUpdated"], [0, "orderItemRemoved", "handleItemRemoved"]]]);
545
557
  function defineCustomElement$1() {
546
558
  if (typeof customElements === "undefined") {
@@ -23,6 +23,13 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
23
23
  this.searchQuery = '';
24
24
  this.clientSearch = false;
25
25
  this.dropUp = false;
26
+ this.searchable = true;
27
+ /**
28
+ * When true, the dropdown will NOT override the nearest scrollable ancestor's
29
+ * `overflow` to `visible` while open. Use this when the host (e.g. a modal
30
+ * body) needs to keep its own scrolling intact while the dropdown is open.
31
+ */
32
+ this.keepParentScroll = false;
26
33
  this.isOpen = false;
27
34
  this.focusedIndex = -1;
28
35
  this.clientSearchQuery = '';
@@ -36,14 +43,18 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
36
43
  }
37
44
  };
38
45
  this.handleTriggerKeyDown = (e) => {
39
- if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {
40
- e.preventDefault();
41
- if (!this.isOpen)
46
+ if (!this.isOpen) {
47
+ if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {
48
+ e.preventDefault();
42
49
  this.open();
50
+ }
51
+ else if (e.key === 'Escape') {
52
+ this.close();
53
+ }
54
+ return;
43
55
  }
44
- else if (e.key === 'Escape') {
45
- this.close();
46
- }
56
+ // When open without a search input, the trigger keeps focus and drives item navigation.
57
+ this.navigateItems(e);
47
58
  };
48
59
  this.handleSearchInputChange = (e) => {
49
60
  const value = e.target.value;
@@ -54,34 +65,7 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
54
65
  this.focusedIndex = -1;
55
66
  };
56
67
  this.handleSearchKeyDown = (e) => {
57
- const visibleItems = this.filteredItems;
58
- const itemCount = visibleItems.length;
59
- switch (e.key) {
60
- case 'ArrowDown':
61
- e.preventDefault();
62
- this.focusedIndex = itemCount > 0
63
- ? (this.focusedIndex + 1) % itemCount
64
- : -1;
65
- this.scrollFocusedIntoView();
66
- break;
67
- case 'ArrowUp':
68
- e.preventDefault();
69
- this.focusedIndex = itemCount > 0
70
- ? (this.focusedIndex - 1 + itemCount) % itemCount
71
- : -1;
72
- this.scrollFocusedIntoView();
73
- break;
74
- case 'Enter':
75
- e.preventDefault();
76
- if (this.focusedIndex >= 0 && this.focusedIndex < itemCount) {
77
- this.selectItem(visibleItems[this.focusedIndex]);
78
- }
79
- break;
80
- case 'Escape':
81
- e.preventDefault();
82
- this.close();
83
- break;
84
- }
68
+ this.navigateItems(e);
85
69
  };
86
70
  }
87
71
  connectedCallback() {
@@ -144,9 +128,11 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
144
128
  return;
145
129
  this.isOpen = true;
146
130
  this.focusedIndex = -1;
147
- this.scrollableAncestor = this.findScrollableAncestor();
148
- if (this.scrollableAncestor) {
149
- this.scrollableAncestor.style.overflow = 'visible';
131
+ if (!this.keepParentScroll) {
132
+ this.scrollableAncestor = this.findScrollableAncestor();
133
+ if (this.scrollableAncestor) {
134
+ this.scrollableAncestor.style.overflow = 'visible';
135
+ }
150
136
  }
151
137
  this.dropdownOpened.emit();
152
138
  requestAnimationFrame(() => this.searchInputRef?.focus());
@@ -163,6 +149,36 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
163
149
  }
164
150
  this.dropdownClosed.emit();
165
151
  }
152
+ navigateItems(e) {
153
+ const visibleItems = this.filteredItems;
154
+ const itemCount = visibleItems.length;
155
+ switch (e.key) {
156
+ case 'ArrowDown':
157
+ e.preventDefault();
158
+ this.focusedIndex = itemCount > 0
159
+ ? (this.focusedIndex + 1) % itemCount
160
+ : -1;
161
+ this.scrollFocusedIntoView();
162
+ break;
163
+ case 'ArrowUp':
164
+ e.preventDefault();
165
+ this.focusedIndex = itemCount > 0
166
+ ? (this.focusedIndex - 1 + itemCount) % itemCount
167
+ : -1;
168
+ this.scrollFocusedIntoView();
169
+ break;
170
+ case 'Enter':
171
+ e.preventDefault();
172
+ if (this.focusedIndex >= 0 && this.focusedIndex < itemCount) {
173
+ this.selectItem(visibleItems[this.focusedIndex]);
174
+ }
175
+ break;
176
+ case 'Escape':
177
+ e.preventDefault();
178
+ this.close();
179
+ break;
180
+ }
181
+ }
166
182
  scrollFocusedIntoView() {
167
183
  if (this.focusedIndex < 0)
168
184
  return;
@@ -179,18 +195,18 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
179
195
  render() {
180
196
  const hasSelection = this.selectedItem != null;
181
197
  const listboxId = `${this.inputId}-listbox`;
182
- return (h(Host, { key: '3545a75c07ae7c2a2c82ee54fa710f6f5d8bcfce', class: "s-searchable-dropdown" }, h("div", { key: '022fb98602228c5837cadb758f24f00956fafc22', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (h("label", { key: '24e09036df24d45ce74799ec06b20b03df866866', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: '94277d1659f2b22c96de02a77a37920eefff13ef', class: "s-searchable-dropdown-required" }, " *"))), h("div", { key: '077e0662f0570c1bf9339577e7699d75f9b337de', class: {
198
+ return (h(Host, { key: 'c529f2b61adbc38aa1e5403da6fdb985fe256baa', class: "s-searchable-dropdown" }, h("div", { key: '88ab96afd36421fdf965b79298fa14f435adbcef', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (h("label", { key: '6ee8a2d0428e1347e36eabec32a3129897481abc', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: '8473884ec18e73c72c79e7749264bd9c24c56ae9', class: "s-searchable-dropdown-required" }, " *"))), h("div", { key: 'bffbea7ff0cb9466c8a852a841a21ed8351ef92d', class: {
183
199
  's-searchable-dropdown-trigger': true,
184
200
  's-searchable-dropdown-trigger--disabled': this.disabled || this.loading,
185
201
  's-searchable-dropdown-trigger--open': this.isOpen,
186
- }, 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: '134a95003036f1c8a7df91a06542178e6ec12c04', class: {
202
+ }, 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: 'e3aee1ffe1b80a9ef21f4c9cca02de0a590b0825', class: {
187
203
  'sicon-keyboard_arrow_down': true,
188
204
  's-searchable-dropdown-trigger-icon': true,
189
205
  's-searchable-dropdown-trigger-icon--open': this.isOpen,
190
- }, "aria-hidden": "true" })), this.isOpen && (h("div", { key: 'be6eb6c94d4b73c27959722ccb4bc87722035d1c', class: {
206
+ }, "aria-hidden": "true" })), this.isOpen && (h("div", { key: '7a19f2d6847b3e0dda5e0ea509df91a2f48fa098', class: {
191
207
  's-searchable-dropdown-panel': true,
192
208
  's-searchable-dropdown-panel--up': this.dropUp,
193
- }, ref: (el) => (this.panelRef = el) }, h("div", { key: 'd97ce90a0fd26043a45c1a45616f8fde621e8ac5', class: "s-searchable-dropdown-search-wrap" }, h("i", { key: 'c7683e2dd873306e18afea983bb410827d883796', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), h("input", { key: '64c4259b6c5453a9b1cb5985c58c65dd01ec139f', 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: '9748f507fcb884b520ffc847800cc3543546b8ce', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
209
+ }, ref: (el) => (this.panelRef = el) }, this.searchable && (h("div", { key: '601529f76a09762a57fe7b7663ecfa1505462367', class: "s-searchable-dropdown-search-wrap" }, h("i", { key: 'f91e464e7efed3759837880b5a7593daa4f84ecb', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), h("input", { key: 'f72a7e12d0a6e90bab3983258c9b08aa286bc897', 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: '495aa88fc76d3d17956db7277cc98aff08b4c1af', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
194
210
  }
195
211
  renderListContent() {
196
212
  if (this.searching || this.loading) {
@@ -231,6 +247,8 @@ const SallaSearchableDropdown = /*@__PURE__*/ proxyCustomElement(class SallaSear
231
247
  "searchQuery": [1, "search-query"],
232
248
  "clientSearch": [4, "client-search"],
233
249
  "dropUp": [4, "drop-up"],
250
+ "searchable": [4],
251
+ "keepParentScroll": [4, "keep-parent-scroll"],
234
252
  "isOpen": [32],
235
253
  "focusedIndex": [32],
236
254
  "clientSearchQuery": [32]
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-CjquqEh1.js';
4
+ import { d as getDefaultExportFromCjs } from './index-DNtvpIPH.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {