@salla.sa/twilight-components 2.14.599 → 2.14.601

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 (380) hide show
  1. package/dist/cjs/{filepond-Dk1cJoJp.js → filepond-D8C4FvMF.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-Bg4PCTUm.js → filepond-plugin-file-poster-Bha1u8_P.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-DmqmRxXK.js → filepond-plugin-file-validate-size-BrGHDbNv.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BKd2QnuC.js → filepond-plugin-file-validate-type-D1ZhZw29.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-BIPbEbnk.js → filepond-plugin-image-edit-CpMtbo-c.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-eQvkwjqa.js → filepond-plugin-image-exif-orientation-C106fw_6.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-Ba8K6ft0.js → filepond-plugin-image-preview-B2u9bre9.js} +1 -1
  8. package/dist/cjs/{index-Bm1Ew-5K.js → index-CIcdvW25.js} +7 -7
  9. package/dist/cjs/{intlTelInput-MWwwr9Td.js → intlTelInput-C_vfjTaa.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 +1 -1
  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-BpuzEJnJ.js → vanilla-picker-9cRfp20y.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-search/salla-search.js +11 -1
  125. package/dist/collection/components/salla-tabs/salla-tab-content.js +9 -2
  126. package/dist/collection/components/salla-tabs/salla-tabs.js +36 -8
  127. package/dist/collection/utils/ssr-helpers.js +105 -0
  128. package/dist/components/index.js +7 -7
  129. package/dist/components/salla-accordion-body2.js +1 -1
  130. package/dist/components/salla-accordion-head2.js +2 -2
  131. package/dist/components/salla-accordion2.js +1 -1
  132. package/dist/components/salla-alert.js +1 -1
  133. package/dist/components/salla-apps-icons.js +53 -20
  134. package/dist/components/salla-badge2.js +1 -1
  135. package/dist/components/salla-booking-field2.js +12 -3
  136. package/dist/components/salla-contacts.js +62 -30
  137. package/dist/components/salla-order-options-modal2.js +4 -4
  138. package/dist/components/salla-order-totals-card.js +50 -6
  139. package/dist/components/salla-search.js +11 -1
  140. package/dist/components/salla-tab-content2.js +8 -1
  141. package/dist/components/salla-tabs2.js +17 -7
  142. package/dist/components/ssr-helpers.js +46 -0
  143. package/dist/docs.json +255 -34
  144. package/dist/esm/{filepond-3PnWp9w_.js → filepond-CdHKzx8o.js} +1 -1
  145. package/dist/esm/{filepond-plugin-file-poster-DmoyhYlz.js → filepond-plugin-file-poster-Dv1xmT8j.js} +1 -1
  146. package/dist/esm/{filepond-plugin-file-validate-size-CFkn2RRt.js → filepond-plugin-file-validate-size-yC6pu05S.js} +1 -1
  147. package/dist/esm/{filepond-plugin-file-validate-type-pyAPn10a.js → filepond-plugin-file-validate-type-6BfFanp-.js} +1 -1
  148. package/dist/esm/{filepond-plugin-image-edit-B5Rfgqvi.js → filepond-plugin-image-edit-DXVicFoW.js} +1 -1
  149. package/dist/esm/{filepond-plugin-image-exif-orientation-DK15iBED.js → filepond-plugin-image-exif-orientation-lh9c78ZN.js} +1 -1
  150. package/dist/esm/{filepond-plugin-image-preview-BIW0XW_M.js → filepond-plugin-image-preview--nSwXCrA.js} +1 -1
  151. package/dist/esm/{index-CwwxD-7C.js → index-8Kr0yg20.js} +7 -7
  152. package/dist/esm/{intlTelInput-DYJOvh3V.js → intlTelInput-l4GKBLuF.js} +1 -1
  153. package/dist/esm/loader.js +3 -3
  154. package/dist/esm/salla-accordion-body_2.entry.js +4 -4
  155. package/dist/esm/salla-accordion_6.entry.js +2 -2
  156. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  157. package/dist/esm/salla-advertisement.entry.js +1 -1
  158. package/dist/esm/salla-alert_2.entry.js +2 -2
  159. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  160. package/dist/esm/salla-applied-filters.entry.js +1 -1
  161. package/dist/esm/salla-apps-icons.entry.js +50 -19
  162. package/dist/esm/salla-attachment-view_9.entry.js +22 -13
  163. package/dist/esm/salla-badge.entry.js +2 -2
  164. package/dist/esm/salla-basket-gap.entry.js +1 -1
  165. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  166. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  167. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  168. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  169. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  170. package/dist/esm/salla-comment-factors.entry.js +1 -1
  171. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  172. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  173. package/dist/esm/salla-contacts.entry.js +60 -29
  174. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  175. package/dist/esm/salla-count-down.entry.js +1 -1
  176. package/dist/esm/salla-custom-fields.entry.js +1 -1
  177. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  178. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  179. package/dist/esm/salla-filters-widget.entry.js +1 -1
  180. package/dist/esm/salla-filters.entry.js +1 -1
  181. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  182. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  183. package/dist/esm/salla-gifting.entry.js +1 -1
  184. package/dist/esm/salla-hook.entry.js +1 -1
  185. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  186. package/dist/esm/salla-installment.entry.js +1 -1
  187. package/dist/esm/salla-list-tile.entry.js +1 -1
  188. package/dist/esm/salla-localization-modal.entry.js +1 -1
  189. package/dist/esm/salla-login-modal.entry.js +1 -1
  190. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  191. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  192. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  193. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  194. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  195. package/dist/esm/salla-loyalty.entry.js +1 -1
  196. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  197. package/dist/esm/salla-map_3.entry.js +1 -1
  198. package/dist/esm/salla-menu.entry.js +1 -1
  199. package/dist/esm/salla-metadata.entry.js +1 -1
  200. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  201. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  202. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  203. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  204. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  205. package/dist/esm/salla-offer-modal.entry.js +1 -1
  206. package/dist/esm/salla-offer.entry.js +1 -1
  207. package/dist/esm/salla-order-branch.entry.js +1 -1
  208. package/dist/esm/salla-order-cancel.entry.js +1 -1
  209. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  210. package/dist/esm/salla-order-details-options.entry.js +1 -1
  211. package/dist/esm/salla-order-details.entry.js +1 -1
  212. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  213. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  214. package/dist/esm/salla-order-edit.entry.js +1 -1
  215. package/dist/esm/salla-order-options-modal.entry.js +5 -5
  216. package/dist/esm/salla-order-shipments.entry.js +1 -1
  217. package/dist/esm/salla-order-summary.entry.js +1 -1
  218. package/dist/esm/salla-order-totals-card.entry.js +49 -7
  219. package/dist/esm/salla-orders.entry.js +1 -1
  220. package/dist/esm/salla-payments.entry.js +1 -1
  221. package/dist/esm/salla-placeholder.entry.js +1 -1
  222. package/dist/esm/salla-price-range.entry.js +1 -1
  223. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  224. package/dist/esm/salla-product-card.entry.js +1 -1
  225. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  226. package/dist/esm/salla-products-list.entry.js +1 -1
  227. package/dist/esm/salla-products-slider.entry.js +1 -1
  228. package/dist/esm/salla-quick-order.entry.js +1 -1
  229. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  230. package/dist/esm/salla-rating-modal.entry.js +1 -1
  231. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  232. package/dist/esm/salla-review-order-item.entry.js +1 -1
  233. package/dist/esm/salla-scopes.entry.js +1 -1
  234. package/dist/esm/salla-search-product-card.entry.js +1 -1
  235. package/dist/esm/salla-search.entry.js +12 -2
  236. package/dist/esm/salla-skeleton.entry.js +1 -1
  237. package/dist/esm/salla-social-share.entry.js +1 -1
  238. package/dist/esm/salla-social.entry.js +1 -1
  239. package/dist/esm/salla-tab-content_3.entry.js +24 -8
  240. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  241. package/dist/esm/salla-trust-badges.entry.js +1 -1
  242. package/dist/esm/salla-user-menu.entry.js +1 -1
  243. package/dist/esm/salla-user-profile.entry.js +1 -1
  244. package/dist/esm/salla-user-settings.entry.js +1 -1
  245. package/dist/esm/salla-verify.entry.js +1 -1
  246. package/dist/esm/salla-wallet.entry.js +1 -1
  247. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  248. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  249. package/dist/esm/ssr-helpers-BJN-DTdN.js +46 -0
  250. package/dist/esm/twilight.js +3 -3
  251. package/dist/esm/{vanilla-picker-BzVn0xEV.js → vanilla-picker-Cz2XdDMP.js} +1 -1
  252. package/dist/twilight/{p-3243ab6e.entry.js → p-00654af3.entry.js} +1 -1
  253. package/dist/twilight/{p-c84e619a.entry.js → p-048ee93a.entry.js} +1 -1
  254. package/dist/twilight/{p-0889368b.entry.js → p-052fb212.entry.js} +1 -1
  255. package/dist/twilight/{p-b7dfb1f1.entry.js → p-06b45154.entry.js} +1 -1
  256. package/dist/twilight/{p-7f653481.entry.js → p-0e98fddd.entry.js} +1 -1
  257. package/dist/twilight/{p-62c985bc.entry.js → p-0fdbd8cc.entry.js} +1 -1
  258. package/dist/twilight/{p-0b0c9ecb.entry.js → p-11695661.entry.js} +1 -1
  259. package/dist/twilight/{p-6fa1498b.entry.js → p-126d5595.entry.js} +1 -1
  260. package/dist/twilight/{p-62373e96.entry.js → p-16479b90.entry.js} +1 -1
  261. package/dist/twilight/{p-f5693509.entry.js → p-16dcf15c.entry.js} +1 -1
  262. package/dist/twilight/{p-f310c72e.entry.js → p-1db334c5.entry.js} +1 -1
  263. package/dist/twilight/{p-b7c815f7.entry.js → p-1e0df65d.entry.js} +1 -1
  264. package/dist/twilight/p-2173c0f0.entry.js +4 -0
  265. package/dist/twilight/p-23073b8a.entry.js +4 -0
  266. package/dist/twilight/{p-c892e962.entry.js → p-254c863e.entry.js} +1 -1
  267. package/dist/twilight/{p-651db82c.entry.js → p-25f15ab6.entry.js} +1 -1
  268. package/dist/twilight/{p-96154a67.entry.js → p-270e4b2d.entry.js} +1 -1
  269. package/dist/twilight/{p-afd47a18.entry.js → p-28c75dcf.entry.js} +1 -1
  270. package/dist/twilight/{p-e248f0d0.entry.js → p-2a160737.entry.js} +1 -1
  271. package/dist/twilight/{p-cce07c4c.entry.js → p-2a28633d.entry.js} +1 -1
  272. package/dist/twilight/{p-e4ed760b.entry.js → p-2bf57ca7.entry.js} +1 -1
  273. package/dist/twilight/p-3118f527.entry.js +4 -0
  274. package/dist/twilight/{p-07817ae8.entry.js → p-3130e363.entry.js} +1 -1
  275. package/dist/twilight/{p-ee2a5db7.entry.js → p-3179c72b.entry.js} +1 -1
  276. package/dist/twilight/{p-6d47b269.entry.js → p-3392ced8.entry.js} +1 -1
  277. package/dist/twilight/{p-0ba03206.entry.js → p-34b6c381.entry.js} +1 -1
  278. package/dist/twilight/{p-DFj0n9Nh.js → p-3RAlOumf.js} +1 -1
  279. package/dist/twilight/{p-83e1c586.entry.js → p-3ad77173.entry.js} +1 -1
  280. package/dist/twilight/{p-f4d52f9b.entry.js → p-3c89325e.entry.js} +1 -1
  281. package/dist/twilight/p-3cd513b2.entry.js +4 -0
  282. package/dist/twilight/{p-18e75544.entry.js → p-476e3d1b.entry.js} +1 -1
  283. package/dist/twilight/{p-f5026adf.entry.js → p-490493cc.entry.js} +1 -1
  284. package/dist/twilight/{p-bcbb4a03.entry.js → p-4b559931.entry.js} +1 -1
  285. package/dist/twilight/{p-0253bf71.entry.js → p-4cfca9e1.entry.js} +1 -1
  286. package/dist/twilight/{p-d01c4ba8.entry.js → p-5076dfe4.entry.js} +1 -1
  287. package/dist/twilight/{p-1fd1c0a3.entry.js → p-5500cb85.entry.js} +1 -1
  288. package/dist/twilight/{p-e1fb95cb.entry.js → p-5b0259d8.entry.js} +1 -1
  289. package/dist/twilight/{p-f51e9549.entry.js → p-5bfe0a12.entry.js} +1 -1
  290. package/dist/twilight/{p-6e7433f2.entry.js → p-5de3e4c3.entry.js} +1 -1
  291. package/dist/twilight/{p-ac8a7743.entry.js → p-5f176cff.entry.js} +1 -1
  292. package/dist/twilight/{p-8e91da09.entry.js → p-60a16078.entry.js} +1 -1
  293. package/dist/twilight/{p-76ca3445.entry.js → p-62081545.entry.js} +1 -1
  294. package/dist/twilight/{p-f1d5ebf4.entry.js → p-64ce7d04.entry.js} +1 -1
  295. package/dist/twilight/{p-c4f92bae.entry.js → p-654d7158.entry.js} +1 -1
  296. package/dist/twilight/{p-f580d024.entry.js → p-66739790.entry.js} +1 -1
  297. package/dist/twilight/{p-659e00b7.entry.js → p-68bab651.entry.js} +1 -1
  298. package/dist/twilight/{p-d8cf239a.entry.js → p-6b9e0168.entry.js} +1 -1
  299. package/dist/twilight/{p-114e4228.entry.js → p-6d629a37.entry.js} +1 -1
  300. package/dist/twilight/{p-c98d1097.entry.js → p-6f64aca2.entry.js} +1 -1
  301. package/dist/twilight/{p-c282869e.entry.js → p-70e1cddf.entry.js} +1 -1
  302. package/dist/twilight/{p-bc5b70e9.entry.js → p-722a1d49.entry.js} +1 -1
  303. package/dist/twilight/p-72f1eb9d.entry.js +4 -0
  304. package/dist/twilight/{p-2213f6eb.entry.js → p-73be3e2b.entry.js} +1 -1
  305. package/dist/twilight/{p-6b2f6957.entry.js → p-78fce485.entry.js} +1 -1
  306. package/dist/twilight/{p-62dc337d.entry.js → p-7a7efc1e.entry.js} +1 -1
  307. package/dist/twilight/{p-1b25ea2a.entry.js → p-80986ebf.entry.js} +1 -1
  308. package/dist/twilight/{p-2b5242cb.entry.js → p-8456fc2b.entry.js} +1 -1
  309. package/dist/twilight/{p-4ebee06a.entry.js → p-845d6d9f.entry.js} +1 -1
  310. package/dist/twilight/p-8Kr0yg20.js +5 -0
  311. package/dist/twilight/{p-fe7751a8.entry.js → p-8bb54ab1.entry.js} +1 -1
  312. package/dist/twilight/{p-10418cc0.entry.js → p-8bd722e2.entry.js} +1 -1
  313. package/dist/twilight/{p-8aa29666.entry.js → p-942a9370.entry.js} +1 -1
  314. package/dist/twilight/p-96028c8b.entry.js +4 -0
  315. package/dist/twilight/{p-46c8b068.entry.js → p-96b9ba64.entry.js} +1 -1
  316. package/dist/twilight/{p-db1e0bc6.entry.js → p-98de4c11.entry.js} +1 -1
  317. package/dist/twilight/{p-c7a491ef.entry.js → p-9a30c09e.entry.js} +1 -1
  318. package/dist/twilight/{p-20f98a45.entry.js → p-9bc1676b.entry.js} +1 -1
  319. package/dist/twilight/{p-CYeysHdt.js → p-B-WH3lv4.js} +1 -1
  320. package/dist/twilight/p-BJN-DTdN.js +4 -0
  321. package/dist/twilight/{p-DzBc32wK.js → p-BNVpOSmh.js} +1 -1
  322. package/dist/twilight/{p-DHXSZjVo.js → p-B_znruWg.js} +1 -1
  323. package/dist/twilight/{p-CntnRJCa.js → p-BwJOl2G2.js} +1 -1
  324. package/dist/twilight/{p-Bb9AkvT4.js → p-CSgEn8iE.js} +1 -1
  325. package/dist/twilight/{p-FcjN5vEx.js → p-C_-Bd9R8.js} +1 -1
  326. package/dist/twilight/{p-CaabLwI1.js → p-DCZHPueO.js} +1 -1
  327. package/dist/twilight/{p-B8yyit_i.js → p-DdILhElb.js} +1 -1
  328. package/dist/twilight/{p-aaac2388.entry.js → p-a3630cbf.entry.js} +1 -1
  329. package/dist/twilight/{p-509b04c7.entry.js → p-a98f0462.entry.js} +1 -1
  330. package/dist/twilight/{p-b2ff66ed.entry.js → p-ac719286.entry.js} +1 -1
  331. package/dist/twilight/{p-55399fed.entry.js → p-b68679eb.entry.js} +1 -1
  332. package/dist/twilight/{p-f38d6c1b.entry.js → p-b7ed8e39.entry.js} +1 -1
  333. package/dist/twilight/{p-79ce9e95.entry.js → p-b85d3a54.entry.js} +1 -1
  334. package/dist/twilight/{p-6d61d93c.entry.js → p-b8e56642.entry.js} +1 -1
  335. package/dist/twilight/{p-14b1b664.entry.js → p-c0d00e89.entry.js} +1 -1
  336. package/dist/twilight/p-c1039294.entry.js +4 -0
  337. package/dist/twilight/{p-0bff8609.entry.js → p-c6c496ec.entry.js} +1 -1
  338. package/dist/twilight/{p-89bba634.entry.js → p-ca838de0.entry.js} +1 -1
  339. package/dist/twilight/{p-067ad44c.entry.js → p-cf742415.entry.js} +1 -1
  340. package/dist/twilight/{p-dc090987.entry.js → p-d062becf.entry.js} +1 -1
  341. package/dist/twilight/p-d7cb0405.entry.js +4 -0
  342. package/dist/twilight/{p-925ba8ce.entry.js → p-d9360a47.entry.js} +1 -1
  343. package/dist/twilight/{p-7148dbad.entry.js → p-db5d3d60.entry.js} +1 -1
  344. package/dist/twilight/{p-93d284c4.entry.js → p-dc226d90.entry.js} +1 -1
  345. package/dist/twilight/{p-1c191c15.entry.js → p-df6a4f43.entry.js} +1 -1
  346. package/dist/twilight/{p-8d99e9d1.entry.js → p-e12337ab.entry.js} +1 -1
  347. package/dist/twilight/{p-2db00d46.entry.js → p-e54b95a6.entry.js} +1 -1
  348. package/dist/twilight/{p-261aff22.entry.js → p-e5f0a5f3.entry.js} +1 -1
  349. package/dist/twilight/{p-4ca3b245.entry.js → p-e62dd507.entry.js} +1 -1
  350. package/dist/twilight/{p-25fb1508.entry.js → p-e7ac6421.entry.js} +1 -1
  351. package/dist/twilight/{p-dda47e56.entry.js → p-e93bcc6e.entry.js} +1 -1
  352. package/dist/twilight/{p-d6886b07.entry.js → p-eb91b45a.entry.js} +1 -1
  353. package/dist/twilight/{p-a6594c68.entry.js → p-f1eca4da.entry.js} +1 -1
  354. package/dist/twilight/{p-56c77026.entry.js → p-f6b40c3f.entry.js} +1 -1
  355. package/dist/twilight/{p-065f2937.entry.js → p-f6dc6e8a.entry.js} +1 -1
  356. package/dist/twilight/{p-49bba37d.entry.js → p-fd4786e4.entry.js} +1 -1
  357. package/dist/twilight/{p-84912a5a.entry.js → p-ff64dad1.entry.js} +1 -1
  358. package/dist/twilight/twilight.esm.js +1 -1
  359. package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +26 -13
  360. package/dist/types/components/salla-apps-icons/salla-apps-icons.types.d.ts +4 -0
  361. package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +5 -1
  362. package/dist/types/components/salla-contacts/salla-contacts.d.ts +26 -14
  363. package/dist/types/components/salla-contacts/salla-contacts.types.d.ts +7 -0
  364. package/dist/types/components/salla-order-totals-card/interfaces.d.ts +27 -0
  365. package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +12 -4
  366. package/dist/types/components/salla-search/salla-search.d.ts +3 -1
  367. package/dist/types/components/salla-tabs/salla-tab-content.d.ts +3 -2
  368. package/dist/types/components/salla-tabs/salla-tabs.d.ts +8 -3
  369. package/dist/types/components.d.ts +90 -22
  370. package/dist/types/utils/ssr-helpers.d.ts +73 -0
  371. package/package.json +5 -5
  372. package/dist/twilight/p-1f561241.entry.js +0 -4
  373. package/dist/twilight/p-27df0290.entry.js +0 -4
  374. package/dist/twilight/p-2f04343f.entry.js +0 -4
  375. package/dist/twilight/p-3de0b3ae.entry.js +0 -4
  376. package/dist/twilight/p-89fddf1e.entry.js +0 -4
  377. package/dist/twilight/p-CwwxD-7C.js +0 -5
  378. package/dist/twilight/p-a743a10a.entry.js +0 -4
  379. package/dist/twilight/p-f345a77d.entry.js +0 -4
  380. package/dist/twilight/p-f8b428cb.entry.js +0 -4
@@ -2,44 +2,75 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { Host, h } from "@stencil/core";
5
+ import { isSallaSdkAvailable } from "../../utils/ssr-helpers";
5
6
  /**
6
7
  * @slot app - Replaces app item, has replaceable props `{icon}`, `{name}`.
7
8
  */
8
9
  export class SallaAppsIcons {
9
10
  constructor() {
10
- this.apps = salla.config.get('store.apps');
11
- this.appSlot = this.host.querySelector('[slot="app"]')?.innerHTML || `<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />`;
12
- salla.onReady(() => {
13
- this.apps = salla.config.get('store.apps');
14
- });
11
+ /**
12
+ * Flag to hide the title.
13
+ */
14
+ this.hideTitle = false;
15
+ /**
16
+ * Display icons vertically instead of horizontally.
17
+ */
18
+ this.vertical = false;
19
+ this.sdkApps = null;
20
+ }
21
+ getDefaultSlot() {
22
+ return `<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />`;
15
23
  }
16
24
  connectedCallback() {
17
- this.langUnsubscribe = salla.lang.subscribe(() => {
18
- this.appsTitle = salla.lang.get('blocks.footer.download_apps');
25
+ if (isSallaSdkAvailable()) {
26
+ this.langUnsubscribe = salla.lang.subscribe(() => {
27
+ if (!this.appsTitle || this.appsTitle === this.langTitle) {
28
+ this.appsTitle = this.langTitle = salla.lang.get('blocks.footer.download_apps');
29
+ }
30
+ });
31
+ }
32
+ // capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
33
+ if (!this.appSlot) {
34
+ const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="app"]');
35
+ this.appSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
36
+ }
37
+ if (!isSallaSdkAvailable())
38
+ return;
39
+ // load the store's apps even when `apps` is passed, so clearing the prop falls back to them
40
+ salla.onReady(() => {
41
+ this.sdkApps = salla.config.get('store.apps');
19
42
  });
20
43
  }
21
44
  disconnectedCallback() {
22
45
  this.langUnsubscribe?.();
23
46
  }
24
47
  getAppsArray() {
25
- return Object.entries(this.apps)
26
- .map(([name, value]) => ({ name, value }));
48
+ const apps = this.apps || this.sdkApps;
49
+ if (!apps) {
50
+ return [];
51
+ }
52
+ return Object.entries(apps)
53
+ .filter(([, value]) => value && typeof value === 'string')
54
+ .map(([name, value]) => ({ name, value: value }));
27
55
  }
28
- componentWillLoad() {
29
- return new Promise(resolve => salla.onReady(resolve));
56
+ getCdnUrl(iconName) {
57
+ if (isSallaSdkAvailable()) {
58
+ return salla.url.cdn(`images/${iconName}.png`);
59
+ }
60
+ return `https://cdn.salla.net/images/${iconName}.png`;
61
+ }
62
+ componentDidRender() {
63
+ this.host.querySelector('[slot="app"]')?.remove();
30
64
  }
31
65
  render() {
32
66
  const appsArray = this.getAppsArray();
33
- if (Array.isArray(appsArray) && !appsArray.length) {
67
+ if (appsArray.length === 0) {
34
68
  return;
35
69
  }
36
- 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
37
- .replace(/\{icon\}/g, salla.url.cdn(`images/${app.name}.png`))
70
+ 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
71
+ .replace(/\{icon\}/g, this.getCdnUrl(app.name))
38
72
  .replace(/\{name\}/g, app.name) }))))));
