@salla.sa/twilight-components 3.0.23 → 3.0.25

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 (379) hide show
  1. package/dist/cjs/{Helper-D7ZKv2vD.js → Helper-BSFw7uVh.js} +1 -1
  2. package/dist/cjs/{filepond-CgF0UCyN.js → filepond-DzJcpvBM.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-De2yzkk2.js → filepond-plugin-file-poster-BILkbyw_.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-TEJXuY0m.js → filepond-plugin-file-validate-size-DIJUAZji.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-CB3OKB9j.js → filepond-plugin-file-validate-type-4lpOf3hf.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-gQ02gAQb.js → filepond-plugin-image-edit-DtE3Wj_4.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-B-gcb-0a.js → filepond-plugin-image-exif-orientation-Dc_jwifJ.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-D6yQ6Ge9.js → filepond-plugin-image-preview-D_8qt0dd.js} +1 -1
  9. package/dist/cjs/{index-HxqdY5S_.js → index-D0d25H-r.js} +6 -6
  10. package/dist/cjs/{intlTelInput-BdzLlitA.js → intlTelInput-DqmuleM6.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 +2 -2
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  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 +2 -2
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  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 +89 -7
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +5 -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 +2 -2
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +628 -19
  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 +2 -2
  38. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-mobile-update-modal.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +8 -1
  65. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  66. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-items.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-order-rewards.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-order-shipments.cjs.entry.js +2 -11
  81. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  91. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  92. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  95. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  100. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-thank-you-header.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  108. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  109. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  110. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  111. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  112. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  113. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  114. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +2 -2
  115. package/dist/cjs/twilight.cjs.js +2 -2
  116. package/dist/cjs/{vanilla-picker-CwkSfjkN.js → vanilla-picker-DP9Hy8IR.js} +1 -1
  117. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +44 -6
  118. package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +4 -0
  119. package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.css +139 -0
  120. package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +568 -14
  121. package/dist/collection/components/salla-next-order-coupon/salla-next-order-coupon.js +7 -0
  122. package/dist/collection/components/salla-order-shipments/salla-order-shipments.js +1 -10
  123. package/dist/collection/shared/cart-free-gifts.js +42 -1
  124. package/dist/collection/shared/coupons-request.js +47 -0
  125. package/dist/collection/shared/offer-stages.js +22 -3
  126. package/dist/components/index.js +2 -2
  127. package/dist/components/salla-cart-coupons.js +88 -6
  128. package/dist/components/salla-cart-item-offers.js +4 -0
  129. package/dist/components/salla-conditional-offer.js +631 -18
  130. package/dist/components/salla-next-order-coupon.js +7 -0
  131. package/dist/components/salla-order-shipments.js +1 -10
  132. package/dist/docs.json +2 -2
  133. package/dist/esm/{Helper-D0RzyeI1.js → Helper-DmnUAusv.js} +1 -1
  134. package/dist/esm/{filepond-CLk9FTOP.js → filepond-DZbzdjkK.js} +1 -1
  135. package/dist/esm/{filepond-plugin-file-poster-B4S2eO6Q.js → filepond-plugin-file-poster-D9cjvoj-.js} +1 -1
  136. package/dist/esm/{filepond-plugin-file-validate-size-DVKiwMoA.js → filepond-plugin-file-validate-size-D-kjllC-.js} +1 -1
  137. package/dist/esm/{filepond-plugin-file-validate-type-Be_jLxLc.js → filepond-plugin-file-validate-type-D9hsNaJl.js} +1 -1
  138. package/dist/esm/{filepond-plugin-image-edit-D82X0TVT.js → filepond-plugin-image-edit-CDHAxJY8.js} +1 -1
  139. package/dist/esm/{filepond-plugin-image-exif-orientation--N2kKQ_T.js → filepond-plugin-image-exif-orientation-BGKiclwK.js} +1 -1
  140. package/dist/esm/{filepond-plugin-image-preview-CrMEZ16K.js → filepond-plugin-image-preview-BUjvnt8G.js} +1 -1
  141. package/dist/esm/{index-Dlr254cS.js → index-ze9e0dxM.js} +6 -6
  142. package/dist/esm/{intlTelInput-E_2akM-H.js → intlTelInput-BkYRB6km.js} +1 -1
  143. package/dist/esm/loader.js +3 -3
  144. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  145. package/dist/esm/salla-accordion_6.entry.js +2 -2
  146. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  147. package/dist/esm/salla-advertisement.entry.js +1 -1
  148. package/dist/esm/salla-alert_2.entry.js +1 -1
  149. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  150. package/dist/esm/salla-applied-filters.entry.js +2 -2
  151. package/dist/esm/salla-apps-icons.entry.js +1 -1
  152. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  153. package/dist/esm/salla-badge.entry.js +1 -1
  154. package/dist/esm/salla-basket-gap.entry.js +1 -1
  155. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  156. package/dist/esm/salla-cart-coupons.entry.js +89 -7
  157. package/dist/esm/salla-cart-item-offers_2.entry.js +5 -1
  158. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  159. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  160. package/dist/esm/salla-comment-factors.entry.js +1 -1
  161. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  162. package/dist/esm/salla-conditional-offer.entry.js +628 -19
  163. package/dist/esm/salla-contacts.entry.js +1 -1
  164. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  165. package/dist/esm/salla-count-down.entry.js +1 -1
  166. package/dist/esm/salla-custom-fields.entry.js +1 -1
  167. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  168. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  169. package/dist/esm/salla-filters-widget.entry.js +2 -2
  170. package/dist/esm/salla-filters.entry.js +2 -2
  171. package/dist/esm/salla-free-shipping-banner.entry.js +1 -1
  172. package/dist/esm/salla-free-shipping-tag.entry.js +1 -1
  173. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  174. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  175. package/dist/esm/salla-gifting.entry.js +1 -1
  176. package/dist/esm/salla-hook.entry.js +1 -1
  177. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  178. package/dist/esm/salla-installment.entry.js +1 -1
  179. package/dist/esm/salla-list-tile.entry.js +1 -1
  180. package/dist/esm/salla-localization-modal.entry.js +1 -1
  181. package/dist/esm/salla-login-modal.entry.js +1 -1
  182. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  183. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  184. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  185. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  186. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  187. package/dist/esm/salla-loyalty.entry.js +1 -1
  188. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  189. package/dist/esm/salla-map_3.entry.js +1 -1
  190. package/dist/esm/salla-menu.entry.js +1 -1
  191. package/dist/esm/salla-metadata.entry.js +1 -1
  192. package/dist/esm/salla-mobile-update-modal.entry.js +1 -1
  193. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  194. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  195. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  196. package/dist/esm/salla-next-order-coupon.entry.js +8 -1
  197. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  198. package/dist/esm/salla-offer-modal.entry.js +1 -1
  199. package/dist/esm/salla-offer.entry.js +1 -1
  200. package/dist/esm/salla-order-branch.entry.js +1 -1
  201. package/dist/esm/salla-order-cancel.entry.js +1 -1
  202. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  203. package/dist/esm/salla-order-details-options.entry.js +1 -1
  204. package/dist/esm/salla-order-details.entry.js +1 -1
  205. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  206. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  207. package/dist/esm/salla-order-edit.entry.js +1 -1
  208. package/dist/esm/salla-order-items.entry.js +1 -1
  209. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  210. package/dist/esm/salla-order-payment.entry.js +1 -1
  211. package/dist/esm/salla-order-rewards.entry.js +1 -1
  212. package/dist/esm/salla-order-shipments.entry.js +2 -11
  213. package/dist/esm/salla-order-summary.entry.js +1 -1
  214. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  215. package/dist/esm/salla-orders.entry.js +2 -2
  216. package/dist/esm/salla-payments.entry.js +1 -1
  217. package/dist/esm/salla-placeholder.entry.js +1 -1
  218. package/dist/esm/salla-price-range.entry.js +1 -1
  219. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  220. package/dist/esm/salla-product-card.entry.js +1 -1
  221. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  222. package/dist/esm/salla-products-list.entry.js +2 -2
  223. package/dist/esm/salla-products-slider.entry.js +2 -2
  224. package/dist/esm/salla-quick-order.entry.js +1 -1
  225. package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
  226. package/dist/esm/salla-rating-modal.entry.js +2 -2
  227. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  228. package/dist/esm/salla-review-order-item.entry.js +1 -1
  229. package/dist/esm/salla-scopes.entry.js +1 -1
  230. package/dist/esm/salla-search-product-card.entry.js +1 -1
  231. package/dist/esm/salla-search.entry.js +2 -2
  232. package/dist/esm/salla-skeleton.entry.js +1 -1
  233. package/dist/esm/salla-social-share.entry.js +1 -1
  234. package/dist/esm/salla-social.entry.js +1 -1
  235. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  236. package/dist/esm/salla-thank-you-header.entry.js +1 -1
  237. package/dist/esm/salla-thank-you-page.entry.js +1 -1
  238. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  239. package/dist/esm/salla-trust-badges.entry.js +1 -1
  240. package/dist/esm/salla-user-menu.entry.js +1 -1
  241. package/dist/esm/salla-user-profile.entry.js +1 -1
  242. package/dist/esm/salla-user-settings.entry.js +1 -1
  243. package/dist/esm/salla-verify.entry.js +1 -1
  244. package/dist/esm/salla-wallet.entry.js +1 -1
  245. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  246. package/dist/esm/salla-wishlist-summary.entry.js +2 -2
  247. package/dist/esm/twilight.js +3 -3
  248. package/dist/esm/{vanilla-picker-C2sRN_ke.js → vanilla-picker-CxhuwWDi.js} +1 -1
  249. package/dist/twilight/{p-e28d6181.entry.js → p-008740fe.entry.js} +1 -1
  250. package/dist/twilight/{p-29579fd5.entry.js → p-024ecda2.entry.js} +1 -1
  251. package/dist/twilight/{p-7f1b77dd.entry.js → p-02b7dfcc.entry.js} +1 -1
  252. package/dist/twilight/{p-884e112e.entry.js → p-03b2df97.entry.js} +1 -1
  253. package/dist/twilight/{p-50ebbec7.entry.js → p-07e581af.entry.js} +1 -1
  254. package/dist/twilight/{p-cfcc7537.entry.js → p-08be494e.entry.js} +1 -1
  255. package/dist/twilight/{p-dfecf2f7.entry.js → p-0c022fbd.entry.js} +1 -1
  256. package/dist/twilight/{p-479b64ef.entry.js → p-0c0b2b36.entry.js} +1 -1
  257. package/dist/twilight/{p-a56a1415.entry.js → p-0fd15433.entry.js} +1 -1
  258. package/dist/twilight/{p-d169c4cc.entry.js → p-11eb8675.entry.js} +1 -1
  259. package/dist/twilight/{p-4dd12d0a.entry.js → p-12a52f1b.entry.js} +1 -1
  260. package/dist/twilight/{p-c3d025f6.entry.js → p-16e2a110.entry.js} +1 -1
  261. package/dist/twilight/{p-f643db36.entry.js → p-1ca39f1c.entry.js} +1 -1
  262. package/dist/twilight/{p-3f95569b.entry.js → p-20949dfb.entry.js} +1 -1
  263. package/dist/twilight/{p-d36dc785.entry.js → p-2aa9147c.entry.js} +1 -1
  264. package/dist/twilight/{p-232e01e7.entry.js → p-2dcd24fe.entry.js} +1 -1
  265. package/dist/twilight/{p-cf3d4b03.entry.js → p-331003bc.entry.js} +1 -1
  266. package/dist/twilight/{p-7f297fe9.entry.js → p-37b64e36.entry.js} +1 -1
  267. package/dist/twilight/{p-d3c84d52.entry.js → p-3a2ff4d6.entry.js} +1 -1
  268. package/dist/twilight/{p-0f3ce271.entry.js → p-3ec3e9fb.entry.js} +1 -1
  269. package/dist/twilight/{p-dcb37ec6.entry.js → p-446e3f38.entry.js} +1 -1
  270. package/dist/twilight/{p-c7d32612.entry.js → p-455a4702.entry.js} +1 -1
  271. package/dist/twilight/{p-3b465776.entry.js → p-45a7d444.entry.js} +1 -1
  272. package/dist/twilight/{p-449a8200.entry.js → p-474d882c.entry.js} +1 -1
  273. package/dist/twilight/{p-53edf4ac.entry.js → p-47c79c49.entry.js} +1 -1
  274. package/dist/twilight/{p-9cbb4591.entry.js → p-4c191ab4.entry.js} +1 -1
  275. package/dist/twilight/{p-a2509beb.entry.js → p-4cf81a44.entry.js} +1 -1
  276. package/dist/twilight/{p-b7f5bf7f.entry.js → p-4ec15515.entry.js} +1 -1
  277. package/dist/twilight/{p-d34de754.entry.js → p-519cf4c2.entry.js} +1 -1
  278. package/dist/twilight/{p-e2af5853.entry.js → p-57fafaba.entry.js} +1 -1
  279. package/dist/twilight/{p-11174a7f.entry.js → p-59694c45.entry.js} +1 -1
  280. package/dist/twilight/{p-f50a3d12.entry.js → p-5b118b5b.entry.js} +1 -1
  281. package/dist/twilight/{p-beebd25b.entry.js → p-5ceda3d5.entry.js} +1 -1
  282. package/dist/twilight/{p-44826102.entry.js → p-5d8937c5.entry.js} +1 -1
  283. package/dist/twilight/{p-b3673a47.entry.js → p-5e0f85ae.entry.js} +1 -1
  284. package/dist/twilight/{p-57010429.entry.js → p-5f9d87ec.entry.js} +1 -1
  285. package/dist/twilight/{p-6f4a5f08.entry.js → p-61b98119.entry.js} +1 -1
  286. package/dist/twilight/{p-12845768.entry.js → p-67cf7454.entry.js} +1 -1
  287. package/dist/twilight/{p-92782ec3.entry.js → p-6d6b99fe.entry.js} +1 -1
  288. package/dist/twilight/{p-45250f93.entry.js → p-71ce8e4f.entry.js} +1 -1
  289. package/dist/twilight/{p-e9d32f2b.entry.js → p-73649c81.entry.js} +1 -1
  290. package/dist/twilight/{p-ba40d16a.entry.js → p-75ad7f14.entry.js} +1 -1
  291. package/dist/twilight/{p-6ac44557.entry.js → p-75f7f1d8.entry.js} +1 -1
  292. package/dist/twilight/{p-80fd5011.entry.js → p-770142fe.entry.js} +1 -1
  293. package/dist/twilight/{p-affd80ef.entry.js → p-7731e280.entry.js} +1 -1
  294. package/dist/twilight/p-776f9492.entry.js +4 -0
  295. package/dist/twilight/{p-85e251dc.entry.js → p-7790a9a1.entry.js} +1 -1
  296. package/dist/twilight/p-78c04993.entry.js +4 -0
  297. package/dist/twilight/p-792494c8.entry.js +4 -0
  298. package/dist/twilight/{p-ed419d9f.entry.js → p-7a985fe3.entry.js} +1 -1
  299. package/dist/twilight/{p-99b50412.entry.js → p-7fffa509.entry.js} +1 -1
  300. package/dist/twilight/{p-805e7435.entry.js → p-8077d8b6.entry.js} +1 -1
  301. package/dist/twilight/{p-abe8eb3e.entry.js → p-830abcc1.entry.js} +1 -1
  302. package/dist/twilight/{p-4a874f3c.entry.js → p-89598ad3.entry.js} +1 -1
  303. package/dist/twilight/p-8b0b6bca.entry.js +4 -0
  304. package/dist/twilight/p-8d096f95.entry.js +4 -0
  305. package/dist/twilight/{p-8174d52f.entry.js → p-8d3c5d1f.entry.js} +1 -1
  306. package/dist/twilight/{p-f16b4066.entry.js → p-93571975.entry.js} +1 -1
  307. package/dist/twilight/{p-27cf397c.entry.js → p-97c5b11d.entry.js} +1 -1
  308. package/dist/twilight/{p-738d448e.entry.js → p-97fa91db.entry.js} +1 -1
  309. package/dist/twilight/{p-9f99720f.entry.js → p-9a2567e2.entry.js} +1 -1
  310. package/dist/twilight/p-9acfe389.entry.js +4 -0
  311. package/dist/twilight/{p-965cd6db.entry.js → p-9dd7cf71.entry.js} +1 -1
  312. package/dist/twilight/{p-ec044c15.entry.js → p-9fe5c0f5.entry.js} +1 -1
  313. package/dist/twilight/{p-D-sz1Kxb.js → p-B8nGVDvQ.js} +1 -1
  314. package/dist/twilight/{p-BwHQ1q5j.js → p-BjUh9YCs.js} +1 -1
  315. package/dist/twilight/{p-xUW2rh4u.js → p-BlPdaFn2.js} +1 -1
  316. package/dist/twilight/{p-Dpj_5kRc.js → p-BpJsOjKP.js} +1 -1
  317. package/dist/twilight/{p-CrWhtWBj.js → p-C9ldyQUq.js} +1 -1
  318. package/dist/twilight/{p-4aJjS7cx.js → p-CICtuB_u.js} +1 -1
  319. package/dist/twilight/{p-Dyk5c-z9.js → p-CNQaYCUJ.js} +1 -1
  320. package/dist/twilight/{p-BfIR6xlw.js → p-DOUAavek.js} +1 -1
  321. package/dist/twilight/{p-bc8d3957.entry.js → p-a1a650ab.entry.js} +1 -1
  322. package/dist/twilight/{p-7548d271.entry.js → p-a7566af2.entry.js} +1 -1
  323. package/dist/twilight/{p-787a4a1c.entry.js → p-a7849674.entry.js} +1 -1
  324. package/dist/twilight/{p-49c353c9.entry.js → p-a865995d.entry.js} +1 -1
  325. package/dist/twilight/{p-7c2c9437.entry.js → p-b297fe2e.entry.js} +1 -1
  326. package/dist/twilight/{p-47e90d17.entry.js → p-b6098938.entry.js} +1 -1
  327. package/dist/twilight/{p-f4137bdf.entry.js → p-b71673ee.entry.js} +1 -1
  328. package/dist/twilight/{p-94293309.entry.js → p-bb137dbb.entry.js} +1 -1
  329. package/dist/twilight/{p-64cefedc.entry.js → p-bd06c200.entry.js} +1 -1
  330. package/dist/twilight/{p-30f684ca.entry.js → p-be8c42f1.entry.js} +1 -1
  331. package/dist/twilight/{p-7f5e1513.entry.js → p-bf5b5f52.entry.js} +1 -1
  332. package/dist/twilight/{p-5ee8e1d9.entry.js → p-bf65d2fa.entry.js} +1 -1
  333. package/dist/twilight/{p-c724e583.entry.js → p-c0301e00.entry.js} +1 -1
  334. package/dist/twilight/{p-42556e74.entry.js → p-c122e9c1.entry.js} +1 -1
  335. package/dist/twilight/{p-3c0ae33e.entry.js → p-c6f09614.entry.js} +1 -1
  336. package/dist/twilight/{p-5fd4d2a8.entry.js → p-cb961f05.entry.js} +1 -1
  337. package/dist/twilight/{p-4f336fb5.entry.js → p-cbd056ba.entry.js} +1 -1
  338. package/dist/twilight/{p-062063b2.entry.js → p-cdeaf60b.entry.js} +1 -1
  339. package/dist/twilight/{p-NCszeo4N.js → p-cykIAOlk.js} +1 -1
  340. package/dist/twilight/{p-d9c049a6.entry.js → p-d089ac6d.entry.js} +1 -1
  341. package/dist/twilight/{p-c7364f66.entry.js → p-d2396143.entry.js} +1 -1
  342. package/dist/twilight/{p-d1ddef43.entry.js → p-d300a117.entry.js} +1 -1
  343. package/dist/twilight/{p-7a1ff06b.entry.js → p-d61298f8.entry.js} +1 -1
  344. package/dist/twilight/{p-df77bb1c.entry.js → p-d89328d7.entry.js} +1 -1
  345. package/dist/twilight/p-da0349f9.entry.js +4 -0
  346. package/dist/twilight/{p-d356a745.entry.js → p-da60995f.entry.js} +1 -1
  347. package/dist/twilight/{p-0e81f2c8.entry.js → p-dbb4db25.entry.js} +1 -1
  348. package/dist/twilight/{p-2bdae257.entry.js → p-dceb3725.entry.js} +1 -1
  349. package/dist/twilight/{p-5778ec88.entry.js → p-de10d0c3.entry.js} +1 -1
  350. package/dist/twilight/p-dfde387f.entry.js +4 -0
  351. package/dist/twilight/{p-3420bcd9.entry.js → p-e23b84bf.entry.js} +1 -1
  352. package/dist/twilight/{p-08b48300.entry.js → p-e3dd9502.entry.js} +1 -1
  353. package/dist/twilight/{p-58653a8d.entry.js → p-e849f5ef.entry.js} +1 -1
  354. package/dist/twilight/{p-88581a27.entry.js → p-ed96c703.entry.js} +1 -1
  355. package/dist/twilight/{p-f55fa716.entry.js → p-f054cf8e.entry.js} +1 -1
  356. package/dist/twilight/{p-b57f4dd9.entry.js → p-f23ada45.entry.js} +1 -1
  357. package/dist/twilight/{p-cc80fe0a.entry.js → p-f7c06bee.entry.js} +1 -1
  358. package/dist/twilight/{p-b9effddb.entry.js → p-f9dd6b3e.entry.js} +1 -1
  359. package/dist/twilight/{p-6cc7155b.entry.js → p-fb955257.entry.js} +1 -1
  360. package/dist/twilight/{p-886fec5f.entry.js → p-ffc7f526.entry.js} +1 -1
  361. package/dist/twilight/{p-gn30Eq58.js → p-wYYV5ykR.js} +1 -1
  362. package/dist/twilight/{p-Dlr254cS.js → p-ze9e0dxM.js} +1 -1
  363. package/dist/twilight/twilight.esm.js +1 -1
  364. package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +11 -0
  365. package/dist/types/components/salla-conditional-offer/interfaces.d.ts +36 -0
  366. package/dist/types/components/salla-conditional-offer/salla-conditional-offer.d.ts +182 -3
  367. package/dist/types/components/salla-order-shipments/salla-order-shipments.d.ts +0 -1
  368. package/dist/types/shared/cart-free-gifts.d.ts +26 -0
  369. package/dist/types/shared/coupons-request.d.ts +3 -0
  370. package/dist/types/shared/offer-stages.d.ts +6 -1
  371. package/package.json +5 -5
  372. package/dist/twilight/p-057f7c41.entry.js +0 -4
  373. package/dist/twilight/p-1a7e2b8b.entry.js +0 -4
  374. package/dist/twilight/p-3dc7dfdb.entry.js +0 -4
  375. package/dist/twilight/p-9393c067.entry.js +0 -4
  376. package/dist/twilight/p-e50f9afa.entry.js +0 -4
  377. package/dist/twilight/p-e9a506e6.entry.js +0 -4
  378. package/dist/twilight/p-f106168e.entry.js +0 -4
  379. package/dist/twilight/p-f3507d9c.entry.js +0 -4
@@ -43,6 +43,13 @@ export class SallaNextOrderCoupon {
43
43
  this.expiresTpl = Salla.lang.get('pages.thank_you.next_order_coupon_expires') || '';
44
44
  }
45
45
  async loadCoupons() {
46
+ // Store emits this marker only in edit-theme mode. An iframe alone is not
47
+ // sufficient: customer receipts embedded elsewhere must still use real coupons.
48
+ if (document.getElementById('theme-editor-script')) {
49
+ this.coupons = [{ code: 'PREVIEW15', type: 'P', amount: 15 }];
50
+ this.isLoading = false;
51
+ return;
52
+ }
46
53
  try {
47
54
  const response = await salla.api.request('coupons', { params: { type: 'thankyou' } });
48
55
  const raw = response?.data;
@@ -37,11 +37,7 @@ export class SallaOrderShipments {
37
37
  return this.fetchShipments();
38
38
  }
39
39
  readInitialShipments(value) {
40
- // Shipment grouping and tracking stay behind the feature flag; without it only the items render.
41
- if (!this.enabled) {
42
- this.shipments = [];
43
- return;
44
- }
40
+ // Fulfillment visibility follows order data, not the store’s split-shipment capability.
45
41
  try {
46
42
  const parsed = typeof value === 'string' ? JSON.parse(value) : value;
47
43
  this.shipments = Array.isArray(parsed) ? parsed : [];
@@ -68,8 +64,6 @@ export class SallaOrderShipments {
68
64
  async fetchShipments() {
69
65
  // supersede whatever is in flight first — the guards below can bail out before run() would
70
66
  this.request.abort();
71
- if (!this.enabled)
72
- return;
73
67
  const orderId = this.orderId || salla.config.get('page.id');
74
68
  if (!orderId)
75
69
  return;
@@ -102,9 +96,6 @@ export class SallaOrderShipments {
102
96
  label(key, fallback) {
103
97
  return salla.lang.getWithDefault(key, fallback);
104
98
  }
105
- get enabled() {
106
- return salla.config.get('store.features', []).includes('thankyou-page-multi-shipments');
107
- }
108
99
  get isSplit() {
109
100
  return this.shipments.length > 1;
110
101
  }
@@ -29,6 +29,9 @@
29
29
  * `twilight/packages/twilight/src/api/cart.js:831-846`.
30
30
  */
31
31
  const EMPTY_GIFT_ITEMS = Object.freeze([]);
32
+ const EMPTY_PRODUCT_LINES = Object.freeze([]);
33
+ /** Every line from the last parsed response — published in the SAME pass as `itemsCache`. */
34
+ let linesCache = null;
32
35
  /**
33
36
  * The gift LINES from the last parsed response. `null` is the single "nothing has loaded
34
37
  * yet" flag shared with `countCache`, which keeps the two from ever disagreeing about
@@ -130,6 +133,7 @@ function syncCartIdentity() {
130
133
  if (cacheIdentity !== undefined && cacheIdentity !== current) {
131
134
  generation++;
132
135
  itemsCache = null;
136
+ linesCache = null;
133
137
  countCache = null;
134
138
  isAuthoritative = false;
135
139
  pendingRequest = null;
@@ -254,6 +258,24 @@ function buildGiftItems(items) {
254
258
  }
255
259
  return gifts;
256
260
  }
261
+ /** Every line of the cart, in cart order — see `CartProductLine`. */
262
+ function buildProductLines(items) {
263
+ const lines = [];
264
+ for (const item of items) {
265
+ if (item?.id === undefined || item?.id === null)
266
+ continue;
267
+ const quantity = toNumber(item.quantity);
268
+ lines.push({
269
+ id: String(item.id),
270
+ productId: toNullableNumber(item.product_id),
271
+ quantity,
272
+ // Only a line the server flagged as granted by a cart offer has free units.
273
+ freeQuantity: item.added_by_offer ? Math.max(0, resolveFreeQuantity(item, quantity)) : 0,
274
+ offerId: item.added_by_offer ? toNullableNumber(item.offer_id) : null,
275
+ });
276
+ }
277
+ return lines;
278
+ }
257
279
  function fetchAndCache() {
258
280
  if (pendingRequest)
259
281
  return pendingRequest;
@@ -268,6 +290,7 @@ function fetchAndCache() {
268
290
  // Both projections come out of the SAME response, in one pass.
269
291
  return {
270
292
  gifts: buildGiftItems(items),
293
+ lines: buildProductLines(items),
271
294
  count: extractCartCount(res, found),
272
295
  // The response was reached and parsed — these values are the cart, so the cache
273
296
  // they land in may be short-circuited on. See `isAuthoritative`.
@@ -287,6 +310,7 @@ function fetchAndCache() {
287
310
  // connection can never claim the cart is empty.
288
311
  .catch((error) => ({
289
312
  gifts: itemsCache ?? [],
313
+ lines: linesCache ?? [],
290
314
  count: isCartNotCreated(error) ? 0 : countCache,
291
315
  /**
292
316
  * NOT authoritative, `CartNotCreated` included.
@@ -303,13 +327,14 @@ function fetchAndCache() {
303
327
  */
304
328
  ok: false,
305
329
  }))
306
- .then(({ gifts, count, ok }) => {
330
+ .then(({ gifts, lines, count, ok }) => {
307
331
  // Only publish if nothing invalidated us while we were in flight.
308
332
  // Otherwise this is pre-mutation data racing a newer, authoritative
309
333
  // request — publishing it would make the lookups short-circuit on stale
310
334
  // data until the NEXT mutation happens to come along.
311
335
  if (startedAtGeneration === generation) {
312
336
  itemsCache = gifts;
337
+ linesCache = lines;
313
338
  countCache = count;
314
339
  isAuthoritative = ok;
315
340
  }
@@ -338,6 +363,20 @@ export function getCartFreeGiftItems() {
338
363
  }
339
364
  return fetchAndCache().then(() => itemsCache ?? EMPTY_GIFT_ITEMS);
340
365
  }
366
+ /**
367
+ * Every line of the cart (paid and free), in cart order — for the CP-2171 free product picker.
368
+ *
369
+ * Shares the cache, the in-flight promise and the generation guard with
370
+ * `getCartFreeGiftItems()` and `getCartItemCount()`: no request of its own, and never a
371
+ * different cart state from theirs.
372
+ */
373
+ export function getCartProductLines() {
374
+ syncCartIdentity();
375
+ if (isAuthoritative && itemsCache) {
376
+ return Promise.resolve(linesCache ?? EMPTY_PRODUCT_LINES);
377
+ }
378
+ return fetchAndCache().then(() => linesCache ?? EMPTY_PRODUCT_LINES);
379
+ }
341
380
  /**
342
381
  * Whether the cached cart picture came from a response that was actually reached and
343
382
  * parsed, rather than from the fallback a rejected lookup publishes.
@@ -410,6 +449,7 @@ export function refreshCartFreeGifts() {
410
449
  return pendingRefresh;
411
450
  generation++;
412
451
  itemsCache = null;
452
+ linesCache = null;
413
453
  countCache = null;
414
454
  isAuthoritative = false;
415
455
  // This invalidation already covers whatever id the cart has now.
@@ -439,6 +479,7 @@ export function refreshCartFreeGifts() {
439
479
  /** @internal exported for tests only — resets module-level state between specs. */
440
480
  export function __resetCartFreeGiftsForTests() {
441
481
  itemsCache = null;
482
+ linesCache = null;
442
483
  countCache = null;
443
484
  isAuthoritative = false;
444
485
  pendingRequest = null;
@@ -0,0 +1,47 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ /**
5
+ * One shared GET /coupons per page view (CHKM-594).
6
+ *
7
+ * Every `salla-cart-coupons` instance (a re-created drawer, a second mount) used to hit the
8
+ * endpoint on its own. They now share one in-flight/settled promise, keyed by everything the
9
+ * response varies on, so a currency / language / scope change automatically misses the cache.
10
+ */
11
+ const requests = new Map();
12
+ // Same source the request layer uses to send the scope (lib/request.js): config first, then storage.
13
+ const requestKey = () => {
14
+ const scope = salla.config.get('store.scope', salla.storage.get('scope'));
15
+ return [
16
+ ...['store.id', 'user.currency_code', 'user.language_code'].map(key => String(salla.config.get(key, ''))),
17
+ String(scope?.id ?? ''),
18
+ ].join('|');
19
+ };
20
+ /** Drop every cached request, so the next load refetches. */
21
+ export const resetCouponsRequest = () => {
22
+ requests.clear();
23
+ };
24
+ // A coupon added or removed changes what the endpoint returns (and what is still applicable).
25
+ // off-then-on keeps the subscription single however often (or after whatever reset) this runs.
26
+ const invalidateOnCouponChange = () => {
27
+ ['cart::coupon.added', 'cart::coupon.deleted'].forEach(eventName => {
28
+ salla.event.off(eventName, resetCouponsRequest);
29
+ salla.event.on(eventName, resetCouponsRequest);
30
+ });
31
+ };
32
+ export const getCouponsRequest = () => {
33
+ invalidateOnCouponChange();
34
+ const key = requestKey();
35
+ let request = requests.get(key);
36
+ if (!request) {
37
+ request = salla.api.request('coupons');
38
+ requests.set(key, request);
39
+ const failed = request;
40
+ // A failed request must never stick: let the next caller retry.
41
+ failed.catch(() => {
42
+ if (requests.get(key) === failed)
43
+ requests.delete(key);
44
+ });
45
+ }
46
+ return request;
47
+ };
@@ -180,8 +180,13 @@ export function sortByThreshold(items, getThreshold, getIdentity) {
180
180
  * @param rawTierValues each stage's OWN `current_value`, aligned the same way. A tier
181
181
  * without a readable one is measured by `currentValue`, so omitting it — an older
182
182
  * backend — changes nothing. See `OfferStageProgress.values`.
183
+ * @param rawCanAddFree each stage's `can_add_free` (CP-2171), aligned the same way. Read
184
+ * only in case (3), where no tier carries `is_applied`: a free product tier that
185
+ * carries one is reached when the ENGINE says so, not when its `current_value` —
186
+ * which counts the gift lines at full price — passes `min_spend`. Omit it and case
187
+ * (3) is the threshold behaviour, unchanged.
183
188
  */
184
- export function computeOfferStageProgress(currentValue, rawThresholds, rawStartValue = 0, rawApplied = [], rawTierValues = []) {
189
+ export function computeOfferStageProgress(currentValue, rawThresholds, rawStartValue = 0, rawApplied = [], rawTierValues = [], rawCanAddFree = []) {
185
190
  // Unparseable thresholds are dropped, not zeroed — see `isUsableThreshold`.
186
191
  //
187
192
  // The flag travels WITH its threshold through both the drop and the sort. Sorting two
@@ -194,6 +199,7 @@ export function computeOfferStageProgress(currentValue, rawThresholds, rawStartV
194
199
  threshold: parseNumeric(threshold),
195
200
  applied: readAppliedFlag(rawApplied?.[index]),
196
201
  tierValue: parseNumeric(rawTierValues?.[index]),
202
+ canAddFree: typeof rawCanAddFree?.[index] === 'boolean' ? rawCanAddFree[index] : undefined,
197
203
  }))
198
204
  .filter((entry) => entry.threshold !== null)
199
205
  .sort((a, b) => a.threshold - b.threshold || a.index - b.index);
@@ -281,12 +287,25 @@ export function computeOfferStageProgress(currentValue, rawThresholds, rawStartV
281
287
  appliedIndex = index;
282
288
  }
283
289
  }
284
- // Case (3) closes the prefix at `lastReachedIndex` rather than comparing tier by tier.
290
+ // Case (3) closes the prefix at the last reached tier rather than comparing tier by tier.
285
291
  // With one value for every tier the two are the same statement; with per-tier values
286
292
  // it is what keeps `met` a prefix, on the same single-winner reasoning as case (1).
293
+ //
294
+ // CP-2171 — a tier that carries `can_add_free` is reached on the engine's answer, not on
295
+ // its value: a guest with 40 paid and three listed gifts in the cart has a value past
296
+ // `min_spend`, yet every gift is charged. Only `met` reads it; the bar (`lastReachedIndex`,
297
+ // `fills`, `isComplete`) stays the threshold projection, and the guidance line, finding
298
+ // nothing left to spend, says the conditions are not met.
299
+ let lastMetIndex = NO_STAGE_REACHED;
300
+ for (let index = 0; index < thresholds.length; index++) {
301
+ const canAddFree = entries[index].canAddFree;
302
+ if (canAddFree === undefined ? values[index] >= thresholds[index] : canAddFree) {
303
+ lastMetIndex = index;
304
+ }
305
+ }
287
306
  const met = hasEngineVerdict
288
307
  ? thresholds.map((_, index) => index <= appliedIndex)
289
- : thresholds.map((_, index) => index <= lastReachedIndex);
308
+ : thresholds.map((_, index) => index <= lastMetIndex);
290
309
  const metCount = met.filter(Boolean).length;
291
310
  const nextUnmetIndex = met.findIndex(isMet => !isMet); // -1 === NO_STAGE_REACHED
292
311
  const allMet = nextUnmetIndex === NO_STAGE_REACHED;