@salla.sa/twilight-components 2.14.573 → 2.14.574

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 (372) hide show
  1. package/dist/cjs/{Helper-N5wrs9vm.js → Helper-8U7zlpC3.js} +171 -117
  2. package/dist/cjs/{filepond-B2iMbV1F.js → filepond-BqzmHqFG.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-rXYiM_Ob.js → filepond-plugin-file-poster-Rc_hYm4g.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-BF5dedmz.js → filepond-plugin-file-validate-size-MQOyXwCH.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DJHYRny2.js → filepond-plugin-file-validate-type-0_gq-gig.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-BgtH5f4u.js → filepond-plugin-image-edit-DjWvYOF_.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C9JH8EBn.js → filepond-plugin-image-exif-orientation-BGNpJuyh.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CpSCiqfj.js → filepond-plugin-image-preview-BoPR2rRr.js} +1 -1
  9. package/dist/cjs/heart-ClVn_Co8.js +13 -0
  10. package/dist/cjs/{index-DpXwHFVO.js → index-BGm5j5Zj.js} +14 -10
  11. package/dist/cjs/index-CIbBkRPw.js +4413 -0
  12. package/dist/cjs/{intlTelInput-CdZOfaWd.js → intlTelInput-CIZvknP0.js} +1 -1
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  16. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  17. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  23. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +9 -4403
  26. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-gift-card-redeem.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  65. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  80. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-product-card.cjs.entry.js +5 -11
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  87. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  88. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +5 -6
  90. package/dist/cjs/salla-rating-modal.cjs.entry.js +5 -6
  91. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
  104. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  108. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  109. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +48 -0
  110. package/dist/cjs/{shipping-fast-CsqEQE78.js → star-tn5w5Um0.js} +8 -0
  111. package/dist/cjs/twilight.cjs.js +2 -2
  112. package/dist/cjs/{vanilla-picker-BT9OjZCy.js → vanilla-picker-BwaB87Xi.js} +1 -1
  113. package/dist/collection/Helpers/Helper.js +171 -117
  114. package/dist/collection/collection-manifest.json +2 -1
  115. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +8 -4
  116. package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +1 -1
  117. package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
  118. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.css +62 -0
  119. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.js +65 -0
  120. package/dist/components/Helper.js +171 -117
  121. package/dist/components/heart.js +11 -0
  122. package/dist/components/index.js +2 -2
  123. package/dist/components/index2.js +4322 -2471
  124. package/dist/components/index3.js +2553 -0
  125. package/dist/components/salla-bullet-delivery.js +44 -4438
  126. package/dist/components/salla-cart-summary.js +1 -1
  127. package/dist/components/salla-datetime-picker2.js +1 -1
  128. package/dist/components/salla-product-card2.js +4 -10
  129. package/dist/components/salla-rating-modal-v2.js +1 -1
  130. package/dist/components/salla-rating-modal-v22.js +9 -3
  131. package/dist/components/salla-rating-modal2.js +2 -3
  132. package/dist/components/salla-user-menu.js +2 -2
  133. package/dist/components/salla-wishlist-summary.d.ts +11 -0
  134. package/dist/components/salla-wishlist-summary.js +67 -0
  135. package/dist/esm/{Helper-Cql-WbqR.js → Helper-ivBHT_nn.js} +171 -117
  136. package/dist/esm/{filepond-BsuscqtG.js → filepond-DcoYtlMX.js} +1 -1
  137. package/dist/esm/{filepond-plugin-file-poster-DZ4ckjsP.js → filepond-plugin-file-poster-CBcS6Ln1.js} +1 -1
  138. package/dist/esm/{filepond-plugin-file-validate-size-BV6807xx.js → filepond-plugin-file-validate-size-HuNTwpc9.js} +1 -1
  139. package/dist/esm/{filepond-plugin-file-validate-type-cWCM2RqT.js → filepond-plugin-file-validate-type-BOjEfXdn.js} +1 -1
  140. package/dist/esm/{filepond-plugin-image-edit-aQvaKLxK.js → filepond-plugin-image-edit-BL7zREI5.js} +1 -1
  141. package/dist/esm/{filepond-plugin-image-exif-orientation-FgW7hBXK.js → filepond-plugin-image-exif-orientation-BJgL9era.js} +1 -1
  142. package/dist/esm/{filepond-plugin-image-preview-DxogdDqd.js → filepond-plugin-image-preview-DPUJHFk0.js} +1 -1
  143. package/dist/esm/heart-00vBRoH3.js +11 -0
  144. package/dist/esm/{index-DSEA3vdh.js → index-BXNtVhVe.js} +14 -10
  145. package/dist/esm/index-wXSgmenB.js +4404 -0
  146. package/dist/esm/{intlTelInput-BLEGv9EO.js → intlTelInput-wU6Kly2g.js} +1 -1
  147. package/dist/esm/loader.js +3 -3
  148. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  149. package/dist/esm/salla-accordion_6.entry.js +2 -2
  150. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  151. package/dist/esm/salla-advertisement.entry.js +1 -1
  152. package/dist/esm/salla-alert_2.entry.js +1 -1
  153. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  154. package/dist/esm/salla-applied-filters.entry.js +2 -2
  155. package/dist/esm/salla-apps-icons.entry.js +1 -1
  156. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  157. package/dist/esm/salla-badge.entry.js +1 -1
  158. package/dist/esm/salla-basket-gap.entry.js +1 -1
  159. package/dist/esm/salla-bullet-delivery_3.entry.js +53 -4447
  160. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  161. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  162. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  163. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  164. package/dist/esm/salla-comment-factors.entry.js +1 -1
  165. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  166. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  167. package/dist/esm/salla-contacts.entry.js +1 -1
  168. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  169. package/dist/esm/salla-count-down.entry.js +1 -1
  170. package/dist/esm/salla-custom-fields.entry.js +1 -1
  171. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  172. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  173. package/dist/esm/salla-filters-widget.entry.js +2 -2
  174. package/dist/esm/salla-filters.entry.js +2 -2
  175. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  176. package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
  177. package/dist/esm/salla-gifting.entry.js +1 -1
  178. package/dist/esm/salla-hook.entry.js +1 -1
  179. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  180. package/dist/esm/salla-installment.entry.js +1 -1
  181. package/dist/esm/salla-list-tile.entry.js +1 -1
  182. package/dist/esm/salla-localization-modal.entry.js +1 -1
  183. package/dist/esm/salla-login-modal.entry.js +1 -1
  184. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  186. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  187. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  188. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  189. package/dist/esm/salla-loyalty.entry.js +1 -1
  190. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  191. package/dist/esm/salla-map_3.entry.js +1 -1
  192. package/dist/esm/salla-menu.entry.js +1 -1
  193. package/dist/esm/salla-metadata.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  195. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  196. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  197. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  198. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  199. package/dist/esm/salla-offer-modal.entry.js +1 -1
  200. package/dist/esm/salla-offer.entry.js +1 -1
  201. package/dist/esm/salla-order-branch.entry.js +1 -1
  202. package/dist/esm/salla-order-cancel.entry.js +1 -1
  203. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  204. package/dist/esm/salla-order-details-options.entry.js +1 -1
  205. package/dist/esm/salla-order-details.entry.js +1 -1
  206. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  207. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  208. package/dist/esm/salla-order-edit.entry.js +1 -1
  209. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  210. package/dist/esm/salla-order-shipments.entry.js +1 -1
  211. package/dist/esm/salla-order-summary.entry.js +1 -1
  212. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  213. package/dist/esm/salla-orders.entry.js +2 -2
  214. package/dist/esm/salla-payments.entry.js +1 -1
  215. package/dist/esm/salla-placeholder.entry.js +1 -1
  216. package/dist/esm/salla-price-range.entry.js +1 -1
  217. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  218. package/dist/esm/salla-product-card.entry.js +2 -8
  219. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  220. package/dist/esm/salla-products-list.entry.js +2 -2
  221. package/dist/esm/salla-products-slider.entry.js +2 -2
  222. package/dist/esm/salla-quick-order.entry.js +1 -1
  223. package/dist/esm/salla-rating-modal-v2.entry.js +3 -4
  224. package/dist/esm/salla-rating-modal.entry.js +3 -4
  225. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  226. package/dist/esm/salla-review-order-item.entry.js +1 -1
  227. package/dist/esm/salla-scopes.entry.js +1 -1
  228. package/dist/esm/salla-search-product-card.entry.js +1 -1
  229. package/dist/esm/salla-search.entry.js +1 -1
  230. package/dist/esm/salla-skeleton.entry.js +1 -1
  231. package/dist/esm/salla-social-share.entry.js +1 -1
  232. package/dist/esm/salla-social.entry.js +1 -1
  233. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  234. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  235. package/dist/esm/salla-tooltip.entry.js +1 -1
  236. package/dist/esm/salla-trust-badges.entry.js +1 -1
  237. package/dist/esm/salla-user-menu.entry.js +5 -5
  238. package/dist/esm/salla-user-profile.entry.js +1 -1
  239. package/dist/esm/salla-user-settings.entry.js +1 -1
  240. package/dist/esm/salla-verify.entry.js +1 -1
  241. package/dist/esm/salla-wallet.entry.js +1 -1
  242. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  243. package/dist/esm/salla-wishlist-summary.entry.js +46 -0
  244. package/dist/esm/{shipping-fast-lMgMt31Q.js → star-cq6TcfoH.js} +8 -1
  245. package/dist/esm/twilight.js +3 -3
  246. package/dist/esm/{vanilla-picker-BpgJFvog.js → vanilla-picker-CFcUgW74.js} +1 -1
  247. package/dist/twilight/p-00vBRoH3.js +4 -0
  248. package/dist/twilight/{p-035b561c.entry.js → p-02eccebc.entry.js} +1 -1
  249. package/dist/twilight/p-043b2382.entry.js +4 -0
  250. package/dist/twilight/{p-2304f0a4.entry.js → p-0a135b25.entry.js} +1 -1
  251. package/dist/twilight/{p-5d41dc4e.entry.js → p-0bcaa1af.entry.js} +1 -1
  252. package/dist/twilight/{p-bbb72d38.entry.js → p-0d18b6f2.entry.js} +1 -1
  253. package/dist/twilight/p-12822eba.entry.js +4 -0
  254. package/dist/twilight/{p-82455313.entry.js → p-16b9ea73.entry.js} +1 -1
  255. package/dist/twilight/{p-5d0fd545.entry.js → p-1853b5ba.entry.js} +1 -1
  256. package/dist/twilight/p-1a4028e2.entry.js +4 -0
  257. package/dist/twilight/{p-010fa509.entry.js → p-1bcacd6b.entry.js} +1 -1
  258. package/dist/twilight/{p-f306bfe3.entry.js → p-1ea4c8e4.entry.js} +1 -1
  259. package/dist/twilight/{p-e5bb52fb.entry.js → p-22087f33.entry.js} +1 -1
  260. package/dist/twilight/{p-5d97cf2d.entry.js → p-23540811.entry.js} +1 -1
  261. package/dist/twilight/{p-3c665085.entry.js → p-2e08cf78.entry.js} +1 -1
  262. package/dist/twilight/{p-4a3701ca.entry.js → p-2ee3c58e.entry.js} +1 -1
  263. package/dist/twilight/{p-901217bc.entry.js → p-38806031.entry.js} +1 -1
  264. package/dist/twilight/{p-d654b4b0.entry.js → p-3ae64529.entry.js} +1 -1
  265. package/dist/twilight/{p-f173ada5.entry.js → p-3e7a7eb0.entry.js} +1 -1
  266. package/dist/twilight/{p-3eb55e32.entry.js → p-43124a9d.entry.js} +1 -1
  267. package/dist/twilight/{p-7afeb088.entry.js → p-44899fd8.entry.js} +1 -1
  268. package/dist/twilight/{p-c15d08ae.entry.js → p-4563fd77.entry.js} +1 -1
  269. package/dist/twilight/{p-276171ac.entry.js → p-48f47f92.entry.js} +1 -1
  270. package/dist/twilight/{p-b6ece925.entry.js → p-50a88286.entry.js} +1 -1
  271. package/dist/twilight/{p-6fb16543.entry.js → p-52c31b1a.entry.js} +1 -1
  272. package/dist/twilight/{p-77dc1637.entry.js → p-565eda17.entry.js} +1 -1
  273. package/dist/twilight/p-6142183b.entry.js +4 -0
  274. package/dist/twilight/{p-909ae4c5.entry.js → p-6210a661.entry.js} +1 -1
  275. package/dist/twilight/{p-69e8750f.entry.js → p-6665f42e.entry.js} +1 -1
  276. package/dist/twilight/{p-e0b085e4.entry.js → p-6b378bcd.entry.js} +1 -1
  277. package/dist/twilight/{p-75652fd4.entry.js → p-6d56ebac.entry.js} +1 -1
  278. package/dist/twilight/{p-6904ad04.entry.js → p-6fe398ae.entry.js} +1 -1
  279. package/dist/twilight/{p-aadeb35a.entry.js → p-70147959.entry.js} +1 -1
  280. package/dist/twilight/{p-09e126b0.entry.js → p-70eaceea.entry.js} +1 -1
  281. package/dist/twilight/{p-1f1dda08.entry.js → p-71ec3f8a.entry.js} +1 -1
  282. package/dist/twilight/p-747153bc.entry.js +4 -0
  283. package/dist/twilight/{p-4944d10a.entry.js → p-76403e24.entry.js} +1 -1
  284. package/dist/twilight/{p-77323c2a.entry.js → p-78a84f80.entry.js} +1 -1
  285. package/dist/twilight/p-79f495b7.entry.js +4 -0
  286. package/dist/twilight/{p-e5c07741.entry.js → p-7a099b00.entry.js} +1 -1
  287. package/dist/twilight/{p-51434773.entry.js → p-817cfe1a.entry.js} +1 -1
  288. package/dist/twilight/{p-6a605835.entry.js → p-853b2efe.entry.js} +1 -1
  289. package/dist/twilight/{p-4a447633.entry.js → p-8666489e.entry.js} +1 -1
  290. package/dist/twilight/{p-9fe36a97.entry.js → p-88f762de.entry.js} +1 -1
  291. package/dist/twilight/{p-1acd987a.entry.js → p-8e114c27.entry.js} +1 -1
  292. package/dist/twilight/{p-b1c21e5c.entry.js → p-8f3642d1.entry.js} +1 -1
  293. package/dist/twilight/{p-db53fade.entry.js → p-900f78b6.entry.js} +1 -1
  294. package/dist/twilight/{p-7e0698c6.entry.js → p-90aa29f3.entry.js} +1 -1
  295. package/dist/twilight/{p-5329003d.entry.js → p-91e4594d.entry.js} +1 -1
  296. package/dist/twilight/{p-84ec7be7.entry.js → p-9282b995.entry.js} +1 -1
  297. package/dist/twilight/{p-06419603.entry.js → p-98137b26.entry.js} +1 -1
  298. package/dist/twilight/{p-62a44e65.entry.js → p-987a75aa.entry.js} +1 -1
  299. package/dist/twilight/{p-3c5e2710.entry.js → p-9979ada5.entry.js} +1 -1
  300. package/dist/twilight/{p-d9be4036.entry.js → p-9cca8055.entry.js} +1 -1
  301. package/dist/twilight/{p-3040407e.entry.js → p-9d667925.entry.js} +1 -1
  302. package/dist/twilight/{p-8ae70528.entry.js → p-9dfe1ec1.entry.js} +1 -1
  303. package/dist/twilight/{p-0764c46b.entry.js → p-9f23104d.entry.js} +1 -1
  304. package/dist/twilight/{p-WgGO2Pjy.js → p-BFib9jF0.js} +1 -1
  305. package/dist/twilight/{p-DSEA3vdh.js → p-BXNtVhVe.js} +2 -2
  306. package/dist/twilight/{p-VBuS91fQ.js → p-BpnCDmiM.js} +1 -1
  307. package/dist/twilight/{p-B3sbQMcp.js → p-C3JsXKHY.js} +1 -1
  308. package/dist/twilight/{p-BZt79QeE.js → p-CDojVREu.js} +1 -1
  309. package/dist/twilight/{p-DDcSXlpO.js → p-CMcDoqmG.js} +1 -1
  310. package/dist/twilight/{p-BF2su8FM.js → p-COQlWLWv.js} +1 -1
  311. package/dist/twilight/{p-Bj6lP8RV.js → p-CPkPdW2Q.js} +1 -1
  312. package/dist/twilight/p-CbVZf-Q4.js +4 -0
  313. package/dist/twilight/{p-Bt0GXtZG.js → p-D9StCBh9.js} +2 -2
  314. package/dist/twilight/p-DI6PJLEJ.js +1024 -0
  315. package/dist/twilight/{p-6cc3e44d.entry.js → p-a0c5bc92.entry.js} +1 -1
  316. package/dist/twilight/{p-c419a909.entry.js → p-a34258d2.entry.js} +1 -1
  317. package/dist/twilight/{p-1063f3d1.entry.js → p-a57e299a.entry.js} +1 -1
  318. package/dist/twilight/{p-89ed6dbc.entry.js → p-a581c552.entry.js} +1 -1
  319. package/dist/twilight/{p-0b514a47.entry.js → p-ab97de5d.entry.js} +1 -1
  320. package/dist/twilight/{p-901a961f.entry.js → p-ac2926d9.entry.js} +1 -1
  321. package/dist/twilight/{p-dd3aacf3.entry.js → p-aec3d7ce.entry.js} +1 -1
  322. package/dist/twilight/{p-663aa63b.entry.js → p-b0671070.entry.js} +1 -1
  323. package/dist/twilight/{p-e90a201a.entry.js → p-b0ff401e.entry.js} +1 -1
  324. package/dist/twilight/{p-ad930532.entry.js → p-b11508cb.entry.js} +1 -1
  325. package/dist/twilight/{p-5c863789.entry.js → p-b5329852.entry.js} +1 -1
  326. package/dist/twilight/{p-DdScDjtA.js → p-b84FyDqk.js} +1 -1
  327. package/dist/twilight/{p-bb2170ac.entry.js → p-bb0bc7ed.entry.js} +1 -1
  328. package/dist/twilight/{p-68aecf40.entry.js → p-bc2203b6.entry.js} +1 -1
  329. package/dist/twilight/{p-bc0f3f06.entry.js → p-bd89bcf5.entry.js} +1 -1
  330. package/dist/twilight/{p-d1c973ce.entry.js → p-bdb558a2.entry.js} +1 -1
  331. package/dist/twilight/{p-b3063b70.entry.js → p-bee482ce.entry.js} +1 -1
  332. package/dist/twilight/{p-f919f0b5.entry.js → p-c0c23759.entry.js} +1 -1
  333. package/dist/twilight/{p-6be347e5.entry.js → p-c163a216.entry.js} +1 -1
  334. package/dist/twilight/{p-ec341307.entry.js → p-c5f087a3.entry.js} +1 -1
  335. package/dist/twilight/{p-5b949ccc.entry.js → p-c67dcc94.entry.js} +1 -1
  336. package/dist/twilight/{p-lMgMt31Q.js → p-cq6TcfoH.js} +1 -1
  337. package/dist/twilight/{p-78ee03f8.entry.js → p-d1520e68.entry.js} +1 -1
  338. package/dist/twilight/{p-54c36ba4.entry.js → p-d365bd72.entry.js} +1 -1
  339. package/dist/twilight/{p-2c07e8ac.entry.js → p-d702af41.entry.js} +1 -1
  340. package/dist/twilight/{p-3b3a1c87.entry.js → p-dbd9523b.entry.js} +1 -1
  341. package/dist/twilight/{p-4557e342.entry.js → p-dc9b9ef7.entry.js} +1 -1
  342. package/dist/twilight/{p-47b1aa89.entry.js → p-de3eeec4.entry.js} +1 -1
  343. package/dist/twilight/{p-e676c627.entry.js → p-dedfcc58.entry.js} +1 -1
  344. package/dist/twilight/{p-66561f9e.entry.js → p-e50b99cb.entry.js} +1 -1
  345. package/dist/twilight/{p-6cdc7f8a.entry.js → p-e6233f15.entry.js} +1 -1
  346. package/dist/twilight/{p-457a256d.entry.js → p-e63f5b80.entry.js} +1 -1
  347. package/dist/twilight/{p-8f2b2e42.entry.js → p-e77d6649.entry.js} +1 -1
  348. package/dist/twilight/{p-855a9db7.entry.js → p-e9cc9f4f.entry.js} +1 -1
  349. package/dist/twilight/{p-6e43f8a7.entry.js → p-eccd8aa9.entry.js} +1 -1
  350. package/dist/twilight/{p-a89fb313.entry.js → p-f174afea.entry.js} +1 -1
  351. package/dist/twilight/{p-360b6388.entry.js → p-f4583bb2.entry.js} +1 -1
  352. package/dist/twilight/{p-fc6adc90.entry.js → p-f48ada4a.entry.js} +1 -1
  353. package/dist/twilight/{p-b414760b.entry.js → p-f583571c.entry.js} +1 -1
  354. package/dist/twilight/{p-fac05e8f.entry.js → p-f7e38710.entry.js} +1 -1
  355. package/dist/twilight/{p-2733e78f.entry.js → p-fc0a3c91.entry.js} +1 -1
  356. package/dist/twilight/{p-61580839.entry.js → p-fd6aed5e.entry.js} +1 -1
  357. package/dist/twilight/twilight.esm.js +1 -1
  358. package/dist/types/Helpers/Helper.d.ts +14 -12
  359. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +0 -1
  360. package/dist/types/components/salla-wishlist-summary/salla-wishlist-summary.d.ts +18 -0
  361. package/dist/types/components.d.ts +45 -0
  362. package/package.json +5 -5
  363. package/dist/cjs/star-DMzrN05M.js +0 -13
  364. package/dist/components/star.js +0 -11
  365. package/dist/esm/star-CeFAfcTv.js +0 -11
  366. package/dist/twilight/p-5a86a794.entry.js +0 -4
  367. package/dist/twilight/p-8ed45c28.entry.js +0 -4
  368. package/dist/twilight/p-CUSw0W26.js +0 -4
  369. package/dist/twilight/p-CeFAfcTv.js +0 -4
  370. package/dist/twilight/p-b98ae2c1.entry.js +0 -4
  371. package/dist/twilight/p-e91bba7e.entry.js +0 -1024
  372. package/dist/twilight/p-f10fca84.entry.js +0 -4
