@salla.sa/twilight-components 2.14.353 → 2.14.354

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 (311) hide show
  1. package/dist/cjs/bell-ring-BfKPinNo.js +13 -0
  2. package/dist/cjs/{interfaces-CX9-6aLf.js → camera-DytepEoK.js} +0 -11
  3. package/dist/cjs/cancel-De6vslRA.js +13 -0
  4. package/dist/cjs/cart-s-x1Fshk.js +13 -0
  5. package/dist/cjs/check-circle2-BDvlT4_n.js +13 -0
  6. package/dist/cjs/{check-CLRvuniI.js → check-x3w3-gpj.js} +2 -2
  7. package/dist/cjs/{filepond-7SxqaoXb.js → filepond-CuKErtOy.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-file-poster-DwIv84hN.js → filepond-plugin-file-poster-d-8BSuST.js} +1 -1
  9. package/dist/cjs/{filepond-plugin-file-validate-size-NUNnIo4Q.js → filepond-plugin-file-validate-size-zgI_JcqY.js} +1 -1
  10. package/dist/cjs/{filepond-plugin-file-validate-type-CXI-hfww.js → filepond-plugin-file-validate-type-Cy8IgG2P.js} +1 -1
  11. package/dist/cjs/{filepond-plugin-image-edit-fBeBGIBb.js → filepond-plugin-image-edit-9ZAUzCvh.js} +1 -1
  12. package/dist/cjs/{filepond-plugin-image-exif-orientation-BmLTdQ6d.js → filepond-plugin-image-exif-orientation-DzNe_tY2.js} +1 -1
  13. package/dist/cjs/{filepond-plugin-image-preview-CssKRM6n.js → filepond-plugin-image-preview-Cfna6xTB.js} +1 -1
  14. package/dist/{esm/gift-C0JNGIpa.js → cjs/gift-CJ-3Yw_x.js} +4 -2
  15. package/dist/cjs/image-BoZ6Hums.js +13 -0
  16. package/dist/cjs/{index-B5soIVRX.js → index-Ce40E8tZ.js} +136 -12
  17. package/dist/cjs/{index-B9TEdQDE.js → index-ff-xJfhj.js} +1 -1
  18. package/dist/cjs/interfaces-CRqrf5RX.js +15 -0
  19. package/dist/cjs/keyboard_arrow_down-DHJ3FFZq.js +13 -0
  20. package/dist/cjs/keyboard_arrow_right-BayM_Il2.js +21 -0
  21. package/dist/cjs/loader.cjs.js +2 -2
  22. package/dist/cjs/minus-CCryh1qf.js +21 -0
  23. package/dist/cjs/salla-accordion-body_3.cjs.entry.js +775 -0
  24. package/dist/cjs/salla-accordion_6.cjs.entry.js +768 -0
  25. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +2389 -0
  26. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-alert_2.cjs.entry.js +194 -0
  28. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-booking-field_7.cjs.entry.js +1565 -0
  31. package/dist/cjs/{salla-cart-item-offers.cjs.entry.js → salla-cart-item-offers_2.cjs.entry.js} +104 -5
  32. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1661 -0
  33. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  35. package/dist/cjs/salla-count-down_2.cjs.entry.js +302 -0
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +4 -3
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +488 -0
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +91 -0
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +34 -0
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +137 -0
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +320 -0
  46. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty.cjs.entry.js +211 -0
  49. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +40 -0
  50. package/dist/cjs/salla-menu.cjs.entry.js +139 -0
  51. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +220 -0
  53. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +598 -0
  54. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +69 -0
  55. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-offer-modal.cjs.entry.js +206 -0
  58. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
  63. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-placeholder.cjs.entry.js +51 -0
  67. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-product-size-guide.cjs.entry.js +66 -0
  69. package/dist/cjs/salla-products-list.cjs.entry.js +762 -0
  70. package/dist/cjs/salla-products-slider.cjs.entry.js +115 -0
  71. package/dist/cjs/salla-progress-bar.cjs.entry.js +73 -0
  72. package/dist/cjs/salla-quick-order.cjs.entry.js +239 -0
  73. package/dist/cjs/salla-rating-modal.cjs.entry.js +453 -0
  74. package/dist/cjs/salla-scopes.cjs.entry.js +180 -0
  75. package/dist/cjs/salla-search.cjs.entry.js +153 -0
  76. package/dist/cjs/salla-skeleton.cjs.entry.js +36 -0
  77. package/dist/cjs/salla-slider.cjs.entry.js +10389 -0
  78. package/dist/cjs/salla-social-share.cjs.entry.js +165 -0
  79. package/dist/cjs/salla-social.cjs.entry.js +3 -3
  80. package/dist/cjs/salla-tab-content_3.cjs.entry.js +157 -0
  81. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-user-menu.cjs.entry.js +275 -0
  85. package/dist/cjs/salla-user-profile.cjs.entry.js +145 -0
  86. package/dist/cjs/salla-user-settings.cjs.entry.js +88 -0
  87. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  89. package/dist/cjs/search-c7Aa7lM9.js +13 -0
  90. package/dist/cjs/{special-discount-OVG_9Kf9.js → special-discount-DC2oXurL.js} +0 -8
  91. package/dist/cjs/star-DGcH7Yso.js +13 -0
  92. package/dist/cjs/star2-R146a27p.js +13 -0
  93. package/dist/cjs/twilight.cjs.js +2 -2
  94. package/dist/cjs/{vanilla-picker-C6fk8_TR.js → vanilla-picker-zQsXQIff.js} +1 -1
  95. package/dist/cjs/{whatsapp2-D7Sbg8Ey.js → whatsapp2-BdMd5Gx1.js} +2 -2
  96. package/dist/collection/collection-manifest.json +55 -1
  97. package/dist/collection/components/salla-product-options/salla-product-options.js +36 -3
  98. package/dist/components/index.js +2 -2
  99. package/dist/components/salla-product-options2.js +19 -2
  100. package/dist/esm/bell-ring-D3mWkc-3.js +11 -0
  101. package/dist/esm/{interfaces-CBT_Nxny.js → camera-C6jIkM-X.js} +1 -12
  102. package/dist/esm/cancel-BsLF_HK7.js +11 -0
  103. package/dist/esm/cart-DY4LZmNP.js +11 -0
  104. package/dist/esm/{check-uTyAzPSy.js → check-BsXh13x8.js} +2 -2
  105. package/dist/esm/check-circle2-BV4kqbdL.js +11 -0
  106. package/dist/esm/{filepond-Cuqyleyy.js → filepond-DEzyRrdH.js} +1 -1
  107. package/dist/esm/{filepond-plugin-file-poster-C6Wara8q.js → filepond-plugin-file-poster-DyLcCcHM.js} +1 -1
  108. package/dist/esm/{filepond-plugin-file-validate-size-D-M3KSxo.js → filepond-plugin-file-validate-size-Cxp5Yzea.js} +1 -1
  109. package/dist/esm/{filepond-plugin-file-validate-type-DzAl1VI8.js → filepond-plugin-file-validate-type-D2qNOQP4.js} +1 -1
  110. package/dist/esm/{filepond-plugin-image-edit-flutfc9I.js → filepond-plugin-image-edit-DndTlA7m.js} +1 -1
  111. package/dist/esm/{filepond-plugin-image-exif-orientation-B2UkG6iE.js → filepond-plugin-image-exif-orientation-CiT1CQoK.js} +1 -1
  112. package/dist/esm/{filepond-plugin-image-preview-B4u8N2nE.js → filepond-plugin-image-preview-DBG7keFZ.js} +1 -1
  113. package/dist/{cjs/gift-BPDUPIY_.js → esm/gift-BChI23pG.js} +2 -4
  114. package/dist/esm/image-C-tzSDxw.js +11 -0
  115. package/dist/esm/{index-6mr785rH.js → index-B74h9G6a.js} +137 -13
  116. package/dist/esm/{index-xWIb6INF.js → index-BLw7mdtM.js} +1 -1
  117. package/dist/esm/interfaces-OF8QcbMM.js +15 -0
  118. package/dist/esm/keyboard_arrow_down-DCZbpt2a.js +11 -0
  119. package/dist/esm/keyboard_arrow_right-Vqpj4CWE.js +18 -0
  120. package/dist/esm/loader.js +3 -3
  121. package/dist/esm/minus-DfeagqF1.js +18 -0
  122. package/dist/esm/salla-accordion-body_3.entry.js +771 -0
  123. package/dist/esm/salla-accordion_6.entry.js +761 -0
  124. package/dist/esm/salla-add-product-button_4.entry.js +2384 -0
  125. package/dist/esm/salla-advertisement.entry.js +1 -1
  126. package/dist/esm/salla-alert_2.entry.js +191 -0
  127. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  128. package/dist/esm/salla-apps-icons.entry.js +1 -1
  129. package/dist/esm/salla-booking-field_7.entry.js +1539 -0
  130. package/dist/esm/{salla-cart-item-offers.entry.js → salla-cart-item-offers_2.entry.js} +104 -6
  131. package/dist/esm/salla-comment-form_8.entry.js +1652 -0
  132. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  133. package/dist/esm/salla-contacts.entry.js +3 -3
  134. package/dist/esm/salla-count-down_2.entry.js +299 -0
  135. package/dist/esm/salla-custom-fields.entry.js +3 -2
  136. package/dist/esm/salla-filters-widget.entry.js +1 -1
  137. package/dist/esm/salla-filters.entry.js +1 -1
  138. package/dist/esm/salla-gifting.entry.js +486 -0
  139. package/dist/esm/salla-hook.entry.js +1 -1
  140. package/dist/esm/salla-infinite-scroll.entry.js +89 -0
  141. package/dist/esm/salla-installment.entry.js +1 -1
  142. package/dist/esm/salla-list-tile.entry.js +32 -0
  143. package/dist/esm/salla-localization-modal.entry.js +135 -0
  144. package/dist/esm/salla-login-modal.entry.js +318 -0
  145. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  146. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  147. package/dist/esm/salla-loyalty.entry.js +209 -0
  148. package/dist/esm/salla-maintenance-alert.entry.js +38 -0
  149. package/dist/esm/salla-menu.entry.js +137 -0
  150. package/dist/esm/salla-metadata.entry.js +1 -1
  151. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +217 -0
  152. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +595 -0
  153. package/dist/esm/salla-multiple-bundle-product.entry.js +67 -0
  154. package/dist/esm/salla-notification-item.entry.js +1 -1
  155. package/dist/esm/salla-notifications.entry.js +1 -1
  156. package/dist/esm/salla-offer-modal.entry.js +204 -0
  157. package/dist/esm/salla-offer.entry.js +1 -1
  158. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  159. package/dist/esm/salla-order-details-options.entry.js +1 -1
  160. package/dist/esm/salla-order-details.entry.js +1 -1
  161. package/dist/esm/salla-order-summary.entry.js +3 -3
  162. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  163. package/dist/esm/salla-orders.entry.js +1 -1
  164. package/dist/esm/salla-payments.entry.js +1 -1
  165. package/dist/esm/salla-placeholder.entry.js +49 -0
  166. package/dist/esm/salla-price-range.entry.js +1 -1
  167. package/dist/esm/salla-product-size-guide.entry.js +64 -0
  168. package/dist/esm/salla-products-list.entry.js +760 -0
  169. package/dist/esm/salla-products-slider.entry.js +113 -0
  170. package/dist/esm/salla-progress-bar.entry.js +71 -0
  171. package/dist/esm/salla-quick-order.entry.js +237 -0
  172. package/dist/esm/salla-rating-modal.entry.js +451 -0
  173. package/dist/esm/salla-scopes.entry.js +178 -0
  174. package/dist/esm/salla-search.entry.js +151 -0
  175. package/dist/esm/salla-skeleton.entry.js +34 -0
  176. package/dist/esm/salla-slider.entry.js +10387 -0
  177. package/dist/esm/salla-social-share.entry.js +163 -0
  178. package/dist/esm/salla-social.entry.js +2 -2
  179. package/dist/esm/salla-tab-content_3.entry.js +153 -0
  180. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  181. package/dist/esm/salla-tooltip.entry.js +1 -1
  182. package/dist/esm/salla-trust-badges.entry.js +1 -1
  183. package/dist/esm/salla-user-menu.entry.js +273 -0
  184. package/dist/esm/salla-user-profile.entry.js +143 -0
  185. package/dist/esm/salla-user-settings.entry.js +86 -0
  186. package/dist/esm/salla-verify.entry.js +1 -1
  187. package/dist/esm/salla-wallet.entry.js +1 -1
  188. package/dist/esm/search-BscTeWDc.js +11 -0
  189. package/dist/esm/{special-discount-yRO-ZESF.js → special-discount-Ctkfc4K-.js} +1 -8
  190. package/dist/esm/star-ZT7ehBBk.js +11 -0
  191. package/dist/esm/star2-D4oPi1Ov.js +11 -0
  192. package/dist/esm/twilight.js +3 -3
  193. package/dist/esm/{vanilla-picker-B4PKRAhm.js → vanilla-picker-CtwkXTap.js} +1 -1
  194. package/dist/esm/{whatsapp2-DWksgowB.js → whatsapp2-CgR-T_ZS.js} +2 -2
  195. package/dist/twilight/{p-2a26c1d6.entry.js → p-0134b4fd.entry.js} +1 -1
  196. package/dist/twilight/{p-d4aaeef4.entry.js → p-01daaaa6.entry.js} +1 -1
  197. package/dist/twilight/p-07da7390.entry.js +4 -0
  198. package/dist/twilight/{p-81702ecb.entry.js → p-08badc32.entry.js} +1 -1
  199. package/dist/twilight/{p-4bc98557.entry.js → p-0aa5a12a.entry.js} +1 -1
  200. package/dist/twilight/{p-6f576591.entry.js → p-10dcd981.entry.js} +1 -1
  201. package/dist/twilight/{p-5067322a.entry.js → p-212a0710.entry.js} +1 -1
  202. package/dist/twilight/p-229275db.entry.js +4 -0
  203. package/dist/twilight/{p-dde21f4b.entry.js → p-232185ec.entry.js} +1 -1
  204. package/dist/twilight/{p-12e49031.entry.js → p-2a927eac.entry.js} +1 -1
  205. package/dist/twilight/p-2d880232.entry.js +4 -0
  206. package/dist/twilight/p-2de9df64.entry.js +4 -0
  207. package/dist/twilight/p-309a0ba4.entry.js +4 -0
  208. package/dist/twilight/{p-e909d28b.entry.js → p-32732ca7.entry.js} +1 -1
  209. package/dist/twilight/{p-19e07b9e.entry.js → p-32ca34ec.entry.js} +1 -1
  210. package/dist/twilight/{p-9946fa76.entry.js → p-33093880.entry.js} +1 -1
  211. package/dist/twilight/p-3cffa4c9.entry.js +4 -0
  212. package/dist/twilight/p-3d0bb451.entry.js +4 -0
  213. package/dist/twilight/p-3e0d814c.entry.js +4 -0
  214. package/dist/twilight/p-4036d5dc.entry.js +4 -0
  215. package/dist/twilight/p-40fe4b01.entry.js +4 -0
  216. package/dist/twilight/p-47ac0ca5.entry.js +4 -0
  217. package/dist/twilight/{p-5bf05092.entry.js → p-4cd9da44.entry.js} +1 -1
  218. package/dist/twilight/p-5c9281d3.entry.js +4 -0
  219. package/dist/twilight/p-5d044466.entry.js +4 -0
  220. package/dist/twilight/p-5d21334a.entry.js +4 -0
  221. package/dist/twilight/{p-c096e336.entry.js → p-654429df.entry.js} +1 -1
  222. package/dist/twilight/p-6b8453be.entry.js +4 -0
  223. package/dist/twilight/p-6be7bbb0.entry.js +4 -0
  224. package/dist/twilight/{p-4253fc44.entry.js → p-6c8f5c94.entry.js} +1 -1
  225. package/dist/twilight/{p-6f5d02c6.entry.js → p-6fa02770.entry.js} +1 -1
  226. package/dist/twilight/p-7040ea33.entry.js +4 -0
  227. package/dist/twilight/p-8c189d76.entry.js +4 -0
  228. package/dist/twilight/p-8f1f052c.entry.js +4 -0
  229. package/dist/twilight/{p-ac6fc286.entry.js → p-9051a540.entry.js} +1 -1
  230. package/dist/twilight/p-9f1c561f.entry.js +4 -0
  231. package/dist/twilight/{p-B2SkkGH8.js → p-B69XOH6h.js} +1 -1
  232. package/dist/twilight/{p-6mr785rH.js → p-B74h9G6a.js} +2 -2
  233. package/dist/twilight/{p-C0JNGIpa.js → p-BChI23pG.js} +1 -1
  234. package/dist/twilight/{p-C_h1JDCU.js → p-BCxm-ISm.js} +1 -1
  235. package/dist/twilight/{p-Bp_xKTyn.js → p-BPqZ249Z.js} +1 -1
  236. package/dist/twilight/p-BV4kqbdL.js +4 -0
  237. package/dist/twilight/p-BsLF_HK7.js +4 -0
  238. package/dist/twilight/{p-uTyAzPSy.js → p-BsXh13x8.js} +1 -1
  239. package/dist/twilight/p-BscTeWDc.js +4 -0
  240. package/dist/twilight/p-C-tzSDxw.js +4 -0
  241. package/dist/twilight/p-C6jIkM-X.js +4 -0
  242. package/dist/twilight/p-CO-PeZ27.js +4 -0
  243. package/dist/twilight/{p-ChfiVIJv.js → p-CQq81yb5.js} +1 -1
  244. package/dist/twilight/{p-DWksgowB.js → p-CgR-T_ZS.js} +1 -1
  245. package/dist/twilight/p-Ctkfc4K-.js +4 -0
  246. package/dist/twilight/p-D3mWkc-3.js +4 -0
  247. package/dist/twilight/p-D4oPi1Ov.js +4 -0
  248. package/dist/twilight/p-DCZbpt2a.js +4 -0
  249. package/dist/twilight/p-DY4LZmNP.js +4 -0
  250. package/dist/twilight/p-DfeagqF1.js +4 -0
  251. package/dist/twilight/{p-Cuxsz9f-.js → p-DpsbV3x1.js} +1 -1
  252. package/dist/twilight/p-OF8QcbMM.js +4 -0
  253. package/dist/twilight/p-Vqpj4CWE.js +4 -0
  254. package/dist/twilight/p-ZT7ehBBk.js +4 -0
  255. package/dist/twilight/{p-tFBCbVoG.js → p-_-aXm0Wb.js} +1 -1
  256. package/dist/twilight/p-a100bd38.entry.js +4 -0
  257. package/dist/twilight/{p-0c87ef6c.entry.js → p-a2756650.entry.js} +1 -1
  258. package/dist/twilight/{p-8b018d82.entry.js → p-aab45a16.entry.js} +1 -1
  259. package/dist/twilight/p-aae761ff.entry.js +4 -0
  260. package/dist/twilight/p-afd61e47.entry.js +4 -0
  261. package/dist/twilight/p-b1fc6dfc.entry.js +4 -0
  262. package/dist/twilight/p-b206a0a1.entry.js +4 -0
  263. package/dist/twilight/p-b2332516.entry.js +4 -0
  264. package/dist/twilight/{p-18ebec2c.entry.js → p-b588ef46.entry.js} +1 -1
  265. package/dist/twilight/p-b71fc1b5.entry.js +4 -0
  266. package/dist/twilight/{p-zHj-W7EE.js → p-bVqtOl1F.js} +1 -1
  267. package/dist/twilight/{p-300624bb.entry.js → p-bf65b263.entry.js} +1 -1
  268. package/dist/twilight/{p-33ea3141.entry.js → p-c56a47b0.entry.js} +1 -1
  269. package/dist/twilight/p-c73189e3.entry.js +4 -0
  270. package/dist/twilight/p-d1203242.entry.js +4 -0
  271. package/dist/twilight/p-d4edfed4.entry.js +4 -0
  272. package/dist/twilight/{p-6472200c.entry.js → p-d86ce978.entry.js} +1 -1
  273. package/dist/twilight/{p-fa585081.entry.js → p-d9e7973d.entry.js} +1 -1
  274. package/dist/twilight/p-e3e33238.entry.js +4 -0
  275. package/dist/twilight/p-e6bb7362.entry.js +4 -0
  276. package/dist/twilight/{p-28900b2e.entry.js → p-e7813c80.entry.js} +1 -1
  277. package/dist/twilight/p-ec2fd37e.entry.js +4 -0
  278. package/dist/twilight/{p-b60db6c8.entry.js → p-ec77c523.entry.js} +1 -1
  279. package/dist/twilight/{p-8c7b7712.entry.js → p-efc18ce6.entry.js} +1 -1
  280. package/dist/twilight/p-f4039c40.entry.js +4 -0
  281. package/dist/twilight/p-f47b130c.entry.js +4 -0
  282. package/dist/twilight/{p-7e39343d.entry.js → p-f57ca123.entry.js} +1 -1
  283. package/dist/twilight/{p-2d209f96.entry.js → p-f5ad6572.entry.js} +1 -1
  284. package/dist/twilight/p-fc65084f.entry.js +4 -0
  285. package/dist/twilight/p-fd81a311.entry.js +4 -0
  286. package/dist/twilight/{p-16b8d78c.entry.js → p-fe983809.entry.js} +1 -1
  287. package/dist/twilight/{p-BijadG7g.js → p-i5J7XGS6.js} +1 -1
  288. package/dist/twilight/{p-DnELO4MH.js → p-shFpk0H3.js} +1 -1
  289. package/dist/twilight/twilight.esm.js +1 -1
  290. package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -1
  291. package/dist/types/components.d.ts +4 -0
  292. package/package.json +5 -5
  293. package/dist/cjs/salla-accordion_62.cjs.entry.js +0 -22470
  294. package/dist/cjs/salla-review-card.cjs.entry.js +0 -183
  295. package/dist/cjs/salla-reviews-page.cjs.entry.js +0 -695
  296. package/dist/cjs/salla-reviews.cjs.entry.js +0 -106
  297. package/dist/esm/salla-accordion_62.entry.js +0 -22389
  298. package/dist/esm/salla-review-card.entry.js +0 -181
  299. package/dist/esm/salla-reviews-page.entry.js +0 -693
  300. package/dist/esm/salla-reviews.entry.js +0 -104
  301. package/dist/twilight/p-67830f2a.entry.js +0 -4
  302. package/dist/twilight/p-751dddd4.entry.js +0 -4
  303. package/dist/twilight/p-9b22a7eb.entry.js +0 -4
  304. package/dist/twilight/p-CBT_Nxny.js +0 -4
  305. package/dist/twilight/p-Dz7o69vX.js +0 -4
  306. package/dist/twilight/p-a515a8cc.entry.js +0 -4
  307. package/dist/twilight/p-c4821f8b.entry.js +0 -4
  308. package/dist/twilight/p-de807340.entry.js +0 -4
  309. package/dist/twilight/p-yRO-ZESF.js +0 -4
  310. package/dist/cjs/{twitter-pOrUNjXi.js → facebook-DbXua6B9.js} +2 -2
  311. package/dist/esm/{twitter-Dz7o69vX.js → facebook-CO-PeZ27.js} +2 -2
