@salla.sa/twilight-components 2.14.592 → 2.14.593

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 (337) hide show
  1. package/dist/cjs/{apple-pay-order-options-B036Wu4O.js → apple-pay-order-options-CA8IYRTb.js} +1 -0
  2. package/dist/cjs/{filepond-YeXzkn77.js → filepond-Dh9Ih7bu.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-BEU99tEc.js → filepond-plugin-file-poster-C6Sx5vF0.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-BSsf6VIk.js → filepond-plugin-file-validate-size-DdzdetN6.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-BkxQQF1Y.js → filepond-plugin-file-validate-type-DRWFKOpQ.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-h9C4LxoR.js → filepond-plugin-image-edit-B4vaf2kZ.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-nDfSwZEM.js → filepond-plugin-image-exif-orientation-BXfm40Ut.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-C-FDU_4k.js → filepond-plugin-image-preview-DQLCCOAs.js} +1 -1
  9. package/dist/cjs/{index-DI5yx1uj.js → index-CLrjVXN1.js} +2 -2
  10. package/dist/cjs/{intlTelInput-AgidDx18.js → intlTelInput-o62W18dw.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +116 -4
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-gifting.cjs.entry.js +2 -2
  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-map_3.cjs.entry.js +1 -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-options-modal.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
  107. package/dist/cjs/twilight.cjs.js +2 -2
  108. package/dist/cjs/{vanilla-picker-DLfPr_3c.js → vanilla-picker-FCNrUTtN.js} +1 -1
  109. package/dist/collection/components/salla-add-product-button/salla-add-product-button.css +58 -36
  110. package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +116 -1
  111. package/dist/collection/components/salla-order-options-modal/apple-pay-order-options.js +1 -1
  112. package/dist/components/apple-pay-order-options.js +1 -1
  113. package/dist/components/index.js +2 -2
  114. package/dist/components/salla-add-product-button2.js +116 -2
  115. package/dist/components/salla-gifting.js +1 -1
  116. package/dist/components/salla-quick-buy2.js +1 -1
  117. package/dist/docs.json +29 -13
  118. package/dist/esm/{apple-pay-order-options-s0kn7yr8.js → apple-pay-order-options-BS2iQKah.js} +1 -1
  119. package/dist/esm/{filepond-C3uLKJlo.js → filepond-DTcw03Zq.js} +1 -1
  120. package/dist/esm/{filepond-plugin-file-poster-BNO8nuwN.js → filepond-plugin-file-poster-Csk5cMw9.js} +1 -1
  121. package/dist/esm/{filepond-plugin-file-validate-size-CMMYF-rL.js → filepond-plugin-file-validate-size-FFrf5LrW.js} +1 -1
  122. package/dist/esm/{filepond-plugin-file-validate-type-DSYhKJ7B.js → filepond-plugin-file-validate-type-DeZP4xXd.js} +1 -1
  123. package/dist/esm/{filepond-plugin-image-edit-lJgRMQAo.js → filepond-plugin-image-edit-DRKyd_1I.js} +1 -1
  124. package/dist/esm/{filepond-plugin-image-exif-orientation-B0tYK1GE.js → filepond-plugin-image-exif-orientation-CxVz7OAy.js} +1 -1
  125. package/dist/esm/{filepond-plugin-image-preview-kWmnxhXu.js → filepond-plugin-image-preview-CsKN7em3.js} +1 -1
  126. package/dist/esm/{index-Bk24FlDL.js → index-0Tl_yZW8.js} +2 -2
  127. package/dist/esm/{intlTelInput-nODQyuq0.js → intlTelInput-CBN9egFg.js} +1 -1
  128. package/dist/esm/loader.js +3 -3
  129. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  130. package/dist/esm/salla-accordion_6.entry.js +1 -1
  131. package/dist/esm/salla-add-product-button_5.entry.js +116 -4
  132. package/dist/esm/salla-advertisement.entry.js +1 -1
  133. package/dist/esm/salla-alert_2.entry.js +1 -1
  134. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  135. package/dist/esm/salla-applied-filters.entry.js +1 -1
  136. package/dist/esm/salla-apps-icons.entry.js +1 -1
  137. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  138. package/dist/esm/salla-badge.entry.js +1 -1
  139. package/dist/esm/salla-basket-gap.entry.js +1 -1
  140. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  141. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  142. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  143. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  144. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  145. package/dist/esm/salla-comment-factors.entry.js +1 -1
  146. package/dist/esm/salla-comment-form_9.entry.js +1 -1
  147. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  148. package/dist/esm/salla-contacts.entry.js +1 -1
  149. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  150. package/dist/esm/salla-count-down.entry.js +1 -1
  151. package/dist/esm/salla-custom-fields.entry.js +1 -1
  152. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  153. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  154. package/dist/esm/salla-filters-widget.entry.js +1 -1
  155. package/dist/esm/salla-filters.entry.js +1 -1
  156. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  157. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  158. package/dist/esm/salla-gifting.entry.js +2 -2
  159. package/dist/esm/salla-hook.entry.js +1 -1
  160. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  161. package/dist/esm/salla-installment.entry.js +1 -1
  162. package/dist/esm/salla-list-tile.entry.js +1 -1
  163. package/dist/esm/salla-localization-modal.entry.js +1 -1
  164. package/dist/esm/salla-login-modal.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  166. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  167. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  168. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  170. package/dist/esm/salla-loyalty.entry.js +1 -1
  171. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  172. package/dist/esm/salla-map_3.entry.js +1 -1
  173. package/dist/esm/salla-menu.entry.js +1 -1
  174. package/dist/esm/salla-metadata.entry.js +1 -1
  175. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  176. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  177. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  178. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  179. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  180. package/dist/esm/salla-offer-modal.entry.js +1 -1
  181. package/dist/esm/salla-offer.entry.js +1 -1
  182. package/dist/esm/salla-order-branch.entry.js +1 -1
  183. package/dist/esm/salla-order-cancel.entry.js +1 -1
  184. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  185. package/dist/esm/salla-order-details-options.entry.js +1 -1
  186. package/dist/esm/salla-order-details.entry.js +1 -1
  187. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  188. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  189. package/dist/esm/salla-order-edit.entry.js +1 -1
  190. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  191. package/dist/esm/salla-order-shipments.entry.js +1 -1
  192. package/dist/esm/salla-order-summary.entry.js +1 -1
  193. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  194. package/dist/esm/salla-orders.entry.js +1 -1
  195. package/dist/esm/salla-payments.entry.js +1 -1
  196. package/dist/esm/salla-placeholder.entry.js +1 -1
  197. package/dist/esm/salla-price-range.entry.js +1 -1
  198. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  199. package/dist/esm/salla-product-card.entry.js +1 -1
  200. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  201. package/dist/esm/salla-products-list.entry.js +1 -1
  202. package/dist/esm/salla-products-slider.entry.js +1 -1
  203. package/dist/esm/salla-quick-order.entry.js +1 -1
  204. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  205. package/dist/esm/salla-rating-modal.entry.js +1 -1
  206. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  207. package/dist/esm/salla-review-order-item.entry.js +1 -1
  208. package/dist/esm/salla-scopes.entry.js +1 -1
  209. package/dist/esm/salla-search-product-card.entry.js +1 -1
  210. package/dist/esm/salla-search.entry.js +1 -1
  211. package/dist/esm/salla-skeleton.entry.js +1 -1
  212. package/dist/esm/salla-social-share.entry.js +1 -1
  213. package/dist/esm/salla-social.entry.js +1 -1
  214. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  215. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  216. package/dist/esm/salla-trust-badges.entry.js +1 -1
  217. package/dist/esm/salla-user-menu.entry.js +1 -1
  218. package/dist/esm/salla-user-profile.entry.js +1 -1
  219. package/dist/esm/salla-user-settings.entry.js +1 -1
  220. package/dist/esm/salla-verify.entry.js +1 -1
  221. package/dist/esm/salla-wallet.entry.js +1 -1
  222. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  223. package/dist/esm/salla-wishlist-summary.entry.js +1 -1
  224. package/dist/esm/twilight.js +3 -3
  225. package/dist/esm/{vanilla-picker-B1bTUgHP.js → vanilla-picker-CiLp9ysz.js} +1 -1
  226. package/dist/twilight/{p-c1d815c9.entry.js → p-01b4b05f.entry.js} +1 -1
  227. package/dist/twilight/{p-f74ccae4.entry.js → p-0433773a.entry.js} +1 -1
  228. package/dist/twilight/{p-Bk24FlDL.js → p-0Tl_yZW8.js} +1 -1
  229. package/dist/twilight/{p-b95a6e20.entry.js → p-0c26bedf.entry.js} +1 -1
  230. package/dist/twilight/{p-6760ec19.entry.js → p-0cc42e36.entry.js} +1 -1
  231. package/dist/twilight/{p-7ff0c546.entry.js → p-0fe961e0.entry.js} +1 -1
  232. package/dist/twilight/{p-03dffb99.entry.js → p-14c9ed90.entry.js} +1 -1
  233. package/dist/twilight/{p-06643011.entry.js → p-179595d9.entry.js} +1 -1
  234. package/dist/twilight/{p-c9ebe466.entry.js → p-17f2114f.entry.js} +1 -1
  235. package/dist/twilight/{p-377642ea.entry.js → p-183e02ac.entry.js} +1 -1
  236. package/dist/twilight/{p-42150f97.entry.js → p-1892ea42.entry.js} +1 -1
  237. package/dist/twilight/{p-ced74b88.entry.js → p-1abcc81d.entry.js} +1 -1
  238. package/dist/twilight/p-1bf7cce7.entry.js +4 -0
  239. package/dist/twilight/{p-b2c41e36.entry.js → p-220338b4.entry.js} +1 -1
  240. package/dist/twilight/{p-ed6ea140.entry.js → p-253a352c.entry.js} +1 -1
  241. package/dist/twilight/{p-b37ae926.entry.js → p-26adf02d.entry.js} +1 -1
  242. package/dist/twilight/{p-dc51993c.entry.js → p-288627a2.entry.js} +1 -1
  243. package/dist/twilight/{p-c3a2696b.entry.js → p-299e7413.entry.js} +1 -1
  244. package/dist/twilight/{p-320d6b04.entry.js → p-2ac1eac9.entry.js} +1 -1
  245. package/dist/twilight/{p-0e122915.entry.js → p-2cbed601.entry.js} +1 -1
  246. package/dist/twilight/{p-9048520b.entry.js → p-2d2db627.entry.js} +1 -1
  247. package/dist/twilight/{p-e2aa0e72.entry.js → p-2da1eb61.entry.js} +1 -1
  248. package/dist/twilight/{p-46721e68.entry.js → p-31253c2d.entry.js} +1 -1
  249. package/dist/twilight/{p-3e6f2bf8.entry.js → p-35d5e339.entry.js} +1 -1
  250. package/dist/twilight/{p-f263bba9.entry.js → p-3b5fe2ef.entry.js} +1 -1
  251. package/dist/twilight/{p-b6dc3e12.entry.js → p-3d533d87.entry.js} +1 -1
  252. package/dist/twilight/{p-250262a9.entry.js → p-40be8baa.entry.js} +1 -1
  253. package/dist/twilight/{p-b5e774db.entry.js → p-42426756.entry.js} +1 -1
  254. package/dist/twilight/{p-d73307c7.entry.js → p-4432411c.entry.js} +1 -1
  255. package/dist/twilight/{p-f4f7ed38.entry.js → p-449eae1d.entry.js} +1 -1
  256. package/dist/twilight/{p-3bf37615.entry.js → p-44afcd79.entry.js} +1 -1
  257. package/dist/twilight/{p-f8f9c563.entry.js → p-4701a008.entry.js} +1 -1
  258. package/dist/twilight/{p-523f9816.entry.js → p-4d852a57.entry.js} +1 -1
  259. package/dist/twilight/{p-2191d792.entry.js → p-4d879cd3.entry.js} +1 -1
  260. package/dist/twilight/{p-b1b096d7.entry.js → p-52e7b4f6.entry.js} +1 -1
  261. package/dist/twilight/{p-c1d18b73.entry.js → p-5cc28510.entry.js} +1 -1
  262. package/dist/twilight/{p-813a40cc.entry.js → p-636ffc46.entry.js} +1 -1
  263. package/dist/twilight/{p-d601977e.entry.js → p-6561d5d3.entry.js} +1 -1
  264. package/dist/twilight/{p-cd432c49.entry.js → p-65665ee3.entry.js} +1 -1
  265. package/dist/twilight/{p-872d6d68.entry.js → p-6db61be2.entry.js} +1 -1
  266. package/dist/twilight/{p-1d05ff72.entry.js → p-75fc9b99.entry.js} +1 -1
  267. package/dist/twilight/{p-2fc68bfd.entry.js → p-775f9b02.entry.js} +1 -1
  268. package/dist/twilight/{p-43c5ec34.entry.js → p-7bee2390.entry.js} +1 -1
  269. package/dist/twilight/{p-6a76acd8.entry.js → p-7c038d9d.entry.js} +1 -1
  270. package/dist/twilight/{p-c313bd11.entry.js → p-7c06ad6a.entry.js} +1 -1
  271. package/dist/twilight/{p-21b3877b.entry.js → p-7f59893d.entry.js} +1 -1
  272. package/dist/twilight/{p-e7127704.entry.js → p-80f27669.entry.js} +1 -1
  273. package/dist/twilight/{p-68411931.entry.js → p-821e9049.entry.js} +1 -1
  274. package/dist/twilight/{p-79676f24.entry.js → p-85ab4182.entry.js} +1 -1
  275. package/dist/twilight/{p-ad52dcf7.entry.js → p-8d369871.entry.js} +1 -1
  276. package/dist/twilight/{p-ce6c709b.entry.js → p-8e013db1.entry.js} +1 -1
  277. package/dist/twilight/{p-43ca88d0.entry.js → p-918fa44a.entry.js} +1 -1
  278. package/dist/twilight/{p-7b4a8237.entry.js → p-933807d7.entry.js} +1 -1
  279. package/dist/twilight/{p-02202feb.entry.js → p-9434c23f.entry.js} +1 -1
  280. package/dist/twilight/{p-e7ca6d06.entry.js → p-95b89c32.entry.js} +1 -1
  281. package/dist/twilight/{p-bb152b39.entry.js → p-99e615a1.entry.js} +1 -1
  282. package/dist/twilight/{p-7750be26.entry.js → p-9a818822.entry.js} +1 -1
  283. package/dist/twilight/{p-B-LS1xDz.js → p-BABHygiN.js} +1 -1
  284. package/dist/twilight/{p-DBjpz_eG.js → p-BDO2BBmv.js} +1 -1
  285. package/dist/twilight/p-BS2iQKah.js +4 -0
  286. package/dist/twilight/{p-CHqh7vb6.js → p-BZHrTB2v.js} +1 -1
  287. package/dist/twilight/{p-CcGfWKIx.js → p-CZkK9lyS.js} +1 -1
  288. package/dist/twilight/{p-Ct18qgaq.js → p-Cbnu3aaI.js} +1 -1
  289. package/dist/twilight/{p-BvUmZYa9.js → p-CxpHph5p.js} +1 -1
  290. package/dist/twilight/{p-CXo-IH2o.js → p-MugjBhYh.js} +1 -1
  291. package/dist/twilight/{p-BnmP7F4y.js → p-YTWgVZ0u.js} +2 -2
  292. package/dist/twilight/{p-be729ca2.entry.js → p-a263bdbb.entry.js} +1 -1
  293. package/dist/twilight/{p-1b1bebf6.entry.js → p-a735c70e.entry.js} +1 -1
  294. package/dist/twilight/{p-38418821.entry.js → p-a764bfe7.entry.js} +1 -1
  295. package/dist/twilight/{p-cc74d38b.entry.js → p-ad9dcb47.entry.js} +1 -1
  296. package/dist/twilight/{p-b009d316.entry.js → p-ae22bfeb.entry.js} +1 -1
  297. package/dist/twilight/{p-f5c9e513.entry.js → p-aec2d723.entry.js} +1 -1
  298. package/dist/twilight/{p-e58b7ef9.entry.js → p-aee17b8b.entry.js} +1 -1
  299. package/dist/twilight/{p-a0f1b867.entry.js → p-af12fce1.entry.js} +1 -1
  300. package/dist/twilight/{p-eaae379c.entry.js → p-b01764d0.entry.js} +1 -1
  301. package/dist/twilight/{p-6673a16f.entry.js → p-b0d66765.entry.js} +1 -1
  302. package/dist/twilight/{p-9e6f4ec4.entry.js → p-b566bc10.entry.js} +1 -1
  303. package/dist/twilight/{p-f3ffe84f.entry.js → p-b81474c4.entry.js} +1 -1
  304. package/dist/twilight/{p-540029a5.entry.js → p-b9d2ae8a.entry.js} +1 -1
  305. package/dist/twilight/{p-a75680ae.entry.js → p-bc3ad6d2.entry.js} +1 -1
  306. package/dist/twilight/{p-b1b345d6.entry.js → p-bf3fdf6d.entry.js} +1 -1
  307. package/dist/twilight/{p-4f76e9e2.entry.js → p-c394f30a.entry.js} +1 -1
  308. package/dist/twilight/{p-d9ccdd8f.entry.js → p-cc7c4469.entry.js} +1 -1
  309. package/dist/twilight/{p-658de43b.entry.js → p-ce9b6ac6.entry.js} +1 -1
  310. package/dist/twilight/{p-22135b7c.entry.js → p-d05e1bfd.entry.js} +1 -1
  311. package/dist/twilight/{p-45035389.entry.js → p-d744234e.entry.js} +1 -1
  312. package/dist/twilight/{p-21802082.entry.js → p-d851751c.entry.js} +1 -1
  313. package/dist/twilight/{p-becb6580.entry.js → p-dc129d7a.entry.js} +1 -1
  314. package/dist/twilight/{p-fbee9e50.entry.js → p-ddc61bff.entry.js} +1 -1
  315. package/dist/twilight/{p-f7ee4910.entry.js → p-deb1139c.entry.js} +1 -1
  316. package/dist/twilight/{p-7038e1af.entry.js → p-e429b1e5.entry.js} +1 -1
  317. package/dist/twilight/{p-5fc75260.entry.js → p-e8cb4cd9.entry.js} +1 -1
  318. package/dist/twilight/{p-0dc90c55.entry.js → p-e8fa4bd0.entry.js} +1 -1
  319. package/dist/twilight/{p-75f32b91.entry.js → p-e9372ca0.entry.js} +1 -1
  320. package/dist/twilight/{p-5435dbcd.entry.js → p-e955b287.entry.js} +1 -1
  321. package/dist/twilight/{p-612b6d87.entry.js → p-eb590773.entry.js} +1 -1
  322. package/dist/twilight/{p-f9f0a5ee.entry.js → p-f176c43e.entry.js} +1 -1
  323. package/dist/twilight/{p-4fd73440.entry.js → p-f445e7a3.entry.js} +1 -1
  324. package/dist/twilight/{p-a057f532.entry.js → p-f4cff5cf.entry.js} +1 -1
  325. package/dist/twilight/{p-83ccddd5.entry.js → p-f828fefc.entry.js} +1 -1
  326. package/dist/twilight/{p-91a1baf1.entry.js → p-f92d1971.entry.js} +1 -1
  327. package/dist/twilight/{p-DvlAEiaH.js → p-fP9RBas5.js} +1 -1
  328. package/dist/twilight/{p-dfd212d5.entry.js → p-fb527b4d.entry.js} +1 -1
  329. package/dist/twilight/{p-08256e67.entry.js → p-fe27963f.entry.js} +1 -1
  330. package/dist/twilight/{p-5f6a5a4b.entry.js → p-fea37c8c.entry.js} +1 -1
  331. package/dist/twilight/{p-42e02411.entry.js → p-fef5c118.entry.js} +1 -1
  332. package/dist/twilight/twilight.esm.js +1 -1
  333. package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +16 -0
  334. package/dist/types/components/salla-order-options-modal/apple-pay-order-options.d.ts +2 -0
  335. package/package.json +5 -5
  336. package/dist/twilight/p-07174244.entry.js +0 -4
  337. package/dist/twilight/p-s0kn7yr8.js +0 -4
@@ -7,36 +7,88 @@ salla-add-product-button[width=wide] {
7
7
  }
8
8
 
9
9
 
10
+ /* Buy-now redirect button: copy of salla-mini-checkout-widget's button CSS, same theme vars. */
11
+ .s-add-product-button-buy-now {
12
+ display: block;
13
+ font-family: 'PingARLT';
14
+ font-weight: normal;
15
+ }
16
+
17
+ .s-add-product-button-buy-now .s-fast-checkout-button {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ height: var(--salla-fast-checkout-button-height, 2.5rem);
22
+ width: var(--salla-fast-checkout-button-width, 100%);
23
+ border-radius: var(--salla-fast-checkout-button-border-radius, 0.375rem);
24
+ font-size: 0.875rem;
25
+ font-weight: bold;
26
+ text-transform: uppercase;
27
+ cursor: pointer;
28
+ transition: all 0.3s ease-in-out;
29
+ border: none;
30
+ font-family: 'PingARLT';
31
+ gap: 5px;
32
+ direction: ltr;
33
+ border-width: 1px;
34
+ border-color: var(--color-primary);
35
+ background-color: var(--color-primary);
36
+ color: var(--color-primary-reverse);
37
+ /* The widget's button sits in shadow DOM, out of the theme's preflight reset; keep the browser defaults it gets. */
38
+ padding: 1px 6px;
39
+ line-height: normal;
40
+ letter-spacing: normal;
41
+ /* The theme's Tailwind `.outline` utility (outline-style: solid) hits the `outline` class; the widget is shielded by shadow DOM. */
42
+ outline: none;
43
+ }
44
+
45
+ .s-add-product-button-buy-now .s-fast-checkout-button:focus-visible {
46
+ outline: auto;
47
+ }
48
+
49
+ .s-add-product-button-buy-now .s-fast-checkout-button:hover {
50
+ background-color: var(--color-primary);
51
+ }
52
+
53
+ .s-add-product-button-buy-now .s-fast-checkout-button.outline {
54
+ background-color: transparent;
55
+ border: 1px solid var(--color-primary);
56
+ color: var(--color-primary);
57
+ }
58
+
59
+ .s-add-product-button-buy-now .s-fast-checkout-button.rtl {
60
+ flex-direction: row-reverse;
61
+ }
62
+
63
+ .s-add-product-button-buy-now .s-fast-checkout-button:disabled {
64
+ cursor: progress;
65
+ opacity: 0.7;
66
+ }
67
+
10
68
  .sticky {
11
69
  position: sticky;
12
70
  }
13
71
 
14
-
15
72
  .hidden {
16
73
  display: none;
17
74
  }
18
75
 
19
-
20
76
  .w-full {
21
77
  width: 100%;
22
78
  }
23
79
 
24
-
25
80
  .outline {
26
81
  outline-style: solid;
27
82
  }
28
83
 
29
-
30
84
  .filter {
31
85
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
32
86
  }
33
87
 
34
-
35
88
  .s-hidden {
36
89
  display: none;
37
90
  }
38
91
 
39
-
40
92
  .btn {
41
93
  display: inline-flex;
42
94
  flex: 1 1 0%;
@@ -56,17 +108,14 @@ salla-add-product-button[width=wide] {
56
108
  transition-duration: 300ms;
57
109
  }
58
110
 
59
-
60
111
  .btn:hover {
61
112
  opacity: 0.8;
62
113
  }
63
114
 
64
-
65
115
  .s-hidden {
66
116
  display: none;
67
117
  }
68
118
 
69
-
70
119
  .s-add-product-button-sr-only {
71
120
  position: absolute;
72
121
  width: 1px;
@@ -79,12 +128,10 @@ salla-add-product-button[width=wide] {
79
128
  border-width: 0;
80
129
  }
81
130
 
82
-
83
131
  .s-add-product-button-with-quick-buy {
84
132
  display: flex;
85
133
  }
86
134
 
87
-
88
135
  @media (min-width: 640px) {
89
136
 
90
137
  .s-add-product-button-with-quick-buy {
@@ -92,19 +139,16 @@ salla-add-product-button[width=wide] {
92
139
  }
93
140
  }
94
141
 
95
-
96
142
  .s-add-product-button-with-quick-buy:not(.s-add-product-button-with-sticky-bar) {
97
143
  flex-direction: column !important;
98
144
  }
99
145
 
100
-
101
146
  .s-add-product-button-main {
102
147
  display: flex;
103
148
  width: 66.666667%;
104
149
  column-gap: 0.375rem;
105
150
  }
106
151
 
107
-
108
152
  @media (min-width: 640px) {
109
153
 
110
154
  .s-add-product-button-main {
@@ -113,12 +157,10 @@ salla-add-product-button[width=wide] {
113
157
  }
114
158
  }
115
159
 
116
-
117
160
  .s-add-product-button-with-sticky-bar salla-quick-buy {
118
161
  width: 33.333333%;
119
162
  }
120
163
 
121
-
122
164
  @media (min-width: 640px) {
123
165
 
124
166
  .s-add-product-button-with-sticky-bar salla-quick-buy {
@@ -126,33 +168,27 @@ salla-add-product-button[width=wide] {
126
168
  }
127
169
  }
128
170
 
129
-
130
171
  .s-add-product-button-with-quick-buy:not(.s-add-product-button-with-sticky-bar) .s-add-product-button-main {
131
172
  width: 100%;
132
173
  }
133
174
 
134
-
135
175
  .s-add-product-button-with-quick-buy:not(.s-add-product-button-with-apple-pay) .s-add-product-button-main {
136
176
  width: 100%;
137
177
  }
138
178
 
139
-
140
179
  .s-add-product-button-main:not(.w-full) > salla-button {
141
180
  width: 50% !important;
142
181
  }
143
182
 
144
-
145
183
  .s-add-product-button-main .s-add-product-button-mini-checkout {
146
184
  --salla-fast-checkout-button-border-radius: .75rem;
147
185
  width: 50%;
148
186
  }
149
187
 
150
-
151
188
  .s-add-product-button-with-sticky-bar {
152
189
  width: 100% !important;
153
190
  }
154
191
 
155
-
156
192
  @media (min-width: 640px) {
157
193
 
158
194
  .s-add-product-button-with-sticky-bar {
@@ -160,12 +196,10 @@ salla-add-product-button[width=wide] {
160
196
  }
161
197
  }
162
198
 
163
-
164
199
  .s-add-product-button-with-apple-pay {
165
200
  column-gap: 0.375rem;
166
201
  }
167
202
 
168
-
169
203
  @media (min-width: 640px) {
170
204
 
171
205
  .s-add-product-button-with-apple-pay {
@@ -173,17 +207,14 @@ salla-add-product-button[width=wide] {
173
207
  }
174
208
  }
175
209
 
176
-
177
210
  .s-add-product-button-with-apple-pay:not(.s-add-product-button-with-sticky-bar) salla-quick-buy apple-pay-button {
178
211
  margin-top: 0.625rem;
179
212
  }
180
213
 
181
-
182
214
  .s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span {
183
215
  display: none;
184
216
  }
185
217
 
186
-
187
218
  @media (min-width: 768px) {
188
219
 
189
220
  .s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span {
@@ -191,7 +222,6 @@ salla-add-product-button[width=wide] {
191
222
  }
192
223
  }
193
224
 
194
-
195
225
  .s-add-product-button-mini-checkout-content {
196
226
  display: flex;
197
227
  flex-shrink: 0;
@@ -200,7 +230,6 @@ salla-add-product-button[width=wide] {
200
230
  font-size: .8rem;
201
231
  }
202
232
 
203
-
204
233
  @media (min-width: 640px) {
205
234
 
206
235
  .s-add-product-button-mini-checkout-content {
@@ -209,12 +238,10 @@ salla-add-product-button[width=wide] {
209
238
  }
210
239
  }
211
240
 
212
-
213
241
  .s-add-product-button-mini-checkout-content:where([dir="rtl"], [dir="rtl"] *) {
214
242
  flex-direction: row-reverse;
215
243
  }
216
244
 
217
-
218
245
  .s-add-product-button-mini-checkout-content svg {
219
246
  margin-right: 0.375rem;
220
247
  height: 1rem;
@@ -222,19 +249,16 @@ salla-add-product-button[width=wide] {
222
249
  fill: currentColor;
223
250
  }
224
251
 
225
-
226
252
  .s-add-product-button-mini-checkout-content svg:where([dir="rtl"], [dir="rtl"] *) {
227
253
  margin-right: 0px;
228
254
  margin-left: 0.375rem;
229
255
  }
230
256
 
231
-
232
257
  .s-add-product-button-busy {
233
258
  pointer-events: none;
234
259
  position: relative;
235
260
  }
236
261
 
237
-
238
262
  .s-add-product-button-busy::after {
239
263
  position: absolute;
240
264
  top: 50%;
@@ -248,7 +272,6 @@ salla-add-product-button[width=wide] {
248
272
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
249
273
  }
250
274
 
251
-
252
275
  @keyframes spin {
253
276
 
254
277
  to {
@@ -257,7 +280,6 @@ salla-add-product-button[width=wide] {
257
280
  }
258
281
  }
259
282
 
260
-
261
283
  .s-add-product-button-busy::after {
262
284
  animation: spin 1s linear infinite;
263
285
  border-radius: 9999px;
@@ -9,9 +9,16 @@ import Helper from "../../Helpers/Helper";
9
9
  import { canCompleteApplePay, isApplePayHostedRedirect } from "@salla.sa/applepay/src/apple-pay-support";
10
10
  import { OrderOptionsGate } from "../salla-order-options-modal/order-options-gate";
11
11
  import { FastCheckoutGate } from "../salla-bullet-delivery/fast-checkout-gate";
12
+ import { appendOrderOptionsToPayload, ensureOrderOptionsModal } from "../salla-order-options-modal/apple-pay-order-options";
13
+ import { injectFreeProductsIntoPayload } from "../salla-order-options-modal/free-product-payload";
12
14
  export class SallaAddProductButton {
13
15
  constructor() {
14
16
  this.hostAttributes = {};
17
+ this.buyNowBusy = false;
18
+ /** Latest buy-now click; an older click still waiting on Bullet Delivery drops out. */
19
+ this.buyNowToken = 0;
20
+ this.buyNowLastClick = 0;
21
+ this.buyNowLivePrice = 0;
15
22
  /**
16
23
  * Has Pre Order
17
24
  */
@@ -26,6 +33,7 @@ export class SallaAddProductButton {
26
33
  this.productType = 'product';
27
34
  this.selectedOptions = [];
28
35
  this.buyNowText = salla.lang.get('pages.products.buy_now');
36
+ this.buyNowLoading = false;
29
37
  /** Use matchMedia instead of window.innerWidth to avoid forced reflow (Lighthouse/PageSpeed) */
30
38
  this.isDesktopViewport = typeof window !== 'undefined' ? window.matchMedia('(min-width: 768px)').matches : true;
31
39
  this.viewportMediaQuery = null;
@@ -33,6 +41,9 @@ export class SallaAddProductButton {
33
41
  this.orderOptionsGateAttached = false;
34
42
  /** Guards one-time attachment of the fast-checkout Bullet Delivery gate (logic lives in FastCheckoutGate). */
35
43
  this.fastCheckoutGateAttached = false;
44
+ this.onBuyNowPriceUpdated = (response) => {
45
+ this.buyNowLivePrice = Number(response?.data?.price) || this.buyNowLivePrice;
46
+ };
36
47
  this.onViewportChange = (e) => {
37
48
  this.isDesktopViewport = e.matches;
38
49
  this.btn?.setText((e.matches && !!this.passedLabel) ? this.passedLabel : this.getLabel());
@@ -160,6 +171,105 @@ export class SallaAddProductButton {
160
171
  type: this.supportStickyBar && !this.isDesktopViewport ? 'plain' : this.productType == 'donating' ? 'donate' : 'buy'
161
172
  };
162
173
  }
174
+ // Store setting: quick-buy skips the mini-checkout popup and goes straight to the checkout page.
175
+ get redirectsToCheckout() {
176
+ return salla.config.get('store.settings.buy_now.redirect_to_checkout') === true;
177
+ }
178
+ /** The fast-checkout slot renders and the store redirects, so the buy-now button is on the page. */
179
+ get showsBuyNowButton() {
180
+ return this.showQuickBuy
181
+ && !!document.getElementById('fast-checkout-js')
182
+ && !['financial_support', 'donating'].includes(this.productType)
183
+ && this.redirectsToCheckout;
184
+ }
185
+ buyNowButton() {
186
+ return h("div", { class: "s-add-product-button-mini-checkout s-mini-checkout hide-scroll s-add-product-button-buy-now" }, h("button", { type: "button", class: `s-fast-checkout-button outline ${salla.lang.locale == 'ar' ? 'rtl' : 'ltr'}`, disabled: this.buyNowLoading, onClick: () => this.buyNowRedirect() }, h("div", { class: "s-add-product-button-mini-checkout-content" }, h("span", { innerHTML: WalletIcon }), this.buyNowText)));
187
+ }
188
+ async buyNowRedirect() {
189
+ // A double-click would reach Bullet Delivery twice, which stalls its guest gate.
190
+ const now = Date.now();
191
+ if (this.buyNowBusy || now - this.buyNowLastClick < 500) {
192
+ return;
193
+ }
194
+ this.buyNowLastClick = now;
195
+ const token = ++this.buyNowToken;
196
+ const optionsEl = document.querySelector(`salla-product-options[product-id="${this.productId}"]`);
197
+ if (optionsEl?.validateAndScroll && !(await optionsEl.validateAndScroll())) {
198
+ return;
199
+ }
200
+ // Bullet Delivery's address gate, as the widget runs it; stays pending if the shopper backs out.
201
+ await salla.cart.event.beforeStartFastCheckout();
202
+ if (token !== this.buyNowToken || this.buyNowBusy) {
203
+ return;
204
+ }
205
+ this.buyNowBusy = true;
206
+ let leaving = false;
207
+ try {
208
+ this.buyNowLoading = true;
209
+ const form = document.querySelector('form.product-form');
210
+ const data = form ? new FormData(form) : new FormData();
211
+ data.set('id', String(this.productId));
212
+ data.set('source', 'buy_now');
213
+ if (!(await this.collectOrderOptions(data))) {
214
+ return;
215
+ }
216
+ const resp = await salla.api.request('checkout/mini', data, 'post');
217
+ if (resp.data?.url) {
218
+ leaving = this.openCheckout(resp.data.url);
219
+ }
220
+ else if (resp.data?.to === 'login') {
221
+ salla.event.dispatch('login::open');
222
+ }
223
+ }
224
+ catch (error) {
225
+ this.failed.emit(error);
226
+ }
227
+ finally {
228
+ if (!leaving) {
229
+ this.buyNowBusy = false;
230
+ this.buyNowLoading = false;
231
+ }
232
+ }
233
+ }
234
+ /** Order options and free offer products, as the widget collects them; false when the modal is dismissed. */
235
+ async collectOrderOptions(data) {
236
+ let resp;
237
+ try {
238
+ resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: this.productId, quantity: Number(data.get('quantity')) || 1 }]));
239
+ }
240
+ catch (error) {
241
+ salla?.logger?.warn?.('order-options: fetch failed', error);
242
+ return true;
243
+ }
244
+ const orderOptions = resp?.data?.order_options || [];
245
+ const freeProducts = (Array.isArray(resp?.data?.advance_free_product) ? resp.data.advance_free_product : [])
246
+ .filter((entry) => Array.isArray(entry?.options) && entry.options.length);
247
+ if (!orderOptions.length && !freeProducts.length) {
248
+ return true;
249
+ }
250
+ try {
251
+ const result = await ensureOrderOptionsModal().open({
252
+ orderOptions,
253
+ freeProducts,
254
+ basePrice: this.buyNowLivePrice || Number(resp?.data?.products?.[0]?.price?.amount) || 0,
255
+ });
256
+ appendOrderOptionsToPayload(data, result?.orderOptions || []);
257
+ injectFreeProductsIntoPayload(data, result?.freeProducts || []);
258
+ return true;
259
+ }
260
+ catch {
261
+ return false;
262
+ }
263
+ }
264
+ /** Native SPA webviews own the checkout screen; returns true when this page navigates away. */
265
+ openCheckout(url) {
266
+ if (salla.mobile?.isSpaWebview?.() && salla.mobile.openCheckout) {
267
+ salla.mobile.openCheckout(url);
268
+ return false;
269
+ }
270
+ window.location.href = url;
271
+ return true;
272
+ }
163
273
  miniCheckoutWidget() {
164
274
  let storeId = salla.config.get('store.id');
165
275
  if (!storeId) {
@@ -212,11 +322,14 @@ export class SallaAddProductButton {
212
322
  } }, h("div", { class: {
213
323
  's-add-product-button-main': this.showQuickBuy,
214
324
  'w-full': !document.getElementById('fast-checkout-js') || ['financial_support', 'donating'].includes(this.productType) // This is a temporary fix until all themes fully support the fast checkout -- To be removed later
215
- } }, h("salla-button", { color: this.productStatus === 'sale' ? 'primary' : 'light', type: "button", fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale', "aria-label": this.isIconOnlyLabel ? this.addToCartLabel : undefined, ...this.getBtnAttributes(), "loader-position": "center" }, h("slot", null)), this.showQuickBuy && !!document.getElementById('fast-checkout-js') && !['financial_support', 'donating'].includes(this.productType) ? this.miniCheckoutWidget() : ''), this.showQuickBuy && this.isApplePayActive ? h("salla-quick-buy", { ...this.getQuickBuyBtnAttributes() }) : '');
325
+ } }, h("salla-button", { color: this.productStatus === 'sale' ? 'primary' : 'light', type: "button", fill: this.productStatus === 'sale' ? 'solid' : 'outline', ref: el => this.btn = el, onClick: event => this.addProductToCart(event), disabled: this.productStatus !== 'sale', "aria-label": this.isIconOnlyLabel ? this.addToCartLabel : undefined, ...this.getBtnAttributes(), "loader-position": "center" }, h("slot", null)), this.showQuickBuy && !!document.getElementById('fast-checkout-js') && !['financial_support', 'donating'].includes(this.productType) ? (this.redirectsToCheckout ? this.buyNowButton() : this.miniCheckoutWidget()) : ''), this.showQuickBuy && this.isApplePayActive ? h("salla-quick-buy", { ...this.getQuickBuyBtnAttributes() }) : '');
216
326
  }
217
327
  async componentDidLoad() {
218
328
  // Register this component for hooks system, already on it logic to run componentDidLoad trigger
219
329
  await Salla.hooks.registerComponent('salla-add-product-button', this);
330
+ if (this.showsBuyNowButton) {
331
+ salla.product?.event?.onPriceUpdated?.(this.onBuyNowPriceUpdated);
332
+ }
220
333
  if (!this.notifyOptionsAvailability) {
221
334
  return;
222
335
  }
@@ -265,6 +378,7 @@ export class SallaAddProductButton {
265
378
  }
266
379
  disconnectedCallback() {
267
380
  this.viewportMediaQuery?.removeEventListener('change', this.onViewportChange);
381
+ salla.product?.event?.offPriceUpdated?.(this.onBuyNowPriceUpdated);
268
382
  }
269
383
  static get is() { return "salla-add-product-button"; }
270
384
  static get originalStyleUrls() {
@@ -501,6 +615,7 @@ export class SallaAddProductButton {
501
615
  "showQuickBuy": {},
502
616
  "isApplePayActive": {},
503
617
  "buyNowText": {},
618
+ "buyNowLoading": {},
504
619
  "isDesktopViewport": {}
505
620
  };
506
621
  }
@@ -7,7 +7,7 @@
7
7
  * the ApplePaySession and drives it via callbacks.
8
8
  */
9
9
  /** Get-or-create the singleton order-options modal on <body>. */
10
- function ensureOrderOptionsModal() {
10
+ export function ensureOrderOptionsModal() {
11
11
  let modal = document.querySelector('salla-order-options-modal');
12
12
  if (!modal) {
13
13
  modal = document.createElement('salla-order-options-modal');
@@ -92,4 +92,4 @@ async function resolveApplePayOrderOptions(opts) {
92
92
  }
93
93
  }
94
94
 
95
- export { reportProductOptionsValiditySync as a, appendOrderOptionsToPayload as b, resolveApplePayOrderOptions as r };
95
+ export { appendOrderOptionsToPayload as a, reportProductOptionsValiditySync as b, ensureOrderOptionsModal as e, resolveApplePayOrderOptions as r };