@provoly/dashboard 0.14.6 → 0.14.7
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/components/metadata-editor/metadata-editor.component.d.ts +3 -1
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +1 -1
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +30 -9
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/dashboard/public-api.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +6 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +20 -13
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +11 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +4 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +11 -1
- package/esm2022/lib/dashboard/store/wms.service.mjs +54 -0
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +19 -3
- package/esm2022/presentation/presentation.module.mjs +8 -4
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +2 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +34 -32
- package/esm2022/widgets/widget-map/pipe/widget-map-legend-url.pipe.mjs +3 -4
- package/esm2022/widgets/widget-map/public-api.mjs +1 -2
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +20 -1
- package/fesm2022/provoly-dashboard-admin.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +29 -8
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +26 -7
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +37 -76
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +93 -49
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/core/model/widget-map-manifest.interface.d.ts +1 -0
- package/lib/dashboard/public-api.d.ts +1 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +31 -0
- package/lib/dashboard/store/dashboard.effects.d.ts +9 -3
- package/lib/dashboard/store/dashboard.reducers.d.ts +4 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +5 -0
- package/lib/dashboard/store/manifest.service.d.ts +2 -0
- package/{widgets/widget-map/component → lib/dashboard/store}/wms.service.d.ts +4 -4
- package/package.json +7 -7
- package/presentation/components/add-edit-presentation/add-edit-presentation.component.d.ts +3 -0
- package/presentation/presentation.module.d.ts +2 -1
- package/presentation/style/_o-pry-new-presentation.scss +18 -5
- package/schematics/ng-update/version-0-14/index.spec.js +0 -1
- package/schematics/ng-update/version-0-14/index.spec.js.map +1 -1
- package/widgets/widget-map/component/widget-map.component.d.ts +11 -8
- package/widgets/widget-map/pipe/widget-map-legend-url.pipe.d.ts +4 -3
- package/widgets/widget-map/public-api.d.ts +0 -1
- package/widgets/widget-map/utils/xml-utils.class.d.ts +1 -0
- package/esm2022/lib/dashboard/store/geocoding.service.mjs +0 -44
- package/esm2022/widgets/widget-map/component/wms.service.mjs +0 -67
- package/lib/dashboard/store/geocoding.service.d.ts +0 -56
|
@@ -63,6 +63,7 @@ export interface MapWMSLayerLayerOptions extends BaseWidgetMapLayerOptions {
|
|
|
63
63
|
paramLayer: string;
|
|
64
64
|
paramTiled: boolean;
|
|
65
65
|
oClass: string;
|
|
66
|
+
getFeatureInfoAdditionalParameters?: any;
|
|
66
67
|
}
|
|
67
68
|
export interface MapWMTSLayerLayerOptions extends BaseWidgetMapLayerOptions {
|
|
68
69
|
type: 'wmts';
|
|
@@ -12,7 +12,7 @@ export * from './store/title.service';
|
|
|
12
12
|
export * from './store/dashboard.actions';
|
|
13
13
|
export * from './store/dashboard.selectors';
|
|
14
14
|
export * from './store/dashboard.reducers';
|
|
15
|
-
export * from './store/
|
|
15
|
+
export * from './store/wms.service';
|
|
16
16
|
export * from './store/manifest.service';
|
|
17
17
|
export * from './store/manifest-utils.class';
|
|
18
18
|
export * from './guard/default-view.guard';
|
|
@@ -7,6 +7,7 @@ import { DashboardGridLayout, DashboardManifest, GlobalManifest, ManifestDescrip
|
|
|
7
7
|
import { Relation } from '../../core/model/relation.interface';
|
|
8
8
|
import { OrderValue } from '../../core/model/result-order.interface';
|
|
9
9
|
import { ResultSet, ResultSets } from '../../core/model/result-set.interface';
|
|
10
|
+
import { GetCapabilitiesResponse } from './wms.service';
|
|
10
11
|
export type DashboardCellParams = {
|
|
11
12
|
gridWidth: number;
|
|
12
13
|
gridHeight: number;
|
|
@@ -452,4 +453,34 @@ export declare const DashboardActions: {
|
|
|
452
453
|
mode: DisplayMode;
|
|
453
454
|
customDisplay?: DisplayOptions | undefined;
|
|
454
455
|
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard/Display] Update displayed dashboard management features">>;
|
|
456
|
+
getCapability: import("@ngrx/store").ActionCreator<"[Widget map] Get Wms capability", (props: {
|
|
457
|
+
url: string;
|
|
458
|
+
force?: boolean | undefined;
|
|
459
|
+
}) => {
|
|
460
|
+
url: string;
|
|
461
|
+
force?: boolean | undefined;
|
|
462
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Widget map] Get Wms capability">>;
|
|
463
|
+
updateCapability: import("@ngrx/store").ActionCreator<"[Widget map] Store Wms capability", (props: {
|
|
464
|
+
url: string;
|
|
465
|
+
capability: GetCapabilitiesResponse | null;
|
|
466
|
+
}) => {
|
|
467
|
+
url: string;
|
|
468
|
+
capability: GetCapabilitiesResponse | null;
|
|
469
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Widget map] Store Wms capability">>;
|
|
470
|
+
addManifestMetadata: import("@ngrx/store").ActionCreator<"[Dashboard] Add manifest metadata", (props: {
|
|
471
|
+
presentationId: string;
|
|
472
|
+
metadataId: string;
|
|
473
|
+
value: string;
|
|
474
|
+
}) => {
|
|
475
|
+
presentationId: string;
|
|
476
|
+
metadataId: string;
|
|
477
|
+
value: string;
|
|
478
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] Add manifest metadata">>;
|
|
479
|
+
deleteManifestMetadata: import("@ngrx/store").ActionCreator<"[Dashboard] Add manifest metadata", (props: {
|
|
480
|
+
presentationId: string;
|
|
481
|
+
metadataId: string;
|
|
482
|
+
}) => {
|
|
483
|
+
presentationId: string;
|
|
484
|
+
metadataId: string;
|
|
485
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Dashboard] Add manifest metadata">>;
|
|
455
486
|
};
|
|
@@ -10,10 +10,10 @@ import { SearchService } from '../../core/store/search/search.service';
|
|
|
10
10
|
import { ToolboxManifestService } from '../../core/toolbox/toolbox-manifest.service';
|
|
11
11
|
import { BusService } from '../action-bus/service/bus.service';
|
|
12
12
|
import { DashboardInitService } from './dashboard-init.service';
|
|
13
|
-
import { GeocodingService } from './geocoding.service';
|
|
14
13
|
import { ManifestService } from './manifest.service';
|
|
15
14
|
import { RefreshService } from './refresh.service';
|
|
16
15
|
import { PryTitleService } from './title.service';
|
|
16
|
+
import { WmsService } from './wms.service';
|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
18
|
export declare class DashboardEffects {
|
|
19
19
|
private dashboardInitService;
|
|
@@ -25,12 +25,12 @@ export declare class DashboardEffects {
|
|
|
25
25
|
private translateService;
|
|
26
26
|
private snackBar;
|
|
27
27
|
private router;
|
|
28
|
-
private geocodingService;
|
|
29
28
|
private refreshService;
|
|
30
29
|
private toolboxManifestService;
|
|
31
30
|
private busService;
|
|
32
31
|
private searchService;
|
|
33
32
|
private pryDialog;
|
|
33
|
+
private wmsService;
|
|
34
34
|
join$: import("rxjs").Observable<{
|
|
35
35
|
tenants?: string[] | undefined;
|
|
36
36
|
manifest: GlobalManifest;
|
|
@@ -217,10 +217,16 @@ export declare class DashboardEffects {
|
|
|
217
217
|
updateViewAfterFilterValueUpdate$: import("rxjs").Observable<{
|
|
218
218
|
id: string;
|
|
219
219
|
} & import("@ngrx/store/src/models").TypedAction<"[Search] (bus) search named">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
220
|
+
getCapability$: import("rxjs").Observable<{
|
|
221
|
+
url: string;
|
|
222
|
+
capability: import("./wms.service").GetCapabilitiesResponse | null;
|
|
223
|
+
} & import("@ngrx/store/src/models").TypedAction<"[Widget map] Store Wms capability">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
220
224
|
getWmsFeatures: import("rxjs").Observable<{
|
|
221
225
|
features: any;
|
|
222
226
|
} & import("@ngrx/store/src/models").TypedAction<"[Widget map] Set Wms layer features">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
223
|
-
|
|
227
|
+
addManifestMetadata: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) fetching available manifests">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
228
|
+
deleteManifestMetadata: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) fetching available manifests">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
229
|
+
constructor(dashboardInitService: DashboardInitService, actions$: Actions, store: Store<any>, manifestService: ManifestService, itemService: ItemService, titleService: PryTitleService, translateService: PryI18nService, snackBar: PrySnackbarService, router: Router, refreshService: RefreshService, toolboxManifestService: ToolboxManifestService, busService: BusService, searchService: SearchService, pryDialog: PryDialogService, wmsService: WmsService);
|
|
224
230
|
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardEffects, never>;
|
|
225
231
|
static ɵprov: i0.ɵɵInjectableDeclaration<DashboardEffects>;
|
|
226
232
|
}
|
|
@@ -5,6 +5,7 @@ import { GlobalManifest, ManifestDescription } from '../../core/model/manifest.i
|
|
|
5
5
|
import { ResultOrder } from '../../core/model/result-order.interface';
|
|
6
6
|
import { ResultSets } from '../../core/model/result-set.interface';
|
|
7
7
|
import { DashboardCellParams, ViewMode } from './dashboard.actions';
|
|
8
|
+
import { GetCapabilitiesResponse } from './wms.service';
|
|
8
9
|
export declare const dashboardFeatureKey = "@pry/dashboard";
|
|
9
10
|
export interface DashboardState {
|
|
10
11
|
manifests: {
|
|
@@ -42,6 +43,9 @@ export interface DashboardState {
|
|
|
42
43
|
};
|
|
43
44
|
wmsFeatures: any[];
|
|
44
45
|
display?: DisplayOptions;
|
|
46
|
+
capabilities: {
|
|
47
|
+
[url: string]: GetCapabilitiesResponse | null;
|
|
48
|
+
};
|
|
45
49
|
}
|
|
46
50
|
export declare const dashboardInitialState: DashboardState;
|
|
47
51
|
export declare function dashboardReducer(state: DashboardState, action: Action): DashboardState;
|
|
@@ -339,4 +339,9 @@ export declare const DashboardSelectors: {
|
|
|
339
339
|
}>;
|
|
340
340
|
wmsFeatures: MemoizedSelector<object, any[], (s1: DashboardState) => any[]>;
|
|
341
341
|
displayOptions: MemoizedSelector<object, import("@provoly/dashboard").DisplayOptions | undefined, (s1: DashboardState) => import("@provoly/dashboard").DisplayOptions | undefined>;
|
|
342
|
+
capabilities: MemoizedSelector<object, {
|
|
343
|
+
[url: string]: import("@provoly/dashboard").GetCapabilitiesResponse | null;
|
|
344
|
+
}, (s1: DashboardState) => {
|
|
345
|
+
[url: string]: import("@provoly/dashboard").GetCapabilitiesResponse | null;
|
|
346
|
+
}>;
|
|
342
347
|
};
|
|
@@ -21,6 +21,8 @@ export declare class ManifestService {
|
|
|
21
21
|
}>;
|
|
22
22
|
delete(id: string): Observable<void>;
|
|
23
23
|
default(id: string): Observable<boolean>;
|
|
24
|
+
addMetadata(presentationId: string, metadataId: string, value: string): Observable<void>;
|
|
25
|
+
deleteMetadata(presentationId: string, metadataId: string): Observable<void>;
|
|
24
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ManifestService, never>;
|
|
25
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<ManifestService>;
|
|
26
28
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { MapGeoServerLayerOptions, MapWMSLayerLayerOptions } from '@provoly/dashboard';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export type GetCapabilitiesResponse = {
|
|
6
5
|
url: string;
|
|
7
|
-
paramLayer: string;
|
|
8
6
|
doc: Document;
|
|
9
7
|
};
|
|
10
8
|
export declare class WmsService {
|
|
11
9
|
private httpClient;
|
|
12
10
|
parser: DOMParser;
|
|
13
11
|
constructor(httpClient: HttpClient);
|
|
14
|
-
getCapabilities(
|
|
15
|
-
|
|
12
|
+
getCapabilities(url: string): Observable<GetCapabilitiesResponse | null>;
|
|
13
|
+
getWmsFeatures(url: string): Observable<{
|
|
14
|
+
features: any[];
|
|
15
|
+
}>;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<WmsService, never>;
|
|
17
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<WmsService>;
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provoly/dashboard",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.7",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "14.x || 15.x || 16.x",
|
|
@@ -86,18 +86,18 @@
|
|
|
86
86
|
"esm": "./esm2022/admin/provoly-dashboard-admin.mjs",
|
|
87
87
|
"default": "./fesm2022/provoly-dashboard-admin.mjs"
|
|
88
88
|
},
|
|
89
|
-
"./import": {
|
|
90
|
-
"types": "./import/index.d.ts",
|
|
91
|
-
"esm2022": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
92
|
-
"esm": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
93
|
-
"default": "./fesm2022/provoly-dashboard-import.mjs"
|
|
94
|
-
},
|
|
95
89
|
"./dataset": {
|
|
96
90
|
"types": "./dataset/index.d.ts",
|
|
97
91
|
"esm2022": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
98
92
|
"esm": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
|
|
99
93
|
"default": "./fesm2022/provoly-dashboard-dataset.mjs"
|
|
100
94
|
},
|
|
95
|
+
"./import": {
|
|
96
|
+
"types": "./import/index.d.ts",
|
|
97
|
+
"esm2022": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
98
|
+
"esm": "./esm2022/import/provoly-dashboard-import.mjs",
|
|
99
|
+
"default": "./fesm2022/provoly-dashboard-import.mjs"
|
|
100
|
+
},
|
|
101
101
|
"./notification": {
|
|
102
102
|
"types": "./notification/index.d.ts",
|
|
103
103
|
"esm2022": "./esm2022/notification/provoly-dashboard-notification.mjs",
|
|
@@ -4,6 +4,7 @@ import { Router } from '@angular/router';
|
|
|
4
4
|
import { Store } from '@ngrx/store';
|
|
5
5
|
import { GlobalManifest, LibraryTypes, ManifestDescription, SubscriptionnerDirective } from '@provoly/dashboard';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
|
+
import { MetaEventType } from '@provoly/dashboard/components/metadata-editor';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class PryAddEditPresentationComponent extends SubscriptionnerDirective implements OnInit, AfterViewInit {
|
|
9
10
|
private store;
|
|
@@ -22,6 +23,8 @@ export declare class PryAddEditPresentationComponent extends SubscriptionnerDire
|
|
|
22
23
|
ngAfterViewInit(): void;
|
|
23
24
|
save(): void;
|
|
24
25
|
configureDashboard(selectedPresentation: ManifestDescription): void;
|
|
26
|
+
addMetadata(metadata: MetaEventType): void;
|
|
27
|
+
removeMetadata(metadata: MetaEventType): void;
|
|
25
28
|
close(): void;
|
|
26
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<PryAddEditPresentationComponent, [null, { optional: true; }]>;
|
|
27
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<PryAddEditPresentationComponent, "pry-add-edit-presentation", never, { "selectedPresentation": { "alias": "selectedPresentation"; "required": false; }; "edition": { "alias": "edition"; "required": false; }; "editionStartUrl": { "alias": "editionStartUrl"; "required": false; }; }, { "goBack": "goBack"; }, never, never, false, never>;
|
|
@@ -11,10 +11,11 @@ import * as i8 from "@provoly/dashboard/toolbox";
|
|
|
11
11
|
import * as i9 from "@provoly/dashboard/components/checkbox";
|
|
12
12
|
import * as i10 from "@angular/common";
|
|
13
13
|
import * as i11 from "@angular/cdk/a11y";
|
|
14
|
+
import * as i12 from "@provoly/dashboard/components/metadata-editor";
|
|
14
15
|
export declare class PryPresentationModule {
|
|
15
16
|
private pryTranslateService;
|
|
16
17
|
constructor(pryTranslateService: PryI18nService);
|
|
17
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<PryPresentationModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PryPresentationModule, [typeof i1.PryPresentationComponent, typeof i2.PryAddEditPresentationComponent, typeof i3.PryTitlePresentationComponent, typeof i4.PryPresentationCssComponent], [typeof i5.PryIconModule, typeof i5.PryCoreModule, typeof i5.PryDashboardModule, typeof i6.ReactiveFormsModule, typeof i5.PrySelectModule, typeof i7.PrySinceDateModule, typeof i5.PryShareModule, typeof i6.FormsModule, typeof i5.PryOverlayModule, typeof i5.PryI18nModule, typeof i8.PryToolboxModule, typeof i9.PryCheckboxModule, typeof i10.CommonModule, typeof i11.A11yModule], [typeof i1.PryPresentationComponent, typeof i2.PryAddEditPresentationComponent, typeof i3.PryTitlePresentationComponent, typeof i4.PryPresentationCssComponent]>;
|
|
19
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PryPresentationModule, [typeof i1.PryPresentationComponent, typeof i2.PryAddEditPresentationComponent, typeof i3.PryTitlePresentationComponent, typeof i4.PryPresentationCssComponent], [typeof i5.PryIconModule, typeof i5.PryCoreModule, typeof i5.PryDashboardModule, typeof i6.ReactiveFormsModule, typeof i5.PrySelectModule, typeof i7.PrySinceDateModule, typeof i5.PryShareModule, typeof i6.FormsModule, typeof i5.PryOverlayModule, typeof i5.PryI18nModule, typeof i8.PryToolboxModule, typeof i9.PryCheckboxModule, typeof i10.CommonModule, typeof i11.A11yModule, typeof i12.PryExpandPanelModule], [typeof i1.PryPresentationComponent, typeof i2.PryAddEditPresentationComponent, typeof i3.PryTitlePresentationComponent, typeof i4.PryPresentationCssComponent]>;
|
|
19
20
|
static ɵinj: i0.ɵɵInjectorDeclaration<PryPresentationModule>;
|
|
20
21
|
}
|
|
@@ -6,8 +6,20 @@ pry-add-edit-presentation {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.o-manifest-layout__content {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
9
11
|
padding: 20px 20px;
|
|
10
12
|
text-align: left;
|
|
13
|
+
|
|
14
|
+
.a-h1 {
|
|
15
|
+
line-height: 38px;
|
|
16
|
+
font-size: 28px;
|
|
17
|
+
text-align: left;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.a-btn {
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
}
|
|
11
23
|
}
|
|
12
24
|
|
|
13
25
|
.o-manifest-layout__toolbox {
|
|
@@ -23,19 +35,20 @@ pry-add-edit-presentation {
|
|
|
23
35
|
}
|
|
24
36
|
|
|
25
37
|
.o-presentation-form-wrapper {
|
|
38
|
+
display: flex;
|
|
26
39
|
padding-bottom: toRem(5);
|
|
40
|
+
gap: 3rem;
|
|
41
|
+
}
|
|
27
42
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
font-size: 28px;
|
|
31
|
-
text-align: left;
|
|
32
|
-
}
|
|
43
|
+
.o-presentation__metadata-editor {
|
|
44
|
+
flex: 1 50%;
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
.o-presentation-form {
|
|
36
48
|
display: flex;
|
|
37
49
|
flex-direction: column;
|
|
38
50
|
align-items: center;
|
|
51
|
+
flex: 1 50%;
|
|
39
52
|
|
|
40
53
|
.a-presentation-form-input {
|
|
41
54
|
padding: 0.25rem 0.75rem;
|
|
@@ -38,7 +38,6 @@ describe(schematicName, () => {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
`);
|
|
41
|
-
console.log(tree.readContent('/example.component.ts'));
|
|
42
41
|
yield runner.runSchematic('migration-v0.14', {}, tree);
|
|
43
42
|
const actual = tree.readContent('/example.component.ts');
|
|
44
43
|
expect(actual).not.toMatch(/SelectionInteraction/);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../../../projects/provoly/dashboard/schematics/ng-update/version-0-14/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAuF;AACvF,gDAAwB;AAExB,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnG,IAAI,IAAkB,CAAC;IAEvB,UAAU,CAAC,GAAS,EAAE;QACpB,IAAI,GAAG,MAAM,MAAM,CAAC,oBAAoB,CACtC,qBAAqB,EACrB,QAAQ,EACR,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAC1D,IAAI,sBAAY,CAAC,iBAAI,CAAC,KAAK,EAAE,CAAC,CAC/B,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAS,EAAE;QACnE,IAAI,CAAC,MAAM,CAAC,yBAAyB,EAAE,4DAA4D,CAAC,CAAC;QAErG,MAAM,MAAM,CAAC,YAAY,CAAC,iBAAiB,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;QAC3D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,GAAS,EAAE;QAC3E,IAAI,CAAC,MAAM,CACT,uBAAuB,EACvB;;;;;;;KAOD,CACA,CAAC;QAEF,
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../../../projects/provoly/dashboard/schematics/ng-update/version-0-14/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2DAAkD;AAClD,gEAAuF;AACvF,gDAAwB;AAExB,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnG,IAAI,IAAkB,CAAC;IAEvB,UAAU,CAAC,GAAS,EAAE;QACpB,IAAI,GAAG,MAAM,MAAM,CAAC,oBAAoB,CACtC,qBAAqB,EACrB,QAAQ,EACR,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAC1D,IAAI,sBAAY,CAAC,iBAAI,CAAC,KAAK,EAAE,CAAC,CAC/B,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAS,EAAE;QACnE,IAAI,C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2
|
import { AfterViewInit, ComponentRef, ElementRef, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import { Store } from '@ngrx/store';
|
|
4
|
-
import { BaseTooltipComponent, BaseWidgetMapLayerOptions, Class, DataWidgetComponent, Field, MapAutoLayerOptions, MapFeatureLayerOptions, MapGeoServerLayerOptions, MapRasterTileLayerOptions, MapVectorTileLayerOptions, MapWidgetBubbleLayerOptions, MapWidgetHeatMapLayerOptions, MapWidgetLayerOptions, MapWidgetMarkerLayerOptions, MapWidgetOptions, MapWMSLayerLayerOptions, MapWMTSLayerLayerOptions, PryI18nService, PrySnackbarService, SymbolService, TooltipFactoryService } from '@provoly/dashboard';
|
|
4
|
+
import { BaseTooltipComponent, BaseWidgetMapLayerOptions, Class, DataWidgetComponent, Field, GetCapabilitiesResponse, MapAutoLayerOptions, MapFeatureLayerOptions, MapGeoServerLayerOptions, MapRasterTileLayerOptions, MapVectorTileLayerOptions, MapWidgetBubbleLayerOptions, MapWidgetHeatMapLayerOptions, MapWidgetLayerOptions, MapWidgetMarkerLayerOptions, MapWidgetOptions, MapWMSLayerLayerOptions, MapWMTSLayerLayerOptions, PryI18nService, PrySnackbarService, SymbolService, TooltipFactoryService } from '@provoly/dashboard';
|
|
5
5
|
import { Map } from 'ol';
|
|
6
6
|
import { Geometry } from 'ol/geom';
|
|
7
|
+
import { Layer } from 'ol/layer';
|
|
7
8
|
import BaseLayer from 'ol/layer/Base';
|
|
8
9
|
import VectorLayer from 'ol/layer/Vector';
|
|
9
10
|
import VectorTileLayer from 'ol/layer/VectorTile';
|
|
@@ -13,7 +14,6 @@ import { Style } from 'ol/style';
|
|
|
13
14
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
14
15
|
import { InteractionManager } from '../interaction/interaction-manager.class';
|
|
15
16
|
import { WidgetMapLayerService } from './widget-map-layer.service';
|
|
16
|
-
import { GetCapabilitiesResponse, WmsService } from './wms.service';
|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
18
|
export declare const TOOLTIP_PADDING = 15;
|
|
19
19
|
export declare class WidgetMapComponent extends DataWidgetComponent implements AfterViewInit, OnDestroy {
|
|
@@ -25,7 +25,6 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
|
|
|
25
25
|
private symbolService;
|
|
26
26
|
private injector;
|
|
27
27
|
private widgetMapLayerService;
|
|
28
|
-
private wmsService;
|
|
29
28
|
mapUrl$: Observable<string>;
|
|
30
29
|
mapRef: ElementRef;
|
|
31
30
|
popup: ElementRef;
|
|
@@ -85,9 +84,11 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
|
|
|
85
84
|
tooltipNumber: number;
|
|
86
85
|
STYLE_FROM_URL: string;
|
|
87
86
|
NO_STYLE: string;
|
|
88
|
-
wmsCapabilities$: Observable<
|
|
87
|
+
wmsCapabilities$: Observable<{
|
|
88
|
+
[p: string]: GetCapabilitiesResponse | null;
|
|
89
|
+
} | undefined>;
|
|
89
90
|
autoDatasetLayers$: Observable<MapAutoLayerOptions[]>;
|
|
90
|
-
constructor(store: Store<any>, snackBar: PrySnackbarService, translateService: PryI18nService, tooltipFactoryService: TooltipFactoryService, overlay: cdkOverlay, viewContainerRef: ViewContainerRef, symbolService: SymbolService, injector: Injector, widgetMapLayerService: WidgetMapLayerService, el: ElementRef
|
|
91
|
+
constructor(store: Store<any>, snackBar: PrySnackbarService, translateService: PryI18nService, tooltipFactoryService: TooltipFactoryService, overlay: cdkOverlay, viewContainerRef: ViewContainerRef, symbolService: SymbolService, injector: Injector, widgetMapLayerService: WidgetMapLayerService, el: ElementRef);
|
|
91
92
|
initInteractionManager(): InteractionManager;
|
|
92
93
|
ngAfterViewInit(): void;
|
|
93
94
|
initResultSet$(): Observable<import("@provoly/dashboard").ResultSet>;
|
|
@@ -96,7 +97,9 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
|
|
|
96
97
|
coordinates: Pixel;
|
|
97
98
|
values: any;
|
|
98
99
|
}): Promise<ComponentRef<BaseTooltipComponent> | null>;
|
|
99
|
-
setDefaultLayerTitle(layer: MapWidgetLayerOptions, capabilities:
|
|
100
|
+
setDefaultLayerTitle(layer: MapWidgetLayerOptions, capabilities: {
|
|
101
|
+
[p: string]: GetCapabilitiesResponse | null;
|
|
102
|
+
} | undefined): void;
|
|
100
103
|
fitMapForObjects(fit: boolean, selectedIds?: string[]): void;
|
|
101
104
|
private getAttributesForDrawing;
|
|
102
105
|
private getIntensityAttribute;
|
|
@@ -127,10 +130,10 @@ export declare class WidgetMapComponent extends DataWidgetComponent implements A
|
|
|
127
130
|
changeClusterDistance(layer: MapWidgetMarkerLayerOptions, $event: Event): void;
|
|
128
131
|
hideAddress(): void;
|
|
129
132
|
changeOpacity(layer: MapWidgetLayerOptions, $event: string): void;
|
|
130
|
-
getWMSLayers():
|
|
133
|
+
getWMSLayers(): Layer<any>[];
|
|
131
134
|
isLayerRendered(layer: any): boolean;
|
|
132
135
|
isLayerVisible(layer: any): boolean;
|
|
133
|
-
getFeatureFromServer(wmsLayers: any[], pixel: Pixel): void;
|
|
136
|
+
getFeatureFromServer(wmsLayers: Layer<any>[], pixel: Pixel): void;
|
|
134
137
|
changeWmsClass($event: any, layer: MapWMSLayerLayerOptions): void;
|
|
135
138
|
toggleLegend(index: number): void;
|
|
136
139
|
toggleLegendWindow(): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { MapGeoServerLayerOptions, MapWMSLayerLayerOptions } from '@provoly/dashboard';
|
|
3
|
-
import { GetCapabilitiesResponse } from '../component/wms.service';
|
|
2
|
+
import { GetCapabilitiesResponse, MapGeoServerLayerOptions, MapWMSLayerLayerOptions } from '@provoly/dashboard';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class WidgetMapLegendUrlPipe implements PipeTransform {
|
|
6
5
|
constructor();
|
|
7
6
|
parser: DOMParser;
|
|
8
7
|
transform(geoLayer: MapGeoServerLayerOptions | MapWMSLayerLayerOptions, ...args: [{
|
|
9
|
-
capabilities:
|
|
8
|
+
capabilities: {
|
|
9
|
+
[p: string]: GetCapabilitiesResponse | null;
|
|
10
|
+
} | undefined | null;
|
|
10
11
|
}]): string;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetMapLegendUrlPipe, never>;
|
|
12
13
|
static ɵpipe: i0.ɵɵPipeDeclaration<WidgetMapLegendUrlPipe, "legendUrl", false>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './widget-map.module';
|
|
2
2
|
export * from './component/widget-map.component';
|
|
3
3
|
export * from './component/widget-map-layer.service';
|
|
4
|
-
export * from './component/wms.service';
|
|
5
4
|
export * from './pipe/widget-map-geometry-fields-for.pipe';
|
|
6
5
|
export * from './pipe/widget-map-legend-url.pipe';
|
|
7
6
|
export * from './interaction/interaction-manager.class';
|
|
@@ -2,4 +2,5 @@ export declare class XMLUtils {
|
|
|
2
2
|
static find(childs: NodeListOf<ChildNode>, name: string): ChildNode | null;
|
|
3
3
|
static findAll(childs: NodeListOf<ChildNode>, name: string): ChildNode[];
|
|
4
4
|
static findWith(childs: NodeListOf<ChildNode>, attribute: string, value: string): ChildNode | null;
|
|
5
|
+
static getMatchingLayer(paramLayer: string, doc: Document): ChildNode | null;
|
|
5
6
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { map, mergeMap } from 'rxjs';
|
|
3
|
-
import { ConfigSelectors } from '../../core/store/config/config.selectors';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common/http";
|
|
6
|
-
import * as i2 from "@ngrx/store";
|
|
7
|
-
export class GeocodingService {
|
|
8
|
-
constructor(httpClient, store) {
|
|
9
|
-
this.httpClient = httpClient;
|
|
10
|
-
this.store = store;
|
|
11
|
-
}
|
|
12
|
-
fromAddress(address) {
|
|
13
|
-
const preparedAddress = address.replace(/\s/g, '+');
|
|
14
|
-
return this.store.select(ConfigSelectors.geocodingUrl).pipe(mergeMap((url) => this.httpClient.get(`${url}/search/?text=${preparedAddress}`).pipe(map((result) => ({
|
|
15
|
-
latLon: result.features[0].geometry.coordinates.reverse(),
|
|
16
|
-
pointAddress: result.features[0].properties.label
|
|
17
|
-
})))));
|
|
18
|
-
}
|
|
19
|
-
fromLatLong(latLng) {
|
|
20
|
-
return this.store.select(ConfigSelectors.geocodingUrl).pipe(mergeMap((url) => this.httpClient
|
|
21
|
-
.get(`${url}/reverse/`, {
|
|
22
|
-
params: {
|
|
23
|
-
lat: latLng[0],
|
|
24
|
-
lon: latLng[1]
|
|
25
|
-
}
|
|
26
|
-
})
|
|
27
|
-
.pipe(map((result) => ({
|
|
28
|
-
latLon: result.features[0].geometry.coordinates.reverse(),
|
|
29
|
-
pointAddress: result.features[0].properties.label
|
|
30
|
-
})))));
|
|
31
|
-
}
|
|
32
|
-
getWmsFeatures(url) {
|
|
33
|
-
return this.httpClient.get(url).pipe(map((json) => json));
|
|
34
|
-
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: GeocodingService, deps: [{ token: i1.HttpClient }, { token: i2.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: GeocodingService, providedIn: 'root' }); }
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: GeocodingService, decorators: [{
|
|
39
|
-
type: Injectable,
|
|
40
|
-
args: [{
|
|
41
|
-
providedIn: 'root'
|
|
42
|
-
}]
|
|
43
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.Store }]; } });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvY29kaW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GF0TG9uOiByZXN1bHQuZmVhdHVyZXNbMF0uZ2VvbWV0cnkuY29vcmRpbmF0ZXMucmV2ZXJzZSgpLFxuICAgICAgICAgICAgcG9pbnRBZGRyZXNzOiByZXN1bHQuZmVhdHVyZXNbMF0ucHJvcGVydGllcy5sYWJlbFxuICAgICAgICAgIH0pKVxuICAgICAgICApXG4gICAgICApXG4gICAgKTtcbiAgfVxuXG4gIGZyb21MYXRMb25nKGxhdExuZzogbnVtYmVyW10pOiBPYnNlcnZhYmxlPHsgbGF0TG9uOiBudW1iZXJbXTsgcG9pbnRBZGRyZXNzOiBzdHJpbmcgfT4ge1xuICAgIHJldHVybiB0aGlzLnN0b3JlLnNlbGVjdChDb25maWdTZWxlY3RvcnMuZ2VvY29kaW5nVXJsKS5waXBlKFxuICAgICAgbWVyZ2VNYXAoKHVybCkgPT5cbiAgICAgICAgdGhpcy5odHRwQ2xpZW50XG4gICAgICAgICAgLmdldDxHb3V2UmVzcG9uc2U+KGAke3VybH0vcmV2ZXJzZS9gLCB7XG4gICAgICAgICAgICBwYXJhbXM6IHtcbiAgICAgICAgICAgICAgbGF0OiBsYXRMbmdbMF0sXG4gICAgICAgICAgICAgIGxvbjogbGF0TG5nWzFdXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcbiAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgIG1hcCgocmVzdWx0KSA9PiAoe1xuICAgICAgICAgICAgICBsYXRMb246IHJlc3VsdC5mZWF0dXJlc1swXS5nZW9tZXRyeS5jb29yZGluYXRlcy5yZXZlcnNlKCksXG4gICAgICAgICAgICAgIHBvaW50QWRkcmVzczogcmVzdWx0LmZlYXR1cmVzWzBdLnByb3BlcnRpZXMubGFiZWxcbiAgICAgICAgICAgIH0pKVxuICAgICAgICAgIClcbiAgICAgIClcbiAgICApO1xuICB9XG5cbiAgZ2V0V21zRmVhdHVyZXModXJsOiBzdHJpbmcpOiBPYnNlcnZhYmxlPHsgZmVhdHVyZXM6IGFueVtdIH0+IHtcbiAgICByZXR1cm4gdGhpcy5odHRwQ2xpZW50LmdldCh1cmwpLnBpcGUobWFwKChqc29uOiBhbnkpID0+IGpzb24pKTtcbiAgfVxufVxuIl19
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { HttpHeaders } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { map, of } from 'rxjs';
|
|
4
|
-
import { XMLUtils } from '../utils/xml-utils.class';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@angular/common/http";
|
|
7
|
-
export class WmsService {
|
|
8
|
-
constructor(httpClient) {
|
|
9
|
-
this.httpClient = httpClient;
|
|
10
|
-
this.parser = new DOMParser();
|
|
11
|
-
}
|
|
12
|
-
getCapabilities(wmsLayer) {
|
|
13
|
-
if (wmsLayer && wmsLayer.url) {
|
|
14
|
-
const layerUrlWithQmark = wmsLayer.url.indexOf('?') === -1 ? wmsLayer.url + '?' : wmsLayer.url;
|
|
15
|
-
const layerUrlWithService = layerUrlWithQmark.indexOf('&SERVICE=') === -1 ? layerUrlWithQmark + '&SERVICE=WMS' : layerUrlWithQmark;
|
|
16
|
-
const layerUrlWithVersion = layerUrlWithService.indexOf('&VERSION=') === -1 ? layerUrlWithService + '&VERSION=1.3.0' : layerUrlWithService;
|
|
17
|
-
return this.httpClient
|
|
18
|
-
.get(`${layerUrlWithVersion}&REQUEST=GetCapabilities`, {
|
|
19
|
-
headers: new HttpHeaders({
|
|
20
|
-
Accept: 'text/html, application/xhtml+xml, */*',
|
|
21
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
22
|
-
}),
|
|
23
|
-
responseType: 'text'
|
|
24
|
-
})
|
|
25
|
-
.pipe(map((response) => {
|
|
26
|
-
const doc = this.parser.parseFromString(response, 'application/xml');
|
|
27
|
-
const errorNode = doc.querySelector('parsererror');
|
|
28
|
-
if (errorNode) {
|
|
29
|
-
console.error(`Cannot getCapabilities for ${wmsLayer.url}[${wmsLayer.paramLayer}]`);
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return { url: wmsLayer.url, paramLayer: wmsLayer.paramLayer, doc };
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
return of(null);
|
|
38
|
-
}
|
|
39
|
-
static getMatchingLayer(paramLayer, doc) {
|
|
40
|
-
const WMSCapability = XMLUtils.find(doc.childNodes, 'WMS_Capabilities');
|
|
41
|
-
if (WMSCapability) {
|
|
42
|
-
const Capabilities = XMLUtils.find(WMSCapability.childNodes, 'Capability');
|
|
43
|
-
if (Capabilities) {
|
|
44
|
-
const Layer = XMLUtils.find(Capabilities.childNodes, 'Layer');
|
|
45
|
-
if (Layer) {
|
|
46
|
-
let matchingLayer = XMLUtils.findWith(Layer.childNodes, 'Name', paramLayer);
|
|
47
|
-
const split = paramLayer.split(':');
|
|
48
|
-
if (!matchingLayer && split.length >= 2) {
|
|
49
|
-
// Try again, splitting on ":" in the name to ignore namespace if present
|
|
50
|
-
matchingLayer = XMLUtils.findWith(Layer.childNodes, 'Name', split[split.length - 1]);
|
|
51
|
-
}
|
|
52
|
-
return matchingLayer;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WmsService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
59
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WmsService, providedIn: 'root' }); }
|
|
60
|
-
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: WmsService, decorators: [{
|
|
62
|
-
type: Injectable,
|
|
63
|
-
args: [{
|
|
64
|
-
providedIn: 'root'
|
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WVzKSB7XG4gICAgICAgIGNvbnN0IExheWVyID0gWE1MVXRpbHMuZmluZChDYXBhYmlsaXRpZXMuY2hpbGROb2RlcywgJ0xheWVyJyk7XG4gICAgICAgIGlmIChMYXllcikge1xuICAgICAgICAgIGxldCBtYXRjaGluZ0xheWVyID0gWE1MVXRpbHMuZmluZFdpdGgoTGF5ZXIuY2hpbGROb2RlcywgJ05hbWUnLCBwYXJhbUxheWVyKTtcbiAgICAgICAgICBjb25zdCBzcGxpdCA9IHBhcmFtTGF5ZXIuc3BsaXQoJzonKTtcbiAgICAgICAgICBpZiAoIW1hdGNoaW5nTGF5ZXIgJiYgc3BsaXQubGVuZ3RoID49IDIpIHtcbiAgICAgICAgICAgIC8vIFRyeSBhZ2Fpbiwgc3BsaXR0aW5nIG9uIFwiOlwiIGluIHRoZSBuYW1lIHRvIGlnbm9yZSBuYW1lc3BhY2UgaWYgcHJlc2VudFxuICAgICAgICAgICAgbWF0Y2hpbmdMYXllciA9IFhNTFV0aWxzLmZpbmRXaXRoKExheWVyLmNoaWxkTm9kZXMsICdOYW1lJywgc3BsaXRbc3BsaXQubGVuZ3RoIC0gMV0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gbWF0Y2hpbmdMYXllcjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbDtcbiAgfVxufVxuIl19
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Store } from '@ngrx/store';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export interface Geometry {
|
|
6
|
-
type: string;
|
|
7
|
-
coordinates: number[];
|
|
8
|
-
}
|
|
9
|
-
export interface Properties {
|
|
10
|
-
label: string;
|
|
11
|
-
score: number;
|
|
12
|
-
housenumber: string;
|
|
13
|
-
id: string;
|
|
14
|
-
type: string;
|
|
15
|
-
name: string;
|
|
16
|
-
postcode: string;
|
|
17
|
-
citycode: string;
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
city: string;
|
|
21
|
-
context: string;
|
|
22
|
-
importance: number;
|
|
23
|
-
street: string;
|
|
24
|
-
}
|
|
25
|
-
export interface Feature {
|
|
26
|
-
type: string;
|
|
27
|
-
geometry: Geometry;
|
|
28
|
-
properties: Properties;
|
|
29
|
-
}
|
|
30
|
-
export interface GouvResponse {
|
|
31
|
-
type: string;
|
|
32
|
-
version: string;
|
|
33
|
-
features: Feature[];
|
|
34
|
-
attribution: string;
|
|
35
|
-
licence: string;
|
|
36
|
-
query: string;
|
|
37
|
-
limit: number;
|
|
38
|
-
}
|
|
39
|
-
export declare class GeocodingService {
|
|
40
|
-
private httpClient;
|
|
41
|
-
private store;
|
|
42
|
-
constructor(httpClient: HttpClient, store: Store);
|
|
43
|
-
fromAddress(address: string): Observable<{
|
|
44
|
-
latLon: number[];
|
|
45
|
-
pointAddress: string;
|
|
46
|
-
}>;
|
|
47
|
-
fromLatLong(latLng: number[]): Observable<{
|
|
48
|
-
latLon: number[];
|
|
49
|
-
pointAddress: string;
|
|
50
|
-
}>;
|
|
51
|
-
getWmsFeatures(url: string): Observable<{
|
|
52
|
-
features: any[];
|
|
53
|
-
}>;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GeocodingService, never>;
|
|
55
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GeocodingService>;
|
|
56
|
-
}
|