@acorex-platform/extension-weather-core-client 0.0.53 → 0.0.56
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/fesm2022/acorex-platform-extension-weather-core-client.mjs +69 -37
- package/fesm2022/acorex-platform-extension-weather-core-client.mjs.map +1 -1
- package/i18n/en-AU/extensions-weather.json +176 -0
- package/i18n/en-US/extensions-weather.json +176 -0
- package/i18n/fa-IR/extensions-weather.json +176 -0
- package/package.json +2 -2
|
@@ -319,10 +319,10 @@ class AXPWeatherWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
319
319
|
getConditionName(conditionId) {
|
|
320
320
|
const condition = this.weatherService.getCondition(conditionId);
|
|
321
321
|
if (!condition?.name) {
|
|
322
|
-
return '@
|
|
322
|
+
return '@extensions-weather:weather.conditions.unknown';
|
|
323
323
|
}
|
|
324
324
|
const formattedName = condition.name.toLowerCase().replace(/\s+/g, '-');
|
|
325
|
-
return `@
|
|
325
|
+
return `@extensions-weather:weather.conditions.${formattedName}`;
|
|
326
326
|
}
|
|
327
327
|
getCurrentTemperature() {
|
|
328
328
|
const data = this.weatherData();
|
|
@@ -366,7 +366,7 @@ class AXPWeatherWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
366
366
|
return this.weatherData()?.current.uv ?? 0;
|
|
367
367
|
}
|
|
368
368
|
getWindSpeedUnitKey() {
|
|
369
|
-
return this.windSpeedUnit() === 'km/h' ? '@
|
|
369
|
+
return this.windSpeedUnit() === 'km/h' ? '@extensions-weather:weather.units.kmh' : '@extensions-weather:weather.units.mph';
|
|
370
370
|
}
|
|
371
371
|
getForecastDayTemp(day) {
|
|
372
372
|
return this.temperatureUnit() === '°C' ? day.maxTempC : day.maxTempF;
|
|
@@ -389,13 +389,13 @@ class AXPWeatherWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
389
389
|
const checkDate = new Date(date);
|
|
390
390
|
checkDate.setHours(0, 0, 0, 0);
|
|
391
391
|
if (checkDate.getTime() === today.getTime()) {
|
|
392
|
-
return '@
|
|
392
|
+
return '@extensions-weather:weather.days.today';
|
|
393
393
|
}
|
|
394
394
|
if (checkDate.getTime() === tomorrow.getTime()) {
|
|
395
|
-
return '@
|
|
395
|
+
return '@extensions-weather:weather.days.tomorrow';
|
|
396
396
|
}
|
|
397
397
|
const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
|
|
398
|
-
return `@
|
|
398
|
+
return `@extensions-weather:weather.days.${days[checkDate.getDay()]}`;
|
|
399
399
|
}
|
|
400
400
|
parseDate(dateStr) {
|
|
401
401
|
return new Date(dateStr);
|
|
@@ -462,14 +462,14 @@ class AXPWeatherWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
462
462
|
this.hasError.set(true);
|
|
463
463
|
const status = error?.status;
|
|
464
464
|
if (status === 0) {
|
|
465
|
-
this.errorMessage.set('@
|
|
465
|
+
this.errorMessage.set('@extensions-weather:weather.error.network');
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
468
|
if (status !== undefined && status >= 400 && status < 500) {
|
|
469
|
-
this.errorMessage.set('@
|
|
469
|
+
this.errorMessage.set('@extensions-weather:weather.error.api');
|
|
470
470
|
return;
|
|
471
471
|
}
|
|
472
|
-
this.errorMessage.set('@
|
|
472
|
+
this.errorMessage.set('@extensions-weather:weather.error.general');
|
|
473
473
|
}
|
|
474
474
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPWeatherWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
475
475
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPWeatherWidgetViewComponent, isStandalone: true, selector: "ng-component", providers: [
|
|
@@ -477,7 +477,7 @@ class AXPWeatherWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
477
477
|
provide: AXPWeatherApiAbstract,
|
|
478
478
|
useClass: AXEWeatherGatewayService,
|
|
479
479
|
},
|
|
480
|
-
], usesInheritance: true, ngImport: i0, template: "<div\n class=\"weather-card weather-card--{{ layoutVariant() }}\"\n [style.background]=\"visualTheme().background\"\n [style.--weather-high]=\"visualTheme().high\"\n [style.--weather-low]=\"visualTheme().low\"\n [style.--weather-accent]=\"visualTheme().accent\"\n [attr.aria-label]=\"'Current weather for ' + city()\"\n>\n @if (isLoading()) {\n <div class=\"weather-card__state\" [attr.aria-busy]=\"true\">\n <ax-skeleton class=\"weather-card__skeleton-icon\"></ax-skeleton>\n <div class=\"weather-card__skeleton-lines\">\n <ax-skeleton class=\"weather-card__skeleton-line weather-card__skeleton-line--lg\"></ax-skeleton>\n <ax-skeleton class=\"weather-card__skeleton-line\"></ax-skeleton>\n </div>\n </div>\n } @else if (hasError()) {\n <div class=\"weather-card__state\">\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n [title]=\"'@dashboard:weather.error.title'\"\n [description]=\"errorMessage()\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@dashboard:weather.retry' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n } @else if (weatherData()) {\n <div class=\"weather-card__blob\" [style.background]=\"visualTheme().blob\" aria-hidden=\"true\"></div>\n\n @if (layoutVariant() === '1x2') {\n <div class=\"weather-card__tall\">\n <div class=\"weather-card__hero\">\n <div class=\"weather-card__hero-core\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__hero-icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</span>\n </div>\n <div class=\"weather-card__inline-location\">\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n <span>{{ locationShortLabel() }}</span>\n </div>\n </div>\n\n <p class=\"weather-card__condition weather-card__condition--center\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n\n @if (showStats()) {\n <div class=\"weather-card__footer-stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n H {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n L {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n </div>\n }\n </div>\n } @else {\n <header class=\"weather-card__header\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <div class=\"weather-card__location\">\n <span class=\"weather-card__city\">{{ city() }}</span>\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n </div>\n </header>\n\n <div class=\"weather-card__body\">\n <div class=\"weather-card__primary\">\n <div class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</div>\n <p class=\"weather-card__condition\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n </div>\n\n @if (showStats()) {\n <div class=\"weather-card__stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n H {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n L {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n @if (showFeelsLike()) {\n <span class=\"weather-card__stat weather-card__stat--feels\">\n Feels {{ getFeelsLikeTemperature() | number: '1.0-0' }}\u00B0\n </span>\n }\n </div>\n }\n\n @if (showHourly()) {\n <section class=\"weather-card__hourly\">\n <h4 class=\"weather-card__section-title\">\n {{ '@dashboard:weather.hourly-forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__hourly-row\">\n @for (hour of displayedHourlyForecast(); track hour.time) {\n <div class=\"weather-card__hour\">\n <span class=\"weather-card__hour-time\">{{ getHourLabel(hour.time) }}</span>\n <img\n [src]=\"getConditionIcon(hour.condition)\"\n class=\"weather-card__hour-icon\"\n [alt]=\"getConditionName(hour.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__hour-temp\">{{ getHourTemp(hour) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showDaily()) {\n <section class=\"weather-card__daily\">\n <h4 class=\"weather-card__section-title\">\n {{ '@dashboard:weather.forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__daily-list\">\n @for (day of displayedDailyForecast(); track day.date) {\n <div class=\"weather-card__daily-item\">\n <span class=\"weather-card__daily-name\">\n {{ getDayName(parseDate(day.date)) | translate | async }}\n </span>\n <img\n [src]=\"getConditionIcon(day.condition)\"\n class=\"weather-card__daily-icon\"\n [alt]=\"getConditionName(day.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__daily-high\">{{ getForecastDayTemp(day) | number: '1.0-0' }}\u00B0</span>\n <span class=\"weather-card__daily-low\">{{ getForecastDayMinTemp(day) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showMetrics() && (showHumidity() || showWind() || getUvIndex() > 0)) {\n <section class=\"weather-card__metrics\">\n @if (showHumidity()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-droplet\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.humidity' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getHumidity() }}%</span>\n </div>\n }\n @if (showWind()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-wind\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.wind' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnitKey() | translate | async }}\n </span>\n </div>\n }\n @if (getUvIndex() > 0) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-sun\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.uv-index' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getUvIndex() }}</span>\n </div>\n }\n </section>\n }\n </div>\n }\n } @else {\n <div class=\"weather-card__state\">\n <axp-state-message\n icon=\"fa-solid fa-cloud-sun\"\n [title]=\"'@dashboard:weather.no-data.title'\"\n [description]=\"'@dashboard:weather.no-data.description'\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@dashboard:weather.load-data' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n }\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%}.weather-card{--weather-icon-size: 3rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .6875rem;position:relative;display:flex;width:100%;height:100%;min-height:0px;flex-direction:column;overflow:hidden;padding:1rem 1.125rem;border-radius:1rem;border:1px solid var(--weather-accent, #6ba4e8);color:#0f172a;box-shadow:0 1px 3px #0f172a0f}@supports (color: color-mix(in lab,red,red)){.weather-card{border:1px solid color-mix(in srgb,var(--weather-accent, #6ba4e8) 16%,white)}}.weather-card .weather-card__blob{pointer-events:none;position:absolute;inset:0}.weather-card .weather-card__state{position:relative;z-index:1;display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:.625rem}.weather-card .weather-card__retry{display:inline-flex;align-items:center;gap:.375rem}.weather-card .weather-card__header{position:relative;z-index:1;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:.75rem}.weather-card .weather-card__icon{width:var(--weather-icon-size);height:var(--weather-icon-size);flex-shrink:0;object-fit:contain}.weather-card .weather-card__location{display:inline-flex;min-width:0px;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.3rem;font-size:var(--weather-meta-size);color:#334155}.weather-card .weather-card__location i{font-size:.6875rem;color:#94a3b8}.weather-card .weather-card__city{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize}.weather-card .weather-card__body{position:relative;z-index:1;display:flex;min-height:0px;flex:1;flex-direction:column;gap:.625rem;margin-top:.375rem}.weather-card .weather-card__primary{display:flex;min-width:0px;flex-direction:column;gap:.25rem}.weather-card .weather-card__temp{font-size:var(--weather-temp-size);--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);letter-spacing:-.04em;color:#0f172a}.weather-card .weather-card__condition{margin:0;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);line-height:1.35;color:#475569}.weather-card .weather-card__stats{display:flex;flex-wrap:wrap;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.75rem 1rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__stat--high{color:var(--weather-high, #f59e0b)}.weather-card .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card .weather-card__stat--feels{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#64748b}.weather-card .weather-card__section-title{margin:0 0 .5rem;font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);text-transform:uppercase;letter-spacing:.08em;color:#94a3b8}.weather-card .weather-card__hourly-row{display:flex;overflow-x:auto;gap:.375rem}.weather-card .weather-card__hour{display:flex;flex:1;flex-direction:column;align-items:center;gap:.25rem;min-width:2.75rem}.weather-card .weather-card__hour-time{font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#94a3b8}.weather-card .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .55);height:calc(var(--weather-icon-size) * .55);object-fit:contain}.weather-card .weather-card__hour-temp{font-size:var(--weather-meta-size);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-list{display:flex;flex-direction:column;gap:.375rem}.weather-card .weather-card__daily-item{display:grid;align-items:center;grid-template-columns:minmax(4rem,1fr) auto auto auto;gap:.625rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__daily-name{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#334155}.weather-card .weather-card__daily-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5);object-fit:contain}.weather-card .weather-card__daily-high{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-low{color:#64748b}.weather-card .weather-card__metrics{display:flex;flex-direction:column;gap:.625rem}.weather-card .weather-card__metric{display:grid;align-items:center;grid-template-columns:auto 1fr auto;gap:.5rem;font-size:var(--weather-meta-size);color:#64748b}.weather-card .weather-card__metric i{color:var(--weather-accent, #3b82f6);width:1rem;text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.weather-card .weather-card__metric-value{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:#0f172a}.weather-card .weather-card__skeleton-icon{width:var(--weather-icon-size);height:var(--weather-icon-size);border-radius:calc(infinity * 1px)}.weather-card .weather-card__skeleton-lines{display:flex;width:100%;flex-direction:column;gap:.375rem}.weather-card .weather-card__skeleton-line{width:55%;height:.75rem;border-radius:var(--radius-md, .375rem)}.weather-card .weather-card__skeleton-line--lg{width:35%;height:1.75rem}.weather-card--1x2{--weather-temp-size: 2.125rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;padding:.625rem .625rem .5rem}.weather-card--1x2 .weather-card__tall{position:relative;z-index:1;display:grid;width:100%;height:100%;min-height:0px;align-items:stretch;grid-template-rows:auto 1fr auto}.weather-card--1x2 .weather-card__hero{display:flex;width:100%;align-items:flex-start;justify-content:center;gap:.125rem;padding-top:.125rem}.weather-card--1x2 .weather-card__hero-core{position:relative;display:inline-flex;align-items:center;padding-left:1.375rem}.weather-card--1x2 .weather-card__hero-icon{pointer-events:none;position:absolute;top:50%;left:0;z-index:0;object-fit:contain;width:2.125rem;height:2.125rem;transform:translateY(-50%)}.weather-card--1x2 .weather-card__temp{position:relative;z-index:1;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);font-size:var(--weather-temp-size);letter-spacing:-.03em}.weather-card--1x2 .weather-card__inline-location{display:inline-flex;flex-shrink:0;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);white-space:nowrap;gap:.125rem;margin-top:.2rem;font-size:.625rem;color:#64748b}.weather-card--1x2 .weather-card__inline-location i{font-size:.5rem;color:#94a3b8}.weather-card--1x2 .weather-card__condition--center{margin:0;display:flex;align-items:center;justify-content:center;text-align:center;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);color:#334155}.weather-card--1x2 .weather-card__footer-stats{display:flex;width:100%;align-items:center;justify-content:space-between;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.5rem;font-size:var(--weather-meta-size)}.weather-card--1x2 .weather-card__stat--high,.weather-card--1x2 .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card--2x1{--weather-icon-size: 2.75rem;--weather-temp-size: 2.5rem;padding:.875rem 1rem}.weather-card--2x1 .weather-card__body{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:1.25rem;row-gap:.5rem;margin-top:.25rem}.weather-card--2x1 .weather-card__primary{flex-shrink:0;flex-grow:0}.weather-card--2x1 .weather-card__stats{flex:auto;justify-content:flex-end;margin-left:auto}.weather-card--2x1 .weather-card__hourly{flex:1 1 100%;min-width:0;overflow:hidden}.weather-card--2x1 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--2x1 .weather-card__hour{min-width:0px;flex:1}.weather-card--2x2{--weather-icon-size: 3.5rem;--weather-temp-size: 3.25rem;--weather-label-size: .9375rem;--weather-meta-size: .875rem}.weather-card--2x2 .weather-card__body{flex:1;justify-content:space-between;gap:.5rem}.weather-card--2x2 .weather-card__stats{margin-top:auto}.weather-card--4x2{--weather-icon-size: 2.75rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .625rem;padding:.75rem 1rem}.weather-card--4x2 .weather-card__body{display:grid;min-height:0px;flex:1;align-items:stretch;grid-template-columns:minmax(0,.95fr) minmax(0,1.8fr) minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:.875rem;row-gap:.375rem;margin-top:.25rem}.weather-card--4x2 .weather-card__primary{grid-column:1;grid-row:1;min-width:0}.weather-card--4x2 .weather-card__condition{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__stats{flex-direction:row;flex-wrap:wrap;align-content:flex-start;align-items:center;grid-column:1;grid-row:2;gap:.35rem .65rem;min-width:0;align-self:end}.weather-card--4x2 .weather-card__hourly{display:flex;min-height:0px;flex-direction:column;grid-column:2;grid-row:1 / span 2;overflow:hidden}.weather-card--4x2 .weather-card__section-title{margin:0 0 .35rem}.weather-card--4x2 .weather-card__hourly-row{display:flex;flex:1;align-items:stretch;justify-content:space-between;gap:.125rem;overflow:hidden}.weather-card--4x2 .weather-card__hour{display:flex;min-width:0px;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:.2rem}.weather-card--4x2 .weather-card__hour-icon{width:1.5rem;height:1.5rem}.weather-card--4x2 .weather-card__hour-time,.weather-card--4x2 .weather-card__hour-temp{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__daily{display:none}.weather-card--4x2 .weather-card__metrics{display:flex;height:100%;flex-direction:column;justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;min-width:0;gap:.5rem}.weather-card--4x2 .weather-card__metric{grid-template-columns:auto minmax(0,1fr) auto;gap:.375rem}.weather-card--4x2 .weather-card__metric-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x4{--weather-icon-size: 4rem;--weather-temp-size: 3.75rem;--weather-label-size: 1rem;--weather-meta-size: .875rem;--weather-caption-size: .75rem;padding:1.125rem 1.375rem}.weather-card--4x4 .weather-card__body{display:grid;align-items:flex-start;grid-template-columns:minmax(10rem,1fr) minmax(0,2.4fr) minmax(8rem,.9fr);grid-template-rows:auto auto;gap:1rem 1.5rem;margin-top:.625rem}.weather-card--4x4 .weather-card__primary{grid-column:1;grid-row:1}.weather-card--4x4 .weather-card__stats{flex-direction:column;align-items:flex-start;grid-column:1;grid-row:2;gap:.5rem}.weather-card--4x4 .weather-card__hourly{grid-column:2;grid-row:1;min-width:0;overflow:hidden}.weather-card--4x4 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--4x4 .weather-card__hour{min-width:0px;flex:1}.weather-card--4x4 .weather-card__daily{grid-column:2;grid-row:2}.weather-card--4x4 .weather-card__metrics{justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;gap:.875rem}.weather-card--4x4 .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
480
|
+
], usesInheritance: true, ngImport: i0, template: "<div\n class=\"weather-card weather-card--{{ layoutVariant() }}\"\n [style.background]=\"visualTheme().background\"\n [style.--weather-high]=\"visualTheme().high\"\n [style.--weather-low]=\"visualTheme().low\"\n [style.--weather-accent]=\"visualTheme().accent\"\n [attr.aria-label]=\"('@extensions-weather:weather.aria-current' | translate: { params: { city: city() } } | async) ?? ''\"\n>\n @if (isLoading()) {\n <div class=\"weather-card__state\" [attr.aria-busy]=\"true\">\n <ax-skeleton class=\"weather-card__skeleton-icon\"></ax-skeleton>\n <div class=\"weather-card__skeleton-lines\">\n <ax-skeleton class=\"weather-card__skeleton-line weather-card__skeleton-line--lg\"></ax-skeleton>\n <ax-skeleton class=\"weather-card__skeleton-line\"></ax-skeleton>\n </div>\n </div>\n } @else if (hasError()) {\n <div class=\"weather-card__state\">\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n [title]=\"'@extensions-weather:weather.error.title'\"\n [description]=\"errorMessage()\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@extensions-weather:weather.retry' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n } @else if (weatherData()) {\n <div class=\"weather-card__blob\" [style.background]=\"visualTheme().blob\" aria-hidden=\"true\"></div>\n\n @if (layoutVariant() === '1x2') {\n <div class=\"weather-card__tall\">\n <div class=\"weather-card__hero\">\n <div class=\"weather-card__hero-core\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__hero-icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</span>\n </div>\n <div class=\"weather-card__inline-location\">\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n <span>{{ locationShortLabel() }}</span>\n </div>\n </div>\n\n <p class=\"weather-card__condition weather-card__condition--center\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n\n @if (showStats()) {\n <div class=\"weather-card__footer-stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n {{ '@extensions-weather:weather.labels.high' | translate | async }} {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n {{ '@extensions-weather:weather.labels.low' | translate | async }} {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n </div>\n }\n </div>\n } @else {\n <header class=\"weather-card__header\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <div class=\"weather-card__location\">\n <span class=\"weather-card__city\">{{ city() }}</span>\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n </div>\n </header>\n\n <div class=\"weather-card__body\">\n <div class=\"weather-card__primary\">\n <div class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</div>\n <p class=\"weather-card__condition\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n </div>\n\n @if (showStats()) {\n <div class=\"weather-card__stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n {{ '@extensions-weather:weather.labels.high' | translate | async }} {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n {{ '@extensions-weather:weather.labels.low' | translate | async }} {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n @if (showFeelsLike()) {\n <span class=\"weather-card__stat weather-card__stat--feels\">\n {{ '@extensions-weather:weather.feels-like' | translate | async }} {{ getFeelsLikeTemperature() | number: '1.0-0' }}\u00B0\n </span>\n }\n </div>\n }\n\n @if (showHourly()) {\n <section class=\"weather-card__hourly\">\n <h4 class=\"weather-card__section-title\">\n {{ '@extensions-weather:weather.hourly-forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__hourly-row\">\n @for (hour of displayedHourlyForecast(); track hour.time) {\n <div class=\"weather-card__hour\">\n <span class=\"weather-card__hour-time\">{{ getHourLabel(hour.time) }}</span>\n <img\n [src]=\"getConditionIcon(hour.condition)\"\n class=\"weather-card__hour-icon\"\n [alt]=\"getConditionName(hour.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__hour-temp\">{{ getHourTemp(hour) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showDaily()) {\n <section class=\"weather-card__daily\">\n <h4 class=\"weather-card__section-title\">\n {{ '@extensions-weather:weather.forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__daily-list\">\n @for (day of displayedDailyForecast(); track day.date) {\n <div class=\"weather-card__daily-item\">\n <span class=\"weather-card__daily-name\">\n {{ getDayName(parseDate(day.date)) | translate | async }}\n </span>\n <img\n [src]=\"getConditionIcon(day.condition)\"\n class=\"weather-card__daily-icon\"\n [alt]=\"getConditionName(day.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__daily-high\">{{ getForecastDayTemp(day) | number: '1.0-0' }}\u00B0</span>\n <span class=\"weather-card__daily-low\">{{ getForecastDayMinTemp(day) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showMetrics() && (showHumidity() || showWind() || getUvIndex() > 0)) {\n <section class=\"weather-card__metrics\">\n @if (showHumidity()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-droplet\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.humidity' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getHumidity() }}%</span>\n </div>\n }\n @if (showWind()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-wind\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.wind' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnitKey() | translate | async }}\n </span>\n </div>\n }\n @if (getUvIndex() > 0) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-sun\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.uv-index' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getUvIndex() }}</span>\n </div>\n }\n </section>\n }\n </div>\n }\n } @else {\n <div class=\"weather-card__state\">\n <axp-state-message\n icon=\"fa-solid fa-cloud-sun\"\n [title]=\"'@extensions-weather:weather.no-data.title'\"\n [description]=\"'@extensions-weather:weather.no-data.description'\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@extensions-weather:weather.load-data' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n }\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%}.weather-card{--weather-icon-size: 3rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .6875rem;position:relative;display:flex;width:100%;height:100%;min-height:0px;flex-direction:column;overflow:hidden;padding:1rem 1.125rem;border-radius:1rem;border:1px solid var(--weather-accent, #6ba4e8);color:#0f172a;box-shadow:0 1px 3px #0f172a0f}@supports (color: color-mix(in lab,red,red)){.weather-card{border:1px solid color-mix(in srgb,var(--weather-accent, #6ba4e8) 16%,white)}}.weather-card .weather-card__blob{pointer-events:none;position:absolute;inset:0}.weather-card .weather-card__state{position:relative;z-index:1;display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:.625rem}.weather-card .weather-card__retry{display:inline-flex;align-items:center;gap:.375rem}.weather-card .weather-card__header{position:relative;z-index:1;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:.75rem}.weather-card .weather-card__icon{width:var(--weather-icon-size);height:var(--weather-icon-size);flex-shrink:0;object-fit:contain}.weather-card .weather-card__location{display:inline-flex;min-width:0px;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.3rem;font-size:var(--weather-meta-size);color:#334155}.weather-card .weather-card__location i{font-size:.6875rem;color:#94a3b8}.weather-card .weather-card__city{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize}.weather-card .weather-card__body{position:relative;z-index:1;display:flex;min-height:0px;flex:1;flex-direction:column;gap:.625rem;margin-top:.375rem}.weather-card .weather-card__primary{display:flex;min-width:0px;flex-direction:column;gap:.25rem}.weather-card .weather-card__temp{font-size:var(--weather-temp-size);--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);letter-spacing:-.04em;color:#0f172a}.weather-card .weather-card__condition{margin:0;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);line-height:1.35;color:#475569}.weather-card .weather-card__stats{display:flex;flex-wrap:wrap;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.75rem 1rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__stat--high{color:var(--weather-high, #f59e0b)}.weather-card .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card .weather-card__stat--feels{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#64748b}.weather-card .weather-card__section-title{margin:0 0 .5rem;font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);text-transform:uppercase;letter-spacing:.08em;color:#94a3b8}.weather-card .weather-card__hourly-row{display:flex;overflow-x:auto;gap:.375rem}.weather-card .weather-card__hour{display:flex;flex:1;flex-direction:column;align-items:center;gap:.25rem;min-width:2.75rem}.weather-card .weather-card__hour-time{font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#94a3b8}.weather-card .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .55);height:calc(var(--weather-icon-size) * .55);object-fit:contain}.weather-card .weather-card__hour-temp{font-size:var(--weather-meta-size);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-list{display:flex;flex-direction:column;gap:.375rem}.weather-card .weather-card__daily-item{display:grid;align-items:center;grid-template-columns:minmax(4rem,1fr) auto auto auto;gap:.625rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__daily-name{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#334155}.weather-card .weather-card__daily-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5);object-fit:contain}.weather-card .weather-card__daily-high{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-low{color:#64748b}.weather-card .weather-card__metrics{display:flex;flex-direction:column;gap:.625rem}.weather-card .weather-card__metric{display:grid;align-items:center;grid-template-columns:auto 1fr auto;gap:.5rem;font-size:var(--weather-meta-size);color:#64748b}.weather-card .weather-card__metric i{color:var(--weather-accent, #3b82f6);width:1rem;text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.weather-card .weather-card__metric-value{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:#0f172a}.weather-card .weather-card__skeleton-icon{width:var(--weather-icon-size);height:var(--weather-icon-size);border-radius:calc(infinity * 1px)}.weather-card .weather-card__skeleton-lines{display:flex;width:100%;flex-direction:column;gap:.375rem}.weather-card .weather-card__skeleton-line{width:55%;height:.75rem;border-radius:var(--radius-md, .375rem)}.weather-card .weather-card__skeleton-line--lg{width:35%;height:1.75rem}.weather-card--1x2{--weather-temp-size: 2.125rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;padding:.625rem .625rem .5rem}.weather-card--1x2 .weather-card__tall{position:relative;z-index:1;display:grid;width:100%;height:100%;min-height:0px;align-items:stretch;grid-template-rows:auto 1fr auto}.weather-card--1x2 .weather-card__hero{display:flex;width:100%;align-items:flex-start;justify-content:center;gap:.125rem;padding-top:.125rem}.weather-card--1x2 .weather-card__hero-core{position:relative;display:inline-flex;align-items:center;padding-left:1.375rem}.weather-card--1x2 .weather-card__hero-icon{pointer-events:none;position:absolute;top:50%;left:0;z-index:0;object-fit:contain;width:2.125rem;height:2.125rem;transform:translateY(-50%)}.weather-card--1x2 .weather-card__temp{position:relative;z-index:1;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);font-size:var(--weather-temp-size);letter-spacing:-.03em}.weather-card--1x2 .weather-card__inline-location{display:inline-flex;flex-shrink:0;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);white-space:nowrap;gap:.125rem;margin-top:.2rem;font-size:.625rem;color:#64748b}.weather-card--1x2 .weather-card__inline-location i{font-size:.5rem;color:#94a3b8}.weather-card--1x2 .weather-card__condition--center{margin:0;display:flex;align-items:center;justify-content:center;text-align:center;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);color:#334155}.weather-card--1x2 .weather-card__footer-stats{display:flex;width:100%;align-items:center;justify-content:space-between;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.5rem;font-size:var(--weather-meta-size)}.weather-card--1x2 .weather-card__stat--high,.weather-card--1x2 .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card--2x1{--weather-icon-size: 2.75rem;--weather-temp-size: 2.5rem;padding:.875rem 1rem}.weather-card--2x1 .weather-card__body{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:1.25rem;row-gap:.5rem;margin-top:.25rem}.weather-card--2x1 .weather-card__primary{flex-shrink:0;flex-grow:0}.weather-card--2x1 .weather-card__stats{flex:auto;justify-content:flex-end;margin-left:auto}.weather-card--2x1 .weather-card__hourly{flex:1 1 100%;min-width:0;overflow:hidden}.weather-card--2x1 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--2x1 .weather-card__hour{min-width:0px;flex:1}.weather-card--2x2{--weather-icon-size: 3.5rem;--weather-temp-size: 3.25rem;--weather-label-size: .9375rem;--weather-meta-size: .875rem}.weather-card--2x2 .weather-card__body{flex:1;justify-content:space-between;gap:.5rem}.weather-card--2x2 .weather-card__stats{margin-top:auto}.weather-card--4x2{--weather-icon-size: 2.75rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .625rem;padding:.75rem 1rem}.weather-card--4x2 .weather-card__body{display:grid;min-height:0px;flex:1;align-items:stretch;grid-template-columns:minmax(0,.95fr) minmax(0,1.8fr) minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:.875rem;row-gap:.375rem;margin-top:.25rem}.weather-card--4x2 .weather-card__primary{grid-column:1;grid-row:1;min-width:0}.weather-card--4x2 .weather-card__condition{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__stats{flex-direction:row;flex-wrap:wrap;align-content:flex-start;align-items:center;grid-column:1;grid-row:2;gap:.35rem .65rem;min-width:0;align-self:end}.weather-card--4x2 .weather-card__hourly{display:flex;min-height:0px;flex-direction:column;grid-column:2;grid-row:1 / span 2;overflow:hidden}.weather-card--4x2 .weather-card__section-title{margin:0 0 .35rem}.weather-card--4x2 .weather-card__hourly-row{display:flex;flex:1;align-items:stretch;justify-content:space-between;gap:.125rem;overflow:hidden}.weather-card--4x2 .weather-card__hour{display:flex;min-width:0px;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:.2rem}.weather-card--4x2 .weather-card__hour-icon{width:1.5rem;height:1.5rem}.weather-card--4x2 .weather-card__hour-time,.weather-card--4x2 .weather-card__hour-temp{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__daily{display:none}.weather-card--4x2 .weather-card__metrics{display:flex;height:100%;flex-direction:column;justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;min-width:0;gap:.5rem}.weather-card--4x2 .weather-card__metric{grid-template-columns:auto minmax(0,1fr) auto;gap:.375rem}.weather-card--4x2 .weather-card__metric-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x4{--weather-icon-size: 4rem;--weather-temp-size: 3.75rem;--weather-label-size: 1rem;--weather-meta-size: .875rem;--weather-caption-size: .75rem;padding:1.125rem 1.375rem}.weather-card--4x4 .weather-card__body{display:grid;align-items:flex-start;grid-template-columns:minmax(10rem,1fr) minmax(0,2.4fr) minmax(8rem,.9fr);grid-template-rows:auto auto;gap:1rem 1.5rem;margin-top:.625rem}.weather-card--4x4 .weather-card__primary{grid-column:1;grid-row:1}.weather-card--4x4 .weather-card__stats{flex-direction:column;align-items:flex-start;grid-column:1;grid-row:2;gap:.5rem}.weather-card--4x4 .weather-card__hourly{grid-column:2;grid-row:1;min-width:0;overflow:hidden}.weather-card--4x4 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--4x4 .weather-card__hour{min-width:0px;flex:1}.weather-card--4x4 .weather-card__daily{grid-column:2;grid-row:2}.weather-card--4x4 .weather-card__metrics{justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;gap:.875rem}.weather-card--4x4 .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
481
481
|
}
|
|
482
482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPWeatherWidgetViewComponent, decorators: [{
|
|
483
483
|
type: Component,
|
|
@@ -492,7 +492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
492
492
|
provide: AXPWeatherApiAbstract,
|
|
493
493
|
useClass: AXEWeatherGatewayService,
|
|
494
494
|
},
|
|
495
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"weather-card weather-card--{{ layoutVariant() }}\"\n [style.background]=\"visualTheme().background\"\n [style.--weather-high]=\"visualTheme().high\"\n [style.--weather-low]=\"visualTheme().low\"\n [style.--weather-accent]=\"visualTheme().accent\"\n [attr.aria-label]=\"'Current weather for ' + city()\"\n>\n @if (isLoading()) {\n <div class=\"weather-card__state\" [attr.aria-busy]=\"true\">\n <ax-skeleton class=\"weather-card__skeleton-icon\"></ax-skeleton>\n <div class=\"weather-card__skeleton-lines\">\n <ax-skeleton class=\"weather-card__skeleton-line weather-card__skeleton-line--lg\"></ax-skeleton>\n <ax-skeleton class=\"weather-card__skeleton-line\"></ax-skeleton>\n </div>\n </div>\n } @else if (hasError()) {\n <div class=\"weather-card__state\">\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n [title]=\"'@dashboard:weather.error.title'\"\n [description]=\"errorMessage()\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@dashboard:weather.retry' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n } @else if (weatherData()) {\n <div class=\"weather-card__blob\" [style.background]=\"visualTheme().blob\" aria-hidden=\"true\"></div>\n\n @if (layoutVariant() === '1x2') {\n <div class=\"weather-card__tall\">\n <div class=\"weather-card__hero\">\n <div class=\"weather-card__hero-core\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__hero-icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</span>\n </div>\n <div class=\"weather-card__inline-location\">\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n <span>{{ locationShortLabel() }}</span>\n </div>\n </div>\n\n <p class=\"weather-card__condition weather-card__condition--center\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n\n @if (showStats()) {\n <div class=\"weather-card__footer-stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n H {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n L {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n </div>\n }\n </div>\n } @else {\n <header class=\"weather-card__header\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <div class=\"weather-card__location\">\n <span class=\"weather-card__city\">{{ city() }}</span>\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n </div>\n </header>\n\n <div class=\"weather-card__body\">\n <div class=\"weather-card__primary\">\n <div class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</div>\n <p class=\"weather-card__condition\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n </div>\n\n @if (showStats()) {\n <div class=\"weather-card__stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n H {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n L {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n @if (showFeelsLike()) {\n <span class=\"weather-card__stat weather-card__stat--feels\">\n Feels {{ getFeelsLikeTemperature() | number: '1.0-0' }}\u00B0\n </span>\n }\n </div>\n }\n\n @if (showHourly()) {\n <section class=\"weather-card__hourly\">\n <h4 class=\"weather-card__section-title\">\n {{ '@dashboard:weather.hourly-forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__hourly-row\">\n @for (hour of displayedHourlyForecast(); track hour.time) {\n <div class=\"weather-card__hour\">\n <span class=\"weather-card__hour-time\">{{ getHourLabel(hour.time) }}</span>\n <img\n [src]=\"getConditionIcon(hour.condition)\"\n class=\"weather-card__hour-icon\"\n [alt]=\"getConditionName(hour.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__hour-temp\">{{ getHourTemp(hour) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showDaily()) {\n <section class=\"weather-card__daily\">\n <h4 class=\"weather-card__section-title\">\n {{ '@dashboard:weather.forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__daily-list\">\n @for (day of displayedDailyForecast(); track day.date) {\n <div class=\"weather-card__daily-item\">\n <span class=\"weather-card__daily-name\">\n {{ getDayName(parseDate(day.date)) | translate | async }}\n </span>\n <img\n [src]=\"getConditionIcon(day.condition)\"\n class=\"weather-card__daily-icon\"\n [alt]=\"getConditionName(day.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__daily-high\">{{ getForecastDayTemp(day) | number: '1.0-0' }}\u00B0</span>\n <span class=\"weather-card__daily-low\">{{ getForecastDayMinTemp(day) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showMetrics() && (showHumidity() || showWind() || getUvIndex() > 0)) {\n <section class=\"weather-card__metrics\">\n @if (showHumidity()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-droplet\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.humidity' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getHumidity() }}%</span>\n </div>\n }\n @if (showWind()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-wind\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.wind' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnitKey() | translate | async }}\n </span>\n </div>\n }\n @if (getUvIndex() > 0) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-sun\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@dashboard:weather.uv-index' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getUvIndex() }}</span>\n </div>\n }\n </section>\n }\n </div>\n }\n } @else {\n <div class=\"weather-card__state\">\n <axp-state-message\n icon=\"fa-solid fa-cloud-sun\"\n [title]=\"'@dashboard:weather.no-data.title'\"\n [description]=\"'@dashboard:weather.no-data.description'\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@dashboard:weather.load-data' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n }\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%}.weather-card{--weather-icon-size: 3rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .6875rem;position:relative;display:flex;width:100%;height:100%;min-height:0px;flex-direction:column;overflow:hidden;padding:1rem 1.125rem;border-radius:1rem;border:1px solid var(--weather-accent, #6ba4e8);color:#0f172a;box-shadow:0 1px 3px #0f172a0f}@supports (color: color-mix(in lab,red,red)){.weather-card{border:1px solid color-mix(in srgb,var(--weather-accent, #6ba4e8) 16%,white)}}.weather-card .weather-card__blob{pointer-events:none;position:absolute;inset:0}.weather-card .weather-card__state{position:relative;z-index:1;display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:.625rem}.weather-card .weather-card__retry{display:inline-flex;align-items:center;gap:.375rem}.weather-card .weather-card__header{position:relative;z-index:1;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:.75rem}.weather-card .weather-card__icon{width:var(--weather-icon-size);height:var(--weather-icon-size);flex-shrink:0;object-fit:contain}.weather-card .weather-card__location{display:inline-flex;min-width:0px;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.3rem;font-size:var(--weather-meta-size);color:#334155}.weather-card .weather-card__location i{font-size:.6875rem;color:#94a3b8}.weather-card .weather-card__city{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize}.weather-card .weather-card__body{position:relative;z-index:1;display:flex;min-height:0px;flex:1;flex-direction:column;gap:.625rem;margin-top:.375rem}.weather-card .weather-card__primary{display:flex;min-width:0px;flex-direction:column;gap:.25rem}.weather-card .weather-card__temp{font-size:var(--weather-temp-size);--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);letter-spacing:-.04em;color:#0f172a}.weather-card .weather-card__condition{margin:0;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);line-height:1.35;color:#475569}.weather-card .weather-card__stats{display:flex;flex-wrap:wrap;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.75rem 1rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__stat--high{color:var(--weather-high, #f59e0b)}.weather-card .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card .weather-card__stat--feels{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#64748b}.weather-card .weather-card__section-title{margin:0 0 .5rem;font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);text-transform:uppercase;letter-spacing:.08em;color:#94a3b8}.weather-card .weather-card__hourly-row{display:flex;overflow-x:auto;gap:.375rem}.weather-card .weather-card__hour{display:flex;flex:1;flex-direction:column;align-items:center;gap:.25rem;min-width:2.75rem}.weather-card .weather-card__hour-time{font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#94a3b8}.weather-card .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .55);height:calc(var(--weather-icon-size) * .55);object-fit:contain}.weather-card .weather-card__hour-temp{font-size:var(--weather-meta-size);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-list{display:flex;flex-direction:column;gap:.375rem}.weather-card .weather-card__daily-item{display:grid;align-items:center;grid-template-columns:minmax(4rem,1fr) auto auto auto;gap:.625rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__daily-name{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#334155}.weather-card .weather-card__daily-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5);object-fit:contain}.weather-card .weather-card__daily-high{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-low{color:#64748b}.weather-card .weather-card__metrics{display:flex;flex-direction:column;gap:.625rem}.weather-card .weather-card__metric{display:grid;align-items:center;grid-template-columns:auto 1fr auto;gap:.5rem;font-size:var(--weather-meta-size);color:#64748b}.weather-card .weather-card__metric i{color:var(--weather-accent, #3b82f6);width:1rem;text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.weather-card .weather-card__metric-value{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:#0f172a}.weather-card .weather-card__skeleton-icon{width:var(--weather-icon-size);height:var(--weather-icon-size);border-radius:calc(infinity * 1px)}.weather-card .weather-card__skeleton-lines{display:flex;width:100%;flex-direction:column;gap:.375rem}.weather-card .weather-card__skeleton-line{width:55%;height:.75rem;border-radius:var(--radius-md, .375rem)}.weather-card .weather-card__skeleton-line--lg{width:35%;height:1.75rem}.weather-card--1x2{--weather-temp-size: 2.125rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;padding:.625rem .625rem .5rem}.weather-card--1x2 .weather-card__tall{position:relative;z-index:1;display:grid;width:100%;height:100%;min-height:0px;align-items:stretch;grid-template-rows:auto 1fr auto}.weather-card--1x2 .weather-card__hero{display:flex;width:100%;align-items:flex-start;justify-content:center;gap:.125rem;padding-top:.125rem}.weather-card--1x2 .weather-card__hero-core{position:relative;display:inline-flex;align-items:center;padding-left:1.375rem}.weather-card--1x2 .weather-card__hero-icon{pointer-events:none;position:absolute;top:50%;left:0;z-index:0;object-fit:contain;width:2.125rem;height:2.125rem;transform:translateY(-50%)}.weather-card--1x2 .weather-card__temp{position:relative;z-index:1;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);font-size:var(--weather-temp-size);letter-spacing:-.03em}.weather-card--1x2 .weather-card__inline-location{display:inline-flex;flex-shrink:0;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);white-space:nowrap;gap:.125rem;margin-top:.2rem;font-size:.625rem;color:#64748b}.weather-card--1x2 .weather-card__inline-location i{font-size:.5rem;color:#94a3b8}.weather-card--1x2 .weather-card__condition--center{margin:0;display:flex;align-items:center;justify-content:center;text-align:center;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);color:#334155}.weather-card--1x2 .weather-card__footer-stats{display:flex;width:100%;align-items:center;justify-content:space-between;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.5rem;font-size:var(--weather-meta-size)}.weather-card--1x2 .weather-card__stat--high,.weather-card--1x2 .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card--2x1{--weather-icon-size: 2.75rem;--weather-temp-size: 2.5rem;padding:.875rem 1rem}.weather-card--2x1 .weather-card__body{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:1.25rem;row-gap:.5rem;margin-top:.25rem}.weather-card--2x1 .weather-card__primary{flex-shrink:0;flex-grow:0}.weather-card--2x1 .weather-card__stats{flex:auto;justify-content:flex-end;margin-left:auto}.weather-card--2x1 .weather-card__hourly{flex:1 1 100%;min-width:0;overflow:hidden}.weather-card--2x1 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--2x1 .weather-card__hour{min-width:0px;flex:1}.weather-card--2x2{--weather-icon-size: 3.5rem;--weather-temp-size: 3.25rem;--weather-label-size: .9375rem;--weather-meta-size: .875rem}.weather-card--2x2 .weather-card__body{flex:1;justify-content:space-between;gap:.5rem}.weather-card--2x2 .weather-card__stats{margin-top:auto}.weather-card--4x2{--weather-icon-size: 2.75rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .625rem;padding:.75rem 1rem}.weather-card--4x2 .weather-card__body{display:grid;min-height:0px;flex:1;align-items:stretch;grid-template-columns:minmax(0,.95fr) minmax(0,1.8fr) minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:.875rem;row-gap:.375rem;margin-top:.25rem}.weather-card--4x2 .weather-card__primary{grid-column:1;grid-row:1;min-width:0}.weather-card--4x2 .weather-card__condition{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__stats{flex-direction:row;flex-wrap:wrap;align-content:flex-start;align-items:center;grid-column:1;grid-row:2;gap:.35rem .65rem;min-width:0;align-self:end}.weather-card--4x2 .weather-card__hourly{display:flex;min-height:0px;flex-direction:column;grid-column:2;grid-row:1 / span 2;overflow:hidden}.weather-card--4x2 .weather-card__section-title{margin:0 0 .35rem}.weather-card--4x2 .weather-card__hourly-row{display:flex;flex:1;align-items:stretch;justify-content:space-between;gap:.125rem;overflow:hidden}.weather-card--4x2 .weather-card__hour{display:flex;min-width:0px;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:.2rem}.weather-card--4x2 .weather-card__hour-icon{width:1.5rem;height:1.5rem}.weather-card--4x2 .weather-card__hour-time,.weather-card--4x2 .weather-card__hour-temp{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__daily{display:none}.weather-card--4x2 .weather-card__metrics{display:flex;height:100%;flex-direction:column;justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;min-width:0;gap:.5rem}.weather-card--4x2 .weather-card__metric{grid-template-columns:auto minmax(0,1fr) auto;gap:.375rem}.weather-card--4x2 .weather-card__metric-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x4{--weather-icon-size: 4rem;--weather-temp-size: 3.75rem;--weather-label-size: 1rem;--weather-meta-size: .875rem;--weather-caption-size: .75rem;padding:1.125rem 1.375rem}.weather-card--4x4 .weather-card__body{display:grid;align-items:flex-start;grid-template-columns:minmax(10rem,1fr) minmax(0,2.4fr) minmax(8rem,.9fr);grid-template-rows:auto auto;gap:1rem 1.5rem;margin-top:.625rem}.weather-card--4x4 .weather-card__primary{grid-column:1;grid-row:1}.weather-card--4x4 .weather-card__stats{flex-direction:column;align-items:flex-start;grid-column:1;grid-row:2;gap:.5rem}.weather-card--4x4 .weather-card__hourly{grid-column:2;grid-row:1;min-width:0;overflow:hidden}.weather-card--4x4 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--4x4 .weather-card__hour{min-width:0px;flex:1}.weather-card--4x4 .weather-card__daily{grid-column:2;grid-row:2}.weather-card--4x4 .weather-card__metrics{justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;gap:.875rem}.weather-card--4x4 .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
495
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"weather-card weather-card--{{ layoutVariant() }}\"\n [style.background]=\"visualTheme().background\"\n [style.--weather-high]=\"visualTheme().high\"\n [style.--weather-low]=\"visualTheme().low\"\n [style.--weather-accent]=\"visualTheme().accent\"\n [attr.aria-label]=\"('@extensions-weather:weather.aria-current' | translate: { params: { city: city() } } | async) ?? ''\"\n>\n @if (isLoading()) {\n <div class=\"weather-card__state\" [attr.aria-busy]=\"true\">\n <ax-skeleton class=\"weather-card__skeleton-icon\"></ax-skeleton>\n <div class=\"weather-card__skeleton-lines\">\n <ax-skeleton class=\"weather-card__skeleton-line weather-card__skeleton-line--lg\"></ax-skeleton>\n <ax-skeleton class=\"weather-card__skeleton-line\"></ax-skeleton>\n </div>\n </div>\n } @else if (hasError()) {\n <div class=\"weather-card__state\">\n <axp-state-message\n mode=\"error\"\n icon=\"fa-solid fa-exclamation-triangle\"\n [title]=\"'@extensions-weather:weather.error.title'\"\n [description]=\"errorMessage()\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@extensions-weather:weather.retry' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n } @else if (weatherData()) {\n <div class=\"weather-card__blob\" [style.background]=\"visualTheme().blob\" aria-hidden=\"true\"></div>\n\n @if (layoutVariant() === '1x2') {\n <div class=\"weather-card__tall\">\n <div class=\"weather-card__hero\">\n <div class=\"weather-card__hero-core\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__hero-icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</span>\n </div>\n <div class=\"weather-card__inline-location\">\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n <span>{{ locationShortLabel() }}</span>\n </div>\n </div>\n\n <p class=\"weather-card__condition weather-card__condition--center\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n\n @if (showStats()) {\n <div class=\"weather-card__footer-stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n {{ '@extensions-weather:weather.labels.high' | translate | async }} {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n {{ '@extensions-weather:weather.labels.low' | translate | async }} {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n </div>\n }\n </div>\n } @else {\n <header class=\"weather-card__header\">\n <img\n [src]=\"getConditionIcon(weatherData()!.current.condition)\"\n class=\"weather-card__icon\"\n [alt]=\"getConditionName(weatherData()!.current.condition) | translate | async\"\n loading=\"lazy\"\n />\n <div class=\"weather-card__location\">\n <span class=\"weather-card__city\">{{ city() }}</span>\n <i class=\"fa-solid fa-location-dot\" aria-hidden=\"true\"></i>\n </div>\n </header>\n\n <div class=\"weather-card__body\">\n <div class=\"weather-card__primary\">\n <div class=\"weather-card__temp\">{{ getCurrentTemperature() | number: '1.0-0' }}\u00B0</div>\n <p class=\"weather-card__condition\">\n {{ getConditionName(weatherData()!.current.condition) | translate | async }}\n </p>\n </div>\n\n @if (showStats()) {\n <div class=\"weather-card__stats\">\n <span class=\"weather-card__stat weather-card__stat--high\">\n {{ '@extensions-weather:weather.labels.high' | translate | async }} {{ getMaxTemp() | number: '1.0-0' }}\u00B0\n </span>\n <span class=\"weather-card__stat weather-card__stat--low\">\n {{ '@extensions-weather:weather.labels.low' | translate | async }} {{ getMinTemp() | number: '1.0-0' }}\u00B0\n </span>\n @if (showFeelsLike()) {\n <span class=\"weather-card__stat weather-card__stat--feels\">\n {{ '@extensions-weather:weather.feels-like' | translate | async }} {{ getFeelsLikeTemperature() | number: '1.0-0' }}\u00B0\n </span>\n }\n </div>\n }\n\n @if (showHourly()) {\n <section class=\"weather-card__hourly\">\n <h4 class=\"weather-card__section-title\">\n {{ '@extensions-weather:weather.hourly-forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__hourly-row\">\n @for (hour of displayedHourlyForecast(); track hour.time) {\n <div class=\"weather-card__hour\">\n <span class=\"weather-card__hour-time\">{{ getHourLabel(hour.time) }}</span>\n <img\n [src]=\"getConditionIcon(hour.condition)\"\n class=\"weather-card__hour-icon\"\n [alt]=\"getConditionName(hour.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__hour-temp\">{{ getHourTemp(hour) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showDaily()) {\n <section class=\"weather-card__daily\">\n <h4 class=\"weather-card__section-title\">\n {{ '@extensions-weather:weather.forecast' | translate | async }}\n </h4>\n <div class=\"weather-card__daily-list\">\n @for (day of displayedDailyForecast(); track day.date) {\n <div class=\"weather-card__daily-item\">\n <span class=\"weather-card__daily-name\">\n {{ getDayName(parseDate(day.date)) | translate | async }}\n </span>\n <img\n [src]=\"getConditionIcon(day.condition)\"\n class=\"weather-card__daily-icon\"\n [alt]=\"getConditionName(day.condition) | translate | async\"\n loading=\"lazy\"\n />\n <span class=\"weather-card__daily-high\">{{ getForecastDayTemp(day) | number: '1.0-0' }}\u00B0</span>\n <span class=\"weather-card__daily-low\">{{ getForecastDayMinTemp(day) | number: '1.0-0' }}\u00B0</span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showMetrics() && (showHumidity() || showWind() || getUvIndex() > 0)) {\n <section class=\"weather-card__metrics\">\n @if (showHumidity()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-droplet\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.humidity' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getHumidity() }}%</span>\n </div>\n }\n @if (showWind()) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-wind\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.wind' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">\n {{ getWindSpeed() }} {{ getWindSpeedUnitKey() | translate | async }}\n </span>\n </div>\n }\n @if (getUvIndex() > 0) {\n <div class=\"weather-card__metric\">\n <i class=\"fa-solid fa-sun\" aria-hidden=\"true\"></i>\n <span class=\"weather-card__metric-label\">{{ '@extensions-weather:weather.uv-index' | translate | async }}</span>\n <span class=\"weather-card__metric-value\">{{ getUvIndex() }}</span>\n </div>\n }\n </section>\n }\n </div>\n }\n } @else {\n <div class=\"weather-card__state\">\n <axp-state-message\n icon=\"fa-solid fa-cloud-sun\"\n [title]=\"'@extensions-weather:weather.no-data.title'\"\n [description]=\"'@extensions-weather:weather.no-data.description'\"\n >\n <button slot=\"actions\" type=\"button\" class=\"weather-card__retry\" (click)=\"refreshWeather()\">\n <i class=\"fa-solid fa-sync-alt\" aria-hidden=\"true\"></i>\n <span>{{ '@extensions-weather:weather.load-data' | translate | async }}</span>\n </button>\n </axp-state-message>\n </div>\n }\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%}.weather-card{--weather-icon-size: 3rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .6875rem;position:relative;display:flex;width:100%;height:100%;min-height:0px;flex-direction:column;overflow:hidden;padding:1rem 1.125rem;border-radius:1rem;border:1px solid var(--weather-accent, #6ba4e8);color:#0f172a;box-shadow:0 1px 3px #0f172a0f}@supports (color: color-mix(in lab,red,red)){.weather-card{border:1px solid color-mix(in srgb,var(--weather-accent, #6ba4e8) 16%,white)}}.weather-card .weather-card__blob{pointer-events:none;position:absolute;inset:0}.weather-card .weather-card__state{position:relative;z-index:1;display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:.625rem}.weather-card .weather-card__retry{display:inline-flex;align-items:center;gap:.375rem}.weather-card .weather-card__header{position:relative;z-index:1;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:.75rem}.weather-card .weather-card__icon{width:var(--weather-icon-size);height:var(--weather-icon-size);flex-shrink:0;object-fit:contain}.weather-card .weather-card__location{display:inline-flex;min-width:0px;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.3rem;font-size:var(--weather-meta-size);color:#334155}.weather-card .weather-card__location i{font-size:.6875rem;color:#94a3b8}.weather-card .weather-card__city{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize}.weather-card .weather-card__body{position:relative;z-index:1;display:flex;min-height:0px;flex:1;flex-direction:column;gap:.625rem;margin-top:.375rem}.weather-card .weather-card__primary{display:flex;min-width:0px;flex-direction:column;gap:.25rem}.weather-card .weather-card__temp{font-size:var(--weather-temp-size);--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);letter-spacing:-.04em;color:#0f172a}.weather-card .weather-card__condition{margin:0;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);line-height:1.35;color:#475569}.weather-card .weather-card__stats{display:flex;flex-wrap:wrap;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.75rem 1rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__stat--high{color:var(--weather-high, #f59e0b)}.weather-card .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card .weather-card__stat--feels{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#64748b}.weather-card .weather-card__section-title{margin:0 0 .5rem;font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);text-transform:uppercase;letter-spacing:.08em;color:#94a3b8}.weather-card .weather-card__hourly-row{display:flex;overflow-x:auto;gap:.375rem}.weather-card .weather-card__hour{display:flex;flex:1;flex-direction:column;align-items:center;gap:.25rem;min-width:2.75rem}.weather-card .weather-card__hour-time{font-size:var(--weather-caption-size);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#94a3b8}.weather-card .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .55);height:calc(var(--weather-icon-size) * .55);object-fit:contain}.weather-card .weather-card__hour-temp{font-size:var(--weather-meta-size);--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-list{display:flex;flex-direction:column;gap:.375rem}.weather-card .weather-card__daily-item{display:grid;align-items:center;grid-template-columns:minmax(4rem,1fr) auto auto auto;gap:.625rem;font-size:var(--weather-meta-size)}.weather-card .weather-card__daily-name{--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:#334155}.weather-card .weather-card__daily-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5);object-fit:contain}.weather-card .weather-card__daily-high{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600)}.weather-card .weather-card__daily-low{color:#64748b}.weather-card .weather-card__metrics{display:flex;flex-direction:column;gap:.625rem}.weather-card .weather-card__metric{display:grid;align-items:center;grid-template-columns:auto 1fr auto;gap:.5rem;font-size:var(--weather-meta-size);color:#64748b}.weather-card .weather-card__metric i{color:var(--weather-accent, #3b82f6);width:1rem;text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}.weather-card .weather-card__metric-value{--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:#0f172a}.weather-card .weather-card__skeleton-icon{width:var(--weather-icon-size);height:var(--weather-icon-size);border-radius:calc(infinity * 1px)}.weather-card .weather-card__skeleton-lines{display:flex;width:100%;flex-direction:column;gap:.375rem}.weather-card .weather-card__skeleton-line{width:55%;height:.75rem;border-radius:var(--radius-md, .375rem)}.weather-card .weather-card__skeleton-line--lg{width:35%;height:1.75rem}.weather-card--1x2{--weather-temp-size: 2.125rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;padding:.625rem .625rem .5rem}.weather-card--1x2 .weather-card__tall{position:relative;z-index:1;display:grid;width:100%;height:100%;min-height:0px;align-items:stretch;grid-template-rows:auto 1fr auto}.weather-card--1x2 .weather-card__hero{display:flex;width:100%;align-items:flex-start;justify-content:center;gap:.125rem;padding-top:.125rem}.weather-card--1x2 .weather-card__hero-core{position:relative;display:inline-flex;align-items:center;padding-left:1.375rem}.weather-card--1x2 .weather-card__hero-icon{pointer-events:none;position:absolute;top:50%;left:0;z-index:0;object-fit:contain;width:2.125rem;height:2.125rem;transform:translateY(-50%)}.weather-card--1x2 .weather-card__temp{position:relative;z-index:1;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-bold, 700);font-weight:var(--font-weight-bold, 700);font-size:var(--weather-temp-size);letter-spacing:-.03em}.weather-card--1x2 .weather-card__inline-location{display:inline-flex;flex-shrink:0;align-items:center;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);white-space:nowrap;gap:.125rem;margin-top:.2rem;font-size:.625rem;color:#64748b}.weather-card--1x2 .weather-card__inline-location i{font-size:.5rem;color:#94a3b8}.weather-card--1x2 .weather-card__condition--center{margin:0;display:flex;align-items:center;justify-content:center;text-align:center;--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);font-size:var(--weather-label-size);color:#334155}.weather-card--1x2 .weather-card__footer-stats{display:flex;width:100%;align-items:center;justify-content:space-between;--tw-leading: 1;line-height:1;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);gap:.5rem;font-size:var(--weather-meta-size)}.weather-card--1x2 .weather-card__stat--high,.weather-card--1x2 .weather-card__stat--low{color:var(--weather-low, #3b82f6)}.weather-card--2x1{--weather-icon-size: 2.75rem;--weather-temp-size: 2.5rem;padding:.875rem 1rem}.weather-card--2x1 .weather-card__body{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:1.25rem;row-gap:.5rem;margin-top:.25rem}.weather-card--2x1 .weather-card__primary{flex-shrink:0;flex-grow:0}.weather-card--2x1 .weather-card__stats{flex:auto;justify-content:flex-end;margin-left:auto}.weather-card--2x1 .weather-card__hourly{flex:1 1 100%;min-width:0;overflow:hidden}.weather-card--2x1 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--2x1 .weather-card__hour{min-width:0px;flex:1}.weather-card--2x2{--weather-icon-size: 3.5rem;--weather-temp-size: 3.25rem;--weather-label-size: .9375rem;--weather-meta-size: .875rem}.weather-card--2x2 .weather-card__body{flex:1;justify-content:space-between;gap:.5rem}.weather-card--2x2 .weather-card__stats{margin-top:auto}.weather-card--4x2{--weather-icon-size: 2.75rem;--weather-temp-size: 2.75rem;--weather-label-size: .875rem;--weather-meta-size: .8125rem;--weather-caption-size: .625rem;padding:.75rem 1rem}.weather-card--4x2 .weather-card__body{display:grid;min-height:0px;flex:1;align-items:stretch;grid-template-columns:minmax(0,.95fr) minmax(0,1.8fr) minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:.875rem;row-gap:.375rem;margin-top:.25rem}.weather-card--4x2 .weather-card__primary{grid-column:1;grid-row:1;min-width:0}.weather-card--4x2 .weather-card__condition{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__stats{flex-direction:row;flex-wrap:wrap;align-content:flex-start;align-items:center;grid-column:1;grid-row:2;gap:.35rem .65rem;min-width:0;align-self:end}.weather-card--4x2 .weather-card__hourly{display:flex;min-height:0px;flex-direction:column;grid-column:2;grid-row:1 / span 2;overflow:hidden}.weather-card--4x2 .weather-card__section-title{margin:0 0 .35rem}.weather-card--4x2 .weather-card__hourly-row{display:flex;flex:1;align-items:stretch;justify-content:space-between;gap:.125rem;overflow:hidden}.weather-card--4x2 .weather-card__hour{display:flex;min-width:0px;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:.2rem}.weather-card--4x2 .weather-card__hour-icon{width:1.5rem;height:1.5rem}.weather-card--4x2 .weather-card__hour-time,.weather-card--4x2 .weather-card__hour-temp{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x2 .weather-card__daily{display:none}.weather-card--4x2 .weather-card__metrics{display:flex;height:100%;flex-direction:column;justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;min-width:0;gap:.5rem}.weather-card--4x2 .weather-card__metric{grid-template-columns:auto minmax(0,1fr) auto;gap:.375rem}.weather-card--4x2 .weather-card__metric-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.weather-card--4x4{--weather-icon-size: 4rem;--weather-temp-size: 3.75rem;--weather-label-size: 1rem;--weather-meta-size: .875rem;--weather-caption-size: .75rem;padding:1.125rem 1.375rem}.weather-card--4x4 .weather-card__body{display:grid;align-items:flex-start;grid-template-columns:minmax(10rem,1fr) minmax(0,2.4fr) minmax(8rem,.9fr);grid-template-rows:auto auto;gap:1rem 1.5rem;margin-top:.625rem}.weather-card--4x4 .weather-card__primary{grid-column:1;grid-row:1}.weather-card--4x4 .weather-card__stats{flex-direction:column;align-items:flex-start;grid-column:1;grid-row:2;gap:.5rem}.weather-card--4x4 .weather-card__hourly{grid-column:2;grid-row:1;min-width:0;overflow:hidden}.weather-card--4x4 .weather-card__hourly-row{justify-content:space-between;overflow:hidden}.weather-card--4x4 .weather-card__hour{min-width:0px;flex:1}.weather-card--4x4 .weather-card__daily{grid-column:2;grid-row:2}.weather-card--4x4 .weather-card__metrics{justify-content:space-evenly;grid-column:3;grid-row:1 / span 2;gap:.875rem}.weather-card--4x4 .weather-card__hour-icon{width:calc(var(--weather-icon-size) * .5);height:calc(var(--weather-icon-size) * .5)}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
496
496
|
}], ctorParameters: () => [] });
|
|
497
497
|
|
|
498
498
|
var weatherWidget_component = /*#__PURE__*/Object.freeze({
|
|
@@ -505,8 +505,8 @@ var weatherWidget_component = /*#__PURE__*/Object.freeze({
|
|
|
505
505
|
*/
|
|
506
506
|
const AXPWeatherWidget = {
|
|
507
507
|
name: RootConfig.widgets.weather,
|
|
508
|
-
title: '@
|
|
509
|
-
description: '@
|
|
508
|
+
title: '@extensions-weather:widgets.weather.widget-title',
|
|
509
|
+
description: '@extensions-weather:widgets.weather.widget-description',
|
|
510
510
|
categories: [AXP_WIDGETS_UTILITY_CATEGORY],
|
|
511
511
|
subCategory: AXP_DASHBOARD_SHARED_SUB_UTILITY_WEATHER,
|
|
512
512
|
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
|
@@ -515,7 +515,7 @@ const AXPWeatherWidget = {
|
|
|
515
515
|
properties: [
|
|
516
516
|
{
|
|
517
517
|
name: 'city',
|
|
518
|
-
title: '@
|
|
518
|
+
title: '@extensions-weather:widgets.weather.city',
|
|
519
519
|
group: AXP_DATA_PROPERTY_GROUP,
|
|
520
520
|
schema: {
|
|
521
521
|
defaultValue: 'New York',
|
|
@@ -530,7 +530,7 @@ const AXPWeatherWidget = {
|
|
|
530
530
|
},
|
|
531
531
|
{
|
|
532
532
|
name: 'showHumidity',
|
|
533
|
-
title: '@
|
|
533
|
+
title: '@extensions-weather:widgets.weather.show-humidity',
|
|
534
534
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
|
535
535
|
schema: {
|
|
536
536
|
defaultValue: true,
|
|
@@ -545,7 +545,7 @@ const AXPWeatherWidget = {
|
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
name: 'showWind',
|
|
548
|
-
title: '@
|
|
548
|
+
title: '@extensions-weather:widgets.weather.show-wind',
|
|
549
549
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
|
550
550
|
schema: {
|
|
551
551
|
defaultValue: true,
|
|
@@ -560,7 +560,7 @@ const AXPWeatherWidget = {
|
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
name: 'showForecast',
|
|
563
|
-
title: '@
|
|
563
|
+
title: '@extensions-weather:widgets.weather.show-forecast',
|
|
564
564
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
|
565
565
|
schema: {
|
|
566
566
|
defaultValue: true,
|
|
@@ -575,7 +575,7 @@ const AXPWeatherWidget = {
|
|
|
575
575
|
},
|
|
576
576
|
{
|
|
577
577
|
name: 'forecastDays',
|
|
578
|
-
title: '@
|
|
578
|
+
title: '@extensions-weather:widgets.weather.forecast-days',
|
|
579
579
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
|
580
580
|
schema: {
|
|
581
581
|
defaultValue: 5,
|
|
@@ -595,7 +595,7 @@ const AXPWeatherWidget = {
|
|
|
595
595
|
},
|
|
596
596
|
{
|
|
597
597
|
name: 'forecastHours',
|
|
598
|
-
title: '@
|
|
598
|
+
title: '@extensions-weather:widgets.weather.forecast-hours',
|
|
599
599
|
group: AXP_APPEARANCE_PROPERTY_GROUP,
|
|
600
600
|
schema: {
|
|
601
601
|
defaultValue: 6,
|
|
@@ -615,7 +615,7 @@ const AXPWeatherWidget = {
|
|
|
615
615
|
},
|
|
616
616
|
{
|
|
617
617
|
name: 'temperatureUnit',
|
|
618
|
-
title: '@
|
|
618
|
+
title: '@extensions-weather:widgets.weather.temperature-unit',
|
|
619
619
|
group: AXP_DATA_PROPERTY_GROUP,
|
|
620
620
|
schema: {
|
|
621
621
|
defaultValue: '°C',
|
|
@@ -633,7 +633,7 @@ const AXPWeatherWidget = {
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
name: 'windSpeedUnit',
|
|
636
|
-
title: '@
|
|
636
|
+
title: '@extensions-weather:widgets.weather.wind-speed-unit',
|
|
637
637
|
group: AXP_DATA_PROPERTY_GROUP,
|
|
638
638
|
schema: {
|
|
639
639
|
defaultValue: 'km/h',
|
|
@@ -651,7 +651,7 @@ const AXPWeatherWidget = {
|
|
|
651
651
|
},
|
|
652
652
|
{
|
|
653
653
|
name: 'autoRefresh',
|
|
654
|
-
title: '@
|
|
654
|
+
title: '@extensions-weather:widgets.weather.auto-refresh',
|
|
655
655
|
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
656
656
|
schema: {
|
|
657
657
|
defaultValue: true,
|
|
@@ -666,7 +666,7 @@ const AXPWeatherWidget = {
|
|
|
666
666
|
},
|
|
667
667
|
{
|
|
668
668
|
name: 'refreshInterval',
|
|
669
|
-
title: '@
|
|
669
|
+
title: '@extensions-weather:widgets.weather.refresh-interval',
|
|
670
670
|
group: AXP_BEHAVIOR_PROPERTY_GROUP,
|
|
671
671
|
schema: {
|
|
672
672
|
defaultValue: 15,
|
|
@@ -700,8 +700,8 @@ const AXPWeatherWidget = {
|
|
|
700
700
|
*/
|
|
701
701
|
const axmWeatherWidgetDefinition = defineWidget({
|
|
702
702
|
name: RootConfig.widgets.weather,
|
|
703
|
-
title: '@
|
|
704
|
-
description: '@
|
|
703
|
+
title: '@extensions-weather:widgets.weather.widget-title',
|
|
704
|
+
description: '@extensions-weather:widgets.weather.widget-description',
|
|
705
705
|
icon: 'fa-light fa-cloud-sun',
|
|
706
706
|
categories: [
|
|
707
707
|
{
|
|
@@ -718,22 +718,54 @@ const axmWeatherWidgetDefinition = defineWidget({
|
|
|
718
718
|
groups: [AXPWidgetGroupEnum.DashboardWidget],
|
|
719
719
|
type: 'dashboard',
|
|
720
720
|
inputs: [
|
|
721
|
-
{ name: 'city', title: '
|
|
722
|
-
{
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
{ name: '
|
|
728
|
-
{
|
|
729
|
-
|
|
730
|
-
|
|
721
|
+
{ name: 'city', title: '@extensions-weather:widgets.weather.city', interface: { name: 'text-editor' } },
|
|
722
|
+
{
|
|
723
|
+
name: 'showHumidity',
|
|
724
|
+
title: '@extensions-weather:widgets.weather.show-humidity',
|
|
725
|
+
interface: { name: 'toggle-editor' },
|
|
726
|
+
},
|
|
727
|
+
{ name: 'showWind', title: '@extensions-weather:widgets.weather.show-wind', interface: { name: 'toggle-editor' } },
|
|
728
|
+
{
|
|
729
|
+
name: 'showForecast',
|
|
730
|
+
title: '@extensions-weather:widgets.weather.show-forecast',
|
|
731
|
+
interface: { name: 'toggle-editor' },
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
name: 'forecastDays',
|
|
735
|
+
title: '@extensions-weather:widgets.weather.forecast-days',
|
|
736
|
+
interface: { name: 'number-editor' },
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
name: 'forecastHours',
|
|
740
|
+
title: '@extensions-weather:widgets.weather.forecast-hours',
|
|
741
|
+
interface: { name: 'number-editor' },
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: 'temperatureUnit',
|
|
745
|
+
title: '@extensions-weather:widgets.weather.temperature-unit',
|
|
746
|
+
interface: { name: 'select-editor' },
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: 'windSpeedUnit',
|
|
750
|
+
title: '@extensions-weather:widgets.weather.wind-speed-unit',
|
|
751
|
+
interface: { name: 'select-editor' },
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: 'autoRefresh',
|
|
755
|
+
title: '@extensions-weather:widgets.weather.auto-refresh',
|
|
756
|
+
interface: { name: 'toggle-editor' },
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
name: 'refreshInterval',
|
|
760
|
+
title: '@extensions-weather:widgets.weather.refresh-interval',
|
|
761
|
+
interface: { name: 'number-editor' },
|
|
762
|
+
},
|
|
731
763
|
],
|
|
732
764
|
outputs: [
|
|
733
765
|
{
|
|
734
766
|
name: 'boundValue',
|
|
735
|
-
title: '
|
|
736
|
-
description: '
|
|
767
|
+
title: '@extensions-weather:widgets.weather.output-bound-value.title',
|
|
768
|
+
description: '@extensions-weather:widgets.weather.output-bound-value.description',
|
|
737
769
|
interface: { name: 'json' },
|
|
738
770
|
},
|
|
739
771
|
],
|