@salla.sa/twilight-components 2.14.525 → 2.14.526

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 (355) hide show
  1. package/dist/cjs/{filepond-ByG3dm7V.js → filepond-dCwl_WGS.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-HrlEnAMv.js → filepond-plugin-file-poster-JE47euyP.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-CQ3A10EP.js → filepond-plugin-file-validate-size-CFbzBG_a.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-Dc9po32n.js → filepond-plugin-file-validate-type-B95BRuZd.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CxnbovZA.js → filepond-plugin-image-edit-QbQgAOte.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BiZSj8QH.js → filepond-plugin-image-exif-orientation-C3KRxOCO.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-Ca4Gfes-.js → filepond-plugin-image-preview-Bg5kON16.js} +1 -1
  8. package/dist/cjs/{functions-Eg2GfamO.js → functions-DI3Yp4Of.js} +1 -1
  9. package/dist/cjs/{index-_SuY2Qj7.js → index-CL2v3rWe.js} +2 -2
  10. package/dist/cjs/intlTelInput-BhGMuXpz.js +4449 -0
  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 +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +24 -6
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +32 -16
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +82 -7
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  49. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  54. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_2.cjs.entry.js +71 -15
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  107. package/dist/cjs/{tracked-promise-CykF7i94.js → tracked-promise-BE9q9nKy.js} +1 -1
  108. package/dist/cjs/twilight.cjs.js +2 -2
  109. package/dist/cjs/utils-BD1un9WN.js +544 -0
  110. package/dist/cjs/{vanilla-picker-CHauTUo6.js → vanilla-picker-DOFw7Ga1.js} +1 -1
  111. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +82 -6
  112. package/dist/collection/components/salla-map/salla-map.css +20 -1
  113. package/dist/collection/components/salla-map/salla-map.js +86 -13
  114. package/dist/collection/components/salla-product-options/salla-product-options.js +27 -5
  115. package/dist/collection/components/salla-tel-input/salla-tel-input.css +25 -17
  116. package/dist/collection/components/salla-tel-input/salla-tel-input.js +21 -5
  117. package/dist/components/index.js +2 -2
  118. package/dist/components/intlTelInput.js +4447 -0
  119. package/dist/components/salla-bullet-delivery.js +82 -6
  120. package/dist/components/salla-map2.js +71 -14
  121. package/dist/components/salla-product-options2.js +23 -5
  122. package/dist/components/salla-tel-input2.js +23 -7
  123. package/dist/components/utils.js +542 -0
  124. package/dist/esm/{filepond-Bq2A216a.js → filepond-CTe79mlR.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-poster-D8LMLVE0.js → filepond-plugin-file-poster-FpMbRCuf.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-validate-size-O5io_aCk.js → filepond-plugin-file-validate-size-B_GPzKYu.js} +1 -1
  127. package/dist/esm/{filepond-plugin-file-validate-type-HotESPQF.js → filepond-plugin-file-validate-type-CgBrFV7x.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-edit-Cognw-Ke.js → filepond-plugin-image-edit-DElBchkY.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-exif-orientation-1R6UZIzg.js → filepond-plugin-image-exif-orientation-BhZHvn_5.js} +1 -1
  130. package/dist/esm/{filepond-plugin-image-preview-BnYXfYUb.js → filepond-plugin-image-preview-D2oaWqOt.js} +1 -1
  131. package/dist/esm/{functions-lIfge5kK.js → functions-DzuTSHQl.js} +1 -1
  132. package/dist/esm/{index-jaN78U7Z.js → index-LKlIr4DH.js} +2 -2
  133. package/dist/esm/intlTelInput-Dv1YqwOl.js +4447 -0
  134. package/dist/esm/loader.js +3 -3
  135. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  136. package/dist/esm/salla-accordion_6.entry.js +1 -1
  137. package/dist/esm/salla-add-product-button_5.entry.js +24 -6
  138. package/dist/esm/salla-advertisement.entry.js +1 -1
  139. package/dist/esm/salla-alert_2.entry.js +1 -1
  140. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  141. package/dist/esm/salla-apps-icons.entry.js +1 -1
  142. package/dist/esm/salla-badge.entry.js +1 -1
  143. package/dist/esm/salla-basket-gap.entry.js +1 -1
  144. package/dist/esm/salla-booking-field_7.entry.js +32 -16
  145. package/dist/esm/salla-bullet-delivery_2.entry.js +82 -7
  146. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  147. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  148. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  149. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  150. package/dist/esm/salla-comment-factors.entry.js +1 -1
  151. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  152. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  153. package/dist/esm/salla-contacts.entry.js +1 -1
  154. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  155. package/dist/esm/salla-count-down_2.entry.js +1 -1
  156. package/dist/esm/salla-custom-fields.entry.js +1 -1
  157. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  158. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  159. package/dist/esm/salla-filters-widget.entry.js +1 -1
  160. package/dist/esm/salla-filters.entry.js +1 -1
  161. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  162. package/dist/esm/salla-gifting.entry.js +1 -1
  163. package/dist/esm/salla-hook.entry.js +1 -1
  164. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  165. package/dist/esm/salla-installment.entry.js +1 -1
  166. package/dist/esm/salla-list-tile.entry.js +1 -1
  167. package/dist/esm/salla-localization-modal.entry.js +1 -1
  168. package/dist/esm/salla-login-modal.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  170. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
  171. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  172. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  173. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  174. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  175. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  176. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  177. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  178. package/dist/esm/salla-loyalty.entry.js +1 -1
  179. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  180. package/dist/esm/salla-map_2.entry.js +71 -15
  181. package/dist/esm/salla-menu.entry.js +1 -1
  182. package/dist/esm/salla-metadata.entry.js +1 -1
  183. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  184. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  185. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  186. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  187. package/dist/esm/salla-notification-item.entry.js +1 -1
  188. package/dist/esm/salla-notifications.entry.js +1 -1
  189. package/dist/esm/salla-offer-modal.entry.js +1 -1
  190. package/dist/esm/salla-offer.entry.js +1 -1
  191. package/dist/esm/salla-order-branch.entry.js +1 -1
  192. package/dist/esm/salla-order-cancel.entry.js +1 -1
  193. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  194. package/dist/esm/salla-order-details-options.entry.js +1 -1
  195. package/dist/esm/salla-order-details.entry.js +1 -1
  196. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  197. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  198. package/dist/esm/salla-order-edit.entry.js +1 -1
  199. package/dist/esm/salla-order-shipments.entry.js +1 -1
  200. package/dist/esm/salla-order-summary.entry.js +1 -1
  201. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  202. package/dist/esm/salla-orders.entry.js +1 -1
  203. package/dist/esm/salla-payments.entry.js +1 -1
  204. package/dist/esm/salla-placeholder.entry.js +1 -1
  205. package/dist/esm/salla-price-range.entry.js +1 -1
  206. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  207. package/dist/esm/salla-product-card_2.entry.js +1 -1
  208. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  209. package/dist/esm/salla-products-list.entry.js +1 -1
  210. package/dist/esm/salla-quick-order.entry.js +1 -1
  211. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  212. package/dist/esm/salla-rating-modal.entry.js +1 -1
  213. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  214. package/dist/esm/salla-scopes.entry.js +1 -1
  215. package/dist/esm/salla-search.entry.js +1 -1
  216. package/dist/esm/salla-skeleton.entry.js +1 -1
  217. package/dist/esm/salla-slider.entry.js +1 -1
  218. package/dist/esm/salla-social-share.entry.js +1 -1
  219. package/dist/esm/salla-social.entry.js +1 -1
  220. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  221. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  222. package/dist/esm/salla-tooltip.entry.js +1 -1
  223. package/dist/esm/salla-trust-badges.entry.js +1 -1
  224. package/dist/esm/salla-user-menu.entry.js +1 -1
  225. package/dist/esm/salla-user-profile.entry.js +1 -1
  226. package/dist/esm/salla-user-settings.entry.js +1 -1
  227. package/dist/esm/salla-verify.entry.js +1 -1
  228. package/dist/esm/salla-wallet.entry.js +1 -1
  229. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  230. package/dist/esm/{tracked-promise-BLCQ8tjn.js → tracked-promise-yYcxeJzZ.js} +1 -1
  231. package/dist/esm/twilight.js +3 -3
  232. package/dist/esm/utils-DxnArMXe.js +542 -0
  233. package/dist/esm/{vanilla-picker-bYqL5aAx.js → vanilla-picker-BAPOtEmC.js} +1 -1
  234. package/dist/twilight/{p-1fbf590d.entry.js → p-0559d448.entry.js} +1 -1
  235. package/dist/twilight/{p-17bc9975.entry.js → p-067f052b.entry.js} +1 -1
  236. package/dist/twilight/{p-abc2e86d.entry.js → p-06c4a0cd.entry.js} +1 -1
  237. package/dist/twilight/{p-1f2aca4d.entry.js → p-10c3a012.entry.js} +1 -1
  238. package/dist/twilight/{p-9a59e00a.entry.js → p-1227aa55.entry.js} +1 -1
  239. package/dist/twilight/{p-99224703.entry.js → p-146706fc.entry.js} +1 -1
  240. package/dist/twilight/{p-7d585e3f.entry.js → p-166343b3.entry.js} +1 -1
  241. package/dist/twilight/{p-c08b91d6.entry.js → p-172a034d.entry.js} +1 -1
  242. package/dist/twilight/{p-7fae6196.entry.js → p-1b5189f0.entry.js} +1 -1
  243. package/dist/twilight/{p-362875df.entry.js → p-1e799c60.entry.js} +1 -1
  244. package/dist/twilight/{p-97298e68.entry.js → p-233039ec.entry.js} +1 -1
  245. package/dist/twilight/{p-0e52a675.entry.js → p-253afd49.entry.js} +1 -1
  246. package/dist/twilight/{p-00cc5421.entry.js → p-2766a17f.entry.js} +1 -1
  247. package/dist/twilight/{p-182fe65a.entry.js → p-288e4fd6.entry.js} +1 -1
  248. package/dist/twilight/p-2c14546d.entry.js +4 -0
  249. package/dist/twilight/{p-c3b02957.entry.js → p-2e9fcab1.entry.js} +1 -1
  250. package/dist/twilight/{p-71c122ee.entry.js → p-2ea5c336.entry.js} +1 -1
  251. package/dist/twilight/{p-e1732ee5.entry.js → p-2f6e46b0.entry.js} +1 -1
  252. package/dist/twilight/{p-0e39350d.entry.js → p-31a1bd9c.entry.js} +1 -1
  253. package/dist/twilight/{p-ea5068ed.entry.js → p-326a584d.entry.js} +1 -1
  254. package/dist/twilight/{p-d7dc876f.entry.js → p-385e1853.entry.js} +1 -1
  255. package/dist/twilight/{p-49538e37.entry.js → p-3a46d113.entry.js} +1 -1
  256. package/dist/twilight/{p-42057f68.entry.js → p-3a9c2e9d.entry.js} +1 -1
  257. package/dist/twilight/{p-18ebde40.entry.js → p-3f6fac09.entry.js} +1 -1
  258. package/dist/twilight/{p-b1875b29.entry.js → p-44bf6cdf.entry.js} +1 -1
  259. package/dist/twilight/{p-4fc66f6c.entry.js → p-466fa362.entry.js} +1 -1
  260. package/dist/twilight/{p-9b2a7211.entry.js → p-4c36ba4c.entry.js} +1 -1
  261. package/dist/twilight/{p-630eb394.entry.js → p-4cc9583f.entry.js} +1 -1
  262. package/dist/twilight/{p-3eccf464.entry.js → p-4d46bd3d.entry.js} +1 -1
  263. package/dist/twilight/{p-f5e142d7.entry.js → p-4e213aab.entry.js} +1 -1
  264. package/dist/twilight/{p-e467f5b0.entry.js → p-500f0db8.entry.js} +1 -1
  265. package/dist/twilight/{p-c619267d.entry.js → p-50365a49.entry.js} +1 -1
  266. package/dist/twilight/{p-99a2141a.entry.js → p-5555817c.entry.js} +1 -1
  267. package/dist/twilight/{p-fd847a8f.entry.js → p-584817e5.entry.js} +1 -1
  268. package/dist/twilight/{p-602fc32b.entry.js → p-59dbe5f1.entry.js} +1 -1
  269. package/dist/twilight/{p-6435138d.entry.js → p-5c5f4f73.entry.js} +1 -1
  270. package/dist/twilight/{p-aa8cb72c.entry.js → p-60a7b50b.entry.js} +1 -1
  271. package/dist/twilight/{p-2c9b90ce.entry.js → p-61cd30d3.entry.js} +1 -1
  272. package/dist/twilight/{p-69b14e60.entry.js → p-6204462a.entry.js} +1 -1
  273. package/dist/twilight/{p-505874e8.entry.js → p-630e769f.entry.js} +1 -1
  274. package/dist/twilight/{p-e38c275d.entry.js → p-65d86157.entry.js} +1 -1
  275. package/dist/twilight/{p-9a0c466f.entry.js → p-6bbc3c94.entry.js} +1 -1
  276. package/dist/twilight/{p-e02846cf.entry.js → p-71344ddc.entry.js} +1 -1
  277. package/dist/twilight/{p-74116ebe.entry.js → p-72e4ef6a.entry.js} +1 -1
  278. package/dist/twilight/{p-59273278.entry.js → p-761165fd.entry.js} +1 -1
  279. package/dist/twilight/{p-3f644db4.entry.js → p-797a7c1e.entry.js} +1 -1
  280. package/dist/twilight/{p-5d2ebd77.entry.js → p-7edb518f.entry.js} +1 -1
  281. package/dist/twilight/{p-a0cbccd9.entry.js → p-85819cea.entry.js} +1 -1
  282. package/dist/twilight/{p-8c10db42.entry.js → p-879de784.entry.js} +1 -1
  283. package/dist/twilight/{p-f7ab861f.entry.js → p-882128d2.entry.js} +1 -1
  284. package/dist/twilight/{p-c81d2dc8.entry.js → p-8993c586.entry.js} +1 -1
  285. package/dist/twilight/{p-f68bc653.entry.js → p-89ff463e.entry.js} +1 -1
  286. package/dist/twilight/{p-aa48682d.entry.js → p-8a3cb52e.entry.js} +1 -1
  287. package/dist/twilight/{p-1104a7a2.entry.js → p-8bb53ed2.entry.js} +2 -2
  288. package/dist/twilight/{p-6c8274a2.entry.js → p-8f7579e4.entry.js} +1 -1
  289. package/dist/twilight/{p-6a9a4bd8.entry.js → p-9445f844.entry.js} +1 -1
  290. package/dist/twilight/{p-63518f52.entry.js → p-961941f2.entry.js} +1 -1
  291. package/dist/twilight/{p-b17be3dc.entry.js → p-96fff354.entry.js} +1 -1
  292. package/dist/twilight/{p-0609a7bd.entry.js → p-97f12f7b.entry.js} +1 -1
  293. package/dist/twilight/{p-75e0cd1f.entry.js → p-99228024.entry.js} +1 -1
  294. package/dist/twilight/{p-33c856af.entry.js → p-9a9d4676.entry.js} +1 -1
  295. package/dist/twilight/{p-c9e3cb79.entry.js → p-9bd015e5.entry.js} +1 -1
  296. package/dist/twilight/{p-rkyvWRN4.js → p-BGqFcZFD.js} +1 -1
  297. package/dist/twilight/{p-Dqih45q3.js → p-BJ2QKyWM.js} +1 -1
  298. package/dist/twilight/{p-nDdDwFvo.js → p-BOmRCp86.js} +1 -1
  299. package/dist/twilight/{p-LTkkjsSH.js → p-BVtJp-gU.js} +1 -1
  300. package/dist/twilight/p-Bdz016Fy.js +4 -0
  301. package/dist/twilight/{p-8-u5GuKq.js → p-By36wPtc.js} +1 -1
  302. package/dist/twilight/p-CnIis-ob.js +4 -0
  303. package/dist/twilight/{p-BcYGWl9T.js → p-DkALFehO.js} +1 -1
  304. package/dist/twilight/{p-DOua19fU.js → p-DmcP-9uS.js} +1 -1
  305. package/dist/twilight/p-DxnArMXe.js +4 -0
  306. package/dist/twilight/{p-CYTQC0eE.js → p-HiDU1qAC.js} +1 -1
  307. package/dist/twilight/{p-jaN78U7Z.js → p-LKlIr4DH.js} +1 -1
  308. package/dist/twilight/{p-44e6a827.entry.js → p-a435c54c.entry.js} +1 -1
  309. package/dist/twilight/{p-ae9c2d84.entry.js → p-b063d0f3.entry.js} +1 -1
  310. package/dist/twilight/{p-977780ec.entry.js → p-b1b11ebb.entry.js} +1 -1
  311. package/dist/twilight/{p-323402b3.entry.js → p-b46bd39f.entry.js} +1 -1
  312. package/dist/twilight/{p-525223a4.entry.js → p-b5c106ac.entry.js} +1 -1
  313. package/dist/twilight/{p-d58a1f61.entry.js → p-b6ce3117.entry.js} +1 -1
  314. package/dist/twilight/{p-97e232e5.entry.js → p-b76720e1.entry.js} +1 -1
  315. package/dist/twilight/{p-4f2994dd.entry.js → p-bb242f20.entry.js} +1 -1
  316. package/dist/twilight/{p-2945aeb2.entry.js → p-beaf3f78.entry.js} +1 -1
  317. package/dist/twilight/{p-373fcfb8.entry.js → p-c06229a1.entry.js} +1 -1
  318. package/dist/twilight/{p-3c832f6f.entry.js → p-c06ab3be.entry.js} +1 -1
  319. package/dist/twilight/{p-050f9310.entry.js → p-c1036ebd.entry.js} +1 -1
  320. package/dist/twilight/{p-c8c5daa1.entry.js → p-c19412a4.entry.js} +1 -1
  321. package/dist/twilight/{p-80928bbd.entry.js → p-c7c2dad0.entry.js} +1 -1
  322. package/dist/twilight/{p-24805db6.entry.js → p-cf3b863c.entry.js} +1 -1
  323. package/dist/twilight/{p-1eb75e5f.entry.js → p-cf95b06d.entry.js} +1 -1
  324. package/dist/twilight/{p-fe4fff6c.entry.js → p-cffe12a3.entry.js} +1 -1
  325. package/dist/twilight/{p-e51caf6a.entry.js → p-d477d0ab.entry.js} +1 -1
  326. package/dist/twilight/p-d81ee10d.entry.js +4 -0
  327. package/dist/twilight/{p-8f2d30ee.entry.js → p-de14bb3d.entry.js} +1 -1
  328. package/dist/twilight/p-dfea079f.entry.js +4 -0
  329. package/dist/twilight/{p-99141839.entry.js → p-e407d576.entry.js} +1 -1
  330. package/dist/twilight/{p-d336cca5.entry.js → p-e6ae56e1.entry.js} +1 -1
  331. package/dist/twilight/{p-8678f934.entry.js → p-ebaa623e.entry.js} +1 -1
  332. package/dist/twilight/{p-448c0d05.entry.js → p-ec1730a3.entry.js} +1 -1
  333. package/dist/twilight/{p-3d9e2493.entry.js → p-eea93ac7.entry.js} +1 -1
  334. package/dist/twilight/{p-0d2fe58f.entry.js → p-eed700e7.entry.js} +1 -1
  335. package/dist/twilight/{p-25f2f9b9.entry.js → p-ef4a0ae4.entry.js} +1 -1
  336. package/dist/twilight/{p-702bbad3.entry.js → p-f418df90.entry.js} +1 -1
  337. package/dist/twilight/{p-95a6174b.entry.js → p-f4733e21.entry.js} +1 -1
  338. package/dist/twilight/{p-96ac5048.entry.js → p-f5154b22.entry.js} +1 -1
  339. package/dist/twilight/{p-e9181449.entry.js → p-fd33515c.entry.js} +1 -1
  340. package/dist/twilight/{p-b31b5264.entry.js → p-fe40bb32.entry.js} +1 -1
  341. package/dist/twilight/{p-BRZnimZv.js → p-j2CozAo8.js} +1 -1
  342. package/dist/twilight/twilight.esm.js +1 -1
  343. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +16 -0
  344. package/dist/types/components/salla-map/salla-map.d.ts +15 -0
  345. package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -0
  346. package/dist/types/components.d.ts +4 -0
  347. package/package.json +6 -6
  348. package/dist/cjs/index-CE6R05qu.js +0 -1714
  349. package/dist/components/index3.js +0 -1712
  350. package/dist/esm/index-D_H00WFp.js +0 -1712
  351. package/dist/twilight/p-4a8d866d.entry.js +0 -4
  352. package/dist/twilight/p-5d036c83.entry.js +0 -4
  353. package/dist/twilight/p-Cp2FlnRu.js +0 -4
  354. package/dist/twilight/p-EpPIlSaQ.js +0 -4
  355. package/dist/twilight/p-f1977d52.entry.js +0 -4
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- var index = require('./index-_SuY2Qj7.js');
6
+ var index = require('./index-CL2v3rWe.js');
7
7
 
