@salla.sa/twilight-components 2.14.485 → 2.14.487

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 (340) hide show
  1. package/dist/cjs/{Helper-DvyEpCgx.js → Helper-B2B-kxAI.js} +7 -2
  2. package/dist/cjs/{filepond-B1h9ltVJ.js → filepond-D8YNIT7U.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-B4zD4xns.js → filepond-plugin-file-poster-DSZGbtH3.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-CIX5-X21.js → filepond-plugin-file-validate-size-CDPCt-vD.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-D1NcjxUw.js → filepond-plugin-file-validate-type-PPR9wk_f.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-Bb7P11BN.js → filepond-plugin-image-edit-CbzNxXz5.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-C4HNrnSA.js → filepond-plugin-image-exif-orientation-CHOCkxIA.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-DeMAP_C9.js → filepond-plugin-image-preview-DPzPSwHT.js} +1 -1
  9. package/dist/cjs/{functions-COuh9Ohq.js → functions-BJ567SZR.js} +1 -1
  10. package/dist/cjs/{index-jbrJkd9L.js → index-AuVRM2C2.js} +1 -1
  11. package/dist/cjs/{index-8pwFZzoL.js → index-KEg0BIuu.js} +6 -2
  12. package/dist/cjs/loader.cjs.js +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +349 -0
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-form_8.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters-widget.cjs.entry.js +15 -8
  36. package/dist/cjs/salla-filters.cjs.entry.js +101 -13
  37. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-gifting.cjs.entry.js +21 -5
  39. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  47. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  52. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  53. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
  64. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-options-modal_3.cjs.entry.js +2 -2
  74. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  77. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-list.cjs.entry.js +21 -9
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  85. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  86. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  88. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  102. package/dist/cjs/{tracked-promise-BOMQ9hTv.js → tracked-promise-DFl5fI3j.js} +1 -1
  103. package/dist/cjs/twilight.cjs.js +2 -2
  104. package/dist/cjs/{vanilla-picker-DM7x_-2X.js → vanilla-picker-CUpM_-PS.js} +1 -1
  105. package/dist/collection/Helpers/Helper.js +7 -2
  106. package/dist/collection/collection-manifest.json +1 -0
  107. package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +401 -0
  108. package/dist/collection/components/salla-filters/salla-filters.css +5 -0
  109. package/dist/collection/components/salla-filters/salla-filters.js +101 -11
  110. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +13 -6
  111. package/dist/collection/components/salla-gifting/salla-gifting.js +21 -4
  112. package/dist/collection/components/salla-products-list/salla-products-list.js +19 -7
  113. package/dist/components/Helper.js +7 -2
  114. package/dist/components/index.js +2 -2
  115. package/dist/components/salla-cart-summary-card.d.ts +11 -0
  116. package/dist/components/salla-cart-summary-card.js +404 -0
  117. package/dist/components/salla-filters-widget2.js +13 -6
  118. package/dist/components/salla-filters.js +101 -11
  119. package/dist/components/salla-gifting.js +21 -4
  120. package/dist/components/salla-products-list2.js +19 -7
  121. package/dist/esm/{Helper-CD8d-Brd.js → Helper-BQ9mvrt9.js} +7 -2
  122. package/dist/esm/{filepond-DHzuRfQN.js → filepond-BsLighF8.js} +1 -1
  123. package/dist/esm/{filepond-plugin-file-poster-BxdBxR7d.js → filepond-plugin-file-poster-Bm-5APBo.js} +1 -1
  124. package/dist/esm/{filepond-plugin-file-validate-size-C-0L9g1L.js → filepond-plugin-file-validate-size-DkYobKMY.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-validate-type-OyHjZUCW.js → filepond-plugin-file-validate-type-BXKbNDGH.js} +1 -1
  126. package/dist/esm/{filepond-plugin-image-edit-BIfGCYQ5.js → filepond-plugin-image-edit-B64dqBYZ.js} +1 -1
  127. package/dist/esm/{filepond-plugin-image-exif-orientation-DJlKxr63.js → filepond-plugin-image-exif-orientation-BelOzBrj.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-preview-B2DpOs_r.js → filepond-plugin-image-preview-X67Ek3oE.js} +1 -1
  129. package/dist/esm/{functions-DT-OwuY-.js → functions-DobdGlrA.js} +1 -1
  130. package/dist/esm/{index-DJPd6DKq.js → index-DBMDFsFH.js} +6 -2
  131. package/dist/esm/{index-D449pxDB.js → index-yDeCyY3S.js} +1 -1
  132. package/dist/esm/loader.js +3 -3
  133. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  134. package/dist/esm/salla-accordion_6.entry.js +2 -2
  135. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  136. package/dist/esm/salla-advertisement.entry.js +1 -1
  137. package/dist/esm/salla-alert_2.entry.js +1 -1
  138. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  139. package/dist/esm/salla-apps-icons.entry.js +1 -1
  140. package/dist/esm/salla-badge.entry.js +1 -1
  141. package/dist/esm/salla-booking-field_7.entry.js +11 -11
  142. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  143. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  144. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  145. package/dist/esm/salla-cart-summary-card.entry.js +347 -0
  146. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  147. package/dist/esm/salla-comment-form_8.entry.js +2 -2
  148. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  149. package/dist/esm/salla-contacts.entry.js +1 -1
  150. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  151. package/dist/esm/salla-count-down.entry.js +1 -1
  152. package/dist/esm/salla-custom-fields.entry.js +1 -1
  153. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  154. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  155. package/dist/esm/salla-filters-widget.entry.js +15 -8
  156. package/dist/esm/salla-filters.entry.js +101 -13
  157. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  158. package/dist/esm/salla-gifting.entry.js +21 -5
  159. package/dist/esm/salla-hook.entry.js +1 -1
  160. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  161. package/dist/esm/salla-installment.entry.js +1 -1
  162. package/dist/esm/salla-list-tile.entry.js +1 -1
  163. package/dist/esm/salla-localization-modal.entry.js +1 -1
  164. package/dist/esm/salla-login-modal.entry.js +1 -1
  165. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  166. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  167. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  168. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  172. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  173. package/dist/esm/salla-loyalty.entry.js +1 -1
  174. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  175. package/dist/esm/salla-map_2.entry.js +1 -1
  176. package/dist/esm/salla-menu.entry.js +1 -1
  177. package/dist/esm/salla-metadata.entry.js +1 -1
  178. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  179. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  180. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  181. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  182. package/dist/esm/salla-notification-item.entry.js +1 -1
  183. package/dist/esm/salla-notifications.entry.js +2 -2
  184. package/dist/esm/salla-offer-modal.entry.js +1 -1
  185. package/dist/esm/salla-offer.entry.js +1 -1
  186. package/dist/esm/salla-order-branch.entry.js +1 -1
  187. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  188. package/dist/esm/salla-order-details-options.entry.js +1 -1
  189. package/dist/esm/salla-order-details.entry.js +1 -1
  190. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  191. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  192. package/dist/esm/salla-order-edit.entry.js +1 -1
  193. package/dist/esm/salla-order-options-modal_3.entry.js +2 -2
  194. package/dist/esm/salla-order-summary.entry.js +1 -1
  195. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  196. package/dist/esm/salla-orders.entry.js +2 -2
  197. package/dist/esm/salla-payments.entry.js +1 -1
  198. package/dist/esm/salla-placeholder.entry.js +1 -1
  199. package/dist/esm/salla-price-range.entry.js +1 -1
  200. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  201. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  202. package/dist/esm/salla-products-list.entry.js +21 -9
  203. package/dist/esm/salla-quick-order.entry.js +1 -1
  204. package/dist/esm/salla-rating-modal.entry.js +2 -2
  205. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  206. package/dist/esm/salla-scopes.entry.js +1 -1
  207. package/dist/esm/salla-search.entry.js +2 -2
  208. package/dist/esm/salla-skeleton.entry.js +1 -1
  209. package/dist/esm/salla-slider.entry.js +1 -1
  210. package/dist/esm/salla-social-share.entry.js +1 -1
  211. package/dist/esm/salla-social.entry.js +1 -1
  212. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  213. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  214. package/dist/esm/salla-tooltip.entry.js +1 -1
  215. package/dist/esm/salla-trust-badges.entry.js +1 -1
  216. package/dist/esm/salla-user-menu.entry.js +1 -1
  217. package/dist/esm/salla-user-profile.entry.js +1 -1
  218. package/dist/esm/salla-user-settings.entry.js +1 -1
  219. package/dist/esm/salla-verify.entry.js +1 -1
  220. package/dist/esm/salla-wallet.entry.js +1 -1
  221. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  222. package/dist/esm/{tracked-promise-CNnq4c_E.js → tracked-promise-6uJz7V9Q.js} +1 -1
  223. package/dist/esm/twilight.js +3 -3
  224. package/dist/esm/{vanilla-picker-DQDhWp1B.js → vanilla-picker-Bw2Vk5YA.js} +1 -1
  225. package/dist/twilight/{p-07e93d60.entry.js → p-000022be.entry.js} +1 -1
  226. package/dist/twilight/{p-800e069d.entry.js → p-00fcfe8e.entry.js} +1 -1
  227. package/dist/twilight/{p-309914e6.entry.js → p-0412fe67.entry.js} +1 -1
  228. package/dist/twilight/{p-5cd703c2.entry.js → p-08dfa3c5.entry.js} +1 -1
  229. package/dist/twilight/{p-67ac0915.entry.js → p-0c219cad.entry.js} +1 -1
  230. package/dist/twilight/{p-2e1cf59c.entry.js → p-11f843fd.entry.js} +1 -1
  231. package/dist/twilight/p-130633cc.entry.js +4 -0
  232. package/dist/twilight/{p-3a103253.entry.js → p-1450bf80.entry.js} +1 -1
  233. package/dist/twilight/{p-1fc50a13.entry.js → p-14e936b0.entry.js} +1 -1
  234. package/dist/twilight/{p-e492ab39.entry.js → p-1547f282.entry.js} +1 -1
  235. package/dist/twilight/p-18efb27e.entry.js +4 -0
  236. package/dist/twilight/{p-2566c361.entry.js → p-18f264f9.entry.js} +1 -1
  237. package/dist/twilight/{p-78854c4a.entry.js → p-1b4fd0db.entry.js} +1 -1
  238. package/dist/twilight/{p-cbb75c0b.entry.js → p-1bb06699.entry.js} +1 -1
  239. package/dist/twilight/{p-74ba62ad.entry.js → p-1e418b8f.entry.js} +1 -1
  240. package/dist/twilight/p-24d268c7.entry.js +4 -0
  241. package/dist/twilight/{p-f60e5ac2.entry.js → p-29620c50.entry.js} +1 -1
  242. package/dist/twilight/{p-329f2f11.entry.js → p-2f48e8e1.entry.js} +1 -1
  243. package/dist/twilight/{p-7547a8c3.entry.js → p-37ced7ab.entry.js} +1 -1
  244. package/dist/twilight/{p-c88eb0de.entry.js → p-39a49ae9.entry.js} +1 -1
  245. package/dist/twilight/{p-dafb763f.entry.js → p-3a7f5c6e.entry.js} +1 -1
  246. package/dist/twilight/{p-b94fe237.entry.js → p-3f153e79.entry.js} +1 -1
  247. package/dist/twilight/{p-9f003164.entry.js → p-4336dce1.entry.js} +1 -1
  248. package/dist/twilight/{p-fe9451ac.entry.js → p-44f67d40.entry.js} +1 -1
  249. package/dist/twilight/{p-d21bdb22.entry.js → p-46294bef.entry.js} +1 -1
  250. package/dist/twilight/{p-7afc3b39.entry.js → p-4836c3eb.entry.js} +1 -1
  251. package/dist/twilight/{p-7dedb31c.entry.js → p-49275f85.entry.js} +1 -1
  252. package/dist/twilight/{p-ca0fa22b.entry.js → p-4a3ccff2.entry.js} +1 -1
  253. package/dist/twilight/{p-859f2c19.entry.js → p-4f8ec3a6.entry.js} +1 -1
  254. package/dist/twilight/{p-01fd381b.entry.js → p-5119fe5d.entry.js} +1 -1
  255. package/dist/twilight/{p-566bae1e.entry.js → p-519551ab.entry.js} +1 -1
  256. package/dist/twilight/{p-17f9907e.entry.js → p-51fbf1bb.entry.js} +1 -1
  257. package/dist/twilight/{p-1b9272d4.entry.js → p-52cab4a6.entry.js} +1 -1
  258. package/dist/twilight/{p-1620eaa3.entry.js → p-546b31a3.entry.js} +1 -1
  259. package/dist/twilight/{p-2794a82d.entry.js → p-57785b92.entry.js} +1 -1
  260. package/dist/twilight/{p-40256161.entry.js → p-5dfb7601.entry.js} +1 -1
  261. package/dist/twilight/{p-2270652d.entry.js → p-5e14fbf5.entry.js} +1 -1
  262. package/dist/twilight/{p-23a8870b.entry.js → p-60545378.entry.js} +1 -1
  263. package/dist/twilight/{p-adb4eed7.entry.js → p-61332673.entry.js} +1 -1
  264. package/dist/twilight/{p-5c7dd67e.entry.js → p-636e6994.entry.js} +1 -1
  265. package/dist/twilight/{p-f8eb9db2.entry.js → p-67ce35b0.entry.js} +1 -1
  266. package/dist/twilight/{p-9c52e63b.entry.js → p-6bdcd67d.entry.js} +1 -1
  267. package/dist/twilight/{p-6181acb5.entry.js → p-6e2b2072.entry.js} +1 -1
  268. package/dist/twilight/{p-d886da88.entry.js → p-76672fe3.entry.js} +1 -1
  269. package/dist/twilight/{p-26603c81.entry.js → p-79bff80a.entry.js} +1 -1
  270. package/dist/twilight/{p-445b3e07.entry.js → p-7a5894fb.entry.js} +1 -1
  271. package/dist/twilight/{p-74abfefb.entry.js → p-7b0f537a.entry.js} +1 -1
  272. package/dist/twilight/{p-a92549f6.entry.js → p-7bd7baa5.entry.js} +1 -1
  273. package/dist/twilight/{p-6e8a0f83.entry.js → p-8336df51.entry.js} +1 -1
  274. package/dist/twilight/{p-91884639.entry.js → p-8a7f48ce.entry.js} +1 -1
  275. package/dist/twilight/{p-005c08fe.entry.js → p-96779a0c.entry.js} +1 -1
  276. package/dist/twilight/{p-4a31a4dd.entry.js → p-967d356e.entry.js} +1 -1
  277. package/dist/twilight/{p-a20d0254.entry.js → p-9ab52d09.entry.js} +1 -1
  278. package/dist/twilight/{p-BG50tuBF.js → p-BR9zeoCF.js} +1 -1
  279. package/dist/twilight/{p-Cve96fFs.js → p-BTYXaopE.js} +1 -1
  280. package/dist/twilight/{p-tC9eMgA8.js → p-CDTIhPDr.js} +1 -1
  281. package/dist/twilight/{p-2xUZDJ04.js → p-CMW3pjiL.js} +1 -1
  282. package/dist/twilight/{p-DXqzsbXl.js → p-C_htBBK4.js} +1 -1
  283. package/dist/twilight/{p-BL8emH6B.js → p-C_vo3xPL.js} +1 -1
  284. package/dist/twilight/{p-BG-PTfCd.js → p-CcfoPQKG.js} +1 -1
  285. package/dist/twilight/{p-DJPd6DKq.js → p-DBMDFsFH.js} +1 -1
  286. package/dist/twilight/{p-C4k3wAWB.js → p-Dwu1e7SR.js} +1 -1
  287. package/dist/twilight/p-XnA1YTjA.js +4 -0
  288. package/dist/twilight/{p-af769e0a.entry.js → p-a767d9fe.entry.js} +1 -1
  289. package/dist/twilight/{p-7baf04d3.entry.js → p-ab404907.entry.js} +1 -1
  290. package/dist/twilight/{p-3c4b0b05.entry.js → p-acd8aa32.entry.js} +1 -1
  291. package/dist/twilight/{p-bff68f44.entry.js → p-ad1d3cdf.entry.js} +1 -1
  292. package/dist/twilight/{p-c06f0822.entry.js → p-b3b050e7.entry.js} +1 -1
  293. package/dist/twilight/{p-93e3a6b1.entry.js → p-b3b78bf5.entry.js} +1 -1
  294. package/dist/twilight/p-b3f26711.entry.js +4 -0
  295. package/dist/twilight/{p-985f8781.entry.js → p-b4f4e0b7.entry.js} +1 -1
  296. package/dist/twilight/{p-e056c218.entry.js → p-b7da726a.entry.js} +1 -1
  297. package/dist/twilight/{p-f13b397a.entry.js → p-b835777d.entry.js} +1 -1
  298. package/dist/twilight/{p-dac3e978.entry.js → p-c253f69c.entry.js} +1 -1
  299. package/dist/twilight/{p-2646c71c.entry.js → p-c46cf468.entry.js} +1 -1
  300. package/dist/twilight/{p-32eea65f.entry.js → p-c9608410.entry.js} +1 -1
  301. package/dist/twilight/{p-58e39fe9.entry.js → p-cc75ae11.entry.js} +1 -1
  302. package/dist/twilight/{p-48b68862.entry.js → p-ce0685d1.entry.js} +1 -1
  303. package/dist/twilight/{p-1b506134.entry.js → p-ce1bc4b0.entry.js} +1 -1
  304. package/dist/twilight/{p-302bc68d.entry.js → p-cf1b9798.entry.js} +1 -1
  305. package/dist/twilight/{p-17b0b92b.entry.js → p-cf96947a.entry.js} +1 -1
  306. package/dist/twilight/{p-0ade8936.entry.js → p-d01178f0.entry.js} +1 -1
  307. package/dist/twilight/{p-32ef12bb.entry.js → p-d3d2a114.entry.js} +1 -1
  308. package/dist/twilight/{p-69926ae5.entry.js → p-d8fb7f9a.entry.js} +1 -1
  309. package/dist/twilight/{p-5e39f770.entry.js → p-da827143.entry.js} +1 -1
  310. package/dist/twilight/{p-1dc4ab57.entry.js → p-ddd22625.entry.js} +1 -1
  311. package/dist/twilight/{p-cf17ece0.entry.js → p-de41e9b5.entry.js} +1 -1
  312. package/dist/twilight/p-e21a23d2.entry.js +4 -0
  313. package/dist/twilight/{p-6466fd9c.entry.js → p-e5022e8f.entry.js} +1 -1
  314. package/dist/twilight/{p-9248a9b8.entry.js → p-e84f7790.entry.js} +1 -1
  315. package/dist/twilight/{p-c2284ac3.entry.js → p-ef06457d.entry.js} +1 -1
  316. package/dist/twilight/{p-431b9986.entry.js → p-f12670a1.entry.js} +1 -1
  317. package/dist/twilight/{p-e625c6a1.entry.js → p-f267ac72.entry.js} +1 -1
  318. package/dist/twilight/{p-c1aa61bc.entry.js → p-f5d229a7.entry.js} +1 -1
  319. package/dist/twilight/{p-da010601.entry.js → p-f856fe4d.entry.js} +1 -1
  320. package/dist/twilight/{p-2d6f9f9e.entry.js → p-fa900f26.entry.js} +1 -1
  321. package/dist/twilight/{p-029c7342.entry.js → p-fd99de6e.entry.js} +1 -1
  322. package/dist/twilight/p-fdb0f6cc.entry.js +4 -0
  323. package/dist/twilight/{p-c31600a9.entry.js → p-ffd6ad27.entry.js} +1 -1
  324. package/dist/twilight/{p-Ce51TrKH.js → p-lQbFKmnv.js} +1 -1
  325. package/dist/twilight/{p-Bnff9Ut3.js → p-qj0-UBFk.js} +1 -1
  326. package/dist/twilight/{p-aMw12tPb.js → p-uiIu01tD.js} +1 -1
  327. package/dist/twilight/twilight.esm.js +1 -1
  328. package/dist/types/components/salla-cart-summary-card/salla-cart-summary-card.d.ts +67 -0
  329. package/dist/types/components/salla-filters/salla-filters.d.ts +14 -0
  330. package/dist/types/components/salla-gifting/gift-schema.d.ts +2 -0
  331. package/dist/types/components/salla-gifting/salla-gifting.d.ts +8 -0
  332. package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
  333. package/dist/types/components.d.ts +37 -0
  334. package/package.json +5 -5
  335. package/dist/twilight/p-7f788909.entry.js +0 -4
  336. package/dist/twilight/p-80fc1a7b.entry.js +0 -4
  337. package/dist/twilight/p-83b8d7cf.entry.js +0 -4
  338. package/dist/twilight/p-8f672cef.entry.js +0 -4
  339. package/dist/twilight/p-C-3GuKNW.js +0 -4
  340. package/dist/twilight/p-f8ccc247.entry.js +0 -4
