@igo2/context 20.1.0-next.9 → 20.1.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.
- package/fesm2022/igo2-context.mjs +459 -405
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +199 -273
- package/locale/en.context.json +1 -0
- package/locale/fr.context.json +1 -0
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, input, Component, NgModule, output,
|
|
2
|
+
import { inject, Injectable, input, Component, NgModule, output, computed, Directive, ChangeDetectionStrategy, viewChild, model, Input, DestroyRef, signal, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import { DOCUMENT, AsyncPipe, NgClass, KeyValuePipe } from '@angular/common';
|
|
4
|
-
import * as
|
|
4
|
+
import * as i1$1 from '@angular/forms';
|
|
5
5
|
import { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
|
|
6
6
|
import * as i4 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -9,17 +9,17 @@ import * as i1 from '@angular/material/button-toggle';
|
|
|
9
9
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
10
10
|
import { MatOptionModule } from '@angular/material/core';
|
|
11
11
|
import { MatDividerModule } from '@angular/material/divider';
|
|
12
|
-
import * as i1$
|
|
12
|
+
import * as i1$2 from '@angular/material/form-field';
|
|
13
13
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
14
|
-
import * as i2
|
|
14
|
+
import * as i2 from '@angular/material/input';
|
|
15
15
|
import { MatInputModule } from '@angular/material/input';
|
|
16
|
-
import * as
|
|
16
|
+
import * as i5 from '@angular/material/select';
|
|
17
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
18
18
|
import { SpinnerComponent } from '@igo2/common/spinner';
|
|
19
19
|
import { ConfigService } from '@igo2/core/config';
|
|
20
20
|
import { LanguageService, IgoLanguageModule } from '@igo2/core/language';
|
|
21
21
|
import { MessageService } from '@igo2/core/message';
|
|
22
|
-
import { BehaviorSubject, Subject, of, Observable, ReplaySubject, timer, EMPTY, combineLatest } from 'rxjs';
|
|
22
|
+
import { BehaviorSubject, Subject, of, Observable, ReplaySubject, timer, catchError as catchError$1, tap as tap$1, switchMap as switchMap$1, map as map$1, EMPTY, combineLatest } from 'rxjs';
|
|
23
23
|
import { skip, first, catchError, tap, map, mergeMap, debounceTime, take, switchMap, filter, debounce } from 'rxjs/operators';
|
|
24
24
|
import { HttpParams, HttpClient } from '@angular/common/http';
|
|
25
25
|
import { AuthService } from '@igo2/auth';
|
|
@@ -31,15 +31,16 @@ import GeoJSON from 'ol/format/GeoJSON';
|
|
|
31
31
|
import olPoint from 'ol/geom/Point';
|
|
32
32
|
import Cluster from 'ol/source/Cluster';
|
|
33
33
|
import olVectorSource from 'ol/source/Vector';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i2$1 from '@angular/material/autocomplete';
|
|
35
35
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
36
|
-
import * as
|
|
36
|
+
import * as i3 from '@angular/material/list';
|
|
37
37
|
import { MatListModule } from '@angular/material/list';
|
|
38
38
|
import * as i5$1 from '@ngx-translate/core';
|
|
39
|
+
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
39
40
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
40
|
-
import * as
|
|
41
|
+
import * as i3$1 from '@angular/material/icon';
|
|
41
42
|
import { MatIconModule } from '@angular/material/icon';
|
|
42
|
-
import * as i6
|
|
43
|
+
import * as i6 from '@angular/material/tooltip';
|
|
43
44
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
44
45
|
import { MediaService } from '@igo2/core/media';
|
|
45
46
|
import * as i5$2 from '@angular/material/menu';
|
|
@@ -51,15 +52,16 @@ import { MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDi
|
|
|
51
52
|
import { ActionStore, ActionbarMode, ActionbarComponent } from '@igo2/common/action';
|
|
52
53
|
import { CollapsibleComponent } from '@igo2/common/collapsible';
|
|
53
54
|
import { ConfirmDialogService } from '@igo2/common/confirm-dialog';
|
|
55
|
+
import { SORT_ALPHA_ON_ICON, SORT_ALPHA_OFF_ICON, IgoIconComponent } from '@igo2/common/icon';
|
|
54
56
|
import { ListComponent, ListItemDirective } from '@igo2/common/list';
|
|
55
|
-
import * as
|
|
57
|
+
import * as i6$1 from '@angular/material/radio';
|
|
56
58
|
import { MatRadioModule } from '@angular/material/radio';
|
|
57
59
|
import * as oleasing from 'ol/easing';
|
|
58
60
|
import * as olproj from 'ol/proj';
|
|
59
|
-
import { trigger, state,
|
|
61
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
60
62
|
import { CustomHtmlComponent } from '@igo2/common/custom-html';
|
|
61
63
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
62
|
-
import * as i1$
|
|
64
|
+
import * as i1$3 from '@angular/material/sidenav';
|
|
63
65
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
64
66
|
import { Title } from '@angular/platform-browser';
|
|
65
67
|
import { getEntityTitle } from '@igo2/common/entity';
|
|
@@ -160,8 +162,14 @@ function shareMapKeyDefs(options) {
|
|
|
160
162
|
},
|
|
161
163
|
names: {
|
|
162
164
|
key: 'n',
|
|
163
|
-
parse: (params) =>
|
|
164
|
-
|
|
165
|
+
parse: (params) => {
|
|
166
|
+
const param = extractParam(params, 'n');
|
|
167
|
+
if (!param)
|
|
168
|
+
return undefined;
|
|
169
|
+
const unbracketed = param.slice(1, -1);
|
|
170
|
+
return decodeURIComponent(unbracketed);
|
|
171
|
+
},
|
|
172
|
+
stringify: (value) => `[${encodeURIComponent(value)}]`
|
|
165
173
|
},
|
|
166
174
|
opacity: {
|
|
167
175
|
key: 'o',
|
|
@@ -206,7 +214,14 @@ function shareMapKeyDefs(options) {
|
|
|
206
214
|
key: 'pid',
|
|
207
215
|
parse: (params) => extractIdParam(params, 'pid')
|
|
208
216
|
},
|
|
209
|
-
title: {
|
|
217
|
+
title: {
|
|
218
|
+
key: 't',
|
|
219
|
+
parse: (params) => {
|
|
220
|
+
const param = extractParam(params, 't');
|
|
221
|
+
return param ? decodeURIComponent(param) : undefined;
|
|
222
|
+
},
|
|
223
|
+
stringify: (value) => encodeURIComponent(value)
|
|
224
|
+
},
|
|
210
225
|
visible: {
|
|
211
226
|
key: 'v',
|
|
212
227
|
parse: (params) => parseBooleanParam(params, 'v'),
|
|
@@ -379,10 +394,10 @@ function hasLegacyParams(params, optionsLegacy) {
|
|
|
379
394
|
return legacyPairs.some(([layer, url]) => getParamValue(params, layer) && getParamValue(params, url));
|
|
380
395
|
}
|
|
381
396
|
function hasModernShareParams(params, keysDefinitions) {
|
|
382
|
-
const {
|
|
397
|
+
const { contextKey, groups } = keysDefinitions;
|
|
383
398
|
const hasGroups = !!getParamValue(params, groups.key);
|
|
384
|
-
const
|
|
385
|
-
return
|
|
399
|
+
const hasContext = !!getParamValue(params, contextKey);
|
|
400
|
+
return hasContext || hasGroups;
|
|
386
401
|
}
|
|
387
402
|
function getParamValue(params, key) {
|
|
388
403
|
const value = params[key];
|
|
@@ -404,9 +419,11 @@ class ShareMapEncoder {
|
|
|
404
419
|
map.layerController.baseLayer,
|
|
405
420
|
...map.layerController.layersFlattened
|
|
406
421
|
].filter(Boolean);
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
|
|
422
|
+
const urlParams = this.getBaseUrlConfig(map.viewController);
|
|
423
|
+
this.buildQueryUrl(layers, urlParams);
|
|
424
|
+
const [baseUrl] = this.document.location.href.split('?');
|
|
425
|
+
const queryString = urlParams.toString();
|
|
426
|
+
return queryString !== '' ? `${baseUrl}?${queryString}` : baseUrl;
|
|
410
427
|
}
|
|
411
428
|
/**
|
|
412
429
|
* Replaces local group IDs with unique IDs to avoid conflicts and have short URL.
|
|
@@ -461,15 +478,23 @@ class ShareMapEncoder {
|
|
|
461
478
|
getLayerItems(layers) {
|
|
462
479
|
return layers.filter(isLayerItem);
|
|
463
480
|
}
|
|
464
|
-
buildQueryUrl(layers) {
|
|
481
|
+
buildQueryUrl(layers, urlParams) {
|
|
465
482
|
const layersSharable = this.isLayerSharable(layers);
|
|
466
483
|
this.replaceGroupLocalIds(layersSharable);
|
|
467
484
|
const layersChanged = this.getFilteredMapLayers(layersSharable);
|
|
468
485
|
const groups = this.getLayerGroups(layersChanged);
|
|
469
|
-
const
|
|
486
|
+
const groupsQueryValue = this.buildGroupsQueryValue(groups);
|
|
470
487
|
const layersByService = this.generateLayersOptionsByService(this.getLayerItems(layersChanged));
|
|
471
|
-
const
|
|
472
|
-
|
|
488
|
+
const [urls, layerParams] = this.buildLayersQueryValues(layersByService);
|
|
489
|
+
if (urls.length > 0) {
|
|
490
|
+
urlParams.set(this.SHARE_MAP_DEFS.urlsKey, urls.join(','));
|
|
491
|
+
}
|
|
492
|
+
if (layerParams.length > 0) {
|
|
493
|
+
urlParams.set(this.SHARE_MAP_DEFS.layers.key, layerParams.join(';'));
|
|
494
|
+
}
|
|
495
|
+
if (groupsQueryValue) {
|
|
496
|
+
urlParams.set(this.SHARE_MAP_DEFS.groups.key, groupsQueryValue);
|
|
497
|
+
}
|
|
473
498
|
}
|
|
474
499
|
/**
|
|
475
500
|
* Retrieves the current context layers and maps them by identifier.
|
|
@@ -592,7 +617,9 @@ class ShareMapEncoder {
|
|
|
592
617
|
}
|
|
593
618
|
getLayerParams(layer) {
|
|
594
619
|
const dataSourceOptions = layer.dataSource.options;
|
|
595
|
-
const isExisting = this.
|
|
620
|
+
const isExisting = this.context?.layers
|
|
621
|
+
? this.hasLayerId(this.context.layers, layer.id)
|
|
622
|
+
: false;
|
|
596
623
|
return {
|
|
597
624
|
index: undefined,
|
|
598
625
|
...(isExisting
|
|
@@ -629,10 +656,7 @@ class ShareMapEncoder {
|
|
|
629
656
|
getVisibility(visibility) {
|
|
630
657
|
return !!visibility;
|
|
631
658
|
}
|
|
632
|
-
|
|
633
|
-
if (layersByService.length === 0)
|
|
634
|
-
return undefined;
|
|
635
|
-
const { urlsKey, layers } = this.SHARE_MAP_DEFS;
|
|
659
|
+
buildLayersQueryValues(layersByService) {
|
|
636
660
|
const urls = [];
|
|
637
661
|
const layerParams = [];
|
|
638
662
|
for (const [url, layer] of layersByService) {
|
|
@@ -648,14 +672,7 @@ class ShareMapEncoder {
|
|
|
648
672
|
urls.push(url);
|
|
649
673
|
}
|
|
650
674
|
}
|
|
651
|
-
|
|
652
|
-
return undefined;
|
|
653
|
-
const queryParts = [];
|
|
654
|
-
if (urls.length > 0) {
|
|
655
|
-
queryParts.push(`${urlsKey}=${urls.join(',')}`);
|
|
656
|
-
}
|
|
657
|
-
queryParts.push(`${layers.key}=${layerParams.join(';')}`);
|
|
658
|
-
return queryParts.join('&');
|
|
675
|
+
return [urls, layerParams];
|
|
659
676
|
}
|
|
660
677
|
stringifyLayerParams(params) {
|
|
661
678
|
const { index, ...restParams } = params;
|
|
@@ -667,34 +684,26 @@ class ShareMapEncoder {
|
|
|
667
684
|
getBaseUrlConfig(viewController) {
|
|
668
685
|
const { pos, contextKey, languageKey } = this.SHARE_MAP_DEFS;
|
|
669
686
|
const href = this.document.location.href;
|
|
670
|
-
const
|
|
671
|
-
const params = [];
|
|
687
|
+
const urlParams = this.getSanitizedParams(href);
|
|
672
688
|
if (pos) {
|
|
673
689
|
const positionStringified = this.stringifyPosition(this.getPosition(viewController));
|
|
674
|
-
|
|
690
|
+
urlParams.set(pos.key, positionStringified);
|
|
675
691
|
}
|
|
676
692
|
const contextUri = this.context?.uri;
|
|
677
693
|
if (contextUri)
|
|
678
|
-
|
|
679
|
-
if (this.language && !
|
|
680
|
-
|
|
681
|
-
return
|
|
694
|
+
urlParams.set(contextKey, contextUri);
|
|
695
|
+
if (this.language && !urlParams.has(languageKey))
|
|
696
|
+
urlParams.set(languageKey, this.language);
|
|
697
|
+
return urlParams;
|
|
682
698
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
return `${baseUrl}?`;
|
|
686
|
-
}
|
|
687
|
-
const keys = this.extractKeys(this.SHARE_MAP_DEFS);
|
|
688
|
-
const [base, queryString] = baseUrl.split('?');
|
|
699
|
+
getSanitizedParams(baseUrl) {
|
|
700
|
+
const [, queryString] = baseUrl.split('?');
|
|
689
701
|
const params = new URLSearchParams(queryString);
|
|
702
|
+
const keys = this.extractKeys(this.SHARE_MAP_DEFS);
|
|
690
703
|
keys.forEach((key) => {
|
|
691
704
|
params.delete(key);
|
|
692
705
|
});
|
|
693
|
-
|
|
694
|
-
if (newQueryString !== '') {
|
|
695
|
-
return `${base}?${newQueryString}&`;
|
|
696
|
-
}
|
|
697
|
-
return `${base}?`;
|
|
706
|
+
return params;
|
|
698
707
|
}
|
|
699
708
|
extractKeys(defs) {
|
|
700
709
|
const keys = [];
|
|
@@ -757,17 +766,15 @@ class ShareMapEncoder {
|
|
|
757
766
|
.join(',');
|
|
758
767
|
return result === '' ? undefined : result;
|
|
759
768
|
}
|
|
760
|
-
|
|
769
|
+
buildGroupsQueryValue(layers) {
|
|
761
770
|
if (layers.length === 0)
|
|
762
771
|
return undefined;
|
|
763
|
-
|
|
764
|
-
const queryUrl = layers
|
|
772
|
+
return layers
|
|
765
773
|
.map((layer) => {
|
|
766
774
|
const params = this.getLayerGroupParams(layer);
|
|
767
775
|
return this.stringifyGroupParams(params);
|
|
768
776
|
})
|
|
769
777
|
.join(';');
|
|
770
|
-
return `${key}=${queryUrl}`;
|
|
771
778
|
}
|
|
772
779
|
getLayerGroupParams(layer) {
|
|
773
780
|
return {
|
|
@@ -990,7 +997,7 @@ class ShareMapParser {
|
|
|
990
997
|
return value ? value.split(delimiter) : [];
|
|
991
998
|
}
|
|
992
999
|
parsePosition(params) {
|
|
993
|
-
const position = params[this.keysDefinitions.pos.key];
|
|
1000
|
+
const position = decodeURIComponent(params[this.keysDefinitions.pos.key]);
|
|
994
1001
|
if (!position) {
|
|
995
1002
|
return this.legacy.parsePosition(params);
|
|
996
1003
|
}
|
|
@@ -1069,7 +1076,7 @@ class ShareMapParser {
|
|
|
1069
1076
|
if (!matches)
|
|
1070
1077
|
return undefined;
|
|
1071
1078
|
return matches
|
|
1072
|
-
.map((match) => match.slice(1, -`]${names.key}`.length))
|
|
1079
|
+
.map((match) => decodeURIComponent(match.slice(1, -`]${names.key}`.length)))
|
|
1073
1080
|
.join('\n')
|
|
1074
1081
|
.split(',');
|
|
1075
1082
|
}
|
|
@@ -1088,7 +1095,16 @@ class ShareMapParser {
|
|
|
1088
1095
|
class ShareMapService {
|
|
1089
1096
|
routeService = inject(RouteService);
|
|
1090
1097
|
document = inject(DOCUMENT);
|
|
1091
|
-
language
|
|
1098
|
+
get language() {
|
|
1099
|
+
return this._language;
|
|
1100
|
+
}
|
|
1101
|
+
set language(value) {
|
|
1102
|
+
this._language = value;
|
|
1103
|
+
if (this.encoder) {
|
|
1104
|
+
this.encoder.language = value;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
_language = '';
|
|
1092
1108
|
options;
|
|
1093
1109
|
optionsLegacy;
|
|
1094
1110
|
keysDefinitions;
|
|
@@ -1107,23 +1123,41 @@ class ShareMapService {
|
|
|
1107
1123
|
const language = params[this.keysDefinitions.languageKey];
|
|
1108
1124
|
if (language) {
|
|
1109
1125
|
this.language = language;
|
|
1110
|
-
this.encoder.language = language;
|
|
1111
1126
|
}
|
|
1112
1127
|
});
|
|
1113
1128
|
}
|
|
1129
|
+
generateUrl(map, context) {
|
|
1130
|
+
return this.encoder.generateUrl(map, context);
|
|
1131
|
+
}
|
|
1132
|
+
parsePosition(params) {
|
|
1133
|
+
return this.parser.parsePosition(params);
|
|
1134
|
+
}
|
|
1135
|
+
parseLayers(params) {
|
|
1136
|
+
return this.parser.parseLayers(params);
|
|
1137
|
+
}
|
|
1138
|
+
sanitizeBaseUrl(baseUrl) {
|
|
1139
|
+
const params = this.encoder.getSanitizedParams(baseUrl);
|
|
1140
|
+
const [base] = baseUrl.split('?');
|
|
1141
|
+
const queryString = params.toString();
|
|
1142
|
+
return queryString !== '' ? `${base}?${queryString}&` : `${base}?`;
|
|
1143
|
+
}
|
|
1114
1144
|
getContext(params) {
|
|
1115
1145
|
return (params[this.options.context] ?? params[this.optionsLegacy.contextKey]);
|
|
1116
1146
|
}
|
|
1117
1147
|
getZoom(params) {
|
|
1118
|
-
return this.
|
|
1148
|
+
return this.parsePosition(params).zoom;
|
|
1119
1149
|
}
|
|
1120
1150
|
getUrlWithApi(formValues) {
|
|
1121
1151
|
const loc = this.document.location;
|
|
1122
1152
|
const origin = loc.origin;
|
|
1123
1153
|
const pathname = loc.pathname;
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1154
|
+
const search = loc.search;
|
|
1155
|
+
const params = new URLSearchParams(search);
|
|
1156
|
+
params.set('context', formValues.uri);
|
|
1157
|
+
if (this.language) {
|
|
1158
|
+
params.set('lang', this.language);
|
|
1159
|
+
}
|
|
1160
|
+
return `${origin}${pathname}?${params.toString()}`;
|
|
1127
1161
|
}
|
|
1128
1162
|
hasPositionParams(params) {
|
|
1129
1163
|
const { projectionKey, rotationKey, zoomKey, centerKey } = this.optionsLegacy;
|
|
@@ -1134,29 +1168,16 @@ class ShareMapService {
|
|
|
1134
1168
|
params[zoomKey] ||
|
|
1135
1169
|
params[centerKey]);
|
|
1136
1170
|
}
|
|
1137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1138
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1172
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapService, providedIn: 'root' });
|
|
1139
1173
|
}
|
|
1140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapService, decorators: [{
|
|
1141
1175
|
type: Injectable,
|
|
1142
1176
|
args: [{
|
|
1143
1177
|
providedIn: 'root'
|
|
1144
1178
|
}]
|
|
1145
1179
|
}], ctorParameters: () => [] });
|
|
1146
1180
|
|
|
1147
|
-
var TypePermission;
|
|
1148
|
-
(function (TypePermission) {
|
|
1149
|
-
TypePermission[TypePermission["null"] = 0] = "null";
|
|
1150
|
-
TypePermission[TypePermission["read"] = 1] = "read";
|
|
1151
|
-
TypePermission[TypePermission["write"] = 2] = "write";
|
|
1152
|
-
})(TypePermission || (TypePermission = {}));
|
|
1153
|
-
var Scope;
|
|
1154
|
-
(function (Scope) {
|
|
1155
|
-
Scope[Scope["public"] = 0] = "public";
|
|
1156
|
-
Scope[Scope["protected"] = 1] = "protected";
|
|
1157
|
-
Scope[Scope["private"] = 2] = "private";
|
|
1158
|
-
})(Scope || (Scope = {}));
|
|
1159
|
-
|
|
1160
1181
|
class ContextService {
|
|
1161
1182
|
http = inject(HttpClient);
|
|
1162
1183
|
authService = inject(AuthService);
|
|
@@ -1232,6 +1253,13 @@ class ContextService {
|
|
|
1232
1253
|
throw res;
|
|
1233
1254
|
}));
|
|
1234
1255
|
}
|
|
1256
|
+
getDetailsByUri(uri) {
|
|
1257
|
+
const url = `${this.baseUrl}/contexts/uri/${uri}/details`;
|
|
1258
|
+
return this.http.get(url).pipe(catchError((res) => {
|
|
1259
|
+
this.handleError(res, uri);
|
|
1260
|
+
throw res;
|
|
1261
|
+
}));
|
|
1262
|
+
}
|
|
1235
1263
|
getDefault() {
|
|
1236
1264
|
if (this.authService.authenticated) {
|
|
1237
1265
|
const url = this.baseUrl + '/contexts/default';
|
|
@@ -1257,10 +1285,19 @@ class ContextService {
|
|
|
1257
1285
|
const url = this.baseUrl + '/contexts/default';
|
|
1258
1286
|
return this.http.post(url, { defaultContextId: id });
|
|
1259
1287
|
}
|
|
1288
|
+
else {
|
|
1289
|
+
return this.setDefaultLocalStorage(id);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
setDefaultLocalStorage(id) {
|
|
1293
|
+
const selectedId = this.storageService.get('favorite.context.uri');
|
|
1294
|
+
if (selectedId === id) {
|
|
1295
|
+
this.storageService.remove('favorite.context.uri');
|
|
1296
|
+
}
|
|
1260
1297
|
else {
|
|
1261
1298
|
this.storageService.set('favorite.context.uri', id);
|
|
1262
|
-
return of(undefined);
|
|
1263
1299
|
}
|
|
1300
|
+
return of(selectedId === id ? undefined : id);
|
|
1264
1301
|
}
|
|
1265
1302
|
hideContext(id) {
|
|
1266
1303
|
const url = this.baseUrl + '/contexts/' + id + '/hide';
|
|
@@ -1273,10 +1310,6 @@ class ContextService {
|
|
|
1273
1310
|
delete(id, imported = false) {
|
|
1274
1311
|
const contexts = { ours: [] };
|
|
1275
1312
|
Object.keys(this.contexts$.value).forEach((key) => (contexts[key] = this.contexts$.value[key].filter((c) => c.id !== id)));
|
|
1276
|
-
if (id === this.context$.value?.id) {
|
|
1277
|
-
this.context$.next(undefined);
|
|
1278
|
-
this.loadContext(this.defaultContextUri);
|
|
1279
|
-
}
|
|
1280
1313
|
if (imported) {
|
|
1281
1314
|
this.importedContext = this.importedContext.filter((c) => c.id !== id);
|
|
1282
1315
|
return of(this.contexts$.next(contexts));
|
|
@@ -1284,16 +1317,17 @@ class ContextService {
|
|
|
1284
1317
|
const url = this.baseUrl + '/contexts/' + id;
|
|
1285
1318
|
return this.http.delete(url).pipe(tap(() => {
|
|
1286
1319
|
this.contexts$.next(contexts);
|
|
1320
|
+
this.loadContext(this.defaultContextUri);
|
|
1287
1321
|
}));
|
|
1288
1322
|
}
|
|
1289
1323
|
create(context) {
|
|
1290
1324
|
const url = this.baseUrl + '/contexts';
|
|
1291
1325
|
return this.http.post(url, context).pipe(map((contextCreated) => {
|
|
1292
1326
|
if (this.authService.authenticated) {
|
|
1293
|
-
contextCreated.permission =
|
|
1327
|
+
contextCreated.permission = 'write';
|
|
1294
1328
|
}
|
|
1295
1329
|
else {
|
|
1296
|
-
contextCreated.permission =
|
|
1330
|
+
contextCreated.permission = 'read';
|
|
1297
1331
|
}
|
|
1298
1332
|
this.contexts$.value.ours.unshift(contextCreated);
|
|
1299
1333
|
this.contexts$.next(this.contexts$.value);
|
|
@@ -1303,7 +1337,7 @@ class ContextService {
|
|
|
1303
1337
|
clone(id, properties = {}) {
|
|
1304
1338
|
const url = this.baseUrl + '/contexts/' + id + '/clone';
|
|
1305
1339
|
return this.http.post(url, properties).pipe(map((contextCloned) => {
|
|
1306
|
-
contextCloned.permission =
|
|
1340
|
+
contextCloned.permission = 'write';
|
|
1307
1341
|
this.contexts$.value.ours.unshift(contextCloned);
|
|
1308
1342
|
this.contexts$.next(this.contexts$.value);
|
|
1309
1343
|
return contextCloned;
|
|
@@ -1325,25 +1359,6 @@ class ContextService {
|
|
|
1325
1359
|
const url = `${this.baseUrl}/contexts/${contextId}/tools/${toolId}`;
|
|
1326
1360
|
return this.http.delete(url);
|
|
1327
1361
|
}
|
|
1328
|
-
getPermissions(id) {
|
|
1329
|
-
const url = this.baseUrl + '/contexts/' + id + '/permissions';
|
|
1330
|
-
return this.http.get(url);
|
|
1331
|
-
}
|
|
1332
|
-
addPermissionAssociation(contextId, profil, type) {
|
|
1333
|
-
const url = `${this.baseUrl}/contexts/${contextId}/permissions`;
|
|
1334
|
-
const association = {
|
|
1335
|
-
profil,
|
|
1336
|
-
typePermission: type
|
|
1337
|
-
};
|
|
1338
|
-
return this.http.post(url, association).pipe(catchError((res) => {
|
|
1339
|
-
this.handleError(res, undefined, true);
|
|
1340
|
-
throw [res]; // TODO Not sure about this.
|
|
1341
|
-
}));
|
|
1342
|
-
}
|
|
1343
|
-
deletePermissionAssociation(contextId, permissionId) {
|
|
1344
|
-
const url = `${this.baseUrl}/contexts/${contextId}/permissions/${permissionId}`;
|
|
1345
|
-
return this.http.delete(url);
|
|
1346
|
-
}
|
|
1347
1362
|
// ======================================================================
|
|
1348
1363
|
getLocalContexts() {
|
|
1349
1364
|
const url = this.getPath(this.options.contextListFile);
|
|
@@ -1398,13 +1413,16 @@ class ContextService {
|
|
|
1398
1413
|
loadDefaultContext() {
|
|
1399
1414
|
const loadFct = (direct = false) => {
|
|
1400
1415
|
if (!direct && this.baseUrl && this.authService.authenticated) {
|
|
1401
|
-
this.getDefault().subscribe(
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1416
|
+
this.getDefault().subscribe({
|
|
1417
|
+
next: (_context) => {
|
|
1418
|
+
this.defaultContextUri = _context.uri;
|
|
1419
|
+
this.addContextToList(_context);
|
|
1420
|
+
this.setContext(_context);
|
|
1421
|
+
},
|
|
1422
|
+
error: () => {
|
|
1423
|
+
this.defaultContextId$.next(undefined);
|
|
1424
|
+
this.loadContext(this.defaultContextUri);
|
|
1425
|
+
}
|
|
1408
1426
|
});
|
|
1409
1427
|
}
|
|
1410
1428
|
else {
|
|
@@ -1610,9 +1628,9 @@ class ContextService {
|
|
|
1610
1628
|
if (contextToLoad && contextToLoad.imported) {
|
|
1611
1629
|
return of(contextToLoad);
|
|
1612
1630
|
}
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1631
|
+
return contextToLoad
|
|
1632
|
+
? this.getDetails(contextToLoad.id)
|
|
1633
|
+
: this.getDetailsByUri(uri);
|
|
1616
1634
|
}
|
|
1617
1635
|
const importedContext = this.contexts$.value.ours.find((currentContext) => {
|
|
1618
1636
|
return currentContext.uri === uri && currentContext.imported === true;
|
|
@@ -1676,7 +1694,7 @@ class ContextService {
|
|
|
1676
1694
|
uri: context.uri,
|
|
1677
1695
|
title: context.title,
|
|
1678
1696
|
scope: context.scope,
|
|
1679
|
-
permission:
|
|
1697
|
+
permission: 'read'
|
|
1680
1698
|
};
|
|
1681
1699
|
if (this.contexts$.value && this.contexts$.value.public) {
|
|
1682
1700
|
this.contexts$.value.public.push(contextSimplifie);
|
|
@@ -1700,10 +1718,10 @@ class ContextService {
|
|
|
1700
1718
|
}
|
|
1701
1719
|
return found;
|
|
1702
1720
|
}
|
|
1703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1722
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextService, providedIn: 'root' });
|
|
1705
1723
|
}
|
|
1706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextService, decorators: [{
|
|
1707
1725
|
type: Injectable,
|
|
1708
1726
|
args: [{
|
|
1709
1727
|
providedIn: 'root'
|
|
@@ -1748,10 +1766,10 @@ class ContextExportService {
|
|
|
1748
1766
|
}
|
|
1749
1767
|
return false;
|
|
1750
1768
|
}
|
|
1751
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1752
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1769
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1770
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextExportService, providedIn: 'root' });
|
|
1753
1771
|
}
|
|
1754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextExportService, decorators: [{
|
|
1755
1773
|
type: Injectable,
|
|
1756
1774
|
args: [{
|
|
1757
1775
|
providedIn: 'root'
|
|
@@ -2015,10 +2033,10 @@ class ContextImportService {
|
|
|
2015
2033
|
const context = JSON.parse(data);
|
|
2016
2034
|
return context;
|
|
2017
2035
|
}
|
|
2018
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2019
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2036
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextImportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2037
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextImportService, providedIn: 'root' });
|
|
2020
2038
|
}
|
|
2021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextImportService, decorators: [{
|
|
2022
2040
|
type: Injectable,
|
|
2023
2041
|
args: [{
|
|
2024
2042
|
providedIn: 'root'
|
|
@@ -2113,10 +2131,10 @@ class ContextImportExportComponent {
|
|
|
2113
2131
|
onImportExportChange(event) {
|
|
2114
2132
|
this.activeImportExport = event.value;
|
|
2115
2133
|
}
|
|
2116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextImportExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2135
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextImportExportComponent, isStandalone: true, selector: "igo-context-import-export", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"import-export-toggle\">\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@if (activeImportExport === 'import') {\n <div>\n <form class=\"igo-form\">\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\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\" />\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = null\"\n (change)=\"importFiles($any($event.target).files)\"\n />\n </div>\n </form>\n <section>\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\n@if (activeImportExport === 'export') {\n <form class=\"igo-form\" [formGroup]=\"form\">\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'\n | translate\n }}\n </mat-option>\n <mat-divider />\n @for (layer of userControlledLayerList; track layer) {\n <mat-option [value]=\"layer\">{{ layer.title }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\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\" />\n </div>\n </form>\n}\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: i1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: SpinnerComponent, selector: "igo-spinner", inputs: ["shown"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
2118
2136
|
}
|
|
2119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextImportExportComponent, decorators: [{
|
|
2120
2138
|
type: Component,
|
|
2121
2139
|
args: [{ selector: 'igo-context-import-export', imports: [
|
|
2122
2140
|
MatButtonToggleModule,
|
|
@@ -2143,11 +2161,11 @@ class IgoContextImportExportModule {
|
|
|
2143
2161
|
ngModule: IgoContextImportExportModule
|
|
2144
2162
|
};
|
|
2145
2163
|
}
|
|
2146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2147
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2148
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2165
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent], exports: [ContextImportExportComponent] });
|
|
2166
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent] });
|
|
2149
2167
|
}
|
|
2150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
|
|
2151
2169
|
type: NgModule,
|
|
2152
2170
|
args: [{
|
|
2153
2171
|
imports: [ContextImportExportComponent],
|
|
@@ -2159,7 +2177,6 @@ class ContextFormComponent {
|
|
|
2159
2177
|
clipboard = inject(Clipboard);
|
|
2160
2178
|
formBuilder = inject(UntypedFormBuilder);
|
|
2161
2179
|
messageService = inject(MessageService);
|
|
2162
|
-
form;
|
|
2163
2180
|
prefix;
|
|
2164
2181
|
btnSubmitText = input(...(ngDevMode ? [undefined, { debugName: "btnSubmitText" }] : []));
|
|
2165
2182
|
context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
@@ -2167,14 +2184,13 @@ class ContextFormComponent {
|
|
|
2167
2184
|
submitForm = output();
|
|
2168
2185
|
clone = output();
|
|
2169
2186
|
delete = output();
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
}
|
|
2187
|
+
// WORKAROUND, the context-form is shown before the editedContext emit and we got change detection problem
|
|
2188
|
+
form = computed(() => {
|
|
2189
|
+
const context = this.context();
|
|
2190
|
+
if (context) {
|
|
2191
|
+
return this.buildForm(context);
|
|
2192
|
+
}
|
|
2193
|
+
}, ...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
2178
2194
|
handleFormSubmit(value) {
|
|
2179
2195
|
let inputs = Object.assign({}, value);
|
|
2180
2196
|
inputs = ObjectUtils.removeNull(inputs);
|
|
@@ -2188,7 +2204,7 @@ class ContextFormComponent {
|
|
|
2188
2204
|
this.submitForm.emit(inputs);
|
|
2189
2205
|
}
|
|
2190
2206
|
copyTextToClipboard() {
|
|
2191
|
-
const text = this.prefix + '-' + this.form.value.uri.replace(' ', '');
|
|
2207
|
+
const text = this.prefix + '-' + this.form().value.uri.replace(' ', '');
|
|
2192
2208
|
const successful = this.clipboard.copy(text);
|
|
2193
2209
|
if (successful) {
|
|
2194
2210
|
this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
|
|
@@ -2198,15 +2214,15 @@ class ContextFormComponent {
|
|
|
2198
2214
|
const uriSplit = context.uri.split('-');
|
|
2199
2215
|
this.prefix = uriSplit.shift();
|
|
2200
2216
|
const uri = uriSplit.join('-');
|
|
2201
|
-
|
|
2217
|
+
return this.formBuilder.group({
|
|
2202
2218
|
title: [context.title],
|
|
2203
2219
|
uri: [uri || ' ']
|
|
2204
2220
|
});
|
|
2205
2221
|
}
|
|
2206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2207
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2223
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextFormComponent, isStandalone: true, selector: "igo-context-form", inputs: { btnSubmitText: { classPropertyName: "btnSubmitText", publicName: "btnSubmitText", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitForm: "submitForm", clone: "clone", delete: "delete" }, ngImport: i0, template: "@let form = this.form();\n<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 @if (prefix) {\n <span class=\"prefix\">{{ prefix }}-</span>\n }\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>content_copy</mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"submit\"\n [disabled]=\"form.invalid || 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: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
2208
2224
|
}
|
|
2209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextFormComponent, decorators: [{
|
|
2210
2226
|
type: Component,
|
|
2211
2227
|
args: [{ selector: 'igo-context-form', imports: [
|
|
2212
2228
|
FormsModule,
|
|
@@ -2217,8 +2233,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2217
2233
|
MatTooltipModule,
|
|
2218
2234
|
MatIconModule,
|
|
2219
2235
|
IgoLanguageModule
|
|
2220
|
-
], 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 @if (prefix) {\n <span class=\"prefix\">{{ prefix }}-</span>\n }\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>content_copy</mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"submit\"\n [disabled]=\"
|
|
2221
|
-
}],
|
|
2236
|
+
], template: "@let form = this.form();\n<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 @if (prefix) {\n <span class=\"prefix\">{{ prefix }}-</span>\n }\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>content_copy</mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"submit\"\n [disabled]=\"form.invalid || 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"] }]
|
|
2237
|
+
}], propDecorators: { btnSubmitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "btnSubmitText", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], submitForm: [{ type: i0.Output, args: ["submitForm"] }], clone: [{ type: i0.Output, args: ["clone"] }], delete: [{ type: i0.Output, args: ["delete"] }] } });
|
|
2238
|
+
|
|
2239
|
+
const TypePermission = ['read', 'write'];
|
|
2240
|
+
var Scope;
|
|
2241
|
+
(function (Scope) {
|
|
2242
|
+
Scope[Scope["public"] = 0] = "public";
|
|
2243
|
+
Scope[Scope["protected"] = 1] = "protected";
|
|
2244
|
+
Scope[Scope["private"] = 2] = "private";
|
|
2245
|
+
})(Scope || (Scope = {}));
|
|
2222
2246
|
|
|
2223
2247
|
class LayerContextDirective {
|
|
2224
2248
|
component = inject(MapBrowserComponent);
|
|
@@ -2347,25 +2371,23 @@ class LayerContextDirective {
|
|
|
2347
2371
|
return visible;
|
|
2348
2372
|
}
|
|
2349
2373
|
handleContextWithSharedUrl(context) {
|
|
2350
|
-
if (!this.queryParams
|
|
2351
|
-
(!hasLegacyParams(this.queryParams, this.shareMapService.optionsLegacy) &&
|
|
2352
|
-
!hasModernShareParams(this.queryParams, this.shareMapService.keysDefinitions))) {
|
|
2374
|
+
if (!this.queryParams) {
|
|
2353
2375
|
return context.layers;
|
|
2354
2376
|
}
|
|
2355
2377
|
const { layers, uri } = context;
|
|
2356
2378
|
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
2357
2379
|
if (!contextValue || contextValue === uri) {
|
|
2358
|
-
const layersOptions = this.shareMapService.
|
|
2380
|
+
const layersOptions = this.shareMapService.parseLayers(this.queryParams);
|
|
2359
2381
|
if (layersOptions.length) {
|
|
2360
2382
|
return mergeLayersOptions([...layers], layersOptions);
|
|
2361
2383
|
}
|
|
2362
2384
|
}
|
|
2363
2385
|
return layers;
|
|
2364
2386
|
}
|
|
2365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2366
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
2387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2388
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.19", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: { classPropertyName: "removeLayersOnContextChange", publicName: "removeLayersOnContextChange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
2367
2389
|
}
|
|
2368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
2369
2391
|
type: Directive,
|
|
2370
2392
|
args: [{
|
|
2371
2393
|
selector: '[igoLayerContext]'
|
|
@@ -2418,7 +2440,7 @@ class MapContextDirective {
|
|
|
2418
2440
|
context.map.view.projection !== this.map.projection;
|
|
2419
2441
|
if (this.shareMapService.hasPositionParams(this.queryParams) &&
|
|
2420
2442
|
shouldOverrideView) {
|
|
2421
|
-
const positions = this.shareMapService.
|
|
2443
|
+
const positions = this.shareMapService.parsePosition(this.queryParams);
|
|
2422
2444
|
this.component.setView({ ...viewContext, ...positions });
|
|
2423
2445
|
}
|
|
2424
2446
|
else if (shouldOverrideView) {
|
|
@@ -2442,10 +2464,10 @@ class MapContextDirective {
|
|
|
2442
2464
|
this.component.controls = controlsContext;
|
|
2443
2465
|
}
|
|
2444
2466
|
}
|
|
2445
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2446
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
2467
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MapContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2468
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.19", type: MapContextDirective, isStandalone: true, selector: "[igoMapContext]", ngImport: i0 });
|
|
2447
2469
|
}
|
|
2448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MapContextDirective, decorators: [{
|
|
2449
2471
|
type: Directive,
|
|
2450
2472
|
args: [{
|
|
2451
2473
|
selector: '[igoMapContext]'
|
|
@@ -2455,18 +2477,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2455
2477
|
class ContextEditComponent {
|
|
2456
2478
|
contextService = inject(ContextService);
|
|
2457
2479
|
messageService = inject(MessageService);
|
|
2458
|
-
context =
|
|
2480
|
+
context = toSignal(this.contextService.editedContext$);
|
|
2459
2481
|
submitSuccessed = output();
|
|
2460
|
-
editedContext$$;
|
|
2461
|
-
ngOnInit() {
|
|
2462
|
-
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
2463
|
-
}
|
|
2464
|
-
ngOnDestroy() {
|
|
2465
|
-
this.editedContext$$.unsubscribe();
|
|
2466
|
-
}
|
|
2467
|
-
handleEditedContextChange(context) {
|
|
2468
|
-
this.context.set(context);
|
|
2469
|
-
}
|
|
2470
2482
|
onEdit(context) {
|
|
2471
2483
|
const id = this.context().id;
|
|
2472
2484
|
this.contextService.update(id, context).subscribe(() => {
|
|
@@ -2482,12 +2494,12 @@ class ContextEditComponent {
|
|
|
2482
2494
|
this.submitSuccessed.emit(context);
|
|
2483
2495
|
});
|
|
2484
2496
|
}
|
|
2485
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2486
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2497
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2498
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextEditComponent, isStandalone: true, selector: "igo-context-edit", outputs: { submitSuccessed: "submitSuccessed" }, ngImport: i0, template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"onEdit($event)\"\n />\n}\n", dependencies: [{ kind: "component", type: ContextFormComponent, selector: "igo-context-form", inputs: ["btnSubmitText", "context", "disabled"], outputs: ["submitForm", "clone", "delete"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2487
2499
|
}
|
|
2488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2489
2501
|
type: Component,
|
|
2490
|
-
args: [{ selector: 'igo-context-edit', imports: [ContextFormComponent, IgoLanguageModule], template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"onEdit($event)\"\n />\n}\n" }]
|
|
2502
|
+
args: [{ selector: 'igo-context-edit', imports: [ContextFormComponent, IgoLanguageModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"onEdit($event)\"\n />\n}\n" }]
|
|
2491
2503
|
}], propDecorators: { submitSuccessed: [{ type: i0.Output, args: ["submitSuccessed"] }] } });
|
|
2492
2504
|
|
|
2493
2505
|
class ContextItemComponent {
|
|
@@ -2524,10 +2536,10 @@ class ContextItemComponent {
|
|
|
2524
2536
|
favoriteClick(context) {
|
|
2525
2537
|
this.favorite.emit(context);
|
|
2526
2538
|
}
|
|
2527
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2528
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: { classPropertyName: "showFavorite", publicName: "showFavorite", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, default: { classPropertyName: "default", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", share: "share" }, host: { properties: { "class.igo-list-item-focused": "this.isMenuOpen" } }, viewQueries: [{ propertyName: "itemActionsMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === typePermission[typePermission.write]) {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.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: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2540
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: { classPropertyName: "showFavorite", publicName: "showFavorite", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, default: { classPropertyName: "default", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", share: "share" }, host: { properties: { "class.igo-list-item-focused": "this.isMenuOpen" } }, viewQueries: [{ propertyName: "itemActionsMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === 'write' || context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === 'write') {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (context().permission === 'write' || context().imported) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i3.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i3.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.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: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2529
2541
|
}
|
|
2530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2531
2543
|
type: Component,
|
|
2532
2544
|
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2533
2545
|
MatListModule,
|
|
@@ -2540,16 +2552,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2540
2552
|
IgoLanguageModule
|
|
2541
2553
|
], host: {
|
|
2542
2554
|
'[class.igo-list-item-focused]': 'this.isMenuOpen'
|
|
2543
|
-
}, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission ===
|
|
2555
|
+
}, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === 'write' || context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === 'write') {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (context().permission === 'write' || context().imported) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"] }]
|
|
2544
2556
|
}], propDecorators: { showFavorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavorite", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], default: [{ type: i0.Input, args: [{ isSignal: true, alias: "default", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], isDesktop: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDesktop", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], save: [{ type: i0.Output, args: ["save"] }], clone: [{ type: i0.Output, args: ["clone"] }], hide: [{ type: i0.Output, args: ["hide"] }], show: [{ type: i0.Output, args: ["show"] }], favorite: [{ type: i0.Output, args: ["favorite"] }], managePermissions: [{ type: i0.Output, args: ["managePermissions"] }], manageTools: [{ type: i0.Output, args: ["manageTools"] }], share: [{ type: i0.Output, args: ["share"] }], itemActionsMenuTrigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenuTrigger), { isSignal: true }] }] } });
|
|
2545
2557
|
|
|
2546
2558
|
class BookmarkDialogComponent {
|
|
2547
2559
|
dialogRef = inject(MatDialogRef);
|
|
2548
2560
|
title;
|
|
2549
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2550
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
2561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BookmarkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: BookmarkDialogComponent, isStandalone: true, selector: "igo-bookmark-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\n {{ 'igo.context.bookmarkButton.dialog.title' | translate }}\n</h1>\n<div mat-dialog-content>\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: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.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: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
2551
2563
|
}
|
|
2552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
|
|
2553
2565
|
type: Component,
|
|
2554
2566
|
args: [{ selector: 'igo-bookmark-dialog', imports: [
|
|
2555
2567
|
MatDialogTitle,
|
|
@@ -2588,6 +2600,8 @@ class ContextListComponent {
|
|
|
2588
2600
|
change$ = new ReplaySubject(1);
|
|
2589
2601
|
change$$;
|
|
2590
2602
|
previousMessageId;
|
|
2603
|
+
sortAlphaOnIcon = SORT_ALPHA_ON_ICON;
|
|
2604
|
+
sortAlphaOffIcon = SORT_ALPHA_OFF_ICON;
|
|
2591
2605
|
isDesktop;
|
|
2592
2606
|
get contexts() {
|
|
2593
2607
|
return this._contexts;
|
|
@@ -2750,6 +2764,11 @@ class ContextListComponent {
|
|
|
2750
2764
|
setSelected(context) {
|
|
2751
2765
|
this.selectedContext.set(context);
|
|
2752
2766
|
}
|
|
2767
|
+
// Comparator function to sort by context.title
|
|
2768
|
+
sortByKeyPriority = (a, b) => {
|
|
2769
|
+
const ORDER = ['ours', 'shared', 'public'];
|
|
2770
|
+
return ORDER.indexOf(a.key) - ORDER.indexOf(b.key);
|
|
2771
|
+
};
|
|
2753
2772
|
next() {
|
|
2754
2773
|
this.change$.next();
|
|
2755
2774
|
}
|
|
@@ -2952,12 +2971,12 @@ class ContextListComponent {
|
|
|
2952
2971
|
const currentContext = this.contextService.context$.value;
|
|
2953
2972
|
const { toolKey, sidenavKey, languageKey } = this.shareMapService.routeService.options;
|
|
2954
2973
|
const { context: contextKey } = this.shareMapService.options;
|
|
2955
|
-
const baseOrigin = this.shareMapService.
|
|
2974
|
+
const baseOrigin = this.shareMapService.sanitizeBaseUrl(this.shareMapService.document.location.href);
|
|
2956
2975
|
const url = context.uri === currentContext.uri
|
|
2957
|
-
? this.shareMapService.
|
|
2976
|
+
? this.shareMapService.generateUrl(this.map(), this.contextService.context$.value)
|
|
2958
2977
|
: `${baseOrigin}${contextKey}=${context.uri}`;
|
|
2959
2978
|
const params = [];
|
|
2960
|
-
const currentLanguage = this.shareMapService.
|
|
2979
|
+
const currentLanguage = this.shareMapService.language;
|
|
2961
2980
|
if (currentLanguage && !url.includes(`${languageKey}=`))
|
|
2962
2981
|
params.push(`${languageKey}=${currentLanguage}`);
|
|
2963
2982
|
if (!url.includes(`${toolKey}=`))
|
|
@@ -3021,6 +3040,7 @@ class ContextListComponent {
|
|
|
3021
3040
|
}
|
|
3022
3041
|
onFavorite(context) {
|
|
3023
3042
|
if (!context.id) {
|
|
3043
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3024
3044
|
context.id = context.uri;
|
|
3025
3045
|
}
|
|
3026
3046
|
this.contextService.setDefault(context.id).subscribe((defaultId) => {
|
|
@@ -3028,7 +3048,7 @@ class ContextListComponent {
|
|
|
3028
3048
|
this.messageService.remove(this.previousMessageId);
|
|
3029
3049
|
}
|
|
3030
3050
|
this.contextService.defaultContextId$.next(defaultId);
|
|
3031
|
-
if (defaultId) {
|
|
3051
|
+
if (defaultId != null && String(defaultId) === String(context.id)) {
|
|
3032
3052
|
const messageObj = this.messageService.success('igo.context.contextManager.dialog.favoriteMsg', 'igo.context.contextManager.dialog.favoriteTitle', undefined, {
|
|
3033
3053
|
value: context.title
|
|
3034
3054
|
});
|
|
@@ -3108,10 +3128,10 @@ class ContextListComponent {
|
|
|
3108
3128
|
}
|
|
3109
3129
|
this.hide.emit(context);
|
|
3110
3130
|
}
|
|
3111
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3112
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: false, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", 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\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field floatLabel=\"always\">\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n class=\"sort-alpha\"\n [class.--active]=\"sortedAlpha\"\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.sortAlphabetically' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <mat-icon color=\"primary\">sort_by_alpha</mat-icon>\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length && auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n }\n @if ($any(groupContexts).value.length && !auth.authenticated; as context) {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}: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}.sort-alpha.--active mat-icon{color:red}.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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$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: i5$2.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: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { 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: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3132
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: false, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", 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\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue: sortByKeyPriority;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length) {\n @if (auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n } @else {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}: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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.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: i5$2.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: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { 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: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["color", "icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3113
3133
|
}
|
|
3114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextListComponent, decorators: [{
|
|
3115
3135
|
type: Component,
|
|
3116
3136
|
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
3117
3137
|
ListComponent,
|
|
@@ -3129,8 +3149,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3129
3149
|
ListItemDirective,
|
|
3130
3150
|
AsyncPipe,
|
|
3131
3151
|
KeyValuePipe,
|
|
3132
|
-
IgoLanguageModule
|
|
3133
|
-
|
|
3152
|
+
IgoLanguageModule,
|
|
3153
|
+
IgoIconComponent
|
|
3154
|
+
], template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue: sortByKeyPriority;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length) {\n @if (auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n } @else {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}: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"] }]
|
|
3134
3155
|
}], ctorParameters: () => [], propDecorators: { isDesktop: [{
|
|
3135
3156
|
type: Input
|
|
3136
3157
|
}], contexts: [{
|
|
@@ -3141,142 +3162,178 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3141
3162
|
type: Input
|
|
3142
3163
|
}] } });
|
|
3143
3164
|
|
|
3165
|
+
class ContextPermissionItemComponent {
|
|
3166
|
+
permission = input.required(...(ngDevMode ? [{ debugName: "permission" }] : []));
|
|
3167
|
+
canWrite = input.required(...(ngDevMode ? [{ debugName: "canWrite" }] : []));
|
|
3168
|
+
user = input(...(ngDevMode ? [undefined, { debugName: "user" }] : []));
|
|
3169
|
+
type = computed(() => {
|
|
3170
|
+
const permission = this.permission();
|
|
3171
|
+
return isContextPermissionUser(permission)
|
|
3172
|
+
? this.isUserExtranet(permission)
|
|
3173
|
+
? 'Extranet'
|
|
3174
|
+
: 'Intranet'
|
|
3175
|
+
: 'Profil';
|
|
3176
|
+
}, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
3177
|
+
icon = computed(() => {
|
|
3178
|
+
const permission = this.permission();
|
|
3179
|
+
return permission.profilType === 'user'
|
|
3180
|
+
? this.isUserExtranet(permission)
|
|
3181
|
+
? 'person'
|
|
3182
|
+
: 'person_shield'
|
|
3183
|
+
: 'badge';
|
|
3184
|
+
}, ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
3185
|
+
canDelete = computed(() => {
|
|
3186
|
+
const permission = this.permission();
|
|
3187
|
+
return (this.canWrite() ||
|
|
3188
|
+
(isContextPermissionUser(permission) &&
|
|
3189
|
+
permission.user.externalId === this.user().id));
|
|
3190
|
+
}, ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
3191
|
+
delete = output();
|
|
3192
|
+
isContextPermissionUser = isContextPermissionUser;
|
|
3193
|
+
isUserExtranet(permission) {
|
|
3194
|
+
return (isContextPermissionUser(permission) &&
|
|
3195
|
+
permission.userSource.includes('extranet'));
|
|
3196
|
+
}
|
|
3197
|
+
onDelete() {
|
|
3198
|
+
this.delete.emit(this.permission());
|
|
3199
|
+
}
|
|
3200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextPermissionItemComponent, isStandalone: true, selector: "igo-context-permission-item", inputs: { permission: { classPropertyName: "permission", publicName: "permission", isSignal: true, isRequired: true, transformFunction: null }, canWrite: { classPropertyName: "canWrite", publicName: "canWrite", isSignal: true, isRequired: true, transformFunction: null }, user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { delete: "delete" }, ngImport: i0, template: "@let permission = this.permission();\n\n<mat-list-item>\n <mat-icon matListItemIcon [matTooltip]=\"type()\">\n {{ icon() }}\n </mat-icon>\n\n <span matListItemTitle [matTooltip]=\"permission.title\">\n {{ permission.title }}\n </span>\n\n <span matListItemLine>{{ type() }}</span>\n <div matListItemMeta class=\"igo-actions-container\">\n @if (canDelete()) {\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"onDelete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n</mat-list-item>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i3.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i3.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i3.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3202
|
+
}
|
|
3203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionItemComponent, decorators: [{
|
|
3204
|
+
type: Component,
|
|
3205
|
+
args: [{ selector: 'igo-context-permission-item', imports: [
|
|
3206
|
+
MatButtonModule,
|
|
3207
|
+
MatIconModule,
|
|
3208
|
+
MatListModule,
|
|
3209
|
+
MatTooltipModule,
|
|
3210
|
+
IgoLanguageModule
|
|
3211
|
+
], template: "@let permission = this.permission();\n\n<mat-list-item>\n <mat-icon matListItemIcon [matTooltip]=\"type()\">\n {{ icon() }}\n </mat-icon>\n\n <span matListItemTitle [matTooltip]=\"permission.title\">\n {{ permission.title }}\n </span>\n\n <span matListItemLine>{{ type() }}</span>\n <div matListItemMeta class=\"igo-actions-container\">\n @if (canDelete()) {\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"onDelete()\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n</mat-list-item>\n" }]
|
|
3212
|
+
}], propDecorators: { permission: [{ type: i0.Input, args: [{ isSignal: true, alias: "permission", required: true }] }], canWrite: [{ type: i0.Input, args: [{ isSignal: true, alias: "canWrite", required: true }] }], user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }], delete: [{ type: i0.Output, args: ["delete"] }] } });
|
|
3213
|
+
function isContextPermissionUser(permission) {
|
|
3214
|
+
return permission.userId != null;
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
class ContextPermissionService {
|
|
3218
|
+
http = inject(HttpClient);
|
|
3219
|
+
config = inject(ConfigService);
|
|
3220
|
+
languageService = inject(LanguageService);
|
|
3221
|
+
messageService = inject(MessageService);
|
|
3222
|
+
baseUrl;
|
|
3223
|
+
constructor() {
|
|
3224
|
+
const options = this.config.getConfig('context');
|
|
3225
|
+
this.baseUrl = options?.url ?? '';
|
|
3226
|
+
}
|
|
3227
|
+
getAll(id) {
|
|
3228
|
+
const url = this.baseUrl + '/contexts/' + id + '/permissions';
|
|
3229
|
+
return this.http.get(url);
|
|
3230
|
+
}
|
|
3231
|
+
add(contextId, permission) {
|
|
3232
|
+
const url = `${this.baseUrl}/contexts/${contextId}/permissions`;
|
|
3233
|
+
return this.http.post(url, permission).pipe(catchError$1((res) => {
|
|
3234
|
+
this.handleError(res, true);
|
|
3235
|
+
throw res;
|
|
3236
|
+
}));
|
|
3237
|
+
}
|
|
3238
|
+
delete(contextId, permissionId) {
|
|
3239
|
+
const url = `${this.baseUrl}/contexts/${contextId}/permissions/${permissionId}`;
|
|
3240
|
+
return this.http.delete(url);
|
|
3241
|
+
}
|
|
3242
|
+
handleError(error, permissionError) {
|
|
3243
|
+
error.error.toDisplay = true;
|
|
3244
|
+
if (permissionError) {
|
|
3245
|
+
error.error.title = this.languageService.translate.instant('igo.context.contextManager.errors.addPermissionTitle');
|
|
3246
|
+
error.error.message = this.languageService.translate.instant('igo.context.contextManager.errors.addPermission');
|
|
3247
|
+
}
|
|
3248
|
+
this.messageService.error('igo.context.contextManager.errors.addPermission', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3249
|
+
}
|
|
3250
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3251
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionService, providedIn: 'root' });
|
|
3252
|
+
}
|
|
3253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionService, decorators: [{
|
|
3254
|
+
type: Injectable,
|
|
3255
|
+
args: [{
|
|
3256
|
+
providedIn: 'root'
|
|
3257
|
+
}]
|
|
3258
|
+
}], ctorParameters: () => [] });
|
|
3259
|
+
|
|
3144
3260
|
class ContextPermissionsComponent {
|
|
3145
3261
|
formBuilder = inject(UntypedFormBuilder);
|
|
3146
3262
|
http = inject(HttpClient);
|
|
3147
3263
|
authService = inject(AuthService);
|
|
3148
3264
|
config = inject(ConfigService);
|
|
3265
|
+
contextService = inject(ContextService);
|
|
3266
|
+
contextPermissionService = inject(ContextPermissionService);
|
|
3267
|
+
messageService = inject(MessageService);
|
|
3268
|
+
destroyRef = inject(DestroyRef); // Modern way to handle cleanup
|
|
3149
3269
|
form;
|
|
3150
3270
|
context = model(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
3151
3271
|
permissions = model(...(ngDevMode ? [undefined, { debugName: "permissions" }] : []));
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
}
|
|
3155
|
-
|
|
3156
|
-
this._profils = value;
|
|
3157
|
-
}
|
|
3158
|
-
_profils = [];
|
|
3159
|
-
get canWrite() {
|
|
3160
|
-
return this.context().permission === TypePermission[TypePermission.write];
|
|
3161
|
-
}
|
|
3272
|
+
permissionsRead = computed(() => this.permissions().filter((permission) => permission.typePermission === 'read'), ...(ngDevMode ? [{ debugName: "permissionsRead" }] : []));
|
|
3273
|
+
permissionsWrite = computed(() => this.permissions().filter((permission) => permission.typePermission === 'write'), ...(ngDevMode ? [{ debugName: "permissionsWrite" }] : []));
|
|
3274
|
+
profils = signal([], ...(ngDevMode ? [{ debugName: "profils" }] : []));
|
|
3275
|
+
canWrite = computed(() => this.context().permission === 'write', ...(ngDevMode ? [{ debugName: "canWrite" }] : []));
|
|
3162
3276
|
baseUrlProfils;
|
|
3163
3277
|
formControl = new UntypedFormControl();
|
|
3164
3278
|
formValueChanges$$;
|
|
3165
|
-
addPermission = output();
|
|
3166
|
-
removePermission = output();
|
|
3167
|
-
scopeChanged = output();
|
|
3168
3279
|
ngOnInit() {
|
|
3169
3280
|
this.buildForm();
|
|
3170
3281
|
this.baseUrlProfils =
|
|
3171
|
-
this.config.getConfig('context.url') + '/profils
|
|
3282
|
+
this.config.getConfig('context.url') + '/profils/users?';
|
|
3172
3283
|
this.formValueChanges$$ = this.formControl.valueChanges.subscribe((value) => {
|
|
3173
3284
|
if (value.length) {
|
|
3174
|
-
this.
|
|
3175
|
-
.get(this.baseUrlProfils + 'q=' + value)
|
|
3176
|
-
.subscribe((profils) => {
|
|
3177
|
-
this.profils = profils;
|
|
3178
|
-
});
|
|
3179
|
-
this.profils.filter((profil) => {
|
|
3180
|
-
const filterNormalized = value
|
|
3181
|
-
.toLowerCase()
|
|
3182
|
-
.normalize('NFD')
|
|
3183
|
-
.replace(/[\u0300-\u036f]/g, '');
|
|
3184
|
-
const profilTitleNormalized = profil.title
|
|
3185
|
-
.toLowerCase()
|
|
3186
|
-
.normalize('NFD')
|
|
3187
|
-
.replace(/[\u0300-\u036f]/g, '');
|
|
3188
|
-
const profilNameNormalized = profil.name
|
|
3189
|
-
.toLowerCase()
|
|
3190
|
-
.normalize('NFD')
|
|
3191
|
-
.replace(/[\u0300-\u036f]/g, '');
|
|
3192
|
-
const profilNormalized = profilNameNormalized + profilTitleNormalized;
|
|
3193
|
-
return profilNormalized.includes(filterNormalized);
|
|
3194
|
-
});
|
|
3285
|
+
this.getProfils(value).subscribe((profils) => this.profils.set(profils));
|
|
3195
3286
|
}
|
|
3196
3287
|
else {
|
|
3197
|
-
this.profils
|
|
3288
|
+
this.profils.set([]);
|
|
3198
3289
|
}
|
|
3199
3290
|
});
|
|
3291
|
+
this.handleEditedContextChange();
|
|
3200
3292
|
}
|
|
3201
3293
|
displayFn(profil) {
|
|
3202
3294
|
return profil ? profil.title : undefined;
|
|
3203
3295
|
}
|
|
3204
3296
|
handleFormSubmit(value) {
|
|
3205
|
-
this.
|
|
3297
|
+
const contextId = this.context().id;
|
|
3298
|
+
this.contextPermissionService
|
|
3299
|
+
.add(contextId, value)
|
|
3300
|
+
.subscribe((permission) => {
|
|
3301
|
+
this.permissions.update((permissions) => {
|
|
3302
|
+
permissions.push(permission);
|
|
3303
|
+
return [...permissions];
|
|
3304
|
+
});
|
|
3305
|
+
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: permission.title });
|
|
3306
|
+
});
|
|
3206
3307
|
}
|
|
3207
3308
|
buildForm() {
|
|
3208
3309
|
this.form = this.formBuilder.group({
|
|
3209
|
-
|
|
3310
|
+
id: null,
|
|
3311
|
+
userExternalId: null,
|
|
3312
|
+
profilId: null,
|
|
3210
3313
|
typePermission: ['read']
|
|
3211
3314
|
});
|
|
3212
3315
|
}
|
|
3213
3316
|
onProfilSelected(value) {
|
|
3214
3317
|
this.form.setValue({
|
|
3215
|
-
|
|
3318
|
+
id: value.id,
|
|
3319
|
+
userExternalId: value.type === 'user' ? value.id : null,
|
|
3320
|
+
profilId: value.type === 'profil' ? value.id : null,
|
|
3216
3321
|
typePermission: this.form.value.typePermission
|
|
3217
3322
|
});
|
|
3218
3323
|
}
|
|
3219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", permissions: "permissionsChange", addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div 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 @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\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 @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\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 <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$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: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3221
|
-
}
|
|
3222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3223
|
-
type: Component,
|
|
3224
|
-
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3225
|
-
MatRadioModule,
|
|
3226
|
-
FormsModule,
|
|
3227
|
-
ReactiveFormsModule,
|
|
3228
|
-
MatFormFieldModule,
|
|
3229
|
-
MatInputModule,
|
|
3230
|
-
MatAutocompleteModule,
|
|
3231
|
-
MatOptionModule,
|
|
3232
|
-
MatButtonModule,
|
|
3233
|
-
ListComponent,
|
|
3234
|
-
CollapsibleComponent,
|
|
3235
|
-
MatListModule,
|
|
3236
|
-
MatIconModule,
|
|
3237
|
-
StopPropagationDirective,
|
|
3238
|
-
MatTooltipModule,
|
|
3239
|
-
KeyValuePipe,
|
|
3240
|
-
IgoLanguageModule
|
|
3241
|
-
], template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div 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 @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\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 @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\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 <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
|
|
3242
|
-
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: false }] }, { type: i0.Output, args: ["permissionsChange"] }], addPermission: [{ type: i0.Output, args: ["addPermission"] }], removePermission: [{ type: i0.Output, args: ["removePermission"] }], scopeChanged: [{ type: i0.Output, args: ["scopeChanged"] }] } });
|
|
3243
|
-
|
|
3244
|
-
class ContextPermissionsBindingDirective {
|
|
3245
|
-
contextService = inject(ContextService);
|
|
3246
|
-
languageService = inject(LanguageService);
|
|
3247
|
-
messageService = inject(MessageService);
|
|
3248
|
-
cd = inject(ChangeDetectorRef);
|
|
3249
|
-
component;
|
|
3250
|
-
editedContext$$;
|
|
3251
|
-
onAddPermission(permission) {
|
|
3252
|
-
if (!permission.profil) {
|
|
3253
|
-
this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3254
|
-
return;
|
|
3255
|
-
}
|
|
3256
|
-
const contextId = this.component.context().id;
|
|
3257
|
-
this.contextService
|
|
3258
|
-
.addPermissionAssociation(contextId, permission.profil, permission.typePermission)
|
|
3259
|
-
.subscribe((profils) => {
|
|
3260
|
-
for (const p of profils) {
|
|
3261
|
-
this.component.permissions[permission.typePermission].push(p);
|
|
3262
|
-
}
|
|
3263
|
-
const profil = permission.profil;
|
|
3264
|
-
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
|
|
3265
|
-
this.cd.detectChanges();
|
|
3266
|
-
});
|
|
3267
|
-
}
|
|
3268
3324
|
onRemovePermission(permission) {
|
|
3269
|
-
const contextId = this.
|
|
3270
|
-
this.
|
|
3271
|
-
.
|
|
3325
|
+
const contextId = this.context().id;
|
|
3326
|
+
this.contextPermissionService
|
|
3327
|
+
.delete(contextId, permission.id)
|
|
3272
3328
|
.subscribe(() => {
|
|
3273
|
-
|
|
3274
|
-
|
|
3329
|
+
this.permissions.update((permissions) => {
|
|
3330
|
+
const index = permissions.findIndex((p) => {
|
|
3331
|
+
return p.id === permission.id;
|
|
3332
|
+
});
|
|
3333
|
+
permissions.splice(index, 1);
|
|
3334
|
+
return [...permissions];
|
|
3275
3335
|
});
|
|
3276
|
-
this.
|
|
3277
|
-
const profil = permission.profil;
|
|
3278
|
-
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
|
|
3279
|
-
this.cd.detectChanges();
|
|
3336
|
+
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: permission.title });
|
|
3280
3337
|
});
|
|
3281
3338
|
}
|
|
3282
3339
|
onScopeChanged(context) {
|
|
@@ -3285,55 +3342,58 @@ class ContextPermissionsBindingDirective {
|
|
|
3285
3342
|
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3286
3343
|
});
|
|
3287
3344
|
}
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3345
|
+
handleEditedContextChange() {
|
|
3346
|
+
this.contextService.editedContext$
|
|
3347
|
+
.pipe(
|
|
3348
|
+
// 1. Cleanly handle the context update
|
|
3349
|
+
tap$1((context) => this.context.set(context)),
|
|
3350
|
+
// 2. Switch to the permissions call, or return an empty array if context is null
|
|
3351
|
+
switchMap$1((context) => {
|
|
3352
|
+
if (!context)
|
|
3353
|
+
return of([]);
|
|
3354
|
+
return this.contextPermissionService.getAll(context.id);
|
|
3355
|
+
}),
|
|
3356
|
+
// 3. Automatically unsubscribe when component is destroyed
|
|
3357
|
+
takeUntilDestroyed(this.destroyRef))
|
|
3358
|
+
.subscribe((permissions) => {
|
|
3359
|
+
this.permissions.set(permissions);
|
|
3360
|
+
});
|
|
3298
3361
|
}
|
|
3299
|
-
|
|
3300
|
-
this.
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
const permissions = {
|
|
3307
|
-
read: permissionsArray.filter((p) => {
|
|
3308
|
-
return p.typePermission.toString() === 'read';
|
|
3309
|
-
}),
|
|
3310
|
-
write: permissionsArray.filter((p) => {
|
|
3311
|
-
return p.typePermission.toString() === 'write';
|
|
3312
|
-
})
|
|
3313
|
-
};
|
|
3314
|
-
return this.component.permissions.set(permissions);
|
|
3315
|
-
});
|
|
3316
|
-
}
|
|
3362
|
+
getProfils(value) {
|
|
3363
|
+
return this.http
|
|
3364
|
+
.get(this.baseUrlProfils + 'q=' + value)
|
|
3365
|
+
.pipe(map$1((profils) => {
|
|
3366
|
+
const search = normalizeStr(value);
|
|
3367
|
+
return profils.filter((p) => normalizeStr(p.name + p.title).includes(search));
|
|
3368
|
+
}));
|
|
3317
3369
|
}
|
|
3318
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3319
|
-
static
|
|
3370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3371
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", permissions: "permissionsChange" }, ngImport: i0, template: "@let user = authService.user;\n\n@if (context()) {\n <div>\n @if (!canWrite()) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n } @else {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"onScopeChanged(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 @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private') {\n @if (canWrite()) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\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 @for (profil of this.profils(); track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\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 <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions()) {\n <igo-list>\n @if (permissionsRead().length) {\n <igo-collapsible\n [title]=\"'igo.context.permission.' + 'read' | translate\"\n >\n @for (permission of permissionsRead(); track permission) {\n <igo-context-permission-item\n [permission]=\"permission\"\n [canWrite]=\"canWrite()\"\n [user]=\"user\"\n (delete)=\"onRemovePermission($event)\"\n />\n }\n </igo-collapsible>\n }\n @if (permissionsWrite().length) {\n <igo-collapsible\n [title]=\"'igo.context.permission.' + 'write' | translate\"\n >\n @for (permission of permissionsWrite(); track permission) {\n <igo-context-permission-item\n [permission]=\"permission\"\n [canWrite]=\"canWrite()\"\n [user]=\"user\"\n (delete)=\"onRemovePermission($event)\"\n />\n }\n </igo-collapsible>\n }\n </igo-list>\n }\n }\n </div>\n}\n", styles: [".full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.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: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatListModule }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i6$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i6$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ContextPermissionItemComponent, selector: "igo-context-permission-item", inputs: ["permission", "canWrite", "user"], outputs: ["delete"] }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3320
3372
|
}
|
|
3321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3322
|
-
type:
|
|
3323
|
-
args: [{
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3374
|
+
type: Component,
|
|
3375
|
+
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3376
|
+
CollapsibleComponent,
|
|
3377
|
+
FormsModule,
|
|
3378
|
+
IgoLanguageModule,
|
|
3379
|
+
ListComponent,
|
|
3380
|
+
MatAutocompleteModule,
|
|
3381
|
+
MatButtonModule,
|
|
3382
|
+
MatFormFieldModule,
|
|
3383
|
+
MatIconModule,
|
|
3384
|
+
MatInputModule,
|
|
3385
|
+
MatListModule,
|
|
3386
|
+
MatOptionModule,
|
|
3387
|
+
MatRadioModule,
|
|
3388
|
+
MatTooltipModule,
|
|
3389
|
+
ReactiveFormsModule,
|
|
3390
|
+
ContextPermissionItemComponent
|
|
3391
|
+
], template: "@let user = authService.user;\n\n@if (context()) {\n <div>\n @if (!canWrite()) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n } @else {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"onScopeChanged(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 @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private') {\n @if (canWrite()) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\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 @for (profil of this.profils(); track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\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 <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions()) {\n <igo-list>\n @if (permissionsRead().length) {\n <igo-collapsible\n [title]=\"'igo.context.permission.' + 'read' | translate\"\n >\n @for (permission of permissionsRead(); track permission) {\n <igo-context-permission-item\n [permission]=\"permission\"\n [canWrite]=\"canWrite()\"\n [user]=\"user\"\n (delete)=\"onRemovePermission($event)\"\n />\n }\n </igo-collapsible>\n }\n @if (permissionsWrite().length) {\n <igo-collapsible\n [title]=\"'igo.context.permission.' + 'write' | translate\"\n >\n @for (permission of permissionsWrite(); track permission) {\n <igo-context-permission-item\n [permission]=\"permission\"\n [canWrite]=\"canWrite()\"\n [user]=\"user\"\n (delete)=\"onRemovePermission($event)\"\n />\n }\n </igo-collapsible>\n }\n </igo-list>\n }\n }\n </div>\n}\n", styles: [".full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
|
|
3392
|
+
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: false }] }, { type: i0.Output, args: ["permissionsChange"] }] } });
|
|
3393
|
+
const normalizeStr = (str) => str
|
|
3394
|
+
.toLowerCase()
|
|
3395
|
+
.normalize('NFD')
|
|
3396
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
3337
3397
|
|
|
3338
3398
|
/**
|
|
3339
3399
|
* @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set
|
|
@@ -3344,29 +3404,27 @@ class IgoContextManagerModule {
|
|
|
3344
3404
|
ngModule: IgoContextManagerModule
|
|
3345
3405
|
};
|
|
3346
3406
|
}
|
|
3347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3348
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3408
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3349
3409
|
ContextItemComponent,
|
|
3350
3410
|
ContextFormComponent,
|
|
3351
3411
|
ContextEditComponent,
|
|
3352
3412
|
ContextPermissionsComponent,
|
|
3353
|
-
ContextPermissionsBindingDirective,
|
|
3354
3413
|
LayerContextDirective,
|
|
3355
3414
|
MapContextDirective], exports: [ContextListComponent,
|
|
3356
3415
|
ContextItemComponent,
|
|
3357
3416
|
ContextFormComponent,
|
|
3358
3417
|
ContextEditComponent,
|
|
3359
3418
|
ContextPermissionsComponent,
|
|
3360
|
-
ContextPermissionsBindingDirective,
|
|
3361
3419
|
LayerContextDirective,
|
|
3362
3420
|
MapContextDirective] });
|
|
3363
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3421
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3364
3422
|
ContextItemComponent,
|
|
3365
3423
|
ContextFormComponent,
|
|
3366
3424
|
ContextEditComponent,
|
|
3367
3425
|
ContextPermissionsComponent] });
|
|
3368
3426
|
}
|
|
3369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextManagerModule, decorators: [{
|
|
3370
3428
|
type: NgModule,
|
|
3371
3429
|
args: [{
|
|
3372
3430
|
imports: [
|
|
@@ -3375,7 +3433,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3375
3433
|
ContextFormComponent,
|
|
3376
3434
|
ContextEditComponent,
|
|
3377
3435
|
ContextPermissionsComponent,
|
|
3378
|
-
ContextPermissionsBindingDirective,
|
|
3379
3436
|
LayerContextDirective,
|
|
3380
3437
|
MapContextDirective
|
|
3381
3438
|
],
|
|
@@ -3385,7 +3442,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3385
3442
|
ContextFormComponent,
|
|
3386
3443
|
ContextEditComponent,
|
|
3387
3444
|
ContextPermissionsComponent,
|
|
3388
|
-
ContextPermissionsBindingDirective,
|
|
3389
3445
|
LayerContextDirective,
|
|
3390
3446
|
MapContextDirective
|
|
3391
3447
|
]
|
|
@@ -3426,10 +3482,10 @@ class BookmarkButtonComponent {
|
|
|
3426
3482
|
}
|
|
3427
3483
|
});
|
|
3428
3484
|
}
|
|
3429
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3430
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3485
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BookmarkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", 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>star</mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important;background-color:var(--mat-sys-surface-bright)}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3431
3487
|
}
|
|
3432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
|
|
3433
3489
|
type: Component,
|
|
3434
3490
|
args: [{ selector: 'igo-bookmark-button', imports: [MatButtonModule, MatTooltipModule, MatIconModule, IgoLanguageModule], 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>star</mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important;background-color:var(--mat-sys-surface-bright)}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}\n"] }]
|
|
3435
3491
|
}], propDecorators: { map: [{
|
|
@@ -3441,10 +3497,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3441
3497
|
class PoiDialogComponent {
|
|
3442
3498
|
dialogRef = inject(MatDialogRef);
|
|
3443
3499
|
title;
|
|
3444
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3445
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3501
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: PoiDialogComponent, isStandalone: true, selector: "igo-poi-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\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 matButton (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: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.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: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3446
3502
|
}
|
|
3447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiDialogComponent, decorators: [{
|
|
3448
3504
|
type: Component,
|
|
3449
3505
|
args: [{ selector: 'igo-poi-dialog', imports: [
|
|
3450
3506
|
MatDialogTitle,
|
|
@@ -3480,10 +3536,10 @@ class PoiService {
|
|
|
3480
3536
|
const url = this.baseUrl + '/pois';
|
|
3481
3537
|
return this.http.post(url, context);
|
|
3482
3538
|
}
|
|
3483
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3484
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3540
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiService });
|
|
3485
3541
|
}
|
|
3486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiService, decorators: [{
|
|
3487
3543
|
type: Injectable
|
|
3488
3544
|
}], ctorParameters: () => [] });
|
|
3489
3545
|
|
|
@@ -3494,6 +3550,7 @@ class PoiButtonComponent {
|
|
|
3494
3550
|
messageService = inject(MessageService);
|
|
3495
3551
|
languageService = inject(LanguageService);
|
|
3496
3552
|
confirmDialogService = inject(ConfirmDialogService);
|
|
3553
|
+
selected;
|
|
3497
3554
|
get map() {
|
|
3498
3555
|
return this._map;
|
|
3499
3556
|
}
|
|
@@ -3585,21 +3642,21 @@ class PoiButtonComponent {
|
|
|
3585
3642
|
easing: oleasing.easeOut
|
|
3586
3643
|
});
|
|
3587
3644
|
}
|
|
3588
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3589
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3646
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: PoiButtonComponent, isStandalone: true, selector: "igo-poi-button", inputs: { map: "map", color: "color" }, providers: [PoiService], ngImport: i0, template: "<mat-select\n panelClass=\"poi-select-panel\"\n class=\"poi-select\"\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n [(value)]=\"selected\"\n>\n <mat-select-trigger>\n {{ selected?.title || '' }}\n </mat-select-trigger>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div\n class=\"poi-option-row\"\n [matTooltip]=\"'igo.context.poiButton.create' | translate\"\n matTooltipPosition=\"above\"\n >\n <div class=\"poi-option-text\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <div class=\"poi-option-button\">\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon>add_circle</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n <mat-divider />\n @for (poi of pois; track poi) {\n <mat-option class=\"poi-option\" [value]=\"poi\" (click)=\"zoomOnPoi(poi.id)\">\n <div class=\"poi-option-row\">\n <div\n class=\"poi-option-text\"\n [matTooltip]=\"poi.title\"\n matTooltipPosition=\"above\"\n >\n {{ poi.title }}\n </div>\n <div class=\"poi-option-button\">\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n }\n</mat-select>\n", styles: [":host{padding:0 8px;height:100%;display:flex;align-items:center;background-color:var(--mat-sys-surface-bright)}.poi-select{width:175px;height:100%}.poi-option{padding-right:6px;padding-left:6px}.poi-option .poi-option-row{display:flex;align-items:center;width:100%}.poi-option .poi-option-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.poi-option .poi-option-button{width:35px;display:flex;align-items:center;justify-content:flex-start}.poi-option ::ng-deep .mat-pseudo-checkbox{display:none}::ng-deep .poi-select .mat-mdc-select-trigger{height:100%;display:flex;align-items:center}::ng-deep .poi-select-panel .mdc-list-item__primary-text{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: IgoLanguageModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3590
3647
|
}
|
|
3591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: PoiButtonComponent, decorators: [{
|
|
3592
3649
|
type: Component,
|
|
3593
3650
|
args: [{ selector: 'igo-poi-button', imports: [
|
|
3594
|
-
|
|
3595
|
-
MatOptionModule,
|
|
3651
|
+
IgoLanguageModule,
|
|
3596
3652
|
MatButtonModule,
|
|
3597
|
-
StopPropagationDirective,
|
|
3598
|
-
MatIconModule,
|
|
3599
3653
|
MatDividerModule,
|
|
3654
|
+
MatIconModule,
|
|
3655
|
+
MatOptionModule,
|
|
3656
|
+
MatSelectModule,
|
|
3600
3657
|
MatTooltipModule,
|
|
3601
|
-
|
|
3602
|
-
], providers: [PoiService], template: "<mat-select\n panelClass=\"poi-select-panel\"\n class=\"poi-select\"\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div\n class=\"poi-option-row\"\n [matTooltip]=\"'igo.context.poiButton.create' | translate\"\n matTooltipPosition=\"above\"\n >\n <div class=\"poi-option-text\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <div class=\"poi-option-button\">\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon>add_circle</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n <mat-divider />\n @for (poi of pois; track poi) {\n <mat-option class=\"poi-option\" [value]=\"poi
|
|
3658
|
+
StopPropagationDirective
|
|
3659
|
+
], providers: [PoiService], template: "<mat-select\n panelClass=\"poi-select-panel\"\n class=\"poi-select\"\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n [(value)]=\"selected\"\n>\n <mat-select-trigger>\n {{ selected?.title || '' }}\n </mat-select-trigger>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div\n class=\"poi-option-row\"\n [matTooltip]=\"'igo.context.poiButton.create' | translate\"\n matTooltipPosition=\"above\"\n >\n <div class=\"poi-option-text\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <div class=\"poi-option-button\">\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon>add_circle</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n <mat-divider />\n @for (poi of pois; track poi) {\n <mat-option class=\"poi-option\" [value]=\"poi\" (click)=\"zoomOnPoi(poi.id)\">\n <div class=\"poi-option-row\">\n <div\n class=\"poi-option-text\"\n [matTooltip]=\"poi.title\"\n matTooltipPosition=\"above\"\n >\n {{ poi.title }}\n </div>\n <div class=\"poi-option-button\">\n <button\n mat-icon-button\n igoStopPropagation\n color=\"warn\"\n (click)=\"deletePoi(poi)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n }\n</mat-select>\n", styles: [":host{padding:0 8px;height:100%;display:flex;align-items:center;background-color:var(--mat-sys-surface-bright)}.poi-select{width:175px;height:100%}.poi-option{padding-right:6px;padding-left:6px}.poi-option .poi-option-row{display:flex;align-items:center;width:100%}.poi-option .poi-option-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.poi-option .poi-option-button{width:35px;display:flex;align-items:center;justify-content:flex-start}.poi-option ::ng-deep .mat-pseudo-checkbox{display:none}::ng-deep .poi-select .mat-mdc-select-trigger{height:100%;display:flex;align-items:center}::ng-deep .poi-select-panel .mdc-list-item__primary-text{width:100%}\n"] }]
|
|
3603
3660
|
}], propDecorators: { map: [{
|
|
3604
3661
|
type: Input
|
|
3605
3662
|
}], color: [{
|
|
@@ -3610,12 +3667,10 @@ function userButtonSlideInOut() {
|
|
|
3610
3667
|
return trigger('userButtonState', [
|
|
3611
3668
|
state('collapse', style({
|
|
3612
3669
|
width: '0',
|
|
3613
|
-
overflow: 'hidden'
|
|
3614
|
-
display: 'none'
|
|
3670
|
+
overflow: 'hidden'
|
|
3615
3671
|
})),
|
|
3616
3672
|
state('expand', style({
|
|
3617
|
-
overflow: 'hidden'
|
|
3618
|
-
display: 'display'
|
|
3673
|
+
overflow: 'hidden'
|
|
3619
3674
|
})),
|
|
3620
3675
|
transition('collapse => expand', animate('200ms')),
|
|
3621
3676
|
transition('expand => collapse', animate('200ms'))
|
|
@@ -3636,10 +3691,10 @@ class UserDialogComponent {
|
|
|
3636
3691
|
clearPreferences() {
|
|
3637
3692
|
this.storageService.clear();
|
|
3638
3693
|
}
|
|
3639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: UserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: UserDialogComponent, isStandalone: true, selector: "igo-user-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\n {{ 'igo.context.userButton.infoTitle' | translate }}\n</h1>\n<div mat-dialog-content>\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 matButton=\"elevated\" 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: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3641
3696
|
}
|
|
3642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: UserDialogComponent, decorators: [{
|
|
3643
3698
|
type: Component,
|
|
3644
3699
|
args: [{ selector: 'igo-user-dialog', imports: [
|
|
3645
3700
|
MatDialogTitle,
|
|
@@ -3690,10 +3745,10 @@ class UserButtonComponent {
|
|
|
3690
3745
|
infoUser() {
|
|
3691
3746
|
this.dialog.open(UserDialogComponent, { disableClose: false });
|
|
3692
3747
|
}
|
|
3693
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3748
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: UserButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3749
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: UserButtonComponent, isStandalone: true, selector: "igo-user-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "@if (visible) {\n <div class=\"igo-user-button-container\">\n <div\n class=\"igo-user-button-more-container\"\n [@userButtonState]=\"expand ? 'expand' : 'collapse'\"\n >\n @if (hasApi) {\n <igo-poi-button [color]=\"color\" [map]=\"map\" />\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>info</mat-icon>\n </button>\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>power_settings_new</mat-icon>\n </button>\n </div>\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\"\n >\n <mat-icon>account_box</mat-icon>\n </button>\n </div>\n}\n", styles: [":host button{border-radius:0!important;background-color:var(--mat-sys-surface-bright)}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}.igo-user-button-container,.igo-user-button-more-container{display:flex;gap:4px}\n"], dependencies: [{ kind: "component", type: PoiButtonComponent, selector: "igo-poi-button", inputs: ["map", "color"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], animations: [userButtonSlideInOut()] });
|
|
3695
3750
|
}
|
|
3696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: UserButtonComponent, decorators: [{
|
|
3697
3752
|
type: Component,
|
|
3698
3753
|
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], imports: [
|
|
3699
3754
|
PoiButtonComponent,
|
|
@@ -3717,20 +3772,20 @@ class IgoContextMapButtonModule {
|
|
|
3717
3772
|
ngModule: IgoContextMapButtonModule
|
|
3718
3773
|
};
|
|
3719
3774
|
}
|
|
3720
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3721
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3775
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3776
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoContextMapButtonModule, imports: [BookmarkButtonComponent,
|
|
3722
3777
|
BookmarkDialogComponent,
|
|
3723
3778
|
PoiButtonComponent,
|
|
3724
3779
|
UserButtonComponent], exports: [BookmarkButtonComponent,
|
|
3725
3780
|
PoiButtonComponent,
|
|
3726
3781
|
UserButtonComponent,
|
|
3727
3782
|
BookmarkDialogComponent] });
|
|
3728
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3783
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [BookmarkButtonComponent,
|
|
3729
3784
|
BookmarkDialogComponent,
|
|
3730
3785
|
PoiButtonComponent,
|
|
3731
3786
|
UserButtonComponent] });
|
|
3732
3787
|
}
|
|
3733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
|
|
3734
3789
|
type: NgModule,
|
|
3735
3790
|
args: [{
|
|
3736
3791
|
imports: [
|
|
@@ -3772,7 +3827,7 @@ class ShareMapUrlComponent {
|
|
|
3772
3827
|
this.mapState$$?.unsubscribe();
|
|
3773
3828
|
}
|
|
3774
3829
|
generateUrl() {
|
|
3775
|
-
this.url = this.shareMapService.
|
|
3830
|
+
this.url = this.shareMapService.generateUrl(this.map(), this.contextService.context$.value);
|
|
3776
3831
|
}
|
|
3777
3832
|
copyTextToClipboard(textArea) {
|
|
3778
3833
|
const successful = this.clipboard.copy(textArea.value);
|
|
@@ -3780,10 +3835,10 @@ class ShareMapUrlComponent {
|
|
|
3780
3835
|
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3781
3836
|
}
|
|
3782
3837
|
}
|
|
3783
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3784
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3838
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapUrlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3839
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: ShareMapUrlComponent, isStandalone: true, selector: "igo-share-map-url", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"igo-input-container\">\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-share-map-url-content\">\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon>content_copy</mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n\n <div>\n <br />\n <section>\n @if (('igo.context.shareMap.htmlClarifications' | translate) === '') {\n <div>\n @if (('igo.context.shareMap.included' | translate) !== '') {\n <h4>\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n }\n <ul>\n @if (('igo.context.shareMap.context' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.center' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.zoom' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.addedLayers' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n }\n @if (\n ('igo.context.shareMap.visibleInvisible' | translate) !== ''\n ) {\n <li>\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n }\n </ul>\n @if (('igo.context.shareMap.excluded' | translate) !== '') {\n <h4>\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n }\n <ul>\n @if (('igo.context.shareMap.order' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.opacity' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.filterOgc' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.filterTime' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n }\n </ul>\n </div>\n }\n @if (('igo.context.shareMap.htmlClarifications' | translate) !== '') {\n <igo-custom-html\n class=\"shareCustomPadding\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n />\n }\n </section>\n </div>\n </div>\n</div>\n", styles: ["mat-form-field{width:100%}.igo-share-map-url-content{padding:16px}.igo-form-button-group{text-align:center}igo-custom-html.shareCustomPadding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: CustomHtmlComponent, selector: "igo-custom-html", inputs: ["html"] }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3785
3840
|
}
|
|
3786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
|
|
3787
3842
|
type: Component,
|
|
3788
3843
|
args: [{ selector: 'igo-share-map-url', imports: [
|
|
3789
3844
|
MatFormFieldModule,
|
|
@@ -3797,10 +3852,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3797
3852
|
|
|
3798
3853
|
class ShareMapComponent {
|
|
3799
3854
|
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3800
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3801
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
3855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3856
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.19", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<igo-share-map-url [map]=\"map()\" />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }] });
|
|
3802
3857
|
}
|
|
3803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ShareMapComponent, decorators: [{
|
|
3804
3859
|
type: Component,
|
|
3805
3860
|
args: [{ selector: 'igo-share-map', imports: [MatTabsModule, ShareMapUrlComponent], template: "<igo-share-map-url [map]=\"map()\" />\n" }]
|
|
3806
3861
|
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
@@ -3818,11 +3873,11 @@ class IgoShareMapModule {
|
|
|
3818
3873
|
ngModule: IgoShareMapModule
|
|
3819
3874
|
};
|
|
3820
3875
|
}
|
|
3821
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3822
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3823
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3877
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent], exports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3878
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3824
3879
|
}
|
|
3825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoShareMapModule, decorators: [{
|
|
3826
3881
|
type: NgModule,
|
|
3827
3882
|
args: [{
|
|
3828
3883
|
imports: [ShareMapComponent, ShareMapUrlComponent],
|
|
@@ -3901,10 +3956,10 @@ class SidenavComponent {
|
|
|
3901
3956
|
this.topPanelState = 'initial';
|
|
3902
3957
|
}
|
|
3903
3958
|
}
|
|
3904
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3905
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3959
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3960
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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 @if (tool) {\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n >\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n\n @if (tool) {\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n @if (feature && media !== 'mobile') {\n <igo-panel [title]=\"featureTitle\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon>{{\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n }}</mat-icon>\n </button>\n @if (feature.geometry) {\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n >\n <mat-icon>zoom_in</mat-icon>\n </button>\n }\n @if (['collapsed', 'initial'].indexOf(topPanel.state) >= 0) {\n <igo-feature-details [feature]=\"feature\" />\n }\n </igo-panel>\n }\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: i1$3.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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$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: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3906
3961
|
}
|
|
3907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
3908
3963
|
type: Component,
|
|
3909
3964
|
args: [{ selector: 'igo-sidenav', imports: [
|
|
3910
3965
|
MatSidenavModule,
|
|
@@ -3915,7 +3970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3915
3970
|
MatIconModule,
|
|
3916
3971
|
FeatureDetailsComponent,
|
|
3917
3972
|
IgoLanguageModule
|
|
3918
|
-
], 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 @if (tool) {\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n >\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n\n @if (tool) {\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n @if (feature && media !== 'mobile') {\n <igo-panel [title]=\"featureTitle\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon>{{\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n }}</mat-icon>\n </button>\n @if (feature.geometry) {\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n >\n <mat-icon>zoom_in</mat-icon>\n </button>\n }\n @if (['collapsed', 'initial'].indexOf(topPanel.state) >= 0) {\n <igo-feature-details [feature]=\"feature\" />\n }\n </igo-panel>\n }\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)
|
|
3973
|
+
], 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 @if (tool) {\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n >\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n\n @if (tool) {\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n @if (feature && media !== 'mobile') {\n <igo-panel [title]=\"featureTitle\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon>{{\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n }}</mat-icon>\n </button>\n @if (feature.geometry) {\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n >\n <mat-icon>zoom_in</mat-icon>\n </button>\n }\n @if (['collapsed', 'initial'].indexOf(topPanel.state) >= 0) {\n <igo-feature-details [feature]=\"feature\" />\n }\n </igo-panel>\n }\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"] }]
|
|
3919
3974
|
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
3920
3975
|
type: Input
|
|
3921
3976
|
}], opened: [{
|
|
@@ -3939,11 +3994,11 @@ class IgoSidenavModule {
|
|
|
3939
3994
|
ngModule: IgoSidenavModule
|
|
3940
3995
|
};
|
|
3941
3996
|
}
|
|
3942
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3943
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3944
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3997
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3998
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent], exports: [SidenavComponent] });
|
|
3999
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent] });
|
|
3945
4000
|
}
|
|
3946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoSidenavModule, decorators: [{
|
|
3947
4002
|
type: NgModule,
|
|
3948
4003
|
args: [{
|
|
3949
4004
|
imports: [SidenavComponent],
|
|
@@ -3960,19 +4015,19 @@ class IgoContextModule {
|
|
|
3960
4015
|
ngModule: IgoContextModule
|
|
3961
4016
|
};
|
|
3962
4017
|
}
|
|
3963
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3964
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4018
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4019
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoContextModule, exports: [IgoContextImportExportModule,
|
|
3965
4020
|
IgoContextManagerModule,
|
|
3966
4021
|
IgoContextMapButtonModule,
|
|
3967
4022
|
IgoShareMapModule,
|
|
3968
4023
|
IgoSidenavModule] });
|
|
3969
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
4024
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextModule, imports: [IgoContextImportExportModule,
|
|
3970
4025
|
IgoContextManagerModule,
|
|
3971
4026
|
IgoContextMapButtonModule,
|
|
3972
4027
|
IgoShareMapModule,
|
|
3973
4028
|
IgoSidenavModule] });
|
|
3974
4029
|
}
|
|
3975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoContextModule, decorators: [{
|
|
3976
4031
|
type: NgModule,
|
|
3977
4032
|
args: [{
|
|
3978
4033
|
declarations: [],
|
|
@@ -3992,7 +4047,6 @@ const CONTEXT_MANAGER_DIRECTIVES = [
|
|
|
3992
4047
|
ContextFormComponent,
|
|
3993
4048
|
ContextEditComponent,
|
|
3994
4049
|
ContextPermissionsComponent,
|
|
3995
|
-
ContextPermissionsBindingDirective,
|
|
3996
4050
|
MapContextDirective,
|
|
3997
4051
|
LayerContextDirective
|
|
3998
4052
|
];
|
|
@@ -4012,5 +4066,5 @@ const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
|
4012
4066
|
* Generated bundle index. Do not edit.
|
|
4013
4067
|
*/
|
|
4014
4068
|
|
|
4015
|
-
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent,
|
|
4069
|
+
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, GroupParamsKeys, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, LayerParamsKeys, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, SHARE_MAP_KEYS_DEFAULT_OPTIONS, Scope, ServiceType, ServiceTypeEnum, ShareMapComponent, ShareMapLegacyParser, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, buildDataSourceOptions, computeLayerTitleFromFile, getFileExtension, getFlattenOptions, getParamValue, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hasLegacyParams, hasModernShareParams };
|
|
4016
4070
|
//# sourceMappingURL=igo2-context.mjs.map
|