@salla.sa/twilight-components 2.14.551 → 2.14.553

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 (348) hide show
  1. package/dist/cjs/apple-pay-order-options-DVyeUqBh.js +90 -0
  2. package/dist/cjs/{filepond-C99K1KEB.js → filepond-i59nX3lz.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-CggRjTNg.js → filepond-plugin-file-poster-BYzX1aNf.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-B009kdAV.js → filepond-plugin-file-validate-size-DycWnZhG.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DZs9-bai.js → filepond-plugin-file-validate-type-z0JXBj53.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-DNNheErX.js → filepond-plugin-image-edit-CJRUCqBQ.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-ChN0IpOy.js → filepond-plugin-image-exif-orientation-DxMxZUYg.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-BZo2ftGo.js → filepond-plugin-image-preview-CjSIPPRf.js} +1 -1
  9. package/dist/cjs/{helpers-DHdDjm5V.js → helpers-Dm4BirHO.js} +2 -2
  10. package/dist/cjs/{index-0JUvtl0d.js → index-BDeMaV8l.js} +20 -24
  11. package/dist/cjs/{intlTelInput-D84-rI5D.js → intlTelInput-YxceQr88.js} +1 -1
  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 +5 -86
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  22. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  24. package/dist/cjs/{salla-bullet-delivery_2.cjs.entry.js → salla-bullet-delivery_3.cjs.entry.js} +60 -3
  25. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  34. package/dist/cjs/{salla-count-down.cjs.entry.js → salla-count-down_2.cjs.entry.js} +209 -1
  35. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
  37. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-gifting.cjs.entry.js +108 -5
  42. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  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.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  55. package/dist/cjs/{salla-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -1
  56. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/{salla-order-options-modal_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -209
  82. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-scopes.cjs.entry.js +4 -2
  91. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  105. package/dist/cjs/twilight.cjs.js +2 -2
  106. package/dist/cjs/{vanilla-picker-D8r5xyK7.js → vanilla-picker-BkTzr0I6.js} +1 -1
  107. package/dist/collection/collection-manifest.json +6 -4
  108. package/dist/collection/components/salla-bullet-delivery/helpers.js +2 -2
  109. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +7 -1
  110. package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.css +70 -0
  111. package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.js +77 -0
  112. package/dist/collection/components/salla-gifting/salla-gifting.css +3 -0
  113. package/dist/collection/components/salla-gifting/salla-gifting.js +106 -3
  114. package/dist/collection/components/salla-scopes/salla-scopes.js +3 -1
  115. package/dist/components/apple-pay-order-options.js +86 -0
  116. package/dist/components/helpers.js +2 -2
  117. package/dist/components/index.js +2 -2
  118. package/dist/components/salla-bullet-delivery-tag.d.ts +11 -0
  119. package/dist/components/salla-bullet-delivery-tag.js +76 -0
  120. package/dist/components/salla-bullet-delivery.js +7 -1
  121. package/dist/components/salla-gifting.js +165 -20
  122. package/dist/components/salla-quick-buy2.js +1 -82
  123. package/dist/components/salla-scopes.js +3 -1
  124. package/dist/esm/apple-pay-order-options-Bg2HuLRr.js +86 -0
  125. package/dist/esm/{filepond-DuMUHI7t.js → filepond-OzvsJA0M.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-poster-Dv25V2UU.js → filepond-plugin-file-poster-CDQfaOXY.js} +1 -1
  127. package/dist/esm/{filepond-plugin-file-validate-size-Dxl4yPm6.js → filepond-plugin-file-validate-size-1vRv7vgS.js} +1 -1
  128. package/dist/esm/{filepond-plugin-file-validate-type-C602myuq.js → filepond-plugin-file-validate-type-pajN7jZu.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-edit-DLd3ht_R.js → filepond-plugin-image-edit-93DCmlU_.js} +1 -1
  130. package/dist/esm/{filepond-plugin-image-exif-orientation-BaQ5DNLu.js → filepond-plugin-image-exif-orientation-CncCUIVb.js} +1 -1
  131. package/dist/esm/{filepond-plugin-image-preview-C-RFNs7l.js → filepond-plugin-image-preview-Mz81wKGp.js} +1 -1
  132. package/dist/esm/{helpers-BDChq2t4.js → helpers-CV6uPJEJ.js} +2 -2
  133. package/dist/esm/{index-BsIeN-bg.js → index-Dx4PTJFl.js} +20 -24
  134. package/dist/esm/{intlTelInput-Cf6zBu5Y.js → intlTelInput-DEYUtZO9.js} +1 -1
  135. package/dist/esm/loader.js +3 -3
  136. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  137. package/dist/esm/salla-accordion_6.entry.js +1 -1
  138. package/dist/esm/salla-add-product-button_5.entry.js +2 -83
  139. package/dist/esm/salla-advertisement.entry.js +1 -1
  140. package/dist/esm/salla-alert_2.entry.js +1 -1
  141. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  142. package/dist/esm/salla-applied-filters.entry.js +1 -1
  143. package/dist/esm/salla-apps-icons.entry.js +1 -1
  144. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  145. package/dist/esm/salla-badge.entry.js +1 -1
  146. package/dist/esm/salla-basket-gap.entry.js +1 -1
  147. package/dist/esm/{salla-bullet-delivery_2.entry.js → salla-bullet-delivery_3.entry.js} +60 -4
  148. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  149. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  150. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  151. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  152. package/dist/esm/salla-comment-factors.entry.js +1 -1
  153. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  154. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  155. package/dist/esm/salla-contacts.entry.js +1 -1
  156. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  157. package/dist/esm/{salla-count-down.entry.js → salla-count-down_2.entry.js} +209 -2
  158. package/dist/esm/salla-custom-fields.entry.js +1 -1
  159. package/dist/esm/salla-delivery-promise.entry.js +2 -2
  160. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  161. package/dist/esm/salla-filters-widget.entry.js +1 -1
  162. package/dist/esm/salla-filters.entry.js +1 -1
  163. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  164. package/dist/esm/salla-gifting.entry.js +108 -5
  165. package/dist/esm/salla-hook.entry.js +1 -1
  166. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  167. package/dist/esm/salla-installment.entry.js +1 -1
  168. package/dist/esm/salla-list-tile.entry.js +1 -1
  169. package/dist/esm/salla-localization-modal.entry.js +1 -1
  170. package/dist/esm/salla-login-modal.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  172. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  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.entry.js +1 -1
  177. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  178. package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
  179. package/dist/esm/salla-menu.entry.js +1 -1
  180. package/dist/esm/salla-metadata.entry.js +1 -1
  181. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  182. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  183. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  184. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  185. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  186. package/dist/esm/salla-offer-modal.entry.js +1 -1
  187. package/dist/esm/salla-offer.entry.js +1 -1
  188. package/dist/esm/salla-order-branch.entry.js +1 -1
  189. package/dist/esm/salla-order-cancel.entry.js +1 -1
  190. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  191. package/dist/esm/salla-order-details-options.entry.js +1 -1
  192. package/dist/esm/salla-order-details.entry.js +1 -1
  193. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  194. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  195. package/dist/esm/salla-order-edit.entry.js +1 -1
  196. package/dist/esm/salla-order-shipments.entry.js +1 -1
  197. package/dist/esm/salla-order-summary.entry.js +1 -1
  198. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  199. package/dist/esm/salla-orders.entry.js +1 -1
  200. package/dist/esm/salla-payments.entry.js +1 -1
  201. package/dist/esm/salla-placeholder.entry.js +1 -1
  202. package/dist/esm/salla-price-range.entry.js +1 -1
  203. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  204. package/dist/esm/{salla-order-options-modal_2.entry.js → salla-product-card.entry.js} +2 -209
  205. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  206. package/dist/esm/salla-products-list.entry.js +1 -1
  207. package/dist/esm/salla-products-slider.entry.js +1 -1
  208. package/dist/esm/salla-quick-order.entry.js +1 -1
  209. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  210. package/dist/esm/salla-rating-modal.entry.js +1 -1
  211. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  212. package/dist/esm/salla-review-order-item.entry.js +1 -1
  213. package/dist/esm/salla-scopes.entry.js +4 -2
  214. package/dist/esm/salla-search.entry.js +1 -1
  215. package/dist/esm/salla-skeleton.entry.js +1 -1
  216. package/dist/esm/salla-social-share.entry.js +1 -1
  217. package/dist/esm/salla-social.entry.js +1 -1
  218. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  219. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  220. package/dist/esm/salla-tooltip.entry.js +1 -1
  221. package/dist/esm/salla-trust-badges.entry.js +1 -1
  222. package/dist/esm/salla-user-menu.entry.js +1 -1
  223. package/dist/esm/salla-user-profile.entry.js +1 -1
  224. package/dist/esm/salla-user-settings.entry.js +1 -1
  225. package/dist/esm/salla-verify.entry.js +1 -1
  226. package/dist/esm/salla-wallet.entry.js +1 -1
  227. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  228. package/dist/esm/twilight.js +3 -3
  229. package/dist/esm/{vanilla-picker-S7qZ7YZm.js → vanilla-picker-43VIKXEr.js} +1 -1
  230. package/dist/twilight/{p-56f164bb.entry.js → p-01dde8da.entry.js} +1 -1
  231. package/dist/twilight/p-05333b72.entry.js +4 -0
  232. package/dist/twilight/{p-13c4b450.entry.js → p-05920338.entry.js} +1 -1
  233. package/dist/twilight/{p-906b36e3.entry.js → p-05ed463f.entry.js} +1 -1
  234. package/dist/twilight/{p-3c2cc4fe.entry.js → p-08c448e7.entry.js} +1 -1
  235. package/dist/twilight/{p-2331e63a.entry.js → p-0f475a9c.entry.js} +1 -1
  236. package/dist/twilight/{p-869fe4c0.entry.js → p-129d396b.entry.js} +1 -1
  237. package/dist/twilight/{p-847cdd79.entry.js → p-12a40f7d.entry.js} +1 -1
  238. package/dist/twilight/{p-22cb8a9c.entry.js → p-144a349d.entry.js} +1 -1
  239. package/dist/twilight/{p-a8316527.entry.js → p-15470633.entry.js} +1 -1
  240. package/dist/twilight/{p-fed3efba.entry.js → p-1627f8c5.entry.js} +1 -1
  241. package/dist/twilight/{p-5918dd8d.entry.js → p-16c9bb12.entry.js} +1 -1
  242. package/dist/twilight/{p-5cd4b67f.entry.js → p-1a0db854.entry.js} +1 -1
  243. package/dist/twilight/{p-9dd126e2.entry.js → p-204db13a.entry.js} +1 -1
  244. package/dist/twilight/{p-0e3d72ab.entry.js → p-21b5ef79.entry.js} +1 -1
  245. package/dist/twilight/{p-b1e0bc90.entry.js → p-21dfba32.entry.js} +1 -1
  246. package/dist/twilight/{p-07adeb89.entry.js → p-24950b7c.entry.js} +1 -1
  247. package/dist/twilight/{p-ea968ba3.entry.js → p-24a5e070.entry.js} +1 -1
  248. package/dist/twilight/{p-0944d367.entry.js → p-26bf1509.entry.js} +1 -1
  249. package/dist/twilight/{p-6f58ac6a.entry.js → p-2718a5f2.entry.js} +1 -1
  250. package/dist/twilight/{p-2a683382.entry.js → p-2941175d.entry.js} +1 -1
  251. package/dist/twilight/{p-aa8962f8.entry.js → p-2dfbb461.entry.js} +1 -1
  252. package/dist/twilight/{p-e3e2baa2.entry.js → p-2f137e63.entry.js} +1 -1
  253. package/dist/twilight/{p-211324e6.entry.js → p-360e4f8e.entry.js} +1 -1
  254. package/dist/twilight/{p-b238c74b.entry.js → p-378efeff.entry.js} +1 -1
  255. package/dist/twilight/{p-2bef08e8.entry.js → p-3b4e2cf3.entry.js} +1 -1
  256. package/dist/twilight/{p-eb3a095b.entry.js → p-3b9cf7e4.entry.js} +1 -1
  257. package/dist/twilight/{p-cdba9d35.entry.js → p-40e417f1.entry.js} +1 -1
  258. package/dist/twilight/{p-18a604c5.entry.js → p-422c19a5.entry.js} +1 -1
  259. package/dist/twilight/{p-a64771f7.entry.js → p-45f512a8.entry.js} +1 -1
  260. package/dist/twilight/{p-49738042.entry.js → p-4be292da.entry.js} +1 -1
  261. package/dist/twilight/{p-6c5a1ded.entry.js → p-50a2be61.entry.js} +1 -1
  262. package/dist/twilight/{p-8ebb86ce.entry.js → p-5197cc6a.entry.js} +1 -1
  263. package/dist/twilight/{p-2ff7bb22.entry.js → p-58ee3cea.entry.js} +1 -1
  264. package/dist/twilight/{p-ecdbd18f.entry.js → p-619a9a6e.entry.js} +1 -1
  265. package/dist/twilight/{p-aa91a230.entry.js → p-6343cd09.entry.js} +1 -1
  266. package/dist/twilight/{p-01406425.entry.js → p-6533ba39.entry.js} +1 -1
  267. package/dist/twilight/{p-6edd1008.entry.js → p-6b62d934.entry.js} +1 -1
  268. package/dist/twilight/{p-357b5593.entry.js → p-6ee230b4.entry.js} +1 -1
  269. package/dist/twilight/{p-a30390a7.entry.js → p-6fffb603.entry.js} +1 -1
  270. package/dist/twilight/{p-f4f355e5.entry.js → p-74510683.entry.js} +1 -1
  271. package/dist/twilight/{p-704553fb.entry.js → p-74a4437f.entry.js} +1 -1
  272. package/dist/twilight/{p-6a746b8a.entry.js → p-7709f0dd.entry.js} +1 -1
  273. package/dist/twilight/{p-1abe8321.entry.js → p-79b4ca8e.entry.js} +1 -1
  274. package/dist/twilight/{p-3fb485a6.entry.js → p-7d3355a8.entry.js} +1 -1
  275. package/dist/twilight/{p-68d754be.entry.js → p-8123e013.entry.js} +1 -1
  276. package/dist/twilight/{p-4ef06a6f.entry.js → p-8137113a.entry.js} +1 -1
  277. package/dist/twilight/{p-5ba2eb55.entry.js → p-8140d052.entry.js} +1 -1
  278. package/dist/twilight/p-8968b284.entry.js +4 -0
  279. package/dist/twilight/{p-9f431f78.entry.js → p-8a57a89a.entry.js} +1 -1
  280. package/dist/twilight/{p-8711224a.entry.js → p-8bb4da9c.entry.js} +1 -1
  281. package/dist/twilight/{p-6d787fa0.entry.js → p-8bb74e84.entry.js} +1 -1
  282. package/dist/twilight/{p-ebc6ba28.entry.js → p-8ff29a31.entry.js} +1 -1
  283. package/dist/twilight/{p-af348a67.entry.js → p-90677c84.entry.js} +1 -1
  284. package/dist/twilight/{p-ef145c1e.entry.js → p-919b40e3.entry.js} +1 -1
  285. package/dist/twilight/{p-6f3516a1.entry.js → p-92a471ea.entry.js} +1 -1
  286. package/dist/twilight/{p-a344db00.entry.js → p-955661c8.entry.js} +1 -1
  287. package/dist/twilight/{p-d5215891.entry.js → p-9c0e3e8f.entry.js} +1 -1
  288. package/dist/twilight/{p-9025e5d9.entry.js → p-9c5571a0.entry.js} +1 -1
  289. package/dist/twilight/{p-BRZVMxhy.js → p-B5U60WIk.js} +2 -2
  290. package/dist/twilight/{p-wqmCmzsY.js → p-BKvFlB2x.js} +1 -1
  291. package/dist/twilight/p-Bg2HuLRr.js +4 -0
  292. package/dist/twilight/{p-DNS31w5e.js → p-C1H-fEuk.js} +1 -1
  293. package/dist/twilight/{p-BDChq2t4.js → p-CV6uPJEJ.js} +1 -1
  294. package/dist/twilight/{p-mgSPapOV.js → p-Cgw3EhC4.js} +1 -1
  295. package/dist/twilight/{p-CPiqlSTo.js → p-ChQewA0U.js} +1 -1
  296. package/dist/twilight/{p-B3oo4tIx.js → p-Dccf61n9.js} +1 -1
  297. package/dist/twilight/{p-BsIeN-bg.js → p-Dx4PTJFl.js} +1 -1
  298. package/dist/twilight/{p-035DwuUC.js → p-HzrPs4_N.js} +1 -1
  299. package/dist/twilight/{p-DeX830vG.js → p-ILDsy-mr.js} +1 -1
  300. package/dist/twilight/{p-9fdbe8a0.entry.js → p-a2c2f78b.entry.js} +25 -25
  301. package/dist/twilight/{p-a3579980.entry.js → p-a2cae5fd.entry.js} +1 -1
  302. package/dist/twilight/{p-2a3d30d1.entry.js → p-a4d28c99.entry.js} +1 -1
  303. package/dist/twilight/{p-a46a9d28.entry.js → p-a7bdbeb1.entry.js} +1 -1
  304. package/dist/twilight/{p-be0ac755.entry.js → p-a7ee89d7.entry.js} +1 -1
  305. package/dist/twilight/{p-1118bee2.entry.js → p-a95b7da2.entry.js} +1 -1
  306. package/dist/twilight/{p-84cffb13.entry.js → p-a965c7da.entry.js} +1 -1
  307. package/dist/twilight/{p-e875f53e.entry.js → p-aa88c61e.entry.js} +1 -1
  308. package/dist/twilight/{p-a037e47d.entry.js → p-acff1e55.entry.js} +1 -1
  309. package/dist/twilight/{p-ff37c2af.entry.js → p-b1d3bdb6.entry.js} +1 -1
  310. package/dist/twilight/{p-2df31e90.entry.js → p-b54f9dd8.entry.js} +1 -1
  311. package/dist/twilight/{p-56845467.entry.js → p-b572b38c.entry.js} +1 -1
  312. package/dist/twilight/p-bdfceb12.entry.js +4 -0
  313. package/dist/twilight/{p-27456209.entry.js → p-be080eb3.entry.js} +1 -1
  314. package/dist/twilight/p-bfd1e64f.entry.js +4 -0
  315. package/dist/twilight/{p-b5a2342c.entry.js → p-c0ff19e0.entry.js} +1 -1
  316. package/dist/twilight/p-c2823b78.entry.js +4 -0
  317. package/dist/twilight/{p-18639885.entry.js → p-c2f2a752.entry.js} +1 -1
  318. package/dist/twilight/{p-523572e9.entry.js → p-c53d45d1.entry.js} +1 -1
  319. package/dist/twilight/{p-3aa6fa7d.entry.js → p-c653dbde.entry.js} +1 -1
  320. package/dist/twilight/{p-f037e508.entry.js → p-c6708390.entry.js} +1 -1
  321. package/dist/twilight/{p-efe6493f.entry.js → p-cabecab4.entry.js} +1 -1
  322. package/dist/twilight/{p-2c48bb97.entry.js → p-cadfb356.entry.js} +1 -1
  323. package/dist/twilight/{p-5dfd449d.entry.js → p-cddaa208.entry.js} +1 -1
  324. package/dist/twilight/{p-a9ef3c52.entry.js → p-d97e4c69.entry.js} +1 -1
  325. package/dist/twilight/{p-0a332226.entry.js → p-e1109a12.entry.js} +1 -1
  326. package/dist/twilight/{p-683db553.entry.js → p-e315d524.entry.js} +1 -1
  327. package/dist/twilight/{p-569c6d6c.entry.js → p-e4dd05a7.entry.js} +1 -1
  328. package/dist/twilight/{p-501c0798.entry.js → p-e5b29085.entry.js} +1 -1
  329. package/dist/twilight/{p-43f8f33b.entry.js → p-e97e121a.entry.js} +1 -1
  330. package/dist/twilight/{p-83a5b8a4.entry.js → p-f1587a83.entry.js} +1 -1
  331. package/dist/twilight/p-f4e80187.entry.js +4 -0
  332. package/dist/twilight/{p-a01f64e7.entry.js → p-f5cff7aa.entry.js} +1 -1
  333. package/dist/twilight/{p-CaCiueRc.js → p-lRRdZqp5.js} +1 -1
  334. package/dist/twilight/twilight.esm.js +1 -1
  335. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +2 -0
  336. package/dist/types/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.d.ts +26 -0
  337. package/dist/types/components/salla-gifting/salla-gifting.d.ts +29 -0
  338. package/dist/types/components.d.ts +77 -0
  339. package/package.json +5 -5
  340. package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
  341. package/dist/esm/salla-map_2.entry.js +0 -832
  342. package/dist/twilight/p-1bf18c56.entry.js +0 -4
  343. package/dist/twilight/p-47713dd1.entry.js +0 -4
  344. package/dist/twilight/p-49f9e536.entry.js +0 -4
  345. package/dist/twilight/p-54974d98.entry.js +0 -4
  346. package/dist/twilight/p-709c2184.entry.js +0 -4
  347. package/dist/twilight/p-90f29c99.entry.js +0 -4
  348. package/dist/twilight/p-a0ed97f5.entry.js +0 -4
@@ -0,0 +1,70 @@
1
+ /*!twlt*/.s-bullet-delivery-tag-wrapper {
2
+ display: flex;
3
+ width: 100%;
4
+ }
5
+ @media (min-width: 1024px) {
6
+ .s-bullet-delivery-tag-wrapper {
7
+ display: inline-flex;
8
+ width: auto;
9
+ }
10
+ .s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-container {
11
+ transform: skewX(-15deg);
12
+ }
13
+ .s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-icon,
14
+ .s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-label {
15
+ transform: skewX(15deg);
16
+ }
17
+ }
18
+ .s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-icon svg {
19
+ width: 1rem;
20
+ height: 1rem;
21
+ fill: currentColor;
22
+ }
23
+ .hidden {
24
+ display: none;
25
+ }
26
+ .shadow {
27
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
28
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
29
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
30
+ }
31
+ .s-bullet-delivery-tag-container {
32
+ display: flex;
33
+ width: 100%;
34
+ align-items: center;
35
+ justify-content: center;
36
+ gap: 0.5rem;
37
+ border-radius: 0px;
38
+ --tw-bg-opacity: 1;
39
+ background-color: rgb(43 191 134 / var(--tw-bg-opacity, 1));
40
+ padding-left: 0.75rem;
41
+ padding-right: 0.75rem;
42
+ padding-top: 0.5rem;
43
+ padding-bottom: 0.5rem;
44
+ --tw-text-opacity: 1;
45
+ color: rgb(255 255 255 / var(--tw-text-opacity, 1));
46
+ }
47
+ @media (min-width: 1024px) {
48
+ .s-bullet-delivery-tag-container {
49
+ display: inline-flex;
50
+ width: auto;
51
+ gap: 0.375rem;
52
+ border-radius: 0.375rem;
53
+ padding-left: 0.875rem;
54
+ padding-right: 0.875rem;
55
+ padding-top: 0.375rem;
56
+ padding-bottom: 0.375rem;
57
+ }
58
+ }
59
+ .s-bullet-delivery-tag-icon {
60
+ display: inline-flex;
61
+ flex-shrink: 0;
62
+ align-items: center;
63
+ justify-content: center;
64
+ }
65
+ .s-bullet-delivery-tag-label {
66
+ white-space: nowrap;
67
+ font-size: 0.875rem;
68
+ line-height: 1.25rem;
69
+ font-weight: 700;
70
+ }
@@ -0,0 +1,77 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { Host, h } from "@stencil/core";
5
+ import FlashIcon from "../../assets/svg/flash.svg";
6
+ /**
7
+ * Backend eligibility flag (Store-Module StoreSettingsAction, PR #1627), nested under the
8
+ * store settings `shipping` attribute. True only when the store is on Pro, Quick Delivery
9
+ * (bullet-delivery) is accessible for customers, and the request carries a resolved scope
10
+ * allocation (the branch resolved during the login-cycle).
11
+ */
12
+ const ELIGIBILITY_FLAG_KEY = 'store.shipping.has_bullet_delivery_tag';
13
+ /**
14
+ * @name SallaBulletDeliveryTag
15
+ * @description Fixed "Quick Delivery" tag for the storefront homepage header
16
+ * (e.g. "توصيل خلال ساعتين" / "Delivery within 2 hours").
17
+ *
18
+ * Eligibility is decided entirely by the backend and delivered as a single
19
+ * boolean, `store.shipping.has_bullet_delivery_tag` (Store-Module
20
+ * `StoreSettingsAction::isQuickDeliveryEligible`). The backend sets it true only
21
+ * when the store is on Pro, Quick Delivery (`bullet-delivery`) is accessible for
22
+ * customers, and the request already carries a resolved scope allocation (the
23
+ * branch resolved during the login-cycle). The flag is recomputed per branch and
24
+ * re-injected on each page load — including after the login-cycle reload — so the
25
+ * tag re-evaluates naturally without a client-side eligibility gate.
26
+ *
27
+ * Read-only: no network request; renders nothing when not eligible (fail-safe —
28
+ * never a broken/half tag, no layout shift).
29
+ * @tag salla-bullet-delivery-tag
30
+ */
31
+ export class SallaBulletDeliveryTag {
32
+ constructor() {
33
+ /** Mirrors the backend `has_bullet_delivery_tag` flag; drives whether the tag renders. */
34
+ this.isEligible = false;
35
+ }
36
+ async componentWillLoad() {
37
+ try {
38
+ await salla.onReady();
39
+ await salla.lang.onLoaded();
40
+ this.isEligible = salla.config.get(ELIGIBILITY_FLAG_KEY) === true;
41
+ }
42
+ catch (e) {
43
+ // Any read/await failure → stay hidden (fail-safe).
44
+ salla?.logger?.warn?.('salla-bullet-delivery-tag: init failed', e);
45
+ this.isEligible = false;
46
+ }
47
+ }
48
+ /** Fixed tag copy. Localized via lang key when present, otherwise a language-aware default. */
49
+ getTagLabel() {
50
+ const fallback = salla.config.get('user.language_code') === 'en'
51
+ ? 'Get it within 2 hours'
52
+ : 'توصيل خلال ساعتين';
53
+ return salla.lang.getWithDefault('pages.products.quick_delivery_tag', fallback);
54
+ }
55
+ render() {
56
+ if (!this.isEligible) {
57
+ return null;
58
+ }
59
+ return (h(Host, { class: "s-bullet-delivery-tag-wrapper" }, h("span", { class: "s-bullet-delivery-tag-container", "data-testid": "bd-tag" }, h("span", { class: "s-bullet-delivery-tag-icon", innerHTML: FlashIcon }), h("span", { class: "s-bullet-delivery-tag-label" }, this.getTagLabel()))));
60
+ }
61
+ static get is() { return "salla-bullet-delivery-tag"; }
62
+ static get originalStyleUrls() {
63
+ return {
64
+ "$": ["salla-bullet-delivery-tag.scss"]
65
+ };
66
+ }
67
+ static get styleUrls() {
68
+ return {
69
+ "$": ["salla-bullet-delivery-tag.css"]
70
+ };
71
+ }
72
+ static get states() {
73
+ return {
74
+ "isEligible": {}
75
+ };
76
+ }
77
+ }
@@ -74,6 +74,9 @@
74
74
  .mt-1 {
75
75
  margin-top: 0.25rem;
76
76
  }
77
+ .block {
78
+ display: block;
79
+ }
77
80
  .inline {
78
81
  display: inline;
79
82
  }
@@ -8,12 +8,17 @@ import LeftArrow from "../../assets/svg/arrow-left.svg";
8
8
  import Cancel from "../../assets/svg/cancel.svg";
9
9
  import GiftSharing from "../../assets/svg/gift-sharing.svg";
10
10
  import Alert from "../../assets/svg/alert.svg";
11
+ import { appendOrderOptionsToPayload } from "../salla-order-options-modal/apple-pay-order-options";
11
12
  /**
12
13
  * @slot widget-btn-content - Used to customize widget button content.
13
14
  */
14
15
  export class SallaGifting {
15
16
  constructor() {
16
17
  this.defaultEvent = "gifting:open";
18
+ /** Order options picked in the pre-gift modal, sent as `order_options` with the gift payload. */
19
+ this.collectedOrderOptions = [];
20
+ /** Live PDP price, kept in sync by `onPriceUpdated`, used to seed the order-options total. */
21
+ this.livePrice = 0;
17
22
  this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
18
23
  this.currentStep = 1;
19
24
  this.showCalendar = false;
@@ -156,10 +161,12 @@ export class SallaGifting {
156
161
  return null;
157
162
  }
158
163
  componentDidLoad() {
159
- salla.event.product.onPriceUpdated(() => {
164
+ salla.event.product.onPriceUpdated((response) => {
160
165
  const quantityInput = document.querySelector(`.s-quantity-input-input`);
161
166
  // @ts-ignore
162
167
  this.quantity = quantityInput?.value;
168
+ // Seeds the order-options modal total so it reflects the current variant/quantity price.
169
+ this.livePrice = Number(response?.data?.price) || this.livePrice;
163
170
  });
164
171
  }
165
172
  getFormDataFromForm() {
@@ -184,6 +191,93 @@ export class SallaGifting {
184
191
  }
185
192
  return formData;
186
193
  }
194
+ /**
195
+ * Order-options gate. Two shapes, because the two gifting entry points already differ:
196
+ *
197
+ * - **Cart page**: the order-option forms are rendered inline and synced to the cart on change,
198
+ * so gifting reuses the cart-submit check — block on invalid, never re-ask in a modal.
199
+ * - **PDP**: nothing renders the options, so they're collected in the shared
200
+ * <salla-order-options-modal> *before* the gifting modal, the same modal and sequence the PDP
201
+ * uses for Quick Purchase and Apple Pay.
202
+ *
203
+ * Returns false when the buyer must fix something first (invalid inline form, or a dismissed
204
+ * modal); the gifting modal then stays closed and they retry from the widget button.
205
+ */
206
+ async collectOrderOptions() {
207
+ this.collectedOrderOptions = [];
208
+ if (!this.productId) {
209
+ return this.validateInlineCartOptions();
210
+ }
211
+ const { products, basePrice } = this.getOrderOptionsTarget();
212
+ if (!products.length) {
213
+ return true;
214
+ }
215
+ let response;
216
+ try {
217
+ response = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions(products));
218
+ }
219
+ catch (error) {
220
+ salla?.logger?.warn?.('order-options: fetch failed', error);
221
+ return true;
222
+ }
223
+ const orderOptions = response?.data?.order_options || [];
224
+ if (!orderOptions.length) {
225
+ return true;
226
+ }
227
+ const price = basePrice > 0 ? basePrice : Number(response?.data?.products?.[0]?.price?.amount) || 0;
228
+ try {
229
+ const result = await this.ensureOrderOptionsModal().open({ orderOptions, basePrice: price });
230
+ this.collectedOrderOptions = result?.orderOptions || [];
231
+ return true;
232
+ }
233
+ catch {
234
+ // dismissed — keep the gifting modal closed.
235
+ return false;
236
+ }
237
+ }
238
+ /**
239
+ * Same check the theme runs on cart submit: every `form[id^="item-"]` (cart items *and* the
240
+ * inline order-option forms) must be valid. Values are already on the cart — each form syncs
241
+ * through `cart.updateItem` on change — so nothing is collected here, gifting is only blocked.
242
+ */
243
+ validateInlineCartOptions() {
244
+ const forms = document.querySelectorAll('form[id^="item-"]');
245
+ let isValid = true;
246
+ forms.forEach(form => {
247
+ if (!form.reportValidity()) {
248
+ isValid = false;
249
+ }
250
+ });
251
+ if (!isValid) {
252
+ salla.error(salla.lang.get('common.messages.required_fields'));
253
+ }
254
+ return isValid;
255
+ }
256
+ /** What to ask order options for on the PDP. `basePrice` seeds the modal's live total. */
257
+ getOrderOptionsTarget() {
258
+ return {
259
+ products: [{ id: this.productId, quantity: this.getGiftQuantity() }],
260
+ basePrice: this.livePrice,
261
+ };
262
+ }
263
+ /** `quantity` state is only seeded on price updates, so fall back to the product form. */
264
+ getGiftQuantity() {
265
+ const fromState = Number(this.quantity);
266
+ if (Number.isFinite(fromState) && fromState > 0) {
267
+ return fromState;
268
+ }
269
+ const fromForm = Number(this.getFormDataFromForm()?.get('quantity'));
270
+ return Number.isFinite(fromForm) && fromForm > 0 ? fromForm : 1;
271
+ }
272
+ /** Get-or-create the singleton order-options modal on <body>. */
273
+ ensureOrderOptionsModal() {
274
+ let modal = document.querySelector('salla-order-options-modal');
275
+ if (!modal) {
276
+ modal = document.createElement('salla-order-options-modal');
277
+ document.body.appendChild(modal);
278
+ }
279
+ return modal;
280
+ }
187
281
  /**
188
282
  * Show / Open the gifting modal window
189
283
  */
@@ -193,6 +287,12 @@ export class SallaGifting {
193
287
  salla.event.dispatch('login::open', { withoutReload: true });
194
288
  return;
195
289
  }
290
+ // Required customizations can't be bypassed by gifting: the order-options modal runs first, and
291
+ // dismissing it keeps the gifting modal closed. Runs here (not in the button handler) so the
292
+ // `gifting:open` event and the after-login re-entry go through the same gate.
293
+ if (!(await this.collectOrderOptions())) {
294
+ return;
295
+ }
196
296
  // Reopen on step 1, but KEEP the user's selections (image / text / custom
197
297
  // message / sender+receiver). The modal element is never destroyed, so its
198
298
  // state and DOM survive close→reopen without a page refresh — we only reset
@@ -697,6 +797,9 @@ export class SallaGifting {
697
797
  formData = this.getFormDataFromForm() || new FormData();
698
798
  formData = this.mergeObjectToFormData(giftPayload, formData);
699
799
  }
800
+ // PDP flow only — the cart flow's options are already on the cart, and the API keeps existing
801
+ // selections when the request carries no `order_options`.
802
+ appendOrderOptionsToPayload(formData ?? giftPayload, this.collectedOrderOptions);
700
803
  const addGiftMethod = this.productId
701
804
  ? () => salla.product.addProductGiftToCart(this.productId, formData, true)
702
805
  : () => salla.cart.addCartGiftToCart(giftPayload, true);
@@ -749,7 +852,7 @@ export class SallaGifting {
749
852
  }
750
853
  render() {
751
854
  return [
752
- h("div", { key: '3795180f3f719218220086c66f6bfbe6e57dc1d4' }, h("salla-list-tile", { key: 'cb9fd3e10b02bb429b25c028fcd2d328e73eab6e', class: this.generateClass() }, h("div", { key: 'cca448eae1144b0606bf8f07844974cd7f966236', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'c33210bdf1a72cdf0151138ce2949fc462efaf94' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '007fc138265e6ab82dbdfab8169baa407b111e60', slot: "subtitle" }, h("div", { key: '89de9cc780511609d294f67a3d639a0305300b17' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'ea647e47079ab8e57580675f485bc99c2b213cd4', slot: "action" }, h("salla-button", { key: 'e87bcc03e5ab02204ca9f1d590421cae13282269', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: 'ce294391f8c18e345ec2117a15e2942dd00790fc', name: "widget-btn-content" }, h("div", { key: '7106257d9f44b869fcd3933ae8a1d2a50f4486dd', class: "s-gifting-widget-action-content" }, h("span", { key: '305822ae865b6da9275ced4600933d83d42e54e7', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '13f2d03213e1fea9fe9911a94259b89085406ab3' }, this.sectionBtnText)))))), h("salla-modal", { key: 'b55185fbd34776043661ca6f15a739e34e98e0ef', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '9f59cea6e2835d80e24bc269b78a5bc47b354f6a', slot: "loading" }, h("div", { key: '3f74f3384be120a0733e921de696d2beeccd49ce', class: "s-gifting-skeleton" }, h("div", { key: 'e3ffb5b8d712bc391ad6b4190556ac870e37db0c', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'b9b154ab445516fa1fae66cc458dd68114024d9d', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '1ecf5c6ea1ebeccbd6ed7f259045647148863826', class: "s-gifting-modal-title" }, h("div", { key: '165d927a3bcaf47dd5c7657db8543ad02b47dc44', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: 'cba1667fa446566c5bc862c206313d8f48a0991e', height: '15px', width: '150px' })))), h("div", { key: 'f56f8e8820f789ca117a0e19cf660bc4d836ec6a', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '74b8cec4be6e18ec8a1b340d8fed0b2d136bb1d3', height: '10px', width: '150px' }), h("salla-skeleton", { key: '5c615a0c0eb72908e601c2cfd28fe12a6391ef80', height: '230px' }), h("salla-skeleton", { key: '5c432b6e3f8c70574e1d05d26f57443ff5da45fe', height: '10px', width: '150px' }), h("salla-skeleton", { key: '7f5d7ec5cf3ef50f945e2a57363ac215e41f306b', height: '30px' }), h("salla-skeleton", { key: '47c0e823643dc9c2d4908dde353adf5b0e4355ad', height: '40px' })))), h("slot", { key: '3ad3a57a07cb8182e5cd86783ba19c8ae8f34d3b', name: "header" }), !!this.hasError ?
855
+ h("div", { key: 'fd15533a1dbb57c0bbf31d66046b7051b63221d7' }, h("salla-list-tile", { key: 'b6f298371176e3fc829a8f0a7de775adbc70f903', class: this.generateClass() }, h("div", { key: '46c0dfc5d7d89576d411b5765d92a72b3dd289ba', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: 'd0b9bbd243458f9ea25aa7a970d3084d16ca56a8' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '0ac470d3daa813ca8177e9f92c9c0eec402784b0', slot: "subtitle" }, h("div", { key: 'a783624dfe67959544cd70b3a087ccd004fb517f' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'd76689c03fdff0aa9ff50323227a191e8aa7aa11', slot: "action" }, h("salla-button", { key: '1516f29ca50b92f78a8f7e5a07daa9e70740dae9', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '9d9b070b98e7a60736ca87347b0982a3034681a2', name: "widget-btn-content" }, h("div", { key: '4813d5f3bf85c3f5a0eefb5bd5478a009b6aceb2', class: "s-gifting-widget-action-content" }, h("span", { key: '738760ee256892c2f654ebae06877ca6cdaf0bec', innerHTML: GiftSharing }), " \u00A0", h("span", { key: 'bb181feda8126bd541517dabe107c44ab4da177a' }, this.sectionBtnText)))))), h("salla-modal", { key: '0d4478c6d9cf6bd1e75e81dca234c05af9303e0e', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'cea9b69f0af18a825f1cf4ac979fb571cc4b497f', slot: "loading" }, h("div", { key: '8190baa4b26d4de58ea98a4bd3662a54ca024e3a', class: "s-gifting-skeleton" }, h("div", { key: '6271ba338d1e85c5337f9b4956b2b0eb1c610669', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '77fb7f73e5dd748b69c9ed7263e3cefc9b24d643', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '4e436f8ad10aad25ffb84632973376855c0d803d', class: "s-gifting-modal-title" }, h("div", { key: '98c17840dd15e6d8495bd709a76d257001a3c2f3', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9582b325011b36f5dbb7bf70a044554e339af05a', height: '15px', width: '150px' })))), h("div", { key: 'd95d5c41fb226a654e62c183fcababcf1a1af9b5', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '73ee2dd11f30ad370261a9b88324f40a52607973', height: '10px', width: '150px' }), h("salla-skeleton", { key: '8b07be46818f49401a5c7aae8a19de0445e9785e', height: '230px' }), h("salla-skeleton", { key: '6a7a9ff47ad18efdfc51d2c70dba6cf89c572974', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f033c20b65077bfa99fb302415e10ff55f2d112d', height: '30px' }), h("salla-skeleton", { key: '60bf4740d16b9cf852536315b62d1abafc14e4d5', height: '40px' })))), h("slot", { key: 'eac7b126556b6895457fdd0c87f15b872975947f', name: "header" }), !!this.hasError ?
753
856
  h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
754
857
  :
755
858
  [
@@ -772,7 +875,7 @@ export class SallaGifting {
772
875
  h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
773
876
  h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
774
877
  h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: LeftArrow, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
775
- ], h("slot", { key: '4b5e340be26e46c09508d192207fa6af9ec0cc44', name: "footer" })))
878
+ ], h("slot", { key: '8f516d4a4275f867f0564ef7aa187fb2bcc1e32f', name: "footer" })))
776
879
  ];
777
880
  }
