@salla.sa/twilight-components 2.14.484 → 2.14.486

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 (329) hide show
  1. package/dist/cjs/{Helper-CgGR9Qf8.js → Helper-DvyEpCgx.js} +13 -0
  2. package/dist/cjs/{filepond-CgzJykLb.js → filepond-BtDP9OW9.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-QDPQ7mwB.js → filepond-plugin-file-poster-CTf1Ej_n.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-Bad-w2I9.js → filepond-plugin-file-validate-size-_wVJpYXF.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DISG2_qB.js → filepond-plugin-file-validate-type-DWoo5Lcs.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-CVHAGWaB.js → filepond-plugin-image-edit-DBb_5aN9.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-Dwsj5VyO.js → filepond-plugin-image-exif-orientation-Nnwt-m9k.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-I9g9nrNa.js → filepond-plugin-image-preview-CjBwZm3E.js} +1 -1
  9. package/dist/cjs/{functions-hUb6T9a1.js → functions-DkS9Jmao.js} +1 -1
  10. package/dist/cjs/{index-BADADy4V.js → index-C0yFagl6.js} +1 -1
  11. package/dist/cjs/{index-BKQzclgF.js → index-C_WIlgE2.js} +8 -8
  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-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +2 -2
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  35. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +21 -5
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notifications.cjs.entry.js +2 -2
  63. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-options-modal_3.cjs.entry.js +17 -2
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +23 -12
  82. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  85. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  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-czeUB0TX.js → tracked-promise-TyxTPR6e.js} +1 -1
  102. package/dist/cjs/twilight.cjs.js +2 -2
  103. package/dist/cjs/{vanilla-picker-CuMQuW8m.js → vanilla-picker-DyJFw96R.js} +1 -1
  104. package/dist/collection/Helpers/Helper.js +13 -0
  105. package/dist/collection/components/salla-gifting/salla-gifting.js +21 -4
  106. package/dist/collection/components/salla-products-list/salla-products-list.js +21 -10
  107. package/dist/collection/components/salla-products-slider/salla-products-slider.js +18 -0
  108. package/dist/components/Helper.js +13 -0
  109. package/dist/components/index.js +8 -8
  110. package/dist/components/salla-gifting.js +21 -4
  111. package/dist/components/salla-products-list2.js +21 -10
  112. package/dist/components/salla-products-slider2.js +17 -0
  113. package/dist/esm/{Helper-BXj4f_Qj.js → Helper-CD8d-Brd.js} +13 -0
  114. package/dist/esm/{filepond-BOBokEx5.js → filepond-ZiatSU0Y.js} +1 -1
  115. package/dist/esm/{filepond-plugin-file-poster-D9HYZEnq.js → filepond-plugin-file-poster-2WAWdRm2.js} +1 -1
  116. package/dist/esm/{filepond-plugin-file-validate-size-B1BkZh58.js → filepond-plugin-file-validate-size-DhLjP7aF.js} +1 -1
  117. package/dist/esm/{filepond-plugin-file-validate-type-CT0ni0hb.js → filepond-plugin-file-validate-type-HH8AZXAq.js} +1 -1
  118. package/dist/esm/{filepond-plugin-image-edit-CvSKiYON.js → filepond-plugin-image-edit-BWBtBfk1.js} +1 -1
  119. package/dist/esm/{filepond-plugin-image-exif-orientation-Cu1zifQ6.js → filepond-plugin-image-exif-orientation-CQyPB3lV.js} +1 -1
  120. package/dist/esm/{filepond-plugin-image-preview-6m913ljw.js → filepond-plugin-image-preview-D6MiVWr1.js} +1 -1
  121. package/dist/esm/{functions-CioYIS_L.js → functions-DflaFDbL.js} +1 -1
  122. package/dist/esm/{index-k6XsozPW.js → index-BF901xIc.js} +8 -8
  123. package/dist/esm/{index-CiFCAiRL.js → index-Co2lT5R8.js} +1 -1
  124. package/dist/esm/loader.js +3 -3
  125. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  126. package/dist/esm/salla-accordion_6.entry.js +2 -2
  127. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  128. package/dist/esm/salla-advertisement.entry.js +1 -1
  129. package/dist/esm/salla-alert_2.entry.js +1 -1
  130. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  131. package/dist/esm/salla-apps-icons.entry.js +1 -1
  132. package/dist/esm/salla-badge.entry.js +1 -1
  133. package/dist/esm/salla-booking-field_7.entry.js +11 -11
  134. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  135. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  136. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  137. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  138. package/dist/esm/salla-comment-form_8.entry.js +2 -2
  139. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  140. package/dist/esm/salla-contacts.entry.js +1 -1
  141. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  142. package/dist/esm/salla-count-down.entry.js +1 -1
  143. package/dist/esm/salla-custom-fields.entry.js +1 -1
  144. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  145. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  146. package/dist/esm/salla-filters-widget.entry.js +2 -2
  147. package/dist/esm/salla-filters.entry.js +2 -2
  148. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  149. package/dist/esm/salla-gifting.entry.js +21 -5
  150. package/dist/esm/salla-hook.entry.js +1 -1
  151. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  152. package/dist/esm/salla-installment.entry.js +1 -1
  153. package/dist/esm/salla-list-tile.entry.js +1 -1
  154. package/dist/esm/salla-localization-modal.entry.js +1 -1
  155. package/dist/esm/salla-login-modal.entry.js +1 -1
  156. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  157. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  158. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  159. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  160. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  161. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  162. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  163. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  164. package/dist/esm/salla-loyalty.entry.js +1 -1
  165. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  166. package/dist/esm/salla-map_2.entry.js +1 -1
  167. package/dist/esm/salla-menu.entry.js +1 -1
  168. package/dist/esm/salla-metadata.entry.js +1 -1
  169. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  170. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  171. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  172. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  173. package/dist/esm/salla-notification-item.entry.js +1 -1
  174. package/dist/esm/salla-notifications.entry.js +2 -2
  175. package/dist/esm/salla-offer-modal.entry.js +1 -1
  176. package/dist/esm/salla-offer.entry.js +1 -1
  177. package/dist/esm/salla-order-branch.entry.js +1 -1
  178. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  179. package/dist/esm/salla-order-details-options.entry.js +1 -1
  180. package/dist/esm/salla-order-details.entry.js +1 -1
  181. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  182. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  183. package/dist/esm/salla-order-edit.entry.js +1 -1
  184. package/dist/esm/salla-order-options-modal_3.entry.js +17 -2
  185. package/dist/esm/salla-order-summary.entry.js +1 -1
  186. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  187. package/dist/esm/salla-orders.entry.js +2 -2
  188. package/dist/esm/salla-payments.entry.js +1 -1
  189. package/dist/esm/salla-placeholder.entry.js +1 -1
  190. package/dist/esm/salla-price-range.entry.js +1 -1
  191. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  192. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  193. package/dist/esm/salla-products-list.entry.js +23 -12
  194. package/dist/esm/salla-quick-order.entry.js +1 -1
  195. package/dist/esm/salla-rating-modal.entry.js +2 -2
  196. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  197. package/dist/esm/salla-scopes.entry.js +1 -1
  198. package/dist/esm/salla-search.entry.js +2 -2
  199. package/dist/esm/salla-skeleton.entry.js +1 -1
  200. package/dist/esm/salla-slider.entry.js +1 -1
  201. package/dist/esm/salla-social-share.entry.js +1 -1
  202. package/dist/esm/salla-social.entry.js +1 -1
  203. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  204. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  205. package/dist/esm/salla-tooltip.entry.js +1 -1
  206. package/dist/esm/salla-trust-badges.entry.js +1 -1
  207. package/dist/esm/salla-user-menu.entry.js +1 -1
  208. package/dist/esm/salla-user-profile.entry.js +1 -1
  209. package/dist/esm/salla-user-settings.entry.js +1 -1
  210. package/dist/esm/salla-verify.entry.js +1 -1
  211. package/dist/esm/salla-wallet.entry.js +1 -1
  212. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  213. package/dist/esm/{tracked-promise-CdkA_JjX.js → tracked-promise-CNdO8SSl.js} +1 -1
  214. package/dist/esm/twilight.js +3 -3
  215. package/dist/esm/{vanilla-picker-BZWJ0V9v.js → vanilla-picker-YVpipuL-.js} +1 -1
  216. package/dist/twilight/{p-99372423.entry.js → p-02350ded.entry.js} +1 -1
  217. package/dist/twilight/{p-54feea36.entry.js → p-04f5d67b.entry.js} +1 -1
  218. package/dist/twilight/{p-fc77d2ae.entry.js → p-0c36ee7c.entry.js} +1 -1
  219. package/dist/twilight/p-0d94f890.entry.js +4 -0
  220. package/dist/twilight/{p-faecf830.entry.js → p-0e2a2a9a.entry.js} +1 -1
  221. package/dist/twilight/{p-680ee21a.entry.js → p-0fcc3b26.entry.js} +1 -1
  222. package/dist/twilight/{p-894d4262.entry.js → p-134988db.entry.js} +1 -1
  223. package/dist/twilight/{p-f9d747fd.entry.js → p-18ad7499.entry.js} +1 -1
  224. package/dist/twilight/{p-6a520655.entry.js → p-1a8525af.entry.js} +1 -1
  225. package/dist/twilight/{p-b586e687.entry.js → p-1c4e7c18.entry.js} +1 -1
  226. package/dist/twilight/{p-6fce9b27.entry.js → p-1d3efd00.entry.js} +1 -1
  227. package/dist/twilight/{p-78b63b85.entry.js → p-2192d7c2.entry.js} +1 -1
  228. package/dist/twilight/{p-e00ab427.entry.js → p-22405eaa.entry.js} +1 -1
  229. package/dist/twilight/{p-df2b2d2c.entry.js → p-2b58b700.entry.js} +1 -1
  230. package/dist/twilight/p-2cc32d1f.entry.js +4 -0
  231. package/dist/twilight/{p-7e16042a.entry.js → p-2e4fe427.entry.js} +1 -1
  232. package/dist/twilight/{p-1d8eeff8.entry.js → p-2eb78125.entry.js} +1 -1
  233. package/dist/twilight/{p-6bcd63ae.entry.js → p-368d3b26.entry.js} +1 -1
  234. package/dist/twilight/{p-f04e749d.entry.js → p-3d732135.entry.js} +1 -1
  235. package/dist/twilight/{p-08fe51be.entry.js → p-3eb54d75.entry.js} +1 -1
  236. package/dist/twilight/{p-69f6aea4.entry.js → p-4288893b.entry.js} +1 -1
  237. package/dist/twilight/{p-80898e8c.entry.js → p-43ab561c.entry.js} +1 -1
  238. package/dist/twilight/{p-12221625.entry.js → p-4427e994.entry.js} +1 -1
  239. package/dist/twilight/{p-43caeaa9.entry.js → p-4544ca7d.entry.js} +1 -1
  240. package/dist/twilight/{p-4a466458.entry.js → p-4b0aa371.entry.js} +1 -1
  241. package/dist/twilight/{p-4361f318.entry.js → p-4b558e37.entry.js} +1 -1
  242. package/dist/twilight/{p-48c49122.entry.js → p-4e2f144a.entry.js} +1 -1
  243. package/dist/twilight/{p-027b0223.entry.js → p-506a2720.entry.js} +1 -1
  244. package/dist/twilight/{p-4ccb7dbf.entry.js → p-518bab79.entry.js} +1 -1
  245. package/dist/twilight/{p-876984e8.entry.js → p-5476bd33.entry.js} +1 -1
  246. package/dist/twilight/{p-4cdc5eb0.entry.js → p-5c37420e.entry.js} +1 -1
  247. package/dist/twilight/{p-5e6745be.entry.js → p-632766e3.entry.js} +1 -1
  248. package/dist/twilight/{p-910ca1ce.entry.js → p-67b225d5.entry.js} +1 -1
  249. package/dist/twilight/{p-8fddef9f.entry.js → p-6976c445.entry.js} +1 -1
  250. package/dist/twilight/{p-faedf801.entry.js → p-6b9780be.entry.js} +1 -1
  251. package/dist/twilight/{p-2b80d6bd.entry.js → p-77b6fbf2.entry.js} +1 -1
  252. package/dist/twilight/{p-afdcb549.entry.js → p-7ce2c5ca.entry.js} +1 -1
  253. package/dist/twilight/{p-b4e487a3.entry.js → p-85b235dc.entry.js} +1 -1
  254. package/dist/twilight/{p-6e708a89.entry.js → p-8f006eca.entry.js} +1 -1
  255. package/dist/twilight/{p-f10c4351.entry.js → p-8f9e0a7a.entry.js} +1 -1
  256. package/dist/twilight/{p-3be35606.entry.js → p-90c58cc5.entry.js} +1 -1
  257. package/dist/twilight/{p-6221c7fd.entry.js → p-9b2f674f.entry.js} +1 -1
  258. package/dist/twilight/{p-65e84413.entry.js → p-9db7e318.entry.js} +1 -1
  259. package/dist/twilight/{p-e0eb1171.entry.js → p-9f6a0804.entry.js} +1 -1
  260. package/dist/twilight/{p-DIe-ZaHw.js → p-BEb9UIZ7.js} +1 -1
  261. package/dist/twilight/p-BF901xIc.js +5 -0
  262. package/dist/twilight/{p-CYnG82Sr.js → p-BPGtYFVu.js} +1 -1
  263. package/dist/twilight/p-Bmy5YF6e.js +4 -0
  264. package/dist/twilight/{p-RS-U17dA.js → p-BrcsejOr.js} +1 -1
  265. package/dist/twilight/{p-DThnTW1t.js → p-BuOjsqYX.js} +1 -1
  266. package/dist/twilight/{p-BcbKK1Xp.js → p-C-3GuKNW.js} +1 -1
  267. package/dist/twilight/{p-C8JaiU7x.js → p-CMmiX5T8.js} +1 -1
  268. package/dist/twilight/{p-k6hKHe3o.js → p-CwLXCdYY.js} +1 -1
  269. package/dist/twilight/{p-Dt7QetEN.js → p-DVM0Orh8.js} +1 -1
  270. package/dist/twilight/{p-Do0Z2RvW.js → p-DwHaUky6.js} +1 -1
  271. package/dist/twilight/{p-BjmKgRE2.js → p-KNG8mGcV.js} +1 -1
  272. package/dist/twilight/{p-c54b5512.entry.js → p-a047ed06.entry.js} +1 -1
  273. package/dist/twilight/{p-0882266c.entry.js → p-a3a1bf15.entry.js} +1 -1
  274. package/dist/twilight/{p-215f22bf.entry.js → p-a4107435.entry.js} +1 -1
  275. package/dist/twilight/{p-e2b9a669.entry.js → p-a445225d.entry.js} +1 -1
  276. package/dist/twilight/{p-ca338609.entry.js → p-a5895e0f.entry.js} +1 -1
  277. package/dist/twilight/{p-71371a68.entry.js → p-a6afc8ab.entry.js} +1 -1
  278. package/dist/twilight/{p-f84a2d1f.entry.js → p-a7d99355.entry.js} +1 -1
  279. package/dist/twilight/{p-1308a7f4.entry.js → p-a853a50f.entry.js} +1 -1
  280. package/dist/twilight/{p-fda44045.entry.js → p-aa928350.entry.js} +1 -1
  281. package/dist/twilight/{p-7b9f7996.entry.js → p-ad5c8d34.entry.js} +1 -1
  282. package/dist/twilight/p-b2a11170.entry.js +4 -0
  283. package/dist/twilight/{p-338810f6.entry.js → p-b32e5ad7.entry.js} +1 -1
  284. package/dist/twilight/{p-fd0d78b0.entry.js → p-b7b29da3.entry.js} +1 -1
  285. package/dist/twilight/{p-38831a43.entry.js → p-b8d180fe.entry.js} +1 -1
  286. package/dist/twilight/{p-ae40baf7.entry.js → p-bcfe04fa.entry.js} +1 -1
  287. package/dist/twilight/{p-0567c659.entry.js → p-bd0075c9.entry.js} +1 -1
  288. package/dist/twilight/{p-6b7a391d.entry.js → p-be632d40.entry.js} +1 -1
  289. package/dist/twilight/{p-f2155a0e.entry.js → p-beb2df03.entry.js} +1 -1
  290. package/dist/twilight/{p-98cb2ad9.entry.js → p-c01e3f1d.entry.js} +1 -1
  291. package/dist/twilight/{p-c4dd7259.entry.js → p-c5050e10.entry.js} +1 -1
  292. package/dist/twilight/{p-df18ce74.entry.js → p-c590dcf0.entry.js} +1 -1
  293. package/dist/twilight/{p-4a2522e6.entry.js → p-c92915e0.entry.js} +1 -1
  294. package/dist/twilight/{p-aefc937f.entry.js → p-cd4b2301.entry.js} +1 -1
  295. package/dist/twilight/{p-159fb121.entry.js → p-ce38e5a1.entry.js} +1 -1
  296. package/dist/twilight/{p-df9735e4.entry.js → p-ce633fa0.entry.js} +1 -1
  297. package/dist/twilight/p-ce8571e3.entry.js +4 -0
  298. package/dist/twilight/{p-65986434.entry.js → p-d1048676.entry.js} +1 -1
  299. package/dist/twilight/{p-cd3a81d5.entry.js → p-d2cc8587.entry.js} +1 -1
  300. package/dist/twilight/{p-e7c43f45.entry.js → p-d2cdd923.entry.js} +1 -1
  301. package/dist/twilight/{p-b4e6ee26.entry.js → p-d3f904d0.entry.js} +1 -1
  302. package/dist/twilight/{p-f30850eb.entry.js → p-d4eeed4b.entry.js} +1 -1
  303. package/dist/twilight/{p-5d0017eb.entry.js → p-d6da8710.entry.js} +1 -1
  304. package/dist/twilight/{p-43e35e87.entry.js → p-d92a7d91.entry.js} +1 -1
  305. package/dist/twilight/{p-277fa567.entry.js → p-dc093d27.entry.js} +1 -1
  306. package/dist/twilight/{p-ae1ff5a4.entry.js → p-e304cb5e.entry.js} +1 -1
  307. package/dist/twilight/{p-6b622cdf.entry.js → p-e692322c.entry.js} +1 -1
  308. package/dist/twilight/{p-6fd14051.entry.js → p-ed1e0c2e.entry.js} +1 -1
  309. package/dist/twilight/{p-fe435826.entry.js → p-f32df318.entry.js} +1 -1
  310. package/dist/twilight/{p-67b9bef4.entry.js → p-f3b24cce.entry.js} +1 -1
  311. package/dist/twilight/{p-34bb19ed.entry.js → p-f4564fdc.entry.js} +1 -1
  312. package/dist/twilight/{p-b3b5f52a.entry.js → p-f5e55c13.entry.js} +1 -1
  313. package/dist/twilight/{p-236d6236.entry.js → p-f5e943bb.entry.js} +1 -1
  314. package/dist/twilight/{p-98bd4d1d.entry.js → p-f71a7a24.entry.js} +1 -1
  315. package/dist/twilight/{p-a986efd7.entry.js → p-fe69512c.entry.js} +1 -1
  316. package/dist/twilight/{p-3nNP8OVW.js → p-gacShRe2.js} +1 -1
  317. package/dist/twilight/twilight.esm.js +1 -1
  318. package/dist/types/Helpers/Helper.d.ts +1 -0
  319. package/dist/types/components/salla-gifting/gift-schema.d.ts +2 -0
  320. package/dist/types/components/salla-gifting/salla-gifting.d.ts +8 -0
  321. package/dist/types/components/salla-products-list/salla-products-list.d.ts +3 -0
  322. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +4 -0
  323. package/package.json +5 -5
  324. package/dist/twilight/p-01a4c68d.entry.js +0 -4
  325. package/dist/twilight/p-10d25bed.entry.js +0 -4
  326. package/dist/twilight/p-C6HZIai8.js +0 -4
  327. package/dist/twilight/p-ad24f7b7.entry.js +0 -4
  328. package/dist/twilight/p-af0f3c54.entry.js +0 -4
  329. package/dist/twilight/p-k6XsozPW.js +0 -5
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as e,H as s,a as l,F as i}from"./p-k6XsozPW.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"9d21c3d891b277c9415bd7a965e0b61437c4d166",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"d68a401e56ccc208d042f4b279d56dd52a948764",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"b18a8280acce7e1c4225bf49d28e95efd93c1731",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"8a521bd4e1cbeb1f0b50b4614620992f1e330c84",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"47cf922925f9bd0b9645788f67ef1cb5bfea9b22"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
4
+ import{r as t,h as e,H as s,a as l,F as i}from"./p-BF901xIc.js";const n=class{constructor(e){t(this,e),this.sections=[],this.itemNumber=""}deleteItem(t,e){const s=this.host.closest("form");if(s){const l=s.getAttribute("id");if(l&&"string"==typeof l){const s=l.match(/item-(\d+)/)?.[1];this.itemNumber=s||"";const i=this.host.querySelector(`#accordion-${e.id}`);salla.cart.deleteItem(`${this.itemNumber}?product_id=${e.id}&section_id=${t}`).then((()=>i?.remove()))}}}renderRemoveButton(t,s,l=!1){return e("salla-button",{type:"button",shape:l?"btn":"icon",fill:l?"outline":"solid",size:"small",color:"danger","aria-label":"Remove from the cart",onClick:()=>this.deleteItem(t,s)},l?salla.lang.get("common.elements.delete"):e("i",{class:"sicon-cancel"}))}renderAccordionHeader(t,s){const l=s?.options&&s?.options?.length>0;return e("div",{slot:"html",class:"s-multiple-bundle-product-cart-header-wrapper"},e("div",{class:"s-multiple-bundle-product-cart-header "+(l?"":"s-multiple-bundle-product-cart-header-no-options")},e("div",{class:"s-multiple-bundle-product-cart-header-content"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-image-wrapper"},e("img",{src:s?.image?.url,alt:s?.image?.alt||s?.name,class:"s-multiple-bundle-product-cart-header-image"})),e("div",{class:"s-multiple-bundle-product-cart-header-content-details"},e("h2",{class:"s-multiple-bundle-product-cart-header-content-details-title"},e("a",{href:s?.url,class:"s-multiple-bundle-product-cart-header-content-details-title-link"},s?.name)),e("div",{class:"s-multiple-bundle-product-cart-header-content-details-price"},e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-regular"},e("span",{innerHTML:s?.price?salla.money(s?.price):""})),s?.sale_price>0&&e("span",{class:"s-multiple-bundle-product-cart-header-content-details-price-sale"},e("span",{innerHTML:salla.money(s?.sale_price)}))),s?.quantity_in_group>0&&0!==s?.quantity&&e("p",{class:"s-multiple-bundle-product-cart-header-content-details-quantity"},e("span",null,salla.lang.get("pages.products.number_of_pieces")),e("span",null,s?.quantity_in_group)))),!l&&e("div",{class:"s-multiple-bundle-product-cart-header-remove-button"},this.renderRemoveButton(t,s,!1))))}render(){return e(s,{key:"9d21c3d891b277c9415bd7a965e0b61437c4d166",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"d68a401e56ccc208d042f4b279d56dd52a948764",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>t.products.map((l=>{const i={sectionId:t.id,sectionIndex:s,productId:l.id};return e("salla-accordion",{key:l.id,collapsed:!1,bordered:!0,collapsible:!!(l.options&&l.options.length>0),size:"sm",id:`accordion-${l.id}`},e("salla-accordion-head",null,this.renderAccordionHeader(String(t.id),l)),l.options&&l.options.length>0&&e("salla-accordion-body",null,e("salla-product-options",{options:JSON.stringify(l.options),key:`${l.id}-persistent`,"product-id":l.id,"bundle-context":JSON.stringify(i)}),e("div",{class:"s-multiple-bundle-product-cart-body-remove-button"},this.renderRemoveButton(String(t.id),l,!0))))}))))))}get host(){return l(this)}};n.style="";const c=class{constructor(e){t(this,e),this.sections=[],this.selectedProducts={},this.productSelectedHandler=null,this.onSelectProduct=(t,e)=>{const s=e.id,l=this.selectedProducts[t]?.has(s)??!1,i=this.sections.find((e=>e.id==t));if(!(l&&i&&this.isProductSelectionLocked(i))){if(!l){if(!i)return;if(1!==this.getEffectiveMax(i)&&this.isAtSelectionLimit(i))return}this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])},l?(this.selectedProducts[t].delete(s),this.clearProductFormData(s,t),this.clearProductModalOptions(s,t)):1===this.getEffectiveMax(i)?this.syncSectionSelection(t,s):this.selectedProducts[t].add(s),this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options,wasSelected:l,isSelected:!l})}},this.ensureProductSelected=(t,e)=>{this.selectedProducts={...this.selectedProducts,[t]:new Set(this.selectedProducts[t]||[])};const s=e.id;if(this.selectedProducts[t].has(s))return;const l=this.sections.find((e=>e.id==t));if(!l)return;const i=this.getEffectiveMax(l);if(1===i)this.syncSectionSelection(t,s);else{if(i>1&&this.isAtSelectionLimit(l))return;this.selectedProducts[t].add(s)}this.selectedProducts={...this.selectedProducts},salla.event.dispatch("on-bundle-product-selected",{id:e.id,name:e.name,options:e.options})},this.onSelectProductOptions=(t,e)=>{const s=this.sections.find((t=>t.id==e));if(!s||!this.canSelectProductInSection(s,t.id))return;const l=this.sections.findIndex((t=>t.id==e)),i=s.products?.findIndex((e=>e.id==t.id))??0,n=this.selectedProducts[e]?.has(t.id)??!1;salla.event.dispatch("multiple-bundle-product-modal::open",{product:t,sectionId:e,sectionIndex:l,productIndex:i,isProductAlreadySelected:n})},this.handleBundleSliderProductSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProduct(s,e)},this.handleBundleSliderProductOptionsSelected=t=>{const{product:e,sectionId:s}=t.detail;this.onSelectProductOptions(e,s)}}isSingleProductSection(t){return 1===(t.products?.length??0)}getObligatoryMin(t){const e=t.obligatory_products;if(null==e)return 0;const s=Number(e);return Number.isNaN(s)?0:s}isProductSelectionLocked(t){return this.isSingleProductSection(t)&&1===this.getObligatoryMin(t)}getEffectiveMax(t){const e=t.products?.length??0,s=t.max_obligatory_products;return null!=s&&s>0?Math.min(s,e):e}getSelectedCount(t){return this.selectedProducts[t]?.size??0}isAtSelectionLimit(t){return this.getSelectedCount(t.id)>=this.getEffectiveMax(t)}canSelectProductInSection(t,e){return!!this.selectedProducts[t.id]?.has(e)||1===this.getEffectiveMax(t)||!this.isAtSelectionLimit(t)}async canSelectBundleProduct(t,e){const s=this.sections.find((e=>e.id==t));return!!s&&this.canSelectProductInSection(s,e)}queryProductCheckbox(t,e){const s=`input.s-multiple-bundle-product-checkbox[name="bundle[${t}][${e}][id]"]`,l=this.host.closest("form"),i=l?.querySelector(s);if(i)return i;for(const t of this.host.querySelectorAll("salla-multiple-bundle-product-slider")){const e=(t.shadowRoot??t).querySelector(s);if(e)return e}return null}dispatchBubblingChange(t){requestAnimationFrame((()=>{t.dispatchEvent(new window.Event("change",{bubbles:!0}))}))}clearSectionProductSlot(t,e,s){const l=this.queryProductCheckbox(t,s);l&&(l.checked=!1);const i=this.host.closest("form");if(i){const e=`bundle[${t}][${s}]`;Array.from(i.querySelectorAll("input")).forEach((t=>{t.name?.startsWith(e)&&("checkbox"===t.type&&t.name?.endsWith("][id]")?t.checked=!1:t.remove())}))}this.clearProductModalOptions(e,t)}syncSectionSelection(t,e){const s=this.sections.find((e=>e.id==t));s?.products?.forEach(((s,l)=>{s.id!=e&&this.clearSectionProductSlot(t,s.id,l)})),this.selectedProducts[t]=new Set([e]);const l=s?.products?.findIndex((t=>t.id==e))??-1,i=l>=0?this.queryProductCheckbox(t,l):null;i&&(i.checked=!0,this.dispatchBubblingChange(i))}autoSelectSingleProductSections(){if(!this.sections?.length)return;const t={...this.selectedProducts};let e=!1;const s=[];for(const l of this.sections){if(!this.isProductSelectionLocked(l))continue;const i=l.products?.[0];if(!i||!i.unlimited_quantity&&(i.quantity??0)<=0)continue;const n=l.id,c=new Set(t[n]||[]);c.has(i.id)||(c.add(i.id),t[n]=c,e=!0,s.push({product:i}))}e&&(this.selectedProducts=t,s.forEach((({product:t})=>{salla.event.dispatch("on-bundle-product-selected",{id:t.id,name:t.name,options:t.options})})))}clearProductFormData(t,e){if(null!=e){const s=this.sections.find((t=>t.id==e)),l=s?.products?.findIndex((e=>e.id==t))??-1;if(l>=0)return void this.clearSectionProductSlot(e,t,l)}const s=this.host.closest("form");s&&s.querySelectorAll(`[data-product-id="${t}"]`).forEach((t=>t.remove()))}clearProductModalOptions(t,e){let s=null,l=null;if(null!=e&&(s=this.sections.findIndex((t=>t.id==e)),s>-1)){const e=this.sections[s];if(e){const s=e.products?.findIndex((e=>e.id==t));l="number"==typeof s&&s>-1?s:null}}salla.event.dispatch("multiple-bundle-product-modal::clear-options",{productId:t,sectionId:e,sectionIndex:s,productIndex:l})}getProgressStatus(t){const e=this.getSelectedCount(t.id),s=this.getEffectiveMax(t);return s>0?`${e}/${s}`:"0"}getSectionSelectionNote(t){const e=this.getObligatoryMin(t),s=Number(t.max_obligatory_products)||0,l=e>0,i=s>0;return l||i?l&&i?e===s?salla.lang.getWithDefault("pages.products.bundle_select_exact",`اختر ${e} منتجات`,{count:e}):salla.lang.getWithDefault("pages.products.bundle_select_range",`اختر من ${e} إلى ${s} منتجات`,{min:e,max:s}):l?salla.lang.getWithDefault("pages.products.bundle_select_min",`اختر على الأقل ${e} منتجات`,{min:e}):salla.lang.getWithDefault("pages.products.bundle_select_max",`اختر حتى ${s} منتجات`,{max:s}):null}handleSectionsChange(){this.autoSelectSingleProductSections()}componentWillLoad(){this.autoSelectSingleProductSections()}renderAccordionHeader(t){const s=this.getSectionSelectionNote(t);return e(i,null,e("h2",{slot:"title"},t?.name),s?e("span",{slot:"note"},s):null,e("span",{slot:"progress"},this.getProgressStatus(t)))}componentDidLoad(){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&(this.productSelectedHandler=t=>{const{productId:e,sectionId:s,product:l,fromModal:i}=t.detail;i?this.ensureProductSelected(s,l||{id:e}):this.onSelectProduct(s,l||{id:e})},t.addEventListener("productSelected",this.productSelectedHandler))}disconnectedCallback(){if(this.productSelectedHandler){const t=this.host.querySelector("salla-multiple-bundle-product-options-modal");t&&t.removeEventListener("productSelected",this.productSelectedHandler),this.productSelectedHandler=null}}render(){return e(s,{key:"b18a8280acce7e1c4225bf49d28e95efd93c1731",class:"s-multiple-bundle-product-wrapper"},e("div",{key:"8a521bd4e1cbeb1f0b50b4614620992f1e330c84",class:"s-multiple-bundle-product-wrapper-sections"},this.sections.map(((t,s)=>e("salla-accordion",{key:t.id,collapsed:0!==s},e("salla-accordion-head",null,this.renderAccordionHeader(t)),e("salla-accordion-body",null,e("salla-multiple-bundle-product-slider",{section:t,sectionIndex:s,selectedProducts:this.selectedProducts,selectionLimit:this.getEffectiveMax(t),isSelectionLocked:this.isProductSelectionLocked(t),onProductSelected:this.handleBundleSliderProductSelected,onProductOptionsSelected:this.handleBundleSliderProductOptionsSelected})))))),e("salla-multiple-bundle-product-options-modal",{key:"47cf922925f9bd0b9645788f67ef1cb5bfea9b22"}))}get host(){return l(this)}static get watchers(){return{sections:["handleSectionsChange"]}}};c.style="";export{n as salla_multiple_bundle_product_cart,c as salla_multiple_bundle_product_details}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as s}from"./p-k6XsozPW.js";import{G as l}from"./p-OF8QcbMM.js";const a=class{constructor(s){e(this,s),this.minAge=10,this.isEditable=!0,this.disableAction=!1,this.isLoading=!0,this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"}),salla.lang.onLoaded((()=>{this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}))}phoneNumberFieldEventHandler(e){e.detail.number?(this.userData.phone.number=Number.parseInt(e.detail.number),this.userData.phone.country=e.detail.country_code,this.disableAction=!1):this.disableAction=!0}handleFieldChange(e,s,l=!1){s.target.value?(this.userData[e]=s.target.value,this.disableAction=!1):l&&(this.disableAction=!0)}handleEmailInput(e,s){const l=document.getElementById("email-error"),a=s.target.value;if(!a)return this.disableAction=!0,void(l.textContent=this.email_required_trans);/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(a)||(this.disableAction=!0,l.textContent=this.invalid_email_trans),l.textContent="",this.userData[e]=a,this.disableAction=!1}submitForm(e){e.preventDefault(),this.disableAction=!0;const s=Object.assign({},this.userData);s.phone=void 0,s.phone=this.userData.phone.number,s.country_code=this.userData.phone.country,salla.api.profile.update(s).finally((()=>{this.disableAction=!1}))}getBirthDateRestriction(){const e=new Date,s=e.getFullYear()-this.minAge;return e.setFullYear(s),e}fetchData(){return salla.api.profile.info().then((e=>{this.userData=e.data})).finally((()=>{this.isLoading=!1,this.isEditable=!Salla.config.get("store.features").includes("sso-login")}))}renderLoadingSection(){return s("div",{class:"s-user-profile-skeleton-wrapper"},Array.from({length:6},((e,l)=>s("salla-skeleton",{class:"skeleton-item",width:"100%",height:"50px",key:l}))))}componentWillLoad(){Salla.onReady().then((()=>this.fetchData()))}render(){return this.isLoading?this.renderLoadingSection():s("form",{onSubmit:e=>this.submitForm(e)},s("div",{class:"s-user-profile-wrapper"},s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"first-name",class:"s-user-profile-field-label"},this.first_name_trans),s("input",{disabled:!this.isEditable,type:"text",name:"first_name",value:this.userData.first_name,id:"first-name",required:!0,autocomplete:"first_name",class:"form-input",onChange:e=>this.handleFieldChange("first_name",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"last-name",class:"s-user-profile-field-label"},this.last_name_trans),s("input",{disabled:!this.isEditable,type:"text",name:"last_name",value:this.userData.last_name,id:"last-name",required:!0,autocomplete:"last_name",class:"form-input",onChange:e=>this.handleFieldChange("last_name",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"birthday",class:"s-user-profile-field-label"},this.birthday_trans),s("salla-datetime-picker",{disabled:!this.isEditable,dateFormat:"Y-m-d",value:this.userData.birthday,placeholder:this.birthday_placeholder_trans,required:!0,maxDate:this.getBirthDateRestriction(),name:"birthday",onPicked:e=>this.handleFieldChange("birthday",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"gender",class:"s-user-profile-field-label"},this.gender_trans),s("select",{disabled:!this.isEditable,class:"form-input",name:"gender",required:!0,onChange:e=>this.handleFieldChange("gender",e)},s("option",{value:""},this.gender_placeholder_trans),s("option",{value:l.Male,selected:this.userData.gender===l.Male},this.male_trans),s("option",{value:l.Female,selected:this.userData.gender===l.Female},this.female_trans))),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"email",class:"s-user-profile-field-label"},this.email_trans),s("input",{disabled:!this.isEditable,type:"email",name:"email",value:this.userData.email,id:"email",class:"form-input",required:!0,onInput:e=>this.handleEmailInput("email",e)}),s("p",{id:"email-error",class:"s-user-profile-field-error"})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"international-mobile",class:"s-user-profile-field-label"},this.mobile_trans),s("salla-tel-input",{disabled:!this.isEditable,name:"international-mobile","country-code":this.userData.phone.country,phone:`${this.userData.phone.number}`,onPhoneEntered:e=>this.phoneNumberFieldEventHandler(e)}))),s("salla-button",{type:"submit",loading:this.disableAction,disabled:this.disableAction||!this.isEditable,"loader-position":"end",class:"s-user-profile-submit"},this.save_btn_trans))}};a.style=":host{display:block}";export{a as salla_user_profile}
4
+ import{r as e,h as s}from"./p-BF901xIc.js";import{G as l}from"./p-OF8QcbMM.js";const a=class{constructor(s){e(this,s),this.minAge=10,this.isEditable=!0,this.disableAction=!1,this.isLoading=!0,this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"}),salla.lang.onLoaded((()=>{this.first_name_trans=salla.lang.get("pages.profile.first_name"),this.last_name_trans=salla.lang.get("pages.profile.last_name"),this.birthday_trans=salla.lang.get("pages.profile.birthday"),this.birthday_placeholder_trans=salla.lang.get("pages.profile.birthday_placeholder"),this.gender_trans=salla.lang.get("pages.profile.gender"),this.gender_placeholder_trans=salla.lang.get("pages.profile.gender_placeholder"),this.male_trans=salla.lang.get("pages.profile.male"),this.female_trans=salla.lang.get("pages.profile.female"),this.email_trans=salla.lang.get("common.elements.email"),this.mobile_trans=salla.lang.get("common.elements.mobile"),this.save_btn_trans=salla.lang.get("common.elements.save"),this.drag_and_drop_trans=salla.lang.get("common.uploader.drag_and_drop"),this.browse_trans=salla.lang.get("common.uploader.browse"),this.email_required_trans=salla.lang.get("pages.checkout.email_required"),this.invalid_email_trans=salla.lang.get("pages.error.invalid_value",{attribute:"email"})}))}phoneNumberFieldEventHandler(e){e.detail.number?(this.userData.phone.number=Number.parseInt(e.detail.number),this.userData.phone.country=e.detail.country_code,this.disableAction=!1):this.disableAction=!0}handleFieldChange(e,s,l=!1){s.target.value?(this.userData[e]=s.target.value,this.disableAction=!1):l&&(this.disableAction=!0)}handleEmailInput(e,s){const l=document.getElementById("email-error"),a=s.target.value;if(!a)return this.disableAction=!0,void(l.textContent=this.email_required_trans);/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(a)||(this.disableAction=!0,l.textContent=this.invalid_email_trans),l.textContent="",this.userData[e]=a,this.disableAction=!1}submitForm(e){e.preventDefault(),this.disableAction=!0;const s=Object.assign({},this.userData);s.phone=void 0,s.phone=this.userData.phone.number,s.country_code=this.userData.phone.country,salla.api.profile.update(s).finally((()=>{this.disableAction=!1}))}getBirthDateRestriction(){const e=new Date,s=e.getFullYear()-this.minAge;return e.setFullYear(s),e}fetchData(){return salla.api.profile.info().then((e=>{this.userData=e.data})).finally((()=>{this.isLoading=!1,this.isEditable=!Salla.config.get("store.features").includes("sso-login")}))}renderLoadingSection(){return s("div",{class:"s-user-profile-skeleton-wrapper"},Array.from({length:6},((e,l)=>s("salla-skeleton",{class:"skeleton-item",width:"100%",height:"50px",key:l}))))}componentWillLoad(){Salla.onReady().then((()=>this.fetchData()))}render(){return this.isLoading?this.renderLoadingSection():s("form",{onSubmit:e=>this.submitForm(e)},s("div",{class:"s-user-profile-wrapper"},s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"first-name",class:"s-user-profile-field-label"},this.first_name_trans),s("input",{disabled:!this.isEditable,type:"text",name:"first_name",value:this.userData.first_name,id:"first-name",required:!0,autocomplete:"first_name",class:"form-input",onChange:e=>this.handleFieldChange("first_name",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"last-name",class:"s-user-profile-field-label"},this.last_name_trans),s("input",{disabled:!this.isEditable,type:"text",name:"last_name",value:this.userData.last_name,id:"last-name",required:!0,autocomplete:"last_name",class:"form-input",onChange:e=>this.handleFieldChange("last_name",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"birthday",class:"s-user-profile-field-label"},this.birthday_trans),s("salla-datetime-picker",{disabled:!this.isEditable,dateFormat:"Y-m-d",value:this.userData.birthday,placeholder:this.birthday_placeholder_trans,required:!0,maxDate:this.getBirthDateRestriction(),name:"birthday",onPicked:e=>this.handleFieldChange("birthday",e)})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"gender",class:"s-user-profile-field-label"},this.gender_trans),s("select",{disabled:!this.isEditable,class:"form-input",name:"gender",required:!0,onChange:e=>this.handleFieldChange("gender",e)},s("option",{value:""},this.gender_placeholder_trans),s("option",{value:l.Male,selected:this.userData.gender===l.Male},this.male_trans),s("option",{value:l.Female,selected:this.userData.gender===l.Female},this.female_trans))),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"email",class:"s-user-profile-field-label"},this.email_trans),s("input",{disabled:!this.isEditable,type:"email",name:"email",value:this.userData.email,id:"email",class:"form-input",required:!0,onInput:e=>this.handleEmailInput("email",e)}),s("p",{id:"email-error",class:"s-user-profile-field-error"})),s("div",{class:"s-user-profile-field"},s("label",{htmlFor:"international-mobile",class:"s-user-profile-field-label"},this.mobile_trans),s("salla-tel-input",{disabled:!this.isEditable,name:"international-mobile","country-code":this.userData.phone.country,phone:`${this.userData.phone.number}`,onPhoneEntered:e=>this.phoneNumberFieldEventHandler(e)}))),s("salla-button",{type:"submit",loading:this.disableAction,disabled:this.disableAction||!this.isEditable,"loader-position":"end",class:"s-user-profile-submit"},this.save_btn_trans))}};a.style=":host{display:block}";export{a as salla_user_profile}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as l,H as t}from"./p-k6XsozPW.js";const i=class{constructor(l){s(this,l),this.methods=[],this.shouldRender=!1}async componentDidLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.config.get("store.shipping.support_pickup")&&(this.shouldRender=!0,this.setLabels())}setLabels(){this.methods=[{id:"delivery",title:Salla.lang.getWithDefault("pages.products.promise_delivery_title","متاح للتوصيل"),subtitle:Salla.lang.getWithDefault("pages.products.promise_delivery_subtitle","طلبك يوصلك لباب البيت بسهولة."),iconClass:"sicon-location"},{id:"pickup",title:Salla.lang.getWithDefault("pages.products.promise_pickup_title","متاح للاستلام"),subtitle:Salla.lang.getWithDefault("pages.products.promise_pickup_subtitle","استلام فوري من أقرب فرع."),iconClass:"sicon-store"}]}render(){return this.shouldRender?l(t,{class:"s-fulfillment-methods"},l("div",{class:"s-fulfillment-methods-list"},this.methods.map((s=>l("div",{key:s.id,class:"s-fulfillment-methods-card"},l("div",{class:"s-fulfillment-methods-content"},l("div",{class:"s-fulfillment-methods-icon-wrap"},l("i",{class:`${s.iconClass} s-fulfillment-methods-icon`})),l("div",{class:"s-fulfillment-methods-text"},l("span",{class:"s-fulfillment-methods-title"},s.title),l("span",{class:"s-fulfillment-methods-subtitle"},s.subtitle)))))))):null}};export{i as salla_fulfillment_methods}
4
+ import{r as s,h as l,H as t}from"./p-BF901xIc.js";const i=class{constructor(l){s(this,l),this.methods=[],this.shouldRender=!1}async componentDidLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),Salla.config.get("store.shipping.support_pickup")&&(this.shouldRender=!0,this.setLabels())}setLabels(){this.methods=[{id:"delivery",title:Salla.lang.getWithDefault("pages.products.promise_delivery_title","متاح للتوصيل"),subtitle:Salla.lang.getWithDefault("pages.products.promise_delivery_subtitle","طلبك يوصلك لباب البيت بسهولة."),iconClass:"sicon-location"},{id:"pickup",title:Salla.lang.getWithDefault("pages.products.promise_pickup_title","متاح للاستلام"),subtitle:Salla.lang.getWithDefault("pages.products.promise_pickup_subtitle","استلام فوري من أقرب فرع."),iconClass:"sicon-store"}]}render(){return this.shouldRender?l(t,{class:"s-fulfillment-methods"},l("div",{class:"s-fulfillment-methods-list"},this.methods.map((s=>l("div",{key:s.id,class:"s-fulfillment-methods-card"},l("div",{class:"s-fulfillment-methods-content"},l("div",{class:"s-fulfillment-methods-icon-wrap"},l("i",{class:`${s.iconClass} s-fulfillment-methods-icon`})),l("div",{class:"s-fulfillment-methods-text"},l("span",{class:"s-fulfillment-methods-title"},s.title),l("span",{class:"s-fulfillment-methods-subtitle"},s.subtitle)))))))):null}};export{i as salla_fulfillment_methods}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as a,H as t,a as l}from"./p-k6XsozPW.js";const i=class{constructor(a){s(this,a),this.apps=salla.config.get("store.apps"),this.appSlot=this.host.querySelector('[slot="app"]')?.innerHTML||'<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />',salla.onReady((()=>{this.apps=salla.config.get("store.apps")})),salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(!Array.isArray(s)||s.length)return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":!0,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){this.host.querySelector('[slot="app"]')?.remove()}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_apps_icons}
4
+ import{r as s,h as a,H as t,a as l}from"./p-BF901xIc.js";const i=class{constructor(a){s(this,a),this.apps=salla.config.get("store.apps"),this.appSlot=this.host.querySelector('[slot="app"]')?.innerHTML||'<img alt="{name}" src="{icon}" width="135" height="40" decoding="async" loading="lazy" />',salla.onReady((()=>{this.apps=salla.config.get("store.apps")})),salla.lang.onLoaded((()=>{this.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}getAppsArray(){return Object.entries(this.apps).map((([s,a])=>({name:s,value:a})))}componentWillLoad(){return new Promise((s=>salla.onReady(s)))}render(){const s=this.getAppsArray();if(!Array.isArray(s)||s.length)return a(t,{class:"s-apps-icons"},!this.hideTitle&&a("h3",null,this.appsTitle),a("div",{class:{"s-apps-icons-list":!0,vertical:this.vertical}},s.map(((s,t)=>a("a",{key:t,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:this.appSlot.replace(/\{icon\}/g,salla.url.cdn(`images/${s.name}.png`)).replace(/\{name\}/g,s.name)})))))}componentDidRender(){this.host.querySelector('[slot="app"]')?.remove()}get host(){return l(this)}};i.style=":host{display:block}";export{i as salla_apps_icons}