@salla.sa/twilight-components 2.14.454 → 2.14.455

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 (331) hide show
  1. package/dist/cjs/{filepond-omDVoR0V.js → filepond-CASXTVVn.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CiTwbype.js → filepond-plugin-file-poster-NwV0t9zF.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BMUGogIJ.js → filepond-plugin-file-validate-size-S-_ZCnL0.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-DU7loMuy.js → filepond-plugin-file-validate-type-8fAsih_V.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BvpuxlGL.js → filepond-plugin-image-edit-BdKPXtEG.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BltzmQ3V.js → filepond-plugin-image-exif-orientation-iTp4daNS.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C-51g4On.js → filepond-plugin-image-preview-D5CX6xww.js} +1 -1
  8. package/dist/cjs/{functions-BugkyX_h.js → functions-BlV_viZ0.js} +36 -8
  9. package/dist/cjs/{index-CMdVOCIm.js → index-BANBu7pv.js} +1 -1
  10. package/dist/cjs/{index-DppdveKW.js → index-CXqniRSt.js} +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cashback-banner.cjs.entry.js +2 -2
  25. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +3 -3
  44. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +32 -10
  45. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +4 -4
  46. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-program.cjs.entry.js +11 -5
  49. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +4 -4
  50. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-reward-action_4.cjs.entry.js +14 -11
  83. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  98. package/dist/cjs/{tracked-promise-D_CjjRbz.js → tracked-promise-TlVxYBIU.js} +1 -1
  99. package/dist/cjs/{translations-DMwpLvqi.js → translations-BHyDCj-Y.js} +12 -0
  100. package/dist/cjs/twilight.cjs.js +1 -1
  101. package/dist/cjs/{vanilla-picker-Cx13ViIR.js → vanilla-picker-B3HS631p.js} +1 -1
  102. package/dist/collection/components/salla-loyalty-program/functions.js +22 -7
  103. package/dist/collection/components/salla-loyalty-program/salla-loyalty-point.js +31 -9
  104. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +7 -1
  105. package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +2 -2
  106. package/dist/collection/components/salla-loyalty-program/salla-reward-action.js +4 -1
  107. package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
  108. package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -3
  109. package/dist/collection/components/salla-loyalty-program/salla-reward-exchange.js +3 -3
  110. package/dist/collection/components/salla-loyalty-program/translations.js +12 -0
  111. package/dist/components/functions.js +35 -8
  112. package/dist/components/index.js +2 -2
  113. package/dist/components/salla-loyalty-point2.js +31 -9
  114. package/dist/components/salla-loyalty-program.js +7 -1
  115. package/dist/components/salla-loyalty-reward.js +2 -2
  116. package/dist/components/salla-reward-action2.js +4 -1
  117. package/dist/components/salla-reward-card2.js +1 -1
  118. package/dist/components/salla-reward-details2.js +3 -3
  119. package/dist/components/salla-reward-exchange2.js +3 -3
  120. package/dist/components/translations.js +12 -0
  121. package/dist/esm/{filepond-DFccUKfi.js → filepond-HUxLccYt.js} +1 -1
  122. package/dist/esm/{filepond-plugin-file-poster-BKP-dfBt.js → filepond-plugin-file-poster-CKU5WMer.js} +1 -1
  123. package/dist/esm/{filepond-plugin-file-validate-size-Cjhw73dP.js → filepond-plugin-file-validate-size-BJ7uOb2z.js} +1 -1
  124. package/dist/esm/{filepond-plugin-file-validate-type-BYB_v8v7.js → filepond-plugin-file-validate-type-ZilEA2CP.js} +1 -1
  125. package/dist/esm/{filepond-plugin-image-edit-DrvarOmH.js → filepond-plugin-image-edit-k3H2LHPc.js} +1 -1
  126. package/dist/esm/{filepond-plugin-image-exif-orientation-DdeulGFN.js → filepond-plugin-image-exif-orientation-C1fWSMsF.js} +1 -1
  127. package/dist/esm/{filepond-plugin-image-preview-CygMfjyy.js → filepond-plugin-image-preview-CBiR7yYc.js} +1 -1
  128. package/dist/esm/{functions-B4JadfO-.js → functions-BUK_6AVv.js} +36 -9
  129. package/dist/esm/{index-iW77h_OO.js → index-B27mc3DA.js} +2 -2
  130. package/dist/esm/{index-BsChAaWH.js → index-B8tvf2Er.js} +1 -1
  131. package/dist/esm/loader.js +2 -2
  132. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  133. package/dist/esm/salla-accordion_6.entry.js +1 -1
  134. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  135. package/dist/esm/salla-advertisement.entry.js +1 -1
  136. package/dist/esm/salla-alert_2.entry.js +1 -1
  137. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  138. package/dist/esm/salla-apps-icons.entry.js +1 -1
  139. package/dist/esm/salla-badge.entry.js +1 -1
  140. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  141. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  142. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  143. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  144. package/dist/esm/salla-cashback-banner.entry.js +2 -2
  145. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  146. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  147. package/dist/esm/salla-contacts.entry.js +1 -1
  148. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  149. package/dist/esm/salla-count-down.entry.js +1 -1
  150. package/dist/esm/salla-custom-fields.entry.js +1 -1
  151. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  152. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  153. package/dist/esm/salla-filters-widget.entry.js +1 -1
  154. package/dist/esm/salla-filters.entry.js +1 -1
  155. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  156. package/dist/esm/salla-gifting.entry.js +1 -1
  157. package/dist/esm/salla-hook.entry.js +1 -1
  158. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  159. package/dist/esm/salla-installment.entry.js +1 -1
  160. package/dist/esm/salla-list-tile.entry.js +1 -1
  161. package/dist/esm/salla-localization-modal.entry.js +1 -1
  162. package/dist/esm/salla-login-modal.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-banner.entry.js +3 -3
  164. package/dist/esm/salla-loyalty-hero_2.entry.js +32 -10
  165. package/dist/esm/salla-loyalty-panel.entry.js +4 -4
  166. package/dist/esm/salla-loyalty-points-banner.entry.js +2 -2
  167. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  168. package/dist/esm/salla-loyalty-program.entry.js +11 -5
  169. package/dist/esm/salla-loyalty-reward.entry.js +4 -4
  170. package/dist/esm/salla-loyalty.entry.js +1 -1
  171. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  172. package/dist/esm/salla-map.entry.js +1 -1
  173. package/dist/esm/salla-menu.entry.js +1 -1
  174. package/dist/esm/salla-metadata.entry.js +1 -1
  175. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  176. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  177. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  178. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  179. package/dist/esm/salla-notification-item.entry.js +1 -1
  180. package/dist/esm/salla-notifications.entry.js +1 -1
  181. package/dist/esm/salla-offer-modal.entry.js +1 -1
  182. package/dist/esm/salla-offer.entry.js +1 -1
  183. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  184. package/dist/esm/salla-order-details-options.entry.js +1 -1
  185. package/dist/esm/salla-order-details.entry.js +1 -1
  186. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  187. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  188. package/dist/esm/salla-order-edit.entry.js +1 -1
  189. package/dist/esm/salla-order-summary.entry.js +1 -1
  190. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  191. package/dist/esm/salla-orders.entry.js +1 -1
  192. package/dist/esm/salla-payments.entry.js +1 -1
  193. package/dist/esm/salla-placeholder.entry.js +1 -1
  194. package/dist/esm/salla-price-range.entry.js +1 -1
  195. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  196. package/dist/esm/salla-product-card_2.entry.js +1 -1
  197. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  198. package/dist/esm/salla-products-list.entry.js +1 -1
  199. package/dist/esm/salla-progress-bar.entry.js +1 -1
  200. package/dist/esm/salla-quick-order.entry.js +1 -1
  201. package/dist/esm/salla-rating-modal.entry.js +1 -1
  202. package/dist/esm/salla-reward-action_4.entry.js +14 -11
  203. package/dist/esm/salla-scopes.entry.js +1 -1
  204. package/dist/esm/salla-search.entry.js +1 -1
  205. package/dist/esm/salla-skeleton.entry.js +1 -1
  206. package/dist/esm/salla-slider.entry.js +1 -1
  207. package/dist/esm/salla-social-share.entry.js +1 -1
  208. package/dist/esm/salla-social.entry.js +1 -1
  209. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  210. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  211. package/dist/esm/salla-tooltip.entry.js +1 -1
  212. package/dist/esm/salla-trust-badges.entry.js +1 -1
  213. package/dist/esm/salla-user-menu.entry.js +1 -1
  214. package/dist/esm/salla-user-profile.entry.js +1 -1
  215. package/dist/esm/salla-user-settings.entry.js +1 -1
  216. package/dist/esm/salla-verify.entry.js +1 -1
  217. package/dist/esm/salla-wallet.entry.js +1 -1
  218. package/dist/esm/{tracked-promise-C44guOYk.js → tracked-promise-BhMK_w_-.js} +1 -1
  219. package/dist/esm/{translations-B-Rj6b9M.js → translations-dn_hTofo.js} +12 -0
  220. package/dist/esm/twilight.js +2 -2
  221. package/dist/esm/{vanilla-picker-YDGjYiGR.js → vanilla-picker-CqDptb8B.js} +1 -1
  222. package/dist/twilight/{p-02dd7637.entry.js → p-0154dd29.entry.js} +1 -1
  223. package/dist/twilight/{p-19f2e7d2.entry.js → p-01fd4f64.entry.js} +1 -1
  224. package/dist/twilight/{p-34aa2e08.entry.js → p-025899d4.entry.js} +1 -1
  225. package/dist/twilight/{p-f8316f57.entry.js → p-02c191cb.entry.js} +1 -1
  226. package/dist/twilight/{p-1b2c0753.entry.js → p-033a25d9.entry.js} +1 -1
  227. package/dist/twilight/{p-cb7e203e.entry.js → p-04555243.entry.js} +1 -1
  228. package/dist/twilight/{p-46b71bff.entry.js → p-099511cb.entry.js} +1 -1
  229. package/dist/twilight/{p-a27bb10b.entry.js → p-09fa0a96.entry.js} +1 -1
  230. package/dist/twilight/{p-24b99485.entry.js → p-0a5bffbb.entry.js} +1 -1
  231. package/dist/twilight/{p-f909c93a.entry.js → p-0c369b88.entry.js} +1 -1
  232. package/dist/twilight/{p-40c95509.entry.js → p-0cce3436.entry.js} +1 -1
  233. package/dist/twilight/{p-d58e833c.entry.js → p-0d42f5f7.entry.js} +1 -1
  234. package/dist/twilight/{p-bf5f9ac5.entry.js → p-0d733ece.entry.js} +1 -1
  235. package/dist/twilight/{p-d742b000.entry.js → p-14ca613a.entry.js} +1 -1
  236. package/dist/twilight/{p-df7285e7.entry.js → p-1952dfe2.entry.js} +1 -1
  237. package/dist/twilight/{p-87b489d5.entry.js → p-1c717064.entry.js} +1 -1
  238. package/dist/twilight/{p-7afdc002.entry.js → p-1eadcb01.entry.js} +1 -1
  239. package/dist/twilight/{p-721bf683.entry.js → p-224aeae6.entry.js} +1 -1
  240. package/dist/twilight/{p-6ed57526.entry.js → p-22cdee08.entry.js} +1 -1
  241. package/dist/twilight/{p-a6394281.entry.js → p-27c704c4.entry.js} +1 -1
  242. package/dist/twilight/{p-3f5f9c20.entry.js → p-28880d56.entry.js} +1 -1
  243. package/dist/twilight/p-295ed7eb.entry.js +4 -0
  244. package/dist/twilight/{p-da7dac3f.entry.js → p-2ad70328.entry.js} +1 -1
  245. package/dist/twilight/{p-a9d9d779.entry.js → p-2f2d596c.entry.js} +1 -1
  246. package/dist/twilight/{p-7ca70e4e.entry.js → p-3194b8f1.entry.js} +1 -1
  247. package/dist/twilight/{p-00b84307.entry.js → p-349723b8.entry.js} +1 -1
  248. package/dist/twilight/{p-3a4376e2.entry.js → p-37fa2c33.entry.js} +1 -1
  249. package/dist/twilight/p-3869c01a.entry.js +4 -0
  250. package/dist/twilight/{p-02f8d9f9.entry.js → p-39521cc9.entry.js} +1 -1
  251. package/dist/twilight/{p-fb21e567.entry.js → p-3a824c45.entry.js} +1 -1
  252. package/dist/twilight/{p-3bae0861.entry.js → p-3ce0ec88.entry.js} +1 -1
  253. package/dist/twilight/{p-596d016f.entry.js → p-3dcf296d.entry.js} +1 -1
  254. package/dist/twilight/{p-74ab39a5.entry.js → p-3fe0b0d9.entry.js} +1 -1
  255. package/dist/twilight/{p-05a72e81.entry.js → p-4365ccdf.entry.js} +1 -1
  256. package/dist/twilight/{p-f2b6c9a8.entry.js → p-45e86a35.entry.js} +1 -1
  257. package/dist/twilight/{p-f05b8136.entry.js → p-496b138e.entry.js} +1 -1
  258. package/dist/twilight/{p-4cbe8713.entry.js → p-4cc417ec.entry.js} +1 -1
  259. package/dist/twilight/{p-0649d07b.entry.js → p-4e340653.entry.js} +1 -1
  260. package/dist/twilight/{p-d9754b4d.entry.js → p-52dccf8f.entry.js} +1 -1
  261. package/dist/twilight/{p-99cc3c6d.entry.js → p-5414f877.entry.js} +1 -1
  262. package/dist/twilight/{p-d7efc079.entry.js → p-583fbeac.entry.js} +1 -1
  263. package/dist/twilight/{p-f0cddd1f.entry.js → p-63453993.entry.js} +1 -1
  264. package/dist/twilight/{p-c0ff719e.entry.js → p-7054b12e.entry.js} +1 -1
  265. package/dist/twilight/{p-1152d39f.entry.js → p-708c9d55.entry.js} +1 -1
  266. package/dist/twilight/{p-51da9e0c.entry.js → p-716fa631.entry.js} +1 -1
  267. package/dist/twilight/{p-c929ace3.entry.js → p-7170bbe5.entry.js} +1 -1
  268. package/dist/twilight/{p-256aa3f1.entry.js → p-731ddff8.entry.js} +1 -1
  269. package/dist/twilight/{p-a6dca70e.entry.js → p-77adb9d5.entry.js} +1 -1
  270. package/dist/twilight/{p-e6c02cf3.entry.js → p-7d79041c.entry.js} +1 -1
  271. package/dist/twilight/{p-4e93a3b0.entry.js → p-8610d773.entry.js} +1 -1
  272. package/dist/twilight/{p-28f46e76.entry.js → p-873b3598.entry.js} +1 -1
  273. package/dist/twilight/{p-498cdb6f.entry.js → p-87691e20.entry.js} +1 -1
  274. package/dist/twilight/{p-dc1ed927.entry.js → p-88309e40.entry.js} +1 -1
  275. package/dist/twilight/{p-4c9edafa.entry.js → p-8a07799b.entry.js} +1 -1
  276. package/dist/twilight/{p-3c810267.entry.js → p-8b775b6c.entry.js} +1 -1
  277. package/dist/twilight/{p-290f254d.entry.js → p-8cc38fe2.entry.js} +1 -1
  278. package/dist/twilight/{p-fd293182.entry.js → p-8ebc59c6.entry.js} +1 -1
  279. package/dist/twilight/{p-f65dfb0b.entry.js → p-9608cb48.entry.js} +1 -1
  280. package/dist/twilight/p-9856394d.entry.js +4 -0
  281. package/dist/twilight/{p-51638221.entry.js → p-9ac73546.entry.js} +1 -1
  282. package/dist/twilight/{p-a6563120.entry.js → p-9ada1f3d.entry.js} +1 -1
  283. package/dist/twilight/{p-iW77h_OO.js → p-B27mc3DA.js} +1 -1
  284. package/dist/twilight/{p-BpU1d8Q_.js → p-BDVAyd15.js} +1 -1
  285. package/dist/twilight/{p-CwIp300F.js → p-BUeUpASK.js} +1 -1
  286. package/dist/twilight/{p-CNLZvKDA.js → p-C8a5AE0g.js} +1 -1
  287. package/dist/twilight/{p-CgvkiAxT.js → p-CJxdBsuY.js} +1 -1
  288. package/dist/twilight/{p-D--YecOb.js → p-D6ttjw8h.js} +1 -1
  289. package/dist/twilight/{p-DQRmUn8O.js → p-DNVKaOjC.js} +1 -1
  290. package/dist/twilight/{p-JH4C3FEL.js → p-DXVnxhxo.js} +2 -2
  291. package/dist/twilight/p-Tj_9K_OT.js +4 -0
  292. package/dist/twilight/{p-ba047214.entry.js → p-a3fb3aa0.entry.js} +1 -1
  293. package/dist/twilight/{p-8fea01ea.entry.js → p-a5b876da.entry.js} +1 -1
  294. package/dist/twilight/{p-b266250b.entry.js → p-a74c0330.entry.js} +1 -1
  295. package/dist/twilight/{p-13cb0ec4.entry.js → p-a9200d8b.entry.js} +1 -1
  296. package/dist/twilight/{p-3e994db0.entry.js → p-acf1d397.entry.js} +1 -1
  297. package/dist/twilight/{p-588a366c.entry.js → p-af896a9c.entry.js} +1 -1
  298. package/dist/twilight/{p-6c9aca7c.entry.js → p-b151943e.entry.js} +1 -1
  299. package/dist/twilight/{p-5d9af31e.entry.js → p-bc2df32d.entry.js} +1 -1
  300. package/dist/twilight/{p-5965a3d2.entry.js → p-c014a283.entry.js} +1 -1
  301. package/dist/twilight/{p-a61a9f5a.entry.js → p-c151d43a.entry.js} +1 -1
  302. package/dist/twilight/p-c6d833e5.entry.js +4 -0
  303. package/dist/twilight/{p-cd7b86ca.entry.js → p-caa938d4.entry.js} +1 -1
  304. package/dist/twilight/{p-19276c52.entry.js → p-cc5f66f2.entry.js} +1 -1
  305. package/dist/twilight/{p-3bbd0428.entry.js → p-df76f90f.entry.js} +1 -1
  306. package/dist/twilight/p-dn_hTofo.js +4 -0
  307. package/dist/twilight/{p-d5dd0382.entry.js → p-e0810a73.entry.js} +1 -1
  308. package/dist/twilight/p-e0d55016.entry.js +4 -0
  309. package/dist/twilight/{p-99e0fc1f.entry.js → p-e9b8ac57.entry.js} +1 -1
  310. package/dist/twilight/{p-ed14038b.entry.js → p-eb395203.entry.js} +1 -1
  311. package/dist/twilight/{p-d85d8cc1.entry.js → p-ef2fbf89.entry.js} +1 -1
  312. package/dist/twilight/{p-2d4e9fb9.entry.js → p-f1c1c640.entry.js} +1 -1
  313. package/dist/twilight/{p-76523a14.entry.js → p-f1c253a9.entry.js} +1 -1
  314. package/dist/twilight/{p-0819daad.entry.js → p-f7139cc6.entry.js} +1 -1
  315. package/dist/twilight/{p-5ac78da9.entry.js → p-f762c572.entry.js} +1 -1
  316. package/dist/twilight/{p-1f7af2ad.entry.js → p-f8f54860.entry.js} +1 -1
  317. package/dist/twilight/{p-ed5da7f4.entry.js → p-ffe3256d.entry.js} +1 -1
  318. package/dist/twilight/{p-JqmowdAI.js → p-kzSVkHK7.js} +1 -1
  319. package/dist/twilight/{p-DPYkeBoq.js → p-oKl48ETd.js} +1 -1
  320. package/dist/twilight/{p-BtQuvkil.js → p-twQLVtaI.js} +1 -1
  321. package/dist/twilight/twilight.esm.js +1 -1
  322. package/dist/types/components/salla-loyalty-program/functions.d.ts +3 -1
  323. package/dist/types/components/salla-loyalty-program/salla-loyalty-point.d.ts +3 -0
  324. package/package.json +5 -5
  325. package/dist/twilight/p-10334bac.entry.js +0 -4
  326. package/dist/twilight/p-697a25c4.entry.js +0 -4
  327. package/dist/twilight/p-B-Rj6b9M.js +0 -4
  328. package/dist/twilight/p-BWfbW9uR.js +0 -4
  329. package/dist/twilight/p-c5c834f6.entry.js +0 -4
  330. package/dist/twilight/p-eba853e8.entry.js +0 -4
  331. package/dist/twilight/p-f1b235e6.entry.js +0 -4
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
  var keyboard_arrow_down = require('./keyboard_arrow_down-DHJ3FFZq.js');
