@salla.sa/twilight-components 2.14.386 → 2.14.388

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 (366) hide show
  1. package/dist/cjs/{filepond-Dz0w3b0-.js → filepond-JwtIy_PZ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-Bc2hFAJm.js → filepond-plugin-file-poster-HbVPHajC.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-D-ntIPdx.js → filepond-plugin-file-validate-size-BfnCLQbe.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-1TnSvBgD.js → filepond-plugin-file-validate-type-ZlRC1VfY.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DGi3QY5x.js → filepond-plugin-image-edit-DiQE1wz9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CzMQBbqX.js → filepond-plugin-image-exif-orientation-DIwNNDxM.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-D555a4un.js → filepond-plugin-image-preview-C51b46QP.js} +1 -1
  8. package/dist/cjs/{index--a5myRaH.js → index-ByBROVOr.js} +1 -1
  9. package/dist/cjs/{index-Oy30xVAt.js → index-DO-q5keQ.js} +6 -2
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion-body_3.cjs.entry.js +4 -4
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  13. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +3 -3
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-booking-field_7.cjs.entry.js +17 -17
  19. package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-cart-coupons.cjs.entry.js +251 -0
  21. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-comment-form_8.cjs.entry.js +42 -28
  23. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-count-down_2.cjs.entry.js +7 -7
  27. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-filters-widget.cjs.entry.js +3 -3
  29. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-gifting.cjs.entry.js +3 -3
  31. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-list-tile.cjs.entry.js +2 -2
  35. package/dist/cjs/salla-localization-modal.cjs.entry.js +2 -2
  36. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +4 -4
  44. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +6 -6
  45. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-offer-modal.cjs.entry.js +2 -2
  49. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  53. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  54. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  57. package/dist/cjs/salla-placeholder.cjs.entry.js +2 -2
  58. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  59. package/dist/cjs/salla-product-size-guide.cjs.entry.js +3 -3
  60. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-scopes.cjs.entry.js +2 -2
  66. package/dist/cjs/salla-search.cjs.entry.js +6 -6
  67. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  68. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  70. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  71. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  72. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  74. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  78. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  80. package/dist/cjs/twilight.cjs.js +2 -2
  81. package/dist/cjs/{vanilla-picker-BjBHEsil.js → vanilla-picker-DiJq-dd5.js} +1 -1
  82. package/dist/collection/collection-manifest.json +1 -0
  83. package/dist/collection/components/salla-cart-coupons/interfaces.js +1 -0
  84. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.css +0 -0
  85. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +293 -0
  86. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
  87. package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
  88. package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
  89. package/dist/collection/components/salla-comments/salla-comment-item.js +3 -3
  90. package/dist/collection/components/salla-comments/salla-comments.js +34 -20
  91. package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
  92. package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
  93. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  94. package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
  95. package/dist/collection/components/salla-filters/salla-filters.js +1 -1
  96. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
  97. package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
  98. package/dist/collection/components/salla-hook/salla-hook.js +1 -1
  99. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  100. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  101. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  102. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  103. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
  104. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  105. package/dist/collection/components/salla-map/salla-map.js +3 -3
  106. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
  107. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  108. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
  109. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +1 -1
  110. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
  111. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  112. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  113. package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
  114. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  115. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  116. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  117. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  118. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  119. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  120. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  121. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
  122. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
  123. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  124. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  125. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  126. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  127. package/dist/collection/components/salla-search/salla-search.js +5 -5
  128. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  129. package/dist/collection/components/salla-social/salla-social.js +1 -1
  130. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  131. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  132. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  133. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  134. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  135. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  136. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  137. package/dist/components/index.js +2 -2
  138. package/dist/components/salla-cart-coupons.d.ts +11 -0
  139. package/dist/components/salla-cart-coupons.js +287 -0
  140. package/dist/components/salla-cart-summary.js +1 -1
  141. package/dist/components/salla-color-picker2.js +1 -1
  142. package/dist/components/salla-comment-form2.js +1 -1
  143. package/dist/components/salla-comment-item2.js +3 -3
  144. package/dist/components/salla-comments.js +34 -20
  145. package/dist/components/salla-conditional-fields2.js +1 -1
  146. package/dist/components/salla-count-down2.js +1 -1
  147. package/dist/components/salla-datetime-picker2.js +1 -1
  148. package/dist/components/salla-file-upload2.js +2 -2
  149. package/dist/components/salla-filters-widget2.js +2 -2
  150. package/dist/components/salla-filters.js +1 -1
  151. package/dist/components/salla-gifting.js +2 -2
  152. package/dist/components/salla-hook.js +1 -1
  153. package/dist/components/salla-list-tile2.js +1 -1
  154. package/dist/components/salla-loading2.js +1 -1
  155. package/dist/components/salla-localization-modal.js +1 -1
  156. package/dist/components/salla-loyalty-prize-item.js +1 -1
  157. package/dist/components/salla-loyalty-program.js +1 -1
  158. package/dist/components/salla-maintenance-alert.js +1 -1
  159. package/dist/components/salla-map2.js +3 -3
  160. package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
  161. package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
  162. package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
  163. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  164. package/dist/components/salla-multiple-bundle-product.js +1 -1
  165. package/dist/components/salla-notification-item2.js +1 -1
  166. package/dist/components/salla-offer-modal.js +1 -1
  167. package/dist/components/salla-order-details.js +1 -1
  168. package/dist/components/salla-order-summary.js +1 -1
  169. package/dist/components/salla-payments.js +2 -2
  170. package/dist/components/salla-placeholder2.js +1 -1
  171. package/dist/components/salla-price-range2.js +2 -2
  172. package/dist/components/salla-product-availability2.js +1 -1
  173. package/dist/components/salla-product-card2.js +5 -5
  174. package/dist/components/salla-product-size-guide.js +2 -2
  175. package/dist/components/salla-quantity-input.js +1 -1
  176. package/dist/components/salla-quick-buy2.js +1 -1
  177. package/dist/components/salla-review-card2.js +1 -1
  178. package/dist/components/salla-reviews-page.js +1 -1
  179. package/dist/components/salla-reviews.js +1 -1
  180. package/dist/components/salla-scopes.js +1 -1
  181. package/dist/components/salla-search.js +5 -5
  182. package/dist/components/salla-skeleton2.js +1 -1
  183. package/dist/components/salla-social-share.js +1 -1
  184. package/dist/components/salla-social.js +1 -1
  185. package/dist/components/salla-tab-content2.js +1 -1
  186. package/dist/components/salla-tab-header2.js +1 -1
  187. package/dist/components/salla-tabs2.js +1 -1
  188. package/dist/components/salla-tel-input2.js +1 -1
  189. package/dist/components/salla-tooltip2.js +1 -1
  190. package/dist/components/salla-user-settings.js +1 -1
  191. package/dist/esm/{filepond-BXxeKj-9.js → filepond-CtRmlCu3.js} +1 -1
  192. package/dist/esm/{filepond-plugin-file-poster-B5BTs5Ly.js → filepond-plugin-file-poster-CMkOcEkV.js} +1 -1
  193. package/dist/esm/{filepond-plugin-file-validate-size-_PyCg3tk.js → filepond-plugin-file-validate-size-DzG8gDvA.js} +1 -1
  194. package/dist/esm/{filepond-plugin-file-validate-type-uSrSfAxF.js → filepond-plugin-file-validate-type-DSshuV-e.js} +1 -1
  195. package/dist/esm/{filepond-plugin-image-edit-Cke6iTN3.js → filepond-plugin-image-edit-soyMBqQc.js} +1 -1
  196. package/dist/esm/{filepond-plugin-image-exif-orientation-DKLDaeeL.js → filepond-plugin-image-exif-orientation-Bt8OVYG8.js} +1 -1
  197. package/dist/esm/{filepond-plugin-image-preview-KfxXXS81.js → filepond-plugin-image-preview-N0oEw9xZ.js} +1 -1
  198. package/dist/esm/{index-D4I5TLtE.js → index-CvIpy7Cj.js} +6 -2
  199. package/dist/esm/{index-B2mHcqWp.js → index-Cw-jhhOv.js} +1 -1
  200. package/dist/esm/loader.js +3 -3
  201. package/dist/esm/salla-accordion-body_3.entry.js +4 -4
  202. package/dist/esm/salla-accordion_6.entry.js +2 -2
  203. package/dist/esm/salla-add-product-button_4.entry.js +3 -3
  204. package/dist/esm/salla-advertisement.entry.js +1 -1
  205. package/dist/esm/salla-alert_2.entry.js +1 -1
  206. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  207. package/dist/esm/salla-apps-icons.entry.js +1 -1
  208. package/dist/esm/salla-booking-field_7.entry.js +17 -17
  209. package/dist/esm/salla-bullet-delivery.entry.js +1 -1
  210. package/dist/esm/salla-cart-coupons.entry.js +249 -0
  211. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  212. package/dist/esm/salla-comment-form_8.entry.js +42 -28
  213. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  214. package/dist/esm/salla-contacts.entry.js +1 -1
  215. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  216. package/dist/esm/salla-count-down_2.entry.js +7 -7
  217. package/dist/esm/salla-custom-fields.entry.js +1 -1
  218. package/dist/esm/salla-filters-widget.entry.js +3 -3
  219. package/dist/esm/salla-filters.entry.js +2 -2
  220. package/dist/esm/salla-gifting.entry.js +3 -3
  221. package/dist/esm/salla-hook.entry.js +2 -2
  222. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  223. package/dist/esm/salla-installment.entry.js +1 -1
  224. package/dist/esm/salla-list-tile.entry.js +2 -2
  225. package/dist/esm/salla-localization-modal.entry.js +2 -2
  226. package/dist/esm/salla-login-modal.entry.js +1 -1
  227. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  228. package/dist/esm/salla-loyalty-program.entry.js +2 -2
  229. package/dist/esm/salla-loyalty.entry.js +1 -1
  230. package/dist/esm/salla-maintenance-alert.entry.js +2 -2
  231. package/dist/esm/salla-menu.entry.js +1 -1
  232. package/dist/esm/salla-metadata.entry.js +1 -1
  233. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +4 -4
  234. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +6 -6
  235. package/dist/esm/salla-multiple-bundle-product.entry.js +2 -2
  236. package/dist/esm/salla-notification-item.entry.js +2 -2
  237. package/dist/esm/salla-notifications.entry.js +1 -1
  238. package/dist/esm/salla-offer-modal.entry.js +2 -2
  239. package/dist/esm/salla-offer.entry.js +1 -1
  240. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  241. package/dist/esm/salla-order-details-options.entry.js +1 -1
  242. package/dist/esm/salla-order-details.entry.js +2 -2
  243. package/dist/esm/salla-order-summary.entry.js +2 -2
  244. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  245. package/dist/esm/salla-orders.entry.js +1 -1
  246. package/dist/esm/salla-payments.entry.js +3 -3
  247. package/dist/esm/salla-placeholder.entry.js +2 -2
  248. package/dist/esm/salla-price-range.entry.js +3 -3
  249. package/dist/esm/salla-product-size-guide.entry.js +3 -3
  250. package/dist/esm/salla-products-list.entry.js +1 -1
  251. package/dist/esm/salla-products-slider.entry.js +1 -1
  252. package/dist/esm/salla-progress-bar.entry.js +1 -1
  253. package/dist/esm/salla-quick-order.entry.js +1 -1
  254. package/dist/esm/salla-rating-modal.entry.js +1 -1
  255. package/dist/esm/salla-scopes.entry.js +2 -2
  256. package/dist/esm/salla-search.entry.js +6 -6
  257. package/dist/esm/salla-skeleton.entry.js +2 -2
  258. package/dist/esm/salla-slider.entry.js +1 -1
  259. package/dist/esm/salla-social-share.entry.js +2 -2
  260. package/dist/esm/salla-social.entry.js +2 -2
  261. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  262. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  263. package/dist/esm/salla-tooltip.entry.js +2 -2
  264. package/dist/esm/salla-trust-badges.entry.js +1 -1
  265. package/dist/esm/salla-user-menu.entry.js +1 -1
  266. package/dist/esm/salla-user-profile.entry.js +1 -1
  267. package/dist/esm/salla-user-settings.entry.js +2 -2
  268. package/dist/esm/salla-verify.entry.js +1 -1
  269. package/dist/esm/salla-wallet.entry.js +1 -1
  270. package/dist/esm/twilight.js +3 -3
  271. package/dist/esm/{vanilla-picker-CM1O2U8w.js → vanilla-picker-CGGBRKTl.js} +1 -1
  272. package/dist/twilight/p-02aa05b3.entry.js +4 -0
  273. package/dist/twilight/{p-d8510bea.entry.js → p-04072cae.entry.js} +1 -1
  274. package/dist/twilight/{p-7a874935.entry.js → p-06eb15e2.entry.js} +1 -1
  275. package/dist/twilight/{p-bd3ed9f5.entry.js → p-073ee1c3.entry.js} +1 -1
  276. package/dist/twilight/p-189b3238.entry.js +4 -0
  277. package/dist/twilight/{p-15c7e73a.entry.js → p-1b097cea.entry.js} +1 -1
  278. package/dist/twilight/{p-0127cd6e.entry.js → p-1cb9d96c.entry.js} +1 -1
  279. package/dist/twilight/p-2200f944.entry.js +4 -0
  280. package/dist/twilight/{p-0e82b9cd.entry.js → p-221456be.entry.js} +1 -1
  281. package/dist/twilight/{p-90dc7be8.entry.js → p-23099ba2.entry.js} +1 -1
  282. package/dist/twilight/{p-ba723c9d.entry.js → p-242b6421.entry.js} +1 -1
  283. package/dist/twilight/{p-ebc8b253.entry.js → p-249c9d98.entry.js} +1 -1
  284. package/dist/twilight/{p-e8601f3e.entry.js → p-2dfe2197.entry.js} +1 -1
  285. package/dist/twilight/{p-7424ba6e.entry.js → p-300be242.entry.js} +1 -1
  286. package/dist/twilight/{p-33727c81.entry.js → p-306c4986.entry.js} +1 -1
  287. package/dist/twilight/p-31458cbf.entry.js +4 -0
  288. package/dist/twilight/p-348106f0.entry.js +4 -0
  289. package/dist/twilight/{p-37996e21.entry.js → p-3589bed2.entry.js} +1 -1
  290. package/dist/twilight/{p-f5004752.entry.js → p-3c8e6e9f.entry.js} +1 -1
  291. package/dist/twilight/{p-6c1eb2aa.entry.js → p-3c982608.entry.js} +1 -1
  292. package/dist/twilight/{p-a2b440ae.entry.js → p-3d3b3856.entry.js} +1 -1
  293. package/dist/twilight/{p-5338f5de.entry.js → p-402fc86d.entry.js} +1 -1
  294. package/dist/twilight/p-48c94220.entry.js +4 -0
  295. package/dist/twilight/{p-fe2adfd8.entry.js → p-49b7c969.entry.js} +1 -1
  296. package/dist/twilight/{p-a751f592.entry.js → p-4a4c1969.entry.js} +1 -1
  297. package/dist/twilight/p-4c007dc0.entry.js +4 -0
  298. package/dist/twilight/{p-d4035f22.entry.js → p-4da987fc.entry.js} +1 -1
  299. package/dist/twilight/{p-653b2dac.entry.js → p-4fc10acd.entry.js} +1 -1
  300. package/dist/twilight/{p-408f439d.entry.js → p-507fac68.entry.js} +1 -1
  301. package/dist/twilight/{p-89635370.entry.js → p-540297d6.entry.js} +1 -1
  302. package/dist/twilight/{p-7b18c9e0.entry.js → p-5638111c.entry.js} +1 -1
  303. package/dist/twilight/{p-29da0820.entry.js → p-59758658.entry.js} +1 -1
  304. package/dist/twilight/{p-6a8ae21b.entry.js → p-5f52e482.entry.js} +1 -1
  305. package/dist/twilight/{p-4ede0af7.entry.js → p-6257e0cd.entry.js} +1 -1
  306. package/dist/twilight/{p-0537ad3e.entry.js → p-694aa670.entry.js} +1 -1
  307. package/dist/twilight/{p-a56efe37.entry.js → p-6ca09b34.entry.js} +1 -1
  308. package/dist/twilight/{p-f8693f42.entry.js → p-7020a339.entry.js} +1 -1
  309. package/dist/twilight/{p-a32e417b.entry.js → p-73113e85.entry.js} +1 -1
  310. package/dist/twilight/{p-283727c3.entry.js → p-7a87c0a9.entry.js} +1 -1
  311. package/dist/twilight/{p-4b34c403.entry.js → p-7c8fe050.entry.js} +1 -1
  312. package/dist/twilight/{p-4d80d014.entry.js → p-8043f8ea.entry.js} +1 -1
  313. package/dist/twilight/{p-dbb2069c.entry.js → p-8bd3ba9e.entry.js} +1 -1
  314. package/dist/twilight/{p-08c37adc.entry.js → p-93623f07.entry.js} +1 -1
  315. package/dist/twilight/{p-06e10077.entry.js → p-9f3f2ac3.entry.js} +1 -1
  316. package/dist/twilight/p-B1ZkITMY.js +9 -0
  317. package/dist/twilight/{p-BjbWnZaV.js → p-BXOq5BwG.js} +1 -1
  318. package/dist/twilight/{p-BbjmfFRJ.js → p-BlMSs0A2.js} +1 -1
  319. package/dist/twilight/{p-D4I5TLtE.js → p-CvIpy7Cj.js} +1 -1
  320. package/dist/twilight/{p-Ym28Ytut.js → p-D26J1_uI.js} +1 -1
  321. package/dist/twilight/{p-D339DoJY.js → p-DWxyBEuT.js} +2 -2
  322. package/dist/twilight/{p-Dr8Bgm1u.js → p-NiLajaRX.js} +1 -1
  323. package/dist/twilight/{p-Q1_LG8_l.js → p-VRwnn1Qc.js} +1 -1
  324. package/dist/twilight/{p-503a0362.entry.js → p-a248f209.entry.js} +1 -1
  325. package/dist/twilight/{p-9cf8788e.entry.js → p-a2c5e7bc.entry.js} +1 -1
  326. package/dist/twilight/{p-5bc80a29.entry.js → p-a41f0590.entry.js} +1 -1
  327. package/dist/twilight/{p-181da663.entry.js → p-a97f10a1.entry.js} +1 -1
  328. package/dist/twilight/{p-6b66894c.entry.js → p-aa5bf3b5.entry.js} +1 -1
  329. package/dist/twilight/{p-72ebeb8b.entry.js → p-b1e8296d.entry.js} +1 -1
  330. package/dist/twilight/{p-0476b736.entry.js → p-b2537237.entry.js} +1 -1
  331. package/dist/twilight/{p-70799a42.entry.js → p-b4f431bf.entry.js} +1 -1
  332. package/dist/twilight/{p-a348dd40.entry.js → p-bc65bb02.entry.js} +1 -1
  333. package/dist/twilight/p-be1c54e6.entry.js +4 -0
  334. package/dist/twilight/{p-91f1e6df.entry.js → p-c43be30b.entry.js} +1 -1
  335. package/dist/twilight/{p-5bc914c3.entry.js → p-ce560f66.entry.js} +1 -1
  336. package/dist/twilight/p-d00fc4bf.entry.js +4 -0
  337. package/dist/twilight/{p-d0e38089.entry.js → p-d07f5e44.entry.js} +1 -1
  338. package/dist/twilight/{p-30bdeebc.entry.js → p-d215b7d2.entry.js} +1 -1
  339. package/dist/twilight/{p-35bab511.entry.js → p-d4b83f2a.entry.js} +1 -1
  340. package/dist/twilight/{p-9ac3d8e7.entry.js → p-da155135.entry.js} +1 -1
  341. package/dist/twilight/{p-3a67bf02.entry.js → p-e0b13c19.entry.js} +1 -1
  342. package/dist/twilight/{p-c52ad0b1.entry.js → p-e3b4a179.entry.js} +1 -1
  343. package/dist/twilight/{p-95afe7b9.entry.js → p-e46cb169.entry.js} +1 -1
  344. package/dist/twilight/{p-cfa77298.entry.js → p-e79ad638.entry.js} +1 -1
  345. package/dist/twilight/{p-c3c51233.entry.js → p-e9be8c03.entry.js} +1 -1
  346. package/dist/twilight/{p-12e9e619.entry.js → p-ed08f5e5.entry.js} +1 -1
  347. package/dist/twilight/{p-2c5880fe.entry.js → p-f7f592ab.entry.js} +1 -1
  348. package/dist/twilight/p-f81195ae.entry.js +4 -0
  349. package/dist/twilight/{p-Bm_ows1a.js → p-uADDAGsE.js} +1 -1
  350. package/dist/twilight/{p-OQFknQfe.js → p-wnPgaQoR.js} +1 -1
  351. package/dist/twilight/twilight.esm.js +1 -1
  352. package/dist/types/components/salla-cart-coupons/interfaces.d.ts +26 -0
  353. package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +39 -0
  354. package/dist/types/components/salla-comments/salla-comments.d.ts +2 -0
  355. package/dist/types/components.d.ts +19 -0
  356. package/package.json +5 -5
  357. package/dist/twilight/p-15732417.entry.js +0 -4
  358. package/dist/twilight/p-28665675.entry.js +0 -4
  359. package/dist/twilight/p-3cf6308d.entry.js +0 -4
  360. package/dist/twilight/p-48db8cc1.entry.js +0 -4
  361. package/dist/twilight/p-4f5c85b6.entry.js +0 -4
  362. package/dist/twilight/p-7ac9fe96.entry.js +0 -4
  363. package/dist/twilight/p-9b68f4f7.entry.js +0 -4
  364. package/dist/twilight/p-D_Ov4zes.js +0 -9
  365. package/dist/twilight/p-d6dccd1f.entry.js +0 -4
  366. package/dist/twilight/p-e8b67cc3.entry.js +0 -4
