@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,771 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { r as registerInstance, h, H as Host, c as createEvent, a as getElement } from './index-B74h9G6a.js';
5
+ import { p as plusIcon, m as minusIcon } from './minus-DfeagqF1.js';
6
+
7
+ const sallaAccordionBodyCss = "";
8
+
9
+ const SallaAccordionBody = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (h(Host, { key: '298d42a5bf1bcefdb181ec35060220cf749b56ed', class: "s-accordion-body-wrapper" }, h("slot", { key: '6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d' })));
15
+ }
16
+ };
17
+ SallaAccordionBody.style = sallaAccordionBodyCss;
18
+
19
+ const sallaAccordionHeadCss = "";
20
+
21
+ const SallaAccordionHead = class {
22
+ constructor(hostRef) {
23
+ registerInstance(this, hostRef);
24
+ this.accordionToggle = createEvent(this, "accordionToggle");
25
+ /** Should the accordion be collapsible or not. */
26
+ this.collapsible = false;
27
+ /** Current collapsed state */
28
+ this.collapsed = true;
29
+ }
30
+ emitCollapsePanel() {
31
+ this.accordionToggle.emit({
32
+ payload: {
33
+ collapsed: this.collapsed,
34
+ },
35
+ });
36
+ }
37
+ toggleCollapse() {
38
+ if (!this.collapsible)
39
+ return;
40
+ this.collapsed = !this.collapsed;
41
+ this.host.parentElement?.setAttribute('data-collapsed', this.collapsed.toString());
42
+ this.host.parentElement
43
+ ?.querySelector('salla-accordion-body')
44
+ ?.setAttribute('data-collapsed', this.collapsed.toString());
45
+ this.emitCollapsePanel();
46
+ }
47
+ render() {
48
+ return (h(Host, { key: '9d88d243306cdf451c20d7068fbb9f48807b22e9', "data-collapsed": this.collapsed.toString(), onClick: () => this.toggleCollapse(), class: "s-accordion-head-wrapper" }, h("div", { key: 'bad4c5a913ce1c4581b09c0b6d96fcbdb4236638', class: "s-accordion-head-wrapper-start" }, h("slot", { key: 'acb83cec8cbca5771a9f84e81c0b955c3edad731', name: "title" }), h("slot", { key: 'a4ad42ea6fad4f452c4c218a9ee02dca0adb4a67', name: "progress" }), h("slot", { key: '96ab95d413dc906ac299079f4008816f01881990', name: "html" })), (this.collapsible || this.host.querySelector('[slot="note"]')) && (h("div", { key: '8f9666a5038cd7b1ac6e357c6920ea26d31c5f03', class: "s-accordion-head-wrapper-end" }, h("slot", { key: '14895e8c1385e91c14f046c9ae38ce5e4a4c9a60', name: "note" }), this.collapsible && (h("button", { key: '97dc7fabbb207fcc8b68ebf0a86f6c8a980dca13', class: {
49
+ 's-accordion-head-wrapper-toggle': true,
50
+ active: !this.collapsed,
51
+ }, onClick: e => {
52
+ e.stopPropagation();
53
+ this.toggleCollapse();
54
+ } }, h("span", { key: '3b24faf71dcd332663a354310b2ce09f7879eddc', class: "s-accordion-head-wrapper-toggle-icon", innerHTML: this.collapsed ? plusIcon : minusIcon })))))));
55
+ }
56
+ get host() { return getElement(this); }
57
+ };
58
+ SallaAccordionHead.style = sallaAccordionHeadCss;
59
+
60
+ var Location = `<!-- Generated by IcoMoon.io -->
61
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
62
+ <title>location</title>
63
+ <path d="M16.001 0c-7.879 0-12.001 6.204-12.001 12.333 0 5.813 9.853 17.833 10.976 19.185 0.253 0.305 0.629 0.481 1.025 0.481s0.772-0.176 1.027-0.481c1.121-1.352 10.972-13.372 10.972-19.185 0-6.129-4.121-12.333-11.999-12.333zM16.001 28.549c-3.32-4.184-9.335-12.527-9.335-16.216 0-4.656 2.92-9.667 9.335-9.667 6.412 0 9.332 5.011 9.332 9.667 0 3.689-6.013 12.032-9.332 16.216zM16 6.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM16 14.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
64
+ </svg>
65
+ `;
66
+
67
+ var Edit = `<!-- Generated by IcoMoon.io -->
68
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
69
+ <title>edit</title>
70
+ <path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>
71
+ </svg>
72
+ `;
73
+
74
+ var CurrentLocation = `<!-- Generated by IcoMoon.io -->
75
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
76
+ <title>location-target</title>
77
+ <path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>
78
+ </svg>
79
+ `;
80
+
81
+ var LocationMarker = `<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
82
+ <rect width="36" height="36" rx="18" fill="#5CD5C4"/>
83
+ <path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>
84
+ </svg>
85
+ `;
86
+
87
+ // export json
88
+ const light = [
89
+ {
90
+ featureType: 'water',
91
+ elementType: 'geometry',
92
+ stylers: [
93
+ {
94
+ color: '#e9e9e9',
95
+ },
96
+ {
97
+ lightness: 17,
98
+ },
99
+ ],
100
+ },
101
+ {
102
+ featureType: 'landscape',
103
+ elementType: 'geometry',
104
+ stylers: [
105
+ {
106
+ color: '#f5f5f5',
107
+ },
108
+ {
109
+ lightness: 20,
110
+ },
111
+ ],
112
+ },
113
+ {
114
+ featureType: 'road.highway',
115
+ elementType: 'geometry.fill',
116
+ stylers: [
117
+ {
118
+ color: '#ffffff',
119
+ },
120
+ {
121
+ lightness: 17,
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ featureType: 'road.highway',
127
+ elementType: 'geometry.stroke',
128
+ stylers: [
129
+ {
130
+ color: '#ffffff',
131
+ },
132
+ {
133
+ lightness: 29,
134
+ },
135
+ {
136
+ weight: 0.2,
137
+ },
138
+ ],
139
+ },
140
+ {
141
+ featureType: 'road.arterial',
142
+ elementType: 'geometry',
143
+ stylers: [
144
+ {
145
+ color: '#ffffff',
146
+ },
147
+ {
148
+ lightness: 18,
149
+ },
150
+ ],
151
+ },
152
+ {
153
+ featureType: 'road.local',
154
+ elementType: 'geometry',
155
+ stylers: [
156
+ {
157
+ color: '#ffffff',
158
+ },
159
+ {
160
+ lightness: 16,
161
+ },
162
+ ],
163
+ },
164
+ {
165
+ featureType: 'poi',
166
+ elementType: 'geometry',
167
+ stylers: [
168
+ {
169
+ color: '#f5f5f5',
170
+ },
171
+ {
172
+ lightness: 21,
173
+ },
174
+ ],
175
+ },
176
+ {
177
+ featureType: 'poi.park',
178
+ elementType: 'geometry',
179
+ stylers: [
180
+ {
181
+ color: '#dedede',
182
+ },
183
+ {
184
+ lightness: 21,
185
+ },
186
+ ],
187
+ },
188
+ {
189
+ elementType: 'labels.text.stroke',
190
+ stylers: [
191
+ {
192
+ visibility: 'on',
193
+ },
194
+ {
195
+ color: '#ffffff',
196
+ },
197
+ {
198
+ lightness: 16,
199
+ },
200
+ ],
201
+ },
202
+ {
203
+ elementType: 'labels.text.fill',
204
+ stylers: [
205
+ {
206
+ saturation: 36,
207
+ },
208
+ {
209
+ color: '#333333',
210
+ },
211
+ {
212
+ lightness: 40,
213
+ },
214
+ ],
215
+ },
216
+ {
217
+ elementType: 'labels.icon',
218
+ stylers: [
219
+ {
220
+ visibility: 'off',
221
+ },
222
+ ],
223
+ },
224
+ {
225
+ featureType: 'transit',
226
+ elementType: 'geometry',
227
+ stylers: [
228
+ {
229
+ color: '#f2f2f2',
230
+ },
231
+ {
232
+ lightness: 19,
233
+ },
234
+ ],
235
+ },
236
+ {
237
+ featureType: 'administrative',
238
+ elementType: 'geometry.fill',
239
+ stylers: [
240
+ {
241
+ color: '#fefefe',
242
+ },
243
+ {
244
+ lightness: 20,
245
+ },
246
+ ],
247
+ },
248
+ {
249
+ featureType: 'administrative',
250
+ elementType: 'geometry.stroke',
251
+ stylers: [
252
+ {
253
+ color: '#fefefe',
254
+ },
255
+ {
256
+ lightness: 17,
257
+ },
258
+ {
259
+ weight: 1.2,
260
+ },
261
+ ],
262
+ },
263
+ ];
264
+ const dark = [
265
+ {
266
+ elementType: 'geometry',
267
+ stylers: [
268
+ {
269
+ color: '#242f3e',
270
+ },
271
+ ],
272
+ },
273
+ {
274
+ elementType: 'labels.text.fill',
275
+ stylers: [
276
+ {
277
+ color: '#746855',
278
+ },
279
+ ],
280
+ },
281
+ {
282
+ elementType: 'labels.text.stroke',
283
+ stylers: [
284
+ {
285
+ color: '#242f3e',
286
+ },
287
+ ],
288
+ },
289
+ {
290
+ featureType: 'administrative.locality',
291
+ elementType: 'labels.text.fill',
292
+ stylers: [
293
+ {
294
+ color: '#d59563',
295
+ },
296
+ ],
297
+ },
298
+ {
299
+ featureType: 'poi',
300
+ elementType: 'labels.text.fill',
301
+ stylers: [
302
+ {
303
+ color: '#d59563',
304
+ },
305
+ ],
306
+ },
307
+ {
308
+ featureType: 'poi.park',
309
+ elementType: 'geometry',
310
+ stylers: [
311
+ {
312
+ color: '#263c3f',
313
+ },
314
+ ],
315
+ },
316
+ {
317
+ featureType: 'poi.park',
318
+ elementType: 'labels.text.fill',
319
+ stylers: [
320
+ {
321
+ color: '#6b9a76',
322
+ },
323
+ ],
324
+ },
325
+ {
326
+ featureType: 'road',
327
+ elementType: 'geometry',
328
+ stylers: [
329
+ {
330
+ color: '#38414e',
331
+ },
332
+ ],
333
+ },
334
+ {
335
+ featureType: 'road',
336
+ elementType: 'geometry.stroke',
337
+ stylers: [
338
+ {
339
+ color: '#212a37',
340
+ },
341
+ ],
342
+ },
343
+ {
344
+ featureType: 'road',
345
+ elementType: 'labels.text.fill',
346
+ stylers: [
347
+ {
348
+ color: '#9ca5b3',
349
+ },
350
+ ],
351
+ },
352
+ {
353
+ featureType: 'road.highway',
354
+ elementType: 'geometry',
355
+ stylers: [
356
+ {
357
+ color: '#746855',
358
+ },
359
+ ],
360
+ },
361
+ {
362
+ featureType: 'road.highway',
363
+ elementType: 'geometry.stroke',
364
+ stylers: [
365
+ {
366
+ color: '#1f2835',
367
+ },
368
+ ],
369
+ },
370
+ {
371
+ featureType: 'road.highway',
372
+ elementType: 'labels.text.fill',
373
+ stylers: [
374
+ {
375
+ color: '#f3d19c',
376
+ },
377
+ ],
378
+ },
379
+ {
380
+ featureType: 'transit',
381
+ elementType: 'geometry',
382
+ stylers: [
383
+ {
384
+ color: '#2f3948',
385
+ },
386
+ ],
387
+ },
388
+ {
389
+ featureType: 'transit.station',
390
+ elementType: 'labels.text.fill',
391
+ stylers: [
392
+ {
393
+ color: '#d59563',
394
+ },
395
+ ],
396
+ },
397
+ {
398
+ featureType: 'water',
399
+ elementType: 'geometry',
400
+ stylers: [
401
+ {
402
+ color: '#17263c',
403
+ },
404
+ ],
405
+ },
406
+ {
407
+ featureType: 'water',
408
+ elementType: 'labels.text.fill',
409
+ stylers: [
410
+ {
411
+ color: '#515c6d',
412
+ },
413
+ ],
414
+ },
415
+ {
416
+ featureType: 'water',
417
+ elementType: 'labels.text.stroke',
418
+ stylers: [
419
+ {
420
+ color: '#17263c',
421
+ },
422
+ ],
423
+ },
424
+ ];
425
+ var styles = {
426
+ light,
427
+ dark,
428
+ };
429
+
430
+ class Loader {
431
+ constructor(apiKey = null, options = {}) {
432
+ this.apiKey = apiKey;
433
+ this.options = options;
434
+ if (typeof window === 'undefined') {
435
+ throw new Error('google-maps is supported only in browser environment');
436
+ }
437
+ }
438
+ load() {
439
+ if (typeof this.api !== 'undefined') {
440
+ return Promise.resolve(this.api);
441
+ }
442
+ if (typeof this.loader !== 'undefined') {
443
+ return this.loader;
444
+ }
445
+ window[Loader.CALLBACK_NAME] = () => {
446
+ this.api = window['google'];
447
+ if (typeof this.resolve === 'undefined') {
448
+ throw new Error('Should not happen');
449
+ }
450
+ this.resolve(this.api);
451
+ };
452
+ window['gm_authFailure'] = () => {
453
+ if (typeof this.reject === 'undefined') {
454
+ throw new Error('Should not happen');
455
+ }
456
+ this.reject(new Error('google-maps: authentication error'));
457
+ };
458
+ return this.loader = new Promise((resolve, reject) => {
459
+ this.resolve = resolve;
460
+ this.reject = reject;
461
+ const script = document.createElement('script');
462
+ script.src = this.createUrl();
463
+ script.async = true;
464
+ script.onerror = (e) => reject(e);
465
+ document.head.appendChild(script);
466
+ });
467
+ }
468
+ createUrl() {
469
+ const parameters = [
470
+ `callback=${Loader.CALLBACK_NAME}`,
471
+ ];
472
+ if (this.apiKey) {
473
+ parameters.push(`key=${this.apiKey}`);
474
+ }
475
+ for (let name in this.options) {
476
+ if (this.options.hasOwnProperty(name)) {
477
+ let value = this.options[name];
478
+ if (name === 'version') {
479
+ name = 'v';
480
+ }
481
+ if (name === 'libraries') {
482
+ value = value.join(',');
483
+ }
484
+ parameters.push(`${name}=${value}`);
485
+ }
486
+ }
487
+ return `https://maps.googleapis.com/maps/api/js?${parameters.join('&')}`;
488
+ }
489
+ }
490
+ Loader.CALLBACK_NAME = '_dk_google_maps_loader_cb';
491
+
492
+ const sallaMapCss = "";
493
+
494
+ const SallaMap = class {
495
+ constructor(hostRef) {
496
+ registerInstance(this, hostRef);
497
+ this.selected = createEvent(this, "selected");
498
+ this.mapClicked = createEvent(this, "mapClicked");
499
+ this.currentLocationChanged = createEvent(this, "currentLocationChanged");
500
+ this.invalidInput = createEvent(this, "invalidInput");
501
+ this.defaultLat = 21.419421; //Mecca 🕋
502
+ this.defaultLng = 39.82553; //Mecca 🕋
503
+ // state variables
504
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
505
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
506
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
507
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
508
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
509
+ this.searchInputValue = null;
510
+ this.formattedAddress = '';
511
+ this.geolocationError = false;
512
+ /**
513
+ * File input name for the native formData
514
+ */
515
+ this.name = 'location';
516
+ /**
517
+ * Set if the location input is required or not
518
+ */
519
+ this.required = false;
520
+ /**
521
+ * Disable or enable actions
522
+ */
523
+ this.readonly = false;
524
+ /**
525
+ * Sets the search bar visibility.
526
+ */
527
+ this.searchable = false;
528
+ /**
529
+ * Sets start map zoom.
530
+ */
531
+ this.zoom = 10;
532
+ /**
533
+ * Sets map style.
534
+ */
535
+ this.theme = 'light';
536
+ salla.lang.onLoaded(() => {
537
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
538
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
539
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
540
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
541
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
542
+ });
543
+ salla.onReady(() => {
544
+ this.apiKey = salla.config.get('store.settings.keys.maps', 'AIzaSyBFgFISAizDP3YVWj0y5rF8JKKNQ2vohdc');
545
+ });
546
+ }
547
+ formatAddress(address) {
548
+ return address.length > 25 ? address.substring(0, 25) + '...' : address;
549
+ }
550
+ getLatLng() {
551
+ return this.selectedLat && this.selectedLng ? `${this.selectedLat}, ${this.selectedLng}` : null;
552
+ }
553
+ getPositionAddress(location, submit = false) {
554
+ // get address and set it to search input
555
+ const Geocoder = new google.maps.Geocoder();
556
+ Geocoder.geocode({
557
+ location,
558
+ }, (results, status) => {
559
+ if (status === google.maps.GeocoderStatus.OK) {
560
+ if (this.searchable) {
561
+ this.searchInputValue = results[0].formatted_address;
562
+ this.searchInput.value = results[0].formatted_address;
563
+ }
564
+ if (submit) {
565
+ this.formattedAddress = results[0].formatted_address;
566
+ }
567
+ }
568
+ });
569
+ }
570
+ initGoogleMaps(options, mapDOM) {
571
+ const loader = new Loader(this.apiKey, options);
572
+ loader.load().then(google => {
573
+ this.map = new google.maps.Map(mapDOM, {
574
+ center: (this.lat || this.lng) ? {
575
+ lat: this.lat,
576
+ lng: this.lng,
577
+ } : {
578
+ lat: this.defaultLat,
579
+ lng: this.defaultLng,
580
+ },
581
+ zoom: this.zoom,
582
+ zoomControl: true,
583
+ mapTypeControl: false,
584
+ scaleControl: false,
585
+ streetViewControl: false,
586
+ rotateControl: false,
587
+ fullscreenControl: false,
588
+ disableDefaultUI: false,
589
+ });
590
+ this.map.setOptions({
591
+ styles: this.theme === 'light' ? styles.light : styles.dark,
592
+ });
593
+ this.marker = new google.maps.Marker({
594
+ position: this.map.getCenter(),
595
+ map: this.map,
596
+ icon: {
597
+ url: 'data:image/svg+xml;utf8,' + encodeURIComponent(LocationMarker),
598
+ scaledSize: new google.maps.Size(30, 30),
599
+ },
600
+ });
601
+ if (this.searchable) {
602
+ const searchBox = new google.maps.places.SearchBox(this.searchInput);
603
+ google.maps.event.addListener(searchBox, 'places_changed', () => {
604
+ const places = searchBox.getPlaces();
605
+ // goto first place
606
+ if (places.length > 0 && this.map) {
607
+ this.map.setCenter(places[0].geometry.location);
608
+ this.lat = places[0].geometry.location.lat();
609
+ this.lng = places[0].geometry.location.lng();
610
+ // set marker
611
+ this.marker.setPosition(places[0].geometry.location);
612
+ this.searchInputValue = places[0].formatted_address;
613
+ this.formattedAddress = places[0].formatted_address;
614
+ }
615
+ });
616
+ }
617
+ // add listener to map
618
+ google.maps.event.addListener(this.map, 'click', e => {
619
+ if (this.readonly)
620
+ return;
621
+ this.marker.setPosition(e.latLng);
622
+ this.lat = e.latLng.lat();
623
+ this.lng = e.latLng.lng();
624
+ this.getPositionAddress(e.latLng);
625
+ this.mapClicked.emit({
626
+ lat: e.latLng.lat(),
627
+ lng: e.latLng.lng(),
628
+ address: this.formattedAddress ? this.formattedAddress : null,
629
+ });
630
+ });
631
+ if (!this.lat && !this.lng) {
632
+ this.getCurrentLocation();
633
+ if (this.geolocationError) {
634
+ this.map.setCenter({
635
+ lat: this.lat,
636
+ lng: this.lng,
637
+ });
638
+ this.marker.setPosition({
639
+ lat: this.lat,
640
+ lng: this.lng,
641
+ });
642
+ }
643
+ }
644
+ });
645
+ }
646
+ getCurrentLocation() {
647
+ if (navigator.geolocation && this.map) {
648
+ navigator.geolocation.getCurrentPosition(position => {
649
+ // set map to this location
650
+ const mapOptions = {
651
+ center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
652
+ zoom: 15,
653
+ };
654
+ this.map.setOptions(mapOptions);
655
+ // set marker
656
+ this.marker.setPosition(mapOptions.center);
657
+ this.getPositionAddress(mapOptions.center);
658
+ this.lat = position.coords.latitude;
659
+ this.lng = position.coords.longitude;
660
+ this.currentLocationChanged.emit({
661
+ lat: position.coords.latitude,
662
+ lng: position.coords.longitude,
663
+ address: this.formattedAddress ? this.formattedAddress : null,
664
+ });
665
+ }, this.handleLocationError.bind(this));
666
+ }
667
+ else {
668
+ salla.log('Geolocation is not supported by this browser.');
669
+ this.geolocationError = true;
670
+ }
671
+ }
672
+ handleLocationError(error) {
673
+ this.geolocationError = true;
674
+ switch (error.code) {
675
+ case error.PERMISSION_DENIED:
676
+ salla.log('User denied the request for Geolocation.');
677
+ break;
678
+ case error.POSITION_UNAVAILABLE:
679
+ salla.log('Location information is unavailable.');
680
+ break;
681
+ case error.TIMEOUT:
682
+ salla.log('The request to get user location timed out.');
683
+ break;
684
+ case error.UNKNOWN_ERROR:
685
+ salla.log('An unknown error occurred.');
686
+ break;
687
+ }
688
+ }
689
+ componentDidLoad() {
690
+ // if lat and lng provided then get the formatted address
691
+ if (this.lat && this.lng) {
692
+ // get address
693
+ fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||
694
+ document.documentElement.lang ||
695
+ 'ar'}`)
696
+ .then(res => res.json())
697
+ .then(res => {
698
+ if (res.status === 'OK') {
699
+ this.formattedAddress = res.results[0].formatted_address;
700
+ this.searchInputValue = res.results[0].formatted_address;
701
+ this.searchInput.value = res.results[0].formatted_address;
702
+ this.selectedLng = this.lng;
703
+ this.selectedLat = this.lat;
704
+ }
705
+ });
706
+ }
707
+ this.mapInput.addEventListener('invalid', e => {
708
+ this.invalidInput.emit(e);
709
+ });
710
+ this.mapInput.addEventListener('input', () => {
711
+ this.mapInput.setCustomValidity('');
712
+ this.mapInput.reportValidity();
713
+ });
714
+ }
715
+ /**
716
+ * Open location component
717
+ */
718
+ async open() {
719
+ // only init google maps on modal open :) to save resources
720
+ if (!this.map)
721
+ this.initGoogleMaps({
722
+ libraries: this.searchable ? ['places', 'search'] : [],
723
+ language: salla.config.get('user.language_code') ||
724
+ document.documentElement.lang ||
725
+ 'ar',
726
+ }, this.mapElement);
727
+ return await this.locationModal.open();
728
+ }
729
+ // rendering functions
730
+ getLocationModal() {
731
+ return (h("div", null, h("div", { class: "s-map-modal-title" }, !!this.modalTitle ? this.modalTitle : this.modalActivityTitle), h("div", { class: "s-map-modal-body" }, h("div", { class: "s-map-element", ref: el => (this.mapElement = el) }), this.readonly ? "" :
732
+ [
733
+ this.searchable && (h("div", { class: "s-map-search-wrapper" }, h("input", { class: "s-map-search-input", ref: el => (this.searchInput = el), placeholder: this.searchPlaceholder }))),
734
+ h("salla-button", { class: "s-map-my-location-button", onClick: () => {
735
+ this.getCurrentLocation();
736
+ }, shape: "icon", color: "primary" }, h("span", { innerHTML: CurrentLocation })),
737
+ h("salla-button", { class: "s-map-submit-button", color: "primary", width: "wide", onClick: () => {
738
+ let points = {
739
+ lat: this.lat,
740
+ lng: this.lng,
741
+ address: this.formattedAddress ? this.formattedAddress : null,
742
+ };
743
+ salla.event.emit('salla-map::selected', points);
744
+ this.selected.emit(points);
745
+ this.selectedLat = points.lat;
746
+ this.selectedLng = points.lng;
747
+ this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);
748
+ if (!this.selectedLat || !this.selectedLng) {
749
+ this.mapInput.value = null;
750
+ }
751
+ else {
752
+ this.mapInput.value = `${this.selectedLat}, ${this.selectedLng}`;
753
+ }
754
+ this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }));
755
+ this.locationModal.close();
756
+ } }, this.confirmButtonTitle)
757
+ ])));
758
+ }
759
+ // render
760
+ render() {
761
+ return (h(Host, { key: 'f3b0f4e444e266a4f9c60782bea7920a1b4c34b4', class: "s-map-wrapper" }, h("salla-modal", { key: '5066a0f19b59509656350bd0a02bc8ff8bb3d9d7', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
762
+ this.locationModal = modal;
763
+ } }, this.getLocationModal()), h("slot", { key: '884266b42b7c5532486c4e8bd1aba8b0e6bf2f89', name: "button" }, h("salla-button", { key: '32b96c45aca7589681a3819d165b38e8f9ee036e', onClick: () => {
764
+ this.open();
765
+ }, color: "primary", class: "s-map-location-button" }, h("span", { key: 'd73a9837cb6a6df740300a4f52c35dd7f9499e73', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: '77a53ca7c0b51268813238d80db56a9b9449c3f9', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
766
+ }
767
+ get host() { return getElement(this); }
768
+ };
769
+ SallaMap.style = sallaMapCss;
770
+
771
+ export { SallaAccordionBody as salla_accordion_body, SallaAccordionHead as salla_accordion_head, SallaMap as salla_map };