@salla.sa/twilight-components 2.14.469 → 2.14.471

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 (334) hide show
  1. package/dist/cjs/{filepond-CG7dNZgq.js → filepond-nQfoJi-g.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-B1zrjwgr.js → filepond-plugin-file-poster-hJ9M3t0L.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BqZtoWbe.js → filepond-plugin-file-validate-size-CgpDoJxO.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BGmGKK9L.js → filepond-plugin-file-validate-type-B2KbrSbZ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CYeh6qmG.js → filepond-plugin-image-edit-BkNqlXrL.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BEVpo-ZQ.js → filepond-plugin-image-exif-orientation-P3Zfw8MQ.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-C7MMEZFE.js → filepond-plugin-image-preview-CNXFmZth.js} +1 -1
  8. package/dist/cjs/{functions-CnBVKKGk.js → functions-B8CHu2z4.js} +1 -1
  9. package/dist/cjs/{index-BNOCK3IN.js → index-CPhoxBkB.js} +1 -1
  10. package/dist/cjs/{index-inmL4H71.js → index-GUQS0-Q-.js} +2 -2
  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 +22 -6
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +90 -29
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  21. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-gifting.cjs.entry.js +57 -24
  37. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  44. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  46. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  50. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-reward-action_4.cjs.entry.js +4 -4
  85. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  101. package/dist/cjs/{tracked-promise-DvLhM2Sx.js → tracked-promise-B7zS9VE-.js} +1 -1
  102. package/dist/cjs/twilight.cjs.js +2 -2
  103. package/dist/cjs/{vanilla-picker-DtuN6WGq.js → vanilla-picker-1QrQ9HZi.js} +1 -1
  104. package/dist/collection/components/salla-breadcrumb/salla-breadcrumb.js +21 -5
  105. package/dist/collection/components/salla-gifting/salla-gifting.css +1 -1
  106. package/dist/collection/components/salla-gifting/salla-gifting.js +55 -22
  107. package/dist/collection/components/salla-loyalty-program/salla-loyalty-reward.js +1 -1
  108. package/dist/collection/components/salla-loyalty-program/salla-reward-card.js +1 -1
  109. package/dist/collection/components/salla-product-options/availability-utils.js +54 -0
  110. package/dist/collection/components/salla-product-options/salla-product-options.js +40 -29
  111. package/dist/components/index.js +2 -2
  112. package/dist/components/salla-breadcrumb.js +21 -5
  113. package/dist/components/salla-gifting.js +56 -23
  114. package/dist/components/salla-loyalty-reward.js +1 -1
  115. package/dist/components/salla-product-options2.js +90 -28
  116. package/dist/components/salla-reward-card2.js +1 -1
  117. package/dist/esm/{filepond-D4dDq1wa.js → filepond-Doklzvb6.js} +1 -1
  118. package/dist/esm/{filepond-plugin-file-poster-CcnsMPSH.js → filepond-plugin-file-poster-BSBF1f0z.js} +1 -1
  119. package/dist/esm/{filepond-plugin-file-validate-size-qgEgRYkk.js → filepond-plugin-file-validate-size-CbaXmA8m.js} +1 -1
  120. package/dist/esm/{filepond-plugin-file-validate-type-BuFGnco8.js → filepond-plugin-file-validate-type-FjPelZ0O.js} +1 -1
  121. package/dist/esm/{filepond-plugin-image-edit-kS2Sie2d.js → filepond-plugin-image-edit-BmG7tc8Q.js} +1 -1
  122. package/dist/esm/{filepond-plugin-image-exif-orientation-Bjoh_of2.js → filepond-plugin-image-exif-orientation-DhRt-kLt.js} +1 -1
  123. package/dist/esm/{filepond-plugin-image-preview-b_VEHHGf.js → filepond-plugin-image-preview-DZ2XM7gt.js} +1 -1
  124. package/dist/esm/{functions-ISZQDw0y.js → functions-_-9PUSBv.js} +1 -1
  125. package/dist/esm/{index-CqC4wD_f.js → index-CJ2jUKh4.js} +1 -1
  126. package/dist/esm/{index-Cqh-ta1v.js → index-Cly9a4nm.js} +2 -2
  127. package/dist/esm/loader.js +3 -3
  128. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  129. package/dist/esm/salla-accordion_6.entry.js +22 -6
  130. package/dist/esm/salla-add-product-button_5.entry.js +90 -29
  131. package/dist/esm/salla-advertisement.entry.js +1 -1
  132. package/dist/esm/salla-alert_2.entry.js +1 -1
  133. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  134. package/dist/esm/salla-apps-icons.entry.js +1 -1
  135. package/dist/esm/salla-badge.entry.js +1 -1
  136. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  137. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  138. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  139. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  140. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  141. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  142. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  143. package/dist/esm/salla-contacts.entry.js +1 -1
  144. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  145. package/dist/esm/salla-count-down.entry.js +1 -1
  146. package/dist/esm/salla-custom-fields.entry.js +1 -1
  147. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  148. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  149. package/dist/esm/salla-filters-widget.entry.js +1 -1
  150. package/dist/esm/salla-filters.entry.js +1 -1
  151. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  152. package/dist/esm/salla-gifting.entry.js +57 -24
  153. package/dist/esm/salla-hook.entry.js +1 -1
  154. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  155. package/dist/esm/salla-installment.entry.js +1 -1
  156. package/dist/esm/salla-list-tile.entry.js +1 -1
  157. package/dist/esm/salla-localization-modal.entry.js +1 -1
  158. package/dist/esm/salla-login-modal.entry.js +1 -1
  159. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  160. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  161. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  162. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  164. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  166. package/dist/esm/salla-loyalty-reward.entry.js +3 -3
  167. package/dist/esm/salla-loyalty.entry.js +1 -1
  168. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  169. package/dist/esm/salla-map.entry.js +1 -1
  170. package/dist/esm/salla-menu.entry.js +1 -1
  171. package/dist/esm/salla-metadata.entry.js +1 -1
  172. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  173. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  174. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  175. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  176. package/dist/esm/salla-notification-item.entry.js +1 -1
  177. package/dist/esm/salla-notifications.entry.js +1 -1
  178. package/dist/esm/salla-offer-modal.entry.js +1 -1
  179. package/dist/esm/salla-offer.entry.js +1 -1
  180. package/dist/esm/salla-order-branch.entry.js +1 -1
  181. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  182. package/dist/esm/salla-order-details-options.entry.js +1 -1
  183. package/dist/esm/salla-order-details.entry.js +1 -1
  184. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  185. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  186. package/dist/esm/salla-order-edit.entry.js +1 -1
  187. package/dist/esm/salla-order-summary.entry.js +1 -1
  188. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  189. package/dist/esm/salla-orders.entry.js +1 -1
  190. package/dist/esm/salla-payments.entry.js +1 -1
  191. package/dist/esm/salla-placeholder.entry.js +1 -1
  192. package/dist/esm/salla-price-range.entry.js +1 -1
  193. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  194. package/dist/esm/salla-product-card_2.entry.js +1 -1
  195. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  196. package/dist/esm/salla-products-list.entry.js +1 -1
  197. package/dist/esm/salla-progress-bar.entry.js +1 -1
  198. package/dist/esm/salla-quick-order.entry.js +1 -1
  199. package/dist/esm/salla-rating-modal.entry.js +1 -1
  200. package/dist/esm/salla-reward-action_4.entry.js +4 -4
  201. package/dist/esm/salla-scopes.entry.js +1 -1
  202. package/dist/esm/salla-search.entry.js +1 -1
  203. package/dist/esm/salla-skeleton.entry.js +1 -1
  204. package/dist/esm/salla-slider.entry.js +1 -1
  205. package/dist/esm/salla-social-share.entry.js +1 -1
  206. package/dist/esm/salla-social.entry.js +1 -1
  207. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  208. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  209. package/dist/esm/salla-tooltip.entry.js +1 -1
  210. package/dist/esm/salla-trust-badges.entry.js +1 -1
  211. package/dist/esm/salla-user-menu.entry.js +1 -1
  212. package/dist/esm/salla-user-profile.entry.js +1 -1
  213. package/dist/esm/salla-user-settings.entry.js +1 -1
  214. package/dist/esm/salla-verify.entry.js +1 -1
  215. package/dist/esm/salla-wallet.entry.js +1 -1
  216. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  217. package/dist/esm/{tracked-promise-CH_UyK-l.js → tracked-promise-CdJOz1H_.js} +1 -1
  218. package/dist/esm/twilight.js +3 -3
  219. package/dist/esm/{vanilla-picker-PE31tu9y.js → vanilla-picker-B7uhKtBD.js} +1 -1
  220. package/dist/twilight/{p-a85d80b5.entry.js → p-005ac762.entry.js} +1 -1
  221. package/dist/twilight/p-00f3a2ec.entry.js +4 -0
  222. package/dist/twilight/{p-e06e37c1.entry.js → p-03d28343.entry.js} +1 -1
  223. package/dist/twilight/{p-71f2ba66.entry.js → p-05266229.entry.js} +1 -1
  224. package/dist/twilight/{p-74e0d0c2.entry.js → p-05fdfdc9.entry.js} +1 -1
  225. package/dist/twilight/{p-3b198162.entry.js → p-06a0b408.entry.js} +1 -1
  226. package/dist/twilight/{p-5701244a.entry.js → p-08d2e056.entry.js} +1 -1
  227. package/dist/twilight/{p-16c64a38.entry.js → p-0b6d87a5.entry.js} +1 -1
  228. package/dist/twilight/{p-d823cbcd.entry.js → p-0e9ae0e0.entry.js} +1 -1
  229. package/dist/twilight/{p-ce0410d5.entry.js → p-130b525c.entry.js} +1 -1
  230. package/dist/twilight/{p-51c30ec2.entry.js → p-14ca32a2.entry.js} +1 -1
  231. package/dist/twilight/{p-559bdcca.entry.js → p-16c9b4bd.entry.js} +1 -1
  232. package/dist/twilight/{p-219b14c4.entry.js → p-1938ad27.entry.js} +1 -1
  233. package/dist/twilight/{p-5d364fc2.entry.js → p-195589ec.entry.js} +1 -1
  234. package/dist/twilight/{p-e265d626.entry.js → p-20afc879.entry.js} +1 -1
  235. package/dist/twilight/{p-d6b6a8ad.entry.js → p-25f7fbc1.entry.js} +1 -1
  236. package/dist/twilight/{p-d23eeb0c.entry.js → p-288572d0.entry.js} +1 -1
  237. package/dist/twilight/{p-732bd9fb.entry.js → p-2d235234.entry.js} +1 -1
  238. package/dist/twilight/{p-f67639df.entry.js → p-39426e43.entry.js} +1 -1
  239. package/dist/twilight/{p-40eb9556.entry.js → p-39ff606c.entry.js} +1 -1
  240. package/dist/twilight/{p-227d11a0.entry.js → p-40e2fc5f.entry.js} +1 -1
  241. package/dist/twilight/{p-0cca1b63.entry.js → p-44abf289.entry.js} +1 -1
  242. package/dist/twilight/{p-2dbb3b49.entry.js → p-46b4c12f.entry.js} +1 -1
  243. package/dist/twilight/{p-15b3f969.entry.js → p-47080690.entry.js} +1 -1
  244. package/dist/twilight/{p-f64168cc.entry.js → p-48e85ee2.entry.js} +1 -1
  245. package/dist/twilight/{p-77d2312a.entry.js → p-4ba3ebb1.entry.js} +1 -1
  246. package/dist/twilight/{p-1db8b515.entry.js → p-4d368d57.entry.js} +1 -1
  247. package/dist/twilight/{p-cee7a8ad.entry.js → p-55b21f9b.entry.js} +1 -1
  248. package/dist/twilight/{p-49181c4a.entry.js → p-5971669a.entry.js} +1 -1
  249. package/dist/twilight/{p-1415eb5e.entry.js → p-5b8adb19.entry.js} +1 -1
  250. package/dist/twilight/{p-3e5a57cc.entry.js → p-5c0d795c.entry.js} +1 -1
  251. package/dist/twilight/{p-ccd8c960.entry.js → p-5ca57591.entry.js} +1 -1
  252. package/dist/twilight/{p-8db52fe9.entry.js → p-5fe6ac53.entry.js} +1 -1
  253. package/dist/twilight/{p-73d9e4c8.entry.js → p-63be9782.entry.js} +1 -1
  254. package/dist/twilight/{p-5334222c.entry.js → p-654af42c.entry.js} +1 -1
  255. package/dist/twilight/{p-c6be8afd.entry.js → p-6838ec3a.entry.js} +1 -1
  256. package/dist/twilight/{p-b7727021.entry.js → p-68fa9305.entry.js} +1 -1
  257. package/dist/twilight/{p-d63f2cbd.entry.js → p-6ba653dc.entry.js} +1 -1
  258. package/dist/twilight/{p-32d5d279.entry.js → p-6efce4b0.entry.js} +1 -1
  259. package/dist/twilight/{p-196fad8d.entry.js → p-72bc753c.entry.js} +1 -1
  260. package/dist/twilight/{p-4c370853.entry.js → p-7343e9d9.entry.js} +1 -1
  261. package/dist/twilight/{p-16b64bb5.entry.js → p-7874b654.entry.js} +1 -1
  262. package/dist/twilight/{p-2ba603bc.entry.js → p-79c2cc3c.entry.js} +1 -1
  263. package/dist/twilight/{p-93ec294d.entry.js → p-7e4e3e76.entry.js} +1 -1
  264. package/dist/twilight/{p-b16d8b19.entry.js → p-7ee71548.entry.js} +1 -1
  265. package/dist/twilight/p-7efa0246.entry.js +4 -0
  266. package/dist/twilight/{p-1c0f9fd9.entry.js → p-820ee5fe.entry.js} +1 -1
  267. package/dist/twilight/{p-fd180bd3.entry.js → p-821fd8c1.entry.js} +1 -1
  268. package/dist/twilight/{p-79c20964.entry.js → p-84207e00.entry.js} +1 -1
  269. package/dist/twilight/{p-798fb3c7.entry.js → p-86469c65.entry.js} +1 -1
  270. package/dist/twilight/{p-14a3277b.entry.js → p-8aca6bc0.entry.js} +1 -1
  271. package/dist/twilight/{p-36884c05.entry.js → p-8c404dbf.entry.js} +1 -1
  272. package/dist/twilight/{p-aec0a2df.entry.js → p-8d26f80c.entry.js} +1 -1
  273. package/dist/twilight/p-8e121e7c.entry.js +4 -0
  274. package/dist/twilight/{p-b6c0aa79.entry.js → p-92961807.entry.js} +1 -1
  275. package/dist/twilight/{p-38a791cb.entry.js → p-96825a64.entry.js} +1 -1
  276. package/dist/twilight/{p-8bcc3b86.entry.js → p-98f0f411.entry.js} +1 -1
  277. package/dist/twilight/p-99b127fa.entry.js +4 -0
  278. package/dist/twilight/{p-e0671ff1.entry.js → p-9b7ad2bd.entry.js} +1 -1
  279. package/dist/twilight/{p-78ff445c.entry.js → p-9ddfdc65.entry.js} +1 -1
  280. package/dist/twilight/{p-5fxCpxw5.js → p-BUcuXVwN.js} +1 -1
  281. package/dist/twilight/{p-CUfwD9kr.js → p-BpiX36Sb.js} +1 -1
  282. package/dist/twilight/{p-B0uENqSF.js → p-C-NwbNqh.js} +1 -1
  283. package/dist/twilight/p-CWrfZ9Qs.js +9 -0
  284. package/dist/twilight/{p-7FtjQghq.js → p-CXgdON62.js} +1 -1
  285. package/dist/twilight/{p-dKdk2xpB.js → p-CkxoydBy.js} +1 -1
  286. package/dist/twilight/{p-Cqh-ta1v.js → p-Cly9a4nm.js} +1 -1
  287. package/dist/twilight/{p-yyvPGK6r.js → p-D3bGV5Yn.js} +2 -2
  288. package/dist/twilight/{p-m2p-QAbu.js → p-DGWMOt94.js} +1 -1
  289. package/dist/twilight/{p-DZ18vMT2.js → p-DhE0-1Aj.js} +1 -1
  290. package/dist/twilight/{p-a918b812.entry.js → p-a47dccd1.entry.js} +1 -1
  291. package/dist/twilight/{p-681f8874.entry.js → p-a74197ee.entry.js} +1 -1
  292. package/dist/twilight/{p-d8f22e4b.entry.js → p-a900af64.entry.js} +1 -1
  293. package/dist/twilight/{p-7e185acf.entry.js → p-aae74199.entry.js} +1 -1
  294. package/dist/twilight/{p-badf4c9d.entry.js → p-af970c82.entry.js} +1 -1
  295. package/dist/twilight/{p-9785f314.entry.js → p-b07f1925.entry.js} +1 -1
  296. package/dist/twilight/{p-b295c1f1.entry.js → p-b0f0d7bc.entry.js} +1 -1
  297. package/dist/twilight/{p-dc8555bf.entry.js → p-b555a4aa.entry.js} +1 -1
  298. package/dist/twilight/{p-31bd852c.entry.js → p-b8b3c0fc.entry.js} +1 -1
  299. package/dist/twilight/{p-6e723d46.entry.js → p-b96e442c.entry.js} +1 -1
  300. package/dist/twilight/{p-J_27I63T.js → p-b9tXSwoW.js} +1 -1
  301. package/dist/twilight/{p-C3kw3FEZ.js → p-bo_zr0My.js} +1 -1
  302. package/dist/twilight/{p-6b6f9822.entry.js → p-c184157a.entry.js} +1 -1
  303. package/dist/twilight/{p-dca3b67e.entry.js → p-c5613717.entry.js} +1 -1
  304. package/dist/twilight/p-c5f3b4e2.entry.js +4 -0
  305. package/dist/twilight/{p-3d517178.entry.js → p-c992256d.entry.js} +1 -1
  306. package/dist/twilight/{p-9a3f27e9.entry.js → p-c9b37b12.entry.js} +1 -1
  307. package/dist/twilight/{p-7afe6e1a.entry.js → p-cdb0e80a.entry.js} +1 -1
  308. package/dist/twilight/p-d07ee0d6.entry.js +4 -0
  309. package/dist/twilight/{p-6590acee.entry.js → p-d7f528c7.entry.js} +1 -1
  310. package/dist/twilight/{p-06372aeb.entry.js → p-dab62284.entry.js} +1 -1
  311. package/dist/twilight/{p-19fe2b27.entry.js → p-db2d9d1c.entry.js} +1 -1
  312. package/dist/twilight/{p-4ee20a54.entry.js → p-e12da840.entry.js} +1 -1
  313. package/dist/twilight/{p-32a7cb85.entry.js → p-eb767e28.entry.js} +1 -1
  314. package/dist/twilight/{p-4b20872a.entry.js → p-ef345c2c.entry.js} +1 -1
  315. package/dist/twilight/{p-f0e96875.entry.js → p-f2d0b9d1.entry.js} +1 -1
  316. package/dist/twilight/{p-8b538bd7.entry.js → p-f5969e58.entry.js} +1 -1
  317. package/dist/twilight/{p-6d23fd92.entry.js → p-f6435c3c.entry.js} +1 -1
  318. package/dist/twilight/{p-17920aa7.entry.js → p-f9c1c247.entry.js} +1 -1
  319. package/dist/twilight/{p-d0c8435f.entry.js → p-fa0ebde1.entry.js} +1 -1
  320. package/dist/twilight/p-fbf4cb19.entry.js +4 -0
  321. package/dist/twilight/twilight.esm.js +1 -1
  322. package/dist/types/components/salla-breadcrumb/salla-breadcrumb.d.ts +1 -0
  323. package/dist/types/components/salla-gifting/salla-gifting.d.ts +9 -0
  324. package/dist/types/components/salla-product-options/availability-utils.d.ts +19 -0
  325. package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
  326. package/package.json +5 -5
  327. package/dist/twilight/p-054c9462.entry.js +0 -4
  328. package/dist/twilight/p-06c06719.entry.js +0 -4
  329. package/dist/twilight/p-0c7efc0b.entry.js +0 -4
  330. package/dist/twilight/p-293a6d6b.entry.js +0 -4
  331. package/dist/twilight/p-4a81a708.entry.js +0 -4
  332. package/dist/twilight/p-61ad2660.entry.js +0 -4
  333. package/dist/twilight/p-DyQ5MH6F.js +0 -9
  334. package/dist/twilight/p-dbdbb882.entry.js +0 -4
