@salla.sa/twilight-components 2.14.457 → 2.14.459

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/dist/cjs/{Helper-CU4Xuiki.js → Helper-CgGR9Qf8.js} +12 -0
  2. package/dist/cjs/{filepond-DI8ISGjS.js → filepond-DGjKsL4Z.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-ESJxh-Bw.js → filepond-plugin-file-poster-Q5BPSEn_.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-DxnZdfmW.js → filepond-plugin-file-validate-size-DqTmfsfu.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-COsVrixD.js → filepond-plugin-file-validate-type-D526i3dm.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-DiJ6-7Hm.js → filepond-plugin-image-edit-BDgIU9Go.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-BWCeP8LZ.js → filepond-plugin-image-exif-orientation-Da6QG4_J.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-pGgHkIkq.js → filepond-plugin-image-preview-CPb3lB8x.js} +1 -1
  9. package/dist/cjs/{functions-Eywmk_-l.js → functions-DIZLPj6n.js} +1 -1
  10. package/dist/cjs/{index-C5wAeBp0.js → index-C5VZF2SB.js} +1 -1
  11. package/dist/cjs/{index-C1PF-Plo.js → index-DFPCRma5.js} +6 -2
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +19 -9
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +2 -2
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  35. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +4 -4
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +187 -0
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  74. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-card_2.cjs.entry.js +2 -2
  79. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  81. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-reward-action_4.cjs.entry.js +6 -3
  85. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  87. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  100. package/dist/cjs/{tracked-promise-Ct6pS37v.js → tracked-promise-DcTnHHuS.js} +1 -1
  101. package/dist/cjs/twilight.cjs.js +2 -2
  102. package/dist/cjs/{vanilla-picker-nIHoyXND.js → vanilla-picker-dGiAD7ic.js} +1 -1
  103. package/dist/collection/Helpers/Helper.js +12 -0
  104. package/dist/collection/assets/svg/clock-05.svg +5 -0
  105. package/dist/collection/assets/svg/navigation-03.svg +3 -0
  106. package/dist/collection/collection-manifest.json +1 -0
  107. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +5 -1
  108. package/dist/collection/components/salla-loyalty-program/salla-loyalty-panel.js +4 -4
  109. package/dist/collection/components/salla-loyalty-program/salla-reward-action.js +3 -0
  110. package/dist/collection/components/salla-order-branch/helpers.js +50 -0
  111. package/dist/collection/components/salla-order-branch/interfaces.js +1 -0
  112. package/dist/collection/components/salla-order-branch/salla-order-branch.css +7 -0
  113. package/dist/collection/components/salla-order-branch/salla-order-branch.js +142 -0
  114. package/dist/collection/components/salla-product-availability/salla-product-availability.js +13 -8
  115. package/dist/components/Helper.js +12 -0
  116. package/dist/components/index.js +2 -2
  117. package/dist/components/salla-add-product-button2.js +5 -1
  118. package/dist/components/salla-loyalty-panel.js +2 -2
  119. package/dist/components/salla-order-branch.d.ts +11 -0
  120. package/dist/components/salla-order-branch.js +206 -0
  121. package/dist/components/salla-product-availability2.js +13 -8
  122. package/dist/components/salla-reward-action2.js +3 -0
  123. package/dist/esm/{Helper-DFMXF2_h.js → Helper-BXj4f_Qj.js} +12 -0
  124. package/dist/esm/{filepond-CfX7rWSP.js → filepond-DcMHeT3j.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-poster-Df2yVqup.js → filepond-plugin-file-poster-KBxuLEbb.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-validate-size-BPKCT1Yo.js → filepond-plugin-file-validate-size-BK-MtfMA.js} +1 -1
  127. package/dist/esm/{filepond-plugin-file-validate-type-5Jsz5nHO.js → filepond-plugin-file-validate-type-crBUzoNT.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-edit-DlpOgBS2.js → filepond-plugin-image-edit-BTOgfYiD.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-exif-orientation-_FOJPmuq.js → filepond-plugin-image-exif-orientation-Dooy1jA0.js} +1 -1
  130. package/dist/esm/{filepond-plugin-image-preview-BeFU1che.js → filepond-plugin-image-preview-ln9g6gwR.js} +1 -1
  131. package/dist/esm/{functions-Di2eP8On.js → functions-BuD3yG-5.js} +1 -1
  132. package/dist/esm/{index-BPFCDJsY.js → index-D47JMPpe.js} +1 -1
  133. package/dist/esm/{index-DzuK832n.js → index-LFMpXt4w.js} +6 -2
  134. package/dist/esm/loader.js +3 -3
  135. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  136. package/dist/esm/salla-accordion_6.entry.js +2 -2
  137. package/dist/esm/salla-add-product-button_5.entry.js +19 -9
  138. package/dist/esm/salla-advertisement.entry.js +1 -1
  139. package/dist/esm/salla-alert_2.entry.js +1 -1
  140. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  141. package/dist/esm/salla-apps-icons.entry.js +1 -1
  142. package/dist/esm/salla-badge.entry.js +1 -1
  143. package/dist/esm/salla-booking-field_7.entry.js +11 -11
  144. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  145. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  146. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  147. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  148. package/dist/esm/salla-comment-form_8.entry.js +2 -2
  149. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  150. package/dist/esm/salla-contacts.entry.js +1 -1
  151. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  152. package/dist/esm/salla-count-down.entry.js +1 -1
  153. package/dist/esm/salla-custom-fields.entry.js +1 -1
  154. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  155. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  156. package/dist/esm/salla-filters-widget.entry.js +2 -2
  157. package/dist/esm/salla-filters.entry.js +2 -2
  158. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  159. package/dist/esm/salla-gifting.entry.js +1 -1
  160. package/dist/esm/salla-hook.entry.js +1 -1
  161. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  162. package/dist/esm/salla-installment.entry.js +1 -1
  163. package/dist/esm/salla-list-tile.entry.js +1 -1
  164. package/dist/esm/salla-localization-modal.entry.js +1 -1
  165. package/dist/esm/salla-login-modal.entry.js +1 -1
  166. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  167. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  168. package/dist/esm/salla-loyalty-panel.entry.js +4 -4
  169. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  172. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  173. package/dist/esm/salla-loyalty.entry.js +1 -1
  174. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  175. package/dist/esm/salla-map.entry.js +1 -1
  176. package/dist/esm/salla-menu.entry.js +1 -1
  177. package/dist/esm/salla-metadata.entry.js +1 -1
  178. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  179. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  180. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  181. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  182. package/dist/esm/salla-notification-item.entry.js +1 -1
  183. package/dist/esm/salla-notifications.entry.js +2 -2
  184. package/dist/esm/salla-offer-modal.entry.js +1 -1
  185. package/dist/esm/salla-offer.entry.js +1 -1
  186. package/dist/esm/salla-order-branch.entry.js +185 -0
  187. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  188. package/dist/esm/salla-order-details-options.entry.js +1 -1
  189. package/dist/esm/salla-order-details.entry.js +1 -1
  190. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  191. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  192. package/dist/esm/salla-order-edit.entry.js +1 -1
  193. package/dist/esm/salla-order-summary.entry.js +1 -1
  194. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  195. package/dist/esm/salla-orders.entry.js +2 -2
  196. package/dist/esm/salla-payments.entry.js +1 -1
  197. package/dist/esm/salla-placeholder.entry.js +1 -1
  198. package/dist/esm/salla-price-range.entry.js +1 -1
  199. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  200. package/dist/esm/salla-product-card_2.entry.js +2 -2
  201. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  202. package/dist/esm/salla-products-list.entry.js +2 -2
  203. package/dist/esm/salla-progress-bar.entry.js +1 -1
  204. package/dist/esm/salla-quick-order.entry.js +1 -1
  205. package/dist/esm/salla-rating-modal.entry.js +2 -2
  206. package/dist/esm/salla-reward-action_4.entry.js +6 -3
  207. package/dist/esm/salla-scopes.entry.js +1 -1
  208. package/dist/esm/salla-search.entry.js +2 -2
  209. package/dist/esm/salla-skeleton.entry.js +1 -1
  210. package/dist/esm/salla-slider.entry.js +1 -1
  211. package/dist/esm/salla-social-share.entry.js +1 -1
  212. package/dist/esm/salla-social.entry.js +1 -1
  213. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  214. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  215. package/dist/esm/salla-tooltip.entry.js +1 -1
  216. package/dist/esm/salla-trust-badges.entry.js +1 -1
  217. package/dist/esm/salla-user-menu.entry.js +1 -1
  218. package/dist/esm/salla-user-profile.entry.js +1 -1
  219. package/dist/esm/salla-user-settings.entry.js +1 -1
  220. package/dist/esm/salla-verify.entry.js +1 -1
  221. package/dist/esm/salla-wallet.entry.js +1 -1
  222. package/dist/esm/{tracked-promise-DJfvIynp.js → tracked-promise-DPbO0QsO.js} +1 -1
  223. package/dist/esm/twilight.js +3 -3
  224. package/dist/esm/{vanilla-picker-Ceac_CZi.js → vanilla-picker-DAQGFAt4.js} +1 -1
  225. package/dist/twilight/{p-57cdc67d.entry.js → p-01ae33ac.entry.js} +1 -1
  226. package/dist/twilight/p-01f84b1c.entry.js +4 -0
  227. package/dist/twilight/{p-7e0b913c.entry.js → p-035ea236.entry.js} +1 -1
  228. package/dist/twilight/{p-5bcb626c.entry.js → p-046159e7.entry.js} +1 -1
  229. package/dist/twilight/{p-93d301fe.entry.js → p-04e86cc4.entry.js} +1 -1
  230. package/dist/twilight/{p-b9e787cb.entry.js → p-05989724.entry.js} +1 -1
  231. package/dist/twilight/{p-f8bc596f.entry.js → p-068ab5b3.entry.js} +1 -1
  232. package/dist/twilight/{p-97c06c97.entry.js → p-11f1a28b.entry.js} +1 -1
  233. package/dist/twilight/p-17970285.entry.js +4 -0
  234. package/dist/twilight/{p-49356d3a.entry.js → p-289e48d4.entry.js} +1 -1
  235. package/dist/twilight/{p-159bc4a8.entry.js → p-2b3591c9.entry.js} +1 -1
  236. package/dist/twilight/{p-0eb01f59.entry.js → p-2d0bbec1.entry.js} +1 -1
  237. package/dist/twilight/{p-0df546c7.entry.js → p-2e11c53e.entry.js} +1 -1
  238. package/dist/twilight/{p-a0a0a278.entry.js → p-2e7a103f.entry.js} +1 -1
  239. package/dist/twilight/{p-6c870b6f.entry.js → p-303b4348.entry.js} +1 -1
  240. package/dist/twilight/{p-5e636354.entry.js → p-34b5b7d5.entry.js} +1 -1
  241. package/dist/twilight/{p-b7a0fea9.entry.js → p-355b31ee.entry.js} +1 -1
  242. package/dist/twilight/{p-920f7f1f.entry.js → p-356bbb4f.entry.js} +1 -1
  243. package/dist/twilight/{p-275bf5bc.entry.js → p-37291b15.entry.js} +1 -1
  244. package/dist/twilight/{p-8ccc2e24.entry.js → p-3d83750f.entry.js} +1 -1
  245. package/dist/twilight/{p-b77f9e65.entry.js → p-40716039.entry.js} +1 -1
  246. package/dist/twilight/{p-1810a066.entry.js → p-426ea2e9.entry.js} +1 -1
  247. package/dist/twilight/{p-289ee72b.entry.js → p-4519a7bc.entry.js} +1 -1
  248. package/dist/twilight/p-4b55ed30.entry.js +4 -0
  249. package/dist/twilight/{p-838ff338.entry.js → p-4e4dfff9.entry.js} +1 -1
  250. package/dist/twilight/{p-08d6ce33.entry.js → p-525c6230.entry.js} +1 -1
  251. package/dist/twilight/{p-ea028b8c.entry.js → p-52ac44c5.entry.js} +1 -1
  252. package/dist/twilight/{p-37183635.entry.js → p-53663091.entry.js} +1 -1
  253. package/dist/twilight/{p-06fe4aac.entry.js → p-5834f1e5.entry.js} +1 -1
  254. package/dist/twilight/{p-9545c121.entry.js → p-5b197d71.entry.js} +1 -1
  255. package/dist/twilight/{p-cd9cec40.entry.js → p-5d16469d.entry.js} +1 -1
  256. package/dist/twilight/{p-fcc7ab3c.entry.js → p-5ffdd593.entry.js} +1 -1
  257. package/dist/twilight/{p-3e8b2de2.entry.js → p-619bd683.entry.js} +1 -1
  258. package/dist/twilight/{p-52a092f5.entry.js → p-627c326c.entry.js} +1 -1
  259. package/dist/twilight/{p-4db2517c.entry.js → p-628d1673.entry.js} +1 -1
  260. package/dist/twilight/{p-3414beb0.entry.js → p-6ab24467.entry.js} +1 -1
  261. package/dist/twilight/{p-6e4402ff.entry.js → p-6b2c7fd9.entry.js} +1 -1
  262. package/dist/twilight/p-6b58eb2d.entry.js +4 -0
  263. package/dist/twilight/{p-42c91eaa.entry.js → p-6e1478a1.entry.js} +1 -1
  264. package/dist/twilight/{p-c48ca641.entry.js → p-770d84fb.entry.js} +1 -1
  265. package/dist/twilight/{p-b93a7adb.entry.js → p-78276ba5.entry.js} +1 -1
  266. package/dist/twilight/{p-7d395fbe.entry.js → p-795f5e87.entry.js} +1 -1
  267. package/dist/twilight/{p-e1cdebc4.entry.js → p-7bd6623d.entry.js} +1 -1
  268. package/dist/twilight/{p-580161e4.entry.js → p-7cf69f2f.entry.js} +1 -1
  269. package/dist/twilight/{p-cd164d87.entry.js → p-80141f08.entry.js} +1 -1
  270. package/dist/twilight/{p-77e38f23.entry.js → p-80c8cff1.entry.js} +1 -1
  271. package/dist/twilight/{p-5cc7a121.entry.js → p-84bbc5f0.entry.js} +1 -1
  272. package/dist/twilight/{p-9afb191a.entry.js → p-85ca0b80.entry.js} +1 -1
  273. package/dist/twilight/{p-5e520119.entry.js → p-8ae1064c.entry.js} +1 -1
  274. package/dist/twilight/{p-7863b9a5.entry.js → p-8b37e9f6.entry.js} +1 -1
  275. package/dist/twilight/{p-1012a314.entry.js → p-8c679c7b.entry.js} +1 -1
  276. package/dist/twilight/{p-16b6aaf1.entry.js → p-96b69cc2.entry.js} +1 -1
  277. package/dist/twilight/{p-c7359aad.entry.js → p-9774320f.entry.js} +1 -1
  278. package/dist/twilight/{p-CHf8XdiS.js → p-BcbKK1Xp.js} +1 -1
  279. package/dist/twilight/{p-hHZs35On.js → p-BeSwpz9O.js} +2 -2
  280. package/dist/twilight/{p-8TBr5YYa.js → p-BoSXpmeB.js} +1 -1
  281. package/dist/twilight/{p-BpqnVE1u.js → p-C60CVu0N.js} +1 -1
  282. package/dist/twilight/{p-DxUobFF1.js → p-CUtmSDDB.js} +1 -1
  283. package/dist/twilight/{p-DhhUpOxO.js → p-CZckMsJI.js} +1 -1
  284. package/dist/twilight/{p-CrxsAk8y.js → p-CgrzPzoa.js} +1 -1
  285. package/dist/twilight/{p-oTUgiqv4.js → p-CjEmeOim.js} +1 -1
  286. package/dist/twilight/p-Ck4ltJzi.js +9 -0
  287. package/dist/twilight/{p-CJHZswvP.js → p-DILJJ674.js} +1 -1
  288. package/dist/twilight/{p-CASql_Bi.js → p-Dh7EHj7d.js} +1 -1
  289. package/dist/twilight/p-LFMpXt4w.js +5 -0
  290. package/dist/twilight/{p-e6d5e5be.entry.js → p-a119c0b5.entry.js} +1 -1
  291. package/dist/twilight/{p-1f2dd00f.entry.js → p-a6734e3a.entry.js} +1 -1
  292. package/dist/twilight/{p-f7533e3f.entry.js → p-a70406d4.entry.js} +1 -1
  293. package/dist/twilight/{p-89ac6701.entry.js → p-a76b17e2.entry.js} +1 -1
  294. package/dist/twilight/{p-9ba332ef.entry.js → p-a9a5c8fa.entry.js} +1 -1
  295. package/dist/twilight/{p-a79ae695.entry.js → p-adab7f42.entry.js} +1 -1
  296. package/dist/twilight/{p-b7968973.entry.js → p-adfecc83.entry.js} +1 -1
  297. package/dist/twilight/{p-d96cf392.entry.js → p-b5083002.entry.js} +1 -1
  298. package/dist/twilight/{p-bdfba028.entry.js → p-b92bb0e6.entry.js} +1 -1
  299. package/dist/twilight/{p-a430cf7b.entry.js → p-bde5b9ac.entry.js} +1 -1
  300. package/dist/twilight/{p-87241e88.entry.js → p-be894841.entry.js} +1 -1
  301. package/dist/twilight/{p-a5f080a9.entry.js → p-c1ab48f6.entry.js} +1 -1
  302. package/dist/twilight/{p-925f99d0.entry.js → p-c2ec7224.entry.js} +1 -1
  303. package/dist/twilight/{p-7c7a6161.entry.js → p-c7376a3d.entry.js} +1 -1
  304. package/dist/twilight/{p-fa86a0bc.entry.js → p-c74934e9.entry.js} +1 -1
  305. package/dist/twilight/{p-6bd404aa.entry.js → p-ca1140a4.entry.js} +1 -1
  306. package/dist/twilight/{p-4b3fd1cd.entry.js → p-cd24514a.entry.js} +1 -1
  307. package/dist/twilight/{p-dcc97187.entry.js → p-cdc6db50.entry.js} +1 -1
  308. package/dist/twilight/{p-060755f8.entry.js → p-ce75d101.entry.js} +1 -1
  309. package/dist/twilight/{p-c33046c1.entry.js → p-d4780439.entry.js} +1 -1
  310. package/dist/twilight/{p-d97d23d8.entry.js → p-da736b50.entry.js} +1 -1
  311. package/dist/twilight/{p-e397a094.entry.js → p-db5c545a.entry.js} +1 -1
  312. package/dist/twilight/{p-04c6aef7.entry.js → p-e2044262.entry.js} +1 -1
  313. package/dist/twilight/{p-1165d905.entry.js → p-e35e0f54.entry.js} +1 -1
  314. package/dist/twilight/{p-883a555a.entry.js → p-e49e893c.entry.js} +1 -1
  315. package/dist/twilight/p-e5631806.entry.js +4 -0
  316. package/dist/twilight/{p-3e5b5d89.entry.js → p-e682012f.entry.js} +1 -1
  317. package/dist/twilight/{p-d231e351.entry.js → p-eea3ae1c.entry.js} +1 -1
  318. package/dist/twilight/{p-155a2173.entry.js → p-f32fa56d.entry.js} +1 -1
  319. package/dist/twilight/{p-2abd6569.entry.js → p-f349772e.entry.js} +1 -1
  320. package/dist/twilight/{p-bcfea8e6.entry.js → p-f4ecb099.entry.js} +1 -1
  321. package/dist/twilight/{p-110ad875.entry.js → p-fc27afea.entry.js} +1 -1
  322. package/dist/twilight/{p-89f4edb7.entry.js → p-fc9573b3.entry.js} +1 -1
  323. package/dist/twilight/{p-b212b49f.entry.js → p-ff0ce619.entry.js} +1 -1
  324. package/dist/twilight/{p-B_1X3ghS.js → p-wLMN58-n.js} +1 -1
  325. package/dist/twilight/twilight.esm.js +1 -1
  326. package/dist/types/Helpers/Helper.d.ts +1 -0
  327. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +1 -0
  328. package/dist/types/components/salla-loyalty-program/salla-loyalty-panel.d.ts +1 -1
  329. package/dist/types/components/salla-loyalty-program/salla-reward-action.d.ts +1 -0
  330. package/dist/types/components/salla-order-branch/helpers.d.ts +6 -0
  331. package/dist/types/components/salla-order-branch/interfaces.d.ts +39 -0
  332. package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +25 -0
  333. package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +1 -1
  334. package/dist/types/components.d.ts +31 -2
  335. package/package.json +5 -5
  336. package/dist/twilight/p-0ac67d41.entry.js +0 -4
  337. package/dist/twilight/p-7d827f74.entry.js +0 -4
  338. package/dist/twilight/p-C8D5rUa4.js +0 -9
  339. package/dist/twilight/p-DzuK832n.js +0 -5
  340. package/dist/twilight/p-a5f1b4ee.entry.js +0 -4
  341. package/dist/twilight/p-f13145d5.entry.js +0 -4
