@provoly/dashboard 0.14.7 → 0.14.9
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/admin/components/admin-metadata-user/admin-metadata-user.component.d.ts +1 -1
- package/admin/components/admin-metadata-user/store/admin-metadata-user.action.d.ts +0 -11
- package/admin/components/admin-metadata-user/store/admin-metadata-user.effects.d.ts +2 -7
- package/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.d.ts +1 -3
- package/admin/components/admin-metadata-user/store/admin-metadata-user.selector.d.ts +1 -4
- package/admin/components/admin-user/store/admin-user.action.d.ts +1 -52
- package/admin/components/admin-user/store/admin-user.effects.d.ts +0 -28
- package/admin/components/admin-user/store/admin-user.reducer.d.ts +1 -2
- package/admin/components/admin-user/store/admin-user.selector.d.ts +0 -1
- package/admin/store/admin.service.d.ts +1 -4
- package/components/metadata-editor/metadata-editor.component.d.ts +6 -4
- package/components/metadata-editor/metadata-editor.module.d.ts +7 -6
- package/components/metadata-editor/public-api.d.ts +1 -0
- package/components/metadata-editor/store/metadata.action.d.ts +63 -1
- package/components/metadata-editor/store/metadata.effects.d.ts +33 -0
- package/components/metadata-editor/store/metadata.reducer.d.ts +3 -1
- package/components/metadata-editor/store/metadata.selector.d.ts +2 -0
- package/components/metadata-editor/store/metadata.service.d.ts +5 -1
- package/components/metadata-editor/style/_o-metadata-editor.scss +15 -0
- package/components/metadata-editor/style/css.component.d.ts +5 -0
- package/dataset/components/dataset-detail/dataset-detail.component.d.ts +1 -0
- package/dataset/i18n/en.translations.d.ts +1 -0
- package/dataset/i18n/fr.translations.d.ts +1 -0
- package/dataset/style/_o-pry-dataset-detail.scss +7 -6
- package/dataset/style/_o-pry-dataset.scss +6 -3
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-edit/admin-abac-rules-edit.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-new/admin-abac-rules-new.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/components/metadata-condition/metadata-condition.component.mjs +2 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +4 -4
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -3
- package/esm2022/admin/components/admin-metadata/shared/form-metadata/form-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.mjs +3 -5
- package/esm2022/admin/components/admin-metadata-user/admin-metadata-user.component.mjs +9 -10
- package/esm2022/admin/components/admin-metadata-user/admin-user-edit-metadata/admin-user-edit-metadata.component.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.mjs +7 -3
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.action.mjs +1 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.effects.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.mjs +8 -28
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.selector.mjs +2 -6
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +9 -10
- package/esm2022/admin/components/admin-user/admin-user.component.mjs +1 -1
- package/esm2022/admin/components/admin-user/store/admin-user.action.mjs +2 -11
- package/esm2022/admin/components/admin-user/store/admin-user.effects.mjs +1 -19
- package/esm2022/admin/components/admin-user/store/admin-user.reducer.mjs +2 -7
- package/esm2022/admin/components/admin-user/store/admin-user.selector.mjs +1 -3
- package/esm2022/admin/store/admin.effects.mjs +1 -1
- package/esm2022/admin/store/admin.service.mjs +1 -16
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +37 -21
- package/esm2022/components/metadata-editor/metadata-editor.module.mjs +5 -4
- package/esm2022/components/metadata-editor/public-api.mjs +2 -1
- package/esm2022/components/metadata-editor/store/metadata.action.mjs +14 -2
- package/esm2022/components/metadata-editor/store/metadata.effects.mjs +21 -1
- package/esm2022/components/metadata-editor/store/metadata.reducer.mjs +18 -2
- package/esm2022/components/metadata-editor/store/metadata.selector.mjs +6 -2
- package/esm2022/components/metadata-editor/store/metadata.service.mjs +21 -1
- package/esm2022/components/metadata-editor/style/css.component.mjs +11 -0
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +6 -3
- package/esm2022/dataset/i18n/en.translations.mjs +2 -1
- package/esm2022/dataset/i18n/fr.translations.mjs +3 -2
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/import/i18n/en.translations.mjs +4 -1
- package/esm2022/import/i18n/fr.translations.mjs +4 -1
- package/esm2022/import/store/import.effects.mjs +8 -1
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +10 -6
- package/esm2022/lib/core/components/snackbar/snackbar.service.mjs +1 -1
- 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/display-options.interface.mjs +1 -1
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/public-api.mjs +2 -1
- package/esm2022/lib/core/model/widget-vega-manifest.interface.mjs +2 -0
- package/esm2022/lib/core/store/config/config.effects.mjs +3 -3
- package/esm2022/lib/core/store/data-source/data-source.effects.mjs +4 -4
- package/esm2022/lib/core/store/relation-types/relation-types.effects.mjs +3 -2
- package/esm2022/lib/dashboard/components/context-menu/context-menu.component.mjs +1 -1
- package/esm2022/lib/dashboard/components/dashboard.component.mjs +11 -8
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.mjs +2 -6
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -4
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
- package/esm2022/restitution/components/restitution/restitution.component.mjs +1 -1
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +4 -4
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +3 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +16 -10
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +5 -5
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +23 -1
- package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +139 -0
- package/esm2022/widgets/widget-vega/i18n/en.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/i18n/fr.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.mjs +5 -0
- package/esm2022/widgets/widget-vega/public-api.mjs +3 -0
- package/esm2022/widgets/widget-vega/style/css.component.mjs +11 -0
- package/esm2022/widgets/widget-vega/widget-vega.module.mjs +68 -0
- package/fesm2022/provoly-dashboard-admin.mjs +122 -197
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +124 -28
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +10 -5
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +13 -0
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +3 -3
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +43 -14
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +235 -0
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -0
- package/fesm2022/provoly-dashboard.mjs +40 -31
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/i18n/en.translations.d.ts +3 -0
- package/import/i18n/fr.translations.d.ts +3 -0
- package/lib/core/i18n/en.translations.d.ts +1 -0
- package/lib/core/i18n/fr.translations.d.ts +1 -0
- package/lib/core/model/display-options.interface.d.ts +1 -1
- package/lib/core/model/manifest.interface.d.ts +2 -1
- package/lib/core/model/public-api.d.ts +1 -0
- package/lib/core/model/widget-vega-manifest.interface.d.ts +5 -0
- package/lib/dashboard/components/dashboard.component.d.ts +4 -4
- package/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.d.ts +1 -3
- package/lib/dashboard/store/dashboard.actions.d.ts +6 -4
- package/lib/dashboard/store/dashboard.effects.d.ts +2 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
- package/package.json +31 -25
- package/schematics/ng-add/index.js +7 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +2 -1
- package/styles/components/_o-tabs.scss +1 -7
- package/widgets/widget-map/component/widget-map.component.d.ts +3 -1
- package/widgets/widget-map/utils/xml-utils.class.d.ts +2 -0
- package/widgets/widget-vega/component/widget-vega.component.d.ts +37 -0
- package/widgets/widget-vega/i18n/en.translations.d.ts +10 -0
- package/widgets/widget-vega/i18n/fr.translations.d.ts +10 -0
- package/widgets/widget-vega/index.d.ts +5 -0
- package/widgets/widget-vega/public-api.d.ts +2 -0
- package/widgets/widget-vega/style/_o-widget-vega.scss +6 -0
- package/widgets/widget-vega/style/css.component.d.ts +5 -0
- package/widgets/widget-vega/widget-vega.module.d.ts +19 -0
|
@@ -16,7 +16,7 @@ import { applyStyle, applyBackground } from 'ol-mapbox-style';
|
|
|
16
16
|
import { getWidth, getTopLeft, createEmpty, boundingExtent } from 'ol/extent';
|
|
17
17
|
import { Heatmap, Tile } from 'ol/layer';
|
|
18
18
|
import VectorTileLayer from 'ol/layer/VectorTile';
|
|
19
|
-
import { toLonLat,
|
|
19
|
+
import { toLonLat, get, transform, fromLonLat } from 'ol/proj';
|
|
20
20
|
import { register } from 'ol/proj/proj4';
|
|
21
21
|
import { Vector, TileWMS, WMTS, XYZ, Cluster } from 'ol/source';
|
|
22
22
|
import proj4 from 'proj4';
|
|
@@ -307,16 +307,16 @@ class CqlUtils {
|
|
|
307
307
|
if (attributeName && cond.value && cond.value.length > 0) {
|
|
308
308
|
switch (cond.operator) {
|
|
309
309
|
case 'EQUALS':
|
|
310
|
-
conditions.push(`${attributeName}
|
|
310
|
+
conditions.push(`${attributeName}='${cond.value}'`);
|
|
311
311
|
break;
|
|
312
312
|
case 'CONTAINS':
|
|
313
|
-
conditions.push(`${attributeName} LIKE %${cond.value}
|
|
313
|
+
conditions.push(`${attributeName} LIKE '%${cond.value}%'`);
|
|
314
314
|
break;
|
|
315
315
|
case 'START_WITH':
|
|
316
|
-
conditions.push(`${attributeName} LIKE ${cond.value}
|
|
316
|
+
conditions.push(`${attributeName} LIKE '${cond.value}%'`);
|
|
317
317
|
break;
|
|
318
318
|
case 'END_WITH':
|
|
319
|
-
conditions.push(`${attributeName} LIKE %${cond.value}`);
|
|
319
|
+
conditions.push(`${attributeName} LIKE '%${cond.value}'`);
|
|
320
320
|
break;
|
|
321
321
|
case 'GREATER_THAN':
|
|
322
322
|
conditions.push(`${attributeName}>${cond.value}`);
|
|
@@ -509,6 +509,8 @@ class WidgetMapLayerService {
|
|
|
509
509
|
params: { LAYERS: layer.paramLayer, TILED: layer.paramTiled }
|
|
510
510
|
})
|
|
511
511
|
});
|
|
512
|
+
impl.set('url', layer.url);
|
|
513
|
+
impl.set('paramLayer', layer.paramLayer);
|
|
512
514
|
impl.set('oClass', layer.oClass);
|
|
513
515
|
impl.set('getFeatureInfoAdditionalParameters', layer.getFeatureInfoAdditionalParameters ?? {});
|
|
514
516
|
return impl;
|
|
@@ -919,6 +921,27 @@ class XMLUtils {
|
|
|
919
921
|
}
|
|
920
922
|
return null;
|
|
921
923
|
}
|
|
924
|
+
static getLayerExtent(paramLayer, map, doc) {
|
|
925
|
+
if (!doc) {
|
|
926
|
+
return null;
|
|
927
|
+
}
|
|
928
|
+
const matchingLayer = XMLUtils.getMatchingLayer(paramLayer, doc);
|
|
929
|
+
if (matchingLayer) {
|
|
930
|
+
const boundingBox = XMLUtils.find(matchingLayer.childNodes, 'BoundingBox');
|
|
931
|
+
if (boundingBox) {
|
|
932
|
+
// @ts-ignore
|
|
933
|
+
const attributes = boundingBox.attributes;
|
|
934
|
+
const projBox = get(attributes.CRS.textContent ?? 'CRS:84');
|
|
935
|
+
if (projBox) {
|
|
936
|
+
return [
|
|
937
|
+
transform([parseFloat(attributes.minx.textContent), parseFloat(attributes.miny.textContent)], projBox, map.getView().getProjection()),
|
|
938
|
+
transform([parseFloat(attributes.maxx.textContent), parseFloat(attributes.maxy.textContent)], projBox, map.getView().getProjection())
|
|
939
|
+
];
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
return null;
|
|
944
|
+
}
|
|
922
945
|
}
|
|
923
946
|
|
|
924
947
|
class PryWidgetMapCssComponent {
|
|
@@ -1011,6 +1034,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
1011
1034
|
}], ctorParameters: function () { return []; } });
|
|
1012
1035
|
|
|
1013
1036
|
const TOOLTIP_PADDING = 15;
|
|
1037
|
+
// Define Lambert Projection
|
|
1038
|
+
proj4.defs('EPSG:2154', '+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs');
|
|
1039
|
+
register(proj4);
|
|
1014
1040
|
class WidgetMapComponent extends DataWidgetComponent {
|
|
1015
1041
|
constructor(store, snackBar, translateService, tooltipFactoryService, overlay, viewContainerRef, symbolService, injector, widgetMapLayerService, el) {
|
|
1016
1042
|
super(store, el);
|
|
@@ -1082,7 +1108,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1082
1108
|
};
|
|
1083
1109
|
})
|
|
1084
1110
|
.map((layer) => layer);
|
|
1085
|
-
}), distinctUntilChanged((p, c) => equal(p, c)));
|
|
1111
|
+
}), distinctUntilChanged((p, c) => equal(p, c)), startWith([]));
|
|
1086
1112
|
this.autoDatasetLayers$ = combineLatest([
|
|
1087
1113
|
this.classes$,
|
|
1088
1114
|
this.fields$,
|
|
@@ -1258,7 +1284,6 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1258
1284
|
})), distinctUntilChanged())
|
|
1259
1285
|
.subscribe((view) => this.map.setView(new View(view)));
|
|
1260
1286
|
this.fitOption$ = this.options$.pipe(map((options) => !!options.fit), distinctUntilChanged());
|
|
1261
|
-
this.fitOption$.subscribe((fit) => this.fitMapForObjects(fit));
|
|
1262
1287
|
this.layers$ = combineLatest([
|
|
1263
1288
|
this.resultSet$,
|
|
1264
1289
|
this.options$,
|
|
@@ -1354,8 +1379,9 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1354
1379
|
this.mapStyleLayer$,
|
|
1355
1380
|
this.layers$,
|
|
1356
1381
|
this.fitOption$,
|
|
1357
|
-
this.selectedIds$.pipe(distinctUntilChanged((p, c) => equal(p, c)))
|
|
1358
|
-
|
|
1382
|
+
this.selectedIds$.pipe(distinctUntilChanged((p, c) => equal(p, c))),
|
|
1383
|
+
this.wmsCapabilities$
|
|
1384
|
+
]).subscribe(([mapStyleLayer, layers, fit, selectedIds, capabilities]) => {
|
|
1359
1385
|
const toApplyLayers = [...layers, ...mapStyleLayer];
|
|
1360
1386
|
this.map.setLayers(toApplyLayers);
|
|
1361
1387
|
this.map
|
|
@@ -1373,7 +1399,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1373
1399
|
}
|
|
1374
1400
|
});
|
|
1375
1401
|
setTimeout(() => {
|
|
1376
|
-
this.fitMapForObjects(fit, selectedIds);
|
|
1402
|
+
this.fitMapForObjects(fit, capabilities, selectedIds);
|
|
1377
1403
|
this.map.updateSize();
|
|
1378
1404
|
}, 200);
|
|
1379
1405
|
}));
|
|
@@ -1483,7 +1509,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1483
1509
|
}
|
|
1484
1510
|
}
|
|
1485
1511
|
}
|
|
1486
|
-
fitMapForObjects(fit, selectedIds) {
|
|
1512
|
+
fitMapForObjects(fit, wmsCapabilities = {}, selectedIds) {
|
|
1487
1513
|
if (fit) {
|
|
1488
1514
|
let extent = createEmpty();
|
|
1489
1515
|
const listOfMarkers = [];
|
|
@@ -1517,7 +1543,12 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1517
1543
|
}
|
|
1518
1544
|
});
|
|
1519
1545
|
});
|
|
1520
|
-
const
|
|
1546
|
+
const wmsLayersAvailableExtents = this.map
|
|
1547
|
+
.getAllLayers()
|
|
1548
|
+
.filter((layer) => layer.getSource() instanceof TileWMS)
|
|
1549
|
+
.map((layer) => XMLUtils.getLayerExtent(layer.getProperties()['paramLayer'], this.map, wmsCapabilities[layer.getProperties()['url']]?.doc))
|
|
1550
|
+
.filter((extent) => !!extent);
|
|
1551
|
+
const selectedExtent = boundingExtent(listOfMarkers.filter((coord) => !!coord).concat(...wmsLayersAvailableExtents));
|
|
1521
1552
|
if (selectedExtent[0] !== Infinity &&
|
|
1522
1553
|
selectedExtent[1] !== Infinity &&
|
|
1523
1554
|
selectedExtent[2] !== -Infinity &&
|
|
@@ -1698,8 +1729,6 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1698
1729
|
?.getVisible();
|
|
1699
1730
|
}
|
|
1700
1731
|
getFeatureFromServer(wmsLayers, pixel) {
|
|
1701
|
-
proj4.defs('EPSG:2154', '+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs');
|
|
1702
|
-
register(proj4);
|
|
1703
1732
|
const projGeo = get('EPSG:3857');
|
|
1704
1733
|
const projLambert = get('EPSG:2154');
|
|
1705
1734
|
if (projLambert && projGeo) {
|