@provoly/dashboard 1.4.25 → 1.4.27
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/esm2022/lib/dashboard/components/dashboard.component.mjs +10 -10
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
- package/esm2022/lib/dashboard/store/wms.service.mjs +14 -8
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +2 -2
- package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +4 -3
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +4 -3
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +22 -15
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +2 -0
- package/lib/dashboard/store/wms.service.d.ts +1 -1
- package/package.json +7 -7
|
@@ -9510,15 +9510,6 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9510
9510
|
return wManifest;
|
|
9511
9511
|
}), distinctUntilChanged((p, c) => equal(p, c)));
|
|
9512
9512
|
this.nonFillerWidgets$ = this.windowManifest$.pipe(map((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
|
|
9513
|
-
this.subscriptions.add(combineLatest([
|
|
9514
|
-
this.windowManifest$,
|
|
9515
|
-
this.store.select(DataSourceSelectors.getDataSources),
|
|
9516
|
-
this.staticDashboard$
|
|
9517
|
-
]).subscribe(([manifest, datasets, staticManifest]) => {
|
|
9518
|
-
if (datasets.length > 0) {
|
|
9519
|
-
this.store.dispatch(DashboardActions.assertResultSets({ staticManifest }));
|
|
9520
|
-
}
|
|
9521
|
-
}));
|
|
9522
9513
|
this.store.dispatch(FieldActions.load({}));
|
|
9523
9514
|
this.store.dispatch(ClassActions.load({}));
|
|
9524
9515
|
this.store.dispatch(CategoryActions.load({}));
|
|
@@ -9570,6 +9561,15 @@ class DashboardComponent extends SubscriptionnerDirective {
|
|
|
9570
9561
|
this.updateSelfSize();
|
|
9571
9562
|
}
|
|
9572
9563
|
ngOnInit() {
|
|
9564
|
+
this.subscriptions.add(combineLatest([
|
|
9565
|
+
this.windowManifest$,
|
|
9566
|
+
this.store.select(DataSourceSelectors.getDataSources),
|
|
9567
|
+
this.staticDashboard$
|
|
9568
|
+
]).subscribe(([manifest, datasets, staticManifest]) => {
|
|
9569
|
+
if (datasets.length > 0) {
|
|
9570
|
+
this.store.dispatch(DashboardActions.assertResultSets({ staticManifest }));
|
|
9571
|
+
}
|
|
9572
|
+
}));
|
|
9573
9573
|
if (this.displayOptions)
|
|
9574
9574
|
this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CUSTOM, customDisplay: this.displayOptions }));
|
|
9575
9575
|
}
|
|
@@ -12115,8 +12115,8 @@ class WmsService {
|
|
|
12115
12115
|
getWmsFeatures(url) {
|
|
12116
12116
|
return this.httpClient.get(url).pipe(map((json) => json));
|
|
12117
12117
|
}
|
|
12118
|
-
getWfsFeatures(wmsUrl, bbox) {
|
|
12119
|
-
const url = wfsUrlBuilder(wmsUrl, bbox);
|
|
12118
|
+
getWfsFeatures(wmsUrl, bbox, geomPropName) {
|
|
12119
|
+
const url = wfsUrlBuilder(wmsUrl, bbox, geomPropName);
|
|
12120
12120
|
return this.httpClient.get(url).pipe(map((json) => json));
|
|
12121
12121
|
}
|
|
12122
12122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: WmsService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -12129,7 +12129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
12129
12129
|
}]
|
|
12130
12130
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }] });
|
|
12131
12131
|
const BBOX_ENHANCE_DISTANCE = 0.0001;
|
|
12132
|
-
const wfsUrlBuilder = (wmsUrl, bbox, params) => {
|
|
12132
|
+
const wfsUrlBuilder = (wmsUrl, bbox, geomPropName, params) => {
|
|
12133
12133
|
const enhancedBbox = [
|
|
12134
12134
|
bbox[0] - BBOX_ENHANCE_DISTANCE,
|
|
12135
12135
|
bbox[1] - BBOX_ENHANCE_DISTANCE,
|
|
@@ -12148,9 +12148,16 @@ const wfsUrlBuilder = (wmsUrl, bbox, params) => {
|
|
|
12148
12148
|
};
|
|
12149
12149
|
const base = wmsUrl.split('?')[0].replace('wms', 'wfs');
|
|
12150
12150
|
const wmsUrlFragments = wmsUrl.split('&');
|
|
12151
|
-
wfsFragments['typeNames'] = wmsUrlFragments.find((param) => param.includes('LAYERS'))?.split('=')[1];
|
|
12151
|
+
wfsFragments['typeNames'] = wmsUrlFragments.find((param) => param.toUpperCase().includes('LAYERS'))?.split('=')[1];
|
|
12152
12152
|
wfsFragments['srsName'] = wmsUrlFragments.find((param) => param.toUpperCase().includes('CRS'))?.split('=')[1];
|
|
12153
|
-
|
|
12153
|
+
const cqlFilterFragment = wmsUrlFragments.find((param) => param.toUpperCase().includes('CQL_FILTER'));
|
|
12154
|
+
if (cqlFilterFragment) {
|
|
12155
|
+
const previousFragment = cqlFilterFragment.split('=')[1];
|
|
12156
|
+
// cql_filter and bbox are mutually exclusive so we need to replace bbox with a cql filter on the bbox
|
|
12157
|
+
wfsFragments['cql_filter'] =
|
|
12158
|
+
previousFragment + ` AND BBOX(${geomPropName}, ${enhancedBbox.join(',')}, 'EPSG:4326')`;
|
|
12159
|
+
wfsFragments['bbox'] = undefined;
|
|
12160
|
+
}
|
|
12154
12161
|
return (base +
|
|
12155
12162
|
'?' +
|
|
12156
12163
|
Object.entries(wfsFragments)
|
|
@@ -12565,7 +12572,7 @@ class DashboardEffects {
|
|
|
12565
12572
|
wmsJson.features[0].properties.count > 1) {
|
|
12566
12573
|
let envBBOXCoords = [...wmsJson.features[0].properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => parseFloat(m[0]));
|
|
12567
12574
|
return this.wmsService
|
|
12568
|
-
.getWfsFeatures(action.url, envBBOXCoords)
|
|
12575
|
+
.getWfsFeatures(action.url, envBBOXCoords, action.geomPropName ?? wmsJson.features[0]['geometry_name'])
|
|
12569
12576
|
.pipe(map((wfsJson) => ({ action, json: wfsJson })));
|
|
12570
12577
|
}
|
|
12571
12578
|
// if data is not a stack just add features without calling wfs service
|