@salla.sa/twilight-components 2.14.557 → 2.14.559

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 (373) hide show
  1. package/dist/{esm/cart-DY4LZmNP.js → cjs/cart-DSvlJXCH.js} +4 -2
  2. package/dist/cjs/{filepond-plugin-file-poster-CY6apY0i.js → filepond-plugin-file-poster-DTiAXF5c.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-D4ROC-Be.js → filepond-plugin-file-validate-size-BuMc19fV.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-6lBH-fIm.js → filepond-plugin-file-validate-type-5CKRAI6_.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-zEOX3Sjw.js → filepond-plugin-image-edit-CXXhiTdn.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-y0OgGNND.js → filepond-plugin-image-exif-orientation-DvMNhQGm.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C-amHd3H.js → filepond-plugin-image-preview-nHwj0lr7.js} +1 -1
  8. package/dist/cjs/{filepond-B0WltAUU.js → filepond-vI0B-67n.js} +1 -1
  9. package/dist/cjs/{index-CyKUnNvM.js → index-CwneDx5o.js} +10 -14
  10. package/dist/cjs/{intlTelInput-CTwMzcpE.js → intlTelInput-CzMsUlkW.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +9 -4
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +3 -3
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +3 -3
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +29 -8
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +3 -3
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +35 -17
  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-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -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-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +4 -4
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card.cjs.entry.js +48 -13
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-search.cjs.entry.js +279 -33
  91. package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
  92. package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
  93. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/{vanilla-picker-B_r1mvJW.js → vanilla-picker-BSGZg-Y0.js} +1 -1
  106. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +3 -3
  107. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +23 -2
  108. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.css +3 -0
  109. package/dist/collection/components/salla-fulfillment-methods/salla-fulfillment-methods.js +38 -16
  110. package/dist/collection/components/salla-modal/salla-modal.css +34 -16
  111. package/dist/collection/components/salla-modal/salla-modal.js +27 -2
  112. package/dist/collection/components/salla-payments/salla-payments.js +3 -3
  113. package/dist/collection/components/salla-product-card/salla-product-card.css +22 -2
  114. package/dist/collection/components/salla-product-card/salla-product-card.js +106 -11
  115. package/dist/collection/components/salla-search/interfaces.js +1 -0
  116. package/dist/collection/components/salla-search/salla-search.css +324 -14
  117. package/dist/collection/components/salla-search/salla-search.js +179 -32
  118. package/dist/collection/components/salla-search/utils.js +111 -0
  119. package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
  120. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  121. package/dist/collection/components/salla-social/salla-social.js +1 -1
  122. package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
  123. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  124. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  125. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  126. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  127. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  128. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  129. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
  130. package/dist/components/index.js +2 -2
  131. package/dist/components/salla-bullet-delivery.js +24 -3
  132. package/dist/components/salla-fulfillment-methods.js +34 -16
  133. package/dist/components/salla-modal2.js +9 -3
  134. package/dist/components/salla-payments.js +3 -3
  135. package/dist/components/salla-product-card2.js +50 -12
  136. package/dist/components/salla-search.js +392 -39
  137. package/dist/components/salla-searchable-dropdown2.js +4 -4
  138. package/dist/components/salla-skeleton2.js +1 -1
  139. package/dist/components/salla-social-share2.js +1 -1
  140. package/dist/components/salla-social.js +1 -1
  141. package/dist/components/salla-tab-content2.js +1 -1
  142. package/dist/components/salla-tab-header2.js +1 -1
  143. package/dist/components/salla-tabs2.js +1 -1
  144. package/dist/components/salla-tel-input2.js +1 -1
  145. package/dist/components/salla-tooltip2.js +1 -1
  146. package/dist/components/salla-user-settings.js +1 -1
  147. package/dist/components/salla-wishlist-actions.js +1 -1
  148. package/dist/{cjs/cart-s-x1Fshk.js → esm/cart-gFG8By9O.js} +2 -4
  149. package/dist/esm/{filepond-B9wUqRiS.js → filepond-BkGwWgIk.js} +1 -1
  150. package/dist/esm/{filepond-plugin-file-poster-Cms0jrkz.js → filepond-plugin-file-poster-TmS7u3EZ.js} +1 -1
  151. package/dist/esm/{filepond-plugin-file-validate-size-B2gy-nn6.js → filepond-plugin-file-validate-size-DzPOS-Ef.js} +1 -1
  152. package/dist/esm/{filepond-plugin-file-validate-type-D_AqfbaS.js → filepond-plugin-file-validate-type-tOom5t-_.js} +1 -1
  153. package/dist/esm/{filepond-plugin-image-edit-ChS3tv_T.js → filepond-plugin-image-edit-F_8PCaA1.js} +1 -1
  154. package/dist/esm/{filepond-plugin-image-exif-orientation-iLQFxzEc.js → filepond-plugin-image-exif-orientation-myByjSqP.js} +1 -1
  155. package/dist/esm/{filepond-plugin-image-preview-Dm1gYrYZ.js → filepond-plugin-image-preview-qqR31pR_.js} +1 -1
  156. package/dist/esm/{index-BLzx0e6P.js → index-D6VagDRi.js} +10 -14
  157. package/dist/esm/{intlTelInput-BTOzA2B4.js → intlTelInput-B1ulDRaQ.js} +1 -1
  158. package/dist/esm/loader.js +3 -3
  159. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  160. package/dist/esm/salla-accordion_6.entry.js +9 -4
  161. package/dist/esm/salla-add-product-button_5.entry.js +3 -3
  162. package/dist/esm/salla-advertisement.entry.js +1 -1
  163. package/dist/esm/salla-alert_2.entry.js +3 -3
  164. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  165. package/dist/esm/salla-applied-filters.entry.js +1 -1
  166. package/dist/esm/salla-apps-icons.entry.js +1 -1
  167. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  168. package/dist/esm/salla-badge.entry.js +1 -1
  169. package/dist/esm/salla-basket-gap.entry.js +1 -1
  170. package/dist/esm/salla-bullet-delivery_3.entry.js +29 -8
  171. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  172. package/dist/esm/salla-cart-item-offers_2.entry.js +3 -3
  173. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  174. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  175. package/dist/esm/salla-comment-factors.entry.js +1 -1
  176. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  177. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  178. package/dist/esm/salla-contacts.entry.js +1 -1
  179. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  180. package/dist/esm/salla-count-down_2.entry.js +1 -1
  181. package/dist/esm/salla-custom-fields.entry.js +1 -1
  182. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  183. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  184. package/dist/esm/salla-filters-widget.entry.js +1 -1
  185. package/dist/esm/salla-filters.entry.js +1 -1
  186. package/dist/esm/salla-fulfillment-methods.entry.js +35 -17
  187. package/dist/esm/salla-gifting.entry.js +1 -1
  188. package/dist/esm/salla-hook.entry.js +1 -1
  189. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  190. package/dist/esm/salla-installment.entry.js +1 -1
  191. package/dist/esm/salla-list-tile.entry.js +1 -1
  192. package/dist/esm/salla-localization-modal.entry.js +1 -1
  193. package/dist/esm/salla-login-modal.entry.js +1 -1
  194. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  195. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  196. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  197. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  198. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  199. package/dist/esm/salla-loyalty.entry.js +1 -1
  200. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  201. package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
  202. package/dist/esm/salla-menu.entry.js +1 -1
  203. package/dist/esm/salla-metadata.entry.js +1 -1
  204. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  205. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  206. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  207. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  208. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  209. package/dist/esm/salla-offer-modal.entry.js +1 -1
  210. package/dist/esm/salla-offer.entry.js +1 -1
  211. package/dist/esm/salla-order-branch.entry.js +1 -1
  212. package/dist/esm/salla-order-cancel.entry.js +1 -1
  213. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  214. package/dist/esm/salla-order-details-options.entry.js +1 -1
  215. package/dist/esm/salla-order-details.entry.js +1 -1
  216. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  217. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  218. package/dist/esm/salla-order-edit.entry.js +1 -1
  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 +1 -1
  222. package/dist/esm/salla-orders.entry.js +1 -1
  223. package/dist/esm/salla-payments.entry.js +4 -4
  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 +48 -13
  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 +1 -1
  237. package/dist/esm/salla-search.entry.js +279 -33
  238. package/dist/esm/salla-skeleton.entry.js +2 -2
  239. package/dist/esm/salla-social-share.entry.js +2 -2
  240. package/dist/esm/salla-social.entry.js +2 -2
  241. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  242. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  243. package/dist/esm/salla-tooltip.entry.js +2 -2
  244. package/dist/esm/salla-trust-badges.entry.js +1 -1
  245. package/dist/esm/salla-user-menu.entry.js +3 -3
  246. package/dist/esm/salla-user-profile.entry.js +1 -1
  247. package/dist/esm/salla-user-settings.entry.js +2 -2
  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 +2 -2
  251. package/dist/esm/twilight.js +3 -3
  252. package/dist/esm/{vanilla-picker-CbIzx8P3.js → vanilla-picker-DvtnWkFb.js} +1 -1
  253. package/dist/twilight/{p-7767f3a7.entry.js → p-00dfdb20.entry.js} +1 -1
  254. package/dist/twilight/{p-1420e962.entry.js → p-019183b8.entry.js} +1 -1
  255. package/dist/twilight/{p-8e2f52b2.entry.js → p-02153797.entry.js} +1 -1
  256. package/dist/twilight/{p-67caf54b.entry.js → p-02a00a9d.entry.js} +1 -1
  257. package/dist/twilight/{p-eb9fca37.entry.js → p-04e90ca8.entry.js} +1 -1
  258. package/dist/twilight/{p-cb7bc39f.entry.js → p-06ba1041.entry.js} +1 -1
  259. package/dist/twilight/{p-2bd06384.entry.js → p-0d8c219a.entry.js} +1 -1
  260. package/dist/twilight/{p-ee463cf9.entry.js → p-0f1abf9a.entry.js} +1 -1
  261. package/dist/twilight/{p-809a0076.entry.js → p-13adff5c.entry.js} +1 -1
  262. package/dist/twilight/{p-d84a11b8.entry.js → p-155ec7a7.entry.js} +1 -1
  263. package/dist/twilight/{p-06c1c936.entry.js → p-16706fe0.entry.js} +1 -1
  264. package/dist/twilight/{p-96ded4cf.entry.js → p-17a708fc.entry.js} +1 -1
  265. package/dist/twilight/{p-6866b3d6.entry.js → p-18e32c1b.entry.js} +1 -1
  266. package/dist/twilight/{p-7ffa452c.entry.js → p-19fe876a.entry.js} +1 -1
  267. package/dist/twilight/{p-932e3bff.entry.js → p-267f1daf.entry.js} +1 -1
  268. package/dist/twilight/{p-2a5b180a.entry.js → p-3532893e.entry.js} +1 -1
  269. package/dist/twilight/{p-0416a2a8.entry.js → p-3cad36ef.entry.js} +1 -1
  270. package/dist/twilight/{p-18d0c69f.entry.js → p-3feabe9a.entry.js} +1 -1
  271. package/dist/twilight/{p-738ec366.entry.js → p-43c67b9f.entry.js} +1 -1
  272. package/dist/twilight/{p-c428c44b.entry.js → p-44d7890d.entry.js} +1 -1
  273. package/dist/twilight/{p-5f6c10d6.entry.js → p-451c2f06.entry.js} +1 -1
  274. package/dist/twilight/{p-1bfb9675.entry.js → p-466b2437.entry.js} +1 -1
  275. package/dist/twilight/{p-ed3fc3bb.entry.js → p-4dbed954.entry.js} +1 -1
  276. package/dist/twilight/{p-a0c97ac9.entry.js → p-4f29e469.entry.js} +1 -1
  277. package/dist/twilight/{p-f276a319.entry.js → p-51429c21.entry.js} +1 -1
  278. package/dist/twilight/{p-de3b3e41.entry.js → p-52212098.entry.js} +1 -1
  279. package/dist/twilight/{p-05490b44.entry.js → p-522a6125.entry.js} +1 -1
  280. package/dist/twilight/p-5381aac3.entry.js +4 -0
  281. package/dist/twilight/{p-a51931ba.entry.js → p-54034038.entry.js} +1 -1
  282. package/dist/twilight/{p-595bfef8.entry.js → p-56425cd0.entry.js} +1 -1
  283. package/dist/twilight/{p-9ef91e6b.entry.js → p-56cc9936.entry.js} +1 -1
  284. package/dist/twilight/{p-7f077279.entry.js → p-57a0bb62.entry.js} +1 -1
  285. package/dist/twilight/{p-f87ba34e.entry.js → p-5b22403c.entry.js} +1 -1
  286. package/dist/twilight/{p-a7801576.entry.js → p-5d247f18.entry.js} +1 -1
  287. package/dist/twilight/{p-6ea62f2b.entry.js → p-5dc636e9.entry.js} +1 -1
  288. package/dist/twilight/{p-210095ee.entry.js → p-61035e79.entry.js} +1 -1
  289. package/dist/twilight/{p-c4f963ea.entry.js → p-61ad5ff4.entry.js} +1 -1
  290. package/dist/twilight/{p-0c80fbcf.entry.js → p-685b00b1.entry.js} +1 -1
  291. package/dist/twilight/{p-6d8b0678.entry.js → p-7275e7da.entry.js} +1 -1
  292. package/dist/twilight/{p-c0fc7756.entry.js → p-731ac823.entry.js} +1 -1
  293. package/dist/twilight/{p-8d8c84d8.entry.js → p-7348f7e3.entry.js} +1 -1
  294. package/dist/twilight/{p-98e83214.entry.js → p-738d4d73.entry.js} +1 -1
  295. package/dist/twilight/{p-8b81811b.entry.js → p-75778e67.entry.js} +1 -1
  296. package/dist/twilight/{p-ada5f9db.entry.js → p-77305493.entry.js} +1 -1
  297. package/dist/twilight/{p-5bb8c263.entry.js → p-797317f9.entry.js} +1 -1
  298. package/dist/twilight/{p-407a73f4.entry.js → p-7cfcac49.entry.js} +1 -1
  299. package/dist/twilight/{p-3b4b1f29.entry.js → p-7e8965c3.entry.js} +1 -1
  300. package/dist/twilight/{p-fad4aa22.entry.js → p-879aeb99.entry.js} +1 -1
  301. package/dist/twilight/{p-9ddcdf20.entry.js → p-87baa963.entry.js} +1 -1
  302. package/dist/twilight/{p-be424137.entry.js → p-890845d7.entry.js} +1 -1
  303. package/dist/twilight/{p-c9d10c9f.entry.js → p-891abd9a.entry.js} +1 -1
  304. package/dist/twilight/{p-4cabeff6.entry.js → p-8fd6c03b.entry.js} +1 -1
  305. package/dist/twilight/{p-894fdcdd.entry.js → p-9060cf90.entry.js} +1 -1
  306. package/dist/twilight/{p-99a757ac.entry.js → p-90b20e78.entry.js} +1 -1
  307. package/dist/twilight/{p-46ba098a.entry.js → p-91daba79.entry.js} +1 -1
  308. package/dist/twilight/{p-a4175383.entry.js → p-96a761f3.entry.js} +1 -1
  309. package/dist/twilight/{p-a4b7ee47.entry.js → p-978695b4.entry.js} +1 -1
  310. package/dist/twilight/{p-96a13e17.entry.js → p-9bd0780a.entry.js} +1 -1
  311. package/dist/twilight/{p-CBW4kczX.js → p-B8n9WvuU.js} +1 -1
  312. package/dist/twilight/{p-BTjFfROl.js → p-BBCnGXmN.js} +1 -1
  313. package/dist/twilight/{p-BBCmWsAH.js → p-BE6LvdyS.js} +1 -1
  314. package/dist/twilight/{p-Bi7BjntU.js → p-CFzua46A.js} +1 -1
  315. package/dist/twilight/{p-oVUukCva.js → p-CsLeYzSv.js} +1 -1
  316. package/dist/twilight/{p-BLzx0e6P.js → p-D6VagDRi.js} +1 -1
  317. package/dist/twilight/{p-BqaOIJsE.js → p-DJ8VhVEV.js} +1 -1
  318. package/dist/twilight/{p-C_G6bYCk.js → p-DoD9b-8A.js} +1 -1
  319. package/dist/twilight/{p-BQGQ9tVS.js → p-Xs77W4g6.js} +1 -1
  320. package/dist/twilight/{p-47597499.entry.js → p-a07f577f.entry.js} +1 -1
  321. package/dist/twilight/{p-c69e0669.entry.js → p-a0ac1fbf.entry.js} +1 -1
  322. package/dist/twilight/{p-07b67ef6.entry.js → p-a1b0bcae.entry.js} +1 -1
  323. package/dist/twilight/{p-eb10186c.entry.js → p-ab11570d.entry.js} +1 -1
  324. package/dist/twilight/{p-2b7ca018.entry.js → p-aede1dd3.entry.js} +1 -1
  325. package/dist/twilight/{p-3a97face.entry.js → p-af61bed0.entry.js} +1 -1
  326. package/dist/twilight/{p-365745de.entry.js → p-b46fa954.entry.js} +1 -1
  327. package/dist/twilight/p-b5184b83.entry.js +4 -0
  328. package/dist/twilight/{p-86cd2898.entry.js → p-b55d6ca9.entry.js} +1 -1
  329. package/dist/twilight/{p-b36ca739.entry.js → p-b731bd2b.entry.js} +1 -1
  330. package/dist/twilight/{p-34f2d378.entry.js → p-b8739111.entry.js} +1 -1
  331. package/dist/twilight/{p-fa7966bd.entry.js → p-b8f46367.entry.js} +1 -1
  332. package/dist/twilight/{p-7d86bc77.entry.js → p-bb3df4d4.entry.js} +1 -1
  333. package/dist/twilight/{p-5cc80969.entry.js → p-bcc6a2c7.entry.js} +1 -1
  334. package/dist/twilight/{p-d1ba8e6e.entry.js → p-bf0e5c4b.entry.js} +1 -1
  335. package/dist/twilight/{p-bba884dc.entry.js → p-c0c80157.entry.js} +1 -1
  336. package/dist/twilight/{p-3cc1a9b8.entry.js → p-cbe27157.entry.js} +1 -1
  337. package/dist/twilight/{p-53285f66.entry.js → p-ce60b709.entry.js} +1 -1
  338. package/dist/twilight/{p-59ccfd64.entry.js → p-ced0ad45.entry.js} +1 -1
  339. package/dist/twilight/{p-6af36173.entry.js → p-d09195ba.entry.js} +1 -1
  340. package/dist/twilight/{p-3ba22519.entry.js → p-d25c8aeb.entry.js} +1 -1
  341. package/dist/twilight/{p-f602c556.entry.js → p-da8c1307.entry.js} +1 -1
  342. package/dist/twilight/{p-2c0870cb.entry.js → p-dd6a5747.entry.js} +1 -1
  343. package/dist/twilight/{p-5cbd36fb.entry.js → p-de5c4eb3.entry.js} +1 -1
  344. package/dist/twilight/{p-cd86c231.entry.js → p-e01c1fb9.entry.js} +1 -1
  345. package/dist/twilight/{p-61b6c754.entry.js → p-e1965ea1.entry.js} +1 -1
  346. package/dist/twilight/{p-7c859f0c.entry.js → p-e64d3e62.entry.js} +1 -1
  347. package/dist/twilight/{p-bc0bc63f.entry.js → p-e7b32e74.entry.js} +1 -1
  348. package/dist/twilight/p-e8393076.entry.js +4 -0
  349. package/dist/twilight/{p-45706908.entry.js → p-ebfb0b99.entry.js} +1 -1
  350. package/dist/twilight/{p-fa459971.entry.js → p-ef2354f0.entry.js} +1 -1
  351. package/dist/twilight/{p-81f8537a.entry.js → p-ef33b218.entry.js} +21 -21
  352. package/dist/twilight/p-f3540850.entry.js +4 -0
  353. package/dist/twilight/{p-7a19cb93.entry.js → p-f3cbbe3e.entry.js} +1 -1
  354. package/dist/twilight/{p-DY4LZmNP.js → p-gFG8By9O.js} +1 -1
  355. package/dist/twilight/{p-iB9dUe00.js → p-uMDizIlo.js} +1 -1
  356. package/dist/twilight/twilight.esm.js +1 -1
  357. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +10 -0
  358. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
  359. package/dist/types/components/salla-fulfillment-methods/salla-fulfillment-methods.d.ts +8 -2
  360. package/dist/types/components/salla-modal/salla-modal.d.ts +5 -0
  361. package/dist/types/components/salla-product-card/salla-product-card.d.ts +18 -0
  362. package/dist/types/components/salla-search/interfaces.d.ts +21 -0
  363. package/dist/types/components/salla-search/salla-search.d.ts +40 -2
  364. package/dist/types/components/salla-search/utils.d.ts +19 -0
  365. package/dist/types/components.d.ts +60 -4
  366. package/package.json +5 -5
  367. package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
  368. package/dist/esm/salla-map_2.entry.js +0 -832
  369. package/dist/twilight/p-05b66ce1.entry.js +0 -4
  370. package/dist/twilight/p-33e0d7b8.entry.js +0 -4
  371. package/dist/twilight/p-56b2f8d7.entry.js +0 -4
  372. package/dist/twilight/p-8a7bb785.entry.js +0 -4
  373. package/dist/twilight/p-a8b41edc.entry.js +0 -4
@@ -2184,7 +2184,7 @@ export class SallaBulletDelivery {
2184
2184
  if (!disabled)
2185
2185
  onClick();
2186
2186
  }
2187
- } }, h("input", { type: "radio", name: "saved_address", class: "s-bullet-delivery-radio", checked: selected, disabled: disabled }), h("span", { class: "s-bullet-delivery-address-map-icon", innerHTML: MiniMap, "aria-hidden": "true" }), h("div", { class: "s-bullet-delivery-address-content" }, h("div", { class: "s-bullet-delivery-address-lines" }, h("span", { class: "s-bullet-delivery-address-line1" }, line1), h("span", { class: "s-bullet-delivery-address-line2" }, line2)))));
2187
+ } }, h("input", { type: "radio", name: "saved_address", class: "s-bullet-delivery-radio", checked: selected, disabled: disabled }), h("span", { class: "s-bullet-delivery-address-map-icon", innerHTML: MiniMap, "aria-hidden": "true" }), h("div", { class: "s-bullet-delivery-address-content" }, h("div", { class: "s-bullet-delivery-address-lines" }, h("span", { class: "s-bullet-delivery-address-line1", style: { textAlign: this.isRTL ? 'right' : 'left' } }, line1), h("span", { class: "s-bullet-delivery-address-line2", style: { textAlign: this.isRTL ? 'right' : 'left' } }, line2)))));
2188
2188
  }
