@salla.sa/twilight-components 2.14.432 → 2.14.434

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 (322) hide show
  1. package/dist/cjs/{filepond-B_l27yye.js → filepond-CWW6qAlB.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DZOhW2iP.js → filepond-plugin-file-poster-tqITvQar.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BNaYb1U3.js → filepond-plugin-file-validate-size-BfDaORpj.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-Cw8Znb0V.js → filepond-plugin-file-validate-type-DW0ppYcG.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DxnD0wqH.js → filepond-plugin-image-edit-c9ML3iba.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DlLc6bZg.js → filepond-plugin-image-exif-orientation-XTmaoGOO.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-LS71z4pj.js → filepond-plugin-image-preview-BNlkC9-r.js} +1 -1
  8. package/dist/cjs/{functions-Bli1zuDJ.js → functions-BW_9N8hU.js} +1 -1
  9. package/dist/cjs/{index-fxto0lmo.js → index-DGugEE5Q.js} +1 -1
  10. package/dist/cjs/{index-Bkq8qG-X.js → index-zPj2BUIM.js} +10 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cashback-banner.cjs.entry.js +77 -0
  25. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-installment.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  44. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  46. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +50 -0
  47. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-products-list.cjs.entry.js +28 -21
  78. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  82. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  97. package/dist/cjs/{tracked-promise-Bg3_0LpQ.js → tracked-promise-BOij5kTl.js} +1 -1
  98. package/dist/cjs/twilight.cjs.js +2 -2
  99. package/dist/cjs/{vanilla-picker-C1EOe3vj.js → vanilla-picker-Drd6dUY6.js} +1 -1
  100. package/dist/collection/assets/svg/money.svg +3 -0
  101. package/dist/collection/assets/svg/star-filled.svg +10 -0
  102. package/dist/collection/collection-manifest.json +2 -0
  103. package/dist/collection/components/salla-cashback-banner/salla-cashback-banner.css +0 -0
  104. package/dist/collection/components/salla-cashback-banner/salla-cashback-banner.js +74 -0
  105. package/dist/collection/components/salla-installment/salla-installment.js +1 -1
  106. package/dist/collection/components/salla-loyalty-points-banner/salla-loyalty-points-banner.css +0 -0
  107. package/dist/collection/components/salla-loyalty-points-banner/salla-loyalty-points-banner.js +54 -0
  108. package/dist/collection/components/salla-products-list/salla-products-list.js +27 -20
  109. package/dist/components/index.js +2 -2
  110. package/dist/components/salla-cashback-banner.d.ts +11 -0
  111. package/dist/components/salla-cashback-banner.js +96 -0
  112. package/dist/components/salla-installment.js +1 -1
  113. package/dist/components/salla-loyalty-points-banner.d.ts +11 -0
  114. package/dist/components/salla-loyalty-points-banner.js +69 -0
  115. package/dist/components/salla-products-list2.js +27 -20
  116. package/dist/esm/{filepond-HXomeZen.js → filepond-B8ZU0S2U.js} +1 -1
  117. package/dist/esm/{filepond-plugin-file-poster-D4H-PD_s.js → filepond-plugin-file-poster-CbvNpFBW.js} +1 -1
  118. package/dist/esm/{filepond-plugin-file-validate-size-BS0ly_Mw.js → filepond-plugin-file-validate-size-Dvk6NFzB.js} +1 -1
  119. package/dist/esm/{filepond-plugin-file-validate-type-COwvXqLN.js → filepond-plugin-file-validate-type-BHnSvKf9.js} +1 -1
  120. package/dist/esm/{filepond-plugin-image-edit-yo1lYVPu.js → filepond-plugin-image-edit-C3-HEwrk.js} +1 -1
  121. package/dist/esm/{filepond-plugin-image-exif-orientation-AQpLyT8N.js → filepond-plugin-image-exif-orientation-CkNQRZPb.js} +1 -1
  122. package/dist/esm/{filepond-plugin-image-preview-BTSkXVkI.js → filepond-plugin-image-preview-BiSvHi1n.js} +1 -1
  123. package/dist/esm/{functions-5z0tDgRf.js → functions-B0NK3Lby.js} +1 -1
  124. package/dist/esm/{index-BuJQW042.js → index-BMlmyi0X.js} +1 -1
  125. package/dist/esm/{index-BJ40PU3w.js → index-CCvjaZrV.js} +10 -2
  126. package/dist/esm/loader.js +3 -3
  127. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  128. package/dist/esm/salla-accordion_6.entry.js +1 -1
  129. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  130. package/dist/esm/salla-advertisement.entry.js +1 -1
  131. package/dist/esm/salla-alert_2.entry.js +1 -1
  132. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  133. package/dist/esm/salla-apps-icons.entry.js +1 -1
  134. package/dist/esm/salla-badge.entry.js +1 -1
  135. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  136. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  137. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  138. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  139. package/dist/esm/salla-cashback-banner.entry.js +75 -0
  140. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  141. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  142. package/dist/esm/salla-contacts.entry.js +1 -1
  143. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  144. package/dist/esm/salla-count-down.entry.js +1 -1
  145. package/dist/esm/salla-custom-fields.entry.js +1 -1
  146. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  147. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  148. package/dist/esm/salla-filters-widget.entry.js +1 -1
  149. package/dist/esm/salla-filters.entry.js +1 -1
  150. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  151. package/dist/esm/salla-gifting.entry.js +1 -1
  152. package/dist/esm/salla-hook.entry.js +1 -1
  153. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  154. package/dist/esm/salla-installment.entry.js +2 -2
  155. package/dist/esm/salla-list-tile.entry.js +1 -1
  156. package/dist/esm/salla-localization-modal.entry.js +1 -1
  157. package/dist/esm/salla-login-modal.entry.js +1 -1
  158. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  159. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  160. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  161. package/dist/esm/salla-loyalty-points-banner.entry.js +48 -0
  162. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  164. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  165. package/dist/esm/salla-loyalty.entry.js +1 -1
  166. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  167. package/dist/esm/salla-map.entry.js +1 -1
  168. package/dist/esm/salla-menu.entry.js +1 -1
  169. package/dist/esm/salla-metadata.entry.js +1 -1
  170. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  171. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  172. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  173. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  174. package/dist/esm/salla-notification-item.entry.js +1 -1
  175. package/dist/esm/salla-notifications.entry.js +1 -1
  176. package/dist/esm/salla-offer-modal.entry.js +1 -1
  177. package/dist/esm/salla-offer.entry.js +1 -1
  178. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  179. package/dist/esm/salla-order-details-options.entry.js +1 -1
  180. package/dist/esm/salla-order-details.entry.js +1 -1
  181. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  182. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  183. package/dist/esm/salla-order-edit.entry.js +1 -1
  184. package/dist/esm/salla-order-summary.entry.js +1 -1
  185. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  186. package/dist/esm/salla-orders.entry.js +1 -1
  187. package/dist/esm/salla-payments.entry.js +1 -1
  188. package/dist/esm/salla-placeholder.entry.js +1 -1
  189. package/dist/esm/salla-price-range.entry.js +1 -1
  190. package/dist/esm/salla-product-card_2.entry.js +1 -1
  191. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  192. package/dist/esm/salla-products-list.entry.js +28 -21
  193. package/dist/esm/salla-progress-bar.entry.js +1 -1
  194. package/dist/esm/salla-quick-order.entry.js +1 -1
  195. package/dist/esm/salla-rating-modal.entry.js +1 -1
  196. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  197. package/dist/esm/salla-scopes.entry.js +1 -1
  198. package/dist/esm/salla-search.entry.js +1 -1
  199. package/dist/esm/salla-skeleton.entry.js +1 -1
  200. package/dist/esm/salla-slider.entry.js +1 -1
  201. package/dist/esm/salla-social-share.entry.js +1 -1
  202. package/dist/esm/salla-social.entry.js +1 -1
  203. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  204. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  205. package/dist/esm/salla-tooltip.entry.js +1 -1
  206. package/dist/esm/salla-trust-badges.entry.js +1 -1
  207. package/dist/esm/salla-user-menu.entry.js +1 -1
  208. package/dist/esm/salla-user-profile.entry.js +1 -1
  209. package/dist/esm/salla-user-settings.entry.js +1 -1
  210. package/dist/esm/salla-verify.entry.js +1 -1
  211. package/dist/esm/salla-wallet.entry.js +1 -1
  212. package/dist/esm/{tracked-promise-C8cy0NIq.js → tracked-promise-BRNUnrUG.js} +1 -1
  213. package/dist/esm/twilight.js +3 -3
  214. package/dist/esm/{vanilla-picker-CkNepO2l.js → vanilla-picker-Ce-g_3Yg.js} +1 -1
  215. package/dist/twilight/{p-3f05e331.entry.js → p-06bfa777.entry.js} +1 -1
  216. package/dist/twilight/{p-6130f608.entry.js → p-0a1ca9c1.entry.js} +1 -1
  217. package/dist/twilight/{p-2d62cc4c.entry.js → p-0aa893d7.entry.js} +1 -1
  218. package/dist/twilight/{p-acfddda1.entry.js → p-0b9688d0.entry.js} +1 -1
  219. package/dist/twilight/{p-e6b3c87c.entry.js → p-174dc0a4.entry.js} +1 -1
  220. package/dist/twilight/p-1b978866.entry.js +4 -0
  221. package/dist/twilight/p-1c3358af.entry.js +4 -0
  222. package/dist/twilight/{p-3f9a1902.entry.js → p-1cdc7af0.entry.js} +1 -1
  223. package/dist/twilight/{p-ad2ed5eb.entry.js → p-1d011c4a.entry.js} +1 -1
  224. package/dist/twilight/{p-77c95706.entry.js → p-1e2b99ff.entry.js} +1 -1
  225. package/dist/twilight/{p-5f4c249f.entry.js → p-204f8cc8.entry.js} +1 -1
  226. package/dist/twilight/{p-956ac53f.entry.js → p-24b0c91d.entry.js} +1 -1
  227. package/dist/twilight/{p-51b24d07.entry.js → p-269b7e54.entry.js} +1 -1
  228. package/dist/twilight/{p-fabe4232.entry.js → p-27aae413.entry.js} +1 -1
  229. package/dist/twilight/{p-5d077c6a.entry.js → p-2822dff4.entry.js} +1 -1
  230. package/dist/twilight/{p-a18652ed.entry.js → p-28df3b47.entry.js} +1 -1
  231. package/dist/twilight/p-298e860b.entry.js +4 -0
  232. package/dist/twilight/{p-43bee891.entry.js → p-2b03d8dd.entry.js} +1 -1
  233. package/dist/twilight/{p-0632dfef.entry.js → p-2e3879e2.entry.js} +1 -1
  234. package/dist/twilight/{p-e0ec707c.entry.js → p-36adc8b6.entry.js} +1 -1
  235. package/dist/twilight/{p-c8fb4dfa.entry.js → p-4445fe22.entry.js} +1 -1
  236. package/dist/twilight/{p-b191a231.entry.js → p-444c78ba.entry.js} +1 -1
  237. package/dist/twilight/{p-646e8f52.entry.js → p-448852e5.entry.js} +1 -1
  238. package/dist/twilight/{p-9119f35f.entry.js → p-46fc566b.entry.js} +1 -1
  239. package/dist/twilight/{p-f863328c.entry.js → p-4a1ea811.entry.js} +1 -1
  240. package/dist/twilight/{p-a0005be9.entry.js → p-4aa09288.entry.js} +1 -1
  241. package/dist/twilight/{p-178aae87.entry.js → p-541847cd.entry.js} +1 -1
  242. package/dist/twilight/{p-275770d0.entry.js → p-5b94c9ec.entry.js} +1 -1
  243. package/dist/twilight/{p-79eea339.entry.js → p-5b9c52ed.entry.js} +1 -1
  244. package/dist/twilight/{p-6296eebd.entry.js → p-634115cb.entry.js} +1 -1
  245. package/dist/twilight/{p-fc4090bd.entry.js → p-69d37822.entry.js} +1 -1
  246. package/dist/twilight/{p-df6636a5.entry.js → p-69ffd7f4.entry.js} +1 -1
  247. package/dist/twilight/{p-6676e7ab.entry.js → p-741d0133.entry.js} +1 -1
  248. package/dist/twilight/{p-f26e212f.entry.js → p-742ea83d.entry.js} +1 -1
  249. package/dist/twilight/p-76fd5e24.entry.js +4 -0
  250. package/dist/twilight/p-78d4e07b.entry.js +4 -0
  251. package/dist/twilight/{p-1a423637.entry.js → p-81108b40.entry.js} +1 -1
  252. package/dist/twilight/{p-2c17ff06.entry.js → p-84d0de81.entry.js} +1 -1
  253. package/dist/twilight/{p-bb90ddc2.entry.js → p-88d72e17.entry.js} +1 -1
  254. package/dist/twilight/{p-9ce261f7.entry.js → p-8960b0d5.entry.js} +1 -1
  255. package/dist/twilight/{p-dacde914.entry.js → p-89e9172e.entry.js} +1 -1
  256. package/dist/twilight/{p-c632b364.entry.js → p-8a86e1be.entry.js} +1 -1
  257. package/dist/twilight/{p-9e7bd84a.entry.js → p-946e111f.entry.js} +1 -1
  258. package/dist/twilight/{p-5cde2cb8.entry.js → p-9719b3ae.entry.js} +1 -1
  259. package/dist/twilight/{p-Bun3xE9B.js → p-9b-9ka47.js} +1 -1
  260. package/dist/twilight/{p-02011d32.entry.js → p-9e739b68.entry.js} +1 -1
  261. package/dist/twilight/{p-9899dfe6.entry.js → p-9e980184.entry.js} +1 -1
  262. package/dist/twilight/{p-CYaVURSO.js → p-BO0AhOgw.js} +1 -1
  263. package/dist/twilight/{p-BJ40PU3w.js → p-CCvjaZrV.js} +2 -2
  264. package/dist/twilight/{p-D1RS-zwD.js → p-CavpTJbV.js} +1 -1
  265. package/dist/twilight/{p-CFkS_w5i.js → p-CfnUG35R.js} +1 -1
  266. package/dist/twilight/p-D3EEMM4Q.js +4 -0
  267. package/dist/twilight/{p-0AWfiLtG.js → p-DJRGxZpg.js} +1 -1
  268. package/dist/twilight/{p-NA2JPuRY.js → p-DNvjzv3i.js} +1 -1
  269. package/dist/twilight/{p-BS8JieU8.js → p-DQV39xyV.js} +1 -1
  270. package/dist/twilight/{p-vXUmTMNT.js → p-DSNYrBKg.js} +1 -1
  271. package/dist/twilight/{p-_aEM4nUi.js → p-DXHIK3BO.js} +1 -1
  272. package/dist/twilight/{p-bfa0b7fe.entry.js → p-a4633c90.entry.js} +1 -1
  273. package/dist/twilight/{p-e4fc772b.entry.js → p-a64f6f5e.entry.js} +1 -1
  274. package/dist/twilight/{p-bad7f522.entry.js → p-aa68a8aa.entry.js} +1 -1
  275. package/dist/twilight/{p-f058cd4d.entry.js → p-aa77176a.entry.js} +1 -1
  276. package/dist/twilight/{p-ca8e26b3.entry.js → p-ad9ec8cf.entry.js} +1 -1
  277. package/dist/twilight/p-adfdecf5.entry.js +4 -0
  278. package/dist/twilight/{p-d42cdc1a.entry.js → p-afc9e2ec.entry.js} +1 -1
  279. package/dist/twilight/{p-00aed63b.entry.js → p-afdc1db1.entry.js} +1 -1
  280. package/dist/twilight/{p-BY64RkRn.js → p-asWgwDKm.js} +1 -1
  281. package/dist/twilight/{p-7ca4d215.entry.js → p-b49e2f80.entry.js} +1 -1
  282. package/dist/twilight/{p-40d60687.entry.js → p-b4b54b19.entry.js} +1 -1
  283. package/dist/twilight/{p-079fd3e3.entry.js → p-b4fc1ab3.entry.js} +1 -1
  284. package/dist/twilight/{p-8b207eb9.entry.js → p-b878dafc.entry.js} +1 -1
  285. package/dist/twilight/{p-9ca58cda.entry.js → p-b95d6343.entry.js} +1 -1
  286. package/dist/twilight/{p-ccf24f28.entry.js → p-ba00b2a5.entry.js} +1 -1
  287. package/dist/twilight/{p-1ed63470.entry.js → p-bc7c8a73.entry.js} +1 -1
  288. package/dist/twilight/{p-a37100ea.entry.js → p-bd227ed6.entry.js} +1 -1
  289. package/dist/twilight/{p-7af14cb7.entry.js → p-be938ae4.entry.js} +1 -1
  290. package/dist/twilight/{p-2976acab.entry.js → p-bfc9043f.entry.js} +1 -1
  291. package/dist/twilight/{p-15105c61.entry.js → p-c12d9d20.entry.js} +1 -1
  292. package/dist/twilight/{p-c5523e29.entry.js → p-c37148ce.entry.js} +1 -1
  293. package/dist/twilight/{p-d9d151cc.entry.js → p-c41e0c6a.entry.js} +1 -1
  294. package/dist/twilight/{p-ce9405a3.entry.js → p-c548c109.entry.js} +1 -1
  295. package/dist/twilight/{p-5cd47a2a.entry.js → p-c7571a96.entry.js} +1 -1
  296. package/dist/twilight/{p-e386a27c.entry.js → p-c958ebbc.entry.js} +1 -1
  297. package/dist/twilight/{p-ad4ce4d9.entry.js → p-cb2717ce.entry.js} +1 -1
  298. package/dist/twilight/{p-9854f087.entry.js → p-ced59ca2.entry.js} +1 -1
  299. package/dist/twilight/{p-f60083f9.entry.js → p-d0a50136.entry.js} +1 -1
  300. package/dist/twilight/{p-e36cf20c.entry.js → p-d1784e5f.entry.js} +1 -1
  301. package/dist/twilight/{p-6cd60db0.entry.js → p-d8dda828.entry.js} +1 -1
  302. package/dist/twilight/{p-0fbe0573.entry.js → p-da9007ce.entry.js} +1 -1
  303. package/dist/twilight/{p-3279bfe3.entry.js → p-e0089ff0.entry.js} +1 -1
  304. package/dist/twilight/{p-f2e0e6f0.entry.js → p-e048fb41.entry.js} +1 -1
  305. package/dist/twilight/{p-fbcde591.entry.js → p-e1bab84d.entry.js} +1 -1
  306. package/dist/twilight/{p-7e74a3f8.entry.js → p-f19b6300.entry.js} +1 -1
  307. package/dist/twilight/{p-676224c8.entry.js → p-f4933141.entry.js} +1 -1
  308. package/dist/twilight/{p-ffff176d.entry.js → p-f85b6b5e.entry.js} +1 -1
  309. package/dist/twilight/{p-b83da2aa.entry.js → p-fa0241ed.entry.js} +1 -1
  310. package/dist/twilight/{p-587d868d.entry.js → p-fb997718.entry.js} +1 -1
  311. package/dist/twilight/{p-ac58bd23.entry.js → p-ff4f4e20.entry.js} +1 -1
  312. package/dist/twilight/twilight.esm.js +1 -1
  313. package/dist/types/components/salla-cashback-banner/salla-cashback-banner.d.ts +20 -0
  314. package/dist/types/components/salla-loyalty-points-banner/salla-loyalty-points-banner.d.ts +12 -0
  315. package/dist/types/components/salla-products-list/salla-products-list.d.ts +5 -0
  316. package/dist/types/components.d.ts +26 -0
  317. package/package.json +5 -5
  318. package/dist/twilight/p-2ad11831.entry.js +0 -4
  319. package/dist/twilight/p-460383f6.entry.js +0 -4
  320. package/dist/twilight/p-8afcb7d2.entry.js +0 -4
  321. package/dist/twilight/p-Cln8qx5Q.js +0 -4
  322. package/dist/twilight/p-a7b03950.entry.js +0 -4