@@ -22,12 +22,14 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
22
22
  }
23
23
  })
24
24
  .then(() => {
25
+ const page = salla.config.get("page");
26
+ if (page?.slug === 'wishlist') {
27
+ this.breadcrumbs = [];
28
+ return;
29
+ }
25
30
  if (!salla.config.get('theme.settings.is_breadcrumbs_enabled', true)) {
26
31
  throw new Error('salla-breadcrumb:: merchant disabled the feature');
27
32
  }
28
- })
29
- .then(() => {
30
- const page = salla.config.get("page");
31
33
  if (!page || !page.slug) {
32
34
  salla.logger.error('salla-breadcrumbs:: page object not existed on salla.config.get("page")!');
33
35
  this.breadcrumbs = [];
@@ -147,8 +149,8 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
147
149
  storeBreadcrumbSnapshot() {
148
150
  try {
149
151
  const page = salla.config.get("page");
150
- // Skip storing breadcrumbs for product.single page
151
- if (page?.slug === 'product.single') {
152
+ // Skip storing breadcrumbs for pages that should not affect navigation history
153
+ if (page?.slug === 'product.single' || page?.slug === 'wishlist') {
152
154
  return;
153
155
  }
154
156
  const items = [...this.breadcrumbs];
@@ -169,6 +171,10 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
169
171
  salla.log('salla-breadcrumb:: There is no breadcrumbs!');
170
172
  return null;
171
173
  }
174
+ const isShareWishList = salla.config.get('page.slug') === 'wishlist';
175
+ if (isShareWishList) {
176
+ return null;
177
+ }
172
178
  const isProductSingle = salla.config.get('page.slug') === "product.single";
173
179
  return [
174
180
  h("ol", { class: {
@@ -243,6 +249,16 @@ const SallaBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class SallaBreadcrumb
243
249
  let lastEl = this.host.querySelectorAll('.s-breadcrumb-item')[this.breadcrumbs.length - 1]?.querySelector('a');
244
250
  lastEl && lastEl.replaceWith(lastEl.firstChild);
245
251
  }
252
+ componentDidLoad() {
253
+ // Remove the page main title if the page is a share wishlist page
254
+ // when the component is loaded, page-main-title exists in the DOM as it's a theme markup.
255
+ // So whenever breadcrumb is rendered, the main title is most likely rendered too.
256
+ // Therefore, we remove it if the page is a share wishlist page.
257
+ const isShareWishList = salla.config.get('page.slug') === 'wishlist';
258
+ if (isShareWishList) {
259
+ document.getElementById('page-main-title')?.remove();
260
+ }
261
+ }
246
262
  get host() { return this; }
247
263
  static get style() { return sallaBreadcrumbCss; }
248
264
  }, [0, "salla-breadcrumb", {
@@ -31,7 +31,7 @@ var Alert = `<!-- Generated by IcoMoon.io -->
31
31
  </svg>
32
32
  `;
33
33
 
34
- const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}";
34
+ const sallaGiftingCss = ".s-gifting-steps-wrapper{transition:height 0.8s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}";
35
35
 
36
36
  const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
37
37
  constructor() {
@@ -201,26 +201,25 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
201
201
  salla.event.dispatch('login::open', { withoutReload: true });
202
202
  return;
203
203
  }
204
+ // Reopen on step 1, but KEEP the user's selections (image / text / custom
205
+ // message / sender+receiver). The modal element is never destroyed, so its
206
+ // state and DOM survive close→reopen without a page refresh — we only reset
207
+ // the step view and clear anime.js's leftover inline styles so the slide
208
+ // doesn't reopen with step 2 painted on top.
209
+ this.resetStepsAnimation();
204
210
  this.currentStep = 1;
205
211
  this.parentClass = 'is-current-step-1';
206
212
  this.step2Animated = false;
207
- this.selectedText = undefined;
208
- this.selectedGiftTextOption = undefined;
209
- this.uploadedImage = undefined;
210
- this.selectedImage = undefined;
213
+ // Drop any stale inline height from the previous session's step (e.g. step 2,
214
+ // shorter for digital products) so reopening to step 1 isn't clipped. Cleared
215
+ // while the modal is hidden, so the later set won't animate.
216
+ this.stepsWrapper?.style.removeProperty('height');
211
217
  await this.modal.open();
212
218
  // Determine the appropriate method to call based on the `physicalProducts` flag
213
219
  const giftDetailsMethod = this.productId ? () => salla.product.getGiftProductDetails(this.productId) : () => salla.cart.getGiftCartDetails();
214
220
  return await salla.api.withoutNotifier(giftDetailsMethod)
215
221
  .then((response) => {
216
222
  this.gift = response.data;
217
- // Backward-compat: older BE responses omit these visibility flags. Treat a
218
- // missing flag as enabled so the image/text steps still render until the BE
219
- // that returns them is deployed. Use `??` so an explicit `false` is preserved.
220
- this.gift.show_texts = this.gift.show_texts ?? true;
221
- this.gift.show_images = this.gift.show_images ?? true;
222
- this.gift.show_custom_text = this.gift.show_custom_text ?? true;
223
- this.gift.show_image_upload = this.gift.show_image_upload ?? true;
224
223
  this.senderName = this.gift.sender_name;
225
224
  this.disableClass = this.gift?.show_image_upload ? '' : 'pointer-events-none';
226
225
  if (!this.gift.show_texts) {
@@ -236,11 +235,6 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
236
235
  this.parentClass = 'is-current-step-2';
237
236
  this.step2Animated = true;
238
237
  }
239
- else if (!this.gift.show_images) {
240
- // the slider lays out asynchronously,
241
- // so an early measurement would pin it too short and overlap the button.
242
- this.setWrapperHeight(1, 250, 5);
243
- }
244
238
  })
245
239
  .catch(e => {
246
240
  this.hasError = true;
@@ -251,6 +245,31 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
251
245
  skipStep1() {
252
246
  return !!this.gift && !this.gift.show_images && !this.gift.show_texts;
253
247
  }
248
+ /**
249
+ * anime.js writes inline transform/opacity onto the step containers and their
250
+ * `.anime-item` children while transitioning between steps. The modal is only
251
+ * hidden on close (the component is never destroyed), and Stencil never set
252
+ * those inline styles so it won't clear them on re-render. Without this reset,
253
+ * reopening keeps step 2 painted on top (leftover opacity/translate) while the
254
+ * markup is back on step 1 — clicks then fall through to step 1's uploader.
255
+ */
256
+ resetStepsAnimation() {
257
+ // `.anime-item` children carry no JSX-managed style, so clearing them fully is safe.
258
+ [this.step1Elems, this.step2Elems].forEach(stepEl => {
259
+ stepEl?.querySelectorAll('.anime-item')
260
+ .forEach(item => item.removeAttribute('style'));
261
+ });
262
+ // step 1 container can carry anime leftovers (goToStep1 animates it) and has
263
+ // no JSX-managed style, so a full clear is safe.
264
+ this.step1Elems?.removeAttribute('style');
265
+ // step 2 container is animated by goToStep2 too, but in the skip-step-1 case
266
+ // its style is JSX-managed. Only strip the anime-applied props so we don't
267
+ // fight Stencil's vnode-level style diffing (which would not restore it).
268
+ if (this.step2Elems && !this.skipStep1()) {
269
+ this.step2Elems.style.removeProperty('opacity');
270
+ this.step2Elems.style.removeProperty('transform');
271
+ }
272
+ }
254
273
  /**
255
274
  *
256
275
  * Hide / close the gifting modal window
@@ -316,7 +335,17 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
316
335
  if (withValidation && !this.validateStep1()) {
317
336
  return;
318
337
  }
319
- this.setWrapperHeight(2, 600, 0);
338
+ // Pin the wrapper to step 1's current height as an explicit px value first.
339
+ // The wrapper is `auto` on open, and CSS can't transition from `auto` — it
340
+ // would snap (flash straight to the big size). With a px starting point the
341
+ // grow to step 2 animates smoothly, in sync with the slide.
342
+ if (this.stepsWrapper && this.step1Elems) {
343
+ this.stepsWrapper.style.height = `${this.step1Elems.offsetHeight}px`;
344
+ }
345
+ // Step 2 is absolutely positioned, so its height is measurable even while it's
346
+ // translated off-screen. Grow right away (small delay only to flush the pending
347
+ // re-render and let the px start-height paint) so the background expands in sync.
348
+ this.setWrapperHeight(2, 50, 0);
320
349
  let stepNextAnime = new anime.timeline();
321
350
  stepNextAnime.add({
322
351
  targets: this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),
@@ -647,8 +676,12 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
647
676
  this.setWrapperHeight(2, 150, 0);
648
677
  return;
649
678
  }
679
+ // A preset option from the list sends its id as `text_id`; the custom option
680
+ // sends the typed message as `text`.
681
+ const isCustomText = this.selectedGiftTextOption === 'custom';
650
682
  const giftPayload = {
651
- text: this.selectedText,
683
+ text: isCustomText ? this.selectedText : undefined,
684
+ text_id: !isCustomText && this.selectedGiftTextOption ? Number(this.selectedGiftTextOption) : undefined,
652
685
  sender_name: this.senderName,
653
686
  quantity: this.quantity,
654
687
  deliver_at: this.showCalendar ? this.deliveryDate : null,
@@ -721,7 +754,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
721
754
  }
722
755
  render() {
723
756
  return [
724
- h("div", { key: 'fdb6b68a052a9fa0a0d527edb25e3d7783cc47e9' }, h("salla-list-tile", { key: '3cfb7f37df96e924af7f977fd17f4161e40f83fe', class: this.generateClass() }, h("div", { key: '291a27d70bc43d6edac5c5838d93eaa6a51fb84a', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: 'c49f119d84a279338c4478872883ba7356e118ce' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '2ccfb84620132477c0845ffc0bbc257c350cdeb9', slot: "subtitle" }, h("div", { key: '2840a426b505f7fe7ac5c285ab9b74ca4f99ab55' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'e3560b1bc8a6c062417f3e2b7a91b5b20b4e1880', slot: "action" }, h("salla-button", { key: '5d96fb354f2845955344d782e693fe27a0fa2652', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '384ab549dc1942a600cc37c4df26008a8a05e9ab', name: "widget-btn-content" }, h("div", { key: '80d83cd6296f2e93ebbc0eada8737d65c76e4ce0', class: "s-gifting-widget-action-content" }, h("span", { key: '69f6686f6fe23bdab891ab12b295cf918ba0a8fb', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: '495c9e9b10dcb69a1335d0345d42a8323b52abef' }, this.sectionBtnText)))))), h("salla-modal", { key: '303a208c394aa2c91f2273b3909208c29266b490', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '985a4d292ea01cb7ff48b443afe854de6f293abf', slot: "loading" }, h("div", { key: 'ba2b61f3bebf33d04d7132a00d3334a35042646a', class: "s-gifting-skeleton" }, h("div", { key: '4c8d2a5f128407423fd0c3070907d7781fb92283', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '8585263f0bcb523a5b537c3b13f9c2a0a3a898d0', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: 'dbd2c3efbe5c91563275c09efd832709b6ed6748', class: "s-gifting-modal-title" }, h("div", { key: '4885e29c71001b530be33a4cf585fd77cf434dfd', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '6c248a65bcc92c51555f0dd8f6d10c6f9d4a2b9a', height: '15px', width: '150px' })))), h("div", { key: '07de64586572cea82b2561344b5922ad4f7cb2c1', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '9a9e45772c6f5ce30a19ebcb53405032dfc25862', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'd1165987504fb2e5a7d013118b6ca5db2bf1523c', height: '230px' }), h("salla-skeleton", { key: '33cc657831541bcf6916c54c8dffca3b9933ccbb', height: '10px', width: '150px' }), h("salla-skeleton", { key: '46ff78b7725c57c955c73e9a71b9bf1c7340a354', height: '30px' }), h("salla-skeleton", { key: '520bd0a02c0bf4ef6109f014856dfad71d779aca', height: '40px' })))), h("slot", { key: '5519fd6df4f911b042f68f6825a563ce92f16733', name: "header" }), !!this.hasError ?
757
+ h("div", { key: 'b26068c5c6b0c40814e1cb67208afa352b1d913c' }, h("salla-list-tile", { key: '22189813371c56f1b66334d826c342d30dade34f', class: this.generateClass() }, h("div", { key: '5f9c597b87ab39d591144c4943feba0c775d645b', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: '4341ea66f7d9a547d919be173476908c5d0f018a' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: 'f2eb13ddcd7810da368ea35e161addbef1af5ce4', slot: "subtitle" }, h("div", { key: '1b69dfbce6b7b7d94bbee4e325d8f65c2b34dcce' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '6a8f526bcbb0a659e028155ce08aec2538e4fff2', slot: "action" }, h("salla-button", { key: '5cf31da452a173a487c4ea9dbd1356fd10d3b800', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '4aef407fd0a79b0172f0803a7134bd366ac6b034', name: "widget-btn-content" }, h("div", { key: '333273064da0b5071a7a7433ec7626ef00bd9e1e', class: "s-gifting-widget-action-content" }, h("span", { key: '913d82d641ed54218f20a76acefca855d1324427', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: 'acc39208f212714bef2c56bd9b5e5c482e3a7122' }, this.sectionBtnText)))))), h("salla-modal", { key: '9bceb2e1a4bb4c9880b220d679a0e295ba1ae732', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '0ea0746b7c11c98c8a6d9535771afb3a4681c1c1', slot: "loading" }, h("div", { key: '5dcfb9acd127f3cf786b626a1be7e9f27ff7ac31', class: "s-gifting-skeleton" }, h("div", { key: 'd5205c53714ca60277a82abce7fb12f0a01dd38d', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: 'fde7ede398b9edb638ade25677915747855584f2', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '61bb2c36958080e37f83b9bc27ce05db5abb3230', class: "s-gifting-modal-title" }, h("div", { key: '10125cb25732100787b118f34a4e323aa215185c', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '2ee525ae05fb6540bc0fdcaa846b14e4a476a297', height: '15px', width: '150px' })))), h("div", { key: '8e4544f3bd4a81c961259de27ebf255a998a5e4f', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '237f0961f0748aeef3c5b77819234b3215f794e2', height: '10px', width: '150px' }), h("salla-skeleton", { key: '19510cb426335b9733ef4a34dc7b8e5bffe0c23c', height: '230px' }), h("salla-skeleton", { key: '78defffee0c94e9323ede7e12660ae234d84d019', height: '10px', width: '150px' }), h("salla-skeleton", { key: '21b800dff2bec3c1caea94115a37153e406eef11', height: '30px' }), h("salla-skeleton", { key: 'd8a08143339c184d05758d1497e22ad23cdac4f6', height: '40px' })))), h("slot", { key: '9ef7679d02250428236347b5bb4a080b04244a53', name: "header" }), !!this.hasError ?
725
758
  h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
726
759
  :
727
760
  [
@@ -732,8 +765,8 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
732
765
  h("salla-slider", { id: "gifting-slider", loop: false, "controls-outer": true, class: "s-gifting-slider", type: "carousel" }, h("div", { slot: "items" }, this.gift && this.gift.gift_images ?
733
766
  this.gift?.gift_images.map((item) => h("a", { class: "s-gifting-clickable s-gifting-image", onClick: () => this.setPreview(item) }, h("img", { src: item.url, alt: `${item.id}` }))) : ''))
734
767
  : "")), this.gift && this.gift.show_texts ?
735
- h("div", { class: "anime-item" }, h("div", { class: "s-gifting-modal-uploader-title s-gifting-text-title" }, this.giftText), h("div", { class: "s-form-group s-gifting-selectText", ref: el => this.textSelect = el }, h("select", { id: "gift-text-selection", name: "gift-text-selection", class: "s-form-control s-gifting-select", onChange: e => this.toggleGiftText(e) }, h("option", { "data-id": null, selected: true }, this.selectGiftMessage), this.gift && this.gift.gift_texts ?
736
- this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id }, txt.text)) : '', this.gift && this.gift.show_custom_text ? h("option", { "data-id": "custom" }, this.giftCustomText) : null)), h("div", { class: this.showGiftText && this.gift && this.gift.show_custom_text ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })))) : null, h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2(!!this.gift?.show_texts) }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", style: this.skipStep1() ? { opacity: '1', transform: 'translateX(0)', position: 'relative' } : undefined, ref: el => this.step2Elems = el }, h("div", { class: this.step2ItemClass(this.errors?.['sender_name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "sender_name", class: "s-form-label" }, this.senderNameLabel), h("input", { type: "text", class: "s-form-control", name: "sender_name", id: "sender_name", value: this.senderName, onInput: (event) => this.handleSenderName(event), placeholder: "" }), this.errors && this.errors['sender_name'] ?
768
+ h("div", { class: "anime-item" }, h("div", { class: "s-gifting-modal-uploader-title s-gifting-text-title" }, this.giftText), h("div", { class: "s-form-group s-gifting-selectText", ref: el => this.textSelect = el }, h("select", { id: "gift-text-selection", name: "gift-text-selection", class: "s-form-control s-gifting-select", onChange: e => this.toggleGiftText(e) }, h("option", { "data-id": null, selected: !this.selectedGiftTextOption }, this.selectGiftMessage), this.gift && this.gift.gift_texts ?
769
+ this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id, selected: String(this.selectedGiftTextOption) === String(txt.id) }, txt.text)) : '', this.gift && this.gift.show_custom_text ? h("option", { "data-id": "custom", selected: this.selectedGiftTextOption === 'custom' }, this.giftCustomText) : null)), h("div", { class: this.showGiftText && this.gift && this.gift.show_custom_text ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })))) : null, h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2(!!this.gift?.show_texts) }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", style: this.skipStep1() ? { opacity: '1', transform: 'translateX(0)', position: 'relative' } : undefined, ref: el => this.step2Elems = el }, h("div", { class: this.step2ItemClass(this.errors?.['sender_name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "sender_name", class: "s-form-label" }, this.senderNameLabel), h("input", { type: "text", class: "s-form-control", name: "sender_name", id: "sender_name", value: this.senderName, onInput: (event) => this.handleSenderName(event), placeholder: "" }), this.errors && this.errors['sender_name'] ?
737
770
  h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
738
771
  h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
739
772
  h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
@@ -744,7 +777,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
744
777
  h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
745
778
  h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() &&
746
779
  h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.selectCityInfo)), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
747
- ], h("slot", { key: '9413ec459b3b5dc137a90979990022b7ec1c6453', name: "footer" })))
780
+ ], h("slot", { key: 'e40029ee1e6fa463711fd088ba05c0edda5dd683', name: "footer" })))
748
781
  ];
749
782
  }
750
783
  static get style() { return sallaGiftingCss; }
@@ -42,7 +42,7 @@ const SallaLoyaltyReward$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyalty
42
42
  return (h("div", { key: 'c99714fbefea9c43a199201d6e9d331ed4b50e7f', class: {
43
43
  's-loyalty-program-reward-container': true,
44
44
  's-loyalty-program-reward-xs': this.size === 'xs',
45
- } }, h("div", { key: 'b3139a4325629e3e23b09096b96fbb9079ebb4f5', onClick: this.handleActionArea, role: "button" }, h("div", { key: '8d2951399db70f2672619149583d3821429611fa', class: "s-loyalty-program-reward-img" }, h("img", { key: 'd03e024172b99a72fdeb311e24f91d9ca11b69a1', src: this.prize.image, class: "s-loyalty-program-rewards-img", alt: "" })), h("div", { key: '23901c0a96c9af1ae459d5bbcad0f4429933225b', class: "s-loyalty-program-reward-content" }, h("div", { key: '795743061efd1270a1a24eceb66f67e2bbb9eb1e', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '83545f69e513a563dfaef7bb107ae119656406a0', size: "xs" }, h("span", { key: '28751b88c77af1acfb746f58f55f4b84f2364141', innerHTML: loyaltyProgramIcon }), h("span", { key: '2ab694a2ff30f419171191c0746b80f74edfeea4', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: 'a67f1577b61604d88b54637a8951248663239a6e', class: "s-loyalty-program-reward-title" }, h("span", { key: 'c3a6df53cff6339bbd81018d69bcf3a8637e0a46' }, this.group)), h("div", { key: '6790fc3a3d44e7e25a2e5c1ea246515245fa1e61', class: "s-loyalty-program-reward-name" }, h("div", { key: 'fa99561fa8d2efafc2aee2796eceea93721e525d', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name)))), h("div", { key: '948edaacd021950384418aedab807c11dee15754', class: "p-4" }, h("button", { key: '982c4c516b508aabec8489dc6f5c9ca326264f2a', onClick: this.handleAction, disabled: !this.isActionClickable(this.prize), class: {
45
+ } }, h("div", { key: 'b3139a4325629e3e23b09096b96fbb9079ebb4f5', onClick: this.handleActionArea, role: "button" }, h("div", { key: '8d2951399db70f2672619149583d3821429611fa', class: "s-loyalty-program-reward-img" }, h("img", { key: 'd03e024172b99a72fdeb311e24f91d9ca11b69a1', src: this.prize.image, class: "s-loyalty-program-rewards-img", alt: "" })), h("div", { key: '23901c0a96c9af1ae459d5bbcad0f4429933225b', class: "s-loyalty-program-reward-content" }, h("div", { key: '795743061efd1270a1a24eceb66f67e2bbb9eb1e', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '83545f69e513a563dfaef7bb107ae119656406a0', size: "xs" }, h("span", { key: '28751b88c77af1acfb746f58f55f4b84f2364141', innerHTML: loyaltyProgramIcon }), h("span", { key: '8f54d363299656788211e19299f666596694be77', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), h("div", { key: '89abc08dc391219c6c2a2fad15cb1e02b0b26472', class: "s-loyalty-program-reward-title" }, h("span", { key: '8908db983e49adacf9ba6d7adb9ad941ffc57d09' }, this.group)), h("div", { key: '2715999ae9c1e473762fb463cf8e52c42f746c77', class: "s-loyalty-program-reward-name" }, h("div", { key: 'e0a81d6e9aeebcb6671203f51429d614fc80c78b', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name)))), h("div", { key: 'f87feb0a81be86687bd4bf746807c45860f47224', class: "p-4" }, h("button", { key: '43e294b3b2f6caaccf3eea24c77d47513e129172', onClick: this.handleAction, disabled: !this.isActionClickable(this.prize), class: {
46
46
  's-loyalty-program-rewards-action-base': true,
47
47
  's-loyalty-program-rewards-action-on': this.isActionClickable(this.prize),
48
48
  's-loyalty-program-rewards-action-off': !this.isActionClickable(this.prize),
@@ -44,6 +44,58 @@ var Currency;
44
44
  Currency["Sar"] = "SAR";
45
45
  })(Currency || (Currency = {}));
46
46
 
47
+ /**
48
+ * Builds a per-detail availability map from SKU-level data.
49
+ *
50
+ * Exported as a pure function so it can be unit-tested independently of the
51
+ * Stencil component (the @State availabilityMap backing-store is not accessible
52
+ * via page.rootInstance in the Stencil mock-doc test environment).
53
+ *
54
+ * Status values:
55
+ * 'available' – at least one in-stock SKU for this detail + current selections
56
+ * 'out_of_stock' – all matching SKUs are out of stock
57
+ * 'impossible' – no SKU intersection exists for this combination
58
+ *
59
+ * skus_availability is always the authoritative source when present; is_out is
60
+ * consulted only as a last resort when a detail has no SKU data at all.
61
+ */
62
+ function computeAvailabilityMap(optionsData, selectedOptions) {
63
+ const map = {};
64
+ if (!optionsData?.length)
65
+ return map;
66
+ const variantGroups = optionsData.filter(opt => opt.details?.some(d => d.skus_availability && Object.keys(d.skus_availability).length > 0));
67
+ const isSingleGroup = variantGroups.length <= 1;
68
+ for (const optionGroup of variantGroups) {
69
+ const otherSelected = selectedOptions.filter(s => s.option_id !== optionGroup.id);
70
+ for (const detail of optionGroup.details) {
71
+ const skusAvail = detail.skus_availability;
72
+ // No skus_availability data — fall back to is_out as last resort only.
73
+ if (!skusAvail || !Object.keys(skusAvail).length) {
74
+ map[detail.id] = detail.is_out ? 'out_of_stock' : 'available';
75
+ continue;
76
+ }
77
+ const detailSkus = Object.keys(skusAvail).map(Number);
78
+ // No cross-group context yet — evaluate this detail's own SKUs directly.
79
+ if (isSingleGroup || otherSelected.length === 0) {
80
+ map[detail.id] = detailSkus.some(sku => skusAvail[sku]) ? 'available' : 'out_of_stock';
81
+ continue;
82
+ }
83
+ // Intersect this detail's SKUs with those of each other selected detail.
84
+ let candidates = detailSkus;
85
+ for (const other of otherSelected) {
86
+ const otherSkus = new Set(Object.keys(other.skus_availability || {}).map(Number));
87
+ candidates = candidates.filter(sku => otherSkus.has(sku));
88
+ }
89
+ if (!candidates.length) {
90
+ map[detail.id] = 'impossible';
91
+ continue;
92
+ }
93
+ map[detail.id] = candidates.some(sku => skusAvail[sku]) ? 'available' : 'out_of_stock';
94
+ }
95
+ }
96
+ return map;
97
+ }
98
+
47
99
  var FileIcon = `<!-- Generated by IcoMoon.io -->
48
100
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
49
101
  <title>file-upload</title>
@@ -77,6 +129,7 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
77
129
  this.availableDigitalCardValues = [];
78
130
  this.userInitiatedValidation = false;
79
131
  this.isCartMode = false;
132
+ this.availabilityMap = {};
80
133
  this.outSkus = [];
81
134
  /**
82
135
  * Avoid selection of previous default or selected card value option
@@ -167,12 +220,14 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
167
220
  */
168
221
  async setOptionsData(optionsData) {
169
222
  this.optionsData = optionsData;
170
- const that = this;
171
- this.optionsData[0]?.details?.forEach(function (detail) {
223
+ this.outSkus = [];
224
+ this.optionsData[0]?.details?.forEach(detail => {
172
225
  Object.entries(detail.skus_availability || {})
173
- .filter(sku => !sku[1])
174
- .map(sku => that.outSkus.push(Number(sku[0])));
226
+ .filter(([, available]) => !available)
227
+ .forEach(([sku]) => this.outSkus.push(Number(sku)));
175
228
  });
229
+ this.fillSelectedOptions();
230
+ this.computeAvailability();
176
231
  }
177
232
  /**
178
233
  * Get the current options state, including selected values/details.
@@ -358,8 +413,9 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
358
413
  */
359
414
  setSelectedSkus() {
360
415
  this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))
361
- .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array
416
+ .reduce((p, c) => p.filter(e => c.includes(e)), [])
362
417
  .map(sku => Number(sku));
418
+ this.computeAvailability();
363
419
  }
364
420
  handleRequiredMultipleOptions(option) {
365
421
  if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {
@@ -688,6 +744,7 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
688
744
  this.disableCardValue = false;
689
745
  this.canDisabled = true;
690
746
  this.fillSelectedOptions();
747
+ this.computeAvailability();
691
748
  }
692
749
  /**
693
750
  * Enable user-initiated validation mode so invalid fields will scroll into view
@@ -798,22 +855,14 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
798
855
  //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol
799
856
  return detailName.replace('<i class=sicon-sar></i>', salla.config.currency()?.symbol || 'ر.س');
800
857
  }
858
+ computeAvailability() {
859
+ this.availabilityMap = computeAvailabilityMap(this.optionsData || [], this.selectedOptions || []);
860
+ }
801
861
  isOptionDetailOut(detail) {
802
- if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {
803
- return detail.is_out;
804
- }
805
- const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;
806
- //if the current options is the only selected option, so we are sure that it's not out, because there is no other options selected yet
807
- if (isDetailSelected && this.selectedOptions.length === 1) {
808
- return false;
809
- }
810
- //if current details has sku in the possible outSkus it's out for sure
811
- if (isDetailSelected) {
812
- //here we will get the possible outSkus for current selected options
813
- const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));
814
- return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)));
815
- }
816
- return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id);
862
+ const status = this.availabilityMap[detail.id];
863
+ // !!detail.is_out guards against TypeScript optimising away `?? false`
864
+ // for the non-nullable `is_out: boolean` field when the value is actually undefined at runtime.
865
+ return status !== undefined ? status !== 'available' : !!detail.is_out;
817
866
  }
818
867
  /**
819
868
  * Renders a single input element (radio or checkbox) for an option detail.
@@ -826,10 +875,14 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
826
875
  */
827
876
  renderInput(type, detail, option, isRequired, name, buttonStyle) {
828
877
  const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);
829
- const isDisabled = this.isOptionDetailOut(detail);
878
+ const isOutOfStock = this.isOptionDetailOut(detail);
830
879
  return (h("label", { class: {
831
- "s-product-options-disabled": isDisabled,
832
- } }, h("input", { id: id, type: type, name: name, value: detail.id, disabled: isDisabled, required: isRequired, checked: detail.is_selected, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("div", { class: { "s-product-options-grid-mode-span": buttonStyle, "s-product-options-disabled": isDisabled } }, this.getOptionDetailName(detail))));
880
+ "s-product-options-disabled": this.canDisabled && isOutOfStock,
881
+ "s-product-options-option-stock-out": isOutOfStock,
882
+ } }, h("input", { id: id, type: type, name: name, value: detail.id, disabled: this.canDisabled && isOutOfStock, required: isRequired, checked: detail.is_selected, onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("div", { class: {
883
+ "s-product-options-grid-mode-span": buttonStyle,
884
+ "s-product-options-disabled": this.canDisabled && isOutOfStock,
885
+ } }, this.getOptionDetailName(detail))));
833
886
  }
834
887
  /**
835
888
  * Renders a collection of input elements for all details of an option.
@@ -902,15 +955,22 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
902
955
  }
903
956
  //@ts-ignore
904
957
  colorOption(option) {
905
- return (h("fieldset", { class: "s-product-options-colors-wrapper" }, option?.details.map((detail) => (h("div", { class: "s-product-options-colors-item", key: detail.id }, h("input", { type: "radio", value: detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), disabled: this.canDisabled && this.isOptionDetailOut(detail), id: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option), "data-img-id": detail.option_value }), h("label", { htmlFor: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`), "data-img-id": detail.option_value }, h("span", { style: { backgroundColor: detail.color } }), h("div", { innerHTML: this.getOptionDetailName(detail, true, option.type) })))))));
958
+ return (h("fieldset", { class: "s-product-options-colors-wrapper" }, option?.details.map((detail) => {
959
+ const isOutOfStock = this.isOptionDetailOut(detail);
960
+ return (h("div", { class: {
961
+ "s-product-options-colors-item": true,
962
+ "s-product-options-option-stock-out": isOutOfStock,
963
+ }, key: detail.id }, h("input", { type: "radio", value: detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), disabled: this.canDisabled && isOutOfStock, id: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option), "data-img-id": detail.option_value }), h("label", { htmlFor: this.generateUniqueKey(`color-${this.productId}-${option.id}-${detail.id}`), "data-img-id": detail.option_value }, h("span", { style: { backgroundColor: detail.color } }), h("div", { innerHTML: this.getOptionDetailName(detail, true, option.type) }))));
964
+ })));
906
965
  }
