@salla.sa/twilight-components 2.14.312 → 2.14.338

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 (258) hide show
  1. package/dist/cjs/{filepond-CiAt5i10.js → filepond-hpLROc_m.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DdEJEgnf.js → filepond-plugin-file-poster-C8gskRGl.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-0E5awx2w.js → filepond-plugin-file-validate-size-CaO6qVs6.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-gT-JewGH.js → filepond-plugin-file-validate-type-mUUtcgCs.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DtBf5E5M.js → filepond-plugin-image-edit-rptDhPuc.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DlG1UV1W.js → filepond-plugin-image-exif-orientation-B6L8W0Qe.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-Dub3Jpec.js → filepond-plugin-image-preview-BoqOfOki.js} +1 -1
  8. package/dist/cjs/{index-BP5-4y-K.js → index-2liYDuhx.js} +583 -420
  9. package/dist/cjs/{index-i_mnWz5-.js → index-ChHHnqio.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion_62.cjs.entry.js +173 -94
  12. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters-widget.cjs.entry.js +60 -12
  20. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  24. package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
  25. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
  27. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  33. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  36. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  37. package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  46. package/dist/cjs/twilight.cjs.js +2 -2
  47. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +1 -1
  48. package/dist/collection/components/salla-button/salla-button.js +29 -13
  49. package/dist/collection/components/salla-comments/salla-comment-item.js +8 -3
  50. package/dist/collection/components/salla-comments/salla-comments.js +1 -1
  51. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +62 -12
  52. package/dist/collection/components/salla-gifting/salla-gifting.js +3 -3
  53. package/dist/collection/components/salla-hook/salla-hook.js +1 -1
  54. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  55. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  56. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  57. package/dist/collection/components/salla-login-modal/salla-login-modal.js +15 -2
  58. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  59. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
  60. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  61. package/dist/collection/components/salla-map/salla-map.js +3 -3
  62. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
  63. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  64. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
  65. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +2 -2
  66. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
  67. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  68. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  69. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +1 -1
  70. package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
  71. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  72. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  73. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  74. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  75. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  76. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  77. package/dist/collection/components/salla-product-options/salla-product-options.js +37 -16
  78. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  79. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +13 -2
  80. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +2 -2
  81. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  82. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  83. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  84. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  85. package/dist/collection/components/salla-search/salla-search.js +3 -3
  86. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  87. package/dist/collection/components/salla-slider/salla-slider.js +2 -2
  88. package/dist/collection/components/salla-social/salla-social.js +1 -1
  89. package/dist/collection/components/salla-social-share/salla-social-share.js +5 -1
  90. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  91. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  92. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  93. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  94. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  95. package/dist/collection/components/salla-user-menu/salla-user-menu.js +9 -1
  96. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  97. package/dist/collection/plugins/commonjs-cache-fix.js +21 -0
  98. package/dist/components/axios.js +583 -420
  99. package/dist/components/index.js +2 -2
  100. package/dist/components/salla-apps-icons.js +1 -1
  101. package/dist/components/salla-button2.js +29 -13
  102. package/dist/components/salla-comment-item2.js +8 -3
  103. package/dist/components/salla-comments.js +1 -1
  104. package/dist/components/salla-filters-widget2.js +61 -11
  105. package/dist/components/salla-gifting.js +3 -3
  106. package/dist/components/salla-hook.js +1 -1
  107. package/dist/components/salla-list-tile2.js +1 -1
  108. package/dist/components/salla-loading2.js +1 -1
  109. package/dist/components/salla-localization-modal.js +1 -1
  110. package/dist/components/salla-login-modal.js +15 -2
  111. package/dist/components/salla-loyalty-prize-item.js +1 -1
  112. package/dist/components/salla-loyalty-program.js +1 -1
  113. package/dist/components/salla-maintenance-alert.js +1 -1
  114. package/dist/components/salla-map2.js +3 -3
  115. package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
  116. package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
  117. package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
  118. package/dist/components/salla-multiple-bundle-product-slider2.js +2 -2
  119. package/dist/components/salla-multiple-bundle-product.js +1 -1
  120. package/dist/components/salla-notification-item2.js +1 -1
  121. package/dist/components/salla-offer-modal.js +1 -1
  122. package/dist/components/salla-order-details-multiple-bundle-product2.js +1 -1
  123. package/dist/components/salla-order-details.js +1 -1
  124. package/dist/components/salla-order-summary.js +1 -1
  125. package/dist/components/salla-payments.js +2 -2
  126. package/dist/components/salla-placeholder2.js +1 -1
  127. package/dist/components/salla-price-range2.js +2 -2
  128. package/dist/components/salla-product-availability2.js +1 -1
  129. package/dist/components/salla-product-card2.js +5 -5
  130. package/dist/components/salla-product-options2.js +37 -16
  131. package/dist/components/salla-product-size-guide.js +2 -2
  132. package/dist/components/salla-quantity-input.js +13 -2
  133. package/dist/components/salla-quick-buy2.js +6 -4
  134. package/dist/components/salla-review-card2.js +1 -1
  135. package/dist/components/salla-reviews-page.js +1 -1
  136. package/dist/components/salla-reviews.js +1 -1
  137. package/dist/components/salla-scopes.js +1 -1
  138. package/dist/components/salla-search.js +3 -3
  139. package/dist/components/salla-skeleton2.js +1 -1
  140. package/dist/components/salla-slider2.js +2 -2
  141. package/dist/components/salla-social-share.js +5 -1
  142. package/dist/components/salla-social.js +1 -1
  143. package/dist/components/salla-tab-content2.js +1 -1
  144. package/dist/components/salla-tab-header2.js +1 -1
  145. package/dist/components/salla-tabs2.js +1 -1
  146. package/dist/components/salla-tel-input2.js +1 -1
  147. package/dist/components/salla-tooltip2.js +1 -1
  148. package/dist/components/salla-user-menu.js +9 -1
  149. package/dist/components/salla-user-settings.js +1 -1
  150. package/dist/esm/{filepond-aj0Vz3hN.js → filepond-CwjnR_95.js} +1 -1
  151. package/dist/esm/{filepond-plugin-file-poster-lPOvqQlG.js → filepond-plugin-file-poster-DES9KQfe.js} +1 -1
  152. package/dist/esm/{filepond-plugin-file-validate-size-CV5FbyeW.js → filepond-plugin-file-validate-size-BcloWdhO.js} +1 -1
  153. package/dist/esm/{filepond-plugin-file-validate-type-B7RUT3W_.js → filepond-plugin-file-validate-type-CbjGxksB.js} +1 -1
  154. package/dist/esm/{filepond-plugin-image-edit-CXPgbHP6.js → filepond-plugin-image-edit-BtZ6aJg8.js} +1 -1
  155. package/dist/esm/{filepond-plugin-image-exif-orientation-BKxDLyfR.js → filepond-plugin-image-exif-orientation-BVNb0UTU.js} +1 -1
  156. package/dist/esm/{filepond-plugin-image-preview-B3b6dOj7.js → filepond-plugin-image-preview-t1v2q4Jq.js} +1 -1
  157. package/dist/esm/{index-BVJkSSs6.js → index-CRmtzwUF.js} +583 -420
  158. package/dist/esm/{index-CvvOXX3k.js → index-HmYGeOpS.js} +1 -1
  159. package/dist/esm/loader.js +3 -3
  160. package/dist/esm/salla-accordion_62.entry.js +173 -94
  161. package/dist/esm/salla-advertisement.entry.js +1 -1
  162. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  163. package/dist/esm/salla-apps-icons.entry.js +2 -2
  164. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  165. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  166. package/dist/esm/salla-contacts.entry.js +1 -1
  167. package/dist/esm/salla-custom-fields.entry.js +1 -1
  168. package/dist/esm/salla-filters-widget.entry.js +60 -12
  169. package/dist/esm/salla-filters.entry.js +1 -1
  170. package/dist/esm/salla-hook.entry.js +2 -2
  171. package/dist/esm/salla-installment.entry.js +1 -1
  172. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  173. package/dist/esm/salla-loyalty-program.entry.js +2 -2
  174. package/dist/esm/salla-metadata.entry.js +1 -1
  175. package/dist/esm/salla-notification-item.entry.js +2 -2
  176. package/dist/esm/salla-notifications.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 +2 -2
  179. package/dist/esm/salla-order-details-options.entry.js +1 -1
  180. package/dist/esm/salla-order-details.entry.js +2 -2
  181. package/dist/esm/salla-order-summary.entry.js +2 -2
  182. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  183. package/dist/esm/salla-orders.entry.js +1 -1
  184. package/dist/esm/salla-payments.entry.js +3 -3
  185. package/dist/esm/salla-price-range.entry.js +3 -3
  186. package/dist/esm/salla-review-card.entry.js +2 -2
  187. package/dist/esm/salla-reviews-page.entry.js +2 -2
  188. package/dist/esm/salla-reviews.entry.js +2 -2
  189. package/dist/esm/salla-social.entry.js +2 -2
  190. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  191. package/dist/esm/salla-tooltip.entry.js +2 -2
  192. package/dist/esm/salla-trust-badges.entry.js +1 -1
  193. package/dist/esm/salla-verify.entry.js +1 -1
  194. package/dist/esm/salla-wallet.entry.js +1 -1
  195. package/dist/esm/twilight.js +3 -3
  196. package/dist/twilight/p-057e38a1.entry.js +4 -0
  197. package/dist/twilight/p-19f40612.entry.js +4 -0
  198. package/dist/twilight/{p-56e70b23.entry.js → p-1c31f335.entry.js} +1 -1
  199. package/dist/twilight/{p-3ba6d234.entry.js → p-1f31af27.entry.js} +1 -1
  200. package/dist/twilight/{p-caac78a8.entry.js → p-21ced14f.entry.js} +1 -1
  201. package/dist/twilight/{p-e7eeebf1.entry.js → p-2bb93ed0.entry.js} +1 -1
  202. package/dist/twilight/{p-a5780098.entry.js → p-3862a37f.entry.js} +1 -1
  203. package/dist/twilight/{p-65ce7926.entry.js → p-3f45a06b.entry.js} +1 -1
  204. package/dist/twilight/{p-0dcda629.entry.js → p-403bef37.entry.js} +1 -1
  205. package/dist/twilight/{p-62e50e0c.entry.js → p-4317d018.entry.js} +1 -1
  206. package/dist/twilight/{p-da2c81c6.entry.js → p-45053a9b.entry.js} +1 -1
  207. package/dist/twilight/{p-615331d4.entry.js → p-48d76aa7.entry.js} +1 -1
  208. package/dist/twilight/{p-366c2a7d.entry.js → p-56d3794f.entry.js} +1 -1
  209. package/dist/twilight/{p-061ec27c.entry.js → p-69600ceb.entry.js} +1 -1
  210. package/dist/twilight/{p-3c7c63ee.entry.js → p-817fca09.entry.js} +1 -1
  211. package/dist/twilight/{p-5606e8dd.entry.js → p-877ee446.entry.js} +1 -1
  212. package/dist/twilight/p-878f405f.entry.js +4 -0
  213. package/dist/twilight/{p-883a04da.entry.js → p-88c9cdc0.entry.js} +1 -1
  214. package/dist/twilight/p-8d231ba5.entry.js +4 -0
  215. package/dist/twilight/p-9108e972.entry.js +4 -0
  216. package/dist/twilight/p-95f3e7ea.entry.js +4 -0
  217. package/dist/twilight/{p-Bf2ln7Tf.js → p-BgkeXrDK.js} +1 -1
  218. package/dist/twilight/{p-CimxEIO_.js → p-BxtqlawD.js} +2 -2
  219. package/dist/twilight/p-CRmtzwUF.js +5 -0
  220. package/dist/twilight/{p-Cau1tMDQ.js → p-DTy6dAEi.js} +1 -1
  221. package/dist/twilight/{p-CtmyX8MN.js → p-DdMTtNYY.js} +1 -1
  222. package/dist/twilight/{p-CslymsND.js → p-VCBBJkYb.js} +1 -1
  223. package/dist/twilight/{p-CJWu6tW6.js → p-YYVkPdoE.js} +1 -1
  224. package/dist/twilight/{p-7d6d19b9.entry.js → p-a3ae644b.entry.js} +1 -1
  225. package/dist/twilight/{p-b3311168.entry.js → p-a4ad6d0b.entry.js} +1 -1
  226. package/dist/twilight/{p-3939ed34.entry.js → p-a665ff5d.entry.js} +1 -1
  227. package/dist/twilight/{p-032b235d.entry.js → p-a9bec6cf.entry.js} +1 -1
  228. package/dist/twilight/{p-41b68e9a.entry.js → p-b7f1e672.entry.js} +1 -1
  229. package/dist/twilight/p-c0f8d377.entry.js +11 -0
  230. package/dist/twilight/{p-0979d5a6.entry.js → p-e98f8bae.entry.js} +1 -1
  231. package/dist/twilight/{p-b9090ce1.entry.js → p-eb6378eb.entry.js} +1 -1
  232. package/dist/twilight/{p-0e4a8f9f.entry.js → p-ef827c32.entry.js} +1 -1
  233. package/dist/twilight/{p-c133896d.entry.js → p-f01949b5.entry.js} +1 -1
  234. package/dist/twilight/{p-5afe6962.entry.js → p-f10087fd.entry.js} +1 -1
  235. package/dist/twilight/{p-f586994e.entry.js → p-f33a5658.entry.js} +1 -1
  236. package/dist/twilight/p-f4dc16e8.entry.js +4 -0
  237. package/dist/twilight/{p-eb9bf011.entry.js → p-f6a7b2cf.entry.js} +1 -1
  238. package/dist/twilight/{p-DZVGmyCg.js → p-sFNa2aTl.js} +1 -1
  239. package/dist/twilight/{p-BQe0WtLQ.js → p-xAxNmkBV.js} +1 -1
  240. package/dist/twilight/twilight.esm.js +1 -1
  241. package/dist/types/components/salla-button/salla-button.d.ts +0 -1
  242. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  243. package/dist/types/components/salla-comments/salla-comment-item.d.ts +1 -0
  244. package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +7 -2
  245. package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -0
  246. package/dist/types/components/salla-quantity-input/salla-quantity-input.d.ts +5 -1
  247. package/dist/types/components/salla-social-share/salla-social-share.d.ts +1 -0
  248. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +1 -0
  249. package/package.json +5 -5
  250. package/dist/twilight/p-4657145b.entry.js +0 -11
  251. package/dist/twilight/p-7f03a939.entry.js +0 -4
  252. package/dist/twilight/p-87fe3f74.entry.js +0 -4
  253. package/dist/twilight/p-96f53e45.entry.js +0 -4
  254. package/dist/twilight/p-BVJkSSs6.js +0 -5
  255. package/dist/twilight/p-b81e66b2.entry.js +0 -4
  256. package/dist/twilight/p-d46b3cb6.entry.js +0 -4
  257. package/dist/twilight/p-e0c73f9b.entry.js +0 -4
  258. package/dist/twilight/p-f4383a51.entry.js +0 -4
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,h as o,a as e}from"./p-BVJkSSs6.js";const i=class{constructor(o){t(this,o),this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){return o("div",{key:"1de8b4c05780d978edc217c9de5421607290b34a",class:"s-tooltip-container"},o("slot",{key:"633882a65d997d2d3ef0fb8ce050eda1b6444df3"}),this.show&&o("div",{key:"d74010440f5a2cc3b373d4311f6d26fe6c46b593",class:"s-tooltip-item"},this.text))}get el(){return e(this)}};i.style='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}';export{i as salla_tooltip}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,c as t,h as i,H as e,a}from"./p-BVJkSSs6.js";import{H as h}from"./p-Dljb4XCt.js";import{F as l}from"./p-DL4h2bc3.js";import"./p-CgtvEd63.js";const r=class{constructor(i){s(this,i),this.changed=t(this,"changed"),this.initHeight=195,this.isOpen=!0,this.isShowMore=!1,this.showMoreLabel="عرض المزيد",this.showLessLabel="عرض أقل",this.page=salla.config.get("page")}connectedCallback(){this.withLoadMore="price"!=this.option.key&&Array.isArray(this.option.values)&&this.option.values.length>8,salla.onReady((()=>{this.page=salla.config.get("page")})),salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.getWithDefault("common.titles.more",this.showMoreLabel),this.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=!1),this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`),this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async setWidgetHeight(s=250){this.widgetContent.removeAttribute("style"),setTimeout((()=>{this.widgetContent.style.height=this.widgetContent.scrollHeight+"px"}),s)}async reset(){this.option.type===l.RANGE&&this.priceRange.reset(),Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=!1))}async showMore(){this.isShowMore=!this.isShowMore,this.widgetContent.style.height="auto",this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`,setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen,h.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){return[l.VALUES,l.MINIMUM,l.VARIANTS].includes(s.type)?s.values.map((t=>{let e="number"==typeof t?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${e}`,key:`${s.key}-option-${e}`},i("input",{id:`${s.key}-option-${e}`,name:s.key,type:"radio",checked:this.isSelectedOption(s,e),class:"s-filters-radio",onChange:t=>this.changed.emit({event:t,option:s,value:e})}),this.getOptionLabel(s,t))})):""}isSelectedOption(s,t){return s.type===l.MINIMUM?this.filtersData[s.key]==t:s.type===l.VARIANTS?this.filtersData[s.type]&&this.filtersData[s.type][Object.keys(this.filtersData[s.type])[0]]==t:s.type===l.RANGE?this.filtersData[s.key]&&this.filtersData[s.key].min==t.min&&this.filtersData[s.key].max==t.max:s.type===l.VALUES&&this.filtersData[s.key]&&Number(this.filtersData[s.key])==Number(t)}getOptionLabel(s,t){return"rating"==s.key?i("salla-rating-stars",{size:"small",value:t}):i("span",{class:"s-filters-option-name"},t.value||"null")}render(){return i(e,{key:"e22c4c9c5f69bd901a55c3b9c202e6cca14c1134",class:"s-filters-widget-container"},i("h3",{key:"758d6ddbff83b5416d1ef06ef790535587403613",class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",{key:"77e0b8b00a6bed4d396142bd13ba83964e3a72d8"},this.option.label),i("span",{key:"481bbf3735b6a9fe629ec99004556bca0bbf7dd9",class:"s-filters-widget-plusminus "+(this.isOpen?"s-filters-widget-plusminus-active":"")})),i("div",{key:"a46631d62460351d6822a09ad864c51753aa7369",class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{key:"fb5095c46cef0014859bc3d8acaf8a2661afa916",class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",{key:"b4ac615c765b88a027675e095d5da28ad7cd8845"}),this.option.type!==l.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>{this.changed.emit(s.detail)},ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{key:"9b3a08a990949130531810792dccb24192b57e46",class:"s-filters-widget-more",onClick:()=>this.showMore()},this.isShowMore?this.showLessLabel:this.showMoreLabel)))}get host(){return a(this)}};r.style=":host{display:block}";export{r as salla_filters_widget}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{e as t,f as i,i as s,d as e,r as a,h as r,a as n}from"./p-BVJkSSs6.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-Dljb4XCt.js";import"./p-CgtvEd63.js";var c,h,u,f,d,p,v,m,g,b,w,y;function _(){if(b)return g;b=1;var e=i(),a=function(){if(h)return c;h=1;var i=t();return c=function(){return i.Date.now()}}(),r=function(){if(m)return v;m=1;var t=function(){if(p)return d;p=1;var t=function(){if(f)return u;f=1;var t=/\s/;return u=function(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}}(),i=/^\s+/;return d=function(s){return s?s.slice(0,t(s)+1).replace(i,""):s}}(),e=i(),a=s(),r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;return v=function(i){if("number"==typeof i)return i;if(a(i))return NaN;if(e(i)){var s="function"==typeof i.valueOf?i.valueOf():i;i=e(s)?s+"":s}if("string"!=typeof i)return 0===i?i:+i;i=t(i);var c=n.test(i);return c||o.test(i)?l(i.slice(2),c?2:8):r.test(i)?NaN:+i}}(),n=Math.max,o=Math.min;return g=function(t,i,s){var l,c,h,u,f,d,p=0,v=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function b(i){var s=l,e=c;return l=c=void 0,p=i,u=t.apply(e,s)}function w(t){var s=t-d;return void 0===d||s>=i||s<0||m&&t-p>=h}function y(){var t=a();if(w(t))return _(t);f=setTimeout(y,function(t){var s=i-(t-d);return m?o(s,h-(t-p)):s}(t))}function _(t){return f=void 0,g&&l?b(t):(l=c=void 0,u)}function k(){var t=a(),s=w(t);if(l=arguments,c=this,d=t,s){if(void 0===f)return function(t){return p=t,f=setTimeout(y,i),v?b(t):u}(d);if(m)return clearTimeout(f),f=setTimeout(y,i),b(d)}return void 0===f&&(f=setTimeout(y,i)),u}return i=r(i)||0,e(s)&&(v=!!s.leading,h=(m="maxWait"in s)?n(r(s.maxWait)||0,i):h,g="trailing"in s?!!s.trailing:g),k.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=d=c=f=void 0},k.flush=function(){return void 0===f?u:_(a())},k},g}var k=e(function(){if(y)return w;y=1;var t=_(),s=i();return w=function(i,e,a){var r=!0,n=!0;if("function"!=typeof i)throw new TypeError("Expected a function");return s(a)&&(r="leading"in a?!!a.leading:r,n="trailing"in a?!!a.trailing:n),t(i,e,{leading:r,maxWait:e,trailing:n})}}());class T{constructor(t){this.grid=t,this.create=()=>{this.mutationObserver.observe(this.grid,{childList:!0});for(const t of Array.from(this.grid.children))this.resizeObserver.observe(t)},this.onContainerMutation=t=>{const i=t.flatMap((t=>Array.from(t.removedNodes))),s=t.flatMap((t=>Array.from(t.addedNodes)));for(const t of i)t instanceof Element&&this.resizeObserver.unobserve(t);for(const t of s)t instanceof Element&&this.resizeObserver.observe(t);i.length>0&&0===s.length&&this.update()},this.onChildrenResize=t=>{t.filter((t=>null!==t.target.parentElement)).length>0&&this.update()},this.update=k((()=>{const t=window.getComputedStyle(this.grid);if(!1===t.getPropertyValue("display").includes("grid"))return void this.clean();const i=function(t){return window.getComputedStyle(t).getPropertyValue("grid-template-columns").trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}(this.grid);if(i.length<=1)return void this.clean();const s=Number.parseFloat(t.getPropertyValue("row-gap").trim())||0,e=Array.from(this.grid.children);for(let t=0;t<i.length;t++){const i=e[t];i?.style.removeProperty("margin-top")}for(let t=0;t<e.length;t++){const a=e[t-i.length],r=e[t];if(void 0!==a&&void 0!==r){const t=a.getBoundingClientRect().bottom;r.style.removeProperty("margin-top");const i=r.getBoundingClientRect().top;if(i-s!==t){const e=Math.round(100*(t-(i-s)+Number.EPSILON))/100;r.style.setProperty("margin-top",`${e}px`)}}}}),32),this.destroy=()=>{this.resizeObserver.disconnect(),this.mutationObserver.disconnect(),this.clean()},this.clean=()=>{for(const t of Array.from(this.grid.children))t.style.removeProperty("margin-top")},this.mutationObserver=new MutationObserver(this.onContainerMutation),this.resizeObserver=new ResizeObserver(this.onChildrenResize),!1===CSS.supports("grid-template-rows","masonry")&&this.create()}[Symbol.dispose](){this.destroy()}}const S=class{constructor(t){a(this,t),this.reviews=[],this.isLoading=!1,this.pagination=null,this.sort="latest"}getUrlParams(){const t=new URLSearchParams(window.location.search);return{sort:t.get("sort")||null,page:Number.parseInt(t.get("page"))||1}}updateUrlParams(t){const i=new URL(window.location.href);for(const[s,e]of Object.entries(t))e?i.searchParams.set(s,e.toString()):i.searchParams.delete(s);window.history.replaceState({},"",i.toString())}fetchReviews(t,i){const s=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:i||s.page||1,sort:t||s.sort||null}})}async initializeMasonry(){const t=this.el.querySelector(".s-reviews-page-grid");if(t)try{new T(t),salla.logger.info("Masonry initialized successfully")}catch(t){salla.logger.error("Masonry initialization failed:",t)}}animateReviewCards(){const t=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");l.animateItems(t)}initiateInfiniteScroll(){this.wrapper?(this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.pagination?.links?.next||null,history:!1,scrollThreshold:!1},!0),this.infiniteScroll?.on("request",(()=>{this.isLoading=!0})),this.infiniteScroll?.on("load",(t=>{this.pagination=t.pagination,this.reviews=[...this.reviews,...t.data],this.isLoading=!1,this.updateUrlParams({page:t.pagination.current_page})})),this.infiniteScroll?.on("error",(t=>{salla.logger.error("Error loading more reviews:",t),this.isLoading=!1}))):salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.")}componentDidRender(){setTimeout((()=>{requestAnimationFrame(this.animateReviewCards.bind(this))}),176)}async componentWillLoad(){try{await salla.onReady(),this.langTitlesReviews=salla.lang.get("common.titles.reviews"),this.langSorting=salla.lang.get("pages.categories.sorting"),this.placeholderText=salla.lang.choice("pages.rating.reviews",0),this.langLoadMore=salla.lang.get("common.elements.load_more"),this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc"),this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc"),this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc"),this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");const t=this.getUrlParams(),i=await this.fetchReviews(t.sort);this.sort=t.sort,this.reviews=i.data,this.pagination=i.pagination,this.langRatingReviews=salla.lang.choice("pages.rating.reviews",this.pagination?.total)}catch(t){salla.logger.error("Error loading reviews:",t)}}async handleSorting(t){const i=t.target.value;this.sort=i,this.updateUrlParams({sort:i,page:1});const s=await this.fetchReviews(i,1);this.reviews=s.data,this.pagination=s.pagination}async componentDidLoad(){await this.initializeMasonry(),this.initiateInfiniteScroll(),this.sort=this.getUrlParams().sort||"latest",this.updateUrlParams({sort:this.sort,page:1})}disconnectedCallback(){this.infiniteScroll&&this.infiniteScroll.destroy()}renderSortingOptions(){return[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}].map((t=>r("option",{key:t.value,value:t.value,selected:t.value===this.sort},t.label)))}render(){return r("host",{key:"15a205e6f8aa688b4b2a38bc990bc9c6800b7ef6"},r("div",{key:"3ad7666bdae456b056e450143f4112987b59a0aa",class:"s-reviews-page-header-wrapper"},r("h2",{key:"75b2e6b66ac8690505dcc21739beb82449eb176d",class:"s-reviews-page-title"},this.langTitlesReviews,r("span",{key:"3984e8157aed8909a529c603a2004688ceb10a1d",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),r("div",{key:"2dbfe5c5922b7ecabbdc9468cfe2af3a52a01bd0",class:"s-reviews-page-filter-wrapper"},r("label",{key:"6ab3f0f16f585267755b02a3de92fbda73b767b9",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),r("select",{key:"c282ada5d6c15d97a85148b6bc9eceb97eac1277",onChange:t=>this.handleSorting(t),disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?r("main",{class:"s-reviews-page-grid",ref:t=>{this.wrapper=t}},this.reviews.map((t=>r("salla-review-card",{key:t.id,review:t})))):r("div",{class:"s-products-list-placeholder"},r("span",{innerHTML:o}),r("p",null,this.placeholderText)),this.pagination?.links?.next&&this.reviews.length?r("div",{class:"s-reviews-page-load-more-container"},r("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:()=>this.infiniteScroll?.loadNextPage(),onKeyUp:()=>this.infiniteScroll?.loadNextPage()},this.langLoadMore)):null)}get el(){return n(this)}};S.style=":host{display:block}";export{S as salla_reviews_page}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as i,h as e}from"./p-BVJkSSs6.js";const t=class{constructor(e){i(this,e)}render(){return e("a",{key:"01a97a5dea78c7cadb2a3d2e464f0e400c265680",href:this.notification.url,class:{"s-notifications-item":!0,"s-notifications-item-shadow":!0,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"5857067e654505895ded37980371f04d0341fe5e",class:"s-notifications-item-icon"},e("i",{key:"5882307587321e99438b2a44e39110a03d77c1b5",class:{"s-notifications-item-icon sicon-bell-ring":!0,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"f9b74d99b63dbc1f837ac4b7ee3b52feb680b6a4",class:"s-notifications-item-content"},e("div",{key:"b00690095380797b1b6477f217d2ae6dfec8f78c",class:"s-notifications-item-content-leading"},e("h4",{key:"30528ff5728c1a8f7776ec096c9eb6225b0d4992"},this.notification.title),e("p",{key:"35501991354b4123ee28df0c52f9eb30596e77bf"},this.notification.sub_title)),e("span",{key:"f905ce93aca773e9503219f7f2264aa0fa83c42e",class:"s-notifications-item-content-trailing"},e("i",{key:"1157ce0b35bdf20b3ed979dff44174282909c62c",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"a093a5e58f5d0455b9055d6c6e59483835294d96"},this.notification.date))))}};t.style="";export{t as salla_notification_item}