@@ -373,6 +373,8 @@ export namespace Components {
373
373
  */
374
374
  "showCartLabel": boolean;
375
375
  }
376
+ interface SallaCashbackBanner {
377
+ }
376
378
  interface SallaColorPicker {
377
379
  /**
378
380
  * Close/Hide the picker.
@@ -1594,6 +1596,8 @@ export namespace Components {
1594
1596
  interface SallaLoyaltyPoint {
1595
1597
  "point": Point;
1596
1598
  }
1599
+ interface SallaLoyaltyPointsBanner {
1600
+ }
1597
1601
  interface SallaLoyaltyPrizeItem {
1598
1602
  /**
1599
1603
  * Prize item to be displayed in this component.
@@ -3499,6 +3503,12 @@ declare global {
3499
3503
  prototype: HTMLSallaCartSummaryElement;
3500
3504
  new (): HTMLSallaCartSummaryElement;
3501
3505
  };
3506
+ interface HTMLSallaCashbackBannerElement extends Components.SallaCashbackBanner, HTMLStencilElement {
3507
+ }
3508
+ var HTMLSallaCashbackBannerElement: {
3509
+ prototype: HTMLSallaCashbackBannerElement;
3510
+ new (): HTMLSallaCashbackBannerElement;
3511
+ };
3502
3512
  interface HTMLSallaColorPickerElementEventMap {
3503
3513
  "colorChanged": Color;
3504
3514
  "invalidInput": any;
@@ -3812,6 +3822,12 @@ declare global {
3812
3822
  prototype: HTMLSallaLoyaltyPointElement;
3813
3823
  new (): HTMLSallaLoyaltyPointElement;
3814
3824
  };
3825
+ interface HTMLSallaLoyaltyPointsBannerElement extends Components.SallaLoyaltyPointsBanner, HTMLStencilElement {
3826
+ }
3827
+ var HTMLSallaLoyaltyPointsBannerElement: {
3828
+ prototype: HTMLSallaLoyaltyPointsBannerElement;
3829
+ new (): HTMLSallaLoyaltyPointsBannerElement;
3830
+ };
3815
3831
  interface HTMLSallaLoyaltyPrizeItemElementEventMap {
3816
3832
  "prizeItemSelected": Item;
3817
3833
  }
@@ -4601,6 +4617,7 @@ declare global {
4601
4617
  "salla-cart-coupons": HTMLSallaCartCouponsElement;
4602
4618
  "salla-cart-item-offers": HTMLSallaCartItemOffersElement;
4603
4619
  "salla-cart-summary": HTMLSallaCartSummaryElement;
4620
+ "salla-cashback-banner": HTMLSallaCashbackBannerElement;
4604
4621
  "salla-color-picker": HTMLSallaColorPickerElement;
4605
4622
  "salla-comment-form": HTMLSallaCommentFormElement;
4606
4623
  "salla-comment-item": HTMLSallaCommentItemElement;
@@ -4632,6 +4649,7 @@ declare global {
4632
4649
  "salla-loyalty-hero": HTMLSallaLoyaltyHeroElement;
4633
4650
  "salla-loyalty-panel": HTMLSallaLoyaltyPanelElement;
4634
4651
  "salla-loyalty-point": HTMLSallaLoyaltyPointElement;
4652
+ "salla-loyalty-points-banner": HTMLSallaLoyaltyPointsBannerElement;
4635
4653
  "salla-loyalty-prize-item": HTMLSallaLoyaltyPrizeItemElement;
4636
4654
  "salla-loyalty-program": HTMLSallaLoyaltyProgramElement;
4637
4655
  "salla-loyalty-reward": HTMLSallaLoyaltyRewardElement;
@@ -5019,6 +5037,8 @@ declare namespace LocalJSX {
5019
5037
  */
5020
5038
  "showCartLabel"?: boolean;
5021
5039
  }
