@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,775 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ var index = require('./index-Ce40E8tZ.js');
7
+ var minus = require('./minus-CCryh1qf.js');
8
+
9
+ const sallaAccordionBodyCss = "";
10
+
11
+ const SallaAccordionBody = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ }
15
+ render() {
16
+ return (index.h(index.Host, { key: '298d42a5bf1bcefdb181ec35060220cf749b56ed', class: "s-accordion-body-wrapper" }, index.h("slot", { key: '6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d' })));
17
+ }
18
+ };
19
+ SallaAccordionBody.style = sallaAccordionBodyCss;
20
+
21
+ const sallaAccordionHeadCss = "";
22
+
23
+ const SallaAccordionHead = class {
24
+ constructor(hostRef) {
25
+ index.registerInstance(this, hostRef);
26
+ this.accordionToggle = index.createEvent(this, "accordionToggle");
27
+ /** Should the accordion be collapsible or not. */
28
+ this.collapsible = false;
29
+ /** Current collapsed state */
30
+ this.collapsed = true;
31
+ }
32
+ emitCollapsePanel() {
33
+ this.accordionToggle.emit({
34
+ payload: {
35
+ collapsed: this.collapsed,
36
+ },
37
+ });
38
+ }
39
+ toggleCollapse() {
40
+ if (!this.collapsible)
41
+ return;
42
+ this.collapsed = !this.collapsed;
43
+ this.host.parentElement?.setAttribute('data-collapsed', this.collapsed.toString());
44
+ this.host.parentElement
45
+ ?.querySelector('salla-accordion-body')
46
+ ?.setAttribute('data-collapsed', this.collapsed.toString());
47
+ this.emitCollapsePanel();
48
+ }
49
+ render() {
50
+ return (index.h(index.Host, { key: '9d88d243306cdf451c20d7068fbb9f48807b22e9', "data-collapsed": this.collapsed.toString(), onClick: () => this.toggleCollapse(), class: "s-accordion-head-wrapper" }, index.h("div", { key: 'bad4c5a913ce1c4581b09c0b6d96fcbdb4236638', class: "s-accordion-head-wrapper-start" }, index.h("slot", { key: 'acb83cec8cbca5771a9f84e81c0b955c3edad731', name: "title" }), index.h("slot", { key: 'a4ad42ea6fad4f452c4c218a9ee02dca0adb4a67', name: "progress" }), index.h("slot", { key: '96ab95d413dc906ac299079f4008816f01881990', name: "html" })), (this.collapsible || this.host.querySelector('[slot="note"]')) && (index.h("div", { key: '8f9666a5038cd7b1ac6e357c6920ea26d31c5f03', class: "s-accordion-head-wrapper-end" }, index.h("slot", { key: '14895e8c1385e91c14f046c9ae38ce5e4a4c9a60', name: "note" }), this.collapsible && (index.h("button", { key: '97dc7fabbb207fcc8b68ebf0a86f6c8a980dca13', class: {
51
+ 's-accordion-head-wrapper-toggle': true,
52
+ active: !this.collapsed,
53
+ }, onClick: e => {
54
+ e.stopPropagation();
55
+ this.toggleCollapse();
56
+ } }, index.h("span", { key: '3b24faf71dcd332663a354310b2ce09f7879eddc', class: "s-accordion-head-wrapper-toggle-icon", innerHTML: this.collapsed ? minus.plusIcon : minus.minusIcon })))))));
57
+ }
58
+ get host() { return index.getElement(this); }
59
+ };
60
+ SallaAccordionHead.style = sallaAccordionHeadCss;
61
+
62
+ var Location = `<!-- Generated by IcoMoon.io -->
63
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
64
+ <title>location</title>
65
+ <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>
66
+ </svg>
67
+ `;
68
+
69
+ var Edit = `<!-- Generated by IcoMoon.io -->
70
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
71
+ <title>edit</title>
72
+ <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>
73
+ </svg>
74
+ `;
75
+
76
+ var CurrentLocation = `<!-- Generated by IcoMoon.io -->
77
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
78
+ <title>location-target</title>
79
+ <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>
80
+ </svg>
81
+ `;
82
+
83
+ var LocationMarker = `<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
84
+ <rect width="36" height="36" rx="18" fill="#5CD5C4"/>
85
+ <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"/>
86
+ </svg>
87
+ `;
88
+
89
+ // export json
90
+ const light = [
91
+ {
92
+ featureType: 'water',
93
+ elementType: 'geometry',
94
+ stylers: [
95
+ {
96
+ color: '#e9e9e9',
97
+ },
98
+ {
99
+ lightness: 17,
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ featureType: 'landscape',
105
+ elementType: 'geometry',
106
+ stylers: [
107
+ {
108
+ color: '#f5f5f5',
109
+ },
110
+ {
111
+ lightness: 20,
112
+ },
113
+ ],
114
+ },
115
+ {
116
+ featureType: 'road.highway',
117
+ elementType: 'geometry.fill',
118
+ stylers: [
119
+ {
120
+ color: '#ffffff',
121
+ },
122
+ {
123
+ lightness: 17,
124
+ },
125
+ ],
126
+ },
127
+ {
128
+ featureType: 'road.highway',
129
+ elementType: 'geometry.stroke',
130
+ stylers: [
131
+ {
132
+ color: '#ffffff',
133
+ },
134
+ {
135
+ lightness: 29,
136
+ },
137
+ {
138
+ weight: 0.2,
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ featureType: 'road.arterial',
144
+ elementType: 'geometry',
145
+ stylers: [
146
+ {
147
+ color: '#ffffff',
148
+ },
149
+ {
150
+ lightness: 18,
151
+ },
152
+ ],
153
+ },
154
+ {
155
+ featureType: 'road.local',
156
+ elementType: 'geometry',
157
+ stylers: [
158
+ {
159
+ color: '#ffffff',
160
+ },
161
+ {
162
+ lightness: 16,
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ featureType: 'poi',
168
+ elementType: 'geometry',
169
+ stylers: [
170
+ {
171
+ color: '#f5f5f5',
172
+ },
173
+ {
174
+ lightness: 21,
175
+ },
176
+ ],
177
+ },
178
+ {
179
+ featureType: 'poi.park',
180
+ elementType: 'geometry',
181
+ stylers: [
182
+ {
183
+ color: '#dedede',
184
+ },
185
+ {
186
+ lightness: 21,
187
+ },
188
+ ],
189
+ },
190
+ {
191
+ elementType: 'labels.text.stroke',
192
+ stylers: [
193
+ {
194
+ visibility: 'on',
195
+ },
196
+ {
197
+ color: '#ffffff',
198
+ },
199
+ {
200
+ lightness: 16,
201
+ },
202
+ ],
203
+ },
204
+ {
205
+ elementType: 'labels.text.fill',
206
+ stylers: [
207
+ {
208
+ saturation: 36,
209
+ },
210
+ {
211
+ color: '#333333',
212
+ },
213
+ {
214
+ lightness: 40,
215
+ },
216
+ ],
217
+ },
218
+ {
219
+ elementType: 'labels.icon',
220
+ stylers: [
221
+ {
222
+ visibility: 'off',
223
+ },
224
+ ],
225
+ },
226
+ {
227
+ featureType: 'transit',
228
+ elementType: 'geometry',
229
+ stylers: [
230
+ {
231
+ color: '#f2f2f2',
232
+ },
233
+ {
234
+ lightness: 19,
235
+ },
236
+ ],
237
+ },
238
+ {
239
+ featureType: 'administrative',
240
+ elementType: 'geometry.fill',
241
+ stylers: [
242
+ {
243
+ color: '#fefefe',
244
+ },
245
+ {
246
+ lightness: 20,
247
+ },
248
+ ],
249
+ },
250
+ {
251
+ featureType: 'administrative',
252
+ elementType: 'geometry.stroke',
253
+ stylers: [
254
+ {
255
+ color: '#fefefe',
256
+ },
257
+ {
258
+ lightness: 17,
259
+ },
260
+ {
261
+ weight: 1.2,
262
+ },
263
+ ],
264
+ },
265
+ ];
266
+ const dark = [
267
+ {
268
+ elementType: 'geometry',
269
+ stylers: [
270
+ {
271
+ color: '#242f3e',
272
+ },
273
+ ],
274
+ },
275
+ {
276
+ elementType: 'labels.text.fill',
277
+ stylers: [
278
+ {
279
+ color: '#746855',
280
+ },
281
+ ],
282
+ },
283
+ {
284
+ elementType: 'labels.text.stroke',
285
+ stylers: [
286
+ {
287
+ color: '#242f3e',
288
+ },
289
+ ],
290
+ },
291
+ {
292
+ featureType: 'administrative.locality',
293
+ elementType: 'labels.text.fill',
294
+ stylers: [
295
+ {
296
+ color: '#d59563',
297
+ },
298
+ ],
299
+ },
300
+ {
301
+ featureType: 'poi',
302
+ elementType: 'labels.text.fill',
303
+ stylers: [
304
+ {
305
+ color: '#d59563',
306
+ },
307
+ ],
308
+ },
309
+ {
310
+ featureType: 'poi.park',
311
+ elementType: 'geometry',
312
+ stylers: [
313
+ {
314
+ color: '#263c3f',
315
+ },
316
+ ],
317
+ },
318
+ {
319
+ featureType: 'poi.park',
320
+ elementType: 'labels.text.fill',
321
+ stylers: [
322
+ {
323
+ color: '#6b9a76',
324
+ },
325
+ ],
326
+ },
327
+ {
328
+ featureType: 'road',
329
+ elementType: 'geometry',
330
+ stylers: [
331
+ {
332
+ color: '#38414e',
333
+ },
334
+ ],
335
+ },
336
+ {
337
+ featureType: 'road',
338
+ elementType: 'geometry.stroke',
339
+ stylers: [
340
+ {
341
+ color: '#212a37',
342
+ },
343
+ ],
344
+ },
345
+ {
346
+ featureType: 'road',
347
+ elementType: 'labels.text.fill',
348
+ stylers: [
349
+ {
350
+ color: '#9ca5b3',
351
+ },
352
+ ],
353
+ },
354
+ {
355
+ featureType: 'road.highway',
356
+ elementType: 'geometry',
357
+ stylers: [
358
+ {
359
+ color: '#746855',
360
+ },
361
+ ],
362
+ },
363
+ {
364
+ featureType: 'road.highway',
365
+ elementType: 'geometry.stroke',
366
+ stylers: [
367
+ {
368
+ color: '#1f2835',
369
+ },
370
+ ],
371
+ },
372
+ {
373
+ featureType: 'road.highway',
374
+ elementType: 'labels.text.fill',
375
+ stylers: [
376
+ {
377
+ color: '#f3d19c',
378
+ },
379
+ ],
380
+ },
381
+ {
382
+ featureType: 'transit',
383
+ elementType: 'geometry',
384
+ stylers: [
385
+ {
386
+ color: '#2f3948',
387
+ },
388
+ ],
389
+ },
390
+ {
391
+ featureType: 'transit.station',
392
+ elementType: 'labels.text.fill',
393
+ stylers: [
394
+ {
395
+ color: '#d59563',
396
+ },
397
+ ],
398
+ },
399
+ {
400
+ featureType: 'water',
401
+ elementType: 'geometry',
402
+ stylers: [
403
+ {
404
+ color: '#17263c',
405
+ },
406
+ ],
407
+ },
408
+ {
409
+ featureType: 'water',
410
+ elementType: 'labels.text.fill',
411
+ stylers: [
412
+ {
413
+ color: '#515c6d',
414
+ },
415
+ ],
416
+ },
417
+ {
418
+ featureType: 'water',
419
+ elementType: 'labels.text.stroke',
420
+ stylers: [
421
+ {
422
+ color: '#17263c',
423
+ },
424
+ ],
425
+ },
426
+ ];
427
+ var styles = {
428
+ light,
429
+ dark,
430
+ };
431
+
432
+ class Loader {
433
+ constructor(apiKey = null, options = {}) {
434
+ this.apiKey = apiKey;
435
+ this.options = options;
436
+ if (typeof window === 'undefined') {
437
+ throw new Error('google-maps is supported only in browser environment');
438
+ }
439
+ }
440
+ load() {
441
+ if (typeof this.api !== 'undefined') {
442
+ return Promise.resolve(this.api);
443
+ }
444
+ if (typeof this.loader !== 'undefined') {
445
+ return this.loader;
446
+ }
447
+ window[Loader.CALLBACK_NAME] = () => {
448
+ this.api = window['google'];
449
+ if (typeof this.resolve === 'undefined') {
450
+ throw new Error('Should not happen');
451
+ }
452
+ this.resolve(this.api);
453
+ };
454
+ window['gm_authFailure'] = () => {
455
+ if (typeof this.reject === 'undefined') {
456
+ throw new Error('Should not happen');
457
+ }
458
+ this.reject(new Error('google-maps: authentication error'));
459
+ };
460
+ return this.loader = new Promise((resolve, reject) => {
461
+ this.resolve = resolve;
462
+ this.reject = reject;
463
+ const script = document.createElement('script');
464
+ script.src = this.createUrl();
465
+ script.async = true;
466
+ script.onerror = (e) => reject(e);
467
+ document.head.appendChild(script);
468
+ });
469
+ }
470
+ createUrl() {
471
+ const parameters = [
472
+ `callback=${Loader.CALLBACK_NAME}`,
473
+ ];
474
+ if (this.apiKey) {
475
+ parameters.push(`key=${this.apiKey}`);
476
+ }
477
+ for (let name in this.options) {
478
+ if (this.options.hasOwnProperty(name)) {
479
+ let value = this.options[name];
480
+ if (name === 'version') {
481
+ name = 'v';
482
+ }
483
+ if (name === 'libraries') {
484
+ value = value.join(',');
485
+ }
486
+ parameters.push(`${name}=${value}`);
487
+ }
488
+ }
489
+ return `https://maps.googleapis.com/maps/api/js?${parameters.join('&')}`;
490
+ }
491
+ }
492
+ Loader.CALLBACK_NAME = '_dk_google_maps_loader_cb';
493
+
494
+ const sallaMapCss = "";
495
+
496
+ const SallaMap = class {
497
+ constructor(hostRef) {
498
+ index.registerInstance(this, hostRef);
499
+ this.selected = index.createEvent(this, "selected");
500
+ this.mapClicked = index.createEvent(this, "mapClicked");
501
+ this.currentLocationChanged = index.createEvent(this, "currentLocationChanged");
502
+ this.invalidInput = index.createEvent(this, "invalidInput");
503
+ this.defaultLat = 21.419421; //Mecca 🕋
504
+ this.defaultLng = 39.82553; //Mecca 🕋
505
+ // state variables
506
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
507
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
508
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
509
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
510
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
511
+ this.searchInputValue = null;
512
+ this.formattedAddress = '';
513
+ this.geolocationError = false;
514
+ /**
515
+ * File input name for the native formData
516
+ */
517
+ this.name = 'location';
518
+ /**
519
+ * Set if the location input is required or not
520
+ */
521
+ this.required = false;
522
+ /**
523
+ * Disable or enable actions
524
+ */
525
+ this.readonly = false;
526
+ /**
527
+ * Sets the search bar visibility.
528
+ */
529
+ this.searchable = false;
530
+ /**
531
+ * Sets start map zoom.
532
+ */
533
+ this.zoom = 10;
534
+ /**
535
+ * Sets map style.
536
+ */
537
+ this.theme = 'light';
538
+ salla.lang.onLoaded(() => {
539
+ this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
540
+ this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
541
+ this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
542
+ this.locateButtonEdit = salla.lang.get('common.elements.edit');
543
+ this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
544
+ });
545
+ salla.onReady(() => {
546
+ this.apiKey = salla.config.get('store.settings.keys.maps', 'AIzaSyBFgFISAizDP3YVWj0y5rF8JKKNQ2vohdc');
547
+ });
548
+ }
549
+ formatAddress(address) {
550
+ return address.length > 25 ? address.substring(0, 25) + '...' : address;
551
+ }
552
+ getLatLng() {
553
+ return this.selectedLat && this.selectedLng ? `${this.selectedLat}, ${this.selectedLng}` : null;
554
+ }
555
+ getPositionAddress(location, submit = false) {
556
+ // get address and set it to search input
557
+ const Geocoder = new google.maps.Geocoder();
558
+ Geocoder.geocode({
559
+ location,
560
+ }, (results, status) => {
561
+ if (status === google.maps.GeocoderStatus.OK) {
562
+ if (this.searchable) {
563
+ this.searchInputValue = results[0].formatted_address;
564
+ this.searchInput.value = results[0].formatted_address;
565
+ }
566
+ if (submit) {
567
+ this.formattedAddress = results[0].formatted_address;
568
+ }
569
+ }
570
+ });
571
+ }
572
+ initGoogleMaps(options, mapDOM) {
573
+ const loader = new Loader(this.apiKey, options);
574
+ loader.load().then(google => {
575
+ this.map = new google.maps.Map(mapDOM, {
576
+ center: (this.lat || this.lng) ? {
577
+ lat: this.lat,
578
+ lng: this.lng,
579
+ } : {
580
+ lat: this.defaultLat,
581
+ lng: this.defaultLng,
582
+ },
583
+ zoom: this.zoom,
584
+ zoomControl: true,
585
+ mapTypeControl: false,
586
+ scaleControl: false,
587
+ streetViewControl: false,
588
+ rotateControl: false,
589
+ fullscreenControl: false,
590
+ disableDefaultUI: false,
591
+ });
592
+ this.map.setOptions({
593
+ styles: this.theme === 'light' ? styles.light : styles.dark,
594
+ });
595
+ this.marker = new google.maps.Marker({
596
+ position: this.map.getCenter(),
597
+ map: this.map,
598
+ icon: {
599
+ url: 'data:image/svg+xml;utf8,' + encodeURIComponent(LocationMarker),
600
+ scaledSize: new google.maps.Size(30, 30),
601
+ },
602
+ });
603
+ if (this.searchable) {
604
+ const searchBox = new google.maps.places.SearchBox(this.searchInput);
605
+ google.maps.event.addListener(searchBox, 'places_changed', () => {
606
+ const places = searchBox.getPlaces();
607
+ // goto first place
608
+ if (places.length > 0 && this.map) {
609
+ this.map.setCenter(places[0].geometry.location);
610
+ this.lat = places[0].geometry.location.lat();
611
+ this.lng = places[0].geometry.location.lng();
612
+ // set marker
613
+ this.marker.setPosition(places[0].geometry.location);
614
+ this.searchInputValue = places[0].formatted_address;
615
+ this.formattedAddress = places[0].formatted_address;
616
+ }
617
+ });
618
+ }
619
+ // add listener to map
620
+ google.maps.event.addListener(this.map, 'click', e => {
621
+ if (this.readonly)
622
+ return;
623
+ this.marker.setPosition(e.latLng);
624
+ this.lat = e.latLng.lat();
625
+ this.lng = e.latLng.lng();
626
+ this.getPositionAddress(e.latLng);
627
+ this.mapClicked.emit({
628
+ lat: e.latLng.lat(),
629
+ lng: e.latLng.lng(),
630
+ address: this.formattedAddress ? this.formattedAddress : null,
631
+ });
632
+ });
633
+ if (!this.lat && !this.lng) {
634
+ this.getCurrentLocation();
635
+ if (this.geolocationError) {
636
+ this.map.setCenter({
637
+ lat: this.lat,
638
+ lng: this.lng,
639
+ });
640
+ this.marker.setPosition({
641
+ lat: this.lat,
642
+ lng: this.lng,
643
+ });
644
+ }
645
+ }
646
+ });
647
+ }
648
+ getCurrentLocation() {
649
+ if (navigator.geolocation && this.map) {
650
+ navigator.geolocation.getCurrentPosition(position => {
651
+ // set map to this location
652
+ const mapOptions = {
653
+ center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
654
+ zoom: 15,
655
+ };
656
+ this.map.setOptions(mapOptions);
657
+ // set marker
658
+ this.marker.setPosition(mapOptions.center);
659
+ this.getPositionAddress(mapOptions.center);
660
+ this.lat = position.coords.latitude;
661
+ this.lng = position.coords.longitude;
662
+ this.currentLocationChanged.emit({
663
+ lat: position.coords.latitude,
664
+ lng: position.coords.longitude,
665
+ address: this.formattedAddress ? this.formattedAddress : null,
666
+ });
667
+ }, this.handleLocationError.bind(this));
668
+ }
669
+ else {
670
+ salla.log('Geolocation is not supported by this browser.');
671
+ this.geolocationError = true;
672
+ }
673
+ }
674
+ handleLocationError(error) {
675
+ this.geolocationError = true;
676
+ switch (error.code) {
677
+ case error.PERMISSION_DENIED:
678
+ salla.log('User denied the request for Geolocation.');
679
+ break;
680
+ case error.POSITION_UNAVAILABLE:
681
+ salla.log('Location information is unavailable.');
682
+ break;
683
+ case error.TIMEOUT:
684
+ salla.log('The request to get user location timed out.');
685
+ break;
686
+ case error.UNKNOWN_ERROR:
687
+ salla.log('An unknown error occurred.');
688
+ break;
689
+ }
690
+ }
691
+ componentDidLoad() {
692
+ // if lat and lng provided then get the formatted address
693
+ if (this.lat && this.lng) {
694
+ // get address
695
+ fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||
696
+ document.documentElement.lang ||
697
+ 'ar'}`)
698
+ .then(res => res.json())
699
+ .then(res => {
700
+ if (res.status === 'OK') {
701
+ this.formattedAddress = res.results[0].formatted_address;
702
+ this.searchInputValue = res.results[0].formatted_address;
703
+ this.searchInput.value = res.results[0].formatted_address;
704
+ this.selectedLng = this.lng;
705
+ this.selectedLat = this.lat;
706
+ }
707
+ });
708
+ }
709
+ this.mapInput.addEventListener('invalid', e => {
710
+ this.invalidInput.emit(e);
711
+ });
712
+ this.mapInput.addEventListener('input', () => {
713
+ this.mapInput.setCustomValidity('');
714
+ this.mapInput.reportValidity();
715
+ });
716
+ }
717
+ /**
718
+ * Open location component
719
+ */
720
+ async open() {
721
+ // only init google maps on modal open :) to save resources
722
+ if (!this.map)
723
+ this.initGoogleMaps({
724
+ libraries: this.searchable ? ['places', 'search'] : [],
725
+ language: salla.config.get('user.language_code') ||
726
+ document.documentElement.lang ||
727
+ 'ar',
728
+ }, this.mapElement);
729
+ return await this.locationModal.open();
730
+ }
731
+ // rendering functions
732
+ getLocationModal() {
733
+ return (index.h("div", null, index.h("div", { class: "s-map-modal-title" }, !!this.modalTitle ? this.modalTitle : this.modalActivityTitle), index.h("div", { class: "s-map-modal-body" }, index.h("div", { class: "s-map-element", ref: el => (this.mapElement = el) }), this.readonly ? "" :
734
+ [
735
+ this.searchable && (index.h("div", { class: "s-map-search-wrapper" }, index.h("input", { class: "s-map-search-input", ref: el => (this.searchInput = el), placeholder: this.searchPlaceholder }))),
736
+ index.h("salla-button", { class: "s-map-my-location-button", onClick: () => {
737
+ this.getCurrentLocation();
738
+ }, shape: "icon", color: "primary" }, index.h("span", { innerHTML: CurrentLocation })),
739
+ index.h("salla-button", { class: "s-map-submit-button", color: "primary", width: "wide", onClick: () => {
740
+ let points = {
741
+ lat: this.lat,
742
+ lng: this.lng,
743
+ address: this.formattedAddress ? this.formattedAddress : null,
744
+ };
745
+ salla.event.emit('salla-map::selected', points);
746
+ this.selected.emit(points);
747
+ this.selectedLat = points.lat;
748
+ this.selectedLng = points.lng;
749
+ this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);
750
+ if (!this.selectedLat || !this.selectedLng) {
751
+ this.mapInput.value = null;
752
+ }
753
+ else {
754
+ this.mapInput.value = `${this.selectedLat}, ${this.selectedLng}`;
755
+ }
756
+ this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }));
757
+ this.locationModal.close();
758
+ } }, this.confirmButtonTitle)
759
+ ])));
760
+ }
761
+ // render
762
+ render() {
763
+ return (index.h(index.Host, { key: 'f3b0f4e444e266a4f9c60782bea7920a1b4c34b4', class: "s-map-wrapper" }, index.h("salla-modal", { key: '5066a0f19b59509656350bd0a02bc8ff8bb3d9d7', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
764
+ this.locationModal = modal;
765
+ } }, this.getLocationModal()), index.h("slot", { key: '884266b42b7c5532486c4e8bd1aba8b0e6bf2f89', name: "button" }, index.h("salla-button", { key: '32b96c45aca7589681a3819d165b38e8f9ee036e', onClick: () => {
766
+ this.open();
767
+ }, color: "primary", class: "s-map-location-button" }, index.h("span", { key: 'd73a9837cb6a6df740300a4f52c35dd7f9499e73', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (index.h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), index.h("input", { key: '77a53ca7c0b51268813238d80db56a9b9449c3f9', class: "s-hidden", name: this.name, required: this.required, value: this.getLatLng(), ref: color => this.mapInput = color })));
768
+ }
769
+ get host() { return index.getElement(this); }
770
+ };
771
+ SallaMap.style = sallaMapCss;
772
+
773
+ exports.salla_accordion_body = SallaAccordionBody;
774
+ exports.salla_accordion_head = SallaAccordionHead;
775
+ exports.salla_map = SallaMap;