@igo2/context 16.2.0 → 17.0.0-next.0

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.
Files changed (71) hide show
  1. package/esm2022/lib/context-import-export/context-import-export/context-import-export.component.mjs +39 -16
  2. package/esm2022/lib/context-import-export/context-import-export.module.mjs +10 -66
  3. package/esm2022/lib/context-import-export/shared/context-export.service.mjs +4 -4
  4. package/esm2022/lib/context-import-export/shared/context-export.utils.mjs +1 -1
  5. package/esm2022/lib/context-import-export/shared/context-import.service.mjs +5 -5
  6. package/esm2022/lib/context-import-export/shared/context-import.utils.mjs +1 -1
  7. package/esm2022/lib/context-manager/context-edit/context-edit-binding.directive.mjs +8 -7
  8. package/esm2022/lib/context-manager/context-edit/context-edit.component.mjs +10 -9
  9. package/esm2022/lib/context-manager/context-form/context-form.component.mjs +30 -14
  10. package/esm2022/lib/context-manager/context-item/context-item.component.mjs +28 -13
  11. package/esm2022/lib/context-manager/context-list/context-list-binding.directive.mjs +9 -7
  12. package/esm2022/lib/context-manager/context-list/context-list.component.mjs +44 -17
  13. package/esm2022/lib/context-manager/context-manager.module.mjs +23 -102
  14. package/esm2022/lib/context-manager/context-permissions/context-permissions-binding.directive.mjs +8 -7
  15. package/esm2022/lib/context-manager/context-permissions/context-permissions.component.mjs +45 -16
  16. package/esm2022/lib/context-manager/index.mjs +19 -1
  17. package/esm2022/lib/context-manager/shared/context.interface.mjs +1 -1
  18. package/esm2022/lib/context-manager/shared/context.service.mjs +6 -6
  19. package/esm2022/lib/context-manager/shared/layer-context.directive.mjs +10 -7
  20. package/esm2022/lib/context-manager/shared/map-context.directive.mjs +7 -6
  21. package/esm2022/lib/context-map-button/bookmark-button/bookmark-button.component.mjs +12 -8
  22. package/esm2022/lib/context-map-button/bookmark-button/bookmark-dialog.component.mjs +25 -11
  23. package/esm2022/lib/context-map-button/context-map-button.module.mjs +16 -75
  24. package/esm2022/lib/context-map-button/index.mjs +10 -1
  25. package/esm2022/lib/context-map-button/poi-button/poi-button.component.mjs +28 -13
  26. package/esm2022/lib/context-map-button/poi-button/poi-dialog.component.mjs +25 -11
  27. package/esm2022/lib/context-map-button/poi-button/shared/poi.service.mjs +5 -5
  28. package/esm2022/lib/context-map-button/user-button/user-button.component.mjs +22 -11
  29. package/esm2022/lib/context-map-button/user-button/user-dialog.component.mjs +15 -7
  30. package/esm2022/lib/context.module.mjs +9 -11
  31. package/esm2022/lib/share-map/index.mjs +9 -1
  32. package/esm2022/lib/share-map/share-map/share-map-api.component.mjs +30 -14
  33. package/esm2022/lib/share-map/share-map/share-map-url.component.mjs +26 -13
  34. package/esm2022/lib/share-map/share-map/share-map.component.mjs +19 -11
  35. package/esm2022/lib/share-map/share-map.module.mjs +10 -50
  36. package/esm2022/lib/share-map/shared/share-map.service.mjs +6 -6
  37. package/esm2022/lib/sidenav/sidenav.component.mjs +29 -16
  38. package/esm2022/lib/sidenav/sidenav.module.mjs +10 -46
  39. package/fesm2022/igo2-context.mjs +1359 -1381
  40. package/fesm2022/igo2-context.mjs.map +1 -1
  41. package/lib/context-import-export/context-import-export/context-import-export.component.d.ts +1 -1
  42. package/lib/context-import-export/context-import-export.module.d.ts +4 -15
  43. package/lib/context-manager/context-edit/context-edit-binding.directive.d.ts +1 -1
  44. package/lib/context-manager/context-edit/context-edit.component.d.ts +1 -1
  45. package/lib/context-manager/context-form/context-form.component.d.ts +1 -1
  46. package/lib/context-manager/context-item/context-item.component.d.ts +1 -1
  47. package/lib/context-manager/context-list/context-list-binding.directive.d.ts +1 -1
  48. package/lib/context-manager/context-list/context-list.component.d.ts +1 -1
  49. package/lib/context-manager/context-manager.module.d.ts +6 -22
  50. package/lib/context-manager/context-permissions/context-permissions-binding.directive.d.ts +1 -1
  51. package/lib/context-manager/context-permissions/context-permissions.component.d.ts +1 -1
  52. package/lib/context-manager/index.d.ts +7 -0
  53. package/lib/context-manager/shared/layer-context.directive.d.ts +1 -1
  54. package/lib/context-manager/shared/map-context.directive.d.ts +1 -1
  55. package/lib/context-map-button/bookmark-button/bookmark-button.component.d.ts +1 -1
  56. package/lib/context-map-button/bookmark-button/bookmark-dialog.component.d.ts +1 -1
  57. package/lib/context-map-button/context-map-button.module.d.ts +5 -18
  58. package/lib/context-map-button/index.d.ts +4 -0
  59. package/lib/context-map-button/poi-button/poi-button.component.d.ts +1 -1
  60. package/lib/context-map-button/poi-button/poi-dialog.component.d.ts +1 -1
  61. package/lib/context-map-button/user-button/user-button.component.d.ts +1 -1
  62. package/lib/context-map-button/user-button/user-dialog.component.d.ts +1 -1
  63. package/lib/context.module.d.ts +9 -9
  64. package/lib/share-map/index.d.ts +4 -0
  65. package/lib/share-map/share-map/share-map-api.component.d.ts +1 -1
  66. package/lib/share-map/share-map/share-map-url.component.d.ts +1 -1
  67. package/lib/share-map/share-map/share-map.component.d.ts +1 -1
  68. package/lib/share-map/share-map.module.d.ts +4 -11
  69. package/lib/sidenav/sidenav.component.d.ts +1 -1
  70. package/lib/sidenav/sidenav.module.d.ts +4 -10
  71. package/package.json +13 -13
@@ -1,64 +1,63 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Optional, Component, Input, NgModule, EventEmitter, Output, Directive, Self, HostListener, ChangeDetectionStrategy } from '@angular/core';
3
- import * as i6$1 from '@angular/material/form-field';
4
- import { MatFormFieldModule } from '@angular/material/form-field';
5
- import * as i5 from '@angular/material/input';
6
- import { MatInputModule } from '@angular/material/input';
7
- import * as i12$1 from '@angular/material/menu';
8
- import { MatMenuModule } from '@angular/material/menu';
9
- import * as i6 from '@angular/common';
10
- import { CommonModule } from '@angular/common';
11
- import * as i1$2 from '@angular/forms';
3
+ import { NgIf, NgFor, AsyncPipe, NgClass, KeyValuePipe } from '@angular/common';
4
+ import * as i4 from '@angular/forms';
12
5
  import { Validators, FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
13
- import * as i7 from '@angular/material/button';
6
+ import * as i5 from '@angular/material/button';
14
7
  import { MatButtonModule } from '@angular/material/button';
15
- import * as i8 from '@angular/material/button-toggle';
8
+ import * as i6 from '@angular/material/button-toggle';
16
9
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
17
- import * as i11$1 from '@angular/material/checkbox';
18
- import { MatCheckboxModule } from '@angular/material/checkbox';
19
- import * as i12 from '@angular/material/core';
10
+ import * as i11 from '@angular/material/core';
20
11
  import { MatOptionModule } from '@angular/material/core';
21
- import * as i9 from '@angular/material/divider';
12
+ import * as i12 from '@angular/material/divider';
22
13
  import { MatDividerModule } from '@angular/material/divider';
23
- import * as i11 from '@angular/material/select';
14
+ import * as i4$1 from '@angular/material/form-field';
15
+ import { MatFormFieldModule } from '@angular/material/form-field';
16
+ import * as i3$1 from '@angular/material/input';
17
+ import { MatInputModule } from '@angular/material/input';
18
+ import * as i10 from '@angular/material/select';
24
19
  import { MatSelectModule } from '@angular/material/select';
25
- import * as i3$1 from '@angular/material/tabs';
26
- import { MatTabsModule } from '@angular/material/tabs';
27
- import * as i6$3 from '@angular/material/tooltip';
28
- import { MatTooltipModule } from '@angular/material/tooltip';
29
- import * as i13 from '@igo2/common';
30
- import { IgoSpinnerModule, IgoConfirmDialogModule, IgoStopPropagationModule, ActionStore, ActionbarMode, IgoListModule, IgoKeyValueModule, IgoCollapsibleModule, IgoActionbarModule, IgoCustomHtmlModule, getEntityTitle, IgoPanelModule, IgoFlexibleModule } from '@igo2/common';
20
+ import * as i5$2 from '@igo2/common';
21
+ import { SpinnerComponent, StopPropagationDirective, CollapseDirective, ActionStore, ActionbarMode, ListComponent, ActionbarComponent, CollapsibleComponent, ListItemDirective, ConfirmDialogService, CustomHtmlComponent, getEntityTitle, FlexibleComponent, PanelComponent } from '@igo2/common';
31
22
  import * as i3 from '@igo2/core';
32
- import { IgoLanguageModule } from '@igo2/core';
33
- import { BehaviorSubject, Subject, of, Observable, EMPTY, ReplaySubject, timer, merge, combineLatest } from 'rxjs';
23
+ import * as i7 from '@ngx-translate/core';
24
+ import { TranslateModule } from '@ngx-translate/core';
25
+ import { BehaviorSubject, Subject, of, Observable, ReplaySubject, timer, merge, EMPTY, combineLatest } from 'rxjs';
34
26
  import { skip, first, catchError, tap, map, mergeMap, debounceTime, take, debounce, filter, buffer } from 'rxjs/operators';
35
27
  import * as i1 from '@angular/common/http';
28
+ import { HttpClientModule } from '@angular/common/http';
36
29
  import * as i2 from '@igo2/auth';
37
- import { IgoAuthModule } from '@igo2/auth';
38
30
  import * as i1$1 from '@igo2/geo';
39
- import { FeatureDataSource, featureRandomStyleFunction, featureRandomStyle, VectorLayer, ClusterDataSource, moveToOlFeatures, FeatureMotion, IgoFeatureModule } from '@igo2/geo';
31
+ import { FeatureDataSource, featureRandomStyleFunction, featureRandomStyle, VectorLayer, ClusterDataSource, moveToOlFeatures, FeatureMotion, FeatureDetailsComponent } from '@igo2/geo';
40
32
  import { ObjectUtils, uuid, downloadContent, Clipboard } from '@igo2/utils';
41
33
  import GeoJSON from 'ol/format/GeoJSON';
42
34
  import olPoint from 'ol/geom/Point';
43
35
  import Cluster from 'ol/source/Cluster';
44
36
  import olVectorSource from 'ol/source/Vector';
45
- import * as i9$1 from '@ngx-translate/core';
46
- import * as i14 from '@angular/material/autocomplete';
47
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
48
- import * as i1$3 from '@angular/material/dialog';
49
- import { MatDialogModule } from '@angular/material/dialog';
50
- import * as i6$2 from '@angular/material/icon';
37
+ import * as i6$1 from '@angular/material/icon';
51
38
  import { MatIconModule } from '@angular/material/icon';
52
- import * as i7$1 from '@angular/material/list';
39
+ import * as i5$1 from '@angular/material/tooltip';
40
+ import { MatTooltipModule } from '@angular/material/tooltip';
41
+ import * as i3$2 from '@angular/material/list';
53
42
  import { MatListModule } from '@angular/material/list';
54
- import * as i12$2 from '@angular/material/radio';
43
+ import * as i11$1 from '@angular/material/checkbox';
44
+ import { MatCheckboxModule } from '@angular/material/checkbox';
45
+ import * as i1$2 from '@angular/material/dialog';
46
+ import { MatDialogTitle, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
47
+ import * as i10$1 from '@angular/material/menu';
48
+ import { MatMenuModule } from '@angular/material/menu';
49
+ import * as i8 from '@angular/material/autocomplete';
50
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
51
+ import * as i5$3 from '@angular/material/radio';
55
52
  import { MatRadioModule } from '@angular/material/radio';
56
53
  import * as oleasing from 'ol/easing';
57
54
  import * as olproj from 'ol/proj';
58
55
  import { trigger, state, style, transition, animate } from '@angular/animations';
59
- import * as i5$1 from '@angular/material/sidenav';
56
+ import * as i2$1 from '@angular/material/tabs';
57
+ import { MatTabsModule } from '@angular/material/tabs';
58
+ import * as i2$2 from '@angular/material/sidenav';
60
59
  import { MatSidenavModule } from '@angular/material/sidenav';
61
- import * as i1$4 from '@angular/platform-browser';
60
+ import * as i1$3 from '@angular/platform-browser';
62
61
 
63
62
  var TypePermission;
64
63
  (function (TypePermission) {
@@ -709,17 +708,17 @@ class ContextService {
709
708
  }
710
709
  return found;
711
710
  }
712
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextService, deps: [{ token: i1.HttpClient }, { token: i2.AuthService }, { token: i3.LanguageService }, { token: i3.ConfigService }, { token: i3.MessageService }, { token: i3.StorageService }, { token: i1$1.ExportService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
713
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextService, providedIn: 'root' });
711
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextService, deps: [{ token: i1.HttpClient }, { token: i2.AuthService }, { token: i3.LanguageService }, { token: i3.ConfigService }, { token: i3.MessageService }, { token: i3.StorageService }, { token: i1$1.ExportService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
712
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextService, providedIn: 'root' });
714
713
  }
715
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextService, decorators: [{
714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextService, decorators: [{
716
715
  type: Injectable,
717
716
  args: [{
718
717
  providedIn: 'root'
719
718
  }]
720
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.LanguageService }, { type: i3.ConfigService }, { type: i3.MessageService }, { type: i3.StorageService }, { type: i1$1.ExportService }, { type: i3.RouteService, decorators: [{
719
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.LanguageService }, { type: i3.ConfigService }, { type: i3.MessageService }, { type: i3.StorageService }, { type: i1$1.ExportService }, { type: i3.RouteService, decorators: [{
721
720
  type: Optional
722
- }] }]; } });
721
+ }] }] });
723
722
 
724
723
  class ExportError extends Error {
725
724
  }
@@ -759,10 +758,10 @@ class ContextExportService {
759
758
  }
760
759
  return false;
761
760
  }
762
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
763
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextExportService, providedIn: 'root' });
761
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
762
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextExportService, providedIn: 'root' });
764
763
  }
765
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextExportService, decorators: [{
764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextExportService, decorators: [{
766
765
  type: Injectable,
767
766
  args: [{
768
767
  providedIn: 'root'
@@ -1027,15 +1026,15 @@ class ContextImportService {
1027
1026
  const context = JSON.parse(data);
1028
1027
  return context;
1029
1028
  }
1030
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextImportService, deps: [{ token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1031
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextImportService, providedIn: 'root' });
1029
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextImportService, deps: [{ token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1030
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextImportService, providedIn: 'root' });
1032
1031
  }
1033
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextImportService, decorators: [{
1032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextImportService, decorators: [{
1034
1033
  type: Injectable,
1035
1034
  args: [{
1036
1035
  providedIn: 'root'
1037
1036
  }]
1038
- }], ctorParameters: function () { return [{ type: i3.ConfigService }]; } });
1037
+ }], ctorParameters: () => [{ type: i3.ConfigService }] });
1039
1038
 
1040
1039
  class ContextImportExportComponent {
1041
1040
  contextImportService;
@@ -1134,352 +1133,360 @@ class ContextImportExportComponent {
1134
1133
  ngOnDestroy() {
1135
1134
  this.layers$$.unsubscribe();
1136
1135
  }
1137
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextImportExportComponent, deps: [{ token: ContextImportService }, { token: ContextExportService }, { token: i3.MessageService }, { token: i1$2.UntypedFormBuilder }, { token: i3.ConfigService }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Component });
1138
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextImportExportComponent, selector: "igo-context-import-export", inputs: { map: "map" }, ngImport: i0, template: "<div class=\"import-export-toggle mat-typography\">\n <mat-button-toggle-group\n [value]=\"activeImportExport\"\n (change)=\"onImportExportChange($event)\"\n >\n <mat-button-toggle [value]=\"'import'\">\n {{ 'igo.geo.importExportForm.importTabTitle' | translate }}\n </mat-button-toggle>\n <mat-button-toggle [value]=\"'export'\">\n {{ 'igo.geo.importExportForm.exportTabTitle' | translate }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div *ngIf=\"activeImportExport === 'import'\">\n <form class=\"igo-form\">\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"button\"\n (click)=\"fileInput.click()\"\n [disabled]=\"loading$ | async\"\n >\n {{ 'igo.geo.importExportForm.importButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = null\"\n (change)=\"importFiles($event.target.files)\"\n />\n </div>\n </form>\n <section class=\"mat-typography\">\n <h4>{{ 'igo.geo.importExportForm.importClarifications' | translate }}</h4>\n <ul>\n <li>\n {{\n 'igo.geo.importExportForm.importSizeMax'\n | translate: { size: fileSizeMb }\n }}\n </li>\n </ul>\n </section>\n</div>\n\n<form\n class=\"igo-form\"\n *ngIf=\"activeImportExport === 'export'\"\n [formGroup]=\"form\"\n>\n <div class=\"igo-input-container\">\n <mat-form-field class=\"example-full-width\">\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportContextName' | translate\n }}</mat-label>\n <input formControlName=\"name\" matInput [value]=\"\" />\n </mat-form-field>\n </div>\n <div class=\"igo-input-container\">\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportPlaceHolder' | translate\n }}</mat-label>\n <mat-select formControlName=\"layers\" multiple>\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\n {{\n 'igo.context.contextImportExport.export.exportSelectAll' | translate\n }}\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let layer of userControlledLayerList\"\n [value]=\"layer\"\n >{{ layer.title }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"button\"\n [disabled]=\"!form.valid || (loading$ | async)\"\n (click)=\"handleExportFormSubmit(form.value)\"\n >\n {{ 'igo.geo.importExportForm.exportButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n </div>\n</form>\n", styles: [".import-export-toggle{padding:10px;text-align:center}.import-export-toggle mat-button-toggle-group{width:100%}.import-export-toggle mat-button-toggle-group mat-button-toggle{width:50%}.igo-input-container{padding:10px}.igo-input-container mat-form-field{width:100%}h4{padding:0 5px}.igo-form{padding:15px 5px}.igo-form-button-group{text-align:center;padding-top:10px}igo-spinner{position:absolute;padding-left:10px}\n"], dependencies: [{ kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i8.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i8.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i9.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i11.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i13.SpinnerComponent, selector: "igo-spinner", inputs: ["shown"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1136
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextImportExportComponent, deps: [{ token: ContextImportService }, { token: ContextExportService }, { token: i3.MessageService }, { token: i4.UntypedFormBuilder }, { token: i3.ConfigService }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Component });
1137
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextImportExportComponent, isStandalone: true, selector: "igo-context-import-export", inputs: { map: "map" }, ngImport: i0, template: "<div class=\"import-export-toggle mat-typography\">\r\n <mat-button-toggle-group\r\n [value]=\"activeImportExport\"\r\n (change)=\"onImportExportChange($event)\"\r\n >\r\n <mat-button-toggle [value]=\"'import'\">\r\n {{ 'igo.geo.importExportForm.importTabTitle' | translate }}\r\n </mat-button-toggle>\r\n <mat-button-toggle [value]=\"'export'\">\r\n {{ 'igo.geo.importExportForm.exportTabTitle' | translate }}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n</div>\r\n\r\n<div *ngIf=\"activeImportExport === 'import'\">\r\n <form class=\"igo-form\">\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"button\"\r\n (click)=\"fileInput.click()\"\r\n [disabled]=\"loading$ | async\"\r\n >\r\n {{ 'igo.geo.importExportForm.importButton' | translate }}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n <input\r\n #fileInput\r\n type=\"file\"\r\n [style.display]=\"'none'\"\r\n (click)=\"fileInput.value = null\"\r\n (change)=\"importFiles($any($event.target).files)\"\r\n />\r\n </div>\r\n </form>\r\n <section class=\"mat-typography\">\r\n <h4>{{ 'igo.geo.importExportForm.importClarifications' | translate }}</h4>\r\n <ul>\r\n <li>\r\n {{\r\n 'igo.geo.importExportForm.importSizeMax'\r\n | translate: { size: fileSizeMb }\r\n }}\r\n </li>\r\n </ul>\r\n </section>\r\n</div>\r\n\r\n<form\r\n class=\"igo-form\"\r\n *ngIf=\"activeImportExport === 'export'\"\r\n [formGroup]=\"form\"\r\n>\r\n <div class=\"igo-input-container\">\r\n <mat-form-field class=\"example-full-width\">\r\n <mat-label>{{\r\n 'igo.context.contextImportExport.export.exportContextName' | translate\r\n }}</mat-label>\r\n <input formControlName=\"name\" matInput [value]=\"\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-input-container\">\r\n <mat-form-field>\r\n <mat-label>{{\r\n 'igo.context.contextImportExport.export.exportPlaceHolder' | translate\r\n }}</mat-label>\r\n <mat-select formControlName=\"layers\" multiple>\r\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\r\n {{\r\n 'igo.context.contextImportExport.export.exportSelectAll' | translate\r\n }}\r\n </mat-option>\r\n <mat-divider></mat-divider>\r\n <mat-option\r\n *ngFor=\"let layer of userControlledLayerList\"\r\n [value]=\"layer\"\r\n >{{ layer.title }}</mat-option\r\n >\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"button\"\r\n [disabled]=\"!form.valid || (loading$ | async)\"\r\n (click)=\"handleExportFormSubmit(form.value)\"\r\n >\r\n {{ 'igo.geo.importExportForm.exportButton' | translate }}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n </div>\r\n</form>\r\n", styles: [".import-export-toggle{padding:10px;text-align:center}.import-export-toggle mat-button-toggle-group{width:100%}.import-export-toggle mat-button-toggle-group mat-button-toggle{width:50%}.igo-input-container{padding:10px}.igo-input-container mat-form-field{width:100%}h4{padding:0 5px}.igo-form{padding:15px 5px}.igo-form-button-group{text-align:center;padding-top:10px}igo-spinner{position:absolute;padding-left:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i6.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i6.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: SpinnerComponent, selector: "igo-spinner", inputs: ["shown"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i10.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1139
1138
  }
1140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextImportExportComponent, decorators: [{
1139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextImportExportComponent, decorators: [{
1141
1140
  type: Component,
1142
- args: [{ selector: 'igo-context-import-export', template: "<div class=\"import-export-toggle mat-typography\">\n <mat-button-toggle-group\n [value]=\"activeImportExport\"\n (change)=\"onImportExportChange($event)\"\n >\n <mat-button-toggle [value]=\"'import'\">\n {{ 'igo.geo.importExportForm.importTabTitle' | translate }}\n </mat-button-toggle>\n <mat-button-toggle [value]=\"'export'\">\n {{ 'igo.geo.importExportForm.exportTabTitle' | translate }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div *ngIf=\"activeImportExport === 'import'\">\n <form class=\"igo-form\">\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"button\"\n (click)=\"fileInput.click()\"\n [disabled]=\"loading$ | async\"\n >\n {{ 'igo.geo.importExportForm.importButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = null\"\n (change)=\"importFiles($event.target.files)\"\n />\n </div>\n </form>\n <section class=\"mat-typography\">\n <h4>{{ 'igo.geo.importExportForm.importClarifications' | translate }}</h4>\n <ul>\n <li>\n {{\n 'igo.geo.importExportForm.importSizeMax'\n | translate: { size: fileSizeMb }\n }}\n </li>\n </ul>\n </section>\n</div>\n\n<form\n class=\"igo-form\"\n *ngIf=\"activeImportExport === 'export'\"\n [formGroup]=\"form\"\n>\n <div class=\"igo-input-container\">\n <mat-form-field class=\"example-full-width\">\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportContextName' | translate\n }}</mat-label>\n <input formControlName=\"name\" matInput [value]=\"\" />\n </mat-form-field>\n </div>\n <div class=\"igo-input-container\">\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportPlaceHolder' | translate\n }}</mat-label>\n <mat-select formControlName=\"layers\" multiple>\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\n {{\n 'igo.context.contextImportExport.export.exportSelectAll' | translate\n }}\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let layer of userControlledLayerList\"\n [value]=\"layer\"\n >{{ layer.title }}</mat-option\n >\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"button\"\n [disabled]=\"!form.valid || (loading$ | async)\"\n (click)=\"handleExportFormSubmit(form.value)\"\n >\n {{ 'igo.geo.importExportForm.exportButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n </div>\n</form>\n", styles: [".import-export-toggle{padding:10px;text-align:center}.import-export-toggle mat-button-toggle-group{width:100%}.import-export-toggle mat-button-toggle-group mat-button-toggle{width:50%}.igo-input-container{padding:10px}.igo-input-container mat-form-field{width:100%}h4{padding:0 5px}.igo-form{padding:15px 5px}.igo-form-button-group{text-align:center;padding-top:10px}igo-spinner{position:absolute;padding-left:10px}\n"] }]
1143
- }], ctorParameters: function () { return [{ type: ContextImportService }, { type: ContextExportService }, { type: i3.MessageService }, { type: i1$2.UntypedFormBuilder }, { type: i3.ConfigService }, { type: ContextService }]; }, propDecorators: { map: [{
1141
+ args: [{ selector: 'igo-context-import-export', standalone: true, imports: [
1142
+ MatButtonToggleModule,
1143
+ NgIf,
1144
+ FormsModule,
1145
+ MatButtonModule,
1146
+ SpinnerComponent,
1147
+ ReactiveFormsModule,
1148
+ MatFormFieldModule,
1149
+ MatInputModule,
1150
+ MatSelectModule,
1151
+ MatOptionModule,
1152
+ MatDividerModule,
1153
+ NgFor,
1154
+ AsyncPipe,
1155
+ TranslateModule
1156
+ ], template: "<div class=\"import-export-toggle mat-typography\">\r\n <mat-button-toggle-group\r\n [value]=\"activeImportExport\"\r\n (change)=\"onImportExportChange($event)\"\r\n >\r\n <mat-button-toggle [value]=\"'import'\">\r\n {{ 'igo.geo.importExportForm.importTabTitle' | translate }}\r\n </mat-button-toggle>\r\n <mat-button-toggle [value]=\"'export'\">\r\n {{ 'igo.geo.importExportForm.exportTabTitle' | translate }}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n</div>\r\n\r\n<div *ngIf=\"activeImportExport === 'import'\">\r\n <form class=\"igo-form\">\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"button\"\r\n (click)=\"fileInput.click()\"\r\n [disabled]=\"loading$ | async\"\r\n >\r\n {{ 'igo.geo.importExportForm.importButton' | translate }}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n <input\r\n #fileInput\r\n type=\"file\"\r\n [style.display]=\"'none'\"\r\n (click)=\"fileInput.value = null\"\r\n (change)=\"importFiles($any($event.target).files)\"\r\n />\r\n </div>\r\n </form>\r\n <section class=\"mat-typography\">\r\n <h4>{{ 'igo.geo.importExportForm.importClarifications' | translate }}</h4>\r\n <ul>\r\n <li>\r\n {{\r\n 'igo.geo.importExportForm.importSizeMax'\r\n | translate: { size: fileSizeMb }\r\n }}\r\n </li>\r\n </ul>\r\n </section>\r\n</div>\r\n\r\n<form\r\n class=\"igo-form\"\r\n *ngIf=\"activeImportExport === 'export'\"\r\n [formGroup]=\"form\"\r\n>\r\n <div class=\"igo-input-container\">\r\n <mat-form-field class=\"example-full-width\">\r\n <mat-label>{{\r\n 'igo.context.contextImportExport.export.exportContextName' | translate\r\n }}</mat-label>\r\n <input formControlName=\"name\" matInput [value]=\"\" />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-input-container\">\r\n <mat-form-field>\r\n <mat-label>{{\r\n 'igo.context.contextImportExport.export.exportPlaceHolder' | translate\r\n }}</mat-label>\r\n <mat-select formControlName=\"layers\" multiple>\r\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\r\n {{\r\n 'igo.context.contextImportExport.export.exportSelectAll' | translate\r\n }}\r\n </mat-option>\r\n <mat-divider></mat-divider>\r\n <mat-option\r\n *ngFor=\"let layer of userControlledLayerList\"\r\n [value]=\"layer\"\r\n >{{ layer.title }}</mat-option\r\n >\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"button\"\r\n [disabled]=\"!form.valid || (loading$ | async)\"\r\n (click)=\"handleExportFormSubmit(form.value)\"\r\n >\r\n {{ 'igo.geo.importExportForm.exportButton' | translate }}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n </div>\r\n</form>\r\n", styles: [".import-export-toggle{padding:10px;text-align:center}.import-export-toggle mat-button-toggle-group{width:100%}.import-export-toggle mat-button-toggle-group mat-button-toggle{width:50%}.igo-input-container{padding:10px}.igo-input-container mat-form-field{width:100%}h4{padding:0 5px}.igo-form{padding:15px 5px}.igo-form-button-group{text-align:center;padding-top:10px}igo-spinner{position:absolute;padding-left:10px}\n"] }]
1157
+ }], ctorParameters: () => [{ type: ContextImportService }, { type: ContextExportService }, { type: i3.MessageService }, { type: i4.UntypedFormBuilder }, { type: i3.ConfigService }, { type: ContextService }], propDecorators: { map: [{
1144
1158
  type: Input
1145
1159
  }] } });
1146
1160
 
1161
+ /**
1162
+ * @deprecated import the ContextImportExportComponent directly
1163
+ */
1147
1164
  class IgoContextImportExportModule {
1148
1165
  static forRoot() {
1149
1166
  return {
1150
1167
  ngModule: IgoContextImportExportModule
1151
1168
  };
1152
1169
  }
1153
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1154
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoContextImportExportModule, declarations: [ContextImportExportComponent], imports: [FormsModule,
1155
- ReactiveFormsModule,
1156
- CommonModule,
1157
- MatButtonModule,
1158
- MatButtonToggleModule,
1159
- MatDividerModule,
1160
- MatTabsModule,
1161
- MatSelectModule,
1162
- MatOptionModule,
1163
- MatFormFieldModule,
1164
- MatInputModule,
1165
- MatCheckboxModule,
1166
- IgoLanguageModule,
1167
- IgoSpinnerModule,
1168
- MatTooltipModule], exports: [ContextImportExportComponent] });
1169
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextImportExportModule, imports: [FormsModule,
1170
- ReactiveFormsModule,
1171
- CommonModule,
1172
- MatButtonModule,
1173
- MatButtonToggleModule,
1174
- MatDividerModule,
1175
- MatTabsModule,
1176
- MatSelectModule,
1177
- MatOptionModule,
1178
- MatFormFieldModule,
1179
- MatInputModule,
1180
- MatCheckboxModule,
1181
- IgoLanguageModule,
1182
- IgoSpinnerModule,
1183
- MatTooltipModule] });
1170
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1171
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent], exports: [ContextImportExportComponent] });
1172
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent] });
1184
1173
  }
