@salla.sa/twilight-components 2.14.595 → 2.14.597

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 (542) hide show
  1. package/dist/cjs/{filepond-BmX7bEQk.js → filepond-Dw1N5qBB.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-Cs6e85Vn.js → filepond-plugin-file-poster-C1ipzdpz.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CSk66JAo.js → filepond-plugin-file-validate-size-DbTJ1H8k.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-Piu3p2Um.js → filepond-plugin-file-validate-type-CDOD2WKz.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-Ba9FBal4.js → filepond-plugin-image-edit-CP7JkpKx.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-zwtgHyrT.js → filepond-plugin-image-exif-orientation-Bm5i6zMO.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-BmGjui8n.js → filepond-plugin-image-preview-INllb63L.js} +1 -1
  8. package/dist/cjs/{index-DkrDtx6i.js → index-DIEWuq3M.js} +2 -2
  9. package/dist/cjs/{intlTelInput-Bty1-N7J.js → intlTelInput-bnpl10H7.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -18
  13. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -15
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +26 -20
  16. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +7 -2
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +79 -40
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +2 -2
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +12 -5
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-form_9.cjs.entry.js +67 -25
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +10 -3
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +17 -12
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +7 -4
  37. package/dist/cjs/salla-filters.cjs.entry.js +10 -5
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +12 -7
  41. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +7 -2
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +14 -2
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +12 -5
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_3.cjs.entry.js +39 -15
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item_2.cjs.entry.js +7 -2
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +14 -7
  63. package/dist/cjs/salla-offer.cjs.entry.js +14 -9
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +42 -4
  65. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +7 -4
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +2 -2
  76. package/dist/cjs/salla-orders.cjs.entry.js +10 -6
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +10 -3
  79. package/dist/cjs/salla-price-range.cjs.entry.js +7 -4
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-card.cjs.entry.js +14 -9
  82. package/dist/cjs/salla-product-size-guide.cjs.entry.js +9 -4
  83. package/dist/cjs/salla-products-list.cjs.entry.js +5 -4
  84. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-quick-order.cjs.entry.js +7 -2
  86. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal.cjs.entry.js +9 -3
  88. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-scopes.cjs.entry.js +9 -2
  91. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +8 -8
  94. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social.cjs.entry.js +8 -3
  96. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  97. package/dist/cjs/salla-tiered-offer.cjs.entry.js +7 -2
  98. package/dist/cjs/salla-trust-badges.cjs.entry.js +8 -4
  99. package/dist/cjs/salla-user-menu.cjs.entry.js +7 -1
  100. package/dist/cjs/salla-user-profile.cjs.entry.js +7 -3
  101. package/dist/cjs/salla-user-settings.cjs.entry.js +8 -3
  102. package/dist/cjs/salla-verify.cjs.entry.js +13 -6
  103. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
  106. package/dist/cjs/translate-Cvomt6Jh.js +58 -0
  107. package/dist/cjs/twilight.cjs.js +2 -2
  108. package/dist/cjs/{vanilla-picker-DgPfWupN.js → vanilla-picker-BaSDLxjI.js} +1 -1
  109. package/dist/collection/Helpers/translate.js +36 -0
  110. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -2
  111. package/dist/collection/components/salla-alert/salla-alert.js +5 -5
  112. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -1
  113. package/dist/collection/components/salla-booking-field/salla-booking-field.js +10 -4
  114. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +23 -17
  115. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +2 -0
  116. package/dist/collection/components/salla-button/salla-button.js +19 -27
  117. package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +10 -3
  118. package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
  119. package/dist/collection/components/salla-comment-form/salla-comment-form.js +10 -5
  120. package/dist/collection/components/salla-comments/salla-comment-item.js +8 -2
  121. package/dist/collection/components/salla-comments/salla-comments.js +32 -5
  122. package/dist/collection/components/salla-contacts/salla-contacts.js +9 -2
  123. package/dist/collection/components/salla-count-down/salla-count-down.js +23 -18
  124. package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +4 -0
  125. package/dist/collection/components/salla-file-upload/salla-file-upload.css +3 -0
  126. package/dist/collection/components/salla-file-upload/salla-file-upload.js +36 -7
  127. package/dist/collection/components/salla-filters/salla-filters.js +10 -5
  128. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +6 -3
  129. package/dist/collection/components/salla-gifting/salla-gifting.js +11 -6
  130. package/dist/collection/components/salla-hook/salla-hook.js +5 -1
  131. package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -1
  132. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +15 -2
  133. package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -5
  134. package/dist/collection/components/salla-map/salla-map.js +12 -7
  135. package/dist/collection/components/salla-notifications/salla-notifications.js +6 -1
  136. package/dist/collection/components/salla-offer/salla-offer.js +12 -7
  137. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +13 -6
  138. package/dist/collection/components/salla-order-branch/salla-order-branch.css +35 -0
  139. package/dist/collection/components/salla-order-branch/salla-order-branch.js +40 -2
  140. package/dist/collection/components/salla-order-summary/salla-order-summary.js +6 -3
  141. package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +1 -1
  142. package/dist/collection/components/salla-orders/salla-orders.js +9 -5
  143. package/dist/collection/components/salla-placeholder/salla-placeholder.js +10 -3
  144. package/dist/collection/components/salla-price-range/salla-price-range.js +6 -3
  145. package/dist/collection/components/salla-product-availability/salla-product-availability.js +16 -7
  146. package/dist/collection/components/salla-product-card/salla-product-card.js +22 -17
  147. package/dist/collection/components/salla-product-options/salla-product-options.js +9 -6
  148. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +8 -3
  149. package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
  150. package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -4
  151. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +6 -1
  152. package/dist/collection/components/salla-quick-order/salla-quick-order.js +6 -1
  153. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +8 -2
  154. package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +16 -16
  155. package/dist/collection/components/salla-review-card/salla-review-card.js +5 -1
  156. package/dist/collection/components/salla-reviews/salla-reviews.js +6 -1
  157. package/dist/collection/components/salla-scopes/salla-scopes.js +9 -2
  158. package/dist/collection/components/salla-skeleton/salla-skeleton.js +10 -10
  159. package/dist/collection/components/salla-slider/salla-slider.js +6 -3
  160. package/dist/collection/components/salla-social/salla-social.js +7 -2
  161. package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
  162. package/dist/collection/components/salla-tel-input/salla-tel-input.js +24 -19
  163. package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +6 -1
  164. package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +7 -3
  165. package/dist/collection/components/salla-user-menu/salla-user-menu.js +6 -0
  166. package/dist/collection/components/salla-user-profile/salla-user-profile.js +6 -2
  167. package/dist/collection/components/salla-user-settings/salla-user-settings.js +7 -2
  168. package/dist/collection/components/salla-verify/salla-verify.js +13 -6
  169. package/dist/components/index.js +2 -2
  170. package/dist/components/salla-add-product-button2.js +7 -2
  171. package/dist/components/salla-alert.js +2 -2
  172. package/dist/components/salla-apps-icons.js +6 -1
  173. package/dist/components/salla-booking-field2.js +10 -4
  174. package/dist/components/salla-bottom-alert.js +23 -17
  175. package/dist/components/salla-bullet-delivery.js +1 -1
  176. package/dist/components/salla-button2.js +9 -17
  177. package/dist/components/salla-cart-item-offers.js +10 -3
  178. package/dist/components/salla-cart-summary.js +1 -1
  179. package/dist/components/salla-comment-form2.js +10 -5
  180. package/dist/components/salla-comment-item2.js +8 -2
  181. package/dist/components/salla-comments.js +32 -5
  182. package/dist/components/salla-contacts.js +9 -2
  183. package/dist/components/salla-count-down2.js +16 -11
  184. package/dist/components/salla-file-upload2.js +37 -8
  185. package/dist/components/salla-filters-widget2.js +6 -3
  186. package/dist/components/salla-filters.js +9 -4
  187. package/dist/components/salla-gifting.js +11 -6
  188. package/dist/components/salla-hook.js +1 -1
  189. package/dist/components/salla-infinite-scroll.js +6 -1
  190. package/dist/components/salla-localization-modal.js +15 -2
  191. package/dist/components/salla-loyalty.js +12 -5
  192. package/dist/components/salla-map2.js +12 -7
  193. package/dist/components/salla-notifications.js +6 -1
  194. package/dist/components/salla-offer-modal.js +13 -6
  195. package/dist/components/salla-offer.js +12 -7
  196. package/dist/components/salla-order-branch.js +41 -3
  197. package/dist/components/salla-order-summary.js +6 -3
  198. package/dist/components/salla-order-totals-card.js +1 -1
  199. package/dist/components/salla-orders.js +9 -5
  200. package/dist/components/salla-placeholder2.js +10 -3
  201. package/dist/components/salla-price-range2.js +6 -3
  202. package/dist/components/salla-product-availability2.js +16 -7
  203. package/dist/components/salla-product-card2.js +13 -8
  204. package/dist/components/salla-product-options2.js +9 -6
  205. package/dist/components/salla-product-size-guide.js +8 -3
  206. package/dist/components/salla-products-list2.js +4 -3
  207. package/dist/components/salla-progress-bar2.js +20 -4
  208. package/dist/components/salla-quick-buy2.js +6 -1
  209. package/dist/components/salla-quick-order.js +6 -1
  210. package/dist/components/salla-rating-modal2.js +8 -2
  211. package/dist/components/salla-rating-stars2.js +10 -10
  212. package/dist/components/salla-review-card2.js +1 -1
  213. package/dist/components/salla-reviews.js +6 -1
  214. package/dist/components/salla-scopes.js +9 -2
  215. package/dist/components/salla-skeleton2.js +7 -7
  216. package/dist/components/salla-slider2.js +6 -3
  217. package/dist/components/salla-social.js +7 -2
  218. package/dist/components/salla-tab-header2.js +3 -3
  219. package/dist/components/salla-tel-input2.js +24 -19
  220. package/dist/components/salla-tiered-offer.js +6 -1
  221. package/dist/components/salla-trust-badges.js +7 -3
  222. package/dist/components/salla-user-menu.js +6 -0
  223. package/dist/components/salla-user-profile.js +6 -2
  224. package/dist/components/salla-user-settings.js +7 -2
  225. package/dist/components/salla-verify.js +13 -6
  226. package/dist/components/translate.js +37 -1
  227. package/dist/docs.json +44 -44
  228. package/dist/esm/{filepond-DF26o67L.js → filepond-DfLkIBAw.js} +1 -1
  229. package/dist/esm/{filepond-plugin-file-poster-B4epzDDH.js → filepond-plugin-file-poster-D3ie06bz.js} +1 -1
  230. package/dist/esm/{filepond-plugin-file-validate-size-DILJc03j.js → filepond-plugin-file-validate-size-C_S_eFQe.js} +1 -1
  231. package/dist/esm/{filepond-plugin-file-validate-type-Bic7dGts.js → filepond-plugin-file-validate-type-BE7nqQRE.js} +1 -1
  232. package/dist/esm/{filepond-plugin-image-edit-DHfCLKK0.js → filepond-plugin-image-edit-C6jDcMnX.js} +1 -1
  233. package/dist/esm/{filepond-plugin-image-exif-orientation-C7y59Hrn.js → filepond-plugin-image-exif-orientation-nKXdF-ae.js} +1 -1
  234. package/dist/esm/{filepond-plugin-image-preview-C-ZqWLeC.js → filepond-plugin-image-preview-Dzl44GI1.js} +1 -1
  235. package/dist/esm/{index-HRJpfiBN.js → index-BmRQjBRH.js} +2 -2
  236. package/dist/esm/{intlTelInput-DOVRUqFb.js → intlTelInput-dGrU4Iu9.js} +1 -1
  237. package/dist/esm/loader.js +3 -3
  238. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  239. package/dist/esm/salla-accordion_6.entry.js +10 -18
  240. package/dist/esm/salla-add-product-button_5.entry.js +37 -15
  241. package/dist/esm/salla-advertisement.entry.js +1 -1
  242. package/dist/esm/salla-alert_2.entry.js +26 -20
  243. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  244. package/dist/esm/salla-applied-filters.entry.js +1 -1
  245. package/dist/esm/salla-apps-icons.entry.js +7 -2
  246. package/dist/esm/salla-attachment-view_9.entry.js +79 -40
  247. package/dist/esm/salla-badge.entry.js +1 -1
  248. package/dist/esm/salla-basket-gap.entry.js +1 -1
  249. package/dist/esm/salla-bullet-delivery_3.entry.js +2 -2
  250. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  251. package/dist/esm/salla-cart-item-offers_2.entry.js +12 -5
  252. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  253. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  254. package/dist/esm/salla-comment-factors.entry.js +1 -1
  255. package/dist/esm/salla-comment-form_9.entry.js +67 -25
  256. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  257. package/dist/esm/salla-contacts.entry.js +10 -3
  258. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  259. package/dist/esm/salla-count-down.entry.js +17 -12
  260. package/dist/esm/salla-custom-fields.entry.js +1 -1
  261. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  262. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  263. package/dist/esm/salla-filters-widget.entry.js +7 -4
  264. package/dist/esm/salla-filters.entry.js +10 -5
  265. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  266. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  267. package/dist/esm/salla-gifting.entry.js +12 -7
  268. package/dist/esm/salla-hook.entry.js +2 -2
  269. package/dist/esm/salla-infinite-scroll.entry.js +7 -2
  270. package/dist/esm/salla-installment.entry.js +1 -1
  271. package/dist/esm/salla-list-tile.entry.js +1 -1
  272. package/dist/esm/salla-localization-modal.entry.js +14 -2
  273. package/dist/esm/salla-login-modal.entry.js +1 -1
  274. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  275. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  276. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  277. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  278. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  279. package/dist/esm/salla-loyalty.entry.js +12 -5
  280. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  281. package/dist/esm/salla-map_3.entry.js +39 -15
  282. package/dist/esm/salla-menu.entry.js +1 -1
  283. package/dist/esm/salla-metadata.entry.js +1 -1
  284. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  285. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  286. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  287. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  288. package/dist/esm/salla-notification-item_2.entry.js +7 -2
  289. package/dist/esm/salla-offer-modal.entry.js +14 -7
  290. package/dist/esm/salla-offer.entry.js +14 -9
  291. package/dist/esm/salla-order-branch.entry.js +42 -4
  292. package/dist/esm/salla-order-cancel.entry.js +1 -1
  293. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  294. package/dist/esm/salla-order-details-options.entry.js +1 -1
  295. package/dist/esm/salla-order-details.entry.js +1 -1
  296. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  297. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  298. package/dist/esm/salla-order-edit.entry.js +1 -1
  299. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  300. package/dist/esm/salla-order-shipments.entry.js +1 -1
  301. package/dist/esm/salla-order-summary.entry.js +7 -4
  302. package/dist/esm/salla-order-totals-card.entry.js +2 -2
  303. package/dist/esm/salla-orders.entry.js +10 -6
  304. package/dist/esm/salla-payments.entry.js +1 -1
  305. package/dist/esm/salla-placeholder.entry.js +10 -3
  306. package/dist/esm/salla-price-range.entry.js +7 -4
  307. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  308. package/dist/esm/salla-product-card.entry.js +14 -9
  309. package/dist/esm/salla-product-size-guide.entry.js +9 -4
  310. package/dist/esm/salla-products-list.entry.js +5 -4
  311. package/dist/esm/salla-products-slider.entry.js +1 -1
  312. package/dist/esm/salla-quick-order.entry.js +7 -2
  313. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  314. package/dist/esm/salla-rating-modal.entry.js +9 -3
  315. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  316. package/dist/esm/salla-review-order-item.entry.js +1 -1
  317. package/dist/esm/salla-scopes.entry.js +9 -2
  318. package/dist/esm/salla-search-product-card.entry.js +1 -1
  319. package/dist/esm/salla-search.entry.js +1 -1
  320. package/dist/esm/salla-skeleton.entry.js +8 -8
  321. package/dist/esm/salla-social-share.entry.js +1 -1
  322. package/dist/esm/salla-social.entry.js +8 -3
  323. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  324. package/dist/esm/salla-tiered-offer.entry.js +7 -2
  325. package/dist/esm/salla-trust-badges.entry.js +8 -4
  326. package/dist/esm/salla-user-menu.entry.js +7 -1
  327. package/dist/esm/salla-user-profile.entry.js +7 -3
  328. package/dist/esm/salla-user-settings.entry.js +8 -3
  329. package/dist/esm/salla-verify.entry.js +13 -6
  330. package/dist/esm/salla-wallet.entry.js +1 -1
  331. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  332. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  333. package/dist/esm/translate-CxrJQ3Jf.js +54 -0
  334. package/dist/esm/twilight.js +3 -3
  335. package/dist/esm/{vanilla-picker-DQKehCLa.js → vanilla-picker-DRghK0RD.js} +1 -1
  336. package/dist/twilight/p-00e1f5fd.entry.js +4 -0
  337. package/dist/twilight/{p-078e5ef8.entry.js → p-12338d19.entry.js} +1 -1
  338. package/dist/twilight/p-1557d0ca.entry.js +4 -0
  339. package/dist/twilight/{p-ef09a761.entry.js → p-15ab81d6.entry.js} +1 -1
  340. package/dist/twilight/p-182d7bab.entry.js +4 -0
  341. package/dist/twilight/p-1908ab44.entry.js +4 -0
  342. package/dist/twilight/p-19592be3.entry.js +4 -0
  343. package/dist/twilight/{p-75ed7d4e.entry.js → p-1a8c7481.entry.js} +1 -1
  344. package/dist/twilight/p-1c8bf883.entry.js +4 -0
  345. package/dist/twilight/{p-119aa7c1.entry.js → p-1c8dde1a.entry.js} +1 -1
  346. package/dist/twilight/p-1f2844db.entry.js +4 -0
  347. package/dist/twilight/{p-b66c664b.entry.js → p-2cf7eb3b.entry.js} +1 -1
  348. package/dist/twilight/p-2de4c351.entry.js +4 -0
  349. package/dist/twilight/{p-7f38cf0c.entry.js → p-2de666d8.entry.js} +1 -1
  350. package/dist/twilight/p-33e769b3.entry.js +4 -0
  351. package/dist/twilight/{p-84c56f4d.entry.js → p-3745be6d.entry.js} +1 -1
  352. package/dist/twilight/p-39a16468.entry.js +4 -0
  353. package/dist/twilight/{p-76f49fd8.entry.js → p-3a996401.entry.js} +1 -1
  354. package/dist/twilight/{p-6feb378a.entry.js → p-3bf933f6.entry.js} +1 -1
  355. package/dist/twilight/p-3d1842e4.entry.js +4 -0
  356. package/dist/twilight/p-3f373f1e.entry.js +4 -0
  357. package/dist/twilight/{p-8f0b6a64.entry.js → p-3f66f717.entry.js} +1 -1
  358. package/dist/twilight/p-3fdaf198.entry.js +4 -0
  359. package/dist/twilight/p-41248f5f.entry.js +4 -0
  360. package/dist/twilight/{p-c919171b.entry.js → p-4235b3c2.entry.js} +1 -1
  361. package/dist/twilight/{p-3c0be6b1.entry.js → p-4aa07eca.entry.js} +1 -1
  362. package/dist/twilight/{p-4e74c79f.entry.js → p-4b111d7a.entry.js} +1 -1
  363. package/dist/twilight/{p-2c13b5e8.entry.js → p-51694dd2.entry.js} +1 -1
  364. package/dist/twilight/{p-c8d4b211.entry.js → p-55b5158c.entry.js} +1 -1
  365. package/dist/twilight/{p-9a4a84b8.entry.js → p-5617656f.entry.js} +1 -1
  366. package/dist/twilight/{p-25ea21a6.entry.js → p-58dcc966.entry.js} +1 -1
  367. package/dist/twilight/p-5f35b46a.entry.js +4 -0
  368. package/dist/twilight/{p-a3009d00.entry.js → p-60e1fb1a.entry.js} +1 -1
  369. package/dist/twilight/{p-5134faef.entry.js → p-61956814.entry.js} +1 -1
  370. package/dist/twilight/p-6854e982.entry.js +4 -0
  371. package/dist/twilight/{p-1a684490.entry.js → p-68919916.entry.js} +1 -1
  372. package/dist/twilight/p-6b0d6b9b.entry.js +4 -0
  373. package/dist/twilight/p-71cbf7a4.entry.js +4 -0
  374. package/dist/twilight/{p-313dbe67.entry.js → p-730101ff.entry.js} +1 -1
  375. package/dist/twilight/p-737b93c2.entry.js +4 -0
  376. package/dist/twilight/p-74ccf675.entry.js +4 -0
  377. package/dist/twilight/{p-83edd1a1.entry.js → p-7aa15258.entry.js} +1 -1
  378. package/dist/twilight/{p-5b617110.entry.js → p-7c7648d7.entry.js} +1 -1
  379. package/dist/twilight/p-7dfe99e6.entry.js +4 -0
  380. package/dist/twilight/{p-07e1822a.entry.js → p-7e724019.entry.js} +1 -1
  381. package/dist/twilight/p-8248cecd.entry.js +4 -0
  382. package/dist/twilight/p-844ebeb6.entry.js +4 -0
  383. package/dist/twilight/{p-2413d450.entry.js → p-87cedb04.entry.js} +1 -1
  384. package/dist/twilight/p-8b21158b.entry.js +4 -0
  385. package/dist/twilight/{p-1b0da3b9.entry.js → p-8c10cb85.entry.js} +1 -1
  386. package/dist/twilight/p-8e2488fe.entry.js +4 -0
  387. package/dist/twilight/{p-33a64882.entry.js → p-9108e712.entry.js} +1 -1
  388. package/dist/twilight/p-91326a74.entry.js +4 -0
  389. package/dist/twilight/{p-100260a2.entry.js → p-96f9eb1f.entry.js} +1 -1
  390. package/dist/twilight/p-99463d58.entry.js +4 -0
  391. package/dist/twilight/p-9e196eb0.entry.js +4 -0
  392. package/dist/twilight/{p-BFMu9w68.js → p-B4fbRnFh.js} +1 -1
  393. package/dist/twilight/{p-BGUXYEQf.js → p-BIToxPOg.js} +1 -1
  394. package/dist/twilight/{p-HRJpfiBN.js → p-BmRQjBRH.js} +1 -1
  395. package/dist/twilight/{p-CliIfO7G.js → p-C1XjCBHg.js} +1 -1
  396. package/dist/twilight/{p-BdaR2plD.js → p-C48Rktr4.js} +1 -1
  397. package/dist/twilight/{p-O5jKs1Zb.js → p-CWismw4I.js} +1 -1
  398. package/dist/twilight/p-CxrJQ3Jf.js +4 -0
  399. package/dist/twilight/{p-DlxVucku.js → p-DYEGhE1O.js} +1 -1
  400. package/dist/twilight/{p-CSRWBUvd.js → p-DnZfyhH5.js} +1 -1
  401. package/dist/twilight/{p-BCFB-lfz.js → p-OCGvfvVA.js} +1 -1
  402. package/dist/twilight/{p-9a723216.entry.js → p-a80acba3.entry.js} +1 -1
  403. package/dist/twilight/{p-61c8e3c6.entry.js → p-ab1d320f.entry.js} +1 -1
  404. package/dist/twilight/{p-5f0eca54.entry.js → p-ac7d45b6.entry.js} +1 -1
  405. package/dist/twilight/{p-fe72290f.entry.js → p-aeafb519.entry.js} +1 -1
  406. package/dist/twilight/p-b5499627.entry.js +4 -0
  407. package/dist/twilight/{p-f5e46494.entry.js → p-b5829615.entry.js} +1 -1
  408. package/dist/twilight/p-b6c5435e.entry.js +4 -0
  409. package/dist/twilight/{p-02d79968.entry.js → p-baaa3e72.entry.js} +1 -1
  410. package/dist/twilight/{p-7f58cf36.entry.js → p-bfdde3db.entry.js} +1 -1
  411. package/dist/twilight/p-c22ea75b.entry.js +4 -0
  412. package/dist/twilight/{p-768f5c26.entry.js → p-c3d33aee.entry.js} +1 -1
  413. package/dist/twilight/{p-943f3e5a.entry.js → p-c5d4f71c.entry.js} +1 -1
  414. package/dist/twilight/{p-ee8d13fd.entry.js → p-cc46f297.entry.js} +1 -1
  415. package/dist/twilight/p-cca10a34.entry.js +4 -0
  416. package/dist/twilight/p-cdbb6758.entry.js +4 -0
  417. package/dist/twilight/{p-96560ca2.entry.js → p-cf1cc0d1.entry.js} +1 -1
  418. package/dist/twilight/{p-73b8ed51.entry.js → p-d034a3ba.entry.js} +1 -1
  419. package/dist/twilight/{p-155f1fed.entry.js → p-d307d40a.entry.js} +1 -1
  420. package/dist/twilight/p-d37e6c2f.entry.js +4 -0
  421. package/dist/twilight/{p-eb6f86fb.entry.js → p-d3be7885.entry.js} +1 -1
  422. package/dist/twilight/{p-87d34b7c.entry.js → p-d542e647.entry.js} +1 -1
  423. package/dist/twilight/{p-c3afee2f.entry.js → p-db9994c2.entry.js} +1 -1
  424. package/dist/twilight/p-dd4bcce0.entry.js +4 -0
  425. package/dist/twilight/{p-c89d7291.entry.js → p-de3c5f91.entry.js} +1 -1
  426. package/dist/twilight/{p-df8c51c2.entry.js → p-e2d1d888.entry.js} +1 -1
  427. package/dist/twilight/{p-0e430b25.entry.js → p-e6bc3cf4.entry.js} +1 -1
  428. package/dist/twilight/{p-e4d76bce.entry.js → p-e8d94147.entry.js} +1 -1
  429. package/dist/twilight/{p-4e0dcb5c.entry.js → p-e9319448.entry.js} +1 -1
  430. package/dist/twilight/{p-ee23fbba.entry.js → p-ec1589cf.entry.js} +1 -1
  431. package/dist/twilight/{p-d8181149.entry.js → p-ece1fecd.entry.js} +1 -1
  432. package/dist/twilight/{p-231d4bf2.entry.js → p-f0180034.entry.js} +1 -1
  433. package/dist/twilight/{p-49e2f73d.entry.js → p-f348601d.entry.js} +1 -1
  434. package/dist/twilight/{p-6e8cb8fb.entry.js → p-f5afeed8.entry.js} +1 -1
  435. package/dist/twilight/p-f70fa2e9.entry.js +4 -0
  436. package/dist/twilight/{p-a2cbbc56.entry.js → p-f76349b3.entry.js} +1 -1
  437. package/dist/twilight/{p-49d6d82e.entry.js → p-fa600113.entry.js} +1 -1
  438. package/dist/twilight/p-fde4cf31.entry.js +4 -0
  439. package/dist/twilight/{p-14b78c6e.entry.js → p-fe3645b0.entry.js} +1 -1
  440. package/dist/twilight/{p-4cee6b43.entry.js → p-feb068a2.entry.js} +1 -1
  441. package/dist/twilight/{p-D1oXS6KY.js → p-imI5he7m.js} +1 -1
  442. package/dist/twilight/twilight.esm.js +1 -1
  443. package/dist/types/Helpers/translate.d.ts +17 -0
  444. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -1
  445. package/dist/types/components/salla-alert/salla-alert.d.ts +3 -3
  446. package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +3 -0
  447. package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +3 -0
  448. package/dist/types/components/salla-bottom-alert/salla-bottom-alert.d.ts +3 -1
  449. package/dist/types/components/salla-button/salla-button.d.ts +10 -18
  450. package/dist/types/components/salla-cart-item-offers/salla-cart-item-offers.d.ts +3 -0
  451. package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +2 -2
  452. package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +3 -0
  453. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  454. package/dist/types/components/salla-comments/salla-comments.d.ts +6 -0
  455. package/dist/types/components/salla-contacts/salla-contacts.d.ts +4 -0
  456. package/dist/types/components/salla-count-down/salla-count-down.d.ts +17 -14
  457. package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +4 -0
  458. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +3 -0
  459. package/dist/types/components/salla-filters/salla-filters.d.ts +4 -1
  460. package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +2 -0
  461. package/dist/types/components/salla-gifting/salla-gifting.d.ts +3 -0
  462. package/dist/types/components/salla-hook/salla-hook.d.ts +4 -0
  463. package/dist/types/components/salla-infinite-scroll/salla-infinite-scroll.d.ts +3 -0
  464. package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +4 -0
  465. package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
  466. package/dist/types/components/salla-map/salla-map.d.ts +3 -0
  467. package/dist/types/components/salla-notifications/salla-notifications.d.ts +3 -1
  468. package/dist/types/components/salla-offer/salla-offer.d.ts +3 -0
  469. package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -0
  470. package/dist/types/components/salla-order-branch/interfaces.d.ts +1 -0
  471. package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +10 -1
  472. package/dist/types/components/salla-order-summary/salla-order-summary.d.ts +2 -0
  473. package/dist/types/components/salla-order-totals-card/interfaces.d.ts +1 -0
  474. package/dist/types/components/salla-orders/salla-orders.d.ts +3 -1
  475. package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -1
  476. package/dist/types/components/salla-price-range/salla-price-range.d.ts +2 -0
  477. package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +4 -0
  478. package/dist/types/components/salla-product-card/salla-product-card.d.ts +12 -9
  479. package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
  480. package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +3 -0
  481. package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
  482. package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +5 -0
  483. package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +3 -1
  484. package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +3 -0
  485. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -0
  486. package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +14 -14
  487. package/dist/types/components/salla-review-card/salla-review-card.d.ts +4 -0
  488. package/dist/types/components/salla-reviews/salla-reviews.d.ts +3 -0
  489. package/dist/types/components/salla-scopes/salla-scopes.d.ts +3 -0
  490. package/dist/types/components/salla-skeleton/salla-skeleton.d.ts +6 -6
  491. package/dist/types/components/salla-slider/salla-slider.d.ts +2 -0
  492. package/dist/types/components/salla-social/salla-social.d.ts +3 -0
  493. package/dist/types/components/salla-tabs/salla-tab-header.d.ts +2 -2
  494. package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -1
  495. package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +3 -1
  496. package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +3 -1
  497. package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +3 -0
  498. package/dist/types/components/salla-user-profile/salla-user-profile.d.ts +3 -1
  499. package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +3 -0
  500. package/dist/types/components/salla-verify/salla-verify.d.ts +3 -0
  501. package/dist/types/components.d.ts +128 -80
  502. package/package.json +5 -5
  503. package/dist/cjs/translate-BeU1QX_r.js +0 -20
  504. package/dist/esm/translate-CrSV-tno.js +0 -18
  505. package/dist/twilight/p-117c8823.entry.js +0 -4
  506. package/dist/twilight/p-16b45c19.entry.js +0 -4
  507. package/dist/twilight/p-20d5665b.entry.js +0 -4
  508. package/dist/twilight/p-235f40b0.entry.js +0 -4
  509. package/dist/twilight/p-2f96a72f.entry.js +0 -4
  510. package/dist/twilight/p-312d231b.entry.js +0 -4
  511. package/dist/twilight/p-334fc442.entry.js +0 -4
  512. package/dist/twilight/p-3e232b09.entry.js +0 -4
  513. package/dist/twilight/p-3f376a9d.entry.js +0 -4
  514. package/dist/twilight/p-46ad2b0e.entry.js +0 -4
  515. package/dist/twilight/p-4e3a3c55.entry.js +0 -4
  516. package/dist/twilight/p-4f9da81b.entry.js +0 -4
  517. package/dist/twilight/p-5bc3f956.entry.js +0 -4
  518. package/dist/twilight/p-5fae444a.entry.js +0 -4
  519. package/dist/twilight/p-70c45a90.entry.js +0 -4
  520. package/dist/twilight/p-761e273c.entry.js +0 -4
  521. package/dist/twilight/p-7960e489.entry.js +0 -4
  522. package/dist/twilight/p-845e4790.entry.js +0 -4
  523. package/dist/twilight/p-8688c21f.entry.js +0 -4
  524. package/dist/twilight/p-8be3fa1c.entry.js +0 -4
  525. package/dist/twilight/p-8dc7ae26.entry.js +0 -4
  526. package/dist/twilight/p-8e0a33dd.entry.js +0 -4
  527. package/dist/twilight/p-8eabd62f.entry.js +0 -4
  528. package/dist/twilight/p-8fc42a50.entry.js +0 -4
  529. package/dist/twilight/p-96317fc8.entry.js +0 -4
  530. package/dist/twilight/p-97b51153.entry.js +0 -4
  531. package/dist/twilight/p-9c1bf3fb.entry.js +0 -4
  532. package/dist/twilight/p-CrSV-tno.js +0 -4
  533. package/dist/twilight/p-b202c2d3.entry.js +0 -4
  534. package/dist/twilight/p-b2b896d1.entry.js +0 -4
  535. package/dist/twilight/p-c327bc95.entry.js +0 -4
  536. package/dist/twilight/p-c699207a.entry.js +0 -4
  537. package/dist/twilight/p-d565b168.entry.js +0 -4
  538. package/dist/twilight/p-d7a70a29.entry.js +0 -4
  539. package/dist/twilight/p-d8a5198b.entry.js +0 -4
  540. package/dist/twilight/p-db27df13.entry.js +0 -4
  541. package/dist/twilight/p-f9abcf4f.entry.js +0 -4
  542. package/dist/twilight/p-fd0d136d.entry.js +0 -4
@@ -37,12 +37,17 @@ const SallaInfiniteScroll$1 = /*@__PURE__*/ proxyCustomElement(class SallaInfini
37
37
  <span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>
38
38
  </a>`;
39
39
  this.btnLoader = this.status.querySelector('.s-button-loader');
40
- salla.lang.onLoaded(() => {
40
+ }
41
+ connectedCallback() {
42
+ this.langUnsubscribe = salla.lang.subscribe(() => {
41
43
  this.status.querySelector('.s-button-text').innerHTML = this.loadMoreText ? this.loadMoreText : salla.lang.get('common.elements.load_more');
42
44
  this.status.querySelector('.s-infinite-scroll-last').innerHTML = salla.lang.get('common.elements.end_of_content');
43
45
  this.status.querySelector('.s-infinite-scroll-error').innerHTML = salla.lang.get('common.elements.failed_to_load_more');
44
46
  });
45
47
  }
48
+ disconnectedCallback() {
49
+ this.langUnsubscribe?.();
50
+ }
46
51
  loading(isLoading = true) {
47
52
  let btnText = this.status.querySelector('.s-button-text');
48
53
  Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
5
5
  import { d as defineCustomElement$6 } from './salla-button2.js';
6
6
  import { d as defineCustomElement$5 } from './salla-loading2.js';
7
7
  import { d as defineCustomElement$4 } from './salla-modal2.js';
@@ -91,6 +91,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
91
91
  };
92
92
  //here we will used the currency code instead of the symbol when current language is not arabic
93
93
  this.arabicCurrencies = ["SAR", "AED", "KWD", "BHD", "QAR", "OMR", "EGP", "IQD", "LBP", "SYP", "TND", "DZD", "MAD", "YER"];
94
+ this.translationLoaded = false;
94
95
  this.languages = [];
95
96
  this.currencies = [];
96
97
  this.hasError = false;
@@ -110,6 +111,17 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
110
111
  this.languageSlot = this.host.querySelector('[slot="language"]')?.innerHTML || '<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>';
111
112
  this.currencySlot = this.host.querySelector('[slot="currency"]')?.innerHTML || '<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>';
112
113
  }
114
+ connectedCallback() {
115
+ // re-render whenever translations (re)load, so the labels read via salla.lang.get() stay current
116
+ this.langUnsubscribe = salla.lang.subscribe(() => {
117
+ this.translationLoaded = true;
118
+ // translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
119
+ forceUpdate(this);
120
+ });
121
+ }
122
+ disconnectedCallback() {
123
+ this.langUnsubscribe?.();
124
+ }
113
125
  async componentWillLoad() {
114
126
  await Salla.onReady();
115
127
  await Salla.lang.onLoaded();
@@ -248,7 +260,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
248
260
  this.showTrigger
249
261
  ? h("button", { type: "button", onClick: () => this.open(), class: "s-localization-modal-trigger-btn" }, h("span", null, this.getLanguageName()), h("span", { class: "s-localization-modal-trigger-separator" }, "|"), " ", h("span", { innerHTML: this.getCurrencySymbol() }))
250
262
  : '',
251
- h("salla-modal", { key: '1400a13aa9490e0f5f96259bea6bfcf3f98ee829', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: 'b31041e8d245ce30f41d4221418856e886200848', slot: 'loading' }, h("div", { key: '5531d672f7c5e8fb8a6b06fa5ae5328f4efcf3fe', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: '61b8fa69733a4e970e1f72ef5b09e773781e45ae', width: '25%', height: '15px' }), h("div", { key: '20dd0f3444f0a6e05730266bf964b74f307e9aab', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '5b8b4b760f741e0cd56c07ff341205e9ec7fe4d3', width: '25%', height: '15px' }), h("div", { key: '0a3f5dbfca2d6cd81effef5d873e03c9aef57d0b', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: 'b068f327b3335b3f9154ac20f7f6de95864dde9a', height: '40px', width: '100%' }))), !!this.hasError ?
263
+ h("salla-modal", { key: '90691a08e6f504621d486093e0b4ce4dd6ade603', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: '09c20e2dcf5840609eb6e1e124c2d8d3ceca0519', slot: 'loading' }, h("div", { key: '078f414c5c966000da4691000080912ab9e9d6e6', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'd34d24597d5dca4f6e987b82886749388e118454', width: '25%', height: '15px' }), h("div", { key: '5350cec15f6091450b297ed7114638440bd4da16', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '255dd34dc36801e78ea0dd83dd9825e58de3c20f', width: '25%', height: '15px' }), h("div", { key: '2f1d1acbb0734b72f6806d3ec229ffd8fc71f9f5', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '8ffa9e5ddfe05ca91032e29f24ef9eaedd73980d', height: '40px', width: '100%' }))), !!this.hasError ?
252
264
  h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
253
265
  h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
254
266
  h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
@@ -281,6 +293,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
281
293
  "language": [1537],
282
294
  "currency": [1537],
283
295
  "showTrigger": [1540, "show-trigger"],
296
+ "translationLoaded": [32],
284
297
  "languages": [32],
285
298
  "currencies": [32],
286
299
  "hasError": [32],
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
5
5
  import { R as Rate } from './star2.js';
6
6
  import { C as Cancel } from './cancel.js';
7
7
  import { d as defineCustomElement$b } from './salla-button2.js';
@@ -95,16 +95,23 @@ const SallaLoyalty$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyalty exten
95
95
  salla.onReady(() => {
96
96
  this.is_loggedin = salla.config.isUser();
97
97
  });
98
- salla.lang.onLoaded(() => {
99
- this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
100
- this.translationLoaded = true;
101
- });
102
98
  salla.cart.event.onUpdated(cart => {
103
99
  this.prizePoints = cart.loyalty.prize?.points;
104
100
  this.prizeTitle = cart.loyalty.prize?.title;
105
101
  this.customerPoints = cart.loyalty.customer_points || this.customerPoints;
106
102
  });
107
103
  }
104
+ connectedCallback() {
105
+ this.langUnsubscribe = salla.lang.subscribe(() => {
106
+ this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
107
+ this.translationLoaded = true;
108
+ // translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
109
+ forceUpdate(this);
110
+ });
111
+ }
112
+ disconnectedCallback() {
113
+ this.langUnsubscribe?.();
114
+ }
108
115
  onTabSelected(event) {
109
116
  const prize = this.loyaltyProgram?.prizes.find(p => p.title === event.detail?.name);
110
117
  if (prize)
@@ -477,16 +477,21 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class SallaMap extends HTMLEle
477
477
  * Sets map style.
478
478
  */
479
479
  this.theme = 'light';
480
- salla.lang.onLoaded(() => {
480
+ salla.onReady(() => {
481
+ this.apiKey = salla.config.get('store.settings.keys.maps');
482
+ });
483
+ }
484
+ connectedCallback() {
485
+ this.langUnsubscribe = salla.lang.subscribe(() => {
481
486
  this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
482
487
  this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
483
488
  this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
484
489
  this.locateButtonEdit = salla.lang.get('common.elements.edit');
485
490
  this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
486
491
  });
487
- salla.onReady(() => {
488
- this.apiKey = salla.config.get('store.settings.keys.maps');
489
- });
492
+ }
493
+ disconnectedCallback() {
494
+ this.langUnsubscribe?.();
490
495
  }
491
496
  formatAddress(address) {
492
497
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
@@ -758,11 +763,11 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class SallaMap extends HTMLEle
758
763
  }
759
764
  // render
760
765
  render() {
761
- return (h(Host, { key: 'a1c17b249dca7f6bf172e235b1960c634fba4e02', class: "s-map-wrapper" }, h("salla-modal", { key: 'd896fd882de7598dfe9ea1fddff571d5bd43b8ec', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
766
+ return (h(Host, { key: '3200387d0b18f6ecc5f5b6c2a464cb02516268f9', class: "s-map-wrapper" }, h("salla-modal", { key: '1a0b0181945dc1c5fa3950f7bcdf56f4aed2be1c', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
762
767
  this.locationModal = modal;
763
- } }, this.getLocationModal()), h("slot", { key: 'bf70602eba04f09ea904c0cc4cdda37ef9bc3988', name: "button" }, h("salla-button", { key: 'e9ab67288c8bc4a8ffeff9f49683b57421aaaaef', onClick: () => {
768
+ } }, this.getLocationModal()), h("slot", { key: '474ba510d9c5cbf0abc473151674e6627f374458', name: "button" }, h("salla-button", { key: '3a08552e4be8f1306f679fd44231743a377064ea', onClick: () => {
764
769
  this.open();
765
- }, color: "primary", class: "s-map-location-button" }, h("span", { key: '9e8d2a788cf5e209f00b73280b5b54701f354171', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : SILocation }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: '8c07eaa39a6f881147bda89f683e1ae3d9fc0a0f', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
770
+ }, color: "primary", class: "s-map-location-button" }, h("span", { key: '0b17fd41e0563c52e7826534877df00adcbce777', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : SILocation }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'b097866bd2d4b29af0212064897d3fc5311534e2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
766
771
  }
767
772
  get host() { return this; }
768
773
  static get style() { return sallaMapCss; }
@@ -20,11 +20,16 @@ const SallaNotifications$1 = /*@__PURE__*/ proxyCustomElement(class SallaNotific
20
20
  this.itemPerPage = 10;
21
21
  this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
22
22
  this.load_more_text_trans = salla.lang.get('common.elements.load_more');
23
- salla.lang.onLoaded(() => {
23
+ }
24
+ connectedCallback() {
25
+ this.langUnsubscribe = salla.lang.subscribe(() => {
24
26
  this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
25
27
  this.load_more_text_trans = salla.lang.get('common.elements.load_more');
26
28
  });
27
29
  }
30
+ disconnectedCallback() {
31
+ this.langUnsubscribe?.();
32
+ }
28
33
  // Show/hide loading
29
34
  loading(isLoading = true) {
30
35
  let btnText = this.status?.querySelector('.s-button-text');
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
5
5
  import { t as translate } from './translate.js';
6
6
  import { S as SpecialDiscountIcon } from './special-discount.js';
7
7
  import { T as Tag } from './tag.js';
@@ -41,10 +41,6 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
41
41
  this.translationLoaded = false;
42
42
  this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
43
43
  salla.event.on('offer-modal::open', product_id => this.open(product_id));
44
- salla.lang.onLoaded(() => {
45
- this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
46
- this.translationLoaded = true;
47
- });
48
44
  this.categorySlot = this.host.querySelector('[slot="category"]')?.innerHTML || `<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>`;
49
45
  // this.productSlot = this.host.querySelector('[slot="product"]')?.innerHTML || this.defaultProductSlot();
50
46
  salla.event.on('offer-modal::open', product_id => this.open(product_id));
@@ -56,6 +52,17 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
56
52
  this.open(offer.product_id);
57
53
  });
58
54
  }
55
+ connectedCallback() {
56
+ this.langUnsubscribe = salla.lang.subscribe(() => {
57
+ this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
58
+ this.translationLoaded = true;
59
+ // translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
60
+ forceUpdate(this);
61
+ });
62
+ }
63
+ disconnectedCallback() {
64
+ this.langUnsubscribe?.();
65
+ }
59
66
  /**
60
67
  * Emits a promotion viewed event for analytics tracking
61
68
  * @param offer - The offer being viewed in the modal
@@ -253,7 +260,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
253
260
  // '</div>';
254
261
  // }
255
262
  render() {
256
- return h("salla-modal", { key: 'b41e4389d7bd3ba89f7cfd10d9e2e7a8ddafbb3d', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, h("div", { key: '2beaa53d150ba7d17e1d66d6f5a5619ff03dd7f8', slot: 'loading' }, h("div", { key: '6a35aa5676449dd74ed50e48ee62fe3dc604eb82', class: "s-offer-modal-skeleton" }, h("div", { key: 'eb0458bbe6bef1c7931ef1b29c7831b6fdd8cf94', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: 'ba0dfd74e0e279633fbfa1536a1232f7b88d09c4', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: '41a501b4179488e1346a12aaf76407dfeeaa233b', height: '15px', width: '50%' }), h("salla-skeleton", { key: '60e56666921a9a1e28d070ee26864c3df488cdfb', height: '10px', width: '30%' })), h("div", { key: '7079a1b0d16c373004fc2abd7e3240349061975f', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: '63dda9415de1c0eacced5a1135bc6193290106c7', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '4e39d82ff6e2145f5a651747423c86929b703f6f', height: '15px', width: '50%' }), h("salla-skeleton", { key: '55115403e6710254d6f8637f05ce3f8733f7101b', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
263
+ return h("salla-modal", { key: 'beed061e843a93ff4dff12234d5bac13dde06023', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, h("div", { key: '390f86b1c8fa2b2c278576784e0623051dddf969', slot: 'loading' }, h("div", { key: '923ac23aa2038cf64476af0b99a93a38bdd86766', class: "s-offer-modal-skeleton" }, h("div", { key: '3ec7335437554217a22aafcfe7d11b7ebf648335', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: '48e244848f5c49c5b0d8406289ef71fc8dac3a90', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: 'c0663ea07d3afa6e70645f4ceb8610f595d5f4ed', height: '15px', width: '50%' }), h("salla-skeleton", { key: '152b319f3932dea0bb5bb2f55cd9c43904ee412d', height: '10px', width: '30%' })), h("div", { key: 'c91455f90f133d346b71c6c7ac9d78c6d645f264', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: '0657191d93e3929f74734c90b082fc272f189a83', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '2ac022a4ca2b18182e24dd10124061d9ff068094', height: '15px', width: '50%' }), h("salla-skeleton", { key: '029fca022c898eb4b519fa8f0808ca9dba1bd07a', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
257
264
  ? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
258
265
  this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
259
266
  h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
@@ -69,8 +69,16 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
69
69
  this.get_from_text = translate('pages.offer.get_from_categories', {}, 'احصل من:');
70
70
  this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
71
71
  this.product_text = salla.lang.get('common.elements.product', 'منتج');
72
+ salla.onReady(() => {
73
+ this.currentPage = salla.config.get('page.slug');
74
+ const currencies = salla.config.get('currencies') || {};
75
+ const currencyCode = salla.config.get('user.currency_code');
76
+ this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
77
+ });
78
+ }
79
+ connectedCallback() {
72
80
  // Language
73
- salla.lang.onLoaded(() => {
81
+ this.langUnsubscribe = salla.lang.subscribe(() => {
74
82
  this.offer_with_price_text = salla.lang.get('pages.offer.with_price');
75
83
  this.with_discount_text = salla.lang.get('pages.products.with_a_discount');
76
84
  this.product_discount_text = salla.lang.get('pages.products.discount');
@@ -86,12 +94,9 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
86
94
  this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
87
95
  this.product_text = salla.lang.get('common.elements.product', 'منتج');
88
96
  });
89
- salla.onReady(() => {
90
- this.currentPage = salla.config.get('page.slug');
91
- const currencies = salla.config.get('currencies') || {};
92
- const currencyCode = salla.config.get('user.currency_code');
93
- this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
94
- });
97
+ }
98
+ disconnectedCallback() {
99
+ this.langUnsubscribe?.();
95
100
  }
96
101
  async getEndpointByPageName() {
97
102
  if (this.currentPage == PageType.Cart) {
@@ -63,7 +63,7 @@ var phoneTalkingIcon = `<!-- Generated by IcoMoon.io -->
63
63
  </svg>
64
64
  `;
65
65
 
66
- const sallaOrderBranchCss = "/*!twlt*/:host{display:block}.s-order-branch-ready{background-color:color-mix(in srgb, var(--color-primary) 30%, transparent)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-order-branch-wrapper{margin-bottom:1.5rem;display:flex;flex-direction:column;gap:1rem;font-family:inherit}.s-order-branch-container{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));align-items:stretch;gap:1rem}@media (min-width: 768px){.s-order-branch-container{grid-template-columns:repeat(2, minmax(0, 1fr))}}.s-order-branch-details{display:grid;align-content:stretch;gap:1rem}.s-order-branch-info-card{display:flex;min-height:68px;align-items:center;justify-content:space-between;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:0.75rem}.s-order-branch-info-text{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:3px;text-align:start}.s-order-branch-info-label{font-size:0.75rem;line-height:1rem;line-height:1.35;color:var(--color-text-secondary,#666)}.s-order-branch-info-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-hours-card .s-order-branch-info-text{gap:0.5rem}.s-order-branch-hours-list{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-hours-item{display:inline-flex;align-items:center;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-border,#eee);padding-left:0.625rem;padding-right:0.625rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-info-action{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:0.5rem;background-color:var(--color-surface-secondary,#f6f6f6);color:var(--color-text-primary,#2b2d34);text-decoration-line:none}.s-order-branch-info-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:22px;color:currentColor}.s-order-branch-info-icon svg{height:1.5rem;width:1.5rem;fill:currentColor}.s-order-branch-card{display:flex;flex-direction:column;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:1rem}@media (min-width: 768px){.s-order-branch-card{padding:1.25rem}}.s-order-branch-ready{display:inline-flex;flex-shrink:0;align-items:center;white-space:nowrap;border-radius:9999px;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary-dark,#0c2519)}.s-order-branch-location{display:flex;min-height:52px;flex-direction:column;align-items:stretch;justify-content:space-between;gap:1.5rem}@media (min-width: 768px){.s-order-branch-location{flex-direction:row;align-items:center}}.s-order-branch-identity{display:flex;min-width:0px;flex:1 1 0%;align-items:center;gap:0.75rem}.s-order-branch-store-icon{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:1.5rem;line-height:2rem;color:var(--color-text-primary,#2b2d34)}.s-order-branch-store-icon svg{height:1em;width:1em;fill:currentColor}.s-order-branch-text{display:flex;min-width:0px;flex-direction:column;gap:0.25rem;text-align:start}.s-order-branch-name-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;line-height:1.5rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#2b2d34)}.s-order-branch-address{overflow-wrap:break-word;font-size:0.75rem;line-height:1rem;line-height:1.45;color:var(--color-text-secondary,#666)}.s-order-branch-actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;gap:0.75rem}@media (min-width: 768px){.s-order-branch-actions{flex-wrap:nowrap}}.s-order-branch-map-link{display:inline-flex;min-height:2.25rem;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.875rem;padding-right:0.875rem;padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.2;color:var(--color-primary,#236e4c);text-decoration-line:none}.s-order-branch-action-icon{display:inline-flex;align-items:center;justify-content:center;font-size:0.875rem;line-height:1.25rem;color:currentColor}.s-order-branch-action-icon svg{height:1em;width:1em}";
66
+ const sallaOrderBranchCss = "/*!twlt*/:host{display:block}.s-order-branch-ready{background-color:color-mix(in srgb, var(--color-primary) 30%, transparent)}.s-order-branch-instructions{background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}.s-order-branch-instructions-content{white-space:pre-wrap}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-order-branch-wrapper{margin-bottom:1.5rem;display:flex;flex-direction:column;gap:1rem;font-family:inherit}.s-order-branch-container{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));align-items:stretch;gap:1rem}@media (min-width: 768px){.s-order-branch-container{grid-template-columns:repeat(2, minmax(0, 1fr))}}.s-order-branch-details{display:grid;align-content:stretch;gap:1rem}.s-order-branch-info-card{display:flex;min-height:68px;align-items:center;justify-content:space-between;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:0.75rem}.s-order-branch-info-text{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:3px;text-align:start}.s-order-branch-info-label{font-size:0.75rem;line-height:1rem;line-height:1.35;color:var(--color-text-secondary,#666)}.s-order-branch-info-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-hours-card .s-order-branch-info-text{gap:0.5rem}.s-order-branch-hours-list{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-hours-item{display:inline-flex;align-items:center;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-border,#eee);padding-left:0.625rem;padding-right:0.625rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-info-action{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:0.5rem;background-color:var(--color-surface-secondary,#f6f6f6);color:var(--color-text-primary,#2b2d34);text-decoration-line:none}.s-order-branch-info-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:22px;color:currentColor}.s-order-branch-info-icon svg{height:1.5rem;width:1.5rem;fill:currentColor}.s-order-branch-card{display:flex;flex-direction:column;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:1rem}@media (min-width: 768px){.s-order-branch-card{padding:1.25rem}}.s-order-branch-ready{display:inline-flex;flex-shrink:0;align-items:center;white-space:nowrap;border-radius:9999px;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary-dark,#0c2519)}.s-order-branch-location{display:flex;min-height:52px;flex-direction:column;align-items:stretch;justify-content:space-between;gap:1.5rem}@media (min-width: 768px){.s-order-branch-location{flex-direction:row;align-items:center}}.s-order-branch-identity{display:flex;min-width:0px;flex:1 1 0%;align-items:center;gap:0.75rem}.s-order-branch-store-icon{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:1.5rem;line-height:2rem;color:var(--color-text-primary,#2b2d34)}.s-order-branch-store-icon svg{height:1em;width:1em;fill:currentColor}.s-order-branch-text{display:flex;min-width:0px;flex-direction:column;gap:0.25rem;text-align:start}.s-order-branch-name-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;line-height:1.5rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#2b2d34)}.s-order-branch-address{overflow-wrap:break-word;font-size:0.75rem;line-height:1rem;line-height:1.45;color:var(--color-text-secondary,#666)}.s-order-branch-instructions{border-radius:0.5rem;padding:1rem;text-align:start}.s-order-branch-instructions-heading{margin-bottom:0.5rem;display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;line-height:1rem;line-height:1.35}.s-order-branch-instructions-heading i{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.s-order-branch-instructions-content{margin:0px;overflow-wrap:break-word;font-size:0.875rem;line-height:1.25rem;font-weight:600;line-height:1.6}.s-order-branch-actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;gap:0.75rem}@media (min-width: 768px){.s-order-branch-actions{flex-wrap:nowrap}}.s-order-branch-map-link{display:inline-flex;min-height:2.25rem;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.875rem;padding-right:0.875rem;padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.2;color:var(--color-primary,#236e4c);text-decoration-line:none}.s-order-branch-action-icon{display:inline-flex;align-items:center;justify-content:center;font-size:0.875rem;line-height:1.25rem;color:currentColor}.s-order-branch-action-icon svg{height:1em;width:1em}";
67
67
 
68
68
  const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBranch extends HTMLElement {
69
69
  constructor() {
@@ -72,10 +72,33 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
72
72
  /** Stack the identity and contact cards vertically instead of side-by-side. */
73
73
  this.stackCards = false;
74
74
  this.isLoading = false;
75
+ /** Bilingual defaults for keys introduced by this component; store/central translations win. */
76
+ this.translationDefaults = {
77
+ 'pages.orders.pickup_instructions': { ar: 'معلومات إرشادية', en: 'Pickup instructions' },
78
+ };
75
79
  }
76
80
  componentWillLoad() {
81
+ salla.lang.onLoaded?.(() => this.registerTranslationDefaults());
82
+ this.registerTranslationDefaults();
77
83
  return this.getBranchData();
78
84
  }
85
+ /**
86
+ * Register bilingual (ar/en) defaults without overriding existing translations.
87
+ */
88
+ registerTranslationDefaults() {
89
+ if (!salla?.lang?.addBulk)
90
+ return;
91
+ const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
92
+ // `get` returns the key itself when no translation is found.
93
+ if (salla.lang.get?.(key) === key) {
94
+ acc[key] = value;
95
+ }
96
+ return acc;
97
+ }, {});
98
+ if (Object.keys(missing).length) {
99
+ salla.lang.addBulk(missing);
100
+ }
101
+ }
79
102
  async getBranchData() {
80
103
  const orderId = salla.config.get('page.id');
81
104
  if (!orderId)
@@ -111,6 +134,11 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
111
134
  label(key, fallback) {
112
135
  return salla.lang.getWithDefault(key, fallback);
113
136
  }
137
+ bilingualLabel(key) {
138
+ const entry = this.translationDefaults[key];
139
+ const locale = (salla.lang.locale || 'ar').startsWith('en') ? 'en' : 'ar';
140
+ return this.label(key, entry?.[locale] ?? entry?.ar ?? key);
141
+ }
114
142
  get preparationText() {
115
143
  const range = this.branchData?.preparation_time_range;
116
144
  if (!range?.from || !range?.to)
@@ -158,6 +186,16 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
158
186
  get phone() {
159
187
  return getBranchPhone(this.branchData?.contacts);
160
188
  }
189
+ get pickupInstructions() {
190
+ const instructions = this.branchData?.pickup_instructions;
191
+ return typeof instructions === 'string' && instructions.trim() ? instructions : '';
192
+ }
193
+ renderPickupInstructions() {
194
+ const instructions = this.pickupInstructions;
195
+ if (!instructions)
196
+ return null;
197
+ return (h("div", { class: "s-order-branch-instructions" }, h("div", { class: "s-order-branch-instructions-heading" }, h("span", { "aria-hidden": "true" }, h("i", { class: "sicon-info" })), h("span", null, this.bilingualLabel('pages.orders.pickup_instructions'))), h("p", { class: "s-order-branch-instructions-content" }, instructions)));
198
+ }
161
199
  renderDetailsColumn() {
162
200
  const phone = this.phone;
163
201
  if (!phone)
@@ -168,13 +206,13 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
168
206
  const items = this.workingHoursItems;
169
207
  if (!items.length)
170
208
  return null;
171
- 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)))))));
209
+ 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, index) => (h("span", { key: `${item}-${index}`, class: "s-order-branch-hours-item" }, item)))))));
172
210
  }
173
211
  renderBranchIdentityCard() {
174
212
  const branch = this.branchData;
175
213
  const address = this.branchAddress;
176
214
  const readyText = this.preparationText;
177
- 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)));
215
+ 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), this.renderPickupInstructions()));
178
216
  }
179
217
  render() {
180
218
  if (this.isLoading || !this.branchData) {
@@ -40,13 +40,15 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
40
40
  this.isDigitalCard = (item) => item.product.type === 'codes';
41
41
  this.isDigitalProduct = (item) => item.product.type === 'digital';
42
42
  }
43
- async componentWillLoad() {
44
- salla.lang.onLoaded(() => {
43
+ connectedCallback() {
44
+ this.langUnsubscribe = salla.lang.subscribe(() => {
45
45
  this.codes_text = salla.lang.get('pages.thank_you.codes');
46
46
  this.copy_text = salla.lang.get('common.elements.copy');
47
47
  this.files_text = salla.lang.get('pages.thank_you.files');
48
48
  this.download_text = salla.lang.get('pages.thank_you.download');
49
49
  });
50
+ }
51
+ async componentWillLoad() {
50
52
  return await this.getOrderItems();
51
53
  }
52
54
  copyToClipboardHandler(code) {
@@ -84,10 +86,11 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
84
86
  }
85
87
  }
86
88
  disconnectedCallback() {
89
+ this.langUnsubscribe?.();
87
90
  this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
88
91
  }
89
92
  render() {
90
- return (h("ul", { key: '09314d7241f730cc2dcd220542d02ca44565ae9c', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
93
+ return (h("ul", { key: 'b01089c3818be36fa4ff2341d7986269abdfd7c8', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
91
94
  this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? IconVerified : iconCopy }), h("span", null, this.copy_text))))))) :
92
95
  this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
93
96
  }
@@ -53,7 +53,7 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
53
53
  this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
54
54
  this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
55
55
  this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
56
- this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
56
+ this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.has_remaining_amount && summary.paid_amount
57
57
  ? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
58
58
  : null, summary.remaining_amount
59
59
  ? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
5
5
  import { H as Helper } from './Helper.js';
6
+ import { a as addMissingTranslations } from './translate.js';
6
7
  import { d as defineCustomElement$c } from './salla-attachment-view2.js';
7
8
  import { d as defineCustomElement$b } from './salla-button2.js';
8
9
  import { d as defineCustomElement$a } from './salla-file-upload2.js';
@@ -70,7 +71,11 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
70
71
  this.reviewPoints = 0;
71
72
  this.filterGeneration = 0;
72
73
  this.showExternalOrders = false;
73
- salla.lang.onLoaded(() => {
74
+ }
75
+ connectedCallback() {
76
+ this.langUnsubscribe = salla.lang.subscribe(() => {
77
+ addMissingTranslations(LANG_DEFAULTS);
78
+ this.refreshReviewLabels();
74
79
  this.languageCode = salla.lang.locale;
75
80
  this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
76
81
  this.totalOrderText = salla.lang.get('pages.orders.total');
@@ -80,6 +85,9 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
80
85
  this.load_more_text_trans = salla.lang.get('common.elements.load_more');
81
86
  });
82
87
  }
88
+ disconnectedCallback() {
89
+ this.langUnsubscribe?.();
90
+ }
83
91
  setLoadMoreLoading(isLoading = true) {
84
92
  const buttonText = this.status?.querySelector('.s-button-text');
85
93
  if (!buttonText || !this.btnLoader)
@@ -481,10 +489,6 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
481
489
  this.populateOrdersTableIfEmpty();
482
490
  }
483
491
  componentWillLoad() {
484
- salla.lang.onLoaded(() => {
485
- salla.lang.addBulk(LANG_DEFAULTS);
486
- this.refreshReviewLabels();
487
- });
488
492
  return salla.onReady().then(() => {
489
493
  this.setupLoyalty();
490
494
  this.showExternalOrders = salla.config
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
5
5
 
6
6
  var Inbox = `<!-- Generated by IcoMoon.io -->
7
7
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
@@ -29,10 +29,17 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
29
29
  * The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon
30
30
  */
31
31
  this.iconSize = 'md';
32
- salla.lang.onLoaded(() => {
32
+ }
33
+ connectedCallback() {
34
+ this.langUnsubscribe = salla.lang.subscribe(() => {
33
35
  this.translationLoaded = true;
36
+ // translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
37
+ forceUpdate(this);
34
38
  });
35
39
  }
40
+ disconnectedCallback() {
41
+ this.langUnsubscribe?.();
42
+ }
36
43
  alignmentClass() {
37
44
  return {
38
45
  's-placeholder-wrapper': true,
@@ -42,7 +49,7 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
42
49
  };
43
50
  }
44
51
  render() {
45
- return (h(Host, { key: '7680e249ef9627c8c53c1fcbd02bb942d3f650a4', class: this.alignmentClass() }, h("div", { key: '17df509f27879794ea37172826489033ddb85045', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '117de24add832359f0a046a5e67b16748e25572d', class: "s-placeholder-title" }, h("slot", { key: '3bc517f00c6427a1103f859b58e9763f10851f4d', name: 'title' }, h("span", { key: '17615872d9b5e03d9b33d01fde5e1753f5f7a97e' }, salla.lang.get('common.elements.no_options')))), h("div", { key: '962eafb62268b4ae3e25610a0dec6734ac58378a', class: "s-placeholder-description" }, h("slot", { key: '6326fdee550361c7cf6be95f1da2baf5616bd0f4', name: 'description' }, h("span", { key: '179fbe8c4352fad27a88b39baa6d858075006bfe' }, salla.lang.get('common.errors.empty_results'))))));
52
+ return (h(Host, { key: 'e0ddbbcae1f1770e0aa1fde820b80f010b837c70', class: this.alignmentClass() }, h("div", { key: '42aaa39f4b5ff6e854d8752fd8b7f51967a61640', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '89b58694c6e8e52df2a6cfcf53f928e8e1be65cc', class: "s-placeholder-title" }, h("slot", { key: '810a0cbc0338a430f48e0478d855baef78368d30', name: 'title' }, h("span", { key: '29f370d5460607afd3ad8971afb8387e3ab8ccd7' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'daabc9a39c770605c2b0a18a8e32c9b77cd28387', class: "s-placeholder-description" }, h("slot", { key: 'b318ca5417191c0e78eaab5e814dbc393679b416', name: 'description' }, h("span", { key: '1f616f82f63bbe79d7f88ae83544ce0ab97aa9fb' }, salla.lang.get('common.errors.empty_results'))))));
46
53
  }
47
54
  static get style() { return sallaPlaceholderCss; }
48
55
  }, [4, "salla-placeholder", {
@@ -29,7 +29,7 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
29
29
  this.minPrice = this.filtersData.price.min;
30
30
  this.maxPrice = this.filtersData.price.max;
31
31
  }
32
- salla.lang.onLoaded(() => {
32
+ this.langUnsubscribe = salla.lang.subscribe(() => {
33
33
  this.moreThanLabel = salla.lang.getWithDefault('common.elements.more_than', this.moreThanLabel);
34
34
  this.lessThanLabel = salla.lang.getWithDefault('common.elements.less_than', this.lessThanLabel);
35
35
  this.toLabel = salla.lang.getWithDefault('common.elements.to', this.toLabel);
@@ -56,6 +56,9 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
56
56
  // do whatever
57
57
  }
58
58
  }
59
+ disconnectedCallback() {
60
+ this.langUnsubscribe?.();
61
+ }
59
62
  /**
60
63
  * reset the price range inputs
61
64
  */
@@ -153,9 +156,9 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
153
156
  this.maxPrice = value === undefined ? '' : value;
154
157
  }
155
158
  render() {
156
- return (h(Host, { key: '582547be2a058bd2ab9c8567b5925f25711e1aff' }, this.filterValues.map((filterValue, index) => {
159
+ return (h(Host, { key: '58b6733af46dcfc2f58f6096a3054512aea0f13a' }, this.filterValues.map((filterValue, index) => {
157
160
  return h("label", { class: "s-filters-label", htmlFor: `${this.option.key}-${index}`, key: index }, h("input", { id: `${this.option.key}-${index}`, name: "price", type: "radio", checked: this.isChecked(filterValue), class: "s-filters-radio", onChange: e => this.handleMinMaxPrice(e, filterValue) }), h("span", { innerHTML: this.getPriceLabel(filterValue) }));
158
- }), h("div", { key: '36dea18b1f8f9b9c11a235328d6019cdb0ea5d9d', class: "flex justify-center items-center" }, h("div", { key: '765c5a4eca4cb39b47cba341e8c8f7b7888f0072', class: "relative max-w-xl w-full" }, h("div", { key: '24c54bcec699865a391f198d701abcdcf40bd438', class: "s-price-range-inputs" }, h("div", { key: '962c157d0d7df4f096eed09b51618f3bdadaa347', class: "s-price-range-relative" }, h("div", { key: 'e39123015563b93553be0498673245311644f178', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '4dadf22dc8ad4a982a07acdbb5b62b28b46aa49a', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '1aea9954befb49f6c9f3f0b1d20ce04defa352b9', class: "s-price-range-gray-text" }, " -"), h("div", { key: 'c4ed3a532ab1c780e69bcadd96ed9581e0a69a85', class: "s-price-range-relative" }, h("div", { key: '3489752cc4de7fb82e758bf877959d7c34094d28', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '9f06151e1156553f0a45283c0db0af92c269c110', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: '1496f0eb951492d3eaad51c90bc1234d746d748c', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '9efb20a46dae252c5e82bb52f0bcb57c8e030c99', innerHTML: this.isRTL ? IconArrowLeft : arrowRight })))))));
161
+ }), h("div", { key: 'ffac46ec70c43e8e6866c27e7885700d8b84e02e', class: "flex justify-center items-center" }, h("div", { key: 'a44f86c833a9311fdbd043bacab3c8e39a3798a3', class: "relative max-w-xl w-full" }, h("div", { key: '58da7b0ff0bd6599660ddf2aa2b6f1c06fbd4e3a', class: "s-price-range-inputs" }, h("div", { key: 'f6cc6ea7bc4fa74b962adc29fd0f496a81ff7f98', class: "s-price-range-relative" }, h("div", { key: 'c5dcb135e50a0eafb9662deb3adde895ea997fa9', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'ddc438e870e21a030984ba5422d686ee0d756b9a', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '713b4a7ba19e6c00a57b20978813dbd250acec6d', class: "s-price-range-gray-text" }, " -"), h("div", { key: '8a87cb916d418b898747b7dfe63d770419892ec1', class: "s-price-range-relative" }, h("div", { key: 'fb1790fdc5494925560a4ce8be907f980090ceff', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '164c84322ccf6fdddc2cb93f40440e4ddab9c164', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: 'cfb8f9d06b1b66170bddfebcd5bc0fea6bdcb9ff', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '1c1251cc2becb339ee3f286d3be50acc5ea159c0', innerHTML: this.isRTL ? IconArrowLeft : arrowRight })))))));
159
162
  }
160
163
  componentDidLoad() {
161
164
  this.isReady = true;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
4
+ import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
5
5
  import { B as BellRing } from './bell-ring.js';
6
6
  import { H as Helper } from './Helper.js';
7
7
  import { d as defineCustomElement$4 } from './salla-button2.js';
@@ -54,11 +54,8 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
54
54
  error?.classList.contains('s-product-availability-error-msg') && (error.innerText = '');
55
55
  e.keyCode === 13 && this.submit();
56
56
  };
57
- salla.lang.onLoaded(() => {
58
- this.translationLoaded = true;
59
- this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
60
- this.modal?.setTitle(this.title_);
61
- });
57
+ // Read before the guest path below strips the attribute; the lang subscriber runs later, from connectedCallback.
58
+ this.hostTitle = this.host.title;
62
59
  if (!this.productId) {
63
60
  this.productId = salla.config.get('page.id');
64
61
  }
@@ -68,6 +65,18 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
68
65
  this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
69
66
  this.host.removeAttribute('title');
70
67
  }
68
+ connectedCallback() {
69
+ this.langUnsubscribe = salla.lang.subscribe(() => {
70
+ this.translationLoaded = true;
71
+ this.title_ = this.hostTitle || salla.lang.get('pages.products.notify_availability_title');
72
+ this.modal?.setTitle(this.title_);
73
+ // translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
74
+ forceUpdate(this);
75
+ });
76
+ }
77
+ disconnectedCallback() {
78
+ this.langUnsubscribe?.();
79
+ }
71
80
  channelsWatcher(newValue) {
72
81
  // fall back to store-configured channels, reading config directly when the SDK helper is missing
73
82
  let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
@@ -146,7 +155,7 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
146
155
  field.nextElementSibling['innerText'] = '* ' + errorMsg;
147
156
  }
148
157
  render() {
149
- return (h(Host, { key: 'ba2423b2f12f2c6b3870c55b12157bbcf42407e8', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
158
+ return (h(Host, { key: 'aa9fad186e8f24c5e27a1e9e6d5de75806226bce', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
150
159
  ? 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'))
151
160
  :
152
161
  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()));