@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
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-C1PF-Plo.js');
6
+ var index = require('./index-DFPCRma5.js');
7
7
 
8
8
  function _mergeNamespaces(n, m) {
9
9
  m.forEach(function (e) {
@@ -428,5 +428,17 @@ class Helper {
428
428
  script.textContent = JSON.stringify(schema);
429
429
  document.head.appendChild(script);
430
430
  }
431
+ // Store-configured availability notification channels as a comma string ("email,sms").
432
+ availabilityChannels() {
433
+ let config = salla.config.get('store.settings.product.availability_notify');
434
+ if (!config) {
435
+ return '';
436
+ }
437
+ let channels = [];
438
+ config.email && channels.push('email');
439
+ // sms, mobile and whatsapp all collect a phone number via the same input
440
+ (config.sms || config.mobile || config.whatsapp) && channels.push('sms');
441
+ return channels.join(',');
442
+ }
431
443
  }
432
444
  export default new Helper;
@@ -0,0 +1,5 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.00014 14.6668C4.31824 14.6668 1.3335 11.6821 1.3335 8.00016C1.3335 4.31826 4.31826 1.3335 8.00016 1.3335C10.9853 1.3335 13.484 3.29542 14.3335 6.00016L12.6668 6.00016" stroke="#0C2519" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M8 5.3335V8.00016L9.33333 9.3335" stroke="#0C2519" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M14.6367 8.66667C14.6565 8.44724 14.6667 8.22486 14.6667 8M10 14.6667C10.2277 14.5917 10.4502 14.5043 10.6667 14.4052M13.8604 11.3333C13.989 11.0856 14.1036 10.8288 14.2034 10.5641M12.1283 13.4862C12.358 13.2961 12.5754 13.0905 12.7792 12.871" stroke="#0C2519" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <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"/>
3
+ </svg>
@@ -74,6 +74,7 @@
74
74
  "components/salla-notifications/salla-notifications.js",
75
75
  "components/salla-offer/salla-offer.js",
76
76
  "components/salla-offer-modal/salla-offer-modal.js",
77
+ "components/salla-order-branch/salla-order-branch.js",
77
78
  "components/salla-order-details/salla-order-details-multiple-bundle-product.js",
78
79
  "components/salla-order-details/salla-order-details-options.js",
79
80
  "components/salla-order-details/salla-order-details.js",
@@ -127,6 +127,10 @@ export class SallaAddProductButton {
127
127
  }
128
128
  return this.hostAttributes;
129
129
  }
130
+ // optional: fall back to store-configured channels, reading config directly when the SDK helper is missing
131
+ get notifyChannels() {
132
+ return this.channels || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
133
+ }
130
134
  getQuickBuyBtnAttributes() {
131
135
  return {
132
136
  ...this.getBtnAttributes(),
@@ -170,7 +174,7 @@ export class SallaAddProductButton {
170
174
  if (this.hasSubscribedOptions) {
171
175
  return h(Host, null, h("salla-product-availability", { ...this.getBtnAttributes(), "is-subscribed": true }, h("span", { class: "s-hidden" }, h("slot", null))));
172
176
  }
173
- if ((this.productStatus === 'out-and-notify' && this.channels) || this.hasOutOfStockOption) {
177
+ if ((this.productStatus === 'out-and-notify' && this.notifyChannels) || this.hasOutOfStockOption) {
174
178
  return h(Host, null, h("salla-product-availability", { ...this.getBtnAttributes() }, h("span", { class: "s-hidden" }, h("slot", null))));
175
179
  }
176
180
  return h(Host, { class: {
@@ -59,7 +59,7 @@ export class SallaLoyaltyPanel {
59
59
  const prizesGroups = this.program.data.prizes;
60
60
  const prizesCount = this.program.data.prizes_count;
61
61
  const customerPoints = (this.points.data ?? this.customerPoints ?? 0);
62
- if (this.prizeTitle && this.prizePoints) {
62
+ if (this.prizeTitle && this.prizePoints != null && this.prizePoints !== '') {
63
63
  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: CancelIcon }))))));
64
64
  }
65
65
  if (!customerPoints || customerPoints === 0) {
@@ -95,12 +95,12 @@ export class SallaLoyaltyPanel {
95
95
  static get properties() {
96
96
  return {
97
97
  "prizePoints": {
98
- "type": "any",
98
+ "type": "string",
99
99
  "attribute": "prize-points",
100
100
  "mutable": true,
101
101
  "complexType": {
102
- "original": "string | number",
103
- "resolved": "number | string",
102
+ "original": "string",
103
+ "resolved": "string",
104
104
  "references": {}
105
105
  },
106
106
  "required": false,
@@ -5,6 +5,9 @@ import { h } from "@stencil/core";
5
5
  import { closeModals } from "./functions";
6
6
  export class SallaRewardAction {
7
7
  constructor() {
8
+ this.isClickable = (_prize) => {
9
+ return true;
10
+ };
8
11
  this.isShopNow = (prize) => {
9
12
  if (!(salla.config.get('store.features') || []).includes('loyalty-system-v2')) {
10
13
  return false;
@@ -0,0 +1,50 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ export function parseMaybeJson(value, fallback) {
5
+ if (typeof value !== 'string') {
6
+ return (value ?? fallback);
7
+ }
8
+ const trimmed = value.trim();
9
+ if (!trimmed)
10
+ return fallback;
11
+ try {
12
+ return JSON.parse(trimmed);
13
+ }
14
+ catch {
15
+ return fallback;
16
+ }
17
+ }
18
+ export function parseOrderBranch(value) {
19
+ if (!value)
20
+ return undefined;
21
+ return typeof value === 'string'
22
+ ? parseMaybeJson(value, undefined)
23
+ : value;
24
+ }
25
+ export function getBranchPhone(contacts) {
26
+ const parsed = parseMaybeJson(contacts, null);
27
+ const phone = parsed && typeof parsed === 'object' ? parsed.phone : '';
28
+ return typeof phone === 'string' ? phone.trim() : '';
29
+ }
30
+ export function formatTimeTo12h(time24, locale = 'ar') {
31
+ const [hours, minutes] = String(time24).trim().split(':').map(Number);
32
+ if (!Number.isFinite(hours) || !Number.isFinite(minutes))
33
+ return time24;
34
+ const date = new Date(2000, 0, 1, hours, minutes);
35
+ const options = { hour: 'numeric', minute: '2-digit', hour12: true };
36
+ try {
37
+ return date.toLocaleTimeString(locale, options);
38
+ }
39
+ catch {
40
+ return date.toLocaleTimeString('ar', options);
41
+ }
42
+ }
43
+ export function normalizeTimeUnit(unit) {
44
+ const normalized = String(unit || 'hour').toLowerCase();
45
+ if (normalized.startsWith('min'))
46
+ return 'minute';
47
+ if (normalized.startsWith('day'))
48
+ return 'day';
49
+ return 'hour';
50
+ }
@@ -0,0 +1,7 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .s-order-branch-ready {
6
+ background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
7
+ }
@@ -0,0 +1,142 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { h, Host } from "@stencil/core";
5
+ import { formatTimeTo12h, getBranchPhone, normalizeTimeUnit, parseOrderBranch } from "./helpers";
6
+ import navigationIcon from "../../assets/svg/navigation-03.svg";
7
+ import phoneTalkingIcon from "../../assets/svg/phone-talking.svg";
8
+ /**
9
+ * @salla/ui-components
10
+ * The `salla-order-branch` component renders pickup branch details for thank-you pages.
11
+ */
12
+ export class SallaOrderBranch {
13
+ constructor() {
14
+ this.isLoading = false;
15
+ }
16
+ componentWillLoad() {
17
+ return this.getBranchData();
18
+ }
19
+ async getBranchData() {
20
+ const orderId = salla.config.get('page.id');
21
+ if (!orderId)
22
+ return;
23
+ this.isLoading = true;
24
+ try {
25
+ const response = await salla.order.api.getBranchDetails(orderId);
26
+ this.branchData = this.parseBranchResponse(response);
27
+ }
28
+ catch (error) {
29
+ this.notifyApiError(error);
30
+ }
31
+ finally {
32
+ this.isLoading = false;
33
+ }
34
+ }
35
+ parseBranchResponse(response) {
36
+ const data = response?.data?.data || response?.data || response;
37
+ if (data && typeof data === 'object' && Object.prototype.hasOwnProperty.call(data, 'branch')) {
38
+ return data.branch ? parseOrderBranch(data.branch) : undefined;
39
+ }
40
+ return parseOrderBranch(data);
41
+ }
42
+ getApiErrorMessage(error) {
43
+ return error?.response?.data?.error?.message || error?.response?.data?.message;
44
+ }
45
+ notifyApiError(error) {
46
+ const message = this.getApiErrorMessage(error);
47
+ if (message) {
48
+ salla.notify.error(message);
49
+ }
50
+ }
51
+ label(key, fallback) {
52
+ return salla.lang.getWithDefault(key, fallback);
53
+ }
54
+ get preparationText() {
55
+ const range = this.branchData?.preparation_time_range;
56
+ if (!range?.from || !range?.to)
57
+ return '';
58
+ const fromValue = salla.helpers.number(range.from.value);
59
+ const toValue = salla.helpers.number(range.to.value);
60
+ const unitLabel = this.unitLabel(range.to.unit);
61
+ const amount = fromValue === toValue ? fromValue : `\u2066${fromValue}-${toValue}\u2069`;
62
+ return this.label('pages.orders.pickup_ready_after', 'جاهز للاستلام بعد :time').replace(':time', `${amount} ${unitLabel}`);
63
+ }
64
+ unitLabel(unit) {
65
+ const normalized = normalizeTimeUnit(unit);
66
+ if (normalized === 'minute') {
67
+ return this.label('pages.checkout.minute', 'دقيقة');
68
+ }
69
+ if (normalized === 'day') {
70
+ return this.label('pages.checkout.day', 'يوم');
71
+ }
72
+ return this.label('pages.checkout.hour', 'ساعة');
73
+ }
74
+ get workingHoursItems() {
75
+ const branch = this.branchData;
76
+ if (!branch)
77
+ return [];
78
+ if (branch.always_open === true || branch.always_open === 1 || branch.always_open === '1') {
79
+ return [this.label('pages.orders.branch_always_open', 'مفتوح على مدار الساعة')];
80
+ }
81
+ const locale = salla.lang.locale || 'ar';
82
+ return (branch.working_hours || [])
83
+ .filter(day => day?.name && day.times?.length)
84
+ .map(day => {
85
+ const slot = day.times[0];
86
+ return `${day.name}: ${formatTimeTo12h(slot.from, locale)} - ${formatTimeTo12h(slot.to, locale)}`;
87
+ });
88
+ }
89
+ get branchAddress() {
90
+ return this.branchData?.address || '';
91
+ }
92
+ get mapUrl() {
93
+ const location = this.branchData?.location;
94
+ if (location?.lat == null || location?.lng == null)
95
+ return undefined;
96
+ return `https://www.google.com/maps?q=${location.lat},${location.lng}`;
97
+ }
98
+ get phone() {
99
+ return getBranchPhone(this.branchData?.contacts);
100
+ }
101
+ renderDetailsColumn() {
102
+ const phone = this.phone;
103
+ if (!phone)
104
+ return null;
105
+ 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)))));
106
+ }
107
+ renderWorkingHoursCard() {
108
+ const items = this.workingHoursItems;
109
+ if (!items.length)
110
+ return null;
111
+ 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)))))));
112
+ }
113
+ renderBranchIdentityCard() {
114
+ const branch = this.branchData;
115
+ const address = this.branchAddress;
116
+ const readyText = this.preparationText;
117
+ 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)));
118
+ }
119
+ render() {
120
+ if (this.isLoading || !this.branchData) {
121
+ return h(Host, { class: "s-order-branch-wrapper" });
122
+ }
123
+ return (h(Host, { class: "s-order-branch-wrapper" }, h("div", { class: "s-order-branch-container" }, this.renderBranchIdentityCard(), this.renderDetailsColumn()), this.renderWorkingHoursCard()));
124
+ }
125
+ static get is() { return "salla-order-branch"; }
126
+ static get originalStyleUrls() {
127
+ return {
128
+ "$": ["salla-order-branch.scss"]
129
+ };
130
+ }
131
+ static get styleUrls() {
132
+ return {
133
+ "$": ["salla-order-branch.css"]
134
+ };
135
+ }
136
+ static get states() {
137
+ return {
138
+ "branchData": {},
139
+ "isLoading": {}
140
+ };
141
+ }
142
+ }
@@ -58,11 +58,17 @@ export class SallaProductAvailability {
58
58
  this.channelsWatcher(this.channels);
59
59
  this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
60
60
  this.host.removeAttribute('title');
61
- //todo:: fix this to cover options too
62
- this.isVisitorSubscribed = !this.notifyOptionsAvailability ? salla.storage.get(`product-${this.productId}-subscribed`) : '';
63
61
  }
