@igo2/integration 20.1.0-next.16 → 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) {
@@ -1868,13 +1870,9 @@ class WorkspaceState {
1868
1870
  }
1869
1871
  });
1870
1872
  });
1871
- this.actionMaximize$$.push(this.featureActionsService.maximize$.subscribe((maximized) => {
1872
- this.setWorkspaceIsMaximized(maximized);
1873
- }));
1874
- this.actionMaximize$$.push(this.wfsActionsService.maximize$.subscribe((maximized) => {
1875
- this.setWorkspaceIsMaximized(maximized);
1876
- }));
1877
- 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) => {
1878
1876
  this.setWorkspaceIsMaximized(maximized);
1879
1877
  }));
1880
1878
  this.activeWorkspace$$ = this.workspace$.subscribe((workspace) => {