@salla.sa/twilight-components 2.14.573 → 2.14.575

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 (389) hide show
  1. package/dist/cjs/{Helper-N5wrs9vm.js → Helper-8U7zlpC3.js} +171 -117
  2. package/dist/cjs/{filepond-B2iMbV1F.js → filepond-NMq4bM2q.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-rXYiM_Ob.js → filepond-plugin-file-poster-TEelNjjG.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-BF5dedmz.js → filepond-plugin-file-validate-size-DRVxzFUc.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DJHYRny2.js → filepond-plugin-file-validate-type-75J1mHEB.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-BgtH5f4u.js → filepond-plugin-image-edit-CvC-CZjk.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C9JH8EBn.js → filepond-plugin-image-exif-orientation-D7mJeHKx.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CpSCiqfj.js → filepond-plugin-image-preview-QxURSuZ4.js} +1 -1
  9. package/dist/cjs/heart-ClVn_Co8.js +13 -0
  10. package/dist/cjs/{index-DpXwHFVO.js → index-Bt8A6pnr.js} +14 -10
  11. package/dist/cjs/index-CIbBkRPw.js +4413 -0
  12. package/dist/cjs/{intlTelInput-CdZOfaWd.js → intlTelInput-Dq8y3YHO.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 +30 -4
  66. package/dist/cjs/salla-offer.cjs.entry.js +116 -24
  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/translate-BeU1QX_r.js +20 -0
  112. package/dist/cjs/twilight.cjs.js +2 -2
  113. package/dist/cjs/{vanilla-picker-BT9OjZCy.js → vanilla-picker-BkJyQVMl.js} +1 -1
  114. package/dist/collection/Helpers/Helper.js +171 -117
  115. package/dist/collection/Helpers/translate.js +16 -0
  116. package/dist/collection/collection-manifest.json +2 -1
  117. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +8 -4
  118. package/dist/collection/components/salla-cart-summary/salla-cart-summary.css +1 -1
  119. package/dist/collection/components/salla-offer/salla-offer.css +86 -0
  120. package/dist/collection/components/salla-offer/salla-offer.js +119 -22
  121. package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +32 -0
  122. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +28 -2
  123. package/dist/collection/components/salla-user-menu/salla-user-menu.js +1 -1
  124. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.css +62 -0
  125. package/dist/collection/components/salla-wishlist-summary/salla-wishlist-summary.js +65 -0
  126. package/dist/components/Helper.js +171 -117
  127. package/dist/components/heart.js +11 -0
  128. package/dist/components/index.js +2 -2
  129. package/dist/components/index2.js +4322 -2471
  130. package/dist/components/index3.js +2553 -0
  131. package/dist/components/salla-bullet-delivery.js +44 -4438
  132. package/dist/components/salla-cart-summary.js +1 -1
  133. package/dist/components/salla-datetime-picker2.js +1 -1
  134. package/dist/components/salla-offer-modal.js +29 -3
  135. package/dist/components/salla-offer.js +120 -23
  136. package/dist/components/salla-product-card2.js +4 -10
  137. package/dist/components/salla-rating-modal-v2.js +1 -1
  138. package/dist/components/salla-rating-modal-v22.js +9 -3
  139. package/dist/components/salla-rating-modal2.js +2 -3
  140. package/dist/components/salla-user-menu.js +2 -2
  141. package/dist/components/salla-wishlist-summary.d.ts +11 -0
  142. package/dist/components/salla-wishlist-summary.js +67 -0
  143. package/dist/components/translate.js +18 -0
  144. package/dist/esm/{Helper-Cql-WbqR.js → Helper-ivBHT_nn.js} +171 -117
  145. package/dist/esm/{filepond-BsuscqtG.js → filepond-kmpJTY5p.js} +1 -1
  146. package/dist/esm/{filepond-plugin-file-poster-DZ4ckjsP.js → filepond-plugin-file-poster-8M0TsTUo.js} +1 -1
  147. package/dist/esm/{filepond-plugin-file-validate-size-BV6807xx.js → filepond-plugin-file-validate-size-CPVDzrMj.js} +1 -1
  148. package/dist/esm/{filepond-plugin-file-validate-type-cWCM2RqT.js → filepond-plugin-file-validate-type-D0qUdWNB.js} +1 -1
  149. package/dist/esm/{filepond-plugin-image-edit-aQvaKLxK.js → filepond-plugin-image-edit-K8nFORG9.js} +1 -1
  150. package/dist/esm/{filepond-plugin-image-exif-orientation-FgW7hBXK.js → filepond-plugin-image-exif-orientation-BSvnwKAw.js} +1 -1
  151. package/dist/esm/{filepond-plugin-image-preview-DxogdDqd.js → filepond-plugin-image-preview-hArDoD8N.js} +1 -1
  152. package/dist/esm/heart-00vBRoH3.js +11 -0
  153. package/dist/esm/{index-DSEA3vdh.js → index-a6lSRQK4.js} +14 -10
  154. package/dist/esm/index-wXSgmenB.js +4404 -0
  155. package/dist/esm/{intlTelInput-BLEGv9EO.js → intlTelInput-CC5xRRkd.js} +1 -1
  156. package/dist/esm/loader.js +3 -3
  157. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  158. package/dist/esm/salla-accordion_6.entry.js +2 -2
  159. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  160. package/dist/esm/salla-advertisement.entry.js +1 -1
  161. package/dist/esm/salla-alert_2.entry.js +1 -1
  162. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  163. package/dist/esm/salla-applied-filters.entry.js +2 -2
  164. package/dist/esm/salla-apps-icons.entry.js +1 -1
  165. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  166. package/dist/esm/salla-badge.entry.js +1 -1
  167. package/dist/esm/salla-basket-gap.entry.js +1 -1
  168. package/dist/esm/salla-bullet-delivery_3.entry.js +53 -4447
  169. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  170. package/dist/esm/salla-cart-item-offers_2.entry.js +2 -2
  171. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  172. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  173. package/dist/esm/salla-comment-factors.entry.js +1 -1
  174. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  175. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  176. package/dist/esm/salla-contacts.entry.js +1 -1
  177. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  178. package/dist/esm/salla-count-down.entry.js +1 -1
  179. package/dist/esm/salla-custom-fields.entry.js +1 -1
  180. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  181. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  182. package/dist/esm/salla-filters-widget.entry.js +2 -2
  183. package/dist/esm/salla-filters.entry.js +2 -2
  184. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  185. package/dist/esm/salla-gift-card-redeem.entry.js +1 -1
  186. package/dist/esm/salla-gifting.entry.js +1 -1
  187. package/dist/esm/salla-hook.entry.js +1 -1
  188. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  189. package/dist/esm/salla-installment.entry.js +1 -1
  190. package/dist/esm/salla-list-tile.entry.js +1 -1
  191. package/dist/esm/salla-localization-modal.entry.js +1 -1
  192. package/dist/esm/salla-login-modal.entry.js +1 -1
  193. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  194. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  195. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  196. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  197. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  198. package/dist/esm/salla-loyalty.entry.js +1 -1
  199. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  200. package/dist/esm/salla-map_3.entry.js +1 -1
  201. package/dist/esm/salla-menu.entry.js +1 -1
  202. package/dist/esm/salla-metadata.entry.js +1 -1
  203. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  204. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  205. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  206. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  207. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  208. package/dist/esm/salla-offer-modal.entry.js +30 -4
  209. package/dist/esm/salla-offer.entry.js +116 -24
  210. package/dist/esm/salla-order-branch.entry.js +1 -1
  211. package/dist/esm/salla-order-cancel.entry.js +1 -1
  212. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  213. package/dist/esm/salla-order-details-options.entry.js +1 -1
  214. package/dist/esm/salla-order-details.entry.js +1 -1
  215. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  216. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  217. package/dist/esm/salla-order-edit.entry.js +1 -1
  218. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  219. package/dist/esm/salla-order-shipments.entry.js +1 -1
  220. package/dist/esm/salla-order-summary.entry.js +1 -1
  221. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  222. package/dist/esm/salla-orders.entry.js +2 -2
  223. package/dist/esm/salla-payments.entry.js +1 -1
  224. package/dist/esm/salla-placeholder.entry.js +1 -1
  225. package/dist/esm/salla-price-range.entry.js +1 -1
  226. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  227. package/dist/esm/salla-product-card.entry.js +2 -8
  228. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  229. package/dist/esm/salla-products-list.entry.js +2 -2
  230. package/dist/esm/salla-products-slider.entry.js +2 -2
  231. package/dist/esm/salla-quick-order.entry.js +1 -1
  232. package/dist/esm/salla-rating-modal-v2.entry.js +3 -4
  233. package/dist/esm/salla-rating-modal.entry.js +3 -4
  234. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  235. package/dist/esm/salla-review-order-item.entry.js +1 -1
  236. package/dist/esm/salla-scopes.entry.js +1 -1
  237. package/dist/esm/salla-search-product-card.entry.js +1 -1
  238. package/dist/esm/salla-search.entry.js +1 -1
  239. package/dist/esm/salla-skeleton.entry.js +1 -1
  240. package/dist/esm/salla-social-share.entry.js +1 -1
  241. package/dist/esm/salla-social.entry.js +1 -1
  242. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  243. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  244. package/dist/esm/salla-tooltip.entry.js +1 -1
  245. package/dist/esm/salla-trust-badges.entry.js +1 -1
  246. package/dist/esm/salla-user-menu.entry.js +5 -5
  247. package/dist/esm/salla-user-profile.entry.js +1 -1
  248. package/dist/esm/salla-user-settings.entry.js +1 -1
  249. package/dist/esm/salla-verify.entry.js +1 -1
  250. package/dist/esm/salla-wallet.entry.js +1 -1
  251. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  252. package/dist/esm/salla-wishlist-summary.entry.js +46 -0
  253. package/dist/esm/{shipping-fast-lMgMt31Q.js → star-cq6TcfoH.js} +8 -1
  254. package/dist/esm/translate-CrSV-tno.js +18 -0
  255. package/dist/esm/twilight.js +3 -3
  256. package/dist/esm/{vanilla-picker-BpgJFvog.js → vanilla-picker-CDhGfTst.js} +1 -1
  257. package/dist/twilight/{p-901a961f.entry.js → p-004584f5.entry.js} +1 -1
  258. package/dist/twilight/{p-77dc1637.entry.js → p-00e68964.entry.js} +1 -1
  259. package/dist/twilight/p-00vBRoH3.js +4 -0
  260. package/dist/twilight/{p-4a3701ca.entry.js → p-01cae03e.entry.js} +1 -1
  261. package/dist/twilight/{p-db53fade.entry.js → p-0a38d353.entry.js} +1 -1
  262. package/dist/twilight/{p-7e0698c6.entry.js → p-0f1981ee.entry.js} +1 -1
  263. package/dist/twilight/p-0f9bfeeb.entry.js +4 -0
  264. package/dist/twilight/{p-82455313.entry.js → p-109472c5.entry.js} +1 -1
  265. package/dist/twilight/{p-2304f0a4.entry.js → p-10968d1c.entry.js} +1 -1
  266. package/dist/twilight/{p-ec341307.entry.js → p-127f0000.entry.js} +1 -1
  267. package/dist/twilight/{p-f173ada5.entry.js → p-12ab7c1a.entry.js} +1 -1
  268. package/dist/twilight/{p-4a447633.entry.js → p-21e6b2e7.entry.js} +1 -1
  269. package/dist/twilight/{p-c15d08ae.entry.js → p-24bd13b8.entry.js} +1 -1
  270. package/dist/twilight/{p-663aa63b.entry.js → p-2541db96.entry.js} +1 -1
  271. package/dist/twilight/{p-dd3aacf3.entry.js → p-254e6e0c.entry.js} +1 -1
  272. package/dist/twilight/{p-5d0fd545.entry.js → p-2591eead.entry.js} +1 -1
  273. package/dist/twilight/{p-3c5e2710.entry.js → p-25a4633f.entry.js} +1 -1
  274. package/dist/twilight/{p-9fe36a97.entry.js → p-28875055.entry.js} +1 -1
  275. package/dist/twilight/{p-6fb16543.entry.js → p-2af75479.entry.js} +1 -1
  276. package/dist/twilight/{p-bbb72d38.entry.js → p-2af98444.entry.js} +1 -1
  277. package/dist/twilight/{p-5d97cf2d.entry.js → p-2bf8f0ed.entry.js} +1 -1
  278. package/dist/twilight/{p-6a605835.entry.js → p-2c480419.entry.js} +1 -1
  279. package/dist/twilight/{p-4557e342.entry.js → p-312e8678.entry.js} +1 -1
  280. package/dist/twilight/{p-e5bb52fb.entry.js → p-3357d33a.entry.js} +1 -1
  281. package/dist/twilight/p-338f727b.entry.js +4 -0
  282. package/dist/twilight/{p-06419603.entry.js → p-34d33337.entry.js} +1 -1
  283. package/dist/twilight/{p-d9be4036.entry.js → p-3500065c.entry.js} +1 -1
  284. package/dist/twilight/{p-3eb55e32.entry.js → p-3a113599.entry.js} +1 -1
  285. package/dist/twilight/{p-ad930532.entry.js → p-3bd153c1.entry.js} +1 -1
  286. package/dist/twilight/{p-d654b4b0.entry.js → p-3ff2b8b6.entry.js} +1 -1
  287. package/dist/twilight/{p-a89fb313.entry.js → p-426acd77.entry.js} +1 -1
  288. package/dist/twilight/{p-6cdc7f8a.entry.js → p-44b8d453.entry.js} +1 -1
  289. package/dist/twilight/{p-6cc3e44d.entry.js → p-45b97699.entry.js} +1 -1
  290. package/dist/twilight/{p-3040407e.entry.js → p-4a60be6d.entry.js} +1 -1
  291. package/dist/twilight/{p-e0b085e4.entry.js → p-4bf58226.entry.js} +1 -1
  292. package/dist/twilight/{p-8ae70528.entry.js → p-50816838.entry.js} +1 -1
  293. package/dist/twilight/{p-51434773.entry.js → p-5134aae8.entry.js} +1 -1
  294. package/dist/twilight/{p-69e8750f.entry.js → p-540138a1.entry.js} +1 -1
  295. package/dist/twilight/{p-1f1dda08.entry.js → p-55e0745e.entry.js} +1 -1
  296. package/dist/twilight/{p-0764c46b.entry.js → p-583a63e5.entry.js} +1 -1
  297. package/dist/twilight/{p-0b514a47.entry.js → p-5b1a0560.entry.js} +1 -1
  298. package/dist/twilight/{p-78ee03f8.entry.js → p-5d72b7d7.entry.js} +1 -1
  299. package/dist/twilight/{p-aadeb35a.entry.js → p-5ddd9aa0.entry.js} +1 -1
  300. package/dist/twilight/{p-f306bfe3.entry.js → p-5fe0908b.entry.js} +1 -1
  301. package/dist/twilight/{p-5b949ccc.entry.js → p-6051a92c.entry.js} +1 -1
  302. package/dist/twilight/p-63a315e1.entry.js +4 -0
  303. package/dist/twilight/{p-47b1aa89.entry.js → p-6958e848.entry.js} +1 -1
  304. package/dist/twilight/{p-3b3a1c87.entry.js → p-69594ced.entry.js} +1 -1
  305. package/dist/twilight/{p-75652fd4.entry.js → p-6a7eacbd.entry.js} +1 -1
  306. package/dist/twilight/{p-d1c973ce.entry.js → p-6f371a84.entry.js} +1 -1
  307. package/dist/twilight/{p-3c665085.entry.js → p-6f741b21.entry.js} +1 -1
  308. package/dist/twilight/p-71ecb477.entry.js +4 -0
  309. package/dist/twilight/{p-360b6388.entry.js → p-742f2c15.entry.js} +1 -1
  310. package/dist/twilight/{p-fac05e8f.entry.js → p-7a19ef45.entry.js} +1 -1
  311. package/dist/twilight/{p-09e126b0.entry.js → p-7b373051.entry.js} +1 -1
  312. package/dist/twilight/{p-6e43f8a7.entry.js → p-7cc8b82b.entry.js} +1 -1
  313. package/dist/twilight/{p-8f2b2e42.entry.js → p-7f69cf5d.entry.js} +1 -1
  314. package/dist/twilight/{p-901217bc.entry.js → p-7f861ac0.entry.js} +1 -1
  315. package/dist/twilight/{p-855a9db7.entry.js → p-81c88f97.entry.js} +1 -1
  316. package/dist/twilight/{p-6be347e5.entry.js → p-8271e127.entry.js} +1 -1
  317. package/dist/twilight/{p-62a44e65.entry.js → p-84599aa5.entry.js} +1 -1
  318. package/dist/twilight/{p-fc6adc90.entry.js → p-86ad5af2.entry.js} +1 -1
  319. package/dist/twilight/p-8d30dbac.entry.js +4 -0
  320. package/dist/twilight/{p-4944d10a.entry.js → p-96cac80e.entry.js} +1 -1
  321. package/dist/twilight/{p-84ec7be7.entry.js → p-977e3e76.entry.js} +1 -1
  322. package/dist/twilight/{p-89ed6dbc.entry.js → p-9b04ed7f.entry.js} +1 -1
  323. package/dist/twilight/{p-7afeb088.entry.js → p-9e53d7a6.entry.js} +1 -1
  324. package/dist/twilight/{p-BF2su8FM.js → p-BG1dHHdm.js} +1 -1
  325. package/dist/twilight/{p-B3sbQMcp.js → p-BokV7EHy.js} +1 -1
  326. package/dist/twilight/{p-Bt0GXtZG.js → p-CSuif4Xw.js} +1 -1
  327. package/dist/twilight/p-CbVZf-Q4.js +4 -0
  328. package/dist/twilight/{p-BZt79QeE.js → p-CfhebjBE.js} +1 -1
  329. package/dist/twilight/p-CrSV-tno.js +4 -0
  330. package/dist/twilight/p-DI6PJLEJ.js +1024 -0
  331. package/dist/twilight/{p-Bj6lP8RV.js → p-DNjWzZsK.js} +1 -1
  332. package/dist/twilight/{p-WgGO2Pjy.js → p-DOF2UkI4.js} +1 -1
  333. package/dist/twilight/{p-VBuS91fQ.js → p-DWPp9ZjN.js} +1 -1
  334. package/dist/twilight/{p-DDcSXlpO.js → p-DZHubgN5.js} +1 -1
  335. package/dist/twilight/{p-1063f3d1.entry.js → p-a0d39b81.entry.js} +1 -1
  336. package/dist/twilight/{p-68aecf40.entry.js → p-a177b13f.entry.js} +1 -1
  337. package/dist/twilight/{p-5c863789.entry.js → p-a391b31d.entry.js} +1 -1
  338. package/dist/twilight/{p-bb2170ac.entry.js → p-a47b910f.entry.js} +1 -1
  339. package/dist/twilight/{p-DSEA3vdh.js → p-a6lSRQK4.js} +2 -2
  340. package/dist/twilight/{p-f919f0b5.entry.js → p-aee0c658.entry.js} +1 -1
  341. package/dist/twilight/{p-54c36ba4.entry.js → p-af99726d.entry.js} +1 -1
  342. package/dist/twilight/{p-e90a201a.entry.js → p-b0c86557.entry.js} +1 -1
  343. package/dist/twilight/{p-1acd987a.entry.js → p-b7624eb6.entry.js} +1 -1
  344. package/dist/twilight/{p-b3063b70.entry.js → p-bc54fc8b.entry.js} +1 -1
  345. package/dist/twilight/{p-e5c07741.entry.js → p-c500e5fe.entry.js} +1 -1
  346. package/dist/twilight/{p-b414760b.entry.js → p-c9779211.entry.js} +1 -1
  347. package/dist/twilight/{p-2c07e8ac.entry.js → p-c9ba30cd.entry.js} +1 -1
  348. package/dist/twilight/{p-5d41dc4e.entry.js → p-cbcbc9f8.entry.js} +1 -1
  349. package/dist/twilight/{p-2733e78f.entry.js → p-cc15290b.entry.js} +1 -1
  350. package/dist/twilight/{p-lMgMt31Q.js → p-cq6TcfoH.js} +1 -1
  351. package/dist/twilight/{p-77323c2a.entry.js → p-d0fce326.entry.js} +1 -1
  352. package/dist/twilight/{p-e676c627.entry.js → p-d1a0bd97.entry.js} +1 -1
  353. package/dist/twilight/{p-457a256d.entry.js → p-d56cb23a.entry.js} +1 -1
  354. package/dist/twilight/{p-66561f9e.entry.js → p-d6803c56.entry.js} +1 -1
  355. package/dist/twilight/{p-bc0f3f06.entry.js → p-d7e5b860.entry.js} +1 -1
  356. package/dist/twilight/{p-276171ac.entry.js → p-dc86737c.entry.js} +1 -1
  357. package/dist/twilight/{p-61580839.entry.js → p-e0b5a06d.entry.js} +1 -1
  358. package/dist/twilight/{p-b1c21e5c.entry.js → p-e155a1a6.entry.js} +1 -1
  359. package/dist/twilight/{p-5329003d.entry.js → p-e9d73e7d.entry.js} +1 -1
  360. package/dist/twilight/p-ea1c06ab.entry.js +4 -0
  361. package/dist/twilight/p-eb11b8be.entry.js +4 -0
  362. package/dist/twilight/{p-909ae4c5.entry.js → p-ebd9a6c2.entry.js} +1 -1
  363. package/dist/twilight/p-ef037207.entry.js +4 -0
  364. package/dist/twilight/{p-c419a909.entry.js → p-f1a3cf9e.entry.js} +1 -1
  365. package/dist/twilight/{p-b6ece925.entry.js → p-f2f6f502.entry.js} +1 -1
  366. package/dist/twilight/{p-6904ad04.entry.js → p-fc13e706.entry.js} +1 -1
  367. package/dist/twilight/{p-DdScDjtA.js → p-wx2L9ZB0.js} +1 -1
  368. package/dist/twilight/twilight.esm.js +1 -1
  369. package/dist/types/Helpers/Helper.d.ts +14 -12
  370. package/dist/types/Helpers/translate.d.ts +10 -0
  371. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +0 -1
  372. package/dist/types/components/salla-offer/salla-offer.d.ts +42 -1
  373. package/dist/types/components/salla-offer-modal/offer-schema.d.ts +12 -0
  374. package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +7 -0
  375. package/dist/types/components/salla-wishlist-summary/salla-wishlist-summary.d.ts +18 -0
  376. package/dist/types/components.d.ts +45 -0
  377. package/package.json +5 -5
  378. package/dist/cjs/star-DMzrN05M.js +0 -13
  379. package/dist/components/star.js +0 -11
  380. package/dist/esm/star-CeFAfcTv.js +0 -11
  381. package/dist/twilight/p-010fa509.entry.js +0 -4
  382. package/dist/twilight/p-035b561c.entry.js +0 -4
  383. package/dist/twilight/p-5a86a794.entry.js +0 -4
  384. package/dist/twilight/p-8ed45c28.entry.js +0 -4
  385. package/dist/twilight/p-CUSw0W26.js +0 -4
  386. package/dist/twilight/p-CeFAfcTv.js +0 -4
  387. package/dist/twilight/p-b98ae2c1.entry.js +0 -4
  388. package/dist/twilight/p-e91bba7e.entry.js +0 -1024
  389. 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();
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ /**
5
+ * Translate with a real fallback.
6
+ *
7
+ * `salla.lang.get(key, replacements, locale)` takes a LOCALE as its third
8
+ * argument, not a fallback, and lang.js echoes the key back when it has no
9
+ * translation. Passing a fallback there silently asks for a nonsense locale and
10
+ * still renders the raw key to the customer, which is what a store shows while
11
+ * its translation bundle has not yet picked up newly added keys.
12
+ */
13
+ export function translate(key, replacements, fallback) {
14
+ const value = salla.lang.get(key, replacements);
15
+ return !value || value === key ? fallback : value;
16
+ }
@@ -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,12 +7,18 @@
7
7
  .fixed {
8
8
  position: fixed;
9
9
  }
10
+ .block {
11
+ display: block;
12
+ }
10
13
  .flex {
11
14
  display: flex;
12
15
  }
13
16
  .table {
14
17
  display: table;
15
18
  }
19
+ .grid {
20
+ display: grid;
21
+ }
16
22
  .items-center {
17
23
  align-items: center;
18
24
  }
@@ -464,6 +470,13 @@
464
470
  --tw-text-opacity: 1;
465
471
  color: rgb(55 65 81 / var(--tw-text-opacity, 1));
466
472
  }