2189
2189
  renderMapSection() {
2190
2190
  const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
@@ -2252,6 +2252,23 @@ export class SallaBulletDelivery {
2252
2252
  "s-bullet-delivery-location-btn--loading": this.loadingNearestBranch,
2253
2253
  }, onClick: () => this.handleFindNearestBranch(), disabled: this.loadingNearestBranch }, this.loadingNearestBranch ? (h("span", { class: "s-bullet-delivery-location-icon", "aria-hidden": "true" }, h("salla-skeleton", { height: "18px", width: "18px" }))) : (h("span", { class: "s-bullet-delivery-location-icon", innerHTML: GPS, "aria-hidden": "true" })), h("span", null, Salla.lang.get("pages.checkout.nearest_to_my_location")))), this.locationError && this.activeTab === "branch" && (h("span", { class: "s-bullet-delivery-error" }, this.locationError))));
2254
2254
  }
2255
+ /** Renders a branch's `preparation_time_range` as a localized "from - to <unit>" label. */
2256
+ getPreparationTimeLabel(range) {
2257
+ if (!range)
2258
+ return null;
2259
+ const unitKeys = {
2260
+ hour: 'pages.checkout.preparation_time_hours',
2261
+ minute: 'pages.checkout.preparation_time_minutes',
2262
+ day: 'pages.checkout.preparation_time_days',
2263
+ };
2264
+ const key = unitKeys[range.from.unit];
2265
+ if (!key)
2266
+ return null;
2267
+ return Salla.lang
2268
+ .getWithDefault(key, 'من {from} إلى {to} دقائق')
2269
+ ?.replace('{from}', String(range.from.value))
2270
+ ?.replace('{to}', String(range.to.value));
2271
+ }
2255
2272
  renderBranchList() {
2256
2273
  if (this.loadingBranches) {
2257
2274
  return (h("div", { class: "s-bullet-delivery-branches-wrap" }, h("div", { class: "s-bullet-delivery-branches-loading" }, [1, 2, 3, 4].map((v) => (h("div", { key: v, class: "s-bullet-delivery-branch-skeleton" }, h("salla-skeleton", { class: "s-bullet-delivery-branch-skeleton-radio", type: "circle", height: "16px", width: "16px" }), h("div", { class: "s-bullet-delivery-branch-skeleton-icon" }, h("salla-skeleton", { height: "34px", width: "34px" })), h("div", { class: "s-bullet-delivery-branch-skeleton-content" }, h("salla-skeleton", { class: "s-bullet-delivery-branch-skeleton-title", height: "12px", width: "124px" })), h("salla-skeleton", { class: "s-bullet-delivery-branch-skeleton-time", height: "12px", width: "88px" }), h("div", { class: "s-bullet-delivery-branch-skeleton-map" }, h("salla-skeleton", { height: "32px", width: "32px" }))))))));
@@ -2262,6 +2279,10 @@ export class SallaBulletDelivery {
2262
2279
  return (h("div", { class: "s-bullet-delivery-branches-wrap" }, h("ul", { class: "s-bullet-delivery-branches-list s-scrollbar" }, this.filteredBranches.map(branch => {
2263
2280
  const selectable = isBranchSelectable(branch);
2264
2281
  const readiness = branch?.pickup_readiness;
2282
+ const locationText = [branch.country?.name, branch.city?.name, branch.district?.name]
2283
+ .filter(Boolean)
2284
+ .join(', ');
2285
+ const preparationTimeLabel = this.getPreparationTimeLabel(branch.preparation_time_range);
2265
2286
  return (h("li", { key: branch.id, class: {
2266
2287
  's-bullet-delivery-branch-item': true,
2267
2288
  's-bullet-delivery-branch-item--selected': this.selectedBranch?.id === branch.id,
@@ -2272,7 +2293,7 @@ export class SallaBulletDelivery {
2272
2293
  if (selectable)
2273
2294
  this.handleBranchSelect(branch);
2274
2295
  }
2275
- } }, h("input", { type: "radio", name: "branch", class: "s-bullet-delivery-radio", checked: this.selectedBranch?.id === branch.id, disabled: !selectable }), h("span", { class: "s-bullet-delivery-branch-icon", "aria-hidden": "true" }, h("span", { innerHTML: Store })), h("div", { class: "flex flex-col gap-[2px]" }, h("div", { class: "flex items-center gap-1" }, h("p", { class: "s-bullet-delivery-branch-name text-start" }, branch.name), readiness?.label && (h("p", { class: `branch-status-badge${readiness.color ? ` ${readiness.color}` : ''}` }, readiness.label))), branch.preparation_time ? (h("span", { class: "s-bullet-delivery-branch-prep text-start" }, h("i", { class: "sicon-clock" }), "\u00A0", h("span", { class: "first-letter-cap" }, branch.preparation_time))) : null, readiness?.detail_line && (h("span", { class: "s-bullet-delivery-branch-time text-start" }, h("i", { class: "sicon-store" }), "\u00A0", readiness.detail_line))), h("div", { style: {
2296
+ } }, h("input", { type: "radio", name: "branch", class: "s-bullet-delivery-radio", checked: this.selectedBranch?.id === branch.id, disabled: !selectable }), h("span", { class: "s-bullet-delivery-branch-icon", "aria-hidden": "true" }, h("span", { innerHTML: Store })), h("div", { class: "flex flex-col" }, h("div", { class: "flex items-center gap-1 mb-1" }, h("p", { class: "s-bullet-delivery-branch-name text-start" }, branch.name), readiness?.label && (h("p", { class: `branch-status-badge${readiness.color ? ` ${readiness.color}` : ''}` }, readiness.label))), locationText ? (h("span", { class: "s-bullet-delivery-branch-prep", style: { fontSize: '0.8rem', lineHeight: '1.1rem', textAlign: this.isRTL ? 'right' : 'left' } }, h("i", { class: "sicon-location" }), "\u00A0", h("span", { class: "first-letter-cap" }, locationText))) : null, preparationTimeLabel ? (h("span", { class: "s-bullet-delivery-branch-prep", style: { fontSize: '0.8rem', lineHeight: '1.1rem', textAlign: this.isRTL ? 'right' : 'left' } }, h("i", { class: "sicon-clock" }), "\u00A0", h("span", { class: "first-letter-cap" }, Salla.lang.get('pages.checkout.pickup_duration'), ": ", preparationTimeLabel))) : null, readiness?.detail_line && (h("span", { class: "s-bullet-delivery-branch-prep", style: { fontSize: '0.8rem', lineHeight: '1.1rem', textAlign: this.isRTL ? 'right' : 'left' } }, h("i", { class: "sicon-store" }), "\u00A0", readiness.detail_line))), h("div", { style: {
2276
2297
  width: 'full',
2277
2298
  maxWidth: '50px',
2278
2299
  marginInlineStart: 'auto',
@@ -73,6 +73,9 @@
73
73
  color: var(--color-text-secondary, #6b7280);
74
74
  line-height: 1;
75
75
  }
76
+ .hidden {
77
+ display: none;
78
+ }
76
79
  .shadow {
77
80
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
78
81
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
@@ -4,42 +4,63 @@
4
4
  import { h, Host } from "@stencil/core";
5
5
  /**
6
6
  * @name SallaFulfillmentMethods
7
- * @description Displays product fulfillment options (pickup and delivery) as two side-by-side cards
7
+ * @description Displays product fulfillment options (pickup and delivery) as side-by-side cards.
8
+ * Renders only the card(s) the product actually supports, per `supports_pickup` / `supports_delivery`
9
+ * on the product-details response. Login Cycle, branch capabilities, and product-type eligibility are
10
+ * all decided server-side (see `ProductFulfillmentMethods` composer) — this component is render-only
11
+ * and must not re-check any of those rules on the front end.
8
12
  * @tag salla-fulfillment-methods
9
13
  */
10
14
  export class SallaFulfillmentMethods {
11
15
  constructor() {
12
16
  this.methods = [];
13
17
  this.shouldRender = false;
18
+ this.productId = null;
14
19
  }
15
- async componentDidLoad() {
16
- await Salla.onReady();
17
- await Salla.lang.onLoaded();
18
- if (!Salla.config.get('store.shipping.support_pickup'))
19
- return;
20
- this.shouldRender = true;
21
- this.setLabels();
20
+ async componentWillLoad() {
21
+ try {
22
+ // page.id is server-injected, resolve it the same way salla-cashback-banner does
23
+ // for this same hook slot (product:single.*).
24
+ this.productId = this.host.dataset.productId || Salla.config.get('page.id');
25
+ await Salla.onReady();
26
+ await Salla.lang.onLoaded();
27
+ if (!this.productId)
28
+ return;
29
+ const response = await Salla.product.getDetails(this.productId, []).catch(() => null);
30
+ this.setLabels(response?.data ?? {});
31
+ }
32
+ catch (e) {
33
+ Salla?.logger?.warn?.('salla-fulfillment-methods: init failed', e);
34
+ }
22
35
  }
23
- setLabels() {
24
- this.methods = [
25
- {
36
+ setLabels(flags) {
37
+ console.log('flags', flags);
38
+ const methods = [];
39
+ // Missing/undefined flags (BE not yet deployed, request failed) resolve to falsy → hidden.
40
+ // Never fall back to showing both cards.
41
+ if (flags?.supports_delivery) {
42
+ methods.push({
26
43
  id: 'delivery',
27
44
  title: Salla.lang.getWithDefault('pages.products.promise_delivery_title', 'متاح للتوصيل'),
28
45
  subtitle: Salla.lang.getWithDefault('pages.products.promise_delivery_subtitle', 'طلبك يوصلك لباب البيت بسهولة.'),
29
46
  iconClass: 'sicon-location',
30
- },
31
- {
47
+ });
48
+ }
49
+ if (flags?.supports_pickup) {
50
+ methods.push({
32
51
  id: 'pickup',
33
52
  title: Salla.lang.getWithDefault('pages.products.promise_pickup_title', 'متاح للاستلام'),
34
53
  subtitle: Salla.lang.getWithDefault('pages.products.promise_pickup_subtitle', 'استلام فوري من أقرب فرع.'),
35
54
  iconClass: 'sicon-store',
36
- },
37
- ];
55
+ });
56
+ }
57
+ this.methods = methods;
58
+ this.shouldRender = methods.length > 0;
38
59
  }
39
60
  render() {
40
61
  if (!this.shouldRender)
41
62
  return null;
42
- return (h(Host, { class: "s-fulfillment-methods" }, h("div", { class: "s-fulfillment-methods-list" }, this.methods.map((method) => (h("div", { key: method.id, class: "s-fulfillment-methods-card" }, h("div", { class: "s-fulfillment-methods-content" }, h("div", { class: "s-fulfillment-methods-icon-wrap" }, h("i", { class: `${method.iconClass} s-fulfillment-methods-icon` })), h("div", { class: "s-fulfillment-methods-text" }, h("span", { class: "s-fulfillment-methods-title" }, method.title), h("span", { class: "s-fulfillment-methods-subtitle" }, method.subtitle)))))))));
63
+ return (h(Host, { class: "s-fulfillment-methods" }, h("div", { class: "s-fulfillment-methods-list" }, this.methods.map(method => (h("div", { key: method.id, class: "s-fulfillment-methods-card" }, h("div", { class: "s-fulfillment-methods-content" }, h("div", { class: "s-fulfillment-methods-icon-wrap" }, h("i", { class: `${method.iconClass} s-fulfillment-methods-icon` })), h("div", { class: "s-fulfillment-methods-text" }, h("span", { class: "s-fulfillment-methods-title" }, method.title), h("span", { class: "s-fulfillment-methods-subtitle" }, method.subtitle)))))))));
43
64
  }
44
65
  static get is() { return "salla-fulfillment-methods"; }
45
66
  static get originalStyleUrls() {
@@ -58,4 +79,5 @@ export class SallaFulfillmentMethods {
58
79
  "shouldRender": {}
59
80
  };
60
81
  }
82
+ static get elementRef() { return "host"; }
61
83
  }
@@ -564,24 +564,42 @@ salla-modal.s-order-cancel-modal .s-modal-title {
564
564
  .s-scopes-modal .s-modal-header {
565
565
  display: block !important;
566
566
  }
567
- .s-search-modal .s-modal-wrapper {
568
- align-items: flex-start;
569
- padding: 0;
570
- }
571
- .s-search-modal .s-modal-spacer {
572
- display: inline;
573
- }
574
- .s-search-modal .s-modal-body {
575
- padding: 0;
576
- width: 700px;
577
- max-width: 90%;
578
- margin-top: 3.2rem;
579
- border-radius: 0.5rem;
580
- background: transparent;
581
- overflow: visible;
582
- position: relative !important;
567
+ @media (min-width: 640px) {
568
+ .s-search-modal .s-modal-wrapper {
569
+ align-items: flex-start;
570
+ padding: 0;
571
+ }
572
+ .s-search-modal .s-modal-spacer {
573
+ display: inline;
574
+ }
575
+ }
576
+ @media (max-width: 639px) {
577
+ .s-search-modal .s-modal-body {
578
+ height: 100dvh;
579
+ max-height: 100dvh !important;
580
+ }
581
+ }
582
+ @media (min-width: 640px) {
583
+ .s-search-modal .s-modal-body {
584
+ padding: 0;
585
+ width: 700px;
586
+ max-width: 90%;
587
+ margin-top: 3.2rem;
588
+ border-radius: 0.5rem;
589
+ background: transparent;
590
+ overflow: visible;
591
+ position: relative !important;
592
+ }
583
593
  }
584
594
  .s-search-modal .s-modal-close {
585
595
  top: 50%;
586
596
  transform: translateY(-50%);
587
597
  }
598
+ @media (min-width: 640px) {
599
+ .s-search-modal.s-search-modal-new .s-modal-body {
600
+ background: white;
601
+ overflow: hidden;
602
+ width: 1100px;
603
+ max-width: 95%;
604
+ }
605
+ }
@@ -65,6 +65,11 @@ export class SallaModal {
65
65
  * Show a back button in the header corner. Defaults to `false`
66
66
  */
67
67
  this.showBack = false;
68
+ /**
69
+ * Hide the close (X) button in the modal header, without affecting `isClosable`
70
+ * (backdrop click / programmatic close still work). Defaults to `false`
71
+ */
72
+ this.hideCloseButton = false;
68
73
  salla.event.on('modal::open', target => target == this.host.id && this.open());
69
74
  salla.event.on('modal::close', target => target == this.host.id && this.close());
70
75
  this.modalTitle = this.host.getAttribute('modal-title');
@@ -80,7 +85,7 @@ export class SallaModal {
80
85
  setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden
81
86
  }
82
87
  handleKeyUp(ev) {
83
- if (ev.key === "KeyUp") {
88
+ if (ev.key === "Escape") {
84
89
  this.closeModal();
85
90
  }
86
91
  }
@@ -175,7 +180,7 @@ export class SallaModal {
175
180
  }
176
181
  return (h(Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal("backdropClick") }), h("div", { class: "s-modal-wrapper" }, h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding'), style: this.getCustomWidthStyle() }, h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.centered } }, this.showBack ?
177
182
  h("salla-button", { class: "s-modal-back", shape: "icon", color: "light", size: "medium", "aria-label": "Back", onClick: () => this.handleBack() }, h("span", { innerHTML: this.getBackIcon() }))
178
- : '', this.isClosable ?
183
+ : '', this.isClosable && !this.hideCloseButton ?
179
184
  h("button", { class: "s-modal-close", onClick: () => this.closeModal("closeButtonClick"), type: "button" }, h("span", { innerHTML: CancelIcon }))
180
185
  : '', this.modalTitle || this.subTitle ?
181
186
  h("div", { class: "s-modal-header-inner" }, h("slot", { name: 'icon' }, !!this.iconStyle ?
@@ -459,6 +464,26 @@ export class SallaModal {
459
464
  "setter": false,
460
465
  "reflect": true,
461
466
  "defaultValue": "false"
467
+ },
468
+ "hideCloseButton": {
469
+ "type": "boolean",
470
+ "attribute": "hide-close-button",
471
+ "mutable": false,
472
+ "complexType": {
473
+ "original": "boolean",
474
+ "resolved": "boolean",
475
+ "references": {}
476
+ },
477
+ "required": false,
478
+ "optional": false,
479
+ "docs": {
480
+ "tags": [],
481
+ "text": "Hide the close (X) button in the modal header, without affecting `isClosable`\n(backdrop click / programmatic close still work). Defaults to `false`"
482
+ },
483
+ "getter": false,
484
+ "setter": false,
485
+ "reflect": false,
486
+ "defaultValue": "false"
462
487
  }
463
488
  };
464
489
  }
@@ -42,12 +42,12 @@ export class SallaPayments {
42
42
  render() {
43
43
  const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');
44
44
  const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');
45
- return (h(Host, { key: 'da9ffad7606b7a1f885df4843612c4221a835c15', class: "s-payments-list-wrap" }, h("ul", { key: '9a15cd4328a65261e1137d65600867fd89893892', class: "s-payments-list" }, madeInKSA && h("li", { key: '17964fbe6a411738ad026cd116e1a67676ae0ab6', class: "s-payments-list-item" }, h("img", { key: '36baae3d522f41f1ab07d75328318ee9f9ae3a19', width: 58, height: 58, decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.map((payment) => (payment == "cod" ?
45
+ return (h(Host, { key: 'aaa2a9297d16666d9cf686aea17319026145ed1d', class: "s-payments-list-wrap" }, h("ul", { key: '0c9a19d7ba93555e897fdb5068572d90f64a87e5', class: "s-payments-list" }, madeInKSA && h("li", { key: '1da474ca870831495e7bee34e8e8ba538927c716', class: "s-payments-list-item" }, h("img", { key: '66b42b93ef788b7091e8343338182ffc93cae74f', width: 58, height: 58, decoding: "async", loading: "lazy", src: salla.url.cdn(`images/made-in-ksa.svg`, 58, 58), alt: "made in KSA certified" })), this.payments.map((payment) => (payment == "cod" ?
46
46
  h("div", { id: "cod-slot", innerHTML: this.codSlot
47
47
  .replace(/\{image\}/g, this.paymentLogo(`cod`)) }) :
48
48
  h("div", { id: "payment-slot", innerHTML: this.paymentSlot
49
49
  .replace(/\{image\}/g, this.paymentLogo(payment))
50
- .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: '9f6c64efa03905a8584f8732bc7032ae686bef29', id: "sbc-slot", innerHTML: this.sbcSlot
50
+ .replace(/\{payment\}/g, payment) }))), sbcId && h("div", { key: 'fd9c5984a1c6890dc9690f6e3969a76fed2f1501', id: "sbc-slot", innerHTML: this.sbcSlot
51
51
  .replace(/\{image\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))
52
52
  .replace(/\{link\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`) }))));
53
53
  }
@@ -170,5 +170,5 @@ export class SallaPayments {
170
170
  static get elementRef() { return "host"; }
171
171
  }
172
172
  /** Slugs whose mini logo lives on the new assets CDN; add one when its logo is re-uploaded there. */
173
- SallaPayments.NEW_CDN_LOGOS = ['tabby_installment', 'emkan_installment'];
173
+ SallaPayments.NEW_CDN_LOGOS = ['tabby_installment', 'emkan_installment', 'benefit', 'qpay'];
174
174
  SallaPayments.audited = false;
@@ -366,6 +366,7 @@
366
366
  }
367
367
  .s-product-card-content-title a {
368
368
  display: block;
369
+ text-align: start;
369
370
  font-size: 0.875rem;
370
371
  line-height: 1.25rem;
371
372
  font-weight: 700;
@@ -382,6 +383,13 @@
382
383
  align-items: center;
383
384
  justify-content: space-between;
384
385
  }
386
+ .s-product-card-out-of-stock-label {
387
+ font-size: 0.75rem;
388
+ line-height: 1rem;
389
+ font-weight: 700;
390
+ --tw-text-opacity: 1;
391
+ color: rgb(239 68 68 / var(--tw-text-opacity, 1));
392
+ }
385
393
  .s-product-card-rating {
386
394
  display: flex;
387
395
  align-items: center;
@@ -622,6 +630,12 @@
622
630
  .s-product-card-compact .s-product-card-content-footer {
623
631
  margin-top: 0px;
624
632
  flex-shrink: 0;
633
+ gap: 0.5rem;
634
+ }
635
+ .s-product-card-add-to-cart-icon svg {
636
+ height: 1rem;
637
+ width: 1rem;
638
+ fill: currentColor;
625
639
  }
626
640
  .s-product-card-compact .s-add-product-button-compact salla-button .s-button-btn {
627
641
  height: 2rem;
@@ -658,7 +672,7 @@
658
672
  .s-product-card-compact .s-product-card-content-title {
659
673
  font-size: 0.875rem;
660
674
  line-height: 1.25rem;
661
- font-weight: 600;
675
+ font-weight: 500;
662
676
  line-height: 1.25;
663
677
  --tw-text-opacity: 1;
664
678
  color: rgb(55 65 81 / var(--tw-text-opacity, 1));
@@ -668,7 +682,7 @@
668
682
  display: -webkit-box;
669
683
  -webkit-box-orient: vertical;
670
684
  -webkit-line-clamp: 2;
671
- display: block;
685
+ font-weight: 500;
672
686
  }
673
687
  .s-product-card-compact .s-product-card-content-subtitle {
674
688
  margin-top: 0.25rem;
@@ -710,3 +724,9 @@
710
724
  .s-product-card-compact .s-product-card-promotion-title {
711
725
  display: none;
712
726
  }
727
+ .s-search-grid-item .s-product-card-out-badge {
728
+ --tw-bg-opacity: 1;
729
+ background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1));
730
+ --tw-text-opacity: 1;
731
+ color: rgb(220 38 38 / var(--tw-text-opacity, 1));
732
+ }
@@ -4,11 +4,30 @@
4
4
  import { Host, h } from "@stencil/core";
5
5
  import Heart from "../../assets/svg/heart.svg";
6
6
  import Star from "../../assets/svg/star2.svg";
7
+ import Cart from "../../assets/svg/cart.svg";
7
8
  /**
8
9
  * @slot add-to-cart-label - Add to cart label.
9
10
  */
10
11
  export class SallaProductCard {
11
12
  constructor() {
13
+ /**
14
+ * Force-show the wishlist button even in layouts (e.g. horizontal + compact)
15
+ * that otherwise wouldn't render one. Defaults to `false`.
16
+ */
17
+ this.forceShowWishlistButton = false;
18
+ /**
19
+ * Show only the cart icon instead of the text label on the add-to-cart button.
20
+ * Defaults to `false`.
21
+ */
22
+ this.compactAddToCart = false;
23
+ /**
24
+ * Show the out-of-stock label beside the price instead of as the image badge
25
+ * rendered by `getProductBadge()`. Defaults to `false`.
26
+ */
27
+ this.showOutOfStockBesidePrice = false;
28
+ // CSS line-clamp alone isn't reliable enough here (cross-browser + RTL edge cases), so
29
+ // compact titles are also hard-truncated in JS to guarantee at most ~2 lines.
30
+ this.COMPACT_TITLE_MAX_LENGTH = 60;
12
31
  // Store configs
13
32
  salla.onReady(() => {
14
33
  this.fitImageHeight = salla.config.get('store.settings.product.fit_type');
@@ -63,18 +82,30 @@ export class SallaProductCard {
63
82
  let d = new Date(date);
64
83
  return `${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`;
65
84
  }
85
+ getDisplayTitle() {
86
+ const name = this.productData?.name || '';
87
+ if (!this.compact || name.length <= this.COMPACT_TITLE_MAX_LENGTH) {
88
+ return name;
89
+ }
90
+ return name.slice(0, this.COMPACT_TITLE_MAX_LENGTH).trimEnd() + '…';
91
+ }
66
92
  getProductBadge() {
67
- if (this.productData.promotion_title) {
68
- return h("div", { class: "s-product-card-promotion-title" }, this.productData.promotion_title);
93
+ if (this.productData?.is_out_of_stock && !this.showOutOfStockBesidePrice) {
94
+ return h("div", { class: "s-product-card-out-badge" }, this.outOfStock);
69
95
  }
70
96
  if (this.showQuantity && this.productData?.quantity) {
71
97
  return h("div", { class: "s-product-card-quantity" }, this.remained, " ", salla.helpers.number(this.productData?.quantity));
72
98
  }
73
- if (this.showQuantity && this.productData?.is_out_of_stock) {
74
- return h("div", { class: "s-product-card-out-badge" }, this.outOfStock);
99
+ if (this.productData.promotion_title) {
100
+ return h("div", { class: "s-product-card-promotion-title" }, this.productData.promotion_title);
75
101
  }
76
102
  return '';
77
103
  }
104
+ renderAddToCartLabel() {
105
+ return (h("slot", { name: "add-to-cart-label" }, this.compactAddToCart
106
+ ? h("span", { class: "s-product-card-add-to-cart-icon", innerHTML: Cart })
107
+ : this.productData.add_to_cart_label));
108
+ }
78
109
  getPriceFormat(price) {
79
110
  if (!price || price == 0) {
80
111
  return salla.config.get('store.settings.product.show_price_as_dash') ? '-' : '';
@@ -105,14 +136,14 @@ export class SallaProductCard {
105
136
  's-product-card-out-of-stock': this.productData?.is_out_of_stock,
106
137
  };
107
138
  const hrefProp = this.productData?.url ? { href: this.productData.url, title: `Learn more about ${this.productData?.name}` } : {};
108
- return (h(Host, { key: 'c5a6d2bc2fcf23da1a41ab8b19b2e981fb111e30', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: 'e8d5105e4dbe367c612d62ef1dd6c95d04f440b0', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: '8714997fcb48ef0eaabdf0a52cb775514e53db56', ...hrefProp }, h("img", { key: 'eebd3c1dde0894037a7723c46e2f07f6a5aef939', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
139
+ return (h(Host, { key: 'e0748a44b8e851c7aff3ee741a17dcb19dabfdaf', id: `product-${this.productData?.id}`, class: classes }, h("div", { key: '10cc1deb8384ad2bbe83263f82b257d5042cff8e', class: !this.fullImage ? 's-product-card-image' : 's-product-card-image-full' }, h("a", { key: 'd976cc14bb10c2d5fe6c55253ea051b8a57d7721', ...hrefProp }, h("img", { key: '9007014be0cb7adc56541e0b1e823fb4d6f92b84', class: `s-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)
109
140
  ? 'contain'
110
141
  : this.fitImageHeight
111
142
  ? this.fitImageHeight
112
- : 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: '72e240315320e976dcad8d3f027711b9c1d7bcf1', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
113
- h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: '2f0186ffc102488824cd7c346f4e07439474fc26', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
143
+ : 'cover'} lazy`, src: this.placeholder, alt: this.productData?.image?.alt || this.productData?.name, "data-src": this.productData?.image?.url || this.productData?.thumbnail }), !this.fullImage && !this.minimal ? this.getProductBadge() : ''), this.fullImage && h("a", { key: 'c101c02eeb4e0245fbcd713b0e83c81148e594c1', ...hrefProp, class: "s-product-card-overlay" }), !this.horizontal && !this.fullImage ?
144
+ h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, "aria-label": "Add or remove to wishlist", ref: el => this.wishlistBtn = el, class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart })) : ''), h("div", { key: 'f02eaeabefd56d7b560dcd268e2b941cf843cc95', class: "s-product-card-content" }, this.isSpecial && this.productData?.quantity ?
114
145
  h("div", { class: "s-product-card-content-pie", ref: pie => this.pie = pie }, h("span", null, h("b", null, salla.helpers.number(this.productData?.quantity)), this.remained), h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -1 36 34", class: "s-product-card-content-pie-svg" }, h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-base" }), h("circle", { cx: "16", cy: "16", r: "15.9155", class: "s-product-card-content-pie-svg-bar" })))
115
- : '', h("div", { key: 'd50ea0726d25bf3b551050e906fc615bc682e694', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: 'e4f39676d661a01d1aa6352cac7be6e764fa8687', class: "s-product-card-content-title" }, h("a", { key: '0aacc2e00a0db730d1e803da34336085082df75d', ...hrefProp }, this.productData?.name)), this.productData?.subtitle && !this.minimal ?
146
+ : '', h("div", { key: '9776564de24468852192dce1ff0db35cd6c533c3', class: { 's-product-card-content-main': true, 's-product-card-content-extra-padding': this.isSpecial } }, h("h3", { key: 'd78ea05cba95053f99495c5e8aeb59a9b66557c8', class: "s-product-card-content-title" }, h("a", { key: 'a8ba81e8ba7a4e59cf4c6bcb4370ea0965b82087', ...hrefProp }, this.getDisplayTitle())), this.productData?.subtitle && !this.minimal ?
116
147
  h("p", { class: "s-product-card-content-subtitle" }, this.productData?.subtitle)
117
148
  : ''), this.productData?.donation && !this.minimal && !this.fullImage ?
118
149
  [h("salla-progress-bar", { donation: this.productData?.donation }), h("div", { class: "s-product-card-donation-input" }, this.productData?.donation?.can_donate ?
@@ -121,16 +152,20 @@ export class SallaProductCard {
121
152
  this.addBtn.donatingAmount = e.target.value;
122
153
  }, id: "donation-amount", name: "donating_amount", class: "s-form-control", placeholder: this.donationAmount })]
123
154
  : '')]
124
- : '', h("div", { key: '445a1e16fee6ebb6ab5012aca324d3845991d13e', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.productData?.rating?.stars && !this.minimal ?
155
+ : '', h("div", { key: '290e93db790c81a11e8d2edf3d215cec03edc965', class: { 's-product-card-content-sub': true, 's-product-card-content-extra-padding': this.isSpecial } }, this.getProductPrice(), this.showOutOfStockBesidePrice && this.productData?.is_out_of_stock ?
156
+ h("span", { class: "s-product-card-out-of-stock-label" }, this.outOfStock)
157
+ : '', this.productData?.rating?.stars && !this.minimal ?
125
158
  h("div", { class: "s-product-card-rating" }, h("span", { innerHTML: Star }), h("span", null, this.productData.rating.stars))
126
159
  : ''), this.isSpecial && this.productData.discount_ends
127
160
  ? h("salla-count-down", { date: this.formatDate(this.productData.discount_ends), "end-of-day": true, boxed: true, labeled: true })
128
161
  : '', !this.hideAddBtn && !this.compact ?
129
- h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { fill: "outline", width: "wide", ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)), this.horizontal || this.fullImage ?
162
+ h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { fill: "outline", width: "wide", ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type }, this.renderAddToCartLabel()), this.horizontal || this.fullImage ?
130
163
  h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, ref: el => this.wishlistBtn = el, "aria-label": "Add or remove to wishlist", class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick(), "data-id": "{{ product.id }}" }, h("span", { class: "text-xl", innerHTML: Heart }))
131
164
  : '')
132
165
  : ''), !this.hideAddBtn && this.compact ?
133
- h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type, class: "s-add-product-button-compact" }, h("slot", { name: "add-to-cart-label" }, this.productData.add_to_cart_label)))
166
+ h("div", { class: "s-product-card-content-footer" }, h("salla-add-product-button", { ref: el => this.addBtn = el, "product-id": this.productData.id, "product-status": this.productData.status, "product-type": this.productData.type, class: "s-add-product-button-compact" }, this.renderAddToCartLabel()), this.forceShowWishlistButton ?
167
+ h("salla-button", { shape: "icon", fill: "none", color: "light", loading: false, ref: el => this.wishlistBtn = el, "aria-label": "Add or remove to wishlist", class: "s-product-card-wishlist-btn animated", onClick: () => this.handleWishlistClick() }, h("span", { innerHTML: Heart }))
168
+ : '')
134
169
  : ''));
135
170
  }
136
171
  componentDidLoad() {
@@ -326,6 +361,66 @@ export class SallaProductCard {
326
361
  "getter": false,
327
362
  "setter": false,
328
363
  "reflect": true
364
+ },
365
+ "forceShowWishlistButton": {
366
+ "type": "boolean",
367
+ "attribute": "force-show-wishlist-button",
368
+ "mutable": false,
369
+ "complexType": {
370
+ "original": "boolean",
371
+ "resolved": "boolean",
372
+ "references": {}
373
+ },
374
+ "required": false,
375
+ "optional": false,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": "Force-show the wishlist button even in layouts (e.g. horizontal + compact)\nthat otherwise wouldn't render one. Defaults to `false`."
379
+ },
380
+ "getter": false,
381
+ "setter": false,
382
+ "reflect": false,
383
+ "defaultValue": "false"
384
+ },
385
+ "compactAddToCart": {
386
+ "type": "boolean",
387
+ "attribute": "compact-add-to-cart",
388
+ "mutable": false,
389
+ "complexType": {
390
+ "original": "boolean",
391
+ "resolved": "boolean",
392
+ "references": {}
393
+ },
394
+ "required": false,
395
+ "optional": false,
396
+ "docs": {
397
+ "tags": [],
398
+ "text": "Show only the cart icon instead of the text label on the add-to-cart button.\nDefaults to `false`."
399
+ },
400
+ "getter": false,
401
+ "setter": false,
402
+ "reflect": false,
403
+ "defaultValue": "false"
404
+ },
405
+ "showOutOfStockBesidePrice": {
406
+ "type": "boolean",
407
+ "attribute": "show-out-of-stock-beside-price",
408
+ "mutable": false,
409
+ "complexType": {
410
+ "original": "boolean",
411
+ "resolved": "boolean",
412
+ "references": {}
413
+ },
414
+ "required": false,
415
+ "optional": false,
416
+ "docs": {
417
+ "tags": [],
418
+ "text": "Show the out-of-stock label beside the price instead of as the image badge\nrendered by `getProductBadge()`. Defaults to `false`."
419
+ },
420
+ "getter": false,
421
+ "setter": false,
422
+ "reflect": false,
423
+ "defaultValue": "false"
329
424
  }
330
425
  };
331
426
  }