@@ -0,0 +1,347 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
+
6
+ const SKELETON_ROWS = [
7
+ { label: '100px', value: '56px' },
8
+ { label: '72px', value: '64px' },
9
+ { label: '96px', value: '48px' },
10
+ ];
11
+ const SallaCartSummaryCard = class {
12
+ constructor(hostRef) {
13
+ registerInstance(this, hostRef);
14
+ this.validateForms = true;
15
+ this.cartCount = 0;
16
+ this.cartTotal = 0;
17
+ this.cartTotalDiscount = 0;
18
+ this.cartSubTotal = 0;
19
+ this.cartOptionsTotal = 0;
20
+ this.cartShippingCost = 0;
21
+ this.cartTaxAmount = 0;
22
+ this.cartHasShipping = false;
23
+ this.isOpen = false;
24
+ this.isDesktop = false;
25
+ /** True until the first cart payload (API response or cart event) arrives. */
26
+ this.isLoading = true;
27
+ // Original DOM location — needed to restore the host on the mobile→desktop flip.
28
+ this.originalParent = null;
29
+ this.originalNextSibling = null;
30
+ this.bodyObserver = null;
31
+ this.mediaQueryList = null;
32
+ this.submitObserver = null;
33
+ this.isSubmitting = false;
34
+ // Stable handler refs — anonymous functions can't be unbound from listeners.
35
+ this.mqlChangeHandler = (e) => {
36
+ this.isDesktop = e.matches;
37
+ this.applyMode();
38
+ };
39
+ this.cartEventNames = [
40
+ 'cart::details.fetched',
41
+ 'cart::updated',
42
+ 'cart::latest.fetched',
43
+ 'cart::coupon.added',
44
+ 'cart::coupon.deleted',
45
+ ];
46
+ this.cartEventHandler = (payload) => this.applyCartData(this.extractCart(payload));
47
+ this.toggleSheet = () => {
48
+ if (!this.isDesktop)
49
+ this.isOpen = !this.isOpen;
50
+ };
51
+ this.handleSubmit = async (event) => {
52
+ // Re-entrancy guard, set before the async validation so a second tap during
53
+ // that window can't fire a second submit. Covers all user types.
54
+ if (this.isSubmitting) {
55
+ event.preventDefault();
56
+ return;
57
+ }
58
+ this.isSubmitting = true;
59
+ if (this.validateForms && !(await this.validateCartForms())) {
60
+ event.preventDefault();
61
+ salla.notify?.error?.(salla.lang?.get?.('common.messages.required_fields'));
62
+ this.isSubmitting = false; // validation failed → allow retry
63
+ return;
64
+ }
65
+ const btn = this.host.querySelector('#s-cart-summary-card-submit');
66
+ if (typeof salla !== 'undefined' && salla.config?.get?.('user.type') !== 'guest' && btn) {
67
+ btn.load?.();
68
+ // Pin loading across re-renders; auto-clear after 10s so a failed submit
69
+ // doesn't lock the button forever.
70
+ this.submitObserver?.disconnect();
71
+ if (this.submitObserverTimeout)
72
+ clearTimeout(this.submitObserverTimeout);
73
+ this.submitObserver = new MutationObserver(() => {
74
+ if (!btn.hasAttribute('loading'))
75
+ btn.setAttribute('loading', '');
76
+ });
77
+ this.submitObserver.observe(btn, { attributes: true, attributeFilter: ['loading'] });
78
+ this.submitObserverTimeout = window.setTimeout(() => {
79
+ this.submitObserver?.disconnect();
80
+ this.submitObserver = null;
81
+ btn.removeAttribute?.('loading');
82
+ }, 10000);
83
+ }
84
+ salla.cart?.submit?.();
85
+ // Release after submit kicks off: success navigates away, a guest opens the
86
+ // login modal. Short delay blocks the double-tap race without a long lock.
87
+ window.setTimeout(() => { this.isSubmitting = false; }, 1500);
88
+ };
89
+ }
90
+ // Sync: returning a promise would make Stencil defer first paint. init() runs async.
91
+ componentWillLoad() {
92
+ this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
93
+ this.isDesktop = this.mediaQueryList.matches;
94
+ if (this.isDesktop)
95
+ this.isOpen = true;
96
+ // isLoading is true by default → first paint is the skeleton.
97
+ this.init();
98
+ }
99
+ // Not awaited by componentWillLoad, so it can't block first paint.
100
+ async init() {
101
+ await salla.onReady();
102
+ await salla.lang.onLoaded();
103
+ this.loadTranslations();
104
+ // 'cart::updated' is in cartEventNames — don't also use onUpdated (it leaks, no off()).
105
+ this.cartEventNames.forEach(name => salla.event.on(name, this.cartEventHandler));
106
+ this.fetchCart();
107
+ }
108
+ loadTranslations() {
109
+ this.summaryLabel = salla.lang.get('pages.cart.summary');
110
+ this.itemsTotalLabel = salla.lang.get('pages.cart.items_total');
111
+ this.itemsTotalNoTaxLabel = salla.lang.get('pages.cart.items_total_without_tax');
112
+ this.optionsTotalLabel = salla.lang.get('pages.cart.order_options_total');
113
+ this.shippingCostLabel = salla.lang.get('pages.cart.shipping_cost');
114
+ this.vatTaxLabel = salla.lang.get('pages.cart.VAT_tax_amount');
115
+ this.savedLabel = salla.lang.get('pages.cart.discount');
116
+ this.discountBadge = salla.lang.get('pages.cart.saved');
117
+ this.finalTotalLabel = salla.lang.get('pages.cart.final_total');
118
+ this.pricesTaxedLabel = salla.lang.get('pages.cart.prices_taxed');
119
+ this.completeOrderLabel = salla.lang.get('pages.cart.complete_order');
120
+ this.openSummaryLabel = salla.lang.get('pages.cart.open_summary');
121
+ this.closeSummaryLabel = salla.lang.get('pages.cart.close_summary');
122
+ this.itemsCountTemplate = salla.lang.get('pages.cart.items_with_count');
123
+ }
124
+ /** Coerces PHP cart values: numbers, strings, and Money/MoneyTaxable objects. */
125
+ num(v) {
126
+ if (v === null || v === undefined)
127
+ return 0;
128
+ if (typeof v === 'number')
129
+ return isFinite(v) ? v : 0;
130
+ if (typeof v === 'string')
131
+ return parseFloat(v) || 0;
132
+ if (typeof v === 'object') {
133
+ if ('amount' in v)
134
+ return this.num(v.amount);
135
+ if ('value' in v)
136
+ return this.num(v.value);
137
+ if ('formatted' in v)
138
+ return this.num(v.formatted);
139
+ }
140
+ return 0;
141
+ }
142
+ // Desktop cutoff — must match the SCSS media queries so JS and CSS never diverge.
143
+ breakpointPx() {
144
+ return 1024;
145
+ }
146
+ desktopMediaQuery() {
147
+ return `(min-width: ${this.breakpointPx()}px)`;
148
+ }
149
+ componentDidLoad() {
150
+ // Capture original location BEFORE the portal relocates the host.
151
+ this.originalParent = this.host.parentElement;
152
+ this.originalNextSibling = this.host.nextSibling;
153
+ // Re-init if componentWillLoad failed to set it (rare hydration/race edge case).
154
+ if (!this.mediaQueryList) {
155
+ this.mediaQueryList = window.matchMedia(this.desktopMediaQuery());
156
+ this.isDesktop = this.mediaQueryList.matches;
157
+ }
158
+ this.applyMode();
159
+ // iOS Safari < 14 lacks addEventListener on MediaQueryList — fall back to addListener.
160
+ if (this.mediaQueryList.addEventListener) {
161
+ this.mediaQueryList.addEventListener('change', this.mqlChangeHandler);
162
+ }
163
+ else {
164
+ this.mediaQueryList.addListener(this.mqlChangeHandler);
165
+ }
166
+ }
167
+ // Mobile: portal host to <body> so position:fixed escapes any transformed
168
+ // ancestor. Desktop: restore to its original DOM location.
169
+ applyMode() {
170
+ if (this.isDesktop) {
171
+ this.isOpen = true;
172
+ this.bodyObserver?.disconnect();
173
+ this.bodyObserver = null;
174
+ if (this.originalParent && this.host.parentElement !== this.originalParent) {
175
+ // Sibling may have been removed while we were portaled — fall back
176
+ // to appendChild instead of letting insertBefore throw.
177
+ const ref = this.originalNextSibling?.parentNode === this.originalParent
178
+ ? this.originalNextSibling
179
+ : null;
180
+ this.originalParent.insertBefore(this.host, ref);
181
+ }
182
+ }
183
+ else {
184
+ this.pinToBodyEnd();
185
+ }
186
+ }
187
+ // Re-pin via MutationObserver so a late-mounted footer can't paint over us.
188
+ pinToBodyEnd() {
189
+ if (this.host.parentElement !== document.body || document.body.lastElementChild !== this.host) {
190
+ document.body.appendChild(this.host);
191
+ }
192
+ if (!this.bodyObserver) {
193
+ this.bodyObserver = new MutationObserver(() => {
194
+ if (!this.isDesktop && document.body.lastElementChild !== this.host) {
195
+ document.body.appendChild(this.host);
196
+ }
197
+ });
198
+ this.bodyObserver.observe(document.body, { childList: true });
199
+ }
200
+ }
201
+ disconnectedCallback() {
202
+ // Fires synchronously on every removal, incl. our own reparenting — defer a
203
+ // microtask and bail if reconnected, else the portal loses its listeners.
204
+ Promise.resolve().then(() => {
205
+ if (this.host.isConnected)
206
+ return;
207
+ this.bodyObserver?.disconnect();
208
+ this.submitObserver?.disconnect();
209
+ if (this.submitObserverTimeout) {
210
+ clearTimeout(this.submitObserverTimeout);
211
+ this.submitObserverTimeout = undefined;
212
+ }
213
+ // Mirror the iOS-Safari-<14 path used in componentDidLoad.
214
+ if (this.mediaQueryList?.removeEventListener) {
215
+ this.mediaQueryList.removeEventListener('change', this.mqlChangeHandler);
216
+ }
217
+ else {
218
+ this.mediaQueryList?.removeListener(this.mqlChangeHandler);
219
+ }
220
+ this.mediaQueryList = null;
221
+ this.cartEventNames.forEach(name => salla.event.off(name, this.cartEventHandler));
222
+ });
223
+ }
224
+ fetchCart() {
225
+ const cartId = salla.config?.get?.('page.id');
226
+ const result = salla.cart?.api?.details?.(cartId);
227
+ if (result && typeof result.then === 'function') {
228
+ result
229
+ .then((res) => this.applyCartData(this.extractCart(res)))
230
+ // On failure, fall back to the cached summary instead of stranding the skeleton.
231
+ .catch(() => this.applyCachedSummary());
232
+ }
233
+ else {
234
+ this.applyCachedSummary();
235
+ }
236
+ }
237
+ // Cart API failed → use the SDK's cached summary (localStorage, set on
238
+ // cart::updated). May be stale but beats zeros; events refresh it. Clears the
239
+ // skeleton either way so the CTA always renders.
240
+ applyCachedSummary() {
241
+ const summary = salla.storage?.get?.('cart.summary');
242
+ if (summary && typeof summary === 'object')
243
+ this.applyCartData(summary);
244
+ this.isLoading = false;
245
+ }
246
+ extractCart(payload) {
247
+ if (!payload)
248
+ return null;
249
+ if (payload.data?.cart)
250
+ return payload.data.cart;
251
+ if (payload.cart)
252
+ return payload.cart;
253
+ return payload;
254
+ }
255
+ applyCartData(data) {
256
+ if (!data)
257
+ return;
258
+ // First real payload ends the skeleton.
259
+ this.isLoading = false;
260
+ if (data.count !== undefined)
261
+ this.cartCount = this.num(data.count);
262
+ if (data.total !== undefined)
263
+ this.cartTotal = this.num(data.total);
264
+ // `total_discount` is the live field (untyped); `discount` is the typed fallback.
265
+ const discount = data.total_discount ?? data.discount;
266
+ if (discount !== undefined)
267
+ this.cartTotalDiscount = this.num(discount);
268
+ if (data.sub_total !== undefined)
269
+ this.cartSubTotal = this.num(data.sub_total);
270
+ if (data.options_total !== undefined)
271
+ this.cartOptionsTotal = this.num(data.options_total);
272
+ if (data.tax_amount !== undefined)
273
+ this.cartTaxAmount = this.num(data.tax_amount);
274
+ // Shipping cost (free-shipping aware): prefer `shipping_cost`, else `real_shipping_cost`.
275
+ const hasFreeShipping = !!data.free_shipping_bar?.has_free_shipping;
276
+ if (data.shipping_cost !== undefined)
277
+ this.cartShippingCost = this.num(data.shipping_cost);
278
+ else if (data.real_shipping_cost !== undefined)
279
+ this.cartShippingCost = hasFreeShipping ? 0 : this.num(data.real_shipping_cost);
280
+ // `has_shipping` isn't in the API response — derive row visibility from the cost.
281
+ this.cartHasShipping = this.cartShippingCost > 0 || !!data.has_shipping;
282
+ }
283
+ // Native reportValidity() covers standard fields; custom product options
284
+ // validate via their own async reportValidity() (incl. multi-option required
285
+ // logic), so await that too — else option validation is skipped at checkout.
286
+ async validateCartForms() {
287
+ let isValid = true;
288
+ document
289
+ .querySelectorAll('form[id^="item-"]')
290
+ .forEach(f => {
291
+ if (!f.reportValidity())
292
+ isValid = false;
293
+ });
294
+ const optionEls = Array.from(document.querySelectorAll('form[id^="item-"] salla-product-options'));
295
+ for (const el of optionEls) {
296
+ if (typeof el.reportValidity === 'function' && !(await el.reportValidity()))
297
+ isValid = false;
298
+ }
299
+ return isValid;
300
+ }
301
+ money(value) {
302
+ try {
303
+ if (typeof salla !== 'undefined' && typeof salla.money === 'function') {
304
+ return salla.money(value);
305
+ }
306
+ }
307
+ catch (_) { }
308
+ return String(value ?? 0);
309
+ }
310
+ getItemsLabel() {
311
+ return this.itemsCountTemplate?.replace(':count', String(this.cartCount)) ?? '';
312
+ }
313
+ // Skeleton during the initial fetch
314
+ renderSkeleton() {
315
+ return (h(Host, { class: {
316
+ 's-cart-summary-card': true,
317
+ 's-cart-summary-card--loading': true,
318
+ 's-cart-summary-card--desktop': this.isDesktop,
319
+ 's-cart-summary-card--mobile': !this.isDesktop,
320
+ } }, this.isDesktop && (h("div", { class: "s-cart-summary-card-sheet-wrap s-cart-summary-card-sheet-wrap--open" }, h("div", { class: "s-cart-summary-card-sheet" }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, h("salla-skeleton", { width: "140px", height: "16px" }))), SKELETON_ROWS.map(({ label, value }, i) => (h("div", { class: "s-cart-summary-card-line", key: i }, h("salla-skeleton", { width: label, height: "16px" }), h("salla-skeleton", { width: value, height: "16px" }))))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("salla-skeleton", { width: "90px", height: "16px" }), h("salla-skeleton", { width: "48px", height: "12px" }))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, h("salla-skeleton", { width: "80px", height: "20px" })))), h("div", { class: "s-cart-summary-card-action" }, h("salla-skeleton", { width: "100%", height: "44px" }))));
321
+ }
322
+ render() {
323
+ if (this.isLoading)
324
+ return this.renderSkeleton();
325
+ const showSavings = this.cartTotalDiscount > 0;
326
+ const subTotalLabel = this.cartTaxAmount ? this.itemsTotalNoTaxLabel : this.itemsTotalLabel;
327
+ // Inline transform so sheet motion doesn't depend on SCSS load order.
328
+ const sheetStyle = this.isDesktop
329
+ ? {}
330
+ : {
331
+ transform: this.isOpen ? 'translateY(0)' : 'translateY(100%)',
332
+ transition: 'transform 0.4s cubic-bezier(0.32, 0.72, 0, 1)',
333
+ };
334
+ return (h(Host, { class: {
335
+ 's-cart-summary-card': true,
336
+ 's-cart-summary-card--open': this.isOpen,
337
+ 's-cart-summary-card--desktop': this.isDesktop,
338
+ 's-cart-summary-card--mobile': !this.isDesktop,
339
+ } }, h("div", { class: {
340
+ 's-cart-summary-card-sheet-wrap': true,
341
+ 's-cart-summary-card-sheet-wrap--open': this.isOpen,
342
+ }, "aria-hidden": this.isOpen ? 'false' : 'true' }, h("div", { class: "s-cart-summary-card-sheet", style: sheetStyle }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, this.summaryLabel)), h("div", { class: "s-cart-summary-card-line" }, h("span", null, subTotalLabel), h("b", { innerHTML: this.money(this.cartSubTotal) })), this.cartOptionsTotal > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.optionsTotalLabel), h("b", { innerHTML: this.money(this.cartOptionsTotal) }))), this.cartHasShipping && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.shippingCostLabel), h("b", { innerHTML: this.money(this.cartShippingCost) }))), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.vatTaxLabel), h("b", { innerHTML: this.money(this.cartTaxAmount) }))), showSavings && (h("div", { class: "s-cart-summary-card-line s-cart-summary-card-line--discount" }, h("span", null, this.savedLabel), h("b", null, "\u2212 ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("span", { class: "s-cart-summary-card-bar-label-text" }, this.finalTotalLabel), h("span", { class: "s-cart-summary-card-bar-count" }, this.getItemsLabel())), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-bar-label-sub" }, this.pricesTaxedLabel))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, showSavings && (h("s", { class: "s-cart-summary-card-bar-original" }, salla.helpers.number(this.cartTotal + this.cartTotalDiscount))), h("b", { class: "s-cart-summary-card-bar-total", innerHTML: this.money(this.cartTotal) }), !this.isDesktop && (h("button", { type: "button", class: "s-cart-summary-card-chevron", "aria-label": this.isOpen ? this.closeSummaryLabel : this.openSummaryLabel, "aria-expanded": this.isOpen ? 'true' : 'false', onClick: this.toggleSheet }, h("i", { class: "sicon-keyboard_arrow_up s-cart-summary-card-chevron-icon" })))), showSavings && (h("div", { class: "s-cart-summary-card-bar-savings-badge" }, h("span", { "aria-hidden": "true" }, "\uD83C\uDF89"), h("span", null, this.discountBadge, " ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-action" }, h("salla-button", { id: "s-cart-summary-card-submit", width: "wide", "loader-position": "center", onClick: this.handleSubmit }, this.completeOrderLabel))));
343
+ }
344
+ get host() { return getElement(this); }
345
+ };
346
+
347
+ export { SallaCartSummaryCard as salla_cart_summary_card };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
5
 
