@igo2/context 19.0.0-next.9 → 19.0.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/fesm2022/igo2-context.mjs +1297 -471
- package/fesm2022/igo2-context.mjs.map +1 -1
- package/lib/context-manager/shared/context.interface.d.ts +1 -1
- package/lib/context-manager/shared/context.service.d.ts +4 -3
- package/lib/context-manager/shared/layer-context.directive.d.ts +8 -7
- package/lib/context-manager/shared/map-context.directive.d.ts +4 -1
- package/lib/share-map/share-map/share-map-api.component.d.ts +5 -1
- package/lib/share-map/share-map/share-map-url.component.d.ts +10 -10
- package/lib/share-map/shared/index.d.ts +3 -0
- package/lib/share-map/shared/share-map-definitions.d.ts +2 -0
- package/lib/share-map/shared/share-map-encoder.d.ts +62 -0
- package/lib/share-map/shared/share-map-legacy.service.d.ts +18 -0
- package/lib/share-map/shared/share-map-parser.d.ts +20 -0
- package/lib/share-map/shared/share-map.interface.d.ts +81 -0
- package/lib/share-map/shared/share-map.service.d.ts +17 -11
- package/lib/share-map/shared/share-map.utils.d.ts +13 -0
- package/package.json +11 -11
- package/src/{context-theme.scss → context.theme.scss} +1 -1
- package/src/lib/context-manager/context-item/context-item.theming.scss +1 -1
- package/src/lib/context-manager/context-list/context-list.theming.scss +1 -1
|
@@ -26,9 +26,9 @@ export type ExtraFeatures = FeatureCollection & {
|
|
|
26
26
|
visible: boolean;
|
|
27
27
|
};
|
|
28
28
|
export interface DetailedContext extends Context {
|
|
29
|
+
layers?: AnyLayerOptions[];
|
|
29
30
|
base?: string;
|
|
30
31
|
map?: ContextMap;
|
|
31
|
-
layers?: AnyLayerOptions[];
|
|
32
32
|
tools?: Tool[];
|
|
33
33
|
toolbar?: string[];
|
|
34
34
|
message?: Message;
|
|
@@ -9,6 +9,7 @@ import { StorageService } from '@igo2/core/storage';
|
|
|
9
9
|
import type { AnyLayer, IgoMap } from '@igo2/geo';
|
|
10
10
|
import { ExportService } from '@igo2/geo';
|
|
11
11
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
12
|
+
import { ShareMapService } from '../../share-map/shared/share-map.service';
|
|
12
13
|
import { TypePermission } from './context.enum';
|
|
13
14
|
import { Context, ContextPermission, ContextProfils, ContextsList, DetailedContext } from './context.interface';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
@@ -20,6 +21,7 @@ export declare class ContextService {
|
|
|
20
21
|
private messageService;
|
|
21
22
|
private storageService;
|
|
22
23
|
private exportService;
|
|
24
|
+
private shareMapService;
|
|
23
25
|
private route;
|
|
24
26
|
context$: BehaviorSubject<DetailedContext>;
|
|
25
27
|
contexts$: BehaviorSubject<ContextsList>;
|
|
@@ -35,7 +37,7 @@ export declare class ContextService {
|
|
|
35
37
|
get defaultContextUri(): string;
|
|
36
38
|
set defaultContextUri(uri: string);
|
|
37
39
|
private _defaultContextUri;
|
|
38
|
-
constructor(http: HttpClient, authService: AuthService, languageService: LanguageService, config: ConfigService, messageService: MessageService, storageService: StorageService, exportService: ExportService, route: RouteService);
|
|
40
|
+
constructor(http: HttpClient, authService: AuthService, languageService: LanguageService, config: ConfigService, messageService: MessageService, storageService: StorageService, exportService: ExportService, shareMapService: ShareMapService, route: RouteService);
|
|
39
41
|
get(permissions?: string[], hidden?: boolean): Observable<ContextsList>;
|
|
40
42
|
getById(id: string): Observable<Context>;
|
|
41
43
|
getDetails(id: string): Observable<DetailedContext>;
|
|
@@ -69,12 +71,11 @@ export declare class ContextService {
|
|
|
69
71
|
private handleContextMessage;
|
|
70
72
|
private getContextByUri;
|
|
71
73
|
getContextLayers(map: IgoMap): readonly AnyLayer[];
|
|
72
|
-
private readParamsFromRoute;
|
|
73
74
|
private getPath;
|
|
74
75
|
private handleError;
|
|
75
76
|
private handleContextsChange;
|
|
76
77
|
private addContextToList;
|
|
77
78
|
private findContext;
|
|
78
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, [null, null, null, null, null, null, null, { optional: true; }]>;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, [null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
79
80
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
80
81
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ConfigService } from '@igo2/core/config';
|
|
3
|
-
import { RouteService } from '@igo2/core/route';
|
|
4
3
|
import { LayerService, MapBrowserComponent, StyleListService, StyleService } from '@igo2/geo';
|
|
5
4
|
import type { IgoMap } from '@igo2/geo';
|
|
5
|
+
import { ShareMapService } from '../../share-map/shared/share-map.service';
|
|
6
6
|
import { ContextService } from './context.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class LayerContextDirective implements OnInit, OnDestroy {
|
|
@@ -12,19 +12,20 @@ export declare class LayerContextDirective implements OnInit, OnDestroy {
|
|
|
12
12
|
private configService;
|
|
13
13
|
private styleListService;
|
|
14
14
|
private styleService;
|
|
15
|
-
private
|
|
15
|
+
private shareMapService;
|
|
16
16
|
private context$$;
|
|
17
17
|
private queryParams;
|
|
18
18
|
private contextLayers;
|
|
19
19
|
removeLayersOnContextChange: boolean;
|
|
20
|
+
contextLayersLoaded: EventEmitter<boolean>;
|
|
20
21
|
get map(): IgoMap;
|
|
21
|
-
constructor(component: MapBrowserComponent, contextService: ContextService, layerService: LayerService, configService: ConfigService, styleListService: StyleListService, styleService: StyleService,
|
|
22
|
+
constructor(component: MapBrowserComponent, contextService: ContextService, layerService: LayerService, configService: ConfigService, styleListService: StyleListService, styleService: StyleService, shareMapService: ShareMapService);
|
|
22
23
|
ngOnInit(): void;
|
|
23
24
|
ngOnDestroy(): void;
|
|
24
25
|
private handleContextChange;
|
|
25
|
-
private getFlattenOptions;
|
|
26
26
|
private handleAddLayers;
|
|
27
27
|
private computeLayerVisibilityFromUrl;
|
|
28
|
-
|
|
29
|
-
static
|
|
28
|
+
private handleContextWithSharedUrl;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayerContextDirective, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LayerContextDirective, "[igoLayerContext]", never, { "removeLayersOnContextChange": { "alias": "removeLayersOnContextChange"; "required": false; }; }, { "contextLayersLoaded": "contextLayersLoaded"; }, never, never, true, never>;
|
|
30
31
|
}
|
|
@@ -2,15 +2,18 @@ import { OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { MediaService } from '@igo2/core/media';
|
|
3
3
|
import { MapBrowserComponent } from '@igo2/geo';
|
|
4
4
|
import type { IgoMap } from '@igo2/geo';
|
|
5
|
+
import { ShareMapService } from '../../share-map/shared/share-map.service';
|
|
5
6
|
import { ContextService } from './context.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class MapContextDirective implements OnInit, OnDestroy {
|
|
8
9
|
private contextService;
|
|
9
10
|
private mediaService;
|
|
11
|
+
private shareMapService;
|
|
10
12
|
private component;
|
|
11
13
|
private context$$;
|
|
12
14
|
get map(): IgoMap;
|
|
13
|
-
|
|
15
|
+
private queryParams;
|
|
16
|
+
constructor(component: MapBrowserComponent, contextService: ContextService, mediaService: MediaService, shareMapService: ShareMapService);
|
|
14
17
|
ngOnInit(): void;
|
|
15
18
|
ngOnDestroy(): void;
|
|
16
19
|
private handleContextChange;
|
|
@@ -5,6 +5,7 @@ import { AuthService } from '@igo2/auth';
|
|
|
5
5
|
import { LanguageService } from '@igo2/core/language';
|
|
6
6
|
import { MessageService } from '@igo2/core/message';
|
|
7
7
|
import type { IgoMap } from '@igo2/geo';
|
|
8
|
+
import { ContextService } from '../../context-manager';
|
|
8
9
|
import { ShareMapService } from '../shared/share-map.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class ShareMapApiComponent implements OnInit {
|
|
@@ -14,17 +15,20 @@ export declare class ShareMapApiComponent implements OnInit {
|
|
|
14
15
|
private auth;
|
|
15
16
|
private shareMapService;
|
|
16
17
|
private formBuilder;
|
|
18
|
+
private contextService;
|
|
17
19
|
form: UntypedFormGroup;
|
|
18
20
|
map: IgoMap;
|
|
19
21
|
url: string;
|
|
20
22
|
userId: string;
|
|
21
23
|
idContextShared: string;
|
|
22
|
-
constructor(clipboard: Clipboard, languageService: LanguageService, messageService: MessageService, auth: AuthService, shareMapService: ShareMapService, formBuilder: UntypedFormBuilder);
|
|
24
|
+
constructor(clipboard: Clipboard, languageService: LanguageService, messageService: MessageService, auth: AuthService, shareMapService: ShareMapService, formBuilder: UntypedFormBuilder, contextService: ContextService);
|
|
23
25
|
ngOnInit(): void;
|
|
24
26
|
createUrl(values?: any): void;
|
|
25
27
|
updateContextShared(values?: any): void;
|
|
26
28
|
copyTextToClipboard(textArea: HTMLTextAreaElement): void;
|
|
27
29
|
buildForm(): void;
|
|
30
|
+
private createContextShared;
|
|
31
|
+
private _updateContextShared;
|
|
28
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapApiComponent, never>;
|
|
29
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<ShareMapApiComponent, "igo-share-map-api", never, { "map": { "alias": "map"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
34
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
3
3
|
import { MessageService } from '@igo2/core/message';
|
|
4
|
+
import { RouteService } from '@igo2/core/route';
|
|
4
5
|
import type { IgoMap } from '@igo2/geo';
|
|
6
|
+
import { ContextService } from '../../context-manager/shared/context.service';
|
|
5
7
|
import { ShareMapService } from '../shared/share-map.service';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ShareMapUrlComponent implements
|
|
9
|
+
export declare class ShareMapUrlComponent implements OnInit, OnDestroy {
|
|
8
10
|
private clipboard;
|
|
9
11
|
private messageService;
|
|
10
12
|
private shareMapService;
|
|
13
|
+
private contextService;
|
|
11
14
|
private cdRef;
|
|
15
|
+
private route;
|
|
12
16
|
private mapState$$;
|
|
13
17
|
map: IgoMap;
|
|
14
18
|
url: string;
|
|
15
|
-
publicShareOption
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
constructor(clipboard: Clipboard, messageService: MessageService, shareMapService: ShareMapService, cdRef: ChangeDetectorRef);
|
|
19
|
+
private publicShareOption;
|
|
20
|
+
private language;
|
|
21
|
+
constructor(clipboard: Clipboard, messageService: MessageService, shareMapService: ShareMapService, contextService: ContextService, cdRef: ChangeDetectorRef, route: RouteService);
|
|
21
22
|
ngOnInit(): void;
|
|
22
|
-
ngAfterViewInit(): void;
|
|
23
23
|
ngOnDestroy(): void;
|
|
24
|
-
|
|
24
|
+
generateUrl(): void;
|
|
25
25
|
copyTextToClipboard(textArea: HTMLTextAreaElement): void;
|
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapUrlComponent, never>;
|
|
27
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<ShareMapUrlComponent, "igo-share-map-url", never, { "map": { "alias": "map"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IgoMap } from '@igo2/geo';
|
|
2
|
+
import type { DetailedContext } from '../../context-manager';
|
|
3
|
+
import { ShareMapKeysDefinitions, ShareOption } from './share-map.interface';
|
|
4
|
+
export declare class ShareMapEncoder {
|
|
5
|
+
private SHARE_MAP_DEFS;
|
|
6
|
+
private document;
|
|
7
|
+
private context;
|
|
8
|
+
constructor(SHARE_MAP_DEFS: ShareMapKeysDefinitions, document: Document);
|
|
9
|
+
generateUrl(map: IgoMap, context: DetailedContext, publicShareOption: ShareOption, language: string | undefined): string;
|
|
10
|
+
/**
|
|
11
|
+
* Replaces local group IDs with unique IDs to avoid conflicts and have short URL.
|
|
12
|
+
* This is necessary for sharing the map context.
|
|
13
|
+
*/
|
|
14
|
+
private replaceGroupLocalIds;
|
|
15
|
+
private getUniqueId;
|
|
16
|
+
private getCurrentContext;
|
|
17
|
+
/**
|
|
18
|
+
* Filters layers to include only LayerGroups or LayerItems with a valid ServiceType.
|
|
19
|
+
*/
|
|
20
|
+
private isLayerSharable;
|
|
21
|
+
/**
|
|
22
|
+
* Extracts only LayerGroup items from the filtered layers.
|
|
23
|
+
*/
|
|
24
|
+
private getLayerGroups;
|
|
25
|
+
/**
|
|
26
|
+
* Extracts only LayerItem items from the filtered layers.
|
|
27
|
+
*/
|
|
28
|
+
private getLayerItems;
|
|
29
|
+
private buildQueryUrl;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves the current context layers and maps them by identifier.
|
|
32
|
+
*/
|
|
33
|
+
private getContextLayersMap;
|
|
34
|
+
/**
|
|
35
|
+
* Filters layers and context layers based on visibility, opacity, and expanded state.
|
|
36
|
+
*/
|
|
37
|
+
private getFilteredMapLayers;
|
|
38
|
+
private getIdsNestedParent;
|
|
39
|
+
private generateLayersOptionsByService;
|
|
40
|
+
private generateLayerOption;
|
|
41
|
+
private getLayerNames;
|
|
42
|
+
private getWmsVersion;
|
|
43
|
+
private concatUrlWithVersion;
|
|
44
|
+
private getLayerParams;
|
|
45
|
+
private getOpacity;
|
|
46
|
+
private getVisibility;
|
|
47
|
+
private getQueryString;
|
|
48
|
+
private buildLayersQueryUrl;
|
|
49
|
+
private stringifyLayerParams;
|
|
50
|
+
private getBaseUrlConfig;
|
|
51
|
+
private sanitizeBaseUrl;
|
|
52
|
+
private extractKeys;
|
|
53
|
+
private getPosition;
|
|
54
|
+
private getProjection;
|
|
55
|
+
private getZoom;
|
|
56
|
+
private getRotation;
|
|
57
|
+
private stringifyPosition;
|
|
58
|
+
private stringifyDefinitions;
|
|
59
|
+
private buildGroupsQueryUrl;
|
|
60
|
+
private getLayerGroupParams;
|
|
61
|
+
private stringifyGroupParams;
|
|
62
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Params } from '@angular/router';
|
|
2
|
+
import { RouteServiceOptions } from '@igo2/core/route';
|
|
3
|
+
import { LayerOptions } from '@igo2/geo';
|
|
4
|
+
import { PositionParams } from './share-map.interface';
|
|
5
|
+
export declare class ShareMapLegacyParser {
|
|
6
|
+
private options;
|
|
7
|
+
constructor(options: RouteServiceOptions);
|
|
8
|
+
parseUrl(params: Params): LayerOptions[] | undefined;
|
|
9
|
+
parsePosition(params: Params): PositionParams;
|
|
10
|
+
private readLayersQueryParamsByType;
|
|
11
|
+
private getQueryKeyByType;
|
|
12
|
+
private sanitizeUrl;
|
|
13
|
+
private getQueryParam;
|
|
14
|
+
private extractLayersByService;
|
|
15
|
+
private removeParenthesis;
|
|
16
|
+
private extractLayersOptions;
|
|
17
|
+
private computeLayerVisibilityFromUrl;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Params } from '@angular/router';
|
|
2
|
+
import { RouteServiceOptions } from '@igo2/core/route';
|
|
3
|
+
import { type AnyLayerOptions } from '@igo2/geo';
|
|
4
|
+
import { ShareMapLegacyParser } from './share-map-legacy.service';
|
|
5
|
+
import { PositionParams, ShareMapKeysDefinitions } from './share-map.interface';
|
|
6
|
+
export declare class ShareMapParser {
|
|
7
|
+
private keysDefinitions;
|
|
8
|
+
private legacyOptions;
|
|
9
|
+
legacy: ShareMapLegacyParser;
|
|
10
|
+
constructor(keysDefinitions: ShareMapKeysDefinitions, legacyOptions: RouteServiceOptions);
|
|
11
|
+
parseLayers(params: Params): AnyLayerOptions[] | undefined;
|
|
12
|
+
private splitParam;
|
|
13
|
+
parsePosition(params: Params): PositionParams | undefined;
|
|
14
|
+
private parseLayer;
|
|
15
|
+
private parseGroup;
|
|
16
|
+
private extractVersionFromUrl;
|
|
17
|
+
private extractUrlIndex;
|
|
18
|
+
private extractLayerNames;
|
|
19
|
+
private extractLayerProperties;
|
|
20
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { RouteServiceOptions } from '@igo2/core/route';
|
|
2
|
+
import { LayerGroupOptions, LayerOptions } from '@igo2/geo';
|
|
3
|
+
export declare const ServiceType: readonly ["wms", "wmts", "arcgisrest", "imagearcgisrest", "tilearcgisrest"];
|
|
4
|
+
export type ServiceType = (typeof ServiceType)[number];
|
|
5
|
+
export declare enum ServiceTypeEnum {
|
|
6
|
+
wms = 0,
|
|
7
|
+
wmts = 1,
|
|
8
|
+
arcgisrest = 2,
|
|
9
|
+
imagearcgisrest = 3,
|
|
10
|
+
tilearcgisrest = 4
|
|
11
|
+
}
|
|
12
|
+
export interface ShareOption {
|
|
13
|
+
layerlistControls: {
|
|
14
|
+
querystring: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const LayerParamsKeys: readonly ["index", "names", "type", "version", "queryString", "visible", "opacity", "zIndex", "parentId"];
|
|
18
|
+
export type LayerParamsKeys = (typeof LayerParamsKeys)[number];
|
|
19
|
+
export declare const GroupParamsKeys: readonly ["title", "id", "expanded", "visible", "opacity", "zIndex", "parentId"];
|
|
20
|
+
export type GroupParamsKeys = (typeof GroupParamsKeys)[number];
|
|
21
|
+
declare const PositionParamsKeys: readonly ["center", "zoom", "rotation", "projection"];
|
|
22
|
+
type PositionParamsKeys = (typeof PositionParamsKeys)[number];
|
|
23
|
+
export interface ShareMapKeysDefinitions {
|
|
24
|
+
urlsKey: string;
|
|
25
|
+
contextKey: string;
|
|
26
|
+
languageKey: string;
|
|
27
|
+
pos: DefinitionKeyParams<PositionParamsKeys>;
|
|
28
|
+
layers: DefinitionKeyParams<LayerParamsKeys>;
|
|
29
|
+
groups: DefinitionKeyParams<GroupParamsKeys>;
|
|
30
|
+
}
|
|
31
|
+
export interface DefinitionKeyParams<T extends string> extends BaseKeyParams {
|
|
32
|
+
params: DefinitionParams<T>;
|
|
33
|
+
}
|
|
34
|
+
export type DefinitionParams<T extends string = string> = Record<T, BaseKeyParams | undefined>;
|
|
35
|
+
export interface BaseKeyParams {
|
|
36
|
+
key: string;
|
|
37
|
+
parse?: (value: string) => unknown;
|
|
38
|
+
stringify?: (value: unknown) => string;
|
|
39
|
+
}
|
|
40
|
+
export interface PositionParams {
|
|
41
|
+
center?: [number, number];
|
|
42
|
+
zoom?: number;
|
|
43
|
+
rotation?: number;
|
|
44
|
+
projection?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LayerProperties {
|
|
47
|
+
zIndex: number;
|
|
48
|
+
visibility: boolean;
|
|
49
|
+
type: ServiceType;
|
|
50
|
+
opacity: number;
|
|
51
|
+
parentId: string;
|
|
52
|
+
}
|
|
53
|
+
export interface UrlParsedParam {
|
|
54
|
+
position: PositionParams;
|
|
55
|
+
layersOptions: LayerOptions[];
|
|
56
|
+
context: string;
|
|
57
|
+
}
|
|
58
|
+
export type LayerParams = BaseLayerParams & {
|
|
59
|
+
index: number;
|
|
60
|
+
names: string;
|
|
61
|
+
type: string;
|
|
62
|
+
queryString?: string;
|
|
63
|
+
};
|
|
64
|
+
export type GroupParams = BaseLayerParams & Pick<LayerGroupOptions, 'title' | 'id'> & {
|
|
65
|
+
expanded?: boolean;
|
|
66
|
+
};
|
|
67
|
+
type BaseLayerParams = Pick<LayerOptions, 'visible' | 'opacity' | 'zIndex' | 'parentId'>;
|
|
68
|
+
export interface ShareMapRouteKeysOptions extends RouteServiceOptions {
|
|
69
|
+
context: string;
|
|
70
|
+
urls: string;
|
|
71
|
+
position: string;
|
|
72
|
+
layers: string;
|
|
73
|
+
groups: string;
|
|
74
|
+
center: string;
|
|
75
|
+
zoom: string;
|
|
76
|
+
projection: string;
|
|
77
|
+
rotation: string;
|
|
78
|
+
opacity: string;
|
|
79
|
+
}
|
|
80
|
+
export declare const SHARE_MAP_KEYS_DEFAULT_OPTIONS: ShareMapRouteKeysOptions;
|
|
81
|
+
export {};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { Params } from '@angular/router';
|
|
2
|
+
import { RouteService, RouteServiceOptions } from '@igo2/core/route';
|
|
3
|
+
import { ShareMapEncoder } from './share-map-encoder';
|
|
4
|
+
import { ShareMapParser } from './share-map-parser';
|
|
5
|
+
import { ShareMapKeysDefinitions, ShareMapRouteKeysOptions } from './share-map.interface';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class ShareMapService {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
routeService: RouteService;
|
|
9
|
+
document: Document;
|
|
8
10
|
private language;
|
|
9
|
-
|
|
11
|
+
options: ShareMapRouteKeysOptions;
|
|
12
|
+
optionsLegacy: RouteServiceOptions;
|
|
13
|
+
keysDefinitions: ShareMapKeysDefinitions;
|
|
14
|
+
encoder: ShareMapEncoder;
|
|
15
|
+
parser: ShareMapParser;
|
|
16
|
+
constructor(routeService: RouteService, document: Document);
|
|
17
|
+
getContext(params: Params): string | undefined;
|
|
18
|
+
getZoom(params: Params): number | undefined;
|
|
10
19
|
getUrlWithApi(formValues: any): string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getUrlWithoutApi(map: IgoMap, publicShareOption: any): string;
|
|
14
|
-
private makeLayersByService;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, [null, { optional: true; }]>;
|
|
20
|
+
hasPositionParams(params: Params): boolean;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShareMapService, never>;
|
|
16
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<ShareMapService>;
|
|
17
23
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Params } from '@angular/router';
|
|
2
|
+
import { RouteServiceOptions } from '@igo2/core/route';
|
|
3
|
+
import { AnyDataSourceOptions, AnyLayerOptions } from '@igo2/geo';
|
|
4
|
+
import { ServiceType, ShareMapKeysDefinitions } from './share-map.interface';
|
|
5
|
+
export declare function buildDataSourceOptions(type: ServiceType, url: string, layers: string[], version: string): AnyDataSourceOptions;
|
|
6
|
+
export declare function getFlattenOptions(options: AnyLayerOptions[]): AnyLayerOptions[];
|
|
7
|
+
/**
|
|
8
|
+
* Checks if the provided query parameters contain legacy parameter pairs
|
|
9
|
+
* (e.g., layers and URLs) that indicate older configuration formats.
|
|
10
|
+
*/
|
|
11
|
+
export declare function hasLegacyParams(params: Params, optionsLegacy: RouteServiceOptions): boolean;
|
|
12
|
+
export declare function hasModernShareParams(params: Params, keysDefinitions: ShareMapKeysDefinitions): boolean;
|
|
13
|
+
export declare function getParamValue(params: Params, key: string): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igo2/context",
|
|
3
|
-
"version": "19.0.0
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "IGO Library",
|
|
5
5
|
"author": "IGO Community",
|
|
6
6
|
"keywords": [
|
|
@@ -21,12 +21,15 @@
|
|
|
21
21
|
"default": "./fesm2022/igo2-context.mjs"
|
|
22
22
|
},
|
|
23
23
|
"./theme": {
|
|
24
|
-
"sass": "./src/context
|
|
24
|
+
"sass": "./src/context.theme.scss"
|
|
25
25
|
},
|
|
26
26
|
"./package.json": {
|
|
27
27
|
"default": "./package.json"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"tslib": "^2.6.0"
|
|
32
|
+
},
|
|
30
33
|
"peerDependencies": {
|
|
31
34
|
"@angular/animations": "^19.0.0",
|
|
32
35
|
"@angular/common": "^19.0.0",
|
|
@@ -34,17 +37,14 @@
|
|
|
34
37
|
"@angular/forms": "^19.0.0",
|
|
35
38
|
"@angular/material": "^19.0.0",
|
|
36
39
|
"@angular/platform-browser": "^19.0.0",
|
|
37
|
-
"@igo2/auth": "^19.0.0
|
|
38
|
-
"@igo2/common": "^19.0.0
|
|
39
|
-
"@igo2/core": "^19.0.0
|
|
40
|
-
"@igo2/geo": "^19.0.0
|
|
41
|
-
"@igo2/utils": "^19.0.0
|
|
42
|
-
"ol": "
|
|
40
|
+
"@igo2/auth": "^19.0.0",
|
|
41
|
+
"@igo2/common": "^19.0.0",
|
|
42
|
+
"@igo2/core": "^19.0.0",
|
|
43
|
+
"@igo2/geo": "^19.0.0",
|
|
44
|
+
"@igo2/utils": "^19.0.0",
|
|
45
|
+
"ol": "10.6.0",
|
|
43
46
|
"rxjs": "^7.8.0"
|
|
44
47
|
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"tslib": "^2.6.0"
|
|
47
|
-
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
50
50
|
},
|