@@ -6,6 +6,14 @@ import anime from "animejs";
6
6
  //TODO::reduce it to 10
7
7
  salla.event.setMaxListeners(100);
8
8
  class Helper {
9
+ constructor() {
10
+ this.plans = {
11
+ 0: 'basic',
12
+ 25: 'plus',
13
+ 50: 'pro',
14
+ 100: 'special',
15
+ };
16
+ }
9
17
  setIncludes(includes) {
10
18
  this.includes = includes;
11
19
  return this;
@@ -19,7 +27,9 @@ class Helper {
19
27
  return this;
20
28
  }
21
29
  toggleClassIf(selector, classes1, classes2, callback) {
22
- document.querySelectorAll(selector).forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));
30
+ document
31
+ .querySelectorAll(selector)
32
+ .forEach(element => this.toggleElementClassIf(element, classes1, classes2, callback));
23
33
  return this;
24
34
  }
25
35
  isValidEmail(email) {
@@ -28,7 +38,7 @@ class Helper {
28
38
  }
29
39
  filterEmojies(text) {
30
40
  var characterFilter = /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;
31
- return text.replace(characterFilter, "");
41
+ return text.replace(characterFilter, '');
32
42
  }
33
43
  debounce(fn, ...data) {
34
44
  if (!this.debounce_) {
@@ -38,7 +48,7 @@ class Helper {
38
48
  return this.debounce_(fn, ...data);
39
49
  }
40
50
  getProductsSource(source) {
41
- return {
51
+ return ({
42
52
  'brands.single': 'brands',
43
53
  'product.index': 'categories',
44
54
  'product.index.latest': 'latest',
@@ -49,23 +59,25 @@ class Helper {
49
59
  'product.index.tag': 'tags',
50
60
  'product.index.sales': 'sales',
51
61
  'components.most_sales_products': 'sales', //temporary, delete it after two days from now
52
- }[source || salla.config.get('page.slug')] || source || 'latest';
62
+ }[source || salla.config.get('page.slug')] ||
63
+ source ||
64
+ 'latest');
53
65
  }
54
66
  getApiSource(source) {
55
- const apiSourceMap = { 'recently': 'selected' };
67
+ const apiSourceMap = { recently: 'selected' };
56
68
  return apiSourceMap[source] || source;
57
69
  }
58
70
  getPageTitleForSource(source) {
59
71
  source = {
60
- 'brands': 'common.titles.brands',
72
+ brands: 'common.titles.brands',
61
73
  // 'categories':'',
62
- 'latest': 'blocks.home.latest_products',
63
- 'offers': 'common.titles.discounts',
64
- 'reorder': 'common.titles.products',
74
+ latest: 'blocks.home.latest_products',
75
+ offers: 'common.titles.discounts',
76
+ reorder: 'common.titles.products',
65
77
  // 'search':'',
66
78
  // 'landing-page':'',
67
79
  // 'tags':'',
68
- 'sales': 'common.titles.most_sales',
80
+ sales: 'common.titles.most_sales',
69
81
  }[source];
70
82
  return source ? salla.lang.get(source) : '';
71
83
  }
@@ -150,12 +162,13 @@ class Helper {
150
162
  resolveFilterLabels(filters) {
151
163
  return filters.map((filter) => {
152
164
  const resolved = { ...filter };
153
- resolved.label = {
154
- category_id: salla.lang.get('common.titles.categories'),
155
- brand_id: salla.lang.get('common.titles.brands'),
156
- rating: salla.lang.get('pages.categories.filter_rating'),
157
- price: salla.lang.get('pages.categories.filter_price'),
158
- }[resolved.key] || resolved.label;
165
+ resolved.label =
166
+ {
167
+ category_id: salla.lang.get('common.titles.categories'),
168
+ brand_id: salla.lang.get('common.titles.brands'),
169
+ rating: salla.lang.get('pages.categories.filter_rating'),
170
+ price: salla.lang.get('pages.categories.filter_price'),
171
+ }[resolved.key] || resolved.label;
159
172
  if (resolved.key == 'rating') {
160
173
  resolved.type = FilterOptionTypes.VALUES;
161
174
  //@ts-ignore
@@ -292,92 +305,102 @@ class Helper {
292
305
  scriptElement.type = 'application/ld+json';
293
306
  // TODO: This json object MIGHT need mode data or properties.
294
307
  const jsonData = {
295
- "@context": "http://schema.org",
296
- "@type": "Product",
297
- "name": product?.name,
298
- "image": product?.image?.url || product?.thumbnail,
299
- "description": product?.description,
300
- "brand": {
301
- "@type": "Brand",
302
- "logo": product?.brand?.logo
308
+ '@context': 'http://schema.org',
309
+ '@type': 'Product',
310
+ name: product?.name,
311
+ image: product?.image?.url || product?.thumbnail,
312
+ description: product?.description,
313
+ brand: {
314
+ '@type': 'Brand',
315
+ logo: product?.brand?.logo,
316
+ },
317
+ offers: {
318
+ '@type': 'Offer',
319
+ price: product?.price,
303
320
  },
304
- "offers": {
305
- "@type": "Offer",
306
- "price": product?.price
307
- }
308
321
  };
309
322
  scriptElement.text = JSON.stringify(jsonData);
310
323
  return scriptElement;
311
324
  }
312
325
  createProductSchema(product, position) {
313
326
  let ProductSchema = {
314
- "productID": `${product.id}`,
315
- "@type": 'Product',
316
- "name": product.name,
317
- "url": product.url,
318
- "image": product.image.url || product.image,
319
- "description": product.description || product.subtitle || product.name,
327
+ productID: `${product.id}`,
328
+ '@type': 'Product',
329
+ name: product.name,
330
+ url: product.url,
331
+ image: product.image.url || product.image,
332
+ description: product.description || product.subtitle || product.name,
320
333
  // Add SKU only if valid
321
- ...(product.sku && product.sku.length > 0 && {
322
- "sku": product.sku
334
+ ...(product.sku &&
335
+ product.sku.length > 0 && {
336
+ sku: product.sku,
323
337
  }),
324
- "offers": {
325
- "@type": "Offer",
326
- "url": product.url,
327
- "priceCurrency": product.currency,
328
- "price": product.price,
329
- "itemCondition": "NewCondition",
330
- "availability": product.is_available ? "InStock" : "OutOfStock",
338
+ offers: {
339
+ '@type': 'Offer',
340
+ url: product.url,
341
+ priceCurrency: product.currency,
342
+ price: product.price,
343
+ itemCondition: 'NewCondition',
344
+ availability: product.is_available ? 'InStock' : 'OutOfStock',
331
345
  //if there is no product.discount_ends, will set it to be valid until the end of this week
332
- "priceValidUntil": product.discount_ends || (new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0]),
333
- "priceSpecification": {
334
- "@type": "PriceSpecification",
335
- "price": product.regular_price,
336
- "priceCurrency": product.currency,
337
- "valueAddedTaxIncluded": product.is_taxable,
346
+ priceValidUntil: product.discount_ends ||
347
+ new Date(new Date().setDate(new Date().getDate() + 7)).toISOString().split('T')[0],
348
+ priceSpecification: {
349
+ '@type': 'PriceSpecification',
350
+ price: product.regular_price,
351
+ priceCurrency: product.currency,
352
+ valueAddedTaxIncluded: product.is_taxable,
338
353
  },
339
- "seller": {
340
- "@type": "Organization",
341
- "name": salla.config.get('store.name'),
354
+ seller: {
355
+ '@type': 'Organization',
356
+ name: salla.config.get('store.name'),
342
357
  },
343
- "shippingDetails": {
344
- "@type": "OfferShippingDetails",
345
- "shippingRate": {
346
- "@type": "MonetaryAmount",
347
- "value": "0",
348
- "currency": product.currency || "SAR"
358
+ shippingDetails: {
359
+ '@type': 'OfferShippingDetails',
360
+ shippingRate: {
361
+ '@type': 'MonetaryAmount',
362
+ value: '0',
363
+ currency: product.currency || 'SAR',
349
364
  },
350
- "deliveryTime": {
351
- "@type": "ShippingDeliveryTime",
352
- "businessDays": {
353
- "@type": "OpeningHoursSpecification",
354
- "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
365
+ deliveryTime: {
366
+ '@type': 'ShippingDeliveryTime',
367
+ businessDays: {
368
+ '@type': 'OpeningHoursSpecification',
369
+ dayOfWeek: [
370
+ 'Monday',
371
+ 'Tuesday',
372
+ 'Wednesday',
373
+ 'Thursday',
374
+ 'Friday',
375
+ 'Saturday',
376
+ 'Sunday',
377
+ ],
355
378
  },
356
- "cutoffTime": "14:00"
357
- }
379
+ cutoffTime: '14:00',
380
+ },
358
381
  },
359
- "hasMerchantReturnPolicy": {
360
- "@type": "MerchantReturnPolicy",
361
- "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
362
- "merchantReturnDays": 30,
363
- "returnMethod": "https://schema.org/ReturnByMail",
364
- "returnFees": "https://schema.org/FreeReturn"
365
- }
366
- }
382
+ hasMerchantReturnPolicy: {
383
+ '@type': 'MerchantReturnPolicy',
384
+ returnPolicyCategory: 'https://schema.org/MerchantReturnFiniteReturnWindow',
385
+ merchantReturnDays: 30,
386
+ returnMethod: 'https://schema.org/ReturnByMail',
387
+ returnFees: 'https://schema.org/FreeReturn',
388
+ },
389
+ },
367
390
  };
368
391
  //@ts-ignore
369
392
  if (product.rating?.stars) {
370
393
  ProductSchema.aggregateRating = {
371
- "@type": "AggregateRating",
394
+ '@type': 'AggregateRating',
372
395
  //@ts-ignore
373
- "ratingValue": product.rating.stars,
374
- "reviewCount": product.rating.count,
396
+ ratingValue: product.rating.stars,
397
+ reviewCount: product.rating.count,
375
398
  };
376
399
  }
377
400
  return {
378
- "@type": "ListItem",
379
- "position": position,
380
- "item": ProductSchema,
401
+ '@type': 'ListItem',
402
+ position: position,
403
+ item: ProductSchema,
381
404
  };
382
405
  }
383
406
  generateProductSchema(productList) {
@@ -390,21 +413,21 @@ class Helper {
390
413
  script.type = 'application/ld+json';
391
414
  script.id = schemaId;
392
415
  const schema = {
393
- "@context": "https://schema.org",
394
- "@type": "ItemList",
395
- "name": salla.config.get('page.title'),
396
- "itemListElement": productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),
416
+ '@context': 'https://schema.org',
417
+ '@type': 'ItemList',
418
+ name: salla.config.get('page.title'),
419
+ itemListElement: productList.map((product, indxe) => this.createProductSchema(product, indxe + 1)),
397
420
  };
398
421
  script.textContent = JSON.stringify(schema);
399
422
  document.head.appendChild(script);
400
423
  }
401
424
  /**
402
- * Format date in the form of `Monday 13 November 2023`
403
- */
425
+ * Format date in the form of `Monday 13 November 2023`
426
+ */
404
427
  formatDateFromString(dateString, numberCb, lang = 'en') {
405
428
  const errors = {
406
- en: "Invalid Date",
407
- ar: "تاريخ غير صالح"
429
+ en: 'Invalid Date',
430
+ ar: 'تاريخ غير صالح',
408
431
  };
409
432
  // Check if dateString exists and is not empty
410
433
  if (!dateString || typeof dateString !== 'string' || dateString.trim() === '') {
@@ -427,11 +450,37 @@ class Helper {
427
450
  }
428
451
  const daysOfWeek = {
429
452
  en: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
430
- ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت']
453
+ ar: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
431
454
  };
432
455
  const months = {
433
- en: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
434
- ar: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر']
456
+ en: [
457
+ 'January',
458
+ 'February',
459
+ 'March',
460
+ 'April',
461
+ 'May',
462
+ 'June',
463
+ 'July',
464
+ 'August',
465
+ 'September',
466
+ 'October',
467
+ 'November',
468
+ 'December',
469
+ ],
470
+ ar: [
471
+ 'يناير',
472
+ 'فبراير',
473
+ 'مارس',
474
+ 'أبريل',
475
+ 'مايو',
476
+ 'يونيو',
477
+ 'يوليو',
478
+ 'أغسطس',
479
+ 'سبتمبر',
480
+ 'أكتوبر',
481
+ 'نوفمبر',
482
+ 'ديسمبر',
483
+ ],
435
484
  };
436
485
  const dayOfWeek = daysOfWeek[lang][dateObject.getDay()];
437
486
  const dayOfMonth = numberCb(dateObject.getDate(), lang === 'en');
@@ -440,14 +489,15 @@ class Helper {
440
489
  return `${dayOfWeek} ${dayOfMonth} ${month} ${year}`;
441
490
  }
442
491
  /**
443
- * Copy text into clipboard.
444
- * @param event
445
- */
492
+ * Copy text into clipboard.
493
+ * @param event
494
+ */
446
495
  copyToClipboard(event) {
447
496
  // Get the text content from the clicked div
448
497
  var textToCopy = event.target.innerText;
449
498
  // Use the Clipboard API to copy text to the clipboard
450
- navigator.clipboard.writeText(textToCopy)
499
+ navigator.clipboard
500
+ .writeText(textToCopy)
451
501
  .then(() => {
452
502
  console.log('Text copied to clipboard: ' + textToCopy);
453
503
  })
@@ -471,38 +521,38 @@ class Helper {
471
521
  items.forEach((item) => {
472
522
  item.classList.add('animated');
473
523
  });
474
- }
524
+ },
475
525
  });
476
526
  }
477
527
  createReviewObject(reviewData) {
478
528
  return {
479
- "@type": "Review",
480
- "author": { "@type": "Person", "name": reviewData.name },
529
+ '@type': 'Review',
530
+ author: { '@type': 'Person', name: reviewData.name },
481
531
  // "datePublished": reviewData.date * 1000,
482
- "reviewBody": reviewData.content,
483
- "reviewRating": {
484
- "@type": "Rating",
485
- "bestRating": "5",
486
- "ratingValue": reviewData.stars,
487
- "worstRating": "1"
488
- }
532
+ reviewBody: reviewData.content,
533
+ reviewRating: {
534
+ '@type': 'Rating',
535
+ bestRating: '5',
536
+ ratingValue: reviewData.stars,
537
+ worstRating: '1',
538
+ },
489
539
  };
490
540
  }
491
541
  generateReviewSchema(reviews) {
492
542
  const script = document.createElement('script');
493
543
  script.type = 'application/ld+json';
494
544
  const schema = {
495
- "@context": "http://schema.org/",
496
- "@type": "Store",
497
- "name": salla.config.get('store.name'),
498
- "url": salla.config.get('store.url'),
499
- "address": "الرياض",
500
- "review": reviews.map((review) => this.createReviewObject(review)),
501
- "aggregateRating": {
502
- "@type": "AggregateRating",
503
- "ratingValue": reviews.reduce((acc, review) => acc + review.stars, 0) / reviews.length,
504
- "reviewCount": reviews.length
505
- }
545
+ '@context': 'http://schema.org/',
546
+ '@type': 'Store',
547
+ name: salla.config.get('store.name'),
548
+ url: salla.config.get('store.url'),
549
+ address: 'الرياض',
550
+ review: reviews.map(review => this.createReviewObject(review)),
551
+ aggregateRating: {
552
+ '@type': 'AggregateRating',
553
+ ratingValue: reviews.reduce((acc, review) => acc + review.stars, 0) / reviews.length,
554
+ reviewCount: reviews.length,
555
+ },
506
556
  };
507
557
  script.textContent = JSON.stringify(schema);
508
558
  document.head.appendChild(script);
@@ -526,11 +576,15 @@ class Helper {
526
576
  if (Number.isNaN(id))
527
577
  return;
528
578
  const added = salla.wishlist.api.has(id);
529
- card.querySelectorAll('.s-product-card-wishlist-btn, .btn--wishlist').forEach((btn) => {
579
+ card.querySelectorAll('.s-product-card-wishlist-btn, .btn--wishlist').forEach(btn => {
530
580
  btn.classList.toggle('s-product-card-wishlist-added', added);
531
581
  btn.classList.toggle('wishlist-added', added);
532
582
  });
533
583
  });
534
584
  }
585
+ getPlanName() {
586
+ const ray = Number(salla.config.get('store.ray'));
587
+ return ray in this.plans ? this.plans[ray] : undefined;
588
+ }
535
589
  }
536
- export default new Helper;
590
+ export default new Helper();
@@ -140,7 +140,8 @@
140
140
  "components/salla-verified-review/salla-verified-review.js",
141
141
  "components/salla-verify/salla-verify.js",
142
142
  "components/salla-wallet/salla-wallet.js",
143
- "components/salla-wishlist-actions/salla-wishlist-actions.js"
143
+ "components/salla-wishlist-actions/salla-wishlist-actions.js",
144
+ "components/salla-wishlist-summary/salla-wishlist-summary.js"
144
145
  ],
145
146
  "compiler": {
146
147
  "name": "@stencil/core",
@@ -8,8 +8,6 @@ const BRANCH_SEARCH_DEBOUNCE_MS = 1000;
8
8
  const GEOLOCATION_TIMEOUT = 10000;
9
9
  /** Final fallback center used only if `user.default_geo_location` is absent (Riyadh — matches checkout map-page). */
10
10
  const DEFAULT_MAP_CENTER = { lat: 24.7756042, lng: 46.7360729 };
11
- import "@salla.sa/ui-google-map-render";
12
- import { load } from "@salla.sa/ui-google-map-render";
13
11
  import GetDirections from "../../assets/svg/get-directions.svg";
14
12
  import GPS from "../../assets/svg/gps.svg";
15
13
  import LocationTag from "../../assets/svg/location-tag.svg";
@@ -1231,11 +1229,17 @@ export class SallaBulletDelivery {
1231
1229
  try {
1232
1230
  const mapsKey = salla.config.get('store.settings.keys.maps');
1233
1231
  if (mapsKey) {
1234
- load({
1232
+ const bootMaps = () => import('@salla.sa/ui-google-map-render')
1233
+ .then(({ load }) => load({
1235
1234
  key: mapsKey,
1236
1235
  libraries: ['marker', 'places'],
1237
1236
  language: salla.config.get('user.language_code') || 'ar',
1238
- }).catch(err => log('Failed to load Google Maps SDK', err));
1237
+ }))
1238
+ .catch(err => log('Failed to load Google Maps SDK', err));
1239
+ if (document.readyState === 'complete')
1240
+ bootMaps();
1241
+ else
1242
+ window.addEventListener('load', bootMaps, { once: true });
1239
1243
  }
1240
1244
  this.addressToken = await bulletDeliveryAPI.getAddressToken();
1241
1245
  }
@@ -33,7 +33,7 @@
33
33
  background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1));
34
34
  padding: 0.25rem;
35
35
  font-size: 0.75rem;
36
- line-height: 1rem;
36
+ line-height: 1.25rem;
37
37
  --tw-text-opacity: 1;
38
38
  color: rgb(255 255 255 / var(--tw-text-opacity, 1))
39
39
  }
@@ -7,7 +7,7 @@ import ArrowDown from "../../assets/svg/keyboard_arrow_down.svg";
7
7
  import BellRing from "../../assets/svg/bell-ring.svg";
8
8
  import OrderIcon from "../../assets/svg/box-bankers.svg";
9
9
  import PendingOrdersIcon from "../../assets/svg/cart.svg";
10
- import WishListIcon from "../../assets/svg/star.svg";
10
+ import WishListIcon from "../../assets/svg/heart.svg";
11
11
  import ProfileIcon from "../../assets/svg/user-circle.svg";
12
12
  import LogoutIcon from "../../assets/svg/send-out.svg";
13
13
  import Cancel from "../../assets/svg/cancel.svg";
@@ -0,0 +1,62 @@
1
+ /*!twlt*/:host {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ margin-inline-start: 1rem;
5
+ }
6
+ .hidden {
7
+ display: none;
8
+ }
9
+ .s-wishlist-summary-wrapper {
10
+ position: relative;
11
+ margin-inline-start: 0.75rem;
12
+ display: inline-flex;
13
+ align-items: center;
14
+ border-style: none;
15
+ text-decoration-line: none;
16
+ outline: 2px solid transparent;
17
+ outline-offset: 2px;
18
+ transition-property: opacity;
19
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
20
+ transition-duration: 200ms;
21
+ }
22
+ .s-wishlist-summary-wrapper:hover {
23
+ opacity: 0.8;
24
+ }
25
+ .s-wishlist-summary-icon {
26
+ display: inline-flex;
27
+ height: 2.5rem;
28
+ width: 2.5rem;
29
+ align-items: center;
30
+ justify-content: center;
31
+ border-radius: 9999px;
32
+ border-width: 1px;
33
+ border-color: var(--color-border,#e5e7eb);
34
+ color: var(--color-text-primary,#374151);
35
+ }
36
+ .s-wishlist-summary-icon svg {
37
+ height: 1.25rem;
38
+ width: 1.25rem;
39
+ fill: currentColor;
40
+ }
41
+ .s-wishlist-summary-count {
42
+ position: absolute;
43
+ top: -4px;
44
+ left: -6px;
45
+ display: inline-flex;
46
+ height: 1.25rem;
47
+ width: 1.25rem;
48
+ align-items: center;
49
+ justify-content: center;
50
+ border-radius: 9999px;
51
+ --tw-bg-opacity: 1;
52
+ background-color: rgb(248 113 113 / var(--tw-bg-opacity, 1));
53
+ padding: 0.25rem;
54
+ font-size: 0.75rem;
55
+ line-height: 1.25rem;
56
+ --tw-text-opacity: 1;
57
+ color: rgb(255 255 255 / var(--tw-text-opacity, 1));
58
+ }
59
+ .s-wishlist-summary-count:where([dir="rtl"], [dir="rtl"] *) {
60
+ left: unset;
61
+ right: -6px;
62
+ }
@@ -0,0 +1,65 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { Host, h } from "@stencil/core";
5
+ import HeartIcon from "../../assets/svg/heart.svg";
6
+ import Helper from "../../Helpers/Helper";
7
+ /**
8
+ * Standalone wishlist ("Fav") icon, meant to sit at the outer nav-bar level
9
+ * next to `salla-user-menu` and `salla-cart-summary` — not nested inside the
10
+ * account dropdown.
11
+ *
12
+ * A/B test: shown only on basic/plus stores (see Helper.getPlanName()) —
13
+ * pro/special stores keep the pre-existing wishlist-in-menu-only experience.
14
+ * TODO: confirm before/after click-count reporting comes from analytics.
15
+ */
16
+ export class SallaWishlistSummary {
17
+ constructor() {
18
+ this.isEnabled = false;
19
+ this.wishlistCount = 0;
20
+ this.wishlistLabel = salla.lang.get('common.titles.wishlist');
21
+ salla.wishlist.event.onAdded(() => this.syncCount());
22
+ salla.wishlist.event.onRemoved(() => this.syncCount());
23
+ // Server hydration (packages/twilight/src/api/wishlist.js syncStorageFromServer)
24
+ // rewrites `salla::wishlist` in storage after the add/remove events above have
25
+ // already fired, or without either firing at all — re-sync once it settles so
26
+ // the badge doesn't stay stale.
27
+ salla.event.on('wishlist::storage.synced', () => this.syncCount());
28
+ }
29
+ componentWillLoad() {
30
+ return new Promise(resolve => salla.onReady(() => {
31
+ const plan = Helper.getPlanName();
32
+ this.isEnabled = !!plan && ['basic', 'plus'].includes(plan);
33
+ this.syncCount();
34
+ resolve();
35
+ }));
36
+ }
37
+ syncCount() {
38
+ this.wishlistCount = (salla.storage.get('salla::wishlist', []) || []).length;
39
+ }
40
+ render() {
41
+ const is_guest = salla.config.isGuest();
42
+ if (!this.isEnabled || is_guest) {
43
+ return h(Host, { hidden: true });
44
+ }
45
+ return (h(Host, null, h("a", { class: "s-wishlist-summary-wrapper", href: salla.url.get('account/wishlist'), "aria-label": this.wishlistLabel }, h("i", { class: "s-wishlist-summary-icon", innerHTML: HeartIcon }), this.wishlistCount > 0 && (h("span", { class: "s-wishlist-summary-count" }, salla.helpers.number(this.wishlistCount))))));
46
+ }
47
+ static get is() { return "salla-wishlist-summary"; }
48
+ static get originalStyleUrls() {
49
+ return {
50
+ "$": ["salla-wishlist-summary.scss"]
51
+ };
52
+ }
53
+ static get styleUrls() {
54
+ return {
55
+ "$": ["salla-wishlist-summary.css"]
56
+ };
57
+ }
58
+ static get states() {
59
+ return {
60
+ "isEnabled": {},
61
+ "wishlistCount": {},
62
+ "wishlistLabel": {}
63
+ };
64
+ }
65
+ }