6
6
  var StarFilledIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <g clip-path="url(#clip0_5667_2008)">
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, i as require_root, j as requireIsObject, k as requireIsSymbol, d as getDefaultExportFromCjs } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, i as require_root, j as requireIsObject, k as requireIsSymbol, d as getDefaultExportFromCjs } from './index-DBMDFsFH.js';
5
5
  import { S as SICheck } from './check-BZp0rKEO.js';
6
6
  import { a as anime } from './anime.es-CgtvEd63.js';
7
- import { H as Helper } from './Helper-CD8d-Brd.js';
7
+ import { H as Helper } from './Helper-BQ9mvrt9.js';
8
8
  import { S as Star } from './star2-D4oPi1Ov.js';
9
9
  import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
10
10
  import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host } from './index-DBMDFsFH.js';
5
5
 
6
6
  var DiscountType;
7
7
  (function (DiscountType) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
5
  import { W as WhatsappIcon } from './whatsapp2-CgR-T_ZS.js';
6
6
  import { e as email } from './mail-DzAIgzdz.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
5
 
6
6
  const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}.s-cookies-bar-btn--active{box-shadow:0 0 0 2px rgba(0, 0, 0, 0.08)}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host } from './index-DBMDFsFH.js';
5
5
 
6
6
  const sallaCountDownCss = ".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, c as createEvent, h } from './index-DBMDFsFH.js';