1185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
1174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
1186
1175
  type: NgModule,
1187
1176
  args: [{
1188
- imports: [
1189
- FormsModule,
1190
- ReactiveFormsModule,
1191
- CommonModule,
1192
- MatButtonModule,
1193
- MatButtonToggleModule,
1194
- MatDividerModule,
1195
- MatTabsModule,
1196
- MatSelectModule,
1197
- MatOptionModule,
1198
- MatFormFieldModule,
1199
- MatInputModule,
1200
- MatCheckboxModule,
1201
- IgoLanguageModule,
1202
- IgoSpinnerModule,
1203
- MatTooltipModule
1204
- ],
1205
- exports: [ContextImportExportComponent],
1206
- declarations: [ContextImportExportComponent]
1177
+ imports: [ContextImportExportComponent],
1178
+ exports: [ContextImportExportComponent]
1207
1179
  }]
1208
1180
  }] });
1209
1181
 
1210
- class BookmarkDialogComponent {
1211
- dialogRef;
1212
- title;
1213
- constructor(dialogRef) {
1214
- this.dialogRef = dialogRef;
1215
- }
1216
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BookmarkDialogComponent, deps: [{ token: i1$3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
1217
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BookmarkDialogComponent, selector: "igo-bookmark-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.bookmarkButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n maxlength=\"128\"\n [placeholder]=\"\n 'igo.context.bookmarkButton.dialog.placeholder' | translate\n \"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1218
- }
1219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
1220
- type: Component,
1221
- args: [{ selector: 'igo-bookmark-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.bookmarkButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n maxlength=\"128\"\n [placeholder]=\"\n 'igo.context.bookmarkButton.dialog.placeholder' | translate\n \"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n" }]
1222
- }], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }]; } });
1223
-
1224
- class BookmarkButtonComponent {
1225
- dialog;
1226
- contextService;
1182
+ class ContextFormComponent {
1183
+ formBuilder;
1227
1184
  messageService;
1228
- get map() {
1229
- return this._map;
1185
+ form;
1186
+ prefix;
1187
+ get btnSubmitText() {
1188
+ return this._btnSubmitText;
1230
1189
  }
1231
- set map(value) {
1232
- this._map = value;
1190
+ set btnSubmitText(value) {
1191
+ this._btnSubmitText = value;
1233
1192
  }
1234
- _map;
1235
- get color() {
1236
- return this._color;
1193
+ _btnSubmitText;
1194
+ get context() {
1195
+ return this._context;
1237
1196
  }
1238
- set color(value) {
1239
- this._color = value;
1197
+ set context(value) {
1198
+ this._context = value;
1199
+ this.buildForm();
1240
1200
  }
1241
- _color;
1242
- constructor(dialog, contextService, messageService) {
1243
- this.dialog = dialog;
1244
- this.contextService = contextService;
1201
+ _context;
1202
+ get disabled() {
1203
+ return this._disabled;
1204
+ }
1205
+ set disabled(value) {
1206
+ this._disabled = value;
1207
+ }
1208
+ _disabled = false;
1209
+ // TODO: replace any by ContextOptions or Context
1210
+ submitForm = new EventEmitter();
1211
+ clone = new EventEmitter();
1212
+ delete = new EventEmitter();
1213
+ constructor(formBuilder, messageService) {
1214
+ this.formBuilder = formBuilder;
1245
1215
  this.messageService = messageService;
1246
1216
  }
1247
- createContext() {
1248
- this.dialog
1249
- .open(BookmarkDialogComponent, { disableClose: false })
1250
- .afterClosed()
1251
- .pipe(take(1))
1252
- .subscribe((title) => {
1253
- if (title) {
1254
- const context = this.contextService.getContextFromMap(this.map);
1255
- context.title = title;
1256
- this.contextService.create(context).subscribe(() => {
1257
- this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
1258
- this.contextService.loadContext(context.uri);
1259
- });
1260
- }
1217
+ ngOnInit() {
1218
+ this.buildForm();
1219
+ }
1220
+ handleFormSubmit(value) {
1221
+ let inputs = Object.assign({}, value);
1222
+ inputs = ObjectUtils.removeNull(inputs);
1223
+ inputs.uri = inputs.uri.replace(' ', '');
1224
+ if (inputs.uri) {
1225
+ inputs.uri = this.prefix + '-' + inputs.uri;
1226
+ }
1227
+ else {
1228
+ inputs.uri = this.prefix;
1229
+ }
1230
+ this.submitForm.emit(inputs);
1231
+ }
1232
+ copyTextToClipboard() {
1233
+ const text = this.prefix + '-' + this.form.value.uri.replace(' ', '');
1234
+ const successful = Clipboard.copy(text);
1235
+ if (successful) {
1236
+ this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
1237
+ }
1238
+ }
1239
+ buildForm() {
1240
+ const context = this.context || {};
1241
+ const uriSplit = context.uri.split('-');
1242
+ this.prefix = uriSplit.shift();
1243
+ const uri = uriSplit.join('-');
1244
+ this.form = this.formBuilder.group({
1245
+ title: [context.title],
1246
+ uri: [uri || ' ']
1261
1247
  });
1262
1248
  }
1263
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BookmarkButtonComponent, deps: [{ token: i1$3.MatDialog }, { token: ContextService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component });
1264
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BookmarkButtonComponent, selector: "igo-bookmark-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<div class=\"igo-bookmark-button-container\">\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"createContext()\"\n >\n <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-bookmark-button-container{width:40px}:host .igo-bookmark-button-container button{background-color:#fff}:host .igo-bookmark-button-container button:hover{background-color:#efefef}\n"], dependencies: [{ kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1249
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextFormComponent, deps: [{ token: i4.UntypedFormBuilder }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component });
1250
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextFormComponent, isStandalone: true, selector: "igo-context-form", inputs: { btnSubmitText: "btnSubmitText", context: "context", disabled: "disabled" }, outputs: { submitForm: "submitForm", clone: "clone", delete: "delete" }, ngImport: i0, template: "<form\n class=\"igo-form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field id=\"uriInput\" class=\"full-width\">\n <span *ngIf=\"prefix\" class=\"prefix\">{{ prefix }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n maxlength=\"64\"\n floatLabel=\"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n </mat-form-field>\n\n <button\n id=\"copyButton\"\n type=\"button\"\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard()\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1265
1251
  }
1266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
1252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextFormComponent, decorators: [{
1267
1253
  type: Component,
1268
- args: [{ selector: 'igo-bookmark-button', template: "<div class=\"igo-bookmark-button-container\">\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"createContext()\"\n >\n <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-bookmark-button-container{width:40px}:host .igo-bookmark-button-container button{background-color:#fff}:host .igo-bookmark-button-container button:hover{background-color:#efefef}\n"] }]
1269
- }], ctorParameters: function () { return [{ type: i1$3.MatDialog }, { type: ContextService }, { type: i3.MessageService }]; }, propDecorators: { map: [{
1254
+ args: [{ selector: 'igo-context-form', standalone: true, imports: [
1255
+ FormsModule,
1256
+ ReactiveFormsModule,
1257
+ MatFormFieldModule,
1258
+ MatInputModule,
1259
+ NgIf,
1260
+ MatButtonModule,
1261
+ MatTooltipModule,
1262
+ MatIconModule,
1263
+ TranslateModule
1264
+ ], template: "<form\n class=\"igo-form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field id=\"uriInput\" class=\"full-width\">\n <span *ngIf=\"prefix\" class=\"prefix\">{{ prefix }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n maxlength=\"64\"\n floatLabel=\"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n </mat-form-field>\n\n <button\n id=\"copyButton\"\n type=\"button\"\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard()\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"] }]
1265
+ }], ctorParameters: () => [{ type: i4.UntypedFormBuilder }, { type: i3.MessageService }], propDecorators: { btnSubmitText: [{
1270
1266
  type: Input
1271
- }], color: [{
1267
+ }], context: [{
1268
+ type: Input
1269
+ }], disabled: [{
1272
1270
  type: Input
1271
+ }], submitForm: [{
1272
+ type: Output
1273
+ }], clone: [{
1274
+ type: Output
1275
+ }], delete: [{
1276
+ type: Output
1273
1277
  }] } });
1274
1278
 
1275
- class PoiDialogComponent {
1276
- dialogRef;
1277
- title;
1278
- constructor(dialogRef) {
1279
- this.dialogRef = dialogRef;
1280
- }
1281
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiDialogComponent, deps: [{ token: i1$3.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
1282
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PoiDialogComponent, selector: "igo-poi-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.poiButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1283
- }
1284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiDialogComponent, decorators: [{
1285
- type: Component,
1286
- args: [{ selector: 'igo-poi-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.poiButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n" }]
1287
- }], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }]; } });
1288
-
1289
- class PoiService {
1290
- http;
1291
- config;
1292
- baseUrl;
1293
- constructor(http, config) {
1294
- this.http = http;
1295
- this.config = config;
1296
- this.baseUrl = this.config.getConfig('context.url');
1279
+ class ContextEditComponent {
1280
+ cd;
1281
+ get context() {
1282
+ return this._context;
1297
1283
  }
1298
- get() {
1299
- if (!this.baseUrl) {
1300
- return EMPTY;
1301
- }
1302
- const url = this.baseUrl + '/pois';
1303
- return this.http.get(url);
1284
+ set context(value) {
1285
+ this._context = value;
1286
+ this.refresh();
1304
1287
  }
1305
- delete(id) {
1306
- const url = this.baseUrl + '/pois/' + id;
1307
- return this.http.delete(url);
1288
+ _context;
1289
+ submitForm = new EventEmitter();
1290
+ constructor(cd) {
1291
+ this.cd = cd;
1308
1292
  }
1309
- create(context) {
1310
- const url = this.baseUrl + '/pois';
1311
- return this.http.post(url, context);
1293
+ refresh() {
1294
+ this.cd.detectChanges();
1312
1295
  }
1313
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiService, deps: [{ token: i1.HttpClient }, { token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
1314
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiService });
1296
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextEditComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1297
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextEditComponent, isStandalone: true, selector: "igo-context-edit", inputs: { context: "context" }, outputs: { submitForm: "submitForm" }, ngImport: i0, template: "<igo-context-form\n *ngIf=\"context\"\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context\"\n (submitForm)=\"submitForm.emit($event)\"\n>\n</igo-context-form>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ContextFormComponent, selector: "igo-context-form", inputs: ["btnSubmitText", "context", "disabled"], outputs: ["submitForm", "clone", "delete"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1315
1298
  }
1316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiService, decorators: [{
1317
- type: Injectable
1318
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i3.ConfigService }]; } });
1299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextEditComponent, decorators: [{
1300
+ type: Component,
1301
+ args: [{ selector: 'igo-context-edit', standalone: true, imports: [NgIf, ContextFormComponent, TranslateModule], template: "<igo-context-form\n *ngIf=\"context\"\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context\"\n (submitForm)=\"submitForm.emit($event)\"\n>\n</igo-context-form>\n" }]
1302
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { context: [{
1303
+ type: Input
1304
+ }], submitForm: [{
1305
+ type: Output
1306
+ }] } });
1319
1307
 
1320
- class PoiButtonComponent {
1321
- dialog;
1322
- authService;
1323
- poiService;
1308
+ class ContextEditBindingDirective {
1309
+ contextService;
1324
1310
  messageService;
1325
- languageService;
1326
- confirmDialogService;
1327
- get map() {
1328
- return this._map;
1329
- }
1330
- set map(value) {
1331
- this._map = value;
1332
- }
1333
- _map;
1334
- get color() {
1335
- return this._color;
1336
- }
1337
- set color(value) {
1338
- this._color = value;
1311
+ component;
1312
+ editedContext$$;
1313
+ submitSuccessed = new EventEmitter();
1314
+ onEdit(context) {
1315
+ const id = this.component.context.id;
1316
+ this.contextService.update(id, context).subscribe(() => {
1317
+ this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
1318
+ value: context.title || this.component.context.title
1319
+ });
1320
+ this.contextService.setEditedContext(undefined);
1321
+ this.submitSuccessed.emit(context);
1322
+ });
1339
1323
  }
1340
- _color;
1341
- pois;
1342
- authenticate$$;
1343
- constructor(dialog, authService, poiService, messageService, languageService, confirmDialogService) {
1344
- this.dialog = dialog;
1345
- this.authService = authService;
1346
- this.poiService = poiService;
1324
+ constructor(component, contextService, messageService) {
1325
+ this.contextService = contextService;
1347
1326
  this.messageService = messageService;
1348
- this.languageService = languageService;
1349
- this.confirmDialogService = confirmDialogService;
1327
+ this.component = component;
1350
1328
  }
1351
1329
  ngOnInit() {
1352
- this.authenticate$$ = this.authService.authenticate$.subscribe((auth) => {
1353
- if (auth) {
1354
- this.getPois();
1355
- }
1356
- });
1330
+ this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
1357
1331
  }
1358
1332
  ngOnDestroy() {
1359
- this.authenticate$$.unsubscribe();
1333
+ this.editedContext$$.unsubscribe();
1360
1334
  }
1361
- deletePoi(poi) {
1362
- if (poi && poi.id) {
1363
- this.confirmDialogService
1364
- .open(this.languageService.translate.instant('igo.context.poiButton.dialog.confirmDelete'))
1365
- .subscribe((confirm) => {
1366
- if (confirm) {
1367
- this.poiService.delete(poi.id).subscribe(() => {
1368
- this.messageService.info('igo.context.poiButton.dialog.deleteMsg', 'igo.context.poiButton.dialog.deleteTitle', undefined, { value: poi.title });
1369
- this.pois = this.pois.filter((p) => p.id !== poi.id);
1370
- }, (err) => {
1371
- err.error.title = 'DELETE Pois';
1372
- this.messageService.showError(err);
1373
- });
1374
- }
1375
- });
1376
- }
1335
+ handleEditedContextChange(context) {
1336
+ this.component.context = context;
1377
1337
  }
1378
- getPois() {
1379
- this.poiService
1380
- .get()
1381
- .pipe(take(1))
1382
- .subscribe((rep) => {
1383
- this.pois = rep;
1384
- }, (err) => {
1385
- err.error.title = 'GET Pois';
1386
- this.messageService.showError(err);
1387
- });
1338
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextEditBindingDirective, deps: [{ token: ContextEditComponent, self: true }, { token: ContextService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Directive });
1339
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: ContextEditBindingDirective, isStandalone: true, selector: "[igoContextEditBinding]", outputs: { submitSuccessed: "submitSuccessed" }, host: { listeners: { "submitForm": "onEdit($event)" } }, ngImport: i0 });
1340
+ }
1341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextEditBindingDirective, decorators: [{
1342
+ type: Directive,
1343
+ args: [{
1344
+ selector: '[igoContextEditBinding]',
1345
+ standalone: true
1346
+ }]
1347
+ }], ctorParameters: () => [{ type: ContextEditComponent, decorators: [{
1348
+ type: Self
1349
+ }] }, { type: ContextService }, { type: i3.MessageService }], propDecorators: { submitSuccessed: [{
1350
+ type: Output
1351
+ }], onEdit: [{
1352
+ type: HostListener,
1353
+ args: ['submitForm', ['$event']]
1354
+ }] } });
1355
+
1356
+ class ContextItemComponent {
1357
+ auth;
1358
+ storageService;
1359
+ typePermission = TypePermission;
1360
+ color = 'primary';
1361
+ collapsed = true;
1362
+ showFavorite = true;
1363
+ context;
1364
+ default;
1365
+ selected;
1366
+ edit = new EventEmitter();
1367
+ delete = new EventEmitter();
1368
+ save = new EventEmitter();
1369
+ clone = new EventEmitter();
1370
+ hide = new EventEmitter();
1371
+ show = new EventEmitter();
1372
+ favorite = new EventEmitter();
1373
+ managePermissions = new EventEmitter();
1374
+ manageTools = new EventEmitter();
1375
+ get hidden() {
1376
+ return this.context.hidden;
1388
1377
  }
1389
- createPoi() {
1390
- const view = this.map.ol.getView();
1391
- const proj = view.getProjection().getCode();
1392
- const center = new olPoint(view.getCenter()).transform(proj, 'EPSG:4326');
1393
- const poi = {
1394
- title: '',
1395
- x: center.getCoordinates()[0],
1396
- y: center.getCoordinates()[1],
1397
- zoom: view.getZoom()
1398
- };
1399
- this.dialog
1400
- .open(PoiDialogComponent, { disableClose: false })
1401
- .afterClosed()
1402
- .subscribe((title) => {
1403
- if (title) {
1404
- poi.title = title;
1405
- this.poiService.create(poi).subscribe((newPoi) => {
1406
- this.messageService.success('igo.context.poiButton.dialog.createMsg', 'igo.context.poiButton.dialog.createTitle', undefined, { value: poi.title });
1407
- poi.id = newPoi.id;
1408
- this.pois.push(poi);
1409
- }, (err) => {
1410
- err.error.title = 'POST Pois';
1411
- this.messageService.showError(err);
1412
- });
1413
- }
1414
- });
1378
+ get canShare() {
1379
+ return this.storageService.get('canShare') === true;
1415
1380
  }
1416
- zoomOnPoi(id) {
1417
- const poi = this.pois.find((p) => p.id === id);
1418
- const center = olproj.fromLonLat([Number(poi.x), Number(poi.y)], this.map.projection);
1419
- this.map.ol.getView().animate({
1420
- center,
1421
- zoom: poi.zoom,
1422
- duration: 500,
1423
- easing: oleasing.easeOut
1424
- });
1381
+ constructor(auth, storageService) {
1382
+ this.auth = auth;
1383
+ this.storageService = storageService;
1384
+ }
1385
+ favoriteClick(context) {
1386
+ this.favorite.emit(context);
1425
1387
  }
1426
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiButtonComponent, deps: [{ token: i1$3.MatDialog }, { token: i2.AuthService }, { token: PoiService }, { token: i3.MessageService }, { token: i3.LanguageService }, { token: i13.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component });
1427
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PoiButtonComponent, selector: "igo-poi-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<mat-select\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div class=\"titlePoi\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\n </button>\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let poi of pois\"\n class=\"poi-option\"\n [value]=\"poi.id\"\n (click)=\"zoomOnPoi(poi.id)\"\n >\n <div class=\"titlePoi\">{{ poi.title }}</div>\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </mat-option>\n</mat-select>\n", styles: [":host{background-color:#fff;padding:0 8px;height:100%}mat-select{width:150px;height:100%}mat-select ::ng-deep .mat-mdc-select-trigger{height:100%}::ng-deep .poi-option .mdc-list-item__primary-text{display:flex;justify-content:space-between;align-items:center;flex:1;overflow:visible}::ng-deep .poi-option button{margin-right:-16px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i13.StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i11.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1388
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextItemComponent, deps: [{ token: i2.AuthService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
1389
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: "showFavorite", context: "context", default: "default", selected: "selected" }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, ngImport: i0, template: "<mat-list-item\r\n class=\"mat-list-item\"\r\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\r\n>\r\n <button\r\n *ngIf=\"auth.authenticated\"\r\n matListItemAvatar\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"\r\n auth.authenticated\r\n ? ('igo.context.contextManager.favorite' | translate)\r\n : ''\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon\r\n *ngIf=\"!context.iconImage\"\r\n svgIcon=\"{{\r\n context.icon\r\n ? context.icon\r\n : context.scope === 'public'\r\n ? 'earth'\r\n : 'star'\r\n }}\"\r\n ></mat-icon>\r\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\" />\r\n </button>\r\n <button\r\n matListItemAvatar\r\n *ngIf=\"!auth.authenticated && showFavorite\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n <span matListItemTitle>{{ context.title }}</span>\r\n\r\n <div\r\n *ngIf=\"auth.authenticated\"\r\n matListItemMeta\r\n igoStopPropagation\r\n class=\"igo-actions-container\"\r\n >\r\n <button\r\n *ngIf=\"\r\n collapsed &&\r\n selected &&\r\n (context.permission === typePermission[typePermission.write] ||\r\n context.imported)\r\n \"\r\n class=\"save-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"save.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-save\"></mat-icon>\r\n </button>\r\n\r\n <div #actions class=\"igo-actions-expand-container\">\r\n <button\r\n *ngIf=\"canShare && !context.imported\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.managePermissions' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"managePermissions.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\r\n </button>\r\n\r\n <!--button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\r\n [color]=\"color\"\r\n (click)=\"manageTools.emit(context)\">\r\n <mat-icon svgIcon=\"widgets\"></mat-icon>\r\n </button-->\r\n\r\n <button\r\n *ngIf=\"!context.imported\"\r\n class=\"clone-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"clone.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] &&\r\n !context.imported\r\n \"\r\n class=\"edit-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"edit.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"pencil\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"hide.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"show.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye-off\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] ||\r\n context.imported\r\n \"\r\n class=\"delete-button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"delete.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button\r\n class=\"actions-button\"\r\n mat-icon-button\r\n igoCollapse\r\n [color]=\"color\"\r\n [target]=\"actions\"\r\n [collapsed]=\"collapsed\"\r\n (click)=\"collapsed = !collapsed\"\r\n >\r\n <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\r\n </button>\r\n </div>\r\n</mat-list-item>\r\n", styles: [":host{overflow:hidden}:host .igo-actions-container{flex-shrink:0}:host .igo-actions-expand-container{display:inline-flex}:host mat-icon.disabled{color:#00000061}:host button[matlistitemavatar]{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3$2.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i3$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i3$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CollapseDirective, selector: "[igoCollapse]", inputs: ["target", "collapsed"], outputs: ["toggle"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1428
1390
  }
1429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PoiButtonComponent, decorators: [{
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextItemComponent, decorators: [{
1430
1392
  type: Component,
1431
- args: [{ selector: 'igo-poi-button', template: "<mat-select\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div class=\"titlePoi\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\n </button>\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let poi of pois\"\n class=\"poi-option\"\n [value]=\"poi.id\"\n (click)=\"zoomOnPoi(poi.id)\"\n >\n <div class=\"titlePoi\">{{ poi.title }}</div>\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </mat-option>\n</mat-select>\n", styles: [":host{background-color:#fff;padding:0 8px;height:100%}mat-select{width:150px;height:100%}mat-select ::ng-deep .mat-mdc-select-trigger{height:100%}::ng-deep .poi-option .mdc-list-item__primary-text{display:flex;justify-content:space-between;align-items:center;flex:1;overflow:visible}::ng-deep .poi-option button{margin-right:-16px}\n"] }]
1432
- }], ctorParameters: function () { return [{ type: i1$3.MatDialog }, { type: i2.AuthService }, { type: PoiService }, { type: i3.MessageService }, { type: i3.LanguageService }, { type: i13.ConfirmDialogService }]; }, propDecorators: { map: [{
1393
+ args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1394
+ MatListModule,
1395
+ NgClass,
1396
+ NgIf,
1397
+ MatButtonModule,
1398
+ StopPropagationDirective,
1399
+ MatTooltipModule,
1400
+ MatIconModule,
1401
+ CollapseDirective,
1402
+ TranslateModule
1403
+ ], template: "<mat-list-item\r\n class=\"mat-list-item\"\r\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\r\n>\r\n <button\r\n *ngIf=\"auth.authenticated\"\r\n matListItemAvatar\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"\r\n auth.authenticated\r\n ? ('igo.context.contextManager.favorite' | translate)\r\n : ''\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon\r\n *ngIf=\"!context.iconImage\"\r\n svgIcon=\"{{\r\n context.icon\r\n ? context.icon\r\n : context.scope === 'public'\r\n ? 'earth'\r\n : 'star'\r\n }}\"\r\n ></mat-icon>\r\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\" />\r\n </button>\r\n <button\r\n matListItemAvatar\r\n *ngIf=\"!auth.authenticated && showFavorite\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n <span matListItemTitle>{{ context.title }}</span>\r\n\r\n <div\r\n *ngIf=\"auth.authenticated\"\r\n matListItemMeta\r\n igoStopPropagation\r\n class=\"igo-actions-container\"\r\n >\r\n <button\r\n *ngIf=\"\r\n collapsed &&\r\n selected &&\r\n (context.permission === typePermission[typePermission.write] ||\r\n context.imported)\r\n \"\r\n class=\"save-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"save.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-save\"></mat-icon>\r\n </button>\r\n\r\n <div #actions class=\"igo-actions-expand-container\">\r\n <button\r\n *ngIf=\"canShare && !context.imported\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.managePermissions' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"managePermissions.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\r\n </button>\r\n\r\n <!--button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\r\n [color]=\"color\"\r\n (click)=\"manageTools.emit(context)\">\r\n <mat-icon svgIcon=\"widgets\"></mat-icon>\r\n </button-->\r\n\r\n <button\r\n *ngIf=\"!context.imported\"\r\n class=\"clone-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"clone.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] &&\r\n !context.imported\r\n \"\r\n class=\"edit-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"edit.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"pencil\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"hide.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"show.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye-off\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] ||\r\n context.imported\r\n \"\r\n class=\"delete-button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"delete.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button\r\n class=\"actions-button\"\r\n mat-icon-button\r\n igoCollapse\r\n [color]=\"color\"\r\n [target]=\"actions\"\r\n [collapsed]=\"collapsed\"\r\n (click)=\"collapsed = !collapsed\"\r\n >\r\n <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\r\n </button>\r\n </div>\r\n</mat-list-item>\r\n", styles: [":host{overflow:hidden}:host .igo-actions-container{flex-shrink:0}:host .igo-actions-expand-container{display:inline-flex}:host mat-icon.disabled{color:#00000061}:host button[matlistitemavatar]{margin-right:8px}\n"] }]
1404
+ }], ctorParameters: () => [{ type: i2.AuthService }, { type: i3.StorageService }], propDecorators: { showFavorite: [{
1433
1405
  type: Input
1434
- }], color: [{
1406
+ }], context: [{
1407
+ type: Input
1408
+ }], default: [{
1409
+ type: Input
1410
+ }], selected: [{
1435
1411
  type: Input
1412
+ }], edit: [{
1413
+ type: Output
1414
+ }], delete: [{
1415
+ type: Output
1416
+ }], save: [{
1417
+ type: Output
1418
+ }], clone: [{
1419
+ type: Output
1420
+ }], hide: [{
1421
+ type: Output
1422
+ }], show: [{
1423
+ type: Output
1424
+ }], favorite: [{
1425
+ type: Output
1426
+ }], managePermissions: [{
1427
+ type: Output
1428
+ }], manageTools: [{
1429
+ type: Output
1436
1430
  }] } });
1437
1431
 
1438
- function userButtonSlideInOut() {
1439
- return trigger('userButtonState', [
1440
- state('collapse', style({
1441
- width: '0',
1442
- overflow: 'hidden',
1443
- display: 'none'
1444
- })),
1445
- state('expand', style({
1446
- overflow: 'hidden',
1447
- display: 'display'
1448
- })),
1449
- transition('collapse => expand', animate('200ms')),
1450
- transition('expand => collapse', animate('200ms'))
1451
- ]);
1452
- }
1453
-
1454
- class UserDialogComponent {
1432
+ class BookmarkDialogComponent {
1455
1433
  dialogRef;
1456
- auth;
1457
- storageService;
1458
- user;
1459
- exp;
1460
- constructor(dialogRef, auth, storageService) {
1434
+ title;
1435
+ constructor(dialogRef) {
1461
1436
  this.dialogRef = dialogRef;
1462
- this.auth = auth;
1463
- this.storageService = storageService;
1464
- const decodeToken = this.auth.decodeToken();
1465
- this.user = decodeToken?.user;
1466
- this.exp = new Date(decodeToken.exp * 1000).toLocaleString();
1467
- }
1468
- clearPreferences() {
1469
- this.storageService.clear();
1470
1437
  }
1471
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: i2.AuthService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
1472
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UserDialogComponent, selector: "igo-user-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.userButton.infoTitle' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <p>\n {{ 'igo.context.userButton.dialog.user' | translate }}: {{ user.sourceId }}\n </p>\n <p>\n {{ 'igo.context.userButton.dialog.email' | translate }}: {{ user.email }}\n </p>\n <p>{{ 'igo.context.userButton.dialog.expiration' | translate }}: {{ exp }}</p>\n <button mat-stroked-button color=\"primary\" (click)=\"clearPreferences()\">\n {{ 'igo.context.userButton.dialog.clearPreferences' | translate }}\n </button>\n <br />\n</div>\n<div mat-dialog-actions style=\"justify-content: center\">\n <button mat-raised-button color=\"primary\" (click)=\"dialogRef.close(false)\">\n OK\n </button>\n</div>\n", dependencies: [{ kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1438
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BookmarkDialogComponent, deps: [{ token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
1439
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: BookmarkDialogComponent, isStandalone: true, selector: "igo-bookmark-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.bookmarkButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n maxlength=\"128\"\n [placeholder]=\"\n 'igo.context.bookmarkButton.dialog.placeholder' | translate\n \"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1473
1440
  }
1474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserDialogComponent, decorators: [{
1441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
1475
1442
  type: Component,
1476
- args: [{ selector: 'igo-user-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.userButton.infoTitle' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <p>\n {{ 'igo.context.userButton.dialog.user' | translate }}: {{ user.sourceId }}\n </p>\n <p>\n {{ 'igo.context.userButton.dialog.email' | translate }}: {{ user.email }}\n </p>\n <p>{{ 'igo.context.userButton.dialog.expiration' | translate }}: {{ exp }}</p>\n <button mat-stroked-button color=\"primary\" (click)=\"clearPreferences()\">\n {{ 'igo.context.userButton.dialog.clearPreferences' | translate }}\n </button>\n <br />\n</div>\n<div mat-dialog-actions style=\"justify-content: center\">\n <button mat-raised-button color=\"primary\" (click)=\"dialogRef.close(false)\">\n OK\n </button>\n</div>\n" }]
1477
- }], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }, { type: i2.AuthService }, { type: i3.StorageService }]; } });
1443
+ args: [{ selector: 'igo-bookmark-dialog', standalone: true, imports: [
1444
+ MatDialogTitle,
1445
+ MatDialogContent,
1446
+ MatFormFieldModule,
1447
+ MatInputModule,
1448
+ FormsModule,
1449
+ MatDialogActions,
1450
+ MatButtonModule,
1451
+ TranslateModule
1452
+ ], template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.bookmarkButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n maxlength=\"128\"\n [placeholder]=\"\n 'igo.context.bookmarkButton.dialog.placeholder' | translate\n \"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n" }]
1453
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }] });
1478
1454
 
1479
- class UserButtonComponent {
1480
- dialog;
1481
- config;
1455
+ var ContextListControlsEnum;
1456
+ (function (ContextListControlsEnum) {
1457
+ ContextListControlsEnum["always"] = "always";
1458
+ ContextListControlsEnum["never"] = "never";
1459
+ ContextListControlsEnum["default"] = "default";
1460
+ })(ContextListControlsEnum || (ContextListControlsEnum = {}));
1461
+
1462
+ class ContextListComponent {
1463
+ cdRef;
1464
+ configService;
1482
1465
  auth;
1466
+ dialog;
1467
+ languageService;
1468
+ storageService;
1469
+ contextConfigs;
1470
+ contextsInitial = { ours: [] };
1471
+ contexts$ = new BehaviorSubject(this.contextsInitial);
1472
+ change$ = new ReplaySubject(1);
1473
+ change$$;
1474
+ get contexts() {
1475
+ return this._contexts;
1476
+ }
1477
+ set contexts(value) {
1478
+ this._contexts = value;
1479
+ this.next();
1480
+ }
1481
+ _contexts = { ours: [] };
1482
+ get selectedContext() {
1483
+ return this._selectedContext;
1484
+ }
1485
+ set selectedContext(value) {
1486
+ this._selectedContext = value;
1487
+ this.cdRef.detectChanges();
1488
+ }
1489
+ _selectedContext;
1483
1490
  get map() {
1484
1491
  return this._map;
1485
1492
  }
@@ -1487,413 +1494,14 @@ class UserButtonComponent {
1487
1494
  this._map = value;
1488
1495
  }
1489
1496
  _map;
1490
- get color() {
1491
- return this._color;
1492
- }
1493
- set color(value) {
1494
- this._color = value;
1495
- }
1496
- _color;
1497
- expand = false;
1498
- visible = false;
1499
- hasApi = false;
1500
- constructor(dialog, config, auth) {
1501
- this.dialog = dialog;
1502
- this.config = config;
1503
- this.auth = auth;
1504
- this.visible = this.config.getConfig('auth') ? true : false;
1505
- this.hasApi = this.config.getConfig('context.url') !== undefined;
1506
- }
1507
- accountClick() {
1508
- if (this.auth.authenticated) {
1509
- this.expand = !this.expand;
1510
- }
1511
- else {
1512
- this.auth.logout();
1513
- }
1514
- }
1515
- logout() {
1516
- this.expand = false;
1517
- this.auth.logout();
1518
- }
1519
- infoUser() {
1520
- this.dialog.open(UserDialogComponent, { disableClose: false });
1497
+ get defaultContextId() {
1498
+ return this.contextConfigs
1499
+ ? this._defaultContextId
1500
+ : this.storageService.get('favorite.context.uri') ||
1501
+ this._defaultContextId;
1521
1502
  }
1522
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserButtonComponent, deps: [{ token: i1$3.MatDialog }, { token: i3.ConfigService }, { token: i2.AuthService }], target: i0.ɵɵFactoryTarget.Component });
1523
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UserButtonComponent, selector: "igo-user-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\n <div\n class=\"igo-user-button-more-container\"\n [@userButtonState]=\"expand ? 'expand' : 'collapse'\"\n >\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"infoUser()\"\n >\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.logout' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"logout()\"\n >\n <mat-icon svgIcon=\"power\"></mat-icon>\n </button>\n </div>\n\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\"\n >\n <mat-icon svgIcon=\"account-box\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-user-button-container{display:flex;gap:4px}:host .igo-user-button-container button{background-color:#fff}:host .igo-user-button-container button:hover{background-color:#efefef}:host .igo-user-button-more-container{display:flex;gap:4px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: PoiButtonComponent, selector: "igo-poi-button", inputs: ["map", "color"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }], animations: [userButtonSlideInOut()] });
1524
- }
1525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserButtonComponent, decorators: [{
1526
- type: Component,
1527
- args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\n <div\n class=\"igo-user-button-more-container\"\n [@userButtonState]=\"expand ? 'expand' : 'collapse'\"\n >\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"infoUser()\"\n >\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.logout' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"logout()\"\n >\n <mat-icon svgIcon=\"power\"></mat-icon>\n </button>\n </div>\n\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\"\n >\n <mat-icon svgIcon=\"account-box\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-user-button-container{display:flex;gap:4px}:host .igo-user-button-container button{background-color:#fff}:host .igo-user-button-container button:hover{background-color:#efefef}:host .igo-user-button-more-container{display:flex;gap:4px}\n"] }]
1528
- }], ctorParameters: function () { return [{ type: i1$3.MatDialog }, { type: i3.ConfigService }, { type: i2.AuthService }]; }, propDecorators: { map: [{
1529
- type: Input
1530
- }], color: [{
1531
- type: Input
1532
- }] } });
1533
-
1534
- class IgoContextMapButtonModule {
1535
- static forRoot() {
1536
- return {
1537
- ngModule: IgoContextMapButtonModule
1538
- };
1539
- }
1540
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1541
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoContextMapButtonModule, declarations: [BookmarkButtonComponent,
1542
- BookmarkDialogComponent,
1543
- PoiButtonComponent,
1544
- PoiDialogComponent,
1545
- UserButtonComponent,
1546
- UserDialogComponent], imports: [CommonModule,
1547
- FormsModule,
1548
- IgoAuthModule,
1549
- IgoConfirmDialogModule,
1550
- IgoLanguageModule,
1551
- IgoStopPropagationModule,
1552
- MatButtonModule,
1553
- MatDialogModule,
1554
- MatDividerModule,
1555
- MatFormFieldModule,
1556
- MatIconModule,
1557
- MatInputModule,
1558
- MatOptionModule,
1559
- MatSelectModule,
1560
- MatTooltipModule], exports: [BookmarkButtonComponent,
1561
- PoiButtonComponent,
1562
- UserButtonComponent,
1563
- BookmarkDialogComponent] });
1564
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [CommonModule,
1565
- FormsModule,
1566
- IgoAuthModule,
1567
- IgoConfirmDialogModule,
1568
- IgoLanguageModule,
1569
- IgoStopPropagationModule,
1570
- MatButtonModule,
1571
- MatDialogModule,
1572
- MatDividerModule,
1573
- MatFormFieldModule,
1574
- MatIconModule,
1575
- MatInputModule,
1576
- MatOptionModule,
1577
- MatSelectModule,
1578
- MatTooltipModule] });
1579
- }
1580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
1581
- type: NgModule,
1582
- args: [{
1583
- imports: [
1584
- CommonModule,
1585
- FormsModule,
1586
- IgoAuthModule,
1587
- IgoConfirmDialogModule,
1588
- IgoLanguageModule,
1589
- IgoStopPropagationModule,
1590
- MatButtonModule,
1591
- MatDialogModule,
1592
- MatDividerModule,
1593
- MatFormFieldModule,
1594
- MatIconModule,
1595
- MatInputModule,
1596
- MatOptionModule,
1597
- MatSelectModule,
1598
- MatTooltipModule
1599
- ],
1600
- exports: [
1601
- BookmarkButtonComponent,
1602
- PoiButtonComponent,
1603
- UserButtonComponent,
1604
- BookmarkDialogComponent
1605
- ],
1606
- declarations: [
1607
- BookmarkButtonComponent,
1608
- BookmarkDialogComponent,
1609
- PoiButtonComponent,
1610
- PoiDialogComponent,
1611
- UserButtonComponent,
1612
- UserDialogComponent
1613
- ],
1614
- providers: [PoiService]
1615
- }]
1616
- }] });
1617
-
1618
- class ContextFormComponent {
1619
- formBuilder;
1620
- messageService;
1621
- form;
1622
- prefix;
1623
- get btnSubmitText() {
1624
- return this._btnSubmitText;
1625
- }
1626
- set btnSubmitText(value) {
1627
- this._btnSubmitText = value;
1628
- }
1629
- _btnSubmitText;
1630
- get context() {
1631
- return this._context;
1632
- }
1633
- set context(value) {
1634
- this._context = value;
1635
- this.buildForm();
1636
- }
1637
- _context;
1638
- get disabled() {
1639
- return this._disabled;
1640
- }
1641
- set disabled(value) {
1642
- this._disabled = value;
1643
- }
1644
- _disabled = false;
1645
- // TODO: replace any by ContextOptions or Context
1646
- submitForm = new EventEmitter();
1647
- clone = new EventEmitter();
1648
- delete = new EventEmitter();
1649
- constructor(formBuilder, messageService) {
1650
- this.formBuilder = formBuilder;
1651
- this.messageService = messageService;
1652
- }
1653
- ngOnInit() {
1654
- this.buildForm();
1655
- }
1656
- handleFormSubmit(value) {
1657
- let inputs = Object.assign({}, value);
1658
- inputs = ObjectUtils.removeNull(inputs);
1659
- inputs.uri = inputs.uri.replace(' ', '');
1660
- if (inputs.uri) {
1661
- inputs.uri = this.prefix + '-' + inputs.uri;
1662
- }
1663
- else {
1664
- inputs.uri = this.prefix;
1665
- }
1666
- this.submitForm.emit(inputs);
1667
- }
1668
- copyTextToClipboard() {
1669
- const text = this.prefix + '-' + this.form.value.uri.replace(' ', '');
1670
- const successful = Clipboard.copy(text);
1671
- if (successful) {
1672
- this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
1673
- }
1674
- }
1675
- buildForm() {
1676
- const context = this.context || {};
1677
- const uriSplit = context.uri.split('-');
1678
- this.prefix = uriSplit.shift();
1679
- const uri = uriSplit.join('-');
1680
- this.form = this.formBuilder.group({
1681
- title: [context.title],
1682
- uri: [uri || ' ']
1683
- });
1684
- }
1685
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextFormComponent, deps: [{ token: i1$2.UntypedFormBuilder }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component });
1686
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextFormComponent, selector: "igo-context-form", inputs: { btnSubmitText: "btnSubmitText", context: "context", disabled: "disabled" }, outputs: { submitForm: "submitForm", clone: "clone", delete: "delete" }, ngImport: i0, template: "<form\n class=\"igo-form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field id=\"uriInput\" class=\"full-width\">\n <span *ngIf=\"prefix\" class=\"prefix\">{{ prefix }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n maxlength=\"64\"\n floatLabel=\"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n </mat-form-field>\n\n <button\n id=\"copyButton\"\n type=\"button\"\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard()\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1687
- }
1688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextFormComponent, decorators: [{
1689
- type: Component,
1690
- args: [{ selector: 'igo-context-form', template: "<form\n class=\"igo-form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field id=\"uriInput\" class=\"full-width\">\n <span *ngIf=\"prefix\" class=\"prefix\">{{ prefix }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n maxlength=\"64\"\n floatLabel=\"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n </mat-form-field>\n\n <button\n id=\"copyButton\"\n type=\"button\"\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard()\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"] }]
1691
- }], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i3.MessageService }]; }, propDecorators: { btnSubmitText: [{
1692
- type: Input
1693
- }], context: [{
1694
- type: Input
1695
- }], disabled: [{
1696
- type: Input
1697
- }], submitForm: [{
1698
- type: Output
1699
- }], clone: [{
1700
- type: Output
1701
- }], delete: [{
1702
- type: Output
1703
- }] } });
1704
-
1705
- class ContextEditComponent {
1706
- cd;
1707
- get context() {
1708
- return this._context;
1709
- }
1710
- set context(value) {
1711
- this._context = value;
1712
- this.refresh();
1713
- }
1714
- _context;
1715
- submitForm = new EventEmitter();
1716
- constructor(cd) {
1717
- this.cd = cd;
1718
- }
1719
- refresh() {
1720
- this.cd.detectChanges();
1721
- }
1722
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextEditComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1723
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextEditComponent, selector: "igo-context-edit", inputs: { context: "context" }, outputs: { submitForm: "submitForm" }, ngImport: i0, template: "<igo-context-form\n *ngIf=\"context\"\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context\"\n (submitForm)=\"submitForm.emit($event)\"\n>\n</igo-context-form>\n", dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ContextFormComponent, selector: "igo-context-form", inputs: ["btnSubmitText", "context", "disabled"], outputs: ["submitForm", "clone", "delete"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
1724
- }
1725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextEditComponent, decorators: [{
1726
- type: Component,
1727
- args: [{ selector: 'igo-context-edit', template: "<igo-context-form\n *ngIf=\"context\"\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context\"\n (submitForm)=\"submitForm.emit($event)\"\n>\n</igo-context-form>\n" }]
1728
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { context: [{
1729
- type: Input
1730
- }], submitForm: [{
1731
- type: Output
1732
- }] } });
1733
-
1734
- class ContextEditBindingDirective {
1735
- contextService;
1736
- messageService;
1737
- component;
1738
- editedContext$$;
1739
- submitSuccessed = new EventEmitter();
1740
- onEdit(context) {
1741
- const id = this.component.context.id;
1742
- this.contextService.update(id, context).subscribe(() => {
1743
- this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
1744
- value: context.title || this.component.context.title
1745
- });
1746
- this.contextService.setEditedContext(undefined);
1747
- this.submitSuccessed.emit(context);
1748
- });
1749
- }
1750
- constructor(component, contextService, messageService) {
1751
- this.contextService = contextService;
1752
- this.messageService = messageService;
1753
- this.component = component;
1754
- }
1755
- ngOnInit() {
1756
- this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
1757
- }
1758
- ngOnDestroy() {
1759
- this.editedContext$$.unsubscribe();
1760
- }
1761
- handleEditedContextChange(context) {
1762
- this.component.context = context;
1763
- }
1764
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextEditBindingDirective, deps: [{ token: ContextEditComponent, self: true }, { token: ContextService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Directive });
1765
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextEditBindingDirective, selector: "[igoContextEditBinding]", outputs: { submitSuccessed: "submitSuccessed" }, host: { listeners: { "submitForm": "onEdit($event)" } }, ngImport: i0 });
1766
- }
1767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextEditBindingDirective, decorators: [{
1768
- type: Directive,
1769
- args: [{
1770
- selector: '[igoContextEditBinding]'
1771
- }]
1772
- }], ctorParameters: function () { return [{ type: ContextEditComponent, decorators: [{
1773
- type: Self
1774
- }] }, { type: ContextService }, { type: i3.MessageService }]; }, propDecorators: { submitSuccessed: [{
1775
- type: Output
1776
- }], onEdit: [{
1777
- type: HostListener,
1778
- args: ['submitForm', ['$event']]
1779
- }] } });
1780
-
1781
- class ContextItemComponent {
1782
- auth;
1783
- storageService;
1784
- typePermission = TypePermission;
1785
- color = 'primary';
1786
- collapsed = true;
1787
- showFavorite = true;
1788
- context;
1789
- default;
1790
- selected;
1791
- edit = new EventEmitter();
1792
- delete = new EventEmitter();
1793
- save = new EventEmitter();
1794
- clone = new EventEmitter();
1795
- hide = new EventEmitter();
1796
- show = new EventEmitter();
1797
- favorite = new EventEmitter();
1798
- managePermissions = new EventEmitter();
1799
- manageTools = new EventEmitter();
1800
- get hidden() {
1801
- return this.context.hidden;
1802
- }
1803
- get canShare() {
1804
- return this.storageService.get('canShare') === true;
1805
- }
1806
- constructor(auth, storageService) {
1807
- this.auth = auth;
1808
- this.storageService = storageService;
1809
- }
1810
- favoriteClick(context) {
1811
- this.favorite.emit(context);
1812
- }
1813
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextItemComponent, deps: [{ token: i2.AuthService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
1814
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextItemComponent, selector: "igo-context-item", inputs: { showFavorite: "showFavorite", context: "context", default: "default", selected: "selected" }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, ngImport: i0, template: "<mat-list-item\r\n class=\"mat-list-item\"\r\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\r\n>\r\n <button\r\n *ngIf=\"auth.authenticated\"\r\n matListItemAvatar\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"\r\n auth.authenticated\r\n ? ('igo.context.contextManager.favorite' | translate)\r\n : ''\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon\r\n *ngIf=\"!context.iconImage\"\r\n svgIcon=\"{{\r\n context.icon\r\n ? context.icon\r\n : context.scope === 'public'\r\n ? 'earth'\r\n : 'star'\r\n }}\"\r\n ></mat-icon>\r\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\" />\r\n </button>\r\n <button\r\n matListItemAvatar\r\n *ngIf=\"!auth.authenticated && showFavorite\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n <span matListItemTitle>{{ context.title }}</span>\r\n\r\n <div\r\n *ngIf=\"auth.authenticated\"\r\n matListItemMeta\r\n igoStopPropagation\r\n class=\"igo-actions-container\"\r\n >\r\n <button\r\n *ngIf=\"\r\n collapsed &&\r\n selected &&\r\n (context.permission === typePermission[typePermission.write] ||\r\n context.imported)\r\n \"\r\n class=\"save-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"save.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-save\"></mat-icon>\r\n </button>\r\n\r\n <div #actions class=\"igo-actions-expand-container\">\r\n <button\r\n *ngIf=\"canShare && !context.imported\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.managePermissions' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"managePermissions.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\r\n </button>\r\n\r\n <!--button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\r\n [color]=\"color\"\r\n (click)=\"manageTools.emit(context)\">\r\n <mat-icon svgIcon=\"widgets\"></mat-icon>\r\n </button-->\r\n\r\n <button\r\n *ngIf=\"!context.imported\"\r\n class=\"clone-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"clone.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] &&\r\n !context.imported\r\n \"\r\n class=\"edit-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"edit.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"pencil\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"hide.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"show.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye-off\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] ||\r\n context.imported\r\n \"\r\n class=\"delete-button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"delete.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button\r\n class=\"actions-button\"\r\n mat-icon-button\r\n igoCollapse\r\n [color]=\"color\"\r\n [target]=\"actions\"\r\n [collapsed]=\"collapsed\"\r\n (click)=\"collapsed = !collapsed\"\r\n >\r\n <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\r\n </button>\r\n </div>\r\n</mat-list-item>\r\n", styles: [":host{overflow:hidden}:host .igo-actions-container{flex-shrink:0}:host .igo-actions-expand-container{display:inline-flex}:host mat-icon.disabled{color:#00000061}:host button[matlistitemavatar]{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i7$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7$1.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i7$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i7$1.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i13.CollapseDirective, selector: "[igoCollapse]", inputs: ["target", "collapsed"], outputs: ["toggle"] }, { kind: "directive", type: i13.StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1815
- }
1816
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextItemComponent, decorators: [{
1817
- type: Component,
1818
- args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-list-item\r\n class=\"mat-list-item\"\r\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\r\n>\r\n <button\r\n *ngIf=\"auth.authenticated\"\r\n matListItemAvatar\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"\r\n auth.authenticated\r\n ? ('igo.context.contextManager.favorite' | translate)\r\n : ''\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon\r\n *ngIf=\"!context.iconImage\"\r\n svgIcon=\"{{\r\n context.icon\r\n ? context.icon\r\n : context.scope === 'public'\r\n ? 'earth'\r\n : 'star'\r\n }}\"\r\n ></mat-icon>\r\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\" />\r\n </button>\r\n <button\r\n matListItemAvatar\r\n *ngIf=\"!auth.authenticated && showFavorite\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\"\r\n >\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n <span matListItemTitle>{{ context.title }}</span>\r\n\r\n <div\r\n *ngIf=\"auth.authenticated\"\r\n matListItemMeta\r\n igoStopPropagation\r\n class=\"igo-actions-container\"\r\n >\r\n <button\r\n *ngIf=\"\r\n collapsed &&\r\n selected &&\r\n (context.permission === typePermission[typePermission.write] ||\r\n context.imported)\r\n \"\r\n class=\"save-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"save.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-save\"></mat-icon>\r\n </button>\r\n\r\n <div #actions class=\"igo-actions-expand-container\">\r\n <button\r\n *ngIf=\"canShare && !context.imported\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.managePermissions' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"managePermissions.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\r\n </button>\r\n\r\n <!--button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\r\n [color]=\"color\"\r\n (click)=\"manageTools.emit(context)\">\r\n <mat-icon svgIcon=\"widgets\"></mat-icon>\r\n </button-->\r\n\r\n <button\r\n *ngIf=\"!context.imported\"\r\n class=\"clone-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"clone.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] &&\r\n !context.imported\r\n \"\r\n class=\"edit-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"edit.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"pencil\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"hide.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"show.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"eye-off\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"\r\n context.permission === typePermission[typePermission.write] ||\r\n context.imported\r\n \"\r\n class=\"delete-button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"delete.emit(context)\"\r\n >\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button\r\n class=\"actions-button\"\r\n mat-icon-button\r\n igoCollapse\r\n [color]=\"color\"\r\n [target]=\"actions\"\r\n [collapsed]=\"collapsed\"\r\n (click)=\"collapsed = !collapsed\"\r\n >\r\n <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\r\n </button>\r\n </div>\r\n</mat-list-item>\r\n", styles: [":host{overflow:hidden}:host .igo-actions-container{flex-shrink:0}:host .igo-actions-expand-container{display:inline-flex}:host mat-icon.disabled{color:#00000061}:host button[matlistitemavatar]{margin-right:8px}\n"] }]
1819
- }], ctorParameters: function () { return [{ type: i2.AuthService }, { type: i3.StorageService }]; }, propDecorators: { showFavorite: [{
1820
- type: Input
1821
- }], context: [{
1822
- type: Input
1823
- }], default: [{
1824
- type: Input
1825
- }], selected: [{
1826
- type: Input
1827
- }], edit: [{
1828
- type: Output
1829
- }], delete: [{
1830
- type: Output
1831
- }], save: [{
1832
- type: Output
1833
- }], clone: [{
1834
- type: Output
1835
- }], hide: [{
1836
- type: Output
1837
- }], show: [{
1838
- type: Output
1839
- }], favorite: [{
1840
- type: Output
1841
- }], managePermissions: [{
1842
- type: Output
1843
- }], manageTools: [{
1844
- type: Output
1845
- }] } });
1846
-
1847
- var ContextListControlsEnum;
1848
- (function (ContextListControlsEnum) {
1849
- ContextListControlsEnum["always"] = "always";
1850
- ContextListControlsEnum["never"] = "never";
1851
- ContextListControlsEnum["default"] = "default";
1852
- })(ContextListControlsEnum || (ContextListControlsEnum = {}));
1853
-
1854
- class ContextListComponent {
1855
- cdRef;
1856
- configService;
1857
- auth;
1858
- dialog;
1859
- languageService;
1860
- storageService;
1861
- contextConfigs;
1862
- contextsInitial = { ours: [] };
1863
- contexts$ = new BehaviorSubject(this.contextsInitial);
1864
- change$ = new ReplaySubject(1);
1865
- change$$;
1866
- get contexts() {
1867
- return this._contexts;
1868
- }
1869
- set contexts(value) {
1870
- this._contexts = value;
1871
- this.next();
1872
- }
1873
- _contexts = { ours: [] };
1874
- get selectedContext() {
1875
- return this._selectedContext;
1876
- }
1877
- set selectedContext(value) {
1878
- this._selectedContext = value;
1879
- this.cdRef.detectChanges();
1880
- }
1881
- _selectedContext;
1882
- get map() {
1883
- return this._map;
1884
- }
1885
- set map(value) {
1886
- this._map = value;
1887
- }
1888
- _map;
1889
- get defaultContextId() {
1890
- return this.contextConfigs
1891
- ? this._defaultContextId
1892
- : this.storageService.get('favorite.context.uri') ||
1893
- this._defaultContextId;
1894
- }
1895
- set defaultContextId(value) {
1896
- this._defaultContextId = value;
1503
+ set defaultContextId(value) {
1504
+ this._defaultContextId = value;
1897
1505
  }
1898
1506
  _defaultContextId;
1899
1507
  collapsed = [];
@@ -2182,13 +1790,32 @@ class ContextListComponent {
2182
1790
  context.hidden = false;
2183
1791
  this.show.emit(context);
2184
1792
  }
2185
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i3.ConfigService }, { token: i2.AuthService }, { token: i1$3.MatDialog }, { token: i3.LanguageService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
2186
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextListComponent, selector: "igo-context-list", inputs: { contexts: "contexts", selectedContext: "selectedContext", map: "map", defaultContextId: "defaultContextId", term: "term" }, outputs: { select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\r\n <div class=\"context-filter-container\">\r\n <mat-form-field *ngIf=\"showFilter()\" floatLabel=\"always\">\r\n <mat-label>{{\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n \"\r\n [(ngModel)]=\"term\"\r\n />\r\n <button\r\n mat-icon-button\r\n matSuffix\r\n class=\"clear-button\"\r\n *ngIf=\"term.length\"\r\n aria-label=\"Clear\"\r\n color=\"warn\"\r\n (click)=\"clearFilter()\"\r\n >\r\n <mat-icon svgIcon=\"close\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <div class=\"actions-container\">\r\n <button\r\n *ngIf=\"!sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.sortAlphabetically' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(true)\"\r\n >\r\n <mat-icon\r\n color=\"primary\"\r\n svgIcon=\"sort-alphabetical-variant\"\r\n ></mat-icon>\r\n </button>\r\n <button\r\n *ngIf=\"sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(false)\"\r\n >\r\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\r\n </button>\r\n\r\n <igo-actionbar\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"add-context-button\"\r\n [iconColor]=\"color\"\r\n [store]=\"actionStore\"\r\n [withIcon]=\"true\"\r\n icon=\"plus\"\r\n [withTitle]=\"actionbarMode === 'overlay'\"\r\n [horizontal]=\"false\"\r\n [mode]=\"actionbarMode\"\r\n >\r\n </igo-actionbar>\r\n\r\n <button\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"users-filter\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [matMenuTriggerFor]=\"accountMenu\"\r\n >\r\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\r\n </button>\r\n <mat-menu #accountMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let user of users\">\r\n <button\r\n *ngIf=\"!user.childs; else withSubMenu\"\r\n mat-menu-item\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n <ng-template #withSubMenu>\r\n <button\r\n mat-menu-item\r\n [matMenuTriggerFor]=\"subAccountMenu\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n\r\n <mat-menu #subAccountMenu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let child of user.childs\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(child).checked\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(child, user)\"\r\n >\r\n {{ child.title }}\r\n </mat-checkbox>\r\n </button>\r\n </mat-menu>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button mat-menu-item class=\"profil-menu\">\r\n <mat-checkbox\r\n [checked]=\"showHidden\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"showHiddenContexts.emit()\"\r\n >\r\n </mat-checkbox>\r\n <span>\r\n {{ 'igo.context.contextManager.showHidden' | translate }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n\r\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\r\n <igo-collapsible\r\n *ngIf=\"groupContexts.value.length && auth.authenticated\"\r\n [title]=\"titleMapping[groupContexts.key] | translate\"\r\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\"\r\n (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\"\r\n >\r\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n context.id &&\r\n this.defaultContextId &&\r\n this.defaultContextId === context.id\r\n \"\r\n (edit)=\"edit.emit(context)\"\r\n (delete)=\"delete.emit(context)\"\r\n (clone)=\"clone.emit(context)\"\r\n (save)=\"save.emit(context)\"\r\n (hide)=\"hideContext(context)\"\r\n (show)=\"showContext(context)\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (manageTools)=\"manageTools.emit(context)\"\r\n (managePermissions)=\"managePermissions.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </igo-collapsible>\r\n\r\n <ng-template\r\n *ngIf=\"groupContexts.value.length && !auth.authenticated\"\r\n ngFor\r\n let-context\r\n [ngForOf]=\"groupContexts.value\"\r\n >\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [showFavorite]=\"\r\n configService.getConfig('favoriteContext4NonAuthenticated')\r\n \"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n contextConfigs\r\n ? defaultContextId === context.id\r\n : defaultContextId === context.uri\r\n \"\r\n (favorite)=\"favorite.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <div *ngIf=\"isEmpty\" class=\"no-result\">\r\n {{ 'igo.context.contextManager.noResult' | translate }}\r\n </div>\r\n</igo-list>\r\n", styles: [":host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i12$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i12$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i12$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i13.ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "component", type: i13.ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: i13.CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["toggle"] }, { kind: "component", type: i13.ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i13.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i3.ConfigService }, { token: i2.AuthService }, { token: i1$2.MatDialog }, { token: i3.LanguageService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
1794
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { contexts: "contexts", selectedContext: "selectedContext", map: "map", defaultContextId: "defaultContextId", term: "term" }, outputs: { select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\r\n <div class=\"context-filter-container\">\r\n <mat-form-field *ngIf=\"showFilter()\" floatLabel=\"always\">\r\n <mat-label>{{\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n \"\r\n [(ngModel)]=\"term\"\r\n />\r\n <button\r\n mat-icon-button\r\n matSuffix\r\n class=\"clear-button\"\r\n *ngIf=\"term.length\"\r\n aria-label=\"Clear\"\r\n color=\"warn\"\r\n (click)=\"clearFilter()\"\r\n >\r\n <mat-icon svgIcon=\"close\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <div class=\"actions-container\">\r\n <button\r\n *ngIf=\"!sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.sortAlphabetically' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(true)\"\r\n >\r\n <mat-icon\r\n color=\"primary\"\r\n svgIcon=\"sort-alphabetical-variant\"\r\n ></mat-icon>\r\n </button>\r\n <button\r\n *ngIf=\"sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(false)\"\r\n >\r\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\r\n </button>\r\n\r\n <igo-actionbar\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"add-context-button\"\r\n [iconColor]=\"color\"\r\n [store]=\"actionStore\"\r\n [withIcon]=\"true\"\r\n icon=\"plus\"\r\n [withTitle]=\"actionbarMode === 'overlay'\"\r\n [horizontal]=\"false\"\r\n [mode]=\"actionbarMode\"\r\n >\r\n </igo-actionbar>\r\n\r\n <button\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"users-filter\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [matMenuTriggerFor]=\"accountMenu\"\r\n >\r\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\r\n </button>\r\n <mat-menu #accountMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let user of users\">\r\n <button\r\n *ngIf=\"!user.childs; else withSubMenu\"\r\n mat-menu-item\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n <ng-template #withSubMenu>\r\n <button\r\n mat-menu-item\r\n [matMenuTriggerFor]=\"subAccountMenu\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n\r\n <mat-menu #subAccountMenu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let child of user.childs\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(child).checked\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(child, user)\"\r\n >\r\n {{ child.title }}\r\n </mat-checkbox>\r\n </button>\r\n </mat-menu>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button mat-menu-item class=\"profil-menu\">\r\n <mat-checkbox\r\n [checked]=\"showHidden\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"showHiddenContexts.emit()\"\r\n >\r\n </mat-checkbox>\r\n <span>\r\n {{ 'igo.context.contextManager.showHidden' | translate }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n\r\n <ng-template\r\n ngFor\r\n let-groupContexts\r\n [ngForOf]=\"$any(contexts$ | async) | keyvalue\"\r\n >\r\n <igo-collapsible\r\n *ngIf=\"$any(groupContexts).value.length && auth.authenticated\"\r\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\r\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\r\n (toggle)=\"collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\"\r\n >\r\n <ng-template ngFor let-context [ngForOf]=\"$any(groupContexts).value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n context.id &&\r\n this.defaultContextId &&\r\n this.defaultContextId === context.id\r\n \"\r\n (edit)=\"edit.emit(context)\"\r\n (delete)=\"delete.emit(context)\"\r\n (clone)=\"clone.emit(context)\"\r\n (save)=\"save.emit(context)\"\r\n (hide)=\"hideContext(context)\"\r\n (show)=\"showContext(context)\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (manageTools)=\"manageTools.emit(context)\"\r\n (managePermissions)=\"managePermissions.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </igo-collapsible>\r\n\r\n <ng-container\r\n *ngIf=\"$any(groupContexts).value.length && !auth.authenticated\"\r\n ></ng-container>\r\n <ng-template ngFor let-context [ngForOf]=\"$any(groupContexts).value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [showFavorite]=\"\r\n configService.getConfig('favoriteContext4NonAuthenticated')\r\n \"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n contextConfigs\r\n ? defaultContextId === context.id\r\n : defaultContextId === context.uri\r\n \"\r\n (favorite)=\"favorite.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <div *ngIf=\"isEmpty\" class=\"no-result\">\r\n {{ 'igo.context.contextManager.noResult' | translate }}\r\n </div>\r\n</igo-list>\r\n", styles: [":host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i10$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i11$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2187
1795
  }
2188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextListComponent, decorators: [{
1796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextListComponent, decorators: [{
2189
1797
  type: Component,
2190
- args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\r\n <div class=\"context-filter-container\">\r\n <mat-form-field *ngIf=\"showFilter()\" floatLabel=\"always\">\r\n <mat-label>{{\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n \"\r\n [(ngModel)]=\"term\"\r\n />\r\n <button\r\n mat-icon-button\r\n matSuffix\r\n class=\"clear-button\"\r\n *ngIf=\"term.length\"\r\n aria-label=\"Clear\"\r\n color=\"warn\"\r\n (click)=\"clearFilter()\"\r\n >\r\n <mat-icon svgIcon=\"close\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <div class=\"actions-container\">\r\n <button\r\n *ngIf=\"!sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.sortAlphabetically' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(true)\"\r\n >\r\n <mat-icon\r\n color=\"primary\"\r\n svgIcon=\"sort-alphabetical-variant\"\r\n ></mat-icon>\r\n </button>\r\n <button\r\n *ngIf=\"sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(false)\"\r\n >\r\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\r\n </button>\r\n\r\n <igo-actionbar\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"add-context-button\"\r\n [iconColor]=\"color\"\r\n [store]=\"actionStore\"\r\n [withIcon]=\"true\"\r\n icon=\"plus\"\r\n [withTitle]=\"actionbarMode === 'overlay'\"\r\n [horizontal]=\"false\"\r\n [mode]=\"actionbarMode\"\r\n >\r\n </igo-actionbar>\r\n\r\n <button\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"users-filter\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [matMenuTriggerFor]=\"accountMenu\"\r\n >\r\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\r\n </button>\r\n <mat-menu #accountMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let user of users\">\r\n <button\r\n *ngIf=\"!user.childs; else withSubMenu\"\r\n mat-menu-item\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n <ng-template #withSubMenu>\r\n <button\r\n mat-menu-item\r\n [matMenuTriggerFor]=\"subAccountMenu\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n\r\n <mat-menu #subAccountMenu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let child of user.childs\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(child).checked\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(child, user)\"\r\n >\r\n {{ child.title }}\r\n </mat-checkbox>\r\n </button>\r\n </mat-menu>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button mat-menu-item class=\"profil-menu\">\r\n <mat-checkbox\r\n [checked]=\"showHidden\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"showHiddenContexts.emit()\"\r\n >\r\n </mat-checkbox>\r\n <span>\r\n {{ 'igo.context.contextManager.showHidden' | translate }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n\r\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\r\n <igo-collapsible\r\n *ngIf=\"groupContexts.value.length && auth.authenticated\"\r\n [title]=\"titleMapping[groupContexts.key] | translate\"\r\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\"\r\n (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\"\r\n >\r\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n context.id &&\r\n this.defaultContextId &&\r\n this.defaultContextId === context.id\r\n \"\r\n (edit)=\"edit.emit(context)\"\r\n (delete)=\"delete.emit(context)\"\r\n (clone)=\"clone.emit(context)\"\r\n (save)=\"save.emit(context)\"\r\n (hide)=\"hideContext(context)\"\r\n (show)=\"showContext(context)\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (manageTools)=\"manageTools.emit(context)\"\r\n (managePermissions)=\"managePermissions.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </igo-collapsible>\r\n\r\n <ng-template\r\n *ngIf=\"groupContexts.value.length && !auth.authenticated\"\r\n ngFor\r\n let-context\r\n [ngForOf]=\"groupContexts.value\"\r\n >\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [showFavorite]=\"\r\n configService.getConfig('favoriteContext4NonAuthenticated')\r\n \"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n contextConfigs\r\n ? defaultContextId === context.id\r\n : defaultContextId === context.uri\r\n \"\r\n (favorite)=\"favorite.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <div *ngIf=\"isEmpty\" class=\"no-result\">\r\n {{ 'igo.context.contextManager.noResult' | translate }}\r\n </div>\r\n</igo-list>\r\n", styles: [":host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"] }]
2191
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.ConfigService }, { type: i2.AuthService }, { type: i1$3.MatDialog }, { type: i3.LanguageService }, { type: i3.StorageService }]; }, propDecorators: { contexts: [{
1798
+ args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
1799
+ ListComponent,
1800
+ NgIf,
1801
+ MatFormFieldModule,
1802
+ MatInputModule,
1803
+ FormsModule,
1804
+ MatButtonModule,
1805
+ MatIconModule,
1806
+ MatTooltipModule,
1807
+ ActionbarComponent,
1808
+ MatMenuModule,
1809
+ NgFor,
1810
+ MatCheckboxModule,
1811
+ CollapsibleComponent,
1812
+ ContextItemComponent,
1813
+ ListItemDirective,
1814
+ AsyncPipe,
1815
+ KeyValuePipe,
1816
+ TranslateModule
1817
+ ], template: "<igo-list [navigation]=\"true\">\r\n <div class=\"context-filter-container\">\r\n <mat-form-field *ngIf=\"showFilter()\" floatLabel=\"always\">\r\n <mat-label>{{\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n }}</mat-label>\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"\r\n 'igo.context.contextManager.filterPlaceHolder' | translate\r\n \"\r\n [(ngModel)]=\"term\"\r\n />\r\n <button\r\n mat-icon-button\r\n matSuffix\r\n class=\"clear-button\"\r\n *ngIf=\"term.length\"\r\n aria-label=\"Clear\"\r\n color=\"warn\"\r\n (click)=\"clearFilter()\"\r\n >\r\n <mat-icon svgIcon=\"close\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <div class=\"actions-container\">\r\n <button\r\n *ngIf=\"!sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n 'igo.context.contextManager.sortAlphabetically' | translate\r\n \"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(true)\"\r\n >\r\n <mat-icon\r\n color=\"primary\"\r\n svgIcon=\"sort-alphabetical-variant\"\r\n ></mat-icon>\r\n </button>\r\n <button\r\n *ngIf=\"sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(false)\"\r\n >\r\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\r\n </button>\r\n\r\n <igo-actionbar\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"add-context-button\"\r\n [iconColor]=\"color\"\r\n [store]=\"actionStore\"\r\n [withIcon]=\"true\"\r\n icon=\"plus\"\r\n [withTitle]=\"actionbarMode === 'overlay'\"\r\n [horizontal]=\"false\"\r\n [mode]=\"actionbarMode\"\r\n >\r\n </igo-actionbar>\r\n\r\n <button\r\n *ngIf=\"auth.authenticated && contextConfigs\"\r\n class=\"users-filter\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [matMenuTriggerFor]=\"accountMenu\"\r\n >\r\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\r\n </button>\r\n <mat-menu #accountMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let user of users\">\r\n <button\r\n *ngIf=\"!user.childs; else withSubMenu\"\r\n mat-menu-item\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n <ng-template #withSubMenu>\r\n <button\r\n mat-menu-item\r\n [matMenuTriggerFor]=\"subAccountMenu\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(user)\"\r\n >\r\n </mat-checkbox>\r\n <span>{{ user.title }}</span>\r\n </button>\r\n\r\n <mat-menu #subAccountMenu=\"matMenu\">\r\n <button\r\n mat-menu-item\r\n *ngFor=\"let child of user.childs\"\r\n class=\"profil-menu\"\r\n >\r\n <mat-checkbox\r\n [checked]=\"getPermission(child).checked\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"handleToggleCategory(child, user)\"\r\n >\r\n {{ child.title }}\r\n </mat-checkbox>\r\n </button>\r\n </mat-menu>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button mat-menu-item class=\"profil-menu\">\r\n <mat-checkbox\r\n [checked]=\"showHidden\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"showHiddenContexts.emit()\"\r\n >\r\n </mat-checkbox>\r\n <span>\r\n {{ 'igo.context.contextManager.showHidden' | translate }}\r\n </span>\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n\r\n <ng-template\r\n ngFor\r\n let-groupContexts\r\n [ngForOf]=\"$any(contexts$ | async) | keyvalue\"\r\n >\r\n <igo-collapsible\r\n *ngIf=\"$any(groupContexts).value.length && auth.authenticated\"\r\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\r\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\r\n (toggle)=\"collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\"\r\n >\r\n <ng-template ngFor let-context [ngForOf]=\"$any(groupContexts).value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n context.id &&\r\n this.defaultContextId &&\r\n this.defaultContextId === context.id\r\n \"\r\n (edit)=\"edit.emit(context)\"\r\n (delete)=\"delete.emit(context)\"\r\n (clone)=\"clone.emit(context)\"\r\n (save)=\"save.emit(context)\"\r\n (hide)=\"hideContext(context)\"\r\n (show)=\"showContext(context)\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (manageTools)=\"manageTools.emit(context)\"\r\n (managePermissions)=\"managePermissions.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </igo-collapsible>\r\n\r\n <ng-container\r\n *ngIf=\"$any(groupContexts).value.length && !auth.authenticated\"\r\n ></ng-container>\r\n <ng-template ngFor let-context [ngForOf]=\"$any(groupContexts).value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [showFavorite]=\"\r\n configService.getConfig('favoriteContext4NonAuthenticated')\r\n \"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"\r\n contextConfigs\r\n ? defaultContextId === context.id\r\n : defaultContextId === context.uri\r\n \"\r\n (favorite)=\"favorite.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\"\r\n >\r\n </igo-context-item>\r\n </ng-template>\r\n </ng-template>\r\n\r\n <div *ngIf=\"isEmpty\" class=\"no-result\">\r\n {{ 'igo.context.contextManager.noResult' | translate }}\r\n </div>\r\n</igo-list>\r\n", styles: [":host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"] }]
1818
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i3.ConfigService }, { type: i2.AuthService }, { type: i1$2.MatDialog }, { type: i3.LanguageService }, { type: i3.StorageService }], propDecorators: { contexts: [{
2192
1819
  type: Input
2193
1820
  }], selectedContext: [{
2194
1821
  type: Input
@@ -2412,618 +2039,965 @@ class ContextListBindingDirective {
2412
2039
  });
2413
2040
  }
2414
2041
  ngOnDestroy() {
2415
- this.contexts$$.unsubscribe();
2416
- this.selectedContext$$.unsubscribe();
2417
- this.defaultContextId$$.unsubscribe();
2042
+ this.contexts$$.unsubscribe();
2043
+ this.selectedContext$$.unsubscribe();
2044
+ this.defaultContextId$$.unsubscribe();
2045
+ }
2046
+ handleContextsChange(contexts) {
2047
+ this.component.contexts = contexts;
2048
+ }
2049
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextListBindingDirective, deps: [{ token: ContextListComponent, self: true }, { token: ContextService }, { token: i1$1.MapService }, { token: i3.LanguageService }, { token: i5$2.ConfirmDialogService }, { token: i3.MessageService }, { token: i2.AuthService }, { token: i3.StorageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2050
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: ContextListBindingDirective, isStandalone: true, selector: "[igoContextListBinding]", host: { listeners: { "select": "onSelect($event)", "edit": "onEdit($event)", "save": "onSave($event)", "favorite": "onFavorite($event)", "manageTools": "onManageTools($event)", "managePermissions": "onManagePermissions($event)", "delete": "onDelete($event)", "clone": "onClone($event)", "create": "onCreate($event)", "filterPermissionsChanged": "loadContexts()", "showHiddenContexts": "showHiddenContexts()", "show": "onShowContext($event)", "hide": "onHideContext($event)" } }, providers: [ConfirmDialogService], ngImport: i0 });
2051
+ }
2052
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextListBindingDirective, decorators: [{
2053
+ type: Directive,
2054
+ args: [{
2055
+ selector: '[igoContextListBinding]',
2056
+ standalone: true,
2057
+ providers: [ConfirmDialogService]
2058
+ }]
2059
+ }], ctorParameters: () => [{ type: ContextListComponent, decorators: [{
2060
+ type: Self
2061
+ }] }, { type: ContextService }, { type: i1$1.MapService }, { type: i3.LanguageService }, { type: i5$2.ConfirmDialogService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: i3.StorageService }, { type: i0.ChangeDetectorRef }], propDecorators: { onSelect: [{
2062
+ type: HostListener,
2063
+ args: ['select', ['$event']]
2064
+ }], onEdit: [{
2065
+ type: HostListener,
2066
+ args: ['edit', ['$event']]
2067
+ }], onSave: [{
2068
+ type: HostListener,
2069
+ args: ['save', ['$event']]
2070
+ }], onFavorite: [{
2071
+ type: HostListener,
2072
+ args: ['favorite', ['$event']]
2073
+ }], onManageTools: [{
2074
+ type: HostListener,
2075
+ args: ['manageTools', ['$event']]
2076
+ }], onManagePermissions: [{
2077
+ type: HostListener,
2078
+ args: ['managePermissions', ['$event']]
2079
+ }], onDelete: [{
2080
+ type: HostListener,
2081
+ args: ['delete', ['$event']]
2082
+ }], onClone: [{
2083
+ type: HostListener,
2084
+ args: ['clone', ['$event']]
2085
+ }], onCreate: [{
2086
+ type: HostListener,
2087
+ args: ['create', ['$event']]
2088
+ }], loadContexts: [{
2089
+ type: HostListener,
2090
+ args: ['filterPermissionsChanged']
2091
+ }], showHiddenContexts: [{
2092
+ type: HostListener,
2093
+ args: ['showHiddenContexts']
2094
+ }], onShowContext: [{
2095
+ type: HostListener,
2096
+ args: ['show', ['$event']]
2097
+ }], onHideContext: [{
2098
+ type: HostListener,
2099
+ args: ['hide', ['$event']]
2100
+ }] } });
2101
+
2102
+ class ContextPermissionsComponent {
2103
+ formBuilder;
2104
+ cd;
2105
+ http;
2106
+ authService;
2107
+ config;
2108
+ form;
2109
+ get context() {
2110
+ return this._context;
2111
+ }
2112
+ set context(value) {
2113
+ this._context = value;
2114
+ this.cd.detectChanges();
2115
+ }
2116
+ _context;
2117
+ get permissions() {
2118
+ return this._permissions;
2119
+ }
2120
+ set permissions(value) {
2121
+ this._permissions = value;
2122
+ this.cd.detectChanges();
2123
+ }
2124
+ _permissions;
2125
+ get profils() {
2126
+ return this._profils;
2127
+ }
2128
+ set profils(value) {
2129
+ this._profils = value;
2130
+ this.cd.detectChanges();
2131
+ }
2132
+ _profils = [];
2133
+ get canWrite() {
2134
+ return this.context.permission === TypePermission[TypePermission.write];
2135
+ }
2136
+ baseUrlProfils;
2137
+ formControl = new UntypedFormControl();
2138
+ formValueChanges$$;
2139
+ addPermission = new EventEmitter();
2140
+ removePermission = new EventEmitter();
2141
+ scopeChanged = new EventEmitter();
2142
+ constructor(formBuilder, cd, http, authService, config) {
2143
+ this.formBuilder = formBuilder;
2144
+ this.cd = cd;
2145
+ this.http = http;
2146
+ this.authService = authService;
2147
+ this.config = config;
2148
+ }
2149
+ ngOnInit() {
2150
+ this.buildForm();
2151
+ this.baseUrlProfils =
2152
+ this.config.getConfig('context.url') + '/profils-users?';
2153
+ this.formValueChanges$$ = this.formControl.valueChanges.subscribe((value) => {
2154
+ if (value.length) {
2155
+ this.http
2156
+ .get(this.baseUrlProfils + 'q=' + value)
2157
+ .subscribe((profils) => {
2158
+ this.profils = profils;
2159
+ });
2160
+ this.profils.filter((profil) => {
2161
+ const filterNormalized = value
2162
+ .toLowerCase()
2163
+ .normalize('NFD')
2164
+ .replace(/[\u0300-\u036f]/g, '');
2165
+ const profilTitleNormalized = profil.title
2166
+ .toLowerCase()
2167
+ .normalize('NFD')
2168
+ .replace(/[\u0300-\u036f]/g, '');
2169
+ const profilNameNormalized = profil.name
2170
+ .toLowerCase()
2171
+ .normalize('NFD')
2172
+ .replace(/[\u0300-\u036f]/g, '');
2173
+ const profilNormalized = profilNameNormalized + profilTitleNormalized;
2174
+ return profilNormalized.includes(filterNormalized);
2175
+ });
2176
+ }
2177
+ else {
2178
+ this.profils = [];
2179
+ }
2180
+ });
2181
+ }
2182
+ displayFn(profil) {
2183
+ return profil ? profil.title : undefined;
2184
+ }
2185
+ handleFormSubmit(value) {
2186
+ this.addPermission.emit(value);
2187
+ }
2188
+ buildForm() {
2189
+ this.form = this.formBuilder.group({
2190
+ profil: [],
2191
+ typePermission: ['read']
2192
+ });
2193
+ }
2194
+ onProfilSelected(value) {
2195
+ this.form.setValue({
2196
+ profil: value.name,
2197
+ typePermission: this.form.value.typePermission
2198
+ });
2199
+ }
2200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextPermissionsComponent, deps: [{ token: i4.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }, { token: i1.HttpClient }, { token: i2.AuthService }, { token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
2201
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: "context", permissions: "permissions" }, outputs: { addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "<div *ngIf=\"context\">\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context.scope\"\n (change)=\"scopeChanged.emit(context)\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <form\n *ngIf=\"context.scope !== 'private' && canWrite\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n >\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\n {{ profil.title }}<br />\n <small class=\"mat-typography\">{{ profil.name }}</small>\n </mat-option>\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\n <igo-collapsible\n *ngIf=\"groupPermissions.value.length\"\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\"\n >\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\n <mat-list-item>\n <mat-icon matListItemIcon svgIcon=\"account-outline\"></mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small class=\"mat-typography\">{{ permission.profil }}</small>\n </h4>\n\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n <button\n *ngIf=\"\n canWrite ||\n permission.profil === authService.decodeToken().user.sourceId\n \"\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n </mat-list-item>\n </ng-template>\n </igo-collapsible>\n </ng-template>\n </igo-list>\n</div>\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i5$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i5$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i8.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i8.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["toggle"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i3$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i3$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2202
+ }
2203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
2204
+ type: Component,
2205
+ args: [{ selector: 'igo-context-permissions', standalone: true, imports: [
2206
+ NgIf,
2207
+ MatRadioModule,
2208
+ FormsModule,
2209
+ ReactiveFormsModule,
2210
+ MatFormFieldModule,
2211
+ MatInputModule,
2212
+ MatAutocompleteModule,
2213
+ NgFor,
2214
+ MatOptionModule,
2215
+ MatButtonModule,
2216
+ ListComponent,
2217
+ CollapsibleComponent,
2218
+ MatListModule,
2219
+ MatIconModule,
2220
+ StopPropagationDirective,
2221
+ MatTooltipModule,
2222
+ KeyValuePipe,
2223
+ TranslateModule
2224
+ ], template: "<div *ngIf=\"context\">\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context.scope\"\n (change)=\"scopeChanged.emit(context)\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <form\n *ngIf=\"context.scope !== 'private' && canWrite\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n >\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\n {{ profil.title }}<br />\n <small class=\"mat-typography\">{{ profil.name }}</small>\n </mat-option>\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\n <igo-collapsible\n *ngIf=\"groupPermissions.value.length\"\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\"\n >\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\n <mat-list-item>\n <mat-icon matListItemIcon svgIcon=\"account-outline\"></mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small class=\"mat-typography\">{{ permission.profil }}</small>\n </h4>\n\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n <button\n *ngIf=\"\n canWrite ||\n permission.profil === authService.decodeToken().user.sourceId\n \"\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n </mat-list-item>\n </ng-template>\n </igo-collapsible>\n </ng-template>\n </igo-list>\n</div>\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
2225
+ }], ctorParameters: () => [{ type: i4.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }, { type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.ConfigService }], propDecorators: { context: [{
2226
+ type: Input
2227
+ }], permissions: [{
2228
+ type: Input
2229
+ }], addPermission: [{
2230
+ type: Output
2231
+ }], removePermission: [{
2232
+ type: Output
2233
+ }], scopeChanged: [{
2234
+ type: Output
2235
+ }] } });
2236
+
2237
+ class ContextPermissionsBindingDirective {
2238
+ contextService;
2239
+ languageService;
2240
+ messageService;
2241
+ cd;
2242
+ component;
2243
+ editedContext$$;
2244
+ onAddPermission(permission) {
2245
+ if (!permission.profil) {
2246
+ this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
2247
+ return;
2248
+ }
2249
+ const contextId = this.component.context.id;
2250
+ this.contextService
2251
+ .addPermissionAssociation(contextId, permission.profil, permission.typePermission)
2252
+ .subscribe((profils) => {
2253
+ for (const p of profils) {
2254
+ this.component.permissions[permission.typePermission].push(p);
2255
+ }
2256
+ const profil = permission.profil;
2257
+ this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
2258
+ this.cd.detectChanges();
2259
+ });
2260
+ }
2261
+ onRemovePermission(permission) {
2262
+ const contextId = this.component.context.id;
2263
+ this.contextService
2264
+ .deletePermissionAssociation(contextId, permission.id)
2265
+ .subscribe(() => {
2266
+ const index = this.component.permissions[permission.typePermission].findIndex((p) => {
2267
+ return p.id === permission.id;
2268
+ });
2269
+ this.component.permissions[permission.typePermission].splice(index, 1);
2270
+ const profil = permission.profil;
2271
+ this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
2272
+ this.cd.detectChanges();
2273
+ });
2274
+ }
2275
+ onScopeChanged(context) {
2276
+ const scope = context.scope;
2277
+ this.contextService.update(context.id, { scope }).subscribe(() => {
2278
+ this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
2279
+ });
2280
+ }
2281
+ constructor(component, contextService, languageService, messageService, cd) {
2282
+ this.contextService = contextService;
2283
+ this.languageService = languageService;
2284
+ this.messageService = messageService;
2285
+ this.cd = cd;
2286
+ this.component = component;
2287
+ }
2288
+ ngOnInit() {
2289
+ this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
2290
+ }
2291
+ ngOnDestroy() {
2292
+ this.editedContext$$.unsubscribe();
2293
+ this.contextService.editedContext$.next(undefined);
2418
2294
  }
2419
- handleContextsChange(contexts) {
2420
- this.component.contexts = contexts;
2295
+ handleEditedContextChange(context) {
2296
+ this.component.context = context;
2297
+ if (context) {
2298
+ this.contextService
2299
+ .getPermissions(context.id)
2300
+ .subscribe((permissionsArray) => {
2301
+ permissionsArray = permissionsArray || [];
2302
+ const permissions = {
2303
+ read: permissionsArray.filter((p) => {
2304
+ return p.typePermission.toString() === 'read';
2305
+ }),
2306
+ write: permissionsArray.filter((p) => {
2307
+ return p.typePermission.toString() === 'write';
2308
+ })
2309
+ };
2310
+ return (this.component.permissions = permissions);
2311
+ });
2312
+ }
2421
2313
  }
2422
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextListBindingDirective, deps: [{ token: ContextListComponent, self: true }, { token: ContextService }, { token: i1$1.MapService }, { token: i3.LanguageService }, { token: i13.ConfirmDialogService }, { token: i3.MessageService }, { token: i2.AuthService }, { token: i3.StorageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2423
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextListBindingDirective, selector: "[igoContextListBinding]", host: { listeners: { "select": "onSelect($event)", "edit": "onEdit($event)", "save": "onSave($event)", "favorite": "onFavorite($event)", "manageTools": "onManageTools($event)", "managePermissions": "onManagePermissions($event)", "delete": "onDelete($event)", "clone": "onClone($event)", "create": "onCreate($event)", "filterPermissionsChanged": "loadContexts()", "showHiddenContexts": "showHiddenContexts()", "show": "onShowContext($event)", "hide": "onHideContext($event)" } }, ngImport: i0 });
2314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [{ token: ContextPermissionsComponent, self: true }, { token: ContextService }, { token: i3.LanguageService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2315
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: ContextPermissionsBindingDirective, isStandalone: true, selector: "[igoContextPermissionsBinding]", host: { listeners: { "addPermission": "onAddPermission($event)", "removePermission": "onRemovePermission($event)", "scopeChanged": "onScopeChanged($event)" } }, ngImport: i0 });
2424
2316
  }
2425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextListBindingDirective, decorators: [{
2317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
2426
2318
  type: Directive,
2427
2319
  args: [{
2428
- selector: '[igoContextListBinding]'
2320
+ selector: '[igoContextPermissionsBinding]',
2321
+ standalone: true
2429
2322
  }]
2430
- }], ctorParameters: function () { return [{ type: ContextListComponent, decorators: [{
2323
+ }], ctorParameters: () => [{ type: ContextPermissionsComponent, decorators: [{
2431
2324
  type: Self
2432
- }] }, { type: ContextService }, { type: i1$1.MapService }, { type: i3.LanguageService }, { type: i13.ConfirmDialogService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: i3.StorageService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onSelect: [{
2433
- type: HostListener,
2434
- args: ['select', ['$event']]
2435
- }], onEdit: [{
2436
- type: HostListener,
2437
- args: ['edit', ['$event']]
2438
- }], onSave: [{
2439
- type: HostListener,
2440
- args: ['save', ['$event']]
2441
- }], onFavorite: [{
2442
- type: HostListener,
2443
- args: ['favorite', ['$event']]
2444
- }], onManageTools: [{
2445
- type: HostListener,
2446
- args: ['manageTools', ['$event']]
2447
- }], onManagePermissions: [{
2448
- type: HostListener,
2449
- args: ['managePermissions', ['$event']]
2450
- }], onDelete: [{
2451
- type: HostListener,
2452
- args: ['delete', ['$event']]
2453
- }], onClone: [{
2454
- type: HostListener,
2455
- args: ['clone', ['$event']]
2456
- }], onCreate: [{
2457
- type: HostListener,
2458
- args: ['create', ['$event']]
2459
- }], loadContexts: [{
2460
- type: HostListener,
2461
- args: ['filterPermissionsChanged']
2462
- }], showHiddenContexts: [{
2325
+ }] }, { type: ContextService }, { type: i3.LanguageService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }], propDecorators: { onAddPermission: [{
2463
2326
  type: HostListener,
2464
- args: ['showHiddenContexts']
2465
- }], onShowContext: [{
2327
+ args: ['addPermission', ['$event']]
2328
+ }], onRemovePermission: [{
2466
2329
  type: HostListener,
2467
- args: ['show', ['$event']]
2468
- }], onHideContext: [{
2330
+ args: ['removePermission', ['$event']]
2331
+ }], onScopeChanged: [{
2469
2332
  type: HostListener,
2470
- args: ['hide', ['$event']]
2333
+ args: ['scopeChanged', ['$event']]
2471
2334
  }] } });
2472
2335
 
2473
- class ContextPermissionsComponent {
2474
- formBuilder;
2475
- cd;
2476
- http;
2477
- authService;
2478
- config;
2479
- form;
2480
- get context() {
2481
- return this._context;
2482
- }
2483
- set context(value) {
2484
- this._context = value;
2485
- this.cd.detectChanges();
2486
- }
2487
- _context;
2488
- get permissions() {
2489
- return this._permissions;
2336
+ class LayerContextDirective {
2337
+ component;
2338
+ contextService;
2339
+ layerService;
2340
+ configService;
2341
+ styleListService;
2342
+ styleService;
2343
+ route;
2344
+ context$$;
2345
+ queryParams;
2346
+ contextLayers = [];
2347
+ removeLayersOnContextChange = true;
2348
+ get map() {
2349
+ return this.component.map;
2490
2350
  }
2491
- set permissions(value) {
2492
- this._permissions = value;
2493
- this.cd.detectChanges();
2351
+ constructor(component, contextService, layerService, configService, styleListService, styleService, route) {
2352
+ this.component = component;
2353
+ this.contextService = contextService;
2354
+ this.layerService = layerService;
2355
+ this.configService = configService;
2356
+ this.styleListService = styleListService;
2357
+ this.styleService = styleService;
2358
+ this.route = route;
2494
2359
  }
2495
- _permissions;
2496
- get profils() {
2497
- return this._profils;
2360
+ ngOnInit() {
2361
+ this.context$$ = this.contextService.context$
2362
+ .pipe(filter((context) => context !== undefined))
2363
+ .subscribe((context) => this.handleContextChange(context));
2364
+ if (this.route &&
2365
+ this.route.options.visibleOnLayersKey &&
2366
+ this.route.options.visibleOffLayersKey &&
2367
+ this.route.options.contextKey) {
2368
+ this.route.queryParams
2369
+ .pipe(first((params) => !ObjectUtils.isEmpty(params)))
2370
+ .subscribe((params) => {
2371
+ this.queryParams = params;
2372
+ });
2373
+ }
2498
2374
  }
2499
- set profils(value) {
2500
- this._profils = value;
2501
- this.cd.detectChanges();
2375
+ ngOnDestroy() {
2376
+ this.context$$.unsubscribe();
2502
2377
  }
2503
- _profils = [];
2504
- get canWrite() {
2505
- return this.context.permission === TypePermission[TypePermission.write];
2378
+ handleContextChange(context) {
2379
+ if (context.layers === undefined) {
2380
+ return;
2381
+ }
2382
+ if (this.removeLayersOnContextChange === true) {
2383
+ this.map.removeAllLayers();
2384
+ }
2385
+ else {
2386
+ this.map.removeLayers(this.contextLayers);
2387
+ }
2388
+ this.contextLayers = [];
2389
+ const layersAndIndex$ = merge(...context.layers.map((layerOptions, index) => {
2390
+ return this.layerService.createAsyncLayer(layerOptions, context.uri);
2391
+ }));
2392
+ layersAndIndex$
2393
+ .pipe(buffer(layersAndIndex$.pipe(debounceTime(500))))
2394
+ .subscribe((layers) => {
2395
+ this.handleAddLayers(layers);
2396
+ if (context.extraFeatures) {
2397
+ context.extraFeatures.forEach((featureCollection) => {
2398
+ const importExportOptions = this.configService.getConfig('importExport');
2399
+ if (!importExportOptions?.importWithStyle) {
2400
+ addImportedFeaturesToMap(featureCollection, this.map);
2401
+ }
2402
+ else {
2403
+ addImportedFeaturesStyledToMap(featureCollection, this.map, this.styleListService, this.styleService);
2404
+ }
2405
+ });
2406
+ }
2407
+ });
2408
+ this.layerService
2409
+ .createAsyncIdbLayers(context.uri)
2410
+ .pipe(debounceTime(500))
2411
+ .subscribe((layers) => this.handleAddLayers(layers));
2506
2412
  }
2507
- baseUrlProfils;
2508
- formControl = new UntypedFormControl();
2509
- formValueChanges$$;
2510
- addPermission = new EventEmitter();
2511
- removePermission = new EventEmitter();
2512
- scopeChanged = new EventEmitter();
2513
- constructor(formBuilder, cd, http, authService, config) {
2514
- this.formBuilder = formBuilder;
2515
- this.cd = cd;
2516
- this.http = http;
2517
- this.authService = authService;
2518
- this.config = config;
2413
+ handleAddLayers(layers) {
2414
+ layers = layers
2415
+ .filter((layer) => layer !== undefined)
2416
+ .map((layer) => {
2417
+ layer.visible = this.computeLayerVisibilityFromUrl(layer);
2418
+ layer.zIndex = layer.zIndex;
2419
+ return layer;
2420
+ });
2421
+ this.contextLayers.concat(layers);
2422
+ this.map.addLayers(layers);
2519
2423
  }
2520
- ngOnInit() {
2521
- this.buildForm();
2522
- this.baseUrlProfils =
2523
- this.config.getConfig('context.url') + '/profils-users?';
2524
- this.formValueChanges$$ = this.formControl.valueChanges.subscribe((value) => {
2525
- if (value.length) {
2526
- this.http
2527
- .get(this.baseUrlProfils + 'q=' + value)
2528
- .subscribe((profils) => {
2529
- this.profils = profils;
2530
- });
2531
- this.profils.filter((profil) => {
2532
- const filterNormalized = value
2533
- .toLowerCase()
2534
- .normalize('NFD')
2535
- .replace(/[\u0300-\u036f]/g, '');
2536
- const profilTitleNormalized = profil.title
2537
- .toLowerCase()
2538
- .normalize('NFD')
2539
- .replace(/[\u0300-\u036f]/g, '');
2540
- const profilNameNormalized = profil.name
2541
- .toLowerCase()
2542
- .normalize('NFD')
2543
- .replace(/[\u0300-\u036f]/g, '');
2544
- const profilNormalized = profilNameNormalized + profilTitleNormalized;
2545
- return profilNormalized.includes(filterNormalized);
2546
- });
2424
+ computeLayerVisibilityFromUrl(layer) {
2425
+ const params = this.queryParams;
2426
+ const currentContext = this.contextService.context$.value.uri;
2427
+ const currentLayerid = layer.id;
2428
+ let visible = layer.visible;
2429
+ if (!params || !currentLayerid) {
2430
+ return visible;
2431
+ }
2432
+ const contextParams = params[this.route.options.contextKey];
2433
+ if (contextParams === currentContext || !contextParams) {
2434
+ let visibleOnLayersParams = '';
2435
+ let visibleOffLayersParams = '';
2436
+ let visiblelayers = [];
2437
+ let invisiblelayers = [];
2438
+ if (this.route.options.visibleOnLayersKey &&
2439
+ params[this.route.options.visibleOnLayersKey]) {
2440
+ visibleOnLayersParams =
2441
+ params[this.route.options.visibleOnLayersKey];
2442
+ }
2443
+ if (this.route.options.visibleOffLayersKey &&
2444
+ params[this.route.options.visibleOffLayersKey]) {
2445
+ visibleOffLayersParams =
2446
+ params[this.route.options.visibleOffLayersKey];
2447
+ }
2448
+ /* This order is important because to control whichever
2449
+ the order of * param. First whe open and close everything.*/
2450
+ if (visibleOnLayersParams === '*') {
2451
+ visible = true;
2452
+ }
2453
+ if (visibleOffLayersParams === '*') {
2454
+ visible = false;
2455
+ }
2456
+ // After, managing named layer by id (context.json OR id from datasource)
2457
+ visiblelayers = visibleOnLayersParams.split(',');
2458
+ invisiblelayers = visibleOffLayersParams.split(',');
2459
+ if (visiblelayers.indexOf(currentLayerid) > -1 ||
2460
+ visiblelayers.indexOf(currentLayerid.toString()) > -1) {
2461
+ visible = true;
2547
2462
  }
2548
- else {
2549
- this.profils = [];
2463
+ if (invisiblelayers.indexOf(currentLayerid) > -1 ||
2464
+ invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
2465
+ visible = false;
2550
2466
  }
2551
- });
2552
- }
2553
- displayFn(profil) {
2554
- return profil ? profil.title : undefined;
2555
- }
2556
- handleFormSubmit(value) {
2557
- this.addPermission.emit(value);
2558
- }
2559
- buildForm() {
2560
- this.form = this.formBuilder.group({
2561
- profil: [],
2562
- typePermission: ['read']
2563
- });
2564
- }
2565
- onProfilSelected(value) {
2566
- this.form.setValue({
2567
- profil: value.name,
2568
- typePermission: this.form.value.typePermission
2569
- });
2467
+ }
2468
+ return visible;
2570
2469
  }
2571
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextPermissionsComponent, deps: [{ token: i1$2.UntypedFormBuilder }, { token: i0.ChangeDetectorRef }, { token: i1.HttpClient }, { token: i2.AuthService }, { token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
2572
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContextPermissionsComponent, selector: "igo-context-permissions", inputs: { context: "context", permissions: "permissions" }, outputs: { addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "<div *ngIf=\"context\">\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context.scope\"\n (change)=\"scopeChanged.emit(context)\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <form\n *ngIf=\"context.scope !== 'private' && canWrite\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n >\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\n {{ profil.title }}<br />\n <small class=\"mat-typography\">{{ profil.name }}</small>\n </mat-option>\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\n <igo-collapsible\n *ngIf=\"groupPermissions.value.length\"\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\"\n >\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\n <mat-list-item>\n <mat-icon matListItemIcon svgIcon=\"account-outline\"></mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small class=\"mat-typography\">{{ permission.profil }}</small>\n </h4>\n\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n <button\n *ngIf=\"\n canWrite ||\n permission.profil === authService.decodeToken().user.sourceId\n \"\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n </mat-list-item>\n </ng-template>\n </igo-collapsible>\n </ng-template>\n </igo-list>\n</div>\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i7$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7$1.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i7$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i7$1.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i12$2.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i12$2.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i14.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i14.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i13.ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: i13.CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["toggle"] }, { kind: "directive", type: i13.StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: i13.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
2470
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LayerContextDirective, deps: [{ token: i1$1.MapBrowserComponent }, { token: ContextService }, { token: i1$1.LayerService }, { token: i3.ConfigService }, { token: i1$1.StyleListService }, { token: i1$1.StyleService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2471
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: "removeLayersOnContextChange" }, providers: [HttpClientModule], ngImport: i0 });
2573
2472
  }
2574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
2575
- type: Component,
2576
- args: [{ selector: 'igo-context-permissions', template: "<div *ngIf=\"context\">\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context.scope\"\n (change)=\"scopeChanged.emit(context)\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <form\n *ngIf=\"context.scope !== 'private' && canWrite\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n >\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\n {{ profil.title }}<br />\n <small class=\"mat-typography\">{{ profil.name }}</small>\n </mat-option>\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\n <igo-collapsible\n *ngIf=\"groupPermissions.value.length\"\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\"\n >\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\n <mat-list-item>\n <mat-icon matListItemIcon svgIcon=\"account-outline\"></mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small class=\"mat-typography\">{{ permission.profil }}</small>\n </h4>\n\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n <button\n *ngIf=\"\n canWrite ||\n permission.profil === authService.decodeToken().user.sourceId\n \"\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n </mat-list-item>\n </ng-template>\n </igo-collapsible>\n </ng-template>\n </igo-list>\n</div>\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
2577
- }], ctorParameters: function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }, { type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.ConfigService }]; }, propDecorators: { context: [{
2578
- type: Input
2579
- }], permissions: [{
2473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: LayerContextDirective, decorators: [{
2474
+ type: Directive,
2475
+ args: [{
2476
+ selector: '[igoLayerContext]',
2477
+ standalone: true,
2478
+ providers: [HttpClientModule]
2479
+ }]
2480
+ }], ctorParameters: () => [{ type: i1$1.MapBrowserComponent }, { type: ContextService }, { type: i1$1.LayerService }, { type: i3.ConfigService }, { type: i1$1.StyleListService }, { type: i1$1.StyleService }, { type: i3.RouteService, decorators: [{
2481
+ type: Optional
2482
+ }] }], propDecorators: { removeLayersOnContextChange: [{
2580
2483
  type: Input
2581
- }], addPermission: [{
2582
- type: Output
2583
- }], removePermission: [{
2584
- type: Output
2585
- }], scopeChanged: [{
2586
- type: Output
2587
2484
  }] } });
2588
2485
 
2589
- class ContextPermissionsBindingDirective {
2486
+ class MapContextDirective {
2590
2487
  contextService;
2591
- languageService;
2592
- messageService;
2593
- cd;
2488
+ mediaService;
2594
2489
  component;
2595
- editedContext$$;
2596
- onAddPermission(permission) {
2597
- if (!permission.profil) {
2598
- this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
2490
+ context$$;
2491
+ get map() {
2492
+ return this.component.map;
2493
+ }
2494
+ constructor(component, contextService, mediaService) {
2495
+ this.contextService = contextService;
2496
+ this.mediaService = mediaService;
2497
+ this.component = component;
2498
+ }
2499
+ ngOnInit() {
2500
+ this.context$$ = this.contextService.context$
2501
+ .pipe(filter((context) => context !== undefined))
2502
+ .subscribe((context) => this.handleContextChange(context));
2503
+ }
2504
+ ngOnDestroy() {
2505
+ this.context$$.unsubscribe();
2506
+ }
2507
+ handleContextChange(context) {
2508
+ if (context.map === undefined) {
2599
2509
  return;
2600
2510
  }
2601
- const contextId = this.component.context.id;
2602
- this.contextService
2603
- .addPermissionAssociation(contextId, permission.profil, permission.typePermission)
2604
- .subscribe((profils) => {
2605
- for (const p of profils) {
2606
- this.component.permissions[permission.typePermission].push(p);
2511
+ // This creates a new ol.Map when the context changes. Doing that
2512
+ // allows the print tool to work properly even when the map's canvas
2513
+ // has been tainted (CORS) with the layers of another context. This could
2514
+ // have some side effects such as unbinding all listeners on the first map.
2515
+ // A better solution would be to create a new map (preview) before
2516
+ // printing and avoid the tainted canvas issue. This will come later so
2517
+ // this snippet of code is kept here in case it takes too long becomes
2518
+ // an issue
2519
+ // const target = this.component.map.ol.getTarget();
2520
+ // this.component.map.ol.setTarget(undefined);
2521
+ // this.component.map.init();
2522
+ // this.component.map.ol.setTarget(target);
2523
+ const viewContext = context.map.view;
2524
+ if (!this.component.view ||
2525
+ viewContext.keepCurrentView !== true ||
2526
+ context.map.view.projection !== this.map.projection) {
2527
+ this.component.view = viewContext;
2528
+ }
2529
+ if (this.component.map.geolocationController) {
2530
+ this.component.map.geolocationController.updateGeolocationOptions(viewContext);
2531
+ }
2532
+ const controlsContext = context.map.controls;
2533
+ if (!this.component.controls && controlsContext) {
2534
+ if (this.mediaService.isMobile()) {
2535
+ if (typeof controlsContext.scaleLine !== 'boolean') {
2536
+ const scaleLineOption = controlsContext.scaleLine;
2537
+ if (!scaleLineOption.minWidth) {
2538
+ scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
2539
+ controlsContext.scaleLine = scaleLineOption;
2540
+ }
2541
+ }
2607
2542
  }
2608
- const profil = permission.profil;
2609
- this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
2610
- this.cd.detectChanges();
2611
- });
2543
+ this.component.controls = controlsContext;
2544
+ }
2612
2545
  }
2613
- onRemovePermission(permission) {
2614
- const contextId = this.component.context.id;
2615
- this.contextService
2616
- .deletePermissionAssociation(contextId, permission.id)
2617
- .subscribe(() => {
2618
- const index = this.component.permissions[permission.typePermission].findIndex((p) => {
2619
- return p.id === permission.id;
2620
- });
2621
- this.component.permissions[permission.typePermission].splice(index, 1);
2622
- const profil = permission.profil;
2623
- this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
2624
- this.cd.detectChanges();
2625
- });
2546
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: MapContextDirective, deps: [{ token: i1$1.MapBrowserComponent }, { token: ContextService }, { token: i3.MediaService }], target: i0.ɵɵFactoryTarget.Directive });
2547
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: MapContextDirective, isStandalone: true, selector: "[igoMapContext]", ngImport: i0 });
2548
+ }
2549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: MapContextDirective, decorators: [{
2550
+ type: Directive,
2551
+ args: [{
2552
+ selector: '[igoMapContext]',
2553
+ standalone: true
2554
+ }]
2555
+ }], ctorParameters: () => [{ type: i1$1.MapBrowserComponent }, { type: ContextService }, { type: i3.MediaService }] });
2556
+
2557
+ /**
2558
+ * @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set
2559
+ */
2560
+ class IgoContextManagerModule {
2561
+ static forRoot() {
2562
+ return {
2563
+ ngModule: IgoContextManagerModule
2564
+ };
2626
2565
  }
2627
- onScopeChanged(context) {
2628
- const scope = context.scope;
2629
- this.contextService.update(context.id, { scope }).subscribe(() => {
2630
- this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
2631
- });
2566
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2567
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
2568
+ ContextListBindingDirective,
2569
+ ContextItemComponent,
2570
+ ContextFormComponent,
2571
+ ContextEditComponent,
2572
+ ContextEditBindingDirective,
2573
+ ContextPermissionsComponent,
2574
+ ContextPermissionsBindingDirective,
2575
+ LayerContextDirective,
2576
+ MapContextDirective], exports: [ContextListComponent,
2577
+ ContextListBindingDirective,
2578
+ ContextItemComponent,
2579
+ ContextFormComponent,
2580
+ ContextEditComponent,
2581
+ ContextEditBindingDirective,
2582
+ ContextPermissionsComponent,
2583
+ ContextPermissionsBindingDirective,
2584
+ LayerContextDirective,
2585
+ MapContextDirective] });
2586
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
2587
+ ContextItemComponent,
2588
+ ContextFormComponent,
2589
+ ContextEditComponent,
2590
+ ContextPermissionsComponent] });
2591
+ }
2592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextManagerModule, decorators: [{
2593
+ type: NgModule,
2594
+ args: [{
2595
+ imports: [
2596
+ ContextListComponent,
2597
+ ContextListBindingDirective,
2598
+ ContextItemComponent,
2599
+ ContextFormComponent,
2600
+ ContextEditComponent,
2601
+ ContextEditBindingDirective,
2602
+ ContextPermissionsComponent,
2603
+ ContextPermissionsBindingDirective,
2604
+ LayerContextDirective,
2605
+ MapContextDirective
2606
+ ],
2607
+ exports: [
2608
+ ContextListComponent,
2609
+ ContextListBindingDirective,
2610
+ ContextItemComponent,
2611
+ ContextFormComponent,
2612
+ ContextEditComponent,
2613
+ ContextEditBindingDirective,
2614
+ ContextPermissionsComponent,
2615
+ ContextPermissionsBindingDirective,
2616
+ LayerContextDirective,
2617
+ MapContextDirective
2618
+ ]
2619
+ }]
2620
+ }] });
2621
+
2622
+ class BookmarkButtonComponent {
2623
+ dialog;
2624
+ contextService;
2625
+ messageService;
2626
+ get map() {
2627
+ return this._map;
2632
2628
  }
2633
- constructor(component, contextService, languageService, messageService, cd) {
2629
+ set map(value) {
2630
+ this._map = value;
2631
+ }
2632
+ _map;
2633
+ get color() {
2634
+ return this._color;
2635
+ }
2636
+ set color(value) {
2637
+ this._color = value;
2638
+ }
2639
+ _color;
2640
+ constructor(dialog, contextService, messageService) {
2641
+ this.dialog = dialog;
2634
2642
  this.contextService = contextService;
2635
- this.languageService = languageService;
2636
2643
  this.messageService = messageService;
2637
- this.cd = cd;
2638
- this.component = component;
2639
2644
  }
2640
- ngOnInit() {
2641
- this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
2645
+ createContext() {
2646
+ this.dialog
2647
+ .open(BookmarkDialogComponent, { disableClose: false })
2648
+ .afterClosed()
2649
+ .pipe(take(1))
2650
+ .subscribe((title) => {
2651
+ if (title) {
2652
+ const context = this.contextService.getContextFromMap(this.map);
2653
+ context.title = title;
2654
+ this.contextService.create(context).subscribe(() => {
2655
+ this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
2656
+ this.contextService.loadContext(context.uri);
2657
+ });
2658
+ }
2659
+ });
2642
2660
  }
2643
- ngOnDestroy() {
2644
- this.editedContext$$.unsubscribe();
2645
- this.contextService.editedContext$.next(undefined);
2661
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BookmarkButtonComponent, deps: [{ token: i1$2.MatDialog }, { token: ContextService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component });
2662
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: BookmarkButtonComponent, isStandalone: true, selector: "igo-bookmark-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<div class=\"igo-bookmark-button-container\">\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"createContext()\"\n >\n <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-bookmark-button-container{width:40px}:host .igo-bookmark-button-container button{background-color:#fff}:host .igo-bookmark-button-container button:hover{background-color:#efefef}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2663
+ }
2664
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
2665
+ type: Component,
2666
+ args: [{ selector: 'igo-bookmark-button', standalone: true, imports: [MatButtonModule, MatTooltipModule, MatIconModule, TranslateModule], template: "<div class=\"igo-bookmark-button-container\">\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"createContext()\"\n >\n <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-bookmark-button-container{width:40px}:host .igo-bookmark-button-container button{background-color:#fff}:host .igo-bookmark-button-container button:hover{background-color:#efefef}\n"] }]
2667
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: ContextService }, { type: i3.MessageService }], propDecorators: { map: [{
2668
+ type: Input
2669
+ }], color: [{
2670
+ type: Input
2671
+ }] } });
2672
+
2673
+ class PoiDialogComponent {
2674
+ dialogRef;
2675
+ title;
2676
+ constructor(dialogRef) {
2677
+ this.dialogRef = dialogRef;
2678
+ }
2679
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiDialogComponent, deps: [{ token: i1$2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
2680
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: PoiDialogComponent, isStandalone: true, selector: "igo-poi-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.poiButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2681
+ }
2682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiDialogComponent, decorators: [{
2683
+ type: Component,
2684
+ args: [{ selector: 'igo-poi-dialog', standalone: true, imports: [
2685
+ MatDialogTitle,
2686
+ MatDialogContent,
2687
+ MatFormFieldModule,
2688
+ MatInputModule,
2689
+ FormsModule,
2690
+ MatDialogActions,
2691
+ MatButtonModule,
2692
+ TranslateModule
2693
+ ], template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.poiButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n required\n autocomplete=\"off\"\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\n [(ngModel)]=\"title\"\n />\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button\n mat-button\n color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\"\n >\n {{ 'igo.common.confirmDialog.confirmBtn' | translate }}\n </button>\n <button mat-button (click)=\"dialogRef.close(false)\">\n {{ 'igo.common.confirmDialog.cancelBtn' | translate }}\n </button>\n</div>\n" }]
2694
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }] });
2695
+
2696
+ class PoiService {
2697
+ http;
2698
+ config;
2699
+ baseUrl;
2700
+ constructor(http, config) {
2701
+ this.http = http;
2702
+ this.config = config;
2703
+ this.baseUrl = this.config.getConfig('context.url');
2646
2704
  }
2647
- handleEditedContextChange(context) {
2648
- this.component.context = context;
2649
- if (context) {
2650
- this.contextService
2651
- .getPermissions(context.id)
2652
- .subscribe((permissionsArray) => {
2653
- permissionsArray = permissionsArray || [];
2654
- const permissions = {
2655
- read: permissionsArray.filter((p) => {
2656
- return p.typePermission.toString() === 'read';
2657
- }),
2658
- write: permissionsArray.filter((p) => {
2659
- return p.typePermission.toString() === 'write';
2660
- })
2661
- };
2662
- return (this.component.permissions = permissions);
2663
- });
2705
+ get() {
2706
+ if (!this.baseUrl) {
2707
+ return EMPTY;
2664
2708
  }
2709
+ const url = this.baseUrl + '/pois';
2710
+ return this.http.get(url);
2711
+ }
2712
+ delete(id) {
2713
+ const url = this.baseUrl + '/pois/' + id;
2714
+ return this.http.delete(url);
2715
+ }
2716
+ create(context) {
2717
+ const url = this.baseUrl + '/pois';
2718
+ return this.http.post(url, context);
2665
2719
  }
2666
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [{ token: ContextPermissionsComponent, self: true }, { token: ContextService }, { token: i3.LanguageService }, { token: i3.MessageService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
2667
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ContextPermissionsBindingDirective, selector: "[igoContextPermissionsBinding]", host: { listeners: { "addPermission": "onAddPermission($event)", "removePermission": "onRemovePermission($event)", "scopeChanged": "onScopeChanged($event)" } }, ngImport: i0 });
2720
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiService, deps: [{ token: i1.HttpClient }, { token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2721
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiService });
2668
2722
  }
2669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
2670
- type: Directive,
2671
- args: [{
2672
- selector: '[igoContextPermissionsBinding]'
2673
- }]
2674
- }], ctorParameters: function () { return [{ type: ContextPermissionsComponent, decorators: [{
2675
- type: Self
2676
- }] }, { type: ContextService }, { type: i3.LanguageService }, { type: i3.MessageService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onAddPermission: [{
2677
- type: HostListener,
2678
- args: ['addPermission', ['$event']]
2679
- }], onRemovePermission: [{
2680
- type: HostListener,
2681
- args: ['removePermission', ['$event']]
2682
- }], onScopeChanged: [{
2683
- type: HostListener,
2684
- args: ['scopeChanged', ['$event']]
2685
- }] } });
2723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiService, decorators: [{
2724
+ type: Injectable
2725
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i3.ConfigService }] });
2686
2726
 
