@salla.sa/twilight-components 2.14.598 → 2.14.600

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 (385) hide show
  1. package/dist/cjs/{filepond-Yrcu23Ew.js → filepond-DVmQ7csb.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DRez16xM.js → filepond-plugin-file-poster-DMSpzTqe.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-H6Ijvhk2.js → filepond-plugin-file-validate-size-D_ptbEIk.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-ozbX9Tb-.js → filepond-plugin-file-validate-type-0yFqmcfN.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CynCgK8H.js → filepond-plugin-image-edit-E7sYYAWn.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-C18fCqoh.js → filepond-plugin-image-exif-orientation-DbrEAQoa.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-FiRPNiZp.js → filepond-plugin-image-preview-DO_tpcG1.js} +1 -1
  8. package/dist/cjs/{index-CpkvCUQ3.js → index-Bw9ZFzBG.js} +2 -2
  9. package/dist/cjs/{intlTelInput-dW1ObsSS.js → intlTelInput-DxYQu3W_.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +4 -4
  12. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  13. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-alert_2.cjs.entry.js +2 -2
  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 +50 -19
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +22 -13
  20. package/dist/cjs/salla-badge.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-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 +1 -1
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +60 -29
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  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 +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  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 +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  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 +1 -1
  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 +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  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 +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  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 +5 -5
  73. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +49 -7
  76. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  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 +3 -3
  91. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +12 -2
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tab-content_3.cjs.entry.js +24 -8
  97. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  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/ssr-helpers-BjD2_F8m.js +48 -0
  107. package/dist/cjs/twilight.cjs.js +2 -2
  108. package/dist/cjs/{vanilla-picker-CSaDVE6R.js → vanilla-picker-CcRVM0uV.js} +1 -1
  109. package/dist/collection/collection-manifest.json +1 -1
  110. package/dist/collection/components/salla-accordion/salla-accordion-body.js +1 -1
  111. package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
  112. package/dist/collection/components/salla-accordion/salla-accordion.js +1 -1
  113. package/dist/collection/components/salla-alert/salla-alert.js +1 -1
  114. package/dist/collection/components/salla-apps-icons/salla-apps-icons.css +3 -0
  115. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +108 -32
  116. package/dist/collection/components/salla-apps-icons/salla-apps-icons.types.js +1 -0
  117. package/dist/collection/components/salla-badge/salla-badge.js +1 -1
  118. package/dist/collection/components/salla-booking-field/salla-booking-field.js +21 -6
  119. package/dist/collection/components/salla-contacts/salla-contacts.js +114 -37
  120. package/dist/collection/components/salla-contacts/salla-contacts.types.js +1 -0
  121. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  122. package/dist/collection/components/salla-order-options-modal/salla-order-options-modal.js +4 -4
  123. package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +76 -7
  124. package/dist/collection/components/salla-scopes/salla-scopes.css +14 -0
  125. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  126. package/dist/collection/components/salla-search/salla-search.js +11 -1
  127. package/dist/collection/components/salla-tabs/salla-tab-content.js +9 -2
  128. package/dist/collection/components/salla-tabs/salla-tabs.js +36 -8
  129. package/dist/collection/utils/ssr-helpers.js +105 -0
  130. package/dist/components/index.js +2 -2
  131. package/dist/components/salla-accordion-body2.js +1 -1
  132. package/dist/components/salla-accordion-head2.js +2 -2
  133. package/dist/components/salla-accordion2.js +1 -1
  134. package/dist/components/salla-alert.js +1 -1
  135. package/dist/components/salla-apps-icons.js +53 -20
  136. package/dist/components/salla-badge2.js +1 -1
  137. package/dist/components/salla-booking-field2.js +12 -3
  138. package/dist/components/salla-contacts.js +62 -30
  139. package/dist/components/salla-order-options-modal2.js +4 -4
  140. package/dist/components/salla-order-totals-card.js +50 -6
  141. package/dist/components/salla-scopes.js +2 -2
  142. package/dist/components/salla-search.js +11 -1
  143. package/dist/components/salla-tab-content2.js +8 -1
  144. package/dist/components/salla-tabs2.js +17 -7
  145. package/dist/components/ssr-helpers.js +46 -0
  146. package/dist/docs.json +255 -34
  147. package/dist/esm/{filepond-Cqatu146.js → filepond-CMtCLsIc.js} +1 -1
  148. package/dist/esm/{filepond-plugin-file-poster-DbVXhgv4.js → filepond-plugin-file-poster-OjOFU-jw.js} +1 -1
  149. package/dist/esm/{filepond-plugin-file-validate-size-BpJPambh.js → filepond-plugin-file-validate-size-BFCz_KY1.js} +1 -1
  150. package/dist/esm/{filepond-plugin-file-validate-type-3Qrskyxw.js → filepond-plugin-file-validate-type-BaPcxnrR.js} +1 -1
  151. package/dist/esm/{filepond-plugin-image-edit-Cjy7cOV1.js → filepond-plugin-image-edit-D_tfXMIg.js} +1 -1
  152. package/dist/esm/{filepond-plugin-image-exif-orientation-DYM12Yp-.js → filepond-plugin-image-exif-orientation-DS2k4xg9.js} +1 -1
  153. package/dist/esm/{filepond-plugin-image-preview-C9nMEHVX.js → filepond-plugin-image-preview-B6bJkNCH.js} +1 -1
  154. package/dist/esm/{index-noRE1pbw.js → index-C670SYee.js} +2 -2
  155. package/dist/esm/{intlTelInput-CiinYrbq.js → intlTelInput-BUOxAmWZ.js} +1 -1
  156. package/dist/esm/loader.js +3 -3
  157. package/dist/esm/salla-accordion-body_2.entry.js +4 -4
  158. package/dist/esm/salla-accordion_6.entry.js +2 -2
  159. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  160. package/dist/esm/salla-advertisement.entry.js +1 -1
  161. package/dist/esm/salla-alert_2.entry.js +2 -2
  162. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  163. package/dist/esm/salla-applied-filters.entry.js +1 -1
  164. package/dist/esm/salla-apps-icons.entry.js +50 -19
  165. package/dist/esm/salla-attachment-view_9.entry.js +22 -13
  166. package/dist/esm/salla-badge.entry.js +2 -2
  167. package/dist/esm/salla-basket-gap.entry.js +1 -1
  168. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  169. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  170. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  171. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  172. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  173. package/dist/esm/salla-comment-factors.entry.js +1 -1
  174. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  175. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  176. package/dist/esm/salla-contacts.entry.js +60 -29
  177. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  178. package/dist/esm/salla-count-down.entry.js +1 -1
  179. package/dist/esm/salla-custom-fields.entry.js +1 -1
  180. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  181. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  182. package/dist/esm/salla-filters-widget.entry.js +1 -1
  183. package/dist/esm/salla-filters.entry.js +1 -1
  184. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  185. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  186. package/dist/esm/salla-gifting.entry.js +1 -1
  187. package/dist/esm/salla-hook.entry.js +1 -1
  188. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  189. package/dist/esm/salla-installment.entry.js +1 -1
  190. package/dist/esm/salla-list-tile.entry.js +1 -1
  191. package/dist/esm/salla-localization-modal.entry.js +1 -1
  192. package/dist/esm/salla-login-modal.entry.js +1 -1
  193. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  194. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  195. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  196. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  197. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  198. package/dist/esm/salla-loyalty.entry.js +1 -1
  199. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  200. package/dist/esm/salla-map_3.entry.js +1 -1
  201. package/dist/esm/salla-menu.entry.js +1 -1
  202. package/dist/esm/salla-metadata.entry.js +1 -1
  203. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  204. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  205. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  206. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  207. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  208. package/dist/esm/salla-offer-modal.entry.js +1 -1
  209. package/dist/esm/salla-offer.entry.js +1 -1
  210. package/dist/esm/salla-order-branch.entry.js +1 -1
  211. package/dist/esm/salla-order-cancel.entry.js +1 -1
  212. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  213. package/dist/esm/salla-order-details-options.entry.js +1 -1
  214. package/dist/esm/salla-order-details.entry.js +1 -1
  215. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  216. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  217. package/dist/esm/salla-order-edit.entry.js +1 -1
  218. package/dist/esm/salla-order-options-modal.entry.js +5 -5
  219. package/dist/esm/salla-order-shipments.entry.js +1 -1
  220. package/dist/esm/salla-order-summary.entry.js +1 -1
  221. package/dist/esm/salla-order-totals-card.entry.js +49 -7
  222. package/dist/esm/salla-orders.entry.js +1 -1
  223. package/dist/esm/salla-payments.entry.js +1 -1
  224. package/dist/esm/salla-placeholder.entry.js +1 -1
  225. package/dist/esm/salla-price-range.entry.js +1 -1
  226. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  227. package/dist/esm/salla-product-card.entry.js +1 -1
  228. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  229. package/dist/esm/salla-products-list.entry.js +1 -1
  230. package/dist/esm/salla-products-slider.entry.js +1 -1
  231. package/dist/esm/salla-quick-order.entry.js +1 -1
  232. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  233. package/dist/esm/salla-rating-modal.entry.js +1 -1
  234. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  235. package/dist/esm/salla-review-order-item.entry.js +1 -1
  236. package/dist/esm/salla-scopes.entry.js +3 -3
  237. package/dist/esm/salla-search-product-card.entry.js +1 -1
  238. package/dist/esm/salla-search.entry.js +12 -2
  239. package/dist/esm/salla-skeleton.entry.js +1 -1
  240. package/dist/esm/salla-social-share.entry.js +1 -1
  241. package/dist/esm/salla-social.entry.js +1 -1
  242. package/dist/esm/salla-tab-content_3.entry.js +24 -8
  243. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  244. package/dist/esm/salla-trust-badges.entry.js +1 -1
  245. package/dist/esm/salla-user-menu.entry.js +1 -1
  246. package/dist/esm/salla-user-profile.entry.js +1 -1
  247. package/dist/esm/salla-user-settings.entry.js +1 -1
  248. package/dist/esm/salla-verify.entry.js +1 -1
  249. package/dist/esm/salla-wallet.entry.js +1 -1
  250. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  251. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  252. package/dist/esm/ssr-helpers-BJN-DTdN.js +46 -0
  253. package/dist/esm/twilight.js +3 -3
  254. package/dist/esm/{vanilla-picker-BWBrgMJQ.js → vanilla-picker-vQxevRSA.js} +1 -1
  255. package/dist/twilight/{p-8e248aa7.entry.js → p-0116fc35.entry.js} +1 -1
  256. package/dist/twilight/{p-c589a326.entry.js → p-02946cf5.entry.js} +1 -1
  257. package/dist/twilight/{p-341a7ab8.entry.js → p-07453f6c.entry.js} +1 -1
  258. package/dist/twilight/{p-5110433d.entry.js → p-0c6290e0.entry.js} +1 -1
  259. package/dist/twilight/{p-fc717703.entry.js → p-0cb5d9c6.entry.js} +1 -1
  260. package/dist/twilight/{p-2eea4245.entry.js → p-0f68e660.entry.js} +1 -1
  261. package/dist/twilight/{p-a2de7999.entry.js → p-132d9742.entry.js} +1 -1
  262. package/dist/twilight/p-157873ee.entry.js +4 -0
  263. package/dist/twilight/{p-4d482ee4.entry.js → p-161fce7a.entry.js} +1 -1
  264. package/dist/twilight/{p-3b4f66d3.entry.js → p-167a9c58.entry.js} +1 -1
  265. package/dist/twilight/{p-f03f893c.entry.js → p-19b7fccb.entry.js} +1 -1
  266. package/dist/twilight/{p-88f650da.entry.js → p-19d9b193.entry.js} +1 -1
  267. package/dist/twilight/{p-6e53afc6.entry.js → p-1c75de1e.entry.js} +1 -1
  268. package/dist/twilight/p-1c7999c9.entry.js +4 -0
  269. package/dist/twilight/{p-a8408d51.entry.js → p-1ea04494.entry.js} +1 -1
  270. package/dist/twilight/{p-5360d082.entry.js → p-1f3d5e3e.entry.js} +1 -1
  271. package/dist/twilight/{p-03e89cb1.entry.js → p-22fc1505.entry.js} +1 -1
  272. package/dist/twilight/{p-ce120ce6.entry.js → p-27d94a42.entry.js} +1 -1
  273. package/dist/twilight/{p-be7dcc25.entry.js → p-2a865b0b.entry.js} +1 -1
  274. package/dist/twilight/{p-221e47a5.entry.js → p-2bb95112.entry.js} +1 -1
  275. package/dist/twilight/{p-7f0bdf0e.entry.js → p-2d8d9829.entry.js} +1 -1
  276. package/dist/twilight/{p-9fcc7eeb.entry.js → p-2df4e63a.entry.js} +1 -1
  277. package/dist/twilight/{p-64158678.entry.js → p-316be8a7.entry.js} +1 -1
  278. package/dist/twilight/{p-0859fe23.entry.js → p-321022f5.entry.js} +1 -1
  279. package/dist/twilight/{p-1fe92c36.entry.js → p-34ab84e2.entry.js} +1 -1
  280. package/dist/twilight/{p-454b32f0.entry.js → p-36ddb8db.entry.js} +1 -1
  281. package/dist/twilight/{p-c41c1eff.entry.js → p-3b45e21a.entry.js} +1 -1
  282. package/dist/twilight/{p-826ed1c6.entry.js → p-3eface57.entry.js} +1 -1
  283. package/dist/twilight/{p-856ed222.entry.js → p-46334bbe.entry.js} +1 -1
  284. package/dist/twilight/{p-16072449.entry.js → p-4678b6d7.entry.js} +1 -1
  285. package/dist/twilight/{p-52a7dbb7.entry.js → p-4ea3a8a1.entry.js} +1 -1
  286. package/dist/twilight/{p-cab2f22a.entry.js → p-56d064c0.entry.js} +1 -1
  287. package/dist/twilight/{p-1930b915.entry.js → p-57768c0e.entry.js} +1 -1
  288. package/dist/twilight/{p-0b54834f.entry.js → p-57ddfcfe.entry.js} +1 -1
  289. package/dist/twilight/{p-87dcc9d8.entry.js → p-60e920c6.entry.js} +1 -1
  290. package/dist/twilight/{p-3f730d01.entry.js → p-62690afe.entry.js} +1 -1
  291. package/dist/twilight/{p-6f66a0f2.entry.js → p-6339c31f.entry.js} +1 -1
  292. package/dist/twilight/{p-138d6214.entry.js → p-660271f5.entry.js} +1 -1
  293. package/dist/twilight/{p-88d64b87.entry.js → p-6b28397a.entry.js} +1 -1
  294. package/dist/twilight/{p-40c8b553.entry.js → p-6bacaa30.entry.js} +1 -1
  295. package/dist/twilight/{p-517807b2.entry.js → p-6cfb6628.entry.js} +1 -1
  296. package/dist/twilight/{p-4962d869.entry.js → p-6cffd732.entry.js} +1 -1
  297. package/dist/twilight/{p-0ca1a782.entry.js → p-6eb365f3.entry.js} +1 -1
  298. package/dist/twilight/{p-c5d4682b.entry.js → p-73125aab.entry.js} +1 -1
  299. package/dist/twilight/{p-ce981b2f.entry.js → p-73189ed2.entry.js} +1 -1
  300. package/dist/twilight/{p-5a6c4fdf.entry.js → p-744c8337.entry.js} +1 -1
  301. package/dist/twilight/{p-4d1582f8.entry.js → p-82430d31.entry.js} +1 -1
  302. package/dist/twilight/{p-2636c473.entry.js → p-8359286c.entry.js} +1 -1
  303. package/dist/twilight/{p-27712ed1.entry.js → p-84ed92e9.entry.js} +1 -1
  304. package/dist/twilight/p-84ee1884.entry.js +4 -0
  305. package/dist/twilight/{p-07dc637e.entry.js → p-87feddeb.entry.js} +1 -1
  306. package/dist/twilight/{p-d986aa18.entry.js → p-8d119291.entry.js} +1 -1
  307. package/dist/twilight/{p-5ac2e6ab.entry.js → p-8f1789f7.entry.js} +1 -1
  308. package/dist/twilight/{p-950634d1.entry.js → p-90765c65.entry.js} +1 -1
  309. package/dist/twilight/{p-d09b6b8c.entry.js → p-94f18d97.entry.js} +1 -1
  310. package/dist/twilight/p-9a7da6d0.entry.js +4 -0
  311. package/dist/twilight/{p-d13f5256.entry.js → p-9ab10a2f.entry.js} +1 -1
  312. package/dist/twilight/{p-53bf1d54.entry.js → p-9ace9fc5.entry.js} +1 -1
  313. package/dist/twilight/{p-141218a3.entry.js → p-9b9c2adf.entry.js} +1 -1
  314. package/dist/twilight/p-BJN-DTdN.js +4 -0
  315. package/dist/twilight/{p-noRE1pbw.js → p-C670SYee.js} +1 -1
  316. package/dist/twilight/{p-B867dk1j.js → p-CcijNXaY.js} +1 -1
  317. package/dist/twilight/{p-D98H4WeK.js → p-D-pGRpnm.js} +1 -1
  318. package/dist/twilight/{p-CyV163V_.js → p-D33qIToB.js} +1 -1
  319. package/dist/twilight/{p-CbJEogz0.js → p-DEtbzT0x.js} +1 -1
  320. package/dist/twilight/{p-CADeV7A-.js → p-DIJHCILO.js} +1 -1
  321. package/dist/twilight/{p-DomdkzLW.js → p-DOJsGUE-.js} +1 -1
  322. package/dist/twilight/{p-DWkNp24H.js → p-DYkb22mH.js} +1 -1
  323. package/dist/twilight/p-Kqe2HSSB.js +9 -0
  324. package/dist/twilight/{p-475d01e2.entry.js → p-af525459.entry.js} +1 -1
  325. package/dist/twilight/{p-d306b947.entry.js → p-afc17688.entry.js} +1 -1
  326. package/dist/twilight/{p-78b86647.entry.js → p-b124899c.entry.js} +1 -1
  327. package/dist/twilight/{p-18aff2d5.entry.js → p-b13efdf9.entry.js} +1 -1
  328. package/dist/twilight/{p-b1a35349.entry.js → p-b2da9ea7.entry.js} +1 -1
  329. package/dist/twilight/{p-f5f0246f.entry.js → p-b3f0b7e3.entry.js} +1 -1
  330. package/dist/twilight/{p-3c45c49f.entry.js → p-b40466ae.entry.js} +1 -1
  331. package/dist/twilight/p-b59eab4f.entry.js +4 -0
  332. package/dist/twilight/{p-c631e2cd.entry.js → p-b6674eab.entry.js} +1 -1
  333. package/dist/twilight/{p-c6af4f05.entry.js → p-b7f5a180.entry.js} +1 -1
  334. package/dist/twilight/p-bf95f806.entry.js +4 -0
  335. package/dist/twilight/{p-9ce917a6.entry.js → p-c6f677aa.entry.js} +1 -1
  336. package/dist/twilight/{p-8876efa6.entry.js → p-c7728312.entry.js} +1 -1
  337. package/dist/twilight/{p-4ce97595.entry.js → p-c840c67c.entry.js} +1 -1
  338. package/dist/twilight/{p-f6f633fc.entry.js → p-cba57487.entry.js} +1 -1
  339. package/dist/twilight/{p-919dd049.entry.js → p-ccd75cf6.entry.js} +1 -1
  340. package/dist/twilight/{p-87b3c231.entry.js → p-ce8bdea8.entry.js} +1 -1
  341. package/dist/twilight/{p-ba76a96a.entry.js → p-d2b41e2d.entry.js} +1 -1
  342. package/dist/twilight/{p-82d59bf3.entry.js → p-d897273e.entry.js} +1 -1
  343. package/dist/twilight/{p-ba9ee435.entry.js → p-d923ecda.entry.js} +1 -1
  344. package/dist/twilight/{p-9e084610.entry.js → p-da9b84ee.entry.js} +1 -1
  345. package/dist/twilight/p-de0ce00a.entry.js +4 -0
  346. package/dist/twilight/{p-76d11b5c.entry.js → p-dfcb0978.entry.js} +1 -1
  347. package/dist/twilight/{p-0c9f5232.entry.js → p-dff87ddc.entry.js} +1 -1
  348. package/dist/twilight/{p-7f882abf.entry.js → p-e1b853b2.entry.js} +1 -1
  349. package/dist/twilight/{p-16b2f58b.entry.js → p-e4ba8208.entry.js} +1 -1
  350. package/dist/twilight/{p-9ed52621.entry.js → p-e506fbee.entry.js} +1 -1
  351. package/dist/twilight/p-e80bc0ce.entry.js +4 -0
  352. package/dist/twilight/{p-4333c630.entry.js → p-e8f7ed7b.entry.js} +1 -1
  353. package/dist/twilight/{p-67ecb74a.entry.js → p-ea4e6f55.entry.js} +1 -1
  354. package/dist/twilight/{p-721819ee.entry.js → p-ea82cbb3.entry.js} +1 -1
  355. package/dist/twilight/{p-15b8fa7f.entry.js → p-ef9567bd.entry.js} +1 -1
  356. package/dist/twilight/{p-f9fbcb8d.entry.js → p-f106d1e8.entry.js} +1 -1
  357. package/dist/twilight/{p-15f5d424.entry.js → p-f37cc89b.entry.js} +1 -1
  358. package/dist/twilight/p-f52c49c8.entry.js +4 -0
  359. package/dist/twilight/{p-1cbbdcea.entry.js → p-f5f448b7.entry.js} +1 -1
  360. package/dist/twilight/{p-BT5AJCX9.js → p-r8T0WY8a.js} +1 -1
  361. package/dist/twilight/twilight.esm.js +1 -1
  362. package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +26 -13
  363. package/dist/types/components/salla-apps-icons/salla-apps-icons.types.d.ts +4 -0
  364. package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +5 -1
  365. package/dist/types/components/salla-contacts/salla-contacts.d.ts +26 -14
  366. package/dist/types/components/salla-contacts/salla-contacts.types.d.ts +7 -0
  367. package/dist/types/components/salla-order-totals-card/interfaces.d.ts +27 -0
  368. package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +12 -4
  369. package/dist/types/components/salla-scopes/interfaces.d.ts +1 -0
  370. package/dist/types/components/salla-search/salla-search.d.ts +3 -1
  371. package/dist/types/components/salla-tabs/salla-tab-content.d.ts +3 -2
  372. package/dist/types/components/salla-tabs/salla-tabs.d.ts +8 -3
  373. package/dist/types/components.d.ts +90 -22
  374. package/dist/types/utils/ssr-helpers.d.ts +73 -0
  375. package/package.json +5 -5
  376. package/dist/twilight/p-0cb548be.entry.js +0 -4
  377. package/dist/twilight/p-3263103c.entry.js +0 -4
  378. package/dist/twilight/p-540a7588.entry.js +0 -4
  379. package/dist/twilight/p-DN2opqoB.js +0 -9
  380. package/dist/twilight/p-a030da8e.entry.js +0 -4
  381. package/dist/twilight/p-aabc57e3.entry.js +0 -4
  382. package/dist/twilight/p-c8d269df.entry.js +0 -4
  383. package/dist/twilight/p-e4c88bee.entry.js +0 -4
  384. package/dist/twilight/p-e7fc0d63.entry.js +0 -4
  385. package/dist/twilight/p-eef846fa.entry.js +0 -4
@@ -11,7 +11,7 @@ const SallaAccordionBody = /*@__PURE__*/ proxyCustomElement(class SallaAccordion
11
11
  this.__registerHost();
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: 'cc83d228977d0e4049466fb8aa38b9709fbcf9e5', class: "s-accordion-body-wrapper" }, h("slot", { key: 'c8ca6d7d1512f8e32bbb7ef0785949d655ff3619' })));
14
+ return (h(Host, { key: 'e0752ba7819b03c9183d457c52e31bb65844eaf8', class: "s-accordion-body-wrapper" }, h("slot", { key: '668d1bd4985dd44d07eaf850dc9ad56683be167f' })));
15
15
  }
