blue-chestnut-solar-expert 0.0.32 → 0.0.33
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.
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/eraser-icon_16.cjs.entry.js +117 -61
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
- package/dist/collection/components/map-draw/map-draw.js +7 -7
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +12 -4
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +35 -25
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/config.js +31 -0
- package/dist/collection/config.js.map +1 -1
- package/dist/collection/utils/theme.js +34 -26
- package/dist/collection/utils/theme.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/{p-r9wMCtI3.js → p-ClYOM_0b.js} +10 -10
- package/dist/components/{p-r9wMCtI3.js.map → p-ClYOM_0b.js.map} +1 -1
- package/dist/components/{p-ao6bHDbv.js → p-CrzEBN9H.js} +69 -28
- package/dist/components/p-CrzEBN9H.js.map +1 -0
- package/dist/components/solar-expert.js +46 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -1
- package/dist/esm/eraser-icon_16.entry.js +117 -61
- package/dist/esm/eraser-icon_16.entry.js.map +1 -1
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-3d7da486.entry.js +2 -0
- package/dist/stencil-library/p-3d7da486.entry.js.map +1 -0
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/utils/theme.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/p-ao6bHDbv.js.map +0 -1
- package/dist/stencil-library/p-141320bb.entry.js +0 -2
- package/dist/stencil-library/p-141320bb.entry.js.map +0 -1
|
@@ -174,17 +174,19 @@ export class SolarSystemForm {
|
|
|
174
174
|
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
175
175
|
.mostlyAtHome), h("option", { key: 'a713af601a9a122e83a7610df91dc87046c32684', value: "mostly_away", selected: this.consumptionProfile ===
|
|
176
176
|
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
177
|
-
.mostlyAway))))), h("div", { key: 'e22302c5432e13704827226a9348eb5135fbd168', class: "space-y-4" }, h("h2", { key: '22ff557a03b832de10382cbd9e2934f1e40f48c1', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '8dc84f2bee4d59e5a9024b252a990a6d86729bfa', class: "flex flex-col gap-4" }, h("div", { key: 'dfa92f5717a77e1f1d2bb6549ae38ce02aaccb7c', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '70a5a4390c42cd96d5ea7238842bc9a30e387d24', class: "flex items-center justify-between" }, h("div", { key: 'c6454e366f5086e6ca7964b2d41561a4f422ed1a', class: "flex items-center gap-2" }, h("input", { key: '
|
|
177
|
+
.mostlyAway))))), h("div", { key: 'e22302c5432e13704827226a9348eb5135fbd168', class: "space-y-4" }, h("h2", { key: '22ff557a03b832de10382cbd9e2934f1e40f48c1', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '8dc84f2bee4d59e5a9024b252a990a6d86729bfa', class: "flex flex-col gap-4" }, h("div", { key: 'dfa92f5717a77e1f1d2bb6549ae38ce02aaccb7c', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '70a5a4390c42cd96d5ea7238842bc9a30e387d24', class: "flex items-center justify-between" }, h("div", { key: 'c6454e366f5086e6ca7964b2d41561a4f422ed1a', class: "flex items-center gap-2" }, h("input", { key: '2e1d3ebd2908ded2959392bee1a08c268e34d612', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
|
|
178
178
|
this.heatPump =
|
|
179
179
|
e.target
|
|
180
180
|
.checked
|
|
181
181
|
? 100
|
|
182
182
|
: 0;
|
|
183
183
|
this.recalculate();
|
|
184
|
-
} }), h("label", { key: '
|
|
184
|
+
} }), h("label", { key: '11a45cadaf1bc2c8661da788eca3c7d0e2560e13', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
|
|
185
185
|
.additionalComponents
|
|
186
|
-
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '
|
|
187
|
-
? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-
|
|
186
|
+
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '1f8bd12df9d5e0357afd755c83d1cf592b6b5384', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '1fdd01ffe44f75daf94e5c9b716519d1636f6e3a', class: "flex flex-col gap-2" }, this.isIOS()
|
|
187
|
+
? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: {
|
|
188
|
+
border: "1px solid var(--color-border)",
|
|
189
|
+
}, value: this.heatPump, onInput: (e) => {
|
|
188
190
|
const value = parseInt(e.target
|
|
189
191
|
.value);
|
|
190
192
|
if (value >= 10 &&
|
|
@@ -199,38 +201,42 @@ export class SolarSystemForm {
|
|
|
199
201
|
parseInt(e.target
|
|
200
202
|
.value);
|
|
201
203
|
this.recalculate();
|
|
202
|
-
} }))))), h("div", { key: '
|
|
204
|
+
} }))))), h("div", { key: '94b4d3e5d6bea8994012b3500160780796338202', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '880a456c5d9916a467be761ffb6d48a0ac702095', class: "flex items-center justify-between" }, h("div", { key: '7ee0b35d4b616af184dd94ec11e2e5cba538aacd', class: "flex items-center gap-2" }, h("input", { key: 'cebabbd261270049b52c3e471e8a02588c41af5f', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
|
|
203
205
|
this.electricCar =
|
|
204
206
|
e.target
|
|
205
207
|
.checked;
|
|
206
208
|
this.recalculate();
|
|
207
|
-
} }), h("label", { key: '
|
|
209
|
+
} }), h("label", { key: 'a922eeb0abc8731c0410c308a3ea55d93961dfaf', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
|
|
208
210
|
.additionalComponents
|
|
209
|
-
.electricCar))), this.electricCar && (h("div", { key: '
|
|
211
|
+
.electricCar))), this.electricCar && (h("div", { key: '0c78c7f3176a0f6ab9c41c9876cf1a035877c798', class: "flex flex-col gap-2" }, h("div", { key: '722f0f8c09f037d75c7721c0bd7141da781f3c0c', class: "grid grid-cols-2 gap-4" }, h("label", { key: '258ee50ded063df8322520e2fdc7c7891b673c66', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
210
212
|
.additionalComponents
|
|
211
|
-
.chargingTime), h("label", { key: '
|
|
213
|
+
.chargingTime), h("label", { key: '7ae9cfa77cd8ced89d1598ef09fcc4772133695e', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
212
214
|
.additionalComponents
|
|
213
|
-
.kilometersPerYear)), h("div", { key: '
|
|
215
|
+
.kilometersPerYear)), h("div", { key: '1f9244bd861b20278eec8cbca21cf611a7b923f6', class: "grid grid-cols-2 gap-4" }, h("select", { key: '39022b4df361b6efb4f57057b27dc5419cc533be', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
|
|
214
216
|
this.electricCarChargingTime =
|
|
215
217
|
e.target
|
|
216
218
|
.value;
|
|
217
219
|
this.recalculate();
|
|
218
|
-
}
|
|
220
|
+
}, style: {
|
|
221
|
+
border: "1px solid var(--color-border)",
|
|
222
|
+
} }, h("option", { key: '3ac38d888755fe1ff1bbcdee4ac2ecbfbd51b8a6', value: "day", selected: this
|
|
219
223
|
.electricCarChargingTime ===
|
|
220
224
|
"day" }, t.solarSystemForm
|
|
221
225
|
.additionalComponents
|
|
222
|
-
.chargingTimeDay), h("option", { key: '
|
|
226
|
+
.chargingTimeDay), h("option", { key: 'a6a8cca9b5f127aa4331cc412ea56da2ddfa480e', value: "night", selected: this
|
|
223
227
|
.electricCarChargingTime ===
|
|
224
228
|
"night" }, t.solarSystemForm
|
|
225
229
|
.additionalComponents
|
|
226
|
-
.chargingTimeNight)), h("input", { key: '
|
|
230
|
+
.chargingTimeNight)), h("input", { key: 'd44e83a3e68f29ffbcc8c21132c3c357f4025eba', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
|
|
227
231
|
this.kmDrivenPerYear =
|
|
228
232
|
parseInt(e.target
|
|
229
233
|
.value);
|
|
230
234
|
this.recalculate();
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
235
|
+
}, style: {
|
|
236
|
+
border: "1px solid var(--color-border)",
|
|
237
|
+
} }))))), h("div", { key: '78887c816adeaeecd3503953e6079678ea5ffa8a', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '0f4e2b348c0e7e7789c7a2badfbddfbb668e4842', class: "flex items-center justify-between" }, h("label", { key: '5eaa71f1ae5a7c08bdbd3ee1b8ea18767738b9f0', class: "text-text-muted" }, t.solarSystemForm.additionalComponents
|
|
238
|
+
.battery), !this.isIOS() && (h("span", { key: 'f627ed9f5b6004bedfc99fed880701783e1f6b8c', class: "text-text-muted" }, this.battery, " kWh"))), h("div", { key: 'ae29676644ea5884897912332204f8df2edcc913', class: "flex flex-col gap-2" }, this.isIOS()
|
|
239
|
+
? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
|
|
234
240
|
const value = parseInt(e.target
|
|
235
241
|
.value);
|
|
236
242
|
if (value >= 0 &&
|
|
@@ -239,42 +245,46 @@ export class SolarSystemForm {
|
|
|
239
245
|
value;
|
|
240
246
|
this.recalculate();
|
|
241
247
|
}
|
|
242
|
-
}, placeholder: "Battery capacity"
|
|
248
|
+
}, placeholder: "Battery capacity", style: {
|
|
249
|
+
border: "1px solid var(--color-border)",
|
|
250
|
+
} }), h("span", { class: "text-sm text-text-muted" }, "kWh")))
|
|
243
251
|
: (h("input", { type: "range", min: "0", max: "20", step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted", value: this.battery, onInput: (e) => {
|
|
244
252
|
this.battery = parseInt(e.target
|
|
245
253
|
.value);
|
|
246
254
|
this.recalculate();
|
|
247
|
-
} })))))), h("div", { key: '
|
|
255
|
+
} })))))), h("div", { key: '3ff4f76e3998594832541e7c29b62fd066eb6b93', class: "space-y-4" }, h("h2", { key: '0d699ce4651eafa967464bd2d514e33e7d7594f5', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '2fbf7001ef764bbdfcebb68aee462b9015740e42', class: "grid grid-rows-2 gap-0" }, h("div", { key: '822c1a7ebde43a0e82d8e85a738f7c6d71d59312', class: "grid grid-cols-3 gap-4" }, h("label", { key: '7037f5005c69ca0fc06706190b2a14b0e65d0bab', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("label", { key: 'c57af75b004add729b4ddddc118534b2fdb783bf', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("label", { key: 'd28f0391fc0e52f6a6bbe454302afd54493be80b', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease)), h("div", { key: '237e6d85d909b1b08d00cdc3ce3c340513c9ffd8', class: "grid grid-cols-3 gap-4 text-primary-foreground" }, h("input", { key: '59ac48fca752b9fb654342ec2bde43599a8451b4', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
248
256
|
this.electricityPrice = parseFloat(e.target
|
|
249
257
|
.value);
|
|
250
258
|
this.recalculate();
|
|
251
|
-
} }), h("input", { key: '
|
|
259
|
+
} }), h("input", { key: '3644ceacd7733d2f74ffc5891522d4dd1ab67851', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
252
260
|
this.compensationRate = parseFloat(e.target
|
|
253
261
|
.value);
|
|
254
262
|
this.recalculate();
|
|
255
|
-
} }), h("input", { key: '
|
|
263
|
+
} }), h("input", { key: '8e453b5b7665c51a5bb8160132bbcc8da5bf5159', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
256
264
|
this.annualPriceIncrease = parseFloat(e.target
|
|
257
265
|
.value);
|
|
258
266
|
this.recalculate();
|
|
259
|
-
} })))), h("div", { key: '
|
|
267
|
+
} })))), h("div", { key: '4282852c39dde81bdf5b54ad8ea4e0a8aefaaf18', class: "space-y-4 p-4 border border-border rounded-4xl", style: {
|
|
268
|
+
border: "1px solid var(--color-border)",
|
|
269
|
+
} }, h("h2", { key: '7fcfd93db114602d3c1250c0b9ad5c106e2118d0', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), h("div", { key: 'aa0da43f3ef2daf8f9b3bb83e15493300dd3d795', class: "bg-muted rounded-4xl p-4" }, h("div", { key: '82b9f95d27582a7e6fabc92b5f8c4f94a7760773', class: "flex items-center justify-between" }, h("span", { key: 'ac3a20954389eafb4222de55a9c380c6e6911822', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: '42573f1d642adc6e7d81c2205d64659fd5690ec6', class: "text-xl font-bold text-secondary" }, this.autonomy > 100
|
|
260
270
|
? "100"
|
|
261
|
-
: this.autonomy.toFixed(1), "%")), h("div", { key: '
|
|
262
|
-
.savingsDisclaimer))), h("span", { key: '
|
|
263
|
-
.solarSystemForm.year)), h("div", { key: '
|
|
271
|
+
: this.autonomy.toFixed(1), "%")), h("div", { key: '7b7ca03f694682ada5f3156e065ffbebfe8a162e', class: "flex items-center justify-between mt-4" }, h("div", { key: '39f1d25e85ab1f3ff1ab9f06874cb1e3178f1707', class: "flex items-center gap-2" }, h("span", { key: '0c62c76a68fa8532240fe28333c1ce592ddc6787', class: "text-text-muted" }, t.solarSystemForm.costSavings), h("div", { key: 'fc6baa108a6fc38d70562d147488085c17b3376b', class: "relative group" }, h("svg", { key: 'd6806679a14d75f3e9ef72bd3ac352855f8b30ae', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, h("path", { key: '9033bbf13fa59641816338bca9ea3c2272b5dcc0', "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" })), h("div", { key: '1fad5e3281d00c91bdb0a112e98279d5107ed76c', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
|
|
272
|
+
.savingsDisclaimer))), h("span", { key: 'a99bd5d3f22f39fbfce522e6e8b9fa65d1fc1785', class: "text-xl font-bold text-success" }, this.costSavings.toFixed(2), "\u20AC/", t
|
|
273
|
+
.solarSystemForm.year)), h("div", { key: '8aeb935408cfa36788a5396dd8a0719e93216721', class: "flex items-center justify-between mt-4" }, h("div", { key: 'aa778aabdfe02aeea72ef37a0087cfb03adbef3d', class: "flex items-center gap-2" }, h("span", { key: '4bc1dd985b07e229c3293db4c4f3be74bd885cec', class: "text-text-muted" }, "Einspeiseverg\u00FCtung 25 Jahre")), h("span", { key: '4eb548881579db3bdffcf5c0bcd0630c19b6961e', class: "text-xl font-bold text-success" }, this.compensation25Years.toFixed(2), "\u20AC")), h("div", { key: '00d848e65e0a13d7278ca1cef2a8a6c0810cef08', class: "flex items-center justify-between mt-4" }, h("div", { key: 'e33274627fa4a5d71b35bbc030212810cd1ecc15', class: "flex items-center gap-2" }, h("span", { key: '45fb735ec260bbea7ad6101f7aacac4e7a1f3313', class: "text-text-muted" }, "Geldwerter Vorteil 25 Jahre")), h("span", { key: '2d7bc5f25a4491e00a1985c9bf255abdaef729dd', class: "text-xl font-bold text-success" }, this.savedCosts25Years.toFixed(2), "\u20AC")))), h("div", { key: '603eafb9e819e4a2da8f919c2de5a7e7ed7b6ac9', class: "space-y-4 pt-4" }, h("h2", { key: '50de58cd408c63518a3a1aeebc2168e603f8f537', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), h("div", { key: 'cc85f1661fba68643d3f043ff51b1c2070e5d32a', class: "grid gap-4" }, h("div", { key: '54040b2ac5cb46fc2bbdabdfb78f1d25fa521b2d', class: "grid grid-cols-2 gap-4" }, h("label", { key: '9404270bfbd58d022fafff6646ff1dbf68352617', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), h("label", { key: 'ee3bb80e18b29446630d10f49e94d3ce8e8e3f46', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email)), h("div", { key: '298da00d7046b6437b175f3eb8859281392d75dd', class: "grid grid-cols-2 gap-4" }, h("div", { key: '31b01646d5370285c8dc0d5470643cd679f1eaee' }, h("input", { key: '27764cb15c5150f8ddd5c50b7559fe807014d021', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
|
|
264
274
|
? "border-error"
|
|
265
275
|
: "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.name, onInput: (e) => {
|
|
266
276
|
this.name =
|
|
267
277
|
e.target
|
|
268
278
|
.value;
|
|
269
279
|
this.validateForm();
|
|
270
|
-
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '
|
|
280
|
+
}, placeholder: "Your name" }), this.nameError && (h("p", { key: 'fa62eac9fc7f58f4b0505dc8398ae7447524ac4f', class: "text-error text-sm mt-1" }, this.nameError))), h("div", { key: '936b2091fc5f889f7c98f3bbe9c783ebfcf97030' }, h("input", { key: 'd7f4bf93bee30c5dc47c14143c527be562ccdbfd', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
|
|
271
281
|
? "border-error"
|
|
272
282
|
: "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.email, onInput: (e) => {
|
|
273
283
|
this.email =
|
|
274
284
|
e.target
|
|
275
285
|
.value;
|
|
276
286
|
this.validateForm();
|
|
277
|
-
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '
|
|
287
|
+
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '32c8ca2e1de772c5c2072f52827393e0aad287f2', class: "text-error text-sm mt-1" }, this.emailError))))), h("div", { key: '5ac2456b1e783e86d21405db8b34ee22ad5e88f3', class: "flex justify-center" }, h("button", { key: 'f4b4e6d7490e01a29e4065747fe64dec7ca06f37', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
278
288
|
!this.email.trim() || !!this.nameError ||
|
|
279
289
|
!!this.emailError, class: "px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200 text-muted" }, t.solarSystemForm.requestOfferButton))))));
|
|
280
290
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solar-system-form.js","sourceRoot":"","sources":["../../../src/components/solar-system-form/solar-system-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EACH,gCAAgC,EAChC,QAAQ,GACX,MAAM,mCAAmC,CAAC;AAO3C,MAAM,OAAO,eAAe;IAExB,aAAa,GAA2C,EAAE,CAAC;IAE3D,YAAY,GAA8B,EAAE,CAAC;IAE7C,mBAAmB,GAA8B,EAAE,CAAC;IAGpD,oBAAoB,GAAW,IAAI,CAAC;IAEpC,kBAAkB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yBAAyB,IAC7B,IAAI,CAAC,UAAU,CAChB,CACP,CACC,CACJ,CACJ;oBACN,4DAAK,KAAK,EAAC,qBAAqB;wBAC5B,+DACI,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,EACxC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gCACvB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS;gCACtC,CAAC,CAAC,IAAI,CAAC,UAAU,EACrB,KAAK,EAAC,gGAAgG,IAErG,CAAC,CAAC,eAAe,CAAC,kBAAkB,CAChC,CACP,CACJ,CACJ,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State, Watch } from \"@stencil/core\";\r\nimport { DEFAULT_SOLAR_PANEL_TYPE } from \"../../config\";\r\nimport { SolarPanelSystemPart } from \"../../utils/geometry/fitting\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { Polygon } from \"../../types/shapes\";\r\nimport { state } from \"../../store\";\r\nimport { SimulationConfig } from \"../../utils/simulation/types\";\r\nimport {\r\n generateElectricCarChargingHours,\r\n simulate,\r\n} from \"../../utils/simulation/simulation\";\r\n\r\n@Component({\r\n tag: \"solar-system-form\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class SolarSystemForm {\r\n @Prop()\r\n systemConfigs: { [id: string]: SolarPanelSystemPart } = {};\r\n @Prop()\r\n roofPolygons: { [id: string]: Polygon } = {};\r\n @Prop()\r\n obstructionPolygons: { [id: string]: Polygon } = {};\r\n\r\n @State()\r\n householdConsumption: number = 4500;\r\n @State()\r\n consumptionProfile: \"mostly_at_home\" | \"mostly_away\" = \"mostly_at_home\";\r\n @State()\r\n electricityPrice: number = 0.3;\r\n @State()\r\n compensationRate: number = 0.07;\r\n @State()\r\n annualPriceIncrease: number = 2;\r\n @State()\r\n autonomy: number = 0;\r\n @State()\r\n costSavings: number = 0;\r\n @State()\r\n numberOfPanels: number = 5;\r\n @State()\r\n panelPeakPower: number = 0.4; // kW per panel\r\n @State()\r\n name: string = \"\";\r\n @State()\r\n email: string = \"\";\r\n @State()\r\n nameError: string = \"\";\r\n @State()\r\n emailError: string = \"\";\r\n @State()\r\n electricCar: boolean = false;\r\n @State()\r\n electricCarChargingTime: \"day\" | \"night\" = \"day\";\r\n @State()\r\n heatPump: number = 0;\r\n @State()\r\n battery: number = 0;\r\n\r\n @State()\r\n compensation25Years: number = 0;\r\n @State()\r\n savedCosts25Years: number = 0;\r\n @State()\r\n maxPanels: number = 5;\r\n @State()\r\n kmDrivenPerYear: number = 10000;\r\n\r\n @Watch(\"systemConfigs\")\r\n updateSystemConfigs() {\r\n if (Object.keys(this.systemConfigs).length === 0) {\r\n this.numberOfPanels = 0;\r\n this.maxPanels = 0;\r\n return;\r\n }\r\n this.numberOfPanels = Object.keys(this.systemConfigs).reduce(\r\n (acc, curr) =>\r\n acc + this.systemConfigs[curr].positionedPanels.length,\r\n 0,\r\n );\r\n this.maxPanels = Object.keys(this.systemConfigs).reduce(\r\n (acc, curr) =>\r\n acc + this.systemConfigs[curr].positionedPanels.length,\r\n 0,\r\n );\r\n\r\n this.panelPeakPower =\r\n Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel\r\n .kWattPeak;\r\n\r\n this.recalculate();\r\n }\r\n\r\n private recalculate() {\r\n const simulationConfig: SimulationConfig = {\r\n general: {\r\n simulationYears: 25,\r\n },\r\n householdConsumption: {\r\n consumptionProfile: this.consumptionProfile,\r\n winterConsumptionFactor: 1.2,\r\n summerConsumptionFactor: 0.8,\r\n averageConsumption: this.householdConsumption / 365,\r\n },\r\n electricityPrice: {\r\n purchase: this.electricityPrice,\r\n sell: this.compensationRate,\r\n increase: this.annualPriceIncrease / 100,\r\n },\r\n solarSystem: {\r\n numberOfPanels: this.numberOfPanels,\r\n panelType: DEFAULT_SOLAR_PANEL_TYPE,\r\n pitch: 30,\r\n },\r\n batteryKWh: this.battery,\r\n solarRadiation: {\r\n winterFactor: 0.2,\r\n summerFactor: 0.6,\r\n },\r\n heatPump: {\r\n m2: this.heatPump,\r\n },\r\n electricCar: this.electricCar\r\n ? {\r\n averageKilometersPerDay: this.kmDrivenPerYear / 365,\r\n consumptionkWhPer100km: 17,\r\n batteryKWh: 20,\r\n chargingHours: this.electricCarChargingTime === \"day\"\r\n ? generateElectricCarChargingHours(6, 18)\r\n : generateElectricCarChargingHours(18, 6),\r\n }\r\n : undefined,\r\n };\r\n\r\n const result = simulate(simulationConfig);\r\n\r\n this.compensation25Years = result.compensationPerDay * 365 * 25;\r\n this.savedCosts25Years = result.byYearSavedCosts.reduce(\r\n (acc, curr) => acc + curr,\r\n 0,\r\n );\r\n this.costSavings = result.compensationPerDay * 365;\r\n this.autonomy = result.autonomy * 100;\r\n }\r\n\r\n componentWillLoad() {\r\n this.updateSystemConfigs();\r\n }\r\n\r\n private validateForm(): boolean {\r\n let isValid = true;\r\n const t = getLanguageStrings(state.settings.language);\r\n\r\n // Validate name\r\n if (!this.name.trim()) {\r\n this.nameError = t.solarSystemForm.nameError;\r\n isValid = false;\r\n } else {\r\n this.nameError = \"\";\r\n }\r\n\r\n // Validate email\r\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\r\n if (!this.email.trim()) {\r\n this.emailError = t.solarSystemForm.emailError;\r\n isValid = false;\r\n } else if (!emailRegex.test(this.email)) {\r\n this.emailError = t.solarSystemForm.validEmailError;\r\n isValid = false;\r\n } else {\r\n this.emailError = \"\";\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n private handleRequestOffer() {\r\n if (!this.validateForm()) {\r\n return;\r\n }\r\n // Here you can implement the logic to handle the offer request\r\n console.log(\"Requesting offer for: \", {\r\n name: this.name,\r\n email: this.email,\r\n systemConfig: this.systemConfigs,\r\n consumption: this.householdConsumption,\r\n autonomy: this.autonomy,\r\n costSavings: this.costSavings,\r\n roofPolygons: this.roofPolygons,\r\n obstructionPolygons: this.obstructionPolygons,\r\n });\r\n }\r\n\r\n private isIOS(): boolean {\r\n return state.isIOS;\r\n }\r\n\r\n render() {\r\n const t = getLanguageStrings(state.settings.language);\r\n return (\r\n <div\r\n class=\"flex flex-col justify-center items-center w-full h-full pt-4\" // style={{\r\n // display: (Object.keys(this.systemConfigs).length === 0)\r\n // ? \"none\"\r\n // : \"flex\",\r\n // }}\r\n id=\"solar-system-form\"\r\n >\r\n <h1 class=\"text-2xl font-bold text-secondary mb-4 w-full\">\r\n {t.solarSystemForm.title}\r\n </h1>\r\n\r\n <div class=\"w-full bg-primary rounded-4xl p-6 space-y-6\">\r\n {/* System Info Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.systemInformation}\r\n </h2>\r\n <div class=\"grid grid-rows-3 gap-0\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.numberOfPanels}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.panelPeakPower}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n {!this.isIOS()\r\n ? (\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.numberOfPanels}\r\n readOnly\r\n />\r\n )\r\n : (\r\n <input\r\n type=\"number\"\r\n min=\"1\"\r\n max={this.maxPanels}\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.numberOfPanels}\r\n onInput={(e) => {\r\n const value = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 1 &&\r\n value <=\r\n this.maxPanels\r\n ) {\r\n this.numberOfPanels = value;\r\n this.recalculate();\r\n }\r\n }}\r\n />\r\n )}\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.panelPeakPower}\r\n readonly\r\n />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"w-full pt-2\">\r\n {!this.isIOS() &&\r\n (\r\n <input\r\n type=\"range\"\r\n min=\"1\"\r\n max={this.maxPanels}\r\n step=\"1\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.numberOfPanels}\r\n onInput={(e) => {\r\n this.numberOfPanels =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"bg-muted rounded-4xl p-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.totalSystemPeakPower}\r\n </span>\r\n <span class=\"text-xl font-bold text-secondary\">\r\n {(DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *\r\n this.numberOfPanels).toFixed(1)} kW\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n {/* Household Consumption Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.householdConsumptionTitle}\r\n </h2>\r\n <div class=\"grid grid-rows-2 gap-0\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted\">\r\n {t.solarSystemForm.annualConsumption}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted\">\r\n {t.solarSystemForm.consumptionProfileTitle}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.householdConsumption}\r\n onInput={(e) => {\r\n this.householdConsumption = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <select\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n onChange={(e) => {\r\n this.consumptionProfile =\r\n (e.target as HTMLSelectElement)\r\n .value as\r\n | \"mostly_at_home\"\r\n | \"mostly_away\";\r\n this.recalculate();\r\n }}\r\n >\r\n <option\r\n value=\"mostly_at_home\"\r\n selected={this.consumptionProfile ===\r\n \"mostly_at_home\"}\r\n >\r\n {t.solarSystemForm.consumptionProfiles\r\n .mostlyAtHome}\r\n </option>\r\n <option\r\n value=\"mostly_away\"\r\n selected={this.consumptionProfile ===\r\n \"mostly_away\"}\r\n >\r\n {t.solarSystemForm.consumptionProfiles\r\n .mostlyAway}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n {\r\n /* <div class=\"mt-4 h-48\">\r\n <canvas ref={(el) => this.chartRef = el}></canvas>\r\n </div> */\r\n }\r\n </div>\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.additionalComponents.title}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n {/* Heat Pump Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"heatPump\"\r\n class=\"w-4 h-4 accent-tertiary border-gray-300 rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2\"\r\n checked={this.heatPump > 0}\r\n onChange={(e) => {\r\n this.heatPump =\r\n (e.target as HTMLInputElement)\r\n .checked\r\n ? 100\r\n : 0;\r\n this.recalculate();\r\n }}\r\n />\r\n <label\r\n htmlFor=\"heatPump\"\r\n class=\"text-text-muted\"\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .heatPump}\r\n </label>\r\n </div>\r\n {(this.heatPump > 0 && !this.isIOS()) && (\r\n <span class=\"text-text-muted\">\r\n {this.heatPump} m²\r\n </span>\r\n )}\r\n </div>\r\n {this.heatPump > 0 && (\r\n <div class=\"flex flex-col gap-2\">\r\n {this.isIOS()\r\n ? (\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"number\"\r\n min=\"10\"\r\n max=\"300\"\r\n step=\"10\"\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.heatPump}\r\n onInput={(e) => {\r\n const value =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 10 &&\r\n value <= 300\r\n ) {\r\n this.heatPump =\r\n value;\r\n this.recalculate();\r\n }\r\n }}\r\n />\r\n <span class=\"text-sm text-text-muted\">\r\n m²\r\n </span>\r\n </div>\r\n )\r\n : (\r\n <input\r\n type=\"range\"\r\n min=\"10\"\r\n max=\"300\"\r\n step=\"10\"\r\n class=\"input-slider custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.heatPump}\r\n onInput={(e) => {\r\n this.heatPump =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Electric Car Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"electricCar\"\r\n class=\"w-4 h-4 accent-tertiary border-gray-300 rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2\"\r\n checked={this.electricCar}\r\n onChange={(e) => {\r\n this.electricCar =\r\n (e.target as HTMLInputElement)\r\n .checked;\r\n this.recalculate();\r\n }}\r\n />\r\n <label\r\n htmlFor=\"electricCar\"\r\n class=\"text-text-muted\"\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .electricCar}\r\n </label>\r\n </div>\r\n </div>\r\n {this.electricCar && (\r\n <div class=\"flex flex-col gap-2\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"text-sm text-text-muted\">\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTime}\r\n </label>\r\n <label class=\"text-sm text-text-muted\">\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .kilometersPerYear}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <select\r\n class=\"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n onChange={(e) => {\r\n this.electricCarChargingTime =\r\n (e.target as HTMLSelectElement)\r\n .value as\r\n | \"day\"\r\n | \"night\";\r\n this.recalculate();\r\n }}\r\n >\r\n <option\r\n value=\"day\"\r\n selected={this\r\n .electricCarChargingTime ===\r\n \"day\"}\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTimeDay}\r\n </option>\r\n <option\r\n value=\"night\"\r\n selected={this\r\n .electricCarChargingTime ===\r\n \"night\"}\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTimeNight}\r\n </option>\r\n </select>\r\n <input\r\n type=\"number\"\r\n min=\"1000\"\r\n max=\"50000\"\r\n step=\"1000\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.kmDrivenPerYear}\r\n onInput={(e) => {\r\n this.kmDrivenPerYear =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Battery Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <label class=\"text-text-muted\">\r\n {t.solarSystemForm.additionalComponents\r\n .battery}\r\n </label>\r\n {!this.isIOS() && (\r\n <span class=\"text-text-muted\">\r\n {this.battery} kWh\r\n </span>\r\n )}\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n {this.isIOS()\r\n ? (\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"number\"\r\n min=\"0\"\r\n max=\"20\"\r\n step=\"1\"\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.battery}\r\n onInput={(e) => {\r\n const value = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 0 &&\r\n value <= 20\r\n ) {\r\n this.battery =\r\n value;\r\n this.recalculate();\r\n }\r\n }}\r\n placeholder=\"Battery capacity\"\r\n />\r\n <span class=\"text-sm text-text-muted\">\r\n kWh\r\n </span>\r\n </div>\r\n )\r\n : (\r\n <input\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"20\"\r\n step=\"1\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.battery}\r\n onInput={(e) => {\r\n this.battery = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Electricity Price and Compensation Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.electricityCostsTitle}\r\n </h2>\r\n <div class=\"grid grid-rows-2 gap-0\">\r\n <div class=\"grid grid-cols-3 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.electricityPrice}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.compensationRate}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.annualPriceIncrease}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-3 gap-4 text-primary-foreground\">\r\n <input\r\n type=\"number\"\r\n step=\"0.01\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.electricityPrice.toFixed(2)}\r\n onInput={(e) => {\r\n this.electricityPrice = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <input\r\n type=\"number\"\r\n step=\"0.01\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.compensationRate.toFixed(2)}\r\n onInput={(e) => {\r\n this.compensationRate = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <input\r\n type=\"number\"\r\n step=\"0.1\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.annualPriceIncrease.toFixed(1)}\r\n onInput={(e) => {\r\n this.annualPriceIncrease = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Results Section */}\r\n <div class=\"space-y-4 p-4 border border-border rounded-4xl\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.resultsTitle}\r\n </h2>\r\n <div class=\"bg-muted rounded-4xl p-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.autonomy}\r\n </span>\r\n <span class=\"text-xl font-bold text-secondary\">\r\n {this.autonomy > 100\r\n ? \"100\"\r\n : this.autonomy.toFixed(1)}%\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.costSavings}\r\n </span>\r\n <div class=\"relative group\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"h-5 w-5 text-gray-400 cursor-help\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n >\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n <div class=\"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none\">\r\n {t.solarSystemForm\r\n .savingsDisclaimer}\r\n </div>\r\n </div>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.costSavings.toFixed(2)}€/{t\r\n .solarSystemForm.year}\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n Einspeisevergütung 25 Jahre\r\n </span>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.compensation25Years.toFixed(2)}€\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n Geldwerter Vorteil 25 Jahre\r\n </span>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.savedCosts25Years.toFixed(2)}€\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Contact Information Section */}\r\n <div class=\"space-y-4 pt-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.requestOffer}\r\n </h2>\r\n <div class=\"grid gap-4\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.name}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.email}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div>\r\n <input\r\n type=\"text\"\r\n class={`w-full px-4 py-2 rounded-4xl border ${\r\n this.nameError\r\n ? \"border-error\"\r\n : \"border-border\"\r\n } focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`}\r\n value={this.name}\r\n onInput={(e) => {\r\n this.name =\r\n (e.target as HTMLInputElement)\r\n .value;\r\n this.validateForm();\r\n }}\r\n placeholder=\"Your name\"\r\n />\r\n {this.nameError && (\r\n <p class=\"text-error text-sm mt-1\">\r\n {this.nameError}\r\n </p>\r\n )}\r\n </div>\r\n <div>\r\n <input\r\n type=\"email\"\r\n class={`w-full px-4 py-2 rounded-4xl border ${\r\n this.emailError\r\n ? \"border-error\"\r\n : \"border-border\"\r\n } focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`}\r\n value={this.email}\r\n onInput={(e) => {\r\n this.email =\r\n (e.target as HTMLInputElement)\r\n .value;\r\n this.validateForm();\r\n }}\r\n placeholder=\"your.email@example.com\"\r\n />\r\n {this.emailError && (\r\n <p class=\"text-error text-sm mt-1\">\r\n {this.emailError}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex justify-center\">\r\n <button\r\n onClick={() => this.handleRequestOffer()}\r\n disabled={!this.name.trim() ||\r\n !this.email.trim() || !!this.nameError ||\r\n !!this.emailError}\r\n class=\"px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200 text-muted\"\r\n >\r\n {t.solarSystemForm.requestOfferButton}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"solar-system-form.js","sourceRoot":"","sources":["../../../src/components/solar-system-form/solar-system-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EACH,gCAAgC,EAChC,QAAQ,GACX,MAAM,mCAAmC,CAAC;AAO3C,MAAM,OAAO,eA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IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,uCACH,IAAI,CAAC,UAAU;wCACX,CAAC,CAAC,cAAc;wCAChB,CAAC,CAAC,eACV,2FAA2F,EAC3F,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;wCACX,IAAI,CAAC,KAAK;4CACL,CAAC,CAAC,MAA2B;iDACzB,KAAK,CAAC;wCACf,IAAI,CAAC,YAAY,EAAE,CAAC;oCACxB,CAAC,EACD,WAAW,EAAC,wBAAwB,GACtC;gCACD,IAAI,CAAC,UAAU,IAAI,CAChB,0DAAG,KAAK,EAAC,yBAAyB,IAC7B,IAAI,CAAC,UAAU,CAChB,CACP,CACC,CACJ,CACJ;oBACN,4DAAK,KAAK,EAAC,qBAAqB;wBAC5B,+DACI,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,EACxC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gCACvB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS;gCACtC,CAAC,CAAC,IAAI,CAAC,UAAU,EACrB,KAAK,EAAC,gGAAgG,IAErG,CAAC,CAAC,eAAe,CAAC,kBAAkB,CAChC,CACP,CACJ,CACJ,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, State, Watch } from \"@stencil/core\";\r\nimport { DEFAULT_SOLAR_PANEL_TYPE } from \"../../config\";\r\nimport { SolarPanelSystemPart } from \"../../utils/geometry/fitting\";\r\nimport { getLanguageStrings } from \"../../utils/lang/general\";\r\nimport { Polygon } from \"../../types/shapes\";\r\nimport { state } from \"../../store\";\r\nimport { SimulationConfig } from \"../../utils/simulation/types\";\r\nimport {\r\n generateElectricCarChargingHours,\r\n simulate,\r\n} from \"../../utils/simulation/simulation\";\r\n\r\n@Component({\r\n tag: \"solar-system-form\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class SolarSystemForm {\r\n @Prop()\r\n systemConfigs: { [id: string]: SolarPanelSystemPart } = {};\r\n @Prop()\r\n roofPolygons: { [id: string]: Polygon } = {};\r\n @Prop()\r\n obstructionPolygons: { [id: string]: Polygon } = {};\r\n\r\n @State()\r\n householdConsumption: number = 4500;\r\n @State()\r\n consumptionProfile: \"mostly_at_home\" | \"mostly_away\" = \"mostly_at_home\";\r\n @State()\r\n electricityPrice: number = 0.3;\r\n @State()\r\n compensationRate: number = 0.07;\r\n @State()\r\n annualPriceIncrease: number = 2;\r\n @State()\r\n autonomy: number = 0;\r\n @State()\r\n costSavings: number = 0;\r\n @State()\r\n numberOfPanels: number = 5;\r\n @State()\r\n panelPeakPower: number = 0.4; // kW per panel\r\n @State()\r\n name: string = \"\";\r\n @State()\r\n email: string = \"\";\r\n @State()\r\n nameError: string = \"\";\r\n @State()\r\n emailError: string = \"\";\r\n @State()\r\n electricCar: boolean = false;\r\n @State()\r\n electricCarChargingTime: \"day\" | \"night\" = \"day\";\r\n @State()\r\n heatPump: number = 0;\r\n @State()\r\n battery: number = 0;\r\n\r\n @State()\r\n compensation25Years: number = 0;\r\n @State()\r\n savedCosts25Years: number = 0;\r\n @State()\r\n maxPanels: number = 5;\r\n @State()\r\n kmDrivenPerYear: number = 10000;\r\n\r\n @Watch(\"systemConfigs\")\r\n updateSystemConfigs() {\r\n if (Object.keys(this.systemConfigs).length === 0) {\r\n this.numberOfPanels = 0;\r\n this.maxPanels = 0;\r\n return;\r\n }\r\n this.numberOfPanels = Object.keys(this.systemConfigs).reduce(\r\n (acc, curr) =>\r\n acc + this.systemConfigs[curr].positionedPanels.length,\r\n 0,\r\n );\r\n this.maxPanels = Object.keys(this.systemConfigs).reduce(\r\n (acc, curr) =>\r\n acc + this.systemConfigs[curr].positionedPanels.length,\r\n 0,\r\n );\r\n\r\n this.panelPeakPower =\r\n Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel\r\n .kWattPeak;\r\n\r\n this.recalculate();\r\n }\r\n\r\n private recalculate() {\r\n const simulationConfig: SimulationConfig = {\r\n general: {\r\n simulationYears: 25,\r\n },\r\n householdConsumption: {\r\n consumptionProfile: this.consumptionProfile,\r\n winterConsumptionFactor: 1.2,\r\n summerConsumptionFactor: 0.8,\r\n averageConsumption: this.householdConsumption / 365,\r\n },\r\n electricityPrice: {\r\n purchase: this.electricityPrice,\r\n sell: this.compensationRate,\r\n increase: this.annualPriceIncrease / 100,\r\n },\r\n solarSystem: {\r\n numberOfPanels: this.numberOfPanels,\r\n panelType: DEFAULT_SOLAR_PANEL_TYPE,\r\n pitch: 30,\r\n },\r\n batteryKWh: this.battery,\r\n solarRadiation: {\r\n winterFactor: 0.2,\r\n summerFactor: 0.6,\r\n },\r\n heatPump: {\r\n m2: this.heatPump,\r\n },\r\n electricCar: this.electricCar\r\n ? {\r\n averageKilometersPerDay: this.kmDrivenPerYear / 365,\r\n consumptionkWhPer100km: 17,\r\n batteryKWh: 20,\r\n chargingHours: this.electricCarChargingTime === \"day\"\r\n ? generateElectricCarChargingHours(6, 18)\r\n : generateElectricCarChargingHours(18, 6),\r\n }\r\n : undefined,\r\n };\r\n\r\n const result = simulate(simulationConfig);\r\n\r\n this.compensation25Years = result.compensationPerDay * 365 * 25;\r\n this.savedCosts25Years = result.byYearSavedCosts.reduce(\r\n (acc, curr) => acc + curr,\r\n 0,\r\n );\r\n this.costSavings = result.compensationPerDay * 365;\r\n this.autonomy = result.autonomy * 100;\r\n }\r\n\r\n componentWillLoad() {\r\n this.updateSystemConfigs();\r\n }\r\n\r\n private validateForm(): boolean {\r\n let isValid = true;\r\n const t = getLanguageStrings(state.settings.language);\r\n\r\n // Validate name\r\n if (!this.name.trim()) {\r\n this.nameError = t.solarSystemForm.nameError;\r\n isValid = false;\r\n } else {\r\n this.nameError = \"\";\r\n }\r\n\r\n // Validate email\r\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\r\n if (!this.email.trim()) {\r\n this.emailError = t.solarSystemForm.emailError;\r\n isValid = false;\r\n } else if (!emailRegex.test(this.email)) {\r\n this.emailError = t.solarSystemForm.validEmailError;\r\n isValid = false;\r\n } else {\r\n this.emailError = \"\";\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n private handleRequestOffer() {\r\n if (!this.validateForm()) {\r\n return;\r\n }\r\n // Here you can implement the logic to handle the offer request\r\n console.log(\"Requesting offer for: \", {\r\n name: this.name,\r\n email: this.email,\r\n systemConfig: this.systemConfigs,\r\n consumption: this.householdConsumption,\r\n autonomy: this.autonomy,\r\n costSavings: this.costSavings,\r\n roofPolygons: this.roofPolygons,\r\n obstructionPolygons: this.obstructionPolygons,\r\n });\r\n }\r\n\r\n private isIOS(): boolean {\r\n return state.isIOS;\r\n }\r\n\r\n render() {\r\n const t = getLanguageStrings(state.settings.language);\r\n return (\r\n <div\r\n class=\"flex flex-col justify-center items-center w-full h-full pt-4\" // style={{\r\n // display: (Object.keys(this.systemConfigs).length === 0)\r\n // ? \"none\"\r\n // : \"flex\",\r\n // }}\r\n id=\"solar-system-form\"\r\n >\r\n <h1 class=\"text-2xl font-bold text-secondary mb-4 w-full\">\r\n {t.solarSystemForm.title}\r\n </h1>\r\n\r\n <div class=\"w-full bg-primary rounded-4xl p-6 space-y-6\">\r\n {/* System Info Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.systemInformation}\r\n </h2>\r\n <div class=\"grid grid-rows-3 gap-0\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.numberOfPanels}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.panelPeakPower}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n {!this.isIOS()\r\n ? (\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.numberOfPanels}\r\n readOnly\r\n />\r\n )\r\n : (\r\n <input\r\n type=\"number\"\r\n min=\"1\"\r\n max={this.maxPanels}\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.numberOfPanels}\r\n onInput={(e) => {\r\n const value = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 1 &&\r\n value <=\r\n this.maxPanels\r\n ) {\r\n this.numberOfPanels = value;\r\n this.recalculate();\r\n }\r\n }}\r\n />\r\n )}\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.panelPeakPower}\r\n readonly\r\n />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"w-full pt-2\">\r\n {!this.isIOS() &&\r\n (\r\n <input\r\n type=\"range\"\r\n min=\"1\"\r\n max={this.maxPanels}\r\n step=\"1\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.numberOfPanels}\r\n onInput={(e) => {\r\n this.numberOfPanels =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"bg-muted rounded-4xl p-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.totalSystemPeakPower}\r\n </span>\r\n <span class=\"text-xl font-bold text-secondary\">\r\n {(DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *\r\n this.numberOfPanels).toFixed(1)} kW\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n {/* Household Consumption Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.householdConsumptionTitle}\r\n </h2>\r\n <div class=\"grid grid-rows-2 gap-0\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted\">\r\n {t.solarSystemForm.annualConsumption}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted\">\r\n {t.solarSystemForm.consumptionProfileTitle}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <input\r\n type=\"number\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n value={this.householdConsumption}\r\n onInput={(e) => {\r\n this.householdConsumption = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <select\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground\"\r\n onChange={(e) => {\r\n this.consumptionProfile =\r\n (e.target as HTMLSelectElement)\r\n .value as\r\n | \"mostly_at_home\"\r\n | \"mostly_away\";\r\n this.recalculate();\r\n }}\r\n >\r\n <option\r\n value=\"mostly_at_home\"\r\n selected={this.consumptionProfile ===\r\n \"mostly_at_home\"}\r\n >\r\n {t.solarSystemForm.consumptionProfiles\r\n .mostlyAtHome}\r\n </option>\r\n <option\r\n value=\"mostly_away\"\r\n selected={this.consumptionProfile ===\r\n \"mostly_away\"}\r\n >\r\n {t.solarSystemForm.consumptionProfiles\r\n .mostlyAway}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n {\r\n /* <div class=\"mt-4 h-48\">\r\n <canvas ref={(el) => this.chartRef = el}></canvas>\r\n </div> */\r\n }\r\n </div>\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.additionalComponents.title}\r\n </h2>\r\n <div class=\"flex flex-col gap-4\">\r\n {/* Heat Pump Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"heatPump\"\r\n class=\"w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2\"\r\n checked={this.heatPump > 0}\r\n onChange={(e) => {\r\n this.heatPump =\r\n (e.target as HTMLInputElement)\r\n .checked\r\n ? 100\r\n : 0;\r\n this.recalculate();\r\n }}\r\n />\r\n <label\r\n htmlFor=\"heatPump\"\r\n class=\"text-text-muted\"\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .heatPump}\r\n </label>\r\n </div>\r\n {(this.heatPump > 0 && !this.isIOS()) && (\r\n <span class=\"text-text-muted\">\r\n {this.heatPump} m²\r\n </span>\r\n )}\r\n </div>\r\n {this.heatPump > 0 && (\r\n <div class=\"flex flex-col gap-2\">\r\n {this.isIOS()\r\n ? (\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"number\"\r\n min=\"10\"\r\n max=\"300\"\r\n step=\"10\"\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n style={{ //TODO fix this\r\n border:\r\n \"1px solid var(--color-border)\",\r\n }}\r\n value={this.heatPump}\r\n onInput={(e) => {\r\n const value =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 10 &&\r\n value <= 300\r\n ) {\r\n this.heatPump =\r\n value;\r\n this.recalculate();\r\n }\r\n }}\r\n />\r\n <span class=\"text-sm text-text-muted\">\r\n m²\r\n </span>\r\n </div>\r\n )\r\n : (\r\n <input\r\n type=\"range\"\r\n min=\"10\"\r\n max=\"300\"\r\n step=\"10\"\r\n class=\"input-slider custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.heatPump}\r\n onInput={(e) => {\r\n this.heatPump =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Electric Car Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"checkbox\"\r\n id=\"electricCar\"\r\n class=\"w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2\"\r\n checked={this.electricCar}\r\n onChange={(e) => {\r\n this.electricCar =\r\n (e.target as HTMLInputElement)\r\n .checked;\r\n this.recalculate();\r\n }}\r\n />\r\n <label\r\n htmlFor=\"electricCar\"\r\n class=\"text-text-muted\"\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .electricCar}\r\n </label>\r\n </div>\r\n </div>\r\n {this.electricCar && (\r\n <div class=\"flex flex-col gap-2\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"text-sm text-text-muted\">\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTime}\r\n </label>\r\n <label class=\"text-sm text-text-muted\">\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .kilometersPerYear}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <select\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n onChange={(e) => {\r\n this.electricCarChargingTime =\r\n (e.target as HTMLSelectElement)\r\n .value as\r\n | \"day\"\r\n | \"night\";\r\n this.recalculate();\r\n }}\r\n style={{ //TODO fix this\r\n border:\r\n \"1px solid var(--color-border)\",\r\n }}\r\n >\r\n <option\r\n value=\"day\"\r\n selected={this\r\n .electricCarChargingTime ===\r\n \"day\"}\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTimeDay}\r\n </option>\r\n <option\r\n value=\"night\"\r\n selected={this\r\n .electricCarChargingTime ===\r\n \"night\"}\r\n >\r\n {t.solarSystemForm\r\n .additionalComponents\r\n .chargingTimeNight}\r\n </option>\r\n </select>\r\n <input\r\n type=\"number\"\r\n min=\"1000\"\r\n max=\"50000\"\r\n step=\"1000\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.kmDrivenPerYear}\r\n onInput={(e) => {\r\n this.kmDrivenPerYear =\r\n parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n style={{ //TODO fix this\r\n border:\r\n \"1px solid var(--color-border)\",\r\n }}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n\r\n {/* Battery Section */}\r\n <div class=\"flex flex-col bg-muted rounded-4xl p-4 gap-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <label class=\"text-text-muted\">\r\n {t.solarSystemForm.additionalComponents\r\n .battery}\r\n </label>\r\n {!this.isIOS() && (\r\n <span class=\"text-text-muted\">\r\n {this.battery} kWh\r\n </span>\r\n )}\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n {this.isIOS()\r\n ? (\r\n <div class=\"flex items-center gap-2\">\r\n <input\r\n type=\"number\"\r\n min=\"0\"\r\n max=\"20\"\r\n step=\"1\"\r\n class=\"flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.battery}\r\n onInput={(e) => {\r\n const value = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n if (\r\n value >= 0 &&\r\n value <= 20\r\n ) {\r\n this.battery =\r\n value;\r\n this.recalculate();\r\n }\r\n }}\r\n placeholder=\"Battery capacity\"\r\n style={{ //TODO fix this\r\n border:\r\n \"1px solid var(--color-border)\",\r\n }}\r\n />\r\n <span class=\"text-sm text-text-muted\">\r\n kWh\r\n </span>\r\n </div>\r\n )\r\n : (\r\n <input\r\n type=\"range\"\r\n min=\"0\"\r\n max=\"20\"\r\n step=\"1\"\r\n class=\"input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted\"\r\n value={this.battery}\r\n onInput={(e) => {\r\n this.battery = parseInt(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Electricity Price and Compensation Section */}\r\n <div class=\"space-y-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.electricityCostsTitle}\r\n </h2>\r\n <div class=\"grid grid-rows-2 gap-0\">\r\n <div class=\"grid grid-cols-3 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.electricityPrice}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.compensationRate}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.annualPriceIncrease}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-3 gap-4 text-primary-foreground\">\r\n <input\r\n type=\"number\"\r\n step=\"0.01\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.electricityPrice.toFixed(2)}\r\n onInput={(e) => {\r\n this.electricityPrice = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <input\r\n type=\"number\"\r\n step=\"0.01\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.compensationRate.toFixed(2)}\r\n onInput={(e) => {\r\n this.compensationRate = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n <input\r\n type=\"number\"\r\n step=\"0.1\"\r\n class=\"w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted\"\r\n value={this.annualPriceIncrease.toFixed(1)}\r\n onInput={(e) => {\r\n this.annualPriceIncrease = parseFloat(\r\n (e.target as HTMLInputElement)\r\n .value,\r\n );\r\n this.recalculate();\r\n }}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Results Section */}\r\n <div\r\n class=\"space-y-4 p-4 border border-border rounded-4xl\"\r\n style={{ //TODO fix this\r\n border: \"1px solid var(--color-border)\",\r\n }}\r\n >\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.resultsTitle}\r\n </h2>\r\n <div class=\"bg-muted rounded-4xl p-4\">\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.autonomy}\r\n </span>\r\n <span class=\"text-xl font-bold text-secondary\">\r\n {this.autonomy > 100\r\n ? \"100\"\r\n : this.autonomy.toFixed(1)}%\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n {t.solarSystemForm.costSavings}\r\n </span>\r\n <div class=\"relative group\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"h-5 w-5 text-gray-400 cursor-help\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n >\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n <div class=\"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none\">\r\n {t.solarSystemForm\r\n .savingsDisclaimer}\r\n </div>\r\n </div>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.costSavings.toFixed(2)}€/{t\r\n .solarSystemForm.year}\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n Einspeisevergütung 25 Jahre\r\n </span>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.compensation25Years.toFixed(2)}€\r\n </span>\r\n </div>\r\n <div class=\"flex items-center justify-between mt-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span class=\"text-text-muted\">\r\n Geldwerter Vorteil 25 Jahre\r\n </span>\r\n </div>\r\n <span class=\"text-xl font-bold text-success\">\r\n {this.savedCosts25Years.toFixed(2)}€\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Contact Information Section */}\r\n <div class=\"space-y-4 pt-4\">\r\n <h2 class=\"text-lg font-semibold text-secondary\">\r\n {t.solarSystemForm.requestOffer}\r\n </h2>\r\n <div class=\"grid gap-4\">\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.name}\r\n </label>\r\n <label class=\"block text-sm font-medium text-text-muted mb-1\">\r\n {t.solarSystemForm.email}\r\n </label>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div>\r\n <input\r\n type=\"text\"\r\n class={`w-full px-4 py-2 rounded-4xl border ${\r\n this.nameError\r\n ? \"border-error\"\r\n : \"border-border\"\r\n } focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`}\r\n value={this.name}\r\n onInput={(e) => {\r\n this.name =\r\n (e.target as HTMLInputElement)\r\n .value;\r\n this.validateForm();\r\n }}\r\n placeholder=\"Your name\"\r\n />\r\n {this.nameError && (\r\n <p class=\"text-error text-sm mt-1\">\r\n {this.nameError}\r\n </p>\r\n )}\r\n </div>\r\n <div>\r\n <input\r\n type=\"email\"\r\n class={`w-full px-4 py-2 rounded-4xl border ${\r\n this.emailError\r\n ? \"border-error\"\r\n : \"border-border\"\r\n } focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`}\r\n value={this.email}\r\n onInput={(e) => {\r\n this.email =\r\n (e.target as HTMLInputElement)\r\n .value;\r\n this.validateForm();\r\n }}\r\n placeholder=\"your.email@example.com\"\r\n />\r\n {this.emailError && (\r\n <p class=\"text-error text-sm mt-1\">\r\n {this.emailError}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flex justify-center\">\r\n <button\r\n onClick={() => this.handleRequestOffer()}\r\n disabled={!this.name.trim() ||\r\n !this.email.trim() || !!this.nameError ||\r\n !!this.emailError}\r\n class=\"px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200 text-muted\"\r\n >\r\n {t.solarSystemForm.requestOfferButton}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -18,4 +18,35 @@ export const DEFAULT_SOLAR_PANEL_TYPE = {
|
|
|
18
18
|
efficiency: 0.224,
|
|
19
19
|
price: 77.68,
|
|
20
20
|
};
|
|
21
|
+
export const DEFAULT_COLOR_SCHEME = {
|
|
22
|
+
primary: "hsl(41 51% 90%)",
|
|
23
|
+
primaryForeground: "hsl(0 0% 0%)",
|
|
24
|
+
secondary: "hsl(28 100% 8%)",
|
|
25
|
+
secondaryForeground: "hsl(0 0% 100%)",
|
|
26
|
+
tertiary: "hsl(28 100% 29%)",
|
|
27
|
+
tertiaryForeground: "hsl(0 0% 100%)",
|
|
28
|
+
muted: "hsl(0 0% 100%)",
|
|
29
|
+
mutedForeground: "hsl(0 0% 0%)",
|
|
30
|
+
error: "hsl(0 100% 50%)",
|
|
31
|
+
errorForeground: "hsl(0 0% 100%)",
|
|
32
|
+
// Surface colors
|
|
33
|
+
surface: "hsl(0 0% 88%)", // gray-200
|
|
34
|
+
surfaceHover: "hsl(0 0% 82%)", // gray-300
|
|
35
|
+
surfaceActive: "hsl(0 0% 64%)", // gray-400
|
|
36
|
+
// Text colors
|
|
37
|
+
textMuted: "hsl(0 0% 45%)", // gray-600
|
|
38
|
+
textSecondary: "hsl(0 0% 55%)", // gray-500
|
|
39
|
+
textPlaceholder: "hsl(0 0% 73%)", // gray-400
|
|
40
|
+
// Border colors
|
|
41
|
+
border: "hsl(0 0% 82%)", // gray-300
|
|
42
|
+
borderLight: "hsl(0 0% 93%)", // gray-200
|
|
43
|
+
// Status colors
|
|
44
|
+
success: "hsl(142 76% 36%)", // green-600
|
|
45
|
+
info: "hsl(221 83% 53%)", // blue-500
|
|
46
|
+
// Interactive colors
|
|
47
|
+
hover: "hsl(0 0% 88%)", // gray-200
|
|
48
|
+
hoverDark: "hsl(28 100% 8%)", // darker secondary for hover
|
|
49
|
+
overlay: "rgba(0, 0, 0, 0.24)", // #0000003c
|
|
50
|
+
tooltip: "hsl(0 0% 13%)", // gray-800
|
|
51
|
+
};
|
|
21
52
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC1D,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,SAAS;IAC/B,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB,EAAE,yBAAyB;IAC/C,2BAA2B,EAAE,0BAA0B;IACvD,yBAAyB,EAAE,yBAAyB;IACpD,gCAAgC,EAAE,0BAA0B;IAC5D,4BAA4B,EAAE,yBAAyB;IACvD,mCAAmC,EAAE,0BAA0B;IAC/D,cAAc,EAAE,qBAAqB;CACxC,CAAA;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAmB;IACpD,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,KAAK;CACf,CAAA","sourcesContent":["import { SolarPanelType } from \"./utils/solar\";\r\n\r\nexport interface SolarExpertConfig {\r\n openRoofColor: string;\r\n closedRoofColor: string;\r\n openObstructionColor: string;\r\n closedObstructionColor: string;\r\n roofPolygonFillColor: string;\r\n obstructionPolygonFillColor: string;\r\n roofPolygonHoverFillColor: string;\r\n obstructionPolygonHoverFillColor: string;\r\n roofPolygonSelectedFillColor: string;\r\n obstructionPolygonSelectedFillColor: string;\r\n highlightColor: string;\r\n}\r\n\r\nexport const DEFAULT_SOLAR_EXPERT_CONFIG: SolarExpertConfig = {\r\n openRoofColor: \"#d6eeff\",\r\n closedRoofColor: \"#ffffff\",\r\n openObstructionColor: \"#f57242\",\r\n closedObstructionColor: \"rgba(255, 132, 107, 0.8)\",\r\n roofPolygonFillColor: \"rgba(92, 187, 255, 0.5)\",\r\n obstructionPolygonFillColor: \"rgba(255, 132, 107, 0.5)\",\r\n roofPolygonHoverFillColor: \"rgba(92, 187, 255, 0.8)\",\r\n obstructionPolygonHoverFillColor: \"rgba(255, 132, 107, 0.8)\",\r\n roofPolygonSelectedFillColor: \"rgba(92, 187, 255, 0.7)\",\r\n obstructionPolygonSelectedFillColor: \"rgba(255, 132, 107, 0.7)\",\r\n highlightColor: \"rgba(0, 89, 255, 1)\",\r\n}\r\n\r\nexport const DEFAULT_SOLAR_PANEL_TYPE: SolarPanelType = {\r\n widthMeters: 1.134,\r\n heightMeters: 1.762,\r\n kWattPeak: 0.455,\r\n efficiency: 0.224,\r\n price: 77.68,\r\n}\r\n\r\nexport interface ColorScheme {\r\n primary: string;\r\n primaryForeground: string;\r\n secondary: string;\r\n secondaryForeground: string;\r\n tertiary: string;\r\n tertiaryForeground: string;\r\n muted: string;\r\n mutedForeground: string;\r\n error: string;\r\n errorForeground: string;\r\n // Surface colors\r\n surface: string;\r\n surfaceHover: string;\r\n surfaceActive: string;\r\n // Text colors\r\n textMuted: string;\r\n textSecondary: string;\r\n textPlaceholder: string;\r\n // Border colors\r\n border: string;\r\n borderLight: string;\r\n // Status colors\r\n success: string;\r\n info: string;\r\n // Interactive colors\r\n hover: string;\r\n hoverDark: string;\r\n overlay: string;\r\n tooltip: string;\r\n}\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC1D,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,SAAS;IAC/B,sBAAsB,EAAE,0BAA0B;IAClD,oBAAoB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AAqB,EAAG,YAAY;IAC7C,OAAO,EAAE,eAAe,EAAS,WAAW;CAC/C,CAAA","sourcesContent":["import { SolarPanelType } from \"./utils/solar\";\r\n\r\nexport interface SolarExpertConfig {\r\n openRoofColor: string;\r\n closedRoofColor: string;\r\n openObstructionColor: string;\r\n closedObstructionColor: string;\r\n roofPolygonFillColor: string;\r\n obstructionPolygonFillColor: string;\r\n roofPolygonHoverFillColor: string;\r\n obstructionPolygonHoverFillColor: string;\r\n roofPolygonSelectedFillColor: string;\r\n obstructionPolygonSelectedFillColor: string;\r\n highlightColor: string;\r\n}\r\n\r\nexport const DEFAULT_SOLAR_EXPERT_CONFIG: SolarExpertConfig = {\r\n openRoofColor: \"#d6eeff\",\r\n closedRoofColor: \"#ffffff\",\r\n openObstructionColor: \"#f57242\",\r\n closedObstructionColor: \"rgba(255, 132, 107, 0.8)\",\r\n roofPolygonFillColor: \"rgba(92, 187, 255, 0.5)\",\r\n obstructionPolygonFillColor: \"rgba(255, 132, 107, 0.5)\",\r\n roofPolygonHoverFillColor: \"rgba(92, 187, 255, 0.8)\",\r\n obstructionPolygonHoverFillColor: \"rgba(255, 132, 107, 0.8)\",\r\n roofPolygonSelectedFillColor: \"rgba(92, 187, 255, 0.7)\",\r\n obstructionPolygonSelectedFillColor: \"rgba(255, 132, 107, 0.7)\",\r\n highlightColor: \"rgba(0, 89, 255, 1)\",\r\n}\r\n\r\nexport const DEFAULT_SOLAR_PANEL_TYPE: SolarPanelType = {\r\n widthMeters: 1.134,\r\n heightMeters: 1.762,\r\n kWattPeak: 0.455,\r\n efficiency: 0.224,\r\n price: 77.68,\r\n}\r\n\r\nexport const DEFAULT_COLOR_SCHEME: ColorScheme = {\r\n primary: \"hsl(41 51% 90%)\",\r\n primaryForeground: \"hsl(0 0% 0%)\",\r\n secondary: \"hsl(28 100% 8%)\",\r\n secondaryForeground: \"hsl(0 0% 100%)\",\r\n tertiary: \"hsl(28 100% 29%)\",\r\n tertiaryForeground: \"hsl(0 0% 100%)\",\r\n muted: \"hsl(0 0% 100%)\",\r\n mutedForeground: \"hsl(0 0% 0%)\",\r\n error: \"hsl(0 100% 50%)\",\r\n errorForeground: \"hsl(0 0% 100%)\",\r\n \r\n // Surface colors\r\n surface: \"hsl(0 0% 88%)\", // gray-200\r\n surfaceHover: \"hsl(0 0% 82%)\", // gray-300\r\n surfaceActive: \"hsl(0 0% 64%)\", // gray-400\r\n \r\n // Text colors\r\n textMuted: \"hsl(0 0% 45%)\", // gray-600\r\n textSecondary: \"hsl(0 0% 55%)\", // gray-500\r\n textPlaceholder: \"hsl(0 0% 73%)\", // gray-400\r\n \r\n // Border colors\r\n border: \"hsl(0 0% 82%)\", // gray-300\r\n borderLight: \"hsl(0 0% 93%)\", // gray-200\r\n \r\n // Status colors\r\n success: \"hsl(142 76% 36%)\", // green-600\r\n info: \"hsl(221 83% 53%)\", // blue-500\r\n \r\n // Interactive colors\r\n hover: \"hsl(0 0% 88%)\", // gray-200\r\n hoverDark: \"hsl(28 100% 8%)\", // darker secondary for hover\r\n overlay: \"rgba(0, 0, 0, 0.24)\", // #0000003c\r\n tooltip: \"hsl(0 0% 13%)\", // gray-800\r\n}\r\n\r\nexport interface ColorScheme {\r\n primary: string;\r\n primaryForeground: string;\r\n secondary: string;\r\n secondaryForeground: string;\r\n tertiary: string;\r\n tertiaryForeground: string;\r\n muted: string;\r\n mutedForeground: string;\r\n error: string;\r\n errorForeground: string;\r\n // Surface colors\r\n surface: string;\r\n surfaceHover: string;\r\n surfaceActive: string;\r\n // Text colors\r\n textMuted: string;\r\n textSecondary: string;\r\n textPlaceholder: string;\r\n // Border colors\r\n border: string;\r\n borderLight: string;\r\n // Status colors\r\n success: string;\r\n info: string;\r\n // Interactive colors\r\n hover: string;\r\n hoverDark: string;\r\n overlay: string;\r\n tooltip: string;\r\n}\r\n\r\n"]}
|