@salla.sa/twilight-components 2.14.499 → 2.14.501

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 (477) hide show
  1. package/dist/cjs/catalog-recommendations-Bzt0HRy8.js +94 -0
  2. package/dist/cjs/{filepond-D03qhsrx.js → filepond-YItpCyss.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-BYNMDvVv.js → filepond-plugin-file-poster-BAPK8RK2.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-CzffjUzS.js → filepond-plugin-file-validate-size--RuyRQn1.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-LygxJING.js → filepond-plugin-file-validate-type-CBvJsWh4.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-Dz_UgE3p.js → filepond-plugin-image-edit-CIZ-WDGk.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C9S6CL_q.js → filepond-plugin-image-exif-orientation-RE8rudTp.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CoshLC_A.js → filepond-plugin-image-preview-C17RG4r1.js} +1 -1
  9. package/dist/cjs/{functions-BuqfSCqe.js → functions-BYc4IT8l.js} +1 -1
  10. package/dist/cjs/{index-BiuRQfha.js → index-CB_WYB8k.js} +1 -1
  11. package/dist/cjs/{index-pecK0haA.js → index-CuQpJRcD.js} +6 -2
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +8 -20
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +269 -0
  22. package/dist/cjs/salla-booking-field_7.cjs.entry.js +17 -17
  23. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +5 -5
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +210 -31
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
  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_8.cjs.entry.js +5 -5
  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 +4 -3
  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 +3 -3
  38. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
  41. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  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 +2 -2
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +10 -10
  49. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +9 -9
  50. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +2 -2
  53. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  54. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  55. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +4 -4
  56. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
  58. package/dist/cjs/salla-map_2.cjs.entry.js +4 -4
  59. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +4 -4
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
  66. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
  68. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  74. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +2 -2
  76. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
  82. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-product-card_2.cjs.entry.js +6 -6
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
  86. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +2 -2
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +6 -6
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  96. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  104. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  107. package/dist/cjs/{tracked-promise-D3H-BAQh.js → tracked-promise-XZchciB1.js} +1 -1
  108. package/dist/cjs/twilight.cjs.js +2 -2
  109. package/dist/cjs/{vanilla-picker-NZhSBHbI.js → vanilla-picker-DcFuBceg.js} +1 -1
  110. package/dist/collection/collection-manifest.json +2 -1
  111. package/dist/collection/components/salla-basket-gap/salla-basket-gap.css +3 -0
  112. package/dist/collection/components/salla-basket-gap/salla-basket-gap.js +306 -0
  113. package/dist/collection/components/salla-bought-together/salla-bought-together.js +5 -17
  114. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +63 -0
  115. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +211 -30
  116. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
  117. package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
  118. package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
  119. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
  120. package/dist/collection/components/salla-count-down/salla-count-down.js +3 -2
  121. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  122. package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
  123. package/dist/collection/components/salla-filters/salla-filters.js +1 -1
  124. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
  125. package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
  126. package/dist/collection/components/salla-hook/salla-hook.js +1 -1
  127. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  128. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  129. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  130. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  131. package/dist/collection/components/salla-loyalty-points-history/salla-loyalty-points-history.js +1 -1
  132. package/dist/collection/components/salla-loyalty-program/salla-loyalty-exchange-product-card.js +2 -2
  133. package/dist/collection/components/salla-loyalty-program/salla-loyalty-hero.js +3 -3
  134. package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +4 -4
  135. package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
  136. package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
  137. package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
  138. package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +1 -1
  139. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  140. package/dist/collection/components/salla-map/salla-map.js +3 -3
  141. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
  142. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  143. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
  144. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
  145. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
  146. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  147. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  148. package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
  149. package/dist/collection/components/salla-order-edit/salla-order-edit-product-card.js +1 -1
  150. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  151. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  152. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  153. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  154. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  155. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  156. package/dist/collection/components/salla-product-card-embed/salla-product-card-embed.js +1 -1
  157. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  158. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  159. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  160. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  161. package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +1 -1
  162. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  163. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  164. package/dist/collection/components/salla-search/salla-search.js +5 -5
  165. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
  166. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  167. package/dist/collection/components/salla-social/salla-social.js +1 -1
  168. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  169. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  170. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  171. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  172. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  173. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  174. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  175. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  176. package/dist/collection/shared/catalog-recommendations.js +89 -0
  177. package/dist/components/catalog-recommendations.js +91 -0
  178. package/dist/components/index.js +2 -2
  179. package/dist/components/salla-basket-gap.d.ts +11 -0
  180. package/dist/components/salla-basket-gap.js +402 -0
  181. package/dist/components/salla-bought-together.js +5 -17
  182. package/dist/components/salla-cart-coupons.js +211 -30
  183. package/dist/components/salla-cart-summary.js +1 -1
  184. package/dist/components/salla-color-picker2.js +1 -1
  185. package/dist/components/salla-comment-form2.js +1 -1
  186. package/dist/components/salla-conditional-fields2.js +1 -1
  187. package/dist/components/salla-count-down2.js +3 -2
  188. package/dist/components/salla-datetime-picker2.js +1 -1
  189. package/dist/components/salla-file-upload2.js +2 -2
  190. package/dist/components/salla-filters-widget2.js +2 -2
  191. package/dist/components/salla-filters.js +1 -1
  192. package/dist/components/salla-gifting.js +2 -2
  193. package/dist/components/salla-hook.js +1 -1
  194. package/dist/components/salla-list-tile2.js +1 -1
  195. package/dist/components/salla-loading2.js +1 -1
  196. package/dist/components/salla-localization-modal.js +1 -1
  197. package/dist/components/salla-loyalty-exchange-product-card2.js +2 -2
  198. package/dist/components/salla-loyalty-hero2.js +3 -3
  199. package/dist/components/salla-loyalty-point2.js +4 -4
  200. package/dist/components/salla-loyalty-points-history.js +1 -1
  201. package/dist/components/salla-loyalty-prize-item.js +1 -1
  202. package/dist/components/salla-loyalty-reward.js +2 -2
  203. package/dist/components/salla-maintenance-alert.js +1 -1
  204. package/dist/components/salla-map2.js +3 -3
  205. package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
  206. package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
  207. package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
  208. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  209. package/dist/components/salla-multiple-bundle-product.js +1 -1
  210. package/dist/components/salla-notification-item2.js +1 -1
  211. package/dist/components/salla-offer-modal.js +1 -1
  212. package/dist/components/salla-order-details.js +1 -1
  213. package/dist/components/salla-order-edit-product-card.js +1 -1
  214. package/dist/components/salla-order-summary.js +1 -1
  215. package/dist/components/salla-payments.js +2 -2
  216. package/dist/components/salla-placeholder2.js +1 -1
  217. package/dist/components/salla-price-range2.js +2 -2
  218. package/dist/components/salla-product-availability2.js +1 -1
  219. package/dist/components/salla-product-card-embed.js +1 -1
  220. package/dist/components/salla-product-card2.js +5 -5
  221. package/dist/components/salla-product-size-guide.js +2 -2
  222. package/dist/components/salla-quantity-input2.js +1 -1
  223. package/dist/components/salla-quick-buy2.js +1 -1
  224. package/dist/components/salla-review-card2.js +1 -1
  225. package/dist/components/salla-review-factors-tags.js +1 -1
  226. package/dist/components/salla-reviews-page.js +1 -1
  227. package/dist/components/salla-reviews.js +1 -1
  228. package/dist/components/salla-reward-card2.js +1 -1
  229. package/dist/components/salla-reward-details2.js +3 -3
  230. package/dist/components/salla-reward-exchange2.js +1 -1
  231. package/dist/components/salla-search.js +5 -5
  232. package/dist/components/salla-searchable-dropdown2.js +4 -4
  233. package/dist/components/salla-skeleton2.js +1 -1
  234. package/dist/components/salla-social-share2.js +1 -1
  235. package/dist/components/salla-social.js +1 -1
  236. package/dist/components/salla-tab-content2.js +1 -1
  237. package/dist/components/salla-tab-header2.js +1 -1
  238. package/dist/components/salla-tabs2.js +1 -1
  239. package/dist/components/salla-tel-input2.js +1 -1
  240. package/dist/components/salla-tooltip2.js +1 -1
  241. package/dist/components/salla-user-settings.js +1 -1
  242. package/dist/components/salla-wishlist-actions.js +1 -1
  243. package/dist/esm/catalog-recommendations-9fzJJ_Ox.js +91 -0
  244. package/dist/esm/{filepond-CJFgTJm9.js → filepond-DQgEXp69.js} +1 -1
  245. package/dist/esm/{filepond-plugin-file-poster-2z52H04r.js → filepond-plugin-file-poster-BE5-JUQb.js} +1 -1
  246. package/dist/esm/{filepond-plugin-file-validate-size-DEKIzgzx.js → filepond-plugin-file-validate-size-CwWpBym0.js} +1 -1
  247. package/dist/esm/{filepond-plugin-file-validate-type--IuNAFuU.js → filepond-plugin-file-validate-type-CovRSsjJ.js} +1 -1
  248. package/dist/esm/{filepond-plugin-image-edit-DV4s4m_8.js → filepond-plugin-image-edit-DY-5oWCU.js} +1 -1
  249. package/dist/esm/{filepond-plugin-image-exif-orientation-BicBedUH.js → filepond-plugin-image-exif-orientation-DQROYLkj.js} +1 -1
  250. package/dist/esm/{filepond-plugin-image-preview-68UNym7e.js → filepond-plugin-image-preview-CZCR-9d7.js} +1 -1
  251. package/dist/esm/{functions-sMyBqXp4.js → functions-DWD7tnLk.js} +1 -1
  252. package/dist/esm/{index-C_ccgsYC.js → index-DW5RMC3M.js} +6 -2
  253. package/dist/esm/{index-CZQUg3wR.js → index-VUPjm0uj.js} +1 -1
  254. package/dist/esm/loader.js +3 -3
  255. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  256. package/dist/esm/salla-accordion_6.entry.js +2 -2
  257. package/dist/esm/salla-add-product-button_5.entry.js +8 -20
  258. package/dist/esm/salla-advertisement.entry.js +1 -1
  259. package/dist/esm/salla-alert_2.entry.js +1 -1
  260. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  261. package/dist/esm/salla-apps-icons.entry.js +1 -1
  262. package/dist/esm/salla-badge.entry.js +1 -1
  263. package/dist/esm/salla-basket-gap.entry.js +267 -0
  264. package/dist/esm/salla-booking-field_7.entry.js +17 -17
  265. package/dist/esm/salla-bullet-delivery_2.entry.js +5 -5
  266. package/dist/esm/salla-cart-coupons.entry.js +210 -31
  267. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  268. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  269. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  270. package/dist/esm/salla-comment-factors.entry.js +1 -1
  271. package/dist/esm/salla-comment-form_8.entry.js +5 -5
  272. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  273. package/dist/esm/salla-contacts.entry.js +1 -1
  274. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  275. package/dist/esm/salla-count-down_2.entry.js +4 -3
  276. package/dist/esm/salla-custom-fields.entry.js +1 -1
  277. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  278. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  279. package/dist/esm/salla-filters-widget.entry.js +3 -3
  280. package/dist/esm/salla-filters.entry.js +2 -2
  281. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  282. package/dist/esm/salla-gifting.entry.js +3 -3
  283. package/dist/esm/salla-hook.entry.js +2 -2
  284. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  285. package/dist/esm/salla-installment.entry.js +1 -1
  286. package/dist/esm/salla-list-tile.entry.js +2 -2
  287. package/dist/esm/salla-localization-modal.entry.js +2 -2
  288. package/dist/esm/salla-login-modal.entry.js +1 -1
  289. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  290. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +10 -10
  291. package/dist/esm/salla-loyalty-hero_2.entry.js +9 -9
  292. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  293. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  294. package/dist/esm/salla-loyalty-points-history.entry.js +2 -2
  295. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  296. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  297. package/dist/esm/salla-loyalty-reward.entry.js +4 -4
  298. package/dist/esm/salla-loyalty.entry.js +1 -1
  299. package/dist/esm/salla-maintenance-alert.entry.js +2 -2
  300. package/dist/esm/salla-map_2.entry.js +4 -4
  301. package/dist/esm/salla-menu.entry.js +1 -1
  302. package/dist/esm/salla-metadata.entry.js +1 -1
  303. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +4 -4
  304. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
  305. package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
  306. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  307. package/dist/esm/salla-notification-item.entry.js +2 -2
  308. package/dist/esm/salla-notifications.entry.js +1 -1
  309. package/dist/esm/salla-offer-modal.entry.js +2 -2
  310. package/dist/esm/salla-offer.entry.js +1 -1
  311. package/dist/esm/salla-order-branch.entry.js +1 -1
  312. package/dist/esm/salla-order-cancel.entry.js +1 -1
  313. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  314. package/dist/esm/salla-order-details-options.entry.js +1 -1
  315. package/dist/esm/salla-order-details.entry.js +2 -2
  316. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  317. package/dist/esm/salla-order-edit-product-card.entry.js +2 -2
  318. package/dist/esm/salla-order-edit.entry.js +1 -1
  319. package/dist/esm/salla-order-summary.entry.js +2 -2
  320. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  321. package/dist/esm/salla-orders.entry.js +1 -1
  322. package/dist/esm/salla-payments.entry.js +3 -3
  323. package/dist/esm/salla-placeholder.entry.js +2 -2
  324. package/dist/esm/salla-price-range.entry.js +3 -3
  325. package/dist/esm/salla-product-card-embed.entry.js +2 -2
  326. package/dist/esm/salla-product-card_2.entry.js +6 -6
  327. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  328. package/dist/esm/salla-products-list.entry.js +1 -1
  329. package/dist/esm/salla-quick-order.entry.js +1 -1
  330. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  331. package/dist/esm/salla-rating-modal.entry.js +1 -1
  332. package/dist/esm/salla-review-factors-tags.entry.js +2 -2
  333. package/dist/esm/salla-scopes.entry.js +1 -1
  334. package/dist/esm/salla-search.entry.js +6 -6
  335. package/dist/esm/salla-skeleton.entry.js +2 -2
  336. package/dist/esm/salla-slider.entry.js +1 -1
  337. package/dist/esm/salla-social-share.entry.js +2 -2
  338. package/dist/esm/salla-social.entry.js +2 -2
  339. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  340. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  341. package/dist/esm/salla-tooltip.entry.js +2 -2
  342. package/dist/esm/salla-trust-badges.entry.js +1 -1
  343. package/dist/esm/salla-user-menu.entry.js +1 -1
  344. package/dist/esm/salla-user-profile.entry.js +1 -1
  345. package/dist/esm/salla-user-settings.entry.js +2 -2
  346. package/dist/esm/salla-verify.entry.js +1 -1
  347. package/dist/esm/salla-wallet.entry.js +1 -1
  348. package/dist/esm/salla-wishlist-actions.entry.js +2 -2
  349. package/dist/esm/{tracked-promise-Gd3pavcY.js → tracked-promise-CZ98bqyM.js} +1 -1
  350. package/dist/esm/twilight.js +3 -3
  351. package/dist/esm/{vanilla-picker-UVrpERET.js → vanilla-picker-DKozn4lm.js} +1 -1
  352. package/dist/twilight/{p-a7140774.entry.js → p-015a4d45.entry.js} +1 -1
  353. package/dist/twilight/{p-63441a3a.entry.js → p-0708708b.entry.js} +1 -1
  354. package/dist/twilight/{p-a9b57fbb.entry.js → p-0aea93dd.entry.js} +1 -1
  355. package/dist/twilight/{p-cac7ce02.entry.js → p-0f2f8564.entry.js} +1 -1
  356. package/dist/twilight/{p-02b057fa.entry.js → p-12f14fe5.entry.js} +1 -1
  357. package/dist/twilight/{p-aeb6d92c.entry.js → p-1453e674.entry.js} +1 -1
  358. package/dist/twilight/{p-18b40b2c.entry.js → p-17edd677.entry.js} +1 -1
  359. package/dist/twilight/{p-4a233372.entry.js → p-18209070.entry.js} +1 -1
  360. package/dist/twilight/p-1decfdb8.entry.js +4 -0
  361. package/dist/twilight/p-210de87e.entry.js +4 -0
  362. package/dist/twilight/{p-ffddd8cc.entry.js → p-234752f4.entry.js} +1 -1
  363. package/dist/twilight/{p-ffe26a36.entry.js → p-24f1c04b.entry.js} +1 -1
  364. package/dist/twilight/{p-bba5e521.entry.js → p-254d24b3.entry.js} +1 -1
  365. package/dist/twilight/{p-76290b12.entry.js → p-29b848f7.entry.js} +1 -1
  366. package/dist/twilight/p-2abf736c.entry.js +4 -0
  367. package/dist/twilight/{p-b925e462.entry.js → p-2bc1991c.entry.js} +1 -1
  368. package/dist/twilight/{p-71a539e8.entry.js → p-2fe13b65.entry.js} +1 -1
  369. package/dist/twilight/{p-85a4c32c.entry.js → p-33710edf.entry.js} +1 -1
  370. package/dist/twilight/{p-4f2c15c6.entry.js → p-3f47b71b.entry.js} +1 -1
  371. package/dist/twilight/{p-608dc0ae.entry.js → p-41b9b2ef.entry.js} +1 -1
  372. package/dist/twilight/{p-ff24a697.entry.js → p-42fb6aaa.entry.js} +1 -1
  373. package/dist/twilight/{p-296482fa.entry.js → p-44403dab.entry.js} +1 -1
  374. package/dist/twilight/{p-09542930.entry.js → p-47dd7a56.entry.js} +1 -1
  375. package/dist/twilight/{p-f1e49f36.entry.js → p-485cd05f.entry.js} +1 -1
  376. package/dist/twilight/{p-6ef8bbba.entry.js → p-494f93d5.entry.js} +1 -1
  377. package/dist/twilight/{p-f4678181.entry.js → p-4aaba2ae.entry.js} +1 -1
  378. package/dist/twilight/{p-aa0d53c8.entry.js → p-4e60702f.entry.js} +1 -1
  379. package/dist/twilight/p-4ed58afc.entry.js +4 -0
  380. package/dist/twilight/{p-59b38e97.entry.js → p-4f1b17ce.entry.js} +1 -1
  381. package/dist/twilight/{p-d62ac6c8.entry.js → p-4ff3fcc2.entry.js} +1 -1
  382. package/dist/twilight/{p-a0bcc854.entry.js → p-52465888.entry.js} +1 -1
  383. package/dist/twilight/{p-efa1e206.entry.js → p-527c985e.entry.js} +1 -1
  384. package/dist/twilight/{p-44f7f2a2.entry.js → p-5803461f.entry.js} +1 -1
  385. package/dist/twilight/{p-25fffbe6.entry.js → p-5c81f957.entry.js} +1 -1
  386. package/dist/twilight/{p-d09bcc84.entry.js → p-5f363172.entry.js} +1 -1
  387. package/dist/twilight/p-60096faf.entry.js +4 -0
  388. package/dist/twilight/{p-3d141203.entry.js → p-629b0300.entry.js} +1 -1
  389. package/dist/twilight/{p-022e10ba.entry.js → p-64bddbd4.entry.js} +1 -1
  390. package/dist/twilight/p-66b8ffe5.entry.js +4 -0
  391. package/dist/twilight/{p-0b6ae26e.entry.js → p-686e0e20.entry.js} +1 -1
  392. package/dist/twilight/{p-75fe9e68.entry.js → p-693d1afd.entry.js} +1 -1
  393. package/dist/twilight/{p-72bf2467.entry.js → p-6c2bd4d3.entry.js} +1 -1
  394. package/dist/twilight/{p-50d50a69.entry.js → p-6ea59d29.entry.js} +1 -1
  395. package/dist/twilight/p-753c2036.entry.js +4 -0
  396. package/dist/twilight/{p-dd2831f5.entry.js → p-7d4ea0b4.entry.js} +1 -1
  397. package/dist/twilight/{p-0e9b8853.entry.js → p-7d778acb.entry.js} +1 -1
  398. package/dist/twilight/{p-44f68d4a.entry.js → p-7fa1bb43.entry.js} +1 -1
  399. package/dist/twilight/{p-0bf87990.entry.js → p-8091c1bb.entry.js} +1 -1
  400. package/dist/twilight/{p-3d7adaef.entry.js → p-85238859.entry.js} +1 -1
  401. package/dist/twilight/{p-55ebca48.entry.js → p-86b6bf59.entry.js} +1 -1
  402. package/dist/twilight/p-8a550a9b.entry.js +4 -0
  403. package/dist/twilight/{p-644ff503.entry.js → p-8bd21221.entry.js} +1 -1
  404. package/dist/twilight/p-8c0b1195.entry.js +4 -0
  405. package/dist/twilight/p-8fded8e8.entry.js +4 -0
  406. package/dist/twilight/{p-e7f7e8cb.entry.js → p-90039201.entry.js} +1 -1
  407. package/dist/twilight/{p-C0fioW0d.js → p-9Gnw86AG.js} +2 -2
  408. package/dist/twilight/{p-253dcced.entry.js → p-9adcfb8f.entry.js} +1 -1
  409. package/dist/twilight/{p-f671cd4e.entry.js → p-9b4a8482.entry.js} +1 -1
  410. package/dist/twilight/{p-c1a45217.entry.js → p-9bfb9e67.entry.js} +1 -1
  411. package/dist/twilight/{p-3d38f2d2.entry.js → p-9c7ed057.entry.js} +1 -1
  412. package/dist/twilight/{p-07fb47b0.entry.js → p-9ea31b28.entry.js} +1 -1
  413. package/dist/twilight/p-9fzJJ_Ox.js +4 -0
  414. package/dist/twilight/{p-BFxC_J0K.js → p-BEd1gsDo.js} +1 -1
  415. package/dist/twilight/{p-CQB4Iqwr.js → p-BOGl7WKm.js} +1 -1
  416. package/dist/twilight/{p-eb_g_RAR.js → p-BOsr_t6U.js} +1 -1
  417. package/dist/twilight/{p-D_u6j3vO.js → p-Bk7FtCRB.js} +1 -1
  418. package/dist/twilight/{p-gPMLoyk9.js → p-BmLFLdi9.js} +1 -1
  419. package/dist/twilight/{p-CKa-ux_j.js → p-CTz-tTY_.js} +1 -1
  420. package/dist/twilight/{p-CirvTQDu.js → p-D6IFHeYy.js} +1 -1
  421. package/dist/twilight/{p-CkVpJQZp.js → p-DKReyChR.js} +1 -1
  422. package/dist/twilight/{p-C_ccgsYC.js → p-DW5RMC3M.js} +1 -1
  423. package/dist/twilight/{p-DVIjdKki.js → p-Dha9oJHi.js} +1 -1
  424. package/dist/twilight/{p-D6FE69fV.js → p-MxH_-y8s.js} +1 -1
  425. package/dist/twilight/{p-0755a7eb.entry.js → p-a7da83e9.entry.js} +1 -1
  426. package/dist/twilight/{p-ff2aa9cf.entry.js → p-a9d1a6ab.entry.js} +1 -1
  427. package/dist/twilight/{p-fced2ec8.entry.js → p-abffebe7.entry.js} +1 -1
  428. package/dist/twilight/{p-8cb54383.entry.js → p-b9babfe5.entry.js} +1 -1
  429. package/dist/twilight/{p-591a9387.entry.js → p-bc890bf3.entry.js} +1 -1
  430. package/dist/twilight/{p-0a4110f4.entry.js → p-bc935da0.entry.js} +1 -1
  431. package/dist/twilight/{p-fc25b7fa.entry.js → p-bd2359a7.entry.js} +1 -1
  432. package/dist/twilight/{p-b0dc296d.entry.js → p-bd7ba620.entry.js} +1 -1
  433. package/dist/twilight/{p-0828cbfb.entry.js → p-bdfb4b2b.entry.js} +1 -1
  434. package/dist/twilight/{p-a5cbcc70.entry.js → p-be13f6cf.entry.js} +1 -1
  435. package/dist/twilight/{p-1678ff12.entry.js → p-c0373e93.entry.js} +1 -1
  436. package/dist/twilight/{p-89069e7e.entry.js → p-c2019c1f.entry.js} +1 -1
  437. package/dist/twilight/{p-7470e25f.entry.js → p-c66582de.entry.js} +1 -1
  438. package/dist/twilight/{p-eebe8378.entry.js → p-cb675f91.entry.js} +1 -1
  439. package/dist/twilight/{p-fd50a634.entry.js → p-cc0b8dec.entry.js} +1 -1
  440. package/dist/twilight/{p-db12f03d.entry.js → p-ce06372f.entry.js} +1 -1
  441. package/dist/twilight/{p-9cc8570a.entry.js → p-ceb44ad7.entry.js} +1 -1
  442. package/dist/twilight/{p-65f517fa.entry.js → p-cfe4f808.entry.js} +2 -2
  443. package/dist/twilight/{p-eaf4df85.entry.js → p-d047a409.entry.js} +1 -1
  444. package/dist/twilight/p-d63533f2.entry.js +4 -0
  445. package/dist/twilight/{p-80ad24c8.entry.js → p-d649f426.entry.js} +1 -1
  446. package/dist/twilight/{p-38662602.entry.js → p-d89e140a.entry.js} +1 -1
  447. package/dist/twilight/{p-c067cc58.entry.js → p-daaa9ef7.entry.js} +1 -1
  448. package/dist/twilight/{p-dc215a04.entry.js → p-dbc38d79.entry.js} +1 -1
  449. package/dist/twilight/{p-41a439ab.entry.js → p-dd7a835b.entry.js} +1 -1
  450. package/dist/twilight/{p-ae55de48.entry.js → p-ddbaca65.entry.js} +1 -1
  451. package/dist/twilight/{p-4ab125bd.entry.js → p-e47540e1.entry.js} +1 -1
  452. package/dist/twilight/{p-3d58194d.entry.js → p-e8ada41e.entry.js} +1 -1
  453. package/dist/twilight/{p-b0f81a93.entry.js → p-e9a35a7f.entry.js} +1 -1
  454. package/dist/twilight/{p-fe95f82d.entry.js → p-ef77963a.entry.js} +1 -1
  455. package/dist/twilight/{p-bc66d65f.entry.js → p-f2416b6d.entry.js} +1 -1
  456. package/dist/twilight/{p-fe909382.entry.js → p-f9c12172.entry.js} +1 -1
  457. package/dist/twilight/{p-3a99909c.entry.js → p-fbc91885.entry.js} +1 -1
  458. package/dist/twilight/p-ff5a82a3.entry.js +4 -0
  459. package/dist/twilight/twilight.esm.js +1 -1
  460. package/dist/types/components/salla-basket-gap/salla-basket-gap.d.ts +52 -0
  461. package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +31 -3
  462. package/dist/types/components.d.ts +23 -0
  463. package/dist/types/shared/catalog-recommendations.d.ts +2 -0
  464. package/package.json +5 -5
  465. package/dist/collection/components/salla-conditional-offer/test/salla-conditional-offer.js +0 -12
  466. package/dist/twilight/p-376a4409.entry.js +0 -4
  467. package/dist/twilight/p-3abd511f.entry.js +0 -4
  468. package/dist/twilight/p-7bf1a8cd.entry.js +0 -4
  469. package/dist/twilight/p-82c60a4d.entry.js +0 -4
  470. package/dist/twilight/p-8e2ff581.entry.js +0 -4
  471. package/dist/twilight/p-8f99e8cf.entry.js +0 -4
  472. package/dist/twilight/p-997a77b4.entry.js +0 -4
  473. package/dist/twilight/p-9cbf064d.entry.js +0 -4
  474. package/dist/twilight/p-d2624bca.entry.js +0 -4
  475. package/dist/twilight/p-dbc5925e.entry.js +0 -4
  476. package/dist/twilight/p-fb8ba239.entry.js +0 -4
  477. package/dist/types/components/salla-conditional-offer/test/salla-conditional-offer.d.ts +0 -1