5
5
  import { C as CameraIcon } from './camera-C6jIkM-X.js';
6
6
  import { F as FormFieldTypes } from './interfaces-OF8QcbMM.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host, a as getElement } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
5
 
6
6
  const DEBUG_KEY = 'salla-delivery-promise-debug';
7
7
  function log(message, data) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-DJPd6DKq.js';
4
+ import { r as registerInstance, h, H as Host } from './index-DBMDFsFH.js';
5
5
 
6
6
  const sallaEditOrderButtonCss = ":host{display:block}";
7
7
 
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DJPd6DKq.js';
5
- import { H as Helper } from './Helper-CD8d-Brd.js';
4
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DBMDFsFH.js';
5
+ import { H as Helper } from './Helper-BQ9mvrt9.js';
6
6
  import { F as FilterOptionTypes } from './interfaces-DL4h2bc3.js';
7
7
  import './anime.es-CgtvEd63.js';
8
8
 
@@ -141,7 +141,7 @@ const SallaFiltersWidget = class {
141
141
  //@ts-ignore
142
142
  return filteredValues.map((filterOption, index) => {
143
143
  let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);
144
- return h("label", { class: "s-filters-label", htmlFor: `${option.key}-option-${value}`, key: `${option.key}-option-${value}` }, h("input", { id: `${option.key}-option-${value}`, name: option.key, type: "radio", checked: this.isSelectedOption(option, value), class: `s-filters-radio`, onChange: event => this.changed.emit({ event, option, value }) }), this.getOptionLabel(option, filterOption));
144
+ return h("label", { class: "s-filters-label", htmlFor: `${option.key}-option-${value}`, key: `${option.key}-option-${value}` }, h("input", { id: `${option.key}-option-${value}`, name: option.key, type: option.type === FilterOptionTypes.VALUES ? 'checkbox' : 'radio', checked: this.isSelectedOption(option, value), class: option.type === FilterOptionTypes.VALUES ? 's-filters-checkbox' : 's-filters-radio', onChange: event => this.changed.emit({ event, option, value }) }), this.getOptionLabel(option, filterOption));
145
145
  });