64
62
  channelsWatcher(newValue) {
65
- this.channels_ = !!newValue ? newValue.split(',') : [];
63
+ // fall back to store-configured channels, reading config directly when the SDK helper is missing
64
+ let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
65
+ this.channels_ = channels ? channels.split(',') : [];
66
+ }
67
+ // Subscribed via the backend prop, the SDK storage, or the legacy key (older SDK fallback).
68
+ get isSubscribedToProduct() {
69
+ return this.isSubscribed
70
+ || (!this.notifyOptionsAvailability && (!!salla.api.product.isSubscribedToAvailability?.(this.productId)
71
+ || !!salla.storage.get(`product-${this.productId}-subscribed`)));
66
72
  }
67
73
  openModel() {
68
74
  this.handleSubmitOptions().then(isSuccess => isSuccess ? this.modal.open() : null);
@@ -87,7 +93,7 @@ export class SallaProductAvailability {
87
93
  .then(() => salla.api.product.availabilitySubscribe(payload))
88
94
  .then(() => {
89
95
  if (!this.notifyOptionsAvailability) {
90
- salla.storage.set(`product-${this.productId}-subscribed`, true);
96
+ // persisted by salla.api.product.availabilitySubscribe
91
97
  this.isSubscribed = true;
92
98
  return;
93
99
  }
@@ -131,10 +137,10 @@ export class SallaProductAvailability {
131
137
  field.nextElementSibling['innerText'] = '* ' + errorMsg;
132
138
  }
133
139
  render() {
134
- return (h(Host, { key: 'aa627ba618b159913ad91efba99e57c14dd27832', class: "s-product-availability-wrap" }, this.isSubscribed || this.isVisitorSubscribed
140
+ return (h(Host, { key: '2da2f2466b07a0d0c1613bf331697cf4acc95004', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
135
141
  ? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
136
142
  :
137
- 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()));
143
+ 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()));
138
144
  }
139
145
  renderModal() {
140
146
  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: BellRingIcon }), h("div", { class: "s-product-availability-body" }, this.channels_.includes('email') ? [
@@ -242,8 +248,7 @@ export class SallaProductAvailability {
242
248
  static get states() {
243
249
  return {
244
250
  "translationLoaded": {},
245
- "title_": {},
246
- "isVisitorSubscribed": {}
251
+ "title_": {}
247
252
  };
248
253
  }
249
254
  static get elementRef() { return "host"; }
@@ -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