5040
+ interface SallaCashbackBanner {
5041
+ }
5022
5042
  interface SallaColorPicker {
5023
5043
  /**
5024
5044
  * Initial color for the picker.
@@ -6157,6 +6177,8 @@ declare namespace LocalJSX {
6157
6177
  interface SallaLoyaltyPoint {
6158
6178
  "point"?: Point;
6159
6179
  }
6180
+ interface SallaLoyaltyPointsBanner {
6181
+ }
6160
6182
  interface SallaLoyaltyPrizeItem {
6161
6183
  /**
6162
6184
  * Prize item to be displayed in this component.
@@ -7649,6 +7671,7 @@ declare namespace LocalJSX {
7649
7671
  "salla-cart-coupons": SallaCartCoupons;
7650
7672
  "salla-cart-item-offers": SallaCartItemOffers;
7651
7673
  "salla-cart-summary": SallaCartSummary;
7674
+ "salla-cashback-banner": SallaCashbackBanner;
7652
7675
  "salla-color-picker": SallaColorPicker;
7653
7676
  "salla-comment-form": SallaCommentForm;
7654
7677
  "salla-comment-item": SallaCommentItem;
@@ -7680,6 +7703,7 @@ declare namespace LocalJSX {
7680
7703
  "salla-loyalty-hero": SallaLoyaltyHero;
7681
7704
  "salla-loyalty-panel": SallaLoyaltyPanel;
7682
7705
  "salla-loyalty-point": SallaLoyaltyPoint;
7706
+ "salla-loyalty-points-banner": SallaLoyaltyPointsBanner;
7683
7707
  "salla-loyalty-prize-item": SallaLoyaltyPrizeItem;
7684
7708
  "salla-loyalty-program": SallaLoyaltyProgram;
7685
7709
  "salla-loyalty-reward": SallaLoyaltyReward;
@@ -7796,6 +7820,7 @@ declare module "@stencil/core" {
7796
7820
  "salla-cart-coupons": LocalJSX.SallaCartCoupons & JSXBase.HTMLAttributes<HTMLSallaCartCouponsElement>;
7797
7821
  "salla-cart-item-offers": LocalJSX.SallaCartItemOffers & JSXBase.HTMLAttributes<HTMLSallaCartItemOffersElement>;
7798
7822
  "salla-cart-summary": LocalJSX.SallaCartSummary & JSXBase.HTMLAttributes<HTMLSallaCartSummaryElement>;
7823
+ "salla-cashback-banner": LocalJSX.SallaCashbackBanner & JSXBase.HTMLAttributes<HTMLSallaCashbackBannerElement>;
7799
7824
  "salla-color-picker": LocalJSX.SallaColorPicker & JSXBase.HTMLAttributes<HTMLSallaColorPickerElement>;
7800
7825
  "salla-comment-form": LocalJSX.SallaCommentForm & JSXBase.HTMLAttributes<HTMLSallaCommentFormElement>;
7801
7826
  "salla-comment-item": LocalJSX.SallaCommentItem & JSXBase.HTMLAttributes<HTMLSallaCommentItemElement>;
@@ -7841,6 +7866,7 @@ declare module "@stencil/core" {
7841
7866
  "salla-loyalty-hero": LocalJSX.SallaLoyaltyHero & JSXBase.HTMLAttributes<HTMLSallaLoyaltyHeroElement>;
7842
7867
  "salla-loyalty-panel": LocalJSX.SallaLoyaltyPanel & JSXBase.HTMLAttributes<HTMLSallaLoyaltyPanelElement>;
7843
7868
  "salla-loyalty-point": LocalJSX.SallaLoyaltyPoint & JSXBase.HTMLAttributes<HTMLSallaLoyaltyPointElement>;
7869
+ "salla-loyalty-points-banner": LocalJSX.SallaLoyaltyPointsBanner & JSXBase.HTMLAttributes<HTMLSallaLoyaltyPointsBannerElement>;
7844
7870
  "salla-loyalty-prize-item": LocalJSX.SallaLoyaltyPrizeItem & JSXBase.HTMLAttributes<HTMLSallaLoyaltyPrizeItemElement>;
7845
7871
  "salla-loyalty-program": LocalJSX.SallaLoyaltyProgram & JSXBase.HTMLAttributes<HTMLSallaLoyaltyProgramElement>;
7846
7872
  "salla-loyalty-reward": LocalJSX.SallaLoyaltyReward & JSXBase.HTMLAttributes<HTMLSallaLoyaltyRewardElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.14.432",
3
+ "version": "2.14.434",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -79,9 +79,9 @@
79
79
  "typescript": "^5.4.5"
80
80
  },
81
81
  "dependencies": {
82
- "@salla.sa/applepay": "2.14.432",
83
- "@salla.sa/twilight": "2.14.432",
84
- "@salla.sa/twilight-tailwind-theme": "2.14.432",
82
+ "@salla.sa/applepay": "2.14.434",
83
+ "@salla.sa/twilight": "2.14.434",
84
+ "@salla.sa/twilight-tailwind-theme": "2.14.434",
85
85
  "@types/node": "^20.4.8",
86
86
  "animejs": "^3.2.2",
87
87
  "class-variance-authority": "0.7.0",
@@ -100,5 +100,5 @@
100
100
  "vanilla-lazyload": "^17.8.5",
101
101
  "vanilla-picker": "^2.12.2"
102
102
  },
103
- "gitHead": "a00ccb275fd2ba40093ddb324f41e2b3d6cc15c2"
103
+ "gitHead": "c6c8b66f52e793dcc8db7905580215887b59c2b1"
104
104
  }
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,c as s,h as i,H as e,a}from"./p-BJ40PU3w.js";import{a as r}from"./p-CgtvEd63.js";import{S as o}from"./p-DiKTtDW5.js";import{H as h}from"./p-CHf8XdiS.js";const l=class{constructor(i){t(this,i),this.productsFetched=s(this,"productsFetched"),this.autoload=!1,this.productCardComponent="custom-salla-product-card",this.page=1,this.placeholderText=salla.lang.get("pages.categories.no_products"),this.endOfText=salla.lang.get("common.elements.end_of_content"),this.failedLoadMore=salla.lang.get("common.elements.failed_to_load_more"),this.currentPage=salla.config.get("page"),this.filtersSnapshot=[],this.lastViewedProductKey="lastViewedProductId",this.filtersKey="filters",this.infiniteScrollStateKey="infiniteScrollState",this.prevCategoryIdKey="prevCategoryId",this.isProcessing=!1,this.scrollTimeout=null,this.boundScrollToLastViewedProduct=()=>this.scrollToLastViewedProduct(),this.boundHandleScroll=()=>this.handleScroll(),this.specialPagesWithoutIds={"product.index.latest":"latest","product.index.offers":"offers","product.index.search":"search","product.index.sales":"sales"},this.includes=h.parseJson(this.includes||this.host.getAttribute("includes")),Array.isArray(this.includes)||(this.includes=null),h.setIncludes(this.includes),salla.lang.onLoaded((()=>{this.placeholderText=salla.lang.get("pages.categories.no_products"),this.endOfText=salla.lang.get("common.elements.end_of_content"),this.failedLoadMore=salla.lang.get("common.elements.failed_to_load_more"),this.currentPage=salla.config.get("page")}))}connectedCallback(){"scrollRestoration"in history&&(history.scrollRestoration="manual"),window.addEventListener("DOMContentLoaded",this.boundScrollToLastViewedProduct),salla.event.on("salla-filters::changed",(t=>this.setFilters(t)))}disconnectedCallback(){window.removeEventListener("DOMContentLoaded",this.boundScrollToLastViewedProduct),window.removeEventListener("scroll",this.boundHandleScroll)}async setFilters(t){if(t&&JSON.stringify(t)!==JSON.stringify(this.parsedFilters))return window.scrollTo({top:0,behavior:"smooth"}),this.parsedFilters=JSON.parse(JSON.stringify(t)),this.filtersSnapshot=this.parsedFilters,"product.index"==this.currentPage?.slug&&this.parsedFilters&&this.parsedFilters.category_id&&(this.currentCategoryIdFilter=[this.parsedFilters.category_id]),this.reload()}async reload(){!this.autoload&&this.loadMoreWrapper&&(this.loadMoreWrapper.style.display="none"),this.hasInfiniteScroll&&salla.infiniteScroll.destroy(this.infiniteScroll),await this.buildNextPageUrl(),this.wrapper.innerHTML="",this.hasInfiniteScroll?this.init():this.getInitialData(),this.showPlaceholder&&(this.showPlaceholder=!1,this.placeholderLoader=document.createElement("div"),this.placeholderLoader.classList.add("s-products-list-loading-wrapper"),this.placeholderLoader.style.display="inherit",this.placeholderLoader.innerHTML='<span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader"></span>',this.host.insertAdjacentElement("afterend",this.placeholderLoader))}isFilterable(){return salla.config.get("store.settings.product.filters")&&this.filtersResults}isSourceWithoutValue(){return["offers","latest","sales","wishlist","top-rated","reorder"].includes(this.getSource())}animateItems(){r({targets:"salla-products-list salla-product-card",opacity:[0,1],duration:1200,translateY:[20,0],delay:function(t,s){return 100*s}})}async initBaseNextPageUrl(t){this.nextPage=salla.url.api(`products?source=${t}`),this.includes?.length&&(this.nextPage+=`&includes[]=${this.includes.join("&includes[]=")}`),this.limit&&(this.nextPage+=`&per_page=${this.limit>32?32:this.limit}`),this.sortBy&&(this.nextPage+=`&sort=${this.sortBy}`),"preview"===salla.config.get("theme.mode")&&(this.nextPage+="&use_username_url=1"),this.nextPage+="&filterable=1";for(const[t,s]of Object.entries(this.parsedFilters||{}))if(["string","number"].includes(typeof s))this.nextPage+=`&filters[${encodeURIComponent(t)}]=${encodeURIComponent(s)}`;else if(Array.isArray(s))s.forEach((s=>this.nextPage+=`&filters[${encodeURIComponent(t)}][]=${encodeURIComponent(s)}`));else if("object"==typeof s)for(const[i,e]of Object.entries(s))this.nextPage+=`&filters[${encodeURIComponent(t)}][${encodeURIComponent(i)}]=${encodeURIComponent(e)}`;this.nextPage=await this.applyBeforeBuildListUrl(this.nextPage)}async buildNextPageUrl(){let t=this.getSource();if("json"===t)return;const s=sessionStorage.getItem(this.infiniteScrollStateKey);if(s){const{nextPage:t}=JSON.parse(s);if(!t)return}if(await this.initBaseNextPageUrl(t),!this.isSourceWithoutValue())if(["search","related","landing-page"].includes(t))this.nextPage+=`&source_value=${this.getSourceValue()}`;else try{this.nextPage+=`&source_value[]=${this.getSourceValue().join("&source_value[]=")}`}catch(s){salla.logger.warn(`source-value prop should be array of ids ex source-value="[1,2,3]" for the source [${t}]`),this.sourceValueIsValid=!1}}loading(t=!0,s=!1){if(t){let t=s&&!this.autoload?this.btnLoader:this.loader;t&&(t.style.display="inherit")}else this.autoload||this.btnLoader&&(this.btnLoader.style.display="none"),this.loader&&(this.loader.style.display="none")}getItemHTML(t){"landing-page"===this.getSource()&&(t.url="");const s=document.createElement(this.hasCustomComponent?this.productCardComponent:"salla-product-card");return s.product=t,this.compactCards&&(s.compact=!0,s.toggleAttribute("compact",!0)),this.applyLandingPageStyles(s),this.applyHorizontalCardStyles(s),s.addEventListener("click",(s=>{s.target.closest("a")&&(h.saveProductSource(this.getSource()),this.hasInfiniteScroll&&(this.takeStateSnapshot(),sessionStorage.setItem(this.lastViewedProductKey,t.id)))})),s}applyLandingPageStyles(t){"landing-page"!==this.getSource()||this.hasCustomComponent||(t.toggleAttribute("hide-add-btn",!0),t.classList.add("s-product-card-fit-height"))}applyHorizontalCardStyles(t){this.horizontalCards&&(t.toggleAttribute("horizontal",!0),this.hasCustomComponent||t.toggleAttribute("shadow-on-hover",!0))}waitForResizing(t){let s=null;return new Promise((i=>{const e=new ResizeObserver((()=>{clearTimeout(s),s=setTimeout((()=>{e.disconnect(),i(null)}),160)}));e.observe(t)}))}waitForLayoutStable(t){let s=null;return new Promise((i=>{const e=new MutationObserver((()=>{clearTimeout(s),s=setTimeout((()=>{e.disconnect(),i(null)}),160)}));e.observe(t,{childList:!0,subtree:!0,attributes:!0})}))}async waitForStableLayout(t){return await Promise.allSettled([this.waitForResizing(t),this.waitForLayoutStable(t)])}scrollToLastViewedProduct(){const t=sessionStorage.getItem(this.lastViewedProductKey);t&&!salla.url.is_page("product.single")&&this.isElementLoaded(`[id*="${t}"]`).then((()=>{const s=this.wrapper?.querySelector(`[id*="${t}"]`);if(!s)return;const i=()=>{const t=()=>{s.scrollIntoView({block:"start",behavior:"instant"});const t=matchMedia("(max-width: 1024px)").matches?"header .inner":"ul.main-menu",i=window?.header_is_sticky?document.querySelector(t)?.getBoundingClientRect()?.height??56:0,e=parseInt(getComputedStyle(this.wrapper).rowGap)??16;scrollBy({top:-1*(i+e),behavior:"instant"})};requestAnimationFrame(t),s.querySelectorAll("img.lazy").forEach((s=>{const i=s,e=()=>{requestAnimationFrame(t),i.onload=i.onerror=null};i.onload=e,i.onerror=e})),this.removeScrollRestorationSession()};this.waitForStableLayout(this.host).then((()=>requestAnimationFrame(i)))}))}isElementLoaded(t){return new Promise((s=>{const i=setInterval((()=>{if(document.querySelector(t))return clearInterval(i),s(document.querySelector(t))}),50)}))}takeStateSnapshot(){const t=[];for(let s=0;s<this.wrapper.children.length;s++){const i=this.wrapper.children?.[s];t.push(i.product)}const s={pageIndex:Math.max((this.infiniteScroll?.pageIndex??1)-1,1),nextPage:this.nextPage,currentPageData:t};if(this.isFilterable()){const t=sessionStorage.getItem(this.filtersKey);sessionStorage.setItem(this.filtersKey,t||JSON.stringify(this.filtersSnapshot))}sessionStorage.setItem(this.infiniteScrollStateKey,JSON.stringify(s));let i=salla.config.get("page.id");const e=Object.keys(this.specialPagesWithoutIds).find((t=>salla.url.is_page(t)));e?i=this.specialPagesWithoutIds[e]:null!==i&&(i=String(i)),sessionStorage.setItem(this.prevCategoryIdKey,i)}removeScrollRestorationSession(){this.isFilterable()||sessionStorage.removeItem(this.filtersKey),sessionStorage.removeItem(this.infiniteScrollStateKey),sessionStorage.removeItem(this.lastViewedProductKey),sessionStorage.removeItem(this.prevCategoryIdKey)}loadStoredScrollState(){const t=sessionStorage.getItem(this.infiniteScrollStateKey),s=sessionStorage.getItem(this.filtersKey),i=sessionStorage.getItem(this.prevCategoryIdKey),e=this.specialPagesWithoutIds[salla.config.get("page.slug")]||null,a=salla.config.get("page.id"),r=salla.url.is_page("index"),o=salla.url.is_page("product.single"),h=e?i!==e:i!==String(a);if(i&&h&&!r&&!o||r&&!this.hasInfiniteScroll)return this.removeScrollRestorationSession(),this.switchToNormalBehavior=!0,!1;if(o)return this.switchToNormalBehavior=!0,!1;if(t)try{const{pageIndex:i,nextPage:e,currentPageData:a}=JSON.parse(t);if("undefined"!==s){const t=JSON.parse(s);salla.event.emit("filters::fetched",{filters:t})}this.page=i,this.nextPage=e;for(let t=0;t<a.length;t++)this.wrapper.append(this.getItemHTML(a?.[t]));return!0}catch(t){console.error("Failed to load stored scroll state:",t),this.removeScrollRestorationSession()}return!1}getSource(){return h.getProductsSource(this.source)}getSourceValue(){return this.currentCategoryIdFilter?this.currentCategoryIdFilter:h.getProductsSourceValue(this.source,this.sourceValue)}appendDataLayer(t){"object"==typeof dataLayer&&Array.isArray(dataLayer)&&dataLayer.push({event:"impressions",ecommerce:{currencyCode:salla.config.currency().code,impressions:t.map(((t,s)=>({id:t.id,name:t.name,price:t.price,brand:t.brand?.name||"",quantity:t.quantity,categories:[{name:t.category?.name||salla.config.get("page.title"),id:salla.config.get("page.id")}],category:t.category?.name||salla.config.get("page.title"),position:s+1})))}})}initiateInfiniteScroll(){if(!this.hasInfiniteScroll)return;const t=this.autoload&&this.includes&&this.includes.length>0;this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:!1,nextPage:this.nextPage,scrollThreshold:!t&&!!this.autoload&&100,loadOnScroll:!t&&this.autoload},!0),this.infiniteScroll.pageIndex=this.page,this.infiniteScroll?.on("request",(()=>{this.loading(!0,!this.autoload)})),t&&window.addEventListener("scroll",this.boundHandleScroll),this.infiniteScroll?.on("load",(async(t,s,i)=>{if(!this.isProcessing){this.isProcessing=!0;try{if(!t.data?.length&&2===this.infiniteScroll.pageIndex)return this.showPlaceholder=!0,salla.infiniteScroll.destroy(this.infiniteScroll),this.loading(!1),void(this.placeholderLoader&&this.placeholderLoader.remove());this.includes&&await this.injectAndProcessData(t);const s=await this.handleResponse(t);this.infiniteScroll.appendItems(s),2===this.infiniteScroll.pageIndex&&(!this.autoload&&this.nextPage&&(this.loadMoreWrapper.style.display="block"),this.animateItems())}catch(e){console.error("Error during load:",e);try{const a=i;salla.analytics?.log("salla::products.list.fetch.error",{source:this.getSource(),nextPage:this.nextPage,pageIndex:this.infiniteScroll?.pageIndex,fetchPath:"string"==typeof s?s:void 0,httpStatus:a?.status,httpStatusText:a?.statusText,responseUrl:a?.url,itemsLength:Array.isArray(t?.data)?t.data.length:void 0,responseKeys:t&&"object"==typeof t?Object.keys(t).slice(0,30):void 0,errorMessage:e instanceof Error?e.message:String(e)})}catch{}}finally{this.isProcessing=!1}}})),this.infiniteScroll?.on("error",((t,s,i)=>{console.log("Error occurred during request");try{const e=i;salla.analytics?.log("salla::products.list.fetch.error",{source:this.getSource(),nextPage:this.nextPage,pageIndex:this.infiniteScroll?.pageIndex,fetchPath:s,httpStatus:e?.status,httpStatusText:e?.statusText,responseUrl:e?.url,errorMessage:t instanceof Error?t.message:String(t)})}catch{}this.status.querySelector(".s-infinite-scroll-error").classList.remove("s-hidden"),this.placeholderLoader&&this.placeholderLoader.remove(),this.loading(!1),this.isProcessing=!1})),salla.onReady((()=>{sessionStorage.getItem(this.infiniteScrollStateKey)||this.manualLoadNextPage()}))}handleScroll(){this.isProcessing||this.scrollTimeout||(this.scrollTimeout=setTimeout((()=>{this.scrollTimeout=null,requestAnimationFrame((()=>{const t=this.wrapper.getBoundingClientRect(),s=window.innerHeight;t.bottom-s<=200&&!this.isProcessing&&this.nextPage&&this.manualLoadNextPage()}))}),200))}manualLoadNextPage(){this.nextPage&&this.infiniteScroll.loadNextPage()}async applyBeforeBuildListUrl(t){try{const s={component:this,url:t};return await salla.hooks.call("salla-products-list","beforeBuildListUrl",s),s.url}catch(s){return salla.logger.warn("beforeBuildListUrl hook failed",s?.message),t}}async resolveNextPageFromCursor(t){return t.cursor?t.cursor.next?await this.applyBeforeBuildListUrl(t.cursor.next):t.cursor.next:this.nextPage}async injectAndProcessData(t){try{await h.injectExtraFieldsToResponse(t)}catch(t){console.error("Error injecting data:",t)}}getInitialData(){return this.loading(),salla.api.withoutNotifier((()=>salla.product.api.fetch({source:h.getApiSource(this.getSource()),source_value:this.getSourceValue(),limit:this.limit}).then((async t=>t.data.length?(await h.injectExtraFieldsToResponse(t),this.firstPageResponse?void(await this.handleResponse(t)).forEach((t=>this.wrapper.append(t))):(this.firstPageResponse=t,void(this.nextPage=await this.resolveNextPageFromCursor(t)))):(this.showPlaceholder=!0,this.placeholderLoader&&this.placeholderLoader.remove(),void this.loading(!1))))))}async loadMore(){this.infiniteScroll?.loadNextPage()}componentWillLoad(){return salla.onReady().then((async()=>{this.hasCustomComponent=!!customElements.get(this.productCardComponent),this.sourceValueIsValid=!(!this.getSourceValue()&&!this.isSourceWithoutValue()),this.hasInfiniteScroll=!["json","selected","related","landing-page","recently"].includes(this.getSource())&&!this.limit;let t=new URLSearchParams(window.location.search);try{this.sortBy=this.sortBy||t.get("sort")||t.get("by"),this.parsedFilters=h.extractFiltersFromUrl(t),this.parsedFilters&&this.parsedFilters.category_id&&(this.currentCategoryIdFilter=[this.parsedFilters.category_id])}catch(t){salla.logger.warn("failed to get filters from url",t.message)}if(await this.buildNextPageUrl(),this.isReady=!0,!sessionStorage.getItem(this.infiniteScrollStateKey))if(this.sourceValueIsValid){if(!this.hasInfiniteScroll){if("json"===this.getSource())return this.getSourceValue().length?void setTimeout((()=>{this.getSourceValue().map((t=>this.wrapper.append(this.getItemHTML(t))))})):void(this.showPlaceholder=!0);if("selected"!==this.getSource()||this.getSourceValue().length)return this.getInitialData();this.showPlaceholder=!0}}else salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`)}))}async componentDidLoad(){this.hasInfiniteScroll&&this.init(),await Salla.hooks.registerComponent("salla-products-list",this),this.loadStoredScrollState()?(this.autoload?!this.nextPage&&this.loading(!1):this.nextPage?this.loadMoreWrapper&&(this.loadMoreWrapper.style.display="block"):(this.loadMoreWrapper&&(this.loadMoreWrapper.style.display="none"),this.status.querySelector(".s-infinite-scroll-last").classList.remove("s-hidden")),this.scrollToLastViewedProduct()):!this.firstPageResponse&&this.switchToNormalBehavior?this.getInitialData().then((async()=>{this.firstPageResponse?((await this.handleResponse(this.firstPageResponse,!1)).forEach((t=>{this.wrapper.append(t)})),setTimeout((()=>{if(!this.autoload&&this.nextPage&&1==this.infiniteScroll.pageIndex){const t=this.host.querySelector(".s-infinite-scroll-wrapper");t&&(t.style.display="block")}}))):console.error("No response received after getInitialData.")})).catch((t=>{console.error("Error during initial data fetch:",t)})):this.firstPageResponse&&(await this.handleResponse(this.firstPageResponse,!1)).forEach((t=>this.wrapper.append(t)))}canRender(){return this.sourceValueIsValid&&this.isReady}render(){return this.canRender()?this.showPlaceholder?i("div",{class:"s-products-list-placeholder"},i("span",{innerHTML:o}),i("p",null,this.placeholderText)):i(e,{class:"s-products-list"},i("div",{class:{"s-products-list-wrapper":!0,"s-products-list-horizontal-cards":this.horizontalCards&&!this.filtersResults,"s-products-list-vertical-cards":!this.horizontalCards&&!this.rowCards&&!this.filtersResults,"s-products-list-row-cards":this.rowCards,"s-products-list-compact-cards":this.compactCards,"s-products-list-filters-results":this.filtersResults},ref:t=>this.wrapper=t}),i("div",{class:"s-infinite-scroll-status",ref:t=>this.status=t},i("p",{class:"s-infinite-scroll-last infinite-scroll-last s-hidden"},this.endOfText),i("p",{class:"s-infinite-scroll-error infinite-scroll-error s-hidden"},this.failedLoadMore)),this.autoload&&i("div",{class:"s-products-list-loading-wrapper",style:{display:"none"},ref:t=>this.loader=t},i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader"})),this.hasInfiniteScroll&&this.nextPage&&!this.autoload?i("div",{class:"s-infinite-scroll-wrapper",style:{display:"none"},ref:t=>this.loadMoreWrapper=t},i("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},i("span",{class:"s-button-text s-infinite-scroll-btn-text"},this.loadMoreText?this.loadMoreText:salla.lang.get("common.elements.load_more")),i("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))):""):""}init(){this.initiateInfiniteScroll(),this.loading()}async handleResponse(t,s=!0){if(!t)return[];let i=this.getSource(),e="";if(1===t.cursor?.current){e=h.getPageTitleForSource(i);try{if("search"===this.getSource())e=salla.lang.get("common.elements.search_about",{word:this.getSourceValue()});else if(!e){let s=this.parsedFilters.category_id||this.getSourceValue()[0];e=t.filters?.find((t=>"category_id"===t.key))?.values?.find((t=>t.key===s))?.value??"",this.filtersSnapshot=t.filters}e+=(e?" - ":"")+salla.lang.choice("blocks.header.products_count",t.data?.length),15===t.data.length&&(e=e.replace(t.data.length,salla.lang.get("common.elements.more_than")+" "+t.data.length)),t.title=e}catch(t){salla.logger.error("Error::falid to handle response",t)}h.generateProductSchema(t.data)}this.appendDataLayer(t.data),t.nextPage=this.nextPage,t.source=this.getSource(),t.sourceValue=this.getSourceValue(),salla.event.emit("salla-products-list::products.fetched",t),this.productsFetched.emit(t),t.filters&&this.isFilterable()?(this.filtersResults=!0,this.filtersSnapshot=JSON.parse(JSON.stringify(t.filters)),salla.event.emit("filters::fetched",{filters:t.filters})):this.isFilterable()&&salla.event.emit("filters::hidden"),s&&(this.nextPage=await this.resolveNextPageFromCursor(t)),this.loading(!1),this.placeholderLoader&&this.placeholderLoader.remove(),this.hasInfiniteScroll&&!this.nextPage&&(this.infiniteScroll.option({scrollThreshold:!1,loadOnScroll:!1}),this.status.querySelector(".s-infinite-scroll-last").classList.remove("s-hidden"));const a=[];for(let s=0;s<t.data.length;s++)a.push(this.getItemHTML(t.data?.[s]));return a}get host(){return a(this)}};l.style="";export{l as salla_products_list}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,c as e,h as r,H as d}from"./p-BJ40PU3w.js";const c=class{constructor(r){t(this,r),this.orderEditProductSelected=e(this,"orderEditProductSelected")}get productData(){if(!this.product)return{};if("object"==typeof this.product)return this.product;try{return JSON.parse(this.product)}catch(t){return{}}}handleSelectProduct(){this.orderEditProductSelected.emit({product:this.productData})}render(){const t=this.productData,e=t?.name||salla.lang.getWithDefault("common.elements.product","منتج"),c=t?.price;return r(d,{key:"9f9278890bd821cf7b1caecdf4484a26273fe407"},r("button",{key:"6d28490ff098143000fff6543702ba805e997077",type:"button",class:"s-order-edit-product-card",onClick:()=>this.handleSelectProduct()},r("div",{key:"b7399553a7b79303b8bae8c9b624f460fe761946",class:"s-order-edit-product-card-media"},t?.image?.url?r("img",{src:t.image.url,alt:t.image.alt||e,class:"s-order-edit-product-card-image"}):r("div",{class:"s-order-edit-product-card-placeholder"},r("i",{class:"sicon-shopping-bag"}))),r("div",{key:"5cd57cf519f5d681116336cc6db8aed3569b761d",class:"s-order-edit-product-card-content"},r("h3",{key:"51312a3708d95f3d6d654099b25a2a4644c70aaa",class:"s-order-edit-product-card-title"},e),null!=c&&r("p",{key:"c09988f616198ae0d527e994e5c55e8b0a01c218",class:"s-order-edit-product-card-price",innerHTML:salla.money(c)}))))}};c.style=":host{display:block;min-width:0}";export{c as salla_order_edit_product_card}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as e,h as t,H as a}from"./p-BJ40PU3w.js";const s=class{constructor(t){e(this,t),this.href=void 0,this.target="_self"}generateClass(){return{"s-list-tile-item":!0,"s-list-tile-item-href":!!this.href}}render(){return t(a,{key:"bb33776d01406ff1e04bbdc741312f1a17ac3b7b"},t("a",{key:"386b417c954bf4b2bac34e40d9bae19db7f61ec3",class:this.generateClass(),href:this.href||"#",target:this.target,"aria-label":"List Tile Link"},t("div",{key:"cbcd8c6f92a4cbe7afbd8797c36ae6f529abed1c",class:"s-list-tile-item-icon"},t("slot",{key:"bff76fdb467b2491f0c3b40bd7f475eda23fa9c8",name:"icon"})),t("div",{key:"c80e7c032abedea8d5929d8bb36a642336724fe1",class:"s-list-tile-item-content"},t("div",{key:"2bea0273bb4c012e0f9f7ee948b14bc9ea8afc2a",class:"s-list-tile-item-title"},t("slot",{key:"60c872b9ec9b369ba65452abad7860b3ba6ba640",name:"title"})),t("div",{key:"fbb1b6e49284c74f2933f056aa16fcbc25526703",class:"s-list-tile-item-subtitle"},t("slot",{key:"5ad1bba1b71db13d4deb594ccb0f5898f24d2f23",name:"subtitle"}))),t("div",{key:"96358bf7ed34907a799efd8c6fb2caae6ca02f43",class:"s-list-tile-item-action"},t("slot",{key:"8d496724103f0c3959845c8f5d4e662a3095c09e",name:"action"}))))}};s.style="";export{s as salla_list_tile}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{f as t}from"./p-BJ40PU3w.js";function r(r,s={}){return s=Object.assign({initialData:void 0,initialStatus:"idle"},s),(i,e)=>{const o=Object.assign((function(...s){const i=r=>{Object.assign(this[e],r),t(this)};return i({status:"pending",error:void 0}),r.call(this,...s).then((t=>(i({status:"success",data:t,error:void 0}),t)),(t=>(i({status:"error",error:t}),Promise.reject(t))))}),{status:s.initialStatus,data:s.initialData,error:void 0});Object.defineProperty(i,e,{value:o})}}export{r as T}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r,h as e}from"./p-BJ40PU3w.js";function t(r){var e,s,a="";if("string"==typeof r||"number"==typeof r)a+=r;else if("object"==typeof r)if(Array.isArray(r))for(e=0;e<r.length;e++)r[e]&&(s=t(r[e]))&&(a&&(a+=" "),a+=s);else for(e in r)r[e]&&(a&&(a+=" "),a+=e);return a}const s=r=>"boolean"==typeof r?"".concat(r):0===r?"0":r,a=function(){for(var r,e,s=0,a="";s<arguments.length;)(r=arguments[s++])&&(e=t(r))&&(a&&(a+=" "),a+=e);return a},l=(n="s-badge-base",i={variants:{size:{xs:"s-badge-xs",sm:"s-badge-sm",md:"s-badge-md"},bg:{transparent:"s-badge-transparent",light:"s-badge-light","primary-100":"s-badge-primary-100"},color:{black:"s-badge-black","primary-900":"s-badge-color-primary-900"}}},r=>{var e;if(null==(null==i?void 0:i.variants))return a(n,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:t,defaultVariants:l}=i,o=Object.keys(t).map((e=>{const a=null==r?void 0:r[e],n=null==l?void 0:l[e];if(null===a)return null;const i=s(a)||s(n);return t[e][i]})),d=r&&Object.entries(r).reduce(((r,e)=>{let[t,s]=e;return void 0===s||(r[t]=s),r}),{}),c=null==i||null===(e=i.compoundVariants)||void 0===e?void 0:e.reduce(((r,e)=>{let{class:t,className:s,...a}=e;return Object.entries(a).every((r=>{let[e,t]=r;return Array.isArray(t)?t.includes({...l,...d}[e]):{...l,...d}[e]===t}))?[...r,t,s]:r}),[]);return a(n,o,c,null==r?void 0:r.class,null==r?void 0:r.className)});var n,i;const o=class{constructor(e){r(this,e),this.size="sm",this.color="black",this.bg="light"}render(){return e("div",{key:"9d81a7c592a57a533e2b8a48f015e2f9e796be51",class:l({size:this.size,bg:this.bg,color:this.color})},e("slot",{key:"999e75ec14a8346d84dbfc5122c448999d4fc481"}))}};o.style="";export{o as salla_badge}