@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
@@ -0,0 +1,54 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ /**
5
+ * Builds a per-detail availability map from SKU-level data.
6
+ *
7
+ * Exported as a pure function so it can be unit-tested independently of the
8
+ * Stencil component (the @State availabilityMap backing-store is not accessible
9
+ * via page.rootInstance in the Stencil mock-doc test environment).
10
+ *
11
+ * Status values:
12
+ * 'available' – at least one in-stock SKU for this detail + current selections
13
+ * 'out_of_stock' – all matching SKUs are out of stock
14
+ * 'impossible' – no SKU intersection exists for this combination
15
+ *
16
+ * skus_availability is always the authoritative source when present; is_out is
17
+ * consulted only as a last resort when a detail has no SKU data at all.
18
+ */
19
+ export function computeAvailabilityMap(optionsData, selectedOptions) {
20
+ const map = {};
21
+ if (!optionsData?.length)
22
+ return map;
23
+ const variantGroups = optionsData.filter(opt => opt.details?.some(d => d.skus_availability && Object.keys(d.skus_availability).length > 0));
24
+ const isSingleGroup = variantGroups.length <= 1;
25
+ for (const optionGroup of variantGroups) {
26
+ const otherSelected = selectedOptions.filter(s => s.option_id !== optionGroup.id);
27
+ for (const detail of optionGroup.details) {
28
+ const skusAvail = detail.skus_availability;
29
+ // No skus_availability data — fall back to is_out as last resort only.
30
+ if (!skusAvail || !Object.keys(skusAvail).length) {
31
+ map[detail.id] = detail.is_out ? 'out_of_stock' : 'available';
32
+ continue;
33
+ }
34
+ const detailSkus = Object.keys(skusAvail).map(Number);
35
+ // No cross-group context yet — evaluate this detail's own SKUs directly.
36
+ if (isSingleGroup || otherSelected.length === 0) {
37
+ map[detail.id] = detailSkus.some(sku => skusAvail[sku]) ? 'available' : 'out_of_stock';
38
+ continue;
39
+ }
40
+ // Intersect this detail's SKUs with those of each other selected detail.
41
+ let candidates = detailSkus;
42
+ for (const other of otherSelected) {
43
+ const otherSkus = new Set(Object.keys(other.skus_availability || {}).map(Number));
44
+ candidates = candidates.filter(sku => otherSkus.has(sku));
45
+ }
46
+ if (!candidates.length) {
47
+ map[detail.id] = 'impossible';
48
+ continue;
49
+ }
50
+ map[detail.id] = candidates.some(sku => skusAvail[sku]) ? 'available' : 'out_of_stock';
51
+ }
52
+ }
53
+ return map;
54
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { h, Host } from "@stencil/core";
5
5
  import { DisplayType } from "./interfaces";
6
+ import { computeAvailabilityMap } from "./availability-utils";
6
7
  import CheckCircleIcon from "../../assets/svg/check.svg";
7
8
  import CameraIcon from "../../assets/svg/camera.svg";
8
9
  import FileIcon from "../../assets/svg/file-upload.svg";
@@ -27,6 +28,7 @@ export class SallaProductOptions {
27
28
  this.availableDigitalCardValues = [];
28
29
  this.userInitiatedValidation = false;
29
30
  this.isCartMode = false;
31
+ this.availabilityMap = {};
30
32
  this.outSkus = [];
31
33
  /**
32
34
  * Avoid selection of previous default or selected card value option
@@ -117,12 +119,14 @@ export class SallaProductOptions {
117
119
  */
118
120
  async setOptionsData(optionsData) {
119
121
  this.optionsData = optionsData;
120
- const that = this;
121
- this.optionsData[0]?.details?.forEach(function (detail) {
122
+ this.outSkus = [];
123
+ this.optionsData[0]?.details?.forEach(detail => {
122
124
  Object.entries(detail.skus_availability || {})
123
- .filter(sku => !sku[1])
124
- .map(sku => that.outSkus.push(Number(sku[0])));
125
+ .filter(([, available]) => !available)
126
+ .forEach(([sku]) => this.outSkus.push(Number(sku)));
125
127
  });
128
+ this.fillSelectedOptions();
129
+ this.computeAvailability();
126
130
  }
127
131
  /**
128
132
  * Get the current options state, including selected values/details.
@@ -308,8 +312,9 @@ export class SallaProductOptions {
308
312
  */
309
313
  setSelectedSkus() {
310
314
  this.selectedSkus = this.selectedOptions.map(detail => Object.keys(detail.skus_availability || {}))
311
- .reduce((p, c) => p.filter(e => c.includes(e)), []) // Initialize accumulator as an empty array
315
+ .reduce((p, c) => p.filter(e => c.includes(e)), [])
312
316
  .map(sku => Number(sku));
317
+ this.computeAvailability();
313
318
  }
314
319
  handleRequiredMultipleOptions(option) {
315
320
  if (option.type !== DisplayType.MULTIPLE_OPTIONS || !option.required) {
@@ -638,6 +643,7 @@ export class SallaProductOptions {
638
643
  this.disableCardValue = false;
639
644
  this.canDisabled = true;
640
645
  this.fillSelectedOptions();
646
+ this.computeAvailability();
641
647
  }
642
648
  /**
643
649
  * Enable user-initiated validation mode so invalid fields will scroll into view
@@ -748,22 +754,14 @@ export class SallaProductOptions {
748
754
  //and because we are using this inside select option, we need to replace the html currency symbol with the store currency symbol
749
755
  return detailName.replace('<i class=sicon-sar></i>', salla.config.currency()?.symbol || 'ر.س');
750
756
  }
757
+ computeAvailability() {
758
+ this.availabilityMap = computeAvailabilityMap(this.optionsData || [], this.selectedOptions || []);
759
+ }
751
760
  isOptionDetailOut(detail) {
752
- if (detail.is_out || !detail.skus_availability || !this.selectedSkus?.length) {
753
- return detail.is_out;
754
- }
755
- const isDetailSelected = this.selectedOptions.filter(option => option.id === detail.id).length;
756
- //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
757
- if (isDetailSelected && this.selectedOptions.length === 1) {
758
- return false;
759
- }
760
- //if current details has sku in the possible outSkus it's out for sure
761
- if (isDetailSelected) {
762
- //here we will get the possible outSkus for current selected options
763
- const outSelectableSkus = this.selectedSkus.filter(sku => this.outSkus.includes(sku));
764
- return Object.keys(detail.skus_availability).some(sku => outSelectableSkus.includes(Number(sku)));
765
- }
766
- return this.selectedOptions.some(option => option.is_out && option.option_id !== detail.option_id);
761
+ const status = this.availabilityMap[detail.id];
762
+ // !!detail.is_out guards against TypeScript optimising away `?? false`
763
+ // for the non-nullable `is_out: boolean` field when the value is actually undefined at runtime.
764
+ return status !== undefined ? status !== 'available' : !!detail.is_out;
767
765
  }
768
766
  /**
769
767
  * Renders a single input element (radio or checkbox) for an option detail.
@@ -776,10 +774,14 @@ export class SallaProductOptions {
776
774
  */
777
775
  renderInput(type, detail, option, isRequired, name, buttonStyle) {
778
776
  const id = this.generateUniqueKey(`${type}-${option.id}-${detail.id}`);
779
- const isDisabled = this.isOptionDetailOut(detail);
777
+ const isOutOfStock = this.isOptionDetailOut(detail);
780
778
  return (h("label", { class: {
781
- "s-product-options-disabled": isDisabled,
782
- } }, 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))));
779
+ "s-product-options-disabled": this.canDisabled && isOutOfStock,
780
+ "s-product-options-option-stock-out": isOutOfStock,
781
+ } }, 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: {
782
+ "s-product-options-grid-mode-span": buttonStyle,
783
+ "s-product-options-disabled": this.canDisabled && isOutOfStock,
784
+ } }, this.getOptionDetailName(detail))));
783
785
  }
