blue-chestnut-solar-expert 0.0.67 → 0.0.68

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 (333) hide show
  1. package/dist/stencil-library/assets/tutorial4.mp4 +0 -0
  2. package/dist/{collection/config.js → stencil-library/config-CWfV1nKn.js} +10 -4
  3. package/dist/stencil-library/config-CWfV1nKn.js.map +1 -0
  4. package/dist/stencil-library/constants-hboFofU4.js +1522 -0
  5. package/dist/stencil-library/constants-hboFofU4.js.map +1 -0
  6. package/dist/stencil-library/decoder-DNOvLSaS.js +39 -0
  7. package/dist/stencil-library/decoder-DNOvLSaS.js.map +1 -0
  8. package/dist/stencil-library/deflate-0Vdd6-55.js +21 -0
  9. package/dist/{esm/deflate-DHgPf9CO.js.map → stencil-library/deflate-0Vdd6-55.js.map} +1 -1
  10. package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -0
  11. package/dist/{components/p-CL74Q4VR.js → stencil-library/eraser-icon.entry.js} +9 -27
  12. package/dist/stencil-library/eraser-icon.entry.js.map +1 -0
  13. package/dist/stencil-library/house-icon.entry.esm.js.map +1 -0
  14. package/dist/{components/p-D8w3bTPO.js → stencil-library/house-icon.entry.js} +9 -27
  15. package/dist/stencil-library/house-icon.entry.js.map +1 -0
  16. package/dist/{components/loading-widget.js → stencil-library/icon-selector.entry.esm.js.map} +1 -38
  17. package/dist/stencil-library/icon-selector.entry.js +47 -0
  18. package/dist/stencil-library/icon-selector.entry.js.map +1 -0
  19. package/dist/stencil-library/index-CChkgM3J.js +414 -0
  20. package/dist/stencil-library/index-CChkgM3J.js.map +1 -0
  21. package/dist/stencil-library/index-ICfDNUMe.js +4172 -0
  22. package/dist/stencil-library/index-ICfDNUMe.js.map +1 -0
  23. package/dist/stencil-library/index.esm.js +13 -1
  24. package/dist/stencil-library/index.esm.js.map +1 -1
  25. package/dist/{esm/jpeg-CJLm1GkA.js → stencil-library/jpeg-Dd5nnHR5.js} +11 -3
  26. package/dist/stencil-library/jpeg-Dd5nnHR5.js.map +1 -0
  27. package/dist/{components/p-BcVa4_YP.js → stencil-library/lerc-7W4E8EBs.js} +27 -1981
  28. package/dist/stencil-library/lerc-7W4E8EBs.js.map +1 -0
  29. package/dist/{esm → stencil-library}/loading-widget.entry.js +3 -3
  30. package/dist/{components/p-P28NBglk.js.map → stencil-library/loading-widget.entry.js.map} +1 -1
  31. package/dist/{esm/lzw-DaOzWJUD.js → stencil-library/lzw--P4c0ZHH.js} +10 -4
  32. package/dist/stencil-library/lzw--P4c0ZHH.js.map +1 -0
  33. package/dist/stencil-library/map-draw-Cx9WZoKH.js +25567 -0
  34. package/dist/stencil-library/map-draw-Cx9WZoKH.js.map +1 -0
  35. package/dist/stencil-library/map-draw.entry.esm.js.map +1 -0
  36. package/dist/stencil-library/map-draw.entry.js +12 -0
  37. package/dist/stencil-library/map-draw.entry.js.map +1 -0
  38. package/dist/stencil-library/map-selector.entry.esm.js.map +1 -0
  39. package/dist/{components/p-C5QieOat.js → stencil-library/map-selector.entry.js} +164 -96
  40. package/dist/stencil-library/map-selector.entry.js.map +1 -0
  41. package/dist/{components/loading-widget.js.map → stencil-library/marker-icon.entry.esm.js.map} +1 -1
  42. package/dist/{components/p-Umz6nJIv.js → stencil-library/marker-icon.entry.js} +9 -27
  43. package/dist/stencil-library/marker-icon.entry.js.map +1 -0
  44. package/dist/stencil-library/move-icon.entry.esm.js.map +1 -0
  45. package/dist/{components/p-FdEV2qPo.js → stencil-library/move-icon.entry.js} +9 -27
  46. package/dist/stencil-library/move-icon.entry.js.map +1 -0
  47. package/dist/{components/p-DTXeHbuh.js.map → stencil-library/octagon-minus-icon.entry.esm.js.map} +1 -1
  48. package/dist/{components/p-BJLO76Yi.js → stencil-library/octagon-minus-icon.entry.js} +9 -27
  49. package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -0
  50. package/dist/{components/p-ByX6QP-E.js → stencil-library/packbits-X3R_utTs.js} +9 -3
  51. package/dist/stencil-library/packbits-X3R_utTs.js.map +1 -0
  52. package/dist/stencil-library/pako.esm-CPorU236.js +6881 -0
  53. package/dist/{esm/pako.esm-B5WTRCh8.js.map → stencil-library/pako.esm-CPorU236.js.map} +1 -1
  54. package/dist/{components/p-B4X-RCW0.js.map → stencil-library/polygon-buttons.entry.esm.js.map} +1 -1
  55. package/dist/{cjs/loading-widget.cjs.entry.js → stencil-library/polygon-buttons.entry.js} +16 -10
  56. package/dist/stencil-library/polygon-buttons.entry.js.map +1 -0
  57. package/dist/{cjs/loading-widget.cjs.entry.js.map → stencil-library/polygon-information.entry.esm.js.map} +1 -1
  58. package/dist/{components/p-BFJHTJPM.js → stencil-library/polygon-information.entry.js} +13 -70
  59. package/dist/stencil-library/polygon-information.entry.js.map +1 -0
  60. package/dist/stencil-library/raw-BxukYehy.js +20 -0
  61. package/dist/stencil-library/raw-BxukYehy.js.map +1 -0
  62. package/dist/stencil-library/search-icon.entry.esm.js.map +1 -0
  63. package/dist/{components/p-DBwr8xSB.js → stencil-library/search-icon.entry.js} +9 -27
  64. package/dist/stencil-library/{p-ab0f2031.entry.js → search-icon.entry.js.map} +1 -2
  65. package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -0
  66. package/dist/{components/p-DTXeHbuh.js → stencil-library/settings-icon.entry.js} +9 -27
  67. package/dist/stencil-library/settings-icon.entry.js.map +1 -0
  68. package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -0
  69. package/dist/{components/p-B4X-RCW0.js → stencil-library/settings-modal.entry.js} +20 -38
  70. package/dist/stencil-library/settings-modal.entry.js.map +1 -0
  71. package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
  72. package/dist/{components/solar-expert.js → stencil-library/solar-expert.entry.js} +14 -150
  73. package/dist/{components/p-i1uLweD0.js.map → stencil-library/solar-expert.entry.js.map} +1 -1
  74. package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -0
  75. package/dist/stencil-library/solar-system-form.entry.js +553 -0
  76. package/dist/stencil-library/solar-system-form.entry.js.map +1 -0
  77. package/dist/stencil-library/stencil-library.esm.js +52 -1
  78. package/dist/stencil-library/stencil-library.esm.js.map +1 -1
  79. package/dist/{components/p-eDwaXClX.js → stencil-library/store-CcqrFuBK.js} +24 -3
  80. package/dist/stencil-library/store-CcqrFuBK.js.map +1 -0
  81. package/dist/stencil-library/toast-notification.entry.esm.js.map +1 -0
  82. package/dist/{components/p-P28NBglk.js → stencil-library/toast-notification.entry.js} +9 -30
  83. package/dist/stencil-library/toast-notification.entry.js.map +1 -0
  84. package/dist/stencil-library/tool-box.entry.esm.js.map +1 -0
  85. package/dist/{components/p-i1uLweD0.js → stencil-library/tool-box.entry.js} +27 -35
  86. package/dist/stencil-library/tool-box.entry.js.map +1 -0
  87. package/dist/{collection/utils/render/tools.js → stencil-library/tools-BNYKV5H5.js} +14 -8
  88. package/dist/stencil-library/tools-BNYKV5H5.js.map +1 -0
  89. package/dist/stencil-library/tutorial-component.entry.esm.js.map +1 -0
  90. package/dist/{components/p-Dzl6kfPI.js → stencil-library/tutorial-component.entry.js} +42 -35
  91. package/dist/stencil-library/tutorial-component.entry.js.map +1 -0
  92. package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -0
  93. package/dist/{components/p-waOPoUcA.js → stencil-library/undo-icon.entry.js} +9 -27
  94. package/dist/stencil-library/undo-icon.entry.js.map +1 -0
  95. package/dist/{collection/utils/utils.js → stencil-library/utils-BCUZxI9u.js} +9 -3
  96. package/dist/stencil-library/utils-BCUZxI9u.js.map +1 -0
  97. package/dist/{esm/webimage-BiHardhv.js → stencil-library/webimage-CBrfoxHM.js} +9 -3
  98. package/dist/{esm/webimage-BiHardhv.js.map → stencil-library/webimage-CBrfoxHM.js.map} +1 -1
  99. package/dist/types/components/map-draw/map-draw.d.ts +5 -0
  100. package/dist/types/components/map-draw/tutorial-component.d.ts +7 -0
  101. package/dist/types/components.d.ts +4 -0
  102. package/dist/types/types/lang.d.ts +7 -0
  103. package/package.json +1 -1
  104. package/dist/cjs/app-globals-I24yU8do.js +0 -10
  105. package/dist/cjs/app-globals-I24yU8do.js.map +0 -1
  106. package/dist/cjs/basedecoder-CQuzfSgz.js +0 -116
  107. package/dist/cjs/basedecoder-CQuzfSgz.js.map +0 -1
  108. package/dist/cjs/deflate-AzGzQSW2.js +0 -17
  109. package/dist/cjs/deflate-AzGzQSW2.js.map +0 -1
  110. package/dist/cjs/eraser-icon_19.cjs.entry.js +0 -31
  111. package/dist/cjs/eraser-icon_19.cjs.entry.js.map +0 -1
  112. package/dist/cjs/index-HgRXF6kp.js +0 -1470
  113. package/dist/cjs/index-HgRXF6kp.js.map +0 -1
  114. package/dist/cjs/index.cjs.js +0 -7
  115. package/dist/cjs/index.cjs.js.map +0 -1
  116. package/dist/cjs/jpeg-Bx3bTm32.js +0 -904
  117. package/dist/cjs/jpeg-Bx3bTm32.js.map +0 -1
  118. package/dist/cjs/lerc-v64rYVDy.js +0 -4427
  119. package/dist/cjs/lerc-v64rYVDy.js.map +0 -1
  120. package/dist/cjs/loader.cjs.js +0 -18
  121. package/dist/cjs/loader.cjs.js.map +0 -1
  122. package/dist/cjs/loading-widget.entry.cjs.js.map +0 -1
  123. package/dist/cjs/lzw-BmFug486.js +0 -140
  124. package/dist/cjs/lzw-BmFug486.js.map +0 -1
  125. package/dist/cjs/packbits-CYx9fB0v.js +0 -35
  126. package/dist/cjs/packbits-CYx9fB0v.js.map +0 -1
  127. package/dist/cjs/pako.esm-0mKI6Jik.js +0 -3243
  128. package/dist/cjs/pako.esm-0mKI6Jik.js.map +0 -1
  129. package/dist/cjs/raw-DC82yoyr.js +0 -16
  130. package/dist/cjs/raw-DC82yoyr.js.map +0 -1
  131. package/dist/cjs/stencil-library.cjs.js +0 -30
  132. package/dist/cjs/stencil-library.cjs.js.map +0 -1
  133. package/dist/cjs/webimage-Dc0t2xAB.js +0 -49
  134. package/dist/cjs/webimage-Dc0t2xAB.js.map +0 -1
  135. package/dist/collection/collection-manifest.json +0 -31
  136. package/dist/collection/components/icons/eraser.js +0 -64
  137. package/dist/collection/components/icons/eraser.js.map +0 -1
  138. package/dist/collection/components/icons/house.js +0 -64
  139. package/dist/collection/components/icons/house.js.map +0 -1
  140. package/dist/collection/components/icons/icon.js +0 -108
  141. package/dist/collection/components/icons/icon.js.map +0 -1
  142. package/dist/collection/components/icons/marker.js +0 -64
  143. package/dist/collection/components/icons/marker.js.map +0 -1
  144. package/dist/collection/components/icons/move.js +0 -64
  145. package/dist/collection/components/icons/move.js.map +0 -1
  146. package/dist/collection/components/icons/octagonMinus.js +0 -64
  147. package/dist/collection/components/icons/octagonMinus.js.map +0 -1
  148. package/dist/collection/components/icons/search.js +0 -64
  149. package/dist/collection/components/icons/search.js.map +0 -1
  150. package/dist/collection/components/icons/settings.js +0 -64
  151. package/dist/collection/components/icons/settings.js.map +0 -1
  152. package/dist/collection/components/icons/undo.js +0 -64
  153. package/dist/collection/components/icons/undo.js.map +0 -1
  154. package/dist/collection/components/map-draw/map-draw.js +0 -795
  155. package/dist/collection/components/map-draw/map-draw.js.map +0 -1
  156. package/dist/collection/components/map-draw/map-selector.js +0 -246
  157. package/dist/collection/components/map-draw/map-selector.js.map +0 -1
  158. package/dist/collection/components/map-draw/polygon-buttons.js +0 -86
  159. package/dist/collection/components/map-draw/polygon-buttons.js.map +0 -1
  160. package/dist/collection/components/map-draw/polygon-information.js +0 -211
  161. package/dist/collection/components/map-draw/polygon-information.js.map +0 -1
  162. package/dist/collection/components/map-draw/tool-box.js +0 -108
  163. package/dist/collection/components/map-draw/tool-box.js.map +0 -1
  164. package/dist/collection/components/map-draw/tutorial-component.js +0 -151
  165. package/dist/collection/components/map-draw/tutorial-component.js.map +0 -1
  166. package/dist/collection/components/settings/settings.js +0 -127
  167. package/dist/collection/components/settings/settings.js.map +0 -1
  168. package/dist/collection/components/solar-expert/solar-expert.js +0 -241
  169. package/dist/collection/components/solar-expert/solar-expert.js.map +0 -1
  170. package/dist/collection/components/solar-system-form/solar-system-form.js +0 -596
  171. package/dist/collection/components/solar-system-form/solar-system-form.js.map +0 -1
  172. package/dist/collection/components/widgets/loading-widget.js +0 -18
  173. package/dist/collection/components/widgets/loading-widget.js.map +0 -1
  174. package/dist/collection/components/widgets/toast-notification.js +0 -133
  175. package/dist/collection/components/widgets/toast-notification.js.map +0 -1
  176. package/dist/collection/config.js.map +0 -1
  177. package/dist/collection/constants.js +0 -90
  178. package/dist/collection/constants.js.map +0 -1
  179. package/dist/collection/index.js +0 -2
  180. package/dist/collection/index.js.map +0 -1
  181. package/dist/collection/output.css +0 -1126
  182. package/dist/collection/store.js +0 -43
  183. package/dist/collection/store.js.map +0 -1
  184. package/dist/collection/types/lang.js +0 -2
  185. package/dist/collection/types/lang.js.map +0 -1
  186. package/dist/collection/types/shapes.js +0 -2
  187. package/dist/collection/types/shapes.js.map +0 -1
  188. package/dist/collection/utils/api.js +0 -93
  189. package/dist/collection/utils/api.js.map +0 -1
  190. package/dist/collection/utils/images.js +0 -2
  191. package/dist/collection/utils/images.js.map +0 -1
  192. package/dist/collection/utils/lang/english.js +0 -157
  193. package/dist/collection/utils/lang/english.js.map +0 -1
  194. package/dist/collection/utils/lang/general.js +0 -30
  195. package/dist/collection/utils/lang/general.js.map +0 -1
  196. package/dist/collection/utils/lang/german.js +0 -157
  197. package/dist/collection/utils/lang/german.js.map +0 -1
  198. package/dist/collection/utils/lang/spanish.js +0 -157
  199. package/dist/collection/utils/lang/spanish.js.map +0 -1
  200. package/dist/collection/utils/render/tools.js.map +0 -1
  201. package/dist/collection/utils/solar.js +0 -136
  202. package/dist/collection/utils/solar.js.map +0 -1
  203. package/dist/collection/utils/theme.js +0 -97
  204. package/dist/collection/utils/theme.js.map +0 -1
  205. package/dist/collection/utils/utils.js.map +0 -1
  206. package/dist/components/eraser-icon.js +0 -11
  207. package/dist/components/eraser-icon.js.map +0 -1
  208. package/dist/components/house-icon.js +0 -11
  209. package/dist/components/house-icon.js.map +0 -1
  210. package/dist/components/icon-selector.js +0 -11
  211. package/dist/components/icon-selector.js.map +0 -1
  212. package/dist/components/index.js +0 -1269
  213. package/dist/components/index.js.map +0 -1
  214. package/dist/components/map-draw.js +0 -11
  215. package/dist/components/map-draw.js.map +0 -1
  216. package/dist/components/map-selector.js +0 -11
  217. package/dist/components/map-selector.js.map +0 -1
  218. package/dist/components/marker-icon.js +0 -11
  219. package/dist/components/marker-icon.js.map +0 -1
  220. package/dist/components/move-icon.js +0 -11
  221. package/dist/components/move-icon.js.map +0 -1
  222. package/dist/components/octagon-minus-icon.js +0 -11
  223. package/dist/components/octagon-minus-icon.js.map +0 -1
  224. package/dist/components/p-B54Ul0nf.js +0 -15
  225. package/dist/components/p-B54Ul0nf.js.map +0 -1
  226. package/dist/components/p-B5WTRCh8.js +0 -3241
  227. package/dist/components/p-B5WTRCh8.js.map +0 -1
  228. package/dist/components/p-BFJHTJPM.js.map +0 -1
  229. package/dist/components/p-BGoSj_DR.js +0 -902
  230. package/dist/components/p-BGoSj_DR.js.map +0 -1
  231. package/dist/components/p-BJLO76Yi.js.map +0 -1
  232. package/dist/components/p-BcVa4_YP.js.map +0 -1
  233. package/dist/components/p-Bopprtc7.js +0 -623
  234. package/dist/components/p-Bopprtc7.js.map +0 -1
  235. package/dist/components/p-ByX6QP-E.js.map +0 -1
  236. package/dist/components/p-C5QieOat.js.map +0 -1
  237. package/dist/components/p-CL74Q4VR.js.map +0 -1
  238. package/dist/components/p-Cgchl6bA.js +0 -47
  239. package/dist/components/p-Cgchl6bA.js.map +0 -1
  240. package/dist/components/p-D8w3bTPO.js.map +0 -1
  241. package/dist/components/p-DBwr8xSB.js.map +0 -1
  242. package/dist/components/p-DWirjxpO.js +0 -163
  243. package/dist/components/p-DWirjxpO.js.map +0 -1
  244. package/dist/components/p-DlNHVTGB.js +0 -15949
  245. package/dist/components/p-DlNHVTGB.js.map +0 -1
  246. package/dist/components/p-Dzl6kfPI.js.map +0 -1
  247. package/dist/components/p-FdEV2qPo.js.map +0 -1
  248. package/dist/components/p-PkMjF2if.js +0 -1985
  249. package/dist/components/p-PkMjF2if.js.map +0 -1
  250. package/dist/components/p-Umz6nJIv.js.map +0 -1
  251. package/dist/components/p-WmcSqXD8.js +0 -14
  252. package/dist/components/p-WmcSqXD8.js.map +0 -1
  253. package/dist/components/p-eDwaXClX.js.map +0 -1
  254. package/dist/components/p-j-vOrhhh.js +0 -114
  255. package/dist/components/p-j-vOrhhh.js.map +0 -1
  256. package/dist/components/p-q8auDIJ2.js +0 -138
  257. package/dist/components/p-q8auDIJ2.js.map +0 -1
  258. package/dist/components/p-waOPoUcA.js.map +0 -1
  259. package/dist/components/polygon-buttons.js +0 -11
  260. package/dist/components/polygon-buttons.js.map +0 -1
  261. package/dist/components/polygon-information.js +0 -11
  262. package/dist/components/polygon-information.js.map +0 -1
  263. package/dist/components/search-icon.js +0 -11
  264. package/dist/components/search-icon.js.map +0 -1
  265. package/dist/components/settings-icon.js +0 -11
  266. package/dist/components/settings-icon.js.map +0 -1
  267. package/dist/components/settings-modal.js +0 -11
  268. package/dist/components/settings-modal.js.map +0 -1
  269. package/dist/components/solar-expert.js.map +0 -1
  270. package/dist/components/solar-system-form.js +0 -11
  271. package/dist/components/solar-system-form.js.map +0 -1
  272. package/dist/components/toast-notification.js +0 -11
  273. package/dist/components/toast-notification.js.map +0 -1
  274. package/dist/components/tool-box.js +0 -11
  275. package/dist/components/tool-box.js.map +0 -1
  276. package/dist/components/tutorial-component.js +0 -11
  277. package/dist/components/tutorial-component.js.map +0 -1
  278. package/dist/components/undo-icon.js +0 -11
  279. package/dist/components/undo-icon.js.map +0 -1
  280. package/dist/esm/basedecoder-j-vOrhhh.js +0 -114
  281. package/dist/esm/basedecoder-j-vOrhhh.js.map +0 -1
  282. package/dist/esm/deflate-DHgPf9CO.js +0 -15
  283. package/dist/esm/eraser-icon_19.entry.js +0 -7
  284. package/dist/esm/eraser-icon_19.entry.js.map +0 -1
  285. package/dist/esm/index-C2JRBB5c.js +0 -1458
  286. package/dist/esm/index-C2JRBB5c.js.map +0 -1
  287. package/dist/esm/index.js +0 -5
  288. package/dist/esm/index.js.map +0 -1
  289. package/dist/esm/jpeg-CJLm1GkA.js.map +0 -1
  290. package/dist/esm/lerc-CAiDQjTu.js +0 -4424
  291. package/dist/esm/lerc-CAiDQjTu.js.map +0 -1
  292. package/dist/esm/loader.js +0 -16
  293. package/dist/esm/loader.js.map +0 -1
  294. package/dist/esm/loading-widget.entry.js.map +0 -1
  295. package/dist/esm/lzw-DaOzWJUD.js.map +0 -1
  296. package/dist/esm/packbits-CZPyx9kx.js +0 -33
  297. package/dist/esm/packbits-CZPyx9kx.js.map +0 -1
  298. package/dist/esm/pako.esm-B5WTRCh8.js +0 -3241
  299. package/dist/esm/raw-pqeeWc2_.js +0 -14
  300. package/dist/esm/raw-pqeeWc2_.js.map +0 -1
  301. package/dist/esm/stencil-library.js +0 -26
  302. package/dist/esm/stencil-library.js.map +0 -1
  303. package/dist/index.cjs.js +0 -1
  304. package/dist/index.js +0 -1
  305. package/dist/stencil-library/p-B54Ul0nf.js +0 -2
  306. package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
  307. package/dist/stencil-library/p-B5WTRCh8.js +0 -2
  308. package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
  309. package/dist/stencil-library/p-BBtmpSUK.js +0 -2
  310. package/dist/stencil-library/p-BBtmpSUK.js.map +0 -1
  311. package/dist/stencil-library/p-BGoSj_DR.js +0 -2
  312. package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
  313. package/dist/stencil-library/p-ByX6QP-E.js +0 -2
  314. package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
  315. package/dist/stencil-library/p-C2JRBB5c.js +0 -3
  316. package/dist/stencil-library/p-C2JRBB5c.js.map +0 -1
  317. package/dist/stencil-library/p-CX8V3eiN.js +0 -2
  318. package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
  319. package/dist/stencil-library/p-Cgchl6bA.js +0 -2
  320. package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
  321. package/dist/stencil-library/p-WmcSqXD8.js +0 -2
  322. package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
  323. package/dist/stencil-library/p-ab0f2031.entry.js.map +0 -1
  324. package/dist/stencil-library/p-cAuhy_jT.js +0 -10
  325. package/dist/stencil-library/p-cAuhy_jT.js.map +0 -1
  326. package/dist/stencil-library/p-e7b94dbb.entry.js +0 -2
  327. package/dist/stencil-library/p-e7b94dbb.entry.js.map +0 -1
  328. package/dist/stencil-library/p-j-vOrhhh.js +0 -2
  329. package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
  330. package/dist/stencil-library/p-q8auDIJ2.js +0 -2
  331. package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
  332. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js +0 -0
  333. /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js.map +0 -0
