@igo2/context 20.1.0-next.2 → 20.1.0-next.21
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 +439 -396
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +195 -273
- package/package.json +9 -8
|
@@ -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';
|
|
@@ -52,14 +53,14 @@ import { ActionStore, ActionbarMode, ActionbarComponent } from '@igo2/common/act
|
|
|
52
53
|
import { CollapsibleComponent } from '@igo2/common/collapsible';
|
|
53
54
|
import { ConfirmDialogService } from '@igo2/common/confirm-dialog';
|
|
54
55
|
import { ListComponent, ListItemDirective } from '@igo2/common/list';
|
|
55
|
-
import * as
|
|
56
|
+
import * as i6$1 from '@angular/material/radio';
|
|
56
57
|
import { MatRadioModule } from '@angular/material/radio';
|
|
57
58
|
import * as oleasing from 'ol/easing';
|
|
58
59
|
import * as olproj from 'ol/proj';
|
|
59
|
-
import { trigger, state,
|
|
60
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
60
61
|
import { CustomHtmlComponent } from '@igo2/common/custom-html';
|
|
61
62
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
62
|
-
import * as i1$
|
|
63
|
+
import * as i1$3 from '@angular/material/sidenav';
|
|
63
64
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
64
65
|
import { Title } from '@angular/platform-browser';
|
|
65
66
|
import { getEntityTitle } from '@igo2/common/entity';
|
|
@@ -160,8 +161,14 @@ function shareMapKeyDefs(options) {
|
|
|
160
161
|
},
|
|
161
162
|
names: {
|
|
162
163
|
key: 'n',
|
|
163
|
-
parse: (params) =>
|
|
164
|
-
|
|
164
|
+
parse: (params) => {
|
|
165
|
+
const param = extractParam(params, 'n');
|
|
166
|
+
if (!param)
|
|
167
|
+
return undefined;
|
|
168
|
+
const unbracketed = param.slice(1, -1);
|
|
169
|
+
return decodeURIComponent(unbracketed);
|
|
170
|
+
},
|
|
171
|
+
stringify: (value) => `[${encodeURIComponent(value)}]`
|
|
165
172
|
},
|
|
166
173
|
opacity: {
|
|
167
174
|
key: 'o',
|
|
@@ -206,7 +213,14 @@ function shareMapKeyDefs(options) {
|
|
|
206
213
|
key: 'pid',
|
|
207
214
|
parse: (params) => extractIdParam(params, 'pid')
|
|
208
215
|
},
|
|
209
|
-
title: {
|
|
216
|
+
title: {
|
|
217
|
+
key: 't',
|
|
218
|
+
parse: (params) => {
|
|
219
|
+
const param = extractParam(params, 't');
|
|
220
|
+
return param ? decodeURIComponent(param) : undefined;
|
|
221
|
+
},
|
|
222
|
+
stringify: (value) => encodeURIComponent(value)
|
|
223
|
+
},
|
|
210
224
|
visible: {
|
|
211
225
|
key: 'v',
|
|
212
226
|
parse: (params) => parseBooleanParam(params, 'v'),
|
|
@@ -404,9 +418,11 @@ class ShareMapEncoder {
|
|
|
404
418
|
map.layerController.baseLayer,
|
|
405
419
|
...map.layerController.layersFlattened
|
|
406
420
|
].filter(Boolean);
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
|
|
421
|
+
const urlParams = this.getBaseUrlConfig(map.viewController);
|
|
422
|
+
this.buildQueryUrl(layers, urlParams);
|
|
423
|
+
const [baseUrl] = this.document.location.href.split('?');
|
|
424
|
+
const queryString = urlParams.toString();
|
|
425
|
+
return queryString !== '' ? `${baseUrl}?${queryString}` : baseUrl;
|
|
410
426
|
}
|
|
411
427
|
/**
|
|
412
428
|
* Replaces local group IDs with unique IDs to avoid conflicts and have short URL.
|
|
@@ -461,15 +477,23 @@ class ShareMapEncoder {
|
|
|
461
477
|
getLayerItems(layers) {
|
|
462
478
|
return layers.filter(isLayerItem);
|
|
463
479
|
}
|
|
464
|
-
buildQueryUrl(layers) {
|
|
480
|
+
buildQueryUrl(layers, urlParams) {
|
|
465
481
|
const layersSharable = this.isLayerSharable(layers);
|
|
466
482
|
this.replaceGroupLocalIds(layersSharable);
|
|
467
483
|
const layersChanged = this.getFilteredMapLayers(layersSharable);
|
|
468
484
|
const groups = this.getLayerGroups(layersChanged);
|
|
469
|
-
const
|
|
485
|
+
const groupsQueryValue = this.buildGroupsQueryValue(groups);
|
|
470
486
|
const layersByService = this.generateLayersOptionsByService(this.getLayerItems(layersChanged));
|
|
471
|
-
const
|
|
472
|
-
|
|
487
|
+
const [urls, layerParams] = this.buildLayersQueryValues(layersByService);
|
|
488
|
+
if (urls.length > 0) {
|
|
489
|
+
urlParams.set(this.SHARE_MAP_DEFS.urlsKey, urls.join(','));
|
|
490
|
+
}
|
|
491
|
+
if (layerParams.length > 0) {
|
|
492
|
+
urlParams.set(this.SHARE_MAP_DEFS.layers.key, layerParams.join(';'));
|
|
493
|
+
}
|
|
494
|
+
if (groupsQueryValue) {
|
|
495
|
+
urlParams.set(this.SHARE_MAP_DEFS.groups.key, groupsQueryValue);
|
|
496
|
+
}
|
|
473
497
|
}
|
|
474
498
|
/**
|
|
475
499
|
* Retrieves the current context layers and maps them by identifier.
|
|
@@ -592,7 +616,9 @@ class ShareMapEncoder {
|
|
|
592
616
|
}
|
|
593
617
|
getLayerParams(layer) {
|
|
594
618
|
const dataSourceOptions = layer.dataSource.options;
|
|
595
|
-
const isExisting = this.
|
|
619
|
+
const isExisting = this.context?.layers
|
|
620
|
+
? this.hasLayerId(this.context.layers, layer.id)
|
|
621
|
+
: false;
|
|
596
622
|
return {
|
|
597
623
|
index: undefined,
|
|
598
624
|
...(isExisting
|
|
@@ -629,10 +655,7 @@ class ShareMapEncoder {
|
|
|
629
655
|
getVisibility(visibility) {
|
|
630
656
|
return !!visibility;
|
|
631
657
|
}
|
|
632
|
-
|
|
633
|
-
if (layersByService.length === 0)
|
|
634
|
-
return undefined;
|
|
635
|
-
const { urlsKey, layers } = this.SHARE_MAP_DEFS;
|
|
658
|
+
buildLayersQueryValues(layersByService) {
|
|
636
659
|
const urls = [];
|
|
637
660
|
const layerParams = [];
|
|
638
661
|
for (const [url, layer] of layersByService) {
|
|
@@ -648,14 +671,7 @@ class ShareMapEncoder {
|
|
|
648
671
|
urls.push(url);
|
|
649
672
|
}
|
|
650
673
|
}
|
|
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('&');
|
|
674
|
+
return [urls, layerParams];
|
|
659
675
|
}
|
|
660
676
|
stringifyLayerParams(params) {
|
|
661
677
|
const { index, ...restParams } = params;
|
|
@@ -667,34 +683,26 @@ class ShareMapEncoder {
|
|
|
667
683
|
getBaseUrlConfig(viewController) {
|
|
668
684
|
const { pos, contextKey, languageKey } = this.SHARE_MAP_DEFS;
|
|
669
685
|
const href = this.document.location.href;
|
|
670
|
-
const
|
|
671
|
-
const params = [];
|
|
686
|
+
const urlParams = this.getSanitizedParams(href);
|
|
672
687
|
if (pos) {
|
|
673
688
|
const positionStringified = this.stringifyPosition(this.getPosition(viewController));
|
|
674
|
-
|
|
689
|
+
urlParams.set(pos.key, positionStringified);
|
|
675
690
|
}
|
|
676
691
|
const contextUri = this.context?.uri;
|
|
677
692
|
if (contextUri)
|
|
678
|
-
|
|
679
|
-
if (this.language && !
|
|
680
|
-
|
|
681
|
-
return
|
|
693
|
+
urlParams.set(contextKey, contextUri);
|
|
694
|
+
if (this.language && !urlParams.has(languageKey))
|
|
695
|
+
urlParams.set(languageKey, this.language);
|
|
696
|
+
return urlParams;
|
|
682
697
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
return `${baseUrl}?`;
|
|
686
|
-
}
|
|
687
|
-
const keys = this.extractKeys(this.SHARE_MAP_DEFS);
|
|
688
|
-
const [base, queryString] = baseUrl.split('?');
|
|
698
|
+
getSanitizedParams(baseUrl) {
|
|
699
|
+
const [, queryString] = baseUrl.split('?');
|
|
689
700
|
const params = new URLSearchParams(queryString);
|
|
701
|
+
const keys = this.extractKeys(this.SHARE_MAP_DEFS);
|
|
690
702
|
keys.forEach((key) => {
|
|
691
703
|
params.delete(key);
|
|
692
704
|
});
|
|
693
|
-
|
|
694
|
-
if (newQueryString !== '') {
|
|
695
|
-
return `${base}?${newQueryString}&`;
|
|
696
|
-
}
|
|
697
|
-
return `${base}?`;
|
|
705
|
+
return params;
|
|
698
706
|
}
|
|
699
707
|
extractKeys(defs) {
|
|
700
708
|
const keys = [];
|
|
@@ -757,17 +765,15 @@ class ShareMapEncoder {
|
|
|
757
765
|
.join(',');
|
|
758
766
|
return result === '' ? undefined : result;
|
|
759
767
|
}
|
|
760
|
-
|
|
768
|
+
buildGroupsQueryValue(layers) {
|
|
761
769
|
if (layers.length === 0)
|
|
762
770
|
return undefined;
|
|
763
|
-
|
|
764
|
-
const queryUrl = layers
|
|
771
|
+
return layers
|
|
765
772
|
.map((layer) => {
|
|
766
773
|
const params = this.getLayerGroupParams(layer);
|
|
767
774
|
return this.stringifyGroupParams(params);
|
|
768
775
|
})
|
|
769
776
|
.join(';');
|
|
770
|
-
return `${key}=${queryUrl}`;
|
|
771
777
|
}
|
|
772
778
|
getLayerGroupParams(layer) {
|
|
773
779
|
return {
|
|
@@ -990,7 +996,7 @@ class ShareMapParser {
|
|
|
990
996
|
return value ? value.split(delimiter) : [];
|
|
991
997
|
}
|
|
992
998
|
parsePosition(params) {
|
|
993
|
-
const position = params[this.keysDefinitions.pos.key];
|
|
999
|
+
const position = decodeURIComponent(params[this.keysDefinitions.pos.key]);
|
|
994
1000
|
if (!position) {
|
|
995
1001
|
return this.legacy.parsePosition(params);
|
|
996
1002
|
}
|
|
@@ -1069,7 +1075,7 @@ class ShareMapParser {
|
|
|
1069
1075
|
if (!matches)
|
|
1070
1076
|
return undefined;
|
|
1071
1077
|
return matches
|
|
1072
|
-
.map((match) => match.slice(1, -`]${names.key}`.length))
|
|
1078
|
+
.map((match) => decodeURIComponent(match.slice(1, -`]${names.key}`.length)))
|
|
1073
1079
|
.join('\n')
|
|
1074
1080
|
.split(',');
|
|
1075
1081
|
}
|
|
@@ -1088,7 +1094,16 @@ class ShareMapParser {
|
|
|
1088
1094
|
class ShareMapService {
|
|
1089
1095
|
routeService = inject(RouteService);
|
|
1090
1096
|
document = inject(DOCUMENT);
|
|
1091
|
-
language
|
|
1097
|
+
get language() {
|
|
1098
|
+
return this._language;
|
|
1099
|
+
}
|
|
1100
|
+
set language(value) {
|
|
1101
|
+
this._language = value;
|
|
1102
|
+
if (this.encoder) {
|
|
1103
|
+
this.encoder.language = value;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
_language = '';
|
|
1092
1107
|
options;
|
|
1093
1108
|
optionsLegacy;
|
|
1094
1109
|
keysDefinitions;
|
|
@@ -1107,23 +1122,41 @@ class ShareMapService {
|
|
|
1107
1122
|
const language = params[this.keysDefinitions.languageKey];
|
|
1108
1123
|
if (language) {
|
|
1109
1124
|
this.language = language;
|
|
1110
|
-
this.encoder.language = language;
|
|
1111
1125
|
}
|
|
1112
1126
|
});
|
|
1113
1127
|
}
|
|
1128
|
+
generateUrl(map, context) {
|
|
1129
|
+
return this.encoder.generateUrl(map, context);
|
|
1130
|
+
}
|
|
1131
|
+
parsePosition(params) {
|
|
1132
|
+
return this.parser.parsePosition(params);
|
|
1133
|
+
}
|
|
1134
|
+
parseLayers(params) {
|
|
1135
|
+
return this.parser.parseLayers(params);
|
|
1136
|
+
}
|
|
1137
|
+
sanitizeBaseUrl(baseUrl) {
|
|
1138
|
+
const params = this.encoder.getSanitizedParams(baseUrl);
|
|
1139
|
+
const [base] = baseUrl.split('?');
|
|
1140
|
+
const queryString = params.toString();
|
|
1141
|
+
return queryString !== '' ? `${base}?${queryString}&` : `${base}?`;
|
|
1142
|
+
}
|
|
1114
1143
|
getContext(params) {
|
|
1115
1144
|
return (params[this.options.context] ?? params[this.optionsLegacy.contextKey]);
|
|
1116
1145
|
}
|
|
1117
1146
|
getZoom(params) {
|
|
1118
|
-
return this.
|
|
1147
|
+
return this.parsePosition(params).zoom;
|
|
1119
1148
|
}
|
|
1120
1149
|
getUrlWithApi(formValues) {
|
|
1121
1150
|
const loc = this.document.location;
|
|
1122
1151
|
const origin = loc.origin;
|
|
1123
1152
|
const pathname = loc.pathname;
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1153
|
+
const search = loc.search;
|
|
1154
|
+
const params = new URLSearchParams(search);
|
|
1155
|
+
params.set('context', formValues.uri);
|
|
1156
|
+
if (this.language) {
|
|
1157
|
+
params.set('lang', this.language);
|
|
1158
|
+
}
|
|
1159
|
+
return `${origin}${pathname}?${params.toString()}`;
|
|
1127
1160
|
}
|
|
1128
1161
|
hasPositionParams(params) {
|
|
1129
1162
|
const { projectionKey, rotationKey, zoomKey, centerKey } = this.optionsLegacy;
|
|
@@ -1134,29 +1167,16 @@ class ShareMapService {
|
|
|
1134
1167
|
params[zoomKey] ||
|
|
1135
1168
|
params[centerKey]);
|
|
1136
1169
|
}
|
|
1137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1138
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1171
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapService, providedIn: 'root' });
|
|
1139
1172
|
}
|
|
1140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapService, decorators: [{
|
|
1141
1174
|
type: Injectable,
|
|
1142
1175
|
args: [{
|
|
1143
1176
|
providedIn: 'root'
|
|
1144
1177
|
}]
|
|
1145
1178
|
}], ctorParameters: () => [] });
|
|
1146
1179
|
|
|
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
1180
|
class ContextService {
|
|
1161
1181
|
http = inject(HttpClient);
|
|
1162
1182
|
authService = inject(AuthService);
|
|
@@ -1232,6 +1252,13 @@ class ContextService {
|
|
|
1232
1252
|
throw res;
|
|
1233
1253
|
}));
|
|
1234
1254
|
}
|
|
1255
|
+
getDetailsByUri(uri) {
|
|
1256
|
+
const url = `${this.baseUrl}/contexts/uri/${uri}/details`;
|
|
1257
|
+
return this.http.get(url).pipe(catchError((res) => {
|
|
1258
|
+
this.handleError(res, uri);
|
|
1259
|
+
throw res;
|
|
1260
|
+
}));
|
|
1261
|
+
}
|
|
1235
1262
|
getDefault() {
|
|
1236
1263
|
if (this.authService.authenticated) {
|
|
1237
1264
|
const url = this.baseUrl + '/contexts/default';
|
|
@@ -1273,10 +1300,6 @@ class ContextService {
|
|
|
1273
1300
|
delete(id, imported = false) {
|
|
1274
1301
|
const contexts = { ours: [] };
|
|
1275
1302
|
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
1303
|
if (imported) {
|
|
1281
1304
|
this.importedContext = this.importedContext.filter((c) => c.id !== id);
|
|
1282
1305
|
return of(this.contexts$.next(contexts));
|
|
@@ -1284,16 +1307,17 @@ class ContextService {
|
|
|
1284
1307
|
const url = this.baseUrl + '/contexts/' + id;
|
|
1285
1308
|
return this.http.delete(url).pipe(tap(() => {
|
|
1286
1309
|
this.contexts$.next(contexts);
|
|
1310
|
+
this.loadContext(this.defaultContextUri);
|
|
1287
1311
|
}));
|
|
1288
1312
|
}
|
|
1289
1313
|
create(context) {
|
|
1290
1314
|
const url = this.baseUrl + '/contexts';
|
|
1291
1315
|
return this.http.post(url, context).pipe(map((contextCreated) => {
|
|
1292
1316
|
if (this.authService.authenticated) {
|
|
1293
|
-
contextCreated.permission =
|
|
1317
|
+
contextCreated.permission = 'write';
|
|
1294
1318
|
}
|
|
1295
1319
|
else {
|
|
1296
|
-
contextCreated.permission =
|
|
1320
|
+
contextCreated.permission = 'read';
|
|
1297
1321
|
}
|
|
1298
1322
|
this.contexts$.value.ours.unshift(contextCreated);
|
|
1299
1323
|
this.contexts$.next(this.contexts$.value);
|
|
@@ -1303,7 +1327,7 @@ class ContextService {
|
|
|
1303
1327
|
clone(id, properties = {}) {
|
|
1304
1328
|
const url = this.baseUrl + '/contexts/' + id + '/clone';
|
|
1305
1329
|
return this.http.post(url, properties).pipe(map((contextCloned) => {
|
|
1306
|
-
contextCloned.permission =
|
|
1330
|
+
contextCloned.permission = 'write';
|
|
1307
1331
|
this.contexts$.value.ours.unshift(contextCloned);
|
|
1308
1332
|
this.contexts$.next(this.contexts$.value);
|
|
1309
1333
|
return contextCloned;
|
|
@@ -1325,25 +1349,6 @@ class ContextService {
|
|
|
1325
1349
|
const url = `${this.baseUrl}/contexts/${contextId}/tools/${toolId}`;
|
|
1326
1350
|
return this.http.delete(url);
|
|
1327
1351
|
}
|
|
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
1352
|
// ======================================================================
|
|
1348
1353
|
getLocalContexts() {
|
|
1349
1354
|
const url = this.getPath(this.options.contextListFile);
|
|
@@ -1398,13 +1403,16 @@ class ContextService {
|
|
|
1398
1403
|
loadDefaultContext() {
|
|
1399
1404
|
const loadFct = (direct = false) => {
|
|
1400
1405
|
if (!direct && this.baseUrl && this.authService.authenticated) {
|
|
1401
|
-
this.getDefault().subscribe(
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1406
|
+
this.getDefault().subscribe({
|
|
1407
|
+
next: (_context) => {
|
|
1408
|
+
this.defaultContextUri = _context.uri;
|
|
1409
|
+
this.addContextToList(_context);
|
|
1410
|
+
this.setContext(_context);
|
|
1411
|
+
},
|
|
1412
|
+
error: () => {
|
|
1413
|
+
this.defaultContextId$.next(undefined);
|
|
1414
|
+
this.loadContext(this.defaultContextUri);
|
|
1415
|
+
}
|
|
1408
1416
|
});
|
|
1409
1417
|
}
|
|
1410
1418
|
else {
|
|
@@ -1610,9 +1618,9 @@ class ContextService {
|
|
|
1610
1618
|
if (contextToLoad && contextToLoad.imported) {
|
|
1611
1619
|
return of(contextToLoad);
|
|
1612
1620
|
}
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1621
|
+
return contextToLoad
|
|
1622
|
+
? this.getDetails(contextToLoad.id)
|
|
1623
|
+
: this.getDetailsByUri(uri);
|
|
1616
1624
|
}
|
|
1617
1625
|
const importedContext = this.contexts$.value.ours.find((currentContext) => {
|
|
1618
1626
|
return currentContext.uri === uri && currentContext.imported === true;
|
|
@@ -1676,7 +1684,7 @@ class ContextService {
|
|
|
1676
1684
|
uri: context.uri,
|
|
1677
1685
|
title: context.title,
|
|
1678
1686
|
scope: context.scope,
|
|
1679
|
-
permission:
|
|
1687
|
+
permission: 'read'
|
|
1680
1688
|
};
|
|
1681
1689
|
if (this.contexts$.value && this.contexts$.value.public) {
|
|
1682
1690
|
this.contexts$.value.public.push(contextSimplifie);
|
|
@@ -1700,10 +1708,10 @@ class ContextService {
|
|
|
1700
1708
|
}
|
|
1701
1709
|
return found;
|
|
1702
1710
|
}
|
|
1703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1711
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1712
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextService, providedIn: 'root' });
|
|
1705
1713
|
}
|
|
1706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextService, decorators: [{
|
|
1707
1715
|
type: Injectable,
|
|
1708
1716
|
args: [{
|
|
1709
1717
|
providedIn: 'root'
|
|
@@ -1748,10 +1756,10 @@ class ContextExportService {
|
|
|
1748
1756
|
}
|
|
1749
1757
|
return false;
|
|
1750
1758
|
}
|
|
1751
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1752
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1759
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1760
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextExportService, providedIn: 'root' });
|
|
1753
1761
|
}
|
|
1754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextExportService, decorators: [{
|
|
1755
1763
|
type: Injectable,
|
|
1756
1764
|
args: [{
|
|
1757
1765
|
providedIn: 'root'
|
|
@@ -2015,10 +2023,10 @@ class ContextImportService {
|
|
|
2015
2023
|
const context = JSON.parse(data);
|
|
2016
2024
|
return context;
|
|
2017
2025
|
}
|
|
2018
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2019
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2026
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextImportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2027
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextImportService, providedIn: 'root' });
|
|
2020
2028
|
}
|
|
2021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextImportService, decorators: [{
|
|
2022
2030
|
type: Injectable,
|
|
2023
2031
|
args: [{
|
|
2024
2032
|
providedIn: 'root'
|
|
@@ -2113,10 +2121,10 @@ class ContextImportExportComponent {
|
|
|
2113
2121
|
onImportExportChange(event) {
|
|
2114
2122
|
this.activeImportExport = event.value;
|
|
2115
2123
|
}
|
|
2116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextImportExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
2126
|
}
|
|
2119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextImportExportComponent, decorators: [{
|
|
2120
2128
|
type: Component,
|
|
2121
2129
|
args: [{ selector: 'igo-context-import-export', imports: [
|
|
2122
2130
|
MatButtonToggleModule,
|
|
@@ -2143,11 +2151,11 @@ class IgoContextImportExportModule {
|
|
|
2143
2151
|
ngModule: IgoContextImportExportModule
|
|
2144
2152
|
};
|
|
2145
2153
|
}
|
|
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.
|
|
2154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2155
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent], exports: [ContextImportExportComponent] });
|
|
2156
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent] });
|
|
2149
2157
|
}
|
|
2150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
|
|
2151
2159
|
type: NgModule,
|
|
2152
2160
|
args: [{
|
|
2153
2161
|
imports: [ContextImportExportComponent],
|
|
@@ -2159,7 +2167,6 @@ class ContextFormComponent {
|
|
|
2159
2167
|
clipboard = inject(Clipboard);
|
|
2160
2168
|
formBuilder = inject(UntypedFormBuilder);
|
|
2161
2169
|
messageService = inject(MessageService);
|
|
2162
|
-
form;
|
|
2163
2170
|
prefix;
|
|
2164
2171
|
btnSubmitText = input(...(ngDevMode ? [undefined, { debugName: "btnSubmitText" }] : []));
|
|
2165
2172
|
context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
@@ -2167,14 +2174,13 @@ class ContextFormComponent {
|
|
|
2167
2174
|
submitForm = output();
|
|
2168
2175
|
clone = output();
|
|
2169
2176
|
delete = output();
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
}
|
|
2177
|
+
// WORKAROUND, the context-form is shown before the editedContext emit and we got change detection problem
|
|
2178
|
+
form = computed(() => {
|
|
2179
|
+
const context = this.context();
|
|
2180
|
+
if (context) {
|
|
2181
|
+
return this.buildForm(context);
|
|
2182
|
+
}
|
|
2183
|
+
}, ...(ngDevMode ? [{ debugName: "form" }] : []));
|
|
2178
2184
|
handleFormSubmit(value) {
|
|
2179
2185
|
let inputs = Object.assign({}, value);
|
|
2180
2186
|
inputs = ObjectUtils.removeNull(inputs);
|
|
@@ -2188,7 +2194,7 @@ class ContextFormComponent {
|
|
|
2188
2194
|
this.submitForm.emit(inputs);
|
|
2189
2195
|
}
|
|
2190
2196
|
copyTextToClipboard() {
|
|
2191
|
-
const text = this.prefix + '-' + this.form.value.uri.replace(' ', '');
|
|
2197
|
+
const text = this.prefix + '-' + this.form().value.uri.replace(' ', '');
|
|
2192
2198
|
const successful = this.clipboard.copy(text);
|
|
2193
2199
|
if (successful) {
|
|
2194
2200
|
this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
|
|
@@ -2198,15 +2204,15 @@ class ContextFormComponent {
|
|
|
2198
2204
|
const uriSplit = context.uri.split('-');
|
|
2199
2205
|
this.prefix = uriSplit.shift();
|
|
2200
2206
|
const uri = uriSplit.join('-');
|
|
2201
|
-
|
|
2207
|
+
return this.formBuilder.group({
|
|
2202
2208
|
title: [context.title],
|
|
2203
2209
|
uri: [uri || ' ']
|
|
2204
2210
|
});
|
|
2205
2211
|
}
|
|
2206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2207
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2212
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2213
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
2214
|
}
|
|
2209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextFormComponent, decorators: [{
|
|
2210
2216
|
type: Component,
|
|
2211
2217
|
args: [{ selector: 'igo-context-form', imports: [
|
|
2212
2218
|
FormsModule,
|
|
@@ -2217,8 +2223,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
2217
2223
|
MatTooltipModule,
|
|
2218
2224
|
MatIconModule,
|
|
2219
2225
|
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
|
-
}],
|
|
2226
|
+
], 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"] }]
|
|
2227
|
+
}], 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"] }] } });
|
|
2228
|
+
|
|
2229
|
+
const TypePermission = ['read', 'write'];
|
|
2230
|
+
var Scope;
|
|
2231
|
+
(function (Scope) {
|
|
2232
|
+
Scope[Scope["public"] = 0] = "public";
|
|
2233
|
+
Scope[Scope["protected"] = 1] = "protected";
|
|
2234
|
+
Scope[Scope["private"] = 2] = "private";
|
|
2235
|
+
})(Scope || (Scope = {}));
|
|
2222
2236
|
|
|
2223
2237
|
class LayerContextDirective {
|
|
2224
2238
|
component = inject(MapBrowserComponent);
|
|
@@ -2355,17 +2369,17 @@ class LayerContextDirective {
|
|
|
2355
2369
|
const { layers, uri } = context;
|
|
2356
2370
|
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
2357
2371
|
if (!contextValue || contextValue === uri) {
|
|
2358
|
-
const layersOptions = this.shareMapService.
|
|
2372
|
+
const layersOptions = this.shareMapService.parseLayers(this.queryParams);
|
|
2359
2373
|
if (layersOptions.length) {
|
|
2360
2374
|
return mergeLayersOptions([...layers], layersOptions);
|
|
2361
2375
|
}
|
|
2362
2376
|
}
|
|
2363
2377
|
return layers;
|
|
2364
2378
|
}
|
|
2365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2366
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
2379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2380
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.18", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: { classPropertyName: "removeLayersOnContextChange", publicName: "removeLayersOnContextChange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
2367
2381
|
}
|
|
2368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
2369
2383
|
type: Directive,
|
|
2370
2384
|
args: [{
|
|
2371
2385
|
selector: '[igoLayerContext]'
|
|
@@ -2418,7 +2432,7 @@ class MapContextDirective {
|
|
|
2418
2432
|
context.map.view.projection !== this.map.projection;
|
|
2419
2433
|
if (this.shareMapService.hasPositionParams(this.queryParams) &&
|
|
2420
2434
|
shouldOverrideView) {
|
|
2421
|
-
const positions = this.shareMapService.
|
|
2435
|
+
const positions = this.shareMapService.parsePosition(this.queryParams);
|
|
2422
2436
|
this.component.setView({ ...viewContext, ...positions });
|
|
2423
2437
|
}
|
|
2424
2438
|
else if (shouldOverrideView) {
|
|
@@ -2442,10 +2456,10 @@ class MapContextDirective {
|
|
|
2442
2456
|
this.component.controls = controlsContext;
|
|
2443
2457
|
}
|
|
2444
2458
|
}
|
|
2445
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2446
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
2459
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MapContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2460
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: MapContextDirective, isStandalone: true, selector: "[igoMapContext]", ngImport: i0 });
|
|
2447
2461
|
}
|
|
2448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MapContextDirective, decorators: [{
|
|
2449
2463
|
type: Directive,
|
|
2450
2464
|
args: [{
|
|
2451
2465
|
selector: '[igoMapContext]'
|
|
@@ -2455,18 +2469,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
2455
2469
|
class ContextEditComponent {
|
|
2456
2470
|
contextService = inject(ContextService);
|
|
2457
2471
|
messageService = inject(MessageService);
|
|
2458
|
-
context =
|
|
2472
|
+
context = toSignal(this.contextService.editedContext$);
|
|
2459
2473
|
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
2474
|
onEdit(context) {
|
|
2471
2475
|
const id = this.context().id;
|
|
2472
2476
|
this.contextService.update(id, context).subscribe(() => {
|
|
@@ -2482,12 +2486,12 @@ class ContextEditComponent {
|
|
|
2482
2486
|
this.submitSuccessed.emit(context);
|
|
2483
2487
|
});
|
|
2484
2488
|
}
|
|
2485
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2486
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2490
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
2491
|
}
|
|
2488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2489
2493
|
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" }]
|
|
2494
|
+
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
2495
|
}], propDecorators: { submitSuccessed: [{ type: i0.Output, args: ["submitSuccessed"] }] } });
|
|
2492
2496
|
|
|
2493
2497
|
class ContextItemComponent {
|
|
@@ -2524,10 +2528,10 @@ class ContextItemComponent {
|
|
|
2524
2528
|
favoriteClick(context) {
|
|
2525
2529
|
this.favorite.emit(context);
|
|
2526
2530
|
}
|
|
2527
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2528
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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 });
|
|
2531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
2533
|
}
|
|
2530
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2531
2535
|
type: Component,
|
|
2532
2536
|
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2533
2537
|
MatListModule,
|
|
@@ -2540,16 +2544,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
2540
2544
|
IgoLanguageModule
|
|
2541
2545
|
], host: {
|
|
2542
2546
|
'[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 ===
|
|
2547
|
+
}, 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
2548
|
}], 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
2549
|
|
|
2546
2550
|
class BookmarkDialogComponent {
|
|
2547
2551
|
dialogRef = inject(MatDialogRef);
|
|
2548
2552
|
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.
|
|
2553
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BookmarkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2554
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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
2555
|
}
|
|
2552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
|
|
2553
2557
|
type: Component,
|
|
2554
2558
|
args: [{ selector: 'igo-bookmark-dialog', imports: [
|
|
2555
2559
|
MatDialogTitle,
|
|
@@ -2750,6 +2754,11 @@ class ContextListComponent {
|
|
|
2750
2754
|
setSelected(context) {
|
|
2751
2755
|
this.selectedContext.set(context);
|
|
2752
2756
|
}
|
|
2757
|
+
// Comparator function to sort by context.title
|
|
2758
|
+
sortByKeyPriority = (a, b) => {
|
|
2759
|
+
const ORDER = ['ours', 'shared', 'public'];
|
|
2760
|
+
return ORDER.indexOf(a.key) - ORDER.indexOf(b.key);
|
|
2761
|
+
};
|
|
2753
2762
|
next() {
|
|
2754
2763
|
this.change$.next();
|
|
2755
2764
|
}
|
|
@@ -2952,12 +2961,12 @@ class ContextListComponent {
|
|
|
2952
2961
|
const currentContext = this.contextService.context$.value;
|
|
2953
2962
|
const { toolKey, sidenavKey, languageKey } = this.shareMapService.routeService.options;
|
|
2954
2963
|
const { context: contextKey } = this.shareMapService.options;
|
|
2955
|
-
const baseOrigin = this.shareMapService.
|
|
2964
|
+
const baseOrigin = this.shareMapService.sanitizeBaseUrl(this.shareMapService.document.location.href);
|
|
2956
2965
|
const url = context.uri === currentContext.uri
|
|
2957
|
-
? this.shareMapService.
|
|
2966
|
+
? this.shareMapService.generateUrl(this.map(), this.contextService.context$.value)
|
|
2958
2967
|
: `${baseOrigin}${contextKey}=${context.uri}`;
|
|
2959
2968
|
const params = [];
|
|
2960
|
-
const currentLanguage = this.shareMapService.
|
|
2969
|
+
const currentLanguage = this.shareMapService.language;
|
|
2961
2970
|
if (currentLanguage && !url.includes(`${languageKey}=`))
|
|
2962
2971
|
params.push(`${languageKey}=${currentLanguage}`);
|
|
2963
2972
|
if (!url.includes(`${toolKey}=`))
|
|
@@ -3021,6 +3030,7 @@ class ContextListComponent {
|
|
|
3021
3030
|
}
|
|
3022
3031
|
onFavorite(context) {
|
|
3023
3032
|
if (!context.id) {
|
|
3033
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3024
3034
|
context.id = context.uri;
|
|
3025
3035
|
}
|
|
3026
3036
|
this.contextService.setDefault(context.id).subscribe((defaultId) => {
|
|
@@ -3028,7 +3038,7 @@ class ContextListComponent {
|
|
|
3028
3038
|
this.messageService.remove(this.previousMessageId);
|
|
3029
3039
|
}
|
|
3030
3040
|
this.contextService.defaultContextId$.next(defaultId);
|
|
3031
|
-
if (defaultId) {
|
|
3041
|
+
if (defaultId != null && String(defaultId) === String(context.id)) {
|
|
3032
3042
|
const messageObj = this.messageService.success('igo.context.contextManager.dialog.favoriteMsg', 'igo.context.contextManager.dialog.favoriteTitle', undefined, {
|
|
3033
3043
|
value: context.title
|
|
3034
3044
|
});
|
|
@@ -3108,10 +3118,10 @@ class ContextListComponent {
|
|
|
3108
3118
|
}
|
|
3109
3119
|
this.hide.emit(context);
|
|
3110
3120
|
}
|
|
3111
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3112
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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 });
|
|
3121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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: 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 [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}.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$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: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3113
3123
|
}
|
|
3114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextListComponent, decorators: [{
|
|
3115
3125
|
type: Component,
|
|
3116
3126
|
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
3117
3127
|
ListComponent,
|
|
@@ -3130,7 +3140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3130
3140
|
AsyncPipe,
|
|
3131
3141
|
KeyValuePipe,
|
|
3132
3142
|
IgoLanguageModule
|
|
3133
|
-
], 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
|
|
3143
|
+
], 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: 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 [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}.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"] }]
|
|
3134
3144
|
}], ctorParameters: () => [], propDecorators: { isDesktop: [{
|
|
3135
3145
|
type: Input
|
|
3136
3146
|
}], contexts: [{
|
|
@@ -3141,142 +3151,178 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3141
3151
|
type: Input
|
|
3142
3152
|
}] } });
|
|
3143
3153
|
|
|
3154
|
+
class ContextPermissionItemComponent {
|
|
3155
|
+
permission = input.required(...(ngDevMode ? [{ debugName: "permission" }] : []));
|
|
3156
|
+
canWrite = input.required(...(ngDevMode ? [{ debugName: "canWrite" }] : []));
|
|
3157
|
+
user = input(...(ngDevMode ? [undefined, { debugName: "user" }] : []));
|
|
3158
|
+
type = computed(() => {
|
|
3159
|
+
const permission = this.permission();
|
|
3160
|
+
return isContextPermissionUser(permission)
|
|
3161
|
+
? this.isUserExtranet(permission)
|
|
3162
|
+
? 'Extranet'
|
|
3163
|
+
: 'Intranet'
|
|
3164
|
+
: 'Profil';
|
|
3165
|
+
}, ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
3166
|
+
icon = computed(() => {
|
|
3167
|
+
const permission = this.permission();
|
|
3168
|
+
return permission.profilType === 'user'
|
|
3169
|
+
? this.isUserExtranet(permission)
|
|
3170
|
+
? 'person'
|
|
3171
|
+
: 'person_shield'
|
|
3172
|
+
: 'badge';
|
|
3173
|
+
}, ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
3174
|
+
canDelete = computed(() => {
|
|
3175
|
+
const permission = this.permission();
|
|
3176
|
+
return (this.canWrite() ||
|
|
3177
|
+
(isContextPermissionUser(permission) &&
|
|
3178
|
+
permission.user.externalId === this.user().id));
|
|
3179
|
+
}, ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
3180
|
+
delete = output();
|
|
3181
|
+
isContextPermissionUser = isContextPermissionUser;
|
|
3182
|
+
isUserExtranet(permission) {
|
|
3183
|
+
return (isContextPermissionUser(permission) &&
|
|
3184
|
+
permission.userSource.includes('extranet'));
|
|
3185
|
+
}
|
|
3186
|
+
onDelete() {
|
|
3187
|
+
this.delete.emit(this.permission());
|
|
3188
|
+
}
|
|
3189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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" }] });
|
|
3191
|
+
}
|
|
3192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionItemComponent, decorators: [{
|
|
3193
|
+
type: Component,
|
|
3194
|
+
args: [{ selector: 'igo-context-permission-item', imports: [
|
|
3195
|
+
MatButtonModule,
|
|
3196
|
+
MatIconModule,
|
|
3197
|
+
MatListModule,
|
|
3198
|
+
MatTooltipModule,
|
|
3199
|
+
IgoLanguageModule
|
|
3200
|
+
], 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" }]
|
|
3201
|
+
}], 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"] }] } });
|
|
3202
|
+
function isContextPermissionUser(permission) {
|
|
3203
|
+
return permission.userId != null;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
class ContextPermissionService {
|
|
3207
|
+
http = inject(HttpClient);
|
|
3208
|
+
config = inject(ConfigService);
|
|
3209
|
+
languageService = inject(LanguageService);
|
|
3210
|
+
messageService = inject(MessageService);
|
|
3211
|
+
baseUrl;
|
|
3212
|
+
constructor() {
|
|
3213
|
+
const options = this.config.getConfig('context');
|
|
3214
|
+
this.baseUrl = options?.url ?? '';
|
|
3215
|
+
}
|
|
3216
|
+
getAll(id) {
|
|
3217
|
+
const url = this.baseUrl + '/contexts/' + id + '/permissions';
|
|
3218
|
+
return this.http.get(url);
|
|
3219
|
+
}
|
|
3220
|
+
add(contextId, permission) {
|
|
3221
|
+
const url = `${this.baseUrl}/contexts/${contextId}/permissions`;
|
|
3222
|
+
return this.http.post(url, permission).pipe(catchError$1((res) => {
|
|
3223
|
+
this.handleError(res, true);
|
|
3224
|
+
throw res;
|
|
3225
|
+
}));
|
|
3226
|
+
}
|
|
3227
|
+
delete(contextId, permissionId) {
|
|
3228
|
+
const url = `${this.baseUrl}/contexts/${contextId}/permissions/${permissionId}`;
|
|
3229
|
+
return this.http.delete(url);
|
|
3230
|
+
}
|
|
3231
|
+
handleError(error, permissionError) {
|
|
3232
|
+
error.error.toDisplay = true;
|
|
3233
|
+
if (permissionError) {
|
|
3234
|
+
error.error.title = this.languageService.translate.instant('igo.context.contextManager.errors.addPermissionTitle');
|
|
3235
|
+
error.error.message = this.languageService.translate.instant('igo.context.contextManager.errors.addPermission');
|
|
3236
|
+
}
|
|
3237
|
+
this.messageService.error('igo.context.contextManager.errors.addPermission', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3238
|
+
}
|
|
3239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3240
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionService, providedIn: 'root' });
|
|
3241
|
+
}
|
|
3242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionService, decorators: [{
|
|
3243
|
+
type: Injectable,
|
|
3244
|
+
args: [{
|
|
3245
|
+
providedIn: 'root'
|
|
3246
|
+
}]
|
|
3247
|
+
}], ctorParameters: () => [] });
|
|
3248
|
+
|
|
3144
3249
|
class ContextPermissionsComponent {
|
|
3145
3250
|
formBuilder = inject(UntypedFormBuilder);
|
|
3146
3251
|
http = inject(HttpClient);
|
|
3147
3252
|
authService = inject(AuthService);
|
|
3148
3253
|
config = inject(ConfigService);
|
|
3254
|
+
contextService = inject(ContextService);
|
|
3255
|
+
contextPermissionService = inject(ContextPermissionService);
|
|
3256
|
+
messageService = inject(MessageService);
|
|
3257
|
+
destroyRef = inject(DestroyRef); // Modern way to handle cleanup
|
|
3149
3258
|
form;
|
|
3150
3259
|
context = model(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
3151
3260
|
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
|
-
}
|
|
3261
|
+
permissionsRead = computed(() => this.permissions().filter((permission) => permission.typePermission === 'read'), ...(ngDevMode ? [{ debugName: "permissionsRead" }] : []));
|
|
3262
|
+
permissionsWrite = computed(() => this.permissions().filter((permission) => permission.typePermission === 'write'), ...(ngDevMode ? [{ debugName: "permissionsWrite" }] : []));
|
|
3263
|
+
profils = signal([], ...(ngDevMode ? [{ debugName: "profils" }] : []));
|
|
3264
|
+
canWrite = computed(() => this.context().permission === 'write', ...(ngDevMode ? [{ debugName: "canWrite" }] : []));
|
|
3162
3265
|
baseUrlProfils;
|
|
3163
3266
|
formControl = new UntypedFormControl();
|
|
3164
3267
|
formValueChanges$$;
|
|
3165
|
-
addPermission = output();
|
|
3166
|
-
removePermission = output();
|
|
3167
|
-
scopeChanged = output();
|
|
3168
3268
|
ngOnInit() {
|
|
3169
3269
|
this.buildForm();
|
|
3170
3270
|
this.baseUrlProfils =
|
|
3171
|
-
this.config.getConfig('context.url') + '/profils
|
|
3271
|
+
this.config.getConfig('context.url') + '/profils/users?';
|
|
3172
3272
|
this.formValueChanges$$ = this.formControl.valueChanges.subscribe((value) => {
|
|
3173
3273
|
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
|
-
});
|
|
3274
|
+
this.getProfils(value).subscribe((profils) => this.profils.set(profils));
|
|
3195
3275
|
}
|
|
3196
3276
|
else {
|
|
3197
|
-
this.profils
|
|
3277
|
+
this.profils.set([]);
|
|
3198
3278
|
}
|
|
3199
3279
|
});
|
|
3280
|
+
this.handleEditedContextChange();
|
|
3200
3281
|
}
|
|
3201
3282
|
displayFn(profil) {
|
|
3202
3283
|
return profil ? profil.title : undefined;
|
|
3203
3284
|
}
|
|
3204
3285
|
handleFormSubmit(value) {
|
|
3205
|
-
this.
|
|
3286
|
+
const contextId = this.context().id;
|
|
3287
|
+
this.contextPermissionService
|
|
3288
|
+
.add(contextId, value)
|
|
3289
|
+
.subscribe((permission) => {
|
|
3290
|
+
this.permissions.update((permissions) => {
|
|
3291
|
+
permissions.push(permission);
|
|
3292
|
+
return [...permissions];
|
|
3293
|
+
});
|
|
3294
|
+
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: permission.title });
|
|
3295
|
+
});
|
|
3206
3296
|
}
|
|
3207
3297
|
buildForm() {
|
|
3208
3298
|
this.form = this.formBuilder.group({
|
|
3209
|
-
|
|
3299
|
+
id: null,
|
|
3300
|
+
userExternalId: null,
|
|
3301
|
+
profilId: null,
|
|
3210
3302
|
typePermission: ['read']
|
|
3211
3303
|
});
|
|
3212
3304
|
}
|
|
3213
3305
|
onProfilSelected(value) {
|
|
3214
3306
|
this.form.setValue({
|
|
3215
|
-
|
|
3307
|
+
id: value.id,
|
|
3308
|
+
userExternalId: value.type === 'user' ? value.id : null,
|
|
3309
|
+
profilId: value.type === 'profil' ? value.id : null,
|
|
3216
3310
|
typePermission: this.form.value.typePermission
|
|
3217
3311
|
});
|
|
3218
3312
|
}
|
|
3219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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.6", 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
3313
|
onRemovePermission(permission) {
|
|
3269
|
-
const contextId = this.
|
|
3270
|
-
this.
|
|
3271
|
-
.
|
|
3314
|
+
const contextId = this.context().id;
|
|
3315
|
+
this.contextPermissionService
|
|
3316
|
+
.delete(contextId, permission.id)
|
|
3272
3317
|
.subscribe(() => {
|
|
3273
|
-
|
|
3274
|
-
|
|
3318
|
+
this.permissions.update((permissions) => {
|
|
3319
|
+
const index = permissions.findIndex((p) => {
|
|
3320
|
+
return p.id === permission.id;
|
|
3321
|
+
});
|
|
3322
|
+
permissions.splice(index, 1);
|
|
3323
|
+
return [...permissions];
|
|
3275
3324
|
});
|
|
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();
|
|
3325
|
+
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: permission.title });
|
|
3280
3326
|
});
|
|
3281
3327
|
}
|
|
3282
3328
|
onScopeChanged(context) {
|
|
@@ -3285,55 +3331,58 @@ class ContextPermissionsBindingDirective {
|
|
|
3285
3331
|
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3286
3332
|
});
|
|
3287
3333
|
}
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3334
|
+
handleEditedContextChange() {
|
|
3335
|
+
this.contextService.editedContext$
|
|
3336
|
+
.pipe(
|
|
3337
|
+
// 1. Cleanly handle the context update
|
|
3338
|
+
tap$1((context) => this.context.set(context)),
|
|
3339
|
+
// 2. Switch to the permissions call, or return an empty array if context is null
|
|
3340
|
+
switchMap$1((context) => {
|
|
3341
|
+
if (!context)
|
|
3342
|
+
return of([]);
|
|
3343
|
+
return this.contextPermissionService.getAll(context.id);
|
|
3344
|
+
}),
|
|
3345
|
+
// 3. Automatically unsubscribe when component is destroyed
|
|
3346
|
+
takeUntilDestroyed(this.destroyRef))
|
|
3347
|
+
.subscribe((permissions) => {
|
|
3348
|
+
this.permissions.set(permissions);
|
|
3349
|
+
});
|
|
3298
3350
|
}
|
|
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
|
-
}
|
|
3351
|
+
getProfils(value) {
|
|
3352
|
+
return this.http
|
|
3353
|
+
.get(this.baseUrlProfils + 'q=' + value)
|
|
3354
|
+
.pipe(map$1((profils) => {
|
|
3355
|
+
const search = normalizeStr(value);
|
|
3356
|
+
return profils.filter((p) => normalizeStr(p.name + p.title).includes(search));
|
|
3357
|
+
}));
|
|
3317
3358
|
}
|
|
3318
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3319
|
-
static
|
|
3359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
3361
|
}
|
|
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
|
-
|
|
3362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3363
|
+
type: Component,
|
|
3364
|
+
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3365
|
+
CollapsibleComponent,
|
|
3366
|
+
FormsModule,
|
|
3367
|
+
IgoLanguageModule,
|
|
3368
|
+
ListComponent,
|
|
3369
|
+
MatAutocompleteModule,
|
|
3370
|
+
MatButtonModule,
|
|
3371
|
+
MatFormFieldModule,
|
|
3372
|
+
MatIconModule,
|
|
3373
|
+
MatInputModule,
|
|
3374
|
+
MatListModule,
|
|
3375
|
+
MatOptionModule,
|
|
3376
|
+
MatRadioModule,
|
|
3377
|
+
MatTooltipModule,
|
|
3378
|
+
ReactiveFormsModule,
|
|
3379
|
+
ContextPermissionItemComponent
|
|
3380
|
+
], 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"] }]
|
|
3381
|
+
}], 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"] }] } });
|
|
3382
|
+
const normalizeStr = (str) => str
|
|
3383
|
+
.toLowerCase()
|
|
3384
|
+
.normalize('NFD')
|
|
3385
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
3337
3386
|
|
|
3338
3387
|
/**
|
|
3339
3388
|
* @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set
|
|
@@ -3344,29 +3393,27 @@ class IgoContextManagerModule {
|
|
|
3344
3393
|
ngModule: IgoContextManagerModule
|
|
3345
3394
|
};
|
|
3346
3395
|
}
|
|
3347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3348
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3396
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3397
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3349
3398
|
ContextItemComponent,
|
|
3350
3399
|
ContextFormComponent,
|
|
3351
3400
|
ContextEditComponent,
|
|
3352
3401
|
ContextPermissionsComponent,
|
|
3353
|
-
ContextPermissionsBindingDirective,
|
|
3354
3402
|
LayerContextDirective,
|
|
3355
3403
|
MapContextDirective], exports: [ContextListComponent,
|
|
3356
3404
|
ContextItemComponent,
|
|
3357
3405
|
ContextFormComponent,
|
|
3358
3406
|
ContextEditComponent,
|
|
3359
3407
|
ContextPermissionsComponent,
|
|
3360
|
-
ContextPermissionsBindingDirective,
|
|
3361
3408
|
LayerContextDirective,
|
|
3362
3409
|
MapContextDirective] });
|
|
3363
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3410
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3364
3411
|
ContextItemComponent,
|
|
3365
3412
|
ContextFormComponent,
|
|
3366
3413
|
ContextEditComponent,
|
|
3367
3414
|
ContextPermissionsComponent] });
|
|
3368
3415
|
}
|
|
3369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextManagerModule, decorators: [{
|
|
3370
3417
|
type: NgModule,
|
|
3371
3418
|
args: [{
|
|
3372
3419
|
imports: [
|
|
@@ -3375,7 +3422,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3375
3422
|
ContextFormComponent,
|
|
3376
3423
|
ContextEditComponent,
|
|
3377
3424
|
ContextPermissionsComponent,
|
|
3378
|
-
ContextPermissionsBindingDirective,
|
|
3379
3425
|
LayerContextDirective,
|
|
3380
3426
|
MapContextDirective
|
|
3381
3427
|
],
|
|
@@ -3385,7 +3431,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3385
3431
|
ContextFormComponent,
|
|
3386
3432
|
ContextEditComponent,
|
|
3387
3433
|
ContextPermissionsComponent,
|
|
3388
|
-
ContextPermissionsBindingDirective,
|
|
3389
3434
|
LayerContextDirective,
|
|
3390
3435
|
MapContextDirective
|
|
3391
3436
|
]
|
|
@@ -3426,10 +3471,10 @@ class BookmarkButtonComponent {
|
|
|
3426
3471
|
}
|
|
3427
3472
|
});
|
|
3428
3473
|
}
|
|
3429
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3430
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3474
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BookmarkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3475
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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
3476
|
}
|
|
3432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
|
|
3433
3478
|
type: Component,
|
|
3434
3479
|
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
3480
|
}], propDecorators: { map: [{
|
|
@@ -3441,10 +3486,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3441
3486
|
class PoiDialogComponent {
|
|
3442
3487
|
dialogRef = inject(MatDialogRef);
|
|
3443
3488
|
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.
|
|
3489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3490
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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
3491
|
}
|
|
3447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiDialogComponent, decorators: [{
|
|
3448
3493
|
type: Component,
|
|
3449
3494
|
args: [{ selector: 'igo-poi-dialog', imports: [
|
|
3450
3495
|
MatDialogTitle,
|
|
@@ -3480,10 +3525,10 @@ class PoiService {
|
|
|
3480
3525
|
const url = this.baseUrl + '/pois';
|
|
3481
3526
|
return this.http.post(url, context);
|
|
3482
3527
|
}
|
|
3483
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3484
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3529
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiService });
|
|
3485
3530
|
}
|
|
3486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiService, decorators: [{
|
|
3487
3532
|
type: Injectable
|
|
3488
3533
|
}], ctorParameters: () => [] });
|
|
3489
3534
|
|
|
@@ -3494,6 +3539,7 @@ class PoiButtonComponent {
|
|
|
3494
3539
|
messageService = inject(MessageService);
|
|
3495
3540
|
languageService = inject(LanguageService);
|
|
3496
3541
|
confirmDialogService = inject(ConfirmDialogService);
|
|
3542
|
+
selected;
|
|
3497
3543
|
get map() {
|
|
3498
3544
|
return this._map;
|
|
3499
3545
|
}
|
|
@@ -3585,21 +3631,21 @@ class PoiButtonComponent {
|
|
|
3585
3631
|
easing: oleasing.easeOut
|
|
3586
3632
|
});
|
|
3587
3633
|
}
|
|
3588
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3589
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3634
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3635
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
3636
|
}
|
|
3591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: PoiButtonComponent, decorators: [{
|
|
3592
3638
|
type: Component,
|
|
3593
3639
|
args: [{ selector: 'igo-poi-button', imports: [
|
|
3594
|
-
|
|
3595
|
-
MatOptionModule,
|
|
3640
|
+
IgoLanguageModule,
|
|
3596
3641
|
MatButtonModule,
|
|
3597
|
-
StopPropagationDirective,
|
|
3598
|
-
MatIconModule,
|
|
3599
3642
|
MatDividerModule,
|
|
3643
|
+
MatIconModule,
|
|
3644
|
+
MatOptionModule,
|
|
3645
|
+
MatSelectModule,
|
|
3600
3646
|
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
|
|
3647
|
+
StopPropagationDirective
|
|
3648
|
+
], 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
3649
|
}], propDecorators: { map: [{
|
|
3604
3650
|
type: Input
|
|
3605
3651
|
}], color: [{
|
|
@@ -3610,12 +3656,10 @@ function userButtonSlideInOut() {
|
|
|
3610
3656
|
return trigger('userButtonState', [
|
|
3611
3657
|
state('collapse', style({
|
|
3612
3658
|
width: '0',
|
|
3613
|
-
overflow: 'hidden'
|
|
3614
|
-
display: 'none'
|
|
3659
|
+
overflow: 'hidden'
|
|
3615
3660
|
})),
|
|
3616
3661
|
state('expand', style({
|
|
3617
|
-
overflow: 'hidden'
|
|
3618
|
-
display: 'display'
|
|
3662
|
+
overflow: 'hidden'
|
|
3619
3663
|
})),
|
|
3620
3664
|
transition('collapse => expand', animate('200ms')),
|
|
3621
3665
|
transition('expand => collapse', animate('200ms'))
|
|
@@ -3636,10 +3680,10 @@ class UserDialogComponent {
|
|
|
3636
3680
|
clearPreferences() {
|
|
3637
3681
|
this.storageService.clear();
|
|
3638
3682
|
}
|
|
3639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3683
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3684
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", 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
3685
|
}
|
|
3642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserDialogComponent, decorators: [{
|
|
3643
3687
|
type: Component,
|
|
3644
3688
|
args: [{ selector: 'igo-user-dialog', imports: [
|
|
3645
3689
|
MatDialogTitle,
|
|
@@ -3690,10 +3734,10 @@ class UserButtonComponent {
|
|
|
3690
3734
|
infoUser() {
|
|
3691
3735
|
this.dialog.open(UserDialogComponent, { disableClose: false });
|
|
3692
3736
|
}
|
|
3693
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3737
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3738
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
3739
|
}
|
|
3696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: UserButtonComponent, decorators: [{
|
|
3697
3741
|
type: Component,
|
|
3698
3742
|
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], imports: [
|
|
3699
3743
|
PoiButtonComponent,
|
|
@@ -3717,20 +3761,20 @@ class IgoContextMapButtonModule {
|
|
|
3717
3761
|
ngModule: IgoContextMapButtonModule
|
|
3718
3762
|
};
|
|
3719
3763
|
}
|
|
3720
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3721
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3764
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3765
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoContextMapButtonModule, imports: [BookmarkButtonComponent,
|
|
3722
3766
|
BookmarkDialogComponent,
|
|
3723
3767
|
PoiButtonComponent,
|
|
3724
3768
|
UserButtonComponent], exports: [BookmarkButtonComponent,
|
|
3725
3769
|
PoiButtonComponent,
|
|
3726
3770
|
UserButtonComponent,
|
|
3727
3771
|
BookmarkDialogComponent] });
|
|
3728
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3772
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [BookmarkButtonComponent,
|
|
3729
3773
|
BookmarkDialogComponent,
|
|
3730
3774
|
PoiButtonComponent,
|
|
3731
3775
|
UserButtonComponent] });
|
|
3732
3776
|
}
|
|
3733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
|
|
3734
3778
|
type: NgModule,
|
|
3735
3779
|
args: [{
|
|
3736
3780
|
imports: [
|
|
@@ -3772,7 +3816,7 @@ class ShareMapUrlComponent {
|
|
|
3772
3816
|
this.mapState$$?.unsubscribe();
|
|
3773
3817
|
}
|
|
3774
3818
|
generateUrl() {
|
|
3775
|
-
this.url = this.shareMapService.
|
|
3819
|
+
this.url = this.shareMapService.generateUrl(this.map(), this.contextService.context$.value);
|
|
3776
3820
|
}
|
|
3777
3821
|
copyTextToClipboard(textArea) {
|
|
3778
3822
|
const successful = this.clipboard.copy(textArea.value);
|
|
@@ -3780,10 +3824,10 @@ class ShareMapUrlComponent {
|
|
|
3780
3824
|
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3781
3825
|
}
|
|
3782
3826
|
}
|
|
3783
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3784
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3827
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapUrlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3828
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
3829
|
}
|
|
3786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
|
|
3787
3831
|
type: Component,
|
|
3788
3832
|
args: [{ selector: 'igo-share-map-url', imports: [
|
|
3789
3833
|
MatFormFieldModule,
|
|
@@ -3797,10 +3841,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3797
3841
|
|
|
3798
3842
|
class ShareMapComponent {
|
|
3799
3843
|
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.
|
|
3844
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3845
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.18", 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
3846
|
}
|
|
3803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: ShareMapComponent, decorators: [{
|
|
3804
3848
|
type: Component,
|
|
3805
3849
|
args: [{ selector: 'igo-share-map', imports: [MatTabsModule, ShareMapUrlComponent], template: "<igo-share-map-url [map]=\"map()\" />\n" }]
|
|
3806
3850
|
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
@@ -3818,11 +3862,11 @@ class IgoShareMapModule {
|
|
|
3818
3862
|
ngModule: IgoShareMapModule
|
|
3819
3863
|
};
|
|
3820
3864
|
}
|
|
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.
|
|
3865
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3866
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent], exports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3867
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3824
3868
|
}
|
|
3825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3869
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoShareMapModule, decorators: [{
|
|
3826
3870
|
type: NgModule,
|
|
3827
3871
|
args: [{
|
|
3828
3872
|
imports: [ShareMapComponent, ShareMapUrlComponent],
|
|
@@ -3901,10 +3945,10 @@ class SidenavComponent {
|
|
|
3901
3945
|
this.topPanelState = 'initial';
|
|
3902
3946
|
}
|
|
3903
3947
|
}
|
|
3904
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3905
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3949
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", 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
3950
|
}
|
|
3907
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
3908
3952
|
type: Component,
|
|
3909
3953
|
args: [{ selector: 'igo-sidenav', imports: [
|
|
3910
3954
|
MatSidenavModule,
|
|
@@ -3939,11 +3983,11 @@ class IgoSidenavModule {
|
|
|
3939
3983
|
ngModule: IgoSidenavModule
|
|
3940
3984
|
};
|
|
3941
3985
|
}
|
|
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.
|
|
3986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3987
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent], exports: [SidenavComponent] });
|
|
3988
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent] });
|
|
3945
3989
|
}
|
|
3946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoSidenavModule, decorators: [{
|
|
3947
3991
|
type: NgModule,
|
|
3948
3992
|
args: [{
|
|
3949
3993
|
imports: [SidenavComponent],
|
|
@@ -3960,19 +4004,19 @@ class IgoContextModule {
|
|
|
3960
4004
|
ngModule: IgoContextModule
|
|
3961
4005
|
};
|
|
3962
4006
|
}
|
|
3963
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3964
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4007
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4008
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: IgoContextModule, exports: [IgoContextImportExportModule,
|
|
3965
4009
|
IgoContextManagerModule,
|
|
3966
4010
|
IgoContextMapButtonModule,
|
|
3967
4011
|
IgoShareMapModule,
|
|
3968
4012
|
IgoSidenavModule] });
|
|
3969
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
4013
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextModule, imports: [IgoContextImportExportModule,
|
|
3970
4014
|
IgoContextManagerModule,
|
|
3971
4015
|
IgoContextMapButtonModule,
|
|
3972
4016
|
IgoShareMapModule,
|
|
3973
4017
|
IgoSidenavModule] });
|
|
3974
4018
|
}
|
|
3975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IgoContextModule, decorators: [{
|
|
3976
4020
|
type: NgModule,
|
|
3977
4021
|
args: [{
|
|
3978
4022
|
declarations: [],
|
|
@@ -3992,7 +4036,6 @@ const CONTEXT_MANAGER_DIRECTIVES = [
|
|
|
3992
4036
|
ContextFormComponent,
|
|
3993
4037
|
ContextEditComponent,
|
|
3994
4038
|
ContextPermissionsComponent,
|
|
3995
|
-
ContextPermissionsBindingDirective,
|
|
3996
4039
|
MapContextDirective,
|
|
3997
4040
|
LayerContextDirective
|
|
3998
4041
|
];
|
|
@@ -4012,5 +4055,5 @@ const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
|
4012
4055
|
* Generated bundle index. Do not edit.
|
|
4013
4056
|
*/
|
|
4014
4057
|
|
|
4015
|
-
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent,
|
|
4058
|
+
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
4059
|
//# sourceMappingURL=igo2-context.mjs.map
|