16
16
  static get style() { return sallaAccordionBodyCss; }
17
17
  }, [4, "salla-accordion-body"]);
@@ -34,13 +34,13 @@ const SallaAccordionHead = /*@__PURE__*/ proxyCustomElement(class SallaAccordion
34
34
  this.emitCollapsePanel();
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: '066294cd654d22b5cbe483dc34932b8132dda4c4', "data-collapsed": this.collapsed.toString(), onClick: () => this.toggleCollapse(), class: "s-accordion-head-wrapper" }, h("div", { key: 'f235f06aa9bdb59d500148acf4477445bf2f1673', class: "s-accordion-head-wrapper-start" }, h("slot", { key: '25797156b79f88ae61f53397b71b35a79ca62908', name: "title" }), h("slot", { key: '76a66a77b082b5fc18c3ac844a294e2fde113151', name: "progress" }), h("slot", { key: 'd20c4aacfe72c0f15dd8034c43d2bb4e8e0921df', name: "html" })), (this.collapsible || this.host.querySelector('[slot="note"]')) && (h("div", { key: '1a6ae8bebe03ad6c02d69a3c3b3dab425dbec0ea', class: "s-accordion-head-wrapper-end" }, h("slot", { key: 'db284dd1fb40cd1520c225e0c7416b2ea71b8c33', name: "note" }), this.collapsible && (h("button", { key: '378c70a472ed11df058aa32e42ab94de68f214b9', type: 'button', class: {
37
+ return (h(Host, { key: '71394d6d0786f39e70b1ef33ad86d4e0e0c38666', "data-collapsed": this.collapsed.toString(), onClick: () => this.toggleCollapse(), class: "s-accordion-head-wrapper" }, h("div", { key: '95ccb46518936ce2290534268060dff5458752c6', class: "s-accordion-head-wrapper-start" }, h("slot", { key: '37efcfadaacb3acff86501d8c97b954f0c95f6bc', name: "title" }), h("slot", { key: '5f02b2a9692e4714780a337fa04b5516e0a4e9c8', name: "progress" }), h("slot", { key: '57edacda97012754df3709e37bb8259386c51c0a', name: "html" })), (this.collapsible || this.host.querySelector('[slot="note"]')) && (h("div", { key: '8d56232063aa29fcad4593217778d05c989f7cc5', class: "s-accordion-head-wrapper-end" }, h("slot", { key: '226aa26ad7263db0ca130e01580c80d5862add41', name: "note" }), this.collapsible && (h("button", { key: 'd69093c8823575dc7bc1e17fed364121b5e9db90', type: 'button', class: {
38
38
  's-accordion-head-wrapper-toggle': true,
39
39
  active: !this.collapsed,
40
40
  }, onClick: e => {
41
41
  e.stopPropagation();
42
42
  this.toggleCollapse();
43
- } }, h("span", { key: '1b4a583b66ed1f332d01ebd15c0c77a231e4e197', class: "s-accordion-head-wrapper-toggle-icon", innerHTML: this.collapsed ? Add : Minus })))))));
43
+ } }, h("span", { key: '36a0c5e1996f797e61519844f1be808b6119918c', class: "s-accordion-head-wrapper-toggle-icon", innerHTML: this.collapsed ? Add : Minus })))))));
44
44
  }
