@igo2/context 20.1.0-next.8 → 20.1.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/index.d.ts CHANGED
@@ -1,15 +1,18 @@
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, ReplaySubject, Subscription, Observable, Subject } from 'rxjs';
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 * as _igo2_common_icon from '@igo2/common/icon';
10
+ import { KeyValue } from '@angular/common';
9
11
  import { AuthService, AuthOptions } from '@igo2/auth';
10
12
  import { ActionStore, ActionbarMode } from '@igo2/common/action';
11
13
  import { ConfigService } from '@igo2/core/config';
12
14
  import { MatMenuTrigger } from '@angular/material/menu';
15
+ import * as _igo2_context from '@igo2/context';
13
16
  import { MatDialogRef } from '@angular/material/dialog';
14
17
  import { Title } from '@angular/platform-browser';
15
18
  import { FlexibleState } from '@igo2/common/flexible';
@@ -17,11 +20,8 @@ import { Media } from '@igo2/core/media';
17
20
  import { Params } from '@angular/router';
18
21
  import { RouteServiceOptions, RouteService } from '@igo2/core/route';
19
22
 
20
- declare enum TypePermission {
21
- null = 0,
22
- read = 1,
23
- write = 2
24
- }
23
+ declare const TypePermission: readonly ["read", "write"];
24
+ type TypePermission = (typeof TypePermission)[number];
25
25
  declare enum Scope {
26
26
  public = 0,
27
27
  protected = 1,
@@ -29,11 +29,11 @@ declare enum Scope {
29
29
  }
30
30
 
31
31
  interface Context {
32
- id?: string;
32
+ id?: number;
33
33
  title?: string;
34
34
  uri?: string;
35
35
  scope?: string;
36
- permission?: string;
36
+ permission?: TypePermission;
37
37
  description?: string;
38
38
  icon?: string;
39
39
  iconImage?: string;
@@ -91,22 +91,6 @@ interface ContextServiceOptions {
91
91
  contextListFile?: string;
92
92
  defaultContextUri?: string;
93
93
  }
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
94
  interface ContextProfils {
111
95
  name: string;
112
96
  title: string;
@@ -157,6 +141,142 @@ declare class IgoContextImportExportModule {
157
141
  static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextImportExportModule>;
158
142
  }
159
143
 
144
+ declare class ContextService {
145
+ private http;
146
+ private authService;
147
+ private languageService;
148
+ private config;
149
+ private messageService;
150
+ private storageService;
151
+ private exportService;
152
+ private shareMapService;
153
+ private route;
154
+ context$: BehaviorSubject<DetailedContext>;
155
+ contexts$: BehaviorSubject<ContextsList>;
156
+ defaultContextId$: BehaviorSubject<string | number>;
157
+ editedContext$: BehaviorSubject<DetailedContext>;
158
+ importedContext: DetailedContext[];
159
+ toolsChanged$: Subject<DetailedContext>;
160
+ private mapViewFromRoute;
161
+ private options;
162
+ private baseUrl;
163
+ private tools;
164
+ private toolbar;
165
+ get defaultContextUri(): string;
166
+ set defaultContextUri(uri: string);
167
+ private _defaultContextUri;
168
+ constructor();
169
+ get(permissions?: string[], hidden?: boolean): Observable<ContextsList>;
170
+ getById(id: string): Observable<Context>;
171
+ getDetails(id: number): Observable<DetailedContext>;
172
+ getDetailsByUri(uri: string): Observable<DetailedContext>;
173
+ getDefault(): Observable<DetailedContext>;
174
+ getProfilByUser(): Observable<ContextProfils[]>;
175
+ setDefault(id: string | number): Observable<string | number | undefined>;
176
+ private setDefaultLocalStorage;
177
+ hideContext(id: number): Observable<Object>;
178
+ showContext(id: number): Observable<Object>;
179
+ delete(id: number, imported?: boolean): Observable<void>;
180
+ create(context: DetailedContext): Observable<Context>;
181
+ clone(id: number, properties?: {}): Observable<Context>;
182
+ update(id: number, context: DetailedContext): Observable<ContextDetailedChanges>;
183
+ addToolAssociation(contextId: string, toolId: string): Observable<void>;
184
+ deleteToolAssociation(contextId: string, toolId: string): Observable<unknown>;
185
+ getLocalContexts(): Observable<ContextsList>;
186
+ getLocalContext(uri: string): Observable<DetailedContext>;
187
+ loadContexts(permissions?: string[], hidden?: boolean): void;
188
+ loadDefaultContext(): void;
189
+ loadContext(uri: string): void;
190
+ setContext(context: DetailedContext): void;
191
+ loadEditedContext(uri: string): void;
192
+ setEditedContext(context: DetailedContext): void;
193
+ getContextFromMap(igoMap: IgoMap, empty?: boolean): DetailedContext;
194
+ getContextFromLayers(igoMap: IgoMap, layers: AnyLayer[], name: string, keepCurrentView?: boolean): DetailedContext;
195
+ private getExtraFeatures;
196
+ setTools(tools: Tool[]): void;
197
+ setToolbar(toolbar: string[]): void;
198
+ private handleContextMessage;
199
+ private getContextByUri;
200
+ getContextLayers(map: IgoMap): readonly AnyLayer[];
201
+ private getPath;
202
+ private handleError;
203
+ private handleContextsChange;
204
+ private addContextToList;
205
+ private findContext;
206
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
207
+ static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
208
+ }
209
+
210
+ declare class LayerContextDirective implements OnInit, OnDestroy {
211
+ private component;
212
+ private contextService;
213
+ private layerService;
214
+ private configService;
215
+ private styleListService;
216
+ private styleService;
217
+ private shareMapService;
218
+ private context$$;
219
+ private queryParams;
220
+ private contextLayers;
221
+ readonly removeLayersOnContextChange: i0.InputSignal<boolean>;
222
+ readonly contextLayersLoaded: i0.OutputEmitterRef<boolean>;
223
+ get map(): IgoMap;
224
+ ngOnInit(): void;
225
+ ngOnDestroy(): void;
226
+ private handleContextChange;
227
+ private handleAddLayers;
228
+ private computeLayerVisibilityFromUrl;
229
+ private handleContextWithSharedUrl;
230
+ static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>;
231
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; "isSignal": true; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>;
232
+ }
233
+
234
+ declare class MapContextDirective implements OnInit, OnDestroy {
235
+ private contextService;
236
+ private mediaService;
237
+ private shareMapService;
238
+ private component;
239
+ private context$$;
240
+ get map(): IgoMap;
241
+ private queryParams;
242
+ constructor();
243
+ ngOnInit(): void;
244
+ ngOnDestroy(): void;
245
+ private handleContextChange;
246
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapContextDirective, never>;
247
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MapContextDirective, "[igoMapContext]", never, {}, {}, never, never, true, never>;
248
+ }
249
+
250
+ interface ContextUserPermission {
251
+ name: string;
252
+ checked: boolean;
253
+ indeterminate?: boolean;
254
+ }
255
+ interface ContextUserOrProfils extends ContextProfils {
256
+ id: number;
257
+ type: 'user' | 'profil';
258
+ }
259
+ type IAnyContextPermission = IContextPermissionProfil | IContextPermissionUser;
260
+ interface IContextPermissionUser extends IBaseContextPermission {
261
+ userId: number;
262
+ profilType: 'user';
263
+ userSource: string;
264
+ user: {
265
+ id: number;
266
+ externalId: number;
267
+ };
268
+ }
269
+ interface IContextPermissionProfil extends IBaseContextPermission {
270
+ profilId: number;
271
+ profilType: 'profil';
272
+ }
273
+ interface IBaseContextPermission {
274
+ id: number;
275
+ title: string;
276
+ typePermission: TypePermission | null;
277
+ contextId: number;
278
+ }
279
+
160
280
  declare enum ContextListControlsEnum {
161
281
  always = "always",
162
282
  never = "never",
@@ -165,7 +285,7 @@ declare enum ContextListControlsEnum {
165
285
 
166
286
  declare class ContextListComponent implements OnInit, OnDestroy {
167
287
  configService: ConfigService<any>;
168
- auth: AuthService;
288
+ auth: AuthService<any>;
169
289
  private contextService;
170
290
  private shareMapService;
171
291
  private clipboard;
@@ -181,14 +301,16 @@ declare class ContextListComponent implements OnInit, OnDestroy {
181
301
  change$: ReplaySubject<void>;
182
302
  private change$$;
183
303
  private previousMessageId;
304
+ sortAlphaOnIcon: _igo2_common_icon.IconSvg;
305
+ sortAlphaOffIcon: _igo2_common_icon.IconSvg;
184
306
  isDesktop: boolean;
185
307
  get contexts(): ContextsList;
186
308
  set contexts(value: ContextsList);
187
309
  private _contexts;
188
310
  readonly selectedContext: i0.ModelSignal<DetailedContext>;
189
311
  readonly map: i0.InputSignal<IgoMap>;
190
- get defaultContextId(): string;
191
- set defaultContextId(value: string);
312
+ get defaultContextId(): string | number;
313
+ set defaultContextId(value: string | number);
192
314
  private _defaultContextId;
193
315
  collapsed: {
194
316
  contextScope: any;
@@ -240,6 +362,7 @@ declare class ContextListComponent implements OnInit, OnDestroy {
240
362
  ngOnInit(): void;
241
363
  ngOnDestroy(): void;
242
364
  setSelected(context: DetailedContext): void;
365
+ sortByKeyPriority: (a: KeyValue<string, DetailedContext[]>, b: KeyValue<string, DetailedContext[]>) => number;
243
366
  private next;
244
367
  private filterContextsList;
245
368
  showFilter(): boolean;
@@ -274,9 +397,9 @@ declare class ContextListComponent implements OnInit, OnDestroy {
274
397
  }
275
398
 
276
399
  declare class ContextItemComponent {
277
- auth: AuthService;
400
+ auth: AuthService<any>;
278
401
  private storageService;
279
- typePermission: typeof TypePermission;
402
+ typePermission: readonly ["read", "write"];
280
403
  color: string;
281
404
  collapsed: boolean;
282
405
  readonly showFavorite: i0.InputSignal<boolean>;
@@ -307,7 +430,6 @@ declare class ContextFormComponent {
307
430
  private clipboard;
308
431
  private formBuilder;
309
432
  private messageService;
310
- form: UntypedFormGroup;
311
433
  prefix: string;
312
434
  readonly btnSubmitText: i0.InputSignal<string>;
313
435
  readonly context: i0.InputSignal<Context>;
@@ -315,7 +437,7 @@ declare class ContextFormComponent {
315
437
  readonly submitForm: i0.OutputEmitterRef<unknown>;
316
438
  readonly clone: i0.OutputEmitterRef<unknown>;
317
439
  readonly delete: i0.OutputEmitterRef<unknown>;
318
- constructor();
440
+ readonly form: i0.Signal<FormGroup<any>>;
319
441
  handleFormSubmit(value: any): void;
320
442
  copyTextToClipboard(): void;
321
443
  private buildForm;
@@ -323,15 +445,11 @@ declare class ContextFormComponent {
323
445
  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
446
  }
325
447
 
326
- declare class ContextEditComponent implements OnInit, OnDestroy {
448
+ declare class ContextEditComponent {
327
449
  private contextService;
328
450
  private messageService;
329
- readonly context: i0.WritableSignal<Context>;
451
+ readonly context: i0.Signal<_igo2_context.DetailedContext>;
330
452
  readonly submitSuccessed: i0.OutputEmitterRef<Context>;
331
- private editedContext$$;
332
- ngOnInit(): void;
333
- ngOnDestroy(): void;
334
- private handleEditedContextChange;
335
453
  onEdit(context: Context): void;
336
454
  static ɵfac: i0.ɵɵFactoryDeclaration<ContextEditComponent, never>;
337
455
  static ɵcmp: i0.ɵɵComponentDeclaration<ContextEditComponent, "igo-context-edit", never, {}, { "submitSuccessed": "submitSuccessed"; }, never, never, true, never>;
@@ -340,86 +458,33 @@ declare class ContextEditComponent implements OnInit, OnDestroy {
340
458
  declare class ContextPermissionsComponent implements OnInit {
341
459
  private formBuilder;
342
460
  private http;
343
- authService: AuthService;
461
+ authService: AuthService<any>;
344
462
  private config;
463
+ private contextService;
464
+ private contextPermissionService;
465
+ private messageService;
466
+ private destroyRef;
345
467
  form: UntypedFormGroup;
346
468
  readonly context: i0.ModelSignal<Context>;
347
- readonly permissions: i0.ModelSignal<ContextPermissionsList>;
348
- get profils(): ContextProfils[];
349
- set profils(value: ContextProfils[]);
350
- private _profils;
351
- get canWrite(): boolean;
469
+ readonly permissions: i0.ModelSignal<IAnyContextPermission[]>;
470
+ readonly permissionsRead: i0.Signal<IAnyContextPermission[]>;
471
+ readonly permissionsWrite: i0.Signal<IAnyContextPermission[]>;
472
+ profils: i0.WritableSignal<ContextUserOrProfils[]>;
473
+ canWrite: i0.Signal<boolean>;
352
474
  private baseUrlProfils;
353
475
  formControl: UntypedFormControl;
354
476
  formValueChanges$$: Subscription;
355
- readonly addPermission: i0.OutputEmitterRef<ContextPermission>;
356
- readonly removePermission: i0.OutputEmitterRef<ContextPermission>;
357
- readonly scopeChanged: i0.OutputEmitterRef<Context>;
358
477
  ngOnInit(): void;
359
- displayFn(profil?: ContextProfils): string | undefined;
360
- handleFormSubmit(value: any): void;
478
+ displayFn(profil?: ContextUserOrProfils): string | undefined;
479
+ handleFormSubmit(value: IAnyContextPermission): void;
361
480
  private buildForm;
362
- onProfilSelected(value: any): void;
363
- static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsComponent, never>;
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;
481
+ onProfilSelected(value: ContextUserOrProfils): void;
482
+ onRemovePermission(permission: IAnyContextPermission): void;
376
483
  onScopeChanged(context: Context): void;
377
- constructor();
378
- ngOnInit(): void;
379
- ngOnDestroy(): void;
380
484
  private handleEditedContextChange;
381
- static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsBindingDirective, never>;
382
- static ɵdir: i0.ɵɵDirectiveDeclaration<ContextPermissionsBindingDirective, "[igoContextPermissionsBinding]", never, {}, {}, never, never, true, never>;
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>;
485
+ private getProfils;
486
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContextPermissionsComponent, never>;
487
+ 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
488
  }
424
489
 
425
490
  /**
@@ -428,7 +493,7 @@ declare class MapContextDirective implements OnInit, OnDestroy {
428
493
  declare class IgoContextManagerModule {
429
494
  static forRoot(): ModuleWithProviders<IgoContextManagerModule>;
430
495
  static ɵfac: i0.ɵɵFactoryDeclaration<IgoContextManagerModule, never>;
431
- static ɵmod: i0.ɵɵNgModuleDeclaration<IgoContextManagerModule, never, [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof ContextPermissionsBindingDirective, typeof LayerContextDirective, typeof MapContextDirective], [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof ContextPermissionsBindingDirective, typeof LayerContextDirective, typeof MapContextDirective]>;
496
+ 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
497
  static ɵinj: i0.ɵɵInjectorDeclaration<IgoContextManagerModule>;
433
498
  }
434
499
 
@@ -469,6 +534,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
469
534
  private messageService;
470
535
  private languageService;
471
536
  private confirmDialogService;
537
+ selected: Poi;
472
538
  get map(): IgoMap;
473
539
  set map(value: IgoMap);
474
540
  private _map;
@@ -490,7 +556,7 @@ declare class PoiButtonComponent implements OnInit, OnDestroy {
490
556
  declare class UserButtonComponent {
491
557
  private dialog;
492
558
  private config;
493
- auth: AuthService;
559
+ auth: AuthService<any>;
494
560
  get map(): IgoMap;
495
561
  set map(value: IgoMap);
496
562
  private _map;
@@ -657,73 +723,6 @@ interface ContextExportOptions {
657
723
  name: string;
658
724
  }
659
725
 
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
726
  declare function handleFileImportSuccess(file: File, context: DetailedContext, messageService: MessageService, contextService: ContextService): void;
728
727
  declare function handleFileImportError(file: File, error: Error, messageService: MessageService, sizeMb?: number): void;
729
728
  declare function handleInvalidFileImportError(file: File, error: Error, messageService: MessageService): void;
@@ -740,7 +739,7 @@ declare function handleFileExportError(error: Error, messageService: MessageServ
740
739
  declare function handleFileExportSuccess(messageService: MessageService): void;
741
740
  declare function handleNothingToExportError(messageService: MessageService): void;
742
741
 
743
- declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof ContextPermissionsBindingDirective, typeof MapContextDirective, typeof LayerContextDirective];
742
+ declare const CONTEXT_MANAGER_DIRECTIVES: readonly [typeof ContextListComponent, typeof ContextItemComponent, typeof ContextFormComponent, typeof ContextEditComponent, typeof ContextPermissionsComponent, typeof MapContextDirective, typeof LayerContextDirective];
744
743
 
745
744
  declare class PoiDialogComponent {
746
745
  dialogRef: MatDialogRef<PoiDialogComponent, any>;
@@ -855,66 +854,28 @@ interface ShareMapRouteKeysOptions extends RouteServiceOptions {
855
854
  }
856
855
  declare const SHARE_MAP_KEYS_DEFAULT_OPTIONS: ShareMapRouteKeysOptions;
857
856
 
858
- declare class ShareMapEncoder {
859
- private SHARE_MAP_DEFS;
860
- private document;
861
- private context;
862
- language: string;
863
- constructor(SHARE_MAP_DEFS: ShareMapKeysDefinitions, document: Document);
857
+ declare class ShareMapService {
858
+ routeService: RouteService;
859
+ document: Document;
860
+ get language(): string;
861
+ set language(value: string);
862
+ private _language;
863
+ options: ShareMapRouteKeysOptions;
864
+ optionsLegacy: RouteServiceOptions;
865
+ keysDefinitions: ShareMapKeysDefinitions;
866
+ private encoder;
867
+ private parser;
868
+ constructor();
864
869
  generateUrl(map: IgoMap, context: DetailedContext): string;
865
- /**
866
- * Replaces local group IDs with unique IDs to avoid conflicts and have short URL.
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;
870
+ parsePosition(params: Params): PositionParams | undefined;
871
+ parseLayers(params: Params): AnyLayerOptions[] | undefined;
907
872
  sanitizeBaseUrl(baseUrl: string): string;
908
- private extractKeys;
909
- private getPosition;
910
- private getProjection;
911
- private getZoom;
912
- private getRotation;
913
- private stringifyPosition;
914
- private stringifyDefinitions;
915
- private buildGroupsQueryUrl;
916
- private getLayerGroupParams;
917
- private stringifyGroupParams;
873
+ getContext(params: Params): string | undefined;
874
+ getZoom(params: Params): number | undefined;
875
+ getUrlWithApi(formValues: any): string;
876
+ hasPositionParams(params: Params): boolean;
877
+ static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>;
878
+ static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>;
918
879
  }
919
880
 
920
881
  declare class ShareMapLegacyParser {
@@ -932,41 +893,6 @@ declare class ShareMapLegacyParser {
932
893
  private computeLayerVisibilityFromUrl;
933
894
  }
934
895
 
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
896
  declare function buildDataSourceOptions(type: ServiceType, url: string, layers: string[], version: string): AnyDataSourceOptions;
971
897
  declare function getFlattenOptions(options: AnyLayerOptions[]): AnyLayerOptions[];
972
898
  /**
@@ -977,5 +903,5 @@ declare function hasLegacyParams(params: Params, optionsLegacy: RouteServiceOpti
977
903
  declare function hasModernShareParams(params: Params, keysDefinitions: ShareMapKeysDefinitions): boolean;
978
904
  declare function getParamValue(params: Params, key: string): string | undefined;
979
905
 
980
- export { BookmarkButtonComponent, BookmarkDialogComponent, CONTEXT_MANAGER_DIRECTIVES, CONTEXT_MAP_BUTTON_DIRECTIVES, ContextEditComponent, ContextExportService, ContextFormComponent, ContextImportExportComponent, ContextImportService, ContextItemComponent, ContextListComponent, ContextPermissionsBindingDirective, ContextPermissionsComponent, ContextService, ExportError, ExportInvalidFileError, ExportNothingToExportError, GroupParamsKeys, IgoContextImportExportModule, IgoContextManagerModule, IgoContextMapButtonModule, IgoContextModule, IgoShareMapModule, IgoSidenavModule, ImportError, ImportInvalidFileError, ImportNothingToImportError, ImportSRSError, ImportSizeError, ImportUnreadableFileError, LayerContextDirective, LayerParamsKeys, MapContextDirective, PoiButtonComponent, PoiDialogComponent, PoiService, SHARE_MAP_DIRECTIVES, SHARE_MAP_KEYS_DEFAULT_OPTIONS, Scope, ServiceType, ServiceTypeEnum, ShareMapComponent, ShareMapLegacyParser, ShareMapService, ShareMapUrlComponent, SidenavComponent, TypePermission, UserButtonComponent, UserDialogComponent, addContextToContextList, addImportedFeaturesStyledToMap, addImportedFeaturesToMap, buildDataSourceOptions, computeLayerTitleFromFile, getFileExtension, getFlattenOptions, getParamValue, handleFileExportError, handleFileExportSuccess, handleFileImportError, handleFileImportSuccess, handleInvalidFileImportError, handleNothingToExportError, handleNothingToImportError, handleSizeFileImportError, handleUnreadbleFileImportError, hasLegacyParams, hasModernShareParams };
981
- export type { BaseKeyParams, Context, ContextDetailedChanges, ContextExportOptions, ContextHomeExtent, ContextMap, ContextMapView, ContextPermission, ContextPermissionsList, ContextProfils, ContextServiceOptions, ContextUserPermission, ContextsList, DefinitionKeyParams, DefinitionParams, DetailedContext, EnvironmentOptions, ExtraFeatures, GroupParams, IProcessChanges, LayerParams, LayerProperties, Poi, PositionParams, ShareMapKeysDefinitions, ShareMapRouteKeysOptions, UrlParsedParam };
906
+ 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 };
907
+ 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 };
@@ -58,6 +58,7 @@
58
58
  "sharedContexts": "Shared contexts",
59
59
  "filterPlaceHolder": "Filter by name",
60
60
  "sortAlphabetically": "Sort alphabetically",
61
+ "sortDefault": "Sort by default",
61
62
  "sortContextOrder": "Replace according to the creation date",
62
63
  "userAccount": "User account",
63
64
  "filterUser": "Filter by user group",
@@ -58,6 +58,7 @@
58
58
  "sharedContexts": "Contextes partagés",
59
59
  "filterPlaceHolder": "Filtrer par nom",
60
60
  "sortAlphabetically": "Trier en ordre alphabétique",
61
+ "sortDefault": "Trier par défaut",
61
62
  "sortContextOrder": "Replacer selon la date de création",
62
63
  "userAccount": "Profils utilisateurs",
63
64
  "filterUser": "Filtrer par groupe d'utilisateur",