@salla.sa/twilight-components 3.0.17 → 3.0.19

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 (408) hide show
  1. package/dist/cjs/{Helper-DSYelC4c.js → Helper-DqKJCL8G.js} +1 -1
  2. package/dist/cjs/{filepond-l9D0Yv7b.js → filepond-Byu0lc8z.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-8SrbLptI.js → filepond-plugin-file-poster-qwx7lYZ-.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-DGD6oJy0.js → filepond-plugin-file-validate-size-C-n0P4TT.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-BIvrhp3w.js → filepond-plugin-file-validate-type-C8VOOXdT.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-4xKikdXG.js → filepond-plugin-image-edit-B9KG763Y.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C3BvwxQh.js → filepond-plugin-image-exif-orientation-Czt4pYzU.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CBq_GY0V.js → filepond-plugin-image-preview-BFm1Zl0o.js} +1 -1
  9. package/dist/cjs/free-shipping-timer-6QBe5BNS.js +156 -0
  10. package/dist/cjs/helpers-NV7wgP50.js +602 -0
  11. package/dist/cjs/{index-BAwxpXnB.js → index-CFW798jX.js} +2 -2
  12. package/dist/cjs/{intlTelInput-xw-HaAEN.js → intlTelInput-CLa2B89b.js} +1 -1
  13. package/dist/cjs/loader.cjs.js +2 -2
  14. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  16. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +46 -3
  17. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
  21. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  23. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +590 -134
  26. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +95 -9
  42. package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +18 -5
  43. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-gifting.cjs.entry.js +13 -6
  46. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-login-modal.cjs.entry.js +7 -2
  52. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  67. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-items.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-order-rewards.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  85. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-products-list.cjs.entry.js +13 -5
  92. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  93. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +7 -4
  95. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  96. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  101. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-thank-you-header.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  108. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  109. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  110. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  111. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  112. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  113. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  114. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  115. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +2 -2
  116. package/dist/cjs/twilight.cjs.js +2 -2
  117. package/dist/cjs/{vanilla-picker-Cm_uNdps.js → vanilla-picker-Vx_7G7bs.js} +1 -1
  118. package/dist/collection/components/salla-bullet-delivery/api-service.js +156 -25
  119. package/dist/collection/components/salla-bullet-delivery/helpers.js +143 -15
  120. package/dist/collection/components/salla-bullet-delivery/icons.js +17 -0
  121. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +490 -52
  122. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +489 -106
  123. package/dist/collection/components/salla-bullet-delivery/selector-tracker.js +106 -0
  124. package/dist/collection/components/salla-free-shipping-banner/salla-free-shipping-banner.css +18 -4
  125. package/dist/collection/components/salla-free-shipping-banner/salla-free-shipping-banner.js +94 -11
  126. package/dist/collection/components/salla-free-shipping-tag/salla-free-shipping-tag.css +6 -0
  127. package/dist/collection/components/salla-free-shipping-tag/salla-free-shipping-tag.js +18 -2
  128. package/dist/collection/components/salla-gifting/salla-gifting.css +16 -1
  129. package/dist/collection/components/salla-gifting/salla-gifting.js +11 -4
  130. package/dist/collection/components/salla-login-modal/salla-login-modal.js +6 -1
  131. package/dist/collection/components/salla-products-list/salla-products-list.js +11 -3
  132. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +44 -1
  133. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +5 -2
  134. package/dist/collection/shared/free-shipping-timer.js +130 -0
  135. package/dist/components/free-shipping-timer.js +150 -0
  136. package/dist/components/helpers.js +299 -40
  137. package/dist/components/index.js +2 -2
  138. package/dist/components/salla-bullet-delivery.js +595 -133
  139. package/dist/components/salla-free-shipping-banner.js +95 -8
  140. package/dist/components/salla-free-shipping-tag.js +17 -3
  141. package/dist/components/salla-gifting.js +12 -5
  142. package/dist/components/salla-login-modal2.js +6 -1
  143. package/dist/components/salla-products-list2.js +11 -3
  144. package/dist/components/salla-quick-buy2.js +44 -1
  145. package/dist/components/salla-rating-modal-v22.js +5 -2
  146. package/dist/docs.json +25 -5
  147. package/dist/esm/{Helper-POCi7J93.js → Helper-I0CAizv1.js} +1 -1
  148. package/dist/esm/{filepond-Ct76xW02.js → filepond-DTUYXV0J.js} +1 -1
  149. package/dist/esm/{filepond-plugin-file-poster-C1OkzGRs.js → filepond-plugin-file-poster-DydZjneT.js} +1 -1
  150. package/dist/esm/{filepond-plugin-file-validate-size-gdd-69cO.js → filepond-plugin-file-validate-size-nbsCU2t9.js} +1 -1
  151. package/dist/esm/{filepond-plugin-file-validate-type-BaZ2QTzl.js → filepond-plugin-file-validate-type-Cl5B_DIy.js} +1 -1
  152. package/dist/esm/{filepond-plugin-image-edit-CsoNvf0i.js → filepond-plugin-image-edit-bzskFyFR.js} +1 -1
  153. package/dist/esm/{filepond-plugin-image-exif-orientation-BHDSe3nH.js → filepond-plugin-image-exif-orientation-MBDuxLaX.js} +1 -1
  154. package/dist/esm/{filepond-plugin-image-preview-CD_S17z3.js → filepond-plugin-image-preview-N6wzEryW.js} +1 -1
  155. package/dist/esm/free-shipping-timer-CnTwkF6y.js +150 -0
  156. package/dist/esm/helpers-Cnh7Qptl.js +568 -0
  157. package/dist/esm/{index-DmGAR42j.js → index-C9zdeQFI.js} +2 -2
  158. package/dist/esm/{intlTelInput-D76Q4XFx.js → intlTelInput-B5L9nYtO.js} +1 -1
  159. package/dist/esm/loader.js +3 -3
  160. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  161. package/dist/esm/salla-accordion_6.entry.js +2 -2
  162. package/dist/esm/salla-add-product-button_5.entry.js +46 -3
  163. package/dist/esm/salla-advertisement.entry.js +1 -1
  164. package/dist/esm/salla-alert_2.entry.js +1 -1
  165. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  166. package/dist/esm/salla-applied-filters.entry.js +2 -2
  167. package/dist/esm/salla-apps-icons.entry.js +1 -1
  168. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  169. package/dist/esm/salla-badge.entry.js +1 -1
  170. package/dist/esm/salla-basket-gap.entry.js +1 -1
  171. package/dist/esm/salla-bullet-delivery_3.entry.js +590 -134
  172. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  173. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  174. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  175. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  176. package/dist/esm/salla-comment-factors.entry.js +1 -1
  177. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  178. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  179. package/dist/esm/salla-contacts.entry.js +1 -1
  180. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  181. package/dist/esm/salla-count-down.entry.js +1 -1
  182. package/dist/esm/salla-custom-fields.entry.js +1 -1
  183. package/dist/esm/salla-delivery-promise.entry.js +2 -2
  184. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  185. package/dist/esm/salla-filters-widget.entry.js +2 -2
  186. package/dist/esm/salla-filters.entry.js +2 -2
  187. package/dist/esm/salla-free-shipping-banner.entry.js +94 -8
  188. package/dist/esm/salla-free-shipping-tag.entry.js +17 -4
  189. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  190. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  191. package/dist/esm/salla-gifting.entry.js +13 -6
  192. package/dist/esm/salla-hook.entry.js +1 -1
  193. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  194. package/dist/esm/salla-installment.entry.js +1 -1
  195. package/dist/esm/salla-list-tile.entry.js +1 -1
  196. package/dist/esm/salla-localization-modal.entry.js +1 -1
  197. package/dist/esm/salla-login-modal.entry.js +7 -2
  198. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  199. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  200. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  201. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  202. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  203. package/dist/esm/salla-loyalty.entry.js +1 -1
  204. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  205. package/dist/esm/salla-map_3.entry.js +1 -1
  206. package/dist/esm/salla-menu.entry.js +1 -1
  207. package/dist/esm/salla-metadata.entry.js +1 -1
  208. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  209. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  210. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  211. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  212. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  213. package/dist/esm/salla-offer-modal.entry.js +1 -1
  214. package/dist/esm/salla-offer.entry.js +1 -1
  215. package/dist/esm/salla-order-branch.entry.js +1 -1
  216. package/dist/esm/salla-order-cancel.entry.js +1 -1
  217. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  218. package/dist/esm/salla-order-details-options.entry.js +1 -1
  219. package/dist/esm/salla-order-details.entry.js +1 -1
  220. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  221. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  222. package/dist/esm/salla-order-edit.entry.js +1 -1
  223. package/dist/esm/salla-order-items.entry.js +1 -1
  224. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  225. package/dist/esm/salla-order-payment.entry.js +1 -1
  226. package/dist/esm/salla-order-rewards.entry.js +1 -1
  227. package/dist/esm/salla-order-shipments.entry.js +1 -1
  228. package/dist/esm/salla-order-summary.entry.js +1 -1
  229. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  230. package/dist/esm/salla-orders.entry.js +2 -2
  231. package/dist/esm/salla-payments.entry.js +1 -1
  232. package/dist/esm/salla-placeholder.entry.js +1 -1
  233. package/dist/esm/salla-price-range.entry.js +1 -1
  234. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  235. package/dist/esm/salla-product-card.entry.js +1 -1
  236. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  237. package/dist/esm/salla-products-list.entry.js +13 -5
  238. package/dist/esm/salla-products-slider.entry.js +2 -2
  239. package/dist/esm/salla-quick-order.entry.js +1 -1
  240. package/dist/esm/salla-rating-modal-v2.entry.js +7 -4
  241. package/dist/esm/salla-rating-modal.entry.js +2 -2
  242. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  243. package/dist/esm/salla-review-order-item.entry.js +1 -1
  244. package/dist/esm/salla-scopes.entry.js +1 -1
  245. package/dist/esm/salla-search-product-card.entry.js +1 -1
  246. package/dist/esm/salla-search.entry.js +2 -2
  247. package/dist/esm/salla-skeleton.entry.js +1 -1
  248. package/dist/esm/salla-social-share.entry.js +1 -1
  249. package/dist/esm/salla-social.entry.js +1 -1
  250. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  251. package/dist/esm/salla-thank-you-header.entry.js +1 -1
  252. package/dist/esm/salla-thank-you-page.entry.js +1 -1
  253. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  254. package/dist/esm/salla-trust-badges.entry.js +1 -1
  255. package/dist/esm/salla-user-menu.entry.js +1 -1
  256. package/dist/esm/salla-user-profile.entry.js +1 -1
  257. package/dist/esm/salla-user-settings.entry.js +1 -1
  258. package/dist/esm/salla-verify.entry.js +1 -1
  259. package/dist/esm/salla-wallet.entry.js +1 -1
  260. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  261. package/dist/esm/salla-wishlist-summary.entry.js +2 -2
  262. package/dist/esm/twilight.js +3 -3
  263. package/dist/esm/{vanilla-picker-BlIXJyvJ.js → vanilla-picker-CAeu4f87.js} +1 -1
  264. package/dist/twilight/{p-84d725d4.entry.js → p-01d5cd61.entry.js} +1 -1
  265. package/dist/twilight/{p-60f4357f.entry.js → p-0213fde4.entry.js} +1 -1
  266. package/dist/twilight/{p-8f0af317.entry.js → p-036fbfc0.entry.js} +1 -1
  267. package/dist/twilight/{p-90d4129f.entry.js → p-0add41ce.entry.js} +1 -1
  268. package/dist/twilight/{p-fed66bcb.entry.js → p-0b0d4942.entry.js} +1 -1
  269. package/dist/twilight/{p-86ca22d5.entry.js → p-17bcbf9b.entry.js} +1 -1
  270. package/dist/twilight/{p-b66df976.entry.js → p-1867f7d4.entry.js} +1 -1
  271. package/dist/twilight/p-194ff38c.entry.js +4 -0
  272. package/dist/twilight/{p-4057b692.entry.js → p-20f9c62f.entry.js} +1 -1
  273. package/dist/twilight/{p-783c6346.entry.js → p-252748d9.entry.js} +1 -1
  274. package/dist/twilight/{p-3d5e862c.entry.js → p-290ce0bc.entry.js} +1 -1
  275. package/dist/twilight/{p-d68625f7.entry.js → p-2b930157.entry.js} +1 -1
  276. package/dist/twilight/{p-184ea04c.entry.js → p-2e4e15c5.entry.js} +1 -1
  277. package/dist/twilight/p-2e6537a3.entry.js +4 -0
  278. package/dist/twilight/{p-2a3e2404.entry.js → p-30d64bd1.entry.js} +1 -1
  279. package/dist/twilight/{p-5d4fadd2.entry.js → p-32495dd2.entry.js} +1 -1
  280. package/dist/twilight/{p-cd7029fc.entry.js → p-32d9da31.entry.js} +1 -1
  281. package/dist/twilight/{p-7e854633.entry.js → p-32f100f8.entry.js} +1 -1
  282. package/dist/twilight/{p-dc3ff1f0.entry.js → p-386b3dcd.entry.js} +1 -1
  283. package/dist/twilight/{p-e8090773.entry.js → p-3a4e86d1.entry.js} +1 -1
  284. package/dist/twilight/{p-a0a57259.entry.js → p-3b766a79.entry.js} +1 -1
  285. package/dist/twilight/{p-a5d2ad5e.entry.js → p-3b7a45ec.entry.js} +1 -1
  286. package/dist/twilight/{p-33ff7967.entry.js → p-3bb0e184.entry.js} +1 -1
  287. package/dist/twilight/{p-8b39a9f7.entry.js → p-3cc6ca6c.entry.js} +1 -1
  288. package/dist/twilight/{p-0a794d6f.entry.js → p-4070f808.entry.js} +1 -1
  289. package/dist/twilight/{p-d2c1457e.entry.js → p-412fb721.entry.js} +1 -1
  290. package/dist/twilight/{p-fce39869.entry.js → p-427c13b6.entry.js} +1 -1
  291. package/dist/twilight/{p-49195cb6.entry.js → p-45e0a5d0.entry.js} +1 -1
  292. package/dist/twilight/{p-cd866be6.entry.js → p-4d615f9f.entry.js} +1 -1
  293. package/dist/twilight/{p-4f794057.entry.js → p-4d7fc363.entry.js} +1 -1
  294. package/dist/twilight/{p-9eb92980.entry.js → p-5009f654.entry.js} +1 -1
  295. package/dist/twilight/{p-f4411a04.entry.js → p-50853b76.entry.js} +1 -1
  296. package/dist/twilight/{p-b9695308.entry.js → p-550ad1a6.entry.js} +1 -1
  297. package/dist/twilight/{p-4839d408.entry.js → p-575014c4.entry.js} +1 -1
  298. package/dist/twilight/{p-f10b887a.entry.js → p-5aee5e44.entry.js} +1 -1
  299. package/dist/twilight/{p-622bfb21.entry.js → p-619c709c.entry.js} +1 -1
  300. package/dist/twilight/{p-74f206cf.entry.js → p-6d572fe0.entry.js} +1 -1
  301. package/dist/twilight/{p-26fec98c.entry.js → p-6f84c662.entry.js} +1 -1
  302. package/dist/twilight/{p-4a1aa85f.entry.js → p-703b9253.entry.js} +1 -1
  303. package/dist/twilight/{p-509ad773.entry.js → p-73dea22d.entry.js} +1 -1
  304. package/dist/twilight/{p-6c7cae8a.entry.js → p-74285af9.entry.js} +1 -1
  305. package/dist/twilight/{p-31260fae.entry.js → p-777d28f6.entry.js} +1 -1
  306. package/dist/twilight/{p-4702959a.entry.js → p-7db6ccfe.entry.js} +1 -1
  307. package/dist/twilight/{p-e89a1905.entry.js → p-7db8d545.entry.js} +1 -1
  308. package/dist/twilight/{p-0c6a024f.entry.js → p-7fa4d0b6.entry.js} +1 -1
  309. package/dist/twilight/{p-2e8f95d0.entry.js → p-825c5b73.entry.js} +1 -1
  310. package/dist/twilight/{p-e5545546.entry.js → p-8262e669.entry.js} +1 -1
  311. package/dist/twilight/{p-bab5d057.entry.js → p-86d55a6b.entry.js} +1 -1
  312. package/dist/twilight/{p-0225f396.entry.js → p-8712f7c7.entry.js} +1 -1
  313. package/dist/twilight/{p-a53e2c74.entry.js → p-8948b58c.entry.js} +1 -1
  314. package/dist/twilight/{p-37b68ef3.entry.js → p-8b8cf457.entry.js} +1 -1
  315. package/dist/twilight/{p-8e8e40bc.entry.js → p-8c2992e7.entry.js} +1 -1
  316. package/dist/twilight/{p-eb160c2e.entry.js → p-8c548259.entry.js} +1 -1
  317. package/dist/twilight/{p-5d775867.entry.js → p-8eb3fd92.entry.js} +1 -1
  318. package/dist/twilight/p-908716fb.entry.js +4 -0
  319. package/dist/twilight/{p-62ba0971.entry.js → p-90a59027.entry.js} +1 -1
  320. package/dist/twilight/{p-ae9c0abe.entry.js → p-9683535f.entry.js} +1 -1
  321. package/dist/twilight/{p-89cff0c8.entry.js → p-982e9124.entry.js} +1 -1
  322. package/dist/twilight/{p-a17784e6.entry.js → p-995b898f.entry.js} +1 -1
  323. package/dist/twilight/{p-3a3d4cb7.entry.js → p-99cb3dba.entry.js} +1 -1
  324. package/dist/twilight/{p-6757344a.entry.js → p-9a0218a6.entry.js} +1 -1
  325. package/dist/twilight/{p-7d337f25.entry.js → p-9cf31ff4.entry.js} +1 -1
  326. package/dist/twilight/{p-d495cce0.entry.js → p-9d1a5007.entry.js} +1 -1
  327. package/dist/twilight/{p-57b93850.entry.js → p-9e429047.entry.js} +1 -1
  328. package/dist/twilight/{p-40083f25.entry.js → p-9e542951.entry.js} +1 -1
  329. package/dist/twilight/{p-Dhq3oJAe.js → p-BcT9tEVW.js} +1 -1
  330. package/dist/twilight/{p-Dza6OBFg.js → p-Bgu5gtOF.js} +1 -1
  331. package/dist/twilight/p-C9zdeQFI.js +5 -0
  332. package/dist/twilight/{p-BbZqYBfp.js → p-CSGj1pY-.js} +1 -1
  333. package/dist/twilight/{p-Nyk6-1lq.js → p-CWWgpQ8Q.js} +1 -1
  334. package/dist/twilight/{p-BwzmoZpm.js → p-Cfz9xit3.js} +1 -1
  335. package/dist/twilight/{p-iCJI7qYe.js → p-CmYSalnM.js} +1 -1
  336. package/dist/twilight/p-CnTwkF6y.js +4 -0
  337. package/dist/twilight/p-Cnh7Qptl.js +4 -0
  338. package/dist/twilight/{p-DVWVl151.js → p-Dav_R_d2.js} +1 -1
  339. package/dist/twilight/{p-B7rn1taO.js → p-JGEddAgs.js} +1 -1
  340. package/dist/twilight/{p-CAc7tX2K.js → p-RflSBQNB.js} +1 -1
  341. package/dist/twilight/{p-De2wEjqS.js → p-Xgbueas7.js} +1 -1
  342. package/dist/twilight/{p-64d49f5d.entry.js → p-a070cce0.entry.js} +1 -1
  343. package/dist/twilight/p-a0bfedad.entry.js +4 -0
  344. package/dist/twilight/{p-bf29daf3.entry.js → p-a22d9931.entry.js} +1 -1
  345. package/dist/twilight/{p-2153c6fd.entry.js → p-a3959219.entry.js} +1 -1
  346. package/dist/twilight/p-a3ca61af.entry.js +4 -0
  347. package/dist/twilight/{p-0e1248c4.entry.js → p-a55b5c44.entry.js} +1 -1
  348. package/dist/twilight/{p-24423a8d.entry.js → p-a5fc8358.entry.js} +1 -1
  349. package/dist/twilight/{p-66f6d722.entry.js → p-aabcd09f.entry.js} +1 -1
  350. package/dist/twilight/{p-4c801f91.entry.js → p-ad00021e.entry.js} +1 -1
  351. package/dist/twilight/{p-fae2a8d0.entry.js → p-ade9a68c.entry.js} +1 -1
  352. package/dist/twilight/{p-83ccad19.entry.js → p-b5e0065a.entry.js} +1 -1
  353. package/dist/twilight/{p-2a8d6e7e.entry.js → p-bbb09d92.entry.js} +1 -1
  354. package/dist/twilight/{p-f034968b.entry.js → p-c2df20f8.entry.js} +1 -1
  355. package/dist/twilight/{p-b38c38fe.entry.js → p-c4274188.entry.js} +1 -1
  356. package/dist/twilight/{p-d63ce284.entry.js → p-c5e2c781.entry.js} +1 -1
  357. package/dist/twilight/{p-07450aed.entry.js → p-c64b2b22.entry.js} +1 -1
  358. package/dist/twilight/{p-14752d03.entry.js → p-c92cc92f.entry.js} +1 -1
  359. package/dist/twilight/{p-d6c5bf2a.entry.js → p-cb54adac.entry.js} +1 -1
  360. package/dist/twilight/{p-7750bace.entry.js → p-ce1e45a3.entry.js} +1 -1
  361. package/dist/twilight/{p-e4d90663.entry.js → p-d0acd7ff.entry.js} +1 -1
  362. package/dist/twilight/{p-f9b9af72.entry.js → p-d0f903ac.entry.js} +1 -1
  363. package/dist/twilight/{p-7df4ee74.entry.js → p-d57b49ff.entry.js} +1 -1
  364. package/dist/twilight/p-db3efb27.entry.js +4 -0
  365. package/dist/twilight/{p-e81c4521.entry.js → p-db73d0bf.entry.js} +1 -1
  366. package/dist/twilight/{p-bfb70998.entry.js → p-e20d5e75.entry.js} +1 -1
  367. package/dist/twilight/{p-1982520c.entry.js → p-e223beca.entry.js} +1 -1
  368. package/dist/twilight/{p-20939237.entry.js → p-e37da59f.entry.js} +1 -1
  369. package/dist/twilight/p-e3991836.entry.js +4 -0
  370. package/dist/twilight/{p-fe413496.entry.js → p-e455709f.entry.js} +1 -1
  371. package/dist/twilight/{p-cc2c52bb.entry.js → p-e921b2d1.entry.js} +1 -1
  372. package/dist/twilight/{p-acd48ae7.entry.js → p-ec356e5a.entry.js} +1 -1
  373. package/dist/twilight/{p-7a985c8c.entry.js → p-eeefc285.entry.js} +1 -1
  374. package/dist/twilight/{p-120b4694.entry.js → p-f3b12754.entry.js} +1 -1
  375. package/dist/twilight/{p-c3c99d9e.entry.js → p-f6279a13.entry.js} +1 -1
  376. package/dist/twilight/{p-b819de23.entry.js → p-f83efc62.entry.js} +1 -1
  377. package/dist/twilight/{p-8b43035f.entry.js → p-fa622715.entry.js} +1 -1
  378. package/dist/twilight/{p-b87ea253.entry.js → p-faf00404.entry.js} +1 -1
  379. package/dist/twilight/twilight.esm.js +1 -1
  380. package/dist/types/components/salla-bullet-delivery/api-service.d.ts +23 -7
  381. package/dist/types/components/salla-bullet-delivery/helpers.d.ts +61 -6
  382. package/dist/types/components/salla-bullet-delivery/icons.d.ts +14 -0
  383. package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +36 -1
  384. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +82 -3
  385. package/dist/types/components/salla-bullet-delivery/selector-tracker.d.ts +30 -0
  386. package/dist/types/components/salla-free-shipping-banner/salla-free-shipping-banner.d.ts +19 -5
  387. package/dist/types/components/salla-free-shipping-tag/salla-free-shipping-tag.d.ts +6 -1
  388. package/dist/types/components/salla-gifting/salla-gifting.d.ts +1 -0
  389. package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +6 -0
  390. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +1 -0
  391. package/dist/types/components.d.ts +11 -25
  392. package/dist/types/shared/free-shipping-timer.d.ts +36 -0
  393. package/package.json +5 -5
  394. package/dist/cjs/free-shipping-DkIKD6ch.js +0 -31
  395. package/dist/cjs/helpers-8bMfm_mm.js +0 -329
  396. package/dist/components/free-shipping.js +0 -29
  397. package/dist/esm/free-shipping-Brg4wsgg.js +0 -29
  398. package/dist/esm/helpers-DqzaeXrL.js +0 -309
  399. package/dist/twilight/p-12a8aed8.entry.js +0 -4
  400. package/dist/twilight/p-4f443e36.entry.js +0 -4
  401. package/dist/twilight/p-5b81a3d9.entry.js +0 -4
  402. package/dist/twilight/p-93f26336.entry.js +0 -4
  403. package/dist/twilight/p-Brg4wsgg.js +0 -4
  404. package/dist/twilight/p-DmGAR42j.js +0 -5
  405. package/dist/twilight/p-DqzaeXrL.js +0 -4
  406. package/dist/twilight/p-c7c868b4.entry.js +0 -4
  407. package/dist/twilight/p-d5a2ba68.entry.js +0 -4
  408. package/dist/twilight/p-f8ff074f.entry.js +0 -4
