@igo2/context 20.1.0-next.2 → 20.1.0-next.21
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 +439 -396
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/index.d.ts +195 -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,141 @@ 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 | undefined>;
|
|
175
|
+
hideContext(id: number): Observable<Object>;
|
|
176
|
+
showContext(id: number): Observable<Object>;
|
|
177
|
+
delete(id: number, imported?: boolean): Observable<void>;
|
|
178
|
+
create(context: DetailedContext): Observable<Context>;
|
|
179
|
+
clone(id: number, properties?: {}): Observable<Context>;
|
|
180
|
+
update(id: number, context: DetailedContext): Observable<ContextDetailedChanges>;
|
|
181
|
+
addToolAssociation(contextId: string, toolId: string): Observable<void>;
|
|
182
|
+
deleteToolAssociation(contextId: string, toolId: string): Observable<unknown>;
|
|
183
|
+
getLocalContexts(): Observable<ContextsList>;
|
|
184
|
+
getLocalContext(uri: string): Observable<DetailedContext>;
|
|
185
|
+
loadContexts(permissions?: string[], hidden?: boolean): void;
|
|
186
|
+
loadDefaultContext(): void;
|
|
187
|
+
loadContext(uri: string): void;
|
|
188
|
+
setContext(context: DetailedContext): void;
|
|
189
|
+
loadEditedContext(uri: string): void;
|
|
190
|
+
setEditedContext(context: DetailedContext): void;
|
|
191
|
+
getContextFromMap(igoMap: IgoMap, empty?: boolean): DetailedContext;
|
|
192
|
+
getContextFromLayers(igoMap: IgoMap, layers: AnyLayer[], name: string, keepCurrentView?: boolean): DetailedContext;
|
|
193
|
+
private getExtraFeatures;
|
|
194
|
+
setTools(tools: Tool[]): void;
|
|
195
|
+
setToolbar(toolbar: string[]): void;
|
|
196
|
+
private handleContextMessage;
|
|
197
|
+
private getContextByUri;
|
|
198
|
+
getContextLayers(map: IgoMap): readonly AnyLayer[];
|
|
199
|
+
private getPath;
|
|
200
|
+
private handleError;
|
|
201
|
+
private handleContextsChange;
|
|
202
|
+
private addContextToList;
|
|
203
|
+
private findContext;
|
|
204
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
|
205
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare class LayerContextDirective implements OnInit, OnDestroy {
|
|
209
|
+
private component;
|
|
210
|
+
private contextService;
|
|
211
|
+
private layerService;
|
|
212
|
+
private configService;
|
|
213
|
+
private styleListService;
|
|
214
|
+
private styleService;
|
|
215
|
+
private shareMapService;
|
|
216
|
+
private context$$;
|
|
217
|
+
private queryParams;
|
|
218
|
+
private contextLayers;
|
|
219
|
+
readonly removeLayersOnContextChange: i0.InputSignal<boolean>;
|
|
220
|
+
readonly contextLayersLoaded: i0.OutputEmitterRef<boolean>;
|
|
221
|
+
get map(): IgoMap;
|
|
222
|
+
ngOnInit(): void;
|
|
223
|
+
ngOnDestroy(): void;
|
|
224
|
+
private handleContextChange;
|
|
225
|
+
private handleAddLayers;
|
|
226
|
+
private computeLayerVisibilityFromUrl;
|
|
227
|
+
private handleContextWithSharedUrl;
|
|
228
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>;
|
|
229
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; "isSignal": true; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare class MapContextDirective implements OnInit, OnDestroy {
|
|
233
|
+
private contextService;
|
|
234
|
+
private mediaService;
|
|
235
|
+
private shareMapService;
|
|
236
|
+
private component;
|
|
237
|
+
private context$$;
|
|
238
|
+
get map(): IgoMap;
|
|
239
|
+
private queryParams;
|
|
240
|
+
constructor();
|
|
241
|
+
ngOnInit(): void;
|
|
242
|
+
ngOnDestroy(): void;
|
|
243
|
+
private handleContextChange;
|
|
244
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapContextDirective, never>;
|
|
245
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MapContextDirective, "[igoMapContext]", never, {}, {}, never, never, true, never>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface ContextUserPermission {
|
|
249
|
+
name: string;
|
|
250
|
+
checked: boolean;
|
|
251
|
+
indeterminate?: boolean;
|
|
252
|
+
}
|
|
253
|
+
interface ContextUserOrProfils extends ContextProfils {
|
|
254
|
+
id: number;
|
|
255
|
+
type: 'user' | 'profil';
|
|
256
|
+
}
|
|
257
|
+
type IAnyContextPermission = IContextPermissionProfil | IContextPermissionUser;
|
|
258
|
+
interface IContextPermissionUser extends IBaseContextPermission {
|
|
259
|
+
userId: number;
|
|
260
|
+
profilType: 'user';
|
|
261
|
+
userSource: string;
|
|
262
|
+
user: {
|
|
263
|
+
id: number;
|
|
264
|
+
externalId: number;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
interface IContextPermissionProfil extends IBaseContextPermission {
|
|
268
|
+
profilId: number;
|
|
269
|
+
profilType: 'profil';
|
|
270
|
+
}
|
|
271
|
+
interface IBaseContextPermission {
|
|
272
|
+
id: number;
|
|
273
|
+
title: string;
|
|
274
|
+
typePermission: TypePermission | null;
|
|
275
|
+
contextId: number;
|
|
276
|
+
}
|
|
277
|
+
|
|
160
278
|
declare enum ContextListControlsEnum {
|
|
161
279
|
always = "always",
|
|
162
280
|
never = "never",
|
|
@@ -165,7 +283,7 @@ declare enum ContextListControlsEnum {
|
|
|
165
283
|
|
|
166
284
|
declare class ContextListComponent implements OnInit, OnDestroy {
|
|
167
285
|
configService: ConfigService<any>;
|
|
168
|
-
auth: AuthService
|
|
286
|
+
auth: AuthService<any>;
|
|
169
287
|
private contextService;
|
|
170
288
|
private shareMapService;
|
|
171
289
|
private clipboard;
|
|
@@ -187,8 +305,8 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
187
305
|
private _contexts;
|
|
188
306
|
readonly selectedContext: i0.ModelSignal<DetailedContext>;
|
|
189
307
|
readonly map: i0.InputSignal<IgoMap>;
|
|
190
|
-
get defaultContextId(): string;
|
|
191
|
-
set defaultContextId(value: string);
|
|
308
|
+
get defaultContextId(): string | number;
|
|
309
|
+
set defaultContextId(value: string | number);
|
|
192
310
|
private _defaultContextId;
|
|
193
311
|
collapsed: {
|
|
194
312
|
contextScope: any;
|
|
@@ -240,6 +358,7 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
240
358
|
ngOnInit(): void;
|
|
241
359
|
ngOnDestroy(): void;
|
|
242
360
|
setSelected(context: DetailedContext): void;
|
|
361
|
+
sortByKeyPriority: (a: KeyValue<string, DetailedContext[]>, b: KeyValue<string, DetailedContext[]>) => number;
|
|
243
362
|
private next;
|
|
244
363
|
private filterContextsList;
|
|
245
364
|
showFilter(): boolean;
|
|
@@ -274,9 +393,9 @@ declare class ContextListComponent implements OnInit, OnDestroy {
|
|
|
274
393
|
}
|
|
275
394
|
|
|
276
395
|
declare class ContextItemComponent {
|
|
277
|
-
auth: AuthService
|
|
396
|
+
auth: AuthService<any>;
|
|
278
397
|
private storageService;
|
|
279
|
-
typePermission:
|
|
398
|
+
typePermission: readonly ["read", "write"];
|
|
280
399
|
color: string;
|
|
281
400
|
collapsed: boolean;
|
|
282
401
|
readonly showFavorite: i0.InputSignal<boolean>;
|
|
@@ -307,7 +426,6 @@ declare class ContextFormComponent {
|
|
|
307
426
|
private clipboard;
|
|
308
427
|
private formBuilder;
|
|
309
428
|
private messageService;
|
|
310
|
-
form: UntypedFormGroup;
|
|
311
429
|
prefix: string;
|
|
312
430
|
readonly btnSubmitText: i0.InputSignal<string>;
|
|
313
431
|
readonly context: i0.InputSignal<Context>;
|
|
@@ -315,7 +433,7 @@ declare class ContextFormComponent {
|
|
|
315
433
|
readonly submitForm: i0.OutputEmitterRef<unknown>;
|
|
316
434
|
readonly clone: i0.OutputEmitterRef<unknown>;
|
|
317
435
|
readonly delete: i0.OutputEmitterRef<unknown>;
|
|
318
|
-
|
|
436
|
+
readonly form: i0.Signal<FormGroup<any>>;
|
|
319
437
|
handleFormSubmit(value: any): void;
|
|
320
438
|
copyTextToClipboard(): void;
|
|
321
439
|
private buildForm;
|
|
@@ -323,15 +441,11 @@ declare class ContextFormComponent {
|
|
|
323
441
|
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
442
|
}
|
|
325
443
|
|
|
326
|
-
declare class ContextEditComponent
|
|
444
|
+
declare class ContextEditComponent {
|
|
327
445
|
private contextService;
|
|
328
446
|
private messageService;
|
|
329
|
-
readonly context: i0.
|
|
447
|
+
readonly context: i0.Signal<_igo2_context.DetailedContext>;
|
|
330
448
|
readonly submitSuccessed: i0.OutputEmitterRef<Context>;
|
|
331
|
-
private editedContext$$;
|
|
332
|
-
ngOnInit(): void;
|
|
333
|
-
ngOnDestroy(): void;
|
|
334
|
-
private handleEditedContextChange;
|
|
335
449
|
onEdit(context: Context): void;
|
|
336
450
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextEditComponent, never>;
|
|
337
451
|
static ɵcmp: i0.ɵɵComponentDeclaration<ContextEditComponent, "igo-context-edit", never, {}, { "submitSuccessed": "submitSuccessed"; }, never, never, true, never>;
|
|
@@ -340,86 +454,33 @@ declare class ContextEditComponent implements OnInit, OnDestroy {
|
|
|
340
454
|
declare class ContextPermissionsComponent implements OnInit {
|
|
341
455
|
private formBuilder;
|
|
342
456
|
private http;
|
|
343
|
-
authService: AuthService
|
|
457
|
+
authService: AuthService<any>;
|
|
344
458
|
private config;
|
|
459
|
+
private contextService;
|
|
460
|
+
private contextPermissionService;
|
|
461
|
+
private messageService;
|
|
462
|
+
private destroyRef;
|
|
345
463
|
form: UntypedFormGroup;
|
|
346
464
|
readonly context: i0.ModelSignal<Context>;
|
|
347
|
-
readonly permissions: i0.ModelSignal<
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
465
|
+
readonly permissions: i0.ModelSignal<IAnyContextPermission[]>;
|
|
466
|
+
readonly permissionsRead: i0.Signal<IAnyContextPermission[]>;
|
|
467
|
+
readonly permissionsWrite: i0.Signal<IAnyContextPermission[]>;
|
|
468
|
+
profils: i0.WritableSignal<ContextUserOrProfils[]>;
|
|
469
|
+
canWrite: i0.Signal<boolean>;
|
|
352
470
|
private baseUrlProfils;
|
|
353
471
|
formControl: UntypedFormControl;
|
|
354
472
|
formValueChanges$$: Subscription;
|
|
355
|
-
readonly addPermission: i0.OutputEmitterRef<ContextPermission>;
|
|
356
|
-
readonly removePermission: i0.OutputEmitterRef<ContextPermission>;
|
|
357
|
-
readonly scopeChanged: i0.OutputEmitterRef<Context>;
|
|
358
473
|
ngOnInit(): void;
|
|
359
|
-
displayFn(profil?:
|
|
360
|
-
handleFormSubmit(value:
|
|
474
|
+
displayFn(profil?: ContextUserOrProfils): string | undefined;
|
|
475
|
+
handleFormSubmit(value: IAnyContextPermission): void;
|
|
361
476
|
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;
|
|
477
|
+
onProfilSelected(value: ContextUserOrProfils): void;
|
|
478
|
+
onRemovePermission(permission: IAnyContextPermission): void;
|
|
376
479
|
onScopeChanged(context: Context): void;
|
|
377
|
-
constructor();
|
|
378
|
-
ngOnInit(): void;
|
|
379
|
-
ngOnDestroy(): void;
|
|
380
480
|
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>;
|
|
481
|
+
private getProfils;
|
|
482
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsComponent, never>;
|
|
483
|
+
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
484
|
}
|
|
424
485
|
|
|
425
486
|
/**
|
|
@@ -428,7 +489,7 @@ declare class MapContextDirective implements OnInit, OnDestroy {
|
|
|
428
489
|
declare class IgoContextManagerModule {
|
|
429
490
|
static forRoot(): ModuleWithProviders<IgoContextManagerModule>;
|
|
430
491
|
static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextManagerModule, never>;
|
|
431
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextManagerModule, never, [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof
|
|
492
|
+
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
493
|
static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextManagerModule>;
|
|
433
494
|
}
|
|
434
495
|
|
|
@@ -469,6 +530,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
|
|
|
469
530
|
private messageService;
|
|
470
531
|
private languageService;
|
|
471
532
|
private confirmDialogService;
|
|
533
|
+
selected: Poi;
|
|
472
534
|
get map(): IgoMap;
|
|
473
535
|
set map(value: IgoMap);
|
|
474
536
|
private _map;
|
|
@@ -490,7 +552,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
|
|
|
490
552
|
declare class UserButtonComponent {
|
|
491
553
|
private dialog;
|
|
492
554
|
private config;
|
|
493
|
-
auth: AuthService
|
|
555
|
+
auth: AuthService<any>;
|
|
494
556
|
get map(): IgoMap;
|
|
495
557
|
set map(value: IgoMap);
|
|
496
558
|
private _map;
|
|
@@ -657,73 +719,6 @@ interface ContextExportOptions {
|
|
|
657
719
|
name: string;
|
|
658
720
|
}
|
|
659
721
|
|
|
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
722
|
declare function handleFileImportSuccess(file: File, context: DetailedContext, messageService: MessageService, contextService: ContextService): void;
|
|
728
723
|
declare function handleFileImportError(file: File, error: Error, messageService: MessageService, sizeMb?: number): void;
|
|
729
724
|
declare function handleInvalidFileImportError(file: File, error: Error, messageService: MessageService): void;
|
|
@@ -740,7 +735,7 @@ declare function handleFileExportError(error: Error, messageService: MessageServ
|
|
|
740
735
|
declare function handleFileExportSuccess(messageService: MessageService): void;
|
|
741
736
|
declare function handleNothingToExportError(messageService: MessageService): void;
|
|
742
737
|
|
|
743
|
-
declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof
|
|
738
|
+
declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof MapContextDirective, typeof LayerContextDirective];
|
|
744
739
|
|
|
745
740
|
declare class PoiDialogComponent {
|
|
746
741
|
dialogRef: MatDialogRef<PoiDialogComponent, any>;
|
|
@@ -855,66 +850,28 @@ interface ShareMapRouteKeysOptions extends RouteServiceOptions {
|
|
|
855
850
|
}
|
|
856
851
|
declare const SHARE_MAP_KEYS_DEFAULT_OPTIONS: ShareMapRouteKeysOptions;
|
|
857
852
|
|
|
858
|
-
declare class
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
language: string;
|
|
863
|
-
|
|
853
|
+
declare class ShareMapService {
|
|
854
|
+
routeService: RouteService;
|
|
855
|
+
document: Document;
|
|
856
|
+
get language(): string;
|
|
857
|
+
set language(value: string);
|
|
858
|
+
private _language;
|
|
859
|
+
options: ShareMapRouteKeysOptions;
|
|
860
|
+
optionsLegacy: RouteServiceOptions;
|
|
861
|
+
keysDefinitions: ShareMapKeysDefinitions;
|
|
862
|
+
private encoder;
|
|
863
|
+
private parser;
|
|
864
|
+
constructor();
|
|
864
865
|
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;
|
|
866
|
+
parsePosition(params: Params): PositionParams | undefined;
|
|
867
|
+
parseLayers(params: Params): AnyLayerOptions[] | undefined;
|
|
907
868
|
sanitizeBaseUrl(baseUrl: string): string;
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
private stringifyDefinitions;
|
|
915
|
-
private buildGroupsQueryUrl;
|
|
916
|
-
private getLayerGroupParams;
|
|
917
|
-
private stringifyGroupParams;
|
|
869
|
+
getContext(params: Params): string | undefined;
|
|
870
|
+
getZoom(params: Params): number | undefined;
|
|
871
|
+
getUrlWithApi(formValues: any): string;
|
|
872
|
+
hasPositionParams(params: Params): boolean;
|
|
873
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>;
|
|
874
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>;
|
|
918
875
|
}
|
|
919
876
|
|
|
920
877
|
declare class ShareMapLegacyParser {
|
|
@@ -932,41 +889,6 @@ declare class ShareMapLegacyParser {
|
|
|
932
889
|
private computeLayerVisibilityFromUrl;
|
|
933
890
|
}
|
|
934
891
|
|
|
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
892
|
declare function buildDataSourceOptions(type: ServiceType, url: string, layers: string[], version: string): AnyDataSourceOptions;
|
|
971
893
|
declare function getFlattenOptions(options: AnyLayerOptions[]): AnyLayerOptions[];
|
|
972
894
|
/**
|
|
@@ -977,5 +899,5 @@ declare function hasLegacyParams(params: Params, optionsLegacy: RouteServiceOpti
|
|
|
977
899
|
declare function hasModernShareParams(params: Params, keysDefinitions: ShareMapKeysDefinitions): boolean;
|
|
978
900
|
declare function getParamValue(params: Params, key: string): string | undefined;
|
|
979
901
|
|
|
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,
|
|
902
|
+
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 };
|
|
903
|
+
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.21",
|
|
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.21",
|
|
39
|
+
"@igo2/common": "^20.1.0-next.21",
|
|
40
|
+
"@igo2/core": "^20.1.0-next.21",
|
|
41
|
+
"@igo2/geo": "^20.1.0-next.21",
|
|
42
|
+
"@igo2/utils": "^20.1.0-next.21",
|
|
43
|
+
"ol": "^10.0.0",
|
|
43
44
|
"rxjs": "^7.8.0"
|
|
44
45
|
},
|
|
45
46
|
"engines": {
|