2687
- class LayerContextDirective {
2688
- component;
2689
- contextService;
2690
- layerService;
2691
- configService;
2692
- styleListService;
2693
- styleService;
2694
- route;
2695
- context$$;
2696
- queryParams;
2697
- contextLayers = [];
2698
- removeLayersOnContextChange = true;
2727
+ class PoiButtonComponent {
2728
+ dialog;
2729
+ authService;
2730
+ poiService;
2731
+ messageService;
2732
+ languageService;
2733
+ confirmDialogService;
2699
2734
  get map() {
2700
- return this.component.map;
2735
+ return this._map;
2701
2736
  }
2702
- constructor(component, contextService, layerService, configService, styleListService, styleService, route) {
2703
- this.component = component;
2704
- this.contextService = contextService;
2705
- this.layerService = layerService;
2706
- this.configService = configService;
2707
- this.styleListService = styleListService;
2708
- this.styleService = styleService;
2709
- this.route = route;
2737
+ set map(value) {
2738
+ this._map = value;
2739
+ }
2740
+ _map;
2741
+ get color() {
2742
+ return this._color;
2743
+ }
2744
+ set color(value) {
2745
+ this._color = value;
2746
+ }
2747
+ _color;
2748
+ pois;
2749
+ authenticate$$;
2750
+ constructor(dialog, authService, poiService, messageService, languageService, confirmDialogService) {
2751
+ this.dialog = dialog;
2752
+ this.authService = authService;
2753
+ this.poiService = poiService;
2754
+ this.messageService = messageService;
2755
+ this.languageService = languageService;
2756
+ this.confirmDialogService = confirmDialogService;
2710
2757
  }
2711
2758
  ngOnInit() {
2712
- this.context$$ = this.contextService.context$
2713
- .pipe(filter((context) => context !== undefined))
2714
- .subscribe((context) => this.handleContextChange(context));
2715
- if (this.route &&
2716
- this.route.options.visibleOnLayersKey &&
2717
- this.route.options.visibleOffLayersKey &&
2718
- this.route.options.contextKey) {
2719
- this.route.queryParams
2720
- .pipe(first((params) => !ObjectUtils.isEmpty(params)))
2721
- .subscribe((params) => {
2722
- this.queryParams = params;
2723
- });
2724
- }
2759
+ this.authenticate$$ = this.authService.authenticate$.subscribe((auth) => {
2760
+ if (auth) {
2761
+ this.getPois();
2762
+ }
2763
+ });
2725
2764
  }
2726
2765
  ngOnDestroy() {
2727
- this.context$$.unsubscribe();
2766
+ this.authenticate$$.unsubscribe();
2728
2767
  }
2729
- handleContextChange(context) {
2730
- if (context.layers === undefined) {
2731
- return;
2732
- }
2733
- if (this.removeLayersOnContextChange === true) {
2734
- this.map.removeAllLayers();
2735
- }
2736
- else {
2737
- this.map.removeLayers(this.contextLayers);
2768
+ deletePoi(poi) {
2769
+ if (poi && poi.id) {
2770
+ this.confirmDialogService
2771
+ .open(this.languageService.translate.instant('igo.context.poiButton.dialog.confirmDelete'))
2772
+ .subscribe((confirm) => {
2773
+ if (confirm) {
2774
+ this.poiService.delete(poi.id).subscribe(() => {
2775
+ this.messageService.info('igo.context.poiButton.dialog.deleteMsg', 'igo.context.poiButton.dialog.deleteTitle', undefined, { value: poi.title });
2776
+ this.pois = this.pois.filter((p) => p.id !== poi.id);
2777
+ }, (err) => {
2778
+ err.error.title = 'DELETE Pois';
2779
+ this.messageService.showError(err);
2780
+ });
2781
+ }
2782
+ });
2738
2783
  }
2739
- this.contextLayers = [];
2740
- const layersAndIndex$ = merge(...context.layers.map((layerOptions, index) => {
2741
- return this.layerService.createAsyncLayer(layerOptions, context.uri);
2742
- }));
2743
- layersAndIndex$
2744
- .pipe(buffer(layersAndIndex$.pipe(debounceTime(500))))
2745
- .subscribe((layers) => {
2746
- this.handleAddLayers(layers);
2747
- if (context.extraFeatures) {
2748
- context.extraFeatures.forEach((featureCollection) => {
2749
- const importExportOptions = this.configService.getConfig('importExport');
2750
- if (!importExportOptions?.importWithStyle) {
2751
- addImportedFeaturesToMap(featureCollection, this.map);
2752
- }
2753
- else {
2754
- addImportedFeaturesStyledToMap(featureCollection, this.map, this.styleListService, this.styleService);
2755
- }
2784
+ }
2785
+ getPois() {
2786
+ this.poiService
2787
+ .get()
2788
+ .pipe(take(1))
2789
+ .subscribe((rep) => {
2790
+ this.pois = rep;
2791
+ }, (err) => {
2792
+ err.error.title = 'GET Pois';
2793
+ this.messageService.showError(err);
2794
+ });
2795
+ }
2796
+ createPoi() {
2797
+ const view = this.map.ol.getView();
2798
+ const proj = view.getProjection().getCode();
2799
+ const center = new olPoint(view.getCenter()).transform(proj, 'EPSG:4326');
2800
+ const poi = {
2801
+ title: '',
2802
+ x: center.getCoordinates()[0],
2803
+ y: center.getCoordinates()[1],
2804
+ zoom: view.getZoom()
2805
+ };
2806
+ this.dialog
2807
+ .open(PoiDialogComponent, { disableClose: false })
2808
+ .afterClosed()
2809
+ .subscribe((title) => {
2810
+ if (title) {
2811
+ poi.title = title;
2812
+ this.poiService.create(poi).subscribe((newPoi) => {
2813
+ this.messageService.success('igo.context.poiButton.dialog.createMsg', 'igo.context.poiButton.dialog.createTitle', undefined, { value: poi.title });
2814
+ poi.id = newPoi.id;
2815
+ this.pois.push(poi);
2816
+ }, (err) => {
2817
+ err.error.title = 'POST Pois';
2818
+ this.messageService.showError(err);
2756
2819
  });
2757
2820
  }
2758
2821
  });
2759
- this.layerService
2760
- .createAsyncIdbLayers(context.uri)
2761
- .pipe(debounceTime(500))
2762
- .subscribe((layers) => this.handleAddLayers(layers));
2763
2822
  }
2764
- handleAddLayers(layers) {
2765
- layers = layers
2766
- .filter((layer) => layer !== undefined)
2767
- .map((layer) => {
2768
- layer.visible = this.computeLayerVisibilityFromUrl(layer);
2769
- layer.zIndex = layer.zIndex;
2770
- return layer;
2823
+ zoomOnPoi(id) {
2824
+ const poi = this.pois.find((p) => p.id === id);
2825
+ const center = olproj.fromLonLat([Number(poi.x), Number(poi.y)], this.map.projection);
2826
+ this.map.ol.getView().animate({
2827
+ center,
2828
+ zoom: poi.zoom,
2829
+ duration: 500,
2830
+ easing: oleasing.easeOut
2771
2831
  });
2772
- this.contextLayers.concat(layers);
2773
- this.map.addLayers(layers);
2774
- }
2775
- computeLayerVisibilityFromUrl(layer) {
2776
- const params = this.queryParams;
2777
- const currentContext = this.contextService.context$.value.uri;
2778
- const currentLayerid = layer.id;
2779
- let visible = layer.visible;
2780
- if (!params || !currentLayerid) {
2781
- return visible;
2782
- }
2783
- const contextParams = params[this.route.options.contextKey];
2784
- if (contextParams === currentContext || !contextParams) {
2785
- let visibleOnLayersParams = '';
2786
- let visibleOffLayersParams = '';
2787
- let visiblelayers = [];
2788
- let invisiblelayers = [];
2789
- if (this.route.options.visibleOnLayersKey &&
2790
- params[this.route.options.visibleOnLayersKey]) {
2791
- visibleOnLayersParams =
2792
- params[this.route.options.visibleOnLayersKey];
2793
- }
2794
- if (this.route.options.visibleOffLayersKey &&
2795
- params[this.route.options.visibleOffLayersKey]) {
2796
- visibleOffLayersParams =
2797
- params[this.route.options.visibleOffLayersKey];
2798
- }
2799
- /* This order is important because to control whichever
2800
- the order of * param. First whe open and close everything.*/
2801
- if (visibleOnLayersParams === '*') {
2802
- visible = true;
2803
- }
2804
- if (visibleOffLayersParams === '*') {
2805
- visible = false;
2806
- }
2807
- // After, managing named layer by id (context.json OR id from datasource)
2808
- visiblelayers = visibleOnLayersParams.split(',');
2809
- invisiblelayers = visibleOffLayersParams.split(',');
2810
- if (visiblelayers.indexOf(currentLayerid) > -1 ||
2811
- visiblelayers.indexOf(currentLayerid.toString()) > -1) {
2812
- visible = true;
2813
- }
2814
- if (invisiblelayers.indexOf(currentLayerid) > -1 ||
2815
- invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
2816
- visible = false;
2817
- }
2818
- }
2819
- return visible;
2820
2832
  }
2821
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayerContextDirective, deps: [{ token: i1$1.MapBrowserComponent }, { token: ContextService }, { token: i1$1.LayerService }, { token: i3.ConfigService }, { token: i1$1.StyleListService }, { token: i1$1.StyleService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2822
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LayerContextDirective, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: "removeLayersOnContextChange" }, ngImport: i0 });
2833
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiButtonComponent, deps: [{ token: i1$2.MatDialog }, { token: i2.AuthService }, { token: PoiService }, { token: i3.MessageService }, { token: i3.LanguageService }, { token: i5$2.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component });
2834
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: PoiButtonComponent, isStandalone: true, selector: "igo-poi-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<mat-select\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div class=\"titlePoi\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\n </button>\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let poi of pois\"\n class=\"poi-option\"\n [value]=\"poi.id\"\n (click)=\"zoomOnPoi(poi.id)\"\n >\n <div class=\"titlePoi\">{{ poi.title }}</div>\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </mat-option>\n</mat-select>\n", styles: [":host{background-color:#fff;padding:0 8px;height:100%}mat-select{width:150px;height:100%}mat-select ::ng-deep .mat-mdc-select-trigger{height:100%}::ng-deep .poi-option .mdc-list-item__primary-text{display:flex;justify-content:space-between;align-items:center;flex:1;overflow:visible}::ng-deep .poi-option button{margin-right:-16px}\n"], dependencies: [{ kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i10.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i11.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i12.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2823
2835
  }
2824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayerContextDirective, decorators: [{
2825
- type: Directive,
2826
- args: [{
2827
- selector: '[igoLayerContext]'
2828
- }]
2829
- }], ctorParameters: function () { return [{ type: i1$1.MapBrowserComponent }, { type: ContextService }, { type: i1$1.LayerService }, { type: i3.ConfigService }, { type: i1$1.StyleListService }, { type: i1$1.StyleService }, { type: i3.RouteService, decorators: [{
2830
- type: Optional
2831
- }] }]; }, propDecorators: { removeLayersOnContextChange: [{
2836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: PoiButtonComponent, decorators: [{
2837
+ type: Component,
2838
+ args: [{ selector: 'igo-poi-button', standalone: true, imports: [
2839
+ MatSelectModule,
2840
+ MatOptionModule,
2841
+ MatButtonModule,
2842
+ StopPropagationDirective,
2843
+ MatIconModule,
2844
+ MatDividerModule,
2845
+ NgFor,
2846
+ TranslateModule
2847
+ ], template: "<mat-select\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div class=\"titlePoi\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\n </button>\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option\n *ngFor=\"let poi of pois\"\n class=\"poi-option\"\n [value]=\"poi.id\"\n (click)=\"zoomOnPoi(poi.id)\"\n >\n <div class=\"titlePoi\">{{ poi.title }}</div>\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </mat-option>\n</mat-select>\n", styles: [":host{background-color:#fff;padding:0 8px;height:100%}mat-select{width:150px;height:100%}mat-select ::ng-deep .mat-mdc-select-trigger{height:100%}::ng-deep .poi-option .mdc-list-item__primary-text{display:flex;justify-content:space-between;align-items:center;flex:1;overflow:visible}::ng-deep .poi-option button{margin-right:-16px}\n"] }]
2848
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: i2.AuthService }, { type: PoiService }, { type: i3.MessageService }, { type: i3.LanguageService }, { type: i5$2.ConfirmDialogService }], propDecorators: { map: [{
2849
+ type: Input
2850
+ }], color: [{
2832
2851
  type: Input
2833
2852
  }] } });
2834
2853
 
2835
- class MapContextDirective {
2836
- contextService;
2837
- mediaService;
2838
- component;
2839
- context$$;
2854
+ function userButtonSlideInOut() {
2855
+ return trigger('userButtonState', [
2856
+ state('collapse', style({
2857
+ width: '0',
2858
+ overflow: 'hidden',
2859
+ display: 'none'
2860
+ })),
2861
+ state('expand', style({
2862
+ overflow: 'hidden',
2863
+ display: 'display'
2864
+ })),
2865
+ transition('collapse => expand', animate('200ms')),
2866
+ transition('expand => collapse', animate('200ms'))
2867
+ ]);
2868
+ }
2869
+
2870
+ class UserDialogComponent {
2871
+ dialogRef;
2872
+ auth;
2873
+ storageService;
2874
+ user;
2875
+ exp;
2876
+ constructor(dialogRef, auth, storageService) {
2877
+ this.dialogRef = dialogRef;
2878
+ this.auth = auth;
2879
+ this.storageService = storageService;
2880
+ const decodeToken = this.auth.decodeToken();
2881
+ this.user = decodeToken?.user;
2882
+ this.exp = new Date(decodeToken.exp * 1000).toLocaleString();
2883
+ }
2884
+ clearPreferences() {
2885
+ this.storageService.clear();
2886
+ }
2887
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UserDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: i2.AuthService }, { token: i3.StorageService }], target: i0.ɵɵFactoryTarget.Component });
2888
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: UserDialogComponent, isStandalone: true, selector: "igo-user-dialog", ngImport: i0, template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.userButton.infoTitle' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <p>\n {{ 'igo.context.userButton.dialog.user' | translate }}: {{ user.sourceId }}\n </p>\n <p>\n {{ 'igo.context.userButton.dialog.email' | translate }}: {{ user.email }}\n </p>\n <p>{{ 'igo.context.userButton.dialog.expiration' | translate }}: {{ exp }}</p>\n <button mat-stroked-button color=\"primary\" (click)=\"clearPreferences()\">\n {{ 'igo.context.userButton.dialog.clearPreferences' | translate }}\n </button>\n <br />\n</div>\n<div mat-dialog-actions style=\"justify-content: center\">\n <button mat-raised-button color=\"primary\" (click)=\"dialogRef.close(false)\">\n OK\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2889
+ }
2890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UserDialogComponent, decorators: [{
2891
+ type: Component,
2892
+ args: [{ selector: 'igo-user-dialog', standalone: true, imports: [
2893
+ MatDialogTitle,
2894
+ MatDialogContent,
2895
+ MatButtonModule,
2896
+ MatDialogActions,
2897
+ TranslateModule
2898
+ ], template: "<h1 mat-dialog-title class=\"mat-typography\">\n {{ 'igo.context.userButton.infoTitle' | translate }}\n</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <p>\n {{ 'igo.context.userButton.dialog.user' | translate }}: {{ user.sourceId }}\n </p>\n <p>\n {{ 'igo.context.userButton.dialog.email' | translate }}: {{ user.email }}\n </p>\n <p>{{ 'igo.context.userButton.dialog.expiration' | translate }}: {{ exp }}</p>\n <button mat-stroked-button color=\"primary\" (click)=\"clearPreferences()\">\n {{ 'igo.context.userButton.dialog.clearPreferences' | translate }}\n </button>\n <br />\n</div>\n<div mat-dialog-actions style=\"justify-content: center\">\n <button mat-raised-button color=\"primary\" (click)=\"dialogRef.close(false)\">\n OK\n </button>\n</div>\n" }]
2899
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: i2.AuthService }, { type: i3.StorageService }] });
2900
+
2901
+ class UserButtonComponent {
2902
+ dialog;
2903
+ config;
2904
+ auth;
2840
2905
  get map() {
2841
- return this.component.map;
2906
+ return this._map;
2842
2907
  }
2843
- constructor(component, contextService, mediaService) {
2844
- this.contextService = contextService;
2845
- this.mediaService = mediaService;
2846
- this.component = component;
2908
+ set map(value) {
2909
+ this._map = value;
2847
2910
  }
2848
- ngOnInit() {
2849
- this.context$$ = this.contextService.context$
2850
- .pipe(filter((context) => context !== undefined))
2851
- .subscribe((context) => this.handleContextChange(context));
2911
+ _map;
2912
+ get color() {
2913
+ return this._color;
2852
2914
  }
2853
- ngOnDestroy() {
2854
- this.context$$.unsubscribe();
2915
+ set color(value) {
2916
+ this._color = value;
2855
2917
  }
2856
- handleContextChange(context) {
2857
- if (context.map === undefined) {
2858
- return;
2859
- }
2860
- // This creates a new ol.Map when the context changes. Doing that
2861
- // allows the print tool to work properly even when the map's canvas
2862
- // has been tainted (CORS) with the layers of another context. This could
2863
- // have some side effects such as unbinding all listeners on the first map.
2864
- // A better solution would be to create a new map (preview) before
2865
- // printing and avoid the tainted canvas issue. This will come later so
2866
- // this snippet of code is kept here in case it takes too long becomes
2867
- // an issue
2868
- // const target = this.component.map.ol.getTarget();
2869
- // this.component.map.ol.setTarget(undefined);
2870
- // this.component.map.init();
2871
- // this.component.map.ol.setTarget(target);
2872
- const viewContext = context.map.view;
2873
- if (!this.component.view ||
2874
- viewContext.keepCurrentView !== true ||
2875
- context.map.view.projection !== this.map.projection) {
2876
- this.component.view = viewContext;
2877
- }
2878
- if (this.component.map.geolocationController) {
2879
- this.component.map.geolocationController.updateGeolocationOptions(viewContext);
2918
+ _color;
2919
+ expand = false;
2920
+ visible = false;
2921
+ hasApi = false;
2922
+ constructor(dialog, config, auth) {
2923
+ this.dialog = dialog;
2924
+ this.config = config;
2925
+ this.auth = auth;
2926
+ this.visible = this.config.getConfig('auth') ? true : false;
2927
+ this.hasApi = this.config.getConfig('context.url') !== undefined;
2928
+ }
2929
+ accountClick() {
2930
+ if (this.auth.authenticated) {
2931
+ this.expand = !this.expand;
2880
2932
  }
2881
- const controlsContext = context.map.controls;
2882
- if (!this.component.controls && controlsContext) {
2883
- if (this.mediaService.isMobile()) {
2884
- if (typeof controlsContext.scaleLine !== 'boolean') {
2885
- const scaleLineOption = controlsContext.scaleLine;
2886
- if (!scaleLineOption.minWidth) {
2887
- scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
2888
- controlsContext.scaleLine = scaleLineOption;
2889
- }
2890
- }
2891
- }
2892
- this.component.controls = controlsContext;
2933
+ else {
2934
+ this.auth.logout();
2893
2935
  }
2894
2936
  }
2895
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MapContextDirective, deps: [{ token: i1$1.MapBrowserComponent }, { token: ContextService }, { token: i3.MediaService }], target: i0.ɵɵFactoryTarget.Directive });
2896
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: MapContextDirective, selector: "[igoMapContext]", ngImport: i0 });
2937
+ logout() {
2938
+ this.expand = false;
2939
+ this.auth.logout();
2940
+ }
2941
+ infoUser() {
2942
+ this.dialog.open(UserDialogComponent, { disableClose: false });
2943
+ }
2944
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UserButtonComponent, deps: [{ token: i1$2.MatDialog }, { token: i3.ConfigService }, { token: i2.AuthService }], target: i0.ɵɵFactoryTarget.Component });
2945
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: UserButtonComponent, isStandalone: true, selector: "igo-user-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\n <div\n class=\"igo-user-button-more-container\"\n [@userButtonState]=\"expand ? 'expand' : 'collapse'\"\n >\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"infoUser()\"\n >\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.logout' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"logout()\"\n >\n <mat-icon svgIcon=\"power\"></mat-icon>\n </button>\n </div>\n\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\"\n >\n <mat-icon svgIcon=\"account-box\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-user-button-container{display:flex;gap:4px}:host .igo-user-button-container button{background-color:#fff}:host .igo-user-button-container button:hover{background-color:#efefef}:host .igo-user-button-more-container{display:flex;gap:4px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PoiButtonComponent, selector: "igo-poi-button", inputs: ["map", "color"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }], animations: [userButtonSlideInOut()] });
2897
2946
  }
2898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MapContextDirective, decorators: [{
2899
- type: Directive,
2900
- args: [{
2901
- selector: '[igoMapContext]'
2902
- }]
2903
- }], ctorParameters: function () { return [{ type: i1$1.MapBrowserComponent }, { type: ContextService }, { type: i3.MediaService }]; } });
2947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UserButtonComponent, decorators: [{
2948
+ type: Component,
2949
+ args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], standalone: true, imports: [
2950
+ NgIf,
2951
+ PoiButtonComponent,
2952
+ MatButtonModule,
2953
+ MatTooltipModule,
2954
+ MatIconModule,
2955
+ TranslateModule
2956
+ ], template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\n <div\n class=\"igo-user-button-more-container\"\n [@userButtonState]=\"expand ? 'expand' : 'collapse'\"\n >\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"infoUser()\"\n >\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.logout' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"logout()\"\n >\n <mat-icon svgIcon=\"power\"></mat-icon>\n </button>\n </div>\n\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\"\n >\n <mat-icon svgIcon=\"account-box\"></mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}:host .igo-user-button-container{display:flex;gap:4px}:host .igo-user-button-container button{background-color:#fff}:host .igo-user-button-container button:hover{background-color:#efefef}:host .igo-user-button-more-container{display:flex;gap:4px}\n"] }]
2957
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: i3.ConfigService }, { type: i2.AuthService }], propDecorators: { map: [{
2958
+ type: Input
2959
+ }], color: [{
2960
+ type: Input
2961
+ }] } });
2904
2962
 
2905
- const CONTEXT_DIRECTIVES = [MapContextDirective, LayerContextDirective];
2906
- class IgoContextManagerModule {
2963
+ /**
2964
+ * @deprecated import the components/directives directly or CONTEXT_MAP_BUTTON_DIRECTIVES for the set
2965
+ */
2966
+ class IgoContextMapButtonModule {
2907
2967
  static forRoot() {
2908
2968
  return {
2909
- ngModule: IgoContextManagerModule
2969
+ ngModule: IgoContextMapButtonModule
2910
2970
  };
2911
2971
  }
2912
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2913
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoContextManagerModule, declarations: [ContextListComponent,
2914
- ContextListBindingDirective,
2915
- ContextItemComponent,
2916
- ContextFormComponent,
2917
- ContextEditComponent,
2918
- ContextEditBindingDirective,
2919
- ContextPermissionsComponent,
2920
- ContextPermissionsBindingDirective, MapContextDirective, LayerContextDirective], imports: [CommonModule,
2921
- FormsModule,
2922
- ReactiveFormsModule,
2923
- MatFormFieldModule,
2924
- MatInputModule,
2925
- MatIconModule,
2926
- MatButtonModule,
2927
- MatTooltipModule,
2928
- MatListModule,
2929
- MatCheckboxModule,
2930
- MatRadioModule,
2931
- MatDialogModule,
2932
- MatMenuModule,
2933
- MatOptionModule,
2934
- MatAutocompleteModule,
2935
- IgoAuthModule,
2936
- IgoListModule,
2937
- IgoKeyValueModule,
2938
- IgoCollapsibleModule,
2939
- IgoStopPropagationModule,
2940
- IgoLanguageModule,
2941
- IgoContextImportExportModule,
2942
- IgoContextMapButtonModule,
2943
- IgoActionbarModule], exports: [ContextListComponent,
2944
- ContextListBindingDirective,
2945
- ContextItemComponent,
2946
- ContextFormComponent,
2947
- ContextEditComponent,
2948
- ContextEditBindingDirective,
2949
- ContextPermissionsComponent,
2950
- ContextPermissionsBindingDirective, MapContextDirective, LayerContextDirective] });
2951
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextManagerModule, imports: [CommonModule,
2952
- FormsModule,
2953
- ReactiveFormsModule,
2954
- MatFormFieldModule,
2955
- MatInputModule,
2956
- MatIconModule,
2957
- MatButtonModule,
2958
- MatTooltipModule,
2959
- MatListModule,
2960
- MatCheckboxModule,
2961
- MatRadioModule,
2962
- MatDialogModule,
2963
- MatMenuModule,
2964
- MatOptionModule,
2965
- MatAutocompleteModule,
2966
- IgoAuthModule,
2967
- IgoListModule,
2968
- IgoKeyValueModule,
2969
- IgoCollapsibleModule,
2970
- IgoStopPropagationModule,
2971
- IgoLanguageModule,
2972
- IgoContextImportExportModule,
2973
- IgoContextMapButtonModule,
2974
- IgoActionbarModule] });
2972
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2973
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoContextMapButtonModule, imports: [BookmarkButtonComponent,
2974
+ BookmarkDialogComponent,
2975
+ PoiButtonComponent,
2976
+ UserButtonComponent], exports: [BookmarkButtonComponent,
2977
+ PoiButtonComponent,
2978
+ UserButtonComponent,
2979
+ BookmarkDialogComponent] });
2980
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [BookmarkButtonComponent,
2981
+ BookmarkDialogComponent,
2982
+ PoiButtonComponent,
2983
+ UserButtonComponent] });
2975
2984
  }