146
146
  }
147
147
  isSelectedOption(option, value) {
@@ -149,13 +149,18 @@ const SallaFiltersWidget = class {
149
149
  return this.filtersData[option.key] == value;
150
150
  }
151
151
  if (option.type === FilterOptionTypes.VARIANTS) {
152
- return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;
152
+ // selections are stored per widget key (handleOptionChange: filtersData.variants[option.key])
153
+ return this.filtersData[option.type] && this.filtersData[option.type][option.key] == value;
153
154
  }
154
155
  if (option.type === FilterOptionTypes.RANGE) {
155
156
  return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;
156
157
  }
157
158
  if (option.type === FilterOptionTypes.VALUES) {
158
- return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);
159
+ const selected = this.filtersData[option.key];
160
+ if (Array.isArray(selected)) {
161
+ return selected.some(v => Number(v) === Number(value));
162
+ }
163
+ return selected != null && Number(selected) === Number(value);
159
164
  }
160
165
  return false;
161
166
  }
@@ -165,16 +170,18 @@ const SallaFiltersWidget = class {
165
170
  return h("salla-rating-stars", { size: "small", value: filterOption });
166
171
  }
167
172
  let label = filterOption.value || 'null';
168
- //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';
173
+ if (filterOption.count != null) {
174
+ label += ` (${salla.helpers.number(filterOption.count)})`;
175
+ }
169
176
  return h("span", { class: "s-filters-option-name" }, label);