45
45
  get host() { return this; }
46
46
  static get style() { return sallaAccordionHeadCss; }
@@ -42,7 +42,7 @@ const SallaAccordion = /*@__PURE__*/ proxyCustomElement(class SallaAccordion ext
42
42
  }
43
43
  }
44
44
  render() {
45
- return (h(Host, { key: '06f5ef106dbc1fd779a757918cb4b424ac1adff6', class: `s-accordion-wrapper ${this.dir} ${this.bordered ? 's-accordion-wrapper-bordered' : ''} ${this.size ? `size-${this.size}` : ''}`, "data-collapsed": this.collapsed.toString() }, h("slot", { key: '3f51bced9c33774081f603b3dbf9a3dd153f2d47' })));
45
+ return (h(Host, { key: 'f00e8204cd26d8f5f754fccea219bd7a81a67fbe', class: `s-accordion-wrapper ${this.dir} ${this.bordered ? 's-accordion-wrapper-bordered' : ''} ${this.size ? `size-${this.size}` : ''}`, "data-collapsed": this.collapsed.toString() }, h("slot", { key: 'bcb1e384cec9b5faf3fd27544485542b3e8ef2c5' })));
46
46
  }
47
47
  get host() { return this; }
48
48
  static get style() { return sallaAccordionCss; }
