@salla.sa/twilight-components 2.14.353 → 2.14.355

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 (341) hide show
  1. package/dist/cjs/bell-ring-BfKPinNo.js +13 -0
  2. package/dist/cjs/{interfaces-CX9-6aLf.js → camera-DytepEoK.js} +0 -11
  3. package/dist/cjs/cancel-De6vslRA.js +13 -0
  4. package/dist/cjs/cart-s-x1Fshk.js +13 -0
  5. package/dist/cjs/check-circle2-BDvlT4_n.js +13 -0
  6. package/dist/cjs/{check-CLRvuniI.js → check-x3w3-gpj.js} +2 -2
  7. package/dist/cjs/{filepond-7SxqaoXb.js → filepond-D0WqQOsJ.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-file-poster-DwIv84hN.js → filepond-plugin-file-poster-ZuSz5Sia.js} +1 -1
  9. package/dist/cjs/{filepond-plugin-file-validate-size-NUNnIo4Q.js → filepond-plugin-file-validate-size-C3-G9fQU.js} +1 -1
  10. package/dist/cjs/{filepond-plugin-file-validate-type-CXI-hfww.js → filepond-plugin-file-validate-type-pC6E-hQQ.js} +1 -1
  11. package/dist/cjs/{filepond-plugin-image-edit-fBeBGIBb.js → filepond-plugin-image-edit-B6RJ-sf_.js} +1 -1
  12. package/dist/cjs/{filepond-plugin-image-exif-orientation-BmLTdQ6d.js → filepond-plugin-image-exif-orientation-BAKA7TOr.js} +1 -1
  13. package/dist/cjs/{filepond-plugin-image-preview-CssKRM6n.js → filepond-plugin-image-preview-C_5JV3u4.js} +1 -1
  14. package/dist/{esm/gift-C0JNGIpa.js → cjs/gift-CJ-3Yw_x.js} +4 -2
  15. package/dist/cjs/image-BoZ6Hums.js +13 -0
  16. package/dist/cjs/{index-B9TEdQDE.js → index-DdedaQQE.js} +1 -1
  17. package/dist/cjs/{index-B5soIVRX.js → index-DgOViweO.js} +136 -12
  18. package/dist/cjs/interfaces-CRqrf5RX.js +15 -0
  19. package/dist/cjs/keyboard_arrow_down-DHJ3FFZq.js +13 -0
  20. package/dist/cjs/keyboard_arrow_right-BayM_Il2.js +21 -0
  21. package/dist/cjs/loader.cjs.js +2 -2
  22. package/dist/cjs/minus-CCryh1qf.js +21 -0
  23. package/dist/cjs/salla-accordion-body_3.cjs.entry.js +775 -0
  24. package/dist/cjs/salla-accordion_6.cjs.entry.js +768 -0
  25. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +2389 -0
  26. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-alert_2.cjs.entry.js +194 -0
  28. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-booking-field_7.cjs.entry.js +1565 -0
  31. package/dist/cjs/{salla-cart-item-offers.cjs.entry.js → salla-cart-item-offers_2.cjs.entry.js} +104 -5
  32. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1661 -0
  33. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  35. package/dist/cjs/salla-count-down_2.cjs.entry.js +302 -0
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +4 -3
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +488 -0
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +91 -0
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +34 -0
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +137 -0
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +320 -0
  46. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty.cjs.entry.js +211 -0
  49. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +40 -0
  50. package/dist/cjs/salla-menu.cjs.entry.js +139 -0
  51. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +220 -0
  53. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +598 -0
  54. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +69 -0
  55. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-offer-modal.cjs.entry.js +206 -0
  58. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
  63. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-payments.cjs.entry.js +6 -18
  66. package/dist/cjs/salla-placeholder.cjs.entry.js +51 -0
  67. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-product-size-guide.cjs.entry.js +66 -0
  69. package/dist/cjs/salla-products-list.cjs.entry.js +762 -0
  70. package/dist/cjs/salla-products-slider.cjs.entry.js +115 -0
  71. package/dist/cjs/salla-progress-bar.cjs.entry.js +73 -0
  72. package/dist/cjs/salla-quick-order.cjs.entry.js +239 -0
  73. package/dist/cjs/salla-rating-modal.cjs.entry.js +453 -0
  74. package/dist/cjs/salla-scopes.cjs.entry.js +180 -0
  75. package/dist/cjs/salla-search.cjs.entry.js +153 -0
  76. package/dist/cjs/salla-skeleton.cjs.entry.js +36 -0
  77. package/dist/cjs/salla-slider.cjs.entry.js +10428 -0
  78. package/dist/cjs/salla-social-share.cjs.entry.js +165 -0
  79. package/dist/cjs/salla-social.cjs.entry.js +4 -4
  80. package/dist/cjs/salla-tab-content_3.cjs.entry.js +157 -0
  81. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  83. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-user-menu.cjs.entry.js +275 -0
  85. package/dist/cjs/salla-user-profile.cjs.entry.js +145 -0
  86. package/dist/cjs/salla-user-settings.cjs.entry.js +88 -0
  87. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  89. package/dist/cjs/search-c7Aa7lM9.js +13 -0
  90. package/dist/cjs/{special-discount-OVG_9Kf9.js → special-discount-DC2oXurL.js} +0 -8
  91. package/dist/cjs/star-DGcH7Yso.js +13 -0
  92. package/dist/cjs/star2-R146a27p.js +13 -0
  93. package/dist/cjs/twilight.cjs.js +2 -2
  94. package/dist/cjs/{vanilla-picker-C6fk8_TR.js → vanilla-picker-Cd4v7i9t.js} +1 -1
  95. package/dist/cjs/{whatsapp2-D7Sbg8Ey.js → whatsapp2-BdMd5Gx1.js} +2 -2
  96. package/dist/collection/collection-manifest.json +56 -2
  97. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +1 -1
  98. package/dist/collection/components/salla-payments/salla-payments.js +5 -17
  99. package/dist/collection/components/salla-product-options/salla-product-options.js +36 -3
  100. package/dist/collection/components/salla-products-slider/salla-products-slider.js +32 -1
  101. package/dist/collection/components/salla-slider/salla-slider.js +89 -29
  102. package/dist/collection/components/salla-social/salla-social.js +1 -1
  103. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  104. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  105. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  106. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  107. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  108. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  109. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  110. package/dist/components/index.js +2 -2
  111. package/dist/components/salla-apps-icons.js +1 -1
  112. package/dist/components/salla-payments.js +5 -17
  113. package/dist/components/salla-product-options2.js +19 -2
  114. package/dist/components/salla-products-slider2.js +2 -1
  115. package/dist/components/salla-slider2.js +69 -28
  116. package/dist/components/salla-social-share.js +1 -1
  117. package/dist/components/salla-social.js +1 -1
  118. package/dist/components/salla-tab-content2.js +1 -1
  119. package/dist/components/salla-tab-header2.js +1 -1
  120. package/dist/components/salla-tabs2.js +1 -1
  121. package/dist/components/salla-tel-input2.js +1 -1
  122. package/dist/components/salla-tooltip2.js +1 -1
  123. package/dist/components/salla-user-settings.js +1 -1
  124. package/dist/esm/bell-ring-D3mWkc-3.js +11 -0
  125. package/dist/esm/{interfaces-CBT_Nxny.js → camera-C6jIkM-X.js} +1 -12
  126. package/dist/esm/cancel-BsLF_HK7.js +11 -0
  127. package/dist/esm/cart-DY4LZmNP.js +11 -0
  128. package/dist/esm/{check-uTyAzPSy.js → check-BsXh13x8.js} +2 -2
  129. package/dist/esm/check-circle2-BV4kqbdL.js +11 -0
  130. package/dist/esm/{filepond-Cuqyleyy.js → filepond-YrJ-JCRn.js} +1 -1
  131. package/dist/esm/{filepond-plugin-file-poster-C6Wara8q.js → filepond-plugin-file-poster-UWiXxhAl.js} +1 -1
  132. package/dist/esm/{filepond-plugin-file-validate-size-D-M3KSxo.js → filepond-plugin-file-validate-size-CuFnfvIq.js} +1 -1
  133. package/dist/esm/{filepond-plugin-file-validate-type-DzAl1VI8.js → filepond-plugin-file-validate-type-BgYsHZEQ.js} +1 -1
  134. package/dist/esm/{filepond-plugin-image-edit-flutfc9I.js → filepond-plugin-image-edit-BQtZWl9D.js} +1 -1
  135. package/dist/esm/{filepond-plugin-image-exif-orientation-B2UkG6iE.js → filepond-plugin-image-exif-orientation-Dp7a5KRi.js} +1 -1
  136. package/dist/esm/{filepond-plugin-image-preview-B4u8N2nE.js → filepond-plugin-image-preview-DvWrR7vg.js} +1 -1
  137. package/dist/{cjs/gift-BPDUPIY_.js → esm/gift-BChI23pG.js} +2 -4
  138. package/dist/esm/image-C-tzSDxw.js +11 -0
  139. package/dist/esm/{index-xWIb6INF.js → index-DwU5NnFF.js} +1 -1
  140. package/dist/esm/{index-6mr785rH.js → index-PHxPq4LJ.js} +137 -13
  141. package/dist/esm/interfaces-OF8QcbMM.js +15 -0
  142. package/dist/esm/keyboard_arrow_down-DCZbpt2a.js +11 -0
  143. package/dist/esm/keyboard_arrow_right-Vqpj4CWE.js +18 -0
  144. package/dist/esm/loader.js +3 -3
  145. package/dist/esm/minus-DfeagqF1.js +18 -0
  146. package/dist/esm/salla-accordion-body_3.entry.js +771 -0
  147. package/dist/esm/salla-accordion_6.entry.js +761 -0
  148. package/dist/esm/salla-add-product-button_4.entry.js +2384 -0
  149. package/dist/esm/salla-advertisement.entry.js +1 -1
  150. package/dist/esm/salla-alert_2.entry.js +191 -0
  151. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  152. package/dist/esm/salla-apps-icons.entry.js +2 -2
  153. package/dist/esm/salla-booking-field_7.entry.js +1539 -0
  154. package/dist/esm/{salla-cart-item-offers.entry.js → salla-cart-item-offers_2.entry.js} +104 -6
  155. package/dist/esm/salla-comment-form_8.entry.js +1652 -0
  156. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  157. package/dist/esm/salla-contacts.entry.js +3 -3
  158. package/dist/esm/salla-count-down_2.entry.js +299 -0
  159. package/dist/esm/salla-custom-fields.entry.js +3 -2
  160. package/dist/esm/salla-filters-widget.entry.js +1 -1
  161. package/dist/esm/salla-filters.entry.js +1 -1
  162. package/dist/esm/salla-gifting.entry.js +486 -0
  163. package/dist/esm/salla-hook.entry.js +1 -1
  164. package/dist/esm/salla-infinite-scroll.entry.js +89 -0
  165. package/dist/esm/salla-installment.entry.js +1 -1
  166. package/dist/esm/salla-list-tile.entry.js +32 -0
  167. package/dist/esm/salla-localization-modal.entry.js +135 -0
  168. package/dist/esm/salla-login-modal.entry.js +318 -0
  169. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  171. package/dist/esm/salla-loyalty.entry.js +209 -0
  172. package/dist/esm/salla-maintenance-alert.entry.js +38 -0
  173. package/dist/esm/salla-menu.entry.js +137 -0
  174. package/dist/esm/salla-metadata.entry.js +1 -1
  175. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +217 -0
  176. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +595 -0
  177. package/dist/esm/salla-multiple-bundle-product.entry.js +67 -0
  178. package/dist/esm/salla-notification-item.entry.js +1 -1
  179. package/dist/esm/salla-notifications.entry.js +1 -1
  180. package/dist/esm/salla-offer-modal.entry.js +204 -0
  181. package/dist/esm/salla-offer.entry.js +1 -1
  182. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  183. package/dist/esm/salla-order-details-options.entry.js +1 -1
  184. package/dist/esm/salla-order-details.entry.js +1 -1
  185. package/dist/esm/salla-order-summary.entry.js +3 -3
  186. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  187. package/dist/esm/salla-orders.entry.js +1 -1
  188. package/dist/esm/salla-payments.entry.js +6 -18
  189. package/dist/esm/salla-placeholder.entry.js +49 -0
  190. package/dist/esm/salla-price-range.entry.js +1 -1
  191. package/dist/esm/salla-product-size-guide.entry.js +64 -0
  192. package/dist/esm/salla-products-list.entry.js +760 -0
  193. package/dist/esm/salla-products-slider.entry.js +113 -0
  194. package/dist/esm/salla-progress-bar.entry.js +71 -0
  195. package/dist/esm/salla-quick-order.entry.js +237 -0
  196. package/dist/esm/salla-rating-modal.entry.js +451 -0
  197. package/dist/esm/salla-scopes.entry.js +178 -0
  198. package/dist/esm/salla-search.entry.js +151 -0
  199. package/dist/esm/salla-skeleton.entry.js +34 -0
  200. package/dist/esm/salla-slider.entry.js +10426 -0
  201. package/dist/esm/salla-social-share.entry.js +163 -0
  202. package/dist/esm/salla-social.entry.js +3 -3
  203. package/dist/esm/salla-tab-content_3.entry.js +153 -0
  204. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  205. package/dist/esm/salla-tooltip.entry.js +2 -2
  206. package/dist/esm/salla-trust-badges.entry.js +1 -1
  207. package/dist/esm/salla-user-menu.entry.js +273 -0
  208. package/dist/esm/salla-user-profile.entry.js +143 -0
  209. package/dist/esm/salla-user-settings.entry.js +86 -0
  210. package/dist/esm/salla-verify.entry.js +1 -1
  211. package/dist/esm/salla-wallet.entry.js +1 -1
  212. package/dist/esm/search-BscTeWDc.js +11 -0
  213. package/dist/esm/{special-discount-yRO-ZESF.js → special-discount-Ctkfc4K-.js} +1 -8
  214. package/dist/esm/star-ZT7ehBBk.js +11 -0
  215. package/dist/esm/star2-D4oPi1Ov.js +11 -0
  216. package/dist/esm/twilight.js +3 -3
  217. package/dist/esm/{vanilla-picker-B4PKRAhm.js → vanilla-picker-fpTcpsmb.js} +1 -1
  218. package/dist/esm/{whatsapp2-DWksgowB.js → whatsapp2-CgR-T_ZS.js} +2 -2
  219. package/dist/twilight/p-009d1b75.entry.js +4 -0
  220. package/dist/twilight/{p-16b8d78c.entry.js → p-04e21492.entry.js} +1 -1
  221. package/dist/twilight/{p-ac6fc286.entry.js → p-0cc07ad0.entry.js} +1 -1
  222. package/dist/twilight/p-0f45b27f.entry.js +4 -0
  223. package/dist/twilight/p-112b4c91.entry.js +4 -0
  224. package/dist/twilight/p-14749ab0.entry.js +4 -0
  225. package/dist/twilight/{p-0c87ef6c.entry.js → p-1c66e567.entry.js} +1 -1
  226. package/dist/twilight/p-1e405d4e.entry.js +4 -0
  227. package/dist/twilight/{p-33ea3141.entry.js → p-1eb76272.entry.js} +1 -1
  228. package/dist/twilight/p-2322e6fc.entry.js +4 -0
  229. package/dist/twilight/{p-7e39343d.entry.js → p-2626b358.entry.js} +1 -1
  230. package/dist/twilight/{p-18ebec2c.entry.js → p-29e92637.entry.js} +1 -1
  231. package/dist/twilight/p-2ca5a8af.entry.js +4 -0
  232. package/dist/twilight/{p-4253fc44.entry.js → p-2cb04fa6.entry.js} +1 -1
  233. package/dist/twilight/{p-19e07b9e.entry.js → p-2e97a6cd.entry.js} +1 -1
  234. package/dist/twilight/{p-zHj-W7EE.js → p-2tEKDOI-.js} +1 -1
  235. package/dist/twilight/p-30b58124.entry.js +4 -0
  236. package/dist/twilight/{p-8c7b7712.entry.js → p-333171ce.entry.js} +1 -1
  237. package/dist/twilight/p-33cd8edb.entry.js +4 -0
  238. package/dist/twilight/p-3774fa61.entry.js +4 -0
  239. package/dist/twilight/{p-5067322a.entry.js → p-37aa131b.entry.js} +1 -1
  240. package/dist/twilight/{p-dde21f4b.entry.js → p-3c76e2d4.entry.js} +1 -1
  241. package/dist/twilight/{p-2d209f96.entry.js → p-3cbbd625.entry.js} +1 -1
  242. package/dist/twilight/{p-6f5d02c6.entry.js → p-3db132b8.entry.js} +1 -1
  243. package/dist/twilight/p-3eff2372.entry.js +4 -0
  244. package/dist/twilight/p-428fe4e6.entry.js +4 -0
  245. package/dist/twilight/p-475a61f8.entry.js +4 -0
  246. package/dist/twilight/{p-BijadG7g.js → p-4D4VVK4U.js} +1 -1
  247. package/dist/twilight/p-4c31b81f.entry.js +4 -0
  248. package/dist/twilight/{p-c096e336.entry.js → p-52ffcaba.entry.js} +1 -1
  249. package/dist/twilight/p-534be529.entry.js +4 -0
  250. package/dist/twilight/p-59697c9b.entry.js +4 -0
  251. package/dist/twilight/p-5c5aba15.entry.js +4 -0
  252. package/dist/twilight/p-666bea2d.entry.js +4 -0
  253. package/dist/twilight/p-6a934903.entry.js +4 -0
  254. package/dist/twilight/{p-6f576591.entry.js → p-6e89154f.entry.js} +1 -1
  255. package/dist/twilight/p-6f69cfa5.entry.js +4 -0
  256. package/dist/twilight/{p-d4aaeef4.entry.js → p-76ce3ec0.entry.js} +1 -1
  257. package/dist/twilight/p-781f1219.entry.js +4 -0
  258. package/dist/twilight/p-78e33f77.entry.js +4 -0
  259. package/dist/twilight/p-79aa2c2f.entry.js +4 -0
  260. package/dist/twilight/p-7a2bd261.entry.js +4 -0
  261. package/dist/twilight/p-7a769233.entry.js +4 -0
  262. package/dist/twilight/{p-6472200c.entry.js → p-7eef10c9.entry.js} +1 -1
  263. package/dist/twilight/{p-2a26c1d6.entry.js → p-8606c783.entry.js} +1 -1
  264. package/dist/twilight/p-8719301a.entry.js +4 -0
  265. package/dist/twilight/p-8ad78dfa.entry.js +4 -0
  266. package/dist/twilight/{p-300624bb.entry.js → p-9bea43d6.entry.js} +1 -1
  267. package/dist/twilight/{p-8b018d82.entry.js → p-9c01357f.entry.js} +1 -1
  268. package/dist/twilight/{p-C0JNGIpa.js → p-BChI23pG.js} +1 -1
  269. package/dist/twilight/{p-Cuxsz9f-.js → p-BPRHuBhm.js} +1 -1
  270. package/dist/twilight/{p-B2SkkGH8.js → p-BRh_eoK1.js} +1 -1
  271. package/dist/twilight/p-BV4kqbdL.js +4 -0
  272. package/dist/twilight/{p-tFBCbVoG.js → p-BitILwJ_.js} +1 -1
  273. package/dist/twilight/p-BsLF_HK7.js +4 -0
  274. package/dist/twilight/{p-uTyAzPSy.js → p-BsXh13x8.js} +1 -1
  275. package/dist/twilight/p-BscTeWDc.js +4 -0
  276. package/dist/twilight/{p-ChfiVIJv.js → p-Bx_UY06u.js} +1 -1
  277. package/dist/twilight/p-C-tzSDxw.js +4 -0
  278. package/dist/twilight/{p-Bp_xKTyn.js → p-C6S8Hr36.js} +1 -1
  279. package/dist/twilight/p-C6jIkM-X.js +4 -0
  280. package/dist/twilight/p-CO-PeZ27.js +4 -0
  281. package/dist/twilight/{p-DWksgowB.js → p-CgR-T_ZS.js} +1 -1
  282. package/dist/twilight/p-Ctkfc4K-.js +4 -0
  283. package/dist/twilight/p-D3mWkc-3.js +4 -0
  284. package/dist/twilight/p-D4oPi1Ov.js +4 -0
  285. package/dist/twilight/p-DCZbpt2a.js +4 -0
  286. package/dist/twilight/p-DY4LZmNP.js +4 -0
  287. package/dist/twilight/p-DfeagqF1.js +4 -0
  288. package/dist/twilight/{p-DnELO4MH.js → p-DtkaGJwR.js} +1 -1
  289. package/dist/twilight/p-OF8QcbMM.js +4 -0
  290. package/dist/twilight/{p-6mr785rH.js → p-PHxPq4LJ.js} +2 -2
  291. package/dist/twilight/p-Vqpj4CWE.js +4 -0
  292. package/dist/twilight/p-ZT7ehBBk.js +4 -0
  293. package/dist/twilight/p-a5bb66a3.entry.js +4 -0
  294. package/dist/twilight/p-ad9c9773.entry.js +4 -0
  295. package/dist/twilight/p-b502e876.entry.js +4 -0
  296. package/dist/twilight/{p-e909d28b.entry.js → p-b8d8175a.entry.js} +1 -1
  297. package/dist/twilight/p-ba5fc67a.entry.js +4 -0
  298. package/dist/twilight/p-c3750eaa.entry.js +4 -0
  299. package/dist/twilight/p-d7037864.entry.js +4 -0
  300. package/dist/twilight/p-d9880694.entry.js +4 -0
  301. package/dist/twilight/p-db0b3ed2.entry.js +4 -0
  302. package/dist/twilight/{p-81702ecb.entry.js → p-dbb4ede5.entry.js} +1 -1
  303. package/dist/twilight/{p-28900b2e.entry.js → p-e017e403.entry.js} +1 -1
  304. package/dist/twilight/p-e31177e7.entry.js +4 -0
  305. package/dist/twilight/p-e5b90edd.entry.js +4 -0
  306. package/dist/twilight/{p-b60db6c8.entry.js → p-ec3f15ee.entry.js} +1 -1
  307. package/dist/twilight/p-edc41bbc.entry.js +4 -0
  308. package/dist/twilight/p-f2c23e42.entry.js +4 -0
  309. package/dist/twilight/p-f34f5a30.entry.js +4 -0
  310. package/dist/twilight/{p-4bc98557.entry.js → p-f578dea7.entry.js} +1 -1
  311. package/dist/twilight/{p-9946fa76.entry.js → p-ffbd5949.entry.js} +1 -1
  312. package/dist/twilight/{p-C_h1JDCU.js → p-fq0HEcD_.js} +1 -1
  313. package/dist/twilight/twilight.esm.js +1 -1
  314. package/dist/types/components/salla-payments/salla-payments.d.ts +0 -2
  315. package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -1
  316. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +8 -0
  317. package/dist/types/components/salla-slider/salla-slider.d.ts +20 -2
  318. package/dist/types/components.d.ts +26 -0
  319. package/package.json +5 -5
  320. package/dist/cjs/salla-accordion_62.cjs.entry.js +0 -22470
  321. package/dist/cjs/salla-review-card.cjs.entry.js +0 -183
  322. package/dist/cjs/salla-reviews-page.cjs.entry.js +0 -695
  323. package/dist/cjs/salla-reviews.cjs.entry.js +0 -106
  324. package/dist/esm/salla-accordion_62.entry.js +0 -22389
  325. package/dist/esm/salla-review-card.entry.js +0 -181
  326. package/dist/esm/salla-reviews-page.entry.js +0 -693
  327. package/dist/esm/salla-reviews.entry.js +0 -104
  328. package/dist/twilight/p-12e49031.entry.js +0 -4
  329. package/dist/twilight/p-5bf05092.entry.js +0 -4
  330. package/dist/twilight/p-67830f2a.entry.js +0 -4
  331. package/dist/twilight/p-751dddd4.entry.js +0 -4
  332. package/dist/twilight/p-9b22a7eb.entry.js +0 -4
  333. package/dist/twilight/p-CBT_Nxny.js +0 -4
  334. package/dist/twilight/p-Dz7o69vX.js +0 -4
  335. package/dist/twilight/p-a515a8cc.entry.js +0 -4
  336. package/dist/twilight/p-c4821f8b.entry.js +0 -4
  337. package/dist/twilight/p-de807340.entry.js +0 -4
  338. package/dist/twilight/p-fa585081.entry.js +0 -4
  339. package/dist/twilight/p-yRO-ZESF.js +0 -4
  340. package/dist/cjs/{twitter-pOrUNjXi.js → facebook-DbXua6B9.js} +2 -2
  341. package/dist/esm/{twitter-Dz7o69vX.js → facebook-CO-PeZ27.js} +2 -2