@@ -1,127 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { state } from "../../store";
3
- import { getLanguageStrings } from "../../utils/lang/general";
4
- export class SettingsModal {
5
- settings;
6
- tempSettings;
7
- close;
8
- save;
9
- componentWillLoad() {
10
- this.tempSettings = { ...this.settings };
11
- }
12
- handleClose = () => {
13
- if (JSON.stringify(this.tempSettings) !== JSON.stringify(this.settings)) {
14
- if (confirm("Are you sure you want to close without saving your changes?")) {
15
- this.close.emit();
16
- }
17
- }
18
- else {
19
- this.close.emit();
20
- }
21
- };
22
- handleSave = () => {
23
- this.save.emit(this.tempSettings);
24
- this.close.emit();
25
- };
26
- handleInputChange = (key, value) => {
27
- this.tempSettings = {
28
- ...this.tempSettings,
29
- [key]: value,
30
- };
31
- };
32
- render() {
33
- const t = getLanguageStrings(state.settings.language);
34
- return (h("div", { key: 'f8adde9c8ec92d9d2caca001d4358b18ef6dcf22', class: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50" }, h("div", { key: 'f86948becd9cbb35699cc7cdb1b740c61c5a92be', class: "bg-primary rounded-4xl p-6 w-full max-w-md" }, h("div", { key: 'dc629294bd72ac8793437f088db6ead138444389', class: "flex justify-between items-center mb-6" }, h("h2", { key: '5275b04e13886fde9ad977e44098e915fe6702c0', class: "text-xl font-semibold" }, "Settings"), h("button", { key: 'd0954c45456b41892e6511490c70bcb23bc27e78', class: "p-2 hover:bg-hover rounded-full transition-colors", onClick: this.handleClose }, h("svg", { key: 'e173c9534276c991321515f0aa167431b0f0608a', xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("line", { key: '8975863f8837563fc49f9f0cb5efa733503b6992', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: 'c6b7e15639ad9ff113c1357f42078eb8f11a17f8', x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { key: '2fd90d727eb23c803e1dc8bac4143d41e3e2bde1', class: "space-y-4" }, h("div", { key: '7f866dc7351eee4483286c97406648f9c41a995a' }, h("h3", { key: '5f67f8e1f8c1d2998a7a4a463b6166095ebf35e9', class: "text-sm font-medium text-text-muted mb-1" }, "Debug Information"), h("p", { key: 'f7d22c9b296bbd68d08053642210c41993b54a04', class: "text-sm text-text-muted mb-1" }, "state: ", JSON.stringify(state, null, 2)), h("p", { key: '2ba352667ead4c79194688088afaf48e82e8b88f', class: "text-sm text-text-muted mb-1" }, navigator.userAgent), h("p", { key: 'ee8418f9442c9f0fb8b526bced2787321304e243', class: "text-sm text-text-muted mb-1" }, navigator.userAgent.indexOf("Safari")), h("p", { key: '928da60fdd93e326f3b0c6233228d0ecb0b7461f', class: "text-sm text-text-muted mb-1" }, "maxTouchPoints: ", navigator.maxTouchPoints), h("p", { key: '27d8913514c45e44a607a97538dc47a1754a1263', class: "text-sm text-text-muted mb-1" }, "iPhone: ", navigator.userAgent.indexOf("iPhone")), h("p", { key: 'ad0155fff5ee858cb338661cf4039c97381029d1', class: "text-sm text-text-muted mb-1" }, "Mac OS: ", navigator.userAgent.indexOf("Mac OS"))), h("div", { key: 'bab9021c0c22ab656b75ea5ea3321dd45ba209b0' }, h("label", { key: '1411e069e5acf902f960c9130b06e862ff53685f', class: "block text-sm font-medium text-text-muted mb-1" }, t.settings.language), h("select", { key: '0312d7334c9f7bb619a7480d0776cba287fb580d', class: "w-full bg-muted rounded-4xl p-2", onInput: (e) => this.handleInputChange("language", e.target
35
- .value) }, h("option", { key: 'cd80c13fa677be9ca05690f576b1efb1c433f269', value: "en", selected: this.tempSettings.language ===
36
- "en" }, "English"), h("option", { key: '874acf8419b05629157f6467faad007be40c0de8', value: "es", selected: this.tempSettings.language ===
37
- "es" }, "Espa\u00F1ol"), h("option", { key: '489d41d87fcbdfce1f4dd7f436e5015ddce75681', value: "de", selected: this.tempSettings.language ===
38
- "de" }, "Deutsch"))), h("div", { key: '1cf1f983c2f49d3df1642667c93e637277cca1d1' }, h("label", { key: '858efaf32c6d82f2e4aa89437d8fd6f123f357d8', class: "block text-sm font-medium text-text-muted mb-1" }, t.settings.rowSpacing), h("input", { key: '17b7e31de97cd5c2f5c6f4e57f8fd565b093fda9', type: "number", class: "w-full bg-muted rounded-4xl p-2", value: this.tempSettings.rowSpacing, onInput: (e) => this.handleInputChange("rowSpacing", parseFloat(e.target
39
- .value)) })), h("div", { key: '527179b5c712ec4d6b3994e6fb961a3a7b630c07' }, h("label", { key: 'f6f0654291f3b1c30b213da3c788e2dc46ca0621', class: "block text-sm font-medium text-text-muted mb-1" }, t.settings.columnSpacing), h("input", { key: 'e9fd2507ad7b1be2571effeef376599acc70898e', type: "number", class: "w-full bg-muted rounded-4xl p-2", value: this.tempSettings.columnSpacing, onInput: (e) => this.handleInputChange("columnSpacing", parseFloat(e.target
40
- .value)) })), h("div", { key: '57b0482cec138051d14c79150a6abd706af9b087' }, h("label", { key: '0cd3d56a354a4da3d5612ceec5b681b3fb0b8957', class: "block text-sm font-medium text-text-muted mb-1" }, t.settings.borderInset), h("input", { key: '596eb5aa465a8dedf0b230c426639720574654a9', type: "number", class: "w-full bg-muted rounded-4xl p-2", value: this.tempSettings.borderInset, onInput: (e) => this.handleInputChange("borderInset", parseFloat(e.target
41
- .value)) }))), h("div", { key: '7cda03ddb1ddbd7c0fc665b3163435622a97d6fd', class: "flex justify-end gap-4 mt-6" }, h("button", { key: '599f77090826bf664ab39137237542ece58aa5fd', class: "px-4 py-2 bg-surface rounded-4xl hover:bg-surface-hover transition-colors", onClick: this.handleClose }, "Cancel"), h("button", { key: 'c1c8b7ff81aea710e265bdab96c9bd4e5f0e1dac', class: "px-4 py-2 bg-secondary text-muted rounded-4xl hover:bg-text-secondary transition-colors", onClick: this.handleSave }, "Save Changes")))));
42
- }
43
- static get is() { return "settings-modal"; }
44
- static get originalStyleUrls() {
45
- return {
46
- "$": ["../../output.css"]
47
- };
48
- }
49
- static get styleUrls() {
50
- return {
51
- "$": ["../../output.css"]
52
- };
53
- }
54
- static get properties() {
55
- return {
56
- "settings": {
57
- "type": "unknown",
58
- "attribute": "settings",
59
- "mutable": false,
60
- "complexType": {
61
- "original": "Settings",
62
- "resolved": "Settings",
63
- "references": {
64
- "Settings": {
65
- "location": "import",
66
- "path": "../../store",
67
- "id": "src/store.ts::Settings"
68
- }
69
- }
70
- },
71
- "required": false,
72
- "optional": false,
73
- "docs": {
74
- "tags": [],
75
- "text": ""
76
- },
77
- "getter": false,
78
- "setter": false
79
- }
80
- };
81
- }
82
- static get states() {
83
- return {
84
- "tempSettings": {}
85
- };
86
- }
87
- static get events() {
88
- return [{
89
- "method": "close",
90
- "name": "close",
91
- "bubbles": true,
92
- "cancelable": true,
93
- "composed": true,
94
- "docs": {
95
- "tags": [],
96
- "text": ""
97
- },
98
- "complexType": {
99
- "original": "void",
100
- "resolved": "void",
101
- "references": {}
102
- }
103
- }, {
104
- "method": "save",
105
- "name": "save",
106
- "bubbles": true,
107
- "cancelable": true,
108
- "composed": true,
109
- "docs": {
110
- "tags": [],
111
- "text": ""
112
- },
113
- "complexType": {
114
- "original": "Settings",
115
- "resolved": "Settings",
116
- "references": {
117
- "Settings": {
118
- "location": "import",
119
- "path": "../../store",
120
- "id": "src/store.ts::Settings"
121
- }
122
- }
123
- }
124
- }];
125
- }
126
- }
127
- //# sourceMappingURL=settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/components/settings/settings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAY,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,MAAM,OAAO,aAAa;IAEtB,QAAQ,CAAW;IAGX,YAAY,CAAW;IAG/B,KAAK,CAAqB;IAG1B,IAAI,CAAyB;IAE7B,iBAAiB;QACb,IAAI,CAAC,YAAY,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAEO,WAAW,GAAG,GAAG,EAAE;QACvB,IACI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EACrE,CAAC;YACC,IACI,OAAO,CACH,6DAA6D,CAChE,EACH,CAAC;gBACC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACtB,CAAC;QACL,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;IACL,CAAC,CAAC;IAEM,UAAU,GAAG,GAAG,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC,CAAC;IAEM,iBAAiB,GAAG,CACxB,GAAmB,EACnB,KAAwB,EAC1B,EAAE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CACrB;wBACR,8DACI,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iCAAiC,EACvC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,aAAa,EACtC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACX,IAAI,CAAC,iBAAiB,CAClB,eAAe,EACf,UAAU,CACL,CAAC,CAAC,MAA2B;iCACzB,KAAK,CACb,CACJ,GACP,CACA;oBAEN;wBACI,8DAAO,KAAK,EAAC,gDAAgD,IACxD,CAAC,CAAC,QAAQ,CAAC,WAAW,CACnB;wBACR,8DACI,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,iCAAiC,EACvC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,WAAW,EACpC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CACX,IAAI,CAAC,iBAAiB,CAClB,aAAa,EACb,UAAU,CACL,CAAC,CAAC,MAA2B;iCACzB,KAAK,CACb,CACJ,GACP,CACA,CACJ;gBAEN,4DAAK,KAAK,EAAC,6BAA6B;oBACpC,+DACI,KAAK,EAAC,2EAA2E,EACjF,OAAO,EAAE,IAAI,CAAC,WAAW,aAGpB;oBACT,+DACI,KAAK,EAAC,yFAAyF,EAC/F,OAAO,EAAE,IAAI,CAAC,UAAU,mBAGnB,CACP,CACJ,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Event, EventEmitter, h, Prop, State } from \"@stencil/core\";\r\nimport { Settings, state } from \"../../store\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { Language } from \"../../types/lang\";\r\n\r\n@Component({\r\n tag: \"settings-modal\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class SettingsModal {\r\n @Prop()\r\n settings: Settings;\r\n\r\n @State()\r\n private tempSettings: Settings;\r\n\r\n @Event()\r\n close: EventEmitter<void>;\r\n\r\n @Event()\r\n save: EventEmitter<Settings>;\r\n\r\n componentWillLoad() {\r\n this.tempSettings = { ...this.settings };\r\n }\r\n\r\n private handleClose = () => {\r\n if (\r\n JSON.stringify(this.tempSettings) !== JSON.stringify(this.settings)\r\n ) {\r\n if (\r\n confirm(\r\n \"Are you sure you want to close without saving your changes?\",\r\n )\r\n ) {\r\n this.close.emit();\r\n }\r\n } else {\r\n this.close.emit();\r\n }\r\n };\r\n\r\n private handleSave = () => {\r\n this.save.emit(this.tempSettings);\r\n this.close.emit();\r\n };\r\n\r\n private handleInputChange = (\r\n key: keyof Settings,\r\n value: number | Language,\r\n ) => {\r\n this.tempSettings = {\r\n ...this.tempSettings,\r\n [key]: value,\r\n };\r\n };\r\n\r\n render() {\r\n const t = getLanguageStrings(state.settings.language);\r\n return (\r\n <div class=\"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50\">\r\n <div class=\"bg-primary rounded-4xl p-6 w-full max-w-md\">\r\n <div class=\"flex justify-between items-center mb-6\">\r\n <h2 class=\"text-xl font-semibold\">Settings</h2>\r\n <button\r\n class=\"p-2 hover:bg-hover rounded-full transition-colors\"\r\n onClick={this.handleClose}\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\r\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"space-y-4\">\r\n <div>\r\n <h3 class=\"text-sm font-medium text-text-muted mb-1\">\r\n Debug Information\r\n </h3>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n state: {JSON.stringify(state, null, 2)}\r\n </p>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n {navigator.userAgent}\r\n </p>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n {navigator.userAgent.indexOf(\"Safari\")}\r\n </p>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n maxTouchPoints: {navigator.maxTouchPoints}\r\n </p>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n iPhone: {navigator.userAgent.indexOf(\"iPhone\")}\r\n </p>\r\n <p class=\"text-sm text-text-muted mb-1\">\r\n Mac OS: {navigator.userAgent.indexOf(\"Mac OS\")}\r\n </p>\r\n </div>\r\n <div>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.settings.language}\r\n </label>\r\n <select\r\n class=\"w-full bg-muted rounded-4xl p-2\"\r\n onInput={(e) =>\r\n this.handleInputChange(\r\n \"language\",\r\n (e.target as HTMLSelectElement)\r\n .value as Language,\r\n )}\r\n >\r\n <option\r\n value=\"en\"\r\n selected={this.tempSettings.language ===\r\n \"en\"}\r\n >\r\n English\r\n </option>\r\n <option\r\n value=\"es\"\r\n selected={this.tempSettings.language ===\r\n \"es\"}\r\n >\r\n Español\r\n </option>\r\n <option\r\n value=\"de\"\r\n selected={this.tempSettings.language ===\r\n \"de\"}\r\n >\r\n Deutsch\r\n </option>\r\n </select>\r\n </div>\r\n\r\n <div>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.settings.rowSpacing}\r\n </label>\r\n <input\r\n type=\"number\"\r\n class=\"w-full bg-muted rounded-4xl p-2\"\r\n value={this.tempSettings.rowSpacing}\r\n onInput={(e) =>\r\n this.handleInputChange(\r\n \"rowSpacing\",\r\n parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n ),\r\n )}\r\n />\r\n </div>\r\n\r\n <div>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.settings.columnSpacing}\r\n </label>\r\n <input\r\n type=\"number\"\r\n class=\"w-full bg-muted rounded-4xl p-2\"\r\n value={this.tempSettings.columnSpacing}\r\n onInput={(e) =>\r\n this.handleInputChange(\r\n \"columnSpacing\",\r\n parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n ),\r\n )}\r\n />\r\n </div>\r\n\r\n <div>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.settings.borderInset}\r\n </label>\r\n <input\r\n type=\"number\"\r\n class=\"w-full bg-muted rounded-4xl p-2\"\r\n value={this.tempSettings.borderInset}\r\n onInput={(e) =>\r\n this.handleInputChange(\r\n \"borderInset\",\r\n parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n ),\r\n )}\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex justify-end gap-4 mt-6\">\r\n <button\r\n class=\"px-4 py-2 bg-surface rounded-4xl hover:bg-surface-hover transition-colors\"\r\n onClick={this.handleClose}\r\n >\r\n Cancel\r\n </button>\r\n <button\r\n class=\"px-4 py-2 bg-secondary text-muted rounded-4xl hover:bg-text-secondary transition-colors\"\r\n onClick={this.handleSave}\r\n >\r\n Save Changes\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,241 +0,0 @@
1
- import { Env, h } from "@stencil/core";
2
- import { Loader } from "@googlemaps/js-api-loader";
3
- import { getLanguageStrings } from "../../utils/lang/general";
4
- import { onChange, state } from "../../store";
5
- import { DEFAULT_COLOR_SCHEME } from "../../config";
6
- import { applyThemeGlobally, applyThemeToElement } from "../../utils/theme";
7
- export class SolarExpert {
8
- el;
9
- apiKey = Env.GOOGLE_MAPS_API_KEY;
10
- language = "en";
11
- colorScheme = null;
12
- // {
13
- // primary: "hsl(0 0% 100%)",
14
- // secondary: "hsl(0 0% 100%)",
15
- // tertiary: "hsl(0 0% 100%)",
16
- // muted: "hsl(0 0% 100%)",
17
- // error: "hsl(0 0% 100%)",
18
- // // secondary: "hsl(180 100% 25%)",
19
- // // tertiary: "hsl(24 100% 18%)",
20
- // // muted: "hsl(0 0% 85%)",
21
- // // error: "hsl(240 75% 29%)",
22
- // primaryForeground: "hsl(0 0% 100%)",
23
- // secondaryForeground: "hsl(0 0% 100%)",
24
- // tertiaryForeground: "hsl(0 0% 100%)",
25
- // mutedForeground: "hsl(0 0% 100%)",
26
- // errorForeground: "hsl(0 0% 100%)",
27
- // surface: "hsl(0 0% 100%)",
28
- // surfaceHover: "hsl(0 0% 100%)",
29
- // surfaceActive: "hsl(0 0% 100%)",
30
- // // Text colors
31
- // textMuted: "hsl(0 0% 100%)",
32
- // textSecondary: "hsl(0 0% 100%)",
33
- // textPlaceholder: "hsl(0 0% 100%)",
34
- // // Border colors
35
- // border: "hsl(0 0% 100%)",
36
- // borderLight: "hsl(0 0% 100%)",
37
- // // Status colors
38
- // success: "hsl(0 0% 100%)",
39
- // info: "hsl(0 0% 100%)",
40
- // // Interactive colors
41
- // hover: "hsl(0 0% 100%)",
42
- // hoverDark: "hsl(0 0% 100%)",
43
- // overlay: "hsl(0 0% 100%)",
44
- // tooltip: "hsl(0 0% 100%)",
45
- // };
46
- latitude = 40.581614;
47
- longitude = -4.128423;
48
- isLoaded = false;
49
- autocomplete = null;
50
- place = null;
51
- showMapSelector = false;
52
- inputElement;
53
- componentWillLoad() {
54
- state.isMobile =
55
- /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
56
- .test(navigator.userAgent) || window.innerWidth < 768;
57
- this.loadGoogleMapsScript();
58
- onChange("latitude", () => {
59
- if (this.showMapSelector) {
60
- this.showMapSelector = false;
61
- this.scrollToMapDraw();
62
- }
63
- });
64
- state.settings.language = this.language;
65
- const isIPhone = navigator.userAgent.indexOf("iPhone") != -1;
66
- const isMac = navigator.userAgent.indexOf("Mac OS") != -1;
67
- state.isIOS = isIPhone || isMac;
68
- if (!this.colorScheme) {
69
- applyThemeToElement(this.el, DEFAULT_COLOR_SCHEME);
70
- applyThemeGlobally(DEFAULT_COLOR_SCHEME);
71
- }
72
- this.applyTheme();
73
- }
74
- colorSchemeChanged() {
75
- this.applyTheme();
76
- }
77
- applyTheme() {
78
- if (this.colorScheme) {
79
- // Apply theme globally for non-shadow components
80
- applyThemeGlobally(this.colorScheme);
81
- // Apply theme to this component's Shadow DOM host element
82
- applyThemeToElement(this.el, this.colorScheme);
83
- }
84
- }
85
- async loadGoogleMapsScript() {
86
- try {
87
- const loader = new Loader({
88
- apiKey: this.apiKey,
89
- libraries: ["places", "maps", "marker"],
90
- });
91
- const places = await loader.importLibrary("places");
92
- this.isLoaded = true;
93
- this.initializeAutocomplete(places);
94
- }
95
- catch (error) {
96
- console.error("Error loading Google Maps: ", error);
97
- }
98
- }
99
- initializeAutocomplete(places) {
100
- if (!this.inputElement || !this.isLoaded)
101
- return;
102
- this.autocomplete = new places.Autocomplete(this.inputElement);
103
- this.autocomplete.addListener("place_changed", () => {
104
- state.latitude = null;
105
- state.longitude = null;
106
- const place = this.autocomplete?.getPlace();
107
- this.latitude = place?.geometry?.location?.lat() ?? 0;
108
- this.longitude = place?.geometry?.location?.lng() ?? 0;
109
- state.latitude = this.latitude;
110
- state.longitude = this.longitude;
111
- state.location = place?.name ?? null;
112
- this.scrollToMapDraw();
113
- });
114
- }
115
- scrollToMapDraw() {
116
- const mapDrawElement = this.el.querySelector("map-draw");
117
- if (mapDrawElement) {
118
- mapDrawElement.scrollIntoView({ behavior: "smooth" });
119
- }
120
- }
121
- handleChooseOnMap() {
122
- this.showMapSelector = true;
123
- }
124
- render() {
125
- const t = getLanguageStrings(this.language);
126
- return (h("div", { key: '550ceedbc1a7e5f71f2fdea4ab2066080ca55bee', class: "flex flex-col w-full h-full p-3 m-auto", id: "solar-calculator" }, this.showMapSelector
127
- ? (h("map-selector", { "api-key": this.apiKey, language: this.language }))
128
- : (h(h.Fragment, null, h("div", { class: "pb-2 flex flex-col sm:flex-row gap-2 sm:gap-4 items-stretch w-full" }, h("div", { class: "relative flex-1 sm:flex-3" }, h("div", { class: "absolute left-3 top-0 h-full flex items-center text-muted-foreground pointer-events-none" }, h("search-icon", null)), h("input", { ref: (el) => this.inputElement = el, type: "text", placeholder: t.solarExpert
129
- .searchPlaceholder, class: "w-full pl-10 pr-4 py-2 border border-border rounded-4xl focus:ring-secondary bg-muted text-muted-foreground h-full" })), h("button", { onClick: () => this.handleChooseOnMap(), class: "flex-1 pl-4 pr-4 py-2 border border-border bg-muted rounded-4xl focus:ring-secondary hover:bg-surface-hover" }, t.mapSelector.chooseOnMap)), (state.latitude === null ||
130
- state.longitude === null) && (h("div", { class: "w-full pb-2" }, h("p", { class: "text-text-muted text-center flex items-center justify-center rounded-4xl px-4 py-2 w-full" }, t.mapDraw.noAddressSelected))), h("map-draw", { apiKey: this.apiKey })))));
131
- }
132
- static get is() { return "solar-expert"; }
133
- static get originalStyleUrls() {
134
- return {
135
- "$": ["../../output.css"]
136
- };
137
- }
138
- static get styleUrls() {
139
- return {
140
- "$": ["../../output.css"]
141
- };
142
- }
143
- static get assetsDirs() { return ["assets"]; }
144
- static get properties() {
145
- return {
146
- "apiKey": {
147
- "type": "string",
148
- "attribute": "api-key",
149
- "mutable": false,
150
- "complexType": {
151
- "original": "string",
152
- "resolved": "string",
153
- "references": {}
154
- },
155
- "required": false,
156
- "optional": false,
157
- "docs": {
158
- "tags": [],
159
- "text": ""
160
- },
161
- "getter": false,
162
- "setter": false,
163
- "reflect": false,
164
- "defaultValue": "Env.GOOGLE_MAPS_API_KEY"
165
- },
166
- "language": {
167
- "type": "string",
168
- "attribute": "language",
169
- "mutable": false,
170
- "complexType": {
171
- "original": "Language",
172
- "resolved": "\"de\" | \"en\" | \"es\"",
173
- "references": {
174
- "Language": {
175
- "location": "import",
176
- "path": "../../types/lang",
177
- "id": "src/types/lang.ts::Language"
178
- }
179
- }
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": ""
186
- },
187
- "getter": false,
188
- "setter": false,
189
- "reflect": false,
190
- "defaultValue": "\"en\""
191
- },
192
- "colorScheme": {
193
- "type": "unknown",
194
- "attribute": "color-scheme",
195
- "mutable": false,
196
- "complexType": {
197
- "original": "Partial<ColorScheme> | null",
198
- "resolved": "{ primary?: string; primaryForeground?: string; secondary?: string; secondaryForeground?: string; tertiary?: string; tertiaryForeground?: string; muted?: string; mutedForeground?: string; error?: string; errorForeground?: string; surface?: string; surfaceHover?: string; surfaceActive?: string; textMuted?: string; textSecondary?: string; textPlaceholder?: string; border?: string; borderLight?: string; success?: string; info?: string; hover?: string; hoverDark?: string; overlay?: string; tooltip?: string; }",
199
- "references": {
200
- "Partial": {
201
- "location": "global",
202
- "id": "global::Partial"
203
- },
204
- "ColorScheme": {
205
- "location": "import",
206
- "path": "../../config",
207
- "id": "src/config.ts::ColorScheme"
208
- }
209
- }
210
- },
211
- "required": false,
212
- "optional": false,
213
- "docs": {
214
- "tags": [],
215
- "text": ""
216
- },
217
- "getter": false,
218
- "setter": false,
219
- "defaultValue": "null"
220
- }
221
- };
222
- }
223
- static get states() {
224
- return {
225
- "latitude": {},
226
- "longitude": {},
227
- "isLoaded": {},
228
- "autocomplete": {},
229
- "place": {},
230
- "showMapSelector": {}
231
- };
232
- }
233
- static get elementRef() { return "el"; }
234
- static get watchers() {
235
- return [{
236
- "propName": "colorScheme",
237
- "methodName": "colorSchemeChanged"
238
- }];
239
- }
240
- }
241
- //# sourceMappingURL=solar-expert.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solar-expert.js","sourceRoot":"","sources":["../../../src/components/solar-expert/solar-expert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAe,oBAAo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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Element, Env, h, Prop, State, Watch } from \"@stencil/core\";\r\nimport { Loader } from \"@googlemaps/js-api-loader\";\r\nimport { Language } from \"../../types/lang\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { onChange, state } from \"../../store\";\r\nimport { ColorScheme, DEFAULT_COLOR_SCHEME } from \"../../config\";\r\nimport { applyThemeGlobally, applyThemeToElement } from \"../../utils/theme\";\r\n\r\n@Component({\r\n tag: \"solar-expert\",\r\n shadow: false,\r\n styleUrl: \"../../output.css\",\r\n assetsDirs: [\"assets\"],\r\n})\r\nexport class SolarExpert {\r\n @Element()\r\n el!: HTMLElement;\r\n\r\n @Prop()\r\n apiKey: string = Env.GOOGLE_MAPS_API_KEY;\r\n @Prop()\r\n language: Language = \"en\";\r\n @Prop()\r\n colorScheme: Partial<ColorScheme> | null = null;\r\n // {\r\n // primary: \"hsl(0 0% 100%)\",\r\n // secondary: \"hsl(0 0% 100%)\",\r\n // tertiary: \"hsl(0 0% 100%)\",\r\n // muted: \"hsl(0 0% 100%)\",\r\n // error: \"hsl(0 0% 100%)\",\r\n // // secondary: \"hsl(180 100% 25%)\",\r\n // // tertiary: \"hsl(24 100% 18%)\",\r\n // // muted: \"hsl(0 0% 85%)\",\r\n // // error: \"hsl(240 75% 29%)\",\r\n // primaryForeground: \"hsl(0 0% 100%)\",\r\n // secondaryForeground: \"hsl(0 0% 100%)\",\r\n // tertiaryForeground: \"hsl(0 0% 100%)\",\r\n // mutedForeground: \"hsl(0 0% 100%)\",\r\n // errorForeground: \"hsl(0 0% 100%)\",\r\n // surface: \"hsl(0 0% 100%)\",\r\n // surfaceHover: \"hsl(0 0% 100%)\",\r\n // surfaceActive: \"hsl(0 0% 100%)\",\r\n // // Text colors\r\n // textMuted: \"hsl(0 0% 100%)\",\r\n // textSecondary: \"hsl(0 0% 100%)\",\r\n // textPlaceholder: \"hsl(0 0% 100%)\",\r\n // // Border colors\r\n // border: \"hsl(0 0% 100%)\",\r\n // borderLight: \"hsl(0 0% 100%)\",\r\n // // Status colors\r\n // success: \"hsl(0 0% 100%)\",\r\n // info: \"hsl(0 0% 100%)\",\r\n // // Interactive colors\r\n // hover: \"hsl(0 0% 100%)\",\r\n // hoverDark: \"hsl(0 0% 100%)\",\r\n // overlay: \"hsl(0 0% 100%)\",\r\n // tooltip: \"hsl(0 0% 100%)\",\r\n // };\r\n\r\n @State()\r\n latitude: number | null = 40.581614;\r\n @State()\r\n longitude: number | null = -4.128423;\r\n @State()\r\n isLoaded: boolean = false;\r\n @State()\r\n autocomplete: google.maps.places.Autocomplete | null = null;\r\n @State()\r\n place: google.maps.places.PlaceResult | null = null;\r\n @State()\r\n showMapSelector: boolean = false;\r\n\r\n private inputElement?: HTMLInputElement;\r\n\r\n componentWillLoad() {\r\n state.isMobile =\r\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i\r\n .test(navigator.userAgent) || window.innerWidth < 768;\r\n this.loadGoogleMapsScript();\r\n onChange(\"latitude\", () => {\r\n if (this.showMapSelector) {\r\n this.showMapSelector = false;\r\n this.scrollToMapDraw();\r\n }\r\n });\r\n state.settings.language = this.language;\r\n\r\n const isIPhone = navigator.userAgent.indexOf(\"iPhone\") != -1;\r\n const isMac = navigator.userAgent.indexOf(\"Mac OS\") != -1;\r\n\r\n state.isIOS = isIPhone || isMac;\r\n if (!this.colorScheme) {\r\n applyThemeToElement(this.el, DEFAULT_COLOR_SCHEME);\r\n applyThemeGlobally(DEFAULT_COLOR_SCHEME);\r\n }\r\n this.applyTheme();\r\n }\r\n\r\n @Watch(\"colorScheme\")\r\n colorSchemeChanged() {\r\n this.applyTheme();\r\n }\r\n\r\n private applyTheme() {\r\n if (this.colorScheme) {\r\n // Apply theme globally for non-shadow components\r\n applyThemeGlobally(this.colorScheme);\r\n // Apply theme to this component's Shadow DOM host element\r\n applyThemeToElement(this.el, this.colorScheme);\r\n }\r\n }\r\n\r\n private async loadGoogleMapsScript() {\r\n try {\r\n const loader = new Loader({\r\n apiKey: this.apiKey,\r\n libraries: [\"places\", \"maps\", \"marker\"],\r\n });\r\n\r\n const places = await loader.importLibrary(\"places\");\r\n this.isLoaded = true;\r\n this.initializeAutocomplete(places);\r\n } catch (error) {\r\n console.error(\"Error loading Google Maps: \", error);\r\n }\r\n }\r\n\r\n private initializeAutocomplete(\r\n places: google.maps.PlacesLibrary,\r\n ) {\r\n if (!this.inputElement || !this.isLoaded) return;\r\n this.autocomplete = new places.Autocomplete(this.inputElement);\r\n\r\n this.autocomplete.addListener(\"place_changed\", () => {\r\n state.latitude = null;\r\n state.longitude = null;\r\n const place = this.autocomplete?.getPlace();\r\n this.latitude = place?.geometry?.location?.lat() ?? 0;\r\n this.longitude = place?.geometry?.location?.lng() ?? 0;\r\n state.latitude = this.latitude;\r\n state.longitude = this.longitude;\r\n state.location = place?.name ?? null;\r\n\r\n this.scrollToMapDraw();\r\n });\r\n }\r\n\r\n private scrollToMapDraw() {\r\n const mapDrawElement = this.el.querySelector(\"map-draw\");\r\n if (mapDrawElement) {\r\n mapDrawElement.scrollIntoView({ behavior: \"smooth\" });\r\n }\r\n }\r\n\r\n private handleChooseOnMap() {\r\n this.showMapSelector = true;\r\n }\r\n\r\n render() {\r\n const t = getLanguageStrings(this.language);\r\n return (\r\n <div\r\n class=\"flex flex-col w-full h-full p-3 m-auto\"\r\n id=\"solar-calculator\"\r\n >\r\n {this.showMapSelector\r\n ? (\r\n <map-selector\r\n api-key={this.apiKey}\r\n language={this.language}\r\n />\r\n )\r\n : (\r\n <>\r\n <div class=\"pb-2 flex flex-col sm:flex-row gap-2 sm:gap-4 items-stretch w-full\">\r\n <div class=\"relative flex-1 sm:flex-3\">\r\n <div class=\"absolute left-3 top-0 h-full flex items-center text-muted-foreground pointer-events-none\">\r\n <search-icon />\r\n </div>\r\n <input\r\n ref={(el) => this.inputElement = el}\r\n type=\"text\"\r\n placeholder={t.solarExpert\r\n .searchPlaceholder}\r\n class=\"w-full pl-10 pr-4 py-2 border border-border rounded-4xl focus:ring-secondary bg-muted text-muted-foreground h-full\"\r\n />\r\n </div>\r\n <button\r\n onClick={() => this.handleChooseOnMap()}\r\n class=\"flex-1 pl-4 pr-4 py-2 border border-border bg-muted rounded-4xl focus:ring-secondary hover:bg-surface-hover\"\r\n >\r\n {t.mapSelector.chooseOnMap}\r\n </button>\r\n </div>\r\n {(state.latitude === null ||\r\n state.longitude === null) && (\r\n <div class=\"w-full pb-2\">\r\n <p class=\"text-text-muted text-center flex items-center justify-center rounded-4xl px-4 py-2 w-full\">\r\n {t.mapDraw.noAddressSelected}\r\n </p>\r\n </div>\r\n )}\r\n <map-draw\r\n apiKey={this.apiKey}\r\n />\r\n </>\r\n )}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}