2976
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextManagerModule, decorators: [{
2985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
2977
2986
  type: NgModule,
2978
2987
  args: [{
2979
2988
  imports: [
2980
- CommonModule,
2981
- FormsModule,
2982
- ReactiveFormsModule,
2983
- MatFormFieldModule,
2984
- MatInputModule,
2985
- MatIconModule,
2986
- MatButtonModule,
2987
- MatTooltipModule,
2988
- MatListModule,
2989
- MatCheckboxModule,
2990
- MatRadioModule,
2991
- MatDialogModule,
2992
- MatMenuModule,
2993
- MatOptionModule,
2994
- MatAutocompleteModule,
2995
- IgoAuthModule,
2996
- IgoListModule,
2997
- IgoKeyValueModule,
2998
- IgoCollapsibleModule,
2999
- IgoStopPropagationModule,
3000
- IgoLanguageModule,
3001
- IgoContextImportExportModule,
3002
- IgoContextMapButtonModule,
3003
- IgoActionbarModule
2989
+ BookmarkButtonComponent,
2990
+ BookmarkDialogComponent,
2991
+ PoiButtonComponent,
2992
+ UserButtonComponent
3004
2993
  ],
3005
2994
  exports: [
3006
- ContextListComponent,
3007
- ContextListBindingDirective,
3008
- ContextItemComponent,
3009
- ContextFormComponent,
3010
- ContextEditComponent,
3011
- ContextEditBindingDirective,
3012
- ContextPermissionsComponent,
3013
- ContextPermissionsBindingDirective,
3014
- ...CONTEXT_DIRECTIVES
2995
+ BookmarkButtonComponent,
2996
+ PoiButtonComponent,
2997
+ UserButtonComponent,
2998
+ BookmarkDialogComponent
3015
2999
  ],
3016
- declarations: [
3017
- ContextListComponent,
3018
- ContextListBindingDirective,
3019
- ContextItemComponent,
3020
- ContextFormComponent,
3021
- ContextEditComponent,
3022
- ContextEditBindingDirective,
3023
- ContextPermissionsComponent,
3024
- ContextPermissionsBindingDirective,
3025
- ...CONTEXT_DIRECTIVES
3026
- ]
3000
+ providers: [PoiService]
3027
3001
  }]
3028
3002
  }] });