@@ -0,0 +1,209 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h } from './index-B74h9G6a.js';
5
+ import { S as Star } from './star2-D4oPi1Ov.js';
6
+ import { C as Cancel } from './cancel-BsLF_HK7.js';
7
+
8
+ var Star3 = `<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">
9
+ <title>star3</title>
10
+ <defs>
11
+ <style>
12
+ .a {
13
+ fill: none !important;
14
+ }
15
+
16
+ .b {
17
+ fill: #ff9e01;
18
+ }
19
+
20
+ .c {
21
+ fill: #fff;
22
+ opacity: 0.1;
23
+ }
24
+
25
+ </style>
26
+ </defs>
27
+ <g transform="translate(-683 -269)">
28
+ <rect class="a" width="80" height="80" transform="translate(683 269)" />
29
+ <g transform="translate(684.539 261.216)">
30
+ <path class="b"
31
+ d="M110.117,37.062,90.024,35.2,82.043,16.665a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l17.351-10.3,17.351,10.3a1.61,1.61,0,0,0,2.393-1.739L95.871,53.192l15.16-13.318A1.61,1.61,0,0,0,110.117,37.062Z"
32
+ transform="translate(-42.104 -4.011)" />
33
+ <g transform="translate(0 10.971)">
34
+ <path class="b"
35
+ d="M93.54,12.016c1.024,1.423,3.915,7.533,5.568,11.094a.559.559,0,0,1-.891.641c-2.853-2.7-7.73-7.377-8.754-8.8a2.512,2.512,0,0,1,4.077-2.935Z"
36
+ transform="translate(-75.621 -10.971)" />
37
+ <path class="b"
38
+ d="M360.909,12.016c-1.024,1.423-3.915,7.533-5.568,11.094a.559.559,0,0,0,.891.641c2.853-2.7,7.73-7.377,8.754-8.8a2.512,2.512,0,0,0-4.077-2.935Z"
39
+ transform="translate(-301.908 -10.971)" />
40
+ <path class="b"
41
+ d="M427.538,284.659c-1.667-.543-8.366-1.441-12.261-1.934a.559.559,0,0,0-.34,1.044c3.436,1.9,9.377,5.123,11.044,5.666a2.512,2.512,0,0,0,1.558-4.776Z"
42
+ transform="translate(-352.351 -241.894)" />
43
+ <path class="b"
44
+ d="M1.734,284.659c1.667-.543,8.366-1.441,12.261-1.934a.559.559,0,0,1,.34,1.044c-3.436,1.9-9.377,5.123-11.044,5.666a2.512,2.512,0,0,1-1.558-4.776Z"
45
+ transform="translate(0 -241.894)" />
46
+ <path class="b"
47
+ d="M239.794,412.414c0-1.753,1.224-8.4,1.963-12.257a.559.559,0,0,1,1.1,0c.739,3.855,1.963,10.5,1.963,12.257a2.512,2.512,0,0,1-5.023,0Z"
48
+ transform="translate(-203.768 -341.301)" />
49
+ </g>
50
+ <path class="c"
51
+ d="M84.945,23.4l-2.9-6.74a1.61,1.61,0,0,0-2.958,0L71.1,35.2,51.011,37.062a1.61,1.61,0,0,0-.914,2.813l15.16,13.318L60.821,72.878a1.61,1.61,0,0,0,2.393,1.739l2.309-1.371A125,125,0,0,1,84.945,23.4Z"
52
+ transform="translate(-42.104 -4.011)" />
53
+ </g>
54
+ </g>
55
+ </svg>
56
+ `;
57
+
58
+ var GiftImg = `<svg xmlns="http://www.w3.org/2000/svg" width="54.079" height="53.191" viewBox="0 0 54.079 53.191"><defs><style>.a{fill:#ee9d0d;}.b{fill:#c7830b;}.c{fill:#ea2b2d;}.d{fill:#cb2527;}.e{fill:#6699ce;}.f{fill:#faa6b2;}.g{fill:#a6deff;}.h{fill:#eeb436;}.i{fill:#f72d2f;}</style></defs><path class="a" d="M40,248H77.3v25.88a2.1,2.1,0,0,1-2.1,2.1H42.1a2.1,2.1,0,0,1-2.1-2.1Z" transform="translate(-38.135 -222.787)"/><path class="b" d="M250.632,248.711v12.755L236.2,248h13.67Z" transform="translate(-211.463 -222.787)"/><path class="b" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="c" d="M226.194,32.048l-.5.185a5.035,5.035,0,0,0-3.072,3.292l-.468,1.585-.759.414a5.035,5.035,0,0,0-2.422,3l8.865,8.271,5.09-5.456.262-6.205a5.191,5.191,0,0,0-7-5.083Z" transform="translate(-196.246 -31.722)"/><path class="c" d="M358.628,175.48l-.15.509a5.034,5.034,0,0,1-3.072,3.292l-1.55.577-.359.785a5.034,5.034,0,0,1-2.822,2.624L341.81,175l5.09-5.455,6.172-.69a5.191,5.191,0,0,1,5.555,6.629Z" transform="translate(-304.761 -152.837)"/><path class="d" d="M168,248h7.461v27.978H168Z" transform="translate(-151.213 -222.787)"/><path class="c" d="M40,336H77.3v7.461H40Z" transform="translate(-38.135 -300.528)"/><path class="d" d="M333.957,336v3.207L330.52,336Z" transform="translate(-294.787 -300.528)"/><path class="a" d="M2.1,0H40.8a2.1,2.1,0,0,1,2.1,2.1V9.326H0V2.1A2.1,2.1,0,0,1,2.1,0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 18.641, 4.976)"/><path class="d" d="M0,0H9.326V9.326H0Z" transform="matrix(0.731, 0.682, -0.682, 0.731, 30.912, 16.424)"/><path class="d" d="M286.857,79.389a.931.931,0,0,1-.74-.365l-.615-.8a12.516,12.516,0,0,1-2.528-9,.933.933,0,0,1,1.855.2,10.66,10.66,0,0,0,2.153,7.667l.615.8a.933.933,0,0,1-.739,1.5Z" transform="translate(-252.718 -64.113)"/><path class="c" d="M185.485,178.151l-.039.014a30.78,30.78,0,0,1-12.034,1.906l-2.381-.1,4.092,3.817-1.181,4,3.728-1.206a30.775,30.775,0,0,0,9.833-5.315l.71-.572Z" transform="translate(-153.891 -161.081)"/><path class="d" d="M363.834,194.779a12.51,12.51,0,0,1-6.93-2.1l-.843-.559a.933.933,0,1,1,1.031-1.554l.842.558a10.659,10.659,0,0,0,7.8,1.618.933.933,0,1,1,.328,1.836A12.663,12.663,0,0,1,363.834,194.779Z" transform="translate(-316.982 -171.914)"/><path class="c" d="M275,202.524l-.012.04a30.776,30.776,0,0,0-1.069,12.137l.265,2.369-4.092-3.817-3.909,1.455.945-3.8a30.776,30.776,0,0,1,4.622-10.177l.521-.748Z" transform="translate(-237.949 -180.364)"/><circle class="e" cx="1.865" cy="1.865" r="1.865" transform="translate(10.259 0.032)"/><circle class="f" cx="1.865" cy="1.865" r="1.865" transform="translate(0 21.482)"/><path class="g" d="M36.663,36.663a.933.933,0,0,1-.885-.638l-.048-.143a2.946,2.946,0,0,0-2.8-2.017.933.933,0,1,1,0-1.865A4.808,4.808,0,0,1,37.5,35.292l.048.143a.933.933,0,0,1-.885,1.228Z" transform="translate(-31.067 -31.968)"/><path class="g" d="M79.493,194.438a.929.929,0,0,1-.506-.15l-.185-.12a2.074,2.074,0,0,0-2.192-.047.933.933,0,0,1-.947-1.607,3.929,3.929,0,0,1,4.153.088l.185.12a.933.933,0,0,1-.508,1.716Z" transform="translate(-69.235 -173.283)"/><path class="h" d="M27.751,85.141l2.88,2.644,3.811-.874-1.624,3.556,2.008,3.354-3.884-.446-2.569,2.946L27.6,92.49,24,90.957l3.4-1.922Z" transform="translate(-24 -78.914)"/><path class="h" d="M82.174,227.375l-.959,3.772,2.564,2.928-3.884.254L77.9,237.673l-1.442-3.615-3.8-.862,2.993-2.488-.353-3.876,3.291,2.078Z" transform="translate(-66.992 -204.086)"/><path class="i" d="M300.471,141.9l-5.455-5.09,5.09-5.456a8.342,8.342,0,0,1,5.455,5.09Z" transform="translate(-263.422 -119.737)"/></svg>`;
59
+
60
+ const sallaLoyaltyCss = "";
61
+
62
+ const SallaLoyalty = class {
63
+ constructor(hostRef) {
64
+ registerInstance(this, hostRef);
65
+ this.selectedItem = undefined;
66
+ /**
67
+ * Does the merchant allow to login using email
68
+ */
69
+ this.allowEmail = true;
70
+ /**
71
+ * Does the merchant/current location for visitor allow to login using mobile, By default outside KSA is `false`
72
+ */
73
+ this.allowMobile = true;
74
+ /**
75
+ * Does the merchant require registration with email & mobile
76
+ */
77
+ this.requireEmail = false;
78
+ salla.event.on('loyalty::open', () => this.open());
79
+ salla.auth.event.onLoggedIn(() => {
80
+ this.is_loggedin = true;
81
+ });
82
+ salla.onReady(() => {
83
+ this.is_loggedin = salla.config.isUser();
84
+ });
85
+ salla.lang.onLoaded(() => {
86
+ this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
87
+ this.translationLoaded = true;
88
+ });
89
+ salla.cart.event.onUpdated(cart => {
90
+ this.prizePoints = cart.loyalty.prize?.points;
91
+ this.prizeTitle = cart.loyalty.prize?.title;
92
+ this.customerPoints = cart.loyalty.customer_points || this.customerPoints;
93
+ });
94
+ }
95
+ setSelectedPrizeItem(item) {
96
+ if (!this.selectedItem || this.selectedItem?.id != item.id) {
97
+ this.selectedItem = item;
98
+ }
99
+ else {
100
+ this.selectedItem = undefined;
101
+ }
102
+ }
103
+ handleLongText(text) {
104
+ if (text.length > 150) {
105
+ return text.substring(0, 150) + '...';
106
+ }
107
+ return text;
108
+ }
109
+ prizeItem(item) {
110
+ let klass = {
111
+ 's-loyalty-prize-item-selected': !!this.selectedItem && this.selectedItem?.id == item.id,
112
+ "s-loyalty-prize-item": true
113
+ };
114
+ return h("div", { onClick: () => this.setSelectedPrizeItem(item), class: klass }, h("img", { class: "s-loyalty-prize-item-image", src: item.image, alt: item.name }), h("div", { class: "s-loyalty-prize-item-title" }, item.name), h("div", { class: "s-loyalty-prize-item-subtitle" }, this.handleLongText(item.description)), h("div", { class: "s-loyalty-prize-item-points" }, item.cost_points, " ", salla.lang.get('pages.loyalty_program.point'), h("div", { class: "s-loyalty-prize-item-check" }, h("div", null))));
115
+ }
116
+ getConfirmationModal() {
117
+ return [
118
+ h("salla-placeholder", { alignment: "center", icon: Star3, class: "s-loyalty-confirmation-modal-content" }, h("div", { slot: "title", class: "s-loyalty-confirmation-title" }, salla.lang.get('pages.loyalty_program.exchange_points')), h("div", { slot: "description" }, salla.lang.get('pages.loyalty_program.are_you_sure_to_exchange'), " ( ", h("strong", null, this.selectedItem?.cost_points), " ", salla.lang.get('pages.loyalty_program.point'), " ) ", salla.lang.get('pages.loyalty_program.for'), " ( ", h("strong", null, this.selectedItem?.name), " )")),
119
+ h("div", { class: "s-loyalty-confirmation-actions" }, h("salla-button", { fill: 'outline', width: "wide", onClick: () => this.cancelProcess() }, salla.lang.get('pages.loyalty_program.cancellation')), h("salla-button", { loading: this.buttonLoading, width: "wide", onClick: () => this.exchangeLoyaltyPoint() }, salla.lang.get('pages.loyalty_program.confirm')))
120
+ ];
121
+ }
122
+ getAfterExchangeUI() {
123
+ return h("slot", { name: 'points-applied-widget' }, h("salla-list-tile", { class: "s-loyalty-after-exchange" }, h("div", { slot: "title", class: "s-loyalty-after-exchange-title" }, this.prizeTitle, " \u00A0 - \u00A0 ", this.prizePoints, " ", salla.lang.get('pages.loyalty_program.point')), h("div", { slot: 'action', class: "s-loyalty-after-exchange-action" }, h("salla-button", { class: "s-loyalty-after-exchange-reset", shape: "icon", fill: 'outline', color: "danger", size: "small", onClick: () => this.resetExchange() }, h("span", { innerHTML: Cancel })))));
124
+ }
125
+ /**
126
+ * Show loyalty modal
127
+ */
128
+ async open() {
129
+ if (!this.is_loggedin)
130
+ return salla.event.dispatch('login::open');
131
+ this.modal?.open();
132
+ return await salla.loyalty.getProgram()
133
+ .then(response => {
134
+ this.loyaltyProgram = response.data;
135
+ })
136
+ .catch(e => {
137
+ this.hasError = true;
138
+ this.errorMessage = e.response?.data?.error?.message || e.response?.data;
139
+ })
140
+ .finally(() => this.modal?.stopLoading());
141
+ }
142
+ /**
143
+ *
144
+ * Hide loyalty modal
145
+ */
146
+ async close() {
147
+ return this.modal.close();
148
+ }
149
+ /**
150
+ *
151
+ * Cancel Exchanged prizes
152
+ */
153
+ async resetExchange() {
154
+ return await salla.loyalty.reset();
155
+ }
156
+ /**
157
+ * Open Confirmation modal
158
+ */
159
+ async openConfirmation() {
160
+ return await this.modal.close()
161
+ .then(() => this.confirmationModal?.open())
162
+ .catch(e => console.log(e));
163
+ }
164
+ /**
165
+ * Cancel process
166
+ */
167
+ async cancelProcess() {
168
+ return await this.confirmationModal.close()
169
+ .then(() => this.selectedItem = null)
170
+ .catch(e => console.log(e));
171
+ }
172
+ /**
173
+ * Exchange loyalty points with the selected prize item
174
+ * @param {number} loyalty_prize_id
175
+ *
176
+ */
177
+ async exchangeLoyaltyPoint() {
178
+ this.buttonLoading = true;
179
+ return await salla.loyalty.exchange(this.selectedItem?.id)
180
+ .then(() => this.selectedItem.key == "FREE_PRODUCT" && salla.url.is_page('cart') && window.location.reload())
181
+ .finally(() => {
182
+ this.buttonLoading = false;
183
+ this.cancelProcess();
184
+ });
185
+ }
186
+ render() {
187
+ // A. when the exchange is done, and we have the final prize points to show it in cart page
188
+ if (this.prizePoints) {
189
+ return this.getAfterExchangeUI();
190
+ }
191
+ //todo:: change all translations to states
192
+ return [
193
+ h("slot", { name: 'widget' }, this.customerPoints ?
194
+ h("salla-list-tile", { class: 's-loyalty-widget' }, h("div", { slot: "icon", class: "s-loyalty-widget-icon", innerHTML: Star }), h("div", { slot: "subtitle" }, this.customerPoints ? salla.lang.get('pages.loyalty_program.cart_total_point_summary', { "balance": this.customerPoints }) : this.guestMessage, h("salla-button", { shape: "link", color: "primary", onClick: () => salla.event.dispatch("loyalty::open") }, this.customerPoints ? salla.lang.get('pages.loyalty_program.cart_point_exchange_now') : salla.lang.get('blocks.header.login')))) :
195
+ ''),
196
+ h("salla-modal", { noPadding: true, width: "sm", ref: modal => this.confirmationModal = modal }, this.getConfirmationModal()),
197
+ h("salla-modal", { isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("div", { slot: "loading" }, h("div", { class: "s-loyalty-skeleton" }, h("salla-list-tile", { class: "s-loyalty-header" }, h("div", { slot: "icon", class: "s-loyalty-header-icon" }, h("salla-skeleton", { type: "circle", height: '6rem', width: '6rem' })), h("div", { slot: "title", class: "s-loyalty-header-title mb-5" }, h("salla-skeleton", { height: '15px', width: '50%' })), h("div", { slot: "subtitle", class: "s-loyalty-header-subtitle" }, h("salla-skeleton", { height: '10px' }), h("salla-skeleton", { height: '10px', width: '75%' }))), h("div", { class: "s-loyalty-skeleton-cards" }, [...Array(3)].map(() => h("div", { class: "s-loyalty-prize-item swiper-slide" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-loyalty-prize-item-title" }, h("salla-skeleton", { height: '15px', width: '75%' })), h("div", { class: "s-loyalty-prize-item-subtitle" }, h("salla-skeleton", { height: '10px', width: '50%' }), h("salla-skeleton", { height: '10px', width: '25%' })), h("div", { class: "s-loyalty-prize-item-points" }, h("salla-skeleton", { height: '15px', width: '100px' }), h("div", { class: "s-loyalty-prize-item-check" }, h("salla-skeleton", { height: '1rem', width: '1rem', type: 'circle' })))))))), !this.hasError && !!this.loyaltyProgram ?
198
+ [
199
+ h("salla-list-tile", { id: 's-loyalty-header', class: "s-loyalty-header" }, h("div", { slot: "icon", class: "s-loyalty-header-icon", innerHTML: GiftImg }), h("div", { slot: "title", class: "s-loyalty-header-title" }, this.loyaltyProgram.prize_promotion_title), h("div", { slot: "subtitle", class: "s-loyalty-header-subtitle" }, this.loyaltyProgram.prize_promotion_description)),
200
+ h("salla-tabs", null, this.loyaltyProgram.prizes.map((prize) => h("salla-tab-header", { slot: "header", name: prize.title }, h("span", null, prize.title))), this.loyaltyProgram.prizes.map((prize, index) => h("salla-tab-content", { slot: "content", name: prize.title }, h("salla-slider", { class: "s-loyalty-slider", loop: false, "controls-outer": true, id: 'loyalty-popup-slider-' + index, type: "carousel" }, h("div", { slot: 'items' }, prize.items.map((item) => this.prizeItem(item))))))),
201
+ h("salla-button", { disabled: !this.selectedItem, width: "wide", class: "s-loyalty-program-redeem-btn", onClick: () => this.openConfirmation() }, salla.lang.get('pages.loyalty_program.exchange_points')),
202
+ ]
203
+ : h("salla-placeholder", { class: "s-loyalty-placeholder", alignment: "center" }, !!this.errorMessage ? h("span", { slot: "description" }, this.errorMessage) : '')),
204
+ ];
205
+ }
206
+ };
207
+ SallaLoyalty.style = sallaLoyaltyCss;
208
+
209
+ export { SallaLoyalty as salla_loyalty };
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-B74h9G6a.js';
5
+ import { C as Cancel } from './cancel-BsLF_HK7.js';
6
+
7
+ const sallaMaintenanceAlertCss = ".s-maintenance-alert-wrapper{display:flex;min-height:40px;width:100%;flex-direction:row;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgba(26, 38, 61, var(--tw-bg-opacity));padding:0.25rem 0.5rem;--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.s-maintenance-alert-wrapper a{transition:0.35s cubic-bezier(0.2, 1, 0.3, 1)}.s-maintenance-alert-wrapper *{color:inherit}@media (min-width: 640px){.s-maintenance-alert-wrapper{padding-left:2rem;padding-right:2rem}}.s-maintenance-alert-content{margin-top:1rem;margin-bottom:1rem;display:flex;width:100%;align-items:center;justify-content:space-between}@media (min-width: 640px){.s-maintenance-alert-content{padding-left:2rem;padding-right:2rem}}.s-maintenance-alert-container{display:flex;align-items:center}.s-maintenance-alert-icon{margin-right:1.25rem;display:none}@media (min-width: 640px){.s-maintenance-alert-icon{display:block}}.s-maintenance-alert-text h2{margin-bottom:0.5rem;font-size:0.875rem;font-weight:700;line-height:1.4}@media (min-width: 640px){.s-maintenance-alert-text h2{font-size:1.5rem;line-height:2rem}}.s-maintenance-alert-text p{margin:0px;text-align:right;font-size:10px;line-height:1.2}@media (min-width: 640px){.s-maintenance-alert-text p{text-align:center;font-size:0.75rem;line-height:1}}.s-maintenance-alert-btn{position:relative;margin-left:4px;margin-right:4px;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;border-radius:0.125rem;border-width:1px;--tw-border-opacity:1;border-color:rgba(93, 213, 196, var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgba(93, 213, 196, var(--tw-bg-opacity));padding:0.5rem;text-align:center;vertical-align:middle;font-size:0.875rem;font-weight:400;line-height:1.4;--tw-text-opacity:1;color:rgba(255, 255, 255, var(--tw-text-opacity))}.s-maintenance-alert-btn:hover{--tw-bg-opacity:1;background-color:rgba(53, 203, 181, var(--tw-bg-opacity))}.s-maintenance-alert-btn *{pointer-events:none}[dir=rtl] .s-maintenance-alert-btn{margin-left:1.25rem;margin-right:0}@media (min-width: 640px){.s-maintenance-alert-btn{padding:0.5rem 1rem}}";
8
+
9
+ const SallaMaintenanceAlert = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ }
13
+ componentWillLoad() {
14
+ this.title = salla.config.get('maintenance_details.title');
15
+ this.message = salla.config.get('maintenance_details.message');
16
+ // Use matchMedia instead of window.innerWidth to avoid forced reflow (Lighthouse/PageSpeed)
17
+ const isMobile = typeof window !== 'undefined' && !window.matchMedia('(min-width: 768px)').matches;
18
+ this.buttonTitle = isMobile ? salla.config.get('maintenance_details.button_title') : salla.config.get('maintenance_details.button_full_title');
19
+ }
20
+ closeAlert() {
21
+ salla.storage.set('hide_salla-maintenance-alert_at', Date.now());
22
+ this.host.style.display = 'none';
23
+ }
24
+ render() {
25
+ return (h(Host, { key: '109e687d7d6ba48ddf89cd3631f5a852d50688fd', class: "s-maintenance-alert-wrapper" }, h("button", { key: 'd70e7e53acc699336e1611589ca3bdfc704504c2', class: "s-maintenance-alert-close", innerHTML: Cancel, onClick: () => this.closeAlert() }), h("div", { key: 'b816c1a9635828c206c792d68203ccfbe8e8235b', class: "s-maintenance-alert-content" }, h("div", { key: '61e91088a5613d943b6f662f5ed44093ecf99237', class: "s-maintenance-alert-container" }, h("div", { key: '1ca223334f52bc5097677dd23433107080567894', class: "s-maintenance-alert-icon" }, h("img", { key: '22e07c7a104267cda2bed74929307d039018698d', src: salla.url.cdn('images/alert.png'), alt: "Alert" })), h("div", { key: '64d37700bc1454f5afadb55b49512bbd5b412d9c', class: "s-maintenance-alert-text" }, h("h2", { key: '7651dcd09a0ba07f14ed744758598015d4b45ecd' }, this.title), h("p", { key: '1f8d057af072466f34d0f3a13396de5144bc967f' }, this.message))), h("div", { key: '34f8471b855011b499c2038b1ac9dd24cc5e2e8b' }, h("a", { key: 'd9c4f4a9fb80ab90c13dc1dde69adcb7c4cd7e9f', class: "s-maintenance-alert-btn", href: salla.config.get('maintenance_details.button_url') }, this.buttonTitle)))));
26
+ }
27
+ componentDidLoad() {
28
+ //auto-hide the alert if close button is clicked before one hour
29
+ let hidden_at = salla.storage.get('hide_salla-maintenance-alert_at');
30
+ if (hidden_at && ((Date.now() - hidden_at) / 1000 / 60) < 60) {
31
+ this.closeAlert();
32
+ }
33
+ }
34
+ get host() { return getElement(this); }
35
+ };
36
+ SallaMaintenanceAlert.style = sallaMaintenanceAlertCss;
37
+
38
+ export { SallaMaintenanceAlert as salla_maintenance_alert };
@@ -0,0 +1,137 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, F as Fragment } from './index-B74h9G6a.js';
5
+
6
+ const sallaMenuCss = ":host{display:block}";
7
+
8
+ const SallaMenu = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ /**
12
+ * The source of the menu, specifying whether it is a header or footer menu.
13
+ */
14
+ this.source = "header";
15
+ /**
16
+ * Boolean indicating whether to use React Link elements for menu links.
17
+ */
18
+ this.useReactLink = false;
19
+ this.menus = [];
20
+ }
21
+ async componentWillLoad() {
22
+ return salla.onReady(() => {
23
+ this.displayAllText = salla.lang.get('blocks.home.display_all');
24
+ if (this.sourceValue && this.source === 'json') {
25
+ this.menus = typeof this.sourceValue === 'string' ? JSON.parse(this.sourceValue) : this.sourceValue || [];
26
+ }
27
+ else {
28
+ return this.getMenuItems();
29
+ }
30
+ });
31
+ }
32
+ getMenuItems() {
33
+ /**
34
+ * Avoid saving the menu to localStorage (default) when in the development environment
35
+ * or when modifying the theme in the dashboard
36
+ */
37
+ // const isPreview = salla.config.isDebug() || salla.helpers.isPreview()
38
+ // const cacheKey = `${this.source}_menus_${salla.lang.locale}`
39
+ // const cachedMenus = salla.storage.getWithTTL(cacheKey, [])
40
+ // if (cachedMenus.length > 0 && !isPreview) {
41
+ // this.menus = cachedMenus
42
+ // return;
43
+ // }
44
+ return salla.api.component.getMenus(this.source).then(({ data }) => {
45
+ this.menus = data;
46
+ // !isPreview && salla.storage.setWithTTL(cacheKey, this.menus)
47
+ }).catch((error) => {
48
+ salla.logger.error('salla-menu::Error fetching menus', error);
49
+ });
50
+ }
51
+ hasChildren(menu) {
52
+ return menu?.children?.length > 0;
53
+ }
54
+ hasProducts(menu) {
55
+ return menu?.products?.length > 0;
56
+ }
57
+ /**
58
+ * Get the classes for desktop menu
59
+ * @param {Object} menu
60
+ * @param {Boolean} isRootMenu
61
+ * @returns {String}
62
+ */
63
+ getDesktopClasses(menu, isRootMenu) {
64
+ return `!hidden lg:!block ${isRootMenu ? 'root-level lg:!inline-block' : 'relative'} ${menu.products ? ' mega-menu' : ''}
65
+ ${this.hasChildren(menu) ? 'has-children' : ''}`;
66
+ }
67
+ getAttributes(attrs) {
68
+ return attrs.trim().split(' ').reduce((result, attr) => {
69
+ let [key, value] = attr.split('=');
70
+ result[key] = value.replace(/"/g, '');
71
+ return result;
72
+ }, {});
73
+ }
74
+ /**
75
+ * Get the mobile menu
76
+ * @param {Object} menu
77
+ * @param {String} displayAllText
78
+ * @returns {String}
79
+ */
80
+ getMobileMenu(menu, displayAllText) {
81
+ const menuImage = menu.image ? h("img", { src: menu.image, class: "rounded-full", width: "48", height: "48", alt: menu.title }) : null;
82
+ return (h("li", { class: "lg:hidden text-sm font-bold", ...this.getAttributes(menu.attrs) }, !this.hasChildren(menu) ?
83
+ h("a", { href: menu.url, "aria-label": menu.title || 'category', class: `text-gray-500 ${menu.image ? '!py-3' : ''}`, ...this.getAttributes(menu.link_attrs) }, menuImage, h("span", null, menu.title || ''))
84
+ :
85
+ h(Fragment, null, h("span", { class: menu.image ? '!py-3' : '' }, menuImage, menu.title), h("ul", null, h("li", { class: "text-sm font-bold" }, h("a", { href: menu.url, class: "text-gray-500" }, displayAllText)), menu.children.map((subMenu) => this.getMobileMenu(subMenu, displayAllText))))));
86
+ }
87
+ /**
88
+ * Get the desktop menu
89
+ * @param {Object} menu
90
+ * @param {Boolean} isRootMenu
91
+ * @returns {String}
92
+ */
93
+ getDesktopMenu(menu, isRootMenu) {
94
+ return h("li", { class: this.getDesktopClasses(menu, isRootMenu), ...this.getAttributes(menu.attrs) }, h("a", { href: menu.url, "aria-label": menu.title || 'category', ...this.getAttributes(menu.link_attrs) }, h("span", null, menu.title)), this.hasChildren(menu) ?
95
+ h("div", { class: `sub-menu shadow-default ${this.hasProducts(menu) ? 'w-full left-0 flex' : 'w-56'}` }, h("ul", { class: this.hasProducts(menu) ? 'w-56 shrink-0 m-8 rtl:ml-0 ltr:mr-0' : '' }, menu.children.map((subMenu) => this.getDesktopMenu(subMenu, false))), this.hasProducts(menu) ?
96
+ h("salla-products-list", { source: "selected", "shadow-on-hover": true, "source-value": `[${menu.products}]` }) : null) : null);
97
+ }
98
+ /**
99
+ * Get the footer menu
100
+ * @param {Array} menus
101
+ */
102
+ getFooterMenu(menus) {
103
+ const Menuitems = (this.topnav || this.limit) ? menus.slice(0, this.limit || 3) : menus;
104
+ return h("div", null, h("div", { class: {
105
+ "s-menu-footer-list": !this.topnav,
106
+ "s-menu-topnav-list": this.topnav
107
+ } }, Menuitems.map((menu) => {
108
+ return h("a", { key: menu.id, href: menu.url, target: menu.target, class: {
109
+ "s-menu-footer-item": !this.topnav,
110
+ "s-menu-topnav-item topnav-link-item right-side": this.topnav
111
+ } }, menu.title);
112
+ })));
113
+ }
114
+ /**
115
+ * Get the menus
116
+ * @param {Array} menus
117
+ * @returns {String}
118
+ */
119
+ getHeaderMenu(menus) {
120
+ return menus.map((menu) => [
121
+ this.getMobileMenu(menu, this.displayAllText),
122
+ this.getDesktopMenu(menu, true)
123
+ ]);
124
+ }
125
+ render() {
126
+ return this.source === "footer" ?
127
+ this.getFooterMenu(this.menus)
128
+ :
129
+ [
130
+ h("nav", { key: "main-nav", id: "mobile-menu", class: "mobile-menu" }, h("ul", { class: "main-menu" }, this.getHeaderMenu(this.menus)), h("button", { class: "btn--close close-mobile-menu sicon-cancel lg:hidden" })),
131
+ h("button", { key: "close-btn", class: "btn--close-sm close-mobile-menu sicon-cancel hidden" })
132
+ ];
133
+ }
134
+ };
135
+ SallaMenu.style = sallaMenuCss;
136
+
137
+ export { SallaMenu as salla_menu };
@@ -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-6mr785rH.js';
4
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-B74h9G6a.js';
5
5
 
6
6
  const sallaMetadataCss = "";
7
7
 
@@ -0,0 +1,217 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, a as getElement, F as Fragment } from './index-B74h9G6a.js';
5
+
6
+ const sallaMultipleBundleProductCartCss = "";
7
+
8
+ const SallaMultipleBundleProductCart = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.sections = [];
12
+ this.itemNumber = '';
13
+ }
14
+ deleteItem(sectionId, product) {
15
+ const form = this.host.closest('form');
16
+ if (form) {
17
+ const formId = form.getAttribute('id');
18
+ if (formId && typeof formId === 'string') {
19
+ const itemNumber = formId.match(/item-(\d+)/)?.[1];
20
+ this.itemNumber = itemNumber || '';
21
+ const selectedAccordion = this.host.querySelector(`#accordion-${product.id}`);
22
+ salla.cart
23
+ .deleteItem(`${this.itemNumber}?product_id=${product.id}&section_id=${sectionId}`)
24
+ .then(() => selectedAccordion?.remove());
25
+ }
26
+ }
27
+ }
28
+ renderRemoveButton(sectionId, product, isText = false) {
29
+ return (h("salla-button", { type: "button", shape: isText ? 'btn' : 'icon', fill: isText ? 'outline' : 'solid', size: "small", color: "danger", "aria-label": "Remove from the cart", onClick: () => this.deleteItem(sectionId, product) }, isText ? salla.lang.get('common.elements.delete') : h("i", { class: "sicon-cancel" })));
30
+ }
31
+ renderAccordionHeader(sectionId, product) {
32
+ const hasOptions = product?.options && product?.options?.length > 0; // undefined or empty array
33
+ return (h("div", { slot: "html", class: "s-multiple-bundle-product-cart-header-wrapper" }, h("div", { class: `s-multiple-bundle-product-cart-header ${hasOptions ? '' : 's-multiple-bundle-product-cart-header-no-options'}` }, h("div", { class: "s-multiple-bundle-product-cart-header-content" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-image-wrapper" }, h("img", { src: product?.image?.url, alt: product?.image?.alt || product?.name, class: "s-multiple-bundle-product-cart-header-image" })), h("div", { class: "s-multiple-bundle-product-cart-header-content-details" }, h("h2", { class: "s-multiple-bundle-product-cart-header-content-details-title" }, h("a", { href: product?.url, class: "s-multiple-bundle-product-cart-header-content-details-title-link" }, product?.name)), h("div", { class: "s-multiple-bundle-product-cart-header-content-details-price" }, h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-regular" }, h("span", { innerHTML: product?.price ? salla.money(product?.price) : '' })), product?.sale_price > 0 && (h("span", { class: "s-multiple-bundle-product-cart-header-content-details-price-sale" }, h("span", { innerHTML: salla.money(product?.sale_price) })))), product?.quantity_in_group > 0 && product?.quantity !== 0 && (h("p", { class: "s-multiple-bundle-product-cart-header-content-details-quantity" }, h("span", null, salla.lang.get('pages.products.number_of_pieces')), h("span", null, product?.quantity_in_group))))), !hasOptions && (h("div", { class: "s-multiple-bundle-product-cart-header-remove-button" }, this.renderRemoveButton(sectionId, product, false))))));
34
+ }
35
+ render() {
36
+ return (h(Host, { key: '34b9ae8c08eccee16d15f5ebff73b1d27f636e79', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: '2f8d0bf68e67aa3bc21206d7282113fbfa67560b', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, sectionIndex) => {
37
+ return section.products.map(product => {
38
+ const bundleContext = {
39
+ sectionId: section.id,
40
+ sectionIndex: sectionIndex,
41
+ productId: product.id,
42
+ };
43
+ return (h("salla-accordion", { key: product.id, collapsed: false, bordered: true, collapsible: product.options && product.options.length > 0 ? true : false, size: "sm", id: `accordion-${product.id}` }, h("salla-accordion-head", null, this.renderAccordionHeader(String(section.id), product)), product.options && product.options.length > 0 && (h("salla-accordion-body", null, h("salla-product-options", { options: JSON.stringify(product.options), key: `${product.id}-persistent`, "product-id": product.id, "bundle-context": JSON.stringify(bundleContext) }), h("div", { class: "s-multiple-bundle-product-cart-body-remove-button" }, this.renderRemoveButton(String(section.id), product, true))))));
44
+ });
45
+ }))));
46
+ }
47
+ get host() { return getElement(this); }
48
+ };
49
+ SallaMultipleBundleProductCart.style = sallaMultipleBundleProductCartCss;
50
+
51
+ const sallaMultipleBundleProductDetailsCss = "";
52
+
53
+ const SallaMultipleBundleProductDetails = class {
54
+ constructor(hostRef) {
55
+ registerInstance(this, hostRef);
56
+ this.sections = [];
57
+ // store selected product IDs per section (can be string or number)
58
+ this.selectedProducts = {};
59
+ // Event handler reference for cleanup
60
+ this.productSelectedHandler = null;
61
+ // handle selecting a product (toggle)
62
+ this.onSelectProduct = (sectionId, product) => {
63
+ this.selectedProducts = {
64
+ ...this.selectedProducts,
65
+ [sectionId]: new Set(this.selectedProducts[sectionId] || []),
66
+ };
67
+ const productId = product.id;
68
+ const wasSelected = this.selectedProducts[sectionId].has(productId);
69
+ if (wasSelected) {
70
+ // Product is being deselected
71
+ this.selectedProducts[sectionId].delete(productId);
72
+ // Clear form data and modal options for this product in this specific section
73
+ this.clearProductFormData(productId, sectionId);
74
+ this.clearProductModalOptions(productId, sectionId);
75
+ }
76
+ else {
77
+ // Product is being selected
78
+ this.selectedProducts[sectionId].add(productId);
79
+ }
80
+ // force re-render
81
+ this.selectedProducts = { ...this.selectedProducts };
82
+ // still dispatch event
83
+ salla.event.dispatch('on-bundle-product-selected', {
84
+ id: product.id,
85
+ name: product.name,
86
+ options: product.options,
87
+ wasSelected: wasSelected,
88
+ isSelected: !wasSelected,
89
+ });
90
+ };
91
+ // ensure product is selected (only add if not already selected)
92
+ this.ensureProductSelected = (sectionId, product) => {
93
+ this.selectedProducts = {
94
+ ...this.selectedProducts,
95
+ [sectionId]: new Set(this.selectedProducts[sectionId] || []),
96
+ };
97
+ const productId = product.id;
98
+ // Only add if not already selected
99
+ if (!this.selectedProducts[sectionId].has(productId)) {
100
+ this.selectedProducts[sectionId].add(productId);
101
+ // force re-render
102
+ this.selectedProducts = { ...this.selectedProducts };
103
+ // dispatch event
104
+ salla.event.dispatch('on-bundle-product-selected', {
105
+ id: product.id,
106
+ name: product.name,
107
+ options: product.options,
108
+ });
109
+ }
110
+ };
111
+ // open product options modal
112
+ this.onSelectProductOptions = (product, sectionId) => {
113
+ // Find the section index from the sectionId
114
+ const sectionIndex = this.sections.findIndex(section => section.id == sectionId);
115
+ // Find the product index within the section
116
+ const section = this.sections.find(section => section.id == sectionId);
117
+ const productIndex = section?.products?.findIndex(p => p.id == product.id) ?? 0;
118
+ salla.event.dispatch('multiple-bundle-product-modal::open', {
119
+ product,
120
+ sectionId,
121
+ sectionIndex,
122
+ productIndex,
123
+ });
124
+ };
125
+ // Event handlers for bundle slider component
126
+ this.handleBundleSliderProductSelected = (event) => {
127
+ const { product, sectionId } = event.detail;
128
+ this.onSelectProduct(sectionId, product);
129
+ };
130
+ this.handleBundleSliderProductOptionsSelected = (event) => {
131
+ const { product, sectionId } = event.detail;
132
+ this.onSelectProductOptions(product, sectionId);
133
+ };
134
+ }
135
+ // Clear form data for a specific product in specific section
136
+ clearProductFormData(productId, sectionId) {
137
+ const form = this.host.closest('form');
138
+ if (sectionId) {
139
+ // Remove inputs for specific section/productIndex combination
140
+ const productInputPattern = `bundle[${sectionId}][`;
141
+ const inputsToRemove = Array.from(form.querySelectorAll('input')).filter((input) => input.getAttribute('data-product-id') === String(productId) &&
142
+ input.name &&
143
+ input.name.startsWith(productInputPattern));
144
+ inputsToRemove.forEach(input => input.remove());
145
+ }
146
+ else {
147
+ // Fallback: Remove all hidden inputs related to this product (legacy behavior)
148
+ const inputsToRemove = form.querySelectorAll(`[data-product-id="${productId}"]`);
149
+ inputsToRemove.forEach(input => input.remove());
150
+ }
151
+ }
152
+ // Clear modal options state for a specific product
153
+ clearProductModalOptions(productId, sectionId) {
154
+ let sectionIndex = null;
155
+ let productIndex = null;
156
+ if (sectionId != null) {
157
+ sectionIndex = this.sections.findIndex(section => section.id == sectionId);
158
+ if (sectionIndex > -1) {
159
+ const section = this.sections[sectionIndex];
160
+ if (section) {
161
+ const foundIndex = section.products?.findIndex(product => product.id == productId);
162
+ productIndex = typeof foundIndex === 'number' && foundIndex > -1 ? foundIndex : null;
163
+ }
164
+ }
165
+ }
166
+ // Emit event to notify modal to reset its state for this product
167
+ salla.event.dispatch('multiple-bundle-product-modal::clear-options', {
168
+ productId,
169
+ sectionId,
170
+ sectionIndex,
171
+ productIndex,
172
+ });
173
+ }
174
+ renderAccordionHeader(section, selectedCount) {
175
+ return (h(Fragment, null, h("h2", { slot: "title" }, section?.name), section?.obligatory_products ? (h("span", { slot: "note" }, salla.lang.get('pages.products.obligatory_products', {
176
+ count: section?.obligatory_products || 0,
177
+ }))) : '', h("span", { slot: "progress" }, selectedCount, "/", section?.products?.length || 0)));
178
+ }
179
+ componentDidLoad() {
180
+ // Listen for product selected event from modal
181
+ const modal = this.host.querySelector('salla-multiple-bundle-product-options-modal');
182
+ if (modal) {
183
+ this.productSelectedHandler = (e) => {
184
+ const { productId, sectionId, product, fromModal } = e.detail;
185
+ if (fromModal) {
186
+ // When called from modal, only add to selection if not already selected
187
+ this.ensureProductSelected(sectionId, product || { id: productId });
188
+ }
189
+ else {
190
+ // Normal toggle behavior
191
+ this.onSelectProduct(sectionId, product || { id: productId });
192
+ }
193
+ };
194
+ modal.addEventListener('productSelected', this.productSelectedHandler);
195
+ }
196
+ }
197
+ disconnectedCallback() {
198
+ // Clean up event listener to prevent memory leaks
199
+ if (this.productSelectedHandler) {
200
+ const modal = this.host.querySelector('salla-multiple-bundle-product-options-modal');
201
+ if (modal) {
202
+ modal.removeEventListener('productSelected', this.productSelectedHandler);
203
+ }
204
+ this.productSelectedHandler = null;
205
+ }
206
+ }
207
+ render() {
208
+ return (h(Host, { key: '2a7a27e8bfc7325575fec782139828333590eb9f', class: "s-multiple-bundle-product-wrapper" }, h("div", { key: 'affcb43ee67e329a9a87d6234bb91b5494a69a35', class: "s-multiple-bundle-product-wrapper-sections" }, this.sections.map((section, index) => {
209
+ const selectedCount = this.selectedProducts[section.id]?.size || 0;
210
+ return (h("salla-accordion", { key: section.id, collapsed: index === 0 ? false : true }, h("salla-accordion-head", null, this.renderAccordionHeader(section, selectedCount)), h("salla-accordion-body", null, h("salla-multiple-bundle-product-slider", { section: section, sectionIndex: index, selectedProducts: this.selectedProducts, onProductSelected: this.handleBundleSliderProductSelected, onProductOptionsSelected: this.handleBundleSliderProductOptionsSelected }))));
211
+ })), h("salla-multiple-bundle-product-options-modal", { key: '6b9065e8f7872da72166979fc9ce61efaad21c0a' })));
212
+ }
213
+ get host() { return getElement(this); }
214
+ };
215
+ SallaMultipleBundleProductDetails.style = sallaMultipleBundleProductDetailsCss;
216
+
217
+ export { SallaMultipleBundleProductCart as salla_multiple_bundle_product_cart, SallaMultipleBundleProductDetails as salla_multiple_bundle_product_details };