blue-chestnut-solar-expert 0.0.18 → 0.0.20
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 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js +3124 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +2 -2
- package/dist/cjs/loading-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +1 -1
- package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
- package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/icons/icon.js +3 -0
- package/dist/collection/components/icons/icon.js.map +1 -1
- package/dist/collection/components/icons/undo.js +64 -0
- package/dist/collection/components/icons/undo.js.map +1 -0
- package/dist/collection/components/map-draw/map-draw.js +65 -22
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/map-draw/map-selector.js +2 -2
- package/dist/collection/components/map-draw/map-selector.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +26 -1
- package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-information.js +3 -3
- package/dist/collection/components/map-draw/polygon-information.js.map +1 -1
- package/dist/collection/components/map-draw/tool-box.js +27 -3
- package/dist/collection/components/map-draw/tool-box.js.map +1 -1
- package/dist/collection/components/settings/settings.js +8 -8
- package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +16 -1
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +85 -185
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/components/widgets/loading-widget.js +1 -1
- package/dist/collection/constants.js +2 -1
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/output.css +20 -9
- package/dist/collection/store.js +1 -1
- package/dist/collection/store.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +5 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +7 -2
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +5 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/collection/utils/render/tools.js +7 -0
- package/dist/collection/utils/render/tools.js.map +1 -1
- package/dist/collection/utils/simulation/simulation.js +109 -0
- package/dist/collection/utils/simulation/simulation.js.map +1 -0
- package/dist/collection/utils/simulation/solarCurves.js +31 -0
- package/dist/collection/utils/simulation/solarCurves.js.map +1 -0
- package/dist/collection/utils/simulation/types.js +4 -0
- package/dist/collection/utils/simulation/types.js.map +1 -0
- package/dist/components/eraser-icon.js +1 -1
- package/dist/components/house-icon.js +1 -1
- package/dist/components/icon-selector.js +1 -1
- package/dist/components/loading-widget.js +2 -2
- package/dist/components/loading-widget.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/move-icon.js +1 -1
- package/dist/components/octagon-minus-icon.js +1 -1
- package/dist/components/p-BDBrVfn4.js +38 -0
- package/dist/components/p-BDBrVfn4.js.map +1 -0
- package/dist/components/p-BDrs1Te9.js +38 -0
- package/dist/components/p-BDrs1Te9.js.map +1 -0
- package/dist/components/p-BbXgEBG5.js +38 -0
- package/dist/components/p-BbXgEBG5.js.map +1 -0
- package/dist/components/p-Bq1PVegq.js +174 -0
- package/dist/components/p-Bq1PVegq.js.map +1 -0
- package/dist/components/p-BrVkygdn.js +38 -0
- package/dist/components/p-BrVkygdn.js.map +1 -0
- package/dist/components/p-BxEeUA4s.js +149 -0
- package/dist/components/p-BxEeUA4s.js.map +1 -0
- package/dist/components/p-C-_6TJs5.js +164 -0
- package/dist/components/p-C-_6TJs5.js.map +1 -0
- package/dist/components/{p-BSx-VRl1.js → p-CPLDlLfb.js} +99 -50
- package/dist/components/p-CPLDlLfb.js.map +1 -0
- package/dist/components/p-CRnyqUKc.js +47 -0
- package/dist/components/p-CRnyqUKc.js.map +1 -0
- package/dist/components/p-CabEU06O.js +103 -0
- package/dist/components/p-CabEU06O.js.map +1 -0
- package/dist/components/p-CmFUQbz_.js +507 -0
- package/dist/components/p-CmFUQbz_.js.map +1 -0
- package/dist/components/p-CumvV0_M.js +38 -0
- package/dist/components/p-CumvV0_M.js.map +1 -0
- package/dist/components/{p-C5Qpifsm.js → p-CwVUc6Hq.js} +20 -5
- package/dist/components/p-CwVUc6Hq.js.map +1 -0
- package/dist/components/p-DI6_jwLe.js +38 -0
- package/dist/components/p-DI6_jwLe.js.map +1 -0
- package/dist/components/p-DPfpDV5e.js +74 -0
- package/dist/components/p-DPfpDV5e.js.map +1 -0
- package/dist/components/p-DYiK8eDp.js +38 -0
- package/dist/components/p-DYiK8eDp.js.map +1 -0
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/search-icon.js +1 -1
- package/dist/components/settings-icon.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-calculator.js +2 -2
- package/dist/components/solar-calculator.js.map +1 -1
- package/dist/components/solar-expert.js +52 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/components/tool-box.js +1 -1
- package/dist/components/undo-icon.d.ts +11 -0
- package/dist/components/undo-icon.js +9 -0
- package/dist/components/undo-icon.js.map +1 -0
- 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 -0
- package/dist/esm/eraser-icon_16.entry.js +3107 -0
- package/dist/esm/eraser-icon_16.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-widget.entry.js +2 -2
- package/dist/esm/loading-widget.entry.js.map +1 -1
- package/dist/esm/solar-calculator.entry.js +2 -2
- package/dist/esm/solar-calculator.entry.js.map +1 -1
- package/dist/esm/stencil-library.js +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 -0
- package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-1acfe8c0.entry.js +32 -0
- package/dist/stencil-library/{p-04893dc6.entry.js.map → p-1acfe8c0.entry.js.map} +1 -1
- package/dist/stencil-library/p-1e2ddc82.entry.js +2 -0
- package/dist/stencil-library/p-1e2ddc82.entry.js.map +1 -0
- package/dist/stencil-library/p-56f8bd65.entry.js +2 -0
- package/dist/stencil-library/p-56f8bd65.entry.js.map +1 -0
- package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/icons/undo.d.ts +5 -0
- package/dist/types/components/map-draw/map-draw.d.ts +1 -0
- package/dist/types/components/map-draw/polygon-buttons.d.ts +1 -0
- package/dist/types/components/map-draw/tool-box.d.ts +1 -0
- package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +3 -2
- package/dist/types/components.d.ts +21 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/types/lang.d.ts +5 -0
- package/dist/types/utils/render/tools.d.ts +2 -1
- package/dist/types/utils/simulation/simulation.d.ts +8 -0
- package/dist/types/utils/simulation/solarCurves.d.ts +3 -0
- package/dist/types/utils/simulation/types.d.ts +49 -0
- package/package.json +2 -2
- 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.entry.cjs.js.map +0 -1
- package/dist/cjs/eraser-icon_15.cjs.entry.js +0 -3007
- package/dist/cjs/eraser-icon_15.cjs.entry.js.map +0 -1
- package/dist/components/p-BJFgUvs3.js +0 -38
- package/dist/components/p-BJFgUvs3.js.map +0 -1
- package/dist/components/p-BP2JkbOB.js +0 -149
- package/dist/components/p-BP2JkbOB.js.map +0 -1
- package/dist/components/p-BSx-VRl1.js.map +0 -1
- package/dist/components/p-BfAeCWO4.js +0 -38
- package/dist/components/p-BfAeCWO4.js.map +0 -1
- package/dist/components/p-BilSpdUG.js +0 -94
- package/dist/components/p-BilSpdUG.js.map +0 -1
- package/dist/components/p-Bn39cXBR.js +0 -38
- package/dist/components/p-Bn39cXBR.js.map +0 -1
- package/dist/components/p-BzuGyPz5.js +0 -493
- package/dist/components/p-BzuGyPz5.js.map +0 -1
- package/dist/components/p-C4UfrfLc.js +0 -40
- package/dist/components/p-C4UfrfLc.js.map +0 -1
- package/dist/components/p-C5Qpifsm.js.map +0 -1
- package/dist/components/p-CesxKYgJ.js +0 -38
- package/dist/components/p-CesxKYgJ.js.map +0 -1
- package/dist/components/p-Cm-6HU5f.js +0 -38
- package/dist/components/p-Cm-6HU5f.js.map +0 -1
- package/dist/components/p-D93MrNOs.js +0 -174
- package/dist/components/p-D93MrNOs.js.map +0 -1
- package/dist/components/p-DSWRVBhO.js +0 -74
- package/dist/components/p-DSWRVBhO.js.map +0 -1
- package/dist/components/p-klKuBKKU.js +0 -149
- package/dist/components/p-klKuBKKU.js.map +0 -1
- package/dist/components/p-metMBa33.js +0 -38
- package/dist/components/p-metMBa33.js.map +0 -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.entry.js.map +0 -1
- package/dist/esm/eraser-icon_15.entry.js +0 -2991
- package/dist/esm/eraser-icon_15.entry.js.map +0 -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.entry.esm.js.map +0 -1
- package/dist/stencil-library/p-02607fda.entry.js +0 -2
- package/dist/stencil-library/p-02607fda.entry.js.map +0 -1
- package/dist/stencil-library/p-04893dc6.entry.js +0 -32
- package/dist/stencil-library/p-3af1ea82.entry.js +0 -2
- package/dist/stencil-library/p-3af1ea82.entry.js.map +0 -1
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
// import Chart from "chart.js/auto";
|
|
3
2
|
import { DEFAULT_SOLAR_PANEL_TYPE } from "../../config";
|
|
4
3
|
import { getLanguageStrings } from "../../utils/lang/general";
|
|
5
4
|
import { state } from "../../store";
|
|
6
|
-
import {
|
|
5
|
+
import { generateElectricCarChargingHours, simulate, } from "../../utils/simulation/simulation";
|
|
7
6
|
export class SolarSystemForm {
|
|
8
7
|
systemConfigs = {};
|
|
9
8
|
roofPolygons = {};
|
|
10
9
|
obstructionPolygons = {};
|
|
11
|
-
householdConsumption =
|
|
10
|
+
householdConsumption = 4500;
|
|
12
11
|
consumptionProfile = "mostly_at_home";
|
|
13
12
|
electricityPrice = 0.3;
|
|
14
13
|
compensationRate = 0.07;
|
|
15
14
|
annualPriceIncrease = 2;
|
|
16
15
|
autonomy = 0;
|
|
17
16
|
costSavings = 0;
|
|
18
|
-
costSavings25Years = 0;
|
|
19
17
|
numberOfPanels = 5;
|
|
20
18
|
panelPeakPower = 0.4; // kW per panel
|
|
21
19
|
name = "";
|
|
@@ -26,168 +24,67 @@ export class SolarSystemForm {
|
|
|
26
24
|
electricCarChargingTime = "day";
|
|
27
25
|
heatPump = 0;
|
|
28
26
|
battery = 0;
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
compensation25Years = 0;
|
|
28
|
+
savedCosts25Years = 0;
|
|
29
|
+
maxPanels = 5;
|
|
31
30
|
updateSystemConfigs() {
|
|
32
31
|
if (Object.keys(this.systemConfigs).length === 0) {
|
|
33
32
|
this.numberOfPanels = 0;
|
|
33
|
+
this.maxPanels = 0;
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].positionedPanels.length, 0);
|
|
37
|
+
this.maxPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].positionedPanels.length, 0);
|
|
37
38
|
this.panelPeakPower =
|
|
38
39
|
Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel
|
|
39
40
|
.kWattPeak;
|
|
40
41
|
this.recalculate();
|
|
41
|
-
this.updateChart();
|
|
42
42
|
}
|
|
43
43
|
recalculate() {
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const remainingBatteryCapacity = this.battery - batteryCharge;
|
|
81
|
-
const energyToStore = Math.min(energyDifference, remainingBatteryCapacity);
|
|
82
|
-
if (energyToStore > 0) {
|
|
83
|
-
batteryCharge += energyToStore;
|
|
84
|
-
energyUsageOfProduction += hourlyConsumption;
|
|
85
|
-
soldEnergy += energyDifference - energyToStore;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
// Battery full, sell excess
|
|
89
|
-
energyUsageOfProduction += hourlyConsumption;
|
|
90
|
-
soldEnergy += energyDifference;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else if (energyDifference < 0) {
|
|
94
|
-
// Production deficit - try to use battery
|
|
95
|
-
const energyNeeded = -energyDifference;
|
|
96
|
-
const energyFromBattery = Math.min(energyNeeded, batteryCharge);
|
|
97
|
-
if (energyFromBattery > 0) {
|
|
98
|
-
batteryCharge -= energyFromBattery;
|
|
99
|
-
energyUsageOfProduction += production[i] +
|
|
100
|
-
energyFromBattery;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
// No battery power available
|
|
104
|
-
energyUsageOfProduction += production[i];
|
|
44
|
+
const simulationConfig = {
|
|
45
|
+
general: {
|
|
46
|
+
simulationYears: 25,
|
|
47
|
+
},
|
|
48
|
+
householdConsumption: {
|
|
49
|
+
consumptionProfile: this.consumptionProfile,
|
|
50
|
+
winterConsumptionFactor: 1.2,
|
|
51
|
+
summerConsumptionFactor: 0.8,
|
|
52
|
+
averageConsumption: this.householdConsumption / 365,
|
|
53
|
+
},
|
|
54
|
+
electricityPrice: {
|
|
55
|
+
purchase: this.electricityPrice,
|
|
56
|
+
sell: this.compensationRate,
|
|
57
|
+
increase: this.annualPriceIncrease / 100,
|
|
58
|
+
},
|
|
59
|
+
solarSystem: {
|
|
60
|
+
numberOfPanels: this.numberOfPanels,
|
|
61
|
+
panelType: DEFAULT_SOLAR_PANEL_TYPE,
|
|
62
|
+
pitch: 30,
|
|
63
|
+
},
|
|
64
|
+
batteryKWh: this.battery,
|
|
65
|
+
solarRadiation: {
|
|
66
|
+
winterFactor: 0.2,
|
|
67
|
+
summerFactor: 0.6,
|
|
68
|
+
},
|
|
69
|
+
heatPump: {
|
|
70
|
+
m2: this.heatPump,
|
|
71
|
+
},
|
|
72
|
+
electricCar: this.electricCar
|
|
73
|
+
? {
|
|
74
|
+
averageKilometersPerDay: 50,
|
|
75
|
+
consumptionkWhPer100km: 17,
|
|
76
|
+
batteryKWh: 20,
|
|
77
|
+
chargingHours: this.electricCarChargingTime === "day"
|
|
78
|
+
? generateElectricCarChargingHours(6, 18)
|
|
79
|
+
: generateElectricCarChargingHours(18, 6),
|
|
105
80
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.costSavings = soldEnergy * this.compensationRate * 365 +
|
|
114
|
-
energyUsageOfProduction * 365 * this.electricityPrice;
|
|
115
|
-
// Calculate 25-year savings with price increase
|
|
116
|
-
let totalSavings = 0;
|
|
117
|
-
let currentPrice = this.electricityPrice;
|
|
118
|
-
for (let year = 0; year < 25; year++) {
|
|
119
|
-
const yearlySavings = soldEnergy * this.compensationRate * 365 +
|
|
120
|
-
energyUsageOfProduction * 365 * currentPrice;
|
|
121
|
-
totalSavings += yearlySavings;
|
|
122
|
-
currentPrice *= 1 + this.annualPriceIncrease / 100;
|
|
123
|
-
}
|
|
124
|
-
this.costSavings25Years = totalSavings;
|
|
125
|
-
this.autonomy =
|
|
126
|
-
(energyUsageOfProduction / (totalHouseholdConsumption / 365)) *
|
|
127
|
-
100;
|
|
128
|
-
}
|
|
129
|
-
updateChart() {
|
|
130
|
-
// if (!this.chartRef) return;
|
|
131
|
-
// const ctx = this.chartRef.getContext("2d");
|
|
132
|
-
// if (!ctx) return;
|
|
133
|
-
// if (this.chart) {
|
|
134
|
-
// this.chart.destroy();
|
|
135
|
-
// }
|
|
136
|
-
// const hours = Array.from({ length: 24 }, (_, i) => `${i}:00`);
|
|
137
|
-
// const data = CONSUMPTION_PROFILES[this.consumptionProfile];
|
|
138
|
-
// const norm = data.reduce((acc, curr) => acc + curr, 0);
|
|
139
|
-
// const peakKwh = this.numberOfPanels * this.panelPeakPower;
|
|
140
|
-
// const production = SOLAR_RADIATION.map((radiation) =>
|
|
141
|
-
// radiation * peakKwh
|
|
142
|
-
// );
|
|
143
|
-
// for (let i = 0; i < data.length; i++) {
|
|
144
|
-
// data[i] = data[i] * this.householdConsumption / norm / 365;
|
|
145
|
-
// }
|
|
146
|
-
// let datasets = [{
|
|
147
|
-
// label: "Energy Consumption",
|
|
148
|
-
// data: data,
|
|
149
|
-
// borderColor: "#964500",
|
|
150
|
-
// backgroundColor: "rgba(150, 69, 0, 0.1)",
|
|
151
|
-
// fill: true,
|
|
152
|
-
// tension: 0.4,
|
|
153
|
-
// }, {
|
|
154
|
-
// label: "Energy Production",
|
|
155
|
-
// data: production,
|
|
156
|
-
// borderColor: "#000000",
|
|
157
|
-
// backgroundColor: "rgba(0, 0, 0, 0.1)",
|
|
158
|
-
// fill: true,
|
|
159
|
-
// }];
|
|
160
|
-
// this.chart = new Chart(ctx, {
|
|
161
|
-
// type: "line",
|
|
162
|
-
// data: {
|
|
163
|
-
// labels: hours,
|
|
164
|
-
// datasets: datasets,
|
|
165
|
-
// },
|
|
166
|
-
// options: {
|
|
167
|
-
// responsive: true,
|
|
168
|
-
// plugins: {
|
|
169
|
-
// title: {
|
|
170
|
-
// display: true,
|
|
171
|
-
// text: "Daily Consumption Profile",
|
|
172
|
-
// },
|
|
173
|
-
// },
|
|
174
|
-
// scales: {
|
|
175
|
-
// y: {
|
|
176
|
-
// beginAtZero: true,
|
|
177
|
-
// title: {
|
|
178
|
-
// display: true,
|
|
179
|
-
// text: "Relative Consumption",
|
|
180
|
-
// },
|
|
181
|
-
// },
|
|
182
|
-
// x: {
|
|
183
|
-
// title: {
|
|
184
|
-
// display: true,
|
|
185
|
-
// text: "Hour of Day",
|
|
186
|
-
// },
|
|
187
|
-
// },
|
|
188
|
-
// },
|
|
189
|
-
// },
|
|
190
|
-
// });
|
|
81
|
+
: undefined,
|
|
82
|
+
};
|
|
83
|
+
const result = simulate(simulationConfig);
|
|
84
|
+
this.compensation25Years = result.compensationPerDay * 365 * 25;
|
|
85
|
+
this.savedCosts25Years = result.byYearSavedCosts.reduce((acc, curr) => acc + curr, 0);
|
|
86
|
+
this.costSavings = result.compensationPerDay * 365;
|
|
87
|
+
this.autonomy = result.autonomy * 100;
|
|
191
88
|
}
|
|
192
89
|
componentWillLoad() {
|
|
193
90
|
this.updateSystemConfigs();
|
|
@@ -236,100 +133,101 @@ export class SolarSystemForm {
|
|
|
236
133
|
}
|
|
237
134
|
render() {
|
|
238
135
|
const t = getLanguageStrings(state.settings.language);
|
|
239
|
-
return (h("div", { key: '
|
|
136
|
+
return (h("div", { key: '744d980cd58f2d3d04f7f3ff4938781a6c645fe5', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
240
137
|
,
|
|
241
138
|
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
242
139
|
// ? "none"
|
|
243
140
|
// : "flex",
|
|
244
141
|
// }}
|
|
245
|
-
id: "solar-system-form" }, h("h1", { key: '
|
|
246
|
-
|
|
142
|
+
id: "solar-system-form" }, h("h1", { key: 'f003bc55e2f63531822bd23ac3d39946d730df69', class: "text-2xl font-bold text-[#271200] mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: '20c215156baabe57b3188759741d7d20c99270ef', class: "w-full bg-[#f3ebda] rounded-4xl p-6 space-y-6" }, h("div", { key: '7372fb2f5dadd14e0bc411773598c1316b7d1607', class: "space-y-4" }, h("h2", { key: '05978eeb5b39b5e37e40cd052bb64f9f239b1a01', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.systemInformation), h("div", { key: '005128f28eee0bba612bcc5b65f81a546d52e754', class: "grid grid-rows-3 gap-0" }, h("div", { key: '9095d807e024286e0ddd505e4f0c4d6311e92f99', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'ce78ba6e92916f72a53698c1372637d065010d22', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.numberOfPanels), h("label", { key: '4c2f7e8a88baa146a4f01e2dabafaea416c74acd', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.panelPeakPower)), h("div", { key: 'fc7b28c8de9de709b7116612213f993e37598b09', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'b7b63eb3667e664c6b7dcf251b786a20882b500d', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.numberOfPanels, readOnly: true }), h("input", { key: 'c500aa9a91ce6b21f734d95d92532d82be154055', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.panelPeakPower, readonly: true })), h("div", { key: 'd69c51ebd1188abaf61de239ce5d537ad9115a7e', class: "grid grid-cols-2 gap-4" }, h("div", { key: 'ecac73eba72e206b678d86ba18b4ba04e72d6e2d', class: "w-full pt-2" }, h("input", { key: '48a2fda42efcbd457df3c21ba63cb73066471052', type: "range", min: "1", max: this.maxPanels, 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-white", value: this.numberOfPanels, onInput: (e) => {
|
|
143
|
+
this.numberOfPanels = parseInt(e.target
|
|
144
|
+
.value);
|
|
145
|
+
this.recalculate();
|
|
146
|
+
} })))), h("div", { key: 'b01c9bbec27359126ed3283a14e275861ca79194', class: "bg-white rounded-4xl p-4" }, h("div", { key: '4be558f4d94a68bda294dc32155df64243e3f2c7', class: "flex items-center justify-between" }, h("span", { key: '677a12d0236e17349fff064f6fad76279a51299a', class: "text-gray-600" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: '15f819a867ee238aeeb4f9cfc24b7b5e607176c8', class: "text-xl font-bold text-[#271200]" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
|
|
147
|
+
this.numberOfPanels).toFixed(1), " kW")))), h("div", { key: '0adcb579dce8f9357c2631b4b6fa8dc0e66a5727', class: "space-y-4" }, h("h2", { key: '93ce837e4b57123e19629499d371211c82b67f17', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '7c1b46ffac1807ffa75b98b9ff317250cb7f4f3f', class: "grid grid-rows-2 gap-0" }, h("div", { key: '115981c3667bdd500bb9ed9862dfcf6c57cf3488', class: "grid grid-cols-2 gap-4" }, h("label", { key: '1d36b519882a44f84f948594f2aac031c8b14785', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.annualConsumption), h("label", { key: 'd0360fb66300f6a1048d6318ad388a28c25ede1c', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '830c929bedc1731853b8abb4602c1a183b31c5d9', class: "grid grid-cols-2 gap-4" }, h("input", { key: '1f0625102ccf8711c5d25b8b42086ddacf0f5bce', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.householdConsumption, onInput: (e) => {
|
|
247
148
|
this.householdConsumption = parseInt(e.target
|
|
248
149
|
.value);
|
|
249
150
|
this.recalculate();
|
|
250
|
-
|
|
251
|
-
} }), h("select", { key: 'bc3f018b0e3610911a313361b4ccfae5fe3b09b9', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
151
|
+
} }), h("select", { key: '39cec2d7c15bd3eec6091b3dc6384ab7ed95310c', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
252
152
|
this.consumptionProfile =
|
|
253
153
|
e.target
|
|
254
154
|
.value;
|
|
255
155
|
this.recalculate();
|
|
256
|
-
|
|
257
|
-
} }, h("option", { key: 'eed73b9e3f47b5ca6050e29180ea388cd3c915d0', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
156
|
+
} }, h("option", { key: '74b10c47b8fefb3aee7c818d35797649cd9cf700', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
258
157
|
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
259
|
-
.mostlyAtHome), h("option", { key: '
|
|
158
|
+
.mostlyAtHome), h("option", { key: '650009f75563391223500548984d7c36ad6c13b2', value: "mostly_away", selected: this.consumptionProfile ===
|
|
260
159
|
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
261
|
-
.mostlyAway))))), h("div", { key: '
|
|
160
|
+
.mostlyAway))))), h("div", { key: '86a106ff0692fe3387ac8cd885120933b4f0e4d0', class: "space-y-4" }, h("h2", { key: 'ec07a0b6a96ed21036fb01ec15b5e14f26c05717', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '2406008f140b2e6118a1158c40170db3049d1d0e', class: "flex flex-col gap-4" }, h("div", { key: '7e11cbbb64c167795b8f3d67e81936cbcab7e437', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '4939f5f7fc79efadbc861f5b5d64730fe6dd08ec', class: "flex items-center justify-between" }, h("div", { key: 'e8a076f0129819d83c021baf76f9051e32a51745', class: "flex items-center gap-2" }, h("input", { key: 'acc0ae74a9fcd0bedce903ffa5d38f2174ba2874', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded-full focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
|
|
262
161
|
this.heatPump =
|
|
263
162
|
e.target
|
|
264
163
|
.checked
|
|
265
164
|
? 100
|
|
266
165
|
: 0;
|
|
267
166
|
this.recalculate();
|
|
268
|
-
} }), h("label", { key: '
|
|
167
|
+
} }), h("label", { key: 'cd903331c1dadec8fb8e32fb292a35e833349dde', htmlFor: "heatPump", class: "text-gray-600" }, t.solarSystemForm
|
|
269
168
|
.additionalComponents
|
|
270
|
-
.heatPump)), this.heatPump > 0 && (h("span", { key: '
|
|
169
|
+
.heatPump)), this.heatPump > 0 && (h("span", { key: 'a4b28f091c369e7b8167326f6f0ce7ce2ed87403', class: "text-gray-600" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '21799a5144de79e95bd82efd8e32d9a77d939e82', class: "flex flex-col gap-2" }, h("input", { key: 'c378e59e2421626b59aab30dca50d689318ea1c5', type: "range", min: "10", max: "300", step: "10", 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-white", value: this.heatPump, onInput: (e) => {
|
|
271
170
|
this.heatPump = parseInt(e.target
|
|
272
171
|
.value);
|
|
273
172
|
this.recalculate();
|
|
274
|
-
} })))), h("div", { key: '
|
|
173
|
+
} })))), h("div", { key: 'f361c0fc04391089240776a5dd76eb4a1f139dc2', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '02bc28aff14eb518268cabb806caf30749fee32e', class: "flex items-center justify-between" }, h("div", { key: 'f53cb4db1f15b85743a2ba6d20486d0c12da3447', class: "flex items-center gap-2" }, h("input", { key: 'b6e4a0f08869fa9e7950371d590b9991ec03d452', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
|
|
275
174
|
this.electricCar =
|
|
276
175
|
e.target
|
|
277
176
|
.checked;
|
|
278
177
|
this.recalculate();
|
|
279
|
-
} }), h("label", { key: '
|
|
178
|
+
} }), h("label", { key: 'a607d596e03ee4969111bd4124507814f1ea048d', htmlFor: "electricCar", class: "text-gray-600" }, t.solarSystemForm
|
|
280
179
|
.additionalComponents
|
|
281
|
-
.electricCar))), this.electricCar && (h("div", { key: '
|
|
180
|
+
.electricCar))), this.electricCar && (h("div", { key: '65681c033ecb581ac19c28034b456d3d2dc8bb6c', class: "flex flex-col gap-2" }, h("label", { key: 'e95874e8b94206c57fe44ed7355be4e38ddbd2ed', class: "text-sm text-gray-600" }, t.solarSystemForm
|
|
282
181
|
.additionalComponents
|
|
283
|
-
.chargingTime), h("select", { key: '
|
|
182
|
+
.chargingTime), h("select", { key: '47ed96b55ae0b40ab0bd40236f3f1def09701548', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
284
183
|
this.electricCarChargingTime =
|
|
285
184
|
e.target
|
|
286
185
|
.value;
|
|
287
186
|
this.recalculate();
|
|
288
|
-
} }, h("option", { key: '
|
|
187
|
+
} }, h("option", { key: '1c48c51cae0282d0f2663ee0683e0d828e2cc508', value: "day", selected: this
|
|
289
188
|
.electricCarChargingTime ===
|
|
290
189
|
"day" }, t.solarSystemForm
|
|
291
190
|
.additionalComponents
|
|
292
|
-
.chargingTimeDay), h("option", { key: '
|
|
191
|
+
.chargingTimeDay), h("option", { key: 'a8f55ef8f4bfecca29290ae2bd49975bd3cfc386', value: "night", selected: this
|
|
293
192
|
.electricCarChargingTime ===
|
|
294
193
|
"night" }, t.solarSystemForm
|
|
295
194
|
.additionalComponents
|
|
296
|
-
.chargingTimeNight))))), h("div", { key: '
|
|
297
|
-
.battery), h("span", { key: '
|
|
195
|
+
.chargingTimeNight))))), h("div", { key: '5050cb4356d0f01bd6de72c778efd3d74dc48fcc', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '94bc81576b9f577edf0eb5a50e5a72ea70a6a23c', class: "flex items-center justify-between" }, h("label", { key: '78374a6a108650c6e9da3d690c5cde3409009b64', class: "text-gray-600" }, t.solarSystemForm.additionalComponents
|
|
196
|
+
.battery), h("span", { key: '7dc59ee19216c1a59a19b3c6cd0889faebb9af85', class: "text-gray-600" }, this.battery, " kWh")), h("div", { key: '6880afe65e17ecfb231d994cc03618457738c68f', class: "flex flex-col gap-2" }, h("input", { key: 'e07afb820af65843e68e34a84730edc5b214440b', 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-white", value: this.battery, onInput: (e) => {
|
|
298
197
|
this.battery = parseInt(e.target
|
|
299
198
|
.value);
|
|
300
199
|
this.recalculate();
|
|
301
|
-
} }))))), h("div", { key: '
|
|
200
|
+
} }))))), h("div", { key: 'a4bfb580de1e3c45a9f3b25acdec60008be691ce', class: "space-y-4" }, h("h2", { key: 'dfd3a5492bc3b57e800b3c946e95ada611190378', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '51e1bce640dd72353ee4f163c4d0db3343a87504', class: "grid grid-rows-2 gap-0" }, h("div", { key: '96422dfb55d394ad3678a924681e954b7ce22df3', class: "grid grid-cols-3 gap-4" }, h("label", { key: 'cf0d91a03cc3daef6fa6d82be31871bab5f7c100', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.electricityPrice), h("label", { key: '8ddfef1b47fb2ed3408a94244ed34d03d20445b7', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.compensationRate), h("label", { key: 'b6f72c81858b794c1326c13ebf1e7874d8a73375', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.annualPriceIncrease)), h("div", { key: '53bb5a5f2332e2a47c1266f22106809128678e56', class: "grid grid-cols-3 gap-4" }, h("input", { key: '5244283ad3af74ecdc19e6007088cb0ce1b36664', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
302
201
|
this.electricityPrice = parseFloat(e.target
|
|
303
202
|
.value);
|
|
304
203
|
this.recalculate();
|
|
305
|
-
|
|
306
|
-
} }), h("input", { key: 'a9f21bb0ef842975f13528995beb35c7990fbab7', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
204
|
+
} }), h("input", { key: '156f947d4e06d7a3cc6ad217ec5d9fa2951ad4dc', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
307
205
|
this.compensationRate = parseFloat(e.target
|
|
308
206
|
.value);
|
|
309
207
|
this.recalculate();
|
|
310
|
-
|
|
311
|
-
} }), h("input", { key: '6fd5d4dfe880ee443891fdf5a21a6cadf1a85c3f', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
208
|
+
} }), h("input", { key: '98143e54459b81a7b7264bffc923dd371bc1742f', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
312
209
|
this.annualPriceIncrease = parseFloat(e.target
|
|
313
210
|
.value);
|
|
314
211
|
this.recalculate();
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
.
|
|
318
|
-
.
|
|
212
|
+
} })))), h("div", { key: '86b293619777e18d63b305ca07bc7e797fb0d70e', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: 'a68bcc7eeec7f0be54aea7c029e52ba1b0609638', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.resultsTitle), h("div", { key: 'b7ba73455969d9bd125c96a1f33dcf48c1418c37', class: "bg-white rounded-4xl p-4" }, h("div", { key: '18c3105018499d3b3a637aed351d91714ba5a612', class: "flex items-center justify-between" }, h("span", { key: '0035e2b15865f8227cbc114d38ebf5ccc00b656b', class: "text-gray-600" }, t.solarSystemForm.autonomy), h("span", { key: 'fb045f2880eeb51734f97d6a77a7319fca895ee9', class: "text-xl font-bold text-[#271200]" }, this.autonomy > 100
|
|
213
|
+
? "100"
|
|
214
|
+
: this.autonomy.toFixed(1), "%")), h("div", { key: '0b496be58c3105ffd4ce3e8bbb5647cf4b3ed92e', class: "flex items-center justify-between mt-4" }, h("div", { key: '3e08d94b99e63a9b52d9b1ac4eb1662023afebf8', class: "flex items-center gap-2" }, h("span", { key: 'abe46d153767c62c13d2d8b3eef0ccc89fa5f22e', class: "text-gray-600" }, t.solarSystemForm.costSavings), h("div", { key: '51d67b7365530344639c8df9122c4c52803fbe0f', class: "relative group" }, h("svg", { key: '0bc8015429f01fb53ae07c1921152a1493d87a2d', 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: '593c7428f06632d9e46d8d7ecb06ca1e25fb6c4f', "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: 'ce7e6f853ea5370a2dbdfd392fef232f21bdc0d1', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
|
|
215
|
+
.savingsDisclaimer))), h("span", { key: '2d89f0f4d9437d5b75b1bc5c34140bc8502f2b23', class: "text-xl font-bold text-green-600" }, this.costSavings.toFixed(2), "\u20AC/", t
|
|
216
|
+
.solarSystemForm.year)), h("div", { key: 'ae58b2b27ba70aa4f18dce63c507395255452db6', class: "flex items-center justify-between mt-4" }, h("div", { key: '7a0a1c6d8948a475374537eee1d9054b6824c38c', class: "flex items-center gap-2" }, h("span", { key: '4537c21706ee095f3e3ed263f0a99386eec92795', class: "text-gray-600" }, "Einspeiseverg\u00FCtung 25 Jahre")), h("span", { key: '75955814953cb2c9e0f311aaa1e3d04f19fc89fb', class: "text-xl font-bold text-green-600" }, this.compensation25Years.toFixed(2), "\u20AC")), h("div", { key: '06c3fa7e43948fb35f09e6e98716cbcd7d064d6c', class: "flex items-center justify-between mt-4" }, h("div", { key: '01210645e518efbc462feebc9980d24a6c09c163', class: "flex items-center gap-2" }, h("span", { key: 'f2519b5004a17f4ea09ac6ec374b73a553706ab5', class: "text-gray-600" }, "Geldwerter Vorteil 25 Jahre")), h("span", { key: 'b4e92d010609ac4a571e2c2732f62bf8dc836133', class: "text-xl font-bold text-green-600" }, this.savedCosts25Years.toFixed(2), "\u20AC")))), h("div", { key: '8d0dba4bcddfaf4e1509713c54d6474787b6254d', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: '26c08b27f7282f261f5a4779caaba766f20a8ca4', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.requestOffer), h("div", { key: 'a9366b58ac1e04aac462f0b9e21513400c053cb0', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'a49322839297e3c7593236f071a8094138a32b47', class: "grid grid-cols-2 gap-4" }, h("label", { key: '3676b60ef2f4fd8edcea20b86c9c0c0321829e95', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.name), h("label", { key: 'f41e248f056c96db5cfd225a79d1ec70ced03586', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.email)), h("div", { key: '3facacede4f9f59c96332e8caa76dd017c2640d6', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'e31c14c1bdc5e50b833f1868bd03157e3919a585', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
|
|
319
217
|
? "border-red-500"
|
|
320
218
|
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.name, onInput: (e) => {
|
|
321
219
|
this.name =
|
|
322
220
|
e.target
|
|
323
221
|
.value;
|
|
324
222
|
this.validateForm();
|
|
325
|
-
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '
|
|
223
|
+
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '9d04539c41c625e235ba6589d7bce5599d06a39e', class: "text-red-500 text-sm mt-1" }, this.nameError)), h("input", { key: 'eb8fe3b14a98867a9f62cfd4db4b2104ae2864eb', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
|
|
326
224
|
? "border-red-500"
|
|
327
225
|
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.email, onInput: (e) => {
|
|
328
226
|
this.email =
|
|
329
227
|
e.target
|
|
330
228
|
.value;
|
|
331
229
|
this.validateForm();
|
|
332
|
-
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '
|
|
230
|
+
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '0c53594a4dc486f83fd05b09547b2a41297165bb', class: "text-red-500 text-sm mt-1" }, this.emailError)))), h("div", { key: '9a975e258e31e3b1b592b7b6bd4518be55d4c42d', class: "flex justify-center" }, h("button", { key: '5eb37544172e568838477368f62dfc84696d3ba6', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
333
231
|
!this.email.trim() || !!this.nameError ||
|
|
334
232
|
!!this.emailError, class: "px-4 py-2 bg-[#271200] rounded-4xl hover:bg-[#964500] transition-colors duration-200", style: { color: "white" } }, t.solarSystemForm.requestOfferButton))))));
|
|
335
233
|
}
|
|
@@ -432,7 +330,6 @@ export class SolarSystemForm {
|
|
|
432
330
|
"annualPriceIncrease": {},
|
|
433
331
|
"autonomy": {},
|
|
434
332
|
"costSavings": {},
|
|
435
|
-
"costSavings25Years": {},
|
|
436
333
|
"numberOfPanels": {},
|
|
437
334
|
"panelPeakPower": {},
|
|
438
335
|
"name": {},
|
|
@@ -442,7 +339,10 @@ export class SolarSystemForm {
|
|
|
442
339
|
"electricCar": {},
|
|
443
340
|
"electricCarChargingTime": {},
|
|
444
341
|
"heatPump": {},
|
|
445
|
-
"battery": {}
|
|
342
|
+
"battery": {},
|
|
343
|
+
"compensation25Years": {},
|
|
344
|
+
"savedCosts25Years": {},
|
|
345
|
+
"maxPanels": {}
|
|
446
346
|
};
|
|
447
347
|
}
|
|
448
348
|
static get watchers() {
|