907
966
  //@ts-ignore
908
967
  thumbnailOption(option) {
909
968
  return h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
910
- return h("div", { key: detail.id }, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), "data-img-id": detail.option_value, disabled: this.canDisabled && this.isOptionDetailOut(detail), id: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), "data-img-id": detail.option_value, class: "go-to-slide" }, h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), h("span", { innerHTML: IconVerified, class: "s-product-options-thumbnails-icon" }), this.isOptionDetailOut(detail) ?
969
+ const isOutOfStock = this.isOptionDetailOut(detail);
970
+ return h("div", { key: detail.id, class: { "s-product-options-option-stock-out": isOutOfStock } }, h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, required: !option.visibility_condition && option.required, checked: detail.is_selected, name: this.generateInputName(option.id), "data-img-id": detail.option_value, disabled: this.canDisabled && isOutOfStock, id: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), onInvalid: (e) => this.invalidHandler(e, option), onChange: (e) => this.changedHandler(e, option) }), h("label", { htmlFor: this.generateUniqueKey(`option_${this.productId}-${option.id}_${detail.id}`), "data-img-id": detail.option_value, class: "go-to-slide" }, h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), h("span", { innerHTML: IconVerified, class: "s-product-options-thumbnails-icon" }), isOutOfStock ?
911
971
  [
912
- h("small", { key: detail.id, class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
913
- this.canDisabled ? h("div", { key: detail.id, class: "s-product-options-thumbnails-badge-overlay" }) : '',
972
+ h("small", { key: `badge-${detail.id}`, class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
973
+ this.canDisabled ? h("div", { key: `overlay-${detail.id}`, class: "s-product-options-thumbnails-badge-overlay" }) : '',
914
974
  ]
915
975
  : ''), h("p", null, this.getOptionDetailName(detail, false), " "));
916
976
  }));
