@provoly/dashboard 1.3.32 → 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.
@@ -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, geomPropName) {
11910
- const url = wfsUrlBuilder(wmsUrl, bbox, geomPropName);
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 wfsUrlBuilder = (wmsUrl, bbox, geomPropName, params) => {
11923
- const isBboxPoint = bbox[0] === bbox[2] && bbox[1] === bbox[3];
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
- cql_filter: isBboxPoint
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'] += wmsUrlFragments.find((param) => param.toUpperCase().includes('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.countunique === 1) {
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, action.geomProName)
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