8
8
  function _mergeNamespaces(n, m) {
9
9
  m.forEach(function (e) {
@@ -68,6 +68,9 @@ export class SallaBulletDelivery {
68
68
  this.gmapRef = null;
69
69
  /** Guards against re-prompting for geolocation each time the map (re)initializes within one flow. */
70
70
  this.autoGeolocationTriggered = false;
71
+ /** Identifies the latest reverse-geocode call so a resolved-but-superseded callback (same
72
+ * coordinates re-picked, or the map left) can be told apart from the current one. */
73
+ this.geocodeRequestId = 0;
71
74
  // Core state
72
75
  this.activeTab = "address";
73
76
  this.isLoggedIn = false;
@@ -125,6 +128,8 @@ export class SallaBulletDelivery {
125
128
  this.mapReady = false;
126
129
  this.mapStep = 'map';
127
130
  this.addressDescription = '';
131
+ /** True while reverse-geocoding a map-click/geolocation pick (no place from the map component itself). */
132
+ this.reverseGeocoding = false;
128
133
  this.newAddressForm = {
129
134
  ...SallaBulletDelivery.INITIAL_ADDRESS_FORM,
130
135
  };
@@ -203,9 +208,10 @@ export class SallaBulletDelivery {
203
208
  const detail = event.detail;
204
209
  if (!detail?.position?.lat || !detail?.position?.lng)
205
210
  return;
211
+ const { lat, lng } = detail.position;
206
212
  this.mapLocationData = {
207
- lat: detail.position.lat,
208
- lng: detail.position.lng,
213
+ lat,
214
+ lng,
209
215
  shortAddress: detail.place?.placeId ?? detail.place?.place_id ?? undefined,
210
216
  formattedAddress: detail.place?.formattedAddress ?? detail.place?.formatted_address ?? undefined,
211
217
  };
@@ -216,6 +222,16 @@ export class SallaBulletDelivery {
216
222
  if (marker)
217
223
  marker.gmpDraggable = false;
218
224
  }, 100);
225
+ // Map click / geolocation / programmatic moves don't resolve a `place` (unlike search-select),
226
+ // so fall back to reverse geocoding — otherwise the confirmation card renders with a blank address.
227
+ if (!this.mapLocationData.formattedAddress) {
228
+ this.reverseGeocodeLocation(lat, lng);
229
+ }
230
+ else {
231
+ // A place was already resolved (search/autocomplete select) — invalidate any reverse-geocode
232
+ // still in flight for a previous map-click pick so its callback can't later overwrite this.
233
+ this.invalidatePendingGeocode();
234
+ }
219
235
  };
220
236
  this.handleMapReady = () => {
221
237
  this.mapReady = true;
@@ -271,6 +287,7 @@ export class SallaBulletDelivery {
271
287
  this.viewMode = "main";
272
288
  this.districtName = "";
273
289
  this.mapLocationData = null;
290
+ this.invalidatePendingGeocode();
274
291
  this.mapStep = 'map';
275
292
  this.addressDescription = '';
276
293
  }
@@ -485,6 +502,8 @@ export class SallaBulletDelivery {
485
502
  }
486
503
  resetState() {
487
504
  this.viewMode = "main";
505
+ this.mapLocationData = null;
506
+ this.invalidatePendingGeocode();
488
507
  this.autoGeolocationTriggered = false;
489
508
  this.selectedCountry = null;
490
509
  this.selectedRegion = null;
@@ -1169,6 +1188,7 @@ export class SallaBulletDelivery {
1169
1188
  async handleAddNewAddress() {
1170
1189
  this.viewMode = "add-address";
1171
1190
  this.mapLocationData = null;
1191
+ this.invalidatePendingGeocode();
1172
1192
  this.autoGeolocationTriggered = false;
1173
1193
  this.fetchAddressToken();
1174
1194
  const intent = this.getStoredIntent();
@@ -1190,6 +1210,7 @@ export class SallaBulletDelivery {
1190
1210
  handleBackToAddressList() {
1191
1211
  this.viewMode = "main";
1192
1212
  this.mapLocationData = null;
1213
+ this.invalidatePendingGeocode();
1193
1214
  this.mapStep = 'map';
1194
1215
  this.addressDescription = '';
1195
1216
  this.autoGeolocationTriggered = false;
@@ -1217,6 +1238,51 @@ export class SallaBulletDelivery {
1217
1238
  this.loadingToken = false;
1218
1239
  }
1219
1240
  }
1241
+ /** Invalidate any reverse-geocode currently in flight — call whenever the map pick is abandoned
1242
+ * (tab switch, modal close/reopen) so a stale callback can't resurrect old location state later. */
1243
+ invalidatePendingGeocode() {
1244
+ this.reverseGeocoding = false;
1245
+ this.geocodeRequestId++;
1246
+ }
1247
+ /** Falls back to a "lat, lng" label when no address text is available — keeps the customer able
1248
+ * to confirm the pin they placed instead of being stuck with a blank address and no recovery path. */
1249
+ applyCoordsFallback(lat, lng) {
1250
+ this.mapLocationData = {
1251
+ ...this.mapLocationData,
1252
+ formattedAddress: this.mapLocationData?.formattedAddress ?? `${lat.toFixed(6)}, ${lng.toFixed(6)}`,
1253
+ };
1254
+ }
1255
+ /** Reverse-geocode a lat/lng into a display address — mirrors salla-map.tsx's getPositionAddress. */
1256
+ reverseGeocodeLocation(lat, lng) {
1257
+ const Geocoder = window.google?.maps?.Geocoder;
1258
+ if (!Geocoder) {
1259
+ // No Geocoder available at all — nothing pending to invalidate, but bump the id anyway in
1260
+ // case an earlier request (started while the SDK was still available) is still in flight.
1261
+ this.geocodeRequestId++;
1262
+ this.applyCoordsFallback(lat, lng);
1263
+ return;
1264
+ }
1265
+ this.reverseGeocoding = true;
1266
+ const requestId = ++this.geocodeRequestId;
1267
+ new Geocoder().geocode({ location: { lat, lng } }, (results, status) => {
1268
+ // Ignore stale responses — a newer pick (even at the same coordinates) started since,
1269
+ // or the map was left and `geocodeRequestId` was bumped to invalidate this call.
1270
+ if (requestId !== this.geocodeRequestId)
1271
+ return;
1272
+ this.reverseGeocoding = false;
1273
+ if (status === window.google.maps.GeocoderStatus.OK && results?.[0]) {
1274
+ this.mapLocationData = {
1275
+ ...this.mapLocationData,
1276
+ formattedAddress: results[0].formatted_address,
1277
+ shortAddress: this.mapLocationData?.shortAddress ?? results[0].place_id,
1278
+ };
1279
+ }
1280
+ else {
1281
+ log('Reverse geocoding failed for map location', status);
1282
+ this.applyCoordsFallback(lat, lng);
1283
+ }
1284
+ });
1285
+ }
1220
1286
  /** Bias autocomplete toward the current selection (or the initial center) — mirrors checkout's map-page. */
1221
1287
  updateLocationBias() {
1222
1288
  if (!this.gmapRef)
@@ -1229,6 +1295,11 @@ export class SallaBulletDelivery {
1229
1295
  hasMapLocation() {
1230
1296
  return this.mapLocationData?.lat != null && this.mapLocationData?.lng != null;
1231
1297
  }
1298
+ /** Only let the user advance past the map step once a real address resolved — otherwise a failed
1299
+ * reverse-geocode (bad status, no results) would silently admit a blank confirmation card. */
1300
+ canConfirmMapLocation() {
1301
+ return this.hasMapLocation() && !this.reverseGeocoding && !!this.mapLocationData?.formattedAddress;
1302
+ }
1232
1303
  // TODO: replace with actual setting key once dashboard setting is built
1233
1304
  get isMapSettingEnabled() {
1234
1305
  return Salla.config.get('store.settings.bullet_delivery.settings.map_enabled');
@@ -1291,6 +1362,9 @@ export class SallaBulletDelivery {
1291
1362
  this.activeTab = tab;
1292
1363
  if (this.viewMode === 'add-address') {
1293
1364
  this.viewMode = 'main';
1365
+ // Leaving the add-address map flow abandons any reverse-geocode still in flight —
1366
+ // otherwise its callback could resurrect stale location state if the customer returns.
1367
+ this.invalidatePendingGeocode();
1294
1368
  }
1295
1369
  this.showCartWillBeClearedBanner = false;
1296
1370
  this.allocationOutOfCoverageMessage = null;
@@ -2082,6 +2156,7 @@ export class SallaBulletDelivery {
2082
2156
  }
2083
2157
  const hasMapLoc = this.hasMapLocation();
2084
2158
  const isConfirmStep = this.mapStep === 'confirm' && hasMapLoc;
2159
+ const canAdvanceToConfirm = this.canConfirmMapLocation();
2085
2160
  const submitLabel = isConfirmStep
2086
2161
  ? (this.savingAddress
2087
2162
  ? Salla.lang.get("pages.checkout.loading")
@@ -2089,13 +2164,13 @@ export class SallaBulletDelivery {
2089
2164
  : Salla.lang.get('pages.checkout.confirm_location');
2090
2165
  const handleSubmit = (e) => {
2091
2166
  e.preventDefault();
2092
- if (!isConfirmStep && hasMapLoc) {
2167
+ if (!isConfirmStep && canAdvanceToConfirm) {
2093
2168
  this.mapStep = 'confirm';
2094
2169
  return;
2095
2170
  }
2096
2171
  this.handleSubmitAddAddress(e);
2097
2172
  };
2098
- 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'))))));
2173
+ 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: isConfirmStep ? this.savingAddress : !canAdvanceToConfirm, 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'))))));
2099
2174
  }
2100
2175
  renderBranchSearch() {
2101
2176
  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: {
@@ -2147,7 +2222,7 @@ export class SallaBulletDelivery {
2147
2222
  let submitLabel;
2148
2223
  if (mapMode) {
2149
2224
  if (this.mapStep === 'map') {
2150
- canSubmit = hasMapLoc;
2225
+ canSubmit = this.canConfirmMapLocation();
2151
2226
  submitLabel = Salla.lang.get('pages.checkout.confirm_location');
2152
2227
  }
2153
2228
  else {
@@ -2172,7 +2247,7 @@ export class SallaBulletDelivery {
2172
2247
  const hasAddressesToGoBack = this.savedAddresses.length > 0 || hasSessionAddressIntent(this.getStoredIntent());
2173
2248
  const handleFormSubmit = (e) => {
2174
2249
  e.preventDefault();
2175
- if (mapMode && this.mapStep === 'map' && hasMapLoc) {
2250
+ if (mapMode && this.mapStep === 'map' && canSubmit) {
2176
2251
  this.mapStep = 'confirm';
2177
2252
  return;
2178
2253
  }
@@ -2512,6 +2587,7 @@ export class SallaBulletDelivery {
2512
2587
  "mapReady": {},
2513
2588
  "mapStep": {},
2514
2589
  "addressDescription": {},
2590
+ "reverseGeocoding": {},
2515
2591
  "newAddressForm": {}
2516
2592
  };
2517
2593
  }
@@ -1,4 +1,23 @@
1
1
  /*
2
2
  * Salla Location Component: location popup modal
3
3
  * You can use these classes to target the elements in the component.
4
- */
4
+ */
5
+ .s-map-wrapper {
6
+ position: relative;
7
+ }
8
+ .s-map-value-input {
9
+ position: absolute;
10
+ width: 1px;
11
+ height: 1px;
12
+ padding: 0;
13
+ margin: -1px;
14
+ overflow: hidden;
15
+ white-space: nowrap;
16
+ border: 0;
17
+ opacity: 0;
18
+ pointer-events: none;
19
+ }
20
+ .s-map-wrapper.s-has-error .s-map-location-button {
21
+ outline: 2px solid rgb(248, 113, 113);
22
+ outline-offset: 2px;
23
+ }
@@ -60,8 +60,45 @@ export class SallaMap {
60
60
  formatAddress(address) {
61
61
  return address.length > 25 ? address.substring(0, 25) + '...' : address;
62
62
  }
63
+ /** Treat numeric `0` as valid; reject null/undefined/blank/NaN (incl. whitespace). */
64
+ hasCoordinate(value) {
65
+ if (value === null || value === undefined) {
66
+ return false;
67
+ }
68
+ if (typeof value === 'number') {
69
+ return Number.isFinite(value);
70
+ }
71
+ const trimmed = String(value).trim();
72
+ if (trimmed === '') {
73
+ return false;
74
+ }
75
+ return Number.isFinite(Number(trimmed));
76
+ }
77
+ /**
78
+ * Prefer confirmed selection; fall back to lat/lng props so cart/order-form
79
+ * options with an existing location keep a valid form value before geocode finishes.
80
+ */
63
81
  getLatLng() {
64
- return this.selectedLat && this.selectedLng ? `${this.selectedLat}, ${this.selectedLng}` : null;
82
+ const lat = this.hasCoordinate(this.selectedLat) ? this.selectedLat : this.lat;
83
+ const lng = this.hasCoordinate(this.selectedLng) ? this.selectedLng : this.lng;
84
+ return this.hasCoordinate(lat) && this.hasCoordinate(lng) ? `${lat}, ${lng}` : '';
85
+ }
86
+ syncMapInputValue() {
87
+ if (!this.mapInput) {
88
+ return;
89
+ }
90
+ this.mapInput.value = this.getLatLng();
91
+ this.mapInput.setCustomValidity('');
92
+ }
93
+ focusLocateControl() {
94
+ const locateButton = this.host.querySelector('.s-map-location-button');
95
+ locateButton?.focus?.();
96
+ }
97
+ componentWillLoad() {
98
+ if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
99
+ this.selectedLat = this.lat;
100
+ this.selectedLng = this.lng;
101
+ }
65
102
  }
66
103
  getPositionAddress(location, submit = false) {
67
104
  // get address and set it to search input
@@ -200,8 +237,9 @@ export class SallaMap {
200
237
  }
201
238
  }
202
239
  componentDidLoad() {
240
+ this.syncMapInputValue();
203
241
  // if lat and lng provided then get the formatted address
204
- if (this.lat && this.lng) {
242
+ if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
205
243
  // get address
206
244
  fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||
207
245
  document.documentElement.lang ||
@@ -211,20 +249,42 @@ export class SallaMap {
211
249
  if (res.status === 'OK') {
212
250
  this.formattedAddress = res.results[0].formatted_address;
213
251
  this.searchInputValue = res.results[0].formatted_address;
214
- this.searchInput.value = res.results[0].formatted_address;
252
+ if (this.searchInput) {
253
+ this.searchInput.value = res.results[0].formatted_address;
254
+ }
215
255
  this.selectedLng = this.lng;
216
256
  this.selectedLat = this.lat;
257
+ this.syncMapInputValue();
217
258
  }
218
259
  });
219
260
  }
220
261
  this.mapInput.addEventListener('invalid', e => {
262
+ // Keep native constraint validation, but move focus to the visible control
263
+ // so Chromium does not throw "An invalid form control is not focusable".
264
+ e.preventDefault();
265
+ this.host.classList.add('s-has-error');
266
+ this.focusLocateControl();
221
267
  this.invalidInput.emit(e);
222
268
  });
223
269
  this.mapInput.addEventListener('input', () => {
224
270
  this.mapInput.setCustomValidity('');
225
- this.mapInput.reportValidity();
271
+ this.host.classList.remove('s-has-error');
226
272
  });
227
273
  }
274
+ /**
275
+ * Validate the selected location when the field is required.
276
+ * Native required still applies on a focusable visually-hidden input; this method
277
+ * syncs value first and routes focus to the visible locate control via `invalid`.
278
+ */
279
+ async reportValidity() {
280
+ this.syncMapInputValue();
281
+ if (!this.mapInput || !this.required || this.readonly || this.getLatLng()) {
282
+ this.mapInput?.setCustomValidity('');
283
+ this.host.classList.remove('s-has-error');
284
+ return true;
285
+ }
286
+ return this.mapInput.reportValidity();
287
+ }
228
288
  /**
229
289
  * Open location component
230
290
  */
@@ -258,12 +318,8 @@ export class SallaMap {
258
318
  this.selectedLat = points.lat;
259
319
  this.selectedLng = points.lng;
260
320
  this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);
261
- if (!this.selectedLat || !this.selectedLng) {
262
- this.mapInput.value = null;
263
- }
264
- else {
265
- this.mapInput.value = `${this.selectedLat}, ${this.selectedLng}`;
266
- }
321
+ this.syncMapInputValue();
322
+ this.host.classList.remove('s-has-error');
267
323
  this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }));
268
324
  this.locationModal.close();
269
325
  } }, this.confirmButtonTitle)
@@ -271,11 +327,11 @@ export class SallaMap {
271
327
  }
272
328
  // render
273
329
  render() {
274
- return (h(Host, { key: '47e8a611d43d82613c87b8fce6742f318add9b74', class: "s-map-wrapper" }, h("salla-modal", { key: 'f21d703131da061ba0d5a991a9d73a42062e293b', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
330
+ return (h(Host, { key: '20ed1a1d4099e817164c3764341d473c1b735add', class: "s-map-wrapper" }, h("salla-modal", { key: '77309d82d11bbae677a935aef0e02588c5f9fbfa', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
275
331
  this.locationModal = modal;
276
- } }, this.getLocationModal()), h("slot", { key: '21754ee3e232c0ea2a0b0d89fd43fe136eca19dd', name: "button" }, h("salla-button", { key: 'dffc15443da0a75f9cc216edb86b58e0f661bef9', onClick: () => {
332
+ } }, this.getLocationModal()), h("slot", { key: '57e6d352f42a3321a98925dd4136eaf0fdbb06b0', name: "button" }, h("salla-button", { key: 'a0c39395b18ca41f2ea31c5c5729b2ba20c17a16', onClick: () => {
277
333
  this.open();
278
- }, color: "primary", class: "s-map-location-button" }, h("span", { key: '868ac864b392c39cf1314ecfd3d1e45365daad30', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'db8f6bbbe9a89debc626402983a98efc34b2130c', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
334
+ }, color: "primary", class: "s-map-location-button" }, h("span", { key: 'b9478a06c198812edeacab794fb63699ea72fd6b', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'd1619a934c72218d4d00b651e95743ad8d14a7a2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
279
335
  }
280
336
  static get is() { return "salla-map"; }
281
337
  static get originalStyleUrls() {
@@ -570,6 +626,23 @@ export class SallaMap {
570
626
  }
571
627
  static get methods() {
572
628
  return {
629
+ "reportValidity": {
630
+ "complexType": {
631
+ "signature": "() => Promise<boolean>",
632
+ "parameters": [],
633
+ "references": {
634
+ "Promise": {
635
+ "location": "global",
636
+ "id": "global::Promise"
637
+ }
638
+ },
639
+ "return": "Promise<boolean>"
640
+ },
641
+ "docs": {
642
+ "text": "Validate the selected location when the field is required.\nNative required still applies on a focusable visually-hidden input; this method\nsyncs value first and routes focus to the visible locate control via `invalid`.",
643
+ "tags": []
644
+ }
645
+ },
573
646
  "open": {
574
647
  "complexType": {
575
648
  "signature": "() => Promise<HTMLElement>",
@@ -190,6 +190,14 @@ export class SallaProductOptions {
190
190
  if (el.disabled || el.closest('.hidden')) {
191
191
  continue;
192
192
  }
193
+ // Prefer map component validation so focus lands on the locate button.
194
+ const map = el.closest('salla-map');
195
+ if (map && typeof map.reportValidity === 'function') {
196
+ if (!(await map.reportValidity())) {
197
+ pass = false;
198
+ }
199
+ continue;
200
+ }
193
201
  //if there is only one invalid option, return false
194
202
  if ('reportValidity' in el && !el.reportValidity()) {
195
203
  pass = false;
@@ -252,7 +260,7 @@ export class SallaProductOptions {
252
260
  const optionElement = event.target.closest('.s-product-options-option');
253
261
  if (event.target.value ||
254
262
  ((option.type === DisplayType.FILE || option.type === DisplayType.IMAGE) && event.type === 'added') ||
255
- (option.type === DisplayType.MAP && event.type === 'selected' && (event.target.lat && event.target.lng))) {
263
+ (option.type === DisplayType.MAP && event.type === 'selected' && Number.isFinite(Number(event.target.lat)) && Number.isFinite(Number(event.target.lng)))) {
256
264
  setTimeout(() => {
257
265
  optionElement.classList.remove('s-product-options-option-error');
258
266
  }, 200);
@@ -396,9 +404,19 @@ export class SallaProductOptions {
396
404
  return true;
397
405
  }
398
406
  getLatLng(value, type) {
399
- return value
400
- ? value.split(',')[type === 'lat' ? 0 : 1]
401
- : '';
407
+ if (typeof value !== 'string' || !value.trim()) {
408
+ return undefined;
409
+ }
410
+ const segment = value.split(',')[type === 'lat' ? 0 : 1];
411
+ if (segment == null) {
412
+ return undefined;
413
+ }
414
+ const trimmed = segment.trim();
415
+ if (trimmed === '') {
416
+ return undefined;
417
+ }
418
+ const parsed = Number(trimmed);
419
+ return Number.isFinite(parsed) ? parsed : undefined;
402
420
  }
403
421
  getDisplayForType(option) {
404
422
  if (this[`${option.type}Option`]) {
@@ -763,7 +781,7 @@ export class SallaProductOptions {
763
781
  }
764
782
  //@ts-ignore
765
783
  mapOption(option) {
766
- return h("salla-map", { zoom: 15, lat: this.getLatLng(option.value, 'lat'), lng: this.getLatLng(option.value, 'lng'), name: this.generateInputName(option.id), searchable: true, required: option.required, onInvalidInput: (e) => this.invalidHandler(e, option), onSelected: e => this.changedHandler(e, option) });
784
+ return h("salla-map", { zoom: 15, lat: this.getLatLng(option.value, 'lat'), lng: this.getLatLng(option.value, 'lng'), name: this.generateInputName(option.id), searchable: true, required: !option.visibility_condition && option.required, onInvalidInput: (e) => this.invalidHandler(e, option), onSelected: e => this.changedHandler(e, option) });
767
785
  }
768
786
  colorPickerOption(option) {
769
787
  return h("salla-color-picker", { onSubmitted: e => this.changedHandler(e, option), name: this.generateInputName(option.id), required: !option.visibility_condition && option.required, onInvalidInput: (e) => this.invalidHandler(e, option), color: option.value });
@@ -1255,6 +1273,10 @@ export class SallaProductOptions {
1255
1273
  "HTMLInputElement": {
1256
1274
  "location": "global",
1257
1275
  "id": "global::HTMLInputElement"
1276
+ },
1277
+ "HTMLSallaMapElement": {
1278
+ "location": "global",
1279
+ "id": "global::HTMLSallaMapElement"
1258
1280
  }
1259
1281
  },
1260
1282
  "return": "Promise<boolean>"
@@ -29,7 +29,7 @@
29
29
  padding-right: 15px !important;
30
30
  margin-left: 0 !important;
31
31
  }
32
- .iti__flag-container {
32
+ .iti__country-container {
33
33
  width: 100%;
34
34
  position: absolute;
35
35
  top: 0;
@@ -37,7 +37,7 @@
37
37
  left: 0;
38
38
  padding: 1px;
39
39
  }
40
- .iti__selected-flag {
40
+ .iti__selected-country {
41
41
  width: 80px;
42
42
  z-index: 1;
43
43
  position: relative;
@@ -48,11 +48,13 @@
48
48
  padding: 0 15px;
49
49
  box-shadow: none !important;
50
50
  outline: none !important;
51
+ background: transparent;
52
+ border: 0;
51
53
  }
52
- .ltr .iti__selected-flag {
54
+ .ltr .iti__selected-country, [dir=ltr] .iti__selected-country {
53
55
  justify-content: flex-end;
54
56
  }
55
- .iti__selected-flag:before {
57
+ .iti__selected-country:before {
56
58
  content: "";
57
59
  display: block;
58
60
  width: 1px;
@@ -62,9 +64,14 @@
62
64
  top: 15%;
63
65
  right: 0;
64
66
  }
65
- .iti__selected-flag .iti__flag {
67
+ .iti__selected-country .iti__flag {
66
68
  display: none;
67
69
  }
70
+ .iti__selected-country-primary {
71
+ display: flex;
72
+ align-items: center;
73
+ height: 100%;
74
+ }
68
75
  .iti__arrow {
69
76
  width: 15px;
70
77
  height: 15px;
@@ -134,10 +141,11 @@
134
141
  white-space: normal;
135
142
  }
136
143
  }
137
- .iti__flag-box {
144
+ .iti__country .iti__flag {
138
145
  display: inline-block;
139
146
  width: 20px;
140
147
  margin: 0 0 0 5px;
148
+ flex-shrink: 0;
141
149
  }
142
150
  .iti__divider {
143
151
  padding-bottom: 5px;
@@ -157,7 +165,7 @@
157
165
  .iti__country.iti__highlight {
158
166
  background-color: rgba(0, 0, 0, 0.05);
159
167
  }
160
- .iti__flag-box, .iti__country-name, .iti__dial-code {
168
+ .iti__country .iti__flag, .iti__country-name, .iti__dial-code {
161
169
  vertical-align: middle;
162
170
  }
163
171
  .iti__country-name {
@@ -167,21 +175,21 @@
167
175
  white-space: normal;
168
176
  line-height: 1.3;
169
177
  }
170
- .iti--allow-dropdown .iti__flag-container, .iti--separate-dial-code .iti__flag-container {
178
+ .iti--allow-dropdown .iti__country-container {
171
179
  left: 0;
172
180
  }
173
- .iti--allow-dropdown .iti__flag-container:hover {
181
+ .iti--allow-dropdown .iti__country-container:hover {
174
182
  cursor: pointer;
175
183
  }
176
- .iti--allow-dropdown input[disabled] + .iti__flag-container:hover,
177
- .iti--allow-dropdown input[readonly] + .iti__flag-container:hover {
184
+ .iti--allow-dropdown input[disabled] + .iti__country-container:hover,
185
+ .iti--allow-dropdown input[readonly] + .iti__country-container:hover {
178
186
  cursor: default;
179
187
  }
180
- .iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag,
181
- .iti--allow-dropdown input[readonly] + .iti__flag-container:hover .iti__selected-flag {
188
+ .iti--allow-dropdown input[disabled] + .iti__country-container:hover .iti__selected-country,
189
+ .iti--allow-dropdown input[readonly] + .iti__country-container:hover .iti__selected-country {
182
190
  background-color: transparent;
183
191
  }
184
- .iti--separate-dial-code .iti__selected-dial-code {
192
+ .iti__selected-dial-code {
185
193
  unicode-bidi: plaintext;
186
194
  direction: ltr;
187
195
  letter-spacing: 1px;
@@ -197,19 +205,19 @@
197
205
  cursor: pointer;
198
206
  }
199
207
 
200
- .iti-mobile .iti--container {
208
+ .iti--container.iti--fullscreen-popup {
201
209
  inset: 0;
202
210
  margin: 20px;
203
211
  width: calc(100% - 40px);
204
212
  position: fixed;
205
213
  z-index: 9999;
206
214
  }
207
- .iti-mobile .iti__country-list {
215
+ .iti--container.iti--fullscreen-popup .iti__country-list {
208
216
  max-height: 100%;
209
217
  width: 100%;
210
218
  inset: 0;
211
219
  }
212
- .iti-mobile .iti__country {
220
+ .iti--container.iti--fullscreen-popup .iti__country {
213
221
  padding: 10px 10px;
214
222
  line-height: 1.5em;
215
223
  }
@@ -51,11 +51,17 @@ export class SallaTelInput {
51
51
  this.errorMap = [this.invalidNumber, this.invalidCountryCode, this.tooShort, this.tooLong, this.invalidNumber];
52
52
  });
53
53
  }
54
+ // Init is async and v26 loads the validation utils lazily; both must settle.
55
+ async whenReady() {
56
+ await this.initPromise;
57
+ await this.utilsReady;
58
+ }
54
59
  /**
55
60
  * Get current values
56
61
  * @return {{mobile:number,countryCode:'SA'|string}}
57
62
  */
58
63
  async getValues() {
64
+ await this.initPromise;
59
65
  return {
60
66
  [this.name]: this.phone = this.phoneInput.value,
61
67
  countryCode: this.countryCode = this.countryCodeInput.value,
@@ -67,6 +73,7 @@ export class SallaTelInput {
67
73
  * @return {boolean}
68
74
  */
69
75
  async isValid() {
76
+ await this.whenReady();
70
77
  this.reset();
71
78
  if (this.iti.isValidNumber())
72
79
  return true;
@@ -77,7 +84,7 @@ export class SallaTelInput {
77
84
  }
78
85
  this.phoneInput.classList.add("s-has-error");
79
86
  let errorCode = this.iti.getValidationError();
80
- this.errorMsg.innerText = this.errorMap[errorCode] || '';
87
+ this.errorMsg.innerText = this.errorMap[errorCode] || this.invalidNumber || '';
81
88
  salla.logger.info('Phone number (' + this.countryCode + ' - ' + this.phone + ') is not valid, error code ' + errorCode);
82
89
  return false;
83
90
  }
@@ -87,14 +94,22 @@ export class SallaTelInput {
87
94
  salla.helpers.inputDigitsOnly(this.phoneInput);
88
95
  this.iti = this.TelInput(this.phoneInput, {
89
96
  initialCountry: this.countryCode?.toLowerCase() || 'sa',
90
- preferredCountries: ['sa', 'ae', 'kw', 'bh', 'qa', 'iq', 'om', 'ye', 'eg', 'jo', 'ps', 'sd', 'lb', 'dz', 'tn', 'ma', 'ly'],
97
+ countryOrder: ['sa', 'ae', 'kw', 'bh', 'qa', 'iq', 'om', 'ye', 'eg', 'jo', 'ps', 'sd', 'lb', 'dz', 'tn', 'ma', 'ly'],
91
98
  excludeCountries: ['sy', 'ir', 'cu', 'kp'],
92
99
  formatOnDisplay: false,
93
100
  separateDialCode: true,
94
101
  autoPlaceholder: 'aggressive',
95
- utilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/21.2.7/js/utils.min.js',
102
+ // v26 adds a country-search box to the dropdown by default. Keep it off to
103
+ // preserve the previous (v18) dropdown UX and avoid shipping an unstyled input.
104
+ countrySearch: false,
105
+ // v26 dropped the `utilsScript` URL option in favour of `loadUtils`. We load the
106
+ // utils bundled with the installed package as a lazy chunk (no CDN, version-locked),
107
+ // which carries the up-to-date libphonenumber metadata (e.g. Oman 7[3-5] mobiles).
108
+ loadUtils: () => import('intl-tel-input/utils'),
96
109
  dropdownContainer: this.host
97
110
  });
111
+ // Rejects if the lazy utils chunk fails; swallow so validation still runs.
112
+ this.utilsReady = this.iti.promise.catch(() => { });
98
113
  this.autofocus && this.phoneInput.focus();
99
114
  this.phoneInput.addEventListener("countrychange", () => {
100
115
  let data = this.iti.getSelectedCountryData();
@@ -123,10 +138,11 @@ export class SallaTelInput {
123
138
  }
124
139
  }
125
140
  render() {
126
- return (h(Host, { key: '727fa47d71bd8fd98f76c66b3bafb2348a586303', class: "s-tel-input" }, h("input", { key: '19f5d3e2ff8902733e21f39038f716b18ae065ae', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: 'ad6b735fa4d5574b8717f460171c13a56a031451', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '07c8732dc276613fc5ed2928a2d47af51c49d942', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
141
+ return (h(Host, { key: '1b928e13a8d7784cba93a8a9295d5e2da59380ec', class: "s-tel-input" }, h("input", { key: '351a4e2ba8865b613a7c52127ef312f834116a59', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: 'cac78f5eede19008d46a126c8c96cd963947de1f', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '7aedcb3f86d491f4789226f12812c7023d749eba', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
127
142
  }
128
143
  componentDidLoad() {
129
- this.initTelInput();
144
+ this.initPromise = this.initTelInput();
145
+ this.initPromise.catch(() => { });
130
146
  }
131
147
  static get is() { return "salla-tel-input"; }
132
148
  static get originalStyleUrls() {