@igo2/context 20.1.0-next.1 → 20.1.0-next.10
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 +857 -938
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +61 -101
- package/locale/en.context.json +6 -5
- package/locale/fr.context.json +6 -5
- package/package.json +8 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
3
|
-
import { AsyncPipe, NgClass, KeyValuePipe } from '@angular/common';
|
|
2
|
+
import { inject, Injectable, input, Component, NgModule, output, effect, Directive, signal, viewChild, ChangeDetectionStrategy, model, Input, ChangeDetectorRef, HostListener } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, AsyncPipe, NgClass, KeyValuePipe } from '@angular/common';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
|
|
6
6
|
import * as i4 from '@angular/material/button';
|
|
@@ -20,12 +20,12 @@ import { ConfigService } from '@igo2/core/config';
|
|
|
20
20
|
import { LanguageService, IgoLanguageModule } from '@igo2/core/language';
|
|
21
21
|
import { MessageService } from '@igo2/core/message';
|
|
22
22
|
import { BehaviorSubject, Subject, of, Observable, ReplaySubject, timer, EMPTY, combineLatest } from 'rxjs';
|
|
23
|
-
import { skip, first, catchError, tap, map, mergeMap, debounceTime, take,
|
|
23
|
+
import { skip, first, catchError, tap, map, mergeMap, debounceTime, take, switchMap, filter, debounce } from 'rxjs/operators';
|
|
24
24
|
import { HttpParams, HttpClient } from '@angular/common/http';
|
|
25
25
|
import { AuthService } from '@igo2/auth';
|
|
26
26
|
import { RouteService } from '@igo2/core/route';
|
|
27
27
|
import { StorageService } from '@igo2/core/storage';
|
|
28
|
-
import { QueryFormat, isLayerGroupOptions, ID_GROUP_PREFIX, isLayerGroup, isLayerItem, getLayerOptionIdentifier, findParentId, generateIdFromSourceOptions, ExportService, FeatureDataSource, featureRandomStyleFunction, featureRandomStyle, VectorLayer, ClusterDataSource,
|
|
28
|
+
import { QueryFormat, isLayerGroupOptions, ID_GROUP_PREFIX, isLayerGroup, isLayerItem, getLayerOptionIdentifier, findParentId, generateIdFromSourceOptions, ExportService, FeatureDataSource, featureRandomStyleFunction, featureRandomStyle, VectorLayer, ClusterDataSource, MapBrowserComponent, LayerService, StyleListService, StyleService, sortLayersByZindex, mergeLayersOptions, MapService, isLayerItemOptions, moveToOlFeatures, FeatureMotion, FeatureDetailsComponent } from '@igo2/geo';
|
|
29
29
|
import { ObjectUtils, uuid, downloadContent } from '@igo2/utils';
|
|
30
30
|
import GeoJSON from 'ol/format/GeoJSON';
|
|
31
31
|
import olPoint from 'ol/geom/Point';
|
|
@@ -39,28 +39,27 @@ import * as i5$1 from '@ngx-translate/core';
|
|
|
39
39
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
40
40
|
import * as i4$1 from '@angular/material/icon';
|
|
41
41
|
import { MatIconModule } from '@angular/material/icon';
|
|
42
|
-
import * as
|
|
42
|
+
import * as i6$1 from '@angular/material/tooltip';
|
|
43
43
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
44
|
-
import {
|
|
44
|
+
import { MediaService } from '@igo2/core/media';
|
|
45
|
+
import * as i5$2 from '@angular/material/menu';
|
|
46
|
+
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
45
47
|
import { StopPropagationDirective } from '@igo2/common/stop-propagation';
|
|
46
|
-
import { ConfirmDialogService } from '@igo2/common/confirm-dialog';
|
|
47
48
|
import * as i8 from '@angular/material/checkbox';
|
|
48
49
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
49
50
|
import { MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog } from '@angular/material/dialog';
|
|
50
|
-
import * as i7 from '@angular/material/menu';
|
|
51
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
52
51
|
import { ActionStore, ActionbarMode, ActionbarComponent } from '@igo2/common/action';
|
|
52
|
+
import { CollapsibleComponent } from '@igo2/common/collapsible';
|
|
53
|
+
import { ConfirmDialogService } from '@igo2/common/confirm-dialog';
|
|
53
54
|
import { ListComponent, ListItemDirective } from '@igo2/common/list';
|
|
54
55
|
import * as i1$3 from '@angular/material/radio';
|
|
55
56
|
import { MatRadioModule } from '@angular/material/radio';
|
|
56
|
-
import { MediaService } from '@igo2/core/media';
|
|
57
57
|
import * as oleasing from 'ol/easing';
|
|
58
58
|
import * as olproj from 'ol/proj';
|
|
59
59
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
60
60
|
import { CustomHtmlComponent } from '@igo2/common/custom-html';
|
|
61
|
-
import * as i1$4 from '@angular/material/tabs';
|
|
62
61
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
63
|
-
import * as i1$
|
|
62
|
+
import * as i1$4 from '@angular/material/sidenav';
|
|
64
63
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
65
64
|
import { Title } from '@angular/platform-browser';
|
|
66
65
|
import { getEntityTitle } from '@igo2/common/entity';
|
|
@@ -89,6 +88,7 @@ const BaseLayerParamsKeys = [
|
|
|
89
88
|
'parentId'
|
|
90
89
|
];
|
|
91
90
|
const LayerParamsKeys = [
|
|
91
|
+
'id',
|
|
92
92
|
'index',
|
|
93
93
|
'names',
|
|
94
94
|
'type',
|
|
@@ -153,6 +153,11 @@ function shareMapKeyDefs(options) {
|
|
|
153
153
|
key: options.layers,
|
|
154
154
|
params: {
|
|
155
155
|
index: undefined,
|
|
156
|
+
id: {
|
|
157
|
+
key: 'id',
|
|
158
|
+
parse: (params) => extractParam(params, 'id'),
|
|
159
|
+
stringify: (value) => `${value}`
|
|
160
|
+
},
|
|
156
161
|
names: {
|
|
157
162
|
key: 'n',
|
|
158
163
|
parse: (params) => extractParam(params, 'n'),
|
|
@@ -374,11 +379,10 @@ function hasLegacyParams(params, optionsLegacy) {
|
|
|
374
379
|
return legacyPairs.some(([layer, url]) => getParamValue(params, layer) && getParamValue(params, url));
|
|
375
380
|
}
|
|
376
381
|
function hasModernShareParams(params, keysDefinitions) {
|
|
377
|
-
const {
|
|
382
|
+
const { layers, groups } = keysDefinitions;
|
|
378
383
|
const hasGroups = !!getParamValue(params, groups.key);
|
|
379
384
|
const hasLayers = !!getParamValue(params, layers.key);
|
|
380
|
-
|
|
381
|
-
return (hasLayers && hasUrls) || hasGroups;
|
|
385
|
+
return hasLayers || hasGroups;
|
|
382
386
|
}
|
|
383
387
|
function getParamValue(params, key) {
|
|
384
388
|
const value = params[key];
|
|
@@ -389,19 +393,19 @@ class ShareMapEncoder {
|
|
|
389
393
|
SHARE_MAP_DEFS;
|
|
390
394
|
document;
|
|
391
395
|
context;
|
|
396
|
+
language;
|
|
392
397
|
constructor(SHARE_MAP_DEFS, document) {
|
|
393
398
|
this.SHARE_MAP_DEFS = SHARE_MAP_DEFS;
|
|
394
399
|
this.document = document;
|
|
395
400
|
}
|
|
396
|
-
generateUrl(map, context
|
|
401
|
+
generateUrl(map, context) {
|
|
397
402
|
this.context = context;
|
|
398
|
-
const querystring = publicShareOption.layerlistControls?.querystring ?? '';
|
|
399
403
|
const layers = [
|
|
400
404
|
map.layerController.baseLayer,
|
|
401
405
|
...map.layerController.layersFlattened
|
|
402
406
|
].filter(Boolean);
|
|
403
|
-
const queryUrl = this.buildQueryUrl(layers
|
|
404
|
-
const urlBaseConfig = this.getBaseUrlConfig(map.viewController
|
|
407
|
+
const queryUrl = this.buildQueryUrl(layers);
|
|
408
|
+
const urlBaseConfig = this.getBaseUrlConfig(map.viewController);
|
|
405
409
|
return queryUrl !== '' ? urlBaseConfig + '&' + queryUrl : urlBaseConfig;
|
|
406
410
|
}
|
|
407
411
|
/**
|
|
@@ -414,9 +418,9 @@ class ShareMapEncoder {
|
|
|
414
418
|
// eslint-disable-next-line prefer-const
|
|
415
419
|
let counter = 1;
|
|
416
420
|
layers.forEach((layer) => {
|
|
417
|
-
if (layer.id && layer.id.includes(ID_GROUP_PREFIX)) {
|
|
421
|
+
if (layer.id && layer.id.toString().includes(ID_GROUP_PREFIX)) {
|
|
418
422
|
const newId = this.getUniqueId(existingIds, counter);
|
|
419
|
-
idMap.set(layer.id,
|
|
423
|
+
idMap.set(layer.id, newId);
|
|
420
424
|
layer.options.id = newId;
|
|
421
425
|
}
|
|
422
426
|
});
|
|
@@ -457,13 +461,13 @@ class ShareMapEncoder {
|
|
|
457
461
|
getLayerItems(layers) {
|
|
458
462
|
return layers.filter(isLayerItem);
|
|
459
463
|
}
|
|
460
|
-
buildQueryUrl(layers
|
|
464
|
+
buildQueryUrl(layers) {
|
|
461
465
|
const layersSharable = this.isLayerSharable(layers);
|
|
466
|
+
this.replaceGroupLocalIds(layersSharable);
|
|
462
467
|
const layersChanged = this.getFilteredMapLayers(layersSharable);
|
|
463
468
|
const groups = this.getLayerGroups(layersChanged);
|
|
464
|
-
this.replaceGroupLocalIds(groups);
|
|
465
469
|
const groupsQueryUrl = this.buildGroupsQueryUrl(groups);
|
|
466
|
-
const layersByService = this.generateLayersOptionsByService(this.getLayerItems(layersChanged)
|
|
470
|
+
const layersByService = this.generateLayersOptionsByService(this.getLayerItems(layersChanged));
|
|
467
471
|
const layersQueryUrl = this.buildLayersQueryUrl(layersByService);
|
|
468
472
|
return [layersQueryUrl, groupsQueryUrl].filter(Boolean).join('&');
|
|
469
473
|
}
|
|
@@ -527,10 +531,10 @@ class ShareMapEncoder {
|
|
|
527
531
|
}
|
|
528
532
|
return ids;
|
|
529
533
|
}
|
|
530
|
-
generateLayersOptionsByService(layers
|
|
534
|
+
generateLayersOptionsByService(layers) {
|
|
531
535
|
const layersByUrl = new Map();
|
|
532
536
|
layers.forEach((layer) => {
|
|
533
|
-
const [url, params] = this.generateLayerOption(layer
|
|
537
|
+
const [url, params] = this.generateLayerOption(layer);
|
|
534
538
|
if (!layersByUrl.has(url)) {
|
|
535
539
|
layersByUrl.set(url, [params]);
|
|
536
540
|
}
|
|
@@ -538,18 +542,25 @@ class ShareMapEncoder {
|
|
|
538
542
|
layersByUrl.get(url).push(params);
|
|
539
543
|
}
|
|
540
544
|
});
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
+
let customIndex = 0;
|
|
546
|
+
return Array.from(layersByUrl.entries()).map(([url, layerParams]) => {
|
|
547
|
+
const hasNoId = layerParams.some((p) => !p.id);
|
|
548
|
+
if (hasNoId) {
|
|
549
|
+
layerParams.forEach((params) => {
|
|
550
|
+
if (!params.id) {
|
|
551
|
+
params.index = customIndex;
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
customIndex++;
|
|
555
|
+
}
|
|
545
556
|
return [url, layerParams];
|
|
546
557
|
});
|
|
547
558
|
}
|
|
548
|
-
generateLayerOption(layer
|
|
559
|
+
generateLayerOption(layer) {
|
|
549
560
|
const dataSourceOptions = layer.dataSource.options;
|
|
550
561
|
return [
|
|
551
562
|
this.concatUrlWithVersion(dataSourceOptions),
|
|
552
|
-
this.getLayerParams(layer
|
|
563
|
+
this.getLayerParams(layer)
|
|
553
564
|
];
|
|
554
565
|
}
|
|
555
566
|
getLayerNames(dataSourceOptions) {
|
|
@@ -579,46 +590,81 @@ class ShareMapEncoder {
|
|
|
579
590
|
}
|
|
580
591
|
return dataSourceOptions.url;
|
|
581
592
|
}
|
|
582
|
-
getLayerParams(layer
|
|
593
|
+
getLayerParams(layer) {
|
|
583
594
|
const dataSourceOptions = layer.dataSource.options;
|
|
595
|
+
const isExisting = this.hasLayerId(this.context.layers, layer.id);
|
|
584
596
|
return {
|
|
585
597
|
index: undefined,
|
|
586
|
-
|
|
587
|
-
|
|
598
|
+
...(isExisting
|
|
599
|
+
? { id: layer.id }
|
|
600
|
+
: {
|
|
601
|
+
names: this.getLayerNames(dataSourceOptions),
|
|
602
|
+
type: dataSourceOptions?.type
|
|
603
|
+
}),
|
|
588
604
|
opacity: this.getOpacity(layer.opacity),
|
|
589
605
|
parentId: layer.parent?.id,
|
|
590
606
|
visible: this.getVisibility(layer.visible),
|
|
591
|
-
zIndex: layer.zIndex
|
|
592
|
-
queryString: this.getQueryString(dataSourceOptions?.type, queryString)
|
|
607
|
+
zIndex: layer.zIndex
|
|
593
608
|
};
|
|
594
609
|
}
|
|
610
|
+
/** Recursive */
|
|
611
|
+
hasLayerId(layersOptions, targetId) {
|
|
612
|
+
if (targetId == null)
|
|
613
|
+
return false;
|
|
614
|
+
return layersOptions.some((l) => {
|
|
615
|
+
if (l.id == null)
|
|
616
|
+
return false;
|
|
617
|
+
if (!isLayerGroupOptions(l)) {
|
|
618
|
+
return String(l.id) === String(targetId);
|
|
619
|
+
}
|
|
620
|
+
if (isLayerGroupOptions(l) && Array.isArray(l.children)) {
|
|
621
|
+
return this.hasLayerId(l.children, targetId);
|
|
622
|
+
}
|
|
623
|
+
return false;
|
|
624
|
+
});
|
|
625
|
+
}
|
|
595
626
|
getOpacity(opacity) {
|
|
596
627
|
return opacity === 1 ? undefined : opacity;
|
|
597
628
|
}
|
|
598
629
|
getVisibility(visibility) {
|
|
599
630
|
return !!visibility;
|
|
600
631
|
}
|
|
601
|
-
getQueryString(type, queryString) {
|
|
602
|
-
return (type === 'wms' || type === 'wmts') && queryString !== ''
|
|
603
|
-
? queryString
|
|
604
|
-
: undefined;
|
|
605
|
-
}
|
|
606
632
|
buildLayersQueryUrl(layersByService) {
|
|
607
633
|
if (layersByService.length === 0)
|
|
608
634
|
return undefined;
|
|
609
635
|
const { urlsKey, layers } = this.SHARE_MAP_DEFS;
|
|
610
|
-
const urls =
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
636
|
+
const urls = [];
|
|
637
|
+
const layerParams = [];
|
|
638
|
+
for (const [url, layer] of layersByService) {
|
|
639
|
+
let needUrl = false;
|
|
640
|
+
for (const param of layer) {
|
|
641
|
+
layerParams.push(this.stringifyLayerParams(param));
|
|
642
|
+
if (param.id == null) {
|
|
643
|
+
needUrl = true;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
// If some layer have no id push the url service.
|
|
647
|
+
if (needUrl) {
|
|
648
|
+
urls.push(url);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (layerParams.length === 0)
|
|
652
|
+
return undefined;
|
|
653
|
+
const queryParts = [];
|
|
654
|
+
if (urls.length > 0) {
|
|
655
|
+
queryParts.push(`${urlsKey}=${urls.join(',')}`);
|
|
656
|
+
}
|
|
657
|
+
queryParts.push(`${layers.key}=${layerParams.join(';')}`);
|
|
658
|
+
return queryParts.join('&');
|
|
615
659
|
}
|
|
616
660
|
stringifyLayerParams(params) {
|
|
617
661
|
const { index, ...restParams } = params;
|
|
618
662
|
const stringifiedParams = this.stringifyDefinitions(restParams, this.SHARE_MAP_DEFS.layers.params);
|
|
619
|
-
return
|
|
663
|
+
return restParams.id != null
|
|
664
|
+
? `${stringifiedParams}`
|
|
665
|
+
: `${index},${stringifiedParams}`;
|
|
620
666
|
}
|
|
621
|
-
getBaseUrlConfig(viewController
|
|
667
|
+
getBaseUrlConfig(viewController) {
|
|
622
668
|
const { pos, contextKey, languageKey } = this.SHARE_MAP_DEFS;
|
|
623
669
|
const href = this.document.location.href;
|
|
624
670
|
const baseUrl = this.sanitizeBaseUrl(href);
|
|
@@ -630,8 +676,8 @@ class ShareMapEncoder {
|
|
|
630
676
|
const contextUri = this.context?.uri;
|
|
631
677
|
if (contextUri)
|
|
632
678
|
params.push(`${contextKey}=${contextUri}`);
|
|
633
|
-
if (language && !baseUrl.includes(`${languageKey}=`))
|
|
634
|
-
params.push(`${languageKey}=${language}`);
|
|
679
|
+
if (this.language && !baseUrl.includes(`${languageKey}=`))
|
|
680
|
+
params.push(`${languageKey}=${this.language}`);
|
|
635
681
|
return `${baseUrl}${params.join('&')}`;
|
|
636
682
|
}
|
|
637
683
|
sanitizeBaseUrl(baseUrl) {
|
|
@@ -957,22 +1003,34 @@ class ShareMapParser {
|
|
|
957
1003
|
});
|
|
958
1004
|
}
|
|
959
1005
|
parseLayer(layer, urls) {
|
|
960
|
-
const urlIndex = this.extractUrlIndex(layer);
|
|
961
|
-
if (urlIndex === undefined)
|
|
962
|
-
return undefined;
|
|
963
|
-
const layerNames = this.extractLayerNames(layer);
|
|
964
|
-
if (layerNames === undefined)
|
|
965
|
-
return undefined;
|
|
966
1006
|
const { zIndex, visibility, type, opacity, parentId } = this.extractLayerProperties(layer);
|
|
967
|
-
const
|
|
968
|
-
const version = this.extractVersionFromUrl(url);
|
|
969
|
-
const sourceOptions = buildDataSourceOptions(type, url, layerNames, version);
|
|
970
|
-
return ObjectUtils.removeUndefined({
|
|
971
|
-
sourceOptions,
|
|
1007
|
+
const base = {
|
|
972
1008
|
visible: visibility,
|
|
973
1009
|
zIndex,
|
|
974
1010
|
opacity,
|
|
975
1011
|
parentId
|
|
1012
|
+
};
|
|
1013
|
+
const layerNames = this.extractLayerNames(layer);
|
|
1014
|
+
if (layerNames) {
|
|
1015
|
+
const urlIndex = this.extractUrlIndex(layer);
|
|
1016
|
+
if (urlIndex === undefined)
|
|
1017
|
+
return undefined;
|
|
1018
|
+
const url = urls[urlIndex];
|
|
1019
|
+
const version = this.extractVersionFromUrl(url);
|
|
1020
|
+
const sourceOptions = buildDataSourceOptions(type, url, layerNames, version);
|
|
1021
|
+
return ObjectUtils.removeUndefined({
|
|
1022
|
+
id: undefined,
|
|
1023
|
+
sourceOptions,
|
|
1024
|
+
...base
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
const id = this.extractLayerId(layer);
|
|
1028
|
+
if (!id)
|
|
1029
|
+
return undefined;
|
|
1030
|
+
return ObjectUtils.removeUndefined({
|
|
1031
|
+
id,
|
|
1032
|
+
sourceOptions: undefined,
|
|
1033
|
+
...base
|
|
976
1034
|
});
|
|
977
1035
|
}
|
|
978
1036
|
parseGroup(properties) {
|
|
@@ -992,6 +1050,12 @@ class ShareMapParser {
|
|
|
992
1050
|
const versionDef = this.keysDefinitions.layers.params.version;
|
|
993
1051
|
return versionDef.parse(url);
|
|
994
1052
|
}
|
|
1053
|
+
extractLayerId(layer) {
|
|
1054
|
+
const { id } = this.keysDefinitions.layers.params;
|
|
1055
|
+
const regex = new RegExp(`([a-zA-Z0-9_]+)${id.key}\\b`);
|
|
1056
|
+
const match = layer.match(regex);
|
|
1057
|
+
return match ? match[1] : undefined;
|
|
1058
|
+
}
|
|
995
1059
|
extractUrlIndex(layer) {
|
|
996
1060
|
const { index } = this.keysDefinitions.layers.params;
|
|
997
1061
|
const regex = index ? new RegExp(`([\\d.]+)${index}`) : /([\d.]+)/;
|
|
@@ -1031,19 +1095,19 @@ class ShareMapService {
|
|
|
1031
1095
|
encoder;
|
|
1032
1096
|
parser;
|
|
1033
1097
|
constructor() {
|
|
1034
|
-
const document = this.document;
|
|
1035
1098
|
this.options = SHARE_MAP_KEYS_DEFAULT_OPTIONS;
|
|
1036
1099
|
this.optionsLegacy = this.routeService.legacyOptions;
|
|
1037
1100
|
this.keysDefinitions = shareMapKeyDefs({
|
|
1038
1101
|
...SHARE_MAP_KEYS_DEFAULT_OPTIONS,
|
|
1039
1102
|
languageKey: this.routeService.options.languageKey
|
|
1040
1103
|
});
|
|
1041
|
-
this.encoder = new ShareMapEncoder(this.keysDefinitions, document);
|
|
1104
|
+
this.encoder = new ShareMapEncoder(this.keysDefinitions, this.document);
|
|
1042
1105
|
this.parser = new ShareMapParser(this.keysDefinitions, this.routeService.legacyOptions);
|
|
1043
1106
|
this.routeService.queryParams.subscribe((params) => {
|
|
1044
|
-
const language = this.
|
|
1045
|
-
if (
|
|
1046
|
-
this.language =
|
|
1107
|
+
const language = params[this.keysDefinitions.languageKey];
|
|
1108
|
+
if (language) {
|
|
1109
|
+
this.language = language;
|
|
1110
|
+
this.encoder.language = language;
|
|
1047
1111
|
}
|
|
1048
1112
|
});
|
|
1049
1113
|
}
|
|
@@ -1070,10 +1134,10 @@ class ShareMapService {
|
|
|
1070
1134
|
params[zoomKey] ||
|
|
1071
1135
|
params[centerKey]);
|
|
1072
1136
|
}
|
|
1073
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1074
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1138
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapService, providedIn: 'root' });
|
|
1075
1139
|
}
|
|
1076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapService, decorators: [{
|
|
1077
1141
|
type: Injectable,
|
|
1078
1142
|
args: [{
|
|
1079
1143
|
providedIn: 'root'
|
|
@@ -1209,6 +1273,10 @@ class ContextService {
|
|
|
1209
1273
|
delete(id, imported = false) {
|
|
1210
1274
|
const contexts = { ours: [] };
|
|
1211
1275
|
Object.keys(this.contexts$.value).forEach((key) => (contexts[key] = this.contexts$.value[key].filter((c) => c.id !== id)));
|
|
1276
|
+
if (id === this.context$.value?.id) {
|
|
1277
|
+
this.context$.next(undefined);
|
|
1278
|
+
this.loadContext(this.defaultContextUri);
|
|
1279
|
+
}
|
|
1212
1280
|
if (imported) {
|
|
1213
1281
|
this.importedContext = this.importedContext.filter((c) => c.id !== id);
|
|
1214
1282
|
return of(this.contexts$.next(contexts));
|
|
@@ -1430,7 +1498,8 @@ class ContextService {
|
|
|
1430
1498
|
.filter(Boolean);
|
|
1431
1499
|
context.tools = this.tools.map((tool) => {
|
|
1432
1500
|
return {
|
|
1433
|
-
id:
|
|
1501
|
+
id: tool.id,
|
|
1502
|
+
name: tool.name,
|
|
1434
1503
|
global: tool.global
|
|
1435
1504
|
};
|
|
1436
1505
|
});
|
|
@@ -1477,21 +1546,11 @@ class ContextService {
|
|
|
1477
1546
|
context.layers.push(layerOptions);
|
|
1478
1547
|
}
|
|
1479
1548
|
else {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
delete catalogLayer.source;
|
|
1486
|
-
context.layers.push(catalogLayer);
|
|
1487
|
-
}
|
|
1488
|
-
else {
|
|
1489
|
-
const extraFeatures = this.getExtraFeatures(layer);
|
|
1490
|
-
extraFeatures.name = layer.options.title;
|
|
1491
|
-
extraFeatures.opacity = layer.opacity;
|
|
1492
|
-
extraFeatures.visible = layer.visible;
|
|
1493
|
-
context.extraFeatures.push(extraFeatures);
|
|
1494
|
-
}
|
|
1549
|
+
const extraFeatures = this.getExtraFeatures(layer);
|
|
1550
|
+
extraFeatures.name = layer.options.title;
|
|
1551
|
+
extraFeatures.opacity = layer.opacity;
|
|
1552
|
+
extraFeatures.visible = layer.visible;
|
|
1553
|
+
context.extraFeatures.push(extraFeatures);
|
|
1495
1554
|
}
|
|
1496
1555
|
});
|
|
1497
1556
|
context.toolbar = this.toolbar;
|
|
@@ -1641,10 +1700,10 @@ class ContextService {
|
|
|
1641
1700
|
}
|
|
1642
1701
|
return found;
|
|
1643
1702
|
}
|
|
1644
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1645
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1704
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextService, providedIn: 'root' });
|
|
1646
1705
|
}
|
|
1647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextService, decorators: [{
|
|
1648
1707
|
type: Injectable,
|
|
1649
1708
|
args: [{
|
|
1650
1709
|
providedIn: 'root'
|
|
@@ -1689,10 +1748,10 @@ class ContextExportService {
|
|
|
1689
1748
|
}
|
|
1690
1749
|
return false;
|
|
1691
1750
|
}
|
|
1692
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1693
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1751
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1752
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextExportService, providedIn: 'root' });
|
|
1694
1753
|
}
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextExportService, decorators: [{
|
|
1696
1755
|
type: Injectable,
|
|
1697
1756
|
args: [{
|
|
1698
1757
|
providedIn: 'root'
|
|
@@ -1956,10 +2015,10 @@ class ContextImportService {
|
|
|
1956
2015
|
const context = JSON.parse(data);
|
|
1957
2016
|
return context;
|
|
1958
2017
|
}
|
|
1959
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1960
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2018
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextImportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2019
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextImportService, providedIn: 'root' });
|
|
1961
2020
|
}
|
|
1962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextImportService, decorators: [{
|
|
1963
2022
|
type: Injectable,
|
|
1964
2023
|
args: [{
|
|
1965
2024
|
providedIn: 'root'
|
|
@@ -2054,10 +2113,10 @@ class ContextImportExportComponent {
|
|
|
2054
2113
|
onImportExportChange(event) {
|
|
2055
2114
|
this.activeImportExport = event.value;
|
|
2056
2115
|
}
|
|
2057
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2058
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextImportExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextImportExportComponent, isStandalone: true, selector: "igo-context-import-export", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"import-export-toggle\">\n <mat-button-toggle-group\n [value]=\"activeImportExport\"\n (change)=\"onImportExportChange($event)\"\n >\n <mat-button-toggle [value]=\"'import'\">\n {{ 'igo.geo.importExportForm.importTabTitle' | translate }}\n </mat-button-toggle>\n <mat-button-toggle [value]=\"'export'\">\n {{ 'igo.geo.importExportForm.exportTabTitle' | translate }}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n@if (activeImportExport === 'import') {\n <div>\n <form class=\"igo-form\">\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"button\"\n (click)=\"fileInput.click()\"\n [disabled]=\"loading$ | async\"\n >\n {{ 'igo.geo.importExportForm.importButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\" />\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = null\"\n (change)=\"importFiles($any($event.target).files)\"\n />\n </div>\n </form>\n <section>\n <h4>{{ 'igo.geo.importExportForm.importClarifications' | translate }}</h4>\n <ul>\n <li>\n {{\n 'igo.geo.importExportForm.importSizeMax'\n | translate: { size: fileSizeMb }\n }}\n </li>\n </ul>\n </section>\n </div>\n}\n\n@if (activeImportExport === 'export') {\n <form class=\"igo-form\" [formGroup]=\"form\">\n <div class=\"igo-input-container\">\n <mat-form-field class=\"example-full-width\">\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportContextName' | translate\n }}</mat-label>\n <input formControlName=\"name\" matInput [value]=\"\" />\n </mat-form-field>\n </div>\n <div class=\"igo-input-container\">\n <mat-form-field>\n <mat-label>{{\n 'igo.context.contextImportExport.export.exportPlaceHolder' | translate\n }}</mat-label>\n <mat-select formControlName=\"layers\" multiple>\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\n {{\n 'igo.context.contextImportExport.export.exportSelectAll'\n | translate\n }}\n </mat-option>\n <mat-divider />\n @for (layer of userControlledLayerList; track layer) {\n <mat-option [value]=\"layer\">{{ layer.title }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"button\"\n [disabled]=\"!form.valid || (loading$ | async)\"\n (click)=\"handleExportFormSubmit(form.value)\"\n >\n {{ 'igo.geo.importExportForm.exportButton' | translate }}\n </button>\n <igo-spinner [shown]=\"loading$ | async\" />\n </div>\n </form>\n}\n", styles: [".import-export-toggle{padding:10px;text-align:center}.import-export-toggle mat-button-toggle-group{width:100%}.import-export-toggle mat-button-toggle-group mat-button-toggle{width:50%}.igo-input-container{padding:10px}.igo-input-container mat-form-field{width:100%}h4{padding:0 5px}.igo-form{padding:15px 5px}.igo-form-button-group{text-align:center;padding-top:10px}igo-spinner{position:absolute;padding-left:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: SpinnerComponent, selector: "igo-spinner", inputs: ["shown"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.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: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i1$2.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" }] });
|
|
2059
2118
|
}
|
|
2060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextImportExportComponent, decorators: [{
|
|
2061
2120
|
type: Component,
|
|
2062
2121
|
args: [{ selector: 'igo-context-import-export', imports: [
|
|
2063
2122
|
MatButtonToggleModule,
|
|
@@ -2084,11 +2143,11 @@ class IgoContextImportExportModule {
|
|
|
2084
2143
|
ngModule: IgoContextImportExportModule
|
|
2085
2144
|
};
|
|
2086
2145
|
}
|
|
2087
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2088
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2089
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2147
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent], exports: [ContextImportExportComponent] });
|
|
2148
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent] });
|
|
2090
2149
|
}
|
|
2091
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
|
|
2092
2151
|
type: NgModule,
|
|
2093
2152
|
args: [{
|
|
2094
2153
|
imports: [ContextImportExportComponent],
|
|
@@ -2105,14 +2164,15 @@ class ContextFormComponent {
|
|
|
2105
2164
|
btnSubmitText = input(...(ngDevMode ? [undefined, { debugName: "btnSubmitText" }] : []));
|
|
2106
2165
|
context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
2107
2166
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2108
|
-
// TODO: replace any by ContextOptions or Context
|
|
2109
2167
|
submitForm = output();
|
|
2110
2168
|
clone = output();
|
|
2111
2169
|
delete = output();
|
|
2112
2170
|
constructor() {
|
|
2113
2171
|
effect(() => {
|
|
2114
2172
|
const context = this.context();
|
|
2115
|
-
|
|
2173
|
+
if (context) {
|
|
2174
|
+
this.buildForm(context);
|
|
2175
|
+
}
|
|
2116
2176
|
});
|
|
2117
2177
|
}
|
|
2118
2178
|
handleFormSubmit(value) {
|
|
@@ -2143,10 +2203,10 @@ class ContextFormComponent {
|
|
|
2143
2203
|
uri: [uri || ' ']
|
|
2144
2204
|
});
|
|
2145
2205
|
}
|
|
2146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2147
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextFormComponent, isStandalone: true, selector: "igo-context-form", inputs: { btnSubmitText: { classPropertyName: "btnSubmitText", publicName: "btnSubmitText", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { submitForm: "submitForm", clone: "clone", delete: "delete" }, ngImport: i0, template: "<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.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: 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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
2148
2208
|
}
|
|
2149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextFormComponent, decorators: [{
|
|
2150
2210
|
type: Component,
|
|
2151
2211
|
args: [{ selector: 'igo-context-form', imports: [
|
|
2152
2212
|
FormsModule,
|
|
@@ -2160,111 +2220,336 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
2160
2220
|
], template: "<form\n class=\"igo-form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\"\n>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n <mat-form-field id=\"uriInput\" class=\"full-width\">\n @if (prefix) {\n <span class=\"prefix\">{{ prefix }}-</span>\n }\n <span class=\"fieldWrapper\">\n <input\n matInput\n maxlength=\"64\"\n floatLabel=\"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n </mat-form-field>\n\n <button\n id=\"copyButton\"\n type=\"button\"\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard()\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n matButton=\"elevated\"\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\"\n >\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n</form>\n", styles: ["form{margin:10px}.full-width{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}#copyButton{width:24px;float:right;position:relative;top:-58px;left:5px}\n"] }]
|
|
2161
2221
|
}], ctorParameters: () => [], propDecorators: { btnSubmitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "btnSubmitText", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], submitForm: [{ type: i0.Output, args: ["submitForm"] }], clone: [{ type: i0.Output, args: ["clone"] }], delete: [{ type: i0.Output, args: ["delete"] }] } });
|
|
2162
2222
|
|
|
2163
|
-
class
|
|
2164
|
-
|
|
2165
|
-
submitForm = output();
|
|
2166
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2167
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextEditComponent, isStandalone: true, selector: "igo-context-edit", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", submitForm: "submitForm" }, ngImport: i0, template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"submitForm.emit($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" }] });
|
|
2168
|
-
}
|
|
2169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2170
|
-
type: Component,
|
|
2171
|
-
args: [{ selector: 'igo-context-edit', imports: [ContextFormComponent, IgoLanguageModule], template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"submitForm.emit($event)\"\n />\n}\n" }]
|
|
2172
|
-
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], submitForm: [{ type: i0.Output, args: ["submitForm"] }] } });
|
|
2173
|
-
|
|
2174
|
-
class ContextEditBindingDirective {
|
|
2223
|
+
class LayerContextDirective {
|
|
2224
|
+
component = inject(MapBrowserComponent);
|
|
2175
2225
|
contextService = inject(ContextService);
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
});
|
|
2189
|
-
}
|
|
2190
|
-
constructor() {
|
|
2191
|
-
this.component = inject(ContextEditComponent, { self: true });
|
|
2226
|
+
layerService = inject(LayerService);
|
|
2227
|
+
configService = inject(ConfigService);
|
|
2228
|
+
styleListService = inject(StyleListService);
|
|
2229
|
+
styleService = inject(StyleService);
|
|
2230
|
+
shareMapService = inject(ShareMapService);
|
|
2231
|
+
context$$;
|
|
2232
|
+
queryParams;
|
|
2233
|
+
contextLayers = [];
|
|
2234
|
+
removeLayersOnContextChange = input(true, ...(ngDevMode ? [{ debugName: "removeLayersOnContextChange" }] : []));
|
|
2235
|
+
contextLayersLoaded = output();
|
|
2236
|
+
get map() {
|
|
2237
|
+
return this.component.map();
|
|
2192
2238
|
}
|
|
2193
2239
|
ngOnInit() {
|
|
2194
|
-
this.
|
|
2240
|
+
this.context$$ = this.shareMapService.routeService.queryParams
|
|
2241
|
+
.pipe(switchMap((params) => {
|
|
2242
|
+
this.queryParams = params ?? {};
|
|
2243
|
+
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
2244
|
+
}))
|
|
2245
|
+
.subscribe((context) => this.handleContextChange(context));
|
|
2195
2246
|
}
|
|
2196
2247
|
ngOnDestroy() {
|
|
2197
|
-
this.
|
|
2248
|
+
this.context$$.unsubscribe();
|
|
2198
2249
|
}
|
|
2199
|
-
|
|
2200
|
-
|
|
2250
|
+
handleContextChange(context) {
|
|
2251
|
+
if (context.layers === undefined) {
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
/**
|
|
2255
|
+
* Assign an id to each layer group if it doesn't have one.
|
|
2256
|
+
* This is needed to be able to detect layer groups in the context that doesn't have and id and be able to ignore them in the share
|
|
2257
|
+
*/
|
|
2258
|
+
if (context.layers?.length) {
|
|
2259
|
+
addIdToGroups(context.layers);
|
|
2260
|
+
}
|
|
2261
|
+
const contextLayers = this.handleContextWithSharedUrl(ObjectUtils.copyDeep(context));
|
|
2262
|
+
if (this.removeLayersOnContextChange() === true) {
|
|
2263
|
+
this.map.layerController.reset();
|
|
2264
|
+
}
|
|
2265
|
+
else {
|
|
2266
|
+
this.map.layerController.remove(...this.contextLayers);
|
|
2267
|
+
}
|
|
2268
|
+
this.contextLayers = [];
|
|
2269
|
+
this.layerService.unavailableLayers = [];
|
|
2270
|
+
const importExportOptions = this.configService.getConfig('importExport');
|
|
2271
|
+
this.layerService
|
|
2272
|
+
.createLayers(contextLayers, context.uri)
|
|
2273
|
+
.subscribe((layers) => {
|
|
2274
|
+
this.handleAddLayers(layers);
|
|
2275
|
+
if (context.extraFeatures) {
|
|
2276
|
+
context.extraFeatures.forEach((featureCollection) => {
|
|
2277
|
+
if (!importExportOptions?.importWithStyle) {
|
|
2278
|
+
addImportedFeaturesToMap(featureCollection, this.map);
|
|
2279
|
+
}
|
|
2280
|
+
else {
|
|
2281
|
+
addImportedFeaturesStyledToMap(featureCollection, this.map, this.styleListService, this.styleService);
|
|
2282
|
+
}
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
this.contextLayersLoaded.emit(true);
|
|
2286
|
+
});
|
|
2287
|
+
if (this.configService.getConfig('importExport.allowToStoreLayer', false)) {
|
|
2288
|
+
this.layerService
|
|
2289
|
+
.createAsyncIdbLayers(context.uri)
|
|
2290
|
+
.pipe(debounceTime(500))
|
|
2291
|
+
.subscribe((layers) => this.handleAddLayers(layers));
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
handleAddLayers(layers) {
|
|
2295
|
+
const layersFiltrered = layers
|
|
2296
|
+
.filter((layer) => layer)
|
|
2297
|
+
.map((layer) => {
|
|
2298
|
+
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
2299
|
+
return layer;
|
|
2300
|
+
});
|
|
2301
|
+
const layersSorted = sortLayersByZindex(layersFiltrered, 'asc');
|
|
2302
|
+
this.contextLayers.concat(layersSorted);
|
|
2303
|
+
this.map.layerController.add(...layersSorted);
|
|
2304
|
+
}
|
|
2305
|
+
computeLayerVisibilityFromUrl(layer) {
|
|
2306
|
+
const params = this.queryParams;
|
|
2307
|
+
const currentContext = this.contextService.context$.value.uri;
|
|
2308
|
+
const currentLayerid = layer.id;
|
|
2309
|
+
let visible = layer.visible;
|
|
2310
|
+
if (!params || !currentLayerid) {
|
|
2311
|
+
return visible;
|
|
2312
|
+
}
|
|
2313
|
+
const contextParams = this.shareMapService.getContext(params);
|
|
2314
|
+
if (contextParams === currentContext || !contextParams) {
|
|
2315
|
+
let visibleOnLayersParams = '';
|
|
2316
|
+
let visibleOffLayersParams = '';
|
|
2317
|
+
let visiblelayers = [];
|
|
2318
|
+
let invisiblelayers = [];
|
|
2319
|
+
const visibleOnLayers = params[this.shareMapService.routeService.options.visibleOnLayersKey];
|
|
2320
|
+
const visibleOffLayers = params[this.shareMapService.routeService.options.visibleOffLayersKey];
|
|
2321
|
+
if (visibleOnLayers) {
|
|
2322
|
+
visibleOnLayersParams = visibleOnLayers;
|
|
2323
|
+
}
|
|
2324
|
+
if (visibleOffLayers) {
|
|
2325
|
+
visibleOffLayersParams = visibleOffLayers;
|
|
2326
|
+
}
|
|
2327
|
+
/* This order is important because to control whichever
|
|
2328
|
+
the order of * param. First whe open and close everything.*/
|
|
2329
|
+
if (visibleOnLayersParams === '*') {
|
|
2330
|
+
visible = true;
|
|
2331
|
+
}
|
|
2332
|
+
if (visibleOffLayersParams === '*') {
|
|
2333
|
+
visible = false;
|
|
2334
|
+
}
|
|
2335
|
+
// After, managing named layer by id (context.json OR id from datasource)
|
|
2336
|
+
visiblelayers = visibleOnLayersParams.split(',');
|
|
2337
|
+
invisiblelayers = visibleOffLayersParams.split(',');
|
|
2338
|
+
if (visiblelayers.indexOf(currentLayerid) > -1 ||
|
|
2339
|
+
visiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
2340
|
+
visible = true;
|
|
2341
|
+
}
|
|
2342
|
+
if (invisiblelayers.indexOf(currentLayerid) > -1 ||
|
|
2343
|
+
invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
2344
|
+
visible = false;
|
|
2345
|
+
}
|
|
2346
|
+
}
|
|
2347
|
+
return visible;
|
|
2348
|
+
}
|
|
2349
|
+
handleContextWithSharedUrl(context) {
|
|
2350
|
+
if (!this.queryParams ||
|
|
2351
|
+
(!hasLegacyParams(this.queryParams, this.shareMapService.optionsLegacy) &&
|
|
2352
|
+
!hasModernShareParams(this.queryParams, this.shareMapService.keysDefinitions))) {
|
|
2353
|
+
return context.layers;
|
|
2354
|
+
}
|
|
2355
|
+
const { layers, uri } = context;
|
|
2356
|
+
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
2357
|
+
if (!contextValue || contextValue === uri) {
|
|
2358
|
+
const layersOptions = this.shareMapService.parser.parseLayers(this.queryParams);
|
|
2359
|
+
if (layersOptions.length) {
|
|
2360
|
+
return mergeLayersOptions([...layers], layersOptions);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
return layers;
|
|
2201
2364
|
}
|
|
2202
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2203
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2366
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.16", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: { classPropertyName: "removeLayersOnContextChange", publicName: "removeLayersOnContextChange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
2204
2367
|
}
|
|
2205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
2206
2369
|
type: Directive,
|
|
2207
2370
|
args: [{
|
|
2208
|
-
selector: '[
|
|
2209
|
-
standalone: true
|
|
2371
|
+
selector: '[igoLayerContext]'
|
|
2210
2372
|
}]
|
|
2211
|
-
}],
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
collapsed = true;
|
|
2222
|
-
showFavorite = input(true, ...(ngDevMode ? [{ debugName: "showFavorite" }] : []));
|
|
2223
|
-
context = input(undefined, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2224
|
-
default = input(undefined, ...(ngDevMode ? [{ debugName: "default" }] : []));
|
|
2225
|
-
selected = input(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
2226
|
-
edit = output();
|
|
2227
|
-
delete = output();
|
|
2228
|
-
save = output();
|
|
2229
|
-
clone = output();
|
|
2230
|
-
hide = output();
|
|
2231
|
-
show = output();
|
|
2232
|
-
favorite = output();
|
|
2233
|
-
managePermissions = output();
|
|
2234
|
-
manageTools = output();
|
|
2235
|
-
get hidden() {
|
|
2236
|
-
return this.context().hidden;
|
|
2237
|
-
}
|
|
2238
|
-
get canShare() {
|
|
2239
|
-
return this.storageService.get('canShare') === true;
|
|
2240
|
-
}
|
|
2241
|
-
favoriteClick(context) {
|
|
2242
|
-
this.favorite.emit(context);
|
|
2373
|
+
}], propDecorators: { removeLayersOnContextChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLayersOnContextChange", required: false }] }], contextLayersLoaded: [{ type: i0.Output, args: ["contextLayersLoaded"] }] } });
|
|
2374
|
+
/** Recursive */
|
|
2375
|
+
function addIdToGroups(layerOptions) {
|
|
2376
|
+
for (const options of layerOptions) {
|
|
2377
|
+
if (isLayerGroupOptions(options) && !options.id) {
|
|
2378
|
+
options.id = ID_GROUP_PREFIX + uuid();
|
|
2379
|
+
if (Array.isArray(options.children)) {
|
|
2380
|
+
addIdToGroups(options.children);
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2243
2383
|
}
|
|
2244
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2245
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: { classPropertyName: "showFavorite", publicName: "showFavorite", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, default: { classPropertyName: "default", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, ngImport: i0, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n }\n @if (context().iconImage) {\n <img [src]=\"context().iconImage\" />\n }\n </button>\n }\n @if (!auth.authenticated && showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div matListItemMeta igoStopPropagation class=\"igo-actions-container\">\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n <div #actions class=\"igo-actions-expand-container\">\n @if (canShare && !context().imported) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon>\n </button>\n }\n @if (!context().imported) {\n <button\n class=\"clone-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n }\n @if (\n context().permission === typePermission[typePermission.write] &&\n !context().imported\n ) {\n <button\n class=\"edit-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n }\n @if (!context().hidden && !context().imported) {\n <button\n class=\"hide-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n </button>\n }\n @if (context().hidden && !context().imported) {\n <button\n class=\"hide-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n </button>\n }\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n <button\n class=\"actions-button\"\n mat-icon-button\n igoCollapse\n [color]=\"color\"\n [target]=\"actions\"\n [collapsed]=\"collapsed\"\n (click)=\"collapsed = !collapsed\"\n >\n <mat-icon>more_horiz</mat-icon>\n </button>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}.igo-actions-container{flex-shrink:0}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin:0 8px 0 0}button[matlistitemavatar]{background-color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: CollapseDirective, selector: "[igoCollapse]", inputs: ["target", "collapsed"], outputs: ["toggle"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2246
2384
|
}
|
|
2247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2248
|
-
type: Component,
|
|
2249
|
-
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2250
|
-
MatListModule,
|
|
2251
|
-
NgClass,
|
|
2252
|
-
MatButtonModule,
|
|
2253
|
-
StopPropagationDirective,
|
|
2254
|
-
MatTooltipModule,
|
|
2255
|
-
MatIconModule,
|
|
2256
|
-
CollapseDirective,
|
|
2257
|
-
IgoLanguageModule
|
|
2258
|
-
], template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n }\n @if (context().iconImage) {\n <img [src]=\"context().iconImage\" />\n }\n </button>\n }\n @if (!auth.authenticated && showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div matListItemMeta igoStopPropagation class=\"igo-actions-container\">\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n <div #actions class=\"igo-actions-expand-container\">\n @if (canShare && !context().imported) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon>\n </button>\n }\n @if (!context().imported) {\n <button\n class=\"clone-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n }\n @if (\n context().permission === typePermission[typePermission.write] &&\n !context().imported\n ) {\n <button\n class=\"edit-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n </button>\n }\n @if (!context().hidden && !context().imported) {\n <button\n class=\"hide-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n </button>\n }\n @if (context().hidden && !context().imported) {\n <button\n class=\"hide-button\"\n mat-icon-button\n [color]=\"color\"\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n </button>\n }\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n <button\n class=\"actions-button\"\n mat-icon-button\n igoCollapse\n [color]=\"color\"\n [target]=\"actions\"\n [collapsed]=\"collapsed\"\n (click)=\"collapsed = !collapsed\"\n >\n <mat-icon>more_horiz</mat-icon>\n </button>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}.igo-actions-container{flex-shrink:0}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin:0 8px 0 0}button[matlistitemavatar]{background-color:inherit}\n"] }]
|
|
2259
|
-
}], propDecorators: { showFavorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavorite", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], default: [{ type: i0.Input, args: [{ isSignal: true, alias: "default", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], 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"] }] } });
|
|
2260
2385
|
|
|
2261
|
-
class
|
|
2386
|
+
class MapContextDirective {
|
|
2387
|
+
contextService = inject(ContextService);
|
|
2388
|
+
mediaService = inject(MediaService);
|
|
2389
|
+
shareMapService = inject(ShareMapService);
|
|
2390
|
+
component;
|
|
2391
|
+
context$$;
|
|
2392
|
+
get map() {
|
|
2393
|
+
return this.component.map();
|
|
2394
|
+
}
|
|
2395
|
+
queryParams;
|
|
2396
|
+
constructor() {
|
|
2397
|
+
const component = inject(MapBrowserComponent);
|
|
2398
|
+
this.component = component;
|
|
2399
|
+
}
|
|
2400
|
+
ngOnInit() {
|
|
2401
|
+
this.context$$ = this.shareMapService.routeService.queryParams
|
|
2402
|
+
.pipe(switchMap((params) => {
|
|
2403
|
+
this.queryParams = params ?? {};
|
|
2404
|
+
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
2405
|
+
}))
|
|
2406
|
+
.subscribe((context) => this.handleContextChange(context));
|
|
2407
|
+
}
|
|
2408
|
+
ngOnDestroy() {
|
|
2409
|
+
this.context$$.unsubscribe();
|
|
2410
|
+
}
|
|
2411
|
+
handleContextChange(context) {
|
|
2412
|
+
if (context.map === undefined) {
|
|
2413
|
+
return;
|
|
2414
|
+
}
|
|
2415
|
+
const viewContext = context.map.view;
|
|
2416
|
+
const shouldOverrideView = !this.component.view() ||
|
|
2417
|
+
viewContext.keepCurrentView !== true ||
|
|
2418
|
+
context.map.view.projection !== this.map.projection;
|
|
2419
|
+
if (this.shareMapService.hasPositionParams(this.queryParams) &&
|
|
2420
|
+
shouldOverrideView) {
|
|
2421
|
+
const positions = this.shareMapService.parser.parsePosition(this.queryParams);
|
|
2422
|
+
this.component.setView({ ...viewContext, ...positions });
|
|
2423
|
+
}
|
|
2424
|
+
else if (shouldOverrideView) {
|
|
2425
|
+
this.component.setView(viewContext);
|
|
2426
|
+
}
|
|
2427
|
+
const map = this.component.map();
|
|
2428
|
+
if (map.geolocationController) {
|
|
2429
|
+
map.geolocationController.updateGeolocationOptions(viewContext);
|
|
2430
|
+
}
|
|
2431
|
+
const controlsContext = context.map.controls;
|
|
2432
|
+
if (!this.component.controls && controlsContext) {
|
|
2433
|
+
if (this.mediaService.isMobile()) {
|
|
2434
|
+
if (typeof controlsContext.scaleLine !== 'boolean') {
|
|
2435
|
+
const scaleLineOption = controlsContext.scaleLine;
|
|
2436
|
+
if (!scaleLineOption.minWidth) {
|
|
2437
|
+
scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
|
|
2438
|
+
controlsContext.scaleLine = scaleLineOption;
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
this.component.controls = controlsContext;
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MapContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2446
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: MapContextDirective, isStandalone: true, selector: "[igoMapContext]", ngImport: i0 });
|
|
2447
|
+
}
|
|
2448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MapContextDirective, decorators: [{
|
|
2449
|
+
type: Directive,
|
|
2450
|
+
args: [{
|
|
2451
|
+
selector: '[igoMapContext]'
|
|
2452
|
+
}]
|
|
2453
|
+
}], ctorParameters: () => [] });
|
|
2454
|
+
|
|
2455
|
+
class ContextEditComponent {
|
|
2456
|
+
contextService = inject(ContextService);
|
|
2457
|
+
messageService = inject(MessageService);
|
|
2458
|
+
context = signal(undefined, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2459
|
+
submitSuccessed = output();
|
|
2460
|
+
editedContext$$;
|
|
2461
|
+
ngOnInit() {
|
|
2462
|
+
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
2463
|
+
}
|
|
2464
|
+
ngOnDestroy() {
|
|
2465
|
+
this.editedContext$$.unsubscribe();
|
|
2466
|
+
}
|
|
2467
|
+
handleEditedContextChange(context) {
|
|
2468
|
+
this.context.set(context);
|
|
2469
|
+
}
|
|
2470
|
+
onEdit(context) {
|
|
2471
|
+
const id = this.context().id;
|
|
2472
|
+
this.contextService.update(id, context).subscribe(() => {
|
|
2473
|
+
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
|
|
2474
|
+
value: context.title || this.context().title
|
|
2475
|
+
});
|
|
2476
|
+
const currentContext = this.contextService.context$.value;
|
|
2477
|
+
if (currentContext && currentContext.id === id) {
|
|
2478
|
+
currentContext.title = context.title;
|
|
2479
|
+
currentContext.uri = context.uri;
|
|
2480
|
+
}
|
|
2481
|
+
this.contextService.setEditedContext(undefined);
|
|
2482
|
+
this.submitSuccessed.emit(context);
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", 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" }] });
|
|
2487
|
+
}
|
|
2488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2489
|
+
type: Component,
|
|
2490
|
+
args: [{ selector: 'igo-context-edit', imports: [ContextFormComponent, IgoLanguageModule], template: "@if (context()) {\n <igo-context-form\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context()\"\n (submitForm)=\"onEdit($event)\"\n />\n}\n" }]
|
|
2491
|
+
}], propDecorators: { submitSuccessed: [{ type: i0.Output, args: ["submitSuccessed"] }] } });
|
|
2492
|
+
|
|
2493
|
+
class ContextItemComponent {
|
|
2494
|
+
auth = inject(AuthService);
|
|
2495
|
+
storageService = inject(StorageService);
|
|
2496
|
+
typePermission = TypePermission;
|
|
2497
|
+
color = 'primary';
|
|
2498
|
+
collapsed = true;
|
|
2499
|
+
showFavorite = input(true, ...(ngDevMode ? [{ debugName: "showFavorite" }] : []));
|
|
2500
|
+
context = input(undefined, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
2501
|
+
default = input(undefined, ...(ngDevMode ? [{ debugName: "default" }] : []));
|
|
2502
|
+
selected = input(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : []));
|
|
2503
|
+
isDesktop = input(undefined, ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
|
|
2504
|
+
edit = output();
|
|
2505
|
+
delete = output();
|
|
2506
|
+
save = output();
|
|
2507
|
+
clone = output();
|
|
2508
|
+
hide = output();
|
|
2509
|
+
show = output();
|
|
2510
|
+
favorite = output();
|
|
2511
|
+
managePermissions = output();
|
|
2512
|
+
manageTools = output();
|
|
2513
|
+
share = output();
|
|
2514
|
+
get hidden() {
|
|
2515
|
+
return this.context().hidden;
|
|
2516
|
+
}
|
|
2517
|
+
get canShare() {
|
|
2518
|
+
return this.storageService.get('canShare') === true;
|
|
2519
|
+
}
|
|
2520
|
+
get isMenuOpen() {
|
|
2521
|
+
return this.itemActionsMenuTrigger()?.menuOpen ?? false;
|
|
2522
|
+
}
|
|
2523
|
+
itemActionsMenuTrigger = viewChild(MatMenuTrigger, ...(ngDevMode ? [{ debugName: "itemActionsMenuTrigger" }] : []));
|
|
2524
|
+
favoriteClick(context) {
|
|
2525
|
+
this.favorite.emit(context);
|
|
2526
|
+
}
|
|
2527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2528
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: { classPropertyName: "showFavorite", publicName: "showFavorite", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, default: { classPropertyName: "default", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", share: "share" }, host: { properties: { "class.igo-list-item-focused": "this.isMenuOpen" } }, viewQueries: [{ propertyName: "itemActionsMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === typePermission[typePermission.write]) {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2529
|
+
}
|
|
2530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2531
|
+
type: Component,
|
|
2532
|
+
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2533
|
+
MatListModule,
|
|
2534
|
+
NgClass,
|
|
2535
|
+
MatButtonModule,
|
|
2536
|
+
StopPropagationDirective,
|
|
2537
|
+
MatTooltipModule,
|
|
2538
|
+
MatIconModule,
|
|
2539
|
+
MatMenuModule,
|
|
2540
|
+
IgoLanguageModule
|
|
2541
|
+
], host: {
|
|
2542
|
+
'[class.igo-list-item-focused]': 'this.isMenuOpen'
|
|
2543
|
+
}, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === typePermission[typePermission.write]) {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"] }]
|
|
2544
|
+
}], propDecorators: { showFavorite: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFavorite", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }], default: [{ type: i0.Input, args: [{ isSignal: true, alias: "default", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], isDesktop: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDesktop", required: false }] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], save: [{ type: i0.Output, args: ["save"] }], clone: [{ type: i0.Output, args: ["clone"] }], hide: [{ type: i0.Output, args: ["hide"] }], show: [{ type: i0.Output, args: ["show"] }], favorite: [{ type: i0.Output, args: ["favorite"] }], managePermissions: [{ type: i0.Output, args: ["managePermissions"] }], manageTools: [{ type: i0.Output, args: ["manageTools"] }], share: [{ type: i0.Output, args: ["share"] }], itemActionsMenuTrigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenuTrigger), { isSignal: true }] }] } });
|
|
2545
|
+
|
|
2546
|
+
class BookmarkDialogComponent {
|
|
2262
2547
|
dialogRef = inject(MatDialogRef);
|
|
2263
2548
|
title;
|
|
2264
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2265
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
2549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BookmarkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.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" }] });
|
|
2266
2551
|
}
|
|
2267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
|
|
2268
2553
|
type: Component,
|
|
2269
2554
|
args: [{ selector: 'igo-bookmark-dialog', imports: [
|
|
2270
2555
|
MatDialogTitle,
|
|
@@ -2288,6 +2573,12 @@ var ContextListControlsEnum;
|
|
|
2288
2573
|
class ContextListComponent {
|
|
2289
2574
|
configService = inject(ConfigService);
|
|
2290
2575
|
auth = inject(AuthService);
|
|
2576
|
+
contextService = inject(ContextService);
|
|
2577
|
+
shareMapService = inject(ShareMapService);
|
|
2578
|
+
clipboard = inject(Clipboard);
|
|
2579
|
+
messageService = inject(MessageService);
|
|
2580
|
+
mapService = inject(MapService);
|
|
2581
|
+
confirmDialogService = inject(ConfirmDialogService);
|
|
2291
2582
|
dialog = inject(MatDialog);
|
|
2292
2583
|
languageService = inject(LanguageService);
|
|
2293
2584
|
storageService = inject(StorageService);
|
|
@@ -2296,6 +2587,8 @@ class ContextListComponent {
|
|
|
2296
2587
|
contexts$ = new BehaviorSubject(this.contextsInitial);
|
|
2297
2588
|
change$ = new ReplaySubject(1);
|
|
2298
2589
|
change$$;
|
|
2590
|
+
previousMessageId;
|
|
2591
|
+
isDesktop;
|
|
2299
2592
|
get contexts() {
|
|
2300
2593
|
return this._contexts;
|
|
2301
2594
|
}
|
|
@@ -2368,6 +2661,9 @@ class ContextListComponent {
|
|
|
2368
2661
|
!this.contexts.public?.length &&
|
|
2369
2662
|
!this.contexts.shared?.length);
|
|
2370
2663
|
}
|
|
2664
|
+
contexts$$;
|
|
2665
|
+
selectedContext$$;
|
|
2666
|
+
defaultContextId$$;
|
|
2371
2667
|
constructor() {
|
|
2372
2668
|
this.contextConfigs = this.configService.getConfig('context');
|
|
2373
2669
|
}
|
|
@@ -2397,6 +2693,59 @@ class ContextListComponent {
|
|
|
2397
2693
|
}
|
|
2398
2694
|
}
|
|
2399
2695
|
]);
|
|
2696
|
+
// Override input contexts
|
|
2697
|
+
this.contexts = { ours: [] };
|
|
2698
|
+
this.showHidden = this.storageService.get('contexts.showHidden');
|
|
2699
|
+
this.contexts$$ = this.contextService.contexts$.subscribe((contexts) => (this.contexts = contexts));
|
|
2700
|
+
this.defaultContextId$$ = this.contextService.defaultContextId$.subscribe((id) => {
|
|
2701
|
+
this.defaultContextId = id;
|
|
2702
|
+
});
|
|
2703
|
+
const storedContextUri = this.storageService.get('favorite.context.uri');
|
|
2704
|
+
if (storedContextUri && !this.auth.authenticated) {
|
|
2705
|
+
this.contextService.defaultContextId$.next(storedContextUri);
|
|
2706
|
+
}
|
|
2707
|
+
// See feature-list.component for an explanation about the debounce time
|
|
2708
|
+
this.selectedContext$$ = this.contextService.context$
|
|
2709
|
+
.pipe(debounceTime(100))
|
|
2710
|
+
.subscribe((context) => {
|
|
2711
|
+
this.setSelected(context);
|
|
2712
|
+
});
|
|
2713
|
+
this.auth.authenticate$.subscribe((authenticate) => {
|
|
2714
|
+
if (authenticate) {
|
|
2715
|
+
this.contextService.getProfilByUser().subscribe((profils) => {
|
|
2716
|
+
this.users = profils;
|
|
2717
|
+
this.permissions = [];
|
|
2718
|
+
const profilsAcc = this.users.reduce((acc, cur) => {
|
|
2719
|
+
acc = acc.concat(cur);
|
|
2720
|
+
acc = cur.childs ? acc.concat(cur.childs) : acc;
|
|
2721
|
+
return acc;
|
|
2722
|
+
}, []);
|
|
2723
|
+
for (const user of profilsAcc) {
|
|
2724
|
+
const permission = {
|
|
2725
|
+
name: user.name,
|
|
2726
|
+
checked: this.storageService.get('contexts.permissions.' + user.name)
|
|
2727
|
+
};
|
|
2728
|
+
if (permission.checked === null) {
|
|
2729
|
+
permission.checked = true;
|
|
2730
|
+
}
|
|
2731
|
+
this.permissions.push(permission);
|
|
2732
|
+
}
|
|
2733
|
+
const permissions = ['none'];
|
|
2734
|
+
for (const p of this.permissions) {
|
|
2735
|
+
if (p.checked === true || p.indeterminate === true) {
|
|
2736
|
+
permissions.push(p.name);
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
this.contextService.loadContexts(permissions, this.showHidden);
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2744
|
+
ngOnDestroy() {
|
|
2745
|
+
this.change$$.unsubscribe();
|
|
2746
|
+
this.contexts$$.unsubscribe();
|
|
2747
|
+
this.selectedContext$$.unsubscribe();
|
|
2748
|
+
this.defaultContextId$$.unsubscribe();
|
|
2400
2749
|
}
|
|
2401
2750
|
setSelected(context) {
|
|
2402
2751
|
this.selectedContext.set(context);
|
|
@@ -2460,9 +2809,6 @@ class ContextListComponent {
|
|
|
2460
2809
|
return updateContexts;
|
|
2461
2810
|
}
|
|
2462
2811
|
}
|
|
2463
|
-
ngOnDestroy() {
|
|
2464
|
-
this.change$$.unsubscribe();
|
|
2465
|
-
}
|
|
2466
2812
|
showFilter() {
|
|
2467
2813
|
switch (this.showContextFilter) {
|
|
2468
2814
|
case ContextListControlsEnum.always:
|
|
@@ -2540,7 +2886,7 @@ class ContextListComponent {
|
|
|
2540
2886
|
.pipe(take(1))
|
|
2541
2887
|
.subscribe((title) => {
|
|
2542
2888
|
if (title) {
|
|
2543
|
-
this.
|
|
2889
|
+
this.onCreate({ title, empty });
|
|
2544
2890
|
}
|
|
2545
2891
|
});
|
|
2546
2892
|
}
|
|
@@ -2583,76 +2929,50 @@ class ContextListComponent {
|
|
|
2583
2929
|
}
|
|
2584
2930
|
}
|
|
2585
2931
|
}
|
|
2586
|
-
this.
|
|
2587
|
-
}
|
|
2588
|
-
hideContext(context) {
|
|
2589
|
-
context.hidden = true;
|
|
2590
|
-
if (!this.showHidden) {
|
|
2591
|
-
const contexts = { ours: [], shared: [], public: [] };
|
|
2592
|
-
contexts.ours = this.contexts.ours.filter((c) => c.id !== context.id);
|
|
2593
|
-
contexts.shared = this.contexts.shared?.filter((c) => c.id !== context.id);
|
|
2594
|
-
contexts.public = this.contexts.public?.filter((c) => c.id !== context.id);
|
|
2595
|
-
this.contexts = contexts;
|
|
2596
|
-
}
|
|
2597
|
-
this.hide.emit(context);
|
|
2932
|
+
this.onFilterPermissionsChanged();
|
|
2598
2933
|
}
|
|
2599
2934
|
showContext(context) {
|
|
2600
2935
|
context.hidden = false;
|
|
2936
|
+
this.contextService.showContext(context.id).subscribe();
|
|
2601
2937
|
this.show.emit(context);
|
|
2602
2938
|
}
|
|
2603
2939
|
onSelect(context) {
|
|
2940
|
+
this.contextService.loadContext(context.uri);
|
|
2604
2941
|
this.select.emit(context);
|
|
2605
2942
|
}
|
|
2606
|
-
|
|
2607
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field floatLabel=\"always\">\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n class=\"sort-alpha\"\n [class.--active]=\"sortedAlpha\"\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.sortAlphabetically' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <mat-icon color=\"primary\">sort_by_alpha</mat-icon>\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n }\n\n @if (auth.authenticated && contextConfigs) {\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) {\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) {\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)=\"showHiddenContexts.emit($event.checked)\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length && auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (context of $any(groupContexts).value; track context) {\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 (edit)=\"edit.emit(context)\"\n (delete)=\"delete.emit(context)\"\n (clone)=\"clone.emit(context)\"\n (save)=\"save.emit(context)\"\n (hide)=\"hideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"favorite.emit(context)\"\n (manageTools)=\"manageTools.emit(context)\"\n (managePermissions)=\"managePermissions.emit(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n </igo-collapsible>\n }\n @if ($any(groupContexts).value.length && !auth.authenticated; as context) {\n @for (context of $any(groupContexts).value; track context) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"\n configService.getConfig('favoriteContext4NonAuthenticated')\n \"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n (favorite)=\"favorite.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.sort-alpha.--active mat-icon{color:red}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$2.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: i7.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: i7.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i7.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"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
}] } });
|
|
2636
|
-
|
|
2637
|
-
class ContextListBindingDirective {
|
|
2638
|
-
contextService = inject(ContextService);
|
|
2639
|
-
mapService = inject(MapService);
|
|
2640
|
-
languageService = inject(LanguageService);
|
|
2641
|
-
confirmDialogService = inject(ConfirmDialogService);
|
|
2642
|
-
messageService = inject(MessageService);
|
|
2643
|
-
auth = inject(AuthService);
|
|
2644
|
-
storageService = inject(StorageService);
|
|
2645
|
-
cdRef = inject(ChangeDetectorRef);
|
|
2646
|
-
component;
|
|
2647
|
-
contexts$$;
|
|
2648
|
-
selectedContext$$;
|
|
2649
|
-
defaultContextId$$;
|
|
2650
|
-
previousMessageId;
|
|
2651
|
-
onSelect(context) {
|
|
2652
|
-
this.contextService.loadContext(context.uri);
|
|
2943
|
+
isContextSelected(context) {
|
|
2944
|
+
const selectedContext = this.selectedContext();
|
|
2945
|
+
if (!selectedContext)
|
|
2946
|
+
return false;
|
|
2947
|
+
return context?.id
|
|
2948
|
+
? selectedContext.id === context.id
|
|
2949
|
+
: selectedContext.uri === context.uri;
|
|
2950
|
+
}
|
|
2951
|
+
onShareContext(context) {
|
|
2952
|
+
const currentContext = this.contextService.context$.value;
|
|
2953
|
+
const { toolKey, sidenavKey, languageKey } = this.shareMapService.routeService.options;
|
|
2954
|
+
const { context: contextKey } = this.shareMapService.options;
|
|
2955
|
+
const baseOrigin = this.shareMapService.encoder.sanitizeBaseUrl(this.shareMapService.document.location.href);
|
|
2956
|
+
const url = context.uri === currentContext.uri
|
|
2957
|
+
? this.shareMapService.encoder.generateUrl(this.map(), this.contextService.context$.value)
|
|
2958
|
+
: `${baseOrigin}${contextKey}=${context.uri}`;
|
|
2959
|
+
const params = [];
|
|
2960
|
+
const currentLanguage = this.shareMapService.encoder.language;
|
|
2961
|
+
if (currentLanguage && !url.includes(`${languageKey}=`))
|
|
2962
|
+
params.push(`${languageKey}=${currentLanguage}`);
|
|
2963
|
+
if (!url.includes(`${toolKey}=`))
|
|
2964
|
+
params.push(`${toolKey}=${'mapTools'}`);
|
|
2965
|
+
if (!url.includes(`${sidenavKey}=`))
|
|
2966
|
+
params.push(`${sidenavKey}=1`);
|
|
2967
|
+
const fullUrl = params.length ? `${url}&${params.join('&')}` : url;
|
|
2968
|
+
const successful = this.clipboard.copy(fullUrl);
|
|
2969
|
+
if (!successful)
|
|
2970
|
+
return;
|
|
2971
|
+
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
2653
2972
|
}
|
|
2654
2973
|
onEdit(context) {
|
|
2655
2974
|
this.contextService.loadEditedContext(context.uri);
|
|
2975
|
+
this.edit.emit(context);
|
|
2656
2976
|
}
|
|
2657
2977
|
onSave(context) {
|
|
2658
2978
|
const map = this.mapService.getMap();
|
|
@@ -2677,31 +2997,53 @@ class ContextListBindingDirective {
|
|
|
2677
2997
|
view: contextFromMap.map.view
|
|
2678
2998
|
}
|
|
2679
2999
|
};
|
|
2680
|
-
this.contextService
|
|
3000
|
+
this.contextService
|
|
3001
|
+
.update(context.id, changes)
|
|
3002
|
+
.pipe(tap((changes) => {
|
|
3003
|
+
this.handleContextChanges(changes);
|
|
2681
3004
|
msgSuccess();
|
|
3005
|
+
}), switchMap(() => this.contextService.getDetails(context.id)), tap((fullContext) => {
|
|
3006
|
+
this.contextService.context$.value.layers = fullContext.layers;
|
|
3007
|
+
}), take(1))
|
|
3008
|
+
.subscribe();
|
|
3009
|
+
this.save.emit(context);
|
|
3010
|
+
}
|
|
3011
|
+
handleContextChanges(changes) {
|
|
3012
|
+
const map = this.mapService.getMap();
|
|
3013
|
+
changes.layers.created.forEach((layerCreated) => {
|
|
3014
|
+
const layer = isLayerItemOptions(layerCreated)
|
|
3015
|
+
? map.layerController.getBySourceId(layerCreated.sourceOptions.id)
|
|
3016
|
+
: map.layerController.getByTitle(layerCreated.title);
|
|
3017
|
+
if (layer) {
|
|
3018
|
+
layer.id = layerCreated.id;
|
|
3019
|
+
}
|
|
2682
3020
|
});
|
|
2683
3021
|
}
|
|
2684
3022
|
onFavorite(context) {
|
|
2685
3023
|
if (!context.id) {
|
|
2686
3024
|
context.id = context.uri;
|
|
2687
3025
|
}
|
|
2688
|
-
this.contextService.setDefault(context.id).subscribe(() => {
|
|
3026
|
+
this.contextService.setDefault(context.id).subscribe((defaultId) => {
|
|
2689
3027
|
if (this.previousMessageId) {
|
|
2690
3028
|
this.messageService.remove(this.previousMessageId);
|
|
2691
3029
|
}
|
|
2692
|
-
this.contextService.defaultContextId$.next(
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
3030
|
+
this.contextService.defaultContextId$.next(defaultId);
|
|
3031
|
+
if (defaultId) {
|
|
3032
|
+
const messageObj = this.messageService.success('igo.context.contextManager.dialog.favoriteMsg', 'igo.context.contextManager.dialog.favoriteTitle', undefined, {
|
|
3033
|
+
value: context.title
|
|
3034
|
+
});
|
|
3035
|
+
this.previousMessageId = messageObj.toastId;
|
|
3036
|
+
}
|
|
3037
|
+
this.favorite.emit(context);
|
|
2698
3038
|
});
|
|
2699
3039
|
}
|
|
2700
3040
|
onManageTools(context) {
|
|
2701
3041
|
this.contextService.loadEditedContext(context.uri);
|
|
3042
|
+
this.manageTools.emit(context);
|
|
2702
3043
|
}
|
|
2703
3044
|
onManagePermissions(context) {
|
|
2704
3045
|
this.contextService.loadEditedContext(context.uri);
|
|
3046
|
+
this.managePermissions.emit(context);
|
|
2705
3047
|
}
|
|
2706
3048
|
onDelete(context) {
|
|
2707
3049
|
const translate = this.languageService.translate;
|
|
@@ -2714,6 +3056,7 @@ class ContextListBindingDirective {
|
|
|
2714
3056
|
.subscribe(() => {
|
|
2715
3057
|
this.messageService.info('igo.context.contextManager.dialog.deleteMsg', 'igo.context.contextManager.dialog.deleteTitle', undefined, { value: context.title });
|
|
2716
3058
|
});
|
|
3059
|
+
this.delete.emit(context);
|
|
2717
3060
|
}
|
|
2718
3061
|
});
|
|
2719
3062
|
}
|
|
@@ -2725,147 +3068,77 @@ class ContextListBindingDirective {
|
|
|
2725
3068
|
this.contextService.clone(context.id, properties).subscribe(() => {
|
|
2726
3069
|
this.messageService.success('igo.context.contextManager.dialog.cloneMsg', 'igo.context.contextManager.dialog.cloneTitle', undefined, { value: context.title });
|
|
2727
3070
|
});
|
|
3071
|
+
this.clone.emit(context);
|
|
2728
3072
|
}
|
|
2729
3073
|
onCreate(opts) {
|
|
2730
3074
|
const { title, empty } = opts;
|
|
2731
|
-
const context = this.contextService.getContextFromMap(this.
|
|
3075
|
+
const context = this.contextService.getContextFromMap(this.map(), empty);
|
|
2732
3076
|
context.title = title;
|
|
2733
3077
|
this.contextService.create(context).subscribe(() => {
|
|
2734
3078
|
this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
|
|
2735
3079
|
this.contextService.loadContext(context.uri);
|
|
2736
3080
|
});
|
|
3081
|
+
this.create.emit(opts);
|
|
2737
3082
|
}
|
|
2738
|
-
|
|
3083
|
+
onFilterPermissionsChanged() {
|
|
2739
3084
|
const permissions = ['none'];
|
|
2740
|
-
for (const p of this.
|
|
3085
|
+
for (const p of this.permissions) {
|
|
2741
3086
|
if (p.checked === true || p.indeterminate === true) {
|
|
2742
3087
|
permissions.push(p.name);
|
|
2743
3088
|
}
|
|
2744
3089
|
}
|
|
2745
|
-
this.contextService.loadContexts(permissions, this.
|
|
3090
|
+
this.contextService.loadContexts(permissions, this.showHidden);
|
|
3091
|
+
this.filterPermissionsChanged.emit(this.permissions);
|
|
2746
3092
|
}
|
|
2747
|
-
|
|
2748
|
-
this.
|
|
2749
|
-
this.storageService.set('contexts.showHidden', this.
|
|
2750
|
-
this.
|
|
2751
|
-
|
|
2752
|
-
onShowContext(context) {
|
|
2753
|
-
this.contextService.showContext(context.id).subscribe();
|
|
3093
|
+
onShowHiddenContexts() {
|
|
3094
|
+
this.showHidden = !this.showHidden;
|
|
3095
|
+
this.storageService.set('contexts.showHidden', this.showHidden);
|
|
3096
|
+
this.onFilterPermissionsChanged();
|
|
3097
|
+
this.showHiddenContexts.emit(this.showHidden);
|
|
2754
3098
|
}
|
|
2755
3099
|
onHideContext(context) {
|
|
2756
3100
|
this.contextService.hideContext(context.id).subscribe();
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
this.component.contexts = { ours: [] };
|
|
2765
|
-
this.component.showHidden = this.storageService.get('contexts.showHidden');
|
|
2766
|
-
this.contexts$$ = this.contextService.contexts$.subscribe((contexts) => this.handleContextsChange(contexts));
|
|
2767
|
-
this.defaultContextId$$ = this.contextService.defaultContextId$.subscribe((id) => {
|
|
2768
|
-
this.component.defaultContextId = id;
|
|
2769
|
-
});
|
|
2770
|
-
const storedContextUri = this.storageService.get('favorite.context.uri');
|
|
2771
|
-
if (storedContextUri && !this.auth.authenticated) {
|
|
2772
|
-
this.contextService.defaultContextId$.next(storedContextUri);
|
|
3101
|
+
context.hidden = true;
|
|
3102
|
+
if (!this.showHidden) {
|
|
3103
|
+
const contexts = { ours: [], shared: [], public: [] };
|
|
3104
|
+
contexts.ours = this.contexts.ours.filter((c) => c.id !== context.id);
|
|
3105
|
+
contexts.shared = this.contexts.shared?.filter((c) => c.id !== context.id);
|
|
3106
|
+
contexts.public = this.contexts.public?.filter((c) => c.id !== context.id);
|
|
3107
|
+
this.contexts = contexts;
|
|
2773
3108
|
}
|
|
2774
|
-
|
|
2775
|
-
this.selectedContext$$ = this.contextService.context$
|
|
2776
|
-
.pipe(debounceTime(100))
|
|
2777
|
-
.subscribe((context) => {
|
|
2778
|
-
this.component.setSelected(context);
|
|
2779
|
-
this.cdRef.markForCheck();
|
|
2780
|
-
});
|
|
2781
|
-
this.auth.authenticate$.subscribe((authenticate) => {
|
|
2782
|
-
if (authenticate) {
|
|
2783
|
-
this.contextService.getProfilByUser().subscribe((profils) => {
|
|
2784
|
-
this.component.users = profils;
|
|
2785
|
-
this.component.permissions = [];
|
|
2786
|
-
const profilsAcc = this.component.users.reduce((acc, cur) => {
|
|
2787
|
-
acc = acc.concat(cur);
|
|
2788
|
-
acc = cur.childs ? acc.concat(cur.childs) : acc;
|
|
2789
|
-
return acc;
|
|
2790
|
-
}, []);
|
|
2791
|
-
for (const user of profilsAcc) {
|
|
2792
|
-
const permission = {
|
|
2793
|
-
name: user.name,
|
|
2794
|
-
checked: this.storageService.get('contexts.permissions.' + user.name)
|
|
2795
|
-
};
|
|
2796
|
-
if (permission.checked === null) {
|
|
2797
|
-
permission.checked = true;
|
|
2798
|
-
}
|
|
2799
|
-
this.component.permissions.push(permission);
|
|
2800
|
-
}
|
|
2801
|
-
const permissions = ['none'];
|
|
2802
|
-
for (const p of this.component.permissions) {
|
|
2803
|
-
if (p.checked === true || p.indeterminate === true) {
|
|
2804
|
-
permissions.push(p.name);
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
this.contextService.loadContexts(permissions, this.component.showHidden);
|
|
2808
|
-
});
|
|
2809
|
-
}
|
|
2810
|
-
});
|
|
2811
|
-
}
|
|
2812
|
-
ngOnDestroy() {
|
|
2813
|
-
this.contexts$$.unsubscribe();
|
|
2814
|
-
this.selectedContext$$.unsubscribe();
|
|
2815
|
-
this.defaultContextId$$.unsubscribe();
|
|
2816
|
-
}
|
|
2817
|
-
handleContextsChange(contexts) {
|
|
2818
|
-
this.component.contexts = contexts;
|
|
3109
|
+
this.hide.emit(context);
|
|
2819
3110
|
}
|
|
2820
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2821
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: ContextListBindingDirective, isStandalone: true, selector: "[igoContextListBinding]", host: { listeners: { "select": "onSelect($event)", "edit": "onEdit($event)", "save": "onSave($event)", "favorite": "onFavorite($event)", "manageTools": "onManageTools($event)", "managePermissions": "onManagePermissions($event)", "delete": "onDelete($event)", "clone": "onClone($event)", "create": "onCreate($event)", "filterPermissionsChanged": "loadContexts()", "showHiddenContexts": "showHiddenContexts()", "show": "onShowContext($event)", "hide": "onHideContext($event)" } }, providers: [ConfirmDialogService], ngImport: i0 });
|
|
3111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: false, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field floatLabel=\"always\">\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n class=\"sort-alpha\"\n [class.--active]=\"sortedAlpha\"\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.sortAlphabetically' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <mat-icon color=\"primary\">sort_by_alpha</mat-icon>\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length && auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n }\n @if ($any(groupContexts).value.length && !auth.authenticated; as context) {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.sort-alpha.--active mat-icon{color:red}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2822
3113
|
}
|
|
2823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2824
|
-
type:
|
|
2825
|
-
args: [{
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
}], onManageTools: [{
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
}],
|
|
2846
|
-
type:
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
}], onClone: [{
|
|
2852
|
-
type: HostListener,
|
|
2853
|
-
args: ['clone', ['$event']]
|
|
2854
|
-
}], onCreate: [{
|
|
2855
|
-
type: HostListener,
|
|
2856
|
-
args: ['create', ['$event']]
|
|
2857
|
-
}], loadContexts: [{
|
|
2858
|
-
type: HostListener,
|
|
2859
|
-
args: ['filterPermissionsChanged']
|
|
2860
|
-
}], showHiddenContexts: [{
|
|
2861
|
-
type: HostListener,
|
|
2862
|
-
args: ['showHiddenContexts']
|
|
2863
|
-
}], onShowContext: [{
|
|
2864
|
-
type: HostListener,
|
|
2865
|
-
args: ['show', ['$event']]
|
|
2866
|
-
}], onHideContext: [{
|
|
2867
|
-
type: HostListener,
|
|
2868
|
-
args: ['hide', ['$event']]
|
|
3114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextListComponent, decorators: [{
|
|
3115
|
+
type: Component,
|
|
3116
|
+
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
3117
|
+
ListComponent,
|
|
3118
|
+
MatFormFieldModule,
|
|
3119
|
+
MatInputModule,
|
|
3120
|
+
FormsModule,
|
|
3121
|
+
MatButtonModule,
|
|
3122
|
+
MatIconModule,
|
|
3123
|
+
MatTooltipModule,
|
|
3124
|
+
ActionbarComponent,
|
|
3125
|
+
MatMenuModule,
|
|
3126
|
+
MatCheckboxModule,
|
|
3127
|
+
CollapsibleComponent,
|
|
3128
|
+
ContextItemComponent,
|
|
3129
|
+
ListItemDirective,
|
|
3130
|
+
AsyncPipe,
|
|
3131
|
+
KeyValuePipe,
|
|
3132
|
+
IgoLanguageModule
|
|
3133
|
+
], template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field floatLabel=\"always\">\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n class=\"sort-alpha\"\n [class.--active]=\"sortedAlpha\"\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.sortAlphabetically' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <mat-icon color=\"primary\">sort_by_alpha</mat-icon>\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length && auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n }\n @if ($any(groupContexts).value.length && !auth.authenticated; as context) {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.sort-alpha.--active mat-icon{color:red}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"] }]
|
|
3134
|
+
}], ctorParameters: () => [], propDecorators: { isDesktop: [{
|
|
3135
|
+
type: Input
|
|
3136
|
+
}], contexts: [{
|
|
3137
|
+
type: Input
|
|
3138
|
+
}], 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: [{
|
|
3139
|
+
type: Input
|
|
3140
|
+
}], select: [{ type: i0.Output, args: ["select"] }], unselect: [{ type: i0.Output, args: ["unselect"] }], edit: [{ type: i0.Output, args: ["edit"] }], delete: [{ type: i0.Output, args: ["delete"] }], save: [{ type: i0.Output, args: ["save"] }], clone: [{ type: i0.Output, args: ["clone"] }], create: [{ type: i0.Output, args: ["create"] }], hide: [{ type: i0.Output, args: ["hide"] }], show: [{ type: i0.Output, args: ["show"] }], showHiddenContexts: [{ type: i0.Output, args: ["showHiddenContexts"] }], favorite: [{ type: i0.Output, args: ["favorite"] }], managePermissions: [{ type: i0.Output, args: ["managePermissions"] }], manageTools: [{ type: i0.Output, args: ["manageTools"] }], filterPermissionsChanged: [{ type: i0.Output, args: ["filterPermissionsChanged"] }], term: [{
|
|
3141
|
+
type: Input
|
|
2869
3142
|
}] } });
|
|
2870
3143
|
|
|
2871
3144
|
class ContextPermissionsComponent {
|
|
@@ -2913,386 +3186,154 @@ class ContextPermissionsComponent {
|
|
|
2913
3186
|
.normalize('NFD')
|
|
2914
3187
|
.replace(/[\u0300-\u036f]/g, '');
|
|
2915
3188
|
const profilNameNormalized = profil.name
|
|
2916
|
-
.toLowerCase()
|
|
2917
|
-
.normalize('NFD')
|
|
2918
|
-
.replace(/[\u0300-\u036f]/g, '');
|
|
2919
|
-
const profilNormalized = profilNameNormalized + profilTitleNormalized;
|
|
2920
|
-
return profilNormalized.includes(filterNormalized);
|
|
2921
|
-
});
|
|
2922
|
-
}
|
|
2923
|
-
else {
|
|
2924
|
-
this.profils = [];
|
|
2925
|
-
}
|
|
2926
|
-
});
|
|
2927
|
-
}
|
|
2928
|
-
displayFn(profil) {
|
|
2929
|
-
return profil ? profil.title : undefined;
|
|
2930
|
-
}
|
|
2931
|
-
handleFormSubmit(value) {
|
|
2932
|
-
this.addPermission.emit(value);
|
|
2933
|
-
}
|
|
2934
|
-
buildForm() {
|
|
2935
|
-
this.form = this.formBuilder.group({
|
|
2936
|
-
profil: [],
|
|
2937
|
-
typePermission: ['read']
|
|
2938
|
-
});
|
|
2939
|
-
}
|
|
2940
|
-
onProfilSelected(value) {
|
|
2941
|
-
this.form.setValue({
|
|
2942
|
-
profil: value.name,
|
|
2943
|
-
typePermission: this.form.value.typePermission
|
|
2944
|
-
});
|
|
2945
|
-
}
|
|
2946
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2947
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", permissions: "permissionsChange", addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
2948
|
-
}
|
|
2949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
2950
|
-
type: Component,
|
|
2951
|
-
args: [{ selector: 'igo-context-permissions', imports: [
|
|
2952
|
-
MatRadioModule,
|
|
2953
|
-
FormsModule,
|
|
2954
|
-
ReactiveFormsModule,
|
|
2955
|
-
MatFormFieldModule,
|
|
2956
|
-
MatInputModule,
|
|
2957
|
-
MatAutocompleteModule,
|
|
2958
|
-
MatOptionModule,
|
|
2959
|
-
MatButtonModule,
|
|
2960
|
-
ListComponent,
|
|
2961
|
-
CollapsibleComponent,
|
|
2962
|
-
MatListModule,
|
|
2963
|
-
MatIconModule,
|
|
2964
|
-
StopPropagationDirective,
|
|
2965
|
-
MatTooltipModule,
|
|
2966
|
-
KeyValuePipe,
|
|
2967
|
-
IgoLanguageModule
|
|
2968
|
-
], template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
|
|
2969
|
-
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: false }] }, { type: i0.Output, args: ["permissionsChange"] }], addPermission: [{ type: i0.Output, args: ["addPermission"] }], removePermission: [{ type: i0.Output, args: ["removePermission"] }], scopeChanged: [{ type: i0.Output, args: ["scopeChanged"] }] } });
|
|
2970
|
-
|
|
2971
|
-
class ContextPermissionsBindingDirective {
|
|
2972
|
-
contextService = inject(ContextService);
|
|
2973
|
-
languageService = inject(LanguageService);
|
|
2974
|
-
messageService = inject(MessageService);
|
|
2975
|
-
cd = inject(ChangeDetectorRef);
|
|
2976
|
-
component;
|
|
2977
|
-
editedContext$$;
|
|
2978
|
-
onAddPermission(permission) {
|
|
2979
|
-
if (!permission.profil) {
|
|
2980
|
-
this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
2981
|
-
return;
|
|
2982
|
-
}
|
|
2983
|
-
const contextId = this.component.context().id;
|
|
2984
|
-
this.contextService
|
|
2985
|
-
.addPermissionAssociation(contextId, permission.profil, permission.typePermission)
|
|
2986
|
-
.subscribe((profils) => {
|
|
2987
|
-
for (const p of profils) {
|
|
2988
|
-
this.component.permissions[permission.typePermission].push(p);
|
|
2989
|
-
}
|
|
2990
|
-
const profil = permission.profil;
|
|
2991
|
-
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
|
|
2992
|
-
this.cd.detectChanges();
|
|
2993
|
-
});
|
|
2994
|
-
}
|
|
2995
|
-
onRemovePermission(permission) {
|
|
2996
|
-
const contextId = this.component.context().id;
|
|
2997
|
-
this.contextService
|
|
2998
|
-
.deletePermissionAssociation(contextId, permission.id)
|
|
2999
|
-
.subscribe(() => {
|
|
3000
|
-
const index = this.component.permissions[permission.typePermission].findIndex((p) => {
|
|
3001
|
-
return p.id === permission.id;
|
|
3002
|
-
});
|
|
3003
|
-
this.component.permissions[permission.typePermission].splice(index, 1);
|
|
3004
|
-
const profil = permission.profil;
|
|
3005
|
-
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
|
|
3006
|
-
this.cd.detectChanges();
|
|
3007
|
-
});
|
|
3008
|
-
}
|
|
3009
|
-
onScopeChanged(context) {
|
|
3010
|
-
const scope = context.scope;
|
|
3011
|
-
this.contextService.update(context.id, { scope }).subscribe(() => {
|
|
3012
|
-
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3013
|
-
});
|
|
3014
|
-
}
|
|
3015
|
-
constructor() {
|
|
3016
|
-
const component = inject(ContextPermissionsComponent, { self: true });
|
|
3017
|
-
this.component = component;
|
|
3018
|
-
}
|
|
3019
|
-
ngOnInit() {
|
|
3020
|
-
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
3021
|
-
}
|
|
3022
|
-
ngOnDestroy() {
|
|
3023
|
-
this.editedContext$$.unsubscribe();
|
|
3024
|
-
this.contextService.editedContext$.next(undefined);
|
|
3025
|
-
}
|
|
3026
|
-
handleEditedContextChange(context) {
|
|
3027
|
-
this.component.context.set(context);
|
|
3028
|
-
if (context) {
|
|
3029
|
-
this.contextService
|
|
3030
|
-
.getPermissions(context.id)
|
|
3031
|
-
.subscribe((permissionsArray) => {
|
|
3032
|
-
permissionsArray = permissionsArray || [];
|
|
3033
|
-
const permissions = {
|
|
3034
|
-
read: permissionsArray.filter((p) => {
|
|
3035
|
-
return p.typePermission.toString() === 'read';
|
|
3036
|
-
}),
|
|
3037
|
-
write: permissionsArray.filter((p) => {
|
|
3038
|
-
return p.typePermission.toString() === 'write';
|
|
3039
|
-
})
|
|
3040
|
-
};
|
|
3041
|
-
return this.component.permissions.set(permissions);
|
|
3042
|
-
});
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3046
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: ContextPermissionsBindingDirective, isStandalone: true, selector: "[igoContextPermissionsBinding]", host: { listeners: { "addPermission": "onAddPermission($event)", "removePermission": "onRemovePermission($event)", "scopeChanged": "onScopeChanged($event)" } }, ngImport: i0 });
|
|
3047
|
-
}
|
|
3048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
|
|
3049
|
-
type: Directive,
|
|
3050
|
-
args: [{
|
|
3051
|
-
selector: '[igoContextPermissionsBinding]',
|
|
3052
|
-
standalone: true
|
|
3053
|
-
}]
|
|
3054
|
-
}], ctorParameters: () => [], propDecorators: { onAddPermission: [{
|
|
3055
|
-
type: HostListener,
|
|
3056
|
-
args: ['addPermission', ['$event']]
|
|
3057
|
-
}], onRemovePermission: [{
|
|
3058
|
-
type: HostListener,
|
|
3059
|
-
args: ['removePermission', ['$event']]
|
|
3060
|
-
}], onScopeChanged: [{
|
|
3061
|
-
type: HostListener,
|
|
3062
|
-
args: ['scopeChanged', ['$event']]
|
|
3063
|
-
}] } });
|
|
3064
|
-
|
|
3065
|
-
class LayerContextDirective {
|
|
3066
|
-
component = inject(MapBrowserComponent);
|
|
3067
|
-
contextService = inject(ContextService);
|
|
3068
|
-
layerService = inject(LayerService);
|
|
3069
|
-
configService = inject(ConfigService);
|
|
3070
|
-
styleListService = inject(StyleListService);
|
|
3071
|
-
styleService = inject(StyleService);
|
|
3072
|
-
shareMapService = inject(ShareMapService);
|
|
3073
|
-
context$$;
|
|
3074
|
-
queryParams;
|
|
3075
|
-
contextLayers = [];
|
|
3076
|
-
removeLayersOnContextChange = input(true, ...(ngDevMode ? [{ debugName: "removeLayersOnContextChange" }] : []));
|
|
3077
|
-
contextLayersLoaded = output();
|
|
3078
|
-
get map() {
|
|
3079
|
-
return this.component.map();
|
|
3080
|
-
}
|
|
3081
|
-
ngOnInit() {
|
|
3082
|
-
this.context$$ = this.shareMapService.routeService.queryParams
|
|
3083
|
-
.pipe(switchMap((params) => {
|
|
3084
|
-
this.queryParams = params ?? {};
|
|
3085
|
-
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
3086
|
-
}))
|
|
3087
|
-
.subscribe((context) => this.handleContextChange(context));
|
|
3088
|
-
}
|
|
3089
|
-
ngOnDestroy() {
|
|
3090
|
-
this.context$$.unsubscribe();
|
|
3091
|
-
}
|
|
3092
|
-
handleContextChange(context) {
|
|
3093
|
-
if (context.layers === undefined) {
|
|
3094
|
-
return;
|
|
3095
|
-
}
|
|
3096
|
-
/**
|
|
3097
|
-
* Assign an id to each layer group if it doesn't have one.
|
|
3098
|
-
* This is needed to be able to detect layer groups in the context that doesn't have and id and be able to ignore them in the share
|
|
3099
|
-
*/
|
|
3100
|
-
if (context.layers?.length) {
|
|
3101
|
-
addIdToGroups(context.layers);
|
|
3102
|
-
}
|
|
3103
|
-
const contextLayers = this.handleContextWithSharedUrl(ObjectUtils.copyDeep(context));
|
|
3104
|
-
if (this.removeLayersOnContextChange() === true) {
|
|
3105
|
-
this.map.layerController.reset();
|
|
3106
|
-
}
|
|
3107
|
-
else {
|
|
3108
|
-
this.map.layerController.remove(...this.contextLayers);
|
|
3109
|
-
}
|
|
3110
|
-
this.contextLayers = [];
|
|
3111
|
-
this.layerService.unavailableLayers = [];
|
|
3112
|
-
const importExportOptions = this.configService.getConfig('importExport');
|
|
3113
|
-
this.layerService
|
|
3114
|
-
.createLayers(contextLayers, context.uri)
|
|
3115
|
-
.subscribe((layers) => {
|
|
3116
|
-
this.handleAddLayers(layers);
|
|
3117
|
-
if (context.extraFeatures) {
|
|
3118
|
-
context.extraFeatures.forEach((featureCollection) => {
|
|
3119
|
-
if (!importExportOptions?.importWithStyle) {
|
|
3120
|
-
addImportedFeaturesToMap(featureCollection, this.map);
|
|
3121
|
-
}
|
|
3122
|
-
else {
|
|
3123
|
-
addImportedFeaturesStyledToMap(featureCollection, this.map, this.styleListService, this.styleService);
|
|
3124
|
-
}
|
|
3125
|
-
});
|
|
3126
|
-
}
|
|
3127
|
-
this.contextLayersLoaded.emit(true);
|
|
3128
|
-
});
|
|
3129
|
-
if (this.configService.getConfig('importExport.allowToStoreLayer', false)) {
|
|
3130
|
-
this.layerService
|
|
3131
|
-
.createAsyncIdbLayers(context.uri)
|
|
3132
|
-
.pipe(debounceTime(500))
|
|
3133
|
-
.subscribe((layers) => this.handleAddLayers(layers));
|
|
3134
|
-
}
|
|
3135
|
-
}
|
|
3136
|
-
handleAddLayers(layers) {
|
|
3137
|
-
const layersFiltrered = layers
|
|
3138
|
-
.filter((layer) => layer)
|
|
3139
|
-
.map((layer) => {
|
|
3140
|
-
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
3141
|
-
return layer;
|
|
3142
|
-
});
|
|
3143
|
-
const layersSorted = sortLayersByZindex(layersFiltrered, 'asc');
|
|
3144
|
-
this.contextLayers.concat(layersSorted);
|
|
3145
|
-
this.map.layerController.add(...layersSorted);
|
|
3146
|
-
}
|
|
3147
|
-
computeLayerVisibilityFromUrl(layer) {
|
|
3148
|
-
const params = this.queryParams;
|
|
3149
|
-
const currentContext = this.contextService.context$.value.uri;
|
|
3150
|
-
const currentLayerid = layer.id;
|
|
3151
|
-
let visible = layer.visible;
|
|
3152
|
-
if (!params || !currentLayerid) {
|
|
3153
|
-
return visible;
|
|
3154
|
-
}
|
|
3155
|
-
const contextParams = this.shareMapService.getContext(params);
|
|
3156
|
-
if (contextParams === currentContext || !contextParams) {
|
|
3157
|
-
let visibleOnLayersParams = '';
|
|
3158
|
-
let visibleOffLayersParams = '';
|
|
3159
|
-
let visiblelayers = [];
|
|
3160
|
-
let invisiblelayers = [];
|
|
3161
|
-
const visibleOnLayers = params[this.shareMapService.routeService.options.visibleOnLayersKey];
|
|
3162
|
-
const visibleOffLayers = params[this.shareMapService.routeService.options.visibleOffLayersKey];
|
|
3163
|
-
if (visibleOnLayers) {
|
|
3164
|
-
visibleOnLayersParams = visibleOnLayers;
|
|
3165
|
-
}
|
|
3166
|
-
if (visibleOffLayers) {
|
|
3167
|
-
visibleOffLayersParams = visibleOffLayers;
|
|
3168
|
-
}
|
|
3169
|
-
/* This order is important because to control whichever
|
|
3170
|
-
the order of * param. First whe open and close everything.*/
|
|
3171
|
-
if (visibleOnLayersParams === '*') {
|
|
3172
|
-
visible = true;
|
|
3173
|
-
}
|
|
3174
|
-
if (visibleOffLayersParams === '*') {
|
|
3175
|
-
visible = false;
|
|
3176
|
-
}
|
|
3177
|
-
// After, managing named layer by id (context.json OR id from datasource)
|
|
3178
|
-
visiblelayers = visibleOnLayersParams.split(',');
|
|
3179
|
-
invisiblelayers = visibleOffLayersParams.split(',');
|
|
3180
|
-
if (visiblelayers.indexOf(currentLayerid) > -1 ||
|
|
3181
|
-
visiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
3182
|
-
visible = true;
|
|
3183
|
-
}
|
|
3184
|
-
if (invisiblelayers.indexOf(currentLayerid) > -1 ||
|
|
3185
|
-
invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
3186
|
-
visible = false;
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
return visible;
|
|
3190
|
-
}
|
|
3191
|
-
handleContextWithSharedUrl(context) {
|
|
3192
|
-
if (!this.queryParams ||
|
|
3193
|
-
(!hasLegacyParams(this.queryParams, this.shareMapService.optionsLegacy) &&
|
|
3194
|
-
!hasModernShareParams(this.queryParams, this.shareMapService.keysDefinitions))) {
|
|
3195
|
-
return context.layers;
|
|
3196
|
-
}
|
|
3197
|
-
const { layers, uri } = context;
|
|
3198
|
-
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
3199
|
-
if (!contextValue || contextValue === uri) {
|
|
3200
|
-
const layersOptions = this.shareMapService.parser.parseLayers(this.queryParams);
|
|
3201
|
-
if (layersOptions.length) {
|
|
3202
|
-
return mergeLayersOptions([...layers], layersOptions);
|
|
3203
|
-
}
|
|
3204
|
-
}
|
|
3205
|
-
return layers;
|
|
3206
|
-
}
|
|
3207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3208
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.6", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: { classPropertyName: "removeLayersOnContextChange", publicName: "removeLayersOnContextChange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
3209
|
-
}
|
|
3210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
3211
|
-
type: Directive,
|
|
3212
|
-
args: [{
|
|
3213
|
-
selector: '[igoLayerContext]'
|
|
3214
|
-
}]
|
|
3215
|
-
}], propDecorators: { removeLayersOnContextChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLayersOnContextChange", required: false }] }], contextLayersLoaded: [{ type: i0.Output, args: ["contextLayersLoaded"] }] } });
|
|
3216
|
-
/** Recursive */
|
|
3217
|
-
function addIdToGroups(layerOptions) {
|
|
3218
|
-
for (const options of layerOptions) {
|
|
3219
|
-
if (isLayerGroupOptions(options) && !options.id) {
|
|
3220
|
-
options.id = ID_GROUP_PREFIX + uuid();
|
|
3221
|
-
if (Array.isArray(options.children)) {
|
|
3222
|
-
addIdToGroups(options.children);
|
|
3189
|
+
.toLowerCase()
|
|
3190
|
+
.normalize('NFD')
|
|
3191
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
3192
|
+
const profilNormalized = profilNameNormalized + profilTitleNormalized;
|
|
3193
|
+
return profilNormalized.includes(filterNormalized);
|
|
3194
|
+
});
|
|
3223
3195
|
}
|
|
3224
|
-
|
|
3196
|
+
else {
|
|
3197
|
+
this.profils = [];
|
|
3198
|
+
}
|
|
3199
|
+
});
|
|
3200
|
+
}
|
|
3201
|
+
displayFn(profil) {
|
|
3202
|
+
return profil ? profil.title : undefined;
|
|
3203
|
+
}
|
|
3204
|
+
handleFormSubmit(value) {
|
|
3205
|
+
this.addPermission.emit(value);
|
|
3206
|
+
}
|
|
3207
|
+
buildForm() {
|
|
3208
|
+
this.form = this.formBuilder.group({
|
|
3209
|
+
profil: [],
|
|
3210
|
+
typePermission: ['read']
|
|
3211
|
+
});
|
|
3212
|
+
}
|
|
3213
|
+
onProfilSelected(value) {
|
|
3214
|
+
this.form.setValue({
|
|
3215
|
+
profil: value.name,
|
|
3216
|
+
typePermission: this.form.value.typePermission
|
|
3217
|
+
});
|
|
3225
3218
|
}
|
|
3219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", permissions: "permissionsChange", addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3226
3221
|
}
|
|
3222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3223
|
+
type: Component,
|
|
3224
|
+
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3225
|
+
MatRadioModule,
|
|
3226
|
+
FormsModule,
|
|
3227
|
+
ReactiveFormsModule,
|
|
3228
|
+
MatFormFieldModule,
|
|
3229
|
+
MatInputModule,
|
|
3230
|
+
MatAutocompleteModule,
|
|
3231
|
+
MatOptionModule,
|
|
3232
|
+
MatButtonModule,
|
|
3233
|
+
ListComponent,
|
|
3234
|
+
CollapsibleComponent,
|
|
3235
|
+
MatListModule,
|
|
3236
|
+
MatIconModule,
|
|
3237
|
+
StopPropagationDirective,
|
|
3238
|
+
MatTooltipModule,
|
|
3239
|
+
KeyValuePipe,
|
|
3240
|
+
IgoLanguageModule
|
|
3241
|
+
], template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
|
|
3242
|
+
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: false }] }, { type: i0.Output, args: ["permissionsChange"] }], addPermission: [{ type: i0.Output, args: ["addPermission"] }], removePermission: [{ type: i0.Output, args: ["removePermission"] }], scopeChanged: [{ type: i0.Output, args: ["scopeChanged"] }] } });
|
|
3227
3243
|
|
|
3228
|
-
class
|
|
3244
|
+
class ContextPermissionsBindingDirective {
|
|
3229
3245
|
contextService = inject(ContextService);
|
|
3230
|
-
|
|
3231
|
-
|
|
3246
|
+
languageService = inject(LanguageService);
|
|
3247
|
+
messageService = inject(MessageService);
|
|
3248
|
+
cd = inject(ChangeDetectorRef);
|
|
3232
3249
|
component;
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3250
|
+
editedContext$$;
|
|
3251
|
+
onAddPermission(permission) {
|
|
3252
|
+
if (!permission.profil) {
|
|
3253
|
+
this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3254
|
+
return;
|
|
3255
|
+
}
|
|
3256
|
+
const contextId = this.component.context().id;
|
|
3257
|
+
this.contextService
|
|
3258
|
+
.addPermissionAssociation(contextId, permission.profil, permission.typePermission)
|
|
3259
|
+
.subscribe((profils) => {
|
|
3260
|
+
for (const p of profils) {
|
|
3261
|
+
this.component.permissions[permission.typePermission].push(p);
|
|
3262
|
+
}
|
|
3263
|
+
const profil = permission.profil;
|
|
3264
|
+
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
|
|
3265
|
+
this.cd.detectChanges();
|
|
3266
|
+
});
|
|
3267
|
+
}
|
|
3268
|
+
onRemovePermission(permission) {
|
|
3269
|
+
const contextId = this.component.context().id;
|
|
3270
|
+
this.contextService
|
|
3271
|
+
.deletePermissionAssociation(contextId, permission.id)
|
|
3272
|
+
.subscribe(() => {
|
|
3273
|
+
const index = this.component.permissions[permission.typePermission].findIndex((p) => {
|
|
3274
|
+
return p.id === permission.id;
|
|
3275
|
+
});
|
|
3276
|
+
this.component.permissions[permission.typePermission].splice(index, 1);
|
|
3277
|
+
const profil = permission.profil;
|
|
3278
|
+
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
|
|
3279
|
+
this.cd.detectChanges();
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
onScopeChanged(context) {
|
|
3283
|
+
const scope = context.scope;
|
|
3284
|
+
this.contextService.update(context.id, { scope }).subscribe(() => {
|
|
3285
|
+
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3286
|
+
});
|
|
3236
3287
|
}
|
|
3237
|
-
queryParams;
|
|
3238
3288
|
constructor() {
|
|
3239
|
-
const component = inject(
|
|
3289
|
+
const component = inject(ContextPermissionsComponent, { self: true });
|
|
3240
3290
|
this.component = component;
|
|
3241
3291
|
}
|
|
3242
3292
|
ngOnInit() {
|
|
3243
|
-
this.
|
|
3244
|
-
.pipe(switchMap((params) => {
|
|
3245
|
-
this.queryParams = params ?? {};
|
|
3246
|
-
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
3247
|
-
}))
|
|
3248
|
-
.subscribe((context) => this.handleContextChange(context));
|
|
3293
|
+
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
3249
3294
|
}
|
|
3250
3295
|
ngOnDestroy() {
|
|
3251
|
-
this.
|
|
3296
|
+
this.editedContext$$.unsubscribe();
|
|
3297
|
+
this.contextService.editedContext$.next(undefined);
|
|
3252
3298
|
}
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
if (map.geolocationController) {
|
|
3271
|
-
map.geolocationController.updateGeolocationOptions(viewContext);
|
|
3272
|
-
}
|
|
3273
|
-
const controlsContext = context.map.controls;
|
|
3274
|
-
if (!this.component.controls && controlsContext) {
|
|
3275
|
-
if (this.mediaService.isMobile()) {
|
|
3276
|
-
if (typeof controlsContext.scaleLine !== 'boolean') {
|
|
3277
|
-
const scaleLineOption = controlsContext.scaleLine;
|
|
3278
|
-
if (!scaleLineOption.minWidth) {
|
|
3279
|
-
scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
|
|
3280
|
-
controlsContext.scaleLine = scaleLineOption;
|
|
3281
|
-
}
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
this.component.controls = controlsContext;
|
|
3299
|
+
handleEditedContextChange(context) {
|
|
3300
|
+
this.component.context.set(context);
|
|
3301
|
+
if (context) {
|
|
3302
|
+
this.contextService
|
|
3303
|
+
.getPermissions(context.id)
|
|
3304
|
+
.subscribe((permissionsArray) => {
|
|
3305
|
+
permissionsArray = permissionsArray || [];
|
|
3306
|
+
const permissions = {
|
|
3307
|
+
read: permissionsArray.filter((p) => {
|
|
3308
|
+
return p.typePermission.toString() === 'read';
|
|
3309
|
+
}),
|
|
3310
|
+
write: permissionsArray.filter((p) => {
|
|
3311
|
+
return p.typePermission.toString() === 'write';
|
|
3312
|
+
})
|
|
3313
|
+
};
|
|
3314
|
+
return this.component.permissions.set(permissions);
|
|
3315
|
+
});
|
|
3285
3316
|
}
|
|
3286
3317
|
}
|
|
3287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3288
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
3318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3319
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.16", type: ContextPermissionsBindingDirective, isStandalone: true, selector: "[igoContextPermissionsBinding]", host: { listeners: { "addPermission": "onAddPermission($event)", "removePermission": "onRemovePermission($event)", "scopeChanged": "onScopeChanged($event)" } }, ngImport: i0 });
|
|
3289
3320
|
}
|
|
3290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
|
|
3291
3322
|
type: Directive,
|
|
3292
3323
|
args: [{
|
|
3293
|
-
selector: '[
|
|
3324
|
+
selector: '[igoContextPermissionsBinding]',
|
|
3325
|
+
standalone: true
|
|
3294
3326
|
}]
|
|
3295
|
-
}], ctorParameters: () => []
|
|
3327
|
+
}], ctorParameters: () => [], propDecorators: { onAddPermission: [{
|
|
3328
|
+
type: HostListener,
|
|
3329
|
+
args: ['addPermission', ['$event']]
|
|
3330
|
+
}], onRemovePermission: [{
|
|
3331
|
+
type: HostListener,
|
|
3332
|
+
args: ['removePermission', ['$event']]
|
|
3333
|
+
}], onScopeChanged: [{
|
|
3334
|
+
type: HostListener,
|
|
3335
|
+
args: ['scopeChanged', ['$event']]
|
|
3336
|
+
}] } });
|
|
3296
3337
|
|
|
3297
3338
|
/**
|
|
3298
3339
|
* @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set
|
|
@@ -3303,42 +3344,36 @@ class IgoContextManagerModule {
|
|
|
3303
3344
|
ngModule: IgoContextManagerModule
|
|
3304
3345
|
};
|
|
3305
3346
|
}
|
|
3306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3307
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3308
|
-
ContextListBindingDirective,
|
|
3347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3348
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3309
3349
|
ContextItemComponent,
|
|
3310
3350
|
ContextFormComponent,
|
|
3311
3351
|
ContextEditComponent,
|
|
3312
|
-
ContextEditBindingDirective,
|
|
3313
3352
|
ContextPermissionsComponent,
|
|
3314
3353
|
ContextPermissionsBindingDirective,
|
|
3315
3354
|
LayerContextDirective,
|
|
3316
3355
|
MapContextDirective], exports: [ContextListComponent,
|
|
3317
|
-
ContextListBindingDirective,
|
|
3318
3356
|
ContextItemComponent,
|
|
3319
3357
|
ContextFormComponent,
|
|
3320
3358
|
ContextEditComponent,
|
|
3321
|
-
ContextEditBindingDirective,
|
|
3322
3359
|
ContextPermissionsComponent,
|
|
3323
3360
|
ContextPermissionsBindingDirective,
|
|
3324
3361
|
LayerContextDirective,
|
|
3325
3362
|
MapContextDirective] });
|
|
3326
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3363
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3327
3364
|
ContextItemComponent,
|
|
3328
3365
|
ContextFormComponent,
|
|
3329
3366
|
ContextEditComponent,
|
|
3330
3367
|
ContextPermissionsComponent] });
|
|
3331
3368
|
}
|
|
3332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextManagerModule, decorators: [{
|
|
3333
3370
|
type: NgModule,
|
|
3334
3371
|
args: [{
|
|
3335
3372
|
imports: [
|
|
3336
3373
|
ContextListComponent,
|
|
3337
|
-
ContextListBindingDirective,
|
|
3338
3374
|
ContextItemComponent,
|
|
3339
3375
|
ContextFormComponent,
|
|
3340
3376
|
ContextEditComponent,
|
|
3341
|
-
ContextEditBindingDirective,
|
|
3342
3377
|
ContextPermissionsComponent,
|
|
3343
3378
|
ContextPermissionsBindingDirective,
|
|
3344
3379
|
LayerContextDirective,
|
|
@@ -3346,11 +3381,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3346
3381
|
],
|
|
3347
3382
|
exports: [
|
|
3348
3383
|
ContextListComponent,
|
|
3349
|
-
ContextListBindingDirective,
|
|
3350
3384
|
ContextItemComponent,
|
|
3351
3385
|
ContextFormComponent,
|
|
3352
3386
|
ContextEditComponent,
|
|
3353
|
-
ContextEditBindingDirective,
|
|
3354
3387
|
ContextPermissionsComponent,
|
|
3355
3388
|
ContextPermissionsBindingDirective,
|
|
3356
3389
|
LayerContextDirective,
|
|
@@ -3393,10 +3426,10 @@ class BookmarkButtonComponent {
|
|
|
3393
3426
|
}
|
|
3394
3427
|
});
|
|
3395
3428
|
}
|
|
3396
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3397
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BookmarkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: BookmarkButtonComponent, isStandalone: true, selector: "igo-bookmark-button", inputs: { map: "map", color: "color" }, ngImport: i0, template: "<div class=\"igo-bookmark-button-container\">\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"createContext()\"\n >\n <mat-icon>star</mat-icon>\n </button>\n</div>\n", styles: [":host button{border-radius:0!important;background-color:var(--mat-sys-surface-bright)}:host button .mat-ripple,:host button .mdc-icon-button__ripple{border-radius:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3398
3431
|
}
|
|
3399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
|
|
3400
3433
|
type: Component,
|
|
3401
3434
|
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"] }]
|
|
3402
3435
|
}], propDecorators: { map: [{
|
|
@@ -3408,10 +3441,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3408
3441
|
class PoiDialogComponent {
|
|
3409
3442
|
dialogRef = inject(MatDialogRef);
|
|
3410
3443
|
title;
|
|
3411
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3412
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3445
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "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" }] });
|
|
3413
3446
|
}
|
|
3414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiDialogComponent, decorators: [{
|
|
3415
3448
|
type: Component,
|
|
3416
3449
|
args: [{ selector: 'igo-poi-dialog', imports: [
|
|
3417
3450
|
MatDialogTitle,
|
|
@@ -3447,10 +3480,10 @@ class PoiService {
|
|
|
3447
3480
|
const url = this.baseUrl + '/pois';
|
|
3448
3481
|
return this.http.post(url, context);
|
|
3449
3482
|
}
|
|
3450
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3451
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3484
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiService });
|
|
3452
3485
|
}
|
|
3453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiService, decorators: [{
|
|
3454
3487
|
type: Injectable
|
|
3455
3488
|
}], ctorParameters: () => [] });
|
|
3456
3489
|
|
|
@@ -3552,10 +3585,10 @@ class PoiButtonComponent {
|
|
|
3552
3585
|
easing: oleasing.easeOut
|
|
3553
3586
|
});
|
|
3554
3587
|
}
|
|
3555
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3556
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3588
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", 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>\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.id\" (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: MatSelectModule }, { kind: "component", type: i6.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: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { 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: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i1$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3557
3590
|
}
|
|
3558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: PoiButtonComponent, decorators: [{
|
|
3559
3592
|
type: Component,
|
|
3560
3593
|
args: [{ selector: 'igo-poi-button', imports: [
|
|
3561
3594
|
MatSelectModule,
|
|
@@ -3564,8 +3597,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3564
3597
|
StopPropagationDirective,
|
|
3565
3598
|
MatIconModule,
|
|
3566
3599
|
MatDividerModule,
|
|
3600
|
+
MatTooltipModule,
|
|
3567
3601
|
IgoLanguageModule
|
|
3568
|
-
], providers: [PoiService], template: "<mat-select\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div class=\"
|
|
3602
|
+
], providers: [PoiService], template: "<mat-select\n panelClass=\"poi-select-panel\"\n class=\"poi-select\"\n [placeholder]=\"'igo.context.poiButton.placeholder' | translate\"\n floatPlaceholder=\"never\"\n>\n <mat-option (click)=\"createPoi()\" class=\"poi-option\">\n <div\n class=\"poi-option-row\"\n [matTooltip]=\"'igo.context.poiButton.create' | translate\"\n matTooltipPosition=\"above\"\n >\n <div class=\"poi-option-text\">\n {{ 'igo.context.poiButton.create' | translate }}\n </div>\n <div class=\"poi-option-button\">\n <button\n igoStopPropagation\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\"\n >\n <mat-icon>add_circle</mat-icon>\n </button>\n </div>\n </div>\n </mat-option>\n <mat-divider />\n @for (poi of pois; track poi) {\n <mat-option class=\"poi-option\" [value]=\"poi.id\" (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"] }]
|
|
3569
3603
|
}], propDecorators: { map: [{
|
|
3570
3604
|
type: Input
|
|
3571
3605
|
}], color: [{
|
|
@@ -3602,10 +3636,10 @@ class UserDialogComponent {
|
|
|
3602
3636
|
clearPreferences() {
|
|
3603
3637
|
this.storageService.clear();
|
|
3604
3638
|
}
|
|
3605
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", 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" }] });
|
|
3607
3641
|
}
|
|
3608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserDialogComponent, decorators: [{
|
|
3609
3643
|
type: Component,
|
|
3610
3644
|
args: [{ selector: 'igo-user-dialog', imports: [
|
|
3611
3645
|
MatDialogTitle,
|
|
@@ -3656,10 +3690,10 @@ class UserButtonComponent {
|
|
|
3656
3690
|
infoUser() {
|
|
3657
3691
|
this.dialog.open(UserDialogComponent, { disableClose: false });
|
|
3658
3692
|
}
|
|
3659
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3660
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3693
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", 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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], animations: [userButtonSlideInOut()] });
|
|
3661
3695
|
}
|
|
3662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UserButtonComponent, decorators: [{
|
|
3663
3697
|
type: Component,
|
|
3664
3698
|
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], imports: [
|
|
3665
3699
|
PoiButtonComponent,
|
|
@@ -3683,20 +3717,20 @@ class IgoContextMapButtonModule {
|
|
|
3683
3717
|
ngModule: IgoContextMapButtonModule
|
|
3684
3718
|
};
|
|
3685
3719
|
}
|
|
3686
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3687
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3721
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoContextMapButtonModule, imports: [BookmarkButtonComponent,
|
|
3688
3722
|
BookmarkDialogComponent,
|
|
3689
3723
|
PoiButtonComponent,
|
|
3690
3724
|
UserButtonComponent], exports: [BookmarkButtonComponent,
|
|
3691
3725
|
PoiButtonComponent,
|
|
3692
3726
|
UserButtonComponent,
|
|
3693
3727
|
BookmarkDialogComponent] });
|
|
3694
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3728
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [BookmarkButtonComponent,
|
|
3695
3729
|
BookmarkDialogComponent,
|
|
3696
3730
|
PoiButtonComponent,
|
|
3697
3731
|
UserButtonComponent] });
|
|
3698
3732
|
}
|
|
3699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
|
|
3700
3734
|
type: NgModule,
|
|
3701
3735
|
args: [{
|
|
3702
3736
|
imports: [
|
|
@@ -3715,130 +3749,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
3715
3749
|
}]
|
|
3716
3750
|
}] });
|
|
3717
3751
|
|
|
3718
|
-
const CONTEXT_MANAGER_DIRECTIVES = [
|
|
3719
|
-
ContextListComponent,
|
|
3720
|
-
ContextListBindingDirective,
|
|
3721
|
-
ContextItemComponent,
|
|
3722
|
-
ContextFormComponent,
|
|
3723
|
-
ContextEditComponent,
|
|
3724
|
-
ContextEditBindingDirective,
|
|
3725
|
-
ContextPermissionsComponent,
|
|
3726
|
-
ContextPermissionsBindingDirective,
|
|
3727
|
-
MapContextDirective,
|
|
3728
|
-
LayerContextDirective
|
|
3729
|
-
];
|
|
3730
|
-
|
|
3731
|
-
class ShareMapApiComponent {
|
|
3732
|
-
clipboard = inject(Clipboard);
|
|
3733
|
-
languageService = inject(LanguageService);
|
|
3734
|
-
messageService = inject(MessageService);
|
|
3735
|
-
auth = inject(AuthService);
|
|
3736
|
-
shareMapService = inject(ShareMapService);
|
|
3737
|
-
formBuilder = inject(UntypedFormBuilder);
|
|
3738
|
-
contextService = inject(ContextService);
|
|
3739
|
-
form;
|
|
3740
|
-
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3741
|
-
url;
|
|
3742
|
-
userId;
|
|
3743
|
-
idContextShared;
|
|
3744
|
-
ngOnInit() {
|
|
3745
|
-
this.auth.authenticate$.subscribe(() => {
|
|
3746
|
-
const decodeToken = this.auth.decodeToken();
|
|
3747
|
-
this.userId = decodeToken?.user?.id.toString();
|
|
3748
|
-
this.buildForm();
|
|
3749
|
-
});
|
|
3750
|
-
}
|
|
3751
|
-
createUrl(values = {}) {
|
|
3752
|
-
const inputs = Object.assign({}, values);
|
|
3753
|
-
inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
|
|
3754
|
-
this.url = this.shareMapService.getUrlWithApi(inputs);
|
|
3755
|
-
this.createContextShared(this.map(), inputs).subscribe((rep) => {
|
|
3756
|
-
this.idContextShared = rep.id;
|
|
3757
|
-
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
3758
|
-
}, (err) => {
|
|
3759
|
-
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
3760
|
-
this.messageService.showError(err);
|
|
3761
|
-
});
|
|
3762
|
-
}
|
|
3763
|
-
updateContextShared(values = {}) {
|
|
3764
|
-
const inputs = Object.assign({}, values);
|
|
3765
|
-
inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
|
|
3766
|
-
this._updateContextShared(this.map(), inputs, this.idContextShared).subscribe(() => {
|
|
3767
|
-
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
3768
|
-
}, (err) => {
|
|
3769
|
-
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
3770
|
-
this.messageService.showError(err);
|
|
3771
|
-
});
|
|
3772
|
-
}
|
|
3773
|
-
copyTextToClipboard(textArea) {
|
|
3774
|
-
const successful = this.clipboard.copy(textArea.value);
|
|
3775
|
-
if (successful) {
|
|
3776
|
-
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3777
|
-
}
|
|
3778
|
-
}
|
|
3779
|
-
buildForm() {
|
|
3780
|
-
this.url = undefined;
|
|
3781
|
-
const id = uuid();
|
|
3782
|
-
let title = 'Partage ';
|
|
3783
|
-
title += this.userId ? `(${this.userId}-${id})` : `(${id})`;
|
|
3784
|
-
this.form = this.formBuilder.group({
|
|
3785
|
-
title: [title],
|
|
3786
|
-
uri: [id]
|
|
3787
|
-
});
|
|
3788
|
-
}
|
|
3789
|
-
createContextShared(map, formValues) {
|
|
3790
|
-
const context = this.contextService.getContextFromMap(map);
|
|
3791
|
-
context.scope = 'public';
|
|
3792
|
-
context.title = formValues.title;
|
|
3793
|
-
context.uri = formValues.uri;
|
|
3794
|
-
return this.contextService.create(context);
|
|
3795
|
-
}
|
|
3796
|
-
_updateContextShared(map, formValues, id) {
|
|
3797
|
-
const context = this.contextService.getContextFromMap(map);
|
|
3798
|
-
return this.contextService.update(id, {
|
|
3799
|
-
title: formValues.title,
|
|
3800
|
-
map: context.map
|
|
3801
|
-
});
|
|
3802
|
-
}
|
|
3803
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapApiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3804
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ShareMapApiComponent, isStandalone: true, selector: "igo-share-map-api", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n @if (userId) {\n <span class=\"prefix\">{{ userId }}-</span>\n }\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n @if (!url) {\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n }\n @if (url) {\n <button\n matButton=\"elevated\"\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n }\n </div>\n</form>\n\n@if (url) {\n <div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: 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: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3805
|
-
}
|
|
3806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapApiComponent, decorators: [{
|
|
3807
|
-
type: Component,
|
|
3808
|
-
args: [{ selector: 'igo-share-map-api', imports: [
|
|
3809
|
-
FormsModule,
|
|
3810
|
-
ReactiveFormsModule,
|
|
3811
|
-
MatFormFieldModule,
|
|
3812
|
-
MatInputModule,
|
|
3813
|
-
MatButtonModule,
|
|
3814
|
-
MatTooltipModule,
|
|
3815
|
-
MatIconModule,
|
|
3816
|
-
IgoLanguageModule
|
|
3817
|
-
], template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n @if (userId) {\n <span class=\"prefix\">{{ userId }}-</span>\n }\n <span class=\"fieldWrapper\">\n <input\n matInput\n required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\"\n />\n </span>\n <mat-error>\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div class=\"igo-form-button-group\">\n @if (!url) {\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n }\n @if (url) {\n <button\n matButton=\"elevated\"\n type=\"button\"\n (click)=\"updateContextShared(form.value)\"\n >\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n }\n </div>\n</form>\n\n@if (url) {\n <div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n <button\n mat-icon-button\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\n color=\"primary\"\n (click)=\"copyTextToClipboard(textArea)\"\n >\n <mat-icon>content_copy</mat-icon>\n </button>\n </mat-form-field>\n <div></div>\n </div>\n}\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}#uriInput .fieldWrapper{display:block;overflow:hidden}#uriInput .prefix{float:left}.linkToShare\\a0 {padding:25px 5px 5px}.linkToShare\\a0 textarea{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0 textarea.textAreaWithButton{width:calc(100% - 60px)}.linkToShare\\a0 mat-form-field>button{float:right;margin:-10px 0}.igo-form{padding:20px 5px 5px}.igo-form-button-group{text-align:center;padding-top:10px}\n"] }]
|
|
3818
|
-
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
3819
|
-
|
|
3820
3752
|
class ShareMapUrlComponent {
|
|
3821
3753
|
clipboard = inject(Clipboard);
|
|
3822
3754
|
messageService = inject(MessageService);
|
|
3823
3755
|
shareMapService = inject(ShareMapService);
|
|
3824
3756
|
contextService = inject(ContextService);
|
|
3825
3757
|
cdRef = inject(ChangeDetectorRef);
|
|
3826
|
-
route = inject(RouteService);
|
|
3827
3758
|
mapState$$;
|
|
3828
3759
|
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3829
3760
|
url;
|
|
3830
|
-
publicShareOption = {
|
|
3831
|
-
layerlistControls: { querystring: '' }
|
|
3832
|
-
};
|
|
3833
|
-
language;
|
|
3834
|
-
constructor() {
|
|
3835
|
-
this.route.queryParams.subscribe((params) => {
|
|
3836
|
-
const lang = params[this.route.options.languageKey];
|
|
3837
|
-
if (lang) {
|
|
3838
|
-
this.language = lang;
|
|
3839
|
-
}
|
|
3840
|
-
});
|
|
3841
|
-
}
|
|
3842
3761
|
ngOnInit() {
|
|
3843
3762
|
this.generateUrl();
|
|
3844
3763
|
this.mapState$$ = combineLatest([
|
|
@@ -3853,7 +3772,7 @@ class ShareMapUrlComponent {
|
|
|
3853
3772
|
this.mapState$$?.unsubscribe();
|
|
3854
3773
|
}
|
|
3855
3774
|
generateUrl() {
|
|
3856
|
-
this.url = this.shareMapService.encoder.generateUrl(this.map(), this.contextService.context$.value
|
|
3775
|
+
this.url = this.shareMapService.encoder.generateUrl(this.map(), this.contextService.context$.value);
|
|
3857
3776
|
}
|
|
3858
3777
|
copyTextToClipboard(textArea) {
|
|
3859
3778
|
const successful = this.clipboard.copy(textArea.value);
|
|
@@ -3861,45 +3780,34 @@ class ShareMapUrlComponent {
|
|
|
3861
3780
|
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3862
3781
|
}
|
|
3863
3782
|
}
|
|
3864
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3865
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3783
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapUrlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3784
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ShareMapUrlComponent, isStandalone: true, selector: "igo-share-map-url", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"igo-input-container\">\n <mat-form-field>\n <textarea\n #textArea\n matInput\n readonly\n rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"\n ></textarea>\n </mat-form-field>\n\n <div class=\"igo-share-map-url-content\">\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon>content_copy</mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n\n <div>\n <br />\n <section>\n @if (('igo.context.shareMap.htmlClarifications' | translate) === '') {\n <div>\n @if (('igo.context.shareMap.included' | translate) !== '') {\n <h4>\n {{ 'igo.context.shareMap.included' | translate }}\n </h4>\n }\n <ul>\n @if (('igo.context.shareMap.context' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.context' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.center' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.center' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.zoom' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.zoom' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.addedLayers' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.addedLayers' | translate }}\n </li>\n }\n @if (\n ('igo.context.shareMap.visibleInvisible' | translate) !== ''\n ) {\n <li>\n {{ 'igo.context.shareMap.visibleInvisible' | translate }}\n </li>\n }\n </ul>\n @if (('igo.context.shareMap.excluded' | translate) !== '') {\n <h4>\n {{ 'igo.context.shareMap.excluded' | translate }}\n </h4>\n }\n <ul>\n @if (('igo.context.shareMap.order' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.order' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.opacity' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.opacity' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.filterOgc' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.filterOgc' | translate }}\n </li>\n }\n @if (('igo.context.shareMap.filterTime' | translate) !== '') {\n <li>\n {{ 'igo.context.shareMap.filterTime' | translate }}\n </li>\n }\n </ul>\n </div>\n }\n @if (('igo.context.shareMap.htmlClarifications' | translate) !== '') {\n <igo-custom-html\n class=\"shareCustomPadding\"\n [html]=\"'igo.context.shareMap.htmlClarifications' | translate\"\n />\n }\n </section>\n </div>\n </div>\n</div>\n", styles: ["mat-form-field{width:100%}.igo-share-map-url-content{padding:16px}.igo-form-button-group{text-align:center}igo-custom-html.shareCustomPadding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: 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: i4$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" }] });
|
|
3866
3785
|
}
|
|
3867
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
|
|
3868
3787
|
type: Component,
|
|
3869
3788
|
args: [{ selector: 'igo-share-map-url', imports: [
|
|
3870
3789
|
MatFormFieldModule,
|
|
3871
3790
|
MatInputModule,
|
|
3872
3791
|
MatButtonModule,
|
|
3873
3792
|
MatIconModule,
|
|
3874
|
-
|
|
3875
|
-
|
|
3793
|
+
IgoLanguageModule,
|
|
3794
|
+
CustomHtmlComponent
|
|
3876
3795
|
], 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"] }]
|
|
3877
|
-
}],
|
|
3796
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
3878
3797
|
|
|
3879
3798
|
class ShareMapComponent {
|
|
3880
|
-
config = inject(ConfigService);
|
|
3881
3799
|
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
this.hasApi = this.config.getConfig('context.url') ? true : false;
|
|
3885
|
-
}
|
|
3886
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3887
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (hasApi) {\n <mat-tab-group>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map()\" />\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map()\" />\n </mat-tab>\n </mat-tab-group>\n}\n\n@if (!hasApi) {\n <igo-share-map-url [map]=\"map()\" />\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1$4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1$4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: ShareMapApiComponent, selector: "igo-share-map-api", inputs: ["map"] }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3800
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3801
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<igo-share-map-url [map]=\"map()\" />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }] });
|
|
3888
3802
|
}
|
|
3889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShareMapComponent, decorators: [{
|
|
3890
3804
|
type: Component,
|
|
3891
|
-
args: [{ selector: 'igo-share-map', imports: [
|
|
3892
|
-
|
|
3893
|
-
ShareMapApiComponent,
|
|
3894
|
-
ShareMapUrlComponent,
|
|
3895
|
-
IgoLanguageModule
|
|
3896
|
-
], template: "@if (hasApi) {\n <mat-tab-group>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map()\" />\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map()\" />\n </mat-tab>\n </mat-tab-group>\n}\n\n@if (!hasApi) {\n <igo-share-map-url [map]=\"map()\" />\n}\n" }]
|
|
3897
|
-
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
3805
|
+
args: [{ selector: 'igo-share-map', imports: [MatTabsModule, ShareMapUrlComponent], template: "<igo-share-map-url [map]=\"map()\" />\n" }]
|
|
3806
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
3898
3807
|
|
|
3899
3808
|
const SHARE_MAP_DIRECTIVES = [
|
|
3900
3809
|
ShareMapComponent,
|
|
3901
|
-
ShareMapUrlComponent
|
|
3902
|
-
ShareMapApiComponent
|
|
3810
|
+
ShareMapUrlComponent
|
|
3903
3811
|
];
|
|
3904
3812
|
/**
|
|
3905
3813
|
* @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set
|
|
@@ -3910,15 +3818,15 @@ class IgoShareMapModule {
|
|
|
3910
3818
|
ngModule: IgoShareMapModule
|
|
3911
3819
|
};
|
|
3912
3820
|
}
|
|
3913
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3914
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3915
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3822
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent], exports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3823
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3916
3824
|
}
|
|
3917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoShareMapModule, decorators: [{
|
|
3918
3826
|
type: NgModule,
|
|
3919
3827
|
args: [{
|
|
3920
|
-
imports: [ShareMapComponent, ShareMapUrlComponent
|
|
3921
|
-
exports: [ShareMapComponent, ShareMapUrlComponent
|
|
3828
|
+
imports: [ShareMapComponent, ShareMapUrlComponent],
|
|
3829
|
+
exports: [ShareMapComponent, ShareMapUrlComponent]
|
|
3922
3830
|
}]
|
|
3923
3831
|
}] });
|
|
3924
3832
|
|
|
@@ -3993,10 +3901,10 @@ class SidenavComponent {
|
|
|
3993
3901
|
this.topPanelState = 'initial';
|
|
3994
3902
|
}
|
|
3995
3903
|
}
|
|
3996
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3997
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: SidenavComponent, isStandalone: true, selector: "igo-sidenav", inputs: { map: "map", opened: "opened", feature: "feature", tool: "tool", media: "media", title: "title" }, ngImport: i0, template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n @if (tool) {\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n >\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n\n @if (tool) {\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n @if (feature && media !== 'mobile') {\n <igo-panel [title]=\"featureTitle\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon>{{\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n }}</mat-icon>\n </button>\n @if (feature.geometry) {\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n >\n <mat-icon>zoom_in</mat-icon>\n </button>\n }\n @if (['collapsed', 'initial'].indexOf(topPanel.state) >= 0) {\n <igo-feature-details [feature]=\"feature\" />\n }\n </igo-panel>\n }\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav{width:calc(100% - 45px)}}.igo-sidenav-content{margin-top:50px;height:calc(100% - 50px)}igo-feature-details ::ng-deep table{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$4.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$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "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" }] });
|
|
3998
3906
|
}
|
|
3999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
4000
3908
|
type: Component,
|
|
4001
3909
|
args: [{ selector: 'igo-sidenav', imports: [
|
|
4002
3910
|
MatSidenavModule,
|
|
@@ -4031,11 +3939,11 @@ class IgoSidenavModule {
|
|
|
4031
3939
|
ngModule: IgoSidenavModule
|
|
4032
3940
|
};
|
|
4033
3941
|
}
|
|
4034
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4035
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4036
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3943
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent], exports: [SidenavComponent] });
|
|
3944
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent] });
|
|
4037
3945
|
}
|
|
4038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoSidenavModule, decorators: [{
|
|
4039
3947
|
type: NgModule,
|
|
4040
3948
|
args: [{
|
|
4041
3949
|
imports: [SidenavComponent],
|
|
@@ -4052,19 +3960,19 @@ class IgoContextModule {
|
|
|
4052
3960
|
ngModule: IgoContextModule
|
|
4053
3961
|
};
|
|
4054
3962
|
}
|
|
4055
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4056
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3963
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3964
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoContextModule, exports: [IgoContextImportExportModule,
|
|
4057
3965
|
IgoContextManagerModule,
|
|
4058
3966
|
IgoContextMapButtonModule,
|
|
4059
3967
|
IgoShareMapModule,
|
|
4060
3968
|
IgoSidenavModule] });
|
|
4061
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3969
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextModule, imports: [IgoContextImportExportModule,
|
|
4062
3970
|
IgoContextManagerModule,
|
|
4063
3971
|
IgoContextMapButtonModule,
|
|
4064
3972
|
IgoShareMapModule,
|
|
4065
3973
|
IgoSidenavModule] });
|
|
4066
3974
|
}
|
|
4067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoContextModule, decorators: [{
|
|
4068
3976
|
type: NgModule,
|
|
4069
3977
|
args: [{
|
|
4070
3978
|
declarations: [],
|
|
@@ -4078,6 +3986,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
4078
3986
|
}]
|
|
4079
3987
|
}] });
|
|
4080
3988
|
|
|
3989
|
+
const CONTEXT_MANAGER_DIRECTIVES = [
|
|
3990
|
+
ContextListComponent,
|
|
3991
|
+
ContextItemComponent,
|
|
3992
|
+
ContextFormComponent,
|
|
3993
|
+
ContextEditComponent,
|
|
3994
|
+
ContextPermissionsComponent,
|
|
3995
|
+
ContextPermissionsBindingDirective,
|
|
3996
|
+
MapContextDirective,
|
|
3997
|
+
LayerContextDirective
|
|
3998
|
+
];
|
|
3999
|
+
|
|
4081
4000
|
const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
4082
4001
|
BookmarkButtonComponent,
|
|
4083
4002
|
BookmarkDialogComponent,
|
|
@@ -4093,5 +4012,5 @@ const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
|
4093
4012
|
* Generated bundle index. Do not edit.
|
|
4094
4013
|
*/
|
|
4095
4014
|
|
|
4096
|
-
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES,
|
|
4015
|
+
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent, ContextPermissionsBindingDirective, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, GroupParamsKeys, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, LayerParamsKeys, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, SHARE_MAP_KEYS_DEFAULT_OPTIONS, Scope, ServiceType, ServiceTypeEnum, ShareMapComponent, ShareMapLegacyParser, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, buildDataSourceOptions, computeLayerTitleFromFile, getFileExtension, getFlattenOptions, getParamValue, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hasLegacyParams, hasModernShareParams };
|
|
4097
4016
|
//# sourceMappingURL=igo2-context.mjs.map
|