3029
3003
 
@@ -3230,17 +3204,17 @@ class ShareMapService {
3230
3204
  }
3231
3205
  return addedLayersQueryParams;
3232
3206
  }
3233
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapService, deps: [{ token: ContextService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
3234
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapService, providedIn: 'root' });
3207
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapService, deps: [{ token: ContextService }, { token: i3.RouteService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
3208
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapService, providedIn: 'root' });
3235
3209
  }
3236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapService, decorators: [{
3210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapService, decorators: [{
3237
3211
  type: Injectable,
3238
3212
  args: [{
3239
3213
  providedIn: 'root'
3240
3214
  }]
3241
- }], ctorParameters: function () { return [{ type: ContextService }, { type: i3.RouteService, decorators: [{
3215
+ }], ctorParameters: () => [{ type: ContextService }, { type: i3.RouteService, decorators: [{
3242
3216
  type: Optional
3243
- }] }]; } });
3217
+ }] }] });
3244
3218
 
3245
3219
  class ShareMapApiComponent {
3246
3220
  languageService;
@@ -3307,13 +3281,23 @@ class ShareMapApiComponent {
3307
3281
  uri: [id]
3308
3282
  });
3309
3283
  }
3310
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapApiComponent, deps: [{ token: i3.LanguageService }, { token: i3.MessageService }, { token: i2.AuthService }, { token: ShareMapService }, { token: i1$2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
3311
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShareMapApiComponent, selector: "igo-share-map-api", inputs: { map: "map" }, ngImport: i0, template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{ userId }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button\n *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\"\n >\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button\n *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
3284
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapApiComponent, deps: [{ token: i3.LanguageService }, { token: i3.MessageService }, { token: i2.AuthService }, { token: ShareMapService }, { token: i4.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
3285
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ShareMapApiComponent, isStandalone: true, selector: "igo-share-map-api", inputs: { map: "map" }, ngImport: i0, template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{ userId }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button\n *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\"\n >\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button\n *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
3312
3286
  }
3313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapApiComponent, decorators: [{
3287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapApiComponent, decorators: [{
3314
3288
  type: Component,
3315
- args: [{ selector: 'igo-share-map-api', template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{ userId }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button\n *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\"\n >\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button\n *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"] }]
3316
- }], ctorParameters: function () { return [{ type: i3.LanguageService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: ShareMapService }, { type: i1$2.UntypedFormBuilder }]; }, propDecorators: { map: [{
3289
+ args: [{ selector: 'igo-share-map-api', standalone: true, imports: [
3290
+ FormsModule,
3291
+ ReactiveFormsModule,
3292
+ MatFormFieldModule,
3293
+ MatInputModule,
3294
+ NgIf,
3295
+ MatButtonModule,
3296
+ MatTooltipModule,
3297
+ MatIconModule,
3298
+ TranslateModule
3299
+ ], template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n <span *ngIf=\"userId\" class=\"prefix\">{{ userId }}-</span>\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n <button\n *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\"\n >\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button\n *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"] }]
3300
+ }], ctorParameters: () => [{ type: i3.LanguageService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: ShareMapService }, { type: i4.UntypedFormBuilder }], propDecorators: { map: [{
3317
3301
  type: Input
3318
3302
  }] } });
3319
3303
 
@@ -3357,13 +3341,21 @@ class ShareMapUrlComponent {
3357
3341
  this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
3358
3342
  }
3359
3343
  }
3360
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapUrlComponent, deps: [{ token: i3.MessageService }, { token: ShareMapService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3361
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: { map: "map" }, ngImport: i0, template: "<div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n <div>\n <br />\n <section class=\"mat-typography\">\n <div\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) === ''\"\n >\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate) !== ''\">\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.context' | translate) !== ''\">\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.center' | translate) !== ''\">\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate) !== ''\">\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate) !== ''\">\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n <li\n *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate) !== ''\"\n >\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n </ul>\n\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate) !== ''\">\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.order' | translate) !== ''\">\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate) !== ''\">\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n </ul>\n </div>\n <igo-custom-html\n class=\"shareCustomPadding\"\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) !== ''\"\n class=\"mat-typography\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n >\n </igo-custom-html>\n </section>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i13.CustomHtmlComponent, selector: "igo-custom-html", inputs: ["html"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
3344
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapUrlComponent, deps: [{ token: i3.MessageService }, { token: ShareMapService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3345
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ShareMapUrlComponent, isStandalone: true, selector: "igo-share-map-url", inputs: { map: "map" }, ngImport: i0, template: "<div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n <div>\n <br />\n <section class=\"mat-typography\">\n <div\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) === ''\"\n >\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate) !== ''\">\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.context' | translate) !== ''\">\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.center' | translate) !== ''\">\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate) !== ''\">\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate) !== ''\">\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n <li\n *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate) !== ''\"\n >\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n </ul>\n\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate) !== ''\">\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.order' | translate) !== ''\">\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate) !== ''\">\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n </ul>\n </div>\n <igo-custom-html\n class=\"shareCustomPadding\"\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) !== ''\"\n class=\"mat-typography\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n >\n </igo-custom-html>\n </section>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CustomHtmlComponent, selector: "igo-custom-html", inputs: ["html"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
3362
3346
  }
3363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
3347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
3364
3348
  type: Component,
3365
- args: [{ selector: 'igo-share-map-url', template: "<div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n <div>\n <br />\n <section class=\"mat-typography\">\n <div\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) === ''\"\n >\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate) !== ''\">\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.context' | translate) !== ''\">\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.center' | translate) !== ''\">\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate) !== ''\">\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate) !== ''\">\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n <li\n *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate) !== ''\"\n >\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n </ul>\n\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate) !== ''\">\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.order' | translate) !== ''\">\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate) !== ''\">\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n </ul>\n </div>\n <igo-custom-html\n class=\"shareCustomPadding\"\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) !== ''\"\n class=\"mat-typography\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n >\n </igo-custom-html>\n </section>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"] }]
3366
- }], ctorParameters: function () { return [{ type: i3.MessageService }, { type: ShareMapService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { map: [{
3349
+ args: [{ selector: 'igo-share-map-url', standalone: true, imports: [
3350
+ MatFormFieldModule,
3351
+ MatInputModule,
3352
+ MatButtonModule,
3353
+ MatIconModule,
3354
+ NgIf,
3355
+ CustomHtmlComponent,
3356
+ TranslateModule
3357
+ ], template: "<div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"igo-form-button-group\">\n <button mat-raised-button (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n <div>\n <br />\n <section class=\"mat-typography\">\n <div\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) === ''\"\n >\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate) !== ''\">\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.context' | translate) !== ''\">\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.center' | translate) !== ''\">\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate) !== ''\">\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate) !== ''\">\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n <li\n *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate) !== ''\"\n >\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n </ul>\n\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate) !== ''\">\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.order' | translate) !== ''\">\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate) !== ''\">\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate) !== ''\">\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n </ul>\n </div>\n <igo-custom-html\n class=\"shareCustomPadding\"\n *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate) !== ''\"\n class=\"mat-typography\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n >\n </igo-custom-html>\n </section>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"] }]
3358
+ }], ctorParameters: () => [{ type: i3.MessageService }, { type: ShareMapService }, { type: i0.ChangeDetectorRef }], propDecorators: { map: [{
3367
3359
  type: Input
3368
3360
  }] } });
3369
3361
 
@@ -3375,64 +3367,40 @@ class ShareMapComponent {
3375
3367
  this.config = config;
3376
3368
  this.hasApi = this.config.getConfig('context.url') ? true : false;
3377
3369
  }
3378
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapComponent, deps: [{ token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
3379
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ShareMapComponent, selector: "igo-share-map", inputs: { map: "map" }, ngImport: i0, template: "<mat-tab-group *ngIf=\"hasApi\">\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n</mat-tab-group>\n\n<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\n", styles: [""], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }, { kind: "component", type: ShareMapApiComponent, selector: "igo-share-map-api", inputs: ["map"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
3370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapComponent, deps: [{ token: i3.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
3371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: "map" }, ngImport: i0, template: "<mat-tab-group *ngIf=\"hasApi\">\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n</mat-tab-group>\n\n<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i2$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i2$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: ShareMapApiComponent, selector: "igo-share-map-api", inputs: ["map"] }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
3380
3372
  }
3381
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ShareMapComponent, decorators: [{
3373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ShareMapComponent, decorators: [{
3382
3374
  type: Component,
3383
- args: [{ selector: 'igo-share-map', template: "<mat-tab-group *ngIf=\"hasApi\">\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n</mat-tab-group>\n\n<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\n" }]
3384
- }], ctorParameters: function () { return [{ type: i3.ConfigService }]; }, propDecorators: { map: [{
3375
+ args: [{ selector: 'igo-share-map', standalone: true, imports: [
3376
+ NgIf,
3377
+ MatTabsModule,
3378
+ ShareMapApiComponent,
3379
+ ShareMapUrlComponent,
3380
+ TranslateModule
3381
+ ], template: "<mat-tab-group *ngIf=\"hasApi\">\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n</mat-tab-group>\n\n<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\n" }]
3382
+ }], ctorParameters: () => [{ type: i3.ConfigService }], propDecorators: { map: [{
3385
3383
  type: Input
3386
3384
  }] } });
3387
3385
 
3386
+ /**
3387
+ * @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set
3388
+ */
3388
3389
  class IgoShareMapModule {
3389
3390
  static forRoot() {
3390
3391
  return {
3391
3392
  ngModule: IgoShareMapModule
3392
3393
  };
3393
3394
  }
3394
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3395
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoShareMapModule, declarations: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent], imports: [CommonModule,
3396
- FormsModule,
3397
- ReactiveFormsModule,
3398
- MatIconModule,
3399
- MatTooltipModule,
3400
- MatTabsModule,
3401
- MatFormFieldModule,
3402
- MatInputModule,
3403
- MatButtonModule,
3404
- IgoLanguageModule,
3405
- IgoCustomHtmlModule], exports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent] });
3406
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoShareMapModule, imports: [CommonModule,
3407
- FormsModule,
3408
- ReactiveFormsModule,
3409
- MatIconModule,
3410
- MatTooltipModule,
3411
- MatTabsModule,
3412
- MatFormFieldModule,
3413
- MatInputModule,
3414
- MatButtonModule,
3415
- IgoLanguageModule,
3416
- IgoCustomHtmlModule] });
3395
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3396
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent], exports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent] });
3397
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent] });
3417
3398
  }
