blue-chestnut-solar-expert 0.0.74 → 0.0.75
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.
|
@@ -266,16 +266,6 @@ const SolarSystemForm = class {
|
|
|
266
266
|
else {
|
|
267
267
|
this.emailError = "";
|
|
268
268
|
}
|
|
269
|
-
// Validate phone (optional)
|
|
270
|
-
const phoneRegex = /^[\+]?[1-9][\d]{0,15}$/;
|
|
271
|
-
if (this.phone.trim() &&
|
|
272
|
-
!phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ""))) {
|
|
273
|
-
this.phoneError = t.solarSystemForm.phoneError;
|
|
274
|
-
isValid = false;
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
this.phoneError = "";
|
|
278
|
-
}
|
|
279
269
|
if (!this.privacyPolicyAccepted) {
|
|
280
270
|
this.privacyPolicyError = "Datenschutzerklärung muss akzeptiert werden";
|
|
281
271
|
}
|
|
@@ -369,13 +359,13 @@ const SolarSystemForm = class {
|
|
|
369
359
|
// Reusable style objects
|
|
370
360
|
const borderStyle = { border: "1px solid var(--color-border)" };
|
|
371
361
|
const errorBorderStyle = { border: "1px solid var(--color-error)" };
|
|
372
|
-
return (h("div", { key: '
|
|
362
|
+
return (h("div", { key: '70d54cfc62c58f9f2253f5b9b9327ec23747d029', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
373
363
|
,
|
|
374
364
|
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
375
365
|
// ? "none"
|
|
376
366
|
// : "flex",
|
|
377
367
|
// }}
|
|
378
|
-
id: "solar-system-form" }, h("h1", { key: '
|
|
368
|
+
id: "solar-system-form" }, h("h1", { key: 'e60c36936ecf7d0f8b16fa703dcc0ff412970972', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: 'a4a20984e5b38a221c1b4a1a4a023dbff93312d9', class: "w-full bg-primary rounded-4xl space-y-6" }, h("div", { key: 'd151d7c85091c44906933f78f91259f3d0c72feb', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'f716a81efa248efa467a93430440bfbd0032a19c', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.systemInformation), h("div", { key: '67f5d9f2abc40331d2702c3d1a593311edd5caac', class: "flex flex-col sm:flex-row gap-4" }, h("div", { key: 'fdd64ed21a0c4d079c3f95c841c403e9a2696002', class: "flex-1 bg-muted rounded-4xl p-4 space-y-3" }, h("div", { key: '8f7a658dce286d09a8b9516432782b29f6c989fc', class: "flex items-center justify-between" }, h("label", { key: '94f8147108f010264a2ec36d66f9cad438f89cd0', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.numberOfPanels), !this.isIOS()
|
|
379
369
|
? (h("input", { type: "number", class: "w-20 px-3 py-1 rounded-full bg-muted text-muted-foreground text-right", value: this.numberOfPanels, readOnly: true }))
|
|
380
370
|
: (h("input", { type: "number", min: "1", max: this.maxPanels, class: "w-20 px-3 py-1 rounded-full focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground text-center", style: borderStyle, value: this.numberOfPanels, onInput: (e) => {
|
|
381
371
|
const value = parseInt(e.target.value);
|
|
@@ -383,26 +373,26 @@ const SolarSystemForm = class {
|
|
|
383
373
|
this.numberOfPanels = value;
|
|
384
374
|
this.recalculate();
|
|
385
375
|
}
|
|
386
|
-
} }))), !this.isIOS() && (h("input", { key: '
|
|
376
|
+
} }))), !this.isIOS() && (h("input", { key: 'd1a4679026fcbbcbb88a6d3be5800b955002459a', 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-muted", value: this.numberOfPanels, onInput: (e) => {
|
|
387
377
|
this.numberOfPanels = parseInt(e.target.value);
|
|
388
378
|
if (isNaN(this.numberOfPanels)) {
|
|
389
379
|
this.numberOfPanels = 0;
|
|
390
380
|
}
|
|
391
381
|
this.recalculate();
|
|
392
|
-
} }))), h("div", { key: '
|
|
393
|
-
.toFixed(1), " kWp"))))), h("div", { key: '
|
|
382
|
+
} }))), h("div", { key: 'd0d74661b8487fb235b127334e74e3be4720b7b8', class: "flex-1 bg-muted rounded-4xl p-4" }, h("div", { key: 'a2b1390f8a290dd49f13654f06cdc012fcf4c3ac', class: "flex items-center justify-between" }, h("label", { key: '1d357de36de759b2bdc7567860b2b8c3b7c44511', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.panelPeakPower), h("span", { key: 'f47df44b5845f0086816b5e40c6597328b92702f', class: "text-text-muted" }, this.panelPeakPower.toFixed(2), " kW")), h("div", { key: '45cd40e3301b89ac6f43eb04fa5a75a835685ab9', class: "flex items-center justify-between mt-4" }, h("span", { key: '801ae01d157d6b178e5b3a9618a6c18867199edc', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: '2095b9cc87d6f947d124ed61e0d348118c5d36b6', class: "font-bold text-text-muted" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak * this.numberOfPanels)
|
|
383
|
+
.toFixed(1), " kWp"))))), h("div", { key: 'c1c5456e8007437aac08472aface0acd53b42ec4', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'dd9cd5ba93889d7aa97675aa900c7b239e10f95e', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '41f63f9fd2efc1f76ec28147a092f9c4f8d07c1d', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'e19396608c9d188525c53659391cd010342f8c3e', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'd9f65881d55aa09d1f53c41b291a61411dafb25a', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), h("label", { key: 'c4188030e5a78a9aad8291c84a5a3f34784c19f0', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '75069b82993d8d8ddf5454b84e358e648966d42a', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'e2528f72aac33c0291944138e02a5d7cab021cd2', type: "number", step: "100", min: "0", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, value: this.householdConsumption, onInput: (e) => {
|
|
394
384
|
this.householdConsumption = parseInt(e.target.value);
|
|
395
385
|
this.recalculate();
|
|
396
|
-
} }), h("select", { key: '
|
|
386
|
+
} }), h("select", { key: '43a8790b51d7430c806bfbbaa6b36a096d7f37c0', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, onChange: (e) => {
|
|
397
387
|
this.consumptionProfile = e.target
|
|
398
388
|
.value;
|
|
399
389
|
this.recalculate();
|
|
400
|
-
} }, h("option", { key: '
|
|
390
|
+
} }, h("option", { key: 'c0d98a376c7c4c7b61a5d2d465408d4795301547', value: "mostly_at_home", selected: this.consumptionProfile === "mostly_at_home" }, t.solarSystemForm.consumptionProfiles.mostlyAtHome), h("option", { key: 'f2de2b4ecd7fa6fc5f1df80e04a8be7698063031', value: "mostly_away", selected: this.consumptionProfile === "mostly_away" }, t.solarSystemForm.consumptionProfiles.mostlyAway))))), h("div", { key: '920c701d373a84fde7f76ae4ed27839f771fcb40', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '91d16657faa951c805c2633e56048592e036b3cf', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.additionalComponents.title), h("div", { key: '46ab34405314501d0843e84559b8c823eab3dcb7', class: "flex flex-col gap-4" }, h("div", { key: '7b895c0116e21ca894333d66f389a6a1446556f0', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '7457a33beff20dc2b62ccbdbd8de5cc2e638f516', class: "flex items-center justify-between" }, h("div", { key: '8d9f5b61bf1d39222ae5815491088b2f77605787', class: "flex items-center gap-2" }, h("input", { key: '264257f3b5e8a6c8e8042226154a6c2662ac2396', 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) => {
|
|
401
391
|
this.heatPump = e.target.checked
|
|
402
392
|
? 100
|
|
403
393
|
: 0;
|
|
404
394
|
this.recalculate();
|
|
405
|
-
} }), h("label", { key: '
|
|
395
|
+
} }), h("label", { key: 'bb99ce616e3a4beb49d4f8ac1725f606b33eb9eb', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.heatPump)), this.heatPump > 0 && !this.isIOS() && (h("span", { key: 'e15948c1a40ba476c316f74aa260333e2a47737a', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '5928e7b66dcb7de7dfaab4262dbeceaedf5e2d89', class: "flex flex-col gap-2" }, this.isIOS()
|
|
406
396
|
? (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 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.heatPump, onInput: (e) => {
|
|
407
397
|
let value = parseInt(e.target.value);
|
|
408
398
|
if (isNaN(value)) {
|
|
@@ -416,29 +406,29 @@ const SolarSystemForm = class {
|
|
|
416
406
|
: (h("input", { 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-muted", value: this.heatPump, onInput: (e) => {
|
|
417
407
|
this.heatPump = parseInt(e.target.value);
|
|
418
408
|
this.recalculate();
|
|
419
|
-
} }))))), h("div", { key: '
|
|
409
|
+
} }))))), h("div", { key: '3dce7054a351a24b240f84dd78f93669336a2970', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '7e7b4248c3e089c8fa3a33e410d6308c5e8eca14', class: "flex items-center justify-between" }, h("div", { key: 'b0deaa7adf7d110bff0ab1eb6e8321af6a0ef2f2', class: "flex items-center gap-2" }, h("input", { key: 'ad3320ea0d12b29deaf4fc5fd9075009a718d3de', 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) => {
|
|
420
410
|
this.electricCar =
|
|
421
411
|
e.target.checked;
|
|
422
412
|
this.recalculate();
|
|
423
|
-
} }), h("label", { key: '
|
|
424
|
-
.kilometersPerYear)), h("div", { key: '
|
|
413
|
+
} }), h("label", { key: '253b3863edfd812e6e15df83cdaf0fbb51b72f1e', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.electricCar))), this.electricCar && (h("div", { key: 'bae8fb524f6d0ff2ddd94f29547981061c0effe3', class: "flex flex-col gap-2" }, h("div", { key: 'ea586e04a9c7a5ee2fd461839933bbe85cf38c65', class: "grid grid-cols-2 gap-4" }, h("label", { key: '302328cd91b3476a5562a46165e01b2049398183', class: "text-sm text-text-muted" }, t.solarSystemForm.additionalComponents.chargingTime), h("label", { key: 'ab31a9a422b43f90337fff71a9d17fedafea5e7b', class: "text-sm text-text-muted" }, t.solarSystemForm.additionalComponents
|
|
414
|
+
.kilometersPerYear)), h("div", { key: '92c9c0e318a0a174647a8ad9f5df43b6c7a18f03', class: "grid grid-cols-2 gap-4" }, h("select", { key: '9b9508e2c995e493a0cbc6e74b79043774e411ae', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
|
|
425
415
|
this.electricCarChargingTime =
|
|
426
416
|
e.target.value;
|
|
427
417
|
this.recalculate();
|
|
428
|
-
}, style: borderStyle }, h("option", { key: '
|
|
429
|
-
.chargingTimeDay), h("option", { key: '
|
|
430
|
-
.chargingTimeNight)), h("input", { key: '
|
|
418
|
+
}, style: borderStyle }, h("option", { key: 'b86bc3d6150e786f1604e4bd5816d3b736e229a0', value: "day", selected: this.electricCarChargingTime === "day" }, t.solarSystemForm.additionalComponents
|
|
419
|
+
.chargingTimeDay), h("option", { key: 'e44ea2b29253506808fe13d11ad3e98b9ed2a5f6', value: "night", selected: this.electricCarChargingTime === "night" }, t.solarSystemForm.additionalComponents
|
|
420
|
+
.chargingTimeNight)), h("input", { key: '741739766a16118f0420c05aae159aec8c4530a0', type: "number", min: "1000", max: "100000", step: "1000", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
|
|
431
421
|
this.kmDrivenPerYear = parseInt(e.target.value);
|
|
432
422
|
if (isNaN(this.kmDrivenPerYear)) {
|
|
433
423
|
this.kmDrivenPerYear = 0;
|
|
434
424
|
}
|
|
435
425
|
this.recalculate();
|
|
436
|
-
}, style: borderStyle }))))), h("div", { key: '
|
|
426
|
+
}, style: borderStyle }))))), h("div", { key: '46464376238a8f55232d5c8c3a9cfcbe5c8622d6', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'b06ef2180c5bc841ddfe795ec0f51bd2e42beb13', class: "flex items-center justify-between" }, h("div", { key: '07b781ec57a5eabe37d06ba30edbe01f58ca7fdb', class: "flex items-center gap-2" }, h("input", { key: '31b50ae12a833bcb42a2db1808d7437bf4a79842', type: "checkbox", id: "battery", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.batteryEnabled, onChange: (e) => {
|
|
437
427
|
this.batteryEnabled =
|
|
438
428
|
e.target.checked;
|
|
439
429
|
this.battery = this.batteryEnabled ? 5 : 0;
|
|
440
430
|
this.recalculate();
|
|
441
|
-
} }), h("label", { key: '
|
|
431
|
+
} }), h("label", { key: 'f20a15fe82537cf6b2b74f1edcbc4b56f8cd706c', htmlFor: "battery", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.battery)), this.batteryEnabled && !this.isIOS() && (h("span", { key: '4ac3c018c126c62b66f7faa4feb71e03c24294d6', class: "text-text-muted" }, this.battery, " kWh"))), this.batteryEnabled && (h("div", { key: '5c5f692d2a978f7a74f0b5b1b634192816020c85', class: "flex flex-col gap-2" }, this.isIOS()
|
|
442
432
|
? (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 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
|
|
443
433
|
let value = parseInt(e.target.value);
|
|
444
434
|
if (isNaN(value)) {
|
|
@@ -457,44 +447,44 @@ const SolarSystemForm = class {
|
|
|
457
447
|
this.battery = value;
|
|
458
448
|
this.batteryEnabled = value > 0;
|
|
459
449
|
this.recalculate();
|
|
460
|
-
} }))))))), h("div", { key: '
|
|
450
|
+
} }))))))), h("div", { key: 'd7c90b3e3cc75e36cbb89db6065fae557185b987', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'a8cbd7c834a52c1501caf1b46a460da308294974', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '549aa0819463ef63ac95f54a7f1f6eeec3ec840a', style: {
|
|
461
451
|
display: "grid",
|
|
462
452
|
gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
|
|
463
453
|
gap: "1rem",
|
|
464
|
-
} }, h("div", { key: '
|
|
454
|
+
} }, h("div", { key: '759400d019848a2f6ef56c968f002f34c1ea37fc' }, h("label", { key: '813d8085d7a0308e2b5d2a559f4e304671c5213a', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("input", { key: 'ca1c843153806a02458ffc6ffc1c9183984eced1', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
465
455
|
this.electricityPrice = parseFloat(e.target.value);
|
|
466
456
|
this.recalculate();
|
|
467
|
-
} })), h("div", { key: '
|
|
457
|
+
} })), h("div", { key: '6816f403e890df60ec893e542f752670dd6fb3bf' }, h("label", { key: '96775a2b364d83df0c1a929090122c720b2c0d71', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("input", { key: 'f5d76b24d81cac01d89332d43b6d1dc438ab1dba', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
468
458
|
this.compensationRate = parseFloat(e.target.value);
|
|
469
459
|
this.recalculate();
|
|
470
|
-
} })), h("div", { key: '
|
|
460
|
+
} })), h("div", { key: 'd5610baf02e2f1642c28c82ddeb4ca212edd1114' }, h("label", { key: '9fe53d005a802e65e59ec2199aeacff4d9376ae6', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease), h("input", { key: '5694a37adab907f0060c507823b4fb9d3563d344', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
471
461
|
this.annualPriceIncrease = parseFloat(e.target.value);
|
|
472
462
|
this.recalculate();
|
|
473
|
-
} })))), h("div", { key: '
|
|
463
|
+
} })))), h("div", { key: '284b7cc315117bb8fa7e35c21d532dc334f733f5', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'f3b9f6675373e62cff3568de592b0abe977b29f7', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.resultsTitle), h("div", { key: '4821bc053705ca3837ed40ee34c2fc72c886385f', class: "bg-muted rounded-4xl p-4" }, h("div", { key: '74ea8370844f0405fa0b595e4f6c830ecfb67b7a', class: "flex flex-col sm:flex-row sm:items-center justify-between" }, h("span", { key: '29d0a1fb39c848ef9b9cc9adbbd8968790162874', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: 'f53dbecd365141fcfdc2b756a1b50b569723a09b', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.autonomy > 100
|
|
474
464
|
? "100"
|
|
475
|
-
: this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: '
|
|
465
|
+
: this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: 'e2bcb61ca33d56426dc36767a1e62ac789b23b89', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '737e3f992c0e0bcc9a8df42dcb7a75aabb723138', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), h("span", { key: '4c14da582a6a553e131f6294d587157f346b824c', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyConsumption, 0), " ", "kWh/", t.solarSystemForm.year)), h("div", { key: '18e83bc4c96570e2afe11fbe78bf47f95823f4cd', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '2c313de2c983f235c6fd9301066f7af7bd7e5b2b', class: "text-text-muted" }, t.solarSystemForm.totalEnergyProduction), h("span", { key: 'a62cccf97efcfc62bccd7aa299f519673b86b82e', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyProduction, 0), " ", "kWh/", t.solarSystemForm.year)), h("div", { key: 'f4a2b74813ab31f43d06e74edd51b2e5339844f2', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '9160cce6dbd886b8ebc5f6d2af3b10d25999ae21', class: "flex items-center gap-2" }, h("span", { key: '9af89323e7eeb2789a95bca1823ecf3d4581cad0', class: "text-text-muted" }, t.solarSystemForm.costSavings)), h("span", { key: '9ce8f7ba05d5dd755eab55383e82a50c0c851379', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.costSavings), " ", "\u20AC/", t.solarSystemForm.year)), h("div", { key: '0cedbbaac907ee072ba58ec033f5a06161da0973', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '7e29ca571a25e70272b3ce72e0db8c226025f865', class: "flex items-center gap-2" }, h("span", { key: 'b85789008e7427e48f45d12f57e347d35a36dd49', class: "text-text-muted" }, t.solarSystemForm.compensation20Years)), h("span", { key: '30bbfde6c21ecc9ec44ac78b2f219ccc0111d8d7', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.compensation20Years), " \u20AC")), h("div", { key: '5028ae287edc74a0989806966b8df732e4e0faba', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '8c93b03ae68ab9c3d0aebfa853fb06f761ea0aa3', class: "flex items-center gap-2" }, h("span", { key: 'a21d501d52b7debfde3cc18b8f18d256ce152c9f', class: "text-text-muted" }, t.solarSystemForm.monetaryBenefit20Years)), h("span", { key: 'c8419348e835b6461972bb737a4d9f2bd9ee6f4b', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.savedCosts20Years), " \u20AC")))), h("div", { key: 'ca586dad27b58cb21144f35fddb9f151f322db1a', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'd21cd4c5cf65d02f8023411100653d802d633936', class: "font-semibold text-secondary pb-2", style: { fontSize: "1rem" } }, t.solarSystemForm.requestOffer), h("div", { key: '2652c3ccb103c754b10e3c9444a6020d906339d8', style: {
|
|
476
466
|
display: "grid",
|
|
477
467
|
gridTemplateColumns: "repeat(auto-fit, minmax(1 00px, 1fr))",
|
|
478
468
|
gap: "1rem",
|
|
479
|
-
} }, h("div", { key: '
|
|
469
|
+
} }, h("div", { key: '15c2b850a65b40c45285c9b964c2dc1a97f4001c' }, h("label", { key: '87580336b4acfbacee2a503de98a10c75ca5b59b', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.firstname || "Vorname"), h("input", { key: '6fb0206d9930f828ff13581cf18cff5fec09893a', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.firstnameError ? errorBorderStyle : borderStyle, value: this.firstname, onInput: (e) => {
|
|
480
470
|
this.firstname = e.target.value;
|
|
481
471
|
this.validateForm();
|
|
482
|
-
}, placeholder: "Vorname" }), this.firstnameError && (h("p", { key: '
|
|
472
|
+
}, placeholder: "Vorname" }), this.firstnameError && (h("p", { key: 'b4ace0d99e3a30399393682b294d194179838047', class: "text-error text-sm mt-1" }, this.firstnameError))), h("div", { key: '282019e95768741dce4a9f717c9f2d9922188118' }, h("label", { key: 'f817f2650cc3126fe9bef8d4243059208a5d6927', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.surname || "Nachname"), h("input", { key: '6c58f6e513bca5a11441aad86e6d182034a89b28', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.surnameError ? errorBorderStyle : borderStyle, value: this.surname, onInput: (e) => {
|
|
483
473
|
this.surname = e.target.value;
|
|
484
474
|
this.validateForm();
|
|
485
|
-
}, placeholder: "Nachname" }), this.surnameError && (h("p", { key: '
|
|
475
|
+
}, placeholder: "Nachname" }), this.surnameError && (h("p", { key: '1a0ff67c40016d15bf91b0ad7d04530b3f3f7539', class: "text-error text-sm mt-1" }, this.surnameError))), h("div", { key: '38d8937350f9cff25d5b5ed4976f996d03d27fc2' }, h("label", { key: '6ccc9ba8020ea344ffc849f287fc3063939d9405', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email), h("input", { key: '505cd2bb46b1557db0778951154b41d21ad94537', type: "email", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.emailError ? errorBorderStyle : borderStyle, value: this.email, onInput: (e) => {
|
|
486
476
|
this.email = e.target.value;
|
|
487
477
|
this.validateForm();
|
|
488
|
-
}, placeholder: "mail@beispiel.com" }), this.emailError && (h("p", { key: '
|
|
478
|
+
}, placeholder: "mail@beispiel.com" }), this.emailError && (h("p", { key: '912b1f2f688d49bba464a08f3e6028d6e2e5212a', class: "text-error text-sm mt-1" }, this.emailError))), h("div", { key: 'f52c2ab23408817ea4667abee158a815ae682e53' }, h("label", { key: '688c90e5eaf133a1fc0cc77fc5fc3ba83d076da0', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.phone), h("input", { key: '08e3f894d1ee88226d5b978285d7cbd08c34d2d2', type: "tel", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.phoneError ? errorBorderStyle : borderStyle, value: this.phone, onInput: (e) => {
|
|
489
479
|
this.phone = e.target.value;
|
|
490
480
|
this.validateForm();
|
|
491
|
-
}, placeholder: "0171 23456789" }), this.phoneError && (h("p", { key: '
|
|
481
|
+
}, placeholder: "0171 23456789" }), this.phoneError && (h("p", { key: '24c29a4bad76b7a88cec01844e046d3bfa07244a', class: "text-error text-sm mt-1" }, this.phoneError)))), h("div", { key: 'c762e2589c9c09052e5159f66b5892ef2bfbda42', class: "flex flex-col items-center gap-4" }, h("div", { key: '5b30b12c47e942ff59dddabea46fd1ef0f0f940f', class: "flex flex-col items-start w-full" }, h("div", { key: '48cc641a45be3690af63aaf7f868522a2a904a2a', class: "flex items-center gap-2" }, h("input", { key: '2c44d65c492c0d792da5cf89866a86b00b91bb32', type: "checkbox", id: "privacyPolicy", class: "w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.privacyPolicyAccepted, onChange: (e) => {
|
|
492
482
|
this.privacyPolicyAccepted =
|
|
493
483
|
e.target.checked;
|
|
494
484
|
if (e.target.checked) {
|
|
495
485
|
this.privacyPolicyError = "";
|
|
496
486
|
}
|
|
497
|
-
} }), h("label", { key: '
|
|
487
|
+
} }), h("label", { key: '9567ee73f664f579f09d0aaebaf0a6e838a45c6f', htmlFor: "privacyPolicy", class: "text-sm text-text-muted" }, "Ich stimme der", " ", h("a", { key: '9550bc728219b9945826268b45df46b7221d9f5a', href: "https://www.solaravatar.com/rechtliches/datenschutz", target: "_blank", rel: "noopener noreferrer", class: "text-secondary hover:underline" }, "Datenschutzerkl\u00E4rung"), " ", "zu.")), this.privacyPolicyError && (h("p", { key: '78a6199973bcfb7dbfaaf7531546cb8a4d8a0e97', class: "text-error text-sm mt-1 ml-6" }, this.privacyPolicyError))), h("button", { key: '02113b6f6337f8fccba3242a81434871d88160c9', onClick: () => this.handleRequestOffer(), disabled: !this.firstname.trim() ||
|
|
498
488
|
!this.surname.trim() ||
|
|
499
489
|
!this.email.trim() ||
|
|
500
490
|
!!this.firstnameError ||
|
|
@@ -508,9 +498,9 @@ const SolarSystemForm = class {
|
|
|
508
498
|
color: this.isSubmitting
|
|
509
499
|
? "var(--color-text-muted)"
|
|
510
500
|
: "#ffffff",
|
|
511
|
-
} }, this.isSubmitting && (h("div", { key: '
|
|
501
|
+
} }, this.isSubmitting && (h("div", { key: 'ebd02301b69efc003c3847779e762fa8fa63045e', class: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" })), this.isSubmitting
|
|
512
502
|
? t.solarSystemForm.sending
|
|
513
|
-
: t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: '
|
|
503
|
+
: t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: '9d303f64695a402f8a521a100a3dba9c2bfc5aef', class: `text-sm px-4 py-2 rounded-4xl ${this.submitSuccess
|
|
514
504
|
? "bg-success/10 text-success border border-success/20"
|
|
515
505
|
: "bg-error/10 text-error border border-error/20"}` }, this.submitMessage)))))));
|
|
516
506
|
}
|