8
8
  var bellRing = require('./bell-ring-BfKPinNo.js');
9
9
  var cart = require('./cart-s-x1Fshk.js');
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
  var interfaces = require('./interfaces-CRqrf5RX.js');
8
8
 
9
9
  const sallaUserProfileCss = ":host{display:block}";
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
 
8
8
  var Bullhorn = `<!-- Generated by IcoMoon.io -->
9
9
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
  var mail = require('./mail-Bgvt2hc9.js');
8
8
 
9
9
  var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
 
8
8
  const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
9
9
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
 
8
8
  function TrackedPromise(fn, options = {}) {
9
9
  options = Object.assign({ initialData: undefined, initialStatus: 'idle' }, options);
@@ -24,6 +24,14 @@ const translations = {
24
24
  ar: 'خطوات بسيطة تفصلك عن المزيد من نقاط الولاء!',
25
25
  en: 'Two simple steps separate you from great rewards!',
26
26
  },
27
+ 'pages.loyalty_program.how_to_use': {
28
+ ar: 'آلية الإستخدام',
29
+ en: 'How to use?',
30
+ },
31
+ 'pages.loyalty_program.how_to_use_steps': {
32
+ ar: 'يمكنك اكتساب النقاط عند الشراء من التصنيفات المحددة',
33
+ en: 'You can earn points when you purchase from the selected categories.',
34
+ },
27
35
  'pages.loyalty_program.register': {
28
36
  ar: 'سجِّل',
29
37
  en: 'Register',
@@ -60,6 +68,10 @@ const translations = {
60
68
  ar: 'نقطة',
61
69
  en: 'points',
62
70
  },
71
+ 'pages.loyalty_program.start_from': {
72
+ ar: 'يبدأ من',
73
+ en: 'Start from',
74
+ },
63
75
  'pages.loyalty_program.redeem_reward': {
64
76
  ar: 'استبدل النقاط',
65
77
  en: 'Redeem Reward',
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
 
8
8
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
9
9
  /*
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-DppdveKW.js');
6
+ var index = require('./index-CXqniRSt.js');
7
7
 
8
8
  function _mergeNamespaces(n, m) {
9
9
  m.forEach(function (e) {
@@ -35,19 +35,34 @@ export function brand_path(brand) {
35
35
  return [brand.name.replace(/\s/g, '-'), `brand-${brand.id}`].join('/');
36
36
  }
37
37
  export function isUnitOrder(point) {
38
- for (const condition of (point.conditions ?? [])) {
39
- if (condition.key?.endsWith('_FOR_UNIT')) {
38
+ for (const condition of point.conditions) {
39
+ if (condition.key.endsWith('_FOR_UNIT') || condition.key.endsWith('_FOR_UNIT_BY_CATEGORIES')) {
40
40
  return true;
41
41
  }
42
42
  }
43
- return false;
44
43
  }
45
- export function formattedPointsJsx(value) {
44
+ export function isRangePoints(point) {
45
+ for (const condition of point.conditions) {
46
+ if (condition.key.endsWith('_BY_CATEGORIES') && point.conditions.length > 1) {
47
+ return true;
48
+ }
49
+ }
50
+ }
51
+ export function getPoints(point) {
52
+ if (isRangePoints(point)) {
53
+ return point.conditions.sort((a, b) => a.points - b.points)[0].points;
54
+ }
55
+ return point.points;
56
+ }
57
+ export function formattedPointsJsx(value, isUnit = false, isRange = false) {
46
58
  if (typeof value === 'number') {
47
- return h("span", null, value, " ", salla.lang.get('pages.loyalty_program.point'));
59
+ if (isUnit) {
60
+ return h("span", null, isRange ? salla.lang.get('pages.loyalty_program.start_from') : '', " 1 ", salla.config.currency().symbol, " = ", value, " ", salla.lang.get('pages.loyalty_program.point'));
61
+ }
62
+ return h("span", null, isRange ? salla.lang.get('pages.loyalty_program.start_from') : '', " ", value, " ", salla.lang.get('pages.loyalty_program.point'));
48
63
  }
49
64
  if (isUnitOrder(value)) {
50
- return h("span", null, "1 ", salla.config.currency().symbol, " = ", value.points, " ", salla.lang.get('pages.loyalty_program.point'));
65
+ return h("span", null, isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '', " 1 ", salla.config.currency().symbol, " = ", getPoints(value), " ", salla.lang.get('pages.loyalty_program.point'));
51
66
  }
52
- return h("span", null, value.points, " ", salla.lang.get('pages.loyalty_program.point'));
67
+ return h("span", null, isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '', " ", getPoints(value), " ", salla.lang.get('pages.loyalty_program.point'));
53
68
  }
@@ -2,7 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { h } from "@stencil/core";
5
- import { closeModals, formattedPointsJsx } from "./functions";
5
+ import { closeModals, formattedPointsJsx, isUnitOrder } from "./functions";
6
6
  import SIGift from "../../assets/svg/gift.svg";
7
7
  import SICart2 from "../../assets/svg/cart2.svg";
8
8
  import SIStore from "../../assets/svg/store.svg";
@@ -10,6 +10,7 @@ import SIUserAdd from "../../assets/svg/user-add.svg";
10
10
  import SIChatConversationAlt from "../../assets/svg/chat-conversation-alt.svg";
11
11
  import SILink1 from "../../assets/svg/link1.svg";
12
12
  import SIUser from "../../assets/svg/user.svg";
13
+ import SITag from "../../assets/svg/tag.svg";
13
14
  import SIMail from "../../assets/svg/mail.svg";
14
15
  import SICalendar from "../../assets/svg/calendar.svg";
15
16
  import SIiPhoneX from "../../assets/svg/iphone-x.svg";
@@ -26,11 +27,16 @@ import SIShipping from "../../assets/svg/shipping.svg";
26
27
  * pos - sicon-store
27
28
  * fill profile - sicon-user-add
28
29
  */
30
+ const c = (...args) => args.map(i => 's-loyalty-program-' + i).join(' ');
29
31
  const sicons = {
30
32
  'FIRST_ORDER_STORE_FOR_UNIT': h("span", { innerHTML: SICart2 }),
33
+ 'FIRST_ORDER_STORE_FOR_UNIT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
31
34
  'FIRST_ORDER_STORE_FIX_AMOUNT': h("span", { innerHTML: SICart2 }),
35
+ 'FIRST_ORDER_STORE_FIX_AMOUNT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
32
36
  'ORDER_FROM_APP_FOR_UNIT': h("span", { innerHTML: SICart2 }),
37
+ 'ORDER_FROM_APP_FOR_UNIT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
33
38
  'ORDER_FROM_APP_FIX_AMOUNT': h("span", { innerHTML: SICart2 }),
39
+ 'ORDER_FROM_APP_FIX_AMOUNT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
34
40
  'CONDITION_RATING_SHIPPING_STORE': h("span", { innerHTML: SIStore }),
35
41
  'CONDITION_RATING_PRODUCT': h("span", { innerHTML: SIChatConversationAlt }),
36
42
  'CONDITION_RATING_SHIPPING_COMPANY': h("span", { innerHTML: SIShipping }),
@@ -39,13 +45,17 @@ const sicons = {
39
45
  'CONDITION_COMPLETE_PERSONAL_INFORMATION_MOBILE': h("span", { innerHTML: SIiPhoneX }),
40
46
  'CONDITION_COMPLETE_PERSONAL_INFORMATION_GENDER': h("span", { innerHTML: SIUser }),
41
47
  'CONDITION_BUY_FROM_STORE_FOR_UNIT': h("span", { innerHTML: SICart2 }),
48
+ 'CONDITION_BUY_FROM_STORE_FOR_UNIT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
42
49
  'CONDITION_BUY_FROM_STORE_FIX_AMOUNT': h("span", { innerHTML: SICart2 }),
50
+ 'CONDITION_BUY_FROM_STORE_FIX_AMOUNT_BY_CATEGORIES': h("span", { innerHTML: SICart2 }),
43
51
  'order_from_pos_1': h("span", { innerHTML: SIiPhoneX }),
44
52
  'order_from_pos_2': h("span", { innerHTML: SILocation }),
45
53
  'buy_from_pos_1': h("span", { innerHTML: SIMapLocation }),
46
54
  'buy_from_pos_2': h("span", { innerHTML: SIiPhoneX }),
47
55
  'CONDITION_BUY_FROM_POS_FOR_UNIT': h("span", { innerHTML: SIiPhoneX }),
56
+ 'CONDITION_BUY_FROM_POS_FOR_UNIT_BY_CATEGORIES': h("span", { innerHTML: SIiPhoneX }),
48
57
  'CONDITION_BUY_FROM_POS_FIX_AMOUNT': h("span", { innerHTML: SIiPhoneX }),
58
+ 'CONDITION_BUY_FROM_POS_FIX_AMOUNT_BY_CATEGORIES': h("span", { innerHTML: SIiPhoneX }),
49
59
  'affiliate_link_1': h("span", { innerHTML: SILink1 }),
50
60
  'affiliate_link_2': h("span", { innerHTML: SIUserAdd }),
51
61
  'affiliate_link_3': h("span", { innerHTML: SICart2 }),
@@ -141,6 +151,22 @@ export class SallaLoyaltyPoint {
141
151
  return '';
142
152
  }
143
153
  }
154
+ getSteps(point) {
155
+ if (!!point.steps.length) {
156
+ return (h("div", { class: "s-loyalty-program-points-chains-wrapper" }, h("ul", { class: "s-loyalty-program-points-chain-list" }, this.point.steps.map((step, idx) => h("li", { class: "s-loyalty-program-points-chain-item" }, h("div", { class: "s-loyalty-program-points-chain-icon" }, h("div", { class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xs s-loyalty-program-circle-variant-outline-primary" }, sicons[step.key]), h("div", { class: "s-loyalty-program-points-chain-line" })), h("div", { class: "s-loyalty-program-points-chain-content" }, h("salla-badge", { size: "xs", color: "primary-900", bg: "primary-100" }, h("span", { innerHTML: SIGift }), h("span", null, salla.lang.get(`pages.loyalty_program.step_${idx + 1}`))), h("p", { class: "s-loyalty-program-points-chain-description" }, salla.lang.get(`pages.loyalty_program.${step.key}`, { points: this.point.points }))))))));
157
+ }
158
+ return '';
159
+ }
160
+ getDetails(point) {
161
+ if (point.conditions.filter(c => c.key.endsWith('_BY_CATEGORIES')).length > 0) {
162
+ return (h("div", null, h("div", { class: "s-loyalty-program-point-subheading" }, h("h2", null, salla.lang.get('pages.loyalty_program.how_to_use')), h("p", null, salla.lang.get('pages.loyalty_program.how_to_use_steps'))), h("div", { class: "s-loyalty-program-points-modal-details" }, point.conditions.map((condition) => h("div", { class: "s-loyalty-program-points-chains-wrapper mt-5 mb-5" }, h("div", { class: "s-loyalty-program-points-chain-item" }, h("div", { class: "s-loyalty-program-points-chain-icon" }, h("div", { class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xs s-loyalty-program-circle-variant-outline-primary" }, sicons[condition.key])), h("div", { class: "s-loyalty-program-points-chain-content" }, h("salla-badge", { size: "xs", color: "primary-900", bg: "primary-100" }, h("span", { innerHTML: SIGift }), formattedPointsJsx(condition.points, isUnitOrder(point))), h("p", { class: "s-loyalty-program-points-chain-description" }, condition.name), h("div", null, this.getCategoriesJsx(condition.value)))))))));
163
+ }
164
+ return (h("div", { class: "s-loyalty-program-points-modal-details" }, h("div", { class: "s-loyalty-program-points-chains-wrapper mt-5 mb-5" }, h("ul", { class: "s-loyalty-program-points-chain-list" }, this.point.conditions.map((condition) => h("li", { class: "s-loyalty-program-points-chain-item" }, h("div", { class: "s-loyalty-program-points-chain-icon" }, h("div", { class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xs s-loyalty-program-circle-variant-outline-primary" }, sicons[condition.key]), h("div", { class: "s-loyalty-program-points-chain-line" })), h("div", { class: "s-loyalty-program-points-chain-content" }, h("salla-badge", { size: "xs", color: "primary-900", bg: "primary-100" }, h("span", { innerHTML: SIGift }), formattedPointsJsx(condition.points, isUnitOrder(point), condition.value != null)), h("p", { class: "s-loyalty-program-points-chain-description" }, condition.name))))))));
165
+ }
166
+ getCategoriesJsx(categories) {
167
+ return !categories.length ? '' :
168
+ h("ul", { class: c('reward-details-categories-list') }, categories.map((category) => (h("li", null, h("a", { href: category.url, class: c('reward-details-categories-item') }, h("span", { innerHTML: SITag }), h("span", { class: c('reward-details-categories-item-content') }, category.name))))));
169
+ }
144
170
  getTrailingContent(point) {
145
171
  switch (point.type) {
146
172
  case 'first_order':
@@ -151,7 +177,7 @@ export class SallaLoyaltyPoint {
151
177
  }
152
178
  }
153
179
  render() {
154
- return (h("div", { key: '1a96a88716d9fa2b3e8aac4864a025824c48d36a' }, h("div", { key: '13bc00fa473bfb16b272d751b45ad7384db0fc43', onClick: () => closeModals(() => this.modal.open()), class: "s-loyalty-program-point-wrapper" }, h("div", { key: 'a7d6d5f9692c7454d6bd9aa350c4934ec1704002', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-sm s-loyalty-program-circle-variant-fill" }, h("span", { key: '2e26922099bbc8d1d46d48d807f09b195868a262', class: this.point.icon })), h("div", { key: 'ea7c80d9fd595d1e319fb9840cfa7dc439ad2bbb', class: "s-loyalty-program-points-badge-mobile" }, h("salla-badge", { key: '76c01bd0380e5729989ae4b748d7e59f334b40b8', size: "xs", bg: "transparent" }, h("span", { key: 'b459db33b3926952415e2ac6a9b383a53467bc7f', innerHTML: SIGift }), formattedPointsJsx(this.point))), h("div", { key: '528f5f6e1c36c637b69684d95ec304f9c129400e', class: "s-loyalty-program-points-badge-desktop" }, h("salla-badge", { key: '9360900b49e9b122c3de07ad08de0cc0e8eccec4', size: "sm", bg: "transparent" }, h("span", { key: '7786c402cb6b946f9fd6402e1d066ad58ae4c0d4', innerHTML: SIGift }), formattedPointsJsx(this.point))), h("p", { key: 'e6e4e93f0cdbd7dfd0dc39f279cac0bbb9ca4fa8', class: "s-loyalty-program-point-description" }, this.point.name), this.point.is_completed ?
180
+ return (h("div", { key: 'da9f8ed073dad418e72c05c54b0362dbd35f3935' }, h("div", { key: '884b4463371c9e806c5a0b050eb977628b46c800', onClick: () => closeModals(() => this.modal.open()), class: "s-loyalty-program-point-wrapper" }, h("div", { key: 'eb992d3f22972cd1bcfd475f35652a99887450c0', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-sm s-loyalty-program-circle-variant-fill" }, h("span", { key: '449c106f8babe36f6cc9b2273886aa4e2b81fe15', class: this.point.icon })), h("div", { key: 'e52de07a850e0e46799aba2f031f492d8f18dcb3', class: "s-loyalty-program-points-badge-mobile" }, h("salla-badge", { key: '4174dd5fa7c2e60725d53b3e9d7868a5f450f7ba', size: "xs", bg: "transparent" }, h("span", { key: 'a8ff60258c58e6901d7438c239296ce2563cafd2', innerHTML: SIGift }), formattedPointsJsx(this.point))), h("div", { key: '2196dee1a40e48a2cb7e53038e7e42a39863ad72', class: "s-loyalty-program-points-badge-desktop" }, h("salla-badge", { key: 'fd3ccf58c671317ceffdd0615c443671354a31de', size: "sm", bg: "transparent" }, h("span", { key: 'f21842a6f380f20d4de80df057852cbd48befa4e', innerHTML: SIGift }), formattedPointsJsx(this.point))), h("p", { key: '7593ae79293d532ec6c3e6456c3434fc5b2beb29', class: "s-loyalty-program-point-description" }, this.point.name), this.point.is_completed ?
155
181
  h("a", { class: {
156
182
  's-loyalty-program-points-action': true,
157
183
  's-loyalty-program-points-action-completed': this.point.is_completed,
@@ -161,16 +187,12 @@ export class SallaLoyaltyPoint {
161
187
  's-loyalty-program-points-action': true,
162
188
  's-loyalty-program-points-action-completed': this.point.is_completed,
163
189
  's-loyalty-program-points-action-incomplete': !this.point.is_completed,
164
- } }, this.point.description)), h("salla-modal", { key: '1b4bbdf4a31b15a05de6e82eaba7e41623bb7926', ref: modal => this.modal = modal, class: "s-loyalty-program-point-modal s-loyalty-program-modal", width: window.matchMedia('(min-width: 768px)').matches ? 'md' : 'sm', noPadding: true }, h("div", { key: 'dd47de6d728d0e242ba907df2ad5efac90eca3bc', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '5b683091ac479ada36a8a653379973399ef7a9e9', class: "s-loyalty-program-points-modal-info" }, this.point.name)), h("div", { key: '76a05aedcc3b13f44709e369bf16c9c992689406', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: 'a71c0eb9f39a103728974e687dfcb9be5d8d9be7', class: "s-loyalty-program-points-modal-main" }, h("div", { key: 'de83e494131791cae7df3782489be5f1d2ffcb4d', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '2c8faf8db0b4984d0c9319e18343e41d9a6d0d26', class: this.point.icon })), h("salla-badge", { key: 'b29e2f350840663bb36dff05124aa58a3c774640', size: "sm", bg: "light" }, h("span", { key: '0d6cc163f3b14710bca60c5e4fb9c602ff8416a1', innerHTML: SIGift }), h("span", { key: 'a9ddb1a5ed1c69e0c2017691f67d360f189d4b37', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.point)))), this.getSubHeading(this.point), h("div", { key: '3327f05f80fec2ddceed0e6f230f0a99020445cc', class: "s-loyalty-program-points-modal-details" }, h("div", { key: 'd5505b3ab399f5d0b668c02bbf441eee33b4a1b2', class: "s-loyalty-program-points-chains-wrapper" }, h("ul", { key: 'dc9b64ad5795e87a12ffd104c5d6bbbade1c2a2e', class: "s-loyalty-program-points-chain-list" }, !!this.point.steps && Object.keys(this.point.steps).length > 0
165
- ? Object.values(this.point.steps).map((step, idx) => {
190
+ } }, this.point.description)), h("salla-modal", { key: '90be47d92f0ae74242c304c3b8d5c12c5a0a4649', ref: modal => this.modal = modal, class: "s-loyalty-program-point-modal s-loyalty-program-modal", width: window.matchMedia('(min-width: 768px)').matches ? 'md' : 'sm', noPadding: true }, h("div", { key: '00afe4584f14da0fd383f7e3109486541ca157f7', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: 'd6af2b363b64fa2490bcaf1039f7128e63df6121', class: "s-loyalty-program-points-modal-info" }, this.point.name)), h("div", { key: 'e3cf11bcab3be81bfa63f03a75f2d655c38fc95e', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: 'ce0a574cbcaabd7ac589e1e3be33708e664dbc08', class: "s-loyalty-program-points-modal-main" }, h("div", { key: 'c974151e5162d8dd0ab2bc75bae20966efb268f1', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '81d369d4f8d7ee6650cef1b55ce740c64716b2bd', class: this.point.icon })), h("salla-badge", { key: '0146ac225e7d54d14bcf5e53ba6c5325e0da260f', size: "sm", bg: "light" }, h("span", { key: '0653cb7799ed999c61cd7d5b6d350bcbaf7a5d95', innerHTML: SIGift }), h("span", { key: '67a397aabbc889ceff3cdcf1e37ecc2614702369', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.point)))), this.getSubHeading(this.point), !!this.point.steps && Object.keys(this.point.steps).length > 0 &&
191
+ h("div", { key: '3d270563818b923112c889b291ad72ef6a15b9bc', class: "s-loyalty-program-points-modal-details" }, h("div", { key: '0157d2d96b4b7dac9c687cef58af87fdb4871fc1', class: "s-loyalty-program-points-chains-wrapper" }, h("ul", { key: '469624383bad345a97ca9b74980d2a1499aa1b6a', class: "s-loyalty-program-points-chain-list" }, Object.values(this.point.steps).map((step, idx) => {
166
192
  const stepsArray = Object.values(this.point.steps);
167
193
  const isLastItem = idx === stepsArray.length - 1;
168
194
  return (h("li", { class: "s-loyalty-program-points-chain-item" }, h("div", { class: "s-loyalty-program-points-chain-icon" }, h("div", { class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xs s-loyalty-program-circle-variant-outline-primary" }, sicons[step.key]), !isLastItem && h("div", { class: "s-loyalty-program-points-chain-line" })), h("div", { class: "s-loyalty-program-points-chain-content" }, h("salla-badge", { size: "xs", color: "primary-900", bg: "primary-100" }, h("span", null, salla.lang.get(`pages.loyalty_program.step_${idx + 1}`))), h("p", { class: "s-loyalty-program-points-chain-description" }, step.title || step.name))));
169
- })
170
- : this.point.conditions?.map((condition, idx) => {
171
- const isLastItem = idx === this.point.conditions.length - 1;
172
- return (h("li", { class: "s-loyalty-program-points-chain-item" }, h("div", { class: "s-loyalty-program-points-chain-icon" }, h("div", { class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xs s-loyalty-program-circle-variant-outline-primary" }, sicons[condition.key]), !isLastItem && h("div", { class: "s-loyalty-program-points-chain-line" })), h("div", { class: "s-loyalty-program-points-chain-content" }, h("salla-badge", { size: "xs", color: "primary-900", bg: "primary-100" }, h("span", { innerHTML: SIGift }), formattedPointsJsx(condition.points ?? 0)), h("p", { class: "s-loyalty-program-points-chain-description" }, condition.name))));
173
- }))), this.getTrailingContent(this.point)), !this.point.branches?.length ? '' : h("div", { class: "s-loyalty-program-points-modal-list" }, h("div", { class: "s-loyalty-program-point-details-branches" }, h("h2", null, salla.lang.get('pages.loyalty_program.branches')), h("p", null, salla.lang.get('pages.loyalty_program.shop_from_branches'))), h("div", { class: "s-loyalty-program-points-modal-list-wrapper" }, h("ul", null, this.point.branches.map((branch) => (h("li", { class: "s-loyalty-program-points-modal-list-item" }, h("p", null, branch.name), h("salla-badge", { size: "sm", bg: "transparent" }, h("span", { innerHTML: SIGift }), h("a", { href: branch.location ? `https://www.google.com/maps?q=${branch.location.lat},${branch.location.lon}` : '#', target: "_blank", rel: "noopener noreferrer" }, branch.address_description))))))))), h("div", { key: '685d0de853bd3becf1c10529768a5952b6365517', class: "s-loyalty-program-points-modal-action" }, h("a", { key: '806543e483c0872139ee395ee9ba2dbe27061564', href: this.point.url, onClick: (e) => (e.stopPropagation(), this.handleAction(e, this.point)), class: {
195
+ })))), this.getDetails(this.point), h("div", { key: 'bba31447df26e2a50a28cb6af922d49ec52a854b', class: "s-loyalty-program-points-modal-details" }, this.getTrailingContent(this.point)), !this.point.branches?.length ? '' : h("div", { class: "s-loyalty-program-points-modal-list" }, h("div", { class: "s-loyalty-program-point-details-branches" }, h("h2", null, salla.lang.get('pages.loyalty_program.branches')), h("p", null, salla.lang.get('pages.loyalty_program.shop_from_branches'))), h("div", { class: "s-loyalty-program-points-modal-list-wrapper" }, h("ul", null, this.point.branches.map((branch) => (h("li", { class: "s-loyalty-program-points-modal-list-item" }, h("p", null, branch.name), h("salla-badge", { size: "sm", bg: "transparent" }, h("span", { innerHTML: SIGift }), h("a", { href: branch.location ? `https://www.google.com/maps?q=${branch.location.lat},${branch.location.lon}` : '#', target: "_blank", rel: "noopener noreferrer" }, branch.address_description))))))))), h("div", { key: 'c6c84d25fddc848235682d14cc0e4755e91deb95', class: "s-loyalty-program-points-modal-action" }, h("a", { key: '1f7fbf431f89bb0d08e531ea4e6fb41109cad50e', href: this.point.url, onClick: (e) => (e.stopPropagation(), this.handleAction(e, this.point)), class: {
174
196
  's-loyalty-program-points-action': true,
175
197
  's-loyalty-program-points-action-completed': this.point.is_completed,
176
198
  's-loyalty-program-points-action-incomplete': !this.point.is_completed,
@@ -89,7 +89,13 @@ export class SallaLoyaltyProgram {
89
89
  ? h("span", null, salla.lang.get('pages.loyalty_program.show_more'), "\u00A0\u00A0", h("span", { style: { fontSize: '1.2rem', fontWeight: '300' } }, "+"))
90
90
  : h("span", null, salla.lang.get('pages.loyalty_program.show_less'), "\u00A0\u00A0", h("span", { style: { fontSize: '1.2rem', fontWeight: '300' } }, "-"))))), this.program.status !== 'success' ? '' : h("div", { class: "s-loyalty-program-rewards-container s-loyalty-program-slider-arrows-edges" }, h("section", { class: {
91
91
  's-loyalty-program-tabs-hider': prizesGroups.length <= 2 || prizesCount <= 4,
92
- } }, h("h1", { class: "s-loyalty-program-rewards-heading-mobile" }, salla.lang.get('pages.loyalty_program.rewards')), h("salla-tabs", null, h("div", { slot: "header", class: "s-loyalty-program-rewards-tab-items" }, prizesGroups.map((group) => (h("salla-tab-header", { slot: "header", name: group.type }, sicons[group.type], h("span", null, group.title))))), h("h1", { slot: "header", class: "s-loyalty-program-rewards-heading-desktop" }, salla.lang.get('pages.loyalty_program.rewards')), prizesGroups.map((group) => (h("salla-tab-content", { slot: "content", name: group.type }, h("salla-slider", { id: group.type, type: "default", "slider-config": '{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":12,"breakpoints":{"768":{"slidesPerView":4,"spaceBetween":24,"freeMode":false,"speed":300}}}' }, h("div", { slot: "items" }, group.items.map((prize) => h("salla-reward-card", { prize: prize, onAreaClick: () => { this.currentPrize = prize; closeModals(() => this.detailsModal.open()); }, onActionClick: () => { this.currentPrize = prize; closeModals(() => this.detailsModal.open()); } })))))))), h("salla-modal", { ref: modal => this.detailsModal = modal, class: "s-loyalty-program-modal", width: "md", noPadding: true }, !this.currentPrize ? '' : h("salla-reward-details", { onActionClick: () => closeModals(() => this.exchangeModal.open()), prize: this.currentPrize })), h("salla-modal", { ref: modal => this.exchangeModal = modal, class: "s-loyalty-program-modal", width: "sm" }, !this.currentPrize ? '' : h("salla-reward-exchange", { prize: this.currentPrize }))))));
92
+ } }, h("h1", { class: "s-loyalty-program-rewards-heading-mobile" }, salla.lang.get('pages.loyalty_program.rewards')), h("salla-tabs", null, h("div", { slot: "header", class: "s-loyalty-program-rewards-tab-items" }, prizesGroups.map((group) => (h("salla-tab-header", { slot: "header", name: group.type }, sicons[group.type], h("span", null, group.title))))), h("h1", { slot: "header", class: "s-loyalty-program-rewards-heading-desktop" }, salla.lang.get('pages.loyalty_program.rewards')), prizesGroups.map((group) => (h("salla-tab-content", { slot: "content", name: group.type }, h("salla-slider", { id: group.type, type: "default", "slider-config": '{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":12,"breakpoints":{"768":{"slidesPerView":4,"spaceBetween":24,"freeMode":false,"speed":300}}}' }, h("div", { slot: "items" }, group.items.map((prize) => h("salla-reward-card", { prize: prize, onAreaClick: () => {
93
+ this.currentPrize = prize;
94
+ closeModals(() => this.detailsModal.open());
95
+ }, onActionClick: () => {
96
+ this.currentPrize = prize;
97
+ closeModals(() => this.detailsModal.open());
98
+ } })))))))), h("salla-modal", { ref: modal => this.detailsModal = modal, class: "s-loyalty-program-modal", width: "md", noPadding: true }, !this.currentPrize ? '' : h("salla-reward-details", { onActionClick: () => closeModals(() => this.exchangeModal.open()), prize: this.currentPrize })), h("salla-modal", { ref: modal => this.exchangeModal = modal, class: "s-loyalty-program-modal", width: "sm" }, !this.currentPrize ? '' : h("salla-reward-exchange", { prize: this.currentPrize }))))));
93
99
  }