784
786
  /**
785
787
  * Renders a collection of input elements for all details of an option.
@@ -852,15 +854,22 @@ export class SallaProductOptions {
852
854
  }
853
855
  //@ts-ignore
854
856
  colorOption(option) {
855
- 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) })))))));
857
+ return (h("fieldset", { class: "s-product-options-colors-wrapper" }, option?.details.map((detail) => {
858
+ const isOutOfStock = this.isOptionDetailOut(detail);
859
+ return (h("div", { class: {
860
+ "s-product-options-colors-item": true,
861
+ "s-product-options-option-stock-out": isOutOfStock,
862
+ }, 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) }))));
863
+ })));
856
864
  }
857
865
  //@ts-ignore
858
866
  thumbnailOption(option) {
859
867
  return h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
860
- 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: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), this.isOptionDetailOut(detail) ?
868
+ const isOutOfStock = this.isOptionDetailOut(detail);
869
+ 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: CheckCircleIcon, class: "s-product-options-thumbnails-icon" }), isOutOfStock ?
861
870
  [
862
- h("small", { key: detail.id, class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
863
- this.canDisabled ? h("div", { key: detail.id, class: "s-product-options-thumbnails-badge-overlay" }) : '',
871
+ h("small", { key: `badge-${detail.id}`, class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText),
872
+ this.canDisabled ? h("div", { key: `overlay-${detail.id}`, class: "s-product-options-thumbnails-badge-overlay" }) : '',
864
873
  ]
865
874
  : ''), h("p", null, this.getOptionDetailName(detail, false), " "));
866
875
  }));
@@ -875,7 +884,8 @@ export class SallaProductOptions {
875
884
  }
876
885
  countryOption(option) {
877
886
  return h("div", { class: "s-product-options-digital-card-wrapper" }, option.details.map((detail) => {
878
- 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 => {
887
+ const isOutOfStock = this.isOptionDetailOut(detail);
888
+ 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 => {
879
889
  e.currentTarget.onerror = null;
880
890
  e.currentTarget.src =
881
891
  salla.url.cdn('images/globe.svg');
@@ -1027,7 +1037,8 @@ export class SallaProductOptions {
1027
1037
  "disableCardValue": {},
1028
1038
  "availableDigitalCardValues": {},
1029
1039
  "userInitiatedValidation": {},
1030
- "isCartMode": {}
1040
+ "isCartMode": {},
1041
+ "availabilityMap": {}
1031
1042
  };
1032
1043
  }
1033
1044
  static get events() {