@@ -1,4 +1,6 @@
1
1
  import { type EventEmitter } from "../../stencil-public-runtime";
2
+ import { type SelectorTrigger } from "./selector-tracker";
3
+ import type { BranchDiscountRange } from "./helpers";
2
4
  import type { AddressCreatedEvent, Branch, BulletDeliveryConfirmedEvent, City, Country, District, HeaderContextUpdateEvent, IntentType, NewAddressFormData, Region, SavedAddress } from "./interfaces";
3
5
  import { type LocationPermissionState } from "./location-permission-notice";
4
6
  import { type Coordinates } from "./location-distance-warning";
@@ -12,6 +14,8 @@ export declare class SallaBulletDelivery {
12
14
  private pendingCartSubmitResolver;
13
15
  private pendingCartSubmitPromise;
14
16
  private cartSubmitConfirmationPending;
17
+ /** Query the current branch list was searched with server-side; its results are not re-filtered locally. */
18
+ private branchesServerQuery;
15
19
  private branchSearchDebounceTimer;
16
20
  private countrySearchTimer;
17
21
  private regionSearchTimer;
@@ -38,6 +42,10 @@ export declare class SallaBulletDelivery {
38
42
  private hasExplicitPreselectedIdsForOpen;
39
43
  private bulletDeliveryOpenHandler;
40
44
  private closeHandler;
45
+ private readonly selectorTracker;
46
+ private openTrigger;
47
+ private pendingDismissReason;
48
+ private modalCloseHandler;
41
49
  private bulletDeliveryMobileSelectHandler;
42
50
  /** True after saved addresses have been loaded (lazy: only when address tab is shown). */
43
51
  private savedAddressesLoaded;
@@ -48,6 +56,8 @@ export declare class SallaBulletDelivery {
48
56
  * coordinates re-picked, or the map left) can be told apart from the current one. */
49
57
  private geocodeRequestId;
50
58
  private isRTL;
59
+ /** Identifies the latest pickup-offer fetch so one from an earlier modal open is dropped. */
60
+ private pickupDiscountRequestId;
51
61
  activeTab: IntentType;
52
62
  isLoggedIn: boolean;
53
63
  viewMode: ViewMode;
@@ -66,9 +76,33 @@ export declare class SallaBulletDelivery {
66
76
  /** True when user selected the session address (guest address from before login, not yet saved) */
67
77
  selectedSessionAddress: boolean;
68
78
  branches: Branch[];
79
+ /** Pickup offer range across the store's branches (INV-1416); null shows the default tab badge. */
80
+ pickupDiscountRange: BranchDiscountRange | null;
81
+ /** False until the offer lookup settles, so the tab never flashes the default badge before an offer. */
82
+ pickupDiscountResolved: boolean;
69
83
  filteredBranches: Branch[];
70
84
  selectedBranch: Branch | null;
71
85
  branchSearchQuery: string;
86
+ /** Cities that have branches in the selected country (from the unfiltered branch list). */
87
+ branchCities: {
88
+ id: number;
89
+ name: string;
90
+ }[];
91
+ selectedBranchCity: {
92
+ id: number;
93
+ name: string;
94
+ } | null;
95
+ branchCitySearchQuery: string;
96
+ /** Branch whose weekly hours are expanded behind the chevron (one at a time). */
97
+ expandedScheduleBranchId: number | null;
98
+ /** Shopper's device location for branch distances (see getGrantedDeviceLocation). */
99
+ private shopperLocation;
100
+ private shopperLocationRequestId;
101
+ private nearestBranchRequestId;
102
+ /** Bumped per branch-list request; overlapping city/search loads only apply the latest one. */
103
+ private branchesRequestId;
104
+ /** Shared country rows and city options expire with the API cache. */
105
+ private allBranchCities;
72
106
  loadingCountries: boolean;
73
107
  loadingCities: boolean;
74
108
  loadingDistricts: boolean;
@@ -152,11 +186,14 @@ export declare class SallaBulletDelivery {
152
186
  * successful auto-confirm never flashes the saved-addresses list; the caller is
153
187
  * responsible for revealing the modal itself if it still needs the customer's input.
154
188
  */
155
- open(silent?: boolean): Promise<void>;
189
+ open(silent?: boolean, trigger?: SelectorTrigger): Promise<void>;
156
190
  /**
157
191
  * Closes the bullet delivery modal
158
192
  */
159
193
  close(): Promise<HTMLElement>;
194
+ private selectorContext;
195
+ private handleModalVisibility;
196
+ private trackSelectorResult;
160
197
  private resetState;
161
198
  private getIntentStorage;
162
199
  private getShownStorage;
@@ -207,6 +244,8 @@ export declare class SallaBulletDelivery {
207
244
  private loadDistricts;
208
245
  private findPrefillDistrict;
209
246
  private loadBranches;
247
+ /** Reuse the country's city collection while keeping visible choices usable during loading. */
248
+ private refreshBranchCities;
210
249
  /**
211
250
  * Store a freshly fetched branch list and reconcile the current selection with it.
212
251
  * `selectedBranch` is a snapshot from selection time: when the refreshed list carries the
@@ -214,6 +253,13 @@ export declare class SallaBulletDelivery {
214
253
  * A selection missing from the list (e.g. filtered out by a search) is left untouched.
215
254
  */
216
255
  private applyLoadedBranches;
256
+ /** Shares a fresh branch collection with the picker on each modal open. */
257
+ private loadPickupDiscountRange;
258
+ /**
259
+ * ar: "خصم 25%" / "خصم 5 – 25%" / "خصم 10 ر.س"; en: "25% discount" / "5 – 25% discount" / "10 SAR discount".
260
+ * Money may carry the riyal-symbol SVG, so it renders as HTML.
261
+ */
262
+ private getPickupDiscountLabel;
217
263
  private filterBranches;
218
264
  /**
219
265
  * Prefill form fields from session storage
@@ -239,7 +285,10 @@ export declare class SallaBulletDelivery {
239
285
  private loadBranchesWithLocation;
240
286
  /** Locate nearest branch using device geolocation (branches tab only). */
241
287
  private handleFindNearestBranch;
288
+ private geolocationErrorMessage;
242
289
  private handleBranchSelect;
290
+ private handleBranchCitySelected;
291
+ private toggleBranchSchedule;
243
292
  /**
244
293
  * Restore a remembered / event-provided branch — but only one the list renders as selectable,
245
294
  * so a branch that has closed since it was remembered is never silently preselected (INV-1407).
@@ -314,6 +363,17 @@ export declare class SallaBulletDelivery {
314
363
  private renderMapCountryNotice;
315
364
  /** Center shown before geolocation resolves — the customer's IP-based default (falls back to Riyadh). */
316
365
  private get mapInitialCenter();
366
+ /** Device location for a branch list request, waiting at most BRANCH_LIST_LOCATION_WAIT. */
367
+ private getListLocation;
368
+ /**
369
+ * Where branch distances (`distance_km`) are measured from: the shopper's real device location
370
+ * only. It comes from "nearest to my location", or is read silently when location permission was
371
+ * already granted (never prompting). Empty otherwise: `user.default_geo_location` and the Riyadh
372
+ * map fallback are not where the shopper is, so they would show wrong distances.
373
+ */
374
+ private getGrantedDeviceLocation;
375
+ /** The customer's IP-based `user.default_geo_location`, or null when it is missing or invalid. */
376
+ private get defaultGeoLocation();
317
377
  /** Parse a config coordinate to a finite number, treating blank/whitespace strings as missing. */
318
378
  private toCoordinate;
319
379
  /**
@@ -391,10 +451,16 @@ export declare class SallaBulletDelivery {
391
451
  private getCartViewConfig;
392
452
  /** Creates the cart view DOM for mounting into cart.items.start hook */
393
453
  private createCartViewElement;
454
+ /**
455
+ * A branch pickup offer (INV-1416) replaces the default "save delivery fees" badge; only one shows,
456
+ * and neither until the offer lookup settles.
457
+ */
458
+ private renderPickupTabBadge;
394
459
  private renderTabs;
395
460
  private renderAlert;
396
461
  private renderAllocationOutOfCoverageAlert;
397
462
  private handleCountrySelected;
463
+ /** `showLabel` is off in the pickup filter panel, where the selects sit label-less side by side. */
398
464
  private renderCountrySelect;
399
465
  private handleRegionSelected;
400
466
  /** Region select (SA only): shown when SA is selected; city and district disabled until region selected. */
@@ -418,10 +484,23 @@ export declare class SallaBulletDelivery {
418
484
  private renderDeliveryTab;
419
485
  private renderGuestDeliveryContent;
420
486
  private renderBranchSearch;
421
- /** Renders a branch's `preparation_time_range` as a localized "from - to <unit>" label. */
422
- private getPreparationTimeLabel;
423
487
  private renderBranchList;
488
+ /** "يبعد عنك: ~" stays muted; the distance and its unit read as the value, as in checkout. */
489
+ private renderDistanceLabel;
490
+ private get isArabic();
491
+ private formatClock;
492
+ /** "جاهز اليوم 10:00 ص" for a branch that is closed now and opens later today. */
493
+ private getReadyTodayLabel;
494
+ /** "15-30 د" — compact preparation range for the card's meta row. */
495
+ private getPreparationShortLabel;
496
+ /**
497
+ * Busy, always-open, or the backend's `open_status_line` ("مفتوح - يغلق عند 11:00 م"), which reads
498
+ * the hours on the branch's clock. Without that line, `is_open` gives a bare open/closed label.
499
+ */
500
+ private renderBranchOpenStatus;
424
501
  private renderPickupTab;
502
+ /** City filter for the pickup list; options come from the branches themselves, so none is empty. */
503
+ private renderBranchCitySelect;
425
504
  /** Add-address form: map + confirm card in one screen, or dropdown fallback. */
426
505
  private renderAddAddressForm;
427
506
  private renderFooter;
@@ -0,0 +1,30 @@
1
+ import type { BulletDeliveryResult } from "./interfaces";
2
+ export type SelectorTrigger = "first_visit" | "after_add_to_cart" | "on_cart_click" | "incomplete_intent" | "checkout_gate" | "after_login" | "customer_requested";
3
+ export type SelectorCloseReason = "escape" | "backdrop" | "close_button";
4
+ export interface SelectorContext {
5
+ configured_required: boolean;
6
+ effective_nonclosable: boolean;
7
+ trigger_configured: string | null;
8
+ trigger_actual: SelectorTrigger;
9
+ }
10
+ export interface SelectorResult {
11
+ outcome: "accepted" | "failed";
12
+ fulfilment_method: "pickup" | "delivery";
13
+ previous_branch_ids: number[];
14
+ new_branch_ids: number[];
15
+ scope_id: number | null;
16
+ }
17
+ export declare const toCloseReason: (reason?: string) => SelectorCloseReason;
18
+ export declare const allocatedBranchIds: (intent: BulletDeliveryResult | null) => number[];
19
+ export declare class SelectorTracker {
20
+ private impressionId;
21
+ private visibleAt;
22
+ viewed(context: SelectorContext): void;
23
+ dismissed(context: SelectorContext, reason: SelectorCloseReason, hadAcceptedSelection: boolean): void;
24
+ result(context: SelectorContext, result: SelectorResult): void;
25
+ private guarded;
26
+ private send;
27
+ private session;
28
+ private storageName;
29
+ private save;
30
+ }
@@ -1,15 +1,29 @@
1
+ import { FreeShippingTimerState } from '../../shared/free-shipping-timer';
1
2
  export type BannerPlacement = 'home' | 'product';
2
- /**
3
- * Non-dismissible banner announcing the store's free shipping offer.
4
- * Where it is rendered (`placement`) decides which banner data is requested, and the
5
- * response decides whether it is shown.
6
- */
7
3
  export declare class SallaFreeShippingBanner {
8
4
  /** Where the banner is rendered: the home page or the product page. */
9
5
  placement: BannerPlacement;
6
+ host: HTMLElement | undefined;
10
7
  locale: string;
8
+ /** Whether free shipping applies here (feature on and the eligibility check passed). */
11
9
  visible: boolean;
10
+ timer: FreeShippingTimerState | null;
11
+ private tick;
12
+ private measuredBar;
13
+ private unsubscribe;
14
+ private colorScheme;
15
+ private onColorSchemeChange;
16
+ connectedCallback(): void;
17
+ disconnectedCallback(): void;
12
18
  componentWillLoad(): Promise<void>;
19
+ private refreshTimer;
20
+ private stopTick;
21
+ /**
22
+ * The timer chip is drawn from the theme's own colours: solid in the text colour ("ink")
23
+ * with the nearest opaque background behind the banner ("paper") as its text colour.
24
+ */
25
+ private measureInkAndPaper;
26
+ componentDidRender(): void;
13
27
  /** Store translation wins, the built-in label is the fallback for the current language. */
14
28
  private label;
15
29
  render(): any;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Small "free shipping" tag for a product. Meant to be placed below the price in any
3
- * product card.
3
+ * product card. It follows the free shipping banner: while the banner's countdown is over and the
4
+ * banner is hidden, the tag is hidden too.
4
5
  */
5
6
  export declare class SallaFreeShippingTag {
6
7
  /** The product to show the tag for. */
@@ -11,7 +12,11 @@ export declare class SallaFreeShippingTag {
11
12
  showFreeShipping: boolean;
12
13
  host: HTMLElement | undefined;
13
14
  isFree: boolean;
15
+ timerHidden: boolean;
14
16
  label: string;
17
+ private unsubscribe;
18
+ disconnectedCallback(): void;
19
+ private refreshTimer;
15
20
  componentWillLoad(): Promise<void>;
16
21
  render(): any;
17
22
  }
@@ -77,6 +77,7 @@ export declare class SallaGifting {
77
77
  private step2Animated;
78
78
  private stepAnimationTimer;
79
79
  private static readonly CITY_AJAX_THRESHOLD;
80
+ private static readonly CUSTOM_TEXT_MAX_LENGTH;
80
81
  private static readonly CITY_SEARCH_DEBOUNCE_MS;
81
82
  private citySearchTimer;
82
83
  private citySearchCounter;
@@ -111,6 +111,9 @@ export declare class SallaQuickBuy {
111
111
  requireLogin: EventEmitter<{
112
112
  productId: string;
113
113
  }>;
114
+ /** The guest picked "continue as guest" on the login step, so don't ask again. */
115
+ private choseGuest;
116
+ private cancelLoginAsk;
114
117
  private quickBuyHandler;
115
118
  /** Sync PDP-option validity (preserves the AP gesture); emits + notifies on failure. */
116
119
  private validatePdpOptionsSync;
@@ -135,6 +138,9 @@ export declare class SallaQuickBuy {
135
138
  private resolveSupportedNetworks;
136
139
  private settlePayment;
137
140
  private legacyQuickPurchaseFallback;
141
+ /** login-before-checkout variant: offer login or guest before buy now. Not for Apple Pay, which must open on the tap. */
142
+ private shouldAskLoginFirst;
143
+ private askLoginFirst;
138
144
  private isGuestCheckout;
139
145
  private isGuestCheckoutAllowed;
140
146
  private getRequiredShippingContactFields;
@@ -67,6 +67,7 @@ export declare class SallaRatingModalV2 {
67
67
  private steps;
68
68
  private dots;
69
69
  private submitted;
70
+ private isSubmitting;
70
71
  private thanksCountdownInterval;
71
72
  private MAX_IMAGE_UPLOAD_LIMIT;
72
73
  private MAX_VIDEO_UPLOAD_LIMIT;
@@ -12,6 +12,7 @@ import { Attachment as Attachment1 } from "./components/salla-attachment-view/sa
12
12
  import { Option } from "./components/salla-booking-field/interfaces";
13
13
  import { SallaBookingFieldInvalidInputEvent } from "./components/salla-booking-field/salla-booking-field";
14
14
  import { AddressCreatedEvent, BulletDeliveryConfirmedEvent, HeaderContextUpdateEvent } from "./components/salla-bullet-delivery/interfaces";
15
+ import { SelectorTrigger } from "./components/salla-bullet-delivery/selector-tracker";
15
16
  import { Coupon } from "./components/salla-cart-coupons/interfaces";
16
17
  import { Color, Options } from "./components/salla-color-picker/interfaces";
17
18
  import { Comment, CommentSort, CommentType, ReviewFactor } from "./components/salla-comments/interfaces";
@@ -58,6 +59,7 @@ export { Attachment as Attachment1 } from "./components/salla-attachment-view/sa
58
59
  export { Option } from "./components/salla-booking-field/interfaces";
59
60
  export { SallaBookingFieldInvalidInputEvent } from "./components/salla-booking-field/salla-booking-field";
60
61
  export { AddressCreatedEvent, BulletDeliveryConfirmedEvent, HeaderContextUpdateEvent } from "./components/salla-bullet-delivery/interfaces";
62
+ export { SelectorTrigger } from "./components/salla-bullet-delivery/selector-tracker";
61
63
  export { Coupon } from "./components/salla-cart-coupons/interfaces";
62
64
  export { Color, Options } from "./components/salla-color-picker/interfaces";
63
65
  export { Comment, CommentSort, CommentType, ReviewFactor } from "./components/salla-comments/interfaces";
@@ -425,7 +427,7 @@ export namespace Components {
425
427
  /**
426
428
  * Opens the bullet delivery modal. Pass `silent: true` to run the same state/data loading below without showing the modal — used by tryAutoConfirmAfterLogin() so a successful auto-confirm never flashes the saved-addresses list; the caller is responsible for revealing the modal itself if it still needs the customer's input.
427
429
  */
428
- "open": (silent?: boolean) => Promise<void>;
430
+ "open": (silent?: boolean, trigger?: SelectorTrigger) => Promise<void>;
429
431
  }
430
432
  /**
431
433
  * @name SallaBulletDeliveryTag
@@ -1552,11 +1554,6 @@ export namespace Components {
1552
1554
  */
1553
1555
  "withLoadMore": boolean;
1554
1556
  }
1555
- /**
1556
- * Non-dismissible banner announcing the store's free shipping offer.
1557
- * Where it is rendered (`placement`) decides which banner data is requested, and the
1558
- * response decides whether it is shown.
1559
- */
1560
1557
  interface SallaFreeShippingBanner {
1561
1558
  /**
1562
1559
  * Where the banner is rendered: the home page or the product page.
@@ -1566,7 +1563,8 @@ export namespace Components {
1566
1563
  }
1567
1564
  /**
1568
1565
  * Small "free shipping" tag for a product. Meant to be placed below the price in any
1569
- * product card.
1566
+ * product card. It follows the free shipping banner: while the banner's countdown is over and the
1567
+ * banner is hidden, the tag is hidden too.
1570
1568
  */
1571
1569
  interface SallaFreeShippingTag {
1572
1570
  /**
@@ -4616,11 +4614,6 @@ declare global {
4616
4614
  prototype: HTMLSallaFiltersWidgetElement;
4617
4615
  new (): HTMLSallaFiltersWidgetElement;
4618
4616
  };
4619
- /**
4620
- * Non-dismissible banner announcing the store's free shipping offer.
4621
- * Where it is rendered (`placement`) decides which banner data is requested, and the
4622
- * response decides whether it is shown.
4623
- */
4624
4617
  interface HTMLSallaFreeShippingBannerElement extends Components.SallaFreeShippingBanner, HTMLStencilElement {
4625
4618
  }
4626
4619
  var HTMLSallaFreeShippingBannerElement: {
@@ -4629,7 +4622,8 @@ declare global {
4629
4622
  };
4630
4623
  /**
4631
4624
  * Small "free shipping" tag for a product. Meant to be placed below the price in any
4632
- * product card.
4625
+ * product card. It follows the free shipping banner: while the banner's countdown is over and the
4626
+ * banner is hidden, the tag is hidden too.
4633
4627
  */
4634
4628
  interface HTMLSallaFreeShippingTagElement extends Components.SallaFreeShippingTag, HTMLStencilElement {
4635
4629
  }
@@ -7311,11 +7305,6 @@ declare namespace LocalJSX {
7311
7305
  */
7312
7306
  "withLoadMore"?: boolean;
7313
7307
  }
7314
- /**
7315
- * Non-dismissible banner announcing the store's free shipping offer.
7316
- * Where it is rendered (`placement`) decides which banner data is requested, and the
7317
- * response decides whether it is shown.
7318
- */
7319
7308
  interface SallaFreeShippingBanner {
7320
7309
  /**
7321
7310
  * Where the banner is rendered: the home page or the product page.
@@ -7325,7 +7314,8 @@ declare namespace LocalJSX {
7325
7314
  }
7326
7315
  /**
7327
7316
  * Small "free shipping" tag for a product. Meant to be placed below the price in any
7328
- * product card.
7317
+ * product card. It follows the free shipping banner: while the banner's countdown is over and the
7318
+ * banner is hidden, the tag is hidden too.
7329
7319
  */
7330
7320
  interface SallaFreeShippingTag {
7331
7321
  /**
@@ -9794,15 +9784,11 @@ declare module "@stencil/core" {
9794
9784
  "salla-file-upload": LocalJSX.SallaFileUpload & JSXBase.HTMLAttributes<HTMLSallaFileUploadElement>;
9795
9785
  "salla-filters": LocalJSX.SallaFilters & JSXBase.HTMLAttributes<HTMLSallaFiltersElement>;
9796
9786
  "salla-filters-widget": LocalJSX.SallaFiltersWidget & JSXBase.HTMLAttributes<HTMLSallaFiltersWidgetElement>;
9797
- /**
9798
- * Non-dismissible banner announcing the store's free shipping offer.
9799
- * Where it is rendered (`placement`) decides which banner data is requested, and the
9800
- * response decides whether it is shown.
9801
- */
9802
9787
  "salla-free-shipping-banner": LocalJSX.SallaFreeShippingBanner & JSXBase.HTMLAttributes<HTMLSallaFreeShippingBannerElement>;
9803
9788
  /**
9804
9789
  * Small "free shipping" tag for a product. Meant to be placed below the price in any
9805
- * product card.
9790
+ * product card. It follows the free shipping banner: while the banner's countdown is over and the
9791
+ * banner is hidden, the tag is hidden too.
9806
9792
  */
9807
9793
  "salla-free-shipping-tag": LocalJSX.SallaFreeShippingTag & JSXBase.HTMLAttributes<HTMLSallaFreeShippingTagElement>;
9808
9794
  /**
@@ -0,0 +1,36 @@
1
+ export interface FreeShippingTimerState {
2
+ /** Whether the banner (and the free shipping tag) may be shown right now. */
3
+ visible: boolean;
4
+ /** While visible: time left on the countdown. While hidden: 0. */
5
+ remainingMs: number;
6
+ /** Time until `visible` flips. */
7
+ nextChangeMs: number;
8
+ }
9
+ /** The countdown and hidden period, from the store settings with 45 hours and 7 days as the fallback. */
10
+ export declare function getTimerSettings(): {
11
+ countdownMs: number;
12
+ hiddenMs: number;
13
+ };
14
+ /** The timer exists only for visitors the backend allowed the banner for. */
15
+ export declare function isTimerEnabled(): boolean;
16
+ /** When the visitor first saw the banner, or null if they have not yet. */
17
+ export declare function getStartedAt(): number | null;
18
+ /**
19
+ * Records the first time the visitor saw the banner. Does nothing when it is already recorded
20
+ * or when the feature is off.
21
+ */
22
+ export declare function startTimerIfNeeded(now?: number): number | null;
23
+ /**
24
+ * Where the visitor is in the repeating cycle: `countdown` visible, then `hidden` hidden, again and again.
25
+ * Nothing but the first-seen time is stored, so changed settings apply on the next check.
26
+ */
27
+ export declare function computeTimerState(startedAt: number, now: number, countdownMs: number, hiddenMs: number): FreeShippingTimerState;
28
+ /**
29
+ * The state the banner and tags follow. `null` means there is nothing to follow: the feature is off
30
+ * or the visitor has not seen the banner yet.
31
+ */
32
+ export declare function getFreeShippingTimerState(now?: number): FreeShippingTimerState | null;
33
+ /** Calls back whenever the banner and tags have to show or hide. Returns the unsubscribe function. */
34
+ export declare function subscribeToFreeShippingTimer(listener: () => void): () => void;
35
+ /** Test helper. */
36
+ export declare function resetFreeShippingTimer(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "3.0.17",
3
+ "version": "3.0.19",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -82,9 +82,9 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@googlemaps/markerclusterer": "2.6.2",
85
- "@salla.sa/applepay": "3.0.17",
86
- "@salla.sa/twilight": "3.0.17",
87
- "@salla.sa/twilight-tailwind-theme": "3.0.17",
85
+ "@salla.sa/applepay": "3.0.19",
86
+ "@salla.sa/twilight": "3.0.19",
87
+ "@salla.sa/twilight-tailwind-theme": "3.0.19",
88
88
  "@salla.sa/ui-address-autocomplete-widget": "1.2.1",
89
89
  "@salla.sa/ui-google-map-render": "1.2.1",
90
90
  "@types/node": "^20.4.8",
@@ -104,5 +104,5 @@
104
104
  "vanilla-lazyload": "^17.9.0",
105
105
  "vanilla-picker": "^2.12.3"
106
106
  },
107
- "gitHead": "a5342823e2e6bdff83f7ae1b97ed43666361e90b"
107
+ "gitHead": "7668f911e50da28e3b118964ad95591db283bf40"
108
108
  }
@@ -1,31 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- 'use strict';
5
-
6
- const cache = new Map();
7
- async function request(productId) {
8
- const endpoint = 'products/eligible-for-free-shipping' + (productId ? `/${productId}` : '');
9
- try {
10
- // 403 (feature off or plan not supported) and 410 (product gone) mean "not eligible",
11
- // not a failure worth a toast.
12
- const response = await salla.api.withoutNotifier(() => salla.api.request(endpoint));
13
- return response?.data?.eligible === true;
14
- }
15
- catch (e) {
16
- return false;
17
- }
18
- }
19
- /**
20
- * Whether free shipping applies: to the store when no product is given (banner),
21
- * or to the product (tag, product page banner). Same calls share one request.
22
- */
23
- function isEligibleForFreeShipping(productId) {
24
- const key = String(productId ?? '');
25
- if (!cache.has(key)) {
26
- cache.set(key, request(productId));
27
- }
28
- return cache.get(key);
29
- }
30
-
31
- exports.isEligibleForFreeShipping = isEligibleForFreeShipping;