3418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoShareMapModule, decorators: [{
3399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoShareMapModule, decorators: [{
3419
3400
  type: NgModule,
3420
3401
  args: [{
3421
- imports: [
3422
- CommonModule,
3423
- FormsModule,
3424
- ReactiveFormsModule,
3425
- MatIconModule,
3426
- MatTooltipModule,
3427
- MatTabsModule,
3428
- MatFormFieldModule,
3429
- MatInputModule,
3430
- MatButtonModule,
3431
- IgoLanguageModule,
3432
- IgoCustomHtmlModule
3433
- ],
3434
- exports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent],
3435
- declarations: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent]
3402
+ imports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent],
3403
+ exports: [ShareMapComponent, ShareMapUrlComponent, ShareMapApiComponent]
3436
3404
  }]
3437
3405
  }] });
3438
3406
 
@@ -3508,13 +3476,23 @@ class SidenavComponent {
3508
3476
  this.topPanelState = 'initial';
3509
3477
  }
3510
3478
  }
3511
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SidenavComponent, deps: [{ token: i1$4.Title }], target: i0.ɵɵFactoryTarget.Component });
3512
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SidenavComponent, selector: "igo-sidenav", inputs: { map: "map", opened: "opened", feature: "feature", tool: "tool", media: "media", title: "title" }, ngImport: i0, template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"menu\"></mat-icon>\n </button>\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n <igo-panel [title]=\"featureTitle\" *ngIf=\"feature && media !== 'mobile'\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon\n [svgIcon]=\"\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n \"\n ></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n *ngIf=\"feature.geometry\"\n >\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\n </button>\n\n <igo-feature-details\n [feature]=\"feature\"\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\"\n >\n </igo-feature-details>\n </igo-panel>\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav{width:calc(100% - 45px)}}.igo-sidenav-content{margin-top:50px;height:calc(100% - 50px)}igo-feature-details ::ng-deep table{width:100%}\n"], dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "directive", type: i6$3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i13.PanelComponent, selector: "igo-panel", inputs: ["title", "withHeader", "cursorPointer"] }, { kind: "component", type: i13.FlexibleComponent, selector: "igo-flexible", inputs: ["initial", "collapsed", "expanded", "initialMobile", "collapsedMobile", "expandedMobile", "direction", "state"] }, { kind: "component", type: i1$1.FeatureDetailsComponent, selector: "igo-feature-details", inputs: ["source", "map", "toolbox", "feature"], outputs: ["routeEvent", "selectFeature", "htmlDisplayEvent"] }, { kind: "pipe", type: i9$1.TranslatePipe, name: "translate" }] });
3479
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SidenavComponent, deps: [{ token: i1$3.Title }], target: i0.ɵɵFactoryTarget.Component });
3480
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: SidenavComponent, isStandalone: true, selector: "igo-sidenav", inputs: { map: "map", opened: "opened", feature: "feature", tool: "tool", media: "media", title: "title" }, ngImport: i0, template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"menu\"></mat-icon>\n </button>\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n <igo-panel [title]=\"featureTitle\" *ngIf=\"feature && media !== 'mobile'\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon\n [svgIcon]=\"\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n \"\n ></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n *ngIf=\"feature.geometry\"\n >\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\n </button>\n\n <igo-feature-details\n [feature]=\"feature\"\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\"\n >\n </igo-feature-details>\n </igo-panel>\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav{width:calc(100% - 45px)}}.igo-sidenav-content{margin-top:50px;height:calc(100% - 50px)}igo-feature-details ::ng-deep table{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2$2.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: FlexibleComponent, selector: "igo-flexible", inputs: ["initial", "collapsed", "expanded", "initialMobile", "collapsedMobile", "expandedMobile", "direction", "state"] }, { kind: "component", type: PanelComponent, selector: "igo-panel", inputs: ["title", "withHeader", "cursorPointer"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FeatureDetailsComponent, selector: "igo-feature-details", inputs: ["source", "map", "toolbox", "feature"], outputs: ["routeEvent", "selectFeature", "htmlDisplayEvent"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
3513
3481
  }
