@igo2/context 20.0.1-next.1 → 20.1.0-next.2
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 +873 -1093
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +113 -167
- package/locale/en.context.json +6 -5
- package/locale/fr.context.json +6 -5
- package/package.json +6 -6
|
@@ -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.6", ngImport: i0, type: ShareMapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1138
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", 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.6", 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.6", ngImport: i0, type: ContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1704
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", 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.6", 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.6", ngImport: i0, type: ContextExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1752
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", 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.6", 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.6", ngImport: i0, type: ContextImportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2019
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", 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.6", ngImport: i0, type: ContextImportService, decorators: [{
|
|
1963
2022
|
type: Injectable,
|
|
1964
2023
|
args: [{
|
|
1965
2024
|
providedIn: 'root'
|
|
@@ -1984,7 +2043,7 @@ class ContextImportExportComponent {
|
|
|
1984
2043
|
clientSideFileSizeMax;
|
|
1985
2044
|
fileSizeMb;
|
|
1986
2045
|
activeImportExport = 'import';
|
|
1987
|
-
map;
|
|
2046
|
+
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
1988
2047
|
constructor() {
|
|
1989
2048
|
this.buildForm();
|
|
1990
2049
|
}
|
|
@@ -1993,8 +2052,8 @@ class ContextImportExportComponent {
|
|
|
1993
2052
|
this.clientSideFileSizeMax =
|
|
1994
2053
|
(configFileSizeMb ? configFileSizeMb : 30) * Math.pow(1024, 2);
|
|
1995
2054
|
this.fileSizeMb = this.clientSideFileSizeMax / Math.pow(1024, 2);
|
|
1996
|
-
this.layerList = this.map.layerController.all;
|
|
1997
|
-
this.userControlledLayerList = this.map.layerController.treeLayers;
|
|
2055
|
+
this.layerList = this.map().layerController.all;
|
|
2056
|
+
this.userControlledLayerList = this.map().layerController.treeLayers;
|
|
1998
2057
|
}
|
|
1999
2058
|
importFiles(files) {
|
|
2000
2059
|
this.loading$.next(true);
|
|
@@ -2009,7 +2068,7 @@ class ContextImportExportComponent {
|
|
|
2009
2068
|
}
|
|
2010
2069
|
handleExportFormSubmit(contextOptions) {
|
|
2011
2070
|
this.loading$.next(true);
|
|
2012
|
-
this.res = this.contextService.getContextFromLayers(this.map, contextOptions.layers, contextOptions.name, false);
|
|
2071
|
+
this.res = this.contextService.getContextFromLayers(this.map(), contextOptions.layers, contextOptions.name, false);
|
|
2013
2072
|
this.res.imported = true;
|
|
2014
2073
|
this.contextExportService
|
|
2015
2074
|
.export(this.res)
|
|
@@ -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.6", ngImport: i0, type: ContextImportExportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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.6", ngImport: i0, type: ContextImportExportComponent, decorators: [{
|
|
2061
2120
|
type: Component,
|
|
2062
2121
|
args: [{ selector: 'igo-context-import-export', imports: [
|
|
2063
2122
|
MatButtonToggleModule,
|
|
@@ -2072,10 +2131,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
2072
2131
|
MatDividerModule,
|
|
2073
2132
|
AsyncPipe,
|
|
2074
2133
|
IgoLanguageModule
|
|
2075
|
-
], 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\"
|
|
2076
|
-
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
2077
|
-
type: Input
|
|
2078
|
-
}] } });
|
|
2134
|
+
], 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"] }]
|
|
2135
|
+
}], ctorParameters: () => [], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
2079
2136
|
|
|
2080
2137
|
/**
|
|
2081
2138
|
* @deprecated import the ContextImportExportComponent directly
|
|
@@ -2086,11 +2143,11 @@ class IgoContextImportExportModule {
|
|
|
2086
2143
|
ngModule: IgoContextImportExportModule
|
|
2087
2144
|
};
|
|
2088
2145
|
}
|
|
2089
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2090
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2091
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextImportExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2147
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent], exports: [ContextImportExportComponent] });
|
|
2148
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextImportExportModule, imports: [ContextImportExportComponent] });
|
|
2092
2149
|
}
|
|
2093
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextImportExportModule, decorators: [{
|
|
2094
2151
|
type: NgModule,
|
|
2095
2152
|
args: [{
|
|
2096
2153
|
imports: [ContextImportExportComponent],
|
|
@@ -2104,34 +2161,19 @@ class ContextFormComponent {
|
|
|
2104
2161
|
messageService = inject(MessageService);
|
|
2105
2162
|
form;
|
|
2106
2163
|
prefix;
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
}
|
|
2121
|
-
_context;
|
|
2122
|
-
get disabled() {
|
|
2123
|
-
return this._disabled;
|
|
2124
|
-
}
|
|
2125
|
-
set disabled(value) {
|
|
2126
|
-
this._disabled = value;
|
|
2127
|
-
}
|
|
2128
|
-
_disabled = false;
|
|
2129
|
-
// TODO: replace any by ContextOptions or Context
|
|
2130
|
-
submitForm = new EventEmitter();
|
|
2131
|
-
clone = new EventEmitter();
|
|
2132
|
-
delete = new EventEmitter();
|
|
2133
|
-
ngOnInit() {
|
|
2134
|
-
this.buildForm();
|
|
2164
|
+
btnSubmitText = input(...(ngDevMode ? [undefined, { debugName: "btnSubmitText" }] : []));
|
|
2165
|
+
context = input(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
2166
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2167
|
+
submitForm = output();
|
|
2168
|
+
clone = output();
|
|
2169
|
+
delete = output();
|
|
2170
|
+
constructor() {
|
|
2171
|
+
effect(() => {
|
|
2172
|
+
const context = this.context();
|
|
2173
|
+
if (context) {
|
|
2174
|
+
this.buildForm(context);
|
|
2175
|
+
}
|
|
2176
|
+
});
|
|
2135
2177
|
}
|
|
2136
2178
|
handleFormSubmit(value) {
|
|
2137
2179
|
let inputs = Object.assign({}, value);
|
|
@@ -2152,8 +2194,7 @@ class ContextFormComponent {
|
|
|
2152
2194
|
this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
|
|
2153
2195
|
}
|
|
2154
2196
|
}
|
|
2155
|
-
buildForm() {
|
|
2156
|
-
const context = this.context || {};
|
|
2197
|
+
buildForm(context) {
|
|
2157
2198
|
const uriSplit = context.uri.split('-');
|
|
2158
2199
|
this.prefix = uriSplit.shift();
|
|
2159
2200
|
const uri = uriSplit.join('-');
|
|
@@ -2162,10 +2203,10 @@ class ContextFormComponent {
|
|
|
2162
2203
|
uri: [uri || ' ']
|
|
2163
2204
|
});
|
|
2164
2205
|
}
|
|
2165
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2166
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
2206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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" }] });
|
|
2167
2208
|
}
|
|
2168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextFormComponent, decorators: [{
|
|
2169
2210
|
type: Component,
|
|
2170
2211
|
args: [{ selector: 'igo-context-form', imports: [
|
|
2171
2212
|
FormsModule,
|
|
@@ -2177,123 +2218,316 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
2177
2218
|
MatIconModule,
|
|
2178
2219
|
IgoLanguageModule
|
|
2179
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"] }]
|
|
2180
|
-
}], propDecorators: { btnSubmitText: [{
|
|
2181
|
-
type: Input
|
|
2182
|
-
}], context: [{
|
|
2183
|
-
type: Input
|
|
2184
|
-
}], disabled: [{
|
|
2185
|
-
type: Input
|
|
2186
|
-
}], submitForm: [{
|
|
2187
|
-
type: Output
|
|
2188
|
-
}], clone: [{
|
|
2189
|
-
type: Output
|
|
2190
|
-
}], delete: [{
|
|
2191
|
-
type: Output
|
|
2192
|
-
}] } });
|
|
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"] }] } });
|
|
2193
2222
|
|
|
2194
|
-
class
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2223
|
+
class LayerContextDirective {
|
|
2224
|
+
component = inject(MapBrowserComponent);
|
|
2225
|
+
contextService = inject(ContextService);
|
|
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();
|
|
2238
|
+
}
|
|
2239
|
+
ngOnInit() {
|
|
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));
|
|
2246
|
+
}
|
|
2247
|
+
ngOnDestroy() {
|
|
2248
|
+
this.context$$.unsubscribe();
|
|
2249
|
+
}
|
|
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;
|
|
2198
2348
|
}
|
|
2199
|
-
|
|
2200
|
-
this.
|
|
2201
|
-
|
|
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;
|
|
2202
2364
|
}
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2365
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2366
|
+
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 });
|
|
2367
|
+
}
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
2369
|
+
type: Directive,
|
|
2370
|
+
args: [{
|
|
2371
|
+
selector: '[igoLayerContext]'
|
|
2372
|
+
}]
|
|
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
|
+
}
|
|
2207
2383
|
}
|
|
2208
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2209
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ContextEditComponent, isStandalone: true, selector: "igo-context-edit", inputs: { context: "context" }, outputs: { 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 </igo-context-form>\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" }] });
|
|
2210
2384
|
}
|
|
2211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextEditComponent, decorators: [{
|
|
2212
|
-
type: Component,
|
|
2213
|
-
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 </igo-context-form>\n}\n" }]
|
|
2214
|
-
}], propDecorators: { context: [{
|
|
2215
|
-
type: Input
|
|
2216
|
-
}], submitForm: [{
|
|
2217
|
-
type: Output
|
|
2218
|
-
}] } });
|
|
2219
2385
|
|
|
2220
|
-
class
|
|
2386
|
+
class MapContextDirective {
|
|
2221
2387
|
contextService = inject(ContextService);
|
|
2222
|
-
|
|
2388
|
+
mediaService = inject(MediaService);
|
|
2389
|
+
shareMapService = inject(ShareMapService);
|
|
2223
2390
|
component;
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
const id = this.component.context.id;
|
|
2228
|
-
this.contextService.update(id, context).subscribe(() => {
|
|
2229
|
-
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
|
|
2230
|
-
value: context.title || this.component.context.title
|
|
2231
|
-
});
|
|
2232
|
-
this.contextService.setEditedContext(undefined);
|
|
2233
|
-
this.submitSuccessed.emit(context);
|
|
2234
|
-
});
|
|
2391
|
+
context$$;
|
|
2392
|
+
get map() {
|
|
2393
|
+
return this.component.map();
|
|
2235
2394
|
}
|
|
2395
|
+
queryParams;
|
|
2236
2396
|
constructor() {
|
|
2237
|
-
const component = inject(
|
|
2397
|
+
const component = inject(MapBrowserComponent);
|
|
2238
2398
|
this.component = component;
|
|
2239
2399
|
}
|
|
2240
2400
|
ngOnInit() {
|
|
2241
|
-
this.
|
|
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));
|
|
2242
2407
|
}
|
|
2243
2408
|
ngOnDestroy() {
|
|
2244
|
-
this.
|
|
2245
|
-
}
|
|
2246
|
-
handleEditedContextChange(context) {
|
|
2247
|
-
this.component.context = context;
|
|
2409
|
+
this.context$$.unsubscribe();
|
|
2248
2410
|
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
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.6", ngImport: i0, type: MapContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2446
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: MapContextDirective, isStandalone: true, selector: "[igoMapContext]", ngImport: i0 });
|
|
2447
|
+
}
|
|
2448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", 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.6", ngImport: i0, type: ContextEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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.6", 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
|
+
|
|
2265
2493
|
class ContextItemComponent {
|
|
2266
2494
|
auth = inject(AuthService);
|
|
2267
2495
|
storageService = inject(StorageService);
|
|
2268
2496
|
typePermission = TypePermission;
|
|
2269
2497
|
color = 'primary';
|
|
2270
2498
|
collapsed = true;
|
|
2271
|
-
showFavorite = true;
|
|
2272
|
-
context;
|
|
2273
|
-
default;
|
|
2274
|
-
selected;
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
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();
|
|
2284
2514
|
get hidden() {
|
|
2285
|
-
return this.context.hidden;
|
|
2515
|
+
return this.context().hidden;
|
|
2286
2516
|
}
|
|
2287
2517
|
get canShare() {
|
|
2288
2518
|
return this.storageService.get('canShare') === true;
|
|
2289
2519
|
}
|
|
2520
|
+
get isMenuOpen() {
|
|
2521
|
+
return this.itemActionsMenuTrigger()?.menuOpen ?? false;
|
|
2522
|
+
}
|
|
2523
|
+
itemActionsMenuTrigger = viewChild(MatMenuTrigger, ...(ngDevMode ? [{ debugName: "itemActionsMenuTrigger" }] : []));
|
|
2290
2524
|
favoriteClick(context) {
|
|
2291
2525
|
this.favorite.emit(context);
|
|
2292
2526
|
}
|
|
2293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2294
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: "showFavorite", context: "context", default: "default", selected: "selected" }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, ngImport: i0, template: "<mat-list-item\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 });
|
|
2527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2528
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextItemComponent, isStandalone: true, selector: "igo-context-item", inputs: { showFavorite: { classPropertyName: "showFavorite", publicName: "showFavorite", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, default: { classPropertyName: "default", publicName: "default", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", share: "share" }, host: { properties: { "class.igo-list-item-focused": "this.isMenuOpen" } }, viewQueries: [{ propertyName: "itemActionsMenuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{ 'mat-list-item-light': hidden }\"\n>\n @if (auth.authenticated) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"\n auth.authenticated\n ? ('igo.context.contextManager.favorite' | translate)\n : ''\n \"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n @if (!context().iconImage) {\n <mat-icon>{{\n context().icon\n ? context().icon\n : context().scope === 'public'\n ? 'public'\n : 'star'\n }}</mat-icon>\n } @else {\n <img\n [src]=\"context().iconImage\"\n alt=\"Ic\u00F4ne pour le favori de contexte\"\n />\n }\n </button>\n } @else if (showFavorite()) {\n <button\n matListItemAvatar\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"default() ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context())\"\n >\n <mat-icon>star</mat-icon>\n </button>\n }\n\n <span matListItemTitle>{{ context().title }}</span>\n\n @if (auth.authenticated) {\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n [class.--not-desktop]=\"!isDesktop()\"\n [class.--selected]=\"selected()\"\n >\n @if (\n collapsed &&\n selected() &&\n (context().permission === typePermission[typePermission.write] ||\n context().imported)\n ) {\n <button\n class=\"save-button\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"save.emit(context())\"\n >\n <mat-icon>save</mat-icon>\n </button>\n }\n\n <button\n class=\"actions-button\"\n mat-icon-button\n [color]=\"color\"\n [matMenuTriggerFor]=\"itemActionsMenu\"\n #itemActionsMenuTrigger=\"matMenuTrigger\"\n >\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #itemActionsMenu=\"matMenu\">\n @if (!context().imported) {\n @if (canShare) {\n <button\n mat-menu-item\n [matTooltip]=\"\n 'igo.context.contextManager.managePermissions' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"managePermissions.emit(context())\"\n >\n <mat-icon>manage_accounts</mat-icon\n ><span>{{\n 'igo.context.contextManager.managePermissions' | translate\n }}</span>\n </button>\n }\n\n <button\n class=\"clone-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"clone.emit(context())\"\n >\n <mat-icon>content_copy</mat-icon>\n <span>{{ 'igo.context.contextManager.clone' | translate }}</span>\n </button>\n\n @if (context().permission === typePermission[typePermission.write]) {\n <button\n class=\"edit-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"edit.emit(context())\"\n >\n <mat-icon>edit</mat-icon>\n <span>{{ 'igo.context.contextManager.edit' | translate }}</span>\n </button>\n }\n\n @if (!context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"hide.emit(context())\"\n >\n <mat-icon>visibility</mat-icon>\n <span>{{ 'igo.context.contextManager.hide' | translate }}</span>\n </button>\n }\n\n @if (context().hidden) {\n <button\n class=\"hide-button\"\n mat-menu-item\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"show.emit(context())\"\n >\n <mat-icon>visibility_off</mat-icon>\n <span>{{ 'igo.context.contextManager.show' | translate }}</span>\n </button>\n }\n\n <button\n mat-menu-item\n class=\"share-button\"\n [matTooltip]=\"'igo.context.contextManager.share' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"share.emit(context())\"\n >\n <mat-icon>share</mat-icon>\n <span>{{ 'igo.context.contextManager.share' | translate }}</span>\n </button>\n }\n\n @if (\n context().permission === typePermission[typePermission.write] ||\n context().imported\n ) {\n <button\n class=\"delete-button\"\n mat-menu-item\n color=\"warn\"\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"delete.emit(context())\"\n >\n <mat-icon>delete</mat-icon>\n <span>{{ 'igo.context.contextManager.delete' | translate }}</span>\n </button>\n }\n </mat-menu>\n </div>\n }\n</mat-list-item>\n", styles: [":host{overflow:hidden}:host:hover .igo-actions-container button,:host.igo-list-item-focused .igo-actions-container button,:host .--not-desktop button,:host .--selected button{visibility:visible!important}.igo-actions-container{flex-shrink:0}.igo-actions-container button{visibility:hidden}.igo-actions-container button.disabled{visibility:visible}.igo-actions-expand-container{display:inline-flex}mat-icon.disabled{color:#00000061}button[matlistitemavatar]{margin-right:8px}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2295
2529
|
}
|
|
2296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextItemComponent, decorators: [{
|
|
2297
2531
|
type: Component,
|
|
2298
2532
|
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2299
2533
|
MatListModule,
|
|
@@ -2302,44 +2536,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
2302
2536
|
StopPropagationDirective,
|
|
2303
2537
|
MatTooltipModule,
|
|
2304
2538
|
MatIconModule,
|
|
2305
|
-
|
|
2539
|
+
MatMenuModule,
|
|
2306
2540
|
IgoLanguageModule
|
|
2307
|
-
],
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
type: Input
|
|
2312
|
-
}], default: [{
|
|
2313
|
-
type: Input
|
|
2314
|
-
}], selected: [{
|
|
2315
|
-
type: Input
|
|
2316
|
-
}], edit: [{
|
|
2317
|
-
type: Output
|
|
2318
|
-
}], delete: [{
|
|
2319
|
-
type: Output
|
|
2320
|
-
}], save: [{
|
|
2321
|
-
type: Output
|
|
2322
|
-
}], clone: [{
|
|
2323
|
-
type: Output
|
|
2324
|
-
}], hide: [{
|
|
2325
|
-
type: Output
|
|
2326
|
-
}], show: [{
|
|
2327
|
-
type: Output
|
|
2328
|
-
}], favorite: [{
|
|
2329
|
-
type: Output
|
|
2330
|
-
}], managePermissions: [{
|
|
2331
|
-
type: Output
|
|
2332
|
-
}], manageTools: [{
|
|
2333
|
-
type: Output
|
|
2334
|
-
}] } });
|
|
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 }] }] } });
|
|
2335
2545
|
|
|
2336
2546
|
class BookmarkDialogComponent {
|
|
2337
2547
|
dialogRef = inject(MatDialogRef);
|
|
2338
2548
|
title;
|
|
2339
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2340
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
2549
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BookmarkDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", 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" }] });
|
|
2341
2551
|
}
|
|
2342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BookmarkDialogComponent, decorators: [{
|
|
2343
2553
|
type: Component,
|
|
2344
2554
|
args: [{ selector: 'igo-bookmark-dialog', imports: [
|
|
2345
2555
|
MatDialogTitle,
|
|
@@ -2363,6 +2573,12 @@ var ContextListControlsEnum;
|
|
|
2363
2573
|
class ContextListComponent {
|
|
2364
2574
|
configService = inject(ConfigService);
|
|
2365
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);
|
|
2366
2582
|
dialog = inject(MatDialog);
|
|
2367
2583
|
languageService = inject(LanguageService);
|
|
2368
2584
|
storageService = inject(StorageService);
|
|
@@ -2371,6 +2587,8 @@ class ContextListComponent {
|
|
|
2371
2587
|
contexts$ = new BehaviorSubject(this.contextsInitial);
|
|
2372
2588
|
change$ = new ReplaySubject(1);
|
|
2373
2589
|
change$$;
|
|
2590
|
+
previousMessageId;
|
|
2591
|
+
isDesktop;
|
|
2374
2592
|
get contexts() {
|
|
2375
2593
|
return this._contexts;
|
|
2376
2594
|
}
|
|
@@ -2379,8 +2597,8 @@ class ContextListComponent {
|
|
|
2379
2597
|
this.next();
|
|
2380
2598
|
}
|
|
2381
2599
|
_contexts = { ours: [] };
|
|
2382
|
-
selectedContext;
|
|
2383
|
-
map;
|
|
2600
|
+
selectedContext = model(undefined, ...(ngDevMode ? [{ debugName: "selectedContext" }] : []));
|
|
2601
|
+
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
2384
2602
|
get defaultContextId() {
|
|
2385
2603
|
return this.contextConfigs
|
|
2386
2604
|
? this._defaultContextId
|
|
@@ -2392,20 +2610,20 @@ class ContextListComponent {
|
|
|
2392
2610
|
}
|
|
2393
2611
|
_defaultContextId;
|
|
2394
2612
|
collapsed = [];
|
|
2395
|
-
select =
|
|
2396
|
-
unselect =
|
|
2397
|
-
edit =
|
|
2398
|
-
delete =
|
|
2399
|
-
save =
|
|
2400
|
-
clone =
|
|
2401
|
-
create =
|
|
2402
|
-
hide =
|
|
2403
|
-
show =
|
|
2404
|
-
showHiddenContexts =
|
|
2405
|
-
favorite =
|
|
2406
|
-
managePermissions =
|
|
2407
|
-
manageTools =
|
|
2408
|
-
filterPermissionsChanged =
|
|
2613
|
+
select = output();
|
|
2614
|
+
unselect = output();
|
|
2615
|
+
edit = output();
|
|
2616
|
+
delete = output();
|
|
2617
|
+
save = output();
|
|
2618
|
+
clone = output();
|
|
2619
|
+
create = output();
|
|
2620
|
+
hide = output();
|
|
2621
|
+
show = output();
|
|
2622
|
+
showHiddenContexts = output();
|
|
2623
|
+
favorite = output();
|
|
2624
|
+
managePermissions = output();
|
|
2625
|
+
manageTools = output();
|
|
2626
|
+
filterPermissionsChanged = output();
|
|
2409
2627
|
titleMapping = {
|
|
2410
2628
|
ours: 'igo.context.contextManager.ourContexts',
|
|
2411
2629
|
shared: 'igo.context.contextManager.sharedContexts',
|
|
@@ -2443,6 +2661,9 @@ class ContextListComponent {
|
|
|
2443
2661
|
!this.contexts.public?.length &&
|
|
2444
2662
|
!this.contexts.shared?.length);
|
|
2445
2663
|
}
|
|
2664
|
+
contexts$$;
|
|
2665
|
+
selectedContext$$;
|
|
2666
|
+
defaultContextId$$;
|
|
2446
2667
|
constructor() {
|
|
2447
2668
|
this.contextConfigs = this.configService.getConfig('context');
|
|
2448
2669
|
}
|
|
@@ -2472,6 +2693,62 @@ class ContextListComponent {
|
|
|
2472
2693
|
}
|
|
2473
2694
|
}
|
|
2474
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();
|
|
2749
|
+
}
|
|
2750
|
+
setSelected(context) {
|
|
2751
|
+
this.selectedContext.set(context);
|
|
2475
2752
|
}
|
|
2476
2753
|
next() {
|
|
2477
2754
|
this.change$.next();
|
|
@@ -2532,9 +2809,6 @@ class ContextListComponent {
|
|
|
2532
2809
|
return updateContexts;
|
|
2533
2810
|
}
|
|
2534
2811
|
}
|
|
2535
|
-
ngOnDestroy() {
|
|
2536
|
-
this.change$$.unsubscribe();
|
|
2537
|
-
}
|
|
2538
2812
|
showFilter() {
|
|
2539
2813
|
switch (this.showContextFilter) {
|
|
2540
2814
|
case ContextListControlsEnum.always:
|
|
@@ -2612,7 +2886,7 @@ class ContextListComponent {
|
|
|
2612
2886
|
.pipe(take(1))
|
|
2613
2887
|
.subscribe((title) => {
|
|
2614
2888
|
if (title) {
|
|
2615
|
-
this.
|
|
2889
|
+
this.onCreate({ title, empty });
|
|
2616
2890
|
}
|
|
2617
2891
|
});
|
|
2618
2892
|
}
|
|
@@ -2655,108 +2929,50 @@ class ContextListComponent {
|
|
|
2655
2929
|
}
|
|
2656
2930
|
}
|
|
2657
2931
|
}
|
|
2658
|
-
this.
|
|
2659
|
-
}
|
|
2660
|
-
hideContext(context) {
|
|
2661
|
-
context.hidden = true;
|
|
2662
|
-
if (!this.showHidden) {
|
|
2663
|
-
const contexts = { ours: [], shared: [], public: [] };
|
|
2664
|
-
contexts.ours = this.contexts.ours.filter((c) => c.id !== context.id);
|
|
2665
|
-
contexts.shared = this.contexts.shared?.filter((c) => c.id !== context.id);
|
|
2666
|
-
contexts.public = this.contexts.public?.filter((c) => c.id !== context.id);
|
|
2667
|
-
this.contexts = contexts;
|
|
2668
|
-
}
|
|
2669
|
-
this.hide.emit(context);
|
|
2932
|
+
this.onFilterPermissionsChanged();
|
|
2670
2933
|
}
|
|
2671
2934
|
showContext(context) {
|
|
2672
2935
|
context.hidden = false;
|
|
2936
|
+
this.contextService.showContext(context.id).subscribe();
|
|
2673
2937
|
this.show.emit(context);
|
|
2674
2938
|
}
|
|
2675
2939
|
onSelect(context) {
|
|
2940
|
+
this.contextService.loadContext(context.uri);
|
|
2676
2941
|
this.select.emit(context);
|
|
2677
2942
|
}
|
|
2678
|
-
|
|
2679
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { contexts: "contexts", selectedContext: "selectedContext", map: "map", defaultContextId: "defaultContextId", term: "term" }, outputs: { select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\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 </igo-actionbar>\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 </mat-checkbox>\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 </mat-checkbox>\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()\"\n >\n </mat-checkbox>\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]=\"selectedContext && selectedContext.uri === context.uri\"\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 </igo-context-item>\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]=\"selectedContext && selectedContext.uri === context.uri\"\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 </igo-context-item>\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: ["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 });
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
}], defaultContextId: [{
|
|
2708
|
-
type: Input
|
|
2709
|
-
}], select: [{
|
|
2710
|
-
type: Output
|
|
2711
|
-
}], unselect: [{
|
|
2712
|
-
type: Output
|
|
2713
|
-
}], edit: [{
|
|
2714
|
-
type: Output
|
|
2715
|
-
}], delete: [{
|
|
2716
|
-
type: Output
|
|
2717
|
-
}], save: [{
|
|
2718
|
-
type: Output
|
|
2719
|
-
}], clone: [{
|
|
2720
|
-
type: Output
|
|
2721
|
-
}], create: [{
|
|
2722
|
-
type: Output
|
|
2723
|
-
}], hide: [{
|
|
2724
|
-
type: Output
|
|
2725
|
-
}], show: [{
|
|
2726
|
-
type: Output
|
|
2727
|
-
}], showHiddenContexts: [{
|
|
2728
|
-
type: Output
|
|
2729
|
-
}], favorite: [{
|
|
2730
|
-
type: Output
|
|
2731
|
-
}], managePermissions: [{
|
|
2732
|
-
type: Output
|
|
2733
|
-
}], manageTools: [{
|
|
2734
|
-
type: Output
|
|
2735
|
-
}], filterPermissionsChanged: [{
|
|
2736
|
-
type: Output
|
|
2737
|
-
}], term: [{
|
|
2738
|
-
type: Input
|
|
2739
|
-
}] } });
|
|
2740
|
-
|
|
2741
|
-
class ContextListBindingDirective {
|
|
2742
|
-
contextService = inject(ContextService);
|
|
2743
|
-
mapService = inject(MapService);
|
|
2744
|
-
languageService = inject(LanguageService);
|
|
2745
|
-
confirmDialogService = inject(ConfirmDialogService);
|
|
2746
|
-
messageService = inject(MessageService);
|
|
2747
|
-
auth = inject(AuthService);
|
|
2748
|
-
storageService = inject(StorageService);
|
|
2749
|
-
cdRef = inject(ChangeDetectorRef);
|
|
2750
|
-
component;
|
|
2751
|
-
contexts$$;
|
|
2752
|
-
selectedContext$$;
|
|
2753
|
-
defaultContextId$$;
|
|
2754
|
-
previousMessageId;
|
|
2755
|
-
onSelect(context) {
|
|
2756
|
-
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');
|
|
2757
2972
|
}
|
|
2758
2973
|
onEdit(context) {
|
|
2759
2974
|
this.contextService.loadEditedContext(context.uri);
|
|
2975
|
+
this.edit.emit(context);
|
|
2760
2976
|
}
|
|
2761
2977
|
onSave(context) {
|
|
2762
2978
|
const map = this.mapService.getMap();
|
|
@@ -2781,31 +2997,53 @@ class ContextListBindingDirective {
|
|
|
2781
2997
|
view: contextFromMap.map.view
|
|
2782
2998
|
}
|
|
2783
2999
|
};
|
|
2784
|
-
this.contextService
|
|
3000
|
+
this.contextService
|
|
3001
|
+
.update(context.id, changes)
|
|
3002
|
+
.pipe(tap((changes) => {
|
|
3003
|
+
this.handleContextChanges(changes);
|
|
2785
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
|
+
}
|
|
2786
3020
|
});
|
|
2787
3021
|
}
|
|
2788
3022
|
onFavorite(context) {
|
|
2789
3023
|
if (!context.id) {
|
|
2790
3024
|
context.id = context.uri;
|
|
2791
3025
|
}
|
|
2792
|
-
this.contextService.setDefault(context.id).subscribe(() => {
|
|
3026
|
+
this.contextService.setDefault(context.id).subscribe((defaultId) => {
|
|
2793
3027
|
if (this.previousMessageId) {
|
|
2794
3028
|
this.messageService.remove(this.previousMessageId);
|
|
2795
3029
|
}
|
|
2796
|
-
this.contextService.defaultContextId$.next(
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
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);
|
|
2802
3038
|
});
|
|
2803
3039
|
}
|
|
2804
3040
|
onManageTools(context) {
|
|
2805
3041
|
this.contextService.loadEditedContext(context.uri);
|
|
3042
|
+
this.manageTools.emit(context);
|
|
2806
3043
|
}
|
|
2807
3044
|
onManagePermissions(context) {
|
|
2808
3045
|
this.contextService.loadEditedContext(context.uri);
|
|
3046
|
+
this.managePermissions.emit(context);
|
|
2809
3047
|
}
|
|
2810
3048
|
onDelete(context) {
|
|
2811
3049
|
const translate = this.languageService.translate;
|
|
@@ -2818,6 +3056,7 @@ class ContextListBindingDirective {
|
|
|
2818
3056
|
.subscribe(() => {
|
|
2819
3057
|
this.messageService.info('igo.context.contextManager.dialog.deleteMsg', 'igo.context.contextManager.dialog.deleteTitle', undefined, { value: context.title });
|
|
2820
3058
|
});
|
|
3059
|
+
this.delete.emit(context);
|
|
2821
3060
|
}
|
|
2822
3061
|
});
|
|
2823
3062
|
}
|
|
@@ -2829,189 +3068,103 @@ class ContextListBindingDirective {
|
|
|
2829
3068
|
this.contextService.clone(context.id, properties).subscribe(() => {
|
|
2830
3069
|
this.messageService.success('igo.context.contextManager.dialog.cloneMsg', 'igo.context.contextManager.dialog.cloneTitle', undefined, { value: context.title });
|
|
2831
3070
|
});
|
|
3071
|
+
this.clone.emit(context);
|
|
2832
3072
|
}
|
|
2833
3073
|
onCreate(opts) {
|
|
2834
3074
|
const { title, empty } = opts;
|
|
2835
|
-
const context = this.contextService.getContextFromMap(this.
|
|
3075
|
+
const context = this.contextService.getContextFromMap(this.map(), empty);
|
|
2836
3076
|
context.title = title;
|
|
2837
3077
|
this.contextService.create(context).subscribe(() => {
|
|
2838
3078
|
this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
|
|
2839
3079
|
this.contextService.loadContext(context.uri);
|
|
2840
3080
|
});
|
|
3081
|
+
this.create.emit(opts);
|
|
2841
3082
|
}
|
|
2842
|
-
|
|
3083
|
+
onFilterPermissionsChanged() {
|
|
2843
3084
|
const permissions = ['none'];
|
|
2844
|
-
for (const p of this.
|
|
3085
|
+
for (const p of this.permissions) {
|
|
2845
3086
|
if (p.checked === true || p.indeterminate === true) {
|
|
2846
3087
|
permissions.push(p.name);
|
|
2847
3088
|
}
|
|
2848
3089
|
}
|
|
2849
|
-
this.contextService.loadContexts(permissions, this.
|
|
2850
|
-
|
|
2851
|
-
showHiddenContexts() {
|
|
2852
|
-
this.component.showHidden = !this.component.showHidden;
|
|
2853
|
-
this.storageService.set('contexts.showHidden', this.component.showHidden);
|
|
2854
|
-
this.loadContexts();
|
|
3090
|
+
this.contextService.loadContexts(permissions, this.showHidden);
|
|
3091
|
+
this.filterPermissionsChanged.emit(this.permissions);
|
|
2855
3092
|
}
|
|
2856
|
-
|
|
2857
|
-
this.
|
|
3093
|
+
onShowHiddenContexts() {
|
|
3094
|
+
this.showHidden = !this.showHidden;
|
|
3095
|
+
this.storageService.set('contexts.showHidden', this.showHidden);
|
|
3096
|
+
this.onFilterPermissionsChanged();
|
|
3097
|
+
this.showHiddenContexts.emit(this.showHidden);
|
|
2858
3098
|
}
|
|
2859
3099
|
onHideContext(context) {
|
|
2860
3100
|
this.contextService.hideContext(context.id).subscribe();
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
this.component.contexts = { ours: [] };
|
|
2869
|
-
this.component.showHidden = this.storageService.get('contexts.showHidden');
|
|
2870
|
-
this.contexts$$ = this.contextService.contexts$.subscribe((contexts) => this.handleContextsChange(contexts));
|
|
2871
|
-
this.defaultContextId$$ = this.contextService.defaultContextId$.subscribe((id) => {
|
|
2872
|
-
this.component.defaultContextId = id;
|
|
2873
|
-
});
|
|
2874
|
-
const storedContextUri = this.storageService.get('favorite.context.uri');
|
|
2875
|
-
if (storedContextUri && !this.auth.authenticated) {
|
|
2876
|
-
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;
|
|
2877
3108
|
}
|
|
2878
|
-
|
|
2879
|
-
this.selectedContext$$ = this.contextService.context$
|
|
2880
|
-
.pipe(debounceTime(100))
|
|
2881
|
-
.subscribe((context) => {
|
|
2882
|
-
this.component.selectedContext = context;
|
|
2883
|
-
this.cdRef.markForCheck();
|
|
2884
|
-
});
|
|
2885
|
-
this.auth.authenticate$.subscribe((authenticate) => {
|
|
2886
|
-
if (authenticate) {
|
|
2887
|
-
this.contextService.getProfilByUser().subscribe((profils) => {
|
|
2888
|
-
this.component.users = profils;
|
|
2889
|
-
this.component.permissions = [];
|
|
2890
|
-
const profilsAcc = this.component.users.reduce((acc, cur) => {
|
|
2891
|
-
acc = acc.concat(cur);
|
|
2892
|
-
acc = cur.childs ? acc.concat(cur.childs) : acc;
|
|
2893
|
-
return acc;
|
|
2894
|
-
}, []);
|
|
2895
|
-
for (const user of profilsAcc) {
|
|
2896
|
-
const permission = {
|
|
2897
|
-
name: user.name,
|
|
2898
|
-
checked: this.storageService.get('contexts.permissions.' + user.name)
|
|
2899
|
-
};
|
|
2900
|
-
if (permission.checked === null) {
|
|
2901
|
-
permission.checked = true;
|
|
2902
|
-
}
|
|
2903
|
-
this.component.permissions.push(permission);
|
|
2904
|
-
}
|
|
2905
|
-
const permissions = ['none'];
|
|
2906
|
-
for (const p of this.component.permissions) {
|
|
2907
|
-
if (p.checked === true || p.indeterminate === true) {
|
|
2908
|
-
permissions.push(p.name);
|
|
2909
|
-
}
|
|
2910
|
-
}
|
|
2911
|
-
this.contextService.loadContexts(permissions, this.component.showHidden);
|
|
2912
|
-
});
|
|
2913
|
-
}
|
|
2914
|
-
});
|
|
2915
|
-
}
|
|
2916
|
-
ngOnDestroy() {
|
|
2917
|
-
this.contexts$$.unsubscribe();
|
|
2918
|
-
this.selectedContext$$.unsubscribe();
|
|
2919
|
-
this.defaultContextId$$.unsubscribe();
|
|
2920
|
-
}
|
|
2921
|
-
handleContextsChange(contexts) {
|
|
2922
|
-
this.component.contexts = contexts;
|
|
3109
|
+
this.hide.emit(context);
|
|
2923
3110
|
}
|
|
2924
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2925
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", 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.6", ngImport: i0, type: ContextListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextListComponent, isStandalone: true, selector: "igo-context-list", inputs: { isDesktop: { classPropertyName: "isDesktop", publicName: "isDesktop", isSignal: false, isRequired: false, transformFunction: null }, contexts: { classPropertyName: "contexts", publicName: "contexts", isSignal: false, isRequired: false, transformFunction: null }, selectedContext: { classPropertyName: "selectedContext", publicName: "selectedContext", isSignal: true, isRequired: false, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, defaultContextId: { classPropertyName: "defaultContextId", publicName: "defaultContextId", isSignal: false, isRequired: false, transformFunction: null }, term: { classPropertyName: "term", publicName: "term", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedContext: "selectedContextChange", select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, ngImport: i0, template: "<igo-list [navigation]=\"true\">\n <div class=\"context-filter-container\">\n @if (showFilter()) {\n <mat-form-field floatLabel=\"always\">\n <mat-label>{{\n 'igo.context.contextManager.filterPlaceHolder' | translate\n }}</mat-label>\n <input\n matInput\n type=\"text\"\n [placeholder]=\"\n 'igo.context.contextManager.filterPlaceHolder' | translate\n \"\n [(ngModel)]=\"term\"\n />\n @if (term.length) {\n <button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n }\n\n <div class=\"actions-container\">\n <button\n class=\"sort-alpha\"\n [class.--active]=\"sortedAlpha\"\n mat-icon-button\n [matTooltip]=\"\n 'igo.context.contextManager.sortAlphabetically' | translate\n \"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort()\"\n >\n <mat-icon color=\"primary\">sort_by_alpha</mat-icon>\n </button>\n\n @if (auth.authenticated && contextConfigs) {\n <igo-actionbar\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"add\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\"\n />\n\n <button\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\"\n >\n <mat-icon color=\"primary\">filter_alt</mat-icon>\n </button>\n }\n <mat-menu #accountMenu=\"matMenu\">\n @for (user of users; track user.name) {\n @if (!user.childs) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n } @else {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subAccountMenu\"\n class=\"profil-menu\"\n >\n <mat-checkbox\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(user)\"\n />\n <span>{{ user.title }}</span>\n </button>\n <mat-menu #subAccountMenu=\"matMenu\">\n @for (child of user.childs; track child.name) {\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"handleToggleCategory(child, user)\"\n >\n {{ child.title }}\n </mat-checkbox>\n </button>\n }\n </mat-menu>\n }\n }\n\n <button mat-menu-item class=\"profil-menu\">\n <mat-checkbox\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onShowHiddenContexts()\"\n />\n <span>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </span>\n </button>\n </mat-menu>\n </div>\n </div>\n\n @for (\n groupContexts of $any(contexts$ | async) | keyvalue;\n track groupContexts\n ) {\n @if ($any(groupContexts).value.length && auth.authenticated) {\n <igo-collapsible\n [title]=\"titleMapping[$any(groupContexts).key] | translate\"\n [collapsed]=\"$any(collapsed[titleMapping[$any(groupContexts).key]])\"\n (toggle)=\"\n collapsed[titleMapping[$any(groupContexts).key]] = $any($event)\n \"\n >\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"\n selectedContext() && selectedContext().uri === context.uri\n \"\n [context]=\"context\"\n [default]=\"\n context.id &&\n this.defaultContextId &&\n this.defaultContextId === context.id\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (manageTools)=\"onManageTools(context)\"\n (managePermissions)=\"onManagePermissions(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n (share)=\"onShareContext(context)\"\n />\n }\n </igo-collapsible>\n }\n @if ($any(groupContexts).value.length && !auth.authenticated; as context) {\n @for (\n context of $any(groupContexts).value;\n track context.id ?? context.uri\n ) {\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"isContextSelected(context)\"\n [context]=\"context\"\n [default]=\"\n contextConfigs\n ? defaultContextId === context.id\n : defaultContextId === context.uri\n \"\n [isDesktop]=\"isDesktop\"\n (edit)=\"onEdit(context)\"\n (delete)=\"onDelete(context)\"\n (clone)=\"onClone(context)\"\n (save)=\"onSave(context)\"\n (hide)=\"onHideContext(context)\"\n (show)=\"showContext(context)\"\n (favorite)=\"onFavorite(context)\"\n (select)=\"onSelect(context)\"\n (unselect)=\"unselect.emit(context)\"\n />\n }\n }\n }\n\n @if (isEmpty) {\n <div class=\"no-result\">\n {{ 'igo.context.contextManager.noResult' | translate }}\n </div>\n }\n</igo-list>\n", styles: [":host{--mat-list-list-item-one-line-container-height: 40px;--mat-form-field-container-height: 48px;--mat-form-field-container-vertical-padding: 12px;--mat-icon-button-state-layer-size: 40px}:host ::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.context-filter-container{display:flex;align-items:center;padding:8px 4px}.context-filter-container mat-form-field{flex:1}.sort-alpha.--active mat-icon{color:red}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}.profil-menu{padding-left:8px}.profil-menu mat-checkbox{margin-right:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}.actions-container{margin-left:4px}.no-result{padding:16px}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ActionbarComponent, selector: "igo-actionbar", inputs: ["store", "mode", "withToggleButton", "horizontal", "color", "iconColor", "withTitle", "withTooltip", "scrollActive", "withIcon", "icon", "xPosition", "yPosition", "overlayClass"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "component", type: ContextItemComponent, selector: "igo-context-item", inputs: ["showFavorite", "context", "default", "selected", "isDesktop"], outputs: ["edit", "delete", "save", "clone", "hide", "show", "favorite", "managePermissions", "manageTools", "share"] }, { kind: "directive", type: ListItemDirective, selector: "[igoListItem]", inputs: ["color", "focused", "selected", "disabled"], outputs: ["beforeSelect", "beforeFocus", "beforeUnselect", "beforeUnfocus", "beforeDisable", "beforeEnable", "focus", "unfocus", "select", "unselect", "disable", "enable"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2926
3113
|
}
|
|
2927
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2928
|
-
type:
|
|
2929
|
-
args: [{
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
}], onManageTools: [{
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
}],
|
|
2950
|
-
type:
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
}], onClone: [{
|
|
2956
|
-
type: HostListener,
|
|
2957
|
-
args: ['clone', ['$event']]
|
|
2958
|
-
}], onCreate: [{
|
|
2959
|
-
type: HostListener,
|
|
2960
|
-
args: ['create', ['$event']]
|
|
2961
|
-
}], loadContexts: [{
|
|
2962
|
-
type: HostListener,
|
|
2963
|
-
args: ['filterPermissionsChanged']
|
|
2964
|
-
}], showHiddenContexts: [{
|
|
2965
|
-
type: HostListener,
|
|
2966
|
-
args: ['showHiddenContexts']
|
|
2967
|
-
}], onShowContext: [{
|
|
2968
|
-
type: HostListener,
|
|
2969
|
-
args: ['show', ['$event']]
|
|
2970
|
-
}], onHideContext: [{
|
|
2971
|
-
type: HostListener,
|
|
2972
|
-
args: ['hide', ['$event']]
|
|
3114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", 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
|
|
2973
3142
|
}] } });
|
|
2974
3143
|
|
|
2975
3144
|
class ContextPermissionsComponent {
|
|
2976
3145
|
formBuilder = inject(UntypedFormBuilder);
|
|
2977
|
-
cd = inject(ChangeDetectorRef);
|
|
2978
3146
|
http = inject(HttpClient);
|
|
2979
3147
|
authService = inject(AuthService);
|
|
2980
3148
|
config = inject(ConfigService);
|
|
2981
3149
|
form;
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
}
|
|
2985
|
-
set context(value) {
|
|
2986
|
-
this._context = value;
|
|
2987
|
-
this.cd.detectChanges();
|
|
2988
|
-
}
|
|
2989
|
-
_context;
|
|
2990
|
-
get permissions() {
|
|
2991
|
-
return this._permissions;
|
|
2992
|
-
}
|
|
2993
|
-
set permissions(value) {
|
|
2994
|
-
this._permissions = value;
|
|
2995
|
-
this.cd.detectChanges();
|
|
2996
|
-
}
|
|
2997
|
-
_permissions;
|
|
3150
|
+
context = model(...(ngDevMode ? [undefined, { debugName: "context" }] : []));
|
|
3151
|
+
permissions = model(...(ngDevMode ? [undefined, { debugName: "permissions" }] : []));
|
|
2998
3152
|
get profils() {
|
|
2999
3153
|
return this._profils;
|
|
3000
3154
|
}
|
|
3001
3155
|
set profils(value) {
|
|
3002
3156
|
this._profils = value;
|
|
3003
|
-
this.cd.detectChanges();
|
|
3004
3157
|
}
|
|
3005
3158
|
_profils = [];
|
|
3006
3159
|
get canWrite() {
|
|
3007
|
-
return this.context.permission === TypePermission[TypePermission.write];
|
|
3160
|
+
return this.context().permission === TypePermission[TypePermission.write];
|
|
3008
3161
|
}
|
|
3009
3162
|
baseUrlProfils;
|
|
3010
3163
|
formControl = new UntypedFormControl();
|
|
3011
3164
|
formValueChanges$$;
|
|
3012
|
-
addPermission =
|
|
3013
|
-
removePermission =
|
|
3014
|
-
scopeChanged =
|
|
3165
|
+
addPermission = output();
|
|
3166
|
+
removePermission = output();
|
|
3167
|
+
scopeChanged = output();
|
|
3015
3168
|
ngOnInit() {
|
|
3016
3169
|
this.buildForm();
|
|
3017
3170
|
this.baseUrlProfils =
|
|
@@ -3040,392 +3193,147 @@ class ContextPermissionsComponent {
|
|
|
3040
3193
|
return profilNormalized.includes(filterNormalized);
|
|
3041
3194
|
});
|
|
3042
3195
|
}
|
|
3043
|
-
else {
|
|
3044
|
-
this.profils = [];
|
|
3045
|
-
}
|
|
3046
|
-
});
|
|
3047
|
-
}
|
|
3048
|
-
displayFn(profil) {
|
|
3049
|
-
return profil ? profil.title : undefined;
|
|
3050
|
-
}
|
|
3051
|
-
handleFormSubmit(value) {
|
|
3052
|
-
this.addPermission.emit(value);
|
|
3053
|
-
}
|
|
3054
|
-
buildForm() {
|
|
3055
|
-
this.form = this.formBuilder.group({
|
|
3056
|
-
profil: [],
|
|
3057
|
-
typePermission: ['read']
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
onProfilSelected(value) {
|
|
3061
|
-
this.form.setValue({
|
|
3062
|
-
profil: value.name,
|
|
3063
|
-
typePermission: this.form.value.typePermission
|
|
3064
|
-
});
|
|
3065
|
-
}
|
|
3066
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3067
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: "context", permissions: "permissions" }, outputs: { 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: ["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" }] });
|
|
3068
|
-
}
|
|
3069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3070
|
-
type: Component,
|
|
3071
|
-
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3072
|
-
MatRadioModule,
|
|
3073
|
-
FormsModule,
|
|
3074
|
-
ReactiveFormsModule,
|
|
3075
|
-
MatFormFieldModule,
|
|
3076
|
-
MatInputModule,
|
|
3077
|
-
MatAutocompleteModule,
|
|
3078
|
-
MatOptionModule,
|
|
3079
|
-
MatButtonModule,
|
|
3080
|
-
ListComponent,
|
|
3081
|
-
CollapsibleComponent,
|
|
3082
|
-
MatListModule,
|
|
3083
|
-
MatIconModule,
|
|
3084
|
-
StopPropagationDirective,
|
|
3085
|
-
MatTooltipModule,
|
|
3086
|
-
KeyValuePipe,
|
|
3087
|
-
IgoLanguageModule
|
|
3088
|
-
], 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"] }]
|
|
3089
|
-
}], propDecorators: { context: [{
|
|
3090
|
-
type: Input
|
|
3091
|
-
}], permissions: [{
|
|
3092
|
-
type: Input
|
|
3093
|
-
}], addPermission: [{
|
|
3094
|
-
type: Output
|
|
3095
|
-
}], removePermission: [{
|
|
3096
|
-
type: Output
|
|
3097
|
-
}], scopeChanged: [{
|
|
3098
|
-
type: Output
|
|
3099
|
-
}] } });
|
|
3100
|
-
|
|
3101
|
-
class ContextPermissionsBindingDirective {
|
|
3102
|
-
contextService = inject(ContextService);
|
|
3103
|
-
languageService = inject(LanguageService);
|
|
3104
|
-
messageService = inject(MessageService);
|
|
3105
|
-
cd = inject(ChangeDetectorRef);
|
|
3106
|
-
component;
|
|
3107
|
-
editedContext$$;
|
|
3108
|
-
onAddPermission(permission) {
|
|
3109
|
-
if (!permission.profil) {
|
|
3110
|
-
this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3111
|
-
return;
|
|
3112
|
-
}
|
|
3113
|
-
const contextId = this.component.context.id;
|
|
3114
|
-
this.contextService
|
|
3115
|
-
.addPermissionAssociation(contextId, permission.profil, permission.typePermission)
|
|
3116
|
-
.subscribe((profils) => {
|
|
3117
|
-
for (const p of profils) {
|
|
3118
|
-
this.component.permissions[permission.typePermission].push(p);
|
|
3119
|
-
}
|
|
3120
|
-
const profil = permission.profil;
|
|
3121
|
-
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
|
|
3122
|
-
this.cd.detectChanges();
|
|
3123
|
-
});
|
|
3124
|
-
}
|
|
3125
|
-
onRemovePermission(permission) {
|
|
3126
|
-
const contextId = this.component.context.id;
|
|
3127
|
-
this.contextService
|
|
3128
|
-
.deletePermissionAssociation(contextId, permission.id)
|
|
3129
|
-
.subscribe(() => {
|
|
3130
|
-
const index = this.component.permissions[permission.typePermission].findIndex((p) => {
|
|
3131
|
-
return p.id === permission.id;
|
|
3132
|
-
});
|
|
3133
|
-
this.component.permissions[permission.typePermission].splice(index, 1);
|
|
3134
|
-
const profil = permission.profil;
|
|
3135
|
-
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
|
|
3136
|
-
this.cd.detectChanges();
|
|
3137
|
-
});
|
|
3138
|
-
}
|
|
3139
|
-
onScopeChanged(context) {
|
|
3140
|
-
const scope = context.scope;
|
|
3141
|
-
this.contextService.update(context.id, { scope }).subscribe(() => {
|
|
3142
|
-
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3143
|
-
});
|
|
3144
|
-
}
|
|
3145
|
-
constructor() {
|
|
3146
|
-
const component = inject(ContextPermissionsComponent, { self: true });
|
|
3147
|
-
this.component = component;
|
|
3148
|
-
}
|
|
3149
|
-
ngOnInit() {
|
|
3150
|
-
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
3151
|
-
}
|
|
3152
|
-
ngOnDestroy() {
|
|
3153
|
-
this.editedContext$$.unsubscribe();
|
|
3154
|
-
this.contextService.editedContext$.next(undefined);
|
|
3155
|
-
}
|
|
3156
|
-
handleEditedContextChange(context) {
|
|
3157
|
-
this.component.context = context;
|
|
3158
|
-
if (context) {
|
|
3159
|
-
this.contextService
|
|
3160
|
-
.getPermissions(context.id)
|
|
3161
|
-
.subscribe((permissionsArray) => {
|
|
3162
|
-
permissionsArray = permissionsArray || [];
|
|
3163
|
-
const permissions = {
|
|
3164
|
-
read: permissionsArray.filter((p) => {
|
|
3165
|
-
return p.typePermission.toString() === 'read';
|
|
3166
|
-
}),
|
|
3167
|
-
write: permissionsArray.filter((p) => {
|
|
3168
|
-
return p.typePermission.toString() === 'write';
|
|
3169
|
-
})
|
|
3170
|
-
};
|
|
3171
|
-
return (this.component.permissions = permissions);
|
|
3172
|
-
});
|
|
3173
|
-
}
|
|
3174
|
-
}
|
|
3175
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3176
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: ContextPermissionsBindingDirective, isStandalone: true, selector: "[igoContextPermissionsBinding]", host: { listeners: { "addPermission": "onAddPermission($event)", "removePermission": "onRemovePermission($event)", "scopeChanged": "onScopeChanged($event)" } }, ngImport: i0 });
|
|
3177
|
-
}
|
|
3178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
|
|
3179
|
-
type: Directive,
|
|
3180
|
-
args: [{
|
|
3181
|
-
selector: '[igoContextPermissionsBinding]',
|
|
3182
|
-
standalone: true
|
|
3183
|
-
}]
|
|
3184
|
-
}], ctorParameters: () => [], propDecorators: { onAddPermission: [{
|
|
3185
|
-
type: HostListener,
|
|
3186
|
-
args: ['addPermission', ['$event']]
|
|
3187
|
-
}], onRemovePermission: [{
|
|
3188
|
-
type: HostListener,
|
|
3189
|
-
args: ['removePermission', ['$event']]
|
|
3190
|
-
}], onScopeChanged: [{
|
|
3191
|
-
type: HostListener,
|
|
3192
|
-
args: ['scopeChanged', ['$event']]
|
|
3193
|
-
}] } });
|
|
3194
|
-
|
|
3195
|
-
class LayerContextDirective {
|
|
3196
|
-
component = inject(MapBrowserComponent);
|
|
3197
|
-
contextService = inject(ContextService);
|
|
3198
|
-
layerService = inject(LayerService);
|
|
3199
|
-
configService = inject(ConfigService);
|
|
3200
|
-
styleListService = inject(StyleListService);
|
|
3201
|
-
styleService = inject(StyleService);
|
|
3202
|
-
shareMapService = inject(ShareMapService);
|
|
3203
|
-
context$$;
|
|
3204
|
-
queryParams;
|
|
3205
|
-
contextLayers = [];
|
|
3206
|
-
removeLayersOnContextChange = true;
|
|
3207
|
-
contextLayersLoaded = new EventEmitter();
|
|
3208
|
-
get map() {
|
|
3209
|
-
return this.component.map;
|
|
3210
|
-
}
|
|
3211
|
-
ngOnInit() {
|
|
3212
|
-
this.context$$ = this.shareMapService.routeService.queryParams
|
|
3213
|
-
.pipe(switchMap((params) => {
|
|
3214
|
-
this.queryParams = params ?? {};
|
|
3215
|
-
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
3216
|
-
}))
|
|
3217
|
-
.subscribe((context) => this.handleContextChange(context));
|
|
3218
|
-
}
|
|
3219
|
-
ngOnDestroy() {
|
|
3220
|
-
this.context$$.unsubscribe();
|
|
3221
|
-
}
|
|
3222
|
-
handleContextChange(context) {
|
|
3223
|
-
if (context.layers === undefined) {
|
|
3224
|
-
return;
|
|
3225
|
-
}
|
|
3226
|
-
/**
|
|
3227
|
-
* Assign an id to each layer group if it doesn't have one.
|
|
3228
|
-
* 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
|
|
3229
|
-
*/
|
|
3230
|
-
if (context.layers?.length) {
|
|
3231
|
-
addIdToGroups(context.layers);
|
|
3232
|
-
}
|
|
3233
|
-
const contextLayers = this.handleContextWithSharedUrl(ObjectUtils.copyDeep(context));
|
|
3234
|
-
if (this.removeLayersOnContextChange === true) {
|
|
3235
|
-
this.map.layerController.reset();
|
|
3236
|
-
}
|
|
3237
|
-
else {
|
|
3238
|
-
this.map.layerController.remove(...this.contextLayers);
|
|
3239
|
-
}
|
|
3240
|
-
this.contextLayers = [];
|
|
3241
|
-
this.layerService.unavailableLayers = [];
|
|
3242
|
-
const importExportOptions = this.configService.getConfig('importExport');
|
|
3243
|
-
this.layerService
|
|
3244
|
-
.createLayers(contextLayers, context.uri)
|
|
3245
|
-
.subscribe((layers) => {
|
|
3246
|
-
this.handleAddLayers(layers);
|
|
3247
|
-
if (context.extraFeatures) {
|
|
3248
|
-
context.extraFeatures.forEach((featureCollection) => {
|
|
3249
|
-
if (!importExportOptions?.importWithStyle) {
|
|
3250
|
-
addImportedFeaturesToMap(featureCollection, this.map);
|
|
3251
|
-
}
|
|
3252
|
-
else {
|
|
3253
|
-
addImportedFeaturesStyledToMap(featureCollection, this.map, this.styleListService, this.styleService);
|
|
3254
|
-
}
|
|
3255
|
-
});
|
|
3256
|
-
}
|
|
3257
|
-
this.contextLayersLoaded.emit(true);
|
|
3258
|
-
});
|
|
3259
|
-
if (this.configService.getConfig('importExport.allowToStoreLayer', false)) {
|
|
3260
|
-
this.layerService
|
|
3261
|
-
.createAsyncIdbLayers(context.uri)
|
|
3262
|
-
.pipe(debounceTime(500))
|
|
3263
|
-
.subscribe((layers) => this.handleAddLayers(layers));
|
|
3264
|
-
}
|
|
3265
|
-
}
|
|
3266
|
-
handleAddLayers(layers) {
|
|
3267
|
-
const layersFiltrered = layers
|
|
3268
|
-
.filter((layer) => layer)
|
|
3269
|
-
.map((layer) => {
|
|
3270
|
-
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
3271
|
-
return layer;
|
|
3272
|
-
});
|
|
3273
|
-
const layersSorted = sortLayersByZindex(layersFiltrered, 'asc');
|
|
3274
|
-
this.contextLayers.concat(layersSorted);
|
|
3275
|
-
this.map.layerController.add(...layersSorted);
|
|
3276
|
-
}
|
|
3277
|
-
computeLayerVisibilityFromUrl(layer) {
|
|
3278
|
-
const params = this.queryParams;
|
|
3279
|
-
const currentContext = this.contextService.context$.value.uri;
|
|
3280
|
-
const currentLayerid = layer.id;
|
|
3281
|
-
let visible = layer.visible;
|
|
3282
|
-
if (!params || !currentLayerid) {
|
|
3283
|
-
return visible;
|
|
3284
|
-
}
|
|
3285
|
-
const contextParams = this.shareMapService.getContext(params);
|
|
3286
|
-
if (contextParams === currentContext || !contextParams) {
|
|
3287
|
-
let visibleOnLayersParams = '';
|
|
3288
|
-
let visibleOffLayersParams = '';
|
|
3289
|
-
let visiblelayers = [];
|
|
3290
|
-
let invisiblelayers = [];
|
|
3291
|
-
const visibleOnLayers = params[this.shareMapService.routeService.options.visibleOnLayersKey];
|
|
3292
|
-
const visibleOffLayers = params[this.shareMapService.routeService.options.visibleOffLayersKey];
|
|
3293
|
-
if (visibleOnLayers) {
|
|
3294
|
-
visibleOnLayersParams = visibleOnLayers;
|
|
3295
|
-
}
|
|
3296
|
-
if (visibleOffLayers) {
|
|
3297
|
-
visibleOffLayersParams = visibleOffLayers;
|
|
3298
|
-
}
|
|
3299
|
-
/* This order is important because to control whichever
|
|
3300
|
-
the order of * param. First whe open and close everything.*/
|
|
3301
|
-
if (visibleOnLayersParams === '*') {
|
|
3302
|
-
visible = true;
|
|
3303
|
-
}
|
|
3304
|
-
if (visibleOffLayersParams === '*') {
|
|
3305
|
-
visible = false;
|
|
3306
|
-
}
|
|
3307
|
-
// After, managing named layer by id (context.json OR id from datasource)
|
|
3308
|
-
visiblelayers = visibleOnLayersParams.split(',');
|
|
3309
|
-
invisiblelayers = visibleOffLayersParams.split(',');
|
|
3310
|
-
if (visiblelayers.indexOf(currentLayerid) > -1 ||
|
|
3311
|
-
visiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
3312
|
-
visible = true;
|
|
3313
|
-
}
|
|
3314
|
-
if (invisiblelayers.indexOf(currentLayerid) > -1 ||
|
|
3315
|
-
invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
|
|
3316
|
-
visible = false;
|
|
3317
|
-
}
|
|
3318
|
-
}
|
|
3319
|
-
return visible;
|
|
3320
|
-
}
|
|
3321
|
-
handleContextWithSharedUrl(context) {
|
|
3322
|
-
if (!this.queryParams ||
|
|
3323
|
-
(!hasLegacyParams(this.queryParams, this.shareMapService.optionsLegacy) &&
|
|
3324
|
-
!hasModernShareParams(this.queryParams, this.shareMapService.keysDefinitions))) {
|
|
3325
|
-
return context.layers;
|
|
3326
|
-
}
|
|
3327
|
-
const { layers, uri } = context;
|
|
3328
|
-
const contextValue = this.shareMapService.getContext(this.queryParams);
|
|
3329
|
-
if (!contextValue || contextValue === uri) {
|
|
3330
|
-
const layersOptions = this.shareMapService.parser.parseLayers(this.queryParams);
|
|
3331
|
-
if (layersOptions.length) {
|
|
3332
|
-
return mergeLayersOptions([...layers], layersOptions);
|
|
3333
|
-
}
|
|
3334
|
-
}
|
|
3335
|
-
return layers;
|
|
3336
|
-
}
|
|
3337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LayerContextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3338
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: LayerContextDirective, isStandalone: true, selector: "[igoLayerContext]", inputs: { removeLayersOnContextChange: "removeLayersOnContextChange" }, outputs: { contextLayersLoaded: "contextLayersLoaded" }, ngImport: i0 });
|
|
3339
|
-
}
|
|
3340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LayerContextDirective, decorators: [{
|
|
3341
|
-
type: Directive,
|
|
3342
|
-
args: [{
|
|
3343
|
-
selector: '[igoLayerContext]'
|
|
3344
|
-
}]
|
|
3345
|
-
}], propDecorators: { removeLayersOnContextChange: [{
|
|
3346
|
-
type: Input
|
|
3347
|
-
}], contextLayersLoaded: [{
|
|
3348
|
-
type: Output
|
|
3349
|
-
}] } });
|
|
3350
|
-
/** Recursive */
|
|
3351
|
-
function addIdToGroups(layerOptions) {
|
|
3352
|
-
for (const options of layerOptions) {
|
|
3353
|
-
if (isLayerGroupOptions(options) && !options.id) {
|
|
3354
|
-
options.id = ID_GROUP_PREFIX + uuid();
|
|
3355
|
-
if (Array.isArray(options.children)) {
|
|
3356
|
-
addIdToGroups(options.children);
|
|
3196
|
+
else {
|
|
3197
|
+
this.profils = [];
|
|
3357
3198
|
}
|
|
3358
|
-
}
|
|
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
|
+
});
|
|
3359
3218
|
}
|
|
3219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: ContextPermissionsComponent, isStandalone: true, selector: "igo-context-permissions", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { context: "contextChange", permissions: "permissionsChange", addPermission: "addPermission", removePermission: "removePermission", scopeChanged: "scopeChanged" }, ngImport: i0, template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i1$3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ListComponent, selector: "igo-list", inputs: ["navigation", "selection"] }, { kind: "component", type: CollapsibleComponent, selector: "igo-collapsible", inputs: ["title", "collapsed"], outputs: ["collapsedChange", "toggle"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i5$1.TranslatePipe, name: "translate" }] });
|
|
3360
3221
|
}
|
|
3222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsComponent, decorators: [{
|
|
3223
|
+
type: Component,
|
|
3224
|
+
args: [{ selector: 'igo-context-permissions', imports: [
|
|
3225
|
+
MatRadioModule,
|
|
3226
|
+
FormsModule,
|
|
3227
|
+
ReactiveFormsModule,
|
|
3228
|
+
MatFormFieldModule,
|
|
3229
|
+
MatInputModule,
|
|
3230
|
+
MatAutocompleteModule,
|
|
3231
|
+
MatOptionModule,
|
|
3232
|
+
MatButtonModule,
|
|
3233
|
+
ListComponent,
|
|
3234
|
+
CollapsibleComponent,
|
|
3235
|
+
MatListModule,
|
|
3236
|
+
MatIconModule,
|
|
3237
|
+
StopPropagationDirective,
|
|
3238
|
+
MatTooltipModule,
|
|
3239
|
+
KeyValuePipe,
|
|
3240
|
+
IgoLanguageModule
|
|
3241
|
+
], template: "@if (context()) {\n <div>\n @if (!canWrite) {\n <div class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n }\n @if (canWrite) {\n <div class=\"scopeForm\">\n <mat-radio-group\n [(ngModel)]=\"context().scope\"\n (change)=\"scopeChanged.emit(context())\"\n >\n <mat-radio-button value=\"private\">\n {{ 'igo.context.permission.scope.private' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"protected\">\n {{ 'igo.context.permission.scope.shared' | translate }}\n </mat-radio-button>\n @if (authService.isAdmin) {\n <mat-radio-button value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </div>\n }\n @if (context().scope !== 'private' && canWrite) {\n <form [formGroup]=\"form\" (ngSubmit)=\"handleFormSubmit(form.value)\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\"\n />\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\"\n >\n @for (profil of this.profils; track profil) {\n <mat-option [value]=\"profil\">\n {{ profil.title }}<br />\n <small>{{ profil.name }}</small>\n </mat-option>\n }\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-radio-group formControlName=\"typePermission\">\n <mat-radio-button value=\"read\">\n {{ 'igo.context.permission.read' | translate }}\n </mat-radio-button>\n <mat-radio-button value=\"write\">\n {{ 'igo.context.permission.write' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n <div class=\"igo-form-button-group\">\n <button matButton=\"elevated\" type=\"submit\" [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n </form>\n }\n @if (permissions() && context().scope !== 'private') {\n <igo-list>\n @for (\n groupPermissions of permissions() | keyvalue;\n track groupPermissions\n ) {\n @if (groupPermissions.value.length) {\n <igo-collapsible\n [title]=\"\n 'igo.context.permission.' + groupPermissions.key | translate\n \"\n >\n @for (permission of groupPermissions.value; track permission) {\n <mat-list-item>\n <mat-icon matListItemIcon>person</mat-icon>\n <h4 matListItemTitle>\n {{ permission.profilTitle }}\n <small>{{ permission.profil }}</small>\n </h4>\n <div\n matListItemMeta\n igoStopPropagation\n class=\"igo-actions-container\"\n >\n @if (\n canWrite ||\n permission.profil ===\n authService.decodeToken().user.sourceId\n ) {\n <button\n mat-icon-button\n [matTooltip]=\"\n 'igo.context().permission.delete' | translate\n \"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </mat-list-item>\n }\n </igo-collapsible>\n }\n }\n </igo-list>\n }\n </div>\n}\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}\n"] }]
|
|
3242
|
+
}], propDecorators: { context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }, { type: i0.Output, args: ["contextChange"] }], permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: false }] }, { type: i0.Output, args: ["permissionsChange"] }], addPermission: [{ type: i0.Output, args: ["addPermission"] }], removePermission: [{ type: i0.Output, args: ["removePermission"] }], scopeChanged: [{ type: i0.Output, args: ["scopeChanged"] }] } });
|
|
3361
3243
|
|
|
3362
|
-
class
|
|
3244
|
+
class ContextPermissionsBindingDirective {
|
|
3363
3245
|
contextService = inject(ContextService);
|
|
3364
|
-
|
|
3365
|
-
|
|
3246
|
+
languageService = inject(LanguageService);
|
|
3247
|
+
messageService = inject(MessageService);
|
|
3248
|
+
cd = inject(ChangeDetectorRef);
|
|
3366
3249
|
component;
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
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
|
+
});
|
|
3370
3287
|
}
|
|
3371
|
-
queryParams;
|
|
3372
3288
|
constructor() {
|
|
3373
|
-
const component = inject(
|
|
3289
|
+
const component = inject(ContextPermissionsComponent, { self: true });
|
|
3374
3290
|
this.component = component;
|
|
3375
3291
|
}
|
|
3376
3292
|
ngOnInit() {
|
|
3377
|
-
this.
|
|
3378
|
-
.pipe(switchMap((params) => {
|
|
3379
|
-
this.queryParams = params ?? {};
|
|
3380
|
-
return this.contextService.context$.pipe(filter((context) => context !== undefined));
|
|
3381
|
-
}))
|
|
3382
|
-
.subscribe((context) => this.handleContextChange(context));
|
|
3293
|
+
this.editedContext$$ = this.contextService.editedContext$.subscribe((context) => this.handleEditedContextChange(context));
|
|
3383
3294
|
}
|
|
3384
3295
|
ngOnDestroy() {
|
|
3385
|
-
this.
|
|
3296
|
+
this.editedContext$$.unsubscribe();
|
|
3297
|
+
this.contextService.editedContext$.next(undefined);
|
|
3386
3298
|
}
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
this.component.map.geolocationController.updateGeolocationOptions(viewContext);
|
|
3405
|
-
}
|
|
3406
|
-
const controlsContext = context.map.controls;
|
|
3407
|
-
if (!this.component.controls && controlsContext) {
|
|
3408
|
-
if (this.mediaService.isMobile()) {
|
|
3409
|
-
if (typeof controlsContext.scaleLine !== 'boolean') {
|
|
3410
|
-
const scaleLineOption = controlsContext.scaleLine;
|
|
3411
|
-
if (!scaleLineOption.minWidth) {
|
|
3412
|
-
scaleLineOption.minWidth = Math.min(64, scaleLineOption.minWidth);
|
|
3413
|
-
controlsContext.scaleLine = scaleLineOption;
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
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
|
+
});
|
|
3418
3316
|
}
|
|
3419
3317
|
}
|
|
3420
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3421
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
3318
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsBindingDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3319
|
+
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 });
|
|
3422
3320
|
}
|
|
3423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextPermissionsBindingDirective, decorators: [{
|
|
3424
3322
|
type: Directive,
|
|
3425
3323
|
args: [{
|
|
3426
|
-
selector: '[
|
|
3324
|
+
selector: '[igoContextPermissionsBinding]',
|
|
3325
|
+
standalone: true
|
|
3427
3326
|
}]
|
|
3428
|
-
}], 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
|
+
}] } });
|
|
3429
3337
|
|
|
3430
3338
|
/**
|
|
3431
3339
|
* @deprecated import the components/directives directly or CONTEXT_MANAGER_DIRECTIVES for the set
|
|
@@ -3436,42 +3344,36 @@ class IgoContextManagerModule {
|
|
|
3436
3344
|
ngModule: IgoContextManagerModule
|
|
3437
3345
|
};
|
|
3438
3346
|
}
|
|
3439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3440
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3441
|
-
ContextListBindingDirective,
|
|
3347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3348
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3442
3349
|
ContextItemComponent,
|
|
3443
3350
|
ContextFormComponent,
|
|
3444
3351
|
ContextEditComponent,
|
|
3445
|
-
ContextEditBindingDirective,
|
|
3446
3352
|
ContextPermissionsComponent,
|
|
3447
3353
|
ContextPermissionsBindingDirective,
|
|
3448
3354
|
LayerContextDirective,
|
|
3449
3355
|
MapContextDirective], exports: [ContextListComponent,
|
|
3450
|
-
ContextListBindingDirective,
|
|
3451
3356
|
ContextItemComponent,
|
|
3452
3357
|
ContextFormComponent,
|
|
3453
3358
|
ContextEditComponent,
|
|
3454
|
-
ContextEditBindingDirective,
|
|
3455
3359
|
ContextPermissionsComponent,
|
|
3456
3360
|
ContextPermissionsBindingDirective,
|
|
3457
3361
|
LayerContextDirective,
|
|
3458
3362
|
MapContextDirective] });
|
|
3459
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3363
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextManagerModule, imports: [ContextListComponent,
|
|
3460
3364
|
ContextItemComponent,
|
|
3461
3365
|
ContextFormComponent,
|
|
3462
3366
|
ContextEditComponent,
|
|
3463
3367
|
ContextPermissionsComponent] });
|
|
3464
3368
|
}
|
|
3465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextManagerModule, decorators: [{
|
|
3466
3370
|
type: NgModule,
|
|
3467
3371
|
args: [{
|
|
3468
3372
|
imports: [
|
|
3469
3373
|
ContextListComponent,
|
|
3470
|
-
ContextListBindingDirective,
|
|
3471
3374
|
ContextItemComponent,
|
|
3472
3375
|
ContextFormComponent,
|
|
3473
3376
|
ContextEditComponent,
|
|
3474
|
-
ContextEditBindingDirective,
|
|
3475
3377
|
ContextPermissionsComponent,
|
|
3476
3378
|
ContextPermissionsBindingDirective,
|
|
3477
3379
|
LayerContextDirective,
|
|
@@ -3479,11 +3381,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3479
3381
|
],
|
|
3480
3382
|
exports: [
|
|
3481
3383
|
ContextListComponent,
|
|
3482
|
-
ContextListBindingDirective,
|
|
3483
3384
|
ContextItemComponent,
|
|
3484
3385
|
ContextFormComponent,
|
|
3485
3386
|
ContextEditComponent,
|
|
3486
|
-
ContextEditBindingDirective,
|
|
3487
3387
|
ContextPermissionsComponent,
|
|
3488
3388
|
ContextPermissionsBindingDirective,
|
|
3489
3389
|
LayerContextDirective,
|
|
@@ -3526,10 +3426,10 @@ class BookmarkButtonComponent {
|
|
|
3526
3426
|
}
|
|
3527
3427
|
});
|
|
3528
3428
|
}
|
|
3529
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3530
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BookmarkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", 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" }] });
|
|
3531
3431
|
}
|
|
3532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BookmarkButtonComponent, decorators: [{
|
|
3533
3433
|
type: Component,
|
|
3534
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"] }]
|
|
3535
3435
|
}], propDecorators: { map: [{
|
|
@@ -3541,10 +3441,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3541
3441
|
class PoiDialogComponent {
|
|
3542
3442
|
dialogRef = inject(MatDialogRef);
|
|
3543
3443
|
title;
|
|
3544
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3545
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3445
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", 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" }] });
|
|
3546
3446
|
}
|
|
3547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiDialogComponent, decorators: [{
|
|
3548
3448
|
type: Component,
|
|
3549
3449
|
args: [{ selector: 'igo-poi-dialog', imports: [
|
|
3550
3450
|
MatDialogTitle,
|
|
@@ -3580,10 +3480,10 @@ class PoiService {
|
|
|
3580
3480
|
const url = this.baseUrl + '/pois';
|
|
3581
3481
|
return this.http.post(url, context);
|
|
3582
3482
|
}
|
|
3583
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3584
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3483
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3484
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiService });
|
|
3585
3485
|
}
|
|
3586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiService, decorators: [{
|
|
3587
3487
|
type: Injectable
|
|
3588
3488
|
}], ctorParameters: () => [] });
|
|
3589
3489
|
|
|
@@ -3685,10 +3585,10 @@ class PoiButtonComponent {
|
|
|
3685
3585
|
easing: oleasing.easeOut
|
|
3686
3586
|
});
|
|
3687
3587
|
}
|
|
3688
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3689
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3588
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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" }] });
|
|
3690
3590
|
}
|
|
3691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: PoiButtonComponent, decorators: [{
|
|
3692
3592
|
type: Component,
|
|
3693
3593
|
args: [{ selector: 'igo-poi-button', imports: [
|
|
3694
3594
|
MatSelectModule,
|
|
@@ -3697,8 +3597,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3697
3597
|
StopPropagationDirective,
|
|
3698
3598
|
MatIconModule,
|
|
3699
3599
|
MatDividerModule,
|
|
3600
|
+
MatTooltipModule,
|
|
3700
3601
|
IgoLanguageModule
|
|
3701
|
-
], 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"] }]
|
|
3702
3603
|
}], propDecorators: { map: [{
|
|
3703
3604
|
type: Input
|
|
3704
3605
|
}], color: [{
|
|
@@ -3735,10 +3636,10 @@ class UserDialogComponent {
|
|
|
3735
3636
|
clearPreferences() {
|
|
3736
3637
|
this.storageService.clear();
|
|
3737
3638
|
}
|
|
3738
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3739
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
3639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: UserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", 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" }] });
|
|
3740
3641
|
}
|
|
3741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: UserDialogComponent, decorators: [{
|
|
3742
3643
|
type: Component,
|
|
3743
3644
|
args: [{ selector: 'igo-user-dialog', imports: [
|
|
3744
3645
|
MatDialogTitle,
|
|
@@ -3789,10 +3690,10 @@ class UserButtonComponent {
|
|
|
3789
3690
|
infoUser() {
|
|
3790
3691
|
this.dialog.open(UserDialogComponent, { disableClose: false });
|
|
3791
3692
|
}
|
|
3792
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3793
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3693
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: UserButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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()] });
|
|
3794
3695
|
}
|
|
3795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: UserButtonComponent, decorators: [{
|
|
3796
3697
|
type: Component,
|
|
3797
3698
|
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], imports: [
|
|
3798
3699
|
PoiButtonComponent,
|
|
@@ -3800,7 +3701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3800
3701
|
MatTooltipModule,
|
|
3801
3702
|
MatIconModule,
|
|
3802
3703
|
IgoLanguageModule
|
|
3803
|
-
], 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\"
|
|
3704
|
+
], 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"] }]
|
|
3804
3705
|
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
3805
3706
|
type: Input
|
|
3806
3707
|
}], color: [{
|
|
@@ -3816,20 +3717,20 @@ class IgoContextMapButtonModule {
|
|
|
3816
3717
|
ngModule: IgoContextMapButtonModule
|
|
3817
3718
|
};
|
|
3818
3719
|
}
|
|
3819
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3820
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMapButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3721
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMapButtonModule, imports: [BookmarkButtonComponent,
|
|
3821
3722
|
BookmarkDialogComponent,
|
|
3822
3723
|
PoiButtonComponent,
|
|
3823
3724
|
UserButtonComponent], exports: [BookmarkButtonComponent,
|
|
3824
3725
|
PoiButtonComponent,
|
|
3825
3726
|
UserButtonComponent,
|
|
3826
3727
|
BookmarkDialogComponent] });
|
|
3827
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3728
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMapButtonModule, providers: [PoiService], imports: [BookmarkButtonComponent,
|
|
3828
3729
|
BookmarkDialogComponent,
|
|
3829
3730
|
PoiButtonComponent,
|
|
3830
3731
|
UserButtonComponent] });
|
|
3831
3732
|
}
|
|
3832
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMapButtonModule, decorators: [{
|
|
3833
3734
|
type: NgModule,
|
|
3834
3735
|
args: [{
|
|
3835
3736
|
imports: [
|
|
@@ -3848,137 +3749,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3848
3749
|
}]
|
|
3849
3750
|
}] });
|
|
3850
3751
|
|
|
3851
|
-
const CONTEXT_MANAGER_DIRECTIVES = [
|
|
3852
|
-
ContextListComponent,
|
|
3853
|
-
ContextListBindingDirective,
|
|
3854
|
-
ContextItemComponent,
|
|
3855
|
-
ContextFormComponent,
|
|
3856
|
-
ContextEditComponent,
|
|
3857
|
-
ContextEditBindingDirective,
|
|
3858
|
-
ContextPermissionsComponent,
|
|
3859
|
-
ContextPermissionsBindingDirective,
|
|
3860
|
-
MapContextDirective,
|
|
3861
|
-
LayerContextDirective
|
|
3862
|
-
];
|
|
3863
|
-
|
|
3864
|
-
class ShareMapApiComponent {
|
|
3865
|
-
clipboard = inject(Clipboard);
|
|
3866
|
-
languageService = inject(LanguageService);
|
|
3867
|
-
messageService = inject(MessageService);
|
|
3868
|
-
auth = inject(AuthService);
|
|
3869
|
-
shareMapService = inject(ShareMapService);
|
|
3870
|
-
formBuilder = inject(UntypedFormBuilder);
|
|
3871
|
-
contextService = inject(ContextService);
|
|
3872
|
-
form;
|
|
3873
|
-
map;
|
|
3874
|
-
url;
|
|
3875
|
-
userId;
|
|
3876
|
-
idContextShared;
|
|
3877
|
-
ngOnInit() {
|
|
3878
|
-
this.auth.authenticate$.subscribe(() => {
|
|
3879
|
-
const decodeToken = this.auth.decodeToken();
|
|
3880
|
-
this.userId = decodeToken?.user?.id.toString();
|
|
3881
|
-
this.buildForm();
|
|
3882
|
-
});
|
|
3883
|
-
}
|
|
3884
|
-
createUrl(values = {}) {
|
|
3885
|
-
const inputs = Object.assign({}, values);
|
|
3886
|
-
inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
|
|
3887
|
-
this.url = this.shareMapService.getUrlWithApi(inputs);
|
|
3888
|
-
this.createContextShared(this.map, inputs).subscribe((rep) => {
|
|
3889
|
-
this.idContextShared = rep.id;
|
|
3890
|
-
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
3891
|
-
}, (err) => {
|
|
3892
|
-
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
3893
|
-
this.messageService.showError(err);
|
|
3894
|
-
});
|
|
3895
|
-
}
|
|
3896
|
-
updateContextShared(values = {}) {
|
|
3897
|
-
const inputs = Object.assign({}, values);
|
|
3898
|
-
inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
|
|
3899
|
-
this._updateContextShared(this.map, inputs, this.idContextShared).subscribe(() => {
|
|
3900
|
-
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
3901
|
-
}, (err) => {
|
|
3902
|
-
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
3903
|
-
this.messageService.showError(err);
|
|
3904
|
-
});
|
|
3905
|
-
}
|
|
3906
|
-
copyTextToClipboard(textArea) {
|
|
3907
|
-
const successful = this.clipboard.copy(textArea.value);
|
|
3908
|
-
if (successful) {
|
|
3909
|
-
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3910
|
-
}
|
|
3911
|
-
}
|
|
3912
|
-
buildForm() {
|
|
3913
|
-
this.url = undefined;
|
|
3914
|
-
const id = uuid();
|
|
3915
|
-
let title = 'Partage ';
|
|
3916
|
-
title += this.userId ? `(${this.userId}-${id})` : `(${id})`;
|
|
3917
|
-
this.form = this.formBuilder.group({
|
|
3918
|
-
title: [title],
|
|
3919
|
-
uri: [id]
|
|
3920
|
-
});
|
|
3921
|
-
}
|
|
3922
|
-
createContextShared(map, formValues) {
|
|
3923
|
-
const context = this.contextService.getContextFromMap(map);
|
|
3924
|
-
context.scope = 'public';
|
|
3925
|
-
context.title = formValues.title;
|
|
3926
|
-
context.uri = formValues.uri;
|
|
3927
|
-
return this.contextService.create(context);
|
|
3928
|
-
}
|
|
3929
|
-
_updateContextShared(map, formValues, id) {
|
|
3930
|
-
const context = this.contextService.getContextFromMap(map);
|
|
3931
|
-
return this.contextService.update(id, {
|
|
3932
|
-
title: formValues.title,
|
|
3933
|
-
map: context.map
|
|
3934
|
-
});
|
|
3935
|
-
}
|
|
3936
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ShareMapApiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3937
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ShareMapApiComponent, isStandalone: true, selector: "igo-share-map-api", inputs: { map: "map" }, ngImport: i0, template: "<form class=\"igo-form\" [formGroup]=\"form\" (ngSubmit)=\"createUrl(form.value)\">\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input\n matInput\n required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\"\n />\n <mat-error>\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n\n <div id=\"uriInput\" class=\"igo-input-container\">\n <mat-form-field>\n @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" }] });
|
|
3938
|
-
}
|
|
3939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ShareMapApiComponent, decorators: [{
|
|
3940
|
-
type: Component,
|
|
3941
|
-
args: [{ selector: 'igo-share-map-api', imports: [
|
|
3942
|
-
FormsModule,
|
|
3943
|
-
ReactiveFormsModule,
|
|
3944
|
-
MatFormFieldModule,
|
|
3945
|
-
MatInputModule,
|
|
3946
|
-
MatButtonModule,
|
|
3947
|
-
MatTooltipModule,
|
|
3948
|
-
MatIconModule,
|
|
3949
|
-
IgoLanguageModule
|
|
3950
|
-
], 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"] }]
|
|
3951
|
-
}], propDecorators: { map: [{
|
|
3952
|
-
type: Input
|
|
3953
|
-
}] } });
|
|
3954
|
-
|
|
3955
3752
|
class ShareMapUrlComponent {
|
|
3956
3753
|
clipboard = inject(Clipboard);
|
|
3957
3754
|
messageService = inject(MessageService);
|
|
3958
3755
|
shareMapService = inject(ShareMapService);
|
|
3959
3756
|
contextService = inject(ContextService);
|
|
3960
3757
|
cdRef = inject(ChangeDetectorRef);
|
|
3961
|
-
route = inject(RouteService);
|
|
3962
3758
|
mapState$$;
|
|
3963
|
-
map;
|
|
3759
|
+
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3964
3760
|
url;
|
|
3965
|
-
publicShareOption = {
|
|
3966
|
-
layerlistControls: { querystring: '' }
|
|
3967
|
-
};
|
|
3968
|
-
language;
|
|
3969
|
-
constructor() {
|
|
3970
|
-
this.route.queryParams.subscribe((params) => {
|
|
3971
|
-
const lang = params[this.route.options.languageKey];
|
|
3972
|
-
if (lang) {
|
|
3973
|
-
this.language = lang;
|
|
3974
|
-
}
|
|
3975
|
-
});
|
|
3976
|
-
}
|
|
3977
3761
|
ngOnInit() {
|
|
3978
3762
|
this.generateUrl();
|
|
3979
3763
|
this.mapState$$ = combineLatest([
|
|
3980
|
-
this.map.viewController.state$,
|
|
3981
|
-
this.map.status$
|
|
3764
|
+
this.map().viewController.state$,
|
|
3765
|
+
this.map().status$
|
|
3982
3766
|
]).subscribe(() => {
|
|
3983
3767
|
this.generateUrl();
|
|
3984
3768
|
this.cdRef.detectChanges();
|
|
@@ -3988,7 +3772,7 @@ class ShareMapUrlComponent {
|
|
|
3988
3772
|
this.mapState$$?.unsubscribe();
|
|
3989
3773
|
}
|
|
3990
3774
|
generateUrl() {
|
|
3991
|
-
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);
|
|
3992
3776
|
}
|
|
3993
3777
|
copyTextToClipboard(textArea) {
|
|
3994
3778
|
const successful = this.clipboard.copy(textArea.value);
|
|
@@ -3996,49 +3780,34 @@ class ShareMapUrlComponent {
|
|
|
3996
3780
|
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
3997
3781
|
}
|
|
3998
3782
|
}
|
|
3999
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4000
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3783
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapUrlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3784
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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" }] });
|
|
4001
3785
|
}
|
|
4002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapUrlComponent, decorators: [{
|
|
4003
3787
|
type: Component,
|
|
4004
3788
|
args: [{ selector: 'igo-share-map-url', imports: [
|
|
4005
3789
|
MatFormFieldModule,
|
|
4006
3790
|
MatInputModule,
|
|
4007
3791
|
MatButtonModule,
|
|
4008
3792
|
MatIconModule,
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
], 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
|
|
4012
|
-
}],
|
|
4013
|
-
type: Input
|
|
4014
|
-
}] } });
|
|
3793
|
+
IgoLanguageModule,
|
|
3794
|
+
CustomHtmlComponent
|
|
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"] }]
|
|
3796
|
+
}], propDecorators: { map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }] } });
|
|
4015
3797
|
|
|
4016
3798
|
class ShareMapComponent {
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
constructor() {
|
|
4021
|
-
this.hasApi = this.config.getConfig('context.url') ? true : false;
|
|
4022
|
-
}
|
|
4023
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4024
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ShareMapComponent, isStandalone: true, selector: "igo-share-map", inputs: { map: "map" }, 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\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n </mat-tab-group>\n}\n\n@if (!hasApi) {\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\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" }] });
|
|
3799
|
+
map = input(undefined, ...(ngDevMode ? [{ debugName: "map" }] : []));
|
|
3800
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3801
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.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: "<igo-share-map-url [map]=\"map()\" />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: ShareMapUrlComponent, selector: "igo-share-map-url", inputs: ["map"] }] });
|
|
4025
3802
|
}
|
|
4026
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ShareMapComponent, decorators: [{
|
|
4027
3804
|
type: Component,
|
|
4028
|
-
args: [{ selector: 'igo-share-map', imports: [
|
|
4029
|
-
|
|
4030
|
-
ShareMapApiComponent,
|
|
4031
|
-
ShareMapUrlComponent,
|
|
4032
|
-
IgoLanguageModule
|
|
4033
|
-
], template: "@if (hasApi) {\n <mat-tab-group>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\n </mat-tab>\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n </mat-tab>\n </mat-tab-group>\n}\n\n@if (!hasApi) {\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\n}\n" }]
|
|
4034
|
-
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
4035
|
-
type: Input
|
|
4036
|
-
}] } });
|
|
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 }] }] } });
|
|
4037
3807
|
|
|
4038
3808
|
const SHARE_MAP_DIRECTIVES = [
|
|
4039
3809
|
ShareMapComponent,
|
|
4040
|
-
ShareMapUrlComponent
|
|
4041
|
-
ShareMapApiComponent
|
|
3810
|
+
ShareMapUrlComponent
|
|
4042
3811
|
];
|
|
4043
3812
|
/**
|
|
4044
3813
|
* @deprecated import the components/directives directly or SHARE_MAP_DIRECTIVES for the set
|
|
@@ -4049,15 +3818,15 @@ class IgoShareMapModule {
|
|
|
4049
3818
|
ngModule: IgoShareMapModule
|
|
4050
3819
|
};
|
|
4051
3820
|
}
|
|
4052
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4053
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4054
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoShareMapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3822
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent], exports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
3823
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoShareMapModule, imports: [ShareMapComponent, ShareMapUrlComponent] });
|
|
4055
3824
|
}
|
|
4056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoShareMapModule, decorators: [{
|
|
4057
3826
|
type: NgModule,
|
|
4058
3827
|
args: [{
|
|
4059
|
-
imports: [ShareMapComponent, ShareMapUrlComponent
|
|
4060
|
-
exports: [ShareMapComponent, ShareMapUrlComponent
|
|
3828
|
+
imports: [ShareMapComponent, ShareMapUrlComponent],
|
|
3829
|
+
exports: [ShareMapComponent, ShareMapUrlComponent]
|
|
4061
3830
|
}]
|
|
4062
3831
|
}] });
|
|
4063
3832
|
|
|
@@ -4132,10 +3901,10 @@ class SidenavComponent {
|
|
|
4132
3901
|
this.topPanelState = 'initial';
|
|
4133
3902
|
}
|
|
4134
3903
|
}
|
|
4135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4136
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
3904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: SidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3905
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", 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" }] });
|
|
4137
3906
|
}
|
|
4138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: SidenavComponent, decorators: [{
|
|
4139
3908
|
type: Component,
|
|
4140
3909
|
args: [{ selector: 'igo-sidenav', imports: [
|
|
4141
3910
|
MatSidenavModule,
|
|
@@ -4146,7 +3915,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
4146
3915
|
MatIconModule,
|
|
4147
3916
|
FeatureDetailsComponent,
|
|
4148
3917
|
IgoLanguageModule
|
|
4149
|
-
], 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\"
|
|
3918
|
+
], template: "<mat-sidenav #sidenav igoSidenavShim mode=\"side\" [opened]=\"opened\">\n <div class=\"igo-sidenav-content\">\n <igo-flexible\n #topPanel\n initial=\"50%\"\n initialMobile=\"100%\"\n expanded=\"calc(100% - 58px)\"\n [state]=\"topPanelState\"\n >\n <div class=\"igo-content\">\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\n @if (tool) {\n <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n >\n <mat-icon>arrow_back</mat-icon>\n </button>\n }\n\n @if (tool) {\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n >\n <mat-icon>menu</mat-icon>\n </button>\n }\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n @if (feature && media !== 'mobile') {\n <igo-panel [title]=\"featureTitle\">\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\"\n >\n <mat-icon>{{\n ['collapsed', 'initial'].indexOf(topPanel.state) >= 0\n ? 'arrow_downward'\n : 'arrow_upward'\n }}</mat-icon>\n </button>\n @if (feature.geometry) {\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n >\n <mat-icon>zoom_in</mat-icon>\n </button>\n }\n @if (['collapsed', 'initial'].indexOf(topPanel.state) >= 0) {\n <igo-feature-details [feature]=\"feature\" />\n }\n </igo-panel>\n }\n </div>\n </igo-flexible>\n </div>\n</mat-sidenav>\n", styles: [":host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}:host ::ng-deep .igo-flexible-fill .igo-container,.igo-sidenav-content .igo-flexible-fill .igo-container{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav{-moz-box-shadow:2px 0px 2px 0px #dddddd;-webkit-box-shadow:2px 0px 2px 0px #dddddd;-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}:host{background-color:#fff}:host ::ng-deep mat-sidenav{z-index:3!important}mat-sidenav{width:400px}@media only screen and (orientation:portrait) 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"] }]
|
|
4150
3919
|
}], ctorParameters: () => [], propDecorators: { map: [{
|
|
4151
3920
|
type: Input
|
|
4152
3921
|
}], opened: [{
|
|
@@ -4170,11 +3939,11 @@ class IgoSidenavModule {
|
|
|
4170
3939
|
ngModule: IgoSidenavModule
|
|
4171
3940
|
};
|
|
4172
3941
|
}
|
|
4173
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4174
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4175
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3942
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3943
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent], exports: [SidenavComponent] });
|
|
3944
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoSidenavModule, imports: [SidenavComponent] });
|
|
4176
3945
|
}
|
|
4177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoSidenavModule, decorators: [{
|
|
4178
3947
|
type: NgModule,
|
|
4179
3948
|
args: [{
|
|
4180
3949
|
imports: [SidenavComponent],
|
|
@@ -4191,19 +3960,19 @@ class IgoContextModule {
|
|
|
4191
3960
|
ngModule: IgoContextModule
|
|
4192
3961
|
};
|
|
4193
3962
|
}
|
|
4194
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4195
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
3963
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3964
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoContextModule, exports: [IgoContextImportExportModule,
|
|
4196
3965
|
IgoContextManagerModule,
|
|
4197
3966
|
IgoContextMapButtonModule,
|
|
4198
3967
|
IgoShareMapModule,
|
|
4199
3968
|
IgoSidenavModule] });
|
|
4200
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3969
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextModule, imports: [IgoContextImportExportModule,
|
|
4201
3970
|
IgoContextManagerModule,
|
|
4202
3971
|
IgoContextMapButtonModule,
|
|
4203
3972
|
IgoShareMapModule,
|
|
4204
3973
|
IgoSidenavModule] });
|
|
4205
3974
|
}
|
|
4206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextModule, decorators: [{
|
|
4207
3976
|
type: NgModule,
|
|
4208
3977
|
args: [{
|
|
4209
3978
|
declarations: [],
|
|
@@ -4217,6 +3986,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
4217
3986
|
}]
|
|
4218
3987
|
}] });
|
|
4219
3988
|
|
|
3989
|
+
const CONTEXT_MANAGER_DIRECTIVES = [
|
|
3990
|
+
ContextListComponent,
|
|
3991
|
+
ContextItemComponent,
|
|
3992
|
+
ContextFormComponent,
|
|
3993
|
+
ContextEditComponent,
|
|
3994
|
+
ContextPermissionsComponent,
|
|
3995
|
+
ContextPermissionsBindingDirective,
|
|
3996
|
+
MapContextDirective,
|
|
3997
|
+
LayerContextDirective
|
|
3998
|
+
];
|
|
3999
|
+
|
|
4220
4000
|
const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
4221
4001
|
BookmarkButtonComponent,
|
|
4222
4002
|
BookmarkDialogComponent,
|
|
@@ -4232,5 +4012,5 @@ const CONTEXT_MAP_BUTTON_DIRECTIVES = [
|
|
|
4232
4012
|
* Generated bundle index. Do not edit.
|
|
4233
4013
|
*/
|
|
4234
4014
|
|
|
4235
|
-
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 };
|
|
4236
4016
|
//# sourceMappingURL=igo2-context.mjs.map
|