@@ -0,0 +1,269 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ var index = require('./index-CuQpJRcD.js');
7
+ var catalogRecommendations = require('./catalog-recommendations-Bzt0HRy8.js');
8
+
9
+ const sallaBasketGapCss = ":host{display:block}";
10
+
11
+ const SallaBasketGap = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ /**
15
+ * Maximum number of recommendations to fetch.
16
+ */
17
+ this.limit = 10;
18
+ this.products = [];
19
+ this.isLoading = true;
20
+ this.canRender = true;
21
+ this.title = '';
22
+ this.addToCartLabel = '';
23
+ this.weightLabel = '';
24
+ this.discountLabel = '';
25
+ this.placeholder = '';
26
+ this.fetchGeneration = 0;
27
+ this.isSyncingCart = false;
28
+ this.cartItemChangedHandler = (response) => {
29
+ const items = response?.data?.cart?.items ?? [];
30
+ const ids = items.map((i) => String(i.product_id)).filter(Boolean);
31
+ // Reflect a newly added product in the cart list without a full page refresh.
32
+ this.syncCartItemsDom(items);
33
+ this.fetchRecommendations(ids);
34
+ };
35
+ this.beforeAddItemHandler = (data) => {
36
+ const id = String(data?.id ?? '');
37
+ if (id && this.products.some((p) => String(p.id) === id) && salla.cart?.api) {
38
+ salla.cart.api.addToCartSource = 'basket_gap';
39
+ }
40
+ };
41
+ this.addButtonSuccessHandler = (event) => {
42
+ const productId = event?.target?.getAttribute?.('product-id');
43
+ if (!productId)
44
+ return;
45
+ const product = this.products.find((p) => String(p.id) === String(productId));
46
+ if (!product)
47
+ return;
48
+ const items = event?.detail?.data?.items ?? [];
49
+ const cartItem = items.find((i) => String(i.product_id) === String(product.id)) ?? items.slice(-1)[0];
50
+ salla.event.emit('salla-basket-gap::product.added', [{
51
+ product,
52
+ position: this.products.indexOf(product) + 1,
53
+ cartItem,
54
+ cartId: event?.detail?.data?.id,
55
+ source: 'basket_gap',
56
+ }]);
57
+ };
58
+ salla.lang.onLoaded(() => {
59
+ this.title = salla.lang.get('pages.cart.basket_gap_title');
60
+ this.addToCartLabel = salla.lang.get('pages.cart.add_to_cart');
61
+ this.weightLabel = salla.lang.get('pages.products.weight');
62
+ this.discountLabel = salla.lang.get('pages.products.discount');
63
+ });
64
+ }
65
+ componentWillLoad() {
66
+ salla.onReady().then(() => {
67
+ if (!salla.config.get('store.settings.cart.basket_gap')) {
68
+ this.canRender = false;
69
+ this.isLoading = false;
70
+ return;
71
+ }
72
+ this.title = salla.lang.get('pages.cart.basket_gap_title');
73
+ this.addToCartLabel = salla.lang.get('pages.cart.add_to_cart');
74
+ this.weightLabel = salla.lang.get('pages.products.weight');
75
+ this.discountLabel = salla.lang.get('pages.products.discount');
76
+ this.placeholder = salla.url.asset(salla.config.get('theme.settings.placeholder'));
77
+ const cachedCart = salla.storage.get('cart');
78
+ const cachedIds = (cachedCart?.items ?? []).map((i) => String(i.product_id)).filter(Boolean);
79
+ if (cachedIds.length) {
80
+ return this.fetchRecommendations(cachedIds);
81
+ }
82
+ return salla.api.cart.details()
83
+ .then(({ data: { cart } }) => {
84
+ const objectIDs = (cart?.items ?? []).map((i) => String(i.product_id)).filter(Boolean);
85
+ return this.fetchRecommendations(objectIDs);
86
+ })
87
+ .catch(() => {
88
+ this.canRender = false;
89
+ this.isLoading = false;
90
+ });
91
+ });
92
+ }
93
+ componentDidLoad() {
94
+ this.positionUnderCartItems();
95
+ }
96
+ componentDidUpdate() {
97
+ document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));
98
+ this.positionUnderCartItems();
99
+ }
100
+ /**
101
+ * Cart item rows on the storefront cart page (excluding the order-options block).
102
+ * Kept defensive: themes that don't use the `form[id^="item-"]` pattern return none.
103
+ */
104
+ getCartItemForms(root = document) {
105
+ return Array.from(root.querySelectorAll('form[id^="item-"]'))
106
+ .filter((form) => !form.closest('.cart-options'));
107
+ }
108
+ /**
109
+ * The component is injected at the theme's `cart:items.end` hook, which may sit
110
+ * below the order options/offers. Move the host to render directly under the
111
+ * cart items. No-ops when the cart item pattern isn't present.
112
+ */
113
+ positionUnderCartItems() {
114
+ const items = this.getCartItemForms();
115
+ const lastItem = items[items.length - 1];
116
+ if (lastItem && lastItem.nextElementSibling !== this.host) {
117
+ lastItem.after(this.host);
118
+ }
119
+ }
120
+ /**
121
+ * Reflect a newly added product in the cart list without a full page reload.
122
+ * The whole item list is replaced with the fresh server-rendered rows because
123
+ * Salla re-assigns cart line-item ids on add, so diffing by id would duplicate
124
+ * the existing rows. No-ops on themes without the cart item markup.
125
+ */
126
+ syncCartItemsDom(cartItems) {
127
+ if (!cartItems?.length || this.isSyncingCart)
128
+ return;
129
+ const missing = cartItems.filter((item) => !document.getElementById('item-' + item.id));
130
+ if (!missing.length)
131
+ return;
132
+ this.isSyncingCart = true;
133
+ fetch(window.location.href, { headers: { 'X-Requested-With': 'XMLHttpRequest' }, credentials: 'same-origin' })
134
+ .then((res) => res.text())
135
+ .then((html) => {
136
+ const doc = new DOMParser().parseFromString(html, 'text/html');
137
+ const freshForms = this.getCartItemForms(doc);
138
+ const currentForms = this.getCartItemForms();
139
+ if (!freshForms.length || !currentForms.length)
140
+ return;
141
+ const firstCurrent = currentForms[0];
142
+ const parent = firstCurrent.parentElement;
143
+ if (!parent)
144
+ return;
145
+ // Insert the fresh rows in place of the current ones, then drop the old rows.
146
+ freshForms.forEach((form) => {
147
+ parent.insertBefore(document.importNode(form, true), firstCurrent);
148
+ });
149
+ currentForms.forEach((form) => form.remove());
150
+ document.lazyLoadInstance?.update?.();
151
+ this.positionUnderCartItems();
152
+ })
153
+ .catch(() => { })
154
+ .finally(() => { this.isSyncingCart = false; });
155
+ }
156
+ connectedCallback() {
157
+ salla.event.on('cart::item.added', this.cartItemChangedHandler);
158
+ salla.event.on('cart::item.deleted', this.cartItemChangedHandler);
159
+ // Tag adds originating from a basket-gap recommendation so the cart auto-track
160
+ // is suppressed in favour of our attributed `salla-basket-gap::product.added`.
161
+ salla.event.on('cart::before.add.item', this.beforeAddItemHandler);
162
+ this.host.addEventListener('success', this.addButtonSuccessHandler);
163
+ }
164
+ disconnectedCallback() {
165
+ salla.event.off('cart::item.added', this.cartItemChangedHandler);
166
+ salla.event.off('cart::item.deleted', this.cartItemChangedHandler);
167
+ salla.event.off('cart::before.add.item', this.beforeAddItemHandler);
168
+ this.host.removeEventListener('success', this.addButtonSuccessHandler);
169
+ }
170
+ // The recommendation API receives at most 5 cart product IDs, so it can return
171
+ // products that are already in the cart (those beyond the 5-item payload limit).
172
+ // We filter them out here to avoid showing items the customer already has.
173
+ // cartProductIds may be passed in directly from a live event payload; otherwise
174
+ // we fall back to storage (which can lag behind on the initial load path).
175
+ getCartProductIds(knownIds) {
176
+ if (knownIds?.length)
177
+ return new Set(knownIds);
178
+ const cart = salla.storage.get('cart');
179
+ return new Set((cart?.items ?? []).map((i) => String(i.product_id)).filter(Boolean));
180
+ }
181
+ fetchRecommendations(objectIDs) {
182
+ if (!objectIDs.length) {
183
+ this.canRender = false;
184
+ this.isLoading = false;
185
+ return Promise.resolve();
186
+ }
187
+ const generation = ++this.fetchGeneration;
188
+ return catalogRecommendations.fetchCartBoughtTogether(objectIDs)
189
+ .then((ids) => {
190
+ if (generation !== this.fetchGeneration)
191
+ return;
192
+ // Pass objectIDs as the authoritative cart list so the filter is not
193
+ // affected by stale storage when called from a live cart event.
194
+ const cartIds = this.getCartProductIds(objectIDs);
195
+ const filteredIds = ids.filter(id => !cartIds.has(id));
196
+ if (!filteredIds.length) {
197
+ this.canRender = false;
198
+ return;
199
+ }
200
+ return this.fetchProducts(filteredIds.slice(0, this.limit), generation);
201
+ })
202
+ .catch(() => {
203
+ if (generation !== this.fetchGeneration)
204
+ return;
205
+ this.canRender = false;
206
+ })
207
+ .finally(() => {
208
+ if (generation !== this.fetchGeneration)
209
+ return;
210
+ this.isLoading = false;
211
+ });
212
+ }
213
+ fetchProducts(ids, generation) {
214
+ return salla.api.withoutNotifier(() => salla.product.api.fetch({
215
+ source: 'selected',
216
+ source_value: ids,
217
+ limit: this.limit,
218
+ })).then((response) => {
219
+ if (generation !== this.fetchGeneration)
220
+ return;
221
+ this.products = response?.data ?? [];
222
+ this.canRender = this.products.length > 0;
223
+ }).catch(() => {
224
+ if (generation !== this.fetchGeneration)
225
+ return;
226
+ this.canRender = false;
227
+ });
228
+ }
229
+ getDiscountLabel(product) {
230
+ if (product.promotion_title)
231
+ return product.promotion_title;
232
+ if (product.is_on_sale && product.regular_price > 0 && product.sale_price > 0) {
233
+ const percent = Math.round((1 - product.sale_price / product.regular_price) * 100);
234
+ return percent > 0 ? `${this.discountLabel} ${percent}%` : null;
235
+ }
236
+ return null;
237
+ }
238
+ formatDate(timestamp) {
239
+ const d = new Date(timestamp * 1000);
240
+ const mm = String(d.getMonth() + 1).padStart(2, '0');
241
+ const dd = String(d.getDate()).padStart(2, '0');
242
+ return `${d.getFullYear()}-${mm}-${dd}`;
243
+ }
244
+ getSkeletonView() {
245
+ return (index.h(index.Host, { class: "s-basket-gap-entry" }, index.h("div", { class: "s-basket-gap-skeleton" }, index.h("salla-skeleton", { height: "16px", width: "40%", style: { marginBottom: '16px' } }), Array(3).fill(null).map((_, i) => (index.h("div", { key: i, class: "s-basket-gap-skeleton-card" }, index.h("salla-skeleton", { height: "64px", width: "64px", style: { borderRadius: '8px', flexShrink: '0' } }), index.h("div", { class: "s-basket-gap-skeleton-info" }, index.h("salla-skeleton", { height: "14px", width: "50%" }), index.h("salla-skeleton", { height: "12px", width: "25%", style: { marginTop: '6px' } }), index.h("salla-skeleton", { height: "10px", width: "35%", style: { marginTop: '4px' } })), index.h("salla-skeleton", { height: "36px", width: "100px", style: { borderRadius: '6px', flexShrink: '0', marginInlineStart: 'auto' } })))))));
246
+ }
247
+ getProductCard(product) {
248
+ const discountLabel = this.getDiscountLabel(product);
249
+ return (index.h("div", { key: product.id, class: "s-basket-gap-card" }, index.h("a", { href: product.url, class: "s-basket-gap-card-image" }, index.h("img", { class: "lazy", src: this.placeholder, "data-src": product.image?.url, alt: product.image?.alt || product.name })), index.h("div", { class: "s-basket-gap-card-info" }, index.h("h3", { class: "s-basket-gap-card-name" }, index.h("a", { href: product.url }, product.name)), product.is_on_sale
250
+ ? index.h("div", { class: "s-basket-gap-card-sale-price" }, index.h("span", { innerHTML: salla.money(product.sale_price) }), index.h("del", { innerHTML: salla.money(product.regular_price) }))
251
+ : index.h("span", { class: "s-basket-gap-card-price", innerHTML: salla.money(product.price) }), product.weight_label && (index.h("span", { class: "s-basket-gap-card-weight" }, this.weightLabel, " ", product.weight_label))), (product.promotion_title || product.discount_ends || product.is_on_sale) && (index.h("div", { class: "s-basket-gap-card-offer" }, index.h("i", { class: "sicon-gift" }), discountLabel && index.h("span", null, discountLabel), product.discount_ends && [
252
+ index.h("salla-count-down", { date: this.formatDate(product.discount_ends), "end-of-day": true, digits: "en" }),
253
+ index.h("i", { class: "sicon-alarm" }),
254
+ ])), index.h("salla-add-product-button", { class: "s-basket-gap-card-btn", "product-id": product.id, "product-status": product.status, "product-type": product.type }, this.addToCartLabel)));
255
+ }
256
+ render() {
257
+ if (!this.canRender)
258
+ return null;
259
+ if (this.isLoading)
260
+ return this.getSkeletonView();
261
+ if (!this.products.length)
262
+ return null;
263
+ return (index.h(index.Host, { class: "s-basket-gap-entry" }, this.title && index.h("h2", { class: "s-basket-gap-title" }, this.title), index.h("div", { class: "s-basket-gap-list" }, this.products.map(product => this.getProductCard(product)))));
264
+ }
265
+ get host() { return index.getElement(this); }
266
+ };
267
+ SallaBasketGap.style = sallaBasketGapCss;
268
+
269
+ exports.salla_basket_gap = SallaBasketGap;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-pecK0haA.js');
6
+ var index = require('./index-CuQpJRcD.js');
7
7
  var calendar = require('./calendar-D-PUoCDH.js');