39
73
  }
40
- componentDidRender() {
41
- this.host.querySelector('[slot="app"]')?.remove();
42
- }
43
74
  static get is() { return "salla-apps-icons"; }
44
75
  static get originalStyleUrls() {
45
76
  return {
@@ -53,44 +84,69 @@ export class SallaAppsIcons {
53
84
  }
54
85
  static get properties() {
55
86
  return {
56
- "hideTitle": {
57
- "type": "boolean",
58
- "attribute": "hide-title",
87
+ "apps": {
88
+ "type": "unknown",
89
+ "attribute": "apps",
59
90
  "mutable": false,
60
91
  "complexType": {
61
- "original": "boolean",
62
- "resolved": "boolean",
63
- "references": {}
92
+ "original": "AppsIconsConfig",
93
+ "resolved": "AppsIconsConfig",
94
+ "references": {
95
+ "AppsIconsConfig": {
96
+ "location": "import",
97
+ "path": "./salla-apps-icons.types",
98
+ "id": "src/components/salla-apps-icons/salla-apps-icons.types.ts::AppsIconsConfig"
99
+ }
100
+ }
64
101
  },
65
102
  "required": false,
66
- "optional": false,
103
+ "optional": true,
67
104
  "docs": {
68
105
  "tags": [],
69
- "text": "Flag to show or hide title."
106
+ "text": "Apps URLs in object format {appstore, googleplay}.\nWhen not provided, uses SDK config 'store.apps'."
70
107
  },
71
108
  "getter": false,
72
- "setter": false,
73
- "reflect": false
109
+ "setter": false
74
110
  },
75
111
  "appsTitle": {
76
112
  "type": "string",
77
113
  "attribute": "apps-title",
78
- "mutable": false,
114
+ "mutable": true,
79
115
  "complexType": {
80
116
  "original": "string",
81
117
  "resolved": "string",
82
118
  "references": {}
83
119
  },
84
120
  "required": false,
85
- "optional": false,
121
+ "optional": true,
86
122
  "docs": {
87
123
  "tags": [],
88
- "text": "The title to display."
124
+ "text": "The title to display above icons.\nWhen not provided, uses SDK lang 'blocks.footer.download_apps'."
89
125
  },
90
126
  "getter": false,
91
127
  "setter": false,
92
128
  "reflect": false
93
129
  },
130
+ "hideTitle": {
131
+ "type": "boolean",
132
+ "attribute": "hide-title",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "boolean",
136
+ "resolved": "boolean",
137
+ "references": {}
138
+ },
139
+ "required": false,
140
+ "optional": false,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": "Flag to hide the title."
144
+ },
145
+ "getter": false,
146
+ "setter": false,
147
+ "reflect": false,
148
+ "defaultValue": "false"
149
+ },
94
150
  "vertical": {
95
151
  "type": "boolean",
96
152
  "attribute": "vertical",
@@ -104,7 +160,27 @@ export class SallaAppsIcons {
104
160
  "optional": false,
105
161
  "docs": {
106
162
  "tags": [],
107
- "text": "Display flag to horizontal/vertical."
163
+ "text": "Display icons vertically instead of horizontally."
164
+ },
165
+ "getter": false,
166
+ "setter": false,
167
+ "reflect": false,
168
+ "defaultValue": "false"
169
+ },
170
+ "slotTemplate": {
171
+ "type": "string",
172
+ "attribute": "slot-template",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "string",
176
+ "resolved": "string",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": true,
181
+ "docs": {
182
+ "tags": [],
183
+ "text": "Custom slot template HTML with placeholders {icon}, {name}.\nUsed for SSR. Client-side can use slot=\"app\" instead."
108
184
  },
109
185
  "getter": false,
110
186
  "setter": false,
@@ -114,7 +190,7 @@ export class SallaAppsIcons {
114
190
  }
115
191
  static get states() {
116
192
  return {
117
- "apps": {}
193
+ "sdkApps": {}
118
194
  };
119
195
  }
120
196
  static get elementRef() { return "host"; }
@@ -37,7 +37,7 @@ export class SallaBadge {
37
37
  this.bg = 'light';
38
38
  }
39
39
  render() {
40
- return (h("div", { key: '7c7196d49621a58192820725ab40d906344983d1', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '7a39f5d916e80809f795b5cc880f1d31238fa7c5' })));
40
+ return (h("div", { key: '7a78bf8120879a06ce40d6e63d7fcd8444fff727', class: badge({ size: this.size, bg: this.bg, color: this.color }) }, h("slot", { key: '1ea89bc586b06a0e498d972d5efc5eaaffaf5a63' })));
41
41
  }
42
42
  static get is() { return "salla-badge"; }
43
43
  static get originalStyleUrls() {
@@ -19,7 +19,6 @@ export class SallaBookingField {
19
19
  Salla.event.on('booking::open', (data) => this.handleBookingOpen(data));
20
20
  }
21
21
  connectedCallback() {
22
- // Load translations
23
22
  this.langUnsubscribe = salla.lang.subscribe(() => this.setTranslations());
24
23
  }
25
24
  disconnectedCallback() {
@@ -69,6 +68,11 @@ export class SallaBookingField {
69
68
  handleBookingOpen(data) {
70
69
  if (data.id !== this.productId)
71
70
  return;
71
+ // Opt-in native override: inside the SPA webview the bridge forwards this same event to native
72
+ // as `mobile::booking.open` { url, id }, and the native shell owns the booking screen — skip the
73
+ // web iframe modal so both don't show. On web / apps without the flag, the modal opens as usual.
74
+ if (salla.mobile?.isSpaWebview?.())
75
+ return;
72
76
  this.bookingUrl = salla.url.addParamToUrl('product_id', data.id, data.url);
73
77
  this.iframeReady = true;
74
78
  setTimeout(() => {
@@ -98,7 +102,12 @@ export class SallaBookingField {
98
102
  window.addEventListener('booking::open-after-reload', (event) => this.openBookingModal(event, true));
99
103
  this.emitAfterReloadEvent();
100
104
  window.addEventListener('message', this.handleMessageEvent.bind(this));
101
- this.reservationsInput.addEventListener('invalid', e => this.invalidInput.emit(e));
105
+ this.reservationsInput.addEventListener('invalid', e => {
106
+ this.invalidInput.emit({
107
+ target: e.target,
108
+ validity: e.target.validity
109
+ });
110
+ });
102
111
  this.reservationsInput.addEventListener('input', () => {
103
112
  this.reservationsInput.setCustomValidity('');
104
113
  this.reservationsInput.reportValidity();
@@ -154,7 +163,7 @@ export class SallaBookingField {
154
163
  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)));
155
164
  }
156
165
  render() {
157
- 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()));
166
+ 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()));
158
167
  }
159
168
  static get is() { return "salla-booking-field"; }
160
169
  static get originalStyleUrls() {
@@ -238,9 +247,15 @@ export class SallaBookingField {
238
247
  "text": "Event emitted when the input is invalid."
239
248
  },
240
249
  "complexType": {
241
- "original": "any",
242
- "resolved": "any",
243
- "references": {}
250
+ "original": "SallaBookingFieldInvalidInputEvent",
251
+ "resolved": "SallaBookingFieldInvalidInputEvent",
252
+ "references": {
253
+ "SallaBookingFieldInvalidInputEvent": {
254
+ "location": "local",
255
+ "path": "/home/runner/_work/twilight/twilight/packages/twilight-components/src/components/salla-booking-field/salla-booking-field.tsx",
256
+ "id": "src/components/salla-booking-field/salla-booking-field.tsx::SallaBookingFieldInvalidInputEvent"
257
+ }
258
+ }
244
259
  }
245
260
  }];
246
261
  }
@@ -2,74 +2,109 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { Host, h } from "@stencil/core";
5
+ import { isSallaSdkAvailable } from "../../utils/ssr-helpers";
5
6
  import mobile from "../../assets/svg/iphone.svg";
6
7
  import whatsapp from "../../assets/svg/whatsapp2.svg";
7
8
  import phone from "../../assets/svg/phone.svg";
8
9
  import telegram from "../../assets/svg/paper-plane-o.svg";
9
10
  import email from "../../assets/svg/mail.svg";
10
11
  /**
11
- * @slot contact - Replaces contact item, has replaceable props `{icon}`, `{value}`.
12
+ * @slot contact - Replaces contact item, has replaceable props `{icon}`, `{value}`, `{link}`.
12
13
  */
13
14
  export class SallaContacts {
14
15
  constructor() {
15
- this.contacts = salla.config.get('store.contacts');
16
+ /**
17
+ * Flag to toggle title visibility.
18
+ */
19
+ this.hideTitle = false;
20
+ /**
21
+ * Conditional flag to check whether the content is header or not.
22
+ */
23
+ this.isHeader = false;
24
+ /**
25
+ * Flag to toggle list of contents whether vertical or horizontal.
26
+ */
27
+ this.horizontal = false;
28
+ /**
29
+ * Flag condition to show icon only or icon with label.
30
+ */
31
+ this.iconsOnly = false;
32
+ this.sdkContacts = null;
16
33
  this.iconsList = { mobile, whatsapp, phone, telegram, email };
17
- 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>`;
18
- salla.onReady(() => {
19
- this.contacts = salla.config.get('store.contacts');
20
- });
34
+ }
35
+ getDefaultSlot() {
36
+ const valueMarkup = this.iconsOnly ? '' : "<span class='unicode'>{value}</span>";
37
+ return '<a href="{link}" class="s-contacts-item"><span class="s-contacts-icon">{icon}</span>' + valueMarkup + '</a>';
21
38
  }
22
39
  connectedCallback() {
23
- this.langUnsubscribe = salla.lang.subscribe(() => {
24
- if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
25
- this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
26
- }
40
+ if (isSallaSdkAvailable()) {
41
+ this.langUnsubscribe = salla.lang.subscribe(() => {
42
+ if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
43
+ this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
44
+ }
45
+ });
46
+ }
47
+ // capture once: componentDidRender removes the slot element, so a reconnect could no longer read it
48
+ if (!this.contactSlot) {
49
+ const slotElement = this.slotTemplate ? null : this.host.querySelector('[slot="contact"]');
50
+ this.contactSlot = slotElement ? slotElement.innerHTML : (this.slotTemplate || this.getDefaultSlot());
51
+ }
52
+ if (!isSallaSdkAvailable())
53
+ return;
54
+ // load the store's contacts even when `contacts` is passed, so clearing the prop falls back to them
55
+ salla.onReady(() => {
56
+ this.sdkContacts = salla.config.get('store.contacts');
27
57
  });
28
58
  }
29
59
  disconnectedCallback() {
30
60
  this.langUnsubscribe?.();
31
61
  }
62
+ getContactsData() {
63
+ return this.contacts || this.sdkContacts || {};
64
+ }
32
65
  getContactsArray() {
33
- return Object.entries(this.contacts)
34
- .filter(([_key, value]) => value !== '')
35
- .map(([type, value]) => ({ type, value }));
66
+ const contactsData = this.getContactsData();
67
+ return Object.entries(contactsData)
68
+ .filter(([, value]) => value && value !== '')
69
+ .map(([type, value]) => ({ type, value: value }));
36
70
  }
37
- getContactLink(type) {
38
- const contactValue = this.contacts[type];
71
+ getContactLink(type, contactValue) {
39
72
  switch (type) {
40
73
  case 'phone':
41
74
  case 'mobile':
42
75
  return `tel:${contactValue}`;
43
76
  case 'whatsapp':
44
- const whatsAppNumber = (contactValue || '').toString().replace(/[^\d]/g, '');
45
- return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` : salla.url.get('whatsapp/send');
77
+ const whatsAppNumber = contactValue.toString().replace(/[^\d]/g, '');
78
+ return whatsAppNumber ? `https://wa.me/${whatsAppNumber}` :
79
+ (isSallaSdkAvailable() ? salla.url.get('whatsapp/send') : '');
46
80
  case 'email':
47
81
  return `mailto:${contactValue}`;
48
82
  case 'telegram':
49
- // Check if the contact is already a full URL
50
83
  return contactValue.startsWith('https://t.me/') ? contactValue : `https://t.me/${contactValue}`;
51
84
  default:
52
85
  return contactValue;
53
86
  }
54
87
  }
55
88
  getContactIcon(type) {
56
- return this.iconsList[type];
89
+ return this.iconsList[type] || '';
57
90
  }
58
- componentWillLoad() {
59
- return new Promise(resolve => salla.onReady(resolve));
91
+ componentDidRender() {
92
+ this.host.querySelector('[slot="contact"]')?.remove();
60
93
  }
61
94
  render() {
62
95
  const contactsArray = this.getContactsArray();
63
- if (!contactsArray || contactsArray.length == 0) {
96
+ if (!contactsArray || contactsArray.length === 0) {
64
97
  return;
65
98
  }
66
99
  if (this.isHeader) {
67
- 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) : ([
100
+ return (h(Host, { class: "s-contacts s-contacts-header" }, contactsArray
101
+ .filter(contact => contact.type === 'phone' || contact.type === 'email')
102
+ .map((contact, index) => (h("a", { href: this.getContactLink(contact.type, contact.value), key: index, class: "s-contacts-topnav-link" }, contact.type === 'email' ? (contact.value) : ([
68
103
  h("span", null, this.contactsTitle, ": "),
69
104
  h("span", { class: "unicode" }, contact.value)
70
105
  ]))))));
71
106
  }
72
- return (h(Host, { class: "s-contacts" }, !this.hideTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
107
+ return (h(Host, { class: "s-contacts" }, !this.hideTitle && this.contactsTitle && h("h3", { class: "s-contacts-title" }, this.contactsTitle), h("div", { class: {
73
108
  's-contacts-list': true,
74
109
  's-contacts-list-horizontal': this.horizontal,
75
110
  's-contacts-list-vertical': !this.horizontal,
@@ -77,11 +112,7 @@ export class SallaContacts {
77
112
  } }, contactsArray.map((contact, index) => (h("div", { key: index, id: "contact-slot", innerHTML: this.contactSlot
78
113
  .replace(/\{icon\}/g, this.getContactIcon(contact.type))
79
114
  .replace(/\{value\}/g, contact.value.toString())
80
- .replace(/\{link\}/g, this.getContactLink(contact.type)) }))))));
81
- }
82
- componentDidRender() {
83
- // this.host.querySelectorAll('#contact-slot').forEach(el => el.replaceWith(el.firstChild));
84
- this.host.querySelector('[slot="contact"]')?.remove();
115
+ .replace(/\{link\}/g, this.getContactLink(contact.type, contact.value)) }))))));
85
116
  }
86
117
  static get is() { return "salla-contacts"; }
87
118
  static get originalStyleUrls() {
@@ -96,6 +127,30 @@ export class SallaContacts {
96
127
  }
97
128
  static get properties() {
98
129
  return {
130
+ "contacts": {
131
+ "type": "unknown",
132
+ "attribute": "contacts",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "ContactsConfig",
136
+ "resolved": "ContactsConfig",
137
+ "references": {
138
+ "ContactsConfig": {
139
+ "location": "import",
140
+ "path": "./salla-contacts.types",
141
+ "id": "src/components/salla-contacts/salla-contacts.types.ts::ContactsConfig"
142
+ }
143
+ }
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "Contact information in object format {whatsapp, mobile, phone, email, telegram}.\nWhen not provided, uses SDK config 'store.contacts'."
150
+ },
151
+ "getter": false,
152
+ "setter": false
153
+ },
99
154
  "contactsTitle": {
100
155
  "type": "string",
101
156
  "attribute": "contacts-title",
@@ -106,10 +161,10 @@ export class SallaContacts {
106
161
  "references": {}
107
162
  },
108
163
  "required": false,
109
- "optional": false,
164
+ "optional": true,
110
165
  "docs": {
111
166
  "tags": [],
112
- "text": "Section title for social block of footer."
167
+ "text": "Section title for social block of footer.\nWhen not provided, uses SDK lang 'blocks.footer.social'."
113
168
  },
114
169
  "getter": false,
115
170
  "setter": false,
@@ -132,7 +187,8 @@ export class SallaContacts {
132
187
  },
133
188
  "getter": false,
134
189
  "setter": false,
135
- "reflect": false
190
+ "reflect": false,
191
+ "defaultValue": "false"
136
192
  },
137
193
  "isHeader": {
138
194
  "type": "boolean",
@@ -151,7 +207,8 @@ export class SallaContacts {
151
207
  },
152
208
  "getter": false,
153
209
  "setter": false,
154
- "reflect": false
210
+ "reflect": false,
211
+ "defaultValue": "false"
155
212
  },
156
213
  "horizontal": {
157
214
  "type": "boolean",
@@ -170,7 +227,8 @@ export class SallaContacts {
170
227
  },
171
228
  "getter": false,
172
229
  "setter": false,
173
- "reflect": false
230
+ "reflect": false,
231
+ "defaultValue": "false"
174
232
  },
175
233
  "iconsOnly": {
176
234
  "type": "boolean",
@@ -185,7 +243,27 @@ export class SallaContacts {
185
243
  "optional": false,
186
244
  "docs": {
187
245
  "tags": [],
188
- "text": "Flag condition to show icon only or icon with label"
246
+ "text": "Flag condition to show icon only or icon with label."
247
+ },
248
+ "getter": false,
249
+ "setter": false,
250
+ "reflect": false,
251
+ "defaultValue": "false"
252
+ },
253
+ "slotTemplate": {
254
+ "type": "string",
255
+ "attribute": "slot-template",
256
+ "mutable": false,
257
+ "complexType": {
258
+ "original": "string",
259
+ "resolved": "string",
260
+ "references": {}
261
+ },
262
+ "required": false,
263
+ "optional": true,
264
+ "docs": {
265
+ "tags": [],
266
+ "text": "Custom slot template HTML with placeholders {icon}, {value}, {link}.\nUsed for SSR. Client-side can use slot=\"contact\" instead."
189
267
  },
190
268
  "getter": false,
191
269
  "setter": false,
@@ -195,8 +273,7 @@ export class SallaContacts {
195
273
  }
196
274
  static get states() {
197
275
  return {
198
- "contacts": {},
199
- "iconsList": {}
276
+ "sdkContacts": {}
200
277
  };
201
278
  }
202
279
  static get elementRef() { return "host"; }
@@ -879,7 +879,7 @@ export class SallaDatetimePicker {
879
879
  "mutable": false,
880
880
  "complexType": {
881
881
  "original": "LocaleKey",
882
- "resolved": "\"at\" | \"hr\" | \"th\" | \"tr\" | \"id\" | \"is\" | \"default\" | \"no\" | \"cy\" | \"es\" | \"mn\" | \"ms\" | \"ar\" | \"az\" | \"be\" | \"bg\" | \"bn\" | \"bs\" | \"ca\" | \"cat\" | \"ckb\" | \"cs\" | \"da\" | \"de\" | \"en\" | \"eo\" | \"et\" | \"fa\" | \"fi\" | \"fo\" | \"fr\" | \"gr\" | \"he\" | \"hi\" | \"hu\" | \"hy\" | \"it\" | \"ja\" | \"ka\" | \"ko\" | \"km\" | \"kz\" | \"lt\" | \"lv\" | \"mk\" | \"my\" | \"nl\" | \"nn\" | \"pa\" | \"pl\" | \"pt\" | \"ro\" | \"ru\" | \"si\" | \"sk\" | \"sl\" | \"sq\" | \"sr\" | \"sv\" | \"uk\" | \"vn\" | \"zh\" | \"uz\" | \"uz_latn\" | \"zh_tw\"",
882
+ "resolved": "\"at\" | \"hr\" | \"th\" | \"tr\" | \"id\" | \"is\" | \"default\" | \"no\" | \"cy\" | \"es\" | \"mn\" | \"ms\" | \"ar\" | \"en\" | \"az\" | \"be\" | \"bg\" | \"bn\" | \"bs\" | \"ca\" | \"cat\" | \"ckb\" | \"cs\" | \"da\" | \"de\" | \"eo\" | \"et\" | \"fa\" | \"fi\" | \"fo\" | \"fr\" | \"gr\" | \"he\" | \"hi\" | \"hu\" | \"hy\" | \"it\" | \"ja\" | \"ka\" | \"ko\" | \"km\" | \"kz\" | \"lt\" | \"lv\" | \"mk\" | \"my\" | \"nl\" | \"nn\" | \"pa\" | \"pl\" | \"pt\" | \"ro\" | \"ru\" | \"si\" | \"sk\" | \"sl\" | \"sq\" | \"sr\" | \"sv\" | \"uk\" | \"vn\" | \"zh\" | \"uz\" | \"uz_latn\" | \"zh_tw\"",
883
883
  "references": {
884
884
  "LocaleKey": {
885
885
  "location": "import",
@@ -391,18 +391,18 @@ export class SallaOrderOptionsModal {
391
391
  // header-inner container; the empty title div is hidden via .s-oom-wizard-modal CSS.
392
392
  // In single-step mode the header shows the relevant title text directly.
393
393
  const modalTitle = this._isWizard ? ' ' : (isStep1 ? this.freeProductTitle : this.title);
394
- 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) => {
394
+ 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) => {
395
395
  if (!e.detail)
396
396
  this.handleClose();
397
- } }, this._isWizard && (h("div", { key: 'a842b5d1566c8bb0bd68d5986fb092c14f8a01d6', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
397
+ } }, this._isWizard && (h("div", { key: '6e8e57a4f8d49d06cd70ae00b01d47b9ad66448e', slot: "icon", class: "s-oom-steps" }, stepLabels.map((label, index) => [
398
398
  index > 0 && h("div", { class: "s-oom-connector" }),
399
399
  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)),
400
- ]))), 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 => {
400
+ ]))), 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 => {
401
401
  if (!el)
402
402
  return;
403
403
  this.optionsRefs.set(uniqueKey, el);
404
404
  el.seedSelectedOptions?.();
405
- }, "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
405
+ }, "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
406
406
  ? h("i", { class: {
407
407
  's-oom-cta-arrow': true,
408
408
  // "Forward" is left in RTL and right in LTR; hardcoding arrow-left made