@igo2/context 1.14.2 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/context-import-export/context-import-export/context-import-export.component.mjs +9 -10
- package/esm2020/lib/context-import-export/context-import-export.module.mjs +1 -1
- package/esm2020/lib/context-import-export/shared/context-export.interface.mjs +1 -1
- package/esm2020/lib/context-import-export/shared/context-export.service.mjs +1 -1
- package/esm2020/lib/context-import-export/shared/context-export.utils.mjs +8 -17
- package/esm2020/lib/context-import-export/shared/context-import.errors.mjs +1 -1
- package/esm2020/lib/context-import-export/shared/context-import.service.mjs +1 -1
- package/esm2020/lib/context-import-export/shared/context-import.utils.mjs +27 -52
- package/esm2020/lib/context-manager/context-edit/context-edit-binding.directive.mjs +5 -9
- package/esm2020/lib/context-manager/context-edit/context-edit.component.mjs +2 -2
- package/esm2020/lib/context-manager/context-form/context-form.component.mjs +6 -10
- package/esm2020/lib/context-manager/context-item/context-item.component.mjs +2 -2
- package/esm2020/lib/context-manager/context-list/context-list-binding.directive.mjs +6 -26
- package/esm2020/lib/context-manager/context-list/context-list.component.mjs +2 -2
- package/esm2020/lib/context-manager/context-manager.module.mjs +1 -1
- package/esm2020/lib/context-manager/context-permissions/context-permissions-binding.directive.mjs +5 -22
- package/esm2020/lib/context-manager/context-permissions/context-permissions.component.mjs +2 -2
- package/esm2020/lib/context-manager/shared/context.interface.mjs +1 -1
- package/esm2020/lib/context-manager/shared/context.service.mjs +9 -6
- package/esm2020/lib/context-manager/shared/layer-context.directive.mjs +27 -11
- package/esm2020/lib/context-manager/shared/map-context.directive.mjs +1 -1
- package/esm2020/lib/context-map-button/bookmark-button/bookmark-button.component.mjs +6 -12
- package/esm2020/lib/context-map-button/bookmark-button/bookmark-dialog.component.mjs +2 -2
- package/esm2020/lib/context-map-button/context-map-button.module.mjs +1 -1
- package/esm2020/lib/context-map-button/poi-button/poi-button.component.mjs +5 -15
- package/esm2020/lib/context-map-button/poi-button/poi-dialog.component.mjs +2 -2
- package/esm2020/lib/context-map-button/poi-button/shared/poi.service.mjs +1 -1
- package/esm2020/lib/context-map-button/user-button/user-button.animation.mjs +1 -1
- package/esm2020/lib/context-map-button/user-button/user-button.component.mjs +2 -2
- package/esm2020/lib/context-map-button/user-button/user-dialog.component.mjs +2 -2
- package/esm2020/lib/context.module.mjs +1 -1
- package/esm2020/lib/share-map/share-map/share-map-api.component.mjs +5 -16
- package/esm2020/lib/share-map/share-map/share-map-url.component.mjs +2 -2
- package/esm2020/lib/share-map/share-map/share-map.component.mjs +2 -2
- package/esm2020/lib/share-map/share-map.module.mjs +1 -1
- package/esm2020/lib/share-map/shared/share-map.service.mjs +1 -1
- package/esm2020/lib/sidenav/sidenav.component.mjs +2 -2
- package/esm2020/lib/sidenav/sidenav.module.mjs +1 -1
- package/fesm2015/igo2-context.mjs +117 -205
- package/fesm2015/igo2-context.mjs.map +1 -1
- package/fesm2020/igo2-context.mjs +117 -205
- package/fesm2020/igo2-context.mjs.map +1 -1
- package/lib/context-import-export/context-import-export/context-import-export.component.d.ts +2 -3
- package/lib/context-import-export/shared/context-export.utils.d.ts +4 -4
- package/lib/context-import-export/shared/context-import.utils.d.ts +7 -7
- package/lib/context-manager/context-edit/context-edit-binding.directive.d.ts +3 -4
- package/lib/context-manager/context-form/context-form.component.d.ts +2 -3
- package/lib/context-manager/shared/layer-context.directive.d.ts +1 -0
- package/lib/context-map-button/bookmark-button/bookmark-button.component.d.ts +2 -3
- package/ngcc.config.js +3 -3
- package/package.json +16 -12
|
@@ -30,9 +30,8 @@ import * as i1$2 from '@angular/forms';
|
|
|
30
30
|
import { Validators, FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
|
|
31
31
|
import { Observable, BehaviorSubject, Subject, of, merge, ReplaySubject, EMPTY, timer, combineLatest } from 'rxjs';
|
|
32
32
|
import { skip, first, catchError, tap, map, mergeMap, debounceTime, take, filter, buffer, debounce } from 'rxjs/operators';
|
|
33
|
-
import * as olStyle from 'ol/style';
|
|
34
33
|
import * as i1$1 from '@igo2/geo';
|
|
35
|
-
import { FeatureDataSource, VectorLayer, ClusterDataSource, moveToOlFeatures, FeatureMotion, IgoFeatureModule } from '@igo2/geo';
|
|
34
|
+
import { FeatureDataSource, featureRandomStyleFunction, featureRandomStyle, VectorLayer, ClusterDataSource, moveToOlFeatures, FeatureMotion, IgoFeatureModule } from '@igo2/geo';
|
|
36
35
|
import { downloadContent, ObjectUtils, uuid, Clipboard } from '@igo2/utils';
|
|
37
36
|
import olPoint from 'ol/geom/Point';
|
|
38
37
|
import GeoJSON from 'ol/format/GeoJSON';
|
|
@@ -76,85 +75,59 @@ class ExportNothingToExportError extends ExportError {
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
function handleFileExportError(error, messageService
|
|
78
|
+
function handleFileExportError(error, messageService) {
|
|
80
79
|
if (error instanceof ExportNothingToExportError) {
|
|
81
|
-
this.handleNothingToExportError(messageService
|
|
80
|
+
this.handleNothingToExportError(messageService);
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
|
-
|
|
85
|
-
const title = translate.instant('igo.context.contextImportExport.export.failed.title');
|
|
86
|
-
const message = translate.instant('igo.context.contextImportExport.export.failed.text');
|
|
87
|
-
messageService.error(message, title);
|
|
83
|
+
messageService.error('igo.context.contextImportExport.export.failed.text', 'igo.context.contextImportExport.export.failed.title');
|
|
88
84
|
}
|
|
89
|
-
function handleFileExportSuccess(messageService
|
|
90
|
-
|
|
91
|
-
const title = translate.instant('igo.context.contextImportExport.export.success.title');
|
|
92
|
-
const message = translate.instant('igo.context.contextImportExport.export.success.text');
|
|
93
|
-
messageService.success(message, title);
|
|
85
|
+
function handleFileExportSuccess(messageService) {
|
|
86
|
+
messageService.success('igo.context.contextImportExport.export.success.text', 'igo.context.contextImportExport.export.success.title');
|
|
94
87
|
}
|
|
95
|
-
function handleNothingToExportError(messageService
|
|
96
|
-
|
|
97
|
-
const title = translate.instant('igo.context.contextImportExport.export.nothing.title');
|
|
98
|
-
const message = translate.instant('igo.context.contextImportExport.export.nothing.text');
|
|
99
|
-
messageService.error(message, title);
|
|
88
|
+
function handleNothingToExportError(messageService) {
|
|
89
|
+
messageService.error('igo.context.contextImportExport.export.nothing.text', 'igo.context.contextImportExport.export.nothing.title');
|
|
100
90
|
}
|
|
101
91
|
|
|
102
|
-
function handleFileImportSuccess(file, context, messageService,
|
|
92
|
+
function handleFileImportSuccess(file, context, messageService, contextService) {
|
|
103
93
|
if (Object.keys(context).length <= 0) {
|
|
104
|
-
handleNothingToImportError(file, messageService
|
|
94
|
+
handleNothingToImportError(file, messageService);
|
|
105
95
|
return;
|
|
106
96
|
}
|
|
107
97
|
const contextTitle = computeLayerTitleFromFile(file);
|
|
108
98
|
addContextToContextList(context, contextTitle, contextService);
|
|
109
|
-
|
|
110
|
-
const messageTitle = translate.instant('igo.context.contextImportExport.import.success.title');
|
|
111
|
-
const message = translate.instant('igo.context.contextImportExport.import.success.text', {
|
|
99
|
+
messageService.success('igo.context.contextImportExport.import.success.text', 'igo.context.contextImportExport.import.success.title', undefined, {
|
|
112
100
|
value: contextTitle
|
|
113
101
|
});
|
|
114
|
-
messageService.success(message, messageTitle);
|
|
115
102
|
}
|
|
116
|
-
function handleFileImportError(file, error, messageService,
|
|
103
|
+
function handleFileImportError(file, error, messageService, sizeMb) {
|
|
117
104
|
sizeMb = sizeMb ? sizeMb : 30;
|
|
118
105
|
const errMapping = {
|
|
119
106
|
'Invalid file': handleInvalidFileImportError,
|
|
120
107
|
'File is too large': handleSizeFileImportError,
|
|
121
108
|
'Failed to read file': handleUnreadbleFileImportError
|
|
122
109
|
};
|
|
123
|
-
errMapping[error.message](file, error, messageService,
|
|
110
|
+
errMapping[error.message](file, error, messageService, sizeMb);
|
|
124
111
|
}
|
|
125
|
-
function handleInvalidFileImportError(file, error, messageService
|
|
126
|
-
|
|
127
|
-
const title = translate.instant('igo.context.contextImportExport.import.invalid.title');
|
|
128
|
-
const message = translate.instant('igo.context.contextImportExport.import.invalid.text', {
|
|
112
|
+
function handleInvalidFileImportError(file, error, messageService) {
|
|
113
|
+
messageService.error('igo.context.contextImportExport.import.invalid.text', 'igo.context.contextImportExport.import.invalid.title', undefined, {
|
|
129
114
|
value: file.name,
|
|
130
115
|
mimeType: file.type
|
|
131
116
|
});
|
|
132
|
-
messageService.error(message, title);
|
|
133
117
|
}
|
|
134
|
-
function handleSizeFileImportError(file, error, messageService,
|
|
135
|
-
|
|
136
|
-
const title = translate.instant('igo.context.contextImportExport.import.tooLarge.title');
|
|
137
|
-
const message = translate.instant('igo.context.contextImportExport.import.tooLarge.text', {
|
|
118
|
+
function handleSizeFileImportError(file, error, messageService, sizeMb) {
|
|
119
|
+
messageService.error('igo.context.contextImportExport.import.tooLarge.text', 'igo.context.contextImportExport.import.tooLarge.title', undefined, {
|
|
138
120
|
value: file.name,
|
|
139
121
|
size: sizeMb
|
|
140
122
|
});
|
|
141
|
-
messageService.error(message, title);
|
|
142
123
|
}
|
|
143
|
-
function handleUnreadbleFileImportError(file, error, messageService
|
|
144
|
-
|
|
145
|
-
const title = translate.instant('igo.context.contextImportExport.import.unreadable.title');
|
|
146
|
-
const message = translate.instant('igo.context.contextImportExport.import.unreadable.text', {
|
|
124
|
+
function handleUnreadbleFileImportError(file, error, messageService) {
|
|
125
|
+
messageService.error('igo.context.contextImportExport.import.unreadable.text', 'igo.context.contextImportExport.import.unreadable.title', undefined, {
|
|
147
126
|
value: file.name
|
|
148
127
|
});
|
|
149
|
-
messageService.error(message, title);
|
|
150
128
|
}
|
|
151
|
-
function handleNothingToImportError(file, messageService
|
|
152
|
-
|
|
153
|
-
const title = translate.instant('igo.context.contextImportExport.import.empty.title');
|
|
154
|
-
const message = translate.instant('igo.context.contextImportExport.import.empty.text', {
|
|
155
|
-
value: file.name
|
|
156
|
-
});
|
|
157
|
-
messageService.error(message, title);
|
|
129
|
+
function handleNothingToImportError(file, messageService) {
|
|
130
|
+
messageService.error('igo.context.contextImportExport.import.empty.text', 'igo.context.contextImportExport.import.empty.title', undefined, { value: file.name });
|
|
158
131
|
}
|
|
159
132
|
function addContextToContextList(context, contextTitle, contextService) {
|
|
160
133
|
context.title = contextTitle;
|
|
@@ -171,35 +144,28 @@ function computeLayerTitleFromFile(file) {
|
|
|
171
144
|
return file.name.substr(0, file.name.lastIndexOf('.'));
|
|
172
145
|
}
|
|
173
146
|
function addImportedFeaturesToMap(olFeatures, map, layerTitle) {
|
|
174
|
-
const r = Math.floor(Math.random() * 255);
|
|
175
|
-
const g = Math.floor(Math.random() * 255);
|
|
176
|
-
const b = Math.floor(Math.random() * 255);
|
|
177
|
-
const stroke = new olStyle.Stroke({
|
|
178
|
-
color: [r, g, b, 1],
|
|
179
|
-
width: 2
|
|
180
|
-
});
|
|
181
|
-
const fill = new olStyle.Fill({
|
|
182
|
-
color: [r, g, b, 0.4]
|
|
183
|
-
});
|
|
184
147
|
const sourceOptions = {
|
|
185
148
|
type: 'vector',
|
|
186
149
|
queryable: true
|
|
187
150
|
};
|
|
188
151
|
const source = new FeatureDataSource(sourceOptions);
|
|
189
152
|
source.ol.addFeatures(olFeatures);
|
|
153
|
+
let randomStyle;
|
|
154
|
+
let editable = false;
|
|
155
|
+
if (olFeatures[0].getKeys().includes('_style') ||
|
|
156
|
+
olFeatures[0].getKeys().includes('_mapTitle')) {
|
|
157
|
+
randomStyle = featureRandomStyleFunction();
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
randomStyle = featureRandomStyle();
|
|
161
|
+
editable = true;
|
|
162
|
+
}
|
|
190
163
|
const layer = new VectorLayer({
|
|
191
164
|
title: layerTitle,
|
|
192
165
|
isIgoInternalLayer: true,
|
|
193
166
|
source,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
fill,
|
|
197
|
-
image: new olStyle.Circle({
|
|
198
|
-
radius: 5,
|
|
199
|
-
stroke,
|
|
200
|
-
fill
|
|
201
|
-
})
|
|
202
|
-
})
|
|
167
|
+
igoStyle: { editable },
|
|
168
|
+
style: randomStyle
|
|
203
169
|
});
|
|
204
170
|
map.addLayer(layer);
|
|
205
171
|
return layer;
|
|
@@ -792,16 +758,17 @@ class ContextService {
|
|
|
792
758
|
};
|
|
793
759
|
});
|
|
794
760
|
layers.forEach((layer) => {
|
|
761
|
+
// Do not seem to work properly. layerFound is always undefined.
|
|
795
762
|
const layerFound = currentContext.layers.find((contextLayer) => {
|
|
796
763
|
const source = contextLayer.source;
|
|
797
764
|
return source && layer.id === source.id && !contextLayer.baseLayer;
|
|
798
765
|
});
|
|
799
766
|
if (layerFound) {
|
|
800
767
|
let layerStyle = layerFound[`style`];
|
|
801
|
-
if (layerFound[`styleByAttribute`]) {
|
|
768
|
+
if (layerFound[`igoStyle`][`styleByAttribute`]) {
|
|
802
769
|
layerStyle = undefined;
|
|
803
770
|
}
|
|
804
|
-
else if (layerFound[`clusterBaseStyle`]) {
|
|
771
|
+
else if (layerFound[`igoStyle`][`clusterBaseStyle`]) {
|
|
805
772
|
layerStyle = undefined;
|
|
806
773
|
delete layerFound.sourceOptions[`source`];
|
|
807
774
|
delete layerFound.sourceOptions[`format`];
|
|
@@ -810,8 +777,10 @@ class ContextService {
|
|
|
810
777
|
baseLayer: layerFound.baseLayer,
|
|
811
778
|
title: layer.options.title,
|
|
812
779
|
zIndex: layer.zIndex,
|
|
813
|
-
|
|
814
|
-
|
|
780
|
+
igoStyle: {
|
|
781
|
+
styleByAttribute: layerFound[`igoStyle`][`styleByAttribute`],
|
|
782
|
+
clusterBaseStyle: layerFound[`igoStyle`][`clusterBaseStyle`],
|
|
783
|
+
},
|
|
815
784
|
style: layerStyle,
|
|
816
785
|
clusterParam: layerFound[`clusterParam`],
|
|
817
786
|
visible: layer.visible,
|
|
@@ -951,7 +920,7 @@ class ContextService {
|
|
|
951
920
|
error.error.title = this.languageService.translate.instant('igo.context.contextManager.errors.addPermissionTitle');
|
|
952
921
|
error.error.message = this.languageService.translate.instant('igo.context.contextManager.errors.addPermission');
|
|
953
922
|
}
|
|
954
|
-
this.messageService.error(
|
|
923
|
+
this.messageService.error('igo.context.contextManager.errors.addPermission', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
955
924
|
}
|
|
956
925
|
handleContextsChange(keepCurrentContext = true) {
|
|
957
926
|
const context = this.context$.value;
|
|
@@ -1119,10 +1088,9 @@ function ContextImportExportComponent_form_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
1119
1088
|
i0.ɵɵproperty("shown", i0.ɵɵpipeBind1(25, 19, ctx_r1.loading$));
|
|
1120
1089
|
} }
|
|
1121
1090
|
class ContextImportExportComponent {
|
|
1122
|
-
constructor(contextImportService, contextExportService,
|
|
1091
|
+
constructor(contextImportService, contextExportService, messageService, formBuilder, config, contextService) {
|
|
1123
1092
|
this.contextImportService = contextImportService;
|
|
1124
1093
|
this.contextExportService = contextExportService;
|
|
1125
|
-
this.languageService = languageService;
|
|
1126
1094
|
this.messageService = messageService;
|
|
1127
1095
|
this.formBuilder = formBuilder;
|
|
1128
1096
|
this.config = config;
|
|
@@ -1165,18 +1133,18 @@ class ContextImportExportComponent {
|
|
|
1165
1133
|
});
|
|
1166
1134
|
}
|
|
1167
1135
|
onFileImportSuccess(file, context) {
|
|
1168
|
-
handleFileImportSuccess(file, context, this.messageService, this.
|
|
1136
|
+
handleFileImportSuccess(file, context, this.messageService, this.contextService);
|
|
1169
1137
|
}
|
|
1170
1138
|
onFileImportError(file, error) {
|
|
1171
1139
|
this.loading$.next(false);
|
|
1172
|
-
handleFileImportError(file, error, this.messageService, this.
|
|
1140
|
+
handleFileImportError(file, error, this.messageService, this.fileSizeMb);
|
|
1173
1141
|
}
|
|
1174
1142
|
onFileExportError(error) {
|
|
1175
1143
|
this.loading$.next(false);
|
|
1176
|
-
handleFileExportError(error, this.messageService
|
|
1144
|
+
handleFileExportError(error, this.messageService);
|
|
1177
1145
|
}
|
|
1178
1146
|
onFileExportSuccess() {
|
|
1179
|
-
handleFileExportSuccess(this.messageService
|
|
1147
|
+
handleFileExportSuccess(this.messageService);
|
|
1180
1148
|
}
|
|
1181
1149
|
selectAll(e) {
|
|
1182
1150
|
if (e._selected) {
|
|
@@ -1191,7 +1159,7 @@ class ContextImportExportComponent {
|
|
|
1191
1159
|
this.activeImportExport = event.value;
|
|
1192
1160
|
}
|
|
1193
1161
|
}
|
|
1194
|
-
ContextImportExportComponent.ɵfac = function ContextImportExportComponent_Factory(t) { return new (t || ContextImportExportComponent)(i0.ɵɵdirectiveInject(ContextImportService), i0.ɵɵdirectiveInject(ContextExportService), i0.ɵɵdirectiveInject(i3.
|
|
1162
|
+
ContextImportExportComponent.ɵfac = function ContextImportExportComponent_Factory(t) { return new (t || ContextImportExportComponent)(i0.ɵɵdirectiveInject(ContextImportService), i0.ɵɵdirectiveInject(ContextExportService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i1$2.UntypedFormBuilder), i0.ɵɵdirectiveInject(i3.ConfigService), i0.ɵɵdirectiveInject(ContextService)); };
|
|
1195
1163
|
ContextImportExportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextImportExportComponent, selectors: [["igo-context-import-export"]], inputs: { map: "map" }, decls: 10, vars: 11, consts: [[1, "import-export-toggle", "mat-typography"], [3, "value", "change"], [3, "value"], [4, "ngIf"], ["class", "igo-form", 3, "formGroup", 4, "ngIf"], [1, "igo-form"], [1, "igo-form-button-group"], ["mat-raised-button", "", "type", "button", 3, "disabled", "click"], [3, "shown"], ["type", "file", 3, "click", "change"], ["fileInput", ""], [1, "mat-typography"], [1, "igo-form", 3, "formGroup"], [1, "igo-input-container"], [1, "example-full-width"], ["formControlName", "name", "matInput", "", 3, "value"], ["formControlName", "layers", "multiple", ""], [3, "value", "click"], ["e", ""], [3, "value", 4, "ngFor", "ngForOf"]], template: function ContextImportExportComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1196
1164
|
i0.ɵɵelementStart(0, "div", 0)(1, "mat-button-toggle-group", 1);
|
|
1197
1165
|
i0.ɵɵlistener("change", function ContextImportExportComponent_Template_mat_button_toggle_group_change_1_listener($event) { return ctx.onImportExportChange($event); });
|
|
@@ -1223,8 +1191,8 @@ ContextImportExportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type
|
|
|
1223
1191
|
} }, dependencies: [i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.NgForm, i1$2.FormGroupDirective, i1$2.FormControlName, i4.NgForOf, i4.NgIf, i7.MatButton, i8.MatButtonToggleGroup, i8.MatButtonToggle, i9.MatDivider, i6.MatFormField, i6.MatLabel, i11.MatSelect, i12.MatOption, i5.MatInput, i13.SpinnerComponent, i4.AsyncPipe, i9$1.TranslatePipe], styles: [".import-export-toggle[_ngcontent-%COMP%]{padding:10px;text-align:center}.import-export-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{width:100%}.import-export-toggle[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{width:50%}.igo-input-container[_ngcontent-%COMP%]{padding:10px}.igo-input-container[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}h4[_ngcontent-%COMP%]{padding:0 5px}.igo-form[_ngcontent-%COMP%]{padding:15px 5px}.igo-form-button-group[_ngcontent-%COMP%]{text-align:center;padding-top:10px}igo-spinner[_ngcontent-%COMP%]{position:absolute;padding-left:10px}"] });
|
|
1224
1192
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextImportExportComponent, [{
|
|
1225
1193
|
type: Component,
|
|
1226
|
-
args: [{ selector: 'igo-context-import-export', template: "<div class=\"import-export-toggle mat-typography\">\n <mat-button-toggle-group\n [value]=\"activeImportExport\"\n (change)=\"onImportExportChange($event)\">\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<div *ngIf=\"activeImportExport === 'import'\">\n <form class=\"igo-form\">\n <div class=\"igo-form-button-group\">\n <button mat-raised-button type=\"button\" (click)=\"fileInput.click()\" [disabled]=\"loading$ | async\">\n {{'igo.geo.importExportForm.importButton' | translate}}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n <input\n #fileInput\n type=\"file\"\n [style.display]=\"'none'\"\n (click)=\"fileInput.value = null\"\n (change)=\"importFiles($event.target.files)\">\n </div>\n </form>\n <section class=\"mat-typography\">\n <h4>{{'igo.geo.importExportForm.importClarifications' | translate}}</h4>\n <ul>\n <li>{{'igo.geo.importExportForm.importSizeMax' | translate: {size: fileSizeMb} }}</li>\n </ul>\n </section>\n</div>\n\n\n<form class=\"igo-form\" *ngIf=\"activeImportExport === 'export'\" [formGroup]=\"form\">\n <div class=\"igo-input-container\">\n <mat-form-field class=\"example-full-width\">\n <mat-label>{{'igo.context.contextImportExport.export.exportContextName' | translate}}</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>{{'igo.context.contextImportExport.export.exportPlaceHolder' | translate}}</mat-label>\n <mat-select formControlName=\"layers\" multiple>\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\n {{'igo.context.contextImportExport.export.exportSelectAll' | translate}}\n </mat-option>\n <mat-divider></mat-divider>\n <mat-option *ngFor=\"let layer of userControlledLayerList\" [value]=\"layer\">{{layer.title}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"button\"\n [disabled]=\"!form.valid || (loading$ | async)\"\n (click)=\"handleExportFormSubmit(form.value)\">\n {{'igo.geo.importExportForm.exportButton' | translate}}\n </button>\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\n </div>\n</form>\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"] }]
|
|
1227
|
-
}], function () { return [{ type: ContextImportService }, { type: ContextExportService }, { type: i3.
|
|
1194
|
+
args: [{ selector: 'igo-context-import-export', template: "<div class=\"import-export-toggle mat-typography\">\r\n <mat-button-toggle-group\r\n [value]=\"activeImportExport\"\r\n (change)=\"onImportExportChange($event)\">\r\n <mat-button-toggle [value]=\"'import'\">\r\n {{'igo.geo.importExportForm.importTabTitle' | translate}}\r\n </mat-button-toggle>\r\n <mat-button-toggle [value]=\"'export'\">\r\n {{'igo.geo.importExportForm.exportTabTitle' | translate}}\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n</div>\r\n\r\n<div *ngIf=\"activeImportExport === 'import'\">\r\n <form class=\"igo-form\">\r\n <div class=\"igo-form-button-group\">\r\n <button mat-raised-button type=\"button\" (click)=\"fileInput.click()\" [disabled]=\"loading$ | async\">\r\n {{'igo.geo.importExportForm.importButton' | translate}}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n <input\r\n #fileInput\r\n type=\"file\"\r\n [style.display]=\"'none'\"\r\n (click)=\"fileInput.value = null\"\r\n (change)=\"importFiles($event.target.files)\">\r\n </div>\r\n </form>\r\n <section class=\"mat-typography\">\r\n <h4>{{'igo.geo.importExportForm.importClarifications' | translate}}</h4>\r\n <ul>\r\n <li>{{'igo.geo.importExportForm.importSizeMax' | translate: {size: fileSizeMb} }}</li>\r\n </ul>\r\n </section>\r\n</div>\r\n\r\n\r\n<form class=\"igo-form\" *ngIf=\"activeImportExport === 'export'\" [formGroup]=\"form\">\r\n <div class=\"igo-input-container\">\r\n <mat-form-field class=\"example-full-width\">\r\n <mat-label>{{'igo.context.contextImportExport.export.exportContextName' | translate}}</mat-label>\r\n <input formControlName=\"name\" matInput [value]=\"\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-input-container\">\r\n <mat-form-field>\r\n <mat-label>{{'igo.context.contextImportExport.export.exportPlaceHolder' | translate}}</mat-label>\r\n <mat-select formControlName=\"layers\" multiple>\r\n <mat-option [value]=\"1\" (click)=\"selectAll(e)\" #e>\r\n {{'igo.context.contextImportExport.export.exportSelectAll' | translate}}\r\n </mat-option>\r\n <mat-divider></mat-divider>\r\n <mat-option *ngFor=\"let layer of userControlledLayerList\" [value]=\"layer\">{{layer.title}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"button\"\r\n [disabled]=\"!form.valid || (loading$ | async)\"\r\n (click)=\"handleExportFormSubmit(form.value)\">\r\n {{'igo.geo.importExportForm.exportButton' | translate}}\r\n </button>\r\n <igo-spinner [shown]=\"loading$ | async\"></igo-spinner>\r\n </div>\r\n</form>\r\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"] }]
|
|
1195
|
+
}], function () { return [{ type: ContextImportService }, { type: ContextExportService }, { type: i3.MessageService }, { type: i1$2.UntypedFormBuilder }, { type: i3.ConfigService }, { type: ContextService }]; }, { map: [{
|
|
1228
1196
|
type: Input
|
|
1229
1197
|
}] }); })();
|
|
1230
1198
|
|
|
@@ -1411,15 +1379,7 @@ class LayerContextDirective {
|
|
|
1411
1379
|
layersAndIndex$
|
|
1412
1380
|
.pipe(buffer(layersAndIndex$.pipe(debounceTime(500))))
|
|
1413
1381
|
.subscribe((layers) => {
|
|
1414
|
-
layers
|
|
1415
|
-
.filter((layer) => layer !== undefined)
|
|
1416
|
-
.map((layer) => {
|
|
1417
|
-
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
1418
|
-
layer.zIndex = layer.zIndex;
|
|
1419
|
-
return layer;
|
|
1420
|
-
});
|
|
1421
|
-
this.contextLayers.concat(layers);
|
|
1422
|
-
this.map.addLayers(layers);
|
|
1382
|
+
this.handleAddLayers(layers);
|
|
1423
1383
|
if (context.extraFeatures) {
|
|
1424
1384
|
context.extraFeatures.forEach((featureCollection) => {
|
|
1425
1385
|
const format = new GeoJSON();
|
|
@@ -1429,7 +1389,18 @@ class LayerContextDirective {
|
|
|
1429
1389
|
dataProjection: 'EPSG:4326',
|
|
1430
1390
|
featureProjection: 'EPSG:3857'
|
|
1431
1391
|
});
|
|
1432
|
-
|
|
1392
|
+
const importExportOptions = this.configService.getConfig('importExport');
|
|
1393
|
+
const importWithStyle = importExportOptions?.importWithStyle || this.configService.getConfig('importWithStyle');
|
|
1394
|
+
if (this.configService.getConfig('importWithStyle')) {
|
|
1395
|
+
console.warn(`
|
|
1396
|
+
The location of this config importWithStyle is deprecated.
|
|
1397
|
+
Please move this property within importExport configuration.
|
|
1398
|
+
Ex: importWithStyle: true/false must be transfered to importExport: { importWithStyle: true/false }
|
|
1399
|
+
Refer to environnement.ts OR config/config.json
|
|
1400
|
+
This legacy conversion will be deleted in 2024.
|
|
1401
|
+
`);
|
|
1402
|
+
}
|
|
1403
|
+
if (!importWithStyle) {
|
|
1433
1404
|
addImportedFeaturesToMap(featureCollection, this.map, title);
|
|
1434
1405
|
}
|
|
1435
1406
|
else {
|
|
@@ -1438,6 +1409,19 @@ class LayerContextDirective {
|
|
|
1438
1409
|
});
|
|
1439
1410
|
}
|
|
1440
1411
|
});
|
|
1412
|
+
this.layerService.createAsyncIdbLayers(context.uri).pipe(debounceTime(500))
|
|
1413
|
+
.subscribe((layers) => this.handleAddLayers(layers));
|
|
1414
|
+
}
|
|
1415
|
+
handleAddLayers(layers) {
|
|
1416
|
+
layers = layers
|
|
1417
|
+
.filter((layer) => layer !== undefined)
|
|
1418
|
+
.map((layer) => {
|
|
1419
|
+
layer.visible = this.computeLayerVisibilityFromUrl(layer);
|
|
1420
|
+
layer.zIndex = layer.zIndex;
|
|
1421
|
+
return layer;
|
|
1422
|
+
});
|
|
1423
|
+
this.contextLayers.concat(layers);
|
|
1424
|
+
this.map.addLayers(layers);
|
|
1441
1425
|
}
|
|
1442
1426
|
computeLayerVisibilityFromUrl(layer) {
|
|
1443
1427
|
const params = this.queryParams;
|
|
@@ -1543,7 +1527,7 @@ BookmarkDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Boo
|
|
|
1543
1527
|
} }, dependencies: [i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.RequiredValidator, i1$2.MaxLengthValidator, i1$2.NgModel, i7.MatButton, i6.MatFormField, i1$3.MatDialogTitle, i1$3.MatDialogContent, i1$3.MatDialogActions, i5.MatInput, i9$1.TranslatePipe], encapsulation: 2 });
|
|
1544
1528
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BookmarkDialogComponent, [{
|
|
1545
1529
|
type: Component,
|
|
1546
|
-
args: [{ selector: 'igo-bookmark-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{ 'igo.context.bookmarkButton.dialog.title' |\u00A0translate }}</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <mat-form-field>\n <input matInput required autocomplete=\"off\"\n maxlength=\"128\"\n [placeholder]=\"'igo.context.bookmarkButton.dialog.placeholder' |\u00A0translate\"\n [(ngModel)]=\"title\">\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button mat-button color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\">\n {{'igo.common.confirmDialog.confirmBtn' | translate}}\n </button>\n <button mat-button\n (click)=\"dialogRef.close(false)\">\n {{'igo.common.confirmDialog.cancelBtn' |\u00A0translate}}\n </button>\n</div>\n" }]
|
|
1530
|
+
args: [{ selector: 'igo-bookmark-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{ 'igo.context.bookmarkButton.dialog.title' |\u00A0translate }}</h1>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n <mat-form-field>\r\n <input matInput required autocomplete=\"off\"\r\n maxlength=\"128\"\r\n [placeholder]=\"'igo.context.bookmarkButton.dialog.placeholder' |\u00A0translate\"\r\n [(ngModel)]=\"title\">\r\n </mat-form-field>\r\n</div>\r\n<div mat-dialog-actions>\r\n <button mat-button color=\"primary\"\r\n [disabled]=\"!title\"\r\n (click)=\"dialogRef.close(title)\">\r\n {{'igo.common.confirmDialog.confirmBtn' | translate}}\r\n </button>\r\n <button mat-button\r\n (click)=\"dialogRef.close(false)\">\r\n {{'igo.common.confirmDialog.cancelBtn' |\u00A0translate}}\r\n </button>\r\n</div>\r\n" }]
|
|
1547
1531
|
}], function () { return [{ type: i1$3.MatDialogRef }]; }, null); })();
|
|
1548
1532
|
|
|
1549
1533
|
function ContextItemComponent_button_1_mat_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -1749,7 +1733,7 @@ ContextItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
1749
1733
|
} }, dependencies: [i4.NgClass, i4.NgIf, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i7$1.MatListItem, i7$1.MatListAvatarCssMatStyler, i12.MatLine, i13.CollapseDirective, i13.StopPropagationDirective, i9$1.TranslatePipe], styles: ["[_nghost-%COMP%]{overflow:hidden}.igo-actions-container[_ngcontent-%COMP%]{flex-shrink:0}.igo-actions-expand-container[_ngcontent-%COMP%]{display:inline-flex}mat-list-item[_ngcontent-%COMP%] .mat-list-item-content .mat-list-text{padding:0}mat-icon.disabled[_ngcontent-%COMP%]{color:#00000061}mat-list-item.mat-list-item-light[_ngcontent-%COMP%] .mat-list-item-content{color:#969696}"], changeDetection: 0 });
|
|
1750
1734
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextItemComponent, [{
|
|
1751
1735
|
type: Component,
|
|
1752
|
-
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-list-item\n class=\"mat-list-item\"\n [ngClass]=\"{'mat-list-item-light': hidden}\">\n <button mat-list-avatar\n *ngIf=\"auth.authenticated\"\n mat-icon-button\n igoStopPropagation\n [matTooltip]=\"auth.authenticated ? ('igo.context.contextManager.favorite' | translate) : ''\"\n matTooltipShowDelay=\"500\"\n [color]=\"default ? 'primary' : 'default'\"\n (click)=\"favoriteClick(context)\">\n <mat-icon *ngIf=\"!context.iconImage\" svgIcon=\"{{context.icon ? context.icon : context.scope === 'public' ? 'earth' : 'star'}}\"></mat-icon>\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\">\n </button>\n <button mat-list-avatar\n *ngIf=\"!auth.authenticated && showFavorite\"\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 <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n <h4 matLine>{{context.title}}</h4>\n\n <div *ngIf=\"auth.authenticated\"\n igoStopPropagation\n class=\"igo-actions-container\">\n\n <button *ngIf=\"collapsed && selected && (context.permission === typePermission[typePermission.write] || context.imported)\"\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 <mat-icon svgIcon=\"content-save\"></mat-icon>\n </button>\n\n <div #actions class=\"igo-actions-expand-container\">\n\n <button *ngIf=\"canShare && !context.imported\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.managePermissions' | translate\"\n matTooltipShowDelay=\"500\"\n [color]=\"color\"\n (click)=\"managePermissions.emit(context)\">\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\n </button>\n\n <!--button\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\n [color]=\"color\"\n (click)=\"manageTools.emit(context)\">\n <mat-icon svgIcon=\"widgets\"></mat-icon>\n </button-->\n\n <button *ngIf=\"!context.imported\"\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 <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <button *ngIf=\"context.permission === typePermission[typePermission.write] && !context.imported\"\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 <mat-icon svgIcon=\"pencil\"></mat-icon>\n </button>\n\n <button *ngIf=\"!context.hidden && !context.imported\"\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 <mat-icon svgIcon=\"eye\"></mat-icon>\n </button>\n\n <button *ngIf=\"context.hidden && !context.imported\"\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 <mat-icon svgIcon=\"eye-off\"></mat-icon>\n </button>\n\n <button *ngIf=\"context.permission === typePermission[typePermission.write] || context.imported\"\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 <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n\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 <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\n </button>\n\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-list-item ::ng-deep .mat-list-item-content .mat-list-text{padding:0}mat-icon.disabled{color:#00000061}mat-list-item.mat-list-item-light ::ng-deep .mat-list-item-content{color:#969696}\n"] }]
|
|
1736
|
+
args: [{ selector: 'igo-context-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-list-item\r\n class=\"mat-list-item\"\r\n [ngClass]=\"{'mat-list-item-light': hidden}\">\r\n <button mat-list-avatar\r\n *ngIf=\"auth.authenticated\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"auth.authenticated ? ('igo.context.contextManager.favorite' | translate) : ''\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\">\r\n <mat-icon *ngIf=\"!context.iconImage\" svgIcon=\"{{context.icon ? context.icon : context.scope === 'public' ? 'earth' : 'star'}}\"></mat-icon>\r\n <img *ngIf=\"context.iconImage\" [src]=\"context.iconImage\">\r\n </button>\r\n <button mat-list-avatar\r\n *ngIf=\"!auth.authenticated && showFavorite\"\r\n mat-icon-button\r\n igoStopPropagation\r\n [matTooltip]=\"'igo.context.contextManager.favorite' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"default ? 'primary' : 'default'\"\r\n (click)=\"favoriteClick(context)\">\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n <h4 matLine>{{context.title}}</h4>\r\n\r\n <div *ngIf=\"auth.authenticated\"\r\n igoStopPropagation\r\n class=\"igo-actions-container\">\r\n\r\n <button *ngIf=\"collapsed && selected && (context.permission === typePermission[typePermission.write] || context.imported)\"\r\n class=\"save-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.save' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"save.emit(context)\">\r\n <mat-icon svgIcon=\"content-save\"></mat-icon>\r\n </button>\r\n\r\n <div #actions class=\"igo-actions-expand-container\">\r\n\r\n <button *ngIf=\"canShare && !context.imported\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.managePermissions' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"managePermissions.emit(context)\">\r\n <mat-icon svgIcon=\"account-arrow-right\"></mat-icon>\r\n </button>\r\n\r\n <!--button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.manageTools' | translate\"\r\n [color]=\"color\"\r\n (click)=\"manageTools.emit(context)\">\r\n <mat-icon svgIcon=\"widgets\"></mat-icon>\r\n </button-->\r\n\r\n <button *ngIf=\"!context.imported\"\r\n class=\"clone-button\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.clone' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [color]=\"color\"\r\n (click)=\"clone.emit(context)\">\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"context.permission === typePermission[typePermission.write] && !context.imported\"\r\n class=\"edit-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.edit' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"edit.emit(context)\">\r\n <mat-icon svgIcon=\"pencil\"></mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"!context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.hide' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"hide.emit(context)\">\r\n <mat-icon svgIcon=\"eye\"></mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"context.hidden && !context.imported\"\r\n class=\"hide-button\"\r\n mat-icon-button\r\n [color]=\"color\"\r\n [matTooltip]=\"'igo.context.contextManager.show' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"show.emit(context)\">\r\n <mat-icon svgIcon=\"eye-off\"></mat-icon>\r\n </button>\r\n\r\n <button *ngIf=\"context.permission === typePermission[typePermission.write] || context.imported\"\r\n class=\"delete-button\"\r\n mat-icon-button\r\n color=\"warn\"\r\n [matTooltip]=\"'igo.context.contextManager.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"delete.emit(context)\">\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n <button\r\n class=\"actions-button\"\r\n mat-icon-button\r\n igoCollapse\r\n [color]=\"color\"\r\n [target]=\"actions\"\r\n [collapsed]=collapsed\r\n (click)=\"collapsed = !collapsed\">\r\n <mat-icon svgIcon=\"dots-horizontal\"></mat-icon>\r\n </button>\r\n\r\n </div>\r\n\r\n</mat-list-item>\r\n", styles: [":host{overflow:hidden}.igo-actions-container{flex-shrink:0}.igo-actions-expand-container{display:inline-flex}mat-list-item ::ng-deep .mat-list-item-content .mat-list-text{padding:0}mat-icon.disabled{color:#00000061}mat-list-item.mat-list-item-light ::ng-deep .mat-list-item-content{color:#969696}\n"] }]
|
|
1753
1737
|
}], function () { return [{ type: i2.AuthService }, { type: i3.StorageService }]; }, { showFavorite: [{
|
|
1754
1738
|
type: Input
|
|
1755
1739
|
}], context: [{
|
|
@@ -2306,7 +2290,7 @@ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2306
2290
|
} }, dependencies: [i4.NgClass, i4.NgForOf, i4.NgIf, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgModel, i6.MatFormField, i6.MatSuffix, i5.MatInput, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i11$1.MatCheckbox, i12$1.MatMenu, i12$1.MatMenuItem, i12$1.MatMenuTrigger, i13.ListItemDirective, i13.ListComponent, i13.CollapsibleComponent, i13.ActionbarComponent, ContextItemComponent, i4.AsyncPipe, i13.KeyValuePipe, i9$1.TranslatePipe], styles: [".context-filter-max-width[_ngcontent-%COMP%]{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width[_ngcontent-%COMP%]{width:calc(100% - 135px);margin:5px;padding-left:6px}mat-form-field[_ngcontent-%COMP%]{height:40px}.profilsMenu[_ngcontent-%COMP%]{display:flex}.profilsMenu[_ngcontent-%COMP%] > mat-checkbox[_ngcontent-%COMP%]{width:8px}.add-context-button[_ngcontent-%COMP%]{margin:0;width:40px;display:inline-flex;overflow:hidden}"], changeDetection: 0 });
|
|
2307
2291
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextListComponent, [{
|
|
2308
2292
|
type: Component,
|
|
2309
|
-
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\n <mat-form-field *ngIf=\"showFilter()\" [ngClass]=\"auth.authenticated && configService.getConfig('context') ? 'context-filter-min-width' : 'context-filter-max-width'\">\n <input\n matInput\n type=\"text\"\n [placeholder]=\"'igo.context.contextManager.filterPlaceHolder' | translate\"\n [(ngModel)]=\"term\">\n <button\n mat-button\n mat-icon-button\n matSuffix\n class=\"clear-button\"\n *ngIf=\"term.length\"\n aria-label=\"Clear\"\n color=\"warn\"\n (click)=\"clearFilter()\">\n <mat-icon svgIcon=\"close\"></mat-icon>\n </button>\n </mat-form-field>\n\n <button\n *ngIf=\"!sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortAlphabetically' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(true)\">\n <mat-icon color=\"primary\" svgIcon=\"sort-alphabetical-variant\"></mat-icon>\n </button>\n <button\n *ngIf=\"sortedAlpha\"\n class=\"sort-alpha\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\n matTooltipShowDelay=\"500\"\n (click)=\"toggleSort(false)\">\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\n </button>\n\n <igo-actionbar *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"add-context-button\"\n [iconColor]=\"color\"\n [store]=\"actionStore\"\n [withIcon]=\"true\"\n icon=\"plus\"\n [withTitle]=\"actionbarMode === 'overlay'\"\n [horizontal]=\"false\"\n [mode]=\"actionbarMode\">\n </igo-actionbar>\n\n <button *ngIf=\"auth.authenticated && configService.getConfig('context')\"\n class=\"users-filter\"\n mat-icon-button\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\n matTooltipShowDelay=\"500\"\n [matMenuTriggerFor]=\"accountMenu\">\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\n </button>\n\n <mat-menu #accountMenu=\"matMenu\">\n <ng-container *ngFor=\"let user of users\">\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"getPermission(user).checked\"\n [indeterminate]=\"getPermission(user).indeterminate\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(user)\">\n </mat-checkbox>\n <button *ngIf=\"user.childs\"\n [matMenuTriggerFor]=\"subAccountMenu\"\n mat-menu-item>\n {{user.title}}\n </button>\n <button\n mat-menu-item\n *ngIf=\"!user.childs\">\n {{user.title}}\n </button>\n </span>\n\n <mat-menu #subAccountMenu=\"matMenu\">\n <mat-checkbox *ngFor=\"let child of user.childs\"\n class=\"mat-menu-item\"\n [checked]=\"getPermission(child).checked\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"userSelection(child, user)\">\n {{child.title}}\n </mat-checkbox>\n </mat-menu>\n </ng-container>\n\n <span class=\"profilsMenu\">\n <mat-checkbox\n class=\"mat-menu-item\"\n [checked]=\"showHidden\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showHiddenContexts.emit()\">\n </mat-checkbox>\n <button mat-menu-item>\n {{ 'igo.context.contextManager.showHidden' | translate }}\n </button>\n </span>\n </mat-menu>\n\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\n\n <igo-collapsible *ngIf=\"groupContexts.value.length && auth.authenticated\" [title]=\"titleMapping[groupContexts.key] | translate\"\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\" (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\">\n\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"context.id && this.defaultContextId && this.defaultContextId === context.id\"\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)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </igo-collapsible>\n\n <ng-template *ngIf=\"groupContexts.value.length && !auth.authenticated\" ngFor let-context [ngForOf]=\"groupContexts.value\">\n <igo-context-item\n igoListItem\n color=\"accent\"\n [showFavorite]=\"configService.getConfig('favoriteContext4NonAuthenticated')\"\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\n [context]=\"context\"\n [default]=\"configService.getConfig('context') ? defaultContextId === context.id : defaultContextId === context.uri\"\n (favorite)=\"favorite.emit(context)\"\n (select)=\"select.emit(context)\"\n (unselect)=\"unselect.emit(context)\">\n </igo-context-item>\n </ng-template>\n\n </ng-template>\n</igo-list>\n", styles: [".context-filter-max-width{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}mat-form-field{height:40px}.profilsMenu{display:flex}.profilsMenu>mat-checkbox{width:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}\n"] }]
|
|
2293
|
+
args: [{ selector: 'igo-context-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<igo-list [navigation]=\"true\">\r\n <mat-form-field *ngIf=\"showFilter()\" [ngClass]=\"auth.authenticated && configService.getConfig('context') ? 'context-filter-min-width' : 'context-filter-max-width'\">\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"'igo.context.contextManager.filterPlaceHolder' | translate\"\r\n [(ngModel)]=\"term\">\r\n <button\r\n mat-button\r\n mat-icon-button\r\n matSuffix\r\n class=\"clear-button\"\r\n *ngIf=\"term.length\"\r\n aria-label=\"Clear\"\r\n color=\"warn\"\r\n (click)=\"clearFilter()\">\r\n <mat-icon svgIcon=\"close\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n\r\n <button\r\n *ngIf=\"!sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortAlphabetically' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(true)\">\r\n <mat-icon color=\"primary\" svgIcon=\"sort-alphabetical-variant\"></mat-icon>\r\n </button>\r\n <button\r\n *ngIf=\"sortedAlpha\"\r\n class=\"sort-alpha\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.sortContextOrder' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n (click)=\"toggleSort(false)\">\r\n <mat-icon color=\"warn\" svgIcon=\"sort-variant-remove\"></mat-icon>\r\n </button>\r\n\r\n <igo-actionbar *ngIf=\"auth.authenticated && configService.getConfig('context')\"\r\n class=\"add-context-button\"\r\n [iconColor]=\"color\"\r\n [store]=\"actionStore\"\r\n [withIcon]=\"true\"\r\n icon=\"plus\"\r\n [withTitle]=\"actionbarMode === 'overlay'\"\r\n [horizontal]=\"false\"\r\n [mode]=\"actionbarMode\">\r\n </igo-actionbar>\r\n\r\n <button *ngIf=\"auth.authenticated && configService.getConfig('context')\"\r\n class=\"users-filter\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.contextManager.filterUser' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n [matMenuTriggerFor]=\"accountMenu\">\r\n <mat-icon color=\"primary\" svgIcon=\"filter-menu\"></mat-icon>\r\n </button>\r\n\r\n <mat-menu #accountMenu=\"matMenu\">\r\n <ng-container *ngFor=\"let user of users\">\r\n <span class=\"profilsMenu\">\r\n <mat-checkbox\r\n class=\"mat-menu-item\"\r\n [checked]=\"getPermission(user).checked\"\r\n [indeterminate]=\"getPermission(user).indeterminate\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"userSelection(user)\">\r\n </mat-checkbox>\r\n <button *ngIf=\"user.childs\"\r\n [matMenuTriggerFor]=\"subAccountMenu\"\r\n mat-menu-item>\r\n {{user.title}}\r\n </button>\r\n <button\r\n mat-menu-item\r\n *ngIf=\"!user.childs\">\r\n {{user.title}}\r\n </button>\r\n </span>\r\n\r\n <mat-menu #subAccountMenu=\"matMenu\">\r\n <mat-checkbox *ngFor=\"let child of user.childs\"\r\n class=\"mat-menu-item\"\r\n [checked]=\"getPermission(child).checked\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"userSelection(child, user)\">\r\n {{child.title}}\r\n </mat-checkbox>\r\n </mat-menu>\r\n </ng-container>\r\n\r\n <span class=\"profilsMenu\">\r\n <mat-checkbox\r\n class=\"mat-menu-item\"\r\n [checked]=\"showHidden\"\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"showHiddenContexts.emit()\">\r\n </mat-checkbox>\r\n <button mat-menu-item>\r\n {{ 'igo.context.contextManager.showHidden' | translate }}\r\n </button>\r\n </span>\r\n </mat-menu>\r\n\r\n <ng-template ngFor let-groupContexts [ngForOf]=\"contexts$ | async | keyvalue\">\r\n\r\n <igo-collapsible *ngIf=\"groupContexts.value.length && auth.authenticated\" [title]=\"titleMapping[groupContexts.key] | translate\"\r\n [collapsed]=\"collapsed[titleMapping[groupContexts.key]]\" (toggle)=\"collapsed[titleMapping[groupContexts.key]] = $event\">\r\n\r\n <ng-template ngFor let-context [ngForOf]=\"groupContexts.value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"context.id && this.defaultContextId && this.defaultContextId === context.id\"\r\n (edit)=\"edit.emit(context)\"\r\n (delete)=\"delete.emit(context)\"\r\n (clone)=\"clone.emit(context)\"\r\n (save)=\"save.emit(context)\"\r\n (hide)=\"hideContext(context)\"\r\n (show)=\"showContext(context)\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (manageTools)=\"manageTools.emit(context)\"\r\n (managePermissions)=\"managePermissions.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\">\r\n </igo-context-item>\r\n </ng-template>\r\n\r\n </igo-collapsible>\r\n\r\n <ng-template *ngIf=\"groupContexts.value.length && !auth.authenticated\" ngFor let-context [ngForOf]=\"groupContexts.value\">\r\n <igo-context-item\r\n igoListItem\r\n color=\"accent\"\r\n [showFavorite]=\"configService.getConfig('favoriteContext4NonAuthenticated')\"\r\n [selected]=\"selectedContext && selectedContext.uri === context.uri\"\r\n [context]=\"context\"\r\n [default]=\"configService.getConfig('context') ? defaultContextId === context.id : defaultContextId === context.uri\"\r\n (favorite)=\"favorite.emit(context)\"\r\n (select)=\"select.emit(context)\"\r\n (unselect)=\"unselect.emit(context)\">\r\n </igo-context-item>\r\n </ng-template>\r\n\r\n </ng-template>\r\n</igo-list>\r\n", styles: [".context-filter-max-width{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width{width:calc(100% - 135px);margin:5px;padding-left:6px}mat-form-field{height:40px}.profilsMenu{display:flex}.profilsMenu>mat-checkbox{width:8px}.add-context-button{margin:0;width:40px;display:inline-flex;overflow:hidden}\n"] }]
|
|
2310
2294
|
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i3.ConfigService }, { type: i2.AuthService }, { type: i1$3.MatDialog }, { type: i3.LanguageService }, { type: i3.StorageService }]; }, { contexts: [{
|
|
2311
2295
|
type: Input
|
|
2312
2296
|
}], selectedContext: [{
|
|
@@ -2369,12 +2353,9 @@ class ContextListBindingDirective {
|
|
|
2369
2353
|
const map = this.mapService.getMap();
|
|
2370
2354
|
const contextFromMap = this.contextService.getContextFromMap(map);
|
|
2371
2355
|
const msgSuccess = () => {
|
|
2372
|
-
|
|
2373
|
-
const message = translate.instant('igo.context.contextManager.dialog.saveMsg', {
|
|
2356
|
+
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
|
|
2374
2357
|
value: context.title
|
|
2375
2358
|
});
|
|
2376
|
-
const title = translate.instant('igo.context.contextManager.dialog.saveTitle');
|
|
2377
|
-
this.messageService.success(message, title);
|
|
2378
2359
|
};
|
|
2379
2360
|
if (context.imported) {
|
|
2380
2361
|
contextFromMap.title = context.title;
|
|
@@ -2404,12 +2385,9 @@ class ContextListBindingDirective {
|
|
|
2404
2385
|
this.messageService.remove(this.previousMessageId);
|
|
2405
2386
|
}
|
|
2406
2387
|
this.contextService.defaultContextId$.next(context.id);
|
|
2407
|
-
const
|
|
2408
|
-
const message = translate.instant('igo.context.contextManager.dialog.favoriteMsg', {
|
|
2388
|
+
const messageObj = this.messageService.success('igo.context.contextManager.dialog.favoriteMsg', 'igo.context.contextManager.dialog.favoriteTitle', undefined, {
|
|
2409
2389
|
value: context.title
|
|
2410
2390
|
});
|
|
2411
|
-
const title = translate.instant('igo.context.contextManager.dialog.favoriteTitle');
|
|
2412
|
-
const messageObj = this.messageService.success(message, title);
|
|
2413
2391
|
this.previousMessageId = messageObj.toastId;
|
|
2414
2392
|
this.cdRef.detectChanges();
|
|
2415
2393
|
});
|
|
@@ -2429,11 +2407,7 @@ class ContextListBindingDirective {
|
|
|
2429
2407
|
this.contextService
|
|
2430
2408
|
.delete(context.id, context.imported)
|
|
2431
2409
|
.subscribe(() => {
|
|
2432
|
-
|
|
2433
|
-
value: context.title
|
|
2434
|
-
});
|
|
2435
|
-
const title = translate.instant('igo.context.contextManager.dialog.deleteTitle');
|
|
2436
|
-
this.messageService.info(message, title);
|
|
2410
|
+
this.messageService.info('igo.context.contextManager.dialog.deleteMsg', 'igo.context.contextManager.dialog.deleteTitle', undefined, { value: context.title });
|
|
2437
2411
|
});
|
|
2438
2412
|
}
|
|
2439
2413
|
});
|
|
@@ -2444,12 +2418,7 @@ class ContextListBindingDirective {
|
|
|
2444
2418
|
uri: context.uri + '-copy'
|
|
2445
2419
|
};
|
|
2446
2420
|
this.contextService.clone(context.id, properties).subscribe(() => {
|
|
2447
|
-
|
|
2448
|
-
const message = translate.instant('igo.context.contextManager.dialog.cloneMsg', {
|
|
2449
|
-
value: context.title
|
|
2450
|
-
});
|
|
2451
|
-
const title = translate.instant('igo.context.contextManager.dialog.cloneTitle');
|
|
2452
|
-
this.messageService.success(message, title);
|
|
2421
|
+
this.messageService.success('igo.context.contextManager.dialog.cloneMsg', 'igo.context.contextManager.dialog.cloneTitle', undefined, { value: context.title });
|
|
2453
2422
|
});
|
|
2454
2423
|
}
|
|
2455
2424
|
onCreate(opts) {
|
|
@@ -2457,12 +2426,7 @@ class ContextListBindingDirective {
|
|
|
2457
2426
|
const context = this.contextService.getContextFromMap(this.component.map, empty);
|
|
2458
2427
|
context.title = title;
|
|
2459
2428
|
this.contextService.create(context).subscribe(() => {
|
|
2460
|
-
|
|
2461
|
-
const titleD = translate.instant('igo.context.bookmarkButton.dialog.createTitle');
|
|
2462
|
-
const message = translate.instant('igo.context.bookmarkButton.dialog.createMsg', {
|
|
2463
|
-
value: context.title
|
|
2464
|
-
});
|
|
2465
|
-
this.messageService.success(message, titleD);
|
|
2429
|
+
this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
|
|
2466
2430
|
this.contextService.loadContext(context.uri);
|
|
2467
2431
|
});
|
|
2468
2432
|
}
|
|
@@ -2608,9 +2572,8 @@ function ContextFormComponent_span_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
2608
2572
|
i0.ɵɵtextInterpolate1("", ctx_r0.prefix, "-");
|
|
2609
2573
|
} }
|
|
2610
2574
|
class ContextFormComponent {
|
|
2611
|
-
constructor(formBuilder,
|
|
2575
|
+
constructor(formBuilder, messageService) {
|
|
2612
2576
|
this.formBuilder = formBuilder;
|
|
2613
|
-
this.languageService = languageService;
|
|
2614
2577
|
this.messageService = messageService;
|
|
2615
2578
|
this._disabled = false;
|
|
2616
2579
|
// TODO: replace any by ContextOptions or Context
|
|
@@ -2656,10 +2619,7 @@ class ContextFormComponent {
|
|
|
2656
2619
|
const text = this.prefix + '-' + this.form.value.uri.replace(' ', '');
|
|
2657
2620
|
const successful = Clipboard.copy(text);
|
|
2658
2621
|
if (successful) {
|
|
2659
|
-
|
|
2660
|
-
const title = translate.instant('igo.context.contextManager.dialog.copyTitle');
|
|
2661
|
-
const msg = translate.instant('igo.context.contextManager.dialog.copyMsg');
|
|
2662
|
-
this.messageService.success(msg, title);
|
|
2622
|
+
this.messageService.success('igo.context.contextManager.dialog.copyMsg', 'igo.context.contextManager.dialog.copyTitle');
|
|
2663
2623
|
}
|
|
2664
2624
|
}
|
|
2665
2625
|
buildForm() {
|
|
@@ -2673,7 +2633,7 @@ class ContextFormComponent {
|
|
|
2673
2633
|
});
|
|
2674
2634
|
}
|
|
2675
2635
|
}
|
|
2676
|
-
ContextFormComponent.ɵfac = function ContextFormComponent_Factory(t) { return new (t || ContextFormComponent)(i0.ɵɵdirectiveInject(i1$2.UntypedFormBuilder), i0.ɵɵdirectiveInject(i3.
|
|
2636
|
+
ContextFormComponent.ɵfac = function ContextFormComponent_Factory(t) { return new (t || ContextFormComponent)(i0.ɵɵdirectiveInject(i1$2.UntypedFormBuilder), i0.ɵɵdirectiveInject(i3.MessageService)); };
|
|
2677
2637
|
ContextFormComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextFormComponent, selectors: [["igo-context-form"]], inputs: { btnSubmitText: "btnSubmitText", context: "context", disabled: "disabled" }, outputs: { submitForm: "submitForm", clone: "clone", delete: "delete" }, decls: 19, vars: 18, consts: [[1, "igo-form", 3, "formGroup", "ngSubmit"], [1, "full-width"], ["matInput", "", "required", "", "maxlength", "128", "formControlName", "title", 3, "placeholder"], ["id", "uriInput", 1, "full-width"], ["class", "prefix", 4, "ngIf"], [1, "fieldWrapper"], ["matInput", "", "maxlength", "64", "floatLabel", "always", "formControlName", "uri", 3, "placeholder"], ["id", "copyButton", "type", "button", "mat-icon-button", "", "tooltip-position", "below", "matTooltipShowDelay", "500", "color", "primary", 3, "matTooltip", "click"], ["svgIcon", "content-copy"], [1, "igo-form-button-group"], ["mat-raised-button", "", "type", "submit", 3, "disabled"], [1, "prefix"]], template: function ContextFormComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2678
2638
|
i0.ɵɵelementStart(0, "form", 0);
|
|
2679
2639
|
i0.ɵɵlistener("ngSubmit", function ContextFormComponent_Template_form_ngSubmit_0_listener() { return ctx.handleFormSubmit(ctx.form.value); });
|
|
@@ -2718,8 +2678,8 @@ ContextFormComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2718
2678
|
} }, dependencies: [i4.NgIf, i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.RequiredValidator, i1$2.MaxLengthValidator, i1$2.FormGroupDirective, i1$2.FormControlName, i6.MatError, i6.MatFormField, i5.MatInput, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i9$1.TranslatePipe], styles: ["form[_ngcontent-%COMP%]{margin:10px}.full-width[_ngcontent-%COMP%]{width:100%}#uriInput[_ngcontent-%COMP%] .fieldWrapper[_ngcontent-%COMP%]{display:block;overflow:hidden}#uriInput[_ngcontent-%COMP%] .prefix[_ngcontent-%COMP%]{float:left}#copyButton[_ngcontent-%COMP%]{width:24px;float:right;position:relative;top:-58px;left:5px}"] });
|
|
2719
2679
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextFormComponent, [{
|
|
2720
2680
|
type: Component,
|
|
2721
|
-
args: [{ selector: 'igo-context-form', template: "<form class=\"igo-form\" [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\">\n\n <mat-form-field class=\"full-width\">\n <input matInput required\n maxlength=\"128\"\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\">\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 <span *ngIf=\"prefix\" class=\"prefix\">{{prefix}}-</span>\n <span class=\"fieldWrapper\">\n <input matInput\n maxlength=\"64\"\n floatLabel = \"always\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\">\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 <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid || disabled\">\n {{ 'igo.context.contextManager.form.edit' | translate }}\n </button>\n </div>\n\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"] }]
|
|
2722
|
-
}], function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i3.
|
|
2681
|
+
args: [{ selector: 'igo-context-form', template: "<form class=\"igo-form\" [formGroup]=\"form\"\r\n (ngSubmit)=\"handleFormSubmit(form.value)\">\r\n\r\n <mat-form-field class=\"full-width\">\r\n <input matInput required\r\n maxlength=\"128\"\r\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\r\n formControlName=\"title\">\r\n <mat-error>\r\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-form-field id=\"uriInput\" class=\"full-width\">\r\n <span *ngIf=\"prefix\" class=\"prefix\">{{prefix}}-</span>\r\n <span class=\"fieldWrapper\">\r\n <input matInput\r\n maxlength=\"64\"\r\n floatLabel = \"always\"\r\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\r\n formControlName=\"uri\">\r\n </span>\r\n </mat-form-field>\r\n\r\n <button\r\n id=\"copyButton\"\r\n type=\"button\"\r\n mat-icon-button\r\n tooltip-position=\"below\"\r\n matTooltipShowDelay=\"500\"\r\n [matTooltip]=\"'igo.context.contextManager.form.copy' | translate\"\r\n color=\"primary\"\r\n (click)=\"copyTextToClipboard()\">\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"submit\"\r\n [disabled]=\"!form.valid || disabled\">\r\n {{ 'igo.context.contextManager.form.edit' | translate }}\r\n </button>\r\n </div>\r\n\r\n</form>\r\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"] }]
|
|
2682
|
+
}], function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i3.MessageService }]; }, { btnSubmitText: [{
|
|
2723
2683
|
type: Input
|
|
2724
2684
|
}], context: [{
|
|
2725
2685
|
type: Input
|
|
@@ -2767,7 +2727,7 @@ ContextEditComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2767
2727
|
} }, dependencies: [i4.NgIf, ContextFormComponent, i9$1.TranslatePipe], encapsulation: 2 });
|
|
2768
2728
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextEditComponent, [{
|
|
2769
2729
|
type: Component,
|
|
2770
|
-
args: [{ selector: 'igo-context-edit', template: "<igo-context-form *ngIf=\"context\"\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\n [context]=\"context\"\n (submitForm)=\"submitForm.emit($event)\">\n</igo-context-form>\n" }]
|
|
2730
|
+
args: [{ selector: 'igo-context-edit', template: "<igo-context-form *ngIf=\"context\"\r\n [btnSubmitText]=\"'igo.context.contextManager.save' | translate\"\r\n [context]=\"context\"\r\n (submitForm)=\"submitForm.emit($event)\">\r\n</igo-context-form>\r\n" }]
|
|
2771
2731
|
}], function () { return [{ type: i0.ChangeDetectorRef }]; }, { context: [{
|
|
2772
2732
|
type: Input
|
|
2773
2733
|
}], submitForm: [{
|
|
@@ -2775,22 +2735,18 @@ ContextEditComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
|
|
|
2775
2735
|
}] }); })();
|
|
2776
2736
|
|
|
2777
2737
|
class ContextEditBindingDirective {
|
|
2778
|
-
constructor(component, contextService, messageService
|
|
2738
|
+
constructor(component, contextService, messageService) {
|
|
2779
2739
|
this.contextService = contextService;
|
|
2780
2740
|
this.messageService = messageService;
|
|
2781
|
-
this.languageService = languageService;
|
|
2782
2741
|
this.submitSuccessed = new EventEmitter();
|
|
2783
2742
|
this.component = component;
|
|
2784
2743
|
}
|
|
2785
2744
|
onEdit(context) {
|
|
2786
2745
|
const id = this.component.context.id;
|
|
2787
2746
|
this.contextService.update(id, context).subscribe(() => {
|
|
2788
|
-
|
|
2789
|
-
const message = translate.instant('igo.context.contextManager.dialog.saveMsg', {
|
|
2747
|
+
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, {
|
|
2790
2748
|
value: context.title || this.component.context.title
|
|
2791
2749
|
});
|
|
2792
|
-
const title = translate.instant('igo.context.contextManager.dialog.saveTitle');
|
|
2793
|
-
this.messageService.success(message, title);
|
|
2794
2750
|
this.contextService.setEditedContext(undefined);
|
|
2795
2751
|
this.submitSuccessed.emit(context);
|
|
2796
2752
|
});
|
|
@@ -2805,7 +2761,7 @@ class ContextEditBindingDirective {
|
|
|
2805
2761
|
this.component.context = context;
|
|
2806
2762
|
}
|
|
2807
2763
|
}
|
|
2808
|
-
ContextEditBindingDirective.ɵfac = function ContextEditBindingDirective_Factory(t) { return new (t || ContextEditBindingDirective)(i0.ɵɵdirectiveInject(ContextEditComponent, 2), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i3.MessageService)
|
|
2764
|
+
ContextEditBindingDirective.ɵfac = function ContextEditBindingDirective_Factory(t) { return new (t || ContextEditBindingDirective)(i0.ɵɵdirectiveInject(ContextEditComponent, 2), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i3.MessageService)); };
|
|
2809
2765
|
ContextEditBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ContextEditBindingDirective, selectors: [["", "igoContextEditBinding", ""]], hostBindings: function ContextEditBindingDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
2810
2766
|
i0.ɵɵlistener("submitForm", function ContextEditBindingDirective_submitForm_HostBindingHandler($event) { return ctx.onEdit($event); });
|
|
2811
2767
|
} }, outputs: { submitSuccessed: "submitSuccessed" } });
|
|
@@ -2816,7 +2772,7 @@ ContextEditBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type:
|
|
|
2816
2772
|
}]
|
|
2817
2773
|
}], function () { return [{ type: ContextEditComponent, decorators: [{
|
|
2818
2774
|
type: Self
|
|
2819
|
-
}] }, { type: ContextService }, { type: i3.MessageService }
|
|
2775
|
+
}] }, { type: ContextService }, { type: i3.MessageService }]; }, { submitSuccessed: [{
|
|
2820
2776
|
type: Output
|
|
2821
2777
|
}], onEdit: [{
|
|
2822
2778
|
type: HostListener,
|
|
@@ -3096,7 +3052,7 @@ ContextPermissionsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
3096
3052
|
} }, dependencies: [i4.NgForOf, i4.NgIf, i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.RequiredValidator, i1$2.NgModel, i1$2.FormControlDirective, i1$2.FormGroupDirective, i1$2.FormControlName, i6.MatError, i6.MatFormField, i5.MatInput, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i7$1.MatListItem, i7$1.MatListAvatarCssMatStyler, i12.MatLine, i13$1.MatRadioGroup, i13$1.MatRadioButton, i12.MatOption, i14.MatAutocomplete, i14.MatAutocompleteTrigger, i13.ListComponent, i13.CollapsibleComponent, i13.StopPropagationDirective, i13.KeyValuePipe, i9$1.TranslatePipe], styles: ["[_nghost-%COMP%]{margin:10px}.full-width[_ngcontent-%COMP%]{width:100%}mat-radio-button[_ngcontent-%COMP%]{padding:14px 14px 14px 0}.scopeForm[_ngcontent-%COMP%], form[_ngcontent-%COMP%]{padding:5px}mat-option[_ngcontent-%COMP%] .mat-option-text{line-height:normal;line-height:initial}"] });
|
|
3097
3053
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextPermissionsComponent, [{
|
|
3098
3054
|
type: Component,
|
|
3099
|
-
args: [{ selector: 'igo-context-permissions', template: "<div *ngIf=\"context\">\n\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\n </div>\n\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\n <mat-radio-group [(ngModel)]=\"context.scope\"\n (change)=\"scopeChanged.emit(context)\">\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 <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\n {{ 'igo.context.permission.scope.public' | translate }}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\n <form *ngIf=\"context.scope !== 'private' && canWrite\" [formGroup]=\"form\"\n (ngSubmit)=\"handleFormSubmit(form.value)\">\n\n <mat-form-field class=\"full-width\">\n <input matInput required\n [placeholder]=\"'igo.context.permission.user' | translate\"\n [formControl]=\"formControl\"\n [matAutocomplete]=\"auto\">\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onProfilSelected($event.option.value)\"\n [displayWith]=\"displayFn\">\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\n {{profil.title}}<br>\n <small class=\"mat-typography\">{{profil.name}}</small>\n </mat-option>\n </mat-autocomplete>\n <mat-error>\n {{ 'igo.context.permission.profilRequired' | translate }}\n </mat-error>\n </mat-form-field>\n\n\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\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\">\n {{ 'igo.context.permission.addBtn' | translate }}\n </button>\n </div>\n\n </form>\n\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\n <igo-collapsible\n *ngIf=\"groupPermissions.value.length\"\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\">\n\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\n <mat-list-item>\n <mat-icon mat-list-avatar svgIcon=\"account-outline\"></mat-icon>\n <h4 mat-line>{{permission.profilTitle}} <small class=\"mat-typography\">{{permission.profil}}</small></h4>\n\n <div igoStopPropagation\n class=\"igo-actions-container\">\n\n <button *ngIf=\"canWrite || permission.profil === authService.decodeToken().user.sourceId\"\n mat-icon-button\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\n matTooltipShowDelay=\"500\"\n color=\"warn\"\n (click)=\"removePermission.emit(permission)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </div>\n\n </mat-list-item>\n </ng-template>\n </igo-collapsible>\n </ng-template>\n </igo-list>\n\n</div>\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}mat-option ::ng-deep .mat-option-text{line-height:normal;line-height:initial}\n"] }]
|
|
3055
|
+
args: [{ selector: 'igo-context-permissions', template: "<div *ngIf=\"context\">\r\n\r\n <div *ngIf=\"!canWrite\" class=\"scopeForm\">\r\n <h4>{{ 'igo.context.permission.readOnlyTitle' | translate }}</h4>\r\n <p>{{ 'igo.context.permission.readOnlyMsg' | translate }}</p>\r\n </div>\r\n\r\n <div *ngIf=\"canWrite\" class=\"scopeForm\">\r\n <mat-radio-group [(ngModel)]=\"context.scope\"\r\n (change)=\"scopeChanged.emit(context)\">\r\n <mat-radio-button value=\"private\">\r\n {{ 'igo.context.permission.scope.private' | translate }}\r\n </mat-radio-button>\r\n <mat-radio-button value=\"protected\">\r\n {{ 'igo.context.permission.scope.shared' | translate }}\r\n </mat-radio-button>\r\n <mat-radio-button *ngIf=\"authService.isAdmin\" value=\"public\">\r\n {{ 'igo.context.permission.scope.public' | translate }}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <form *ngIf=\"context.scope !== 'private' && canWrite\" [formGroup]=\"form\"\r\n (ngSubmit)=\"handleFormSubmit(form.value)\">\r\n\r\n <mat-form-field class=\"full-width\">\r\n <input matInput required\r\n [placeholder]=\"'igo.context.permission.user' | translate\"\r\n [formControl]=\"formControl\"\r\n [matAutocomplete]=\"auto\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onProfilSelected($event.option.value)\"\r\n [displayWith]=\"displayFn\">\r\n <mat-option *ngFor=\"let profil of this.profils\" [value]=\"profil\">\r\n {{profil.title}}<br>\r\n <small class=\"mat-typography\">{{profil.name}}</small>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-error>\r\n {{ 'igo.context.permission.profilRequired' | translate }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n\r\n <mat-radio-group formControlName=\"typePermission\">\r\n <mat-radio-button value=\"read\">\r\n {{ 'igo.context.permission.read' | translate }}\r\n </mat-radio-button>\r\n <mat-radio-button value=\"write\">\r\n {{ 'igo.context.permission.write' | translate }}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n\r\n\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n type=\"submit\"\r\n [disabled]=\"!form.valid\">\r\n {{ 'igo.context.permission.addBtn' | translate }}\r\n </button>\r\n </div>\r\n\r\n </form>\r\n\r\n <igo-list *ngIf=\"permissions && context.scope !== 'private'\">\r\n <ng-template ngFor let-groupPermissions [ngForOf]=\"permissions | keyvalue\">\r\n <igo-collapsible\r\n *ngIf=\"groupPermissions.value.length\"\r\n [title]=\"'igo.context.permission.' + groupPermissions.key | translate\">\r\n\r\n <ng-template ngFor let-permission [ngForOf]=\"groupPermissions.value\">\r\n <mat-list-item>\r\n <mat-icon mat-list-avatar svgIcon=\"account-outline\"></mat-icon>\r\n <h4 mat-line>{{permission.profilTitle}} <small class=\"mat-typography\">{{permission.profil}}</small></h4>\r\n\r\n <div igoStopPropagation\r\n class=\"igo-actions-container\">\r\n\r\n <button *ngIf=\"canWrite || permission.profil === authService.decodeToken().user.sourceId\"\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.permission.delete' | translate\"\r\n matTooltipShowDelay=\"500\"\r\n color=\"warn\"\r\n (click)=\"removePermission.emit(permission)\">\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </div>\r\n\r\n </mat-list-item>\r\n </ng-template>\r\n </igo-collapsible>\r\n </ng-template>\r\n </igo-list>\r\n\r\n</div>\r\n", styles: [":host{margin:10px}.full-width{width:100%}mat-radio-button{padding:14px 14px 14px 0}.scopeForm,form{padding:5px}mat-option ::ng-deep .mat-option-text{line-height:normal;line-height:initial}\n"] }]
|
|
3100
3056
|
}], function () { return [{ type: i1$2.UntypedFormBuilder }, { type: i0.ChangeDetectorRef }, { type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.ConfigService }]; }, { context: [{
|
|
3101
3057
|
type: Input
|
|
3102
3058
|
}], permissions: [{
|
|
@@ -3118,11 +3074,8 @@ class ContextPermissionsBindingDirective {
|
|
|
3118
3074
|
this.component = component;
|
|
3119
3075
|
}
|
|
3120
3076
|
onAddPermission(permission) {
|
|
3121
|
-
const translate = this.languageService.translate;
|
|
3122
3077
|
if (!permission.profil) {
|
|
3123
|
-
|
|
3124
|
-
const title = translate.instant('igo.context.contextManager.errors.addPermissionTitle');
|
|
3125
|
-
this.messageService.error(message, title);
|
|
3078
|
+
this.messageService.error('igo.context.contextManager.errors.addPermissionEmpty', 'igo.context.contextManager.errors.addPermissionTitle');
|
|
3126
3079
|
return;
|
|
3127
3080
|
}
|
|
3128
3081
|
const contextId = this.component.context.id;
|
|
@@ -3133,11 +3086,7 @@ class ContextPermissionsBindingDirective {
|
|
|
3133
3086
|
this.component.permissions[permission.typePermission].push(p);
|
|
3134
3087
|
}
|
|
3135
3088
|
const profil = permission.profil;
|
|
3136
|
-
|
|
3137
|
-
value: profil
|
|
3138
|
-
});
|
|
3139
|
-
const title = translate.instant('igo.context.permission.dialog.addTitle');
|
|
3140
|
-
this.messageService.success(message, title);
|
|
3089
|
+
this.messageService.success('igo.context.permission.dialog.addMsg', 'igo.context.permission.dialog.addTitle', undefined, { value: profil });
|
|
3141
3090
|
this.cd.detectChanges();
|
|
3142
3091
|
});
|
|
3143
3092
|
}
|
|
@@ -3151,24 +3100,14 @@ class ContextPermissionsBindingDirective {
|
|
|
3151
3100
|
});
|
|
3152
3101
|
this.component.permissions[permission.typePermission].splice(index, 1);
|
|
3153
3102
|
const profil = permission.profil;
|
|
3154
|
-
|
|
3155
|
-
const message = translate.instant('igo.context.permission.dialog.deleteMsg', {
|
|
3156
|
-
value: profil
|
|
3157
|
-
});
|
|
3158
|
-
const title = translate.instant('igo.context.permission.dialog.deleteTitle');
|
|
3159
|
-
this.messageService.success(message, title);
|
|
3103
|
+
this.messageService.success('igo.context.permission.dialog.deleteMsg', 'igo.context.permission.dialog.deleteTitle', undefined, { value: profil });
|
|
3160
3104
|
this.cd.detectChanges();
|
|
3161
3105
|
});
|
|
3162
3106
|
}
|
|
3163
3107
|
onScopeChanged(context) {
|
|
3164
3108
|
const scope = context.scope;
|
|
3165
3109
|
this.contextService.update(context.id, { scope }).subscribe(() => {
|
|
3166
|
-
|
|
3167
|
-
const message = translate.instant('igo.context.permission.dialog.scopeChangedMsg', {
|
|
3168
|
-
value: translate.instant('igo.context.permission.scope.' + scope)
|
|
3169
|
-
});
|
|
3170
|
-
const title = translate.instant('igo.context.permission.dialog.scopeChangedTitle');
|
|
3171
|
-
this.messageService.success(message, title);
|
|
3110
|
+
this.messageService.success('igo.context.permission.dialog.scopeChangedMsg', 'igo.context.permission.dialog.scopeChangedTitle', undefined, { value: 'igo.context.permission.scope.' + scope });
|
|
3172
3111
|
});
|
|
3173
3112
|
}
|
|
3174
3113
|
ngOnInit() {
|
|
@@ -3221,10 +3160,9 @@ ContextPermissionsBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective(
|
|
|
3221
3160
|
}] }); })();
|
|
3222
3161
|
|
|
3223
3162
|
class BookmarkButtonComponent {
|
|
3224
|
-
constructor(dialog, contextService,
|
|
3163
|
+
constructor(dialog, contextService, messageService) {
|
|
3225
3164
|
this.dialog = dialog;
|
|
3226
3165
|
this.contextService = contextService;
|
|
3227
|
-
this.languageService = languageService;
|
|
3228
3166
|
this.messageService = messageService;
|
|
3229
3167
|
}
|
|
3230
3168
|
get map() {
|
|
@@ -3249,19 +3187,14 @@ class BookmarkButtonComponent {
|
|
|
3249
3187
|
const context = this.contextService.getContextFromMap(this.map);
|
|
3250
3188
|
context.title = title;
|
|
3251
3189
|
this.contextService.create(context).subscribe(() => {
|
|
3252
|
-
|
|
3253
|
-
const titleD = translate.instant('igo.context.bookmarkButton.dialog.createTitle');
|
|
3254
|
-
const message = translate.instant('igo.context.bookmarkButton.dialog.createMsg', {
|
|
3255
|
-
value: context.title
|
|
3256
|
-
});
|
|
3257
|
-
this.messageService.success(message, titleD);
|
|
3190
|
+
this.messageService.success('igo.context.bookmarkButton.dialog.createMsg', 'igo.context.bookmarkButton.dialog.createTitle', undefined, { value: context.title });
|
|
3258
3191
|
this.contextService.loadContext(context.uri);
|
|
3259
3192
|
});
|
|
3260
3193
|
}
|
|
3261
3194
|
});
|
|
3262
3195
|
}
|
|
3263
3196
|
}
|
|
3264
|
-
BookmarkButtonComponent.ɵfac = function BookmarkButtonComponent_Factory(t) { return new (t || BookmarkButtonComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i3.
|
|
3197
|
+
BookmarkButtonComponent.ɵfac = function BookmarkButtonComponent_Factory(t) { return new (t || BookmarkButtonComponent)(i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i3.MessageService)); };
|
|
3265
3198
|
BookmarkButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BookmarkButtonComponent, selectors: [["igo-bookmark-button"]], inputs: { map: "map", color: "color" }, decls: 4, vars: 4, consts: [[1, "igo-bookmark-button-container"], ["mat-icon-button", "", "matTooltipPosition", "above", 3, "matTooltip", "color", "click"], ["svgIcon", "star"]], template: function BookmarkButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3266
3199
|
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
3267
3200
|
i0.ɵɵlistener("click", function BookmarkButtonComponent_Template_button_click_1_listener() { return ctx.createContext(); });
|
|
@@ -3274,8 +3207,8 @@ BookmarkButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Boo
|
|
|
3274
3207
|
} }, dependencies: [i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, i9$1.TranslatePipe], styles: [".igo-bookmark-button-container[_ngcontent-%COMP%]{width:40px}.igo-bookmark-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#fff}.igo-bookmark-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#efefef}button[_ngcontent-%COMP%], [_nghost-%COMP%] button .mat-button-ripple-round{border-radius:0}"] });
|
|
3275
3208
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BookmarkButtonComponent, [{
|
|
3276
3209
|
type: Component,
|
|
3277
|
-
args: [{ selector: 'igo-bookmark-button', 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 <mat-icon svgIcon=\"star\"></mat-icon>\n </button>\n</div>\n", styles: [".igo-bookmark-button-container{width:40px}.igo-bookmark-button-container button{background-color:#fff}.igo-bookmark-button-container button:hover{background-color:#efefef}button,:host ::ng-deep button .mat-button-ripple-round{border-radius:0}\n"] }]
|
|
3278
|
-
}], function () { return [{ type: i1$3.MatDialog }, { type: ContextService }, { type: i3.
|
|
3210
|
+
args: [{ selector: 'igo-bookmark-button', template: "<div class=\"igo-bookmark-button-container\">\r\n <button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.bookmarkButton.create' | translate\"\r\n matTooltipPosition=\"above\"\r\n [color]=\"color\"\r\n (click)=\"createContext()\">\r\n <mat-icon svgIcon=\"star\"></mat-icon>\r\n </button>\r\n</div>\r\n", styles: [".igo-bookmark-button-container{width:40px}.igo-bookmark-button-container button{background-color:#fff}.igo-bookmark-button-container button:hover{background-color:#efefef}button,:host ::ng-deep button .mat-button-ripple-round{border-radius:0}\n"] }]
|
|
3211
|
+
}], function () { return [{ type: i1$3.MatDialog }, { type: ContextService }, { type: i3.MessageService }]; }, { map: [{
|
|
3279
3212
|
type: Input
|
|
3280
3213
|
}], color: [{
|
|
3281
3214
|
type: Input
|
|
@@ -3320,7 +3253,7 @@ PoiDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoiDialo
|
|
|
3320
3253
|
} }, dependencies: [i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.RequiredValidator, i1$2.NgModel, i7.MatButton, i6.MatFormField, i1$3.MatDialogTitle, i1$3.MatDialogContent, i1$3.MatDialogActions, i5.MatInput, i9$1.TranslatePipe], encapsulation: 2 });
|
|
3321
3254
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoiDialogComponent, [{
|
|
3322
3255
|
type: Component,
|
|
3323
|
-
args: [{ selector: 'igo-poi-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{ 'igo.context.poiButton.dialog.title' | translate }}</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input matInput required autocomplete=\"off\"\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\n [(ngModel)]=\"title\">\n </mat-form-field>\n</div>\n<div mat-dialog-actions>\n <button mat-button color=\"primary\"\n [disabled]=\"!title\"\n (click)=\"dialogRef.close(title)\">\n {{'igo.common.confirmDialog.confirmBtn' | translate}}\n </button>\n <button mat-button\n (click)=\"dialogRef.close(false)\">\n {{'igo.common.confirmDialog.cancelBtn' |\u00A0translate}}\n </button>\n</div>\n" }]
|
|
3256
|
+
args: [{ selector: 'igo-poi-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{ 'igo.context.poiButton.dialog.title' | translate }}</h1>\r\n<div mat-dialog-content>\r\n <mat-form-field>\r\n <input matInput required autocomplete=\"off\"\r\n [placeholder]=\"'igo.context.poiButton.dialog.placeholder' | translate\"\r\n [(ngModel)]=\"title\">\r\n </mat-form-field>\r\n</div>\r\n<div mat-dialog-actions>\r\n <button mat-button color=\"primary\"\r\n [disabled]=\"!title\"\r\n (click)=\"dialogRef.close(title)\">\r\n {{'igo.common.confirmDialog.confirmBtn' | translate}}\r\n </button>\r\n <button mat-button\r\n (click)=\"dialogRef.close(false)\">\r\n {{'igo.common.confirmDialog.cancelBtn' |\u00A0translate}}\r\n </button>\r\n</div>\r\n" }]
|
|
3324
3257
|
}], function () { return [{ type: i1$3.MatDialogRef }]; }, null); })();
|
|
3325
3258
|
|
|
3326
3259
|
class PoiService {
|
|
@@ -3401,17 +3334,12 @@ class PoiButtonComponent {
|
|
|
3401
3334
|
}
|
|
3402
3335
|
deletePoi(poi) {
|
|
3403
3336
|
if (poi && poi.id) {
|
|
3404
|
-
const translate = this.languageService.translate;
|
|
3405
3337
|
this.confirmDialogService
|
|
3406
|
-
.open(translate.instant('igo.context.poiButton.dialog.confirmDelete'))
|
|
3338
|
+
.open(this.languageService.translate.instant('igo.context.poiButton.dialog.confirmDelete'))
|
|
3407
3339
|
.subscribe(confirm => {
|
|
3408
3340
|
if (confirm) {
|
|
3409
3341
|
this.poiService.delete(poi.id).subscribe(() => {
|
|
3410
|
-
|
|
3411
|
-
const message = translate.instant('igo.context.poiButton.dialog.deleteMsg', {
|
|
3412
|
-
value: poi.title
|
|
3413
|
-
});
|
|
3414
|
-
this.messageService.info(message, title);
|
|
3342
|
+
this.messageService.info('igo.context.poiButton.dialog.deleteMsg', 'igo.context.poiButton.dialog.deleteTitle', undefined, { value: poi.title });
|
|
3415
3343
|
this.pois = this.pois.filter(p => p.id !== poi.id);
|
|
3416
3344
|
}, err => {
|
|
3417
3345
|
err.error.title = 'DELETE Pois';
|
|
@@ -3446,12 +3374,7 @@ class PoiButtonComponent {
|
|
|
3446
3374
|
if (title) {
|
|
3447
3375
|
poi.title = title;
|
|
3448
3376
|
this.poiService.create(poi).subscribe(newPoi => {
|
|
3449
|
-
|
|
3450
|
-
const titleD = translate.instant('igo.context.poiButton.dialog.createTitle');
|
|
3451
|
-
const message = translate.instant('igo.context.poiButton.dialog.createMsg', {
|
|
3452
|
-
value: poi.title
|
|
3453
|
-
});
|
|
3454
|
-
this.messageService.success(message, titleD);
|
|
3377
|
+
this.messageService.success('igo.context.poiButton.dialog.createMsg', 'igo.context.poiButton.dialog.createTitle', undefined, { value: poi.title });
|
|
3455
3378
|
poi.id = newPoi.id;
|
|
3456
3379
|
this.pois.push(poi);
|
|
3457
3380
|
}, err => {
|
|
@@ -3497,7 +3420,7 @@ PoiButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoiButto
|
|
|
3497
3420
|
} }, dependencies: [i4.NgForOf, i13.StopPropagationDirective, i4$1.MatIcon, i7.MatButton, i11.MatSelect, i12.MatOption, i9$1.TranslatePipe], styles: ["mat-select[_ngcontent-%COMP%]{width:150px;background-color:#fff;height:40px;padding-top:0}mat-select[_ngcontent-%COMP%] .mat-select-trigger{height:40px}mat-select[_ngcontent-%COMP%] .mat-select-value-text, mat-select[_ngcontent-%COMP%] .mat-select-placeholder{padding:5px;position:relative}.mat-option[_ngcontent-%COMP%]{text-overflow:inherit}.titlePoi[_ngcontent-%COMP%]{max-width:135px;overflow:hidden;text-overflow:ellipsis;float:left}.buttonPoi[_ngcontent-%COMP%]{float:right;margin:4px -10px 4px 0}.buttonPoi[_ngcontent-%COMP%] .mat-icon{margin:0 8px}"] });
|
|
3498
3421
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoiButtonComponent, [{
|
|
3499
3422
|
type: Component,
|
|
3500
|
-
args: [{ selector: 'igo-poi-button', template: "<mat-select [placeholder]=\"'igo.context.poiButton.placeholder' |\u00A0translate\"\n floatPlaceholder=\"never\">\n\n <mat-option (click)=\"createPoi()\">\n <div class=\"titlePoi\">{{ 'igo.context.poiButton.create' |\u00A0translate }}</div>\n <button igoStopPropagation class=\"addPoi buttonPoi\"\n mat-icon-button\n color=\"primary\"\n (click)=\"createPoi()\">\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\n </button>\n </mat-option>\n <mat-option *ngFor=\"let poi of pois\" [value]=\"poi.id\" (click)=\"zoomOnPoi(poi.id)\">\n <div class=\"titlePoi\">{{ poi.title }}</div>\n <button igoStopPropagation class=\"deletePoi buttonPoi\"\n mat-icon-button\n color=\"warn\"\n (click)=\"deletePoi(poi)\">\n <mat-icon svgIcon=\"delete\"></mat-icon>\n </button>\n </mat-option>\n</mat-select>\n", styles: ["mat-select{width:150px;background-color:#fff;height:40px;padding-top:0}mat-select ::ng-deep .mat-select-trigger{height:40px}mat-select ::ng-deep .mat-select-value-text,mat-select ::ng-deep .mat-select-placeholder{padding:5px;position:relative}.mat-option{text-overflow:inherit}.titlePoi{max-width:135px;overflow:hidden;text-overflow:ellipsis;float:left}.buttonPoi{float:right;margin:4px -10px 4px 0}.buttonPoi ::ng-deep .mat-icon{margin:0 8px}\n"] }]
|
|
3423
|
+
args: [{ selector: 'igo-poi-button', template: "<mat-select [placeholder]=\"'igo.context.poiButton.placeholder' |\u00A0translate\"\r\n floatPlaceholder=\"never\">\r\n\r\n <mat-option (click)=\"createPoi()\">\r\n <div class=\"titlePoi\">{{ 'igo.context.poiButton.create' |\u00A0translate }}</div>\r\n <button igoStopPropagation class=\"addPoi buttonPoi\"\r\n mat-icon-button\r\n color=\"primary\"\r\n (click)=\"createPoi()\">\r\n <mat-icon svgIcon=\"plus-circle\"></mat-icon>\r\n </button>\r\n </mat-option>\r\n <mat-option *ngFor=\"let poi of pois\" [value]=\"poi.id\" (click)=\"zoomOnPoi(poi.id)\">\r\n <div class=\"titlePoi\">{{ poi.title }}</div>\r\n <button igoStopPropagation class=\"deletePoi buttonPoi\"\r\n mat-icon-button\r\n color=\"warn\"\r\n (click)=\"deletePoi(poi)\">\r\n <mat-icon svgIcon=\"delete\"></mat-icon>\r\n </button>\r\n </mat-option>\r\n</mat-select>\r\n", styles: ["mat-select{width:150px;background-color:#fff;height:40px;padding-top:0}mat-select ::ng-deep .mat-select-trigger{height:40px}mat-select ::ng-deep .mat-select-value-text,mat-select ::ng-deep .mat-select-placeholder{padding:5px;position:relative}.mat-option{text-overflow:inherit}.titlePoi{max-width:135px;overflow:hidden;text-overflow:ellipsis;float:left}.buttonPoi{float:right;margin:4px -10px 4px 0}.buttonPoi ::ng-deep .mat-icon{margin:0 8px}\n"] }]
|
|
3501
3424
|
}], function () { return [{ type: i1$3.MatDialog }, { type: i2.AuthService }, { type: PoiService }, { type: i3.MessageService }, { type: i3.LanguageService }, { type: i13.ConfirmDialogService }]; }, { map: [{
|
|
3502
3425
|
type: Input
|
|
3503
3426
|
}], color: [{
|
|
@@ -3560,7 +3483,7 @@ UserDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserDia
|
|
|
3560
3483
|
} }, dependencies: [i7.MatButton, i1$3.MatDialogTitle, i1$3.MatDialogContent, i1$3.MatDialogActions, i9$1.TranslatePipe], encapsulation: 2 });
|
|
3561
3484
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserDialogComponent, [{
|
|
3562
3485
|
type: Component,
|
|
3563
|
-
args: [{ selector: 'igo-user-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{'igo.context.userButton.infoTitle' | translate}}</h1>\n<div mat-dialog-content class=\"mat-typography\">\n <p>{{'igo.context.userButton.dialog.user' | translate}}: {{user.sourceId}}</p>\n <p>{{'igo.context.userButton.dialog.email' | translate}}: {{user.email}}</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 mat-raised-button color=\"primary\"\n (click)=\"dialogRef.close(false)\">\n OK\n </button>\n</div>\n" }]
|
|
3486
|
+
args: [{ selector: 'igo-user-dialog', template: "<h1 mat-dialog-title class=\"mat-typography\">{{'igo.context.userButton.infoTitle' | translate}}</h1>\r\n<div mat-dialog-content class=\"mat-typography\">\r\n <p>{{'igo.context.userButton.dialog.user' | translate}}: {{user.sourceId}}</p>\r\n <p>{{'igo.context.userButton.dialog.email' | translate}}: {{user.email}}</p>\r\n <p>{{'igo.context.userButton.dialog.expiration' | translate}}: {{exp}}</p>\r\n <button mat-stroked-button color=\"primary\" (click)=\"clearPreferences()\">\r\n {{'igo.context.userButton.dialog.clearPreferences' | translate}}\r\n </button>\r\n <br>\r\n</div>\r\n<div mat-dialog-actions style=\"justify-content: center\">\r\n <button mat-raised-button color=\"primary\"\r\n (click)=\"dialogRef.close(false)\">\r\n OK\r\n </button>\r\n</div>\r\n" }]
|
|
3564
3487
|
}], function () { return [{ type: i1$3.MatDialogRef }, { type: i2.AuthService }, { type: i3.StorageService }]; }, null); })();
|
|
3565
3488
|
|
|
3566
3489
|
function userButtonSlideInOut() {
|
|
@@ -3663,7 +3586,7 @@ UserButtonComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserBut
|
|
|
3663
3586
|
} }, dependencies: [i4.NgIf, i4$1.MatIcon, i7.MatButton, i6$1.MatTooltip, PoiButtonComponent, i9$1.TranslatePipe], styles: [".igo-user-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#fff}.igo-user-button-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#efefef}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-container[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{position:absolute;bottom:0}}.igo-user-button-more-container[_ngcontent-%COMP%]{float:left;height:40px}.igo-user-button-more-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:2px;float:left}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-more-container[_ngcontent-%COMP%]{height:80px;width:150px;position:relative;left:24px}}button[_ngcontent-%COMP%], [_nghost-%COMP%] button .mat-button-ripple-round{border-radius:0}"], data: { animation: [userButtonSlideInOut()] } });
|
|
3664
3587
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserButtonComponent, [{
|
|
3665
3588
|
type: Component,
|
|
3666
|
-
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\n <div class=\"igo-user-button-more-container\" [@userButtonState]=\"expand ? 'expand' : 'collapse'\">\n\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"infoUser()\">\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n [matTooltip]=\"'igo.context.userButton.logout' |\u00A0translate\"\n matTooltipPosition=\"above\"\n [color]=\"color\"\n (click)=\"logout()\">\n <mat-icon svgIcon=\"power\"></mat-icon>\n </button>\n\n </div>\n\n <button\n mat-icon-button\n [color]=\"auth.authenticated ? color : 'warn'\"\n (click)=\"accountClick()\">\n <mat-icon svgIcon=\"account-box\"></mat-icon>\n </button>\n</div>\n", styles: [".igo-user-button-container button{background-color:#fff}.igo-user-button-container button:hover{background-color:#efefef}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-container>button{position:absolute;bottom:0}}.igo-user-button-more-container{float:left;height:40px}.igo-user-button-more-container>*{margin-right:2px;float:left}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-more-container{height:80px;width:150px;position:relative;left:24px}}button,:host ::ng-deep button .mat-button-ripple-round{border-radius:0}\n"] }]
|
|
3589
|
+
args: [{ selector: 'igo-user-button', animations: [userButtonSlideInOut()], template: "<div *ngIf=\"visible\" class=\"igo-user-button-container\">\r\n <div class=\"igo-user-button-more-container\" [@userButtonState]=\"expand ? 'expand' : 'collapse'\">\r\n\r\n <igo-poi-button *ngIf=\"hasApi\" [color]=\"color\" [map]=\"map\"></igo-poi-button>\r\n\r\n <button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.userButton.infoTitle' | translate\"\r\n matTooltipPosition=\"above\"\r\n [color]=\"color\"\r\n (click)=\"infoUser()\">\r\n <mat-icon svgIcon=\"information-outline\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n mat-icon-button\r\n [matTooltip]=\"'igo.context.userButton.logout' |\u00A0translate\"\r\n matTooltipPosition=\"above\"\r\n [color]=\"color\"\r\n (click)=\"logout()\">\r\n <mat-icon svgIcon=\"power\"></mat-icon>\r\n </button>\r\n\r\n </div>\r\n\r\n <button\r\n mat-icon-button\r\n [color]=\"auth.authenticated ? color : 'warn'\"\r\n (click)=\"accountClick()\">\r\n <mat-icon svgIcon=\"account-box\"></mat-icon>\r\n </button>\r\n</div>\r\n", styles: [".igo-user-button-container button{background-color:#fff}.igo-user-button-container button:hover{background-color:#efefef}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-container>button{position:absolute;bottom:0}}.igo-user-button-more-container{float:left;height:40px}.igo-user-button-more-container>*{margin-right:2px;float:left}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){.igo-user-button-more-container{height:80px;width:150px;position:relative;left:24px}}button,:host ::ng-deep button .mat-button-ripple-round{border-radius:0}\n"] }]
|
|
3667
3590
|
}], function () { return [{ type: i1$3.MatDialog }, { type: i3.ConfigService }, { type: i2.AuthService }]; }, { map: [{
|
|
3668
3591
|
type: Input
|
|
3669
3592
|
}], color: [{
|
|
@@ -4306,7 +4229,7 @@ ShareMapUrlComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareM
|
|
|
4306
4229
|
} }, dependencies: [i4.NgIf, i4$1.MatIcon, i6.MatFormField, i5.MatInput, i7.MatButton, i13.CustomHtmlComponent, i9$1.TranslatePipe], styles: ["@charset \"UTF-8\";mat-form-field[_ngcontent-%COMP%]{width:100%}.linkToShare\\a0[_ngcontent-%COMP%] {padding:25px 5px 5px}.linkToShare\\a0[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0[_ngcontent-%COMP%] textarea.textAreaWithButton[_ngcontent-%COMP%]{width:calc(100% - 60px)}.linkToShare\\a0[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{float:right;margin:-10px 0}.igo-form-button-group[_ngcontent-%COMP%]{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding[_ngcontent-%COMP%]{padding:0}"] });
|
|
4307
4230
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapUrlComponent, [{
|
|
4308
4231
|
type: Component,
|
|
4309
|
-
args: [{ selector: 'igo-share-map-url', template: "<div class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea #textArea matInput readonly rows=\"3\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"></textarea>\n </mat-form-field>\n\n <div class=\"igo-form-button-group\">\n <button\n mat-raised-button\n (click)=\"copyTextToClipboard(textArea)\">\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\n {{ 'igo.context.shareMap.copy' | translate }}\n </button>\n </div>\n <div>\n <br/>\n <section class=\"mat-typography\">\n <div *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate)===''\">\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate)!==''\">{{'igo.context.shareMap.included' | translate}}</h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.context' | translate)!==''\">{{'igo.context.shareMap.context' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.center' | translate)!==''\">{{'igo.context.shareMap.center' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate)!==''\">{{'igo.context.shareMap.zoom' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate)!==''\">{{'igo.context.shareMap.addedLayers' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate)!==''\">{{'igo.context.shareMap.visibleInvisible' | translate}}</li>\n </ul>\n\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate)!==''\">{{'igo.context.shareMap.excluded' | translate}}</h4>\n <ul>\n <li *ngIf=\"('igo.context.shareMap.order' | translate)!==''\">{{'igo.context.shareMap.order' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate)!==''\">{{'igo.context.shareMap.opacity' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate)!==''\">{{'igo.context.shareMap.filterOgc' | translate}}</li>\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate)!==''\">{{'igo.context.shareMap.filterTime' | translate}}</li>\n </ul>\n </div>\n <igo-custom-html class=\"shareCustomPadding\" *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate)!==''\" class=\"mat-typography\"\n [html]=\"('igo.context.shareMap.htmlClarifications' | translate)\">\n </igo-custom-html>\n </section>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.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-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"] }]
|
|
4232
|
+
args: [{ selector: 'igo-share-map-url', template: "<div class=\"igo-input-container linkToShare\">\r\n <mat-form-field>\r\n <textarea #textArea matInput readonly rows=\"3\"\r\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\r\n [value]=\"url\"></textarea>\r\n </mat-form-field>\r\n\r\n <div class=\"igo-form-button-group\">\r\n <button\r\n mat-raised-button\r\n (click)=\"copyTextToClipboard(textArea)\">\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n {{ 'igo.context.shareMap.copy' | translate }}\r\n </button>\r\n </div>\r\n <div>\r\n <br/>\r\n <section class=\"mat-typography\">\r\n <div *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate)===''\">\r\n <h4 *ngIf=\"('igo.context.shareMap.included' | translate)!==''\">{{'igo.context.shareMap.included' | translate}}</h4>\r\n <ul>\r\n <li *ngIf=\"('igo.context.shareMap.context' | translate)!==''\">{{'igo.context.shareMap.context' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.center' | translate)!==''\">{{'igo.context.shareMap.center' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.zoom' | translate)!==''\">{{'igo.context.shareMap.zoom' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.addedLayers' | translate)!==''\">{{'igo.context.shareMap.addedLayers' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.visibleInvisible' | translate)!==''\">{{'igo.context.shareMap.visibleInvisible' | translate}}</li>\r\n </ul>\r\n\r\n <h4 *ngIf=\"('igo.context.shareMap.excluded' | translate)!==''\">{{'igo.context.shareMap.excluded' | translate}}</h4>\r\n <ul>\r\n <li *ngIf=\"('igo.context.shareMap.order' | translate)!==''\">{{'igo.context.shareMap.order' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.opacity' | translate)!==''\">{{'igo.context.shareMap.opacity' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.filterOgc' | translate)!==''\">{{'igo.context.shareMap.filterOgc' | translate}}</li>\r\n <li *ngIf=\"('igo.context.shareMap.filterTime' | translate)!==''\">{{'igo.context.shareMap.filterTime' | translate}}</li>\r\n </ul>\r\n </div>\r\n <igo-custom-html class=\"shareCustomPadding\" *ngIf=\"('igo.context.shareMap.htmlClarifications' | translate)!==''\" class=\"mat-typography\"\r\n [html]=\"('igo.context.shareMap.htmlClarifications' | translate)\">\r\n </igo-custom-html>\r\n </section>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";mat-form-field{width:100%}.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-button-group{text-align:center;padding-top:10px}igo-custom-html.shareCustomPadding{padding:0}\n"] }]
|
|
4310
4233
|
}], function () { return [{ type: i3.MessageService }, { type: ShareMapService }, { type: i0.ChangeDetectorRef }]; }, { map: [{
|
|
4311
4234
|
type: Input
|
|
4312
4235
|
}] }); })();
|
|
@@ -4382,11 +4305,7 @@ class ShareMapApiComponent {
|
|
|
4382
4305
|
this.url = this.shareMapService.getUrlWithApi(inputs);
|
|
4383
4306
|
this.shareMapService.createContextShared(this.map, inputs).subscribe(rep => {
|
|
4384
4307
|
this.idContextShared = rep.id;
|
|
4385
|
-
|
|
4386
|
-
const msg = this.languageService.translate.instant('igo.context.contextManager.dialog.saveMsg', {
|
|
4387
|
-
value: inputs.title
|
|
4388
|
-
});
|
|
4389
|
-
this.messageService.success(msg, title);
|
|
4308
|
+
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
4390
4309
|
}, err => {
|
|
4391
4310
|
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
4392
4311
|
this.messageService.showError(err);
|
|
@@ -4396,11 +4315,7 @@ class ShareMapApiComponent {
|
|
|
4396
4315
|
const inputs = Object.assign({}, values);
|
|
4397
4316
|
inputs.uri = this.userId ? `${this.userId}-${values.uri}` : values.uri;
|
|
4398
4317
|
this.shareMapService.updateContextShared(this.map, inputs, this.idContextShared).subscribe(rep => {
|
|
4399
|
-
|
|
4400
|
-
const msg = this.languageService.translate.instant('igo.context.contextManager.dialog.saveMsg', {
|
|
4401
|
-
value: inputs.title
|
|
4402
|
-
});
|
|
4403
|
-
this.messageService.success(msg, title);
|
|
4318
|
+
this.messageService.success('igo.context.contextManager.dialog.saveMsg', 'igo.context.contextManager.dialog.saveTitle', undefined, { value: inputs.title });
|
|
4404
4319
|
}, err => {
|
|
4405
4320
|
err.error.title = this.languageService.translate.instant('igo.context.shareMap.errorTitle');
|
|
4406
4321
|
this.messageService.showError(err);
|
|
@@ -4409,10 +4324,7 @@ class ShareMapApiComponent {
|
|
|
4409
4324
|
copyTextToClipboard(textArea) {
|
|
4410
4325
|
const successful = Clipboard.copy(textArea);
|
|
4411
4326
|
if (successful) {
|
|
4412
|
-
|
|
4413
|
-
const title = translate.instant('igo.context.shareMap.dialog.copyTitle');
|
|
4414
|
-
const msg = translate.instant('igo.context.shareMap.dialog.copyMsg');
|
|
4415
|
-
this.messageService.success(msg, title);
|
|
4327
|
+
this.messageService.success('igo.context.shareMap.dialog.copyMsg', 'igo.context.shareMap.dialog.copyTitle');
|
|
4416
4328
|
}
|
|
4417
4329
|
}
|
|
4418
4330
|
buildForm() {
|
|
@@ -4473,7 +4385,7 @@ ShareMapApiComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareM
|
|
|
4473
4385
|
} }, dependencies: [i4.NgIf, i1$2.ɵNgNoValidate, i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgControlStatusGroup, i1$2.RequiredValidator, i1$2.FormGroupDirective, i1$2.FormControlName, i4$1.MatIcon, i6$1.MatTooltip, i6.MatError, i6.MatFormField, i5.MatInput, i7.MatButton, i9$1.TranslatePipe], styles: ["@charset \"UTF-8\";mat-form-field[_ngcontent-%COMP%]{width:100%}#uriInput[_ngcontent-%COMP%] .fieldWrapper[_ngcontent-%COMP%]{display:block;overflow:hidden}#uriInput[_ngcontent-%COMP%] .prefix[_ngcontent-%COMP%]{float:left}.linkToShare\\a0[_ngcontent-%COMP%] {padding:25px 5px 5px}.linkToShare\\a0[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;width:100%;line-height:1.3;height:40px;overflow-y:hidden;word-wrap:normal;word-break:break-all}.linkToShare\\a0[_ngcontent-%COMP%] textarea.textAreaWithButton[_ngcontent-%COMP%]{width:calc(100% - 60px)}.linkToShare\\a0[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{float:right;margin:-10px 0}.igo-form[_ngcontent-%COMP%]{padding:20px 5px 5px}.igo-form-button-group[_ngcontent-%COMP%]{text-align:center;padding-top:10px}"] });
|
|
4474
4386
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapApiComponent, [{
|
|
4475
4387
|
type: Component,
|
|
4476
|
-
args: [{ selector: 'igo-share-map-api', template: "<form class=\"igo-form\" [formGroup]=\"form\"\n (ngSubmit)=\"createUrl(form.value)\">\n\n <div class=\"igo-input-container\">\n <mat-form-field>\n <input matInput required\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\n formControlName=\"title\">\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 <span *ngIf=\"userId\" class=\"prefix\">{{userId}}-</span>\n <span class=\"fieldWrapper\">\n <input matInput required\n [readonly]=\"!userId\"\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\n formControlName=\"uri\">\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 <button *ngIf=\"!url\"\n mat-raised-button\n type=\"submit\"\n [disabled]=\"!form.valid\">\n {{ 'igo.context.shareMap.button' | translate }}\n </button>\n <button *ngIf=\"url\"\n mat-raised-button\n type=\"button\"\n (click)=\"updateContextShared(form.value)\">\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\n </button>\n </div>\n</form>\n\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\n <mat-form-field>\n <textarea #textArea matInput readonly rows=\"3\"\n class=\"textAreaWithButton\"\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\n [value]=\"url\"></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 <mat-icon svgIcon=\"content-copy\"></mat-icon>\n </button>\n </mat-form-field>\n<div>\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"] }]
|
|
4388
|
+
args: [{ selector: 'igo-share-map-api', template: "<form class=\"igo-form\" [formGroup]=\"form\"\r\n (ngSubmit)=\"createUrl(form.value)\">\r\n\r\n <div class=\"igo-input-container\">\r\n <mat-form-field>\r\n <input matInput required\r\n [placeholder]=\"'igo.context.contextManager.form.title' | translate\"\r\n formControlName=\"title\">\r\n <mat-error>\r\n {{ 'igo.context.contextManager.form.titleRequired' | translate }}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div id=\"uriInput\" class=\"igo-input-container\">\r\n <mat-form-field>\r\n <span *ngIf=\"userId\" class=\"prefix\">{{userId}}-</span>\r\n <span class=\"fieldWrapper\">\r\n <input matInput required\r\n [readonly]=\"!userId\"\r\n [placeholder]=\"'igo.context.contextManager.form.uri' | translate\"\r\n formControlName=\"uri\">\r\n </span>\r\n <mat-error>\r\n {{ 'igo.context.contextManager.form.uriRequired' | translate }}\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n\r\n <div class=\"igo-form-button-group\">\r\n <button *ngIf=\"!url\"\r\n mat-raised-button\r\n type=\"submit\"\r\n [disabled]=\"!form.valid\">\r\n {{ 'igo.context.shareMap.button' | translate }}\r\n </button>\r\n <button *ngIf=\"url\"\r\n mat-raised-button\r\n type=\"button\"\r\n (click)=\"updateContextShared(form.value)\">\r\n {{ 'igo.context.shareMap.refreshBtn' | translate }}\r\n </button>\r\n </div>\r\n</form>\r\n\r\n<div *ngIf=\"url\" class=\"igo-input-container linkToShare\">\r\n <mat-form-field>\r\n <textarea #textArea matInput readonly rows=\"3\"\r\n class=\"textAreaWithButton\"\r\n [placeholder]=\"'igo.context.shareMap.placeholderLink' | translate\"\r\n [value]=\"url\"></textarea>\r\n <button\r\n mat-icon-button\r\n tooltip-position=\"below\"\r\n matTooltipShowDelay=\"500\"\r\n [matTooltip]=\"'igo.context.shareMap.copy' | translate\"\r\n color=\"primary\"\r\n (click)=\"copyTextToClipboard(textArea)\">\r\n <mat-icon svgIcon=\"content-copy\"></mat-icon>\r\n </button>\r\n </mat-form-field>\r\n<div>\r\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"] }]
|
|
4477
4389
|
}], function () { return [{ type: i3.LanguageService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: ShareMapService }, { type: i1$2.UntypedFormBuilder }]; }, { map: [{
|
|
4478
4390
|
type: Input
|
|
4479
4391
|
}] }); })();
|
|
@@ -4522,7 +4434,7 @@ ShareMapComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareMapC
|
|
|
4522
4434
|
} }, dependencies: [i4.NgIf, i3$1.MatTabGroup, i3$1.MatTab, ShareMapUrlComponent, ShareMapApiComponent, i9$1.TranslatePipe] });
|
|
4523
4435
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareMapComponent, [{
|
|
4524
4436
|
type: Component,
|
|
4525
|
-
args: [{ selector: 'igo-share-map', template: "<mat-tab-group *ngIf=\"hasApi\" >\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<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\n" }]
|
|
4437
|
+
args: [{ selector: 'igo-share-map', template: "<mat-tab-group *ngIf=\"hasApi\" >\r\n <mat-tab [label]=\"'igo.context.shareMap.shareWithApi' | translate\">\r\n <igo-share-map-api [map]=\"map\"></igo-share-map-api>\r\n </mat-tab>\r\n <mat-tab [label]=\"'igo.context.shareMap.shareWithUrl' | translate\">\r\n <igo-share-map-url [map]=\"map\"></igo-share-map-url>\r\n </mat-tab>\r\n</mat-tab-group>\r\n\r\n<igo-share-map-url *ngIf=\"!hasApi\" [map]=\"map\"></igo-share-map-url>\r\n" }]
|
|
4526
4438
|
}], function () { return [{ type: i3.ConfigService }]; }, { map: [{
|
|
4527
4439
|
type: Input
|
|
4528
4440
|
}] }); })();
|
|
@@ -4720,7 +4632,7 @@ SidenavComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SidenavCom
|
|
|
4720
4632
|
} }, dependencies: [i4.NgIf, i4$1.MatIcon, i7.MatButton, i5$1.MatSidenav, i6$1.MatTooltip, i13.PanelComponent, i13.FlexibleComponent, i1$1.FeatureDetailsComponent, i9$1.TranslatePipe], styles: ["[_nghost-%COMP%] .igo-flexible-fill .igo-container, .igo-sidenav-content[_ngcontent-%COMP%] .igo-flexible-fill[_ngcontent-%COMP%] .igo-container[_ngcontent-%COMP%]{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}[_nghost-%COMP%] .igo-flexible-fill .igo-container, .igo-sidenav-content[_ngcontent-%COMP%] .igo-flexible-fill[_ngcontent-%COMP%] .igo-container[_ngcontent-%COMP%]{border-top-width:1px;border-top-style:solid;border-top-color:#0003}mat-sidenav[_ngcontent-%COMP%]{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd}[_nghost-%COMP%]{background-color:#fff}[_nghost-%COMP%] mat-sidenav{z-index:3!important}mat-sidenav[_ngcontent-%COMP%]{width:400px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){mat-sidenav[_ngcontent-%COMP%]{width:calc(100% - 45px)}}.igo-sidenav-content[_ngcontent-%COMP%]{margin-top:50px;height:calc(100% - 50px)}igo-feature-details[_ngcontent-%COMP%] table{width:100%}"] });
|
|
4721
4633
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SidenavComponent, [{
|
|
4722
4634
|
type: Component,
|
|
4723
|
-
args: [{ selector: 'igo-sidenav', template: "<mat-sidenav\n #sidenav\n igoSidenavShim\n mode=\"side\"\n [opened]=\"opened\">\n\n <div class=\"igo-sidenav-content\">\n\n <igo-flexible\n #topPanel\n initial=\"50%\" 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 <button\n mat-icon-button\n panelLeftButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\n *ngIf=\"tool\">\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n tooltip-position=\"below\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\n *ngIf=\"tool\">\n <mat-icon svgIcon=\"menu\"></mat-icon>\n </button>\n\n </igo-panel>\n </div>\n\n <div igoFlexibleFill class=\"igo-content\">\n <igo-panel\n [title]=\"featureTitle\"\n *ngIf=\"feature && media !== 'mobile'\">\n\n <button\n mat-icon-button\n panelLeftButton\n class=\"igo-icon-button\"\n (click)=\"toggleTopPanel()\">\n <mat-icon [svgIcon]=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0 ? 'arrow_downward' : 'arrow_upward'\"></mat-icon>\n </button>\n\n <button\n mat-icon-button\n panelRightButton\n class=\"igo-icon-button\"\n (click)=\"zoomToFeatureExtent()\"\n *ngIf=\"feature.geometry\">\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\n </button>\n\n <igo-feature-details\n [feature]=\"feature\"\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\">\n </igo-feature-details>\n </igo-panel>\n </div>\n\n </igo-flexible>\n\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{-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"] }]
|
|
4635
|
+
args: [{ selector: 'igo-sidenav', template: "<mat-sidenav\r\n #sidenav\r\n igoSidenavShim\r\n mode=\"side\"\r\n [opened]=\"opened\">\r\n\r\n <div class=\"igo-sidenav-content\">\r\n\r\n <igo-flexible\r\n #topPanel\r\n initial=\"50%\" initialMobile=\"100%\"\r\n expanded=\"calc(100% - 58px)\"\r\n [state]=\"topPanelState\">\r\n\r\n <div class=\"igo-content\">\r\n <igo-panel [title]=\"tool ? (tool.title | translate) : title\">\r\n <button\r\n mat-icon-button\r\n panelLeftButton\r\n tooltip-position=\"below\"\r\n matTooltipShowDelay=\"500\"\r\n [matTooltip]=\"'igo.context.sidenav.goBack' | translate\"\r\n *ngIf=\"tool\">\r\n <mat-icon svgIcon=\"arrow-back\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n mat-icon-button\r\n panelRightButton\r\n tooltip-position=\"below\"\r\n matTooltipShowDelay=\"500\"\r\n [matTooltip]=\"'igo.context.sidenav.mainMenu' | translate\"\r\n *ngIf=\"tool\">\r\n <mat-icon svgIcon=\"menu\"></mat-icon>\r\n </button>\r\n\r\n </igo-panel>\r\n </div>\r\n\r\n <div igoFlexibleFill class=\"igo-content\">\r\n <igo-panel\r\n [title]=\"featureTitle\"\r\n *ngIf=\"feature && media !== 'mobile'\">\r\n\r\n <button\r\n mat-icon-button\r\n panelLeftButton\r\n class=\"igo-icon-button\"\r\n (click)=\"toggleTopPanel()\">\r\n <mat-icon [svgIcon]=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0 ? 'arrow_downward' : 'arrow_upward'\"></mat-icon>\r\n </button>\r\n\r\n <button\r\n mat-icon-button\r\n panelRightButton\r\n class=\"igo-icon-button\"\r\n (click)=\"zoomToFeatureExtent()\"\r\n *ngIf=\"feature.geometry\">\r\n <mat-icon svgIcon=\"zoom-in\"></mat-icon>\r\n </button>\r\n\r\n <igo-feature-details\r\n [feature]=\"feature\"\r\n *ngIf=\"['collapsed', 'initial'].indexOf(topPanel.state) >= 0\">\r\n </igo-feature-details>\r\n </igo-panel>\r\n </div>\r\n\r\n </igo-flexible>\r\n\r\n </div>\r\n</mat-sidenav>\r\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{-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"] }]
|
|
4724
4636
|
}], function () { return [{ type: i1$4.Title }]; }, { map: [{
|
|
4725
4637
|
type: Input
|
|
4726
4638
|
}], opened: [{
|