94
100
  static get is() { return "salla-loyalty-program"; }
95
101
  static get originalStyleUrls() {
@@ -31,10 +31,10 @@ export class SallaLoyaltyReward {
31
31
  };
32
32
  }
33
33
  render() {
34
- return (h("div", { key: 'ba9554fee3ffeb4e64410913c6f78217482eaa9b', class: {
34
+ return (h("div", { key: 'cc64d1446b539fa06a6fea4280992264816fed40', class: {
35
35
  's-loyalty-program-reward-container': true,
36
36
  's-loyalty-program-reward-xs': this.size === 'xs',
37
- } }, h("div", { key: '807e949da96e8b307ed252e32ffafac682835a28', onClick: this.handleActionArea, role: "button" }, h("div", { key: '373862674986def57f35e1d006f41cb6b01b1e75', class: "s-loyalty-program-reward-img" }, h("img", { key: 'b8b072e962519aaf78d19c04759ee1590b0dd6de', src: this.prize.image, class: "s-loyalty-program-rewards-img", alt: "" })), h("div", { key: '9866bf65f0a26c3136b3e345094314c6552bd70e', class: "s-loyalty-program-reward-content" }, h("div", { key: 'ee8455df80b61e1c8d86059725e5da5952dab85a', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '27b8f31d4b71255f1298bfd2c5705520b349db59', size: "xs" }, h("span", { key: 'e94f13b973bf0b5171b3aa1dd075ad5a0ee732c5', innerHTML: SIGift }), h("span", { key: '7776cb3a470b72ca2239fb2c8452711bf5dc59e2', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: '03dbed2bca1a462f8e4a13bbbb373d236f2da8ad', class: "s-loyalty-program-reward-title" }, h("span", { key: 'ca64b8c7378baa7e7c4197580290f71ecead8310' }, this.group)), h("div", { key: '3f8e125da5dc4618f82033c2b9e4b9c97760821f', class: "s-loyalty-program-reward-name" }, h("div", { key: 'a2494d8a25a09dd66871d55c762f90a351a54b52', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name)))), h("div", { key: 'fe4e03bdab2d95b5adee8b6ae4c51f96186d6016', class: "p-4" }, h("button", { key: '1d33bd0616d4c8e51f2b01cad7bff02c2842d935', onClick: this.handleAction, disabled: !this.isActionClickable(this.prize), class: {
37
+ } }, h("div", { key: 'c50cc16ceff89288dc0bd4199123e0cfb7816732', onClick: this.handleActionArea, role: "button" }, h("div", { key: '7a68197172329f91e7df1e13ca667062131e14b8', class: "s-loyalty-program-reward-img" }, h("img", { key: 'f1d9dc5fc674095bfdfcb5d167f46d896f9a9b0c', src: this.prize.image, class: "s-loyalty-program-rewards-img", alt: "" })), h("div", { key: 'b443d55df65a1f34fdff14a3beda5b159fe687f8', class: "s-loyalty-program-reward-content" }, h("div", { key: '292dcd5f9997f82fd0695fdd80380180e781b77f', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '083348231855223ff3ffc66b61847af85d274e19', size: "xs" }, h("span", { key: '5939fae8cd6737c98f6cab437cefdb89b0847bbb', innerHTML: SIGift }), h("span", { key: '155ad221e00b1d21db2b16a8c1d394b302897cda', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: 'ab9d0e10acfc7e1bd5464a971cd6ff7eedf90d52', class: "s-loyalty-program-reward-title" }, h("span", { key: '3fcc04b5a81dd29b1b40411c95bebe8805ffb2bb' }, this.group)), h("div", { key: '2ffe9cb9c295cf817224b8d8aab7f1b413893f2f', class: "s-loyalty-program-reward-name" }, h("div", { key: 'e384ac797eb91704951e91f6fadf4863a9e9971c', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name)))), h("div", { key: '887bb1eb44d945a66af21a88de60d09275fd5042', class: "p-4" }, h("button", { key: '704b697973f51cdcc67ba62a8b4d806d4abb5461', onClick: this.handleAction, disabled: !this.isActionClickable(this.prize), class: {
38
38
  's-loyalty-program-rewards-action-base': true,
39
39
  's-loyalty-program-rewards-action-on': this.isActionClickable(this.prize),
40
40
  's-loyalty-program-rewards-action-off': !this.isActionClickable(this.prize),
@@ -20,7 +20,10 @@ export class SallaRewardAction {
20
20
  };
21
21
  }
22
22
  render() {
23
- return (h("div", { key: '95d6e753d49c7cb69e6f5e25ef6ccf3f916f4022', class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (h("a", { href: this.prize.prize_url || salla.url.get(''), class: {
23
+ if (!this.isClickable(this.prize)) {
24
+ return null;
25
+ }
26
+ return (h("div", { class: "s-loyalty-program-rewards-modal-action" }, this.isShopNow(this.prize) ? (h("a", { href: this.prize.prize_url || salla.url.get(''), class: {
24
27
  's-loyalty-program-rewards-action-base': true,
25
28
  's-loyalty-program-rewards-action-on': true,
26
29
  } }, salla.lang.get('pages.loyalty_program.shop_now'))) : (h("button", { onClick: this.handleClick, class: {
@@ -5,7 +5,7 @@ import { h, Host } from "@stencil/core";
5
5
  import SIGift from "../../assets/svg/gift.svg";
6
6
  export class SallaRewardCard {
7
7
  render() {
8
- return (h(Host, { key: '900a20618e1b3ce82778aa99715baf61689f3eee', class: "s-loyalty-program-reward-host" }, h("div", { key: '95b326008c2799ee7d38b48bc57e0860a9386184', class: "s-loyalty-program-reward-container" }, h("div", { key: 'd846dc36fa4494ed9ac6152a982f18598936969f', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: 'b8d23796827e4b07f6c271c50fa0e4aeb59f82fc', class: "s-loyalty-program-reward-img" }, h("img", { key: '04a52401941d8a731e8d310397b1ad735bfe44db', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: '64fa967c98d615d7b16859c9d14b60e0c53fc5aa', class: "s-loyalty-program-reward-content" }, h("div", { key: 'bb8c34ce8f3bcec9599c87b56bea6abd793187df', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: 'f7d0a396cf754d1e8f9e8fddee53a7d545311148', size: "xs" }, h("span", { key: '36f4e1ed873f1a231e2d5e51a2a8cc36bdcedfee', innerHTML: SIGift }), h("span", { key: '638b3ecefbfcb424869987ab33478e67d9b5d9b8', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: '6f8386fccf201836d76a86e7fe5e6d3461bb5540', class: "s-loyalty-program-reward-title" }, h("span", { key: '6d6692c44d6bac35da40108514471a3c56884d81' }, this.prize.group_title)), h("div", { key: '6ad9ad90728ac7f882ff8db9cfadb5a6e12f3e25', class: "s-loyalty-program-reward-name" }, h("div", { key: 'ef4344c7cb67785a4cd66d36e303e40a610a5375', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: '5eee5a4f8b10cd790ce41e4a99d94f86bd26dd3b', class: "p-4" }, h("slot", { key: '359d50033cdd3cce41901401bf0b75ba9c5aea1f', name: "action" }, h("button", { key: 'ea7aa1c5cd50937a27cef7580e508a1e3f8f852d', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
8
+ return (h(Host, { key: '8e688793dec09f19093df23deacfd7ecaac100b7', class: "s-loyalty-program-reward-host" }, h("div", { key: '12663908467c428e861f999fa6449810207b9399', class: "s-loyalty-program-reward-container" }, h("div", { key: '8b01e444f083bafcd1036962113921e876be942a', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: 'a90032821b870b9fe915a3bdceb5422bacc66c3c', class: "s-loyalty-program-reward-img" }, h("img", { key: '70f872cb5c17cb8c05df6cdcd767f5b0b018f182', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: 'af161adc0a211ddb2c3702ee81cc47bf275a8b3d', class: "s-loyalty-program-reward-content" }, h("div", { key: '5f420a70d14120075ac394ced39b7d37477b8042', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '58df0147fce4aa22479474ff4e3b327dca4165c0', size: "xs" }, h("span", { key: 'e59fc1b27e38e45560d4469d2e8fad0ef1c80915', innerHTML: SIGift }), h("span", { key: '9272311f41a78628c2ff6b78acb25e0b04cc3a95', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: '297b130a68d6b64659a6eb832baccf8a5884db78', class: "s-loyalty-program-reward-title" }, h("span", { key: '7e9d42268e77dffb2dda963cc046fb09015c4ee7' }, this.prize.group_title)), h("div", { key: 'f70b7369222792657b02909aed7bacf2a61f24f6', class: "s-loyalty-program-reward-name" }, h("div", { key: '8f1bd6ffb8190d455006e111a013946b3569c24e', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: 'a5a7d0acba4a00be16db6b277a0a5eb39b88153b', class: "p-4" }, h("slot", { key: 'e2fcb1189b103f419884b05518af74cfd1c5eeb7', name: "action" }, h("button", { key: 'e0522ba4b684bcabae4483dfd36d00cafb86d511', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
9
9
  }
10
10
  static get is() { return "salla-reward-card"; }
11
11
  static get originalStyleUrls() {
@@ -113,11 +113,11 @@ export class SallaRewardDetails {
113
113
  }
114
114
  render() {
115
115
  const termsAndConditions = this.getTermsAndConditions();
116
- return (h("div", { key: '280d646eff094c16596ca31ee57f4bd104958f8c', class: "s-loyalty-program-reward-modal" }, h("div", { key: 'a39d376f170684f754c4357dc64d02b5ffbb1ed2', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '654e061c8852461a5248248ed2d95ef02a8a4711', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
116
+ return (h("div", { key: '2b8f4348fb0e728665b53db47719686629c1836d', class: "s-loyalty-program-reward-modal" }, h("div", { key: '1c838eaa84818ee590a36062b68a505bca8e7c68', class: "s-loyalty-program-points-modal-header" }, h("h1", { key: '2912070e266711897fec27c3a3e663677fd605df', class: "s-loyalty-program-points-modal-info" }, !salla.url.is_page('cart') ? ''
117
117
  : h("button", { class: "s-loyalty-program-back-btn", onClick: () => closeModals(() => salla.event.dispatch('modal::open', 'loyalty-rewards-modal')) }, h("span", { class: {
118
118
  'sicon-arrow-right': document.documentElement.getAttribute('dir') === 'rtl',
119
119
  'sicon-arrow-left': document.documentElement.getAttribute('dir') === 'ltr',
120
- } })), this.prize.name)), h("div", { key: '8dce07ce81b0d6879efc0cba88523b6d3daf42bb', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: 'f288d7483911af0bbc17a824ee4397ad0b3ef367', class: "s-loyalty-program-reward-details-header" }, h("div", { key: '87686174a3a8c17558d0a97180cb4756a1edbefe', class: "s-loyalty-program-aspect-container" }, h("img", { key: '31461e1503c50715f160e75cf7ffad59939fb93c', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: 'ed1fc08260885fa865279a9d2fc6af35c01e2bdc', size: "sm", bg: "light" }, h("span", { key: '26eec953f9c5f3fa5aa118828faec50a4477e013', innerHTML: SIGift }), h("span", { key: 'db3bf908be0f28534e121da9e692d801d2ee6cf9', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: 'bfdc4d22117ae86f3bb2140546b4b5a8ecd35f8e', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: 'f03b30c0372fd83e4fa7815bbd76d307c6fbe3c1', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: '245acd0b8438230ff5d503e5819abb581f0ba14a', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
120
+ } })), this.prize.name)), h("div", { key: '0d7f102d7031fcae33670435d9fa3a7d40a0fbc4', class: "s-loyalty-program-modal-scrollable-content" }, h("div", { key: '0aa1b6206852391cae2bdd83452b3ed1dca4ef52', class: "s-loyalty-program-reward-details-header" }, h("div", { key: 'b8de08abbd4ed24367312ecd8e36b9b203dc24cb', class: "s-loyalty-program-aspect-container" }, h("img", { key: 'd327bd9cc47042cc694fda8f38a130686caeaeb6', src: this.prize.image, alt: this.prize.name })), h("salla-badge", { key: 'dbb6d24e2f647bd93bc2cb2d174c747e8117b1cb', size: "sm", bg: "light" }, h("span", { key: '8e78d674f565f2274796a57b218a14f683e29149', innerHTML: SIGift }), h("span", { key: '3e959d7d67a899a429c2c2100236527268c98905', class: "s-loyalty-program-points-badge-points" }, formattedPointsJsx(this.prize.cost_points)))), !termsAndConditions.length ? '' : h("div", { class: "s-loyalty-program-terms-and-conditions" }, h("h1", { class: "s-loyalty-program-terms-and-conditions-heading" }, salla.lang.get('pages.loyalty_program.terms_and_conditions')), h("ul", { class: "s-loyalty-program-terms-and-conditions-list" }, termsAndConditions.map(([title, points]) => (h("li", { class: "s-loyalty-program-terms-and-conditions-item" }, h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, title), h("span", { class: "s-loyalty-program-terms-and-conditions-content" }, points)))))), h("div", { key: 'b09d181ad0587d4d6f99020adc2b944778e3d491', class: "s-loyalty-program-reward-info-message" }, h("h1", { key: '7538f340d33fd34fd55728c3df1d43ff676ffa57', class: "s-loyalty-program-reward-info-message-heading" }, salla.lang.get('pages.loyalty_program.how_to_benefit_from_this_reward')), h("p", { key: '927078b3615900c8377c1563f7bfe3b6a4cd28d3', class: "s-loyalty-program-reward-info-message-content" }, this.getItemsMarkersText())), (this.prize.key === 'FREE_SHIPPING' || this.getItemsMarkers('both') === '000000') ? '' : h("div", { class: "s-loyalty-program-reward-details" }, h("salla-tabs", { key: this.refreshKey }, this.getItemsMarkers('included') === '000' ? '' : [
121
121
  h("salla-tab-header", { slot: "header", name: "included", style: {
122
122
  display: this.getItemsMarkers('excluded') === '000' ? 'none' : 'block',
123
123
  } }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICheck }), h("span", null, salla.lang.get(`pages.loyalty_program.included`))),
@@ -127,7 +127,7 @@ export class SallaRewardDetails {
127
127
  display: this.getItemsMarkers('included') === '000' ? 'none' : 'block',
128
128
  } }, h("span", { class: "s-loyalty-program-reward-details-tab-icon", innerHTML: SICancel }), h("span", null, salla.lang.get(`pages.loyalty_program.excluded`))),
129
129
  h("salla-tab-content", { slot: "content", name: "excluded" }, h("div", { class: "s-loyalty-program-reward-details-items-wrapper" }, this.getCategoriesJsx(this.getIncludedItems(this.prize.excludedCategories, this.prize.excluded_category_ids), salla.lang.get('pages.loyalty_program.excluded_categories')), this.getBrandsJsx(this.getIncludedItems(this.prize.excludedBrands, this.prize.excluded_brand_ids), salla.lang.get('pages.loyalty_program.excluded_brands')), this.getProductsJsx(this.getProductIds(this.prize.excluded_product_ids), salla.lang.get('pages.loyalty_program.excluded_products')))),
130
- ]))), h("salla-reward-action", { key: 'e129546afde7da7fe66e250ce4de67d4523727be', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
130
+ ]))), h("salla-reward-action", { key: '0d03ebd0fcf1f7469b75b04d9ad82b71a284d0d1', onActionClick: e => this.actionClick.emit(e.detail), prize: this.prize })));
131
131
  }
132
132
  static get is() { return "salla-reward-details"; }
133
133
  static get originalStyleUrls() {
@@ -43,11 +43,11 @@ export class SallaRewardExchange {
43
43
  this.reset(0);
44
44
  }
45
45
  render() {
46
- return (h(Host, { key: 'ceecba37884a11443b52b76dad69bd164b52b788' }, h("div", { key: '598f185363b917969b9de0fb6a536884d6578c95', class: "s-loyalty-program-exchange-heading" }, h("div", { key: 'a2aa6b15d97533a973f7f2fb6a2cf517c147367d', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '9745001d514643add62fe9a64df7fc2c0a694513', innerHTML: SIGift })), h("h2", { key: '4819327aacc1307c0f75014d9faef50f55115289' }, salla.lang.get('pages.loyalty_program.redeem_reward')), h("p", { key: 'b39c99abcefb0f3baf609cd21049b083a115cdef' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", h("span", { key: '50852d87c9686f66beddc7b0a0a3062f0ced1a61' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", h("span", { key: '5a4baa0f02859ced6fdcf7ce77c31bf9b27c45e6' }, "(", this.prize.name, ")"))), h("div", { key: 'b1f1067bd0f3a84231ac017f4b66a71277a5d209', class: "s-loyalty-program-exchange-btns" }, h("button", { key: '7d4ce6c08fcac58290b364a0df55f8acb715d362', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-confirm", onClick: () => this.handleConfirm() }, h("span", { key: 'ef1deb96c4bbb2843ae088b539848c15aacdb244', style: {
46
+ return (h(Host, { key: '44934c0c0574ea61c4ef293a9deb796a2d42c02b' }, h("div", { key: 'eca62e786a5d13d4578cc5badcd464ee1570541b', class: "s-loyalty-program-exchange-heading" }, h("div", { key: '14b346e172b9859449b780ec7c22e81ec2e97a8c', class: "s-loyalty-program-circle-base s-loyalty-program-circle-size-xl s-loyalty-program-circle-variant-fill" }, h("span", { key: '472753cc4742c2b010729ed98cdbf58192b548fa', innerHTML: SIGift })), h("h2", { key: 'e77eeb994a91e36a8b04c213484221a6db2f99fd' }, salla.lang.get('pages.loyalty_program.redeem_reward')), h("p", { key: '7c9b9d6400ddeeb7a6ad8bdc1a2f364e9d67187b' }, salla.lang.get('pages.loyalty_program.redeem_confirmation'), " ", h("span", { key: '07eea7e08a596dd284ceb2d60d2489012457585e' }, "(", this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), ")"), " ", salla.lang.get('pages.loyalty_program.for'), " ", h("span", { key: '70d6c67bd78400626c1e2d91753a494df5e6d94d' }, "(", this.prize.name, ")"))), h("div", { key: '49d98bbcbb017bf3f9195734fbb80f1da8559746', class: "s-loyalty-program-exchange-btns" }, h("button", { key: 'a1775e84ef7c17effb54b6fdff83bad9ac8cf8ec', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-confirm", onClick: () => this.handleConfirm() }, h("span", { key: '28977f2f6990322cb194c19b01feeffd8117d1b8', style: {
47
47
  opacity: this.exchange.status !== 'pending' ? '1' : '0',
48
- } }, salla.lang.get('common.elements.confirm')), h("span", { key: '0f949386c85d7544f7098e2bdc8c7ce4390c4383', class: "s-loyalty-program-exchange-loading", style: {
48
+ } }, salla.lang.get('common.elements.confirm')), h("span", { key: '2ff77b13d468e5096d777e0179db9e257468ca53', class: "s-loyalty-program-exchange-loading", style: {
49
49
  opacity: this.exchange.status === 'pending' ? '1' : '0',
50
- } }, h("salla-loading", { key: '9cdfbfdc7ebfb2e1874f1956560dc464e4aa2a9f', color: "primary", size: 24 }))), h("button", { key: '79a2e8b44be5eb4b3ec5f1a285a8f4eba5324814', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
50
+ } }, h("salla-loading", { key: '415c1d497b93718ac0bc67e18442c28246e589e7', color: "primary", size: 24 }))), h("button", { key: '32d1a3f2e221261bd4ff459cc85dec5c780dd5e8', class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-cancel", onClick: () => this.handleCancel() }, salla.lang.get('common.elements.cancel')))));
51
51
  }
52
52
  static get is() { return "salla-reward-exchange"; }
53
53
  static get originalStyleUrls() {
@@ -22,6 +22,14 @@ const translations = {
22
22
  ar: 'خطوات بسيطة تفصلك عن المزيد من نقاط الولاء!',
23
23
  en: 'Two simple steps separate you from great rewards!',
24
24
  },
25
+ 'pages.loyalty_program.how_to_use': {
26
+ ar: 'آلية الإستخدام',
27
+ en: 'How to use?',
28
+ },
29
+ 'pages.loyalty_program.how_to_use_steps': {
30
+ ar: 'يمكنك اكتساب النقاط عند الشراء من التصنيفات المحددة',
31
+ en: 'You can earn points when you purchase from the selected categories.',
32
+ },
25
33
  'pages.loyalty_program.register': {
26
34
  ar: 'سجِّل',
27
35
  en: 'Register',
@@ -58,6 +66,10 @@ const translations = {
58
66
  ar: 'نقطة',
59
67
  en: 'points',
60
68
  },
69
+ 'pages.loyalty_program.start_from': {
70
+ ar: 'يبدأ من',
71
+ en: 'Start from',
72
+ },
61
73
  'pages.loyalty_program.redeem_reward': {
62
74
  ar: 'استبدل النقاط',
63
75
  en: 'Redeem Reward',
@@ -36,33 +36,60 @@ function brand_path(brand) {
36
36
  return [brand.name.replace(/\s/g, '-'), `brand-${brand.id}`].join('/');
37
37
  }
38
38
  function isUnitOrder(point) {
39
- for (const condition of (point.conditions ?? [])) {
40
- if (condition.key?.endsWith('_FOR_UNIT')) {
39
+ for (const condition of point.conditions) {
40
+ if (condition.key.endsWith('_FOR_UNIT') || condition.key.endsWith('_FOR_UNIT_BY_CATEGORIES')) {
41
41
  return true;
42
42
  }
43
43
  }
44
- return false;
45
44
  }
46
- function formattedPointsJsx(value) {
45
+ function isRangePoints(point) {
46
+ for (const condition of point.conditions) {
47
+ if (condition.key.endsWith('_BY_CATEGORIES') && point.conditions.length > 1) {
48
+ return true;
49
+ }
50
+ }
51
+ }
52
+ function getPoints(point) {
53
+ if (isRangePoints(point)) {
54
+ return point.conditions.sort((a, b) => a.points - b.points)[0].points;
55
+ }
56
+ return point.points;
57
+ }
58
+ function formattedPointsJsx(value, isUnit = false, isRange = false) {
47
59
  if (typeof value === 'number') {
60
+ if (isUnit) {
61
+ return h("span", null,
62
+ isRange ? salla.lang.get('pages.loyalty_program.start_from') : '',
63
+ " 1 ",
64
+ salla.config.currency().symbol,
65
+ " = ",
66
+ value,
67
+ " ",
68
+ salla.lang.get('pages.loyalty_program.point'));
69
+ }
48
70
  return h("span", null,
71
+ isRange ? salla.lang.get('pages.loyalty_program.start_from') : '',
72
+ " ",
49
73
  value,
50
74
  " ",
51
75
  salla.lang.get('pages.loyalty_program.point'));
52
76
  }
53
77
  if (isUnitOrder(value)) {
54
78
  return h("span", null,
55
- "1 ",
79
+ isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '',
80
+ " 1 ",
56
81
  salla.config.currency().symbol,
57
82
  " = ",
58
- value.points,
83
+ getPoints(value),
59
84
  " ",
60
85
  salla.lang.get('pages.loyalty_program.point'));
61
86
  }
62
87
  return h("span", null,
63
- value.points,
88
+ isRangePoints(value) ? salla.lang.get('pages.loyalty_program.start_from') : '',
89
+ " ",
90
+ getPoints(value),
64
91
  " ",
65
92
  salla.lang.get('pages.loyalty_program.point'));
66
93
  }
67
94
 
68
- export { nearestLowerMultiple as a, brand_path as b, closeModals as c, formattedPointsJsx as f, normalizeLoyaltyData as n };
95
+ export { nearestLowerMultiple as a, brand_path as b, closeModals as c, formattedPointsJsx as f, isUnitOrder as i, normalizeLoyaltyData as n };