778
881
  static get is() { return "salla-gifting"; }
@@ -39,7 +39,9 @@ export class SallaScopees {
39
39
  ? "blocks.scope.shopping_from_another_market"
40
40
  : "blocks.scope.shopping_from_another_branch");
41
41
  }
42
- return salla.lang.get('blocks.scope.search_for_availability_in_other_branches');
42
+ return salla.lang.get(isMultiCountries
43
+ ? 'blocks.scope.search_for_availability_in_other_markets'
44
+ : 'blocks.scope.search_for_availability_in_other_branches');
43
45
  };
44
46
  salla.event.on('scopes::open', ({ mode = null, product_id = null } = {}) => {
45
47
  this.open(mode, product_id);
@@ -0,0 +1,86 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ /**
5
+ * Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
6
+ * Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
7
+ * the ApplePaySession and drives it via callbacks.
8
+ */
9
+ /** Get-or-create the singleton order-options modal on <body>. */
10
+ function ensureOrderOptionsModal() {
11
+ let modal = document.querySelector('salla-order-options-modal');
12
+ if (!modal) {
13
+ modal = document.createElement('salla-order-options-modal');
14
+ document.body.appendChild(modal);
15
+ }
16
+ return modal;
17
+ }
18
+ /** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
19
+ function reportProductOptionsValiditySync(productId) {
20
+ const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
21
+ if (!optionsElement)
22
+ return true;
23
+ const requiredInputs = optionsElement.querySelectorAll('[required]');
24
+ let pass = true;
25
+ requiredInputs.forEach((input) => {
26
+ if (input.disabled || input.closest('.hidden'))
27
+ return;
28
+ if ('reportValidity' in input && !input.reportValidity())
29
+ pass = false;
30
+ });
31
+ return pass;
32
+ }
33
+ /** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
34
+ function appendOrderOptionsToPayload(data, orderOptions) {
35
+ if (!orderOptions.length)
36
+ return;
37
+ if (data && typeof data.append === 'function') {
38
+ orderOptions.forEach((entry, i) => {
39
+ data.append(`order_options[${i}][id]`, String(entry.id));
40
+ data.append(`order_options[${i}][value]`, String(entry.value));
41
+ });
42
+ return;
43
+ }
44
+ if (data && typeof data === 'object') {
45
+ data.order_options = orderOptions;
46
+ }
47
+ }
48
+ /**
49
+ * Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
50
+ * caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
51
+ * found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
52
+ */
53
+ async function resolveApplePayOrderOptions(opts) {
54
+ let resp;
55
+ try {
56
+ resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
57
+ }
58
+ catch (error) {
59
+ salla?.logger?.warn?.('order-options: fetch failed', error);
60
+ opts.beginPendingSession();
61
+ return;
62
+ }
63
+ const items = resp?.data?.order_options || [];
64
+ if (!items.length) {
65
+ opts.beginPendingSession(); // begin() doesn't need a fresh gesture
66
+ return;
67
+ }
68
+ opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
69
+ const basePrice = Number(opts.amount) > 0
70
+ ? Number(opts.amount)
71
+ : Number(resp?.data?.products?.[0]?.price?.amount) || 0;
72
+ const modal = ensureOrderOptionsModal();
73
+ try {
74
+ await modal.open({
75
+ orderOptions: items,
76
+ basePrice,
77
+ paymentMode: 'apple-pay',
78
+ onSubmit: opts.onSubmit,
79
+ });
80
+ }
81
+ catch {
82
+ // dismissed — no live session
83
+ }
84
+ }
85
+
86
+ export { reportProductOptionsValiditySync as a, appendOrderOptionsToPayload as b, resolveApplePayOrderOptions as r };
@@ -258,11 +258,11 @@ const filterBranches = (branches, searchQuery) => {
258
258
  };
259
259
  const getIntentSubtitle = (intent, toAddress, fromBranch) => {
260
260
  if (intent.type === 'branch') {
261
- const loc = intent.branch_details?.city ?? intent.branch_details?.name;
261
+ const loc = [intent.branch_details?.country, intent.branch_details?.city, intent.branch_details?.district].filter(Boolean).join('، ');
262
262
  return loc ? `${fromBranch} ${loc}`.trim() : '';
263
263
  }
264
264
  if (intent.type === 'address' && intent.address_details) {
265
- const addr = [intent.address_details.district?.name, intent.address_details.city?.name, intent.address_details.country?.name].filter(Boolean).join('، ') || intent.address_details.short_address || '';
265
+ const addr = [intent.address_details.country?.name, intent.address_details.city?.name, intent.address_details.district?.name].filter(Boolean).join('، ') || intent.address_details.short_address || '';
266
266
  return addr ? `${toAddress} ${addr}`.trim() : '';
267
267
  }
268
268
  return '';