@@ -925,7 +985,8 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
925
985
  }
926
986
  countryOption(option) {
927
987
  return h("div", { class: "s-product-options-digital-card-wrapper" }, option.details.map((detail) => {
928
- return h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": detail.is_out } }, h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), disabled: detail.is_out, required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onClick: () => { this.disableCardValue = false; }, ...(salla.url.is_page("cart") ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), h("img", { loading: "lazy", alt: detail.code, height: 24, width: 24, class: "s-product-options-country-flag", src: `https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`, onError: e => {
988
+ const isOutOfStock = this.isOptionDetailOut(detail);
989
+ return h("label", { htmlFor: this.generateUniqueKey(detail.id.toString()), key: detail.id, class: { "s-product-options-digital-card-option": true, "s-product-options-digital-card-option-stock-out": isOutOfStock, "s-product-options-option-stock-out": isOutOfStock } }, h("input", { id: this.generateUniqueKey(detail.id.toString()), type: "radio", class: "s-form-control s-product-options-digital-card-input", value: detail.id, name: this.generateInputName(option.id), disabled: this.canDisabled && isOutOfStock, required: !option.visibility_condition && option.required, onInvalid: (e) => this.invalidHandler(e, option), onChange: e => this.changedHandler(e, option), onClick: () => { this.disableCardValue = false; }, ...(salla.url.is_page("cart") ? { defaultChecked: this.getSelectedDigitalCardOptions(option)?.id === detail.id } : {}) }), h("img", { loading: "lazy", alt: detail.code, height: 24, width: 24, class: "s-product-options-country-flag", src: `https://cdn.assets.salla.network/prod/admin/cp/assets/flags/1x1/${String(detail.code).toLocaleLowerCase()}.svg`, onError: e => {
929
990
  e.currentTarget.onerror = null;
930
991
  e.currentTarget.src =
931
992
  salla.url.cdn('images/globe.svg');
@@ -955,6 +1016,7 @@ const SallaProductOptions = /*@__PURE__*/ proxyCustomElement(class SallaProductO
955
1016
  "availableDigitalCardValues": [32],
956
1017
  "userInitiatedValidation": [32],
957
1018
  "isCartMode": [32],
1019
+ "availabilityMap": [32],
958
1020
  "setOptionsData": [64],
959
1021
  "getOptionsData": [64],
960
1022
  "getSelectedOptionsData": [64],
@@ -15,7 +15,7 @@ const SallaRewardCard = /*@__PURE__*/ proxyCustomElement(class SallaRewardCard e
15
15
  this.actionClick = createEvent(this, "actionClick", 7);
16
16
  }
17
17
  render() {
18
- return (h(Host, { key: 'ff2c85a1de1ce4275f2552cecdf822001e3ad337', class: "s-loyalty-program-reward-host" }, h("div", { key: 'd9a5d86af489008dd0d6025bde5dcb1e9dd29bda', class: "s-loyalty-program-reward-container" }, h("div", { key: 'aba7aa8ee4b3c0200a122fcdb38b4ea39c7f10ec', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: '71234c7e6176f7c557892ef6ffa039b0f33da1ad', class: "s-loyalty-program-reward-img" }, h("img", { key: 'c74287127a9784d6a5500f4cf106089ef610c140', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: 'ee30491d21384a2a2fc60efbe4b0012b72509d4b', class: "s-loyalty-program-reward-content" }, h("div", { key: '94b465db9a56ca3afdfabf63cd155a4ef124dcce', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '7e92d9c135ff7acd7acce77c0abd4ef0b81f9c5f', size: "xs" }, h("span", { key: '83ed6d98e353843837fcf3944f424ca722583c41', innerHTML: loyaltyProgramIcon }), h("span", { key: '1fbf2826e7f24b5164cedb22d5875fb6956bbcdc', class: "s-loyalty-program-rewards-points" }, this.prize.cost_points, " ", salla.lang.get('pages.loyalty_program.points')))), h("div", { key: '70ecd2efe641e411127c205c689f07bc5f10a782', class: "s-loyalty-program-reward-title" }, h("span", { key: '274b619ba28faf0088abf3fd4053085dad570ab7' }, this.prize.group_title)), h("div", { key: 'e96b5ae844b6bd8ba1058361f04d63e294c873a3', class: "s-loyalty-program-reward-name" }, h("div", { key: 'ef4b44f80213e85882d8a5be1bbd093564d19f3c', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: 'bf3d981f842da109f8371fe7d2346cb837974454', class: "p-4" }, h("slot", { key: 'e953a9eecffad0d309953805910c6bb9a66fefcf', name: "action" }, h("button", { key: '828ba0093dc42732c47ea635c7ea1c2ff76b0dfe', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
18
+ return (h(Host, { key: 'ff2c85a1de1ce4275f2552cecdf822001e3ad337', class: "s-loyalty-program-reward-host" }, h("div", { key: 'd9a5d86af489008dd0d6025bde5dcb1e9dd29bda', class: "s-loyalty-program-reward-container" }, h("div", { key: 'aba7aa8ee4b3c0200a122fcdb38b4ea39c7f10ec', onClick: (e) => this.areaClick.emit(e), role: "button" }, h("div", { key: '71234c7e6176f7c557892ef6ffa039b0f33da1ad', class: "s-loyalty-program-reward-img" }, h("img", { key: 'c74287127a9784d6a5500f4cf106089ef610c140', alt: "", src: this.prize.image || salla.url.cdn('images/s-empty.png'), class: "s-loyalty-program-rewards-img" })), h("div", { key: 'ee30491d21384a2a2fc60efbe4b0012b72509d4b', class: "s-loyalty-program-reward-content" }, h("div", { key: '94b465db9a56ca3afdfabf63cd155a4ef124dcce', class: "s-loyalty-program-reward-points" }, h("salla-badge", { key: '7e92d9c135ff7acd7acce77c0abd4ef0b81f9c5f', size: "xs" }, h("span", { key: '83ed6d98e353843837fcf3944f424ca722583c41', innerHTML: loyaltyProgramIcon }), h("span", { key: 'dad919bbf6fda62a604bfb652fe5a1807d7c5231', class: "s-loyalty-program-rewards-points", innerHTML: salla.lang.choice('pages.loyalty_program.points', this.prize.cost_points) }))), h("div", { key: '2f9a4692a125da6fe9724b09998db4bb1efa8a63', class: "s-loyalty-program-reward-title" }, h("span", { key: 'bf24743da8340460839986efe5eac46649e3b751' }, this.prize.group_title)), h("div", { key: '85e6343102982e2e2bf35ad105aec7834f3d91b6', class: "s-loyalty-program-reward-name" }, h("div", { key: 'cc73021208eee7702d1e074fa13f7aef43ce6d32', class: "s-loyalty-program-rewards-name", id: `prize-${this.prize.id}` }, this.prize.name, this.prize.description ? `: ${this.prize.description}` : '')))), h("div", { key: '51860a235d912a4dc6d166add4b982c71805fc8d', class: "p-4" }, h("slot", { key: 'c12b37a27617986e8701190b6feb1c371887a822', name: "action" }, h("button", { key: '80ddf2e70e7cbdacae56a8310aff260e9eb99579', onClick: (e) => this.actionClick.emit(e.detail), class: "s-loyalty-program-rewards-action-base s-loyalty-program-rewards-action-on" }, salla.lang.get('pages.loyalty_program.show_reward')))))));
19
19
  }
20
20
  static get style() { return sallaLoyaltyProgramCss; }
21
21
  }, [4, "salla-reward-card", {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { h } from './index-Cqh-ta1v.js';
4
+ import { h } from './index-Cly9a4nm.js';
5
5
 
6
6
  function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
7
7
  return number < multipleOf ? number : number - (number % multipleOf);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-Cqh-ta1v.js';
4
+ import { d as getDefaultExportFromCjs } from './index-Cly9a4nm.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {