@provoly/dashboard 1.3.31 → 1.3.33
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/item-utils.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -5
- package/esm2022/lib/dashboard/store/wms.service.mjs +13 -11
- package/esm2022/presentation/components/presentation.component.mjs +10 -4
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +21 -14
- package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +2 -3
- package/fesm2022/provoly-dashboard-presentation.mjs +11 -5
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +2 -2
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +20 -13
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -2
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +16 -15
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/dashboard/store/dashboard.actions.d.ts +0 -2
- package/lib/dashboard/store/wms.service.d.ts +1 -1
- package/package.json +7 -7
- package/presentation/components/presentation.component.d.ts +8 -3
- package/presentation/style/_o-pry-presentation.scss +8 -0
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +0 -5
|
@@ -4725,7 +4725,7 @@ class ItemUtils {
|
|
|
4725
4725
|
...new Set(Object.keys(resultSet?.items || {})
|
|
4726
4726
|
.map((classId) => classes.find((cl) => cl.id === classId))
|
|
4727
4727
|
.filter((oClass) => oClass !== undefined)
|
|
4728
|
-
.map((oClass) => oClass.attributes)
|
|
4728
|
+
.map((oClass) => oClass.attributes.filter((attr) => ItemUtils.getClassNonGeoAttributesNames(oClass, definitions, fields).includes(attr.name)))
|
|
4729
4729
|
.reduce((p, c) => [...p, ...c], [])
|
|
4730
4730
|
.filter((attr) => !!fields.find((f) => f.id === attr.field.id)))
|
|
4731
4731
|
];
|
|
@@ -11906,8 +11906,8 @@ class WmsService {
|
|
|
11906
11906
|
getWmsFeatures(url) {
|
|
11907
11907
|
return this.httpClient.get(url).pipe(map((json) => json));
|
|
11908
11908
|
}
|
|
11909
|
-
getWfsFeatures(wmsUrl, bbox
|
|
11910
|
-
const url = wfsUrlBuilder(wmsUrl, bbox
|
|
11909
|
+
getWfsFeatures(wmsUrl, bbox) {
|
|
11910
|
+
const url = wfsUrlBuilder(wmsUrl, bbox);
|
|
11911
11911
|
return this.httpClient.get(url).pipe(map((json) => json));
|
|
11912
11912
|
}
|
|
11913
11913
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WmsService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -11919,17 +11919,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
11919
11919
|
providedIn: 'root'
|
|
11920
11920
|
}]
|
|
11921
11921
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }] });
|
|
11922
|
-
const
|
|
11923
|
-
|
|
11922
|
+
const BBOX_ENHANCE_DISTANCE = 0.0001;
|
|
11923
|
+
const wfsUrlBuilder = (wmsUrl, bbox, params) => {
|
|
11924
|
+
const enhancedBbox = [
|
|
11925
|
+
bbox[0] - BBOX_ENHANCE_DISTANCE,
|
|
11926
|
+
bbox[1] - BBOX_ENHANCE_DISTANCE,
|
|
11927
|
+
bbox[2] + BBOX_ENHANCE_DISTANCE,
|
|
11928
|
+
bbox[3] + BBOX_ENHANCE_DISTANCE
|
|
11929
|
+
];
|
|
11924
11930
|
const wfsFragments = {
|
|
11925
11931
|
service: 'WFS',
|
|
11926
11932
|
version: '2.0.0',
|
|
11927
11933
|
request: 'GetFeature',
|
|
11928
11934
|
outputFormat: 'application/json',
|
|
11929
11935
|
typeNames: undefined,
|
|
11930
|
-
|
|
11931
|
-
? `DWITHIN(${geomPropName}, POINT(${bbox[0]} ${bbox[1]}),1,meters)`
|
|
11932
|
-
: `BBOX(${geomPropName},${bbox.join(',')})`,
|
|
11936
|
+
bbox: `${enhancedBbox.join(',')},EPSG:4326`,
|
|
11933
11937
|
srsName: undefined,
|
|
11934
11938
|
params: params ? `&${params.join('&')}` : ''
|
|
11935
11939
|
};
|
|
@@ -11937,9 +11941,7 @@ const wfsUrlBuilder = (wmsUrl, bbox, geomPropName, params) => {
|
|
|
11937
11941
|
const wmsUrlFragments = wmsUrl.split('&');
|
|
11938
11942
|
wfsFragments['typeNames'] = wmsUrlFragments.find((param) => param.includes('LAYERS'))?.split('=')[1];
|
|
11939
11943
|
wfsFragments['srsName'] = wmsUrlFragments.find((param) => param.toUpperCase().includes('CRS'))?.split('=')[1];
|
|
11940
|
-
wfsFragments['cql_filter']
|
|
11941
|
-
? ' AND ' + wmsUrlFragments.find((param) => param.toUpperCase().includes('CQL_FILTER'))?.split('=')[1]
|
|
11942
|
-
: '';
|
|
11944
|
+
wfsFragments['cql_filter'] = wmsUrlFragments.find((param) => param.includes('CQL_FILTER'))?.split('=')[1];
|
|
11943
11945
|
return (base +
|
|
11944
11946
|
'?' +
|
|
11945
11947
|
Object.entries(wfsFragments)
|
|
@@ -12355,11 +12357,10 @@ class DashboardEffects {
|
|
|
12355
12357
|
if (wmsJson.features[0] &&
|
|
12356
12358
|
wmsJson.features[0].properties.count &&
|
|
12357
12359
|
wmsJson.features[0].properties.countunique &&
|
|
12358
|
-
wmsJson.features[0].properties.count > 1
|
|
12359
|
-
wmsJson.features[0].properties.
|
|
12360
|
-
let envBBOXCoords = [...wmsJson.features[0].properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => m[0]);
|
|
12360
|
+
wmsJson.features[0].properties.count > 1) {
|
|
12361
|
+
let envBBOXCoords = [...wmsJson.features[0].properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => parseFloat(m[0]));
|
|
12361
12362
|
return this.wmsService
|
|
12362
|
-
.getWfsFeatures(action.url, envBBOXCoords
|
|
12363
|
+
.getWfsFeatures(action.url, envBBOXCoords)
|
|
12363
12364
|
.pipe(map$1((wfsJson) => ({ action, json: wfsJson })));
|
|
12364
12365
|
}
|
|
12365
12366
|
// if data is not a stack just add features without calling wfs service
|