@@ -145,6 +145,10 @@ const SallaAddProductButton = /*@__PURE__*/ proxyCustomElement(class SallaAddPro
145
145
  }
146
146
  return this.hostAttributes;
147
147
  }
148
+ // optional: fall back to store-configured channels, reading config directly when the SDK helper is missing
149
+ get notifyChannels() {
150
+ return this.channels || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
151
+ }
148
152
  getQuickBuyBtnAttributes() {
149
153
  return {
150
154
  ...this.getBtnAttributes(),
@@ -188,7 +192,7 @@ const SallaAddProductButton = /*@__PURE__*/ proxyCustomElement(class SallaAddPro
188
192
  if (this.hasSubscribedOptions) {
189
193
  return h(Host, null, h("salla-product-availability", { ...this.getBtnAttributes(), "is-subscribed": true }, h("span", { class: "s-hidden" }, h("slot", null))));
190
194
  }
191
- if ((this.productStatus === 'out-and-notify' && this.channels) || this.hasOutOfStockOption) {
195
+ if ((this.productStatus === 'out-and-notify' && this.notifyChannels) || this.hasOutOfStockOption) {
192
196
  return h(Host, null, h("salla-product-availability", { ...this.getBtnAttributes() }, h("span", { class: "s-hidden" }, h("slot", null))));
193
197
  }
194
198
  return h(Host, { class: {
@@ -85,7 +85,7 @@ const SallaLoyaltyPanel$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyaltyP
85
85
  const prizesGroups = this.program.data.prizes;
86
86
  const prizesCount = this.program.data.prizes_count;
87
87
  const customerPoints = (this.points.data ?? this.customerPoints ?? 0);
88
- if (this.prizeTitle && this.prizePoints) {
88
+ if (this.prizeTitle && this.prizePoints != null && this.prizePoints !== '') {
89
89
  return (h("div", { class: "s-loyalty-program-panel-exchange-wrapper" }, h("salla-list-tile", { class: "s-loyalty-program-after-exchange" }, h("div", { slot: "title", class: "s-loyalty-program-after-exchange-title" }, this.prizeTitle, " \u00A0 - \u00A0 ", this.prizePoints, " ", salla.lang.get('pages.loyalty_program.point')), h("div", { slot: "action", class: "s-loyalty-program-after-exchange-action" }, h("salla-button", { class: "s-loyalty-program-after-exchange-reset", shape: "icon", fill: 'outline', color: "danger", size: "small", onClick: () => salla.loyalty.reset() }, h("span", { innerHTML: Cancel }))))));
90
90
  }
91
91
  if (!customerPoints || customerPoints === 0) {
@@ -109,7 +109,7 @@ const SallaLoyaltyPanel$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyaltyP
109
109
  }
110
110
  static get style() { return sallaLoyaltyProgramCss; }
111
111
  }, [0, "salla-loyalty-panel", {
112
- "prizePoints": [1544, "prize-points"],
112
+ "prizePoints": [1537, "prize-points"],
113
113
  "customerPoints": [1538, "customer-points"],
114
114
  "prizeTitle": [1537, "prize-title"],
115
115
  "currentPrize": [32]
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SallaOrderBranch extends Components.SallaOrderBranch, HTMLElement {}
4
+ export const SallaOrderBranch: {
5
+ prototype: SallaOrderBranch;
6
+ new (): SallaOrderBranch;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,206 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+
6
+ function parseMaybeJson(value, fallback) {
7
+ if (typeof value !== 'string') {
8
+ return (value ?? fallback);
9
+ }
10
+ const trimmed = value.trim();
11
+ if (!trimmed)
12
+ return fallback;
13
+ try {
14
+ return JSON.parse(trimmed);
15
+ }
16
+ catch {
17
+ return fallback;
18
+ }
19
+ }
20
+ function parseOrderBranch(value) {
21
+ if (!value)
22
+ return undefined;
23
+ return typeof value === 'string'
24
+ ? parseMaybeJson(value, undefined)
25
+ : value;
26
+ }
27
+ function getBranchPhone(contacts) {
28
+ const parsed = parseMaybeJson(contacts, null);
29
+ const phone = parsed && typeof parsed === 'object' ? parsed.phone : '';
30
+ return typeof phone === 'string' ? phone.trim() : '';
31
+ }
32
+ function formatTimeTo12h(time24, locale = 'ar') {
33
+ const [hours, minutes] = String(time24).trim().split(':').map(Number);
34
+ if (!Number.isFinite(hours) || !Number.isFinite(minutes))
35
+ return time24;
36
+ const date = new Date(2000, 0, 1, hours, minutes);
37
+ const options = { hour: 'numeric', minute: '2-digit', hour12: true };
38
+ try {
39
+ return date.toLocaleTimeString(locale, options);
40
+ }
41
+ catch {
42
+ return date.toLocaleTimeString('ar', options);
43
+ }
44
+ }
45
+ function normalizeTimeUnit(unit) {
46
+ const normalized = String(unit || 'hour').toLowerCase();
47
+ if (normalized.startsWith('min'))
48
+ return 'minute';
49
+ if (normalized.startsWith('day'))
50
+ return 'day';
51
+ return 'hour';
52
+ }
53
+
54
+ var navigationIcon = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
55
+ <path d="M6.95448 2.79419C9.7395 1.84477 11.132 1.37005 11.881 2.11902C12.6299 2.86799 12.1552 4.2605 11.2058 7.04551L10.5593 8.94203C9.83014 11.0809 9.46556 12.1503 8.8646 12.2388C8.70303 12.2626 8.53577 12.2483 8.37592 12.197C7.78135 12.0061 7.46705 10.8785 6.83846 8.62339C6.69903 8.12319 6.62932 7.87308 6.47057 7.68206C6.4245 7.62662 6.37338 7.5755 6.31794 7.52943C6.12692 7.37068 5.87681 7.30097 5.37661 7.16154C3.12148 6.53295 1.99391 6.21865 1.80302 5.62408C1.7517 5.46423 1.73738 5.29698 1.76117 5.1354C1.84968 4.53444 2.91911 4.16986 5.05797 3.44072L6.95448 2.79419Z" stroke="currentColor" stroke-width="1.5"/>
56
+ </svg>
57
+ `;
58
+
59
+ var phoneTalkingIcon = `<!-- Generated by IcoMoon.io -->
60
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
61
+ <title>phone-talking</title>
62
+ <path d="M18.667 8c2.941 0 5.333 2.392 5.333 5.333 0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333c0-4.412-3.588-8-8-8-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333zM18.667 2.667c5.881 0 10.667 4.785 10.667 10.667 0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333c0-7.352-5.981-13.333-13.333-13.333-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333zM26.939 17.831c-1.568-1.568-4.119-1.568-5.689 0l-2.567 2.568c-3.064-1.499-5.584-4.019-7.083-7.083l2.569-2.567c1.567-1.569 1.567-4.121-0.001-5.689l-3.88-3.881c-1.521-1.521-4.169-1.521-5.691 0l-1.847 1.847c-2.22 2.22-3.183 5.408-2.573 8.527 1.979 10.144 10.127 18.292 20.271 20.271 0.617 0.121 1.236 0.18 1.851 0.18 2.491 0 4.895-0.972 6.676-2.752l1.847-1.847c1.569-1.569 1.569-4.12 0-5.689zM28.936 25.517l-1.847 1.847c-1.591 1.591-3.876 2.281-6.131 1.841-9.089-1.776-16.388-9.075-18.163-18.165-0.439-2.247 0.249-4.539 1.841-6.129l1.847-1.847c0.256-0.257 0.597-0.397 0.959-0.397s0.701 0.14 0.959 0.397l3.883 3.883c0.528 0.528 0.528 1.389 0 1.917l-3.22 3.219c-0.383 0.384-0.496 0.959-0.288 1.457 1.815 4.34 5.344 7.868 9.684 9.684 0.5 0.205 1.075 0.095 1.457-0.288l3.219-3.219c0.528-0.531 1.389-0.529 1.917-0.001l3.883 3.883c0.529 0.529 0.529 1.389 0 1.919z"></path>
63
+ </svg>
64
+ `;
65
+
66
+ const sallaOrderBranchCss = ":host{display:block}.s-order-branch-ready{background-color:color-mix(in srgb, var(--color-primary) 30%, transparent)}";
67
+
68
+ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBranch extends HTMLElement {
69
+ constructor() {
70
+ super();
71
+ this.__registerHost();
72
+ this.isLoading = false;
73
+ }
74
+ componentWillLoad() {
75
+ return this.getBranchData();
76
+ }
77
+ async getBranchData() {
78
+ const orderId = salla.config.get('page.id');
79
+ if (!orderId)
80
+ return;
81
+ this.isLoading = true;
82
+ try {
83
+ const response = await salla.order.api.getBranchDetails(orderId);
84
+ this.branchData = this.parseBranchResponse(response);
85
+ }
86
+ catch (error) {
87
+ this.notifyApiError(error);
88
+ }
89
+ finally {
90
+ this.isLoading = false;
91
+ }
92
+ }
93
+ parseBranchResponse(response) {
94
+ const data = response?.data?.data || response?.data || response;
95
+ if (data && typeof data === 'object' && Object.prototype.hasOwnProperty.call(data, 'branch')) {
96
+ return data.branch ? parseOrderBranch(data.branch) : undefined;
97
+ }
98
+ return parseOrderBranch(data);
99
+ }
100
+ getApiErrorMessage(error) {
101
+ return error?.response?.data?.error?.message || error?.response?.data?.message;
102
+ }
103
+ notifyApiError(error) {
104
+ const message = this.getApiErrorMessage(error);
105
+ if (message) {
106
+ salla.notify.error(message);
107
+ }
108
+ }
109
+ label(key, fallback) {
110
+ return salla.lang.getWithDefault(key, fallback);
111
+ }
112
+ get preparationText() {
113
+ const range = this.branchData?.preparation_time_range;
114
+ if (!range?.from || !range?.to)
115
+ return '';
116
+ const fromValue = salla.helpers.number(range.from.value);
117
+ const toValue = salla.helpers.number(range.to.value);
118
+ const unitLabel = this.unitLabel(range.to.unit);
119
+ const amount = fromValue === toValue ? fromValue : `\u2066${fromValue}-${toValue}\u2069`;
120
+ return this.label('pages.orders.pickup_ready_after', 'جاهز للاستلام بعد :time').replace(':time', `${amount} ${unitLabel}`);
121
+ }
122
+ unitLabel(unit) {
123
+ const normalized = normalizeTimeUnit(unit);
124
+ if (normalized === 'minute') {
125
+ return this.label('pages.checkout.minute', 'دقيقة');
126
+ }
127
+ if (normalized === 'day') {
128
+ return this.label('pages.checkout.day', 'يوم');
129
+ }
130
+ return this.label('pages.checkout.hour', 'ساعة');
131
+ }
132
+ get workingHoursItems() {
133
+ const branch = this.branchData;
134
+ if (!branch)
135
+ return [];
136
+ if (branch.always_open === true || branch.always_open === 1 || branch.always_open === '1') {
137
+ return [this.label('pages.orders.branch_always_open', 'مفتوح على مدار الساعة')];
138
+ }
139
+ const locale = salla.lang.locale || 'ar';
140
+ return (branch.working_hours || [])
141
+ .filter(day => day?.name && day.times?.length)
142
+ .map(day => {
143
+ const slot = day.times[0];
144
+ return `${day.name}: ${formatTimeTo12h(slot.from, locale)} - ${formatTimeTo12h(slot.to, locale)}`;
145
+ });
146
+ }
147
+ get branchAddress() {
148
+ return this.branchData?.address || '';
149
+ }
150
+ get mapUrl() {
151
+ const location = this.branchData?.location;
152
+ if (location?.lat == null || location?.lng == null)
153
+ return undefined;
154
+ return `https://www.google.com/maps?q=${location.lat},${location.lng}`;
155
+ }
156
+ get phone() {
157
+ return getBranchPhone(this.branchData?.contacts);
158
+ }
159
+ renderDetailsColumn() {
160
+ const phone = this.phone;
161
+ if (!phone)
162
+ return null;
163
+ return (h("div", { class: "s-order-branch-details" }, h("div", { class: "s-order-branch-info-card" }, h("span", { class: "s-order-branch-info-icon", innerHTML: phoneTalkingIcon }), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.orders.branch_contacts', 'ارقام التواصل')), h("span", { class: "s-order-branch-info-value", dir: "ltr" }, phone)))));
164
+ }
165
+ renderWorkingHoursCard() {
166
+ const items = this.workingHoursItems;
167
+ if (!items.length)
168
+ return null;
169
+ return (h("div", { class: "s-order-branch-info-card s-order-branch-hours-card" }, h("span", { class: "s-order-branch-info-icon", "aria-hidden": "true" }, h("i", { class: "sicon-calendar-alt" })), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.checkout.working_hours', 'ساعات العمل')), h("div", { class: "s-order-branch-hours-list" }, items.map(item => (h("span", { class: "s-order-branch-hours-item" }, item)))))));
170
+ }
171
+ renderBranchIdentityCard() {
172
+ const branch = this.branchData;
173
+ const address = this.branchAddress;
174
+ const readyText = this.preparationText;
175
+ return (h("section", { class: "s-order-branch-card" }, h("div", { class: "s-order-branch-location" }, h("div", { class: "s-order-branch-identity" }, h("span", { class: "s-order-branch-store-icon" }, h("i", { class: "sicon-store", "aria-hidden": "true" })), h("div", { class: "s-order-branch-text" }, h("div", { class: "s-order-branch-name-row" }, branch?.name ? h("span", { class: "s-order-branch-name" }, branch.name) : null, readyText ? h("span", { class: "s-order-branch-ready" }, readyText) : null), address ? h("span", { class: "s-order-branch-address" }, address) : null)), this.mapUrl ? (h("div", { class: "s-order-branch-actions" }, h("a", { href: this.mapUrl, target: "_blank", rel: "noopener noreferrer", class: "s-order-branch-map-link" }, h("span", null, this.label('pages.orders.branch_map', 'موقع الفرع علي الخريطة')), h("span", { class: "s-order-branch-action-icon", innerHTML: navigationIcon })))) : null)));
176
+ }
177
+ render() {
178
+ if (this.isLoading || !this.branchData) {
179
+ return h(Host, { class: "s-order-branch-wrapper" });
180
+ }
181
+ return (h(Host, { class: "s-order-branch-wrapper" }, h("div", { class: "s-order-branch-container" }, this.renderBranchIdentityCard(), this.renderDetailsColumn()), this.renderWorkingHoursCard()));
182
+ }
183
+ static get style() { return sallaOrderBranchCss; }
184
+ }, [0, "salla-order-branch", {
185
+ "branchData": [32],
186
+ "isLoading": [32]
187
+ }]);
188
+ function defineCustomElement$1() {
189
+ if (typeof customElements === "undefined") {
190
+ return;
191
+ }
192
+ const components = ["salla-order-branch"];
193
+ components.forEach(tagName => { switch (tagName) {
194
+ case "salla-order-branch":
195
+ if (!customElements.get(tagName)) {
196
+ customElements.define(tagName, SallaOrderBranch$1);
197
+ }
198
+ break;
199
+ } });
200
+ }
201
+ defineCustomElement$1();
202
+
203
+ const SallaOrderBranch = SallaOrderBranch$1;
204
+ const defineCustomElement = defineCustomElement$1;
205
+
206
+ export { SallaOrderBranch, defineCustomElement };
@@ -67,11 +67,17 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
67
67
  this.channelsWatcher(this.channels);
68
68
  this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
69
69
  this.host.removeAttribute('title');
70
- //todo:: fix this to cover options too
71
- this.isVisitorSubscribed = !this.notifyOptionsAvailability ? salla.storage.get(`product-${this.productId}-subscribed`) : '';
72
70
  }
73
71
  channelsWatcher(newValue) {
74
- this.channels_ = !!newValue ? newValue.split(',') : [];
72
+ // fall back to store-configured channels, reading config directly when the SDK helper is missing
73
+ let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
74
+ this.channels_ = channels ? channels.split(',') : [];
75
+ }
76
+ // Subscribed via the backend prop, the SDK storage, or the legacy key (older SDK fallback).
77
+ get isSubscribedToProduct() {
78
+ return this.isSubscribed
79
+ || (!this.notifyOptionsAvailability && (!!salla.api.product.isSubscribedToAvailability?.(this.productId)
80
+ || !!salla.storage.get(`product-${this.productId}-subscribed`)));
75
81
  }
76
82
  openModel() {
77
83
  this.handleSubmitOptions().then(isSuccess => isSuccess ? this.modal.open() : null);
@@ -96,7 +102,7 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
96
102
  .then(() => salla.api.product.availabilitySubscribe(payload))
97
103
  .then(() => {
98
104
  if (!this.notifyOptionsAvailability) {
99
- salla.storage.set(`product-${this.productId}-subscribed`, true);
105
+ // persisted by salla.api.product.availabilitySubscribe
100
106
  this.isSubscribed = true;
101
107
  return;
102
108
  }
@@ -140,10 +146,10 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
140
146
  field.nextElementSibling['innerText'] = '* ' + errorMsg;
141
147
  }
142
148
  render() {
143
- return (h(Host, { key: 'aa627ba618b159913ad91efba99e57c14dd27832', class: "s-product-availability-wrap" }, this.isSubscribed || this.isVisitorSubscribed
149
+ return (h(Host, { key: '2da2f2466b07a0d0c1613bf331697cf4acc95004', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
144
150
  ? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRing, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
145
151
  :
146
- h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribed || this.isVisitorSubscribed ? '' : this.renderModal()));
152
+ h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
147
153
  }
148
154
  renderModal() {
149
155
  return (h("salla-modal", { ref: modal => this.modal = modal, "modal-title": this.title_, subTitle: salla.lang.get('pages.products.notify_availability_subtitle'), width: "sm" }, h("span", { slot: 'icon', class: "s-product-availability-header-icon", innerHTML: BellRing }), h("div", { class: "s-product-availability-body" }, this.channels_.includes('email') ? [
@@ -166,8 +172,7 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
166
172
  "productId": [2, "product-id"],
167
173
  "isSubscribed": [1028, "is-subscribed"],
168
174
  "translationLoaded": [32],
169
- "title_": [32],
170
- "isVisitorSubscribed": [32]
175
+ "title_": [32]
171
176
  }, undefined, {
172
177
  "channels": ["channelsWatcher"]
173
178
  }]);
@@ -11,6 +11,9 @@ const SallaRewardAction = /*@__PURE__*/ proxyCustomElement(class SallaRewardActi
11
11
  super();
12
12
  this.__registerHost();
13
13
  this.actionClick = createEvent(this, "actionClick", 7);
14
+ this.isClickable = (_prize) => {
15
+ return true;
16
+ };
14
17
  this.isShopNow = (prize) => {
15
18
  if (!(salla.config.get('store.features') || []).includes('loyalty-system-v2')) {
16
19
  return false;
@@ -429,6 +429,18 @@ class Helper {
429
429
  script.textContent = JSON.stringify(schema);
430
430
  document.head.appendChild(script);
431
431
  }
432
+ // Store-configured availability notification channels as a comma string ("email,sms").
433
+ availabilityChannels() {
434
+ let config = salla.config.get('store.settings.product.availability_notify');
435
+ if (!config) {
436
+ return '';
437
+ }
438
+ let channels = [];
439
+ config.email && channels.push('email');
440
+ // sms, mobile and whatsapp all collect a phone number via the same input
441
+ (config.sms || config.mobile || config.whatsapp) && channels.push('sms');
442
+ return channels.join(',');
443
+ }
432
444
  }
433
445
  var Helper$1 = new Helper;
434
446
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { h } from './index-DzuK832n.js';
4
+ import { h } from './index-LFMpXt4w.js';
5
5
 
6
6
  function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
7
7
  return number < multipleOf ? number : number - (number % multipleOf);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-DzuK832n.js';
4
+ import { d as getDefaultExportFromCjs } from './index-LFMpXt4w.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {