@salla.sa/twilight-components 2.14.450 → 2.14.451

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 (320) hide show
  1. package/dist/cjs/{filepond-u7zONIpU.js → filepond-CFAfS398.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DPE2-7A4.js → filepond-plugin-file-poster-CGV3AN8S.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-QFJIY-td.js → filepond-plugin-file-validate-size-5lxojxa3.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CqUNeom7.js → filepond-plugin-file-validate-type-DU3FUIcL.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-B2Z3rRkn.js → filepond-plugin-image-edit-DYML2Igz.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-DxoN6Z-R.js → filepond-plugin-image-exif-orientation-PyHdAMQE.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-doqEZlz_.js → filepond-plugin-image-preview-B723diKP.js} +1 -1
  8. package/dist/cjs/{functions-CZozSu7O.js → functions-CCmv-cGP.js} +1 -1
  9. package/dist/cjs/{index-CCSZWnkr.js → index-CL8sn0_c.js} +1 -1
  10. package/dist/cjs/{index-tPF0UB3W.js → index-lbHgh2oF.js} +6 -6
  11. package/dist/cjs/index.esm-DOwgk2YK.js +2444 -0
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +21 -17
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +4611 -24
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notifications.cjs.entry.js +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-details-multiple-bundle-product.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  99. package/dist/cjs/{tracked-promise-DVCwmpuo.js → tracked-promise-BEZGH5zy.js} +1 -1
  100. package/dist/cjs/twilight.cjs.js +2 -2
  101. package/dist/cjs/{vanilla-picker-DQ8iQ9l5.js → vanilla-picker-DEoSMlkf.js} +1 -1
  102. package/dist/collection/assets/svg/location-tag.svg +10 -0
  103. package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +20 -16
  104. package/dist/collection/components/salla-bullet-delivery/api-service.js +6 -0
  105. package/dist/collection/components/salla-bullet-delivery/helpers.js +3 -1
  106. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +128 -0
  107. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +195 -20
  108. package/dist/components/index.esm.js +2424 -0
  109. package/dist/components/index.js +2 -2
  110. package/dist/components/salla-bottom-alert.js +20 -16
  111. package/dist/components/salla-bullet-delivery.js +4644 -51
  112. package/dist/esm/{filepond-N1L04Plt.js → filepond-CCUaTwJO.js} +1 -1
  113. package/dist/esm/{filepond-plugin-file-poster-2E1WZVzP.js → filepond-plugin-file-poster-C3FfmUV2.js} +1 -1
  114. package/dist/esm/{filepond-plugin-file-validate-size-C0LhcfOR.js → filepond-plugin-file-validate-size-27nMbGKo.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-validate-type-Be8IgUh8.js → filepond-plugin-file-validate-type-RRO4qH5n.js} +1 -1
  116. package/dist/esm/{filepond-plugin-image-edit-CFFuq7E_.js → filepond-plugin-image-edit-wY6LYrlF.js} +1 -1
  117. package/dist/esm/{filepond-plugin-image-exif-orientation-DPCeA1B5.js → filepond-plugin-image-exif-orientation-OrAkjCVu.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-preview-CEvNq5JJ.js → filepond-plugin-image-preview-COtDiNmq.js} +1 -1
  119. package/dist/esm/{functions-Ba6VuRnB.js → functions-BBStjquJ.js} +1 -1
  120. package/dist/esm/{index-CrNw20pf.js → index-BAOl7AJU.js} +6 -6
  121. package/dist/esm/{index-IqFJsnTE.js → index-BgFU58I4.js} +1 -1
  122. package/dist/esm/index.esm-BkPzCq-C.js +2424 -0
  123. package/dist/esm/loader.js +3 -3
  124. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  125. package/dist/esm/salla-accordion_6.entry.js +1 -1
  126. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  127. package/dist/esm/salla-advertisement.entry.js +1 -1
  128. package/dist/esm/salla-alert_2.entry.js +21 -17
  129. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  130. package/dist/esm/salla-apps-icons.entry.js +1 -1
  131. package/dist/esm/salla-badge.entry.js +1 -1
  132. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  133. package/dist/esm/salla-bullet-delivery_2.entry.js +4646 -59
  134. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  135. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  136. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  137. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  138. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  139. package/dist/esm/salla-contacts.entry.js +1 -1
  140. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  141. package/dist/esm/salla-count-down.entry.js +1 -1
  142. package/dist/esm/salla-custom-fields.entry.js +1 -1
  143. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  144. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  145. package/dist/esm/salla-filters-widget.entry.js +1 -1
  146. package/dist/esm/salla-filters.entry.js +1 -1
  147. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  148. package/dist/esm/salla-gifting.entry.js +1 -1
  149. package/dist/esm/salla-hook.entry.js +1 -1
  150. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  151. package/dist/esm/salla-installment.entry.js +1 -1
  152. package/dist/esm/salla-list-tile.entry.js +1 -1
  153. package/dist/esm/salla-localization-modal.entry.js +1 -1
  154. package/dist/esm/salla-login-modal.entry.js +1 -1
  155. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  156. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  157. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  158. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  159. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  161. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  162. package/dist/esm/salla-loyalty.entry.js +1 -1
  163. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  164. package/dist/esm/salla-map.entry.js +1 -1
  165. package/dist/esm/salla-menu.entry.js +1 -1
  166. package/dist/esm/salla-metadata.entry.js +1 -1
  167. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  168. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  169. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  170. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  171. package/dist/esm/salla-notification-item.entry.js +1 -1
  172. package/dist/esm/salla-notifications.entry.js +1 -1
  173. package/dist/esm/salla-offer-modal.entry.js +1 -1
  174. package/dist/esm/salla-offer.entry.js +1 -1
  175. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  176. package/dist/esm/salla-order-details-options.entry.js +1 -1
  177. package/dist/esm/salla-order-details.entry.js +1 -1
  178. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  179. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  180. package/dist/esm/salla-order-edit.entry.js +1 -1
  181. package/dist/esm/salla-order-summary.entry.js +1 -1
  182. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  183. package/dist/esm/salla-orders.entry.js +1 -1
  184. package/dist/esm/salla-payments.entry.js +1 -1
  185. package/dist/esm/salla-placeholder.entry.js +1 -1
  186. package/dist/esm/salla-price-range.entry.js +1 -1
  187. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  188. package/dist/esm/salla-product-card_2.entry.js +1 -1
  189. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  190. package/dist/esm/salla-products-list.entry.js +1 -1
  191. package/dist/esm/salla-progress-bar.entry.js +1 -1
  192. package/dist/esm/salla-quick-order.entry.js +1 -1
  193. package/dist/esm/salla-rating-modal.entry.js +1 -1
  194. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  195. package/dist/esm/salla-scopes.entry.js +1 -1
  196. package/dist/esm/salla-search.entry.js +1 -1
  197. package/dist/esm/salla-skeleton.entry.js +1 -1
  198. package/dist/esm/salla-slider.entry.js +1 -1
  199. package/dist/esm/salla-social-share.entry.js +1 -1
  200. package/dist/esm/salla-social.entry.js +1 -1
  201. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  202. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  203. package/dist/esm/salla-tooltip.entry.js +1 -1
  204. package/dist/esm/salla-trust-badges.entry.js +1 -1
  205. package/dist/esm/salla-user-menu.entry.js +1 -1
  206. package/dist/esm/salla-user-profile.entry.js +1 -1
  207. package/dist/esm/salla-user-settings.entry.js +1 -1
  208. package/dist/esm/salla-verify.entry.js +1 -1
  209. package/dist/esm/salla-wallet.entry.js +1 -1
  210. package/dist/esm/{tracked-promise-DH7_DYgQ.js → tracked-promise-CPfI_VcX.js} +1 -1
  211. package/dist/esm/twilight.js +3 -3
  212. package/dist/esm/{vanilla-picker-NvsTGeIC.js → vanilla-picker-D6ctFQpu.js} +1 -1
  213. package/dist/twilight/{p-D1BtXmLB.js → p--sGcI7SX.js} +1 -1
  214. package/dist/twilight/{p-33369508.entry.js → p-01359d46.entry.js} +1 -1
  215. package/dist/twilight/{p-ba68d83b.entry.js → p-02668306.entry.js} +1 -1
  216. package/dist/twilight/{p-1184e75d.entry.js → p-02e4b3f7.entry.js} +1 -1
  217. package/dist/twilight/{p-9b14cfd6.entry.js → p-059a362b.entry.js} +1 -1
  218. package/dist/twilight/{p-4896533c.entry.js → p-082ac280.entry.js} +1 -1
  219. package/dist/twilight/{p-e96b8d47.entry.js → p-091ef563.entry.js} +1 -1
  220. package/dist/twilight/p-0bb2ae4a.entry.js +4 -0
  221. package/dist/twilight/{p-9d9da993.entry.js → p-0c2af75c.entry.js} +1 -1
  222. package/dist/twilight/{p-bca94624.entry.js → p-1090cced.entry.js} +1 -1
  223. package/dist/twilight/{p-3d7d52b9.entry.js → p-14319930.entry.js} +1 -1
  224. package/dist/twilight/{p-d36d4dd0.entry.js → p-1b028d1e.entry.js} +1 -1
  225. package/dist/twilight/{p-7f99f835.entry.js → p-1c8f540e.entry.js} +1 -1
  226. package/dist/twilight/{p-eec8f211.entry.js → p-1f98bb26.entry.js} +1 -1
  227. package/dist/twilight/{p-7988b7a5.entry.js → p-20d5f87f.entry.js} +1 -1
  228. package/dist/twilight/{p-5c07ab28.entry.js → p-224d3c26.entry.js} +1 -1
  229. package/dist/twilight/{p-a68644af.entry.js → p-26ef7b3c.entry.js} +1 -1
  230. package/dist/twilight/{p-c1ab6774.entry.js → p-2879b9ac.entry.js} +1 -1
  231. package/dist/twilight/{p-6a5e3e9b.entry.js → p-2b706f7e.entry.js} +1 -1
  232. package/dist/twilight/{p-cf3d3103.entry.js → p-3400cfe4.entry.js} +1 -1
  233. package/dist/twilight/{p-5395aed1.entry.js → p-34bea7ca.entry.js} +1 -1
  234. package/dist/twilight/{p-6ffe65f2.entry.js → p-37ad673f.entry.js} +1 -1
  235. package/dist/twilight/{p-eff611b9.entry.js → p-3829e7fb.entry.js} +1 -1
  236. package/dist/twilight/{p-77c69000.entry.js → p-436ff3dd.entry.js} +1 -1
  237. package/dist/twilight/{p-57a86efd.entry.js → p-4b061d3d.entry.js} +1 -1
  238. package/dist/twilight/{p-f83a4131.entry.js → p-4c67cd2d.entry.js} +1 -1
  239. package/dist/twilight/{p-120ca46f.entry.js → p-4f9a39de.entry.js} +1 -1
  240. package/dist/twilight/{p-5e4a9088.entry.js → p-5165a1aa.entry.js} +1 -1
  241. package/dist/twilight/{p-53b1b8dd.entry.js → p-53c543c6.entry.js} +1 -1
  242. package/dist/twilight/{p-40ea40b7.entry.js → p-56c33728.entry.js} +1 -1
  243. package/dist/twilight/{p-3160ed65.entry.js → p-5851ae3f.entry.js} +1 -1
  244. package/dist/twilight/{p-3feb7ca8.entry.js → p-58d38f43.entry.js} +1 -1
  245. package/dist/twilight/{p-bac02561.entry.js → p-5cd566f6.entry.js} +1 -1
  246. package/dist/twilight/{p-c8ad8625.entry.js → p-5ce3a659.entry.js} +1 -1
  247. package/dist/twilight/{p-ff148d38.entry.js → p-6446fca2.entry.js} +1 -1
  248. package/dist/twilight/{p-81362474.entry.js → p-66026d3b.entry.js} +1 -1
  249. package/dist/twilight/{p-368d6551.entry.js → p-66fc6ca0.entry.js} +1 -1
  250. package/dist/twilight/{p-4c69d380.entry.js → p-69824501.entry.js} +1 -1
  251. package/dist/twilight/{p-446bfa5f.entry.js → p-6bd2e89b.entry.js} +1 -1
  252. package/dist/twilight/p-6e60ba3f.entry.js +4 -0
  253. package/dist/twilight/{p-1726199f.entry.js → p-72770a46.entry.js} +1 -1
  254. package/dist/twilight/{p-b9922101.entry.js → p-76dbef2b.entry.js} +1 -1
  255. package/dist/twilight/{p-771ca405.entry.js → p-77020583.entry.js} +1 -1
  256. package/dist/twilight/{p-84daf1b1.entry.js → p-7a80b4d6.entry.js} +1 -1
  257. package/dist/twilight/{p-db9d3135.entry.js → p-80ac1d80.entry.js} +1 -1
  258. package/dist/twilight/{p-bf7f213d.entry.js → p-87593f7e.entry.js} +1 -1
  259. package/dist/twilight/{p-380c9f58.entry.js → p-8ab015d1.entry.js} +1 -1
  260. package/dist/twilight/{p-46301bdd.entry.js → p-8bbe9a50.entry.js} +1 -1
  261. package/dist/twilight/{p-4508f1ad.entry.js → p-8bd255f1.entry.js} +1 -1
  262. package/dist/twilight/{p-3649da70.entry.js → p-8c06c63a.entry.js} +1 -1
  263. package/dist/twilight/{p-f011898b.entry.js → p-9b9851cc.entry.js} +1 -1
  264. package/dist/twilight/{p-dabf3edb.entry.js → p-9f09fd9c.entry.js} +1 -1
  265. package/dist/twilight/{p-bd790b16.entry.js → p-9f7d63e8.entry.js} +1 -1
  266. package/dist/twilight/{p-033c9e98.entry.js → p-9fff0a8c.entry.js} +1 -1
  267. package/dist/twilight/{p-CrNw20pf.js → p-BAOl7AJU.js} +1 -1
  268. package/dist/twilight/{p-Cb-27f78.js → p-BjvOwYKG.js} +1 -1
  269. package/dist/twilight/p-BkPzCq-C.js +4 -0
  270. package/dist/twilight/{p-SRRlvI95.js → p-C2ha2a9w.js} +1 -1
  271. package/dist/twilight/{p-CcwaGQ9_.js → p-COOk2-xF.js} +1 -1
  272. package/dist/twilight/{p-BGYOHdWO.js → p-CiN9P6Vs.js} +1 -1
  273. package/dist/twilight/{p-CzMGWnoB.js → p-CjFUdilz.js} +1 -1
  274. package/dist/twilight/{p-C0GYDeEy.js → p-DAZuaKqm.js} +1 -1
  275. package/dist/twilight/{p-Cq2l9LEk.js → p-DrBLhfjt.js} +1 -1
  276. package/dist/twilight/{p-3bfc8662.entry.js → p-a07f60cc.entry.js} +1 -1
  277. package/dist/twilight/{p-f7376365.entry.js → p-a16e2ac6.entry.js} +1 -1
  278. package/dist/twilight/{p-82fdf4e7.entry.js → p-a2a8fe83.entry.js} +1 -1
  279. package/dist/twilight/{p-2eb7be80.entry.js → p-a3868737.entry.js} +1 -1
  280. package/dist/twilight/{p-084a6e4a.entry.js → p-a64f0aff.entry.js} +1 -1
  281. package/dist/twilight/p-a83d78fb.entry.js +1019 -0
  282. package/dist/twilight/{p-fc540bfc.entry.js → p-ac57e992.entry.js} +1 -1
  283. package/dist/twilight/{p-42d531d7.entry.js → p-ac9bf5bf.entry.js} +1 -1
  284. package/dist/twilight/{p-1633e09a.entry.js → p-acf12c83.entry.js} +1 -1
  285. package/dist/twilight/{p-886d3ea9.entry.js → p-afd1364b.entry.js} +1 -1
  286. package/dist/twilight/{p-1a624e8e.entry.js → p-b0a99b96.entry.js} +1 -1
  287. package/dist/twilight/{p-c5e14a6d.entry.js → p-b2069f14.entry.js} +1 -1
  288. package/dist/twilight/{p-7679487d.entry.js → p-b42c7823.entry.js} +1 -1
  289. package/dist/twilight/{p-942e5b3e.entry.js → p-b6661dd0.entry.js} +1 -1
  290. package/dist/twilight/{p-2fea82d1.entry.js → p-b929dda0.entry.js} +1 -1
  291. package/dist/twilight/{p-f0320140.entry.js → p-b9385507.entry.js} +1 -1
  292. package/dist/twilight/{p-20ca668a.entry.js → p-bb4205bf.entry.js} +1 -1
  293. package/dist/twilight/{p-09a25c7b.entry.js → p-bec9d32a.entry.js} +1 -1
  294. package/dist/twilight/{p-2774b070.entry.js → p-c69e79ac.entry.js} +1 -1
  295. package/dist/twilight/{p-1fe09ed1.entry.js → p-c82f5b3f.entry.js} +1 -1
  296. package/dist/twilight/{p-d62d8969.entry.js → p-caaff989.entry.js} +1 -1
  297. package/dist/twilight/{p-83b70db5.entry.js → p-d18cb38a.entry.js} +1 -1
  298. package/dist/twilight/{p-9b225829.entry.js → p-d1cabb89.entry.js} +1 -1
  299. package/dist/twilight/{p-4818c549.entry.js → p-db744497.entry.js} +1 -1
  300. package/dist/twilight/{p-a22fd70d.entry.js → p-e0bf3d3e.entry.js} +1 -1
  301. package/dist/twilight/{p-f47cd970.entry.js → p-e632fbe1.entry.js} +1 -1
  302. package/dist/twilight/{p-e034fe03.entry.js → p-e6f50fda.entry.js} +1 -1
  303. package/dist/twilight/{p-50fd3bb0.entry.js → p-e725ca51.entry.js} +1 -1
  304. package/dist/twilight/{p-c42fd7ea.entry.js → p-ea1f6f62.entry.js} +1 -1
  305. package/dist/twilight/{p-4b9070f7.entry.js → p-eb9802ec.entry.js} +1 -1
  306. package/dist/twilight/{p-36b79398.entry.js → p-eeb759a2.entry.js} +1 -1
  307. package/dist/twilight/{p-13160d7a.entry.js → p-f13ab7c3.entry.js} +1 -1
  308. package/dist/twilight/{p-00a2d304.entry.js → p-f9a6bd74.entry.js} +1 -1
  309. package/dist/twilight/{p-oPliK7PL.js → p-fngctMOB.js} +1 -1
  310. package/dist/twilight/{p-BZ_8M_tQ.js → p-nNw4abgW.js} +1 -1
  311. package/dist/twilight/{p-DD5p3dqh.js → p-saXA_VGx.js} +1 -1
  312. package/dist/twilight/twilight.esm.js +1 -1
  313. package/dist/types/components/salla-bullet-delivery/api-service.d.ts +1 -0
  314. package/dist/types/components/salla-bullet-delivery/helpers.d.ts +3 -0
  315. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +3 -0
  316. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +23 -1
  317. package/package.json +8 -5
  318. package/dist/twilight/p-94d03d81.entry.js +0 -4
  319. package/dist/twilight/p-a09eb593.entry.js +0 -4
  320. package/dist/twilight/p-d86fb5f9.entry.js +0 -4
@@ -195,6 +195,12 @@ export const bulletDeliveryAPI = {
195
195
  return { success: false, error: err?.response?.data != null ? errMsg(err.response.data) : (err?.message ?? 'Unknown error') };
196
196
  }
197
197
  },
198
+ async getAddressToken() {
199
+ return withApiErrorHandling(async () => {
200
+ const res = await salla.api.request('address/autocomplete-token');
201
+ return res?.data?.token ?? null;
202
+ }, null, 'Error fetching address autocomplete token');
203
+ },
198
204
  };
199
205
  export function clearApiCache() {
200
206
  apiCache.clear();
@@ -90,7 +90,7 @@ export const requireRegionAndDistrictForSA = (countryCode, regionId, districtIdO
90
90
  ? true
91
91
  : (regionId != null && Number(regionId) !== 0) && (districtIdOrName != null && (typeof districtIdOrName === 'number' ? districtIdOrName !== 0 : String(districtIdOrName).trim().length > 0));
92
92
  export function buildAddressLocationPayloadFromSelection(options) {
93
- const { countryId, countryCode, regionId, cityId, districtId, description = '' } = options;
93
+ const { countryId, countryCode, regionId, cityId, districtId, description = '', lat, lng, shortAddress } = options;
94
94
  const desc = description || '';
95
95
  return {
96
96
  country_id: Number(countryId) || undefined,
@@ -99,6 +99,8 @@ export function buildAddressLocationPayloadFromSelection(options) {
99
99
  district_id: districtId != null ? Number(districtId) : undefined,
100
100
  description: desc,
101
101
  ...(countryCode && isSaudiArabia(countryCode) && { local: desc }),
102
+ ...(lat != null && lng != null && { lat, lng }),
103
+ ...(shortAddress && { short_address: shortAddress }),
102
104
  };
103
105
  }
104
106
  const GEO_ERROR_MESSAGES = {
@@ -16,6 +16,134 @@
16
16
  overflow: visible !important;
17
17
  }
18
18
 
19
+ .s-bullet-delivery-map-container {
20
+ width: 100%;
21
+ height: 450px;
22
+ border-radius: 8px;
23
+ overflow: hidden;
24
+ margin-bottom: 12px;
25
+ }
26
+ .s-bullet-delivery-map-container gmap-map {
27
+ display: block;
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+
32
+ .s-bullet-delivery-address-confirm {
33
+ display: flex;
34
+ flex-direction: column;
35
+ gap: 20px;
36
+ padding: 0 24px;
37
+ }
38
+
39
+ .s-bullet-delivery-address-confirm-card {
40
+ display: flex;
41
+ align-items: flex-start;
42
+ gap: 12px;
43
+ }
44
+
45
+ .s-bullet-delivery-address-confirm-edit {
46
+ border: 1px solid #eee;
47
+ border-radius: 8px;
48
+ padding: 6px 12px;
49
+ font-size: 12px;
50
+ font-weight: 500;
51
+ line-height: 1;
52
+ color: #333;
53
+ background: white;
54
+ cursor: pointer;
55
+ white-space: nowrap;
56
+ height: 32px;
57
+ flex-shrink: 0;
58
+ align-self: center;
59
+ display: inline-flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ }
63
+
64
+ .s-bullet-delivery-address-confirm-details {
65
+ display: flex;
66
+ flex-direction: column;
67
+ align-items: flex-start;
68
+ gap: 4px;
69
+ flex: 1;
70
+ min-width: 0;
71
+ }
72
+
73
+ .s-bullet-delivery-address-confirm-label {
74
+ font-size: 12px;
75
+ color: #666;
76
+ }
77
+
78
+ .s-bullet-delivery-address-confirm-text {
79
+ font-size: 14px;
80
+ font-weight: 700;
81
+ color: #333;
82
+ margin: 0;
83
+ word-break: break-word;
84
+ }
85
+
86
+ .s-bullet-delivery-address-confirm-tag {
87
+ display: inline-flex;
88
+ align-items: center;
89
+ gap: 4px;
90
+ border: 1px solid #eee;
91
+ border-radius: 140px;
92
+ padding: 4px 8px;
93
+ font-size: 12px;
94
+ color: #333;
95
+ margin-top: 4px;
96
+ }
97
+
98
+ .s-bullet-delivery-address-confirm-tag-icon {
99
+ width: 9px;
100
+ display: inline-flex;
101
+ flex-shrink: 0;
102
+ }
103
+ .s-bullet-delivery-address-confirm-tag-icon svg {
104
+ width: 100%;
105
+ height: 100%;
106
+ }
107
+
108
+ .s-bullet-delivery-address-confirm-description {
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: 8px;
112
+ }
113
+
114
+ .s-bullet-delivery-address-confirm-description-label {
115
+ font-size: 14px;
116
+ font-weight: 500;
117
+ color: #444;
118
+ }
119
+
120
+ .s-bullet-delivery-address-confirm-description-optional {
121
+ font-weight: 400;
122
+ color: #999;
123
+ margin-inline-start: 4px;
124
+ }
125
+
126
+ .s-bullet-delivery-address-confirm-description-input {
127
+ width: 100%;
128
+ border: 1px solid #eee;
129
+ border-radius: 8px;
130
+ padding: 10px 12px;
131
+ font-size: 14px;
132
+ }
133
+
134
+ .s-bullet-delivery-login-prompt {
135
+ display: block;
136
+ width: 100%;
137
+ text-align: center;
138
+ background: none;
139
+ border: none;
140
+ color: var(--color-primary, #004956);
141
+ font-size: 14px;
142
+ font-weight: 500;
143
+ cursor: pointer;
144
+ padding: 12px 0;
145
+ }
146
+
19
147
  @keyframes s-bullet-delivery-fade-in {
20
148
  from {
21
149
  opacity: 0;
@@ -6,11 +6,12 @@ import { bulletDeliveryAPI, clearApiCache, isSaudiArabia } from "./api-service";
6
6
  import { buildAddressLocationPayloadFromSelection, filterBranches, findNearestBranch, formatWorkingHoursDisplay, getBranchFirstSlot, getGeolocationErrorMessage, getIntentBranchId, getIntentCityId, getIntentCountryCode, getIntentCountryId, getIntentDistrictId, getIntentLatitude, getIntentLongitude, getIntentRegionId, getIntentSubtitle, hasSessionAddressIntent, requireRegionAndDistrictForSA, } from "./helpers";
7
7
  const BRANCH_SEARCH_DEBOUNCE_MS = 1000;
8
8
  const GEOLOCATION_TIMEOUT = 10000;
9
+ import { load } from "@salla.sa/ui-google-map-render";
10
+ import "@salla.sa/ui-google-map-render";
9
11
  import GetDirections from "../../assets/svg/get-directions.svg";
10
12
  import GPS from "../../assets/svg/gps.svg";
11
- import ArrowLeft from "../../assets/svg/keyboard_arrow_left.svg";
12
- import ArrowRight from "../../assets/svg/keyboard_arrow_right.svg";
13
13
  import Location from "../../assets/svg/location.svg";
14
+ import LocationTag from "../../assets/svg/location-tag.svg";
14
15
  import MiniMap from "../../assets/svg/mini-map.svg";
15
16
  import Search from "../../assets/svg/search.svg";
16
17
  import Store from "../../assets/svg/store3.svg";
@@ -62,6 +63,7 @@ export class SallaBulletDelivery {
62
63
  this.bulletDeliveryMobileSelectHandler = null;
63
64
  /** True after saved addresses have been loaded (lazy: only when address tab is shown). */
64
65
  this.savedAddressesLoaded = false;
66
+ this.gmapRef = null;
65
67
  // Core state
66
68
  this.activeTab = "address";
67
69
  this.isLoggedIn = false;
@@ -112,6 +114,13 @@ export class SallaBulletDelivery {
112
114
  this.displayedDistricts = [];
113
115
  /** Shown when scopes/allocation returns 422 (address outside delivery coverage). Only on delivery tab. */
114
116
  this.allocationOutOfCoverageMessage = null;
117
+ // Map state
118
+ this.mapLocationData = null;
119
+ this.addressToken = null;
120
+ this.loadingToken = false;
121
+ this.mapReady = false;
122
+ this.mapStep = 'map';
123
+ this.addressDescription = '';
115
124
  this.newAddressForm = {
116
125
  ...SallaBulletDelivery.INITIAL_ADDRESS_FORM,
117
126
  };
@@ -186,6 +195,28 @@ export class SallaBulletDelivery {
186
195
  this.displayedDistricts = this.districts;
187
196
  this.searchingDistricts = false;
188
197
  };
198
+ this.handleMapLocationChanged = (event) => {
199
+ const detail = event.detail;
200
+ if (!detail?.position?.lat || !detail?.position?.lng)
201
+ return;
202
+ this.mapLocationData = {
203
+ lat: detail.position.lat,
204
+ lng: detail.position.lng,
205
+ shortAddress: detail.place?.placeId ?? detail.place?.place_id ?? undefined,
206
+ formattedAddress: detail.place?.formattedAddress ?? detail.place?.formatted_address ?? undefined,
207
+ };
208
+ setTimeout(() => {
209
+ const marker = this.gmapRef?.locationMarker;
210
+ if (marker)
211
+ marker.gmpDraggable = false;
212
+ }, 100);
213
+ };
214
+ this.handleMapReady = () => {
215
+ this.mapReady = true;
216
+ if (this.gmapRef && typeof this.gmapRef.resize === 'function') {
217
+ this.gmapRef.resize();
218
+ }
219
+ };
189
220
  /**
190
221
  * Submit add-address form: create address via API then switch back to list.
191
222
  */
@@ -193,9 +224,12 @@ export class SallaBulletDelivery {
193
224
  e.preventDefault();
194
225
  if (this.savingAddress)
195
226
  return;
196
- if (!this.selectedCountry || !this.selectedCity)
227
+ const hasMap = this.hasMapLocation();
228
+ const hasDropdowns = this.selectedCountry && this.selectedCity;
229
+ if (!hasMap && !hasDropdowns)
197
230
  return;
198
- if (!requireRegionAndDistrictForSA(this.selectedCountry?.code, this.selectedRegion?.id, this.selectedDistrict?.id ?? (this.districtName?.trim() || null)))
231
+ if (!hasMap &&
232
+ !requireRegionAndDistrictForSA(this.selectedCountry?.code, this.selectedRegion?.id, this.selectedDistrict?.id ?? (this.districtName?.trim() || null)))
199
233
  return;
200
234
  this.savingAddress = true;
201
235
  try {
@@ -211,14 +245,29 @@ export class SallaBulletDelivery {
211
245
  this.addressCreated.emit({ address: latest });
212
246
  this.viewMode = "main";
213
247
  this.districtName = "";
248
+ this.mapLocationData = null;
249
+ this.mapStep = 'map';
250
+ this.addressDescription = '';
214
251
  }
215
252
  else {
216
- Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
253
+ if (!this.isLoggedIn) {
254
+ Salla.notify?.error(Salla.lang.get('pages.checkout.login_to_use_saved_addresses'));
255
+ this.handleLogin();
256
+ }
257
+ else {
258
+ Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
259
+ }
217
260
  }
218
261
  }
219
262
  catch (error) {
220
263
  console.error("SallaBulletDelivery: Error saving address", error);
221
- Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
264
+ if (!this.isLoggedIn) {
265
+ Salla.notify?.error(Salla.lang.get('pages.checkout.login_to_use_saved_addresses'));
266
+ this.handleLogin();
267
+ }
268
+ else {
269
+ Salla.notify?.error(Salla.lang.get("common.errors.error_occurred"));
270
+ }
222
271
  }
223
272
  finally {
224
273
  this.savingAddress = false;
@@ -329,6 +378,8 @@ export class SallaBulletDelivery {
329
378
  else {
330
379
  this.activeTab = "address";
331
380
  }
381
+ // Fetch address token for map (fire-and-forget, non-blocking)
382
+ this.fetchAddressToken();
332
383
  // Load countries always; load saved addresses only when address tab is active (lazy tab data).
333
384
  if (this.isLoggedIn && this.activeTab === "address") {
334
385
  this.loadingSavedAddresses = true;
@@ -1055,6 +1106,8 @@ export class SallaBulletDelivery {
1055
1106
  */
1056
1107
  async handleAddNewAddress() {
1057
1108
  this.viewMode = "add-address";
1109
+ this.mapLocationData = null;
1110
+ this.fetchAddressToken();
1058
1111
  const intent = this.getStoredIntent();
1059
1112
  const sessionCountryId = getIntentCountryId(intent);
1060
1113
  if (sessionCountryId && this.countries.length > 0) {
@@ -1073,11 +1126,56 @@ export class SallaBulletDelivery {
1073
1126
  }
1074
1127
  handleBackToAddressList() {
1075
1128
  this.viewMode = "main";
1129
+ this.mapLocationData = null;
1130
+ this.mapStep = 'map';
1131
+ this.addressDescription = '';
1132
+ }
1133
+ // ─── Map methods ───
1134
+ async fetchAddressToken() {
1135
+ if (this.addressToken || this.loadingToken)
1136
+ return;
1137
+ this.loadingToken = true;
1138
+ try {
1139
+ const mapsKey = salla.config.get('store.settings.keys.maps');
1140
+ if (mapsKey) {
1141
+ load({
1142
+ key: mapsKey,
1143
+ libraries: ['marker', 'places'],
1144
+ language: salla.config.get('user.language_code') || 'ar',
1145
+ }).catch(err => log('Failed to load Google Maps SDK', err));
1146
+ }
1147
+ this.addressToken = await bulletDeliveryAPI.getAddressToken();
1148
+ }
1149
+ catch {
1150
+ log('SallaBulletDelivery: Failed to fetch address token');
1151
+ }
1152
+ finally {
1153
+ this.loadingToken = false;
1154
+ }
1155
+ }
1156
+ hasMapLocation() {
1157
+ return this.mapLocationData?.lat != null && this.mapLocationData?.lng != null;
1158
+ }
1159
+ // TODO: replace with actual setting key once dashboard setting is built
1160
+ get isMapSettingEnabled() {
1161
+ return Salla.config.get('store.settings.bullet_delivery.settings.map_enabled');
1076
1162
  }
1163
+ get isMapModeAvailable() {
1164
+ return this.isMapSettingEnabled && !!salla.config.get('store.settings.keys.maps') && !!this.addressToken;
1165
+ }
1166
+ // ─── End Map methods ───
1077
1167
  /**
1078
1168
  * Build address/location payload from guest-form state (same fields as add-address).
1079
1169
  */
1080
1170
  buildAddressLocationPayload() {
1171
+ if (this.isMapModeAvailable && this.hasMapLocation()) {
1172
+ return {
1173
+ lat: this.mapLocationData.lat,
1174
+ lng: this.mapLocationData.lng,
1175
+ ...(this.mapLocationData.shortAddress && { short_address: this.mapLocationData.shortAddress }),
1176
+ ...(this.addressDescription?.trim() && { description: this.addressDescription.trim() }),
1177
+ };
1178
+ }
1081
1179
  const districtName = this.selectedDistrict?.name ?? this.districtName?.trim() ?? "";
1082
1180
  return buildAddressLocationPayloadFromSelection({
1083
1181
  countryId: this.selectedCountry?.id ?? 0,
@@ -1086,6 +1184,9 @@ export class SallaBulletDelivery {
1086
1184
  cityId: this.selectedCity?.id,
1087
1185
  districtId: this.selectedDistrict?.id,
1088
1186
  description: districtName,
1187
+ lat: this.mapLocationData?.lat,
1188
+ lng: this.mapLocationData?.lng,
1189
+ shortAddress: this.mapLocationData?.shortAddress,
1089
1190
  });
1090
1191
  }
1091
1192
  async handleTabChange(tab) {
@@ -1094,6 +1195,9 @@ export class SallaBulletDelivery {
1094
1195
  this.tabChanging = true;
1095
1196
  try {
1096
1197
  this.activeTab = tab;
1198
+ if (this.viewMode === 'add-address') {
1199
+ this.viewMode = 'main';
1200
+ }
1097
1201
  this.showCartWillBeClearedBanner = false;
1098
1202
  this.allocationOutOfCoverageMessage = null;
1099
1203
  this.resetSearchState();
@@ -1839,7 +1943,21 @@ export class SallaBulletDelivery {
1839
1943
  }
1840
1944
  } }, h("input", { type: "radio", name: "saved_address", class: "s-bullet-delivery-radio", checked: selected, disabled: disabled, onClick: (e) => e.stopPropagation() }), 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)))));
1841
1945
  }
1946
+ renderMapSection() {
1947
+ const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
1948
+ return (h("div", { class: "s-bullet-delivery-map-container" }, h("gmap-map", { ref: (el) => (this.gmapRef = el), zoom: 16, "map-id": "DEMO_MAP_ID", "enable-autocomplete": true, "enable-geolocation": true, "show-location-marker": true, language: Salla.lang.getLocale?.() ?? document.documentElement.lang ?? 'ar', "geolocation-button-label": Salla.lang.get('pages.checkout.current_location'), "autocomplete-placeholder": Salla.lang.get('pages.checkout.search_for_address'), "autocomplete-hint": isSA ? Salla.lang.get('pages.checkout.short_address_format_validation') : undefined, "autocomplete-country": this.selectedCountry?.code?.toLowerCase(), "autocomplete-resolve": false, "autocomplete-auth-token": this.addressToken, "location-marker-background": "#4285F4", "location-marker-border-color": "#1967D2", "location-marker-glyph-color": "#FFFFFF", "location-marker-scale": 1.3, "onGmap-location-changed": this.handleMapLocationChanged, "onGmap-ready": this.handleMapReady })));
1949
+ }
1950
+ renderAddressConfirmation() {
1951
+ const address = this.mapLocationData?.formattedAddress ?? '';
1952
+ const shortCode = this.mapLocationData?.shortAddress;
1953
+ return (h("div", { class: "s-bullet-delivery-address-confirm" }, h("div", { class: "s-bullet-delivery-address-confirm-card" }, h("div", { class: "s-bullet-delivery-address-confirm-details" }, h("span", { class: "s-bullet-delivery-address-confirm-label" }, Salla.lang.get('pages.checkout.selected_address')), h("p", { class: "s-bullet-delivery-address-confirm-text" }, address), shortCode && (h("span", { class: "s-bullet-delivery-address-confirm-tag" }, shortCode, h("span", { class: "s-bullet-delivery-address-confirm-tag-icon", innerHTML: LocationTag })))), h("button", { type: "button", class: "s-bullet-delivery-address-confirm-edit", onClick: () => { this.mapStep = 'map'; } }, Salla.lang.get('common.elements.edit'))), h("div", { class: "s-bullet-delivery-address-confirm-description" }, h("label", { class: "s-bullet-delivery-address-confirm-description-label" }, Salla.lang.get('pages.checkout.address_description'), h("span", { class: "s-bullet-delivery-address-confirm-description-optional" }, Salla.lang.get('common.elements.optional'))), h("input", { type: "text", class: "s-bullet-delivery-address-confirm-description-input form-input", placeholder: Salla.lang.get('pages.checkout.address_description_placeholder'), value: this.addressDescription, onInput: (e) => { this.addressDescription = e.target.value; } }))));
1954
+ }
1842
1955
  renderGuestDeliveryForm() {
1956
+ if (this.isMapModeAvailable) {
1957
+ return this.mapStep === 'confirm' && this.hasMapLocation()
1958
+ ? this.renderAddressConfirmation()
1959
+ : this.renderMapSection();
1960
+ }
1843
1961
  const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
1844
1962
  return [
1845
1963
  this.renderCountrySelect(),
@@ -1854,7 +1972,28 @@ export class SallaBulletDelivery {
1854
1972
  "s-hidden": this.activeTab !== "address",
1855
1973
  } }, this.isLoggedIn
1856
1974
  ? this.renderSavedAddresses()
1857
- : this.renderGuestDeliveryForm()));
1975
+ : this.renderGuestDeliveryContent()));
1976
+ }
1977
+ renderGuestDeliveryContent() {
1978
+ if (!this.isMapModeAvailable) {
1979
+ return this.renderGuestDeliveryForm();
1980
+ }
1981
+ const hasMapLoc = this.hasMapLocation();
1982
+ const isConfirmStep = this.mapStep === 'confirm' && hasMapLoc;
1983
+ const submitLabel = isConfirmStep
1984
+ ? (this.savingAddress
1985
+ ? Salla.lang.get("pages.checkout.loading")
1986
+ : Salla.lang.get("pages.checkout.confirm_address"))
1987
+ : Salla.lang.get('pages.checkout.confirm_location');
1988
+ const handleSubmit = (e) => {
1989
+ e.preventDefault();
1990
+ if (!isConfirmStep && hasMapLoc) {
1991
+ this.mapStep = 'confirm';
1992
+ return;
1993
+ }
1994
+ this.handleSubmitAddAddress(e);
1995
+ };
1996
+ return (h("form", { onSubmit: handleSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single", style: { padding: '24px' } }, h("salla-button", { type: "submit", loading: this.savingAddress, disabled: !hasMapLoc || this.savingAddress, width: "wide" }, submitLabel), !this.isLoggedIn && (h("button", { type: "button", class: "s-bullet-delivery-login-prompt", onClick: () => this.handleLogin() }, Salla.lang.get('pages.checkout.login_to_use_saved_addresses'))))));
1858
1997
  }
1859
1998
  renderBranchSearch() {
1860
1999
  return (h("div", { class: "s-bullet-delivery-branch-search" }, h("div", { class: "s-bullet-delivery-search-row" }, h("div", { class: "s-bullet-delivery-search s-bullet-delivery-branch-search-wrap" }, h("span", { class: "s-bullet-delivery-search-icon s-bullet-delivery-branch-search-icon", innerHTML: Search, "aria-hidden": "true" }), h("input", { type: "text", class: "s-bullet-delivery-branch-search-input form-input", placeholder: Salla.lang.get("pages.checkout.search_for_city_or_branch"), value: this.branchSearchQuery, onInput: (e) => this.handleBranchSearch(e), autocomplete: "off" })), h("button", { type: "button", class: {
@@ -1893,23 +2032,53 @@ export class SallaBulletDelivery {
1893
2032
  "s-hidden": this.activeTab !== "branch",
1894
2033
  } }, this.renderCountrySelect(), this.renderBranchSearch(), this.renderBranchList()));
1895
2034
  }
1896
- /** Add-address form: same fields as guest form (country, region, city, district) only. */
2035
+ /** Add-address form: map two-step flow or dropdown fallback. */
1897
2036
  renderAddAddressForm() {
1898
2037
  const title = Salla.lang.get("pages.checkout.add_new_address");
2038
+ const mapMode = this.isMapModeAvailable;
1899
2039
  const isSA = isSaudiArabia(this.selectedCountry?.code ?? '');
1900
- const canSubmit = this.selectedCountry &&
1901
- this.selectedCity &&
1902
- (!isSA || this.selectedRegion) &&
1903
- (!isSA ||
1904
- !!this.selectedDistrict ||
1905
- !!(this.districtName && this.districtName.trim().length > 0));
1906
- const submitLabel = this.savingAddress
1907
- ? Salla.lang.get("pages.checkout.loading")
1908
- : Salla.lang.get("pages.checkout.confirm_address");
2040
+ const hasMapLoc = this.hasMapLocation();
2041
+ let canSubmit;
2042
+ let submitLabel;
2043
+ if (mapMode) {
2044
+ if (this.mapStep === 'map') {
2045
+ canSubmit = hasMapLoc;
2046
+ submitLabel = Salla.lang.get('pages.checkout.confirm_location');
2047
+ }
2048
+ else {
2049
+ canSubmit = hasMapLoc;
2050
+ submitLabel = this.savingAddress
2051
+ ? Salla.lang.get("pages.checkout.loading")
2052
+ : Salla.lang.get("pages.checkout.confirm_address");
2053
+ }
2054
+ }
2055
+ else {
2056
+ const canSubmitDropdowns = this.selectedCountry &&
2057
+ this.selectedCity &&
2058
+ (!isSA || this.selectedRegion) &&
2059
+ (!isSA ||
2060
+ !!this.selectedDistrict ||
2061
+ !!(this.districtName && this.districtName.trim().length > 0));
2062
+ canSubmit = hasMapLoc || canSubmitDropdowns;
2063
+ submitLabel = this.savingAddress
2064
+ ? Salla.lang.get("pages.checkout.loading")
2065
+ : Salla.lang.get("pages.checkout.confirm_address");
2066
+ }
1909
2067
  const hasAddressesToGoBack = this.savedAddresses.length > 0 || hasSessionAddressIntent(this.getStoredIntent());
1910
- return (h("div", { class: "s-bullet-delivery-add-address" }, h("div", { class: "s-bullet-delivery-add-address-header" }, hasAddressesToGoBack ? (h("button", { type: "button", class: "s-bullet-delivery-add-address-title", onClick: () => this.handleBackToAddressList(), onKeyDown: (e) => e.key === "Enter" && this.handleBackToAddressList() }, h("span", { innerHTML: this.isRTL ? ArrowRight : ArrowLeft, "aria-hidden": "true" }), h("span", { class: "s-bullet-delivery-add-address-title-text" }, title))) : (h("span", { class: "s-bullet-delivery-add-address-title" }, h("span", { class: "s-bullet-delivery-add-address-title-text" }, title)))), h("form", { class: "s-bullet-delivery-add-address-form", onSubmit: (e) => this.handleSubmitAddAddress(e) }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single" }, h("salla-button", { type: "submit", loading: this.savingAddress, disabled: !canSubmit || this.savingAddress, class: "s-bullet-delivery-add-address-submit" }, submitLabel)))));
2068
+ const handleFormSubmit = (e) => {
2069
+ e.preventDefault();
2070
+ if (mapMode && this.mapStep === 'map' && hasMapLoc) {
2071
+ this.mapStep = 'confirm';
2072
+ return;
2073
+ }
2074
+ this.handleSubmitAddAddress(e);
2075
+ };
2076
+ return (h("div", { class: "s-bullet-delivery-add-address" }, h("form", { class: "s-bullet-delivery-add-address-form", onSubmit: handleFormSubmit }, this.renderGuestDeliveryForm(), h("div", { class: "s-bullet-delivery-form-actions s-bullet-delivery-form-actions--single" }, h("salla-button", { type: "submit", loading: this.savingAddress, disabled: !canSubmit || this.savingAddress, class: "s-bullet-delivery-add-address-submit" }, submitLabel)))));
1911
2077
  }
1912
2078
  renderFooter() {
2079
+ if (this.activeTab === "address" && !this.isLoggedIn && this.isMapModeAvailable) {
2080
+ return null;
2081
+ }
1913
2082
  const showAddAddressInFooter = this.activeTab === "address" && this.isLoggedIn;
1914
2083
  return (h("div", { class: "s-bullet-delivery-footer" }, h("salla-button", { ref: (btn) => {
1915
2084
  this.confirmBtn = btn;
@@ -1925,7 +2094,7 @@ export class SallaBulletDelivery {
1925
2094
  const activeTabView = this.activeTab === "branch" && this.supportsPickup
1926
2095
  ? this.renderPickupTab()
1927
2096
  : this.renderDeliveryTab();
1928
- return (h("div", null, h("div", { class: "s-bullet-delivery-header" }, h("h2", { class: "s-bullet-delivery-title" }, this.activeTab === 'address' ? Salla.lang.get('blocks.home.add_address_for_order_delivery') : Salla.lang.get('blocks.home.how_prefer_to_receive_order')), h("p", { class: "s-bullet-delivery-subtitle" }, this.activeTab === 'address' ? Salla.lang.get('blocks.home.products_available_for_delivery_shown_while_shopping') : Salla.lang.get('blocks.home.products_available_for_delivery_or_pickup_shown_while_shopping'))), this.renderTabs(), this.showCartWillBeClearedBanner &&
2097
+ return (h("div", null, this.showCartWillBeClearedBanner &&
1929
2098
  this.renderAlert(Salla.lang.get("blocks.scope.empty_cart_warning")), this.allocationOutOfCoverageMessage &&
1930
2099
  this.renderAllocationOutOfCoverageAlert(), activeTabView, !isAddressEmptyState && this.renderFooter()));
1931
2100
  }
@@ -2054,7 +2223,7 @@ export class SallaBulletDelivery {
2054
2223
  return null;
2055
2224
  return (h(Host, { class: "s-bullet-delivery" }, h("salla-modal", { ref: (modal) => {
2056
2225
  this.modal = modal;
2057
- }, isClosable: !this.isRequired && !this.shouldForceNonClosable(), class: "s-bullet-delivery-modal", width: "sm" }, h("div", { class: "s-bullet-delivery-inner" }, this.viewMode === "main" && this.renderMainView(), this.viewMode === "add-address" && this.renderAddAddressForm()))));
2226
+ }, isClosable: !this.isRequired && !this.shouldForceNonClosable(), class: "s-bullet-delivery-modal", width: "sm" }, h("div", { class: "s-bullet-delivery-inner" }, h("div", { class: "s-bullet-delivery-header" }, h("h2", { class: "s-bullet-delivery-title" }, this.activeTab === 'address' ? Salla.lang.get('blocks.home.add_address_for_order_delivery') : Salla.lang.get('blocks.home.how_prefer_to_receive_order')), h("p", { class: "s-bullet-delivery-subtitle" }, this.activeTab === 'address' ? Salla.lang.get('blocks.home.products_available_for_delivery_shown_while_shopping') : Salla.lang.get('blocks.home.products_available_for_delivery_or_pickup_shown_while_shopping'))), this.renderTabs(), this.viewMode === "main" && this.renderMainView(), this.viewMode === "add-address" && this.renderAddAddressForm()))));
2058
2227
  }
2059
2228
  componentDidLoad() {
2060
2229
  // Mark component as ready
@@ -2224,6 +2393,12 @@ export class SallaBulletDelivery {
2224
2393
  "displayedCities": {},
2225
2394
  "displayedDistricts": {},
2226
2395
  "allocationOutOfCoverageMessage": {},
2396
+ "mapLocationData": {},
2397
+ "addressToken": {},
2398
+ "loadingToken": {},
2399
+ "mapReady": {},
2400
+ "mapStep": {},
2401
+ "addressDescription": {},
2227
2402
  "newAddressForm": {}
2228
2403
  };
2229
2404
  }