@igo2/integration 21.0.0 → 21.0.1-next.1
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, input, model, Component, CUSTOM_ELEMENTS_SCHEMA, NgModule, Injectable, ChangeDetectionStrategy, signal,
|
|
2
|
+
import { inject, ChangeDetectorRef, input, model, Component, CUSTOM_ELEMENTS_SCHEMA, NgModule, Injectable, DestroyRef, ChangeDetectionStrategy, signal, viewChild, Directive, ElementRef, linkedSignal, effect } from '@angular/core';
|
|
3
3
|
import { __decorate, __metadata } from 'tslib';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import * as i1 from '@angular/material/button';
|
|
@@ -23,11 +23,11 @@ import { EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSele
|
|
|
23
23
|
import * as i1$1 from '@igo2/geo';
|
|
24
24
|
import { MapService, OverlayService, IgoMap, CatalogService, CatalogBrowserComponent, generateIdFromSourceOptions, isLayerItemOptions, CatalogItemType, CatalogLibraryComponent, StopsStore, StopsFeatureStore, RoutesFeatureStore, StepsFeatureStore, IgoDirectionsModule, FeatureStore, DrawComponent, isLayerItem, OgcFilterableItemComponent, TimeFilterItemComponent, OgcFilterableListComponent, OgcFilterableListBindingDirective, FeatureStoreSelectionStrategy, FeatureMotion, mapExtentStrategyActiveToolTip, noElementSelected, OgcFilterWidget, InteractiveSelectionFormWidget, WfsWorkspace, FeatureWorkspace, EditionWorkspace, SpatialFilterService, LayerService, SpatialFilterItemType, MeasureLengthUnit, SpatialFilterType, featureToOl, moveToOlFeatures, RADIUS_NAME, SpatialFilterTypeComponent, SpatialFilterItemComponent, FeatureDetailsComponent, TimeFilterListComponent, TimeFilterListBindingDirective, isBaseLayer, ImportExportComponent, formatScale, zoneMtm, zoneUtm, computeProjectionsConstraints, SearchSourceService, LayerListControlsEnum, sourceCanSearch, LayerViewerComponent, ExportButtonComponent, OgcFilterButtonComponent, TimeFilterButtonComponent, TrackFeatureButtonComponent, MetadataButtonComponent, LayerLegendListComponent, LayerLegendListBindingDirective, roundCoordTo, featureFromOl, measureOlGeometryLength, FEATURE, VectorLayer, VectorTileLayer, isOlFlatStyleLike, StyleModalLayerButtonComponent, MeasurerComponent, PrintComponent, SearchBarComponent, SearchResultsComponent, styleVariant, computeOlFeaturesExtent, featuresAreOutOfView, SearchResultAddButtonComponent, isLayerGroup, PropertyTypeDetectorService, GeoPropertiesStrategy } from '@igo2/geo';
|
|
25
25
|
import { BehaviorSubject, combineLatest, forkJoin, map as map$1, of, merge, Subject, ReplaySubject, interval } from 'rxjs';
|
|
26
|
-
import { take, switchMap, concatAll, map, toArray, skipWhile, distinctUntilChanged, takeUntil, tap, debounceTime, skip } from 'rxjs/operators';
|
|
26
|
+
import { take, switchMap, concatAll, map, toArray, skipWhile, distinctUntilChanged, takeUntil, tap, debounceTime, filter, skip } from 'rxjs/operators';
|
|
27
27
|
import { StorageService, StorageScope, StorageServiceEventEnum } from '@igo2/core/storage';
|
|
28
|
+
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
28
29
|
import { ContextService, ContextEditComponent, ContextListComponent, ContextPermissionsComponent, ShareMapComponent, ContextImportExportComponent } from '@igo2/context';
|
|
29
30
|
import { ObjectUtils, createExcelWorkBook, addExcelSheetToWorkBook, writeExcelFile, uuid, NumberUtils } from '@igo2/utils';
|
|
30
|
-
import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
31
31
|
import { MediaService, Media } from '@igo2/core/media';
|
|
32
32
|
import { MessageService } from '@igo2/core/message';
|
|
33
33
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
@@ -232,6 +232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
232
232
|
* Service that holds the state of the catalog module
|
|
233
233
|
*/
|
|
234
234
|
class CatalogState {
|
|
235
|
+
destroyRef = inject(DestroyRef);
|
|
235
236
|
/**
|
|
236
237
|
* Store that contains all the catalogs
|
|
237
238
|
*/
|
|
@@ -246,7 +247,9 @@ class CatalogState {
|
|
|
246
247
|
constructor() {
|
|
247
248
|
const authService = inject(AuthService);
|
|
248
249
|
this._catalogStore = new EntityStore([]);
|
|
249
|
-
authService.authenticate
|
|
250
|
+
authService.authenticate$
|
|
251
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
252
|
+
.subscribe(() => {
|
|
250
253
|
this.clearCatalogItemsStores();
|
|
251
254
|
});
|
|
252
255
|
}
|
|
@@ -1156,7 +1159,7 @@ let DirectionsToolComponent = class DirectionsToolComponent {
|
|
|
1156
1159
|
});
|
|
1157
1160
|
}
|
|
1158
1161
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DirectionsToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1159
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: DirectionsToolComponent, isStandalone: true, selector: "igo-directions-tool", ngImport: i0, template: "<igo-directions\n [contextUri]=\"currentContextUri\"\n [debounce]=\"debounceTime\"\n [stopsStore]=\"stopsStore\"\n [stopsFeatureStore]=\"stopsFeatureStore\"\n [stepsFeatureStore]=\"stepFeatureStore\"\n [routesFeatureStore]=\"routesFeatureStore\"\n [zoomToActiveRoute]=\"zoomToActiveRoute\"\n [authenticated
|
|
1162
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: DirectionsToolComponent, isStandalone: true, selector: "igo-directions-tool", ngImport: i0, template: "<igo-directions\n [contextUri]=\"currentContextUri\"\n [debounce]=\"debounceTime\"\n [stopsStore]=\"stopsStore\"\n [stopsFeatureStore]=\"stopsFeatureStore\"\n [stepsFeatureStore]=\"stepFeatureStore\"\n [routesFeatureStore]=\"routesFeatureStore\"\n [zoomToActiveRoute]=\"zoomToActiveRoute\"\n [authenticated]=\"authenticated$ | async\"\n/>\n", dependencies: [{ kind: "ngmodule", type: IgoDirectionsModule }, { kind: "component", type: i1$1.DirectionsComponent, selector: "igo-directions", inputs: ["contextUri", "stopsStore", "stopsFeatureStore", "routesFeatureStore", "stepsFeatureStore", "debounce", "length", "coordRoundedDecimals", "zoomToActiveRoute", "authenticated"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
1160
1163
|
};
|
|
1161
1164
|
DirectionsToolComponent = __decorate([
|
|
1162
1165
|
ToolComponent({
|
|
@@ -1167,7 +1170,7 @@ DirectionsToolComponent = __decorate([
|
|
|
1167
1170
|
], DirectionsToolComponent);
|
|
1168
1171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DirectionsToolComponent, decorators: [{
|
|
1169
1172
|
type: Component,
|
|
1170
|
-
args: [{ selector: 'igo-directions-tool', imports: [IgoDirectionsModule], template: "<igo-directions\n [contextUri]=\"currentContextUri\"\n [debounce]=\"debounceTime\"\n [stopsStore]=\"stopsStore\"\n [stopsFeatureStore]=\"stopsFeatureStore\"\n [stepsFeatureStore]=\"stepFeatureStore\"\n [routesFeatureStore]=\"routesFeatureStore\"\n [zoomToActiveRoute]=\"zoomToActiveRoute\"\n [authenticated
|
|
1173
|
+
args: [{ selector: 'igo-directions-tool', imports: [IgoDirectionsModule, AsyncPipe], template: "<igo-directions\n [contextUri]=\"currentContextUri\"\n [debounce]=\"debounceTime\"\n [stopsStore]=\"stopsStore\"\n [stopsFeatureStore]=\"stopsFeatureStore\"\n [stepsFeatureStore]=\"stepFeatureStore\"\n [routesFeatureStore]=\"routesFeatureStore\"\n [zoomToActiveRoute]=\"zoomToActiveRoute\"\n [authenticated]=\"authenticated$ | async\"\n/>\n" }]
|
|
1171
1174
|
}] });
|
|
1172
1175
|
|
|
1173
1176
|
/**
|
|
@@ -5267,6 +5270,7 @@ class AnalyticsListenerService {
|
|
|
5267
5270
|
contextState = inject(ContextState);
|
|
5268
5271
|
toolState = inject(ToolState);
|
|
5269
5272
|
mapState = inject(MapState);
|
|
5273
|
+
destroyRef = inject(DestroyRef);
|
|
5270
5274
|
listen() {
|
|
5271
5275
|
this.listenUser();
|
|
5272
5276
|
this.listenContext();
|
|
@@ -5274,16 +5278,13 @@ class AnalyticsListenerService {
|
|
|
5274
5278
|
this.listenLayer();
|
|
5275
5279
|
}
|
|
5276
5280
|
listenUser() {
|
|
5277
|
-
this.authService.authenticate
|
|
5281
|
+
this.authService.authenticate$
|
|
5282
|
+
.pipe(filter((authenticated) => authenticated != null), switchMap((authenticated) => authenticated ? this.authService.getProfils() : of(null)), takeUntilDestroyed(this.destroyRef))
|
|
5283
|
+
.subscribe((profils) => {
|
|
5278
5284
|
const user = this.authService.user;
|
|
5279
|
-
|
|
5280
|
-
this.
|
|
5281
|
-
|
|
5282
|
-
.subscribe((profils) => this.analyticsService.setUser(user, profils.profils));
|
|
5283
|
-
}
|
|
5284
|
-
else {
|
|
5285
|
-
this.analyticsService.setUser(null);
|
|
5286
|
-
}
|
|
5285
|
+
user && profils
|
|
5286
|
+
? this.analyticsService.setUser(user, profils.profils)
|
|
5287
|
+
: this.analyticsService.setUser(null);
|
|
5287
5288
|
});
|
|
5288
5289
|
}
|
|
5289
5290
|
listenContext() {
|