@igo2/integration 20.1.0-next.15 → 20.1.0-next.17

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.
@@ -10,12 +10,12 @@ import * as i4 from '@angular/material/menu';
10
10
  import { MatMenuModule } from '@angular/material/menu';
11
11
  import * as i2 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
- import { AuthService } from '@igo2/auth';
13
+ import { AuthService, UserService } from '@igo2/auth';
14
14
  import { CustomHtmlComponent, SanitizeHtmlPipe } from '@igo2/common/custom-html';
15
15
  import { ToolComponent, ToolService } from '@igo2/common/tool';
16
16
  import { ConfigService, version } from '@igo2/core/config';
17
17
  import { LanguageService, IgoLanguageModule } from '@igo2/core/language';
18
- import { of, BehaviorSubject, combineLatest, forkJoin, map as map$1, Subject, ReplaySubject, interval } from 'rxjs';
18
+ import { of, BehaviorSubject, combineLatest, forkJoin, map as map$1, merge, Subject, ReplaySubject, interval } from 'rxjs';
19
19
  import * as i3$1 from '@ngx-translate/core';
20
20
  import { TranslateModule } from '@ngx-translate/core';
21
21
  import * as i3$2 from '@angular/common';
@@ -23,7 +23,7 @@ import { AsyncPipe, formatDate, CommonModule, DecimalPipe, NgTemplateOutlet } fr
23
23
  import { EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSelectionStrategy, EntityTableComponent, getEntityTitle } from '@igo2/common/entity';
24
24
  import * as i1$1 from '@igo2/geo';
25
25
  import { MapService, ProjectionService, 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, createOverlayMarkerStyle, 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, StyleModalLayerButtonComponent, MeasurerComponent, PrintComponent, SearchBarComponent, getCommonVectorStyle, computeOlFeaturesExtent, featuresAreOutOfView, featuresAreTooDeepInView, getCommonVectorSelectedStyle, SearchResultsComponent, SearchResultAddButtonComponent, isLayerGroup, PropertyTypeDetectorService, CapabilitiesService, GeoPropertiesStrategy } from '@igo2/geo';
26
- import { take, switchMap, concatAll, map, toArray, skipWhile, takeUntil, tap, debounceTime, skip } from 'rxjs/operators';
26
+ import { take, switchMap, concatAll, map, toArray, skipWhile, distinctUntilChanged, takeUntil, tap, debounceTime, skip } from 'rxjs/operators';
27
27
  import { StorageService, StorageScope, StorageServiceEventEnum } from '@igo2/core/storage';
28
28
  import { ContextService, ContextEditComponent, ContextListComponent, ContextPermissionsComponent, ShareMapComponent, ContextImportExportComponent } from '@igo2/context';
29
29
  import { createExcelWorkBook, addExcelSheetToWorkBook, writeExcelFile, ObjectUtils, uuid, NumberUtils } from '@igo2/utils';