3514
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SidenavComponent, decorators: [{
3482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SidenavComponent, decorators: [{
3515
3483
  type: Component,
3516
- args: [{ selector: 'igo-sidenav', template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"menu\"></mat-icon>\n </button>\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n <igo-panel [title]=\"featureTitle\" *ngIf=\"feature && media !== 'mobile'\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon\n [svgIcon]=\"\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n \"\n ></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n *ngIf=\"feature.geometry\"\n >\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\n </button>\n\n <igo-feature-details\n [feature]=\"feature\"\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\"\n >\n </igo-feature-details>\n </igo-panel>\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav{width:calc(100% - 45px)}}.igo-sidenav-content{margin-top:50px;height:calc(100% - 50px)}igo-feature-details ::ng-deep table{width:100%}\n"] }]
3517
- }], ctorParameters: function () { return [{ type: i1$4.Title }]; }, propDecorators: { map: [{
3484
+ args: [{ selector: 'igo-sidenav', standalone: true, imports: [
3485
+ MatSidenavModule,
3486
+ FlexibleComponent,
3487
+ PanelComponent,
3488
+ NgIf,
3489
+ MatButtonModule,
3490
+ MatTooltipModule,
3491
+ MatIconModule,
3492
+ FeatureDetailsComponent,
3493
+ TranslateModule
3494
+ ], template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n *ngIf=\"tool\"\n >\n <mat-icon svgIcon=\"menu\"></mat-icon>\n </button>\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n <igo-panel [title]=\"featureTitle\" *ngIf=\"feature && media !== 'mobile'\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon\n [svgIcon]=\"\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n \"\n ></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n *ngIf=\"feature.geometry\"\n >\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\n </button>\n\n <igo-feature-details\n [feature]=\"feature\"\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\"\n >\n </igo-feature-details>\n </igo-panel>\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav{width:calc(100% - 45px)}}.igo-sidenav-content{margin-top:50px;height:calc(100% - 50px)}igo-feature-details ::ng-deep table{width:100%}\n"] }]
3495
+ }], ctorParameters: () => [{ type: i1$3.Title }], propDecorators: { map: [{
3518
3496
  type: Input
3519
3497
  }], opened: [{
3520
3498
  type: Input
@@ -3528,77 +3506,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3528
3506
  type: Input
3529
3507
  }] } });
