@provoly/dashboard 0.18.5 → 0.18.6
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/dataset/style/_o-pry-dataset-card.scss +0 -1
- package/dataset/style/_o-pry-dataset-detail.scss +4 -0
- package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +3 -3
- package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +3 -3
- package/esm2022/dataset/components/dataset.component.mjs +3 -3
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/filters/date/date-filter.component.mjs +8 -4
- package/esm2022/filters/list/list-filter.component.mjs +4 -3
- package/esm2022/filters/number/number-filter.component.mjs +3 -3
- package/esm2022/filters/text/text-filter.component.mjs +3 -3
- package/esm2022/lib/core/store/search/search.effects.mjs +2 -2
- package/esm2022/lib/dashboard/filter/base-filter.component.mjs +4 -1
- package/esm2022/lib/dashboard/item-utils.mjs +1 -60
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +3 -4
- package/esm2022/presentation/components/presentation.component.mjs +1 -3
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +39 -38
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +12 -12
- package/esm2022/widgets/widget-map/pipe/widget-map-geometry-fields-for.pipe.mjs +3 -3
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +262 -216
- package/fesm2022/provoly-dashboard-admin.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +6 -6
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-date.mjs +7 -3
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-list.mjs +3 -2
- package/fesm2022/provoly-dashboard-filters-list.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-number.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-filters-text.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +0 -2
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +377 -331
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +34 -90
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/filters/date/date-filter.component.d.ts +1 -0
- package/lib/dashboard/filter/base-filter.component.d.ts +4 -2
- package/lib/dashboard/item-utils.d.ts +0 -8
- package/lib/dashboard/store/dashboard.effects.d.ts +0 -3
- package/package.json +7 -7
- package/styles/components/_a-table.scss +1 -1
- package/styles/components/_m-filter.scss +23 -23
- package/styles/components/_m-form-label-field.scss +6 -0
- package/styles-theme/components-theme/_m-filter.theme.scss +19 -4
- package/widgets/widget-map/utils/widget-map.utils.d.ts +23 -17
|
@@ -22,8 +22,6 @@ import { distinctUntilChanged, filter as filter$1, debounceTime as debounceTime$
|
|
|
22
22
|
import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
|
|
23
23
|
import * as i5 from '@angular/cdk/a11y';
|
|
24
24
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
25
|
-
import { GeoJSON } from 'ol/format';
|
|
26
|
-
import { fromLonLat } from 'ol/proj';
|
|
27
25
|
import * as i1$4 from '@angular/cdk/accordion';
|
|
28
26
|
import { CdkAccordionModule } from '@angular/cdk/accordion';
|
|
29
27
|
import * as i3$1 from '@angular/forms';
|
|
@@ -4357,93 +4355,8 @@ const ItemActions = {
|
|
|
4357
4355
|
createFailure: createAction('[Item] create failure', props())
|
|
4358
4356
|
};
|
|
4359
4357
|
|
|
4360
|
-
var FieldType;
|
|
4361
|
-
(function (FieldType) {
|
|
4362
|
-
FieldType["STRING"] = "string";
|
|
4363
|
-
FieldType["KEYWORD"] = "keyword";
|
|
4364
|
-
FieldType["INTEGER"] = "integer";
|
|
4365
|
-
FieldType["DECIMAL"] = "decimal";
|
|
4366
|
-
FieldType["INSTANT"] = "instant";
|
|
4367
|
-
FieldType["LONG"] = "long";
|
|
4368
|
-
FieldType["RAW"] = "raw";
|
|
4369
|
-
FieldType["POINT"] = "Point";
|
|
4370
|
-
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4371
|
-
FieldType["LINE"] = "LineString";
|
|
4372
|
-
FieldType["MULTILINE"] = "MultiLineString";
|
|
4373
|
-
FieldType["POLYGON"] = "Polygon";
|
|
4374
|
-
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4375
|
-
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4376
|
-
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4377
|
-
FieldType["DATASET"] = "test";
|
|
4378
|
-
})(FieldType || (FieldType = {}));
|
|
4379
|
-
const GeometricFieldTypes = [
|
|
4380
|
-
FieldType.POINT,
|
|
4381
|
-
FieldType.MULTIPOINT,
|
|
4382
|
-
FieldType.LINE,
|
|
4383
|
-
FieldType.MULTILINE,
|
|
4384
|
-
FieldType.POLYGON,
|
|
4385
|
-
FieldType.MULTIPOLYGON,
|
|
4386
|
-
FieldType.GEOMETRYCOLLECTION
|
|
4387
|
-
];
|
|
4388
|
-
|
|
4389
4358
|
const hiddenFieldText = '*********';
|
|
4390
4359
|
class ItemUtils {
|
|
4391
|
-
static readGeometry(item, type, attribute) {
|
|
4392
|
-
if (!attribute || !item.attributes[attribute.name]) {
|
|
4393
|
-
// @ts-ignore
|
|
4394
|
-
return null;
|
|
4395
|
-
}
|
|
4396
|
-
let value = item.attributes[attribute.name];
|
|
4397
|
-
if (value.type === 'MULTI') {
|
|
4398
|
-
value = value.values[0];
|
|
4399
|
-
}
|
|
4400
|
-
return new GeoJSON().readGeometry(this.projectGeometry(value.value));
|
|
4401
|
-
}
|
|
4402
|
-
static projectGeometry(geometry) {
|
|
4403
|
-
return {
|
|
4404
|
-
...geometry,
|
|
4405
|
-
coordinates: typeof geometry.coordinates[0] === 'number'
|
|
4406
|
-
? fromLonLat(geometry.coordinates)
|
|
4407
|
-
: geometry.coordinates.map((sub) => this.projectGeometry({ type: '', coordinates: sub }).coordinates)
|
|
4408
|
-
};
|
|
4409
|
-
}
|
|
4410
|
-
static readLocations(item, type) {
|
|
4411
|
-
const points = [];
|
|
4412
|
-
Object.entries(item.attributes).forEach(([key, value]) => {
|
|
4413
|
-
if (value.type === 'VALUE') {
|
|
4414
|
-
this.extractGeometries(value, points, type);
|
|
4415
|
-
}
|
|
4416
|
-
else {
|
|
4417
|
-
value.values.forEach((value) => {
|
|
4418
|
-
this.extractGeometries(value, points, type);
|
|
4419
|
-
});
|
|
4420
|
-
}
|
|
4421
|
-
});
|
|
4422
|
-
return points;
|
|
4423
|
-
}
|
|
4424
|
-
static extractGeometries(value, points, type) {
|
|
4425
|
-
const valueSimple = value.value;
|
|
4426
|
-
if (typeof valueSimple !== 'string' && typeof valueSimple !== 'number') {
|
|
4427
|
-
if (type === 'point' && valueSimple.type === FieldType.POINT) {
|
|
4428
|
-
points.push(valueSimple.coordinates);
|
|
4429
|
-
}
|
|
4430
|
-
if (type === 'point' && valueSimple.type === FieldType.MULTIPOINT) {
|
|
4431
|
-
points.push(...valueSimple.coordinates);
|
|
4432
|
-
}
|
|
4433
|
-
if (type === 'line' && valueSimple.type === FieldType.LINE) {
|
|
4434
|
-
points.push(valueSimple.coordinates);
|
|
4435
|
-
}
|
|
4436
|
-
if (type === 'line' && valueSimple.type === FieldType.MULTILINE) {
|
|
4437
|
-
points.push(...valueSimple.coordinates);
|
|
4438
|
-
}
|
|
4439
|
-
if (type === 'polygon' && valueSimple.type === FieldType.POLYGON) {
|
|
4440
|
-
points.push(valueSimple.coordinates);
|
|
4441
|
-
}
|
|
4442
|
-
if (type === 'polygon' && valueSimple.type === FieldType.MULTIPOLYGON) {
|
|
4443
|
-
points.push(...valueSimple.coordinates);
|
|
4444
|
-
}
|
|
4445
|
-
}
|
|
4446
|
-
}
|
|
4447
4360
|
static getAttributeValue(item, attribute) {
|
|
4448
4361
|
if (!attribute) {
|
|
4449
4362
|
return undefined;
|
|
@@ -4764,7 +4677,7 @@ class SearchEffects {
|
|
|
4764
4677
|
id: props.id,
|
|
4765
4678
|
params: this.searchService.getItemsSerializedParams(props.id, quickOrder)
|
|
4766
4679
|
})), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
|
|
4767
|
-
this.updateAggregatesInWidget$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), filter((props) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), tap$1((props) =>
|
|
4680
|
+
this.updateAggregatesInWidget$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), filter((props) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), tap$1((props) => window.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: props.id })))), { dispatch: false });
|
|
4768
4681
|
this.search$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.search), mergeMap((props) => this.searchService.search(props.payload).pipe(map((resultSet) => SearchActions.searchSuccess({ resultSet, id: props.id })), catchError$1((error) => [SearchActions.searchFailure({ error })])))));
|
|
4769
4682
|
this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map((action) => DashboardActions.updateResultSet({
|
|
4770
4683
|
id: action.id ?? DEFAULT_NAMED_QUERY_ID,
|
|
@@ -5061,6 +4974,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
5061
4974
|
}]
|
|
5062
4975
|
}], ctorParameters: function () { return [{ type: PryI18nService }]; } });
|
|
5063
4976
|
|
|
4977
|
+
var FieldType;
|
|
4978
|
+
(function (FieldType) {
|
|
4979
|
+
FieldType["STRING"] = "string";
|
|
4980
|
+
FieldType["KEYWORD"] = "keyword";
|
|
4981
|
+
FieldType["INTEGER"] = "integer";
|
|
4982
|
+
FieldType["DECIMAL"] = "decimal";
|
|
4983
|
+
FieldType["INSTANT"] = "instant";
|
|
4984
|
+
FieldType["LONG"] = "long";
|
|
4985
|
+
FieldType["RAW"] = "raw";
|
|
4986
|
+
FieldType["POINT"] = "Point";
|
|
4987
|
+
FieldType["MULTIPOINT"] = "MultiPoint";
|
|
4988
|
+
FieldType["LINE"] = "LineString";
|
|
4989
|
+
FieldType["MULTILINE"] = "MultiLineString";
|
|
4990
|
+
FieldType["POLYGON"] = "Polygon";
|
|
4991
|
+
FieldType["MULTIPOLYGON"] = "MultiPolygon";
|
|
4992
|
+
FieldType["GEOMETRYCOLLECTION"] = "GeometryCollection";
|
|
4993
|
+
FieldType["OCLASS"] = "mod\u00E8le de donn\u00E9es";
|
|
4994
|
+
FieldType["DATASET"] = "test";
|
|
4995
|
+
})(FieldType || (FieldType = {}));
|
|
4996
|
+
const GeometricFieldTypes = [
|
|
4997
|
+
FieldType.POINT,
|
|
4998
|
+
FieldType.MULTIPOINT,
|
|
4999
|
+
FieldType.LINE,
|
|
5000
|
+
FieldType.MULTILINE,
|
|
5001
|
+
FieldType.POLYGON,
|
|
5002
|
+
FieldType.MULTIPOLYGON,
|
|
5003
|
+
FieldType.GEOMETRYCOLLECTION
|
|
5004
|
+
];
|
|
5005
|
+
|
|
5064
5006
|
const feature$2 = createFeatureSelector(searchFeatureKey);
|
|
5065
5007
|
const searchLoading = createSelector(feature$2, (state) => state.searchLoading);
|
|
5066
5008
|
const SearchSelectors = {
|
|
@@ -10013,6 +9955,9 @@ class BaseFilterComponent extends SubscriptionnerDirective {
|
|
|
10013
9955
|
this.store = store;
|
|
10014
9956
|
this.type = 'base';
|
|
10015
9957
|
}
|
|
9958
|
+
ngOnInit() {
|
|
9959
|
+
this._value = this.filter?.value;
|
|
9960
|
+
}
|
|
10016
9961
|
updateFilter(value) {
|
|
10017
9962
|
this._value = value;
|
|
10018
9963
|
}
|
|
@@ -10708,8 +10653,7 @@ class DashboardEffects {
|
|
|
10708
10653
|
this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map$1((action) => SearchActions.getDatasourceItems({ id: action.datasourceId }))));
|
|
10709
10654
|
this.propagateGridLayout$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.windowManifest)), map$1(([action, rank, windowManifest]) => DashboardActions.propagateGridLayout({ manifest: windowManifest, rank }))));
|
|
10710
10655
|
this.toggleEditionModeIfNotManual$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), filter$1((action) => action.layout !== DashboardGridLayout.MANUAL), map$1(() => DashboardActions.toggleEditionMode({ force: false }))));
|
|
10711
|
-
this.
|
|
10712
|
-
this.dispatchFilters$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.filters), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), switchMap(([action, filters, resultSets, resultSetsParams, quickOrder]) => {
|
|
10656
|
+
this.dispatchFilters$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.filters), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), mergeMap$1(([action, filters, resultSets, resultSetsParams, quickOrder]) => {
|
|
10713
10657
|
return [
|
|
10714
10658
|
...new Set(filters
|
|
10715
10659
|
.map((f) => f.attributes)
|