@@ -79,6 +79,9 @@ let AboutToolComponent = class AboutToolComponent {
79
79
  http = inject(HttpClient);
80
80
  cdRef = inject(ChangeDetectorRef);
81
81
  languageService = inject(LanguageService);
82
+ userService = inject(UserService, {
83
+ optional: true
84
+ });
82
85
  configOptions;
83
86
  get headerHtml() {
84
87
  return this._headerHtml;
@@ -105,7 +108,6 @@ let AboutToolComponent = class AboutToolComponent {
105
108
  effectiveVersion;
106
109
  _html = 'igo.integration.aboutTool.html';
107
110
  _headerHtml;
108
- baseUrlProfil;
109
111
  baseUrlGuide;
110
112
  loading = false;
111
113
  constructor() {
@@ -114,24 +116,24 @@ let AboutToolComponent = class AboutToolComponent {
114
116
  const configVersion = this.configOptions.version;
115
117
  this.effectiveVersion =
116
118
  configVersion?.app || configVersion?.lib || version.lib;
117
- this.baseUrlProfil = this.configOptions.storage?.url;
118
119
  this.baseUrlGuide =
119
120
  this.configOptions.depot?.url +
120
121
  // todo validate this property
121
122
  this.configOptions.depot?.guideUrl;
122
123
  }
123
124
  ngOnInit() {
124
- if (this.auth.authenticated && this.configOptions.context?.url) {
125
- this.http.get(this.baseUrlProfil).subscribe((profil) => {
126
- const recast = profil;
127
- this.trainingGuideURLs.set(recast.guides);
128
- this.cdRef.detectChanges();
129
- });
130
- }
131
- else if (this.auth.authenticated &&
132
- !this.configOptions.context?.url &&
133
- this.configOptions.depot?.trainingGuides) {
134
- this.trainingGuideURLs.set(this.configOptions.depot?.trainingGuides);
125
+ if (this.auth.authenticated) {
126
+ if (this.configOptions.context?.url) {
127
+ this.userService?.getUser().subscribe((user) => {
128
+ this.trainingGuideURLs.set(user['guides']);
129
+ });
130
+ }
131
+ else {
132
+ const trainingGuides = this.configOptions.depot?.trainingGuides;
133
+ if (trainingGuides) {
134
+ this.trainingGuideURLs.set(trainingGuides);
135
+ }
136
+ }
135
137
  }
136
138
  }
137
139
  openGuide(guide) {
@@ -1164,9 +1166,6 @@ let DirectionsToolComponent = class DirectionsToolComponent {
1164
1166
  get stepFeatureStore() {
1165
1167
  return this.directionState.stepFeatureStore;
1166
1168
  }
1167
- get zoomOnActiveRoute() {
1168
- return this.directionState.zoomToActiveRoute;
1169
- }
1170
1169
  get authenticated$() {
1171
1170
  return this.authService.authenticate$;
1172
1171
  }
@@ -1190,7 +1189,7 @@ let DirectionsToolComponent = class DirectionsToolComponent {
1190
1189
  });
1191
1190
  }
1192
1191
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DirectionsToolComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1193
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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 [zoomOnActiveRoute]=\"false\"\n [authenticated$]=\"authenticated$\"\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", "zoomOnActiveRoute", "authenticated$"] }] });
1192
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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 [authenticated$]=\"authenticated$\"\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", "authenticated$"] }] });
1194
1193
  };
1195
1194
  DirectionsToolComponent = __decorate([
1196
1195
  ToolComponent({
@@ -1201,7 +1200,7 @@ DirectionsToolComponent = __decorate([
1201
1200
  ], DirectionsToolComponent);
1202
1201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DirectionsToolComponent, decorators: [{
1203
1202
  type: Component,
1204
- 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 [zoomOnActiveRoute]=\"false\"\n [authenticated$]=\"authenticated$\"\n/>\n" }]
1203
+ 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 [authenticated$]=\"authenticated$\"\n/>\n" }]
1205
1204
  }] });
1206
1205
 
1207
1206
  /**
@@ -1545,7 +1544,9 @@ function getWorkspaceActions(workspace, rowsInMapExtentCheckCondition$, selectOn
1545
1544
  layer: ws.layer
1546
1545
  });
1547
1546
  },
1548
- args: [ogcFilterWidget, workspace]
1547
+ args: [ogcFilterWidget, workspace],
1548
+ availability: (widget, ws) => of(ws.layer.options.sourceOptions
1549
+ ?.ogcFilters?.enabled)
1549
1550
  },
1550
1551
  {
1551
1552
  id: 'interactiveSelect',
@@ -1869,13 +1870,9 @@ class WorkspaceState {
1869
1870
  }
1870
1871
  });
1871
1872
  });
1872
- this.actionMaximize$$.push(this.featureActionsService.maximize$.subscribe((maximized) => {
1873
- this.setWorkspaceIsMaximized(maximized);
1874
- }));
1875
- this.actionMaximize$$.push(this.wfsActionsService.maximize$.subscribe((maximized) => {
1876
- this.setWorkspaceIsMaximized(maximized);
1877
- }));
1878
- this.actionMaximize$$.push(this.editionActionsService.maximize$.subscribe((maximized) => {
1873
+ this.actionMaximize$$.push(merge(this.featureActionsService.maximize$, this.wfsActionsService.maximize$, this.editionActionsService.maximize$)
1874
+ .pipe(distinctUntilChanged())
1875
+ .subscribe((maximized) => {
1879
1876
  this.setWorkspaceIsMaximized(maximized);
1880
1877
  }));
1881
1878
  this.activeWorkspace$$ = this.workspace$.subscribe((workspace) => {