@igo2/context 21.0.0-next.3 → 21.0.0-next.5
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 +267 -310
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/package.json +6 -6
- package/types/igo2-context.d.ts +162 -179
|
@@ -256,13 +256,13 @@ function stringifyType(value) {
|
|
|
256
256
|
function parseLayerType(params, key) {
|
|
257
257
|
const param = extractParam(params, key);
|
|
258
258
|
if (!param) {
|
|
259
|
-
return;
|
|
259
|
+
return undefined;
|
|
260
260
|
}
|
|
261
261
|
const type = Number(param);
|
|
262
262
|
return ServiceTypeEnum[type];
|
|
263
263
|
}
|
|
264
|
-
function stringifyCenter(
|
|
265
|
-
return
|
|
264
|
+
function stringifyCenter(value) {
|
|
265
|
+
return value.map(formatNumber).join(',');
|
|
266
266
|
}
|
|
267
267
|
function parseCenter(params) {
|
|
268
268
|
if (!params?.startsWith('@')) {
|
|
@@ -278,7 +278,7 @@ function parseCenter(params) {
|
|
|
278
278
|
function parseRotation(params, key) {
|
|
279
279
|
const param = extractParam(params, key);
|
|
280
280
|
if (!param) {
|
|
281
|
-
return;
|
|
281
|
+
return undefined;
|
|
282
282
|
}
|
|
283
283
|
const degree = parseInteger(param);
|
|
284
284
|
return (degree * Math.PI) / 180;
|
|
@@ -286,21 +286,21 @@ function parseRotation(params, key) {
|
|
|
286
286
|
function parseIntergerParam(params, key) {
|
|
287
287
|
const param = extractParam(params, key);
|
|
288
288
|
if (!param) {
|
|
289
|
-
return;
|
|
289
|
+
return undefined;
|
|
290
290
|
}
|
|
291
291
|
return parseInteger(param);
|
|
292
292
|
}
|
|
293
293
|
function parseBooleanParam(params, key) {
|
|
294
294
|
const param = extractParam(params, key);
|
|
295
295
|
if (!param) {
|
|
296
|
-
return;
|
|
296
|
+
return undefined;
|
|
297
297
|
}
|
|
298
298
|
return parseBoolean(param);
|
|
299
299
|
}
|
|
300
300
|
function parseFloatParam(params, key) {
|
|
301
301
|
const param = extractParam(params, key);
|
|
302
302
|
if (!param) {
|
|
303
|
-
return;
|
|
303
|
+
return undefined;
|
|
304
304
|
}
|
|
305
305
|
return parseFloat(param);
|
|
306
306
|
}
|
|
@@ -343,7 +343,9 @@ function buildDataSourceOptions(type, url, layers, version) {
|
|
|
343
343
|
const arcgisClause = type === 'arcgisrest' ||
|
|
344
344
|
type === 'imagearcgisrest' ||
|
|
345
345
|
type === 'tilearcgisrest';
|
|
346
|
-
const params = type === 'wms'
|
|
346
|
+
const params = type === 'wms'
|
|
347
|
+
? { LAYERS: layers.join(','), ...(version ? { VERSION: version } : {}) }
|
|
348
|
+
: undefined;
|
|
347
349
|
const layer = isLayerType ? layers.join(',') : undefined;
|
|
348
350
|
const baseParams = {
|
|
349
351
|
type: type,
|
|
@@ -418,7 +420,7 @@ class ShareMapEncoder {
|
|
|
418
420
|
const layers = [
|
|
419
421
|
map.layerController.baseLayer,
|
|
420
422
|
...map.layerController.layersFlattened
|
|
421
|
-
].filter(
|
|
423
|
+
].filter((l) => !!l);
|
|
422
424
|
const urlParams = this.getBaseUrlConfig(map.viewController);
|
|
423
425
|
this.buildQueryUrl(layers, urlParams);
|
|
424
426
|
const [baseUrl] = this.document.location.href.split('?');
|
|
@@ -431,7 +433,7 @@ class ShareMapEncoder {
|
|
|
431
433
|
*/
|
|
432
434
|
replaceGroupLocalIds(layers) {
|
|
433
435
|
const idMap = new Map();
|
|
434
|
-
const existingIds = new Set(layers.map((layer) => layer.id).filter(
|
|
436
|
+
const existingIds = new Set(layers.map((layer) => layer.id).filter((id) => id != null));
|
|
435
437
|
// eslint-disable-next-line prefer-const
|
|
436
438
|
let counter = 1;
|
|
437
439
|
layers.forEach((layer) => {
|
|
@@ -451,11 +453,11 @@ class ShareMapEncoder {
|
|
|
451
453
|
}
|
|
452
454
|
getCurrentContext() {
|
|
453
455
|
return ObjectUtils.removeUndefined({
|
|
454
|
-
layers: this.context?.layers,
|
|
455
|
-
center: this.context?.map
|
|
456
|
-
projection: this.context?.map
|
|
457
|
-
zoom: this.context?.map
|
|
458
|
-
rotation: this.context?.map
|
|
456
|
+
layers: this.context?.layers ?? [],
|
|
457
|
+
center: this.context?.map?.view.center,
|
|
458
|
+
projection: this.context?.map?.view.projection,
|
|
459
|
+
zoom: this.context?.map?.view.zoom,
|
|
460
|
+
rotation: this.context?.map?.view.rotation
|
|
459
461
|
});
|
|
460
462
|
}
|
|
461
463
|
/**
|
|
@@ -502,10 +504,12 @@ class ShareMapEncoder {
|
|
|
502
504
|
getContextLayersMap() {
|
|
503
505
|
const ctxLayers = this.getCurrentContext()?.layers || [];
|
|
504
506
|
const ctxFlattened = getFlattenOptions(ctxLayers);
|
|
505
|
-
return new Map(ctxFlattened
|
|
507
|
+
return new Map(ctxFlattened
|
|
508
|
+
.map((lctx) => {
|
|
506
509
|
const identifier = getLayerOptionIdentifier(lctx);
|
|
507
|
-
return [identifier, lctx];
|
|
508
|
-
})
|
|
510
|
+
return [identifier ?? '', lctx];
|
|
511
|
+
})
|
|
512
|
+
.filter(([key]) => key !== ''));
|
|
509
513
|
}
|
|
510
514
|
/**
|
|
511
515
|
* Filters layers and context layers based on visibility, opacity, and expanded state.
|
|
@@ -522,7 +526,7 @@ class ShareMapEncoder {
|
|
|
522
526
|
const visibilityChange = layer.visible !== (ctxLayer.visible ?? true);
|
|
523
527
|
const opacityChange = layer.opacity !== (ctxLayer.opacity ?? 1);
|
|
524
528
|
const layerParentId = this.getIdsNestedParent(layer)?.join('.');
|
|
525
|
-
const ctxParentId = ctxLayer.parentId ?? findParentId(this.context
|
|
529
|
+
const ctxParentId = ctxLayer.parentId ?? findParentId(this.context?.layers ?? [], ctxLayer);
|
|
526
530
|
const parentIdChange = ctxParentId !== layerParentId;
|
|
527
531
|
let expandedChange = false;
|
|
528
532
|
let titleChange = false;
|
|
@@ -595,7 +599,9 @@ class ShareMapEncoder {
|
|
|
595
599
|
.params;
|
|
596
600
|
return params.LAYERS;
|
|
597
601
|
}
|
|
598
|
-
return 'layer' in dataSourceOptions
|
|
602
|
+
return 'layer' in dataSourceOptions
|
|
603
|
+
? (dataSourceOptions.layer ?? '')
|
|
604
|
+
: '';
|
|
599
605
|
}
|
|
600
606
|
getWmsVersion(dataSourceOptions) {
|
|
601
607
|
const params = dataSourceOptions?.params;
|
|
@@ -604,7 +610,7 @@ class ShareMapEncoder {
|
|
|
604
610
|
: undefined;
|
|
605
611
|
}
|
|
606
612
|
concatUrlWithVersion(dataSourceOptions) {
|
|
607
|
-
const url = dataSourceOptions.url;
|
|
613
|
+
const url = dataSourceOptions.url ?? '';
|
|
608
614
|
if (dataSourceOptions.type.toLowerCase() === 'wms') {
|
|
609
615
|
const version = this.getWmsVersion(dataSourceOptions);
|
|
610
616
|
if (version) {
|
|
@@ -613,7 +619,7 @@ class ShareMapEncoder {
|
|
|
613
619
|
return `${url}${operator}${versionDef.key}=${version}`;
|
|
614
620
|
}
|
|
615
621
|
}
|
|
616
|
-
return
|
|
622
|
+
return url;
|
|
617
623
|
}
|
|
618
624
|
getLayerParams(layer) {
|
|
619
625
|
const dataSourceOptions = layer.dataSource.options;
|
|
@@ -621,7 +627,7 @@ class ShareMapEncoder {
|
|
|
621
627
|
? this.hasLayerId(this.context.layers, layer.id)
|
|
622
628
|
: false;
|
|
623
629
|
return {
|
|
624
|
-
index:
|
|
630
|
+
index: 0,
|
|
625
631
|
...(isExisting
|
|
626
632
|
? { id: layer.id }
|
|
627
633
|
: {
|
|
@@ -750,8 +756,11 @@ class ShareMapEncoder {
|
|
|
750
756
|
const definitions = this.SHARE_MAP_DEFS.pos.params;
|
|
751
757
|
const { center, ...restPosition } = position;
|
|
752
758
|
const stringifiedParams = this.stringifyDefinitions(restPosition, definitions);
|
|
759
|
+
const centerDef = definitions.center;
|
|
753
760
|
const result = [
|
|
754
|
-
|
|
761
|
+
centerDef && center
|
|
762
|
+
? `${centerDef.key}${centerDef.stringify(center)}`
|
|
763
|
+
: undefined,
|
|
755
764
|
stringifiedParams
|
|
756
765
|
].filter(Boolean);
|
|
757
766
|
return result.join(',');
|
|
@@ -759,10 +768,14 @@ class ShareMapEncoder {
|
|
|
759
768
|
stringifyDefinitions(values, definitions) {
|
|
760
769
|
const result = Object.keys(ObjectUtils.removeUndefined(values))
|
|
761
770
|
.map((key) => {
|
|
762
|
-
const
|
|
771
|
+
const def = definitions[key];
|
|
772
|
+
if (!def)
|
|
773
|
+
return undefined;
|
|
774
|
+
const { key: defKey, stringify } = def;
|
|
763
775
|
const value = stringify ? stringify(values[key]) : values[key];
|
|
764
776
|
return `${value}${defKey}`;
|
|
765
777
|
})
|
|
778
|
+
.filter(Boolean)
|
|
766
779
|
.join(',');
|
|
767
780
|
return result === '' ? undefined : result;
|
|
768
781
|
}
|
|
@@ -798,7 +811,7 @@ class ShareMapLegacyParser {
|
|
|
798
811
|
this.options = options;
|
|
799
812
|
}
|
|
800
813
|
parseUrl(params) {
|
|
801
|
-
const layerOptions = ServiceType.flatMap((type) => this.readLayersQueryParamsByType(params, type)).filter(
|
|
814
|
+
const layerOptions = ServiceType.flatMap((type) => this.readLayersQueryParamsByType(params, type)).filter((l) => !!l);
|
|
802
815
|
return layerOptions;
|
|
803
816
|
}
|
|
804
817
|
parsePosition(params) {
|
|
@@ -836,7 +849,8 @@ class ShareMapLegacyParser {
|
|
|
836
849
|
const { layersKey, wmsUrlKey, wmsLayersKey, wmtsUrlKey, wmtsLayersKey, arcgisUrlKey, arcgisLayersKey, iarcgisUrlKey, iarcgisLayersKey, tarcgisUrlKey, tarcgisLayersKey } = this.options;
|
|
837
850
|
switch (type) {
|
|
838
851
|
case 'wms':
|
|
839
|
-
if ((params[layersKey] || params[wmsLayersKey]) &&
|
|
852
|
+
if ((params[layersKey] || params[wmsLayersKey]) &&
|
|
853
|
+
params[wmsUrlKey]) {
|
|
840
854
|
urlsKey = wmsUrlKey;
|
|
841
855
|
nameParamLayersKey = params[wmsLayersKey] ? wmsLayersKey : layersKey;
|
|
842
856
|
}
|
|
@@ -872,7 +886,7 @@ class ShareMapLegacyParser {
|
|
|
872
886
|
return [nameParamLayersKey, urlsKey];
|
|
873
887
|
}
|
|
874
888
|
sanitizeUrl(url) {
|
|
875
|
-
const version = this.getQueryParam('version', url.toLocaleLowerCase())
|
|
889
|
+
const version = this.getQueryParam('version', url.toLocaleLowerCase()) ?? undefined;
|
|
876
890
|
if (version) {
|
|
877
891
|
const versionRegex = new RegExp(`[?&]version=${version}`, 'i');
|
|
878
892
|
url = url.replace(versionRegex, '').replace(/[?&]$/, '');
|
|
@@ -888,14 +902,14 @@ class ShareMapLegacyParser {
|
|
|
888
902
|
const httpParams = new HttpParams({ fromString: url.split('?')[1] });
|
|
889
903
|
paramValue = httpParams.get(name);
|
|
890
904
|
}
|
|
891
|
-
return paramValue;
|
|
905
|
+
return paramValue ?? undefined;
|
|
892
906
|
}
|
|
893
907
|
extractLayersByService(layersByService) {
|
|
894
908
|
if (!layersByService.includes(':igoz')) {
|
|
895
909
|
return [
|
|
896
910
|
{
|
|
897
911
|
layers: layersByService.split(','),
|
|
898
|
-
zIndex:
|
|
912
|
+
zIndex: undefined
|
|
899
913
|
}
|
|
900
914
|
];
|
|
901
915
|
}
|
|
@@ -988,7 +1002,7 @@ class ShareMapParser {
|
|
|
988
1002
|
const groupsOptions = groupsArray.map((layer) => this.parseGroup(layer));
|
|
989
1003
|
const layersOptions = layersArray
|
|
990
1004
|
.map((layer) => this.parseLayer(layer, urlsArray))
|
|
991
|
-
.filter(
|
|
1005
|
+
.filter((l) => !!l);
|
|
992
1006
|
return [...groupsOptions, ...layersOptions];
|
|
993
1007
|
}
|
|
994
1008
|
splitParam(value, delimiter) {
|
|
@@ -1001,10 +1015,16 @@ class ShareMapParser {
|
|
|
1001
1015
|
}
|
|
1002
1016
|
const { center, zoom, rotation, projection } = this.keysDefinitions.pos.params;
|
|
1003
1017
|
return ObjectUtils.removeUndefined({
|
|
1004
|
-
center: center
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1018
|
+
center: center?.parse
|
|
1019
|
+
? center.parse(position)
|
|
1020
|
+
: undefined,
|
|
1021
|
+
zoom: zoom?.parse ? zoom.parse(position) : undefined,
|
|
1022
|
+
rotation: rotation?.parse
|
|
1023
|
+
? rotation.parse(position)
|
|
1024
|
+
: undefined,
|
|
1025
|
+
projection: projection?.parse
|
|
1026
|
+
? projection.parse(position)
|
|
1027
|
+
: undefined
|
|
1008
1028
|
});
|
|
1009
1029
|
}
|
|
1010
1030
|
parseLayer(layer, urls) {
|
|
@@ -1053,10 +1073,12 @@ class ShareMapParser {
|
|
|
1053
1073
|
}
|
|
1054
1074
|
extractVersionFromUrl(url) {
|
|
1055
1075
|
const versionDef = this.keysDefinitions.layers.params.version;
|
|
1056
|
-
return versionDef.parse(url);
|
|
1076
|
+
return versionDef?.parse ? versionDef.parse(url) : undefined;
|
|
1057
1077
|
}
|
|
1058
1078
|
extractLayerId(layer) {
|
|
1059
|
-
const
|
|
1079
|
+
const id = this.keysDefinitions.layers.params.id;
|
|
1080
|
+
if (!id)
|
|
1081
|
+
return undefined;
|
|
1060
1082
|
const regex = new RegExp(`([a-zA-Z0-9_]+)${id.key}\\b`);
|
|
1061
1083
|
const match = layer.match(regex);
|
|
1062
1084
|
return match ? match[1] : undefined;
|
|
@@ -1068,7 +1090,9 @@ class ShareMapParser {
|
|
|
1068
1090
|
return match ? parseInt(match[1], 10) : undefined;
|
|
1069
1091
|
}
|
|
1070
1092
|
extractLayerNames(layer) {
|
|
1071
|
-
const
|
|
1093
|
+
const names = this.keysDefinitions.layers.params.names;
|
|
1094
|
+
if (!names)
|
|
1095
|
+
return undefined;
|
|
1072
1096
|
const pattern = new RegExp(`\\[.*?\\]${names.key}`, 'g');
|
|
1073
1097
|
const matches = layer.match(pattern);
|
|
1074
1098
|
if (!matches)
|
|
@@ -1140,10 +1164,12 @@ class ShareMapService {
|
|
|
1140
1164
|
return queryString !== '' ? `${base}?${queryString}&` : `${base}?`;
|
|
1141
1165
|
}
|
|
1142
1166
|
getContext(params) {
|
|
1143
|
-
|
|
1167
|
+
const legacyKey = this.optionsLegacy.contextKey;
|
|
1168
|
+
return (params[this.options.context] ??
|
|
1169
|
+
(legacyKey ? params[legacyKey] : undefined));
|
|
1144
1170
|
}
|
|
1145
1171
|
getZoom(params) {
|
|
1146
|
-
return this.parsePosition(params)
|
|
1172
|
+
return this.parsePosition(params)?.zoom;
|
|
1147
1173
|
}
|
|
1148
1174
|
getUrlWithApi(formValues) {
|
|
1149
1175
|
const loc = this.document.location;
|
|
@@ -1161,10 +1187,10 @@ class ShareMapService {
|
|
|
1161
1187
|
const { projectionKey, rotationKey, zoomKey, centerKey } = this.optionsLegacy;
|
|
1162
1188
|
const { pos } = this.keysDefinitions;
|
|
1163
1189
|
return Boolean(params[pos.key] ||
|
|
1164
|
-
params[projectionKey] ||
|
|
1165
|
-
params[rotationKey] ||
|
|
1166
|
-
params[zoomKey] ||
|
|
1167
|
-
params[centerKey]);
|
|
1190
|
+
(projectionKey && params[projectionKey]) ||
|
|
1191
|
+
(rotationKey && params[rotationKey]) ||
|
|
1192
|
+
(zoomKey && params[zoomKey]) ||
|
|
1193
|
+
(centerKey && params[centerKey]));
|
|
1168
1194
|
}
|
|
1169
1195
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1170
1196
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapService, providedIn: 'root' });
|
|
@@ -1307,7 +1333,8 @@ class ContextService {
|
|
|
1307
1333
|
}
|
|
1308
1334
|
delete(id, imported = false) {
|
|
1309
1335
|
const contexts = { ours: [] };
|
|
1310
|
-
Object.keys(this.contexts$.value).forEach((key) => (contexts[key] =
|
|
1336
|
+
Object.keys(this.contexts$.value).forEach((key) => (contexts[key] =
|
|
1337
|
+
this.contexts$.value[key]?.filter((c) => c.id !== id) ?? []));
|
|
1311
1338
|
if (imported) {
|
|
1312
1339
|
this.importedContext = this.importedContext.filter((c) => c.id !== id);
|
|
1313
1340
|
return of(this.contexts$.next(contexts));
|
|
@@ -1616,9 +1643,7 @@ class ContextService {
|
|
|
1616
1643
|
if (this.baseUrl) {
|
|
1617
1644
|
let contextToLoad;
|
|
1618
1645
|
for (const key of Object.keys(this.contexts$.value)) {
|
|
1619
|
-
contextToLoad = this.contexts$.value[key]
|
|
1620
|
-
return c.uri === uri;
|
|
1621
|
-
});
|
|
1646
|
+
contextToLoad = this.contexts$.value[key]?.find((c) => c.uri === uri);
|
|
1622
1647
|
if (contextToLoad) {
|
|
1623
1648
|
break;
|
|
1624
1649
|
}
|
|
@@ -1679,7 +1704,9 @@ class ContextService {
|
|
|
1679
1704
|
this.getDefault().subscribe();
|
|
1680
1705
|
}
|
|
1681
1706
|
}
|
|
1682
|
-
const editedFound =
|
|
1707
|
+
const editedFound = editedContext
|
|
1708
|
+
? this.findContext(editedContext)
|
|
1709
|
+
: undefined;
|
|
1683
1710
|
if (!editedFound || editedFound.permission !== 'write') {
|
|
1684
1711
|
this.setEditedContext(undefined);
|
|
1685
1712
|
}
|
|
@@ -1707,8 +1734,7 @@ class ContextService {
|
|
|
1707
1734
|
const contexts = this.contexts$.value;
|
|
1708
1735
|
let found;
|
|
1709
1736
|
for (const key of Object.keys(contexts)) {
|
|
1710
|
-
|
|
1711
|
-
found = value.find((c) => (context.id && c.id === context.id) ||
|
|
1737
|
+
found = contexts[key]?.find((c) => (context.id && c.id === context.id) ||
|
|
1712
1738
|
(context.uri && c.uri === context.uri));
|
|
1713
1739
|
if (found) {
|
|
1714
1740
|
break;
|
|
@@ -1776,7 +1802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
1776
1802
|
|
|
1777
1803
|
function handleFileExportError(error, messageService) {
|
|
1778
1804
|
if (error instanceof ExportNothingToExportError) {
|
|
1779
|
-
|
|
1805
|
+
handleNothingToExportError(messageService);
|
|
1780
1806
|
return;
|
|
1781
1807
|
}
|
|
1782
1808
|
messageService.error('igo.context.contextImportExport.export.failed.text', 'igo.context.contextImportExport.export.failed.title');
|
|
@@ -1839,7 +1865,10 @@ function handleFileImportError(file, error, messageService, sizeMb) {
|
|
|
1839
1865
|
'File is too large': handleSizeFileImportError,
|
|
1840
1866
|
'Failed to read file': handleUnreadbleFileImportError
|
|
1841
1867
|
};
|
|
1842
|
-
errMapping[error.message]
|
|
1868
|
+
const handler = errMapping[error.message];
|
|
1869
|
+
if (handler) {
|
|
1870
|
+
handler(file, error, messageService, sizeMb);
|
|
1871
|
+
}
|
|
1843
1872
|
}
|
|
1844
1873
|
function handleInvalidFileImportError(file, error, messageService) {
|
|
1845
1874
|
messageService.error('igo.context.contextImportExport.import.invalid.text', 'igo.context.contextImportExport.import.invalid.title', undefined, {
|
|
@@ -1870,7 +1899,7 @@ function addContextToContextList(context, contextTitle, contextService) {
|
|
|
1870
1899
|
contextService.loadContext(context.uri);
|
|
1871
1900
|
}
|
|
1872
1901
|
function getFileExtension(file) {
|
|
1873
|
-
return file.name.split('.').pop()
|
|
1902
|
+
return file.name.split('.').pop()?.toLowerCase() ?? '';
|
|
1874
1903
|
}
|
|
1875
1904
|
function computeLayerTitleFromFile(file) {
|
|
1876
1905
|
return file.name.substr(0, file.name.lastIndexOf('.'));
|
|
@@ -1898,6 +1927,7 @@ function addImportedFeaturesToMap(extraFeatures, map) {
|
|
|
1898
1927
|
isIgoInternalLayer: true,
|
|
1899
1928
|
source,
|
|
1900
1929
|
igoStyle: { editable },
|
|
1930
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1901
1931
|
style: randomStyle,
|
|
1902
1932
|
visible: extraFeatures.visible,
|
|
1903
1933
|
opacity: extraFeatures.opacity
|
|
@@ -1907,26 +1937,36 @@ function addImportedFeaturesToMap(extraFeatures, map) {
|
|
|
1907
1937
|
}
|
|
1908
1938
|
function addImportedFeaturesStyledToMap(extraFeatures, map, styleListService, styleService) {
|
|
1909
1939
|
let style;
|
|
1910
|
-
let distance;
|
|
1940
|
+
let distance = 0;
|
|
1911
1941
|
if (styleListService.getStyleList(extraFeatures.name + '.styleByAttribute')) {
|
|
1912
1942
|
const styleByAttribute = styleListService.getStyleList(extraFeatures.name + '.styleByAttribute');
|
|
1913
1943
|
style = (feature, resolution) => {
|
|
1914
|
-
return styleService.createStyleByAttribute(
|
|
1944
|
+
return styleService.createStyleByAttribute(
|
|
1945
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1946
|
+
feature, styleByAttribute, resolution);
|
|
1915
1947
|
};
|
|
1916
1948
|
}
|
|
1917
1949
|
else if (styleListService.getStyleList(extraFeatures.name + '.clusterStyle')) {
|
|
1918
1950
|
const clusterParam = styleListService.getStyleList(extraFeatures.name + '.clusterParam');
|
|
1919
1951
|
distance = styleListService.getStyleList(extraFeatures.name + '.distance');
|
|
1920
1952
|
style = (feature, resolution) => {
|
|
1921
|
-
const baseStyle = styleService.createStyle(styleListService.getStyleList(extraFeatures.name + '.clusterStyle'),
|
|
1922
|
-
|
|
1953
|
+
const baseStyle = styleService.createStyle(styleListService.getStyleList(extraFeatures.name + '.clusterStyle'),
|
|
1954
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1955
|
+
feature, resolution);
|
|
1956
|
+
return styleService.createClusterStyle(
|
|
1957
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1958
|
+
feature, resolution, clusterParam, baseStyle);
|
|
1923
1959
|
};
|
|
1924
1960
|
}
|
|
1925
1961
|
else if (styleListService.getStyleList(extraFeatures.name + '.style')) {
|
|
1926
|
-
style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList(extraFeatures.name + '.style'),
|
|
1962
|
+
style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList(extraFeatures.name + '.style'),
|
|
1963
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1964
|
+
feature, resolution);
|
|
1927
1965
|
}
|
|
1928
1966
|
else {
|
|
1929
|
-
style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList('default.style'),
|
|
1967
|
+
style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList('default.style'),
|
|
1968
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1969
|
+
feature, resolution);
|
|
1930
1970
|
}
|
|
1931
1971
|
let source;
|
|
1932
1972
|
const olFeatures = collectFeaturesFromExtraFeatures(extraFeatures);
|
|
@@ -1937,7 +1977,7 @@ function addImportedFeaturesStyledToMap(extraFeatures, map, styleListService, st
|
|
|
1937
1977
|
queryable: true
|
|
1938
1978
|
};
|
|
1939
1979
|
source = new ClusterDataSource(sourceOptions);
|
|
1940
|
-
source.ol
|
|
1980
|
+
source.ol?.addFeatures(olFeatures);
|
|
1941
1981
|
}
|
|
1942
1982
|
else {
|
|
1943
1983
|
const sourceOptions = {
|
|
@@ -1951,7 +1991,8 @@ function addImportedFeaturesStyledToMap(extraFeatures, map, styleListService, st
|
|
|
1951
1991
|
title: extraFeatures.name,
|
|
1952
1992
|
isIgoInternalLayer: true,
|
|
1953
1993
|
source,
|
|
1954
|
-
|
|
1994
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1995
|
+
style: style,
|
|
1955
1996
|
opacity: extraFeatures.opacity,
|
|
1956
1997
|
visible: extraFeatures.visible
|
|
1957
1998
|
});
|
|
@@ -2059,7 +2100,7 @@ class ContextImportExportComponent {
|
|
|
2059
2100
|
clientSideFileSizeMax;
|
|
2060
2101
|
fileSizeMb;
|
|
2061
2102
|
activeImportExport = 'import';
|
|
2062
|
-
map = input(
|
|
2103
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
2063
2104
|
constructor() {
|
|
2064
2105
|
this.buildForm();
|
|
2065
2106
|
}
|
|
@@ -2118,11 +2159,10 @@ class ContextImportExportComponent {
|
|
|
2118
2159
|
handleFileExportSuccess(this.messageService);
|
|
2119
2160
|
}
|
|
2120
2161
|
selectAll(e) {
|
|
2121
|
-
if (e.
|
|
2162
|
+
if (e.selected) {
|
|
2122
2163
|
this.form.controls.layers.setValue(this.userControlledLayerList);
|
|
2123
|
-
e._selected = true;
|
|
2124
2164
|
}
|
|
2125
|
-
|
|
2165
|
+
else {
|
|
2126
2166
|
this.form.controls.layers.setValue([]);
|
|
2127
2167
|
}
|
|
2128
2168
|
}
|
|
@@ -2130,7 +2170,7 @@ class ContextImportExportComponent {
|
|
|
2130
2170
|
this.activeImportExport = event.value;
|
|
2131
2171
|
}
|
|
2132
2172
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextImportExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2133
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ContextImportExportComponent, isStandalone: true, selector: "igo-context-import-export", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired:
|
|
2173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ContextImportExportComponent, isStandalone: true, selector: "igo-context-import-export", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, 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) ?? false\" />\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = ''\"\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) ?? false\" />\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],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),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" }] });
|
|
2134
2174
|
}
|
|
2135
2175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextImportExportComponent, decorators: [{
|
|
2136
2176
|
type: Component,
|
|
@@ -2147,8 +2187,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
2147
2187
|
MatDividerModule,
|
|
2148
2188
|
AsyncPipe,
|
|
2149
2189
|
IgoLanguageModule
|
|
2150
|
-
], 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 =
|
|
2151
|
-
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required:
|
|
2190
|
+
], 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) ?? false\" />\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = ''\"\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) ?? false\" />\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"] }]
|
|
2191
|
+
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }] } });
|
|
2152
2192
|
|
|
2153
2193
|
/**
|
|
2154
2194
|
* @deprecated import the ContextImportExportComponent directly
|
|
@@ -2175,9 +2215,9 @@ class ContextFormComponent {
|
|
|
2175
2215
|
clipboard = inject(Clipboard);
|
|
2176
2216
|
formBuilder = inject(UntypedFormBuilder);
|
|
2177
2217
|
messageService = inject(MessageService);
|
|
2178
|
-
prefix;
|
|
2218
|
+
prefix = '';
|
|
2179
2219
|
btnSubmitText = input(...(ngDevMode ? [undefined, { debugName: "btnSubmitText" }] : /* istanbul ignore next */ []));
|
|
2180
|
-
context = input(...(ngDevMode ? [
|
|
2220
|
+
context = input.required(...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
2181
2221
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2182
2222
|
submitForm = output();
|
|
2183
2223
|
clone = output();
|
|
@@ -2210,7 +2250,7 @@ class ContextFormComponent {
|
|
|
2210
2250
|
}
|
|
2211
2251
|
buildForm(context) {
|
|
2212
2252
|
const uriSplit = context.uri.split('-');
|
|
2213
|
-
this.prefix = uriSplit.shift();
|
|
2253
|
+
this.prefix = uriSplit.shift() ?? '';
|
|
2214
2254
|
const uri = uriSplit.join('-');
|
|
2215
2255
|
return this.formBuilder.group({
|
|
2216
2256
|
title: [context.title],
|
|
@@ -2218,7 +2258,7 @@ class ContextFormComponent {
|
|
|
2218
2258
|
});
|
|
2219
2259
|
}
|
|
2220
2260
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2221
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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:
|
|
2261
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: true, 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@if (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}\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],[formArray],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" }] });
|
|
2222
2262
|
}
|
|
2223
2263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextFormComponent, decorators: [{
|
|
2224
2264
|
type: Component,
|
|
@@ -2231,8 +2271,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
2231
2271
|
MatTooltipModule,
|
|
2232
2272
|
MatIconModule,
|
|
2233
2273
|
IgoLanguageModule
|
|
2234
|
-
], template: "@let form = this.form();\n<form\n
|
|
2235
|
-
}], propDecorators: { btnSubmitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "btnSubmitText", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required:
|
|
2274
|
+
], template: "@let form = this.form();\n@if (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}\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"] }]
|
|
2275
|
+
}], propDecorators: { btnSubmitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "btnSubmitText", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], 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"] }] } });
|
|
2236
2276
|
|
|
2237
2277
|
const TypePermission = ['read', 'write'];
|
|
2238
2278
|
var Scope;
|
|
@@ -2315,7 +2355,7 @@ class LayerContextDirective {
|
|
|
2315
2355
|
}
|
|
2316
2356
|
handleAddLayers(layers) {
|
|
2317
2357
|
const layersFiltrered = layers
|
|
2318
|
-
.filter((layer) => layer)
|
|
2358
|
+
.filter((layer) => !!layer)
|
|
2319
2359
|
.map((layer) => {
|
|
2320
2360
|
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
2321
2361
|
return layer;
|
|
@@ -2326,7 +2366,7 @@ class LayerContextDirective {
|
|
|
2326
2366
|
}
|
|
2327
2367
|
computeLayerVisibilityFromUrl(layer) {
|
|
2328
2368
|
const params = this.queryParams;
|
|
2329
|
-
const currentContext = this.contextService.context$.value
|
|
2369
|
+
const currentContext = this.contextService.context$.value?.uri;
|
|
2330
2370
|
const currentLayerid = layer.id;
|
|
2331
2371
|
let visible = layer.visible;
|
|
2332
2372
|
if (!params || !currentLayerid) {
|
|
@@ -2368,17 +2408,17 @@ class LayerContextDirective {
|
|
|
2368
2408
|
}
|
|
2369
2409
|
handleContextWithSharedUrl(context) {
|
|
2370
2410
|
if (!this.queryParams) {
|
|
2371
|
-
return context.layers;
|
|
2411
|
+
return context.layers ?? [];
|
|
2372
2412
|
}
|
|
2373
2413
|
const { layers, uri } = context;
|
|
2374
2414
|
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
2375
2415
|
if (!contextValue || contextValue === uri) {
|
|
2376
2416
|
const layersOptions = this.shareMapService.parseLayers(this.queryParams);
|
|
2377
|
-
if (layersOptions.length) {
|
|
2378
|
-
return mergeLayersOptions([...layers], layersOptions);
|
|
2417
|
+
if (layersOptions && layersOptions.length) {
|
|
2418
|
+
return mergeLayersOptions([...(layers ?? [])], layersOptions);
|
|
2379
2419
|
}
|
|
2380
2420
|
}
|
|
2381
|
-
return layers;
|
|
2421
|
+
return layers ?? [];
|
|
2382
2422
|
}
|
|
2383
2423
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2384
2424
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.10", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: { classPropertyName: "removeLayersOnContextChange", publicName: "removeLayersOnContextChange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
@@ -2451,7 +2491,7 @@ class MapContextDirective {
|
|
|
2451
2491
|
if (this.mediaService.isMobile()) {
|
|
2452
2492
|
if (typeof controlsContext.scaleLine !== 'boolean') {
|
|
2453
2493
|
const scaleLineOption = controlsContext.scaleLine;
|
|
2454
|
-
if (
|
|
2494
|
+
if (scaleLineOption && scaleLineOption.minWidth != null) {
|
|
2455
2495
|
scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
|
|
2456
2496
|
controlsContext.scaleLine = scaleLineOption;
|
|
2457
2497
|
}
|
|
@@ -2476,10 +2516,13 @@ class ContextEditComponent {
|
|
|
2476
2516
|
context = toSignal(this.contextService.editedContext$);
|
|
2477
2517
|
submitSuccessed = output();
|
|
2478
2518
|
onEdit(context) {
|
|
2479
|
-
const id = this.context()
|
|
2519
|
+
const id = this.context()?.id;
|
|
2520
|
+
if (!id) {
|
|
2521
|
+
throw new Error('Context id is required to update context');
|
|
2522
|
+
}
|
|
2480
2523
|
this.contextService.update(id, context).subscribe(() => {
|
|
2481
2524
|
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
|
|
2482
|
-
value: context.title || this.context()
|
|
2525
|
+
value: context.title || this.context()?.title
|
|
2483
2526
|
});
|
|
2484
2527
|
const currentContext = this.contextService.context$.value;
|
|
2485
2528
|
if (currentContext && currentContext.id === id) {
|
|
@@ -2491,11 +2534,11 @@ class ContextEditComponent {
|
|
|
2491
2534
|
});
|
|
2492
2535
|
}
|
|
2493
2536
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2494
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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 });
|
|
2537
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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($any($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 });
|
|
2495
2538
|
}
|
|
2496
2539
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2497
2540
|
type: Component,
|
|
2498
|
-
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" }]
|
|
2541
|
+
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($any($event))\"\n />\n}\n" }]
|
|
2499
2542
|
}], propDecorators: { submitSuccessed: [{ type: i0.Output, args: ["submitSuccessed"] }] } });
|
|
2500
2543
|
|
|
2501
2544
|
class ContextItemComponent {
|
|
@@ -2505,10 +2548,10 @@ class ContextItemComponent {
|
|
|
2505
2548
|
color = 'primary';
|
|
2506
2549
|
collapsed = true;
|
|
2507
2550
|
showFavorite = input(true, ...(ngDevMode ? [{ debugName: "showFavorite" }] : /* istanbul ignore next */ []));
|
|
2508
|
-
context = input(
|
|
2509
|
-
default = input(
|
|
2510
|
-
selected = input(
|
|
2511
|
-
isDesktop = input(
|
|
2551
|
+
context = input.required(...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
2552
|
+
default = input(...(ngDevMode ? [undefined, { debugName: "default" }] : /* istanbul ignore next */ []));
|
|
2553
|
+
selected = input(...(ngDevMode ? [undefined, { debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
2554
|
+
isDesktop = input(...(ngDevMode ? [undefined, { debugName: "isDesktop" }] : /* istanbul ignore next */ []));
|
|
2512
2555
|
edit = output();
|
|
2513
2556
|
delete = output();
|
|
2514
2557
|
save = output();
|
|
@@ -2520,7 +2563,7 @@ class ContextItemComponent {
|
|
|
2520
2563
|
manageTools = output();
|
|
2521
2564
|
share = output();
|
|
2522
2565
|
get hidden() {
|
|
2523
|
-
return this.context()
|
|
2566
|
+
return this.context()?.hidden ?? false;
|
|
2524
2567
|
}
|
|
2525
2568
|
get canShare() {
|
|
2526
2569
|
return this.storageService.get('canShare') === true;
|
|
@@ -2533,7 +2576,7 @@ class ContextItemComponent {
|
|
|
2533
2576
|
this.favorite.emit(context);
|
|
2534
2577
|
}
|
|
2535
2578
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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:
|
|
2579
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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: true, 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: "@let ctx = context()!;\n<mat-list-item class=\"mat-list-item\" [class.mat-list-item-light]=\"hidden\">\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(ctx)\"\n >\n @if (!ctx.iconImage) {\n <mat-icon>{{\n ctx.icon ? ctx.icon : ctx.scope === 'public' ? 'public' : 'star'\n }}</mat-icon>\n } @else {\n <img [src]=\"ctx.iconImage\" alt=\"Ic\u00F4ne pour le favori de contexte\" />\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(ctx)\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ ctx.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 && selected() && (ctx.permission === 'write' || ctx.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(ctx)\"\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 (!ctx.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(ctx)\"\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(ctx)\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (ctx.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(ctx)\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!ctx.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(ctx)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (ctx.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(ctx)\"\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(ctx)\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (ctx.permission === 'write' || ctx.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(ctx)\"\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: "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 });
|
|
2537
2580
|
}
|
|
2538
2581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2539
2582
|
type: Component,
|
|
@@ -2547,12 +2590,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
2547
2590
|
IgoLanguageModule
|
|
2548
2591
|
], host: {
|
|
2549
2592
|
'[class.igo-list-item-focused]': 'this.isMenuOpen'
|
|
2550
|
-
}, template: "<mat-list-item class=\"mat-list-item\" [class.mat-list-item-light]=\"hidden\">\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(
|
|
2551
|
-
}], propDecorators: { showFavorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavorite", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required:
|
|
2593
|
+
}, template: "@let ctx = context()!;\n<mat-list-item class=\"mat-list-item\" [class.mat-list-item-light]=\"hidden\">\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(ctx)\"\n >\n @if (!ctx.iconImage) {\n <mat-icon>{{\n ctx.icon ? ctx.icon : ctx.scope === 'public' ? 'public' : 'star'\n }}</mat-icon>\n } @else {\n <img [src]=\"ctx.iconImage\" alt=\"Ic\u00F4ne pour le favori de contexte\" />\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(ctx)\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ ctx.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 && selected() && (ctx.permission === 'write' || ctx.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(ctx)\"\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 (!ctx.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(ctx)\"\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(ctx)\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (ctx.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(ctx)\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!ctx.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(ctx)\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (ctx.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(ctx)\"\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(ctx)\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (ctx.permission === 'write' || ctx.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(ctx)\"\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"] }]
|
|
2594
|
+
}], propDecorators: { showFavorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavorite", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], 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 }] }] } });
|
|
2552
2595
|
|
|
2553
2596
|
class BookmarkDialogComponent {
|
|
2554
2597
|
dialogRef = inject(MatDialogRef);
|
|
2555
|
-
title;
|
|
2598
|
+
title = '';
|
|
2556
2599
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: BookmarkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2557
2600
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", 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" }] });
|
|
2558
2601
|
}
|
|
@@ -2597,7 +2640,7 @@ class ContextListComponent {
|
|
|
2597
2640
|
previousMessageId;
|
|
2598
2641
|
sortAlphaOnIcon = SORT_ALPHA_ON_ICON;
|
|
2599
2642
|
sortAlphaOffIcon = SORT_ALPHA_OFF_ICON;
|
|
2600
|
-
isDesktop = input(
|
|
2643
|
+
isDesktop = input(...(ngDevMode ? [undefined, { debugName: "isDesktop" }] : /* istanbul ignore next */ []));
|
|
2601
2644
|
get contexts() {
|
|
2602
2645
|
return this._contexts;
|
|
2603
2646
|
}
|
|
@@ -2606,8 +2649,8 @@ class ContextListComponent {
|
|
|
2606
2649
|
this.next();
|
|
2607
2650
|
}
|
|
2608
2651
|
_contexts = { ours: [] };
|
|
2609
|
-
selectedContext = model(
|
|
2610
|
-
map = input(
|
|
2652
|
+
selectedContext = model(...(ngDevMode ? [undefined, { debugName: "selectedContext" }] : /* istanbul ignore next */ []));
|
|
2653
|
+
map = input(...(ngDevMode ? [undefined, { debugName: "map" }] : /* istanbul ignore next */ []));
|
|
2611
2654
|
get defaultContextId() {
|
|
2612
2655
|
return this.contextConfigs
|
|
2613
2656
|
? this._defaultContextId
|
|
@@ -2638,7 +2681,7 @@ class ContextListComponent {
|
|
|
2638
2681
|
shared: 'igo.context.contextManager.sharedContexts',
|
|
2639
2682
|
public: 'igo.context.contextManager.publicContexts'
|
|
2640
2683
|
};
|
|
2641
|
-
users;
|
|
2684
|
+
users = [];
|
|
2642
2685
|
permissions = [];
|
|
2643
2686
|
actionStore = new ActionStore([]);
|
|
2644
2687
|
actionbarMode = ActionbarMode.Overlay;
|
|
@@ -2656,13 +2699,13 @@ class ContextListComponent {
|
|
|
2656
2699
|
}
|
|
2657
2700
|
_term = '';
|
|
2658
2701
|
get sortedAlpha() {
|
|
2659
|
-
return this._sortedAlpha;
|
|
2702
|
+
return this._sortedAlpha ?? false;
|
|
2660
2703
|
}
|
|
2661
2704
|
set sortedAlpha(value) {
|
|
2662
2705
|
this._sortedAlpha = value;
|
|
2663
2706
|
this.next();
|
|
2664
2707
|
}
|
|
2665
|
-
_sortedAlpha
|
|
2708
|
+
_sortedAlpha;
|
|
2666
2709
|
showContextFilter = ContextListControlsEnum.always;
|
|
2667
2710
|
thresholdToFilter = 5;
|
|
2668
2711
|
get isEmpty() {
|
|
@@ -2707,7 +2750,8 @@ class ContextListComponent {
|
|
|
2707
2750
|
this.showHidden = this.storageService.get('contexts.showHidden');
|
|
2708
2751
|
this.contexts$$ = this.contextService.contexts$.subscribe((contexts) => (this.contexts = contexts));
|
|
2709
2752
|
this.defaultContextId$$ = this.contextService.defaultContextId$.subscribe((id) => {
|
|
2710
|
-
|
|
2753
|
+
if (id != null)
|
|
2754
|
+
this.defaultContextId = id;
|
|
2711
2755
|
});
|
|
2712
2756
|
const storedContextUri = this.storageService.get('favorite.context.uri');
|
|
2713
2757
|
if (storedContextUri && !this.auth.authenticated) {
|
|
@@ -2717,7 +2761,8 @@ class ContextListComponent {
|
|
|
2717
2761
|
this.selectedContext$$ = this.contextService.context$
|
|
2718
2762
|
.pipe(debounceTime(100))
|
|
2719
2763
|
.subscribe((context) => {
|
|
2720
|
-
|
|
2764
|
+
if (context)
|
|
2765
|
+
this.setSelected(context);
|
|
2721
2766
|
});
|
|
2722
2767
|
this.auth.authenticate$.subscribe((authenticate) => {
|
|
2723
2768
|
if (authenticate) {
|
|
@@ -2781,9 +2826,11 @@ class ContextListComponent {
|
|
|
2781
2826
|
.normalize('NFD')
|
|
2782
2827
|
.replace(/[\u0300-\u036f]/g, '');
|
|
2783
2828
|
const contextTitleNormalized = context.title
|
|
2784
|
-
.
|
|
2785
|
-
|
|
2786
|
-
|
|
2829
|
+
? context.title
|
|
2830
|
+
.toLowerCase()
|
|
2831
|
+
.normalize('NFD')
|
|
2832
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
2833
|
+
: '';
|
|
2787
2834
|
return contextTitleNormalized.includes(filterNormalized);
|
|
2788
2835
|
});
|
|
2789
2836
|
let updateContexts = {
|
|
@@ -2796,9 +2843,11 @@ class ContextListComponent {
|
|
|
2796
2843
|
.normalize('NFD')
|
|
2797
2844
|
.replace(/[\u0300-\u036f]/g, '');
|
|
2798
2845
|
const contextTitleNormalized = context.title
|
|
2799
|
-
.
|
|
2800
|
-
|
|
2801
|
-
|
|
2846
|
+
? context.title
|
|
2847
|
+
.toLowerCase()
|
|
2848
|
+
.normalize('NFD')
|
|
2849
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
2850
|
+
: '';
|
|
2802
2851
|
return contextTitleNormalized.includes(filterNormalized);
|
|
2803
2852
|
});
|
|
2804
2853
|
updateContexts.public = publics;
|
|
@@ -2810,9 +2859,11 @@ class ContextListComponent {
|
|
|
2810
2859
|
.normalize('NFD')
|
|
2811
2860
|
.replace(/[\u0300-\u036f]/g, '');
|
|
2812
2861
|
const contextTitleNormalized = context.title
|
|
2813
|
-
.
|
|
2814
|
-
|
|
2815
|
-
|
|
2862
|
+
? context.title
|
|
2863
|
+
.toLowerCase()
|
|
2864
|
+
.normalize('NFD')
|
|
2865
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
2866
|
+
: '';
|
|
2816
2867
|
return contextTitleNormalized.includes(filterNormalized);
|
|
2817
2868
|
});
|
|
2818
2869
|
updateContexts.shared = shared;
|
|
@@ -2845,41 +2896,39 @@ class ContextListComponent {
|
|
|
2845
2896
|
}
|
|
2846
2897
|
}
|
|
2847
2898
|
sortContextsList(contexts) {
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2899
|
+
const contextsList = JSON.parse(JSON.stringify(contexts));
|
|
2900
|
+
contextsList.ours.sort((a, b) => {
|
|
2901
|
+
if (this.normalize(a.title ?? '') < this.normalize(b.title ?? '')) {
|
|
2902
|
+
return -1;
|
|
2903
|
+
}
|
|
2904
|
+
if (this.normalize(a.title ?? '') > this.normalize(b.title ?? '')) {
|
|
2905
|
+
return 1;
|
|
2906
|
+
}
|
|
2907
|
+
return 0;
|
|
2908
|
+
});
|
|
2909
|
+
if (contextsList.shared) {
|
|
2910
|
+
contextsList.shared.sort((a, b) => {
|
|
2911
|
+
if (this.normalize(a.title ?? '') < this.normalize(b.title ?? '')) {
|
|
2852
2912
|
return -1;
|
|
2853
2913
|
}
|
|
2854
|
-
if (this.normalize(a.title) > this.normalize(b.title)) {
|
|
2914
|
+
if (this.normalize(a.title ?? '') > this.normalize(b.title ?? '')) {
|
|
2915
|
+
return 1;
|
|
2916
|
+
}
|
|
2917
|
+
return 0;
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2920
|
+
else if (contextsList.public) {
|
|
2921
|
+
contextsList.public.sort((a, b) => {
|
|
2922
|
+
if (this.normalize(a.title ?? '') < this.normalize(b.title ?? '')) {
|
|
2923
|
+
return -1;
|
|
2924
|
+
}
|
|
2925
|
+
if (this.normalize(a.title ?? '') > this.normalize(b.title ?? '')) {
|
|
2855
2926
|
return 1;
|
|
2856
2927
|
}
|
|
2857
2928
|
return 0;
|
|
2858
2929
|
});
|
|
2859
|
-
if (contextsList.shared) {
|
|
2860
|
-
contextsList.shared.sort((a, b) => {
|
|
2861
|
-
if (this.normalize(a.title) < this.normalize(b.title)) {
|
|
2862
|
-
return -1;
|
|
2863
|
-
}
|
|
2864
|
-
if (this.normalize(a.title) > this.normalize(b.title)) {
|
|
2865
|
-
return 1;
|
|
2866
|
-
}
|
|
2867
|
-
return 0;
|
|
2868
|
-
});
|
|
2869
|
-
}
|
|
2870
|
-
else if (contextsList.public) {
|
|
2871
|
-
contextsList.public.sort((a, b) => {
|
|
2872
|
-
if (this.normalize(a.title) < this.normalize(b.title)) {
|
|
2873
|
-
return -1;
|
|
2874
|
-
}
|
|
2875
|
-
if (this.normalize(a.title) > this.normalize(b.title)) {
|
|
2876
|
-
return 1;
|
|
2877
|
-
}
|
|
2878
|
-
return 0;
|
|
2879
|
-
});
|
|
2880
|
-
}
|
|
2881
|
-
return contextsList;
|
|
2882
2930
|
}
|
|
2931
|
+
return contextsList;
|
|
2883
2932
|
}
|
|
2884
2933
|
normalize(str) {
|
|
2885
2934
|
return str
|
|
@@ -2900,14 +2949,13 @@ class ContextListComponent {
|
|
|
2900
2949
|
.pipe(take(1))
|
|
2901
2950
|
.subscribe((title) => {
|
|
2902
2951
|
if (title) {
|
|
2903
|
-
this.onCreate({ title, empty });
|
|
2952
|
+
this.onCreate({ title, empty: empty ?? false });
|
|
2904
2953
|
}
|
|
2905
2954
|
});
|
|
2906
2955
|
}
|
|
2907
2956
|
getPermission(user) {
|
|
2908
2957
|
if (user) {
|
|
2909
|
-
|
|
2910
|
-
return permission;
|
|
2958
|
+
return this.permissions.find((p) => p.name === user.name);
|
|
2911
2959
|
}
|
|
2912
2960
|
}
|
|
2913
2961
|
handleToggleCategory(user, parent) {
|
|
@@ -2919,17 +2967,17 @@ class ContextListComponent {
|
|
|
2919
2967
|
}
|
|
2920
2968
|
if (parent) {
|
|
2921
2969
|
let indeterminate = false;
|
|
2922
|
-
for (const c of parent.childs) {
|
|
2970
|
+
for (const c of parent.childs ?? []) {
|
|
2923
2971
|
const cPermission = this.getPermission(c);
|
|
2924
|
-
if (cPermission.checked !== permission
|
|
2972
|
+
if (cPermission && cPermission.checked !== permission?.checked) {
|
|
2925
2973
|
indeterminate = true;
|
|
2926
2974
|
break;
|
|
2927
2975
|
}
|
|
2928
2976
|
}
|
|
2929
2977
|
const parentPermission = this.getPermission(parent);
|
|
2930
2978
|
if (parentPermission) {
|
|
2931
|
-
parentPermission.checked = permission
|
|
2932
|
-
this.storageService.set('contexts.permissions.' + parentPermission.name, permission
|
|
2979
|
+
parentPermission.checked = permission?.checked ?? false;
|
|
2980
|
+
this.storageService.set('contexts.permissions.' + parentPermission.name, permission?.checked ?? false);
|
|
2933
2981
|
parentPermission.indeterminate = indeterminate;
|
|
2934
2982
|
}
|
|
2935
2983
|
}
|
|
@@ -2937,9 +2985,9 @@ class ContextListComponent {
|
|
|
2937
2985
|
for (const c of user.childs) {
|
|
2938
2986
|
const childrenPermission = this.getPermission(c);
|
|
2939
2987
|
if (childrenPermission &&
|
|
2940
|
-
childrenPermission.checked !== permission
|
|
2941
|
-
childrenPermission.checked = permission
|
|
2942
|
-
this.storageService.set('contexts.permissions.' + childrenPermission.name, permission
|
|
2988
|
+
childrenPermission.checked !== permission?.checked) {
|
|
2989
|
+
childrenPermission.checked = permission?.checked ?? false;
|
|
2990
|
+
this.storageService.set('contexts.permissions.' + childrenPermission.name, permission?.checked ?? false);
|
|
2943
2991
|
}
|
|
2944
2992
|
}
|
|
2945
2993
|
}
|
|
@@ -2967,7 +3015,7 @@ class ContextListComponent {
|
|
|
2967
3015
|
const { toolKey, sidenavKey, languageKey } = this.shareMapService.routeService.options;
|
|
2968
3016
|
const { context: contextKey } = this.shareMapService.options;
|
|
2969
3017
|
const baseOrigin = this.shareMapService.sanitizeBaseUrl(this.shareMapService.document.location.href);
|
|
2970
|
-
const url = context.uri === currentContext
|
|
3018
|
+
const url = context.uri === currentContext?.uri
|
|
2971
3019
|
? this.shareMapService.generateUrl(this.map(), this.contextService.context$.value)
|
|
2972
3020
|
: `${baseOrigin}${contextKey}=${context.uri}`;
|
|
2973
3021
|
const params = [];
|
|
@@ -3017,7 +3065,9 @@ class ContextListComponent {
|
|
|
3017
3065
|
this.handleContextChanges(changes);
|
|
3018
3066
|
msgSuccess();
|
|
3019
3067
|
}), switchMap(() => this.contextService.getDetails(context.id)), tap((fullContext) => {
|
|
3020
|
-
this.contextService.context$.value
|
|
3068
|
+
const currentCtx = this.contextService.context$.value;
|
|
3069
|
+
if (currentCtx)
|
|
3070
|
+
currentCtx.layers = fullContext.layers;
|
|
3021
3071
|
}), take(1))
|
|
3022
3072
|
.subscribe();
|
|
3023
3073
|
this.save.emit(context);
|
|
@@ -3026,8 +3076,8 @@ class ContextListComponent {
|
|
|
3026
3076
|
const map = this.mapService.getMap();
|
|
3027
3077
|
changes.layers.created.forEach((layerCreated) => {
|
|
3028
3078
|
const layer = isLayerItemOptions(layerCreated)
|
|
3029
|
-
? map
|
|
3030
|
-
: map
|
|
3079
|
+
? map?.layerController.getBySourceId(layerCreated.sourceOptions.id)
|
|
3080
|
+
: map?.layerController.getByTitle(layerCreated.title);
|
|
3031
3081
|
if (layer) {
|
|
3032
3082
|
layer.id = layerCreated.id;
|
|
3033
3083
|
}
|
|
@@ -3124,7 +3174,7 @@ class ContextListComponent {
|
|
|
3124
3174
|
this.hide.emit(context);
|
|
3125
3175
|
}
|
|
3126
3176
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3127
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue: sortByKeyPriority;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length) {\n @if (auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n } @else {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["color", "icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3177
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user)?.checked ?? false\"\n [indeterminate]=\"getPermission(user)?.indeterminate ?? false\"\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 ?? false\"\n [indeterminate]=\"getPermission(user)?.indeterminate ?? false\"\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 ?? false\"\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]=\"$any(titleMapping)[$any(groupContexts).key] | translate\"\n [collapsed]=\"\n $any(collapsed[$any(titleMapping)[$any(groupContexts).key]])\n \"\n (toggle)=\"\n collapsed[$any(titleMapping)[$any(groupContexts).key]] =\n $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]=\"selectedContext()?.uri === context.uri\"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n } @else {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["color", "icon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3128
3178
|
}
|
|
3129
3179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextListComponent, decorators: [{
|
|
3130
3180
|
type: Component,
|
|
@@ -3146,7 +3196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3146
3196
|
KeyValuePipe,
|
|
3147
3197
|
IgoLanguageModule,
|
|
3148
3198
|
IgoIconComponent
|
|
3149
|
-
], template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user)
|
|
3199
|
+
], template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n mat-icon-button\n [matTooltip]=\"\n sortedAlpha\n ? ('igo.context.contextManager.sortDefault' | translate)\n : ('igo.context.contextManager.sortAlphabetically' | translate)\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <igo-icon\n color=\"primary\"\n [icon]=\"sortedAlpha ? sortAlphaOnIcon : sortAlphaOffIcon\"\n />\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user)?.checked ?? false\"\n [indeterminate]=\"getPermission(user)?.indeterminate ?? false\"\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 ?? false\"\n [indeterminate]=\"getPermission(user)?.indeterminate ?? false\"\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 ?? false\"\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]=\"$any(titleMapping)[$any(groupContexts).key] | translate\"\n [collapsed]=\"\n $any(collapsed[$any(titleMapping)[$any(groupContexts).key]])\n \"\n (toggle)=\"\n collapsed[$any(titleMapping)[$any(groupContexts).key]] =\n $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]=\"selectedContext()?.uri === context.uri\"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n } @else {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop()\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"] }]
|
|
3150
3200
|
}], ctorParameters: () => [], propDecorators: { isDesktop: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDesktop", required: false }] }], contexts: [{
|
|
3151
3201
|
type: Input
|
|
3152
3202
|
}], selectedContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedContext", required: false }] }, { type: i0.Output, args: ["selectedContextChange"] }], map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }], defaultContextId: [{
|
|
@@ -3179,7 +3229,7 @@ class ContextPermissionItemComponent {
|
|
|
3179
3229
|
const permission = this.permission();
|
|
3180
3230
|
return (this.canWrite() ||
|
|
3181
3231
|
(isContextPermissionUser(permission) &&
|
|
3182
|
-
permission.user.externalId === this.user()
|
|
3232
|
+
permission.user.externalId === this.user()?.id));
|
|
3183
3233
|
}, ...(ngDevMode ? [{ debugName: "canDelete" }] : /* istanbul ignore next */ []));
|
|
3184
3234
|
delete = output();
|
|
3185
3235
|
isContextPermissionUser = isContextPermissionUser;
|
|
@@ -3262,10 +3312,10 @@ class ContextPermissionsComponent {
|
|
|
3262
3312
|
form;
|
|
3263
3313
|
context = model(...(ngDevMode ? [undefined, { debugName: "context" }] : /* istanbul ignore next */ []));
|
|
3264
3314
|
permissions = model(...(ngDevMode ? [undefined, { debugName: "permissions" }] : /* istanbul ignore next */ []));
|
|
3265
|
-
permissionsRead = computed(() => this.permissions()
|
|
3266
|
-
permissionsWrite = computed(() => this.permissions()
|
|
3315
|
+
permissionsRead = computed(() => this.permissions()?.filter((permission) => permission.typePermission === 'read'), ...(ngDevMode ? [{ debugName: "permissionsRead" }] : /* istanbul ignore next */ []));
|
|
3316
|
+
permissionsWrite = computed(() => this.permissions()?.filter((permission) => permission.typePermission === 'write'), ...(ngDevMode ? [{ debugName: "permissionsWrite" }] : /* istanbul ignore next */ []));
|
|
3267
3317
|
profils = signal([], ...(ngDevMode ? [{ debugName: "profils" }] : /* istanbul ignore next */ []));
|
|
3268
|
-
canWrite = computed(() => this.context()
|
|
3318
|
+
canWrite = computed(() => this.context()?.permission === 'write', ...(ngDevMode ? [{ debugName: "canWrite" }] : /* istanbul ignore next */ []));
|
|
3269
3319
|
baseUrlProfils;
|
|
3270
3320
|
formControl = new UntypedFormControl();
|
|
3271
3321
|
formValueChanges$$;
|
|
@@ -3284,10 +3334,10 @@ class ContextPermissionsComponent {
|
|
|
3284
3334
|
this.handleEditedContextChange();
|
|
3285
3335
|
}
|
|
3286
3336
|
displayFn(profil) {
|
|
3287
|
-
return profil ? profil.title :
|
|
3337
|
+
return profil ? profil.title : '';
|
|
3288
3338
|
}
|
|
3289
3339
|
handleFormSubmit(value) {
|
|
3290
|
-
const contextId = this.context()
|
|
3340
|
+
const contextId = this.context()?.id;
|
|
3291
3341
|
this.contextPermissionService
|
|
3292
3342
|
.add(contextId, value)
|
|
3293
3343
|
.subscribe((permission) => {
|
|
@@ -3315,7 +3365,7 @@ class ContextPermissionsComponent {
|
|
|
3315
3365
|
});
|
|
3316
3366
|
}
|
|
3317
3367
|
onRemovePermission(permission) {
|
|
3318
|
-
const contextId = this.context()
|
|
3368
|
+
const contextId = this.context()?.id;
|
|
3319
3369
|
this.contextPermissionService
|
|
3320
3370
|
.delete(contextId, permission.id)
|
|
3321
3371
|
.subscribe(() => {
|
|
@@ -3361,7 +3411,7 @@ class ContextPermissionsComponent {
|
|
|
3361
3411
|
}));
|
|
3362
3412
|
}
|
|
3363
3413
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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
|
|
3414
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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@let context = this.context();\n@let permissions = this.permissions();\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 ?? undefined\"\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 ?? undefined\"\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],[formArray],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" }] });
|
|
3365
3415
|
}
|
|
3366
3416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3367
3417
|
type: Component,
|
|
@@ -3381,7 +3431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3381
3431
|
MatTooltipModule,
|
|
3382
3432
|
ReactiveFormsModule,
|
|
3383
3433
|
ContextPermissionItemComponent
|
|
3384
|
-
], template: "@let user = authService.user;\n
|
|
3434
|
+
], template: "@let user = authService.user;\n@let context = this.context();\n@let permissions = this.permissions();\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 ?? undefined\"\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 ?? undefined\"\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"] }]
|
|
3385
3435
|
}], 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"] }] } });
|
|
3386
3436
|
const normalizeStr = (str) => str
|
|
3387
3437
|
.toLowerCase()
|
|
@@ -3445,20 +3495,8 @@ class BookmarkButtonComponent {
|
|
|
3445
3495
|
dialog = inject(MatDialog);
|
|
3446
3496
|
contextService = inject(ContextService);
|
|
3447
3497
|
messageService = inject(MessageService);
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
}
|
|
3451
|
-
set map(value) {
|
|
3452
|
-
this._map = value;
|
|
3453
|
-
}
|
|
3454
|
-
_map;
|
|
3455
|
-
get color() {
|
|
3456
|
-
return this._color;
|
|
3457
|
-
}
|
|
3458
|
-
set color(value) {
|
|
3459
|
-
this._color = value;
|
|
3460
|
-
}
|
|
3461
|
-
_color;
|
|
3498
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3499
|
+
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3462
3500
|
createContext() {
|
|
3463
3501
|
this.dialog
|
|
3464
3502
|
.open(BookmarkDialogComponent, { disableClose: false })
|
|
@@ -3466,7 +3504,7 @@ class BookmarkButtonComponent {
|
|
|
3466
3504
|
.pipe(take(1))
|
|
3467
3505
|
.subscribe((title) => {
|
|
3468
3506
|
if (title) {
|
|
3469
|
-
const context = this.contextService.getContextFromMap(this.map);
|
|
3507
|
+
const context = this.contextService.getContextFromMap(this.map());
|
|
3470
3508
|
context.title = title;
|
|
3471
3509
|
this.contextService.create(context).subscribe(() => {
|
|
3472
3510
|
this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
|
|
@@ -3476,20 +3514,16 @@ class BookmarkButtonComponent {
|
|
|
3476
3514
|
});
|
|
3477
3515
|
}
|
|
3478
3516
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: BookmarkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3479
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3517
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: BookmarkButtonComponent, isStandalone: true, selector: "igo-bookmark-button", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, 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" }] });
|
|
3480
3518
|
}
|
|
3481
3519
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
|
|
3482
3520
|
type: Component,
|
|
3483
|
-
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"] }]
|
|
3484
|
-
}], propDecorators: { map: [{
|
|
3485
|
-
type: Input
|
|
3486
|
-
}], color: [{
|
|
3487
|
-
type: Input
|
|
3488
|
-
}] } });
|
|
3521
|
+
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"] }]
|
|
3522
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
3489
3523
|
|
|
3490
3524
|
class PoiDialogComponent {
|
|
3491
3525
|
dialogRef = inject(MatDialogRef);
|
|
3492
|
-
title;
|
|
3526
|
+
title = '';
|
|
3493
3527
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PoiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3494
3528
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", 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" }] });
|
|
3495
3529
|
}
|
|
@@ -3544,20 +3578,8 @@ class PoiButtonComponent {
|
|
|
3544
3578
|
languageService = inject(LanguageService);
|
|
3545
3579
|
confirmDialogService = inject(ConfirmDialogService);
|
|
3546
3580
|
selected;
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
}
|
|
3550
|
-
set map(value) {
|
|
3551
|
-
this._map = value;
|
|
3552
|
-
}
|
|
3553
|
-
_map;
|
|
3554
|
-
get color() {
|
|
3555
|
-
return this._color;
|
|
3556
|
-
}
|
|
3557
|
-
set color(value) {
|
|
3558
|
-
this._color = value;
|
|
3559
|
-
}
|
|
3560
|
-
_color;
|
|
3581
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3582
|
+
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3561
3583
|
pois;
|
|
3562
3584
|
authenticate$$;
|
|
3563
3585
|
ngOnInit() {
|
|
@@ -3599,7 +3621,7 @@ class PoiButtonComponent {
|
|
|
3599
3621
|
});
|
|
3600
3622
|
}
|
|
3601
3623
|
createPoi() {
|
|
3602
|
-
const view = this.map.ol.getView();
|
|
3624
|
+
const view = this.map().ol.getView();
|
|
3603
3625
|
const proj = view.getProjection().getCode();
|
|
3604
3626
|
const center = new olPoint(view.getCenter()).transform(proj, 'EPSG:4326');
|
|
3605
3627
|
const poi = {
|
|
@@ -3627,8 +3649,10 @@ class PoiButtonComponent {
|
|
|
3627
3649
|
}
|
|
3628
3650
|
zoomOnPoi(id) {
|
|
3629
3651
|
const poi = this.pois.find((p) => p.id === id);
|
|
3630
|
-
|
|
3631
|
-
|
|
3652
|
+
if (!poi)
|
|
3653
|
+
return;
|
|
3654
|
+
const center = olproj.fromLonLat([Number(poi.x), Number(poi.y)], this.map().projectionCode);
|
|
3655
|
+
this.map().ol.getView().animate({
|
|
3632
3656
|
center,
|
|
3633
3657
|
zoom: poi.zoom,
|
|
3634
3658
|
duration: 500,
|
|
@@ -3636,7 +3660,7 @@ class PoiButtonComponent {
|
|
|
3636
3660
|
});
|
|
3637
3661
|
}
|
|
3638
3662
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PoiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3639
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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" }] });
|
|
3663
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: PoiButtonComponent, isStandalone: true, selector: "igo-poi-button", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, 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" }] });
|
|
3640
3664
|
}
|
|
3641
3665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PoiButtonComponent, decorators: [{
|
|
3642
3666
|
type: Component,
|
|
@@ -3649,12 +3673,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3649
3673
|
MatSelectModule,
|
|
3650
3674
|
MatTooltipModule,
|
|
3651
3675
|
StopPropagationDirective
|
|
3652
|
-
], 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"] }]
|
|
3653
|
-
}], propDecorators: { map: [{
|
|
3654
|
-
type: Input
|
|
3655
|
-
}], color: [{
|
|
3656
|
-
type: Input
|
|
3657
|
-
}] } });
|
|
3676
|
+
], 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"] }]
|
|
3677
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
3658
3678
|
|
|
3659
3679
|
function userButtonSlideInOut() {
|
|
3660
3680
|
return trigger('userButtonState', [
|
|
@@ -3679,13 +3699,15 @@ class UserDialogComponent {
|
|
|
3679
3699
|
constructor() {
|
|
3680
3700
|
const decodeToken = this.auth.decodeToken();
|
|
3681
3701
|
this.user = decodeToken?.user;
|
|
3682
|
-
this.exp =
|
|
3702
|
+
this.exp = decodeToken?.exp
|
|
3703
|
+
? new Date(decodeToken.exp * 1000).toLocaleString()
|
|
3704
|
+
: undefined;
|
|
3683
3705
|
}
|
|
3684
3706
|
clearPreferences() {
|
|
3685
3707
|
this.storageService.clear();
|
|
3686
3708
|
}
|
|
3687
3709
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", 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
|
|
3710
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", 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" }] });
|
|
3689
3711
|
}
|
|
3690
3712
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UserDialogComponent, decorators: [{
|
|
3691
3713
|
type: Component,
|
|
@@ -3695,27 +3717,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3695
3717
|
MatButtonModule,
|
|
3696
3718
|
MatDialogActions,
|
|
3697
3719
|
IgoLanguageModule
|
|
3698
|
-
], 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
|
|
3720
|
+
], 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" }]
|
|
3699
3721
|
}], ctorParameters: () => [] });
|
|
3700
3722
|
|
|
3701
3723
|
class UserButtonComponent {
|
|
3702
3724
|
dialog = inject(MatDialog);
|
|
3703
3725
|
config = inject(ConfigService);
|
|
3704
3726
|
auth = inject(AuthService);
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
}
|
|
3708
|
-
set map(value) {
|
|
3709
|
-
this._map = value;
|
|
3710
|
-
}
|
|
3711
|
-
_map;
|
|
3712
|
-
get color() {
|
|
3713
|
-
return this._color;
|
|
3714
|
-
}
|
|
3715
|
-
set color(value) {
|
|
3716
|
-
this._color = value;
|
|
3717
|
-
}
|
|
3718
|
-
_color;
|
|
3727
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3728
|
+
color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3719
3729
|
expand = false;
|
|
3720
3730
|
visible = false;
|
|
3721
3731
|
hasApi = false;
|
|
@@ -3739,7 +3749,7 @@ class UserButtonComponent {
|
|
|
3739
3749
|
this.dialog.open(UserDialogComponent, { disableClose: false });
|
|
3740
3750
|
}
|
|
3741
3751
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UserButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3742
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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()] });
|
|
3752
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: UserButtonComponent, isStandalone: true, selector: "igo-user-button", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, 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()] });
|
|
3743
3753
|
}
|
|
3744
3754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: UserButtonComponent, decorators: [{
|
|
3745
3755
|
type: Component,
|
|
@@ -3749,12 +3759,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3749
3759
|
MatTooltipModule,
|
|
3750
3760
|
MatIconModule,
|
|
3751
3761
|
IgoLanguageModule
|
|
3752
|
-
], 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"] }]
|
|
3753
|
-
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
3754
|
-
type: Input
|
|
3755
|
-
}], color: [{
|
|
3756
|
-
type: Input
|
|
3757
|
-
}] } });
|
|
3762
|
+
], 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"] }]
|
|
3763
|
+
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
3758
3764
|
|
|
3759
3765
|
/**
|
|
3760
3766
|
* @deprecated import the components/directives directly or CONTEXT_MAP_BUTTON_DIRECTIVES for the set
|
|
@@ -3804,7 +3810,7 @@ class ShareMapUrlComponent {
|
|
|
3804
3810
|
contextService = inject(ContextService);
|
|
3805
3811
|
cdRef = inject(ChangeDetectorRef);
|
|
3806
3812
|
mapState$$;
|
|
3807
|
-
map = input(
|
|
3813
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3808
3814
|
url;
|
|
3809
3815
|
ngOnInit() {
|
|
3810
3816
|
this.generateUrl();
|
|
@@ -3829,7 +3835,7 @@ class ShareMapUrlComponent {
|
|
|
3829
3835
|
}
|
|
3830
3836
|
}
|
|
3831
3837
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapUrlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3832
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ShareMapUrlComponent, isStandalone: true, selector: "igo-share-map-url", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired:
|
|
3838
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: ShareMapUrlComponent, isStandalone: true, selector: "igo-share-map-url", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, 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" }] });
|
|
3833
3839
|
}
|
|
3834
3840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
|
|
3835
3841
|
type: Component,
|
|
@@ -3841,17 +3847,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3841
3847
|
IgoLanguageModule,
|
|
3842
3848
|
CustomHtmlComponent
|
|
3843
3849
|
], 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"] }]
|
|
3844
|
-
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required:
|
|
3850
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }] } });
|
|
3845
3851
|
|
|
3846
3852
|
class ShareMapComponent {
|
|
3847
|
-
map = input(
|
|
3853
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3848
3854
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3849
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired:
|
|
3855
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.10", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, 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"] }] });
|
|
3850
3856
|
}
|
|
3851
3857
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ShareMapComponent, decorators: [{
|
|
3852
3858
|
type: Component,
|
|
3853
3859
|
args: [{ selector: 'igo-share-map', imports: [MatTabsModule, ShareMapUrlComponent], template: "<igo-share-map-url [map]=\"map()\" />\n" }]
|
|
3854
|
-
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required:
|
|
3860
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }] } });
|
|
3855
3861
|
|
|
3856
3862
|
const SHARE_MAP_DIRECTIVES = [
|
|
3857
3863
|
ShareMapComponent,
|
|
@@ -3881,64 +3887,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3881
3887
|
class SidenavComponent {
|
|
3882
3888
|
titleService = inject(Title);
|
|
3883
3889
|
format = new GeoJSON();
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
}
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
}
|
|
3890
|
-
_map;
|
|
3891
|
-
get opened() {
|
|
3892
|
-
return this._opened;
|
|
3893
|
-
}
|
|
3894
|
-
set opened(value) {
|
|
3895
|
-
this._opened = value;
|
|
3896
|
-
}
|
|
3897
|
-
_opened;
|
|
3898
|
-
get feature() {
|
|
3899
|
-
return this._feature;
|
|
3900
|
-
}
|
|
3901
|
-
set feature(value) {
|
|
3902
|
-
this._feature = value;
|
|
3903
|
-
}
|
|
3904
|
-
_feature;
|
|
3905
|
-
get tool() {
|
|
3906
|
-
return this._tool;
|
|
3907
|
-
}
|
|
3908
|
-
set tool(value) {
|
|
3909
|
-
this._tool = value;
|
|
3910
|
-
}
|
|
3911
|
-
_tool;
|
|
3912
|
-
get media() {
|
|
3913
|
-
return this._media;
|
|
3914
|
-
}
|
|
3915
|
-
set media(value) {
|
|
3916
|
-
this._media = value;
|
|
3917
|
-
}
|
|
3918
|
-
_media;
|
|
3919
|
-
get title() {
|
|
3920
|
-
return this._title;
|
|
3921
|
-
}
|
|
3922
|
-
set title(value) {
|
|
3923
|
-
if (value) {
|
|
3924
|
-
this._title = value;
|
|
3925
|
-
}
|
|
3926
|
-
}
|
|
3927
|
-
_title;
|
|
3890
|
+
map = input.required(...(ngDevMode ? [{ debugName: "map" }] : /* istanbul ignore next */ []));
|
|
3891
|
+
opened = input(false, ...(ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []));
|
|
3892
|
+
feature = input.required(...(ngDevMode ? [{ debugName: "feature" }] : /* istanbul ignore next */ []));
|
|
3893
|
+
tool = input(...(ngDevMode ? [undefined, { debugName: "tool" }] : /* istanbul ignore next */ []));
|
|
3894
|
+
media = input(...(ngDevMode ? [undefined, { debugName: "media" }] : /* istanbul ignore next */ []));
|
|
3895
|
+
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
3928
3896
|
topPanelState = 'initial';
|
|
3897
|
+
_defaultTitle = this.titleService.getTitle();
|
|
3898
|
+
displayTitle = computed(() => this.title() || this._defaultTitle, ...(ngDevMode ? [{ debugName: "displayTitle" }] : /* istanbul ignore next */ []));
|
|
3929
3899
|
get featureTitle() {
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
constructor() {
|
|
3933
|
-
this._title = this.titleService.getTitle();
|
|
3900
|
+
const feature = this.feature();
|
|
3901
|
+
return feature ? getEntityTitle(feature) : undefined;
|
|
3934
3902
|
}
|
|
3935
3903
|
zoomToFeatureExtent() {
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3904
|
+
const feature = this.feature();
|
|
3905
|
+
if (feature?.geometry) {
|
|
3906
|
+
const olFeature = this.format.readFeature(feature, {
|
|
3907
|
+
dataProjection: feature.projection,
|
|
3908
|
+
featureProjection: this.map().viewProjection
|
|
3940
3909
|
});
|
|
3941
|
-
moveToOlFeatures(this.map.viewController, olFeature, FeatureMotion.Zoom);
|
|
3910
|
+
moveToOlFeatures(this.map().viewController, olFeature, FeatureMotion.Zoom);
|
|
3942
3911
|
}
|
|
3943
3912
|
}
|
|
3944
3913
|
toggleTopPanel() {
|
|
@@ -3950,7 +3919,7 @@ class SidenavComponent {
|
|
|
3950
3919
|
}
|
|
3951
3920
|
}
|
|
3952
3921
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3953
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", 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
|
|
3922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.10", type: SidenavComponent, isStandalone: true, selector: "igo-sidenav", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: true, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null }, feature: { classPropertyName: "feature", publicName: "feature", isSignal: true, isRequired: true, transformFunction: null }, tool: { classPropertyName: "tool", publicName: "tool", isSignal: true, isRequired: false, transformFunction: null }, media: { classPropertyName: "media", publicName: "media", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, 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\n [title]=\"tool() ? (tool()!.title | translate) : displayTitle()\"\n >\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" }] });
|
|
3954
3923
|
}
|
|
3955
3924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
3956
3925
|
type: Component,
|
|
@@ -3963,20 +3932,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
3963
3932
|
MatIconModule,
|
|
3964
3933
|
FeatureDetailsComponent,
|
|
3965
3934
|
IgoLanguageModule
|
|
3966
|
-
], 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
|
|
3967
|
-
}],
|
|
3968
|
-
type: Input
|
|
3969
|
-
}], opened: [{
|
|
3970
|
-
type: Input
|
|
3971
|
-
}], feature: [{
|
|
3972
|
-
type: Input
|
|
3973
|
-
}], tool: [{
|
|
3974
|
-
type: Input
|
|
3975
|
-
}], media: [{
|
|
3976
|
-
type: Input
|
|
3977
|
-
}], title: [{
|
|
3978
|
-
type: Input
|
|
3979
|
-
}] } });
|
|
3935
|
+
], 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\n [title]=\"tool() ? (tool()!.title | translate) : displayTitle()\"\n >\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"] }]
|
|
3936
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: true }] }], opened: [{ type: i0.Input, args: [{ isSignal: true, alias: "opened", required: false }] }], feature: [{ type: i0.Input, args: [{ isSignal: true, alias: "feature", required: true }] }], tool: [{ type: i0.Input, args: [{ isSignal: true, alias: "tool", required: false }] }], media: [{ type: i0.Input, args: [{ isSignal: true, alias: "media", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
|
|
3980
3937
|
|
|
3981
3938
|
/**
|
|
3982
3939
|
* @deprecated import the SidenavComponent directly
|