@igo2/context 20.1.0-next.3 → 20.1.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/igo2-context.mjs +454 -404
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +196 -273
- package/package.json +9 -8
package/index.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, ModuleWithProviders, OnDestroy } from '@angular/core';
|
|
3
|
-
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { UntypedFormGroup, FormGroup, UntypedFormControl } from '@angular/forms';
|
|
4
4
|
import { AnyLayerOptions, MapViewOptions, MapExtent, MapScaleLineOptions, MapAttributionOptions, VectorLayer, AnyLayer, IgoMap, Feature, StyleListService, StyleService, ImportExportServiceOptions, LayerOptions, LayerGroupOptions, AnyDataSourceOptions } from '@igo2/geo';
|
|
5
|
-
import { BehaviorSubject,
|
|
5
|
+
import { BehaviorSubject, Subject, Observable, ReplaySubject, Subscription } from 'rxjs';
|
|
6
6
|
import { Tool } from '@igo2/common/tool';
|
|
7
7
|
import { Message, MessageService } from '@igo2/core/message';
|
|
8
8
|
import { FeatureCollection } from 'geojson';
|
|
9
|
+
import { KeyValue } from '@angular/common';
|
|
9
10
|
import { AuthService, AuthOptions } from '@igo2/auth';
|
|
10
11
|
import { ActionStore, ActionbarMode } from '@igo2/common/action';
|
|
11
12
|
import { ConfigService } from '@igo2/core/config';
|
|
12
13
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
14
|
+
import * as _igo2_context from '@igo2/context';
|
|
13
15
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
14
16
|
import { Title } from '@angular/platform-browser';
|
|
15
17
|
import { FlexibleState } from '@igo2/common/flexible';
|
|
@@ -17,11 +19,8 @@ import { Media } from '@igo2/core/media';
|
|
|
17
19
|
import { Params } from '@angular/router';
|
|
18
20
|
import { RouteServiceOptions, RouteService } from '@igo2/core/route';
|
|
19
21
|
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
read = 1,
|
|
23
|
-
write = 2
|
|
24
|
-
}
|
|
22
|
+
declare const TypePermission: readonly ["read", "write"];
|
|
23
|
+
type TypePermission = (typeof TypePermission)[number];
|
|
25
24
|
declare enum Scope {
|
|
26
25
|
public = 0,
|
|
27
26
|
protected = 1,
|
|
@@ -29,11 +28,11 @@ declare enum Scope {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
interface Context {
|
|
32
|
-
id?:
|
|
31
|
+
id?: number;
|
|
33
32
|
title?: string;
|
|
34
33
|
uri?: string;
|
|
35
34
|
scope?: string;
|
|
36
|
-
permission?:
|
|
35
|
+
permission?: TypePermission;
|
|
37
36
|
description?: string;
|
|
38
37
|
icon?: string;
|
|
39
38
|
iconImage?: string;
|
|
@@ -91,22 +90,6 @@ interface ContextServiceOptions {
|
|
|
91
90
|
contextListFile?: string;
|
|
92
91
|
defaultContextUri?: string;
|
|
93
92
|
}
|
|
94
|
-
interface ContextPermission {
|
|
95
|
-
id?: string;
|
|
96
|
-
contextId?: string;
|
|
97
|
-
profil: string;
|
|
98
|
-
profilTitle?: string;
|
|
99
|
-
typePermission: TypePermission;
|
|
100
|
-
}
|
|
101
|
-
interface ContextPermissionsList {
|
|
102
|
-
read: ContextPermission[];
|
|
103
|
-
write: ContextPermission[];
|
|
104
|
-
}
|
|
105
|
-
interface ContextUserPermission {
|
|
106
|
-
name: string;
|
|
107
|
-
checked: boolean;
|
|
108
|
-
indeterminate?: boolean;
|
|
109
|
-
}
|
|
110
93
|
interface ContextProfils {
|
|
111
94
|
name: string;
|
|
112
95
|
title: string;
|
|
@@ -157,6 +140,142 @@ declare class IgoContextImportExportModule {
|
|
|
157
140
|
static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextImportExportModule>;
|
|
158
141
|
}
|
|
159
142
|
|
|
143
|
+
declare class ContextService {
|
|
144
|
+
private http;
|
|
145
|
+
private authService;
|
|
146
|
+
private languageService;
|
|
147
|
+
private config;
|
|
148
|
+
private messageService;
|
|
149
|
+
private storageService;
|
|
150
|
+
private exportService;
|
|
151
|
+
private shareMapService;
|
|
152
|
+
private route;
|
|
153
|
+
context$: BehaviorSubject<DetailedContext>;
|
|
154
|
+
contexts$: BehaviorSubject<ContextsList>;
|
|
155
|
+
defaultContextId$: BehaviorSubject<string | number>;
|
|
156
|
+
editedContext$: BehaviorSubject<DetailedContext>;
|
|
157
|
+
importedContext: DetailedContext[];
|
|
158
|
+
toolsChanged$: Subject<DetailedContext>;
|
|
159
|
+
private mapViewFromRoute;
|
|
160
|
+
private options;
|
|
161
|
+
private baseUrl;
|
|
162
|
+
private tools;
|
|
163
|
+
private toolbar;
|
|
164
|
+
get defaultContextUri(): string;
|
|
165
|
+
set defaultContextUri(uri: string);
|
|
166
|
+
private _defaultContextUri;
|
|
167
|
+
constructor();
|
|
168
|
+
get(permissions?: string[], hidden?: boolean): Observable<ContextsList>;
|
|
169
|
+
getById(id: string): Observable<Context>;
|
|
170
|
+
getDetails(id: number): Observable<DetailedContext>;
|
|
171
|
+
getDetailsByUri(uri: string): Observable<DetailedContext>;
|
|
172
|
+
getDefault(): Observable<DetailedContext>;
|
|
173
|
+
getProfilByUser(): Observable<ContextProfils[]>;
|
|
174
|
+
setDefault(id: string | number): Observable<string | number | undefined>;
|
|
175
|
+
private setDefaultLocalStorage;
|
|
176
|
+
hideContext(id: number): Observable<Object>;
|
|
177
|
+
showContext(id: number): Observable<Object>;
|
|
178
|
+
delete(id: number, imported?: boolean): Observable<void>;
|
|
179
|
+
create(context: DetailedContext): Observable<Context>;
|
|
180
|
+
clone(id: number, properties?: {}): Observable<Context>;
|
|
181
|
+
update(id: number, context: DetailedContext): Observable<ContextDetailedChanges>;
|
|
182
|
+
addToolAssociation(contextId: string, toolId: string): Observable<void>;
|
|
183
|
+
deleteToolAssociation(contextId: string, toolId: string): Observable<unknown>;
|
|
184
|
+
getLocalContexts(): Observable<ContextsList>;
|
|
185
|
+
getLocalContext(uri: string): Observable<DetailedContext>;
|
|
186
|
+
loadContexts(permissions?: string[], hidden?: boolean): void;
|
|
187
|
+
loadDefaultContext(): void;
|
|
188
|
+
loadContext(uri: string): void;
|
|
189
|
+
setContext(context: DetailedContext): void;
|
|
190
|
+
loadEditedContext(uri: string): void;
|
|
191
|
+
setEditedContext(context: DetailedContext): void;
|
|
192
|
+
getContextFromMap(igoMap: IgoMap, empty?: boolean): DetailedContext;
|
|
193
|
+
getContextFromLayers(igoMap: IgoMap, layers: AnyLayer[], name: string, keepCurrentView?: boolean): DetailedContext;
|
|
194
|
+
private getExtraFeatures;
|
|
195
|
+
setTools(tools: Tool[]): void;
|
|
196
|
+
setToolbar(toolbar: string[]): void;
|
|
197
|
+
private handleContextMessage;
|
|
198
|
+
private getContextByUri;
|
|
199
|
+
getContextLayers(map: IgoMap): readonly AnyLayer[];
|
|
200
|
+
private getPath;
|
|
201
|
+
private handleError;
|
|
202
|
+
private handleContextsChange;
|
|
203
|
+
private addContextToList;
|
|
204
|
+
private findContext;
|
|
205
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
|
206
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare class LayerContextDirective implements OnInit, OnDestroy {
|
|
210
|
+
private component;
|
|
211
|
+
private contextService;
|
|
212
|
+
private layerService;
|
|
213
|
+
private configService;
|
|
214
|
+
private styleListService;
|
|
215
|
+
private styleService;
|
|
216
|
+
private shareMapService;
|
|
217
|
+
private context$$;
|
|
218
|
+
private queryParams;
|
|
219
|
+
private contextLayers;
|
|
220
|
+
readonly removeLayersOnContextChange: i0.InputSignal<boolean>;
|
|
221
|
+
readonly contextLayersLoaded: i0.OutputEmitterRef<boolean>;
|
|
222
|
+
get map(): IgoMap;
|
|
223
|
+
ngOnInit(): void;
|
|
224
|
+
ngOnDestroy(): void;
|
|
225
|
+
private handleContextChange;
|
|
226
|
+
private handleAddLayers;
|
|
227
|
+
private computeLayerVisibilityFromUrl;
|
|
228
|
+
private handleContextWithSharedUrl;
|
|
229
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>;
|
|
230
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; "isSignal": true; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
declare class MapContextDirective implements OnInit, OnDestroy {
|
|
234
|
+
private contextService;
|
|
235
|
+
private mediaService;
|
|
236
|
+
private shareMapService;
|
|
237
|
+
private component;
|
|
238
|
+
private context$$;
|
|
239
|
+
get map(): IgoMap;
|
|
240
|
+
private queryParams;
|
|
241
|
+
constructor();
|
|
242
|
+
ngOnInit(): void;
|
|
243
|
+
ngOnDestroy(): void;
|
|
244
|
+
private handleContextChange;
|
|
245
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapContextDirective, never>;
|
|
246
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MapContextDirective, "[igoMapContext]", never, {}, {}, never, never, true, never>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
interface ContextUserPermission {
|
|
250
|
+
name: string;
|
|
251
|
+
checked: boolean;
|
|
252
|
+
indeterminate?: boolean;
|
|
253
|
+
}
|
|
254
|
+
interface ContextUserOrProfils extends ContextProfils {
|
|
255
|
+
id: number;
|
|
256
|
+
type: 'user' | 'profil';
|
|
257
|
+
}
|
|
258
|
+
type IAnyContextPermission = IContextPermissionProfil | IContextPermissionUser;
|
|
259
|
+
interface IContextPermissionUser extends IBaseContextPermission {
|
|
260
|
+
userId: number;
|
|
261
|
+
profilType: 'user';
|
|
262
|
+
userSource: string;
|
|
263
|
+
user: {
|
|
264
|
+
id: number;
|
|
265
|
+
externalId: number;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
interface IContextPermissionProfil extends IBaseContextPermission {
|
|
269
|
+
profilId: number;
|
|
270
|
+
profilType: 'profil';
|
|
271
|
+
}
|
|
272
|
+
interface IBaseContextPermission {
|
|
273
|
+
id: number;
|
|
274
|
+
title: string;
|
|
275
|
+
typePermission: TypePermission | null;
|
|
276
|
+
contextId: number;
|
|
277
|
+
}
|
|
278
|
+
|
|
160
279
|
declare enum ContextListControlsEnum {
|
|
161
280
|
always = "always",
|
|
162
281
|
never = "never",
|
|
@@ -165,7 +284,7 @@ declare enum ContextListControlsEnum {
|
|
|
165
284
|
|
|
166
285
|
declare class ContextListComponent implements OnInit, OnDestroy {
|
|
167
286
|
configService: ConfigService<any>;
|
|
168
|
-
auth: AuthService
|
|
287
|
+
auth: AuthService<any>;
|
|
169
288
|
private contextService;
|
|
170
289
|
private shareMapService;
|
|
171
290
|
private clipboard;
|
|
@@ -187,8 +306,8 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
187
306
|
private _contexts;
|
|
188
307
|
readonly selectedContext: i0.ModelSignal<DetailedContext>;
|
|
189
308
|
readonly map: i0.InputSignal<IgoMap>;
|
|
190
|
-
get defaultContextId(): string;
|
|
191
|
-
set defaultContextId(value: string);
|
|
309
|
+
get defaultContextId(): string | number;
|
|
310
|
+
set defaultContextId(value: string | number);
|
|
192
311
|
private _defaultContextId;
|
|
193
312
|
collapsed: {
|
|
194
313
|
contextScope: any;
|
|
@@ -240,6 +359,7 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
240
359
|
ngOnInit(): void;
|
|
241
360
|
ngOnDestroy(): void;
|
|
242
361
|
setSelected(context: DetailedContext): void;
|
|
362
|
+
sortByKeyPriority: (a: KeyValue<string, DetailedContext[]>, b: KeyValue<string, DetailedContext[]>) => number;
|
|
243
363
|
private next;
|
|
244
364
|
private filterContextsList;
|
|
245
365
|
showFilter(): boolean;
|
|
@@ -274,9 +394,9 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
274
394
|
}
|
|
275
395
|
|
|
276
396
|
declare class ContextItemComponent {
|
|
277
|
-
auth: AuthService
|
|
397
|
+
auth: AuthService<any>;
|
|
278
398
|
private storageService;
|
|
279
|
-
typePermission:
|
|
399
|
+
typePermission: readonly ["read", "write"];
|
|
280
400
|
color: string;
|
|
281
401
|
collapsed: boolean;
|
|
282
402
|
readonly showFavorite: i0.InputSignal<boolean>;
|
|
@@ -307,7 +427,6 @@ declare class ContextFormComponent {
|
|
|
307
427
|
private clipboard;
|
|
308
428
|
private formBuilder;
|
|
309
429
|
private messageService;
|
|
310
|
-
form: UntypedFormGroup;
|
|
311
430
|
prefix: string;
|
|
312
431
|
readonly btnSubmitText: i0.InputSignal<string>;
|
|
313
432
|
readonly context: i0.InputSignal<Context>;
|
|
@@ -315,7 +434,7 @@ declare class ContextFormComponent {
|
|
|
315
434
|
readonly submitForm: i0.OutputEmitterRef<unknown>;
|
|
316
435
|
readonly clone: i0.OutputEmitterRef<unknown>;
|
|
317
436
|
readonly delete: i0.OutputEmitterRef<unknown>;
|
|
318
|
-
|
|
437
|
+
readonly form: i0.Signal<FormGroup<any>>;
|
|
319
438
|
handleFormSubmit(value: any): void;
|
|
320
439
|
copyTextToClipboard(): void;
|
|
321
440
|
private buildForm;
|
|
@@ -323,15 +442,11 @@ declare class ContextFormComponent {
|
|
|
323
442
|
static ɵcmp: i0.ɵɵComponentDeclaration<ContextFormComponent, "igo-context-form", never, { "btnSubmitText": { "alias": "btnSubmitText"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "submitForm": "submitForm"; "clone": "clone"; "delete": "delete"; }, never, never, true, never>;
|
|
324
443
|
}
|
|
325
444
|
|
|
326
|
-
declare class ContextEditComponent
|
|
445
|
+
declare class ContextEditComponent {
|
|
327
446
|
private contextService;
|
|
328
447
|
private messageService;
|
|
329
|
-
readonly context: i0.
|
|
448
|
+
readonly context: i0.Signal<_igo2_context.DetailedContext>;
|
|
330
449
|
readonly submitSuccessed: i0.OutputEmitterRef<Context>;
|
|
331
|
-
private editedContext$$;
|
|
332
|
-
ngOnInit(): void;
|
|
333
|
-
ngOnDestroy(): void;
|
|
334
|
-
private handleEditedContextChange;
|
|
335
450
|
onEdit(context: Context): void;
|
|
336
451
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextEditComponent, never>;
|
|
337
452
|
static ɵcmp: i0.ɵɵComponentDeclaration<ContextEditComponent, "igo-context-edit", never, {}, { "submitSuccessed": "submitSuccessed"; }, never, never, true, never>;
|
|
@@ -340,86 +455,33 @@ declare class ContextEditComponent implements OnInit, OnDestroy {
|
|
|
340
455
|
declare class ContextPermissionsComponent implements OnInit {
|
|
341
456
|
private formBuilder;
|
|
342
457
|
private http;
|
|
343
|
-
authService: AuthService
|
|
458
|
+
authService: AuthService<any>;
|
|
344
459
|
private config;
|
|
460
|
+
private contextService;
|
|
461
|
+
private contextPermissionService;
|
|
462
|
+
private messageService;
|
|
463
|
+
private destroyRef;
|
|
345
464
|
form: UntypedFormGroup;
|
|
346
465
|
readonly context: i0.ModelSignal<Context>;
|
|
347
|
-
readonly permissions: i0.ModelSignal<
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
466
|
+
readonly permissions: i0.ModelSignal<IAnyContextPermission[]>;
|
|
467
|
+
readonly permissionsRead: i0.Signal<IAnyContextPermission[]>;
|
|
468
|
+
readonly permissionsWrite: i0.Signal<IAnyContextPermission[]>;
|
|
469
|
+
profils: i0.WritableSignal<ContextUserOrProfils[]>;
|
|
470
|
+
canWrite: i0.Signal<boolean>;
|
|
352
471
|
private baseUrlProfils;
|
|
353
472
|
formControl: UntypedFormControl;
|
|
354
473
|
formValueChanges$$: Subscription;
|
|
355
|
-
readonly addPermission: i0.OutputEmitterRef<ContextPermission>;
|
|
356
|
-
readonly removePermission: i0.OutputEmitterRef<ContextPermission>;
|
|
357
|
-
readonly scopeChanged: i0.OutputEmitterRef<Context>;
|
|
358
474
|
ngOnInit(): void;
|
|
359
|
-
displayFn(profil?:
|
|
360
|
-
handleFormSubmit(value:
|
|
475
|
+
displayFn(profil?: ContextUserOrProfils): string | undefined;
|
|
476
|
+
handleFormSubmit(value: IAnyContextPermission): void;
|
|
361
477
|
private buildForm;
|
|
362
|
-
onProfilSelected(value:
|
|
363
|
-
|
|
364
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContextPermissionsComponent, "igo-context-permissions", never, { "context": { "alias": "context"; "required": false; "isSignal": true; }; "permissions": { "alias": "permissions"; "required": false; "isSignal": true; }; }, { "context": "contextChange"; "permissions": "permissionsChange"; "addPermission": "addPermission"; "removePermission": "removePermission"; "scopeChanged": "scopeChanged"; }, never, never, true, never>;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
declare class ContextPermissionsBindingDirective implements OnInit, OnDestroy {
|
|
368
|
-
private contextService;
|
|
369
|
-
private languageService;
|
|
370
|
-
private messageService;
|
|
371
|
-
private cd;
|
|
372
|
-
private component;
|
|
373
|
-
private editedContext$$;
|
|
374
|
-
onAddPermission(permission: ContextPermission): void;
|
|
375
|
-
onRemovePermission(permission: ContextPermission): void;
|
|
478
|
+
onProfilSelected(value: ContextUserOrProfils): void;
|
|
479
|
+
onRemovePermission(permission: IAnyContextPermission): void;
|
|
376
480
|
onScopeChanged(context: Context): void;
|
|
377
|
-
constructor();
|
|
378
|
-
ngOnInit(): void;
|
|
379
|
-
ngOnDestroy(): void;
|
|
380
481
|
private handleEditedContextChange;
|
|
381
|
-
|
|
382
|
-
static
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
declare class LayerContextDirective implements OnInit, OnDestroy {
|
|
386
|
-
private component;
|
|
387
|
-
private contextService;
|
|
388
|
-
private layerService;
|
|
389
|
-
private configService;
|
|
390
|
-
private styleListService;
|
|
391
|
-
private styleService;
|
|
392
|
-
private shareMapService;
|
|
393
|
-
private context$$;
|
|
394
|
-
private queryParams;
|
|
395
|
-
private contextLayers;
|
|
396
|
-
readonly removeLayersOnContextChange: i0.InputSignal<boolean>;
|
|
397
|
-
readonly contextLayersLoaded: i0.OutputEmitterRef<boolean>;
|
|
398
|
-
get map(): IgoMap;
|
|
399
|
-
ngOnInit(): void;
|
|
400
|
-
ngOnDestroy(): void;
|
|
401
|
-
private handleContextChange;
|
|
402
|
-
private handleAddLayers;
|
|
403
|
-
private computeLayerVisibilityFromUrl;
|
|
404
|
-
private handleContextWithSharedUrl;
|
|
405
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>;
|
|
406
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; "isSignal": true; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
declare class MapContextDirective implements OnInit, OnDestroy {
|
|
410
|
-
private contextService;
|
|
411
|
-
private mediaService;
|
|
412
|
-
private shareMapService;
|
|
413
|
-
private component;
|
|
414
|
-
private context$$;
|
|
415
|
-
get map(): IgoMap;
|
|
416
|
-
private queryParams;
|
|
417
|
-
constructor();
|
|
418
|
-
ngOnInit(): void;
|
|
419
|
-
ngOnDestroy(): void;
|
|
420
|
-
private handleContextChange;
|
|
421
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MapContextDirective, never>;
|
|
422
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MapContextDirective, "[igoMapContext]", never, {}, {}, never, never, true, never>;
|
|
482
|
+
private getProfils;
|
|
483
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsComponent, never>;
|
|
484
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContextPermissionsComponent, "igo-context-permissions", never, { "context": { "alias": "context"; "required": false; "isSignal": true; }; "permissions": { "alias": "permissions"; "required": false; "isSignal": true; }; }, { "context": "contextChange"; "permissions": "permissionsChange"; }, never, never, true, never>;
|
|
423
485
|
}
|
|
424
486
|
|
|
425
487
|
/**
|
|
@@ -428,7 +490,7 @@ declare class MapContextDirective implements OnInit, OnDestroy {
|
|
|
428
490
|
declare class IgoContextManagerModule {
|
|
429
491
|
static forRoot(): ModuleWithProviders<IgoContextManagerModule>;
|
|
430
492
|
static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextManagerModule, never>;
|
|
431
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextManagerModule, never, [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof
|
|
493
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextManagerModule, never, [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof LayerContextDirective, typeof MapContextDirective], [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof LayerContextDirective, typeof MapContextDirective]>;
|
|
432
494
|
static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextManagerModule>;
|
|
433
495
|
}
|
|
434
496
|
|
|
@@ -469,6 +531,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
|
|
|
469
531
|
private messageService;
|
|
470
532
|
private languageService;
|
|
471
533
|
private confirmDialogService;
|
|
534
|
+
selected: Poi;
|
|
472
535
|
get map(): IgoMap;
|
|
473
536
|
set map(value: IgoMap);
|
|
474
537
|
private _map;
|
|
@@ -490,7 +553,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
|
|
|
490
553
|
declare class UserButtonComponent {
|
|
491
554
|
private dialog;
|
|
492
555
|
private config;
|
|
493
|
-
auth: AuthService
|
|
556
|
+
auth: AuthService<any>;
|
|
494
557
|
get map(): IgoMap;
|
|
495
558
|
set map(value: IgoMap);
|
|
496
559
|
private _map;
|
|
@@ -657,73 +720,6 @@ interface ContextExportOptions {
|
|
|
657
720
|
name: string;
|
|
658
721
|
}
|
|
659
722
|
|
|
660
|
-
declare class ContextService {
|
|
661
|
-
private http;
|
|
662
|
-
private authService;
|
|
663
|
-
private languageService;
|
|
664
|
-
private config;
|
|
665
|
-
private messageService;
|
|
666
|
-
private storageService;
|
|
667
|
-
private exportService;
|
|
668
|
-
private shareMapService;
|
|
669
|
-
private route;
|
|
670
|
-
context$: BehaviorSubject<DetailedContext>;
|
|
671
|
-
contexts$: BehaviorSubject<ContextsList>;
|
|
672
|
-
defaultContextId$: BehaviorSubject<string>;
|
|
673
|
-
editedContext$: BehaviorSubject<DetailedContext>;
|
|
674
|
-
importedContext: DetailedContext[];
|
|
675
|
-
toolsChanged$: Subject<DetailedContext>;
|
|
676
|
-
private mapViewFromRoute;
|
|
677
|
-
private options;
|
|
678
|
-
private baseUrl;
|
|
679
|
-
private tools;
|
|
680
|
-
private toolbar;
|
|
681
|
-
get defaultContextUri(): string;
|
|
682
|
-
set defaultContextUri(uri: string);
|
|
683
|
-
private _defaultContextUri;
|
|
684
|
-
constructor();
|
|
685
|
-
get(permissions?: string[], hidden?: boolean): Observable<ContextsList>;
|
|
686
|
-
getById(id: string): Observable<Context>;
|
|
687
|
-
getDetails(id: string): Observable<DetailedContext>;
|
|
688
|
-
getDefault(): Observable<DetailedContext>;
|
|
689
|
-
getProfilByUser(): Observable<ContextProfils[]>;
|
|
690
|
-
setDefault(id: string): Observable<string | undefined>;
|
|
691
|
-
hideContext(id: string): Observable<Object>;
|
|
692
|
-
showContext(id: string): Observable<Object>;
|
|
693
|
-
delete(id: string, imported?: boolean): Observable<void>;
|
|
694
|
-
create(context: DetailedContext): Observable<Context>;
|
|
695
|
-
clone(id: string, properties?: {}): Observable<Context>;
|
|
696
|
-
update(id: string, context: DetailedContext): Observable<ContextDetailedChanges>;
|
|
697
|
-
addToolAssociation(contextId: string, toolId: string): Observable<void>;
|
|
698
|
-
deleteToolAssociation(contextId: string, toolId: string): Observable<unknown>;
|
|
699
|
-
getPermissions(id: string): Observable<ContextPermission[]>;
|
|
700
|
-
addPermissionAssociation(contextId: string, profil: string, type: TypePermission): Observable<ContextPermission[]>;
|
|
701
|
-
deletePermissionAssociation(contextId: string, permissionId: string): Observable<void>;
|
|
702
|
-
getLocalContexts(): Observable<ContextsList>;
|
|
703
|
-
getLocalContext(uri: string): Observable<DetailedContext>;
|
|
704
|
-
loadContexts(permissions?: string[], hidden?: boolean): void;
|
|
705
|
-
loadDefaultContext(): void;
|
|
706
|
-
loadContext(uri: string): void;
|
|
707
|
-
setContext(context: DetailedContext): void;
|
|
708
|
-
loadEditedContext(uri: string): void;
|
|
709
|
-
setEditedContext(context: DetailedContext): void;
|
|
710
|
-
getContextFromMap(igoMap: IgoMap, empty?: boolean): DetailedContext;
|
|
711
|
-
getContextFromLayers(igoMap: IgoMap, layers: AnyLayer[], name: string, keepCurrentView?: boolean): DetailedContext;
|
|
712
|
-
private getExtraFeatures;
|
|
713
|
-
setTools(tools: Tool[]): void;
|
|
714
|
-
setToolbar(toolbar: string[]): void;
|
|
715
|
-
private handleContextMessage;
|
|
716
|
-
private getContextByUri;
|
|
717
|
-
getContextLayers(map: IgoMap): readonly AnyLayer[];
|
|
718
|
-
private getPath;
|
|
719
|
-
private handleError;
|
|
720
|
-
private handleContextsChange;
|
|
721
|
-
private addContextToList;
|
|
722
|
-
private findContext;
|
|
723
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
|
724
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
723
|
declare function handleFileImportSuccess(file: File, context: DetailedContext, messageService: MessageService, contextService: ContextService): void;
|
|
728
724
|
declare function handleFileImportError(file: File, error: Error, messageService: MessageService, sizeMb?: number): void;
|
|
729
725
|
declare function handleInvalidFileImportError(file: File, error: Error, messageService: MessageService): void;
|
|
@@ -740,7 +736,7 @@ declare function handleFileExportError(error: Error, messageService: MessageServ
|
|
|
740
736
|
declare function handleFileExportSuccess(messageService: MessageService): void;
|
|
741
737
|
declare function handleNothingToExportError(messageService: MessageService): void;
|
|
742
738
|
|
|
743
|
-
declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof
|
|
739
|
+
declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof MapContextDirective, typeof LayerContextDirective];
|
|
744
740
|
|
|
745
741
|
declare class PoiDialogComponent {
|
|
746
742
|
dialogRef: MatDialogRef<PoiDialogComponent, any>;
|
|
@@ -855,66 +851,28 @@ interface ShareMapRouteKeysOptions extends RouteServiceOptions {
|
|
|
855
851
|
}
|
|
856
852
|
declare const SHARE_MAP_KEYS_DEFAULT_OPTIONS: ShareMapRouteKeysOptions;
|
|
857
853
|
|
|
858
|
-
declare class
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
language: string;
|
|
863
|
-
|
|
854
|
+
declare class ShareMapService {
|
|
855
|
+
routeService: RouteService;
|
|
856
|
+
document: Document;
|
|
857
|
+
get language(): string;
|
|
858
|
+
set language(value: string);
|
|
859
|
+
private _language;
|
|
860
|
+
options: ShareMapRouteKeysOptions;
|
|
861
|
+
optionsLegacy: RouteServiceOptions;
|
|
862
|
+
keysDefinitions: ShareMapKeysDefinitions;
|
|
863
|
+
private encoder;
|
|
864
|
+
private parser;
|
|
865
|
+
constructor();
|
|
864
866
|
generateUrl(map: IgoMap, context: DetailedContext): string;
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
* This is necessary for sharing the map context.
|
|
868
|
-
*/
|
|
869
|
-
private replaceGroupLocalIds;
|
|
870
|
-
private getUniqueId;
|
|
871
|
-
private getCurrentContext;
|
|
872
|
-
/**
|
|
873
|
-
* Filters layers to include only LayerGroups or LayerItems with a valid ServiceType.
|
|
874
|
-
*/
|
|
875
|
-
private isLayerSharable;
|
|
876
|
-
/**
|
|
877
|
-
* Extracts only LayerGroup items from the filtered layers.
|
|
878
|
-
*/
|
|
879
|
-
private getLayerGroups;
|
|
880
|
-
/**
|
|
881
|
-
* Extracts only LayerItem items from the filtered layers.
|
|
882
|
-
*/
|
|
883
|
-
private getLayerItems;
|
|
884
|
-
private buildQueryUrl;
|
|
885
|
-
/**
|
|
886
|
-
* Retrieves the current context layers and maps them by identifier.
|
|
887
|
-
*/
|
|
888
|
-
private getContextLayersMap;
|
|
889
|
-
/**
|
|
890
|
-
* Filters layers and context layers based on visibility, opacity, and expanded state.
|
|
891
|
-
*/
|
|
892
|
-
private getFilteredMapLayers;
|
|
893
|
-
private getIdsNestedParent;
|
|
894
|
-
private generateLayersOptionsByService;
|
|
895
|
-
private generateLayerOption;
|
|
896
|
-
private getLayerNames;
|
|
897
|
-
private getWmsVersion;
|
|
898
|
-
private concatUrlWithVersion;
|
|
899
|
-
private getLayerParams;
|
|
900
|
-
/** Recursive */
|
|
901
|
-
private hasLayerId;
|
|
902
|
-
private getOpacity;
|
|
903
|
-
private getVisibility;
|
|
904
|
-
private buildLayersQueryUrl;
|
|
905
|
-
private stringifyLayerParams;
|
|
906
|
-
private getBaseUrlConfig;
|
|
867
|
+
parsePosition(params: Params): PositionParams | undefined;
|
|
868
|
+
parseLayers(params: Params): AnyLayerOptions[] | undefined;
|
|
907
869
|
sanitizeBaseUrl(baseUrl: string): string;
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
private stringifyDefinitions;
|
|
915
|
-
private buildGroupsQueryUrl;
|
|
916
|
-
private getLayerGroupParams;
|
|
917
|
-
private stringifyGroupParams;
|
|
870
|
+
getContext(params: Params): string | undefined;
|
|
871
|
+
getZoom(params: Params): number | undefined;
|
|
872
|
+
getUrlWithApi(formValues: any): string;
|
|
873
|
+
hasPositionParams(params: Params): boolean;
|
|
874
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>;
|
|
875
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>;
|
|
918
876
|
}
|
|
919
877
|
|
|
920
878
|
declare class ShareMapLegacyParser {
|
|
@@ -932,41 +890,6 @@ declare class ShareMapLegacyParser {
|
|
|
932
890
|
private computeLayerVisibilityFromUrl;
|
|
933
891
|
}
|
|
934
892
|
|
|
935
|
-
declare class ShareMapParser {
|
|
936
|
-
private keysDefinitions;
|
|
937
|
-
private legacyOptions;
|
|
938
|
-
legacy: ShareMapLegacyParser;
|
|
939
|
-
constructor(keysDefinitions: ShareMapKeysDefinitions, legacyOptions: RouteServiceOptions);
|
|
940
|
-
parseLayers(params: Params): AnyLayerOptions[] | undefined;
|
|
941
|
-
private splitParam;
|
|
942
|
-
parsePosition(params: Params): PositionParams | undefined;
|
|
943
|
-
private parseLayer;
|
|
944
|
-
private parseGroup;
|
|
945
|
-
private extractVersionFromUrl;
|
|
946
|
-
private extractLayerId;
|
|
947
|
-
private extractUrlIndex;
|
|
948
|
-
private extractLayerNames;
|
|
949
|
-
private extractLayerProperties;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
declare class ShareMapService {
|
|
953
|
-
routeService: RouteService;
|
|
954
|
-
document: Document;
|
|
955
|
-
private language;
|
|
956
|
-
options: ShareMapRouteKeysOptions;
|
|
957
|
-
optionsLegacy: RouteServiceOptions;
|
|
958
|
-
keysDefinitions: ShareMapKeysDefinitions;
|
|
959
|
-
encoder: ShareMapEncoder;
|
|
960
|
-
parser: ShareMapParser;
|
|
961
|
-
constructor();
|
|
962
|
-
getContext(params: Params): string | undefined;
|
|
963
|
-
getZoom(params: Params): number | undefined;
|
|
964
|
-
getUrlWithApi(formValues: any): string;
|
|
965
|
-
hasPositionParams(params: Params): boolean;
|
|
966
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>;
|
|
967
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
893
|
declare function buildDataSourceOptions(type: ServiceType, url: string, layers: string[], version: string): AnyDataSourceOptions;
|
|
971
894
|
declare function getFlattenOptions(options: AnyLayerOptions[]): AnyLayerOptions[];
|
|
972
895
|
/**
|
|
@@ -977,5 +900,5 @@ declare function hasLegacyParams(params: Params, optionsLegacy: RouteServiceOpti
|
|
|
977
900
|
declare function hasModernShareParams(params: Params, keysDefinitions: ShareMapKeysDefinitions): boolean;
|
|
978
901
|
declare function getParamValue(params: Params, key: string): string | undefined;
|
|
979
902
|
|
|
980
|
-
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent,
|
|
981
|
-
export type { BaseKeyParams, Context, ContextDetailedChanges, ContextExportOptions, ContextHomeExtent, ContextMap, ContextMapView,
|
|
903
|
+
export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, GroupParamsKeys, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, LayerParamsKeys, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, SHARE_MAP_KEYS_DEFAULT_OPTIONS, Scope, ServiceType, ServiceTypeEnum, ShareMapComponent, ShareMapLegacyParser, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, buildDataSourceOptions, computeLayerTitleFromFile, getFileExtension, getFlattenOptions, getParamValue, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hasLegacyParams, hasModernShareParams };
|
|
904
|
+
export type { BaseKeyParams, Context, ContextDetailedChanges, ContextExportOptions, ContextHomeExtent, ContextMap, ContextMapView, ContextProfils, ContextServiceOptions, ContextsList, DefinitionKeyParams, DefinitionParams, DetailedContext, EnvironmentOptions, ExtraFeatures, GroupParams, IProcessChanges, LayerParams, LayerProperties, Poi, PositionParams, ShareMapKeysDefinitions, ShareMapRouteKeysOptions, UrlParsedParam };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igo2/context",
|
|
3
|
-
"version": "20.1.0-next.
|
|
3
|
+
"version": "20.1.0-next.30",
|
|
4
4
|
"description": "IGO Library",
|
|
5
5
|
"author": "IGO Community",
|
|
6
6
|
"keywords": [
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"homepage": "https://github.com/infra-geo-ouverte/igo2-lib#readme",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/infra-geo-ouverte/igo2-lib.git"
|
|
13
|
+
"url": "git+https://github.com/infra-geo-ouverte/igo2-lib.git",
|
|
14
|
+
"directory": "packages/context"
|
|
14
15
|
},
|
|
15
16
|
"bugs": {
|
|
16
17
|
"url": "https://github.com/infra-geo-ouverte/igo2-lib/issues"
|
|
@@ -34,12 +35,12 @@
|
|
|
34
35
|
"@angular/forms": "^20.0.0",
|
|
35
36
|
"@angular/material": "^20.0.0",
|
|
36
37
|
"@angular/platform-browser": "^20.0.0",
|
|
37
|
-
"@igo2/auth": "^20.1.0-next.
|
|
38
|
-
"@igo2/common": "^20.1.0-next.
|
|
39
|
-
"@igo2/core": "^20.1.0-next.
|
|
40
|
-
"@igo2/geo": "^20.1.0-next.
|
|
41
|
-
"@igo2/utils": "^20.1.0-next.
|
|
42
|
-
"ol": "10.
|
|
38
|
+
"@igo2/auth": "^20.1.0-next.30",
|
|
39
|
+
"@igo2/common": "^20.1.0-next.30",
|
|
40
|
+
"@igo2/core": "^20.1.0-next.30",
|
|
41
|
+
"@igo2/geo": "^20.1.0-next.30",
|
|
42
|
+
"@igo2/utils": "^20.1.0-next.30",
|
|
43
|
+
"ol": "^10.0.0",
|
|
43
44
|
"rxjs": "^7.8.0"
|
|
44
45
|
},
|
|
45
46
|
"engines": {
|