@@ -0,0 +1,249 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
+
6
+ const sallaCartCouponsCss = "";
7
+
8
+ const SallaCartCoupons = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.availableCoupons = [];
12
+ this.cartTotal = 0;
13
+ this.currentCoupon = '';
14
+ this.couponInputValue = '';
15
+ this.couponError = '';
16
+ this.isApplying = false;
17
+ this.isHandlingInternalError = false;
18
+ // Store cart event listener references for cleanup
19
+ this.cartUpdatedHandler = (cartData) => {
20
+ this.cartTotal = cartData.sub_total ?? cartData.total ?? 0;
21
+ // Update current coupon state
22
+ const couponCode = cartData.coupon || '';
23
+ // Only overwrite the user's typed value when the cart-level coupon itself changes
24
+ if (couponCode !== this.currentCoupon) {
25
+ this.currentCoupon = couponCode;
26
+ this.couponInputValue = couponCode;
27
+ }
28
+ // Clear error when cart updates
29
+ this.couponError = '';
30
+ };
31
+ this.couponAddedHandler = () => {
32
+ // Coupon was successfully added - state is managed by cartUpdatedHandler
33
+ };
34
+ this.couponAdditionFailedHandler = (error) => {
35
+ // Only handle external coupon failures when no internal operation is handling errors
36
+ if (!this.isApplying && !this.isHandlingInternalError) {
37
+ this.showCouponError(error?.message || salla.lang.get('pages.cart.coupon_application_error'));
38
+ }
39
+ // Internal operations handle their own errors to prevent double display
40
+ };
41
+ this.couponDeletedHandler = () => {
42
+ // Coupon was removed - state is managed by cartUpdatedHandler
43
+ };
44
+ // Arrow functions to maintain context for event listeners
45
+ this.onKeyUp = (event) => {
46
+ if (event.key === 'Enter') {
47
+ this.couponButtonRef?.click();
48
+ }
49
+ this.couponError = '';
50
+ };
51
+ this.onInput = (event) => {
52
+ this.couponInputValue = event.target.value;
53
+ };
54
+ }
55
+ async componentWillLoad() {
56
+ await Salla.onReady();
57
+ await Salla.lang.onLoaded();
58
+ //then set your logic here to avoid any race condition
59
+ this.loadCouponsData(); // Load async without blocking render - shows empty until loaded
60
+ this.loadCartTotal();
61
+ this.setupCartEventListeners();
62
+ // Note: No store feature gate needed - coupon availability controlled by backend API response
63
+ }
64
+ componentDidLoad() {
65
+ this.setupCouponInputEvents();
66
+ }
67
+ setupCartEventListeners() {
68
+ // Listen for cart updates to refresh cart total
69
+ salla.event.on('cart::updated', this.cartUpdatedHandler);
70
+ // Listen for coupon events
71
+ salla.event.on('cart::coupon.added', this.couponAddedHandler);
72
+ salla.event.on('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
73
+ salla.event.on('cart::coupon.deleted', this.couponDeletedHandler);
74
+ }
75
+ disconnectedCallback() {
76
+ // Clean up DOM event listeners
77
+ this.couponInputRef?.removeEventListener('keyup', this.onKeyUp);
78
+ this.couponInputRef?.removeEventListener('input', this.onInput);
79
+ // Clean up cart event listeners using reliable global event system
80
+ salla.event.off('cart::updated', this.cartUpdatedHandler);
81
+ salla.event.off('cart::coupon.added', this.couponAddedHandler);
82
+ salla.event.off('cart::coupon.addition.failed', this.couponAdditionFailedHandler);
83
+ salla.event.off('cart::coupon.deleted', this.couponDeletedHandler);
84
+ }
85
+ /**
86
+ * Business Decision: No visual selected state needed
87
+ * UX Flow: Click coupon → populate input → auto-apply (streamlined experience)
88
+ */
89
+ async selectCoupon(couponCode) {
90
+ const selectedCoupon = this.availableCoupons.find(coupon => coupon.code === couponCode);
91
+ if (selectedCoupon) {
92
+ if (!this.isEligible(selectedCoupon)) {
93
+ throw new Error(`Coupon not eligible: minimum cart amount not met`);
94
+ }
95
+ try {
96
+ // Actually apply the coupon to the cart first
97
+ await this.applyCoupon(couponCode);
98
+ // Only dispatch event after successful API call
99
+ this.host.dispatchEvent(new CustomEvent('salla::cart-coupons.coupon.selected', {
100
+ detail: selectedCoupon,
101
+ bubbles: true
102
+ }));
103
+ }
104
+ catch (error) {
105
+ // Rethrow to let caller handle the error
106
+ throw error;
107
+ }
108
+ }
109
+ return selectedCoupon;
110
+ }
111
+ async loadCouponsData() {
112
+ try {
113
+ // Load coupons from API
114
+ const response = await salla.api.request('coupons');
115
+ const raw = response?.data;
116
+ const coupons = Array.isArray(raw) ? raw : (Array.isArray(raw?.data) ? raw.data : []);
117
+ this.availableCoupons = coupons;
118
+ }
119
+ catch (error) {
120
+ console.warn('Failed to load coupons:', error);
121
+ // No coupons available on error
122
+ this.availableCoupons = [];
123
+ }
124
+ }
125
+ loadCartTotal() {
126
+ // Get cart total and current coupon from Salla storage
127
+ const cart = salla.storage.get('cart');
128
+ // Check summary first (more accurate), then cart level, fallback to 0
129
+ this.cartTotal = cart?.summary?.sub_total ?? cart?.sub_total ?? 0;
130
+ this.currentCoupon = cart?.coupon || '';
131
+ this.couponInputValue = cart?.coupon || '';
132
+ }
133
+ setupCouponInputEvents() {
134
+ if (!this.couponInputRef || !this.couponButtonRef) {
135
+ return;
136
+ }
137
+ this.couponInputRef.addEventListener('keyup', this.onKeyUp);
138
+ this.couponInputRef.addEventListener('input', this.onInput);
139
+ }
140
+ async handleCouponButtonClick() {
141
+ if (this.isApplying) {
142
+ return;
143
+ }
144
+ const hasCoupon = !!this.currentCoupon;
145
+ if (!hasCoupon && !this.couponInputValue.trim()) {
146
+ this.showCouponError(salla.lang.get('pages.cart.enter_coupon_code'));
147
+ return;
148
+ }
149
+ this.isApplying = true;
150
+ this.isHandlingInternalError = true;
151
+ try {
152
+ if (hasCoupon) {
153
+ // Remove existing coupon
154
+ await salla.cart.deleteCoupon();
155
+ }
156
+ else {
157
+ // Apply new coupon
158
+ await salla.cart.addCoupon(this.couponInputValue.trim());
159
+ }
160
+ }
161
+ catch (error) {
162
+ this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
163
+ }
164
+ finally {
165
+ this.isApplying = false;
166
+ // Keep internal error flag active briefly to prevent race condition with SDK event
167
+ setTimeout(() => {
168
+ this.isHandlingInternalError = false;
169
+ }, 100);
170
+ }
171
+ }
172
+ showCouponError(message) {
173
+ this.couponError = message;
174
+ }
175
+ handleCouponClick(coupon) {
176
+ this.applyCoupon(coupon.code, false).catch(() => {
177
+ // Error already displayed by applyCoupon
178
+ });
179
+ }
180
+ async applyCoupon(couponCode, shouldThrow = true) {
181
+ if (this.isApplying) {
182
+ if (shouldThrow) {
183
+ throw new Error('Coupon application already in progress');
184
+ }
185
+ else {
186
+ return; // Silent return for card clicks when operation is already in progress
187
+ }
188
+ }
189
+ // Update the input field with the coupon code
190
+ this.couponInputValue = couponCode;
191
+ // Clear any existing errors
192
+ this.couponError = '';
193
+ this.isApplying = true;
194
+ this.isHandlingInternalError = true;
195
+ try {
196
+ // Apply the coupon directly without checking for existing coupon
197
+ await salla.cart.addCoupon(couponCode.trim());
198
+ }
199
+ catch (error) {
200
+ this.showCouponError(error.response?.data?.error?.message || salla.lang.get('pages.cart.coupon_application_error'));
201
+ // Re-throw error only if requested (for selectCoupon API)
202
+ if (shouldThrow) {
203
+ throw error;
204
+ }
205
+ }
206
+ finally {
207
+ this.isApplying = false;
208
+ // Keep internal error flag active briefly to prevent race condition with SDK event
209
+ setTimeout(() => {
210
+ this.isHandlingInternalError = false;
211
+ }, 100);
212
+ }
213
+ }
214
+ formatMainAmount(coupon) {
215
+ if (coupon.type === 'percentage') {
216
+ // For percentage coupons, amount should be a string or number
217
+ const percentageValue = typeof coupon.amount === 'object' ? coupon.amount.amount : coupon.amount;
218
+ return `${salla.helpers.number(percentageValue)}%`;
219
+ }
220
+ else {
221
+ // For fixed coupons, amount is an object with amount and currency
222
+ const amountData = typeof coupon.amount === 'object' ? coupon.amount : {
223
+ amount: coupon.amount,
224
+ currency: coupon.minimum_amount?.currency || salla.config.get('store.currency.code', 'SAR')
225
+ };
226
+ return (h("span", { innerHTML: salla.money(amountData.amount, amountData.currency) }));
227
+ }
228
+ }
229
+ isEligible(coupon) {
230
+ if (coupon.minimum_amount && this.cartTotal < parseFloat(coupon.minimum_amount.amount)) {
231
+ return false; // Coupon is not eligible due to minimum amount requirement
232
+ }
233
+ return true;
234
+ }
235
+ renderCouponCard(coupon) {
236
+ const isEligible = this.isEligible(coupon);
237
+ // Note: Card notches (ticket-style pseudo-elements) match card background, not page background - this is intentional design
238
+ return (h("div", { class: "s-cart-coupons-slide-one-fourth swiper-slide" }, h("div", { class: `s-cart-coupons-card ${!isEligible || this.isApplying ? 's-cart-coupons-disabled' : ''}`, onClick: () => isEligible && !this.isApplying && this.handleCouponClick(coupon) }, h("div", { class: "s-cart-coupons-top-section" }, h("div", { class: "s-cart-coupons-discount-values" }, h("div", { class: "s-cart-coupons-main-amount" }, this.formatMainAmount(coupon)), coupon.free_shipping ? (h("div", { class: "s-cart-coupons-secondary-info" }, "+ ", salla.lang.get('pages.cart.free_shipping'))) : coupon.maximum_amount && (h("div", { class: "s-cart-coupons-secondary-info" }, salla.lang.get('pages.cart.up_to'), " ", h("span", { innerHTML: salla.money(coupon.maximum_amount.amount, coupon.maximum_amount.currency) })))), h("div", { class: "s-cart-coupons-code" }, coupon.code)), h("div", { class: "s-cart-coupons-divider" }), h("div", { class: "s-cart-coupons-bottom-section" }, h("div", { class: "s-cart-coupons-terms" }, coupon.remaining_days !== undefined && coupon.remaining_days !== null && (h("div", { class: `s-cart-coupons-expiry ${coupon.remaining_days <= 3 ? 's-cart-coupons-expiry-warning' : ''}` }, coupon.remaining_days === 0
239
+ ? salla.lang.get('pages.cart.expires_today')
240
+ : `${salla.lang.get('pages.cart.expires_after')} ${coupon.remaining_days} ${salla.lang.get('pages.cart.day')}`)), coupon.minimum_amount && parseFloat(coupon.minimum_amount.amount) > 0 && (h("div", { class: "s-cart-coupons-minimum" }, salla.lang.get('pages.cart.minimum'), " ", h("span", { innerHTML: salla.money(coupon.minimum_amount.amount, coupon.minimum_amount.currency) })))), h("div", { class: "s-cart-coupons-action" }, isEligible ? salla.lang.get('pages.cart.save_coupon') : salla.lang.get('pages.cart.coupon_not_compatible'))))));
241
+ }
242
+ render() {
243
+ return (h(Host, { key: 'f3f3d943ab2c1a6488a1da02d2cc031dbc88b482' }, h("div", { key: 'abf88828017041b19a6c54ba2f99e6c246bd8d04', class: "s-cart-coupons-wrapper" }, h("div", { key: 'c2946579a7cca935722997229f50ede603acb8b2', class: "s-cart-coupons-input-section" }, h("label", { key: '50042d827c86daf853babd4e41ba3a920aceda9d', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), h("div", { key: '4b01047727bd3a83f6cfbac37221e7732076248f', class: "s-cart-coupons-coupon-input-container" }, h("input", { key: '555108f68b7a60c618d9a904905ef321cd274c7a', type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: !!this.currentCoupon || this.isApplying, ref: el => this.couponInputRef = el, "aria-label": salla.lang.get('pages.cart.apply_coupon') }), h("salla-button", { key: '0416bbaf029f7d8951ca6a419cdc676ae50ee792', ref: el => this.couponButtonRef = el, class: `s-cart-coupons-coupon-button ${this.currentCoupon ? 's-cart-coupons-coupon-button-remove' : 's-cart-coupons-coupon-button-apply'}`, color: this.currentCoupon ? 'danger' : 'primary', loading: this.isApplying, "loader-position": "center", onClick: () => this.handleCouponButtonClick() }, this.currentCoupon ? (h("i", { class: "sicon-cancel" })) : (h("span", null, salla.lang.get('pages.cart.save_coupon'))))), this.couponError && (h("span", { key: 'f7c77e8676cb07b4820b571dbd8ee25dca79a1b1', class: "s-cart-coupons-coupon-error" }, this.couponError))), this.availableCoupons && this.availableCoupons.length > 0 && (h("salla-slider", { key: 'daee9c6705de734d5f81ff86d92ad6952b5a7332', type: "carousel", showControls: false, class: "s-cart-coupons-slider" }, h("div", { key: '5d5ef30a6ff7f7c2b406cc5cec6622c2f028d17e', slot: "items" }, this.availableCoupons.map(coupon => this.renderCouponCard(coupon))))))));
244
+ }
245
+ get host() { return getElement(this); }
246
+ };
247
+ SallaCartCoupons.style = sallaCartCouponsCss;
248
+
249
+ export { SallaCartCoupons as salla_cart_coupons };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
  import { S as SpecialDiscountIcon } from './special-discount-Ctkfc4K-.js';
6
6
  import { l as loyaltyProgramIcon } from './gift-BChI23pG.js';
7
7
  import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
@@ -215,7 +215,7 @@ const SallaCartSummary = class {
215
215
  return cartUrl;
216
216
  }
217
217
  render() {
218
- return (h(Host, { key: '4ceefb3809e2e7c1d00bb47b3d9ed58fa0e48c7b' }, h("a", { key: '3e4f3ab42958fb12647e53cf0a7a95e780d5727f', class: "s-cart-summary-wrapper", href: this.getCartLink() }, h("div", { key: '496573ce91987c25b0cd5e16d5bb95be610f5db6', id: "s-cart-icon" }, h("slot", { key: '53c290cc7e7e5b9d911e1ba430038e0b7ef21dc5', name: "icon" }, h("i", { key: 'b9281b127f798e1738e9c59f4e0413e2852271a8', class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { key: 'aa7b03b0f1ca2155034b15420e8c5fac7e440ae1', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { key: '4e8111bba613de3aaefc9a22fbbd6a57e5b9ca6f', class: "s-cart-summary-content" }, this.showCartLabel && h("span", { key: '86a8b09624647bcd715aefaf0afae43b0b8f991e', class: "s-cart-summary-label" }, this.cartLabel), h("b", { key: '426d8bf03af7a8f96793bda0ebe593b1b1eebf63', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
218
+ return (h(Host, { key: '918f027fd28cd25d653b8419f97223daaf22d428' }, h("a", { key: 'b74a2724ada356a01b915044d56dfb0f9953338e', class: "s-cart-summary-wrapper", href: this.getCartLink() }, h("div", { key: 'b9332fe1b66b895c1e9950efaa548f04eb053d46', id: "s-cart-icon" }, h("slot", { key: '2b5c1cf8dea4ca23a54beeb83cfad44538ca3ab7', name: "icon" }, h("i", { key: 'f3145ed4a994762441d925280a3234d78c378bef', class: "s-cart-summary-icon", innerHTML: PendingOrdersIcon }))), h("span", { key: '26a78adf9b279019504e995216ea5373b6866876', class: "s-cart-summary-count" }, salla.helpers.number(this.cartSummaryCount)), h("p", { key: '60ad091221ed5cd3e2ac0d27ebc53ec9917ccd64', class: "s-cart-summary-content" }, this.showCartLabel && h("span", { key: '66819086b9ed7f6f21be2cd5e8baf0bc88021e40', class: "s-cart-summary-label" }, this.cartLabel), h("b", { key: 'a07c85971e50add3cdd5b51942e642d4daf19d82', class: "s-cart-summary-total", innerHTML: salla.money(this.cartSummaryTotal) })))));
219
219
  }
220
220
  get host() { return getElement(this); }
221
221
  };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement, f as require_root, i as requireIsObject, j as requireIsSymbol, d as getDefaultExportFromCjs } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement, f as require_root, i as requireIsObject, j as requireIsSymbol, d as getDefaultExportFromCjs } from './index-CvIpy7Cj.js';
5
5
  import { i as iconCheck } from './check-BsXh13x8.js';
6
6
  import { a as anime } from './anime.es-CgtvEd63.js';
7
7
  import { H as Helper } from './Helper-DFMXF2_h.js';
@@ -36,7 +36,7 @@ const SallaCommentForm = class {
36
36
  .finally(() => this.submitBtn.stop);
37
37
  }
38
38
  render() {
39
- return (h(Host, { key: '1c2cdcb7dea3afa14a9fbe7700b05241c6e36770' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
39
+ return (h(Host, { key: '24b73030ff1828a6f21c1c36a00be2c8651f6edf' }, !!this.canComment ? h("form", { ref: frm => this.commentForm = frm }, h("div", { class: "s-comment-form-wrapper" }, this.showAvatar ?
40
40
  h("img", { class: "s-comment-form-avatar", src: salla.config.get('user.avatar'), alt: "user avatar" }) : '', h("div", { class: "s-comment-form-content" }, h("textarea", { cols: 30, rows: 5, minlength: "4", maxlength: "500", ref: field => this.commentField = field, placeholder: this.placeholder, class: "s-comment-form-input", required: true }), h("br", null), h("div", { class: "s-comment-form-action" }, h("salla-button", { ref: btn => this.submitBtn = btn, "loader-position": 'center', onClick: () => this.submit() }, this.submitText))))) : ''));
41
41
  }
42
42
  };
@@ -175,15 +175,15 @@ const SallaCommentItem = class {
175
175
  }
176
176
  render() {
177
177
  let isAdmin = this.comment.type == 'admin';
178
- return (h(Host, { key: '93d39f2ef35c0cfdcd6333e58e6a836845b4fe12', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, h("div", { key: 'c160b10f946149c293cb0daeaf96aa7b06ba095e', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, h("div", { key: '60728bde4f0293cf419b589759b6621c5f0a519a', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && h("span", { key: 'aac6a394aa6460756c4c54d0a0c671078d1dddd6', class: "s-comments-item-reply-icon", innerHTML: Reply }), h("div", { key: 'cdca36fac4f23720084477ee889325942d25341e', class: "s-comments-item-avatar" }, h("img", { key: '07e8e17f7470d87607c8aaa8f15e283b129ca070', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), h("div", { key: '6ef14e9b64d8300a24d886c081cc66ec621fd2a6', class: "s-comments-flex-1" }, h("div", { key: '4f72cfb690978fae30d8ef7c957e6adf53a2872d', class: "s-comments-item-user-wrapper" }, h("div", { key: '413840281c0050521a8ae4fd60e502ed821f4260', class: "s-comments-item-user-info" }, h("h3", { key: '814c32cefc6b62585022ab3e1cdb59965553f1d2', class: this.comment.is_pinned ? "s-comments-item-user-info-name" : "s-comments-item-user-info-name-with-margin" }, this.comment?.name), this.comment.is_pinned ?
178
+ return (h(Host, { key: '3f9d4b98cff2dd49259d3386b4996b905f92d7db', class: isAdmin ? 's-comments-item-admin' : 's-comments-item' }, h("div", { key: '1348f11b2e553be483f60c5c558d3e800f050700', class: { "s-comments-item-wrapper": !isAdmin, "s-comments-item-admin-wrapper": isAdmin }, id: `s-comments-item-${this.comment.id}` }, h("div", { key: '0587afd7ae1fc27b12fc4fd2c9ef4bf9e919d04a', class: "s-comments-item-inner s-comments-flex-1" }, isAdmin && h("span", { key: '40009b2b3b9af60481d0e40d5fb919076ab43b10', class: "s-comments-item-reply-icon", innerHTML: Reply }), h("div", { key: '8f0563811445046ecf5ce3abe6ee6d7d1ec4a235', class: "s-comments-item-avatar" }, h("img", { key: '5f82bb9d3a5c4c340f37b8e48af3edce42c133f8', "data-src": this.comment?.avatar, alt: this.comment?.name, src: this.comment?.avatar, class: "s-comments-item-avatar-img lazy" })), h("div", { key: '34581ee9fddaa2f79ee933efb65c2e354010f37a', class: "s-comments-flex-1" }, h("div", { key: 'e03fc074d5ac8ddf183e3b081001e73dd62a7116', class: "s-comments-item-user-wrapper" }, h("div", { key: '6ea5e07eb9fa35d7673019628e6fde4605b74e0c', class: "s-comments-item-user-info" }, h("h3", { key: '18d7cf8c8b8125138a544bd10027ae7503f2f3a6', class: this.comment.is_pinned ? "s-comments-item-user-info-name" : "s-comments-item-user-info-name-with-margin" }, this.comment?.name), this.comment.is_pinned ?
179
179
  h("div", { class: "s-comments-item-pinned-icon-with-margin" }, this.PinnedIcon())
180
180
  : null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
181
181
  h("div", { class: "s-comments-flex" }, this.comment.has_order ?
182
182
  [h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: iconCheck }), h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
183
183
  h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
184
- : null), h("p", { key: '7c6745073e250e100c8a613e4fd94d751042fb7f', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { key: '011cfc88b9702e14f6ea9d8ded0fa6f8678adb18', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
184
+ : null), h("p", { key: '694c2079d3379966994af7040fe4542481a53e66', class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { key: '734ca2eb6bf846c661007a1b9c41f22c47923b27', class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date))), !!this.comment.rating || !!this.comment.stars ?
185
185
  h("salla-rating-stars", { size: "mini", class: "s-comments-item-stars", value: this.comment.rating || this.comment.stars })
186
- : null), h("div", { key: '044599867529f9526306ac258981a15e4c43e369', class: "s-comments-item-content" }, h("p", { key: 'd3d082f84a154205bb6eedb0d14c2bb9a83387ee', innerHTML: this.comment.content }), this.allowAttachImages && h("div", { key: 'c475b4911834163084ede77e2c1f289ea9efddca', class: "s-comments-item-images" }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "", onClick: () => this.modal.open() }))), h("salla-modal", { key: '384d4555813e8e9c4bf7c6ad626def802f8f6f5a', ref: modal => this.modal = modal, width: "sm" }, h("salla-slider", { key: 'a2be6511ff82555b87196183c6f463f4582c18c4', id: `s-comments-item-${this.comment.id}-images`, class: "s-comments-item-images-slider", type: "thumbs", "auto-height": true, showControls: this.comment.images.length > 1 ? true : false, "show-thumbs-controls": "false" }, h("div", { key: 'c6029d94bdddf9958758fbd8c3dbca3e40ad1c01', slot: 'items' }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "" })))), h("div", { key: 'b5febbea6d46ce3b920f5bc15866eebb54f440e4', slot: "thumbs" }, this.comment.images.map((image, index) => (h("div", { class: "s-comments-item-images-slider-thumb" }, h("img", { key: index, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? h("salla-button", { ref: el => this.likeBtn = el, class: `s-comments-item-like-btn ${this.likedComments.includes(this.comment.id) ? 'liked' : ''}`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleLike() }, h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
186
+ : null), h("div", { key: '45e32a0759536f8c9e8bc8b823d50c931bdd1e23', class: "s-comments-item-content" }, h("p", { key: '9edf2cdfd489f77214d7a1ecae8a99943dfd4ece', innerHTML: this.comment.content }), this.allowAttachImages && h("div", { key: 'bbba6c62c4d13289137c634f5413880dfa572ab4', class: "s-comments-item-images" }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "", onClick: () => this.modal.open() }))), h("salla-modal", { key: 'cd5c48b8cf3e1c9457a2fb60a42859cbd91aa996', ref: modal => this.modal = modal, width: "sm" }, h("salla-slider", { key: '304bc9417e6d7fd0e310127dce4e56a1c6ce00ea', id: `s-comments-item-${this.comment.id}-images`, class: "s-comments-item-images-slider", type: "thumbs", "auto-height": true, showControls: this.comment.images.length > 1 ? true : false, "show-thumbs-controls": "false" }, h("div", { key: '50401766737293c42fa7ba3b351b6db736fd92eb', slot: 'items' }, this.comment.images.map((image, index) => (h("img", { key: index, src: image, alt: "" })))), h("div", { key: '6b9a50da0b67497dfae21b52044850329d8712b5', slot: "thumbs" }, this.comment.images.map((image, index) => (h("div", { class: "s-comments-item-images-slider-thumb" }, h("img", { key: index, src: image, alt: "" })))))))), this.allowLikes && !isAdmin && salla.url.is_page('product.single') ? h("salla-button", { ref: el => this.likeBtn = el, class: `s-comments-item-like-btn ${this.likedComments.includes(this.comment.id) ? 'liked' : ''}`, loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleLike() }, h("span", null, this.helpfulLabel, " ", this.likesCount > 0 ? `(${this.likesCount})` : ''), h("span", { innerHTML: ThumbsUp })) : '', this.comment.is_pending ?
187
187
  h("span", { class: "s-comments-item-pending-text" }, this.waiting_approval_trans) : null))), !!this.getReplies().length && !isAdmin ?
188
188
  this.getReplies().map((reply) => {
189
189
  return h("div", null, h("salla-comment-item", { comment: reply }));
@@ -228,6 +228,7 @@ const SallaComments = class {
228
228
  * Determines if the comments are testimonials
229
229
  */
230
230
  this.testimonials = false;
231
+ this.customerId = null;
231
232
  // Translations
232
233
  this.noComments = salla.lang.get('blocks.comments.no_comments');
233
234
  this.comment_title = salla.lang.get('blocks.comments.title');
@@ -293,6 +294,32 @@ const SallaComments = class {
293
294
  })();
294
295
  Salla.infiniteScroll.errorWrapped = true;
295
296
  }
297
+ // Preserve sort and private_comments params in next page URL for infinite scroll
298
+ patchNextPageUrl() {
299
+ if (!this.nextPage)
300
+ return;
301
+ try {
302
+ const url = new URL(this.nextPage, window.location.origin);
303
+ if (this.sort && !url.searchParams.get('sort')) {
304
+ url.searchParams.set('sort', this.sort);
305
+ }
306
+ if (this.customerId && !url.searchParams.get('private_comments')) {
307
+ url.searchParams.set('private_comments', this.customerId);
308
+ }
309
+ this.nextPage = url.toString();
310
+ }
311
+ catch (_e) {
312
+ // fallback for relative next links
313
+ const hasQuery = this.nextPage.includes('?');
314
+ if (this.sort && !/[?&]sort=/.test(this.nextPage)) {
315
+ this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
316
+ }
317
+ if (this.customerId && !/[?&]private_comments=/.test(this.nextPage)) {
318
+ const sep = this.nextPage.includes('?') ? '&' : '?';
319
+ this.nextPage = this.nextPage + sep + `private_comments=${this.customerId}`;
320
+ }
321
+ }
322
+ }
296
323
  // Initiate infinite scroll
297
324
  initiateInfiniteScroll() {
298
325
  if (!this.wrapper) {
@@ -312,6 +339,7 @@ const SallaComments = class {
312
339
  this.infiniteScroll?.on('load', response => {
313
340
  this.pagination = response.pagination;
314
341
  this.nextPage = typeof response.pagination.links === 'object' && !!response.pagination.links.next ? response.pagination.links.next : null;
342
+ this.patchNextPageUrl();
315
343
  for (const card of this.handleResponse(response)) {
316
344
  this.wrapper.append(card);
317
345
  }
@@ -399,8 +427,11 @@ const SallaComments = class {
399
427
  resp = await salla.api.request('reviews', { params }, 'get');
400
428
  }
401
429
  else {
402
- // Ensure sort is passed for regular comments as well
403
- resp = await salla.api.comment.getComments(this.type, this.itemId, 1, 5, this.sort);
430
+ const showPrivateComments = searchParams.get('private_comments');
431
+ this.customerId = (showPrivateComments && Salla.config.get('user.type') === 'user' && Salla.config.get('user.id'))
432
+ ? Salla.config.get('user.id')
433
+ : null;
434
+ resp = await salla.api.comment.getComments(this.type, this.itemId, 1, 5, this.sort, this.customerId);
404
435
  }
405
436
  if (!resp.data || !resp.data.length) {
406
437
  this.showPlaceholder = false;
@@ -414,24 +445,7 @@ const SallaComments = class {
414
445
  this.pagination = resp.pagination;
415
446
  this.total = resp.pagination.total;
416
447
  this.nextPage = typeof resp.pagination.links === 'object' && !!resp.pagination.links.next ? resp.pagination.links.next : null;
417
- // Preserve sort param in next page URL for infinite scroll
418
- if (this.nextPage && this.sort) {
419
- try {
420
- const url = new URL(this.nextPage, window.location.origin);
421
- if (!url.searchParams.get('sort')) {
422
- url.searchParams.set('sort', this.sort);
423
- this.nextPage = url.toString();
424
- }
425
- }
426
- catch (_e) {
427
- // fallback for relative next links
428
- const hasQuery = this.nextPage.includes('?');
429
- const hasSort = /[?&]sort=/.test(this.nextPage);
430
- if (!hasSort) {
431
- this.nextPage = this.nextPage + (hasQuery ? '&' : '?') + `sort=${this.sort}`;
432
- }
433
- }
434
- }
448
+ this.patchNextPageUrl();
435
449
  setTimeout(() => {
436
450
  for (const card of this.handleResponse(resp)) {
437
451
  this.wrapper.append(card);
@@ -771,7 +785,7 @@ const SallaReviewCard = class {
771
785
  return (h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, h("img", { alt: product.image?.alt || "Product", src: product.image?.url, class: "s-review-card-product-image", width: 60, height: 60, loading: "lazy", decoding: "async", draggable: false }), h("div", { class: "s-review-card-product-details" }, h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? h("p", { class: "s-review-card-product-details-purchase-count" }, h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
772
786
  }
773
787
  render() {
774
- return h("div", { key: '48e1eb2b71e5ee6e66def2aac42e9b6255935a17', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '0b24ea13f1f31224fff7e73d5db6c428adef0bd9', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: '44501e61b5eed711820bece91053534a2baacbde', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
788
+ return h("div", { key: '2c239df97aea1d28e160ede3e06bd283874bbaea', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '227c1fad17d6d2bf26316cabf69b854bb23cca52', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: '74b06a8c24767d8e8cd7101915055d3861c5d0fd', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
775
789
  }
776
790
  get el() { return getElement(this); }
777
791
  };
@@ -868,7 +882,7 @@ const SallaReviews = class {
868
882
  });
869
883
  }
870
884
  render() {
871
- return (h("div", { key: '87bb92617b9d324de1302a6ca936f53c32127783', class: "s-reviews-container" }, h("div", { key: '9f787c6c51986619ac833dbb5ec600117f44ac11', class: "s-reviews-header-wrapper" }, h("h1", { key: 'cfbd2cc1d756a364daae2aadeb622f562a2b2861', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft }))) : null), h("salla-slider", { key: '2ee3a757f2535a35b8361602a9f5e20700bb7f74', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: '9560489ef5c998b0eef8f0a2a9f7eec5e2f27c6d', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
885
+ return (h("div", { key: '70962f093fe86f8d24c4c7127aea2393753ae0dd', class: "s-reviews-container" }, h("div", { key: 'e462464473514c515b4406205f28759101755874', class: "s-reviews-header-wrapper" }, h("h1", { key: '4f1d93865eaede37f8c54f82f094b28abf59512c', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: arrowLeft }))) : null), h("salla-slider", { key: 'a3bb1307ec589cbd33c854ef339addfd00c3782d', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: '2b0739018657616475e85c6c9413365939be33c6', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
872
886
  }
873
887
  };
874
888
  SallaReviews.style = sallaReviewsCss;
@@ -1548,7 +1562,7 @@ const SallaReviewsPage = class {
1548
1562
  return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
1549
1563
  }
1550
1564
  render() {
1551
- return (h("host", { key: 'a38a67a03a9ef104b0233f560d764b31e5dbe636' }, h("div", { key: '9bcd8e6b51ade66e2a7ec6499c03d481e9ea9462', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '2af4f0e2f6814278c5f02a53cf20223eba0924b7', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: '9741437a092ae5b56f2633b0cdd7629bb83bcdf4', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: '68255bc0c46369dfbfa7966cbae3524014a020e0', class: "s-reviews-page-filter-wrapper" }, h("label", { key: '5aa4b79c6de3f960d235b35a3391e0aa883f1803', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '66ffbca8eab701b4177fbd16deb6b45cd8b03440', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
1565
+ return (h("host", { key: '9e93c876f4cf9d49748bc219cd81c871ddfcb9ba' }, h("div", { key: '322e9487de2da90e78ef96eaf126c5ab9839255f', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '7f2cc0885d83123bd1a2c0e7d795a7e61987b4a7', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: 'e61048238b21b6645f4799ae1dcd5f9e6d660088', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: 'ce8a0de87512c023f623604c0b486ea4f37ac8ab', class: "s-reviews-page-filter-wrapper" }, h("label", { key: '35bcbffd914e811ebf73253d93e7b972f3b56cbc', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: 'e57ea01b2aba04e82c63e51edf952e5c6ee460e6', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
1552
1566
  this.wrapper = el;
1553
1567
  } }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
1554
1568
  : h("div", { class: "s-products-list-placeholder" }, h("span", { innerHTML: ShoppingBag }), h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (h("div", { class: "s-reviews-page-load-more-container" }, h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host } from './index-CvIpy7Cj.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
  import { W as WhatsappIcon } from './whatsapp2-CgR-T_ZS.js';
6
6
  import { M as MailIcon } from './mail-DmgxDvXL.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
 
6
6
  const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
  import { S as Star } from './star2-D4oPi1Ov.js';
6
6
 
7
7
  const sallaCountDownCss = "";
@@ -157,7 +157,7 @@ const SallaCountDown = class {
157
157
  return this.renderCountDown();
158
158
  }
159
159
  render() {
160
- return (h(Host, { key: 'de0e93d1c6bcf24dc3b07705786fb9c204bfa625', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
160
+ return (h(Host, { key: '0cfdbb009d256be108123cabf3cb4311866bdc17', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
161
161
  }
162
162
  };
163
163
  SallaCountDown.style = sallaCountDownCss;
@@ -270,14 +270,14 @@ const SallaProductCard = class {
270
270
  's-product-card-out-of-stock': this.productData?.is_out_of_stock,
271
271
  };
272
272
  const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
273
- return (h(Host, { key: 'af7d81ee7f9d8d56c5a8dd6092a57dc0e12cd6f4', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: '31491a836d402261afee6c8d28b1600cc5b0b06d', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '18594836114d10d13a26b307b4dd30a399c2657f', ...hrefProp }, h("img", { key: '06ccf31c089968eec9cb87fbc8a308e178459577', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
273
+ return (h(Host, { key: '6c9b39e50f045c2511188597128546e440431b24', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: '69813dd46d8df8298835d6de6faca959f2645c6b', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '67080662eb9a5ff4af903b6e57f029925565138b', ...hrefProp }, h("img", { key: '8e7a60fff16a8e4f7b27f19aae1c39a16ce8cadd', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
274
274
  ? 'contain'
275
275
  : this.fitImageHeight
276
276
  ? this.fitImageHeight
277
- : 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: 'a03cd8723f1511ab0c80b46a121f201d4b600670', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
278
- h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: 'b918024efb5f4e650c16130045d4ac76f688c66b', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
277
+ : 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: '648cf477ab6ded2d2c02dbf6957d68365524c847', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
278
+ h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: 'a2ed73abfe91993ded6e84f6f493ea50ee0899a9', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
279
279
  h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, h("span", null, h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
280
- : '', h("div", { key: '41b3d71085017bce419692aa01dce166b1fe31ab', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: '0d1eaecd339554a1fcd1af6fd55f0edc94474d55', class: "s-product-card-content-title" }, h("a", { key: '203bf0b7fb32629982cbcce236095b8c3663b317', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
280
+ : '', h("div", { key: '09fd5336d5c9d454620a91be8271399b938bb1f4', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: 'c915604dafa02d6ba50e6e9933edbd57149e7a56', class: "s-product-card-content-title" }, h("a", { key: '2b80635accb51545b72baf7ff57a115a62457613', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
281
281
  h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
282
282
  : ''), this.productData?.donation && !this.minimal && !this.fullImage ?
283
283
  [h("salla-progress-bar", { donation: this.productData?.donation }), h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
@@ -286,7 +286,7 @@ const SallaProductCard = class {
286
286
  this.addBtn.donatingAmount = e.target.value;
287
287
  }, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
288
288
  : '')]
289
- : '', h("div", { key: 'f15e29713c258337540bc7cbb3e16339a6e319ab', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
289
+ : '', h("div", { key: '12613a96e7d914ea156470305c28a7449a3dcb9b', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
290
290
  h("div", { class: "s-product-card-rating" }, h("span", { innerHTML: Star }), h("span", null, this.productData.rating.stars))
291
291
  : ''), this.isSpecial && this.productData.discount_ends
292
292
  ? h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, c as createEvent, h } from './index-CvIpy7Cj.js';
5
5
  import { C as CameraIcon } from './camera-C6jIkM-X.js';
6
6
  import { F as FormFieldTypes } from './interfaces-OF8QcbMM.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
  import { H as Helper } from './Helper-DFMXF2_h.js';
6
6
  import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -169,12 +169,12 @@ const SallaFiltersWidget = class {
169
169
  return h("span", { class: "s-filters-option-name" }, label);
170
170
  }
171
171
  render() {
172
- return (h(Host, { key: 'aaa423868d5ecd62a1d3dbb05a5143f7983e15ab', class: "s-filters-widget-container" }, h("h3", { key: '444a72e027f870fcd3f2fb01d8a52d642b1d6fab', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '1813e58218aefebecdd0b2d8af9ce89ce5c17b9f' }, this.option.label), h("span", { key: '11926f6d1343095b29c93f010b99cfc07152918a', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '24f151541c5da697d157f6f110fb640b316ad533', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '12b4adb00888f657f9d67f84b377634190e0cedd', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: 'b14ff87ad64e594c3120be3b5e5d102c8d74cd98', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: '9a9f76a9ca1a9ae7e474dcf771e0a58936dee7d7', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '020b614afb9c6ca5aadfccafe748e73e8f2fa77a' }), this.option.type !== FilterOptionTypes.RANGE
172
+ return (h(Host, { key: 'e93cfb9f1f6daeb8a2121ccb36a3cf135a55e902', class: "s-filters-widget-container" }, h("h3", { key: 'd5ef45d78e0119e2ac997ded417e310c0a797c34', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: 'fe4df56fad0d290395d78588456fb7d00a20ed43' }, this.option.label), h("span", { key: 'c961f86b5e06437dfdd145e164da5fe326500032', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '7cf1ed1b562bf16acc481f682965567d8bc1813c', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '275427371f48fdfc8ef8b80b9d3e11fa247f7d7a', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '473c082ed9f7415beba445d36a121027eaadbbe1', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: 'e45654731cdd801345acc5b3311d9ddab3020035', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '5ae673157a4b579a000901b04db8e375a52565e7' }), this.option.type !== FilterOptionTypes.RANGE
173
173
  ? this.renderFilterOption(this.option)
174
174
  : h("salla-price-range", { onChanged: (event) => {
175
175
  this.changed.emit(event.detail);
176
176
  }, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
177
- h("a", { key: '4d03eccbc3b357444e27d61c647b09d435ceb1be', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
177
+ h("a", { key: '8ec08429d8fb31b338e6f9f9cf455b5ba2155cb8', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
178
178
  }
179
179
  get host() { return getElement(this); }
180
180
  };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-D4I5TLtE.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-CvIpy7Cj.js';
5
5
  import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
6
6
  import { H as Helper } from './Helper-DFMXF2_h.js';
7
7
  import './anime.es-CgtvEd63.js';
@@ -193,7 +193,7 @@ const SallaFilters = class {
193
193
  this.applyFilters();
194
194
  }
195
195
  render() {
196
- return h(Host, { key: '3b38160573591da8249606b8c12b72b58d03551d' }, this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
196
+ return h(Host, { key: 'f3c454fc20472dca6fe646c9121028a2c045808f' }, this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
197
197
  this.handleOptionChange(event, option, value);
198
198
  } })), this.filters?.length ? h("div", { class: "s-filters-footer" }, h("salla-button", { color: 'gray', fill: 'outline', onClick: () => this.resetFilters() }, this.reset)) : '');
199
199
  }