fix: update @ionic/angular* and patch dependencies

This commit is contained in:
Rainer Killinger
2026-10-01 09:44:39 +02:00
parent 8457f791de
commit 7519e8193b
10 changed files with 349 additions and 407 deletions
@@ -26,6 +26,7 @@ const routes: Routes = [{path: '', redirectTo: '/overview', pathMatch: 'full'}];
RouterModule.forRoot(routes, {
preloadingStrategy: PreloadAllModules,
errorHandler: error => {
console.error(error);
// Handle unknown routes, at the moment this can only be done via window.location
if (error.message.includes('Cannot match any routes')) {
window.location.href = '/overview';
@@ -3,7 +3,7 @@
id="stapps-building-fill"
type="fill"
source="polygons"
before="poi_label"
after="poi_label"
[paint]="buildingFillPaint"
(layerClick)="featureClick($event)"
(layerMouseEnter)="dataProvider !== null && mapService.changeCanvasCursor('pointer')"
@@ -13,7 +13,7 @@
id="stapps-building-outline"
type="line"
source="polygons"
before="poi_label"
after="poi_label"
[paint]="buildingPaint"
></mgl-layer>
<mgl-layer
@@ -24,7 +24,6 @@ import {TranslateModule} from '@ngx-translate/core';
import {ActivatedRoute, RouterLink} from '@angular/router';
import {MapAuto3dDirective} from './map-auto-3d.directive';
import {MediaQueryPipe} from '../../util/media-query.pipe';
import {MapStyleDirective} from './map-style.directive';
import {DataProvider} from '../data/data.provider';
import {SCSearchFilter, SCThingType} from '@openstapps/core';
import {DataModule} from '../data/data.module';
@@ -33,6 +32,7 @@ import {GeolocateControlComponent} from './controls/geolocate-control.component'
import {CompassControlComponent} from './controls/compass-control.component';
import {MapSizeFixDirective} from './map-size-fix.directive';
import {MapDataProvider} from './map-data.provider';
import {MapStylePipe} from './map-style.pipe';
import {ThingPoiFeatureCollectionPipe, ThingPolygonFeatureCollectionPipe} from './feature-collection.pipe';
import {BuildingMarkersComponent} from './elements/building-markers.component';
import {PoiMarkersComponent} from './elements/poi-markers.component';
@@ -68,7 +68,7 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
MapAuto3dDirective,
MapComponent,
MapSizeFixDirective,
MapStyleDirective,
MapStylePipe,
MediaQueryPipe,
PoiMarkersComponent,
RouterLink,
@@ -21,8 +21,7 @@
<ion-content id="map">
<mgl-map
[styleName]="('(prefers-color-scheme: dark)' | mediaQuery | async) ? 'dark' : 'light'"
[antialias]="true"
[style]="('(prefers-color-scheme: dark)' | mediaQuery | async) ? 'dark' : 'light' | mapStyleUrl"
[attributionControl]="false"
[fitBounds]="(bounds | async) ?? undefined"
[fitBoundsOptions]="{maxZoom: 15, padding: {top: 100, bottom: 50, left: 50, right: 50}, animate: false}"
@@ -1,21 +0,0 @@
import {Directive, Input, Host} from '@angular/core';
import {MapComponent} from '@maplibre/ngx-maplibre-gl';
import {environment} from '../../../environments/environment';
@Directive({
selector: 'mgl-map[styleName]',
standalone: true,
})
export class MapStyleDirective {
constructor(@Host() readonly map: MapComponent) {}
@Input()
set styleName(name: string) {
const style = `${environment.backend_url}/_static/map/styles/${name}/style.json`;
if (this.map.style) {
this.map.mapInstance.setStyle(style);
} else {
this.map.style = style;
}
}
}
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2025 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Injectable, Pipe, PipeTransform} from '@angular/core';
import {environment} from '../../../environments/environment';
/**
* Return the extended translation key by the current daytime key
*/
@Injectable()
@Pipe({
name: 'mapStyleUrl',
standalone: true,
})
export class MapStylePipe implements PipeTransform {
/**
* Transform
*/
transform(name: string): string {
return `${environment.backend_url}/_static/map/styles/${name}/style.json`;
}
}
@@ -21,7 +21,7 @@ import {TranslateModule} from '@ngx-translate/core';
import {CommonModule} from '@angular/common';
import {MapAuto3dDirective} from './map-auto-3d.directive';
import {MediaQueryPipe} from 'src/app/util/media-query.pipe';
import {MapStyleDirective} from './map-style.directive';
import {MapStylePipe} from './map-style.pipe';
import {MapSizeFixDirective} from './map-size-fix.directive';
import {SCThings} from '@openstapps/core';
import {ThingPolygonFeatureCollectionPipe, ThingPoiFeatureCollectionPipe} from './feature-collection.pipe';
@@ -50,7 +50,7 @@ import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';
MapAuto3dDirective,
MapComponent,
MapSizeFixDirective,
MapStyleDirective,
MapStylePipe,
MarkerComponent,
MediaQueryPipe,
PoiMarkersComponent,
@@ -14,7 +14,7 @@
-->
<mgl-map
auto-3d
[styleName]="('(prefers-color-scheme: dark)' | mediaQuery | async) ? 'dark' : 'light'"
[style]="('(prefers-color-scheme: dark)' | mediaQuery | async) ? 'dark' : 'light' | mapStyleUrl"
[interactive]="false"
[attributionControl]="false"
[center]="$any(place.geo.point.coordinates)"