3530
3508
 
3509
+ /**
3510
+ * @deprecated import the SidenavComponent directly
3511
+ */
3531
3512
  class IgoSidenavModule {
3532
3513
  static forRoot() {
3533
3514
  return {
3534
3515
  ngModule: IgoSidenavModule
3535
3516
  };
3536
3517
  }
3537
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3538
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoSidenavModule, declarations: [SidenavComponent], imports: [CommonModule,
3539
- MatIconModule,
3540
- MatButtonModule,
3541
- MatSidenavModule,
3542
- MatTooltipModule,
3543
- IgoLanguageModule,
3544
- IgoPanelModule,
3545
- IgoFlexibleModule,
3546
- IgoFeatureModule,
3547
- IgoContextManagerModule], exports: [SidenavComponent] });
3548
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoSidenavModule, imports: [CommonModule,
3549
- MatIconModule,
3550
- MatButtonModule,
3551
- MatSidenavModule,
3552
- MatTooltipModule,
3553
- IgoLanguageModule,
3554
- IgoPanelModule,
3555
- IgoFlexibleModule,
3556
- IgoFeatureModule,
3557
- IgoContextManagerModule] });
3518
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3519
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent], exports: [SidenavComponent] });
3520
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent] });
3558
3521
  }
3559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoSidenavModule, decorators: [{
3522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoSidenavModule, decorators: [{
3560
3523
  type: NgModule,
3561
3524
  args: [{
3562
- imports: [
3563
- CommonModule,
3564
- MatIconModule,
3565
- MatButtonModule,
3566
- MatSidenavModule,
3567
- MatTooltipModule,
3568
- IgoLanguageModule,
3569
- IgoPanelModule,
3570
- IgoFlexibleModule,
3571
- IgoFeatureModule,
3572
- IgoContextManagerModule
3573
- ],
3574
- exports: [SidenavComponent],
3575
- declarations: [SidenavComponent]
3525
+ imports: [SidenavComponent],
3526
+ exports: [SidenavComponent]
3576
3527
  }]
3577
3528
  }] });
3578
3529
 
3530
+ /**
3531
+ * @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set
3532
+ */
3579
3533
  class IgoContextModule {
3580
3534
  static forRoot() {
3581
3535
  return {
3582
- ngModule: IgoContextModule,
3583
- providers: []
3536
+ ngModule: IgoContextModule
3584
3537
  };
3585
3538
  }
3586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3587
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: IgoContextModule, imports: [MatInputModule, MatFormFieldModule, MatMenuModule], exports: [IgoContextImportExportModule,
3539
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3540
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: IgoContextModule, exports: [IgoContextImportExportModule,
3588
3541
  IgoContextManagerModule,
3589
3542
  IgoContextMapButtonModule,
3590
3543
  IgoShareMapModule,
3591
3544
  IgoSidenavModule] });
3592
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextModule, imports: [MatInputModule, MatFormFieldModule, MatMenuModule, IgoContextImportExportModule,
3545
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextModule, imports: [IgoContextImportExportModule,
3593
3546
  IgoContextManagerModule,
3594
3547
  IgoContextMapButtonModule,
3595
3548
  IgoShareMapModule,
3596
3549
  IgoSidenavModule] });
3597
3550
  }
3598
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IgoContextModule, decorators: [{
3551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: IgoContextModule, decorators: [{
3599
3552
  type: NgModule,
3600
3553
  args: [{
3601
- imports: [MatInputModule, MatFormFieldModule, MatMenuModule],
3602
3554
  declarations: [],
3603
3555
  exports: [
3604
3556
  IgoContextImportExportModule,
@@ -3610,6 +3562,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3610
3562
  }]
3611
3563
  }] });
3612
3564
 
3565
+ const CONTEXT_MANAGER_DIRECTIVES = [
3566
+ ContextListComponent,
3567
+ ContextListBindingDirective,
3568
+ ContextItemComponent,
3569
+ ContextFormComponent,
3570
+ ContextEditComponent,
3571
+ ContextEditBindingDirective,
3572
+ ContextPermissionsComponent,
3573
+ ContextPermissionsBindingDirective,
3574
+ MapContextDirective,
3575
+ LayerContextDirective
3576
+ ];
3577
+
3578
+ const CONTEXT_MAP_BUTTON_DIRECTIVES = [
3579
+ BookmarkButtonComponent,
3580
+ BookmarkDialogComponent,
3581
+ PoiButtonComponent,
3582
+ UserButtonComponent
3583
+ ];
3584
+
3585
+ const SHARE_MAP_DIRECTIVES = [
3586
+ ShareMapComponent,
3587
+ ShareMapUrlComponent,
3588
+ ShareMapApiComponent
3589
+ ];
3590
+
3613
3591
  /*
3614
3592
  * Public API Surface of context
3615
3593
  */
@@ -3618,5 +3596,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3618
3596
  * Generated bundle index. Do not edit.
3619
3597
  */
3620
3598
 
3621
- export { BookmarkButtonComponent, BookmarkDialogComponent, ContextEditBindingDirective, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListBindingDirective, ContextListComponent, ContextPermissionsBindingDirective, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, Scope, ShareMapApiComponent, ShareMapComponent, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, computeLayerTitleFromFile, getFileExtension, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError };
3599
+ export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditBindingDirective, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListBindingDirective, ContextListComponent, ContextPermissionsBindingDirective, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, Scope, ShareMapApiComponent, ShareMapComponent, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, computeLayerTitleFromFile, getFileExtension, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError };
3622
3600
  //# sourceMappingURL=igo2-context.mjs.map