@@ -33,7 +33,7 @@ const SallaAlert$1 = /*@__PURE__*/ proxyCustomElement(class SallaAlert extends H
33
33
  }
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: 'c1a1e9575ed9aab90960ad3a54ada18d8e3ee240', class: `s-alert-wrapper s-alert-${this.variant}` }, h("span", { key: '7fb08789ad8355cc4bd441a5869e95d2337685a5', class: "s-alert-icon" }, this.renderIcon()), h("span", { key: 'ed3c4fcb5450f21caedeeca28a9a177b151333ec', class: "s-alert-text" }, this.message, h("slot", { key: '6818451171f85fd6ad63f07c69871082d3fcba4e' }))));
36
+ return (h(Host, { key: 'c530a6bfc1e9927e30d1bed3c28ed16282155d1c', class: `s-alert-wrapper s-alert-${this.variant}` }, h("span", { key: '42daa9c657b992f9594a71460050dbb0e59314d2', class: "s-alert-icon" }, this.renderIcon()), h("span", { key: '1c157391e9091d858f3478cc542e3fa0cf895938', class: "s-alert-text" }, this.message, h("slot", { key: '20f5f31390e74bbeea9ab57103f3a61a1bc9ad5e' }))));
37
37
  }
38
38
  static get style() { return sallaAlertCss; }