@@ -1,693 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import { e as require_root, f as requireIsObject, i as requireIsSymbol, d as getDefaultExportFromCjs, r as registerInstance, h, a as getElement } from './index-6mr785rH.js';
5
- import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
6
- import { H as Helper } from './Helper-B5RLi6Xo.js';
7
- import './anime.es-CgtvEd63.js';
8
-
9
- var now_1;
10
- var hasRequiredNow;
11
-
12
- function requireNow () {
13
- if (hasRequiredNow) return now_1;
14
- hasRequiredNow = 1;
15
- var root = require_root();
16
-
17
- /**
18
- * Gets the timestamp of the number of milliseconds that have elapsed since
19
- * the Unix epoch (1 January 1970 00:00:00 UTC).
20
- *
21
- * @static
22
- * @memberOf _
23
- * @since 2.4.0
24
- * @category Date
25
- * @returns {number} Returns the timestamp.
26
- * @example
27
- *
28
- * _.defer(function(stamp) {
29
- * console.log(_.now() - stamp);
30
- * }, _.now());
31
- * // => Logs the number of milliseconds it took for the deferred invocation.
32
- */
33
- var now = function() {
34
- return root.Date.now();
35
- };
36
-
37
- now_1 = now;
38
- return now_1;
39
- }
40
-
41
- /** Used to match a single whitespace character. */
42
-
43
- var _trimmedEndIndex;
44
- var hasRequired_trimmedEndIndex;
45
-
46
- function require_trimmedEndIndex () {
47
- if (hasRequired_trimmedEndIndex) return _trimmedEndIndex;
48
- hasRequired_trimmedEndIndex = 1;
49
- var reWhitespace = /\s/;
50
-
51
- /**
52
- * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
53
- * character of `string`.
54
- *
55
- * @private
56
- * @param {string} string The string to inspect.
57
- * @returns {number} Returns the index of the last non-whitespace character.
58
- */
59
- function trimmedEndIndex(string) {
60
- var index = string.length;
61
-
62
- while (index-- && reWhitespace.test(string.charAt(index))) {}
63
- return index;
64
- }
65
-
66
- _trimmedEndIndex = trimmedEndIndex;
67
- return _trimmedEndIndex;
68
- }
69
-
70
- var _baseTrim;
71
- var hasRequired_baseTrim;
72
-
73
- function require_baseTrim () {
74
- if (hasRequired_baseTrim) return _baseTrim;
75
- hasRequired_baseTrim = 1;
76
- var trimmedEndIndex = require_trimmedEndIndex();
77
-
78
- /** Used to match leading whitespace. */
79
- var reTrimStart = /^\s+/;
80
-
81
- /**
82
- * The base implementation of `_.trim`.
83
- *
84
- * @private
85
- * @param {string} string The string to trim.
86
- * @returns {string} Returns the trimmed string.
87
- */
88
- function baseTrim(string) {
89
- return string
90
- ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
91
- : string;
92
- }
93
-
94
- _baseTrim = baseTrim;
95
- return _baseTrim;
96
- }
97
-
98
- var toNumber_1;
99
- var hasRequiredToNumber;
100
-
101
- function requireToNumber () {
102
- if (hasRequiredToNumber) return toNumber_1;
103
- hasRequiredToNumber = 1;
104
- var baseTrim = require_baseTrim(),
105
- isObject = requireIsObject(),
106
- isSymbol = requireIsSymbol();
107
-
108
- /** Used as references for various `Number` constants. */
109
- var NAN = 0 / 0;
110
-
111
- /** Used to detect bad signed hexadecimal string values. */
112
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
113
-
114
- /** Used to detect binary string values. */
115
- var reIsBinary = /^0b[01]+$/i;
116
-
117
- /** Used to detect octal string values. */
118
- var reIsOctal = /^0o[0-7]+$/i;
119
-
120
- /** Built-in method references without a dependency on `root`. */
121
- var freeParseInt = parseInt;
122
-
123
- /**
124
- * Converts `value` to a number.
125
- *
126
- * @static
127
- * @memberOf _
128
- * @since 4.0.0
129
- * @category Lang
130
- * @param {*} value The value to process.
131
- * @returns {number} Returns the number.
132
- * @example
133
- *
134
- * _.toNumber(3.2);
135
- * // => 3.2
136
- *
137
- * _.toNumber(Number.MIN_VALUE);
138
- * // => 5e-324
139
- *
140
- * _.toNumber(Infinity);
141
- * // => Infinity
142
- *
143
- * _.toNumber('3.2');
144
- * // => 3.2
145
- */
146
- function toNumber(value) {
147
- if (typeof value == 'number') {
148
- return value;
149
- }
150
- if (isSymbol(value)) {
151
- return NAN;
152
- }
153
- if (isObject(value)) {
154
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
155
- value = isObject(other) ? (other + '') : other;
156
- }
157
- if (typeof value != 'string') {
158
- return value === 0 ? value : +value;
159
- }
160
- value = baseTrim(value);
161
- var isBinary = reIsBinary.test(value);
162
- return (isBinary || reIsOctal.test(value))
163
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
164
- : (reIsBadHex.test(value) ? NAN : +value);
165
- }
166
-
167
- toNumber_1 = toNumber;
168
- return toNumber_1;
169
- }
170
-
171
- var debounce_1;
172
- var hasRequiredDebounce;
173
-
174
- function requireDebounce () {
175
- if (hasRequiredDebounce) return debounce_1;
176
- hasRequiredDebounce = 1;
177
- var isObject = requireIsObject(),
178
- now = requireNow(),
179
- toNumber = requireToNumber();
180
-
181
- /** Error message constants. */
182
- var FUNC_ERROR_TEXT = 'Expected a function';
183
-
184
- /* Built-in method references for those with the same name as other `lodash` methods. */
185
- var nativeMax = Math.max,
186
- nativeMin = Math.min;
187
-
188
- /**
189
- * Creates a debounced function that delays invoking `func` until after `wait`
190
- * milliseconds have elapsed since the last time the debounced function was
191
- * invoked. The debounced function comes with a `cancel` method to cancel
192
- * delayed `func` invocations and a `flush` method to immediately invoke them.
193
- * Provide `options` to indicate whether `func` should be invoked on the
194
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
195
- * with the last arguments provided to the debounced function. Subsequent
196
- * calls to the debounced function return the result of the last `func`
197
- * invocation.
198
- *
199
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
200
- * invoked on the trailing edge of the timeout only if the debounced function
201
- * is invoked more than once during the `wait` timeout.
202
- *
203
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
204
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
205
- *
206
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
207
- * for details over the differences between `_.debounce` and `_.throttle`.
208
- *
209
- * @static
210
- * @memberOf _
211
- * @since 0.1.0
212
- * @category Function
213
- * @param {Function} func The function to debounce.
214
- * @param {number} [wait=0] The number of milliseconds to delay.
215
- * @param {Object} [options={}] The options object.
216
- * @param {boolean} [options.leading=false]
217
- * Specify invoking on the leading edge of the timeout.
218
- * @param {number} [options.maxWait]
219
- * The maximum time `func` is allowed to be delayed before it's invoked.
220
- * @param {boolean} [options.trailing=true]
221
- * Specify invoking on the trailing edge of the timeout.
222
- * @returns {Function} Returns the new debounced function.
223
- * @example
224
- *
225
- * // Avoid costly calculations while the window size is in flux.
226
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
227
- *
228
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
229
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
230
- * 'leading': true,
231
- * 'trailing': false
232
- * }));
233
- *
234
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
235
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
236
- * var source = new EventSource('/stream');
237
- * jQuery(source).on('message', debounced);
238
- *
239
- * // Cancel the trailing debounced invocation.
240
- * jQuery(window).on('popstate', debounced.cancel);
241
- */
242
- function debounce(func, wait, options) {
243
- var lastArgs,
244
- lastThis,
245
- maxWait,
246
- result,
247
- timerId,
248
- lastCallTime,
249
- lastInvokeTime = 0,
250
- leading = false,
251
- maxing = false,
252
- trailing = true;
253
-
254
- if (typeof func != 'function') {
255
- throw new TypeError(FUNC_ERROR_TEXT);
256
- }
257
- wait = toNumber(wait) || 0;
258
- if (isObject(options)) {
259
- leading = !!options.leading;
260
- maxing = 'maxWait' in options;
261
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
262
- trailing = 'trailing' in options ? !!options.trailing : trailing;
263
- }
264
-
265
- function invokeFunc(time) {
266
- var args = lastArgs,
267
- thisArg = lastThis;
268
-
269
- lastArgs = lastThis = undefined;
270
- lastInvokeTime = time;
271
- result = func.apply(thisArg, args);
272
- return result;
273
- }
274
-
275
- function leadingEdge(time) {
276
- // Reset any `maxWait` timer.
277
- lastInvokeTime = time;
278
- // Start the timer for the trailing edge.
279
- timerId = setTimeout(timerExpired, wait);
280
- // Invoke the leading edge.
281
- return leading ? invokeFunc(time) : result;
282
- }
283
-
284
- function remainingWait(time) {
285
- var timeSinceLastCall = time - lastCallTime,
286
- timeSinceLastInvoke = time - lastInvokeTime,
287
- timeWaiting = wait - timeSinceLastCall;
288
-
289
- return maxing
290
- ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
291
- : timeWaiting;
292
- }
293
-
294
- function shouldInvoke(time) {
295
- var timeSinceLastCall = time - lastCallTime,
296
- timeSinceLastInvoke = time - lastInvokeTime;
297
-
298
- // Either this is the first call, activity has stopped and we're at the
299
- // trailing edge, the system time has gone backwards and we're treating
300
- // it as the trailing edge, or we've hit the `maxWait` limit.
301
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
302
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
303
- }
304
-
305
- function timerExpired() {
306
- var time = now();
307
- if (shouldInvoke(time)) {
308
- return trailingEdge(time);
309
- }
310
- // Restart the timer.
311
- timerId = setTimeout(timerExpired, remainingWait(time));
312
- }
313
-
314
- function trailingEdge(time) {
315
- timerId = undefined;
316
-
317
- // Only invoke if we have `lastArgs` which means `func` has been
318
- // debounced at least once.
319
- if (trailing && lastArgs) {
320
- return invokeFunc(time);
321
- }
322
- lastArgs = lastThis = undefined;
323
- return result;
324
- }
325
-
326
- function cancel() {
327
- if (timerId !== undefined) {
328
- clearTimeout(timerId);
329
- }
330
- lastInvokeTime = 0;
331
- lastArgs = lastCallTime = lastThis = timerId = undefined;
332
- }
333
-
334
- function flush() {
335
- return timerId === undefined ? result : trailingEdge(now());
336
- }
337
-
338
- function debounced() {
339
- var time = now(),
340
- isInvoking = shouldInvoke(time);
341
-
342
- lastArgs = arguments;
343
- lastThis = this;
344
- lastCallTime = time;
345
-
346
- if (isInvoking) {
347
- if (timerId === undefined) {
348
- return leadingEdge(lastCallTime);
349
- }
350
- if (maxing) {
351
- // Handle invocations in a tight loop.
352
- clearTimeout(timerId);
353
- timerId = setTimeout(timerExpired, wait);
354
- return invokeFunc(lastCallTime);
355
- }
356
- }
357
- if (timerId === undefined) {
358
- timerId = setTimeout(timerExpired, wait);
359
- }
360
- return result;
361
- }
362
- debounced.cancel = cancel;
363
- debounced.flush = flush;
364
- return debounced;
365
- }
366
-
367
- debounce_1 = debounce;
368
- return debounce_1;
369
- }
370
-
371
- var throttle_1;
372
- var hasRequiredThrottle;
373
-
374
- function requireThrottle () {
375
- if (hasRequiredThrottle) return throttle_1;
376
- hasRequiredThrottle = 1;
377
- var debounce = requireDebounce(),
378
- isObject = requireIsObject();
379
-
380
- /** Error message constants. */
381
- var FUNC_ERROR_TEXT = 'Expected a function';
382
-
383
- /**
384
- * Creates a throttled function that only invokes `func` at most once per
385
- * every `wait` milliseconds. The throttled function comes with a `cancel`
386
- * method to cancel delayed `func` invocations and a `flush` method to
387
- * immediately invoke them. Provide `options` to indicate whether `func`
388
- * should be invoked on the leading and/or trailing edge of the `wait`
389
- * timeout. The `func` is invoked with the last arguments provided to the
390
- * throttled function. Subsequent calls to the throttled function return the
391
- * result of the last `func` invocation.
392
- *
393
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
394
- * invoked on the trailing edge of the timeout only if the throttled function
395
- * is invoked more than once during the `wait` timeout.
396
- *
397
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
398
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
399
- *
400
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
401
- * for details over the differences between `_.throttle` and `_.debounce`.
402
- *
403
- * @static
404
- * @memberOf _
405
- * @since 0.1.0
406
- * @category Function
407
- * @param {Function} func The function to throttle.
408
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
409
- * @param {Object} [options={}] The options object.
410
- * @param {boolean} [options.leading=true]
411
- * Specify invoking on the leading edge of the timeout.
412
- * @param {boolean} [options.trailing=true]
413
- * Specify invoking on the trailing edge of the timeout.
414
- * @returns {Function} Returns the new throttled function.
415
- * @example
416
- *
417
- * // Avoid excessively updating the position while scrolling.
418
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
419
- *
420
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
421
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
422
- * jQuery(element).on('click', throttled);
423
- *
424
- * // Cancel the trailing throttled invocation.
425
- * jQuery(window).on('popstate', throttled.cancel);
426
- */
427
- function throttle(func, wait, options) {
428
- var leading = true,
429
- trailing = true;
430
-
431
- if (typeof func != 'function') {
432
- throw new TypeError(FUNC_ERROR_TEXT);
433
- }
434
- if (isObject(options)) {
435
- leading = 'leading' in options ? !!options.leading : leading;
436
- trailing = 'trailing' in options ? !!options.trailing : trailing;
437
- }
438
- return debounce(func, wait, {
439
- 'leading': leading,
440
- 'maxWait': wait,
441
- 'trailing': trailing
442
- });
443
- }
444
-
445
- throttle_1 = throttle;
446
- return throttle_1;
447
- }
448
-
449
- var throttleExports = requireThrottle();
450
- var throttle = /*@__PURE__*/getDefaultExportFromCjs(throttleExports);
451
-
452
- class MasonryLayout {
453
- constructor(grid) {
454
- this.grid = grid;
455
- this.create = () => {
456
- this.mutationObserver.observe(this.grid, {
457
- childList: true,
458
- });
459
- for (const item of Array.from(this.grid.children)) {
460
- this.resizeObserver.observe(item);
461
- }
462
- };
463
- this.onContainerMutation = (mutations) => {
464
- const removedNodes = mutations.flatMap((mutation) => Array.from(mutation.removedNodes));
465
- const addedNodes = mutations.flatMap((mutation) => Array.from(mutation.addedNodes));
466
- for (const node of removedNodes) {
467
- if (node instanceof Element) {
468
- this.resizeObserver.unobserve(node);
469
- }
470
- }
471
- for (const node of addedNodes) {
472
- if (node instanceof Element) {
473
- this.resizeObserver.observe(node);
474
- }
475
- }
476
- if (removedNodes.length > 0 && addedNodes.length === 0) {
477
- this.update();
478
- }
479
- };
480
- this.onChildrenResize = (entries) => {
481
- const entriesToUpdate = entries.filter((entry) => entry.target.parentElement !== null);
482
- if (entriesToUpdate.length > 0) {
483
- this.update();
484
- }
485
- };
486
- this.update = throttle(() => {
487
- const computedStyle = window.getComputedStyle(this.grid);
488
- if (computedStyle.getPropertyValue("display").includes("grid") === false) {
489
- this.clean();
490
- return;
491
- }
492
- const columns = parseGridTemplateColumns(this.grid);
493
- if (columns.length <= 1) {
494
- this.clean();
495
- return;
496
- }
497
- const rowGap = Number.parseFloat(computedStyle.getPropertyValue("row-gap").trim()) || 0;
498
- const items = Array.from(this.grid.children);
499
- for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
500
- const firstItemInColumn = items[columnIndex];
501
- firstItemInColumn?.style.removeProperty("margin-top");
502
- }
503
- for (let index = 0; index < items.length; index++) {
504
- const prevItem = items[index - columns.length];
505
- const nextItem = items[index];
506
- if (prevItem !== undefined && nextItem !== undefined) {
507
- const prevBottom = prevItem.getBoundingClientRect().bottom;
508
- nextItem.style.removeProperty("margin-top");
509
- const nextTop = nextItem.getBoundingClientRect().top;
510
- if (nextTop - rowGap !== prevBottom) {
511
- const margin = Math.round((prevBottom - (nextTop - rowGap) + Number.EPSILON) * 100) / 100;
512
- nextItem.style.setProperty("margin-top", `${margin}px`);
513
- }
514
- }
515
- }
516
- }, 32);
517
- this.destroy = () => {
518
- this.resizeObserver.disconnect();
519
- this.mutationObserver.disconnect();
520
- this.clean();
521
- };
522
- this.clean = () => {
523
- for (const item of Array.from(this.grid.children)) {
524
- item.style.removeProperty("margin-top");
525
- }
526
- };
527
- this.mutationObserver = new MutationObserver(this.onContainerMutation);
528
- this.resizeObserver = new ResizeObserver(this.onChildrenResize);
529
- if (CSS.supports("grid-template-rows", "masonry") === false) {
530
- this.create();
531
- }
532
- }
533
- [Symbol.dispose]() {
534
- this.destroy();
535
- }
536
- }
537
- function parseGridTemplateColumns(grid) {
538
- const computedStyle = window.getComputedStyle(grid);
539
- const gridTemplateColumns = computedStyle.getPropertyValue("grid-template-columns");
540
- return gridTemplateColumns
541
- .trim()
542
- .split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/);
543
- }
544
-
545
- const sallaReviewsPageCss = ":host{display:block}";
546
-
547
- const SallaReviewsPage = class {
548
- constructor(hostRef) {
549
- registerInstance(this, hostRef);
550
- this.reviews = [];
551
- this.isLoading = false;
552
- this.pagination = null;
553
- this.sort = "latest";
554
- }
555
- getUrlParams() {
556
- const params = new URLSearchParams(window.location.search);
557
- return {
558
- sort: params.get('sort') || null,
559
- page: Number.parseInt(params.get('page')) || 1
560
- };
561
- }
562
- updateUrlParams(params) {
563
- const url = new URL(window.location.href);
564
- for (const [key, value] of Object.entries(params)) {
565
- if (value) {
566
- url.searchParams.set(key, value.toString());
567
- }
568
- else {
569
- url.searchParams.delete(key);
570
- }
571
- }
572
- window.history.replaceState({}, '', url.toString());
573
- }
574
- fetchReviews(sort, page) {
575
- const urlParams = this.getUrlParams();
576
- return salla.api.request('reviews', {
577
- params: {
578
- type: 'products',
579
- format: 'lite',
580
- per_page: 8,
581
- page: page || urlParams.page || 1,
582
- sort: sort || urlParams.sort || null
583
- }
584
- });
585
- }
586
- async initializeMasonry() {
587
- const grid = this.el.querySelector('.s-reviews-page-grid');
588
- if (!grid)
589
- return;
590
- try {
591
- new MasonryLayout(grid);
592
- salla.logger.info('Masonry initialized successfully');
593
- }
594
- catch (error) {
595
- salla.logger.error('Masonry initialization failed:', error);
596
- }
597
- }
598
- animateReviewCards() {
599
- const items = this.wrapper.querySelectorAll('salla-review-card:not(.animated)');
600
- Helper.animateItems(items);
601
- }
602
- initiateInfiniteScroll() {
603
- if (!this.wrapper) {
604
- salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');
605
- return;
606
- }
607
- this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {
608
- path: () => this.pagination?.links?.next || null,
609
- history: false,
610
- scrollThreshold: false,
611
- }, true);
612
- this.infiniteScroll?.on('request', () => {
613
- this.isLoading = true;
614
- });
615
- this.infiniteScroll?.on('load', response => {
616
- this.pagination = response.pagination;
617
- this.reviews = [...this.reviews, ...response.data];
618
- this.isLoading = false;
619
- // Update URL with the current page
620
- this.updateUrlParams({ page: response.pagination.current_page });
621
- });
622
- this.infiniteScroll?.on('error', (e) => {
623
- salla.logger.error('Error loading more reviews:', e);
624
- this.isLoading = false;
625
- });
626
- }
627
- componentDidRender() {
628
- setTimeout(() => {
629
- requestAnimationFrame(this.animateReviewCards.bind(this));
630
- }, 176);
631
- }
632
- async componentWillLoad() {
633
- try {
634
- await salla.onReady();
635
- // Initialize language variables
636
- this.langTitlesReviews = salla.lang.get("common.titles.reviews");
637
- this.langSorting = salla.lang.get('pages.categories.sorting');
638
- this.placeholderText = salla.lang.choice("pages.rating.reviews", 0);
639
- this.langLoadMore = salla.lang.get('common.elements.load_more');
640
- this.langSortByTopRating = salla.lang.get('pages.testimonials.sort_by_rating_desc');
641
- this.langSortByMostRecent = salla.lang.get('pages.testimonials.sort_by_date_desc');
642
- this.langSortByLeastRated = salla.lang.get('pages.testimonials.sort_by_rating_asc');
643
- this.langSortByLeastRecent = salla.lang.get('pages.testimonials.sort_by_date_asc');
644
- const urlParams = this.getUrlParams();
645
- const response = await this.fetchReviews(urlParams.sort);
646
- this.sort = urlParams.sort;
647
- this.reviews = response.data;
648
- this.pagination = response.pagination;
649
- this.langRatingReviews = salla.lang.choice("pages.rating.reviews", this.pagination?.total);
650
- }
651
- catch (error) {
652
- salla.logger.error('Error loading reviews:', error);
653
- }
654
- }
655
- async handleSorting(e) {
656
- const value = e.target.value;
657
- this.sort = value;
658
- this.updateUrlParams({ sort: value, page: 1 }); // Reset to page 1 when changing sort
659
- const response = await this.fetchReviews(value, 1);
660
- this.reviews = response.data;
661
- this.pagination = response.pagination;
662
- }
663
- async componentDidLoad() {
664
- await this.initializeMasonry();
665
- this.initiateInfiniteScroll();
666
- this.sort = this.getUrlParams().sort || "latest";
667
- this.updateUrlParams({ sort: this.sort, page: 1 });
668
- }
669
- disconnectedCallback() {
670
- if (this.infiniteScroll) {
671
- this.infiniteScroll.destroy();
672
- }
673
- }
674
- renderSortingOptions() {
675
- const options = [
676
- { value: 'latest', label: this.langSortByMostRecent },
677
- { value: 'oldest', label: this.langSortByLeastRecent },
678
- { value: 'top_rating', label: this.langSortByTopRating },
679
- { value: 'bottom_rating', label: this.langSortByLeastRated },
680
- ];
681
- return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
682
- }
683
- render() {
684
- return (h("host", { key: '5e3b4042e6412dd2fdef3d776d4204c731df6c80' }, h("div", { key: 'a9daf869bac109b7c627c9fd8fd7c84cd4dd2965', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '01cd6892650d8288003d79b4c12e82c4693e1cb6', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: '935329858a3cc699da6fb6fb8c8515348ded9eb4', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: 'e74312403c6dc7625c0c2090e6627a8a6b5fca9b', class: "s-reviews-page-filter-wrapper" }, h("label", { key: 'bf51576936b030ee59836861b03fa3b06471ed1f', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '72f09a679c5f42b08f55b908f67f3d3627b3a50c', 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 => {
685
- this.wrapper = el;
686
- } }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
687
- : 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));
688
- }
689
- get el() { return getElement(this); }
690
- };
691
- SallaReviewsPage.style = sallaReviewsPageCss;
692
-
693
- export { SallaReviewsPage as salla_reviews_page };