170
177
  }
171
178
  render() {
172
- return (h(Host, { key: '2cdd3bbc88b473e9b5d52bf5e95de16f9ad47a51', class: "s-filters-widget-container" }, h("h3", { key: '4d3d522469681c5d7cde040938b0ce15324d7cc3', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '60fa18c667a1b00f03e8eebc484da68e78fa8d90' }, this.option.label), h("span", { key: 'ac8cff411fbb76c43e0134b0c7381b682a8afcd0', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '5705ab244d712512e156994bbf21d9bb49dbb43b', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: 'a59f45a5fbd803dcd65f0a5b40060a1dcfed00e0', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '3275790105bfe9b84df564b9385c4a9556c2f03a', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: '70d57184a8089422d96ea62ddaa7697f7f207441', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '959512d2256b5a29236572fc8078c5baa5d9a571' }), this.option.type !== FilterOptionTypes.RANGE
179
+ return (h(Host, { key: '3ea32331738365fc422b500b3e70fa590d4dbdb5', class: "s-filters-widget-container" }, h("h3", { key: 'c5cb7a27841bf85e4c108e15d606c1c45059e5ca', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: '641164d403dd4c9b79a540f4da5829f5238cded4' }, this.option.label), h("span", { key: '5cf687d80ff627f306f5876f69b799b6b7a3813d', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: 'd9b753223b4fb1c468ed6c4c3a269b861bc5b34b', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: '0ca4f8c598e5965e23ef56610df7afc31799f168', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '7b43ec84dcbeb5b7f9cbe9335133e32c278c00fd', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: '5bf79fc5f51389d087fed93acee51a097a46af65', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '8dacd49ba003562d347a6c1b62e85ac447a62fcb' }), this.option.type !== FilterOptionTypes.RANGE
173
180
  ? this.renderFilterOption(this.option)
174
181
  : h("salla-price-range", { onChanged: (event) => {
175
182
  this.changed.emit(event.detail);
176
183
  }, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
177
- h("a", { key: '305b4a155c2b3705bcf139c81b5f8bcb3d744d05', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
184
+ h("a", { key: '85ca188ff9f0db7c0a23b94e4705ae2ca5c38d55', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
178
185
  }
179
186
  get host() { return getElement(this); }
180
187
  };