39
39
  }, [4, "salla-alert", {
@@ -2,53 +2,86 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+ import { i as isSallaSdkAvailable } from './ssr-helpers.js';
5
6
 
6
- const sallaAppsIconsCss = "/*!twlt*/:host{display:block}.s-apps-icons-list{display:flex;gap:1rem}.s-apps-icons-list.vertical{flex-direction:column}.s-apps-icons-item{line-height:1}.s-apps-icons-item:hover{color:var(--color-primary)}";
7
+ const sallaAppsIconsCss = "/*!twlt*/:host{display:block}.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-apps-icons-list{display:flex;gap:1rem}.s-apps-icons-list.vertical{flex-direction:column}.s-apps-icons-item{line-height:1}.s-apps-icons-item:hover{color:var(--color-primary)}";
7
8
 
8
9
  const SallaAppsIcons$1 = /*@__PURE__*/ proxyCustomElement(class SallaAppsIcons extends HTMLElement {
9
10
  constructor() {
10
11
  super();
11
12
  this.__registerHost();
12
- this.apps = salla.config.get('store.apps');
13
- this.appSlot = this.host.querySelector('[slot="app"]')?.innerHTML || `<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />`;
14
- salla.onReady(() => {
15
- this.apps = salla.config.get('store.apps');
16
- });
13
+ /**
14
+ * Flag to hide the title.
15
+ */
16
+ this.hideTitle = false;
17
+ /**
18
+ * Display icons vertically instead of horizontally.
19
+ */
20
+ this.vertical = false;
21
+ this.sdkApps = null;
22
+ }
23
+ getDefaultSlot() {
24
+ return `<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />`;
17
25
  }
18
26
  connectedCallback() {
19
- this.langUnsubscribe = salla.lang.subscribe(() => {
20
- this.appsTitle = salla.lang.get('blocks.footer.download_apps');
27
+ if (isSallaSdkAvailable()) {
28
+ this.langUnsubscribe = salla.lang.subscribe(() => {
29
+ if (!this.appsTitle || this.appsTitle === this.langTitle) {
30
+ this.appsTitle = this.langTitle = salla.lang.get('blocks.footer.download_apps');
31
+ }
32
+ });
33
+ }
34
+ // capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
35
+ if (!this.appSlot) {
36
+ const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="app"]');
37
+ this.appSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
38
+ }
39
+ if (!isSallaSdkAvailable())
40
+ return;
41
+ // load the store's apps even when `apps` is passed, so clearing the prop falls back to them
42
+ salla.onReady(() => {
43
+ this.sdkApps = salla.config.get('store.apps');
21
44
  });
22
45
  }
23
46
  disconnectedCallback() {
24
47
  this.langUnsubscribe?.();
25
48
  }
26
49
  getAppsArray() {
27
- return Object.entries(this.apps)
28
- .map(([name, value]) => ({ name, value }));
50
+ const apps = this.apps || this.sdkApps;
51
+ if (!apps) {
52
+ return [];
53
+ }
54
+ return Object.entries(apps)
55
+ .filter(([, value]) => value && typeof value === 'string')
56
+ .map(([name, value]) => ({ name, value: value }));
29
57
  }
30
- componentWillLoad() {
31
- return new Promise(resolve => salla.onReady(resolve));
58
+ getCdnUrl(iconName) {
59
+ if (isSallaSdkAvailable()) {
60
+ return salla.url.cdn(`images/${iconName}.png`);
61
+ }
62
+ return `https://cdn.salla.net/images/${iconName}.png`;
63
+ }
64
+ componentDidRender() {
65
+ this.host.querySelector('[slot="app"]')?.remove();
32
66
  }
33
67
  render() {
34
68
  const appsArray = this.getAppsArray();
35
- if (Array.isArray(appsArray) && !appsArray.length) {
69
+ if (appsArray.length === 0) {
36
70
  return;
37
71
  }
38
- return (h(Host, { class: "s-apps-icons" }, !this.hideTitle && h("h3", null, this.appsTitle), h("div", { class: { "s-apps-icons-list": true, "vertical": this.vertical } }, appsArray.map((app, index) => (h("a", { key: index, href: app.value, rel: "noreferrer", target: "_blank", class: "s-apps-icons-item", id: "app-slot", innerHTML: this.appSlot
39
- .replace(/\{icon\}/g, salla.url.cdn(`images/${app.name}.png`))
72
+ return (h(Host, { class: "s-apps-icons" }, !this.hideTitle && this.appsTitle && h("h3", null, this.appsTitle), h("div", { class: { "s-apps-icons-list": true, "vertical": this.vertical } }, appsArray.map((app) => (h("a", { key: app.name, href: app.value, rel: "noreferrer", target: "_blank", class: "s-apps-icons-item", innerHTML: this.appSlot
73
+ .replace(/\{icon\}/g, this.getCdnUrl(app.name))
40
74
  .replace(/\{name\}/g, app.name) }))))));
41
75
  }
42
- componentDidRender() {
43
- this.host.querySelector('[slot="app"]')?.remove();
44
- }
45
76
  get host() { return this; }
46
77
  static get style() { return sallaAppsIconsCss; }
47
78
  }, [0, "salla-apps-icons", {
79
+ "apps": [16],
80
+ "appsTitle": [1025, "apps-title"],
48
81
  "hideTitle": [4, "hide-title"],
49
- "appsTitle": [1, "apps-title"],
50
82
  "vertical": [4],
51
- "apps": [32]
83
+ "slotTemplate": [1, "slot-template"],
84
+ "sdkApps": [32]
52
85
  }]);
53
86
  function defineCustomElement$1() {
54
87
  if (typeof customElements === "undefined") {
@@ -86,7 +86,7 @@ const SallaBadge = /*@__PURE__*/ proxyCustomElement(class SallaBadge extends HTM
86
86
  this.bg = 'light';
87
87
  }
88
88
  render() {
89
- return (h("div", { key: '7c7196d49621a58192820725ab40d906344983d1', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '7a39f5d916e80809f795b5cc880f1d31238fa7c5' })));
89
+ return (h("div", { key: '7a78bf8120879a06ce40d6e63d7fcd8444fff727', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '1ea89bc586b06a0e498d972d5efc5eaaffaf5a63' })));
90
90
  }
91
91
  static get style() { return sallaBadgeCss; }
92
92
  }, [4, "salla-badge", {
@@ -40,7 +40,6 @@ const SallaBookingField = /*@__PURE__*/ proxyCustomElement(class SallaBookingFie
40
40
  Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));
41
41
  }
42
42
  connectedCallback() {
43
- // Load translations
44
43
  this.langUnsubscribe = salla.lang.subscribe(() => this.setTranslations());
45
44
  }
46
45
  disconnectedCallback() {
@@ -90,6 +89,11 @@ const SallaBookingField = /*@__PURE__*/ proxyCustomElement(class SallaBookingFie
90
89
  handleBookingOpen(data) {
91
90
  if (data.id !== this.productId)
92
91
  return;
92
+ // Opt-in native override: inside the SPA webview the bridge forwards this same event to native
93
+ // as `mobile::booking.open` { url, id }, and the native shell owns the booking screen — skip the
94
+ // web iframe modal so both don't show. On web / apps without the flag, the modal opens as usual.
95
+ if (salla.mobile?.isSpaWebview?.())
96
+ return;
93
97
  this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);
94
98
  this.iframeReady = true;
95
99
  setTimeout(() => {
@@ -119,7 +123,12 @@ const SallaBookingField = /*@__PURE__*/ proxyCustomElement(class SallaBookingFie
119
123
  window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));
120
124
  this.emitAfterReloadEvent();
121
125
  window.addEventListener('message', this.handleMessageEvent.bind(this));
122
- this.reservationsInput.addEventListener('invalid', e => this.invalidInput.emit(e));
126
+ this.reservationsInput.addEventListener('invalid', e => {
127
+ this.invalidInput.emit({
128
+ target: e.target,
129
+ validity: e.target.validity
130
+ });
131
+ });
123
132
  this.reservationsInput.addEventListener('input', () => {
124
133
  this.reservationsInput.setCustomValidity('');
125
134
  this.reservationsInput.reportValidity();
@@ -175,7 +184,7 @@ const SallaBookingField = /*@__PURE__*/ proxyCustomElement(class SallaBookingFie
175
184
  return (h("span", { class: "s-booking-field-reservations-time" }, h("i", { class: "s-booking-field-reservations-icon", innerHTML: TimeIcon }), h("span", null, reservation.from_timestamp, " - ", reservation.to_timestamp)));
176
185
  }
177
186
  render() {
178
- return (h(Host, { key: '58a42c3f74c835039e3eeab63b3fdb8b1ab3f3d7' }, h("div", { key: '3e700a1f5de967167a1a5014ee6a39ae99ce53e7', class: "s-booking-field-main" }, this.option.required || this.reservations.length > 0 ? h("div", { class: "s-booking-field-price" }, h("span", { innerHTML: salla.money(this.option.price) })) : '', h("salla-button", { key: '7f86d43a5a5100869f249b690545269e218a1799', class: "s-booking-field-book-now", size: "small", loaderPosition: "center", fill: "outline", onClick: event => this.openBookingModal(event, false) }, h("span", { key: '9a8b446c2d59ffe0b2800d48de1911c2b94a9078', class: "s-booking-field-book-now-content" }, h("span", { key: '678a8be040e17bdd6234c05d79a29fb45286156d', innerHTML: BookingTime }), this.reservations.length ? this.editLabel : this.bookNowLabel))), this.reservations.length > 0 && (h("div", { key: 'c1271b41d4584887a2c4e07b90c4d3b7ef285447', class: "s-booking-field-reservations" }, this.reservations.map((reservation, index) => (h("div", { key: index, class: "s-booking-field-reservations-item" }, this.renderReservationDate(reservation), this.renderReservationTime(reservation)))))), h("input", { key: 'b4f42ddb7adee25ef281805491bd4e5effc73ab9', class: "s-hidden", name: this.option.name, required: this.option.required, value: JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations), ref: reservations => this.reservationsInput = reservations }), this.iframeReady && this.bookingModal()));
187
+ return (h(Host, { key: '867baeadef44a292fb91610fa37543b13f106791' }, h("div", { key: '3a6b64b5ca81a71665954d48059c3f7991b074d5', class: "s-booking-field-main" }, this.option.required || this.reservations.length > 0 ? h("div", { class: "s-booking-field-price" }, h("span", { innerHTML: salla.money(this.option.price) })) : '', h("salla-button", { key: 'a274a931a7c2f3817774196c2150cf6b36365028', class: "s-booking-field-book-now", size: "small", loaderPosition: "center", fill: "outline", onClick: event => this.openBookingModal(event, false) }, h("span", { key: '52da7cac22d69527c92844bc907610593521c115', class: "s-booking-field-book-now-content" }, h("span", { key: '9aaece05a99d335158b5bbc110cbf4e7febba06d', innerHTML: BookingTime }), this.reservations.length ? this.editLabel : this.bookNowLabel))), this.reservations.length > 0 && (h("div", { key: '320151bc171976c0f2962fa30fa7efb923830cd0', class: "s-booking-field-reservations" }, this.reservations.map((reservation, index) => (h("div", { key: index, class: "s-booking-field-reservations-item" }, this.renderReservationDate(reservation), this.renderReservationTime(reservation)))))), h("input", { key: 'ecea033a152115533a80ec2ae33b415c11b19c42', class: "s-hidden", name: this.option.name, required: this.option.required, value: JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations), ref: reservations => this.reservationsInput = reservations }), this.iframeReady && this.bookingModal()));
179
188
  }
180
189
  get host() { return this; }
181
190
  static get style() { return sallaBookingFieldCss; }
@@ -2,6 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+ import { i as isSallaSdkAvailable } from './ssr-helpers.js';
5
6
  import { W as WhatsappIcon } from './whatsapp2.js';
6
7
  import { M as MailIcon } from './mail.js';
7
8
 
@@ -32,64 +33,98 @@ const SallaContacts$1 = /*@__PURE__*/ proxyCustomElement(class SallaContacts ext
32
33
  constructor() {
33
34
  super();
34
35
  this.__registerHost();
35
- this.contacts = salla.config.get('store.contacts');
36
+ /**
37
+ * Flag to toggle title visibility.
38
+ */
39
+ this.hideTitle = false;
40
+ /**
41
+ * Conditional flag to check whether the content is header or not.
42
+ */
43
+ this.isHeader = false;
44
+ /**
45
+ * Flag to toggle list of contents whether vertical or horizontal.
46
+ */
47
+ this.horizontal = false;
48
+ /**
49
+ * Flag condition to show icon only or icon with label.
50
+ */
51
+ this.iconsOnly = false;
52
+ this.sdkContacts = null;
36
53
  this.iconsList = { mobile, whatsapp: WhatsappIcon, phone, telegram, email: MailIcon };
37
- this.contactSlot = this.host.querySelector('[slot="contact"]')?.innerHTML || `<a href={link} class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>${!this.iconsOnly && "<span class='unicode'>{value}</span>"}</a>`;
38
- salla.onReady(() => {
39
- this.contacts = salla.config.get('store.contacts');
40
- });
54
+ }
55
+ getDefaultSlot() {
56
+ const valueMarkup = this.iconsOnly ? '' : "<span class='unicode'>{value}</span>";
57
+ return '<a href="{link}" class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>' + valueMarkup + '</a>';
41
58
  }
42
59
  connectedCallback() {
43
- this.langUnsubscribe = salla.lang.subscribe(() => {
44
- if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
45
- this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
46
- }
60
+ if (isSallaSdkAvailable()) {
61
+ this.langUnsubscribe = salla.lang.subscribe(() => {
62
+ if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
63
+ this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
64
+ }
65
+ });
66
+ }
67
+ // capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
68
+ if (!this.contactSlot) {
69
+ const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="contact"]');
70
+ this.contactSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
71
+ }
72
+ if (!isSallaSdkAvailable())
73
+ return;
74
+ // load the store's contacts even when `contacts` is passed, so clearing the prop falls back to them
75
+ salla.onReady(() => {
76
+ this.sdkContacts = salla.config.get('store.contacts');
47
77
  });
48
78
  }
49
79
  disconnectedCallback() {
50
80
  this.langUnsubscribe?.();
51
81
  }
82
+ getContactsData() {
83
+ return this.contacts || this.sdkContacts || {};
84
+ }
52
85
  getContactsArray() {
53
- return Object.entries(this.contacts)
54
- .filter(([_key, value]) => value !== '')
55
- .map(([type, value]) => ({ type, value }));
86
+ const contactsData = this.getContactsData();
87
+ return Object.entries(contactsData)
88
+ .filter(([, value]) => value && value !== '')
89
+ .map(([type, value]) => ({ type, value: value }));
56
90
  }
57
- getContactLink(type) {
58
- const contactValue = this.contacts[type];
91
+ getContactLink(type, contactValue) {
59
92
  switch (type) {
60
93
  case 'phone':
61
94
  case 'mobile':
62
95
  return `tel:${contactValue}`;
63
96
  case 'whatsapp':
64
- const whatsAppNumber = (contactValue || '').toString().replace(/[^\d]/g, '');
65
- return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` : salla.url.get('whatsapp/send');
97
+ const whatsAppNumber = contactValue.toString().replace(/[^\d]/g, '');
98
+ return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` :
99
+ (isSallaSdkAvailable() ? salla.url.get('whatsapp/send') : '');
66
100
  case 'email':
67
101
  return `mailto:${contactValue}`;
68
102
  case 'telegram':
69
- // Check if the contact is already a full URL
70
103
  return contactValue.startsWith('https://t.me/') ? contactValue : `https://t.me/${contactValue}`;
71
104
  default:
72
105
  return contactValue;
73
106
  }
74
107
  }
75
108
  getContactIcon(type) {
76
- return this.iconsList[type];
109
+ return this.iconsList[type] || '';
77
110
  }
78
- componentWillLoad() {
79
- return new Promise(resolve => salla.onReady(resolve));
111
+ componentDidRender() {
112
+ this.host.querySelector('[slot="contact"]')?.remove();
80
113
  }
81
114
  render() {
82
115
  const contactsArray = this.getContactsArray();
83
- if (!contactsArray || contactsArray.length == 0) {
116
+ if (!contactsArray || contactsArray.length === 0) {
84
117
  return;
85
118
  }
86
119
  if (this.isHeader) {
87
- return (h(Host, { class: "s-contacts s-contacts-header" }, contactsArray.filter((contact) => contact.type == 'phone' || contact.type == 'email').map((contact, index) => (h("a", { href: this.getContactLink(contact.type), key: index, class: "s-contacts-topnav-link" }, contact.type === 'email' ? (contact.value) : ([
120
+ return (h(Host, { class: "s-contacts s-contacts-header" }, contactsArray
121
+ .filter(contact => contact.type === 'phone' || contact.type === 'email')
122
+ .map((contact, index) => (h("a", { href: this.getContactLink(contact.type, contact.value), key: index, class: "s-contacts-topnav-link" }, contact.type === 'email' ? (contact.value) : ([
88
123
  h("span", null, this.contactsTitle, ": "),
89
124
  h("span", { class: "unicode" }, contact.value)
90
125
  ]))))));
91
126
  }
92
- return (h(Host, { class: "s-contacts" }, !this.hideTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
127
+ return (h(Host, { class: "s-contacts" }, !this.hideTitle && this.contactsTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
93
128
  's-contacts-list': true,
94
129
  's-contacts-list-horizontal': this.horizontal,
95
130
  's-contacts-list-vertical': !this.horizontal,
@@ -97,22 +132,19 @@ const SallaContacts$1 = /*@__PURE__*/ proxyCustomElement(class SallaContacts ext
97
132
  } }, contactsArray.map((contact, index) => (h("div", { key: index, id: "contact-slot", innerHTML: this.contactSlot
98
133
  .replace(/\{icon\}/g, this.getContactIcon(contact.type))
99
134
  .replace(/\{value\}/g, contact.value.toString())
100
- .replace(/\{link\}/g, this.getContactLink(contact.type)) }))))));
101
- }
102
- componentDidRender() {
103
- // this.host.querySelectorAll('#contact-slot').forEach(el => el.replaceWith(el.firstChild));
104
- this.host.querySelector('[slot="contact"]')?.remove();
135
+ .replace(/\{link\}/g, this.getContactLink(contact.type, contact.value)) }))))));
105
136
  }
106
137
  get host() { return this; }
107
138
  static get style() { return sallaContactsCss; }
108
139
  }, [0, "salla-contacts", {
140
+ "contacts": [16],
109
141
  "contactsTitle": [1025, "contacts-title"],
110
142
  "hideTitle": [4, "hide-title"],
111
143
  "isHeader": [4, "is-header"],
112
144
  "horizontal": [4],
113
145
  "iconsOnly": [4, "icons-only"],
114
- "contacts": [32],
115
- "iconsList": [32]
146
+ "slotTemplate": [1, "slot-template"],
147
+ "sdkContacts": [32]
116
148
  }]);
117
149
  function defineCustomElement$1() {
118
150
  if (typeof customElements === "undefined") {
@@ -388,18 +388,18 @@ const SallaOrderOptionsModal = /*@__PURE__*/ proxyCustomElement(class SallaOrder
388
388
  // header-inner container; the empty title div is hidden via .s-oom-wizard-modal CSS.
389
389
  // In single-step mode the header shows the relevant title text directly.
390
390
  const modalTitle = this._isWizard ? ' ' : (isStep1 ? this.freeProductTitle : this.title);
391
- return (h("salla-modal", { key: '60e626bb49f8592c952182c182e6d73ddcaadeed', ref: el => (this.modal = el), class: `s-order-options-modal-host${this._isWizard ? ' s-oom-wizard-modal' : ''}`, width: "md", "modal-title": modalTitle, onModalVisibilityChanged: (e) => {
391
+ return (h("salla-modal", { key: '42c7d7d765d42b6fc25ec86eb824dc2bf7a0b1bd', ref: el => (this.modal = el), class: `s-order-options-modal-host${this._isWizard ? ' s-oom-wizard-modal' : ''}`, width: "md", "modal-title": modalTitle, onModalVisibilityChanged: (e) => {
392
392
  if (!e.detail)
393
393
  this.handleClose();
394
- } }, this._isWizard && (h("div", { key: 'a842b5d1566c8bb0bd68d5986fb092c14f8a01d6', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
394
+ } }, this._isWizard && (h("div", { key: '6e8e57a4f8d49d06cd70ae00b01d47b9ad66448e', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
395
395
  index > 0 && h("div", { class: "s-oom-connector" }),
396
396
  h("div", { class: `s-oom-step ${index === current ? 'active' : (index < current ? 'done' : '')}` }, h("span", { class: "s-oom-step-num" }, index + 1), h("span", { class: "s-oom-step-label" }, label)),
397
- ]))), h("div", { key: '1f61a756dcf824bf4d8be71ccbd9a0c2742851d2', class: "s-order-options-modal-body" }, isStep1 && this.freeProduct && (h("div", { key: '667841475dff0deda06d8d04e0a2841f33ec54b6', class: "s-oom-free-product-card" }, this.freeProduct.thumbnail && (h("img", { key: '129b99226216f0c1ca59fccbc0ba35d5af8cdee7', class: "s-oom-free-product-thumb", src: this.freeProduct.thumbnail, alt: this.freeProduct.name })), h("div", { key: 'ae385e2d4fb967144743d67eadd50f31c23332ec', class: "s-oom-free-product-info" }, h("span", { key: '4f48a3fd0af91435060a0d303a6d0f77f5afd1bc', class: "s-oom-free-product-name" }, this.freeProduct.name), h("div", { key: 'de62961aba2246c1d52d411461d6a45aed620eab', class: "s-oom-free-product-tags" }, h("span", { key: 'db1af48cc1a7583a7f2d026159ff01f03ad216bf', class: "s-oom-free-badge" }, this.t('common.elements.free', 'مجاني')), this.freeProduct.offer_name && (h("span", { key: 'ce595bccd755e908deb1c566758ca3629171962b', class: "s-oom-free-offer-name" }, this.freeProduct.offer_name)))))), h("p", { key: '161740bddbf25369392f362f9613f2e9c6a94fc1', class: "s-order-options-modal-subtitle" }, isStep1 ? this.freeProductSubtitle : this.subtitle), h("div", { key: '20d3f92f0f3782d599ec5ce923c2dad93f7c7608', class: "s-order-options-modal-fields" }, this.orderOptions.length > 0 && (h("salla-product-options", { key: this.sessionId, ref: el => {
397
+ ]))), h("div", { key: '748c8bdd31860f1f2b512940ea0e4aea27737e88', class: "s-order-options-modal-body" }, isStep1 && this.freeProduct && (h("div", { key: '85cd3903f2ba210b973eef66750ecee5a6d77a4b', class: "s-oom-free-product-card" }, this.freeProduct.thumbnail && (h("img", { key: '809cf47e06f640c438373823cb90801097274653', class: "s-oom-free-product-thumb", src: this.freeProduct.thumbnail, alt: this.freeProduct.name })), h("div", { key: 'bd7abf27cdb0256b9a00ae085be07b8e655ea33a', class: "s-oom-free-product-info" }, h("span", { key: '0324efe7d547a168eb51c4a398aef6cc097f1867', class: "s-oom-free-product-name" }, this.freeProduct.name), h("div", { key: '9eb2ab65e83e294796b910d77a2d1f7207824dad', class: "s-oom-free-product-tags" }, h("span", { key: '921d3487595380b3accc074655c445060595e6bc', class: "s-oom-free-badge" }, this.t('common.elements.free', 'مجاني')), this.freeProduct.offer_name && (h("span", { key: '0bf1142a8078b8faf67af0d623ab41fcbeba2414', class: "s-oom-free-offer-name" }, this.freeProduct.offer_name)))))), h("p", { key: '372fe80cd605b6b5b9d9fd1976f40878f67a1830', class: "s-order-options-modal-subtitle" }, isStep1 ? this.freeProductSubtitle : this.subtitle), h("div", { key: '179205569c7cadf8326fb202936a08775bc62b4c', class: "s-order-options-modal-fields" }, this.orderOptions.length > 0 && (h("salla-product-options", { key: this.sessionId, ref: el => {
398
398
  if (!el)
399
399
  return;
400
400
  this.optionsRefs.set(uniqueKey, el);
401
401
  el.seedSelectedOptions?.();
402
- }, "product-id": productIdAttr, "unique-key": uniqueKey, options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), h("div", { key: 'c80a0c1f1b32e5396483171196879bc43713c2f4', slot: "footer", class: "s-order-options-modal-footer" }, showApplePay ? (h("div", { class: "s-order-options-modal-apple-pay-wrap" }, h("div", { class: "s-order-options-modal-apple-pay-total" }, h("span", { class: "s-order-options-modal-apple-pay-label" }, this.totalLabel), h("span", { class: "s-order-options-modal-apple-pay-amount", innerHTML: totalHtml })), h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', buttonstyle: "black", type: "buy", class: "s-order-options-modal-apple-pay", onClick: () => this.handleSubmit() }))) : (h("salla-button", { type: "button", color: "primary", fill: "solid", width: "wide", loading: this.isSubmitting, onClick: () => this.handleSubmit() }, h("span", { class: "s-order-options-modal-cta-content" }, h("span", { class: "s-order-options-modal-cta-text" }, isStep1 ? this.freeProductContinueLabel : this.submitLabel), isStep1
402
+ }, "product-id": productIdAttr, "unique-key": uniqueKey, options: JSON.stringify(this.orderOptions), "hide-out-label": "1", "no-padding": true })))), h("div", { key: '4abd512d2592800f2797897ee1cff61f3276ad2c', slot: "footer", class: "s-order-options-modal-footer" }, showApplePay ? (h("div", { class: "s-order-options-modal-apple-pay-wrap" }, h("div", { class: "s-order-options-modal-apple-pay-total" }, h("span", { class: "s-order-options-modal-apple-pay-label" }, this.totalLabel), h("span", { class: "s-order-options-modal-apple-pay-amount", innerHTML: totalHtml })), h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', buttonstyle: "black", type: "buy", class: "s-order-options-modal-apple-pay", onClick: () => this.handleSubmit() }))) : (h("salla-button", { type: "button", color: "primary", fill: "solid", width: "wide", loading: this.isSubmitting, onClick: () => this.handleSubmit() }, h("span", { class: "s-order-options-modal-cta-content" }, h("span", { class: "s-order-options-modal-cta-text" }, isStep1 ? this.freeProductContinueLabel : this.submitLabel), isStep1
403
403
  ? h("i", { class: {
404
404
  's-oom-cta-arrow': true,
405
405
  // "Forward" is left in RTL and right in LTR; hardcoding arrow-left made
@@ -10,21 +10,62 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
10
10
  super();
11
11
  this.__registerHost();
12
12
  }
13
- handleOrderChange(newValue) {
14
- if (newValue) {
15
- this.setSummaryFromProp(newValue);
13
+ // `amounts` wins over the legacy `order` whenever both are set
14
+ refreshSummary() {
15
+ if (this.amounts) {
16
+ this.setSummaryFromAmounts(this.amounts);
17
+ }
18
+ else if (this.order) {
19
+ this.setSummaryFromOrder(this.order);
16
20
  }
17
21
  else {
18
22
  this.summary = undefined;
19
23
  }
20
24
  }
25
+ handleAmountsChange() {
26
+ this.refreshSummary();
27
+ }
28
+ handleOrderChange() {
29
+ this.refreshSummary();
30
+ }
21
31
  async componentWillLoad() {
22
32
  await Salla.onReady();
23
- if (this.order) {
24
- this.setSummaryFromProp(this.order);
33
+ this.refreshSummary();
34
+ }
35
+ normalizeAmounts(value) {
36
+ const parsed = typeof value === 'string' ? JSON.parse(value) : value;
37
+ return {
38
+ sub_total: parsed.sub_total,
39
+ total: parsed.total,
40
+ shipping_cost: parsed.shipping_cost,
41
+ cod_cost: parsed.cash_on_delivery,
42
+ paid_amount: parsed.paid_amount,
43
+ remaining_amount: parsed.remaining_amount,
44
+ refund_amount: parsed.refund_amount,
45
+ options: parsed.options,
46
+ options_total: parsed.options_total,
47
+ tax: parsed.tax
48
+ ? {
49
+ percent: typeof parsed.tax.percent === 'string' ? parseFloat(parsed.tax.percent) : parsed.tax.percent,
50
+ amount: parsed.tax.amount,
51
+ }
52
+ : undefined,
53
+ discounts: parsed.discounts?.map((d) => ({
54
+ name: d.title,
55
+ discount: typeof d.discount === 'string' ? parseFloat(d.discount) : d.discount,
56
+ })),
57
+ };
58
+ }
59
+ setSummaryFromAmounts(value) {
60
+ try {
61
+ this.summary = this.normalizeAmounts(value);
62
+ }
63
+ catch (error) {
64
+ salla.logger.error('Failed to parse amounts data', error);
65
+ this.summary = undefined;
25
66
  }
26
67
  }
27
- setSummaryFromProp(value) {
68
+ setSummaryFromOrder(value) {
28
69
  try {
29
70
  const parsedValue = typeof value === 'string' ? JSON.parse(value) : value;
30
71
  this.summary = parsedValue;
@@ -67,13 +108,16 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
67
108
  : null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)), refundAmount > 0 ? (h("div", { class: "s-order-totals-card-refund" }, this.renderRefundRow(summary.refund_amount))) : null)))));
68
109
  }
69
110
  static get watchers() { return {
111
+ "amounts": ["handleAmountsChange"],
70
112
  "order": ["handleOrderChange"]
71
113
  }; }
72
114
  static get style() { return sallaOrderTotalsCardCss; }
73
115
  }, [0, "salla-order-totals-card", {
116
+ "amounts": [1],
74
117
  "order": [1],
75
118
  "summary": [32]
76
119
  }, undefined, {
120
+ "amounts": ["handleAmountsChange"],
77
121
  "order": ["handleOrderChange"]
78
122
  }]);
79
123
  function defineCustomElement$1() {
@@ -23,7 +23,7 @@ var ModeType;
23
23
  ModeType["AVAILABILITY"] = "availability";
24
24
  })(ModeType || (ModeType = {}));
25
25
 
26
- const sallaScopesCss = "/*!twlt*/.s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}.mb-5{margin-bottom:1.25rem}.block{display:block}.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-hidden{display:none}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.s-hidden{display:none}.s-scrollbar::-webkit-scrollbar{width:5px}.s-scrollbar::-webkit-scrollbar-track{background-color:#eee}.s-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary);border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.s-scopes-title{margin-bottom:0.75rem}.s-scopes-header{margin-bottom:0.5rem;display:block;text-align:center}.s-scopes-header-icon{margin:auto;display:flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(252 252 252 / var(--tw-bg-opacity, 1))}.s-scopes-header-icon svg{height:2rem;fill:var(--color-primary)}.s-scopes-header-title{font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-scopes-header-subtitle{text-align:left;font-size:1.25rem;line-height:1.75rem}.s-scopes-header-subtitle:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-scopes-search-wrapper{position:relative;width:100%}.s-scopes-search-icon{pointer-events:none;position:absolute;top:0px;bottom:0px;left:0px;display:flex;align-items:center;padding-left:0.75rem}.s-scopes-search-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:auto;right:0px;padding-left:0px;padding-right:0.75rem}.s-scopes-search-icon svg{height:1.25rem;width:1.25rem;fill:#9ca3af}.s-scopes-search-input{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));padding:0.625rem;padding-left:2.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-scopes-search-input:focus{--tw-ring-color:var(--color-primary)}.s-scopes-search-input:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0px;padding-right:2.5rem}.s-scopes-input-wrap{margin-bottom:1.25rem;display:flex;align-items:center}.s-scopes-input-wrap:last-child{margin-bottom:0px}.s-scopes-input{height:1rem;width:1rem;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));color:var(--color-primary)}.s-scopes-input:focus{--tw-ring-color:var(--color-primary)}.s-scopes-input:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.75rem}.s-scopes-input:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.75rem}.s-scopes-label{display:flex;flex-grow:1;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-scopes-select{height:2.5rem;width:100%;appearance:none;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-scopes-select:focus{border-color:var(--color-primary)}.s-scopes-container{margin-top:1.25rem;max-height:300px;overflow-y:auto;padding-left:0.5rem}.s-scopes-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0px;padding-right:0.5rem}.s-scopes-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.s-scopes-is-closed{opacity:0.5}.s-scopes-closed-badge{--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-scopes-clickable{cursor:pointer}.s-scopes-submit{margin-top:1.5rem;height:auto}.s-scopes-color-red{--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-scopes-color-green{--tw-text-opacity:1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.s-scopes-color-gray{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-scopes-hidden{display:none}.s-scopes-input-wrap.is-hidden-branch{display:none}.s-scopes-wrap{display:flex;max-height:350px;flex-direction:column}.s-scopes-wrap .s-placeholder-wrapper{display:flex;height:12rem;flex-direction:column;align-items:center;justify-content:center}.s-scopes-footer{margin-top:auto}.s-scopes-modal .s-modal-header{display:block !important}.s-scopes-skeleton .s-list-tile-item-content{display:block;width:100%}.s-scopes-skeleton .s-scopes-header-title>salla-skeleton{margin-top:0.75rem;margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-scopes-header-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-scopes-skeleton-scopes>salla-skeleton{margin-bottom:1.25rem;display:block}.s-scopes-skeleton .s-scopes-skeleton-search{margin-top:2rem;margin-bottom:2rem}.s-scopes-skeleton .s-scopes-skeleton-search>salla-skeleton{margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-list-tile-item-icon{margin-right:2rem}.s-scopes-skeleton .s-list-tile-item-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:2rem}.s-scopes-skeleton-btn{margin-top:2rem}";
26
+ const sallaScopesCss = "/*!twlt*/.s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}.mb-5{margin-bottom:1.25rem}.block{display:block}.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-hidden{display:none}.btn{display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.btn:hover{opacity:0.8}.s-hidden{display:none}.s-scrollbar::-webkit-scrollbar{width:5px}.s-scrollbar::-webkit-scrollbar-track{background-color:#eee}.s-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary);border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.s-scopes-title{margin-bottom:0.75rem}.s-scopes-header{margin-bottom:0.5rem;display:block;text-align:center}.s-scopes-header-icon{margin:auto;display:flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(252 252 252 / var(--tw-bg-opacity, 1))}.s-scopes-header-icon svg{height:2rem;fill:var(--color-primary)}.s-scopes-header-title{font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-scopes-header-subtitle{text-align:left;font-size:1.25rem;line-height:1.75rem}.s-scopes-header-subtitle:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-scopes-search-wrapper{position:relative;width:100%}.s-scopes-search-icon{pointer-events:none;position:absolute;top:0px;bottom:0px;left:0px;display:flex;align-items:center;padding-left:0.75rem}.s-scopes-search-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:auto;right:0px;padding-left:0px;padding-right:0.75rem}.s-scopes-search-icon svg{height:1.25rem;width:1.25rem;fill:#9ca3af}.s-scopes-search-input{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));padding:0.625rem;padding-left:2.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-scopes-search-input:focus{--tw-ring-color:var(--color-primary)}.s-scopes-search-input:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0px;padding-right:2.5rem}.s-scopes-input-wrap{margin-bottom:1.25rem;display:flex;align-items:center}.s-scopes-input-wrap:last-child{margin-bottom:0px}.s-scopes-input{height:1rem;width:1rem;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));color:var(--color-primary)}.s-scopes-input:focus{--tw-ring-color:var(--color-primary)}.s-scopes-input:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.75rem}.s-scopes-input:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.75rem}.s-scopes-icon{display:inline-block;height:2rem;width:2rem;border-radius:var(--s-radius, 0.25rem);object-fit:contain;vertical-align:middle}.s-scopes-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.75rem}.s-scopes-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.75rem}.s-scopes-label{display:flex;flex-grow:1;align-items:center;justify-content:space-between;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-scopes-select{height:2.5rem;width:100%;appearance:none;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-scopes-select:focus{border-color:var(--color-primary)}.s-scopes-container{margin-top:1.25rem;max-height:300px;overflow-y:auto;padding-left:0.5rem}.s-scopes-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0px;padding-right:0.5rem}.s-scopes-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.s-scopes-is-closed{opacity:0.5}.s-scopes-closed-badge{--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-scopes-clickable{cursor:pointer}.s-scopes-submit{margin-top:1.5rem;height:auto}.s-scopes-color-red{--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-scopes-color-green{--tw-text-opacity:1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.s-scopes-color-gray{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-scopes-hidden{display:none}.s-scopes-input-wrap.is-hidden-branch{display:none}.s-scopes-wrap{display:flex;max-height:350px;flex-direction:column}.s-scopes-wrap .s-placeholder-wrapper{display:flex;height:12rem;flex-direction:column;align-items:center;justify-content:center}.s-scopes-footer{margin-top:auto}.s-scopes-modal .s-modal-header{display:block !important}.s-scopes-skeleton .s-list-tile-item-content{display:block;width:100%}.s-scopes-skeleton .s-scopes-header-title>salla-skeleton{margin-top:0.75rem;margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-scopes-header-subtitle>salla-skeleton{margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-scopes-skeleton-scopes>salla-skeleton{margin-bottom:1.25rem;display:block}.s-scopes-skeleton .s-scopes-skeleton-search{margin-top:2rem;margin-bottom:2rem}.s-scopes-skeleton .s-scopes-skeleton-search>salla-skeleton{margin-bottom:0.75rem;display:block}.s-scopes-skeleton .s-list-tile-item-icon{margin-right:2rem}.s-scopes-skeleton .s-list-tile-item-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:2rem}.s-scopes-skeleton-btn{margin-top:2rem}";
27
27
 
28
28
  const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends HTMLElement {
29
29
  constructor() {
@@ -176,7 +176,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
176
176
  return h("salla-placeholder", { alignment: "center", class: "s-scopes-placeholder" }, h("span", { slot: "title" }, salla.lang.get("blocks.scope.branch_looking_for_not_found")), h("span", { slot: "description" }, salla.lang.get("blocks.scope.our_services_not_available_in_this_branch")));
177
177
  }
178
178
  defaultContent() {
179
- return [h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes?.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-selection": this.selection }, h("input", { id: `${this.selection} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: `${this.selection} + '_scope_' + ${scope.id}`, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.name))))), this.footerContent()];
179
+ return [h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes?.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-selection": this.selection }, h("input", { id: `${this.selection} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: `${this.selection} + '_scope_' + ${scope.id}`, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.icon && h("img", { src: scope.icon, alt: "", loading: "lazy", class: "s-scopes-icon" }), scope.name))))), this.footerContent()];
180
180
  }
181
181
  availabilityContent() {
182
182
  return h("div", { class: "s-scopes-container" }, this.scopes?.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-selection": this.selection }, h("h2", { class: { "s-scopes-label": true, "s-scopes-clickable": this.mode === ModeType.DEFAULT } }, h("span", null, scope.name)), h("h2", { style: { 'color': scope?.availability?.color }, class: `s-scopes-${scope?.availability?.key}` }, scope?.availability?.label))));
@@ -234,12 +234,22 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
234
234
  Helper.saveProductSource('search');
235
235
  this.commitSearchHistory(this.search_term);
236
236
  salla.event.emit('salla-search::product.clicked', [{ product, position }]);
237
+ this.modal?.close();
237
238
  },
238
239
  recommendationClick: (term, source) => {
239
240
  salla.event.emit('salla-search::recommendation.clicked', { term, source });
240
241
  },
241
242
  };
242
- salla.event.on('search::open', () => this.open());
243
+ }
244
+ connectedCallback() {
245
+ this.searchOpenListener = () => this.open();
246
+ salla.event.on('search::open', this.searchOpenListener);
247
+ }
248
+ disconnectedCallback() {
249
+ if (this.searchOpenListener) {
250
+ salla.event.off('search::open', this.searchOpenListener);
251
+ this.searchOpenListener = undefined;
252
+ }
243
253
  }
244
254
  async open() {
245
255
  if (!this.hasLoadedPopularSearches) {
@@ -21,6 +21,12 @@ const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent e
21
21
  name: this.name
22
22
  };
23
23
  }
24
+ componentWillLoad() {
25
+ const parent = this.host.closest('salla-tabs');
26
+ if (parent?.activeTab === this.name) {
27
+ this.isSelected = true;
28
+ }
29
+ }
24
30
  unselect() {
25
31
  this.isSelected = false;
26
32
  }
@@ -32,8 +38,9 @@ const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent e
32
38
  's-tabs-content': true,
33
39
  's-tabs-content-selected': this.isSelected
34
40
  };
35
- return (h("div", { key: '3107faffd358504438b464be5000682d403e1b22', class: classes }, h("slot", { key: 'e6fc9e480389b54f9e6e20a7c8ccdb880a4ee6d4' })));
41
+ return (h("div", { key: '251a33f54b1a8bb0fc4a424de86fe9e443ef6cf1', class: classes }, h("slot", { key: 'f7244cb7f510b7bde6ff34a64ef4ce043392b4fa' })));
36
42
  }
43
+ get host() { return this; }
37
44
  static get style() { return sallaTabContentCss; }
38
45
  }, [4, "salla-tab-content", {
39
46
  "name": [1],