8
8
  var keyboard_arrow_down = require('./keyboard_arrow_down-DHJ3FFZq.js');
9
9
  var minus = require('./minus-CCryh1qf.js');
@@ -378,7 +378,7 @@ const SallaColorPicker = class {
378
378
  }
379
379
  }
380
380
  initColorPicker() {
381
- this.pickerReady = Promise.resolve().then(function () { return require('./vanilla-picker-NZhSBHbI.js'); }).then(function (n) { return n.vanillaPicker; }).then(mod => {
381
+ this.pickerReady = Promise.resolve().then(function () { return require('./vanilla-picker-DcFuBceg.js'); }).then(function (n) { return n.vanillaPicker; }).then(mod => {
382
382
  const Picker = mod.default;
383
383
  const picker = new Picker({
384
384
  parent: this.host,
@@ -398,7 +398,7 @@ const SallaColorPicker = class {
398
398
  });
399
399
  }
400
400
  render() {
401
- return (index.h(index.Host, { key: '4b648b7685b1d6601cb8b6e826d5eb716cbf4bba', class: "s-color-picker-main" }, index.h("slot", { key: '59afd795f1f5cce7d33b9e5c5e0e65be5db485f1', name: "widget" }, index.h("div", { key: '312878f910fc6c94b47bcd24319291f9db7e1d13', class: "s-color-picker-widget" }, index.h("div", { key: '1865cf384e4c6ecaef1ab2b35f8a6653304f6b9d', class: "s-color-picker-widget-canvas", ref: dv => (this.canvas = dv) }), index.h("span", { key: 'd92e8fbe87685abc27224d08e71f06ad216d6593', innerHTML: keyboard_arrow_down.ArrowDown }))), index.h("input", { key: 'df66b2b623c71acba891a3c02e7a02905d78861b', class: "s-hidden", name: this.name, required: this.required, value: this.color, ref: color => (this.colorInput = color) })));
401
+ return (index.h(index.Host, { key: '516a09b2d219b7c12dd251c68e6e55a9a9f7624b', class: "s-color-picker-main" }, index.h("slot", { key: 'ce684e4b8a8a80710688e3f0c0e43271069fc920', name: "widget" }, index.h("div", { key: 'f95ff1d709d58e22a4a74ccc35f8db2e17be7e38', class: "s-color-picker-widget" }, index.h("div", { key: 'fd2347378990972269557593a7182f2bf4cd9f98', class: "s-color-picker-widget-canvas", ref: dv => (this.canvas = dv) }), index.h("span", { key: 'e22a7ed6738b5fcbc22453e5b091eeeb7720719a', innerHTML: keyboard_arrow_down.ArrowDown }))), index.h("input", { key: 'b3f55c713a626808c6f36e4c1454abc26c97cb6e', class: "s-hidden", name: this.name, required: this.required, value: this.color, ref: color => (this.colorInput = color) })));
402
402
  }
403
403
  componentDidLoad() {
404
404
  if (this.canvas)
@@ -547,7 +547,7 @@ const SallaConditionalFields = class {
547
547
  });
548
548
  }
549
549
  render() {
550
- return (index.h(index.Host, { key: '65ddceb3d0fc1eff329762b0c9d1784f223dc1ee' }, index.h("slot", { key: 'ee65b749c141f8288b288705ba7750676bb68408' })));
550
+ return (index.h(index.Host, { key: 'badbb24a38a68127a6880ab4dbe0b0ae4730b11d' }, index.h("slot", { key: 'a9bdc41d3ded750f0ac5b0e4b5dea3618e02286a' })));
551
551
  }
552
552
  get host() { return index.getElement(this); }
553
553
  };
@@ -759,7 +759,7 @@ const SallaDatetimePicker = class {
759
759
  }
760
760
  }
761
761
  render() {
762
- return index.h("div", { key: '32645810d31bcc76582da3910ccaeac5b4490719', class: "s-datetime-picker" }, index.h("input", { key: 'ec579ffb806ff75829b6d0b5e6cb6da24a4b1bb3', type: "datetime", name: this.name, value: this.value, required: this.required, disabled: this.disabled, placeholder: this.placeholder, class: "s-datetime-picker-input", ref: (el) => this.dateInput = el }));
762
+ return index.h("div", { key: '10ac16506ca2b2b2a94227887a8d0b6593d7ac17', class: "s-datetime-picker" }, index.h("input", { key: 'fad4a5677edf21d9bd9a977392ebaf4ae2ad3b7b', type: "datetime", name: this.name, value: this.value, required: this.required, disabled: this.disabled, placeholder: this.placeholder, class: "s-datetime-picker-input", ref: (el) => this.dateInput = el }));
763
763
  }
764
764
  async componentDidLoad() {
765
765
  // Load flatpickr before initializing
@@ -838,13 +838,13 @@ const SallaFileUpload = class {
838
838
  return;
839
839
  try {
840
840
  const [FilePondModule, FilePondPluginFileValidateSize, FilePondPluginImageExifOrientation, FilePondPluginImagePreview, FilePondPluginImageEdit, FilePondPluginFileValidateType, FilePondPluginFilePoster] = await Promise.all([
841
- Promise.resolve().then(function () { return require('./filepond-D03qhsrx.js'); }).then(function (n) { return n.filepond; }),
842
- Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size-CzffjUzS.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
843
- Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-C9S6CL_q.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
844
- Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-CoshLC_A.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
845
- Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-Dz_UgE3p.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
846
- Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-LygxJING.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
847
- Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-BYNMDvVv.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
841
+ Promise.resolve().then(function () { return require('./filepond-YItpCyss.js'); }).then(function (n) { return n.filepond; }),
842
+ Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-size--RuyRQn1.js'); }).then(function (n) { return n.filepondPluginFileValidateSize; }),
843
+ Promise.resolve().then(function () { return require('./filepond-plugin-image-exif-orientation-RE8rudTp.js'); }).then(function (n) { return n.filepondPluginImageExifOrientation; }),
844
+ Promise.resolve().then(function () { return require('./filepond-plugin-image-preview-C17RG4r1.js'); }).then(function (n) { return n.filepondPluginImagePreview; }),
845
+ Promise.resolve().then(function () { return require('./filepond-plugin-image-edit-CIZ-WDGk.js'); }).then(function (n) { return n.filepondPluginImageEdit; }),
846
+ Promise.resolve().then(function () { return require('./filepond-plugin-file-validate-type-CBvJsWh4.js'); }).then(function (n) { return n.filepondPluginFileValidateType; }),
847
+ Promise.resolve().then(function () { return require('./filepond-plugin-file-poster-BAPK8RK2.js'); }).then(function (n) { return n.filepondPluginFilePoster; })
848
848
  ]);
849
849
  this.FilePond = FilePondModule;
850
850
  // Register plugins
@@ -1138,11 +1138,11 @@ const SallaFileUpload = class {
1138
1138
  }
1139
1139
  }
1140
1140
  render() {
1141
- return (index.h(index.Host, { key: 'af77cb11bf5ae4a857e9a099ce6438fb29aa8736', class: {
1141
+ return (index.h(index.Host, { key: '518fef1a108d79f9aeb9efdbce74e4e721a145dc', class: {
1142
1142
  "s-file-upload": true,
1143
1143
  "s-file-upload-profile-image": this.profileImage,
1144
1144
  "s-file-upload-multiple": this.allowMultiple,
1145
- } }, index.h("input", { key: 'da600278c346ef3554bfc6f8b22cb07dce1fc1ea', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? index.h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', index.h("input", { key: '4c605d3d983a86fca5667641d38592daf30f20b2', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
1145
+ } }, index.h("input", { key: '0c01117f1e59577833b106d5825a08dd2ca51bd0', type: "file", name: this.name, value: this.value, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? index.h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.maxFilesCount)) : '', index.h("input", { key: '69276b5e95c8bc35f42c3f1f307abea8c1761621', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.value, ref: input => this.hiddenInput = input })));
1146
1146
  }
1147
1147
  async componentDidLoad() {
1148
1148
  await Salla.onReady();
@@ -1425,7 +1425,7 @@ const SallaQuantityInput = class {
1425
1425
  if (!inputAttributes['aria-label'] && !inputAttributes['aria-labelledby']) {
1426
1426
  inputAttributes['aria-label'] = salla.lang.getWithDefault('common.elements.quantity', 'Quantity');
1427
1427
  }
1428
- return (index.h(index.Host, { key: 'ada66e864b927a5a1ec496c528b0f35121cb0e3e', class: "s-quantity-input" }, index.h("div", { key: '55601a364982154960a0513b507bfd7e349eea3f', class: "s-quantity-input-container" }, index.h("button", { key: 'e4f652ee5aa01e9be701f375c1d6c67821624b1d', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button", "aria-label": salla.lang.getWithDefault('common.elements.increase_quantity', 'Increase quantity') }, !this.hasIncrementSlot ? index.h("span", { innerHTML: minus.plusIcon }) : '', index.h("slot", { key: '811f80ce4faa3ae783070ee18df09024dc157016', name: "increment-button" })), index.h("input", { key: '6f5db2fb1f02a7f3a80d9ac769608c0956942df1', class: "s-quantity-input-input", ...inputAttributes, ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), inputMode: "numeric", pattern: "[0-9]*", min: "1", readOnly: this.disableInput, value: this.quantity }), index.h("button", { key: '835ad4fc21b7926de520972fb0c550009b143c26', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button", "aria-label": salla.lang.getWithDefault('common.elements.decrease_quantity', 'Decrease quantity') }, !this.hasDecrementSlot ? index.h("span", { innerHTML: minus.minusIcon }) : '', index.h("slot", { key: 'c03fec4e1736df09bd555a04ded8941a50244eb2', name: "decrement-button" })))));
1428
+ return (index.h(index.Host, { key: 'c797988f98c583df0064468e39f622d6e56e24e2', class: "s-quantity-input" }, index.h("div", { key: 'de47e2fda231074d7d7d0787dfda9cf5499f843e', class: "s-quantity-input-container" }, index.h("button", { key: '7c9e1918d5cbb682c1e64d59250fb9240966b8b0', onClick: () => this.increase(), class: "s-quantity-input-increase-button s-quantity-input-button", type: "button", "aria-label": salla.lang.getWithDefault('common.elements.increase_quantity', 'Increase quantity') }, !this.hasIncrementSlot ? index.h("span", { innerHTML: minus.plusIcon }) : '', index.h("slot", { key: 'a3ee0a9ca52089113b5af350b167a37118a20893', name: "increment-button" })), index.h("input", { key: '6137f675da24a5ef3325ec333f66299319c21e16', class: "s-quantity-input-input", ...inputAttributes, ref: (el) => this.textInput = el, onInput: (event) => this.setValue(event.target.value), inputMode: "numeric", pattern: "[0-9]*", min: "1", readOnly: this.disableInput, value: this.quantity }), index.h("button", { key: '64d016e0fcb7339d0125c4d1f66862cb0331c296', class: "s-quantity-input-decrease-button s-quantity-input-button", onClick: () => this.decrease(), type: "button", "aria-label": salla.lang.getWithDefault('common.elements.decrease_quantity', 'Decrease quantity') }, !this.hasDecrementSlot ? index.h("span", { innerHTML: minus.minusIcon }) : '', index.h("slot", { key: 'd7f3859f72897db514c77eb0119680e00574902c', name: "decrement-button" })))));
1429
1429
  }
1430
1430
  get host() { return index.getElement(this); }
1431
1431
  static get watchers() { return {
@@ -1445,7 +1445,7 @@ const SallaTelInput = class {
1445
1445
  if (this.TelInput)
1446
1446
  return;
1447
1447
  try {
1448
- const telInputModule = await Promise.resolve().then(function () { return require('./index-BiuRQfha.js'); }).then(function (n) { return n.index; });
1448
+ const telInputModule = await Promise.resolve().then(function () { return require('./index-CB_WYB8k.js'); }).then(function (n) { return n.index; });
1449
1449
  this.TelInput = telInputModule.default;
1450
1450
  }
1451
1451
  catch (error) {
@@ -1559,7 +1559,7 @@ const SallaTelInput = class {
1559
1559
  }
1560
1560
  }
1561
1561
  render() {
1562
- return (index.h(index.Host, { key: '17ba242a4a378ef83e44cdf0114c0f3e3b48adbc', class: "s-tel-input" }, index.h("input", { key: '6fce02afd1bde804aa7f29d0f25f2b37253db372', 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" }), index.h("span", { key: '95d781eaa114bcc4f67a3104c434818c768bcd7c', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { key: 'f5aa842015af4b327ea9bde37bd919eba77918c7', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
1562
+ return (index.h(index.Host, { key: '727fa47d71bd8fd98f76c66b3bafb2348a586303', class: "s-tel-input" }, index.h("input", { key: '19f5d3e2ff8902733e21f39038f716b18ae065ae', 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" }), index.h("span", { key: 'ad6b735fa4d5574b8717f460171c13a56a031451', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { key: '07c8732dc276613fc5ed2928a2d47af51c49d942', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
1563
1563
  }
1564
1564
  componentDidLoad() {
1565
1565
  this.initTelInput();
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-pecK0haA.js');
6
+ var index = require('./index-CuQpJRcD.js');
7
7
  var location = require('./location-DIyESLuI.js');
8
8
  var search = require('./search-c7Aa7lM9.js');
9
9
 
@@ -7436,18 +7436,18 @@ const SallaSearchableDropdown = class {
7436
7436
  render() {
7437
7437
  const hasSelection = this.selectedItem != null;
7438
7438
  const listboxId = `${this.inputId}-listbox`;
7439
- return (index.h(index.Host, { key: '2186dbcef9e4926620a4756ce1cd6050a83ea390', class: "s-searchable-dropdown" }, index.h("div", { key: 'cb43fc429e50e64b56bd136254da1369bf407fed', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (index.h("label", { key: '07369f279ec000a2ac158f2a4f8f3df79c64be45', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && index.h("span", { key: '26859210300466d5ae3934e5d99ee6b3eb118a0d', class: "s-searchable-dropdown-required" }, " *"))), index.h("div", { key: '225d02066f038cfae7d94324b27a68f398a869a6', class: {
7439
+ return (index.h(index.Host, { key: 'e95aedae8c83fe27ef5e94065bd34a0c105ab565', class: "s-searchable-dropdown" }, index.h("div", { key: '3bd95a9a3652934d7a0904b6813f372a517dc415', class: { 's-searchable-dropdown': true, 's-searchable-dropdown--open': this.isOpen } }, this.label && (index.h("label", { key: '85b95c812b9aa2c496b394a750c362d69c50546a', class: "s-searchable-dropdown-label", htmlFor: this.inputId }, this.label, this.required && index.h("span", { key: 'a863108db25faffd654d2a49832c9ab78c4d3124', class: "s-searchable-dropdown-required" }, " *"))), index.h("div", { key: 'fb3ce40726d9b5f0060d1279bd0a17339da978b1', class: {
7440
7440
  's-searchable-dropdown-trigger': true,
7441
7441
  's-searchable-dropdown-trigger--disabled': this.disabled || this.loading,
7442
7442
  's-searchable-dropdown-trigger--open': this.isOpen,
7443
- }, 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 ? (index.h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (index.h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), index.h("i", { key: '5a8b9eae4425b704b9c3a23fc543ce191bd976fb', class: {
7443
+ }, 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 ? (index.h("span", { class: "s-searchable-dropdown-trigger-text" }, this.getDisplayName(this.selectedItem))) : (index.h("span", { class: "s-searchable-dropdown-trigger-placeholder" }, this.placeholder)), index.h("i", { key: '493e615e79b3483aca3bf2b40c45b8be38190788', class: {
7444
7444
  'sicon-keyboard_arrow_down': true,
7445
7445
  's-searchable-dropdown-trigger-icon': true,
7446
7446
  's-searchable-dropdown-trigger-icon--open': this.isOpen,
7447
- }, "aria-hidden": "true" })), this.isOpen && (index.h("div", { key: 'adc8cbb28c042e8ea253e5449c946ba5e85874e9', class: {
7447
+ }, "aria-hidden": "true" })), this.isOpen && (index.h("div", { key: 'db839d1fcc73c7bc68cd324ca2e8c91f42bb991c', class: {
7448
7448
  's-searchable-dropdown-panel': true,
7449
7449
  's-searchable-dropdown-panel--up': this.dropUp,
7450
- }, ref: (el) => (this.panelRef = el) }, this.searchable && (index.h("div", { key: 'ec8ec623a82eefb8d893b31e23384047b343475f', class: "s-searchable-dropdown-search-wrap" }, index.h("i", { key: 'ffeb5f7b1c9e456ca5145f76dfa80c46c3639f28', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), index.h("input", { key: 'b9bc781fc7429735999b1e88f775fb8ddfb9c249', 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 }))), index.h("div", { key: '5ac1e061dfccf92c437c5df02f02797b9e281eb9', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
7450
+ }, ref: (el) => (this.panelRef = el) }, this.searchable && (index.h("div", { key: 'd3b91389e90e87345672cd7ec630b555114372b2', class: "s-searchable-dropdown-search-wrap" }, index.h("i", { key: '67d56ff8ad837b683d12fb750ccee6412bd8de4c', class: "sicon-search s-searchable-dropdown-search-icon", "aria-hidden": "true" }), index.h("input", { key: 'f400a683b9b54ae8e448279ce19130cb346dcc5f', 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 }))), index.h("div", { key: '75bd2f369824326cb1ef87c5f3dad2e80975f4d9', id: listboxId, class: "s-searchable-dropdown-list s-scrollbar", role: "listbox" }, this.renderListContent()))))));
7451
7451
  }
7452
7452
  renderListContent() {
7453
7453
  if (this.searching || this.loading) {