473
+ .s-offer-card-description-row {
474
+ display: flex;
475
+ flex-wrap: wrap;
476
+ align-items: baseline;
477
+ column-gap: 0.75rem;
478
+ row-gap: 0.25rem;
479
+ }
467
480
  .s-offer-card-details {
468
481
  display: flex;
469
482
  width: 100%;
@@ -774,6 +787,20 @@
774
787
  margin-top: 0.75rem;
775
788
  text-align: right;
776
789
  }
790
+ .s-offer-categories-group {
791
+ margin-top: 0.25rem;
792
+ display: flex;
793
+ flex-wrap: wrap;
794
+ align-items: baseline;
795
+ column-gap: 0.5rem;
796
+ }
797
+ .s-offer-categories-label {
798
+ flex-shrink: 0;
799
+ font-size: 13px;
800
+ font-weight: 700;
801
+ --tw-text-opacity: 1;
802
+ color: rgb(31 41 55 / var(--tw-text-opacity, 1));
803
+ }
777
804
  .s-offer-categories-list {
778
805
  display: flex;
779
806
  flex-wrap: wrap;
@@ -853,6 +880,65 @@
853
880
  .s-offer-drawer-card .s-products-list-compact-cards {
854
881
  margin-bottom: 0px !important;
855
882
  }
883
+ .s-offer-max-discount {
884
+ font-size: 13px;
885
+ --tw-text-opacity: 1;
886
+ color: rgb(156 163 175 / var(--tw-text-opacity, 1));
887
+ }
888
+ .s-offer-branches {
889
+ margin-top: 0.75rem;
890
+ text-align: right;
891
+ }
892
+ .s-offer-branches-label {
893
+ margin-bottom: 0.25rem;
894
+ display: block;
895
+ font-size: 13px;
896
+ font-weight: 700;
897
+ --tw-text-opacity: 1;
898
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
899
+ }
900
+ .s-offer-branches-list {
901
+ display: flex;
902
+ flex-wrap: wrap;
903
+ column-gap: 1rem;
904
+ font-size: 13px;
905
+ line-height: 1.625;
906
+ }
907
+ .s-offer-branch-item {
908
+ display: inline-block;
909
+ --tw-text-opacity: 1;
910
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
911
+ }
912
+ .s-offer-payment-methods {
913
+ margin-top: 0.75rem;
914
+ text-align: right;
915
+ }
916
+ .s-offer-payment-methods-label {
917
+ margin-bottom: 0.25rem;
918
+ display: block;
919
+ font-size: 13px;
920
+ font-weight: 700;
921
+ --tw-text-opacity: 1;
922
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
923
+ }
924
+ .s-offer-payment-methods-list {
925
+ display: flex;
926
+ flex-wrap: wrap;
927
+ column-gap: 1rem;
928
+ font-size: 13px;
929
+ line-height: 1.625;
930
+ }
931
+ .s-offer-payment-method-item {
932
+ display: inline-block;
933
+ --tw-text-opacity: 1;
934
+ color: rgb(107 114 128 / var(--tw-text-opacity, 1));
935
+ }
936
+ .s-offer-discount-amount {
937
+ font-size: 12px;
938
+ line-height: 15px;
939
+ --tw-text-opacity: 1;
940
+ color: rgb(156 163 175 / var(--tw-text-opacity, 1));
941
+ }
856
942
  .s-offer-modal-cat-item.swiper-slide {
857
943
  margin-top: 1rem;
858
944
  margin-bottom: 1rem;