@provoly/dashboard 0.11.0 → 0.11.1
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-abac-rules/store/abac-rules.effects.d.ts +2 -2
- package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +6 -6
- package/admin/components/admin-metadata/store/metadata.effects.d.ts +6 -6
- package/admin/components/admin-metadata-rules/store/metadata-rules.effects.d.ts +3 -3
- package/admin/components/admin-metadata-user/store/admin-metadata-user.effects.d.ts +6 -6
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/store/search/search.service.mjs +4 -2
- package/esm2022/lib/dashboard/components/widgets/data-widget.component.mjs +2 -3
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +21 -15
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +4 -4
- package/esm2022/widgets/widget-aggregated-chart/service/backend-aggregation.service.mjs +5 -3
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +4 -2
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +31 -23
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/model/filter.interface.d.ts +1 -1
- package/package.json +13 -13
- package/search/search-fulltext/store/search-fulltext.effects.d.ts +2 -2
- package/search/search-mono-class/store/search-mono-class.effects.d.ts +6 -6
- package/search/search-multi-class/store/search-multi-class.effects.d.ts +2 -2
|
@@ -3085,10 +3085,10 @@ const rank = createSelector(manifests, (manifests) => manifests?.tenants.indexOf
|
|
|
3085
3085
|
const currentManifestId = createSelector(manifests, (manifests) => manifests.currentId);
|
|
3086
3086
|
const globalManifest = createSelector(manifests,
|
|
3087
3087
|
// @ts-ignore
|
|
3088
|
-
(manifests) => ({ windows: [], ...manifests?.manifest }
|
|
3088
|
+
(manifests) => ({ windows: [], ...manifests?.manifest } ?? { windows: [] }));
|
|
3089
3089
|
const staticManifest = createSelector(manifests,
|
|
3090
3090
|
// @ts-ignore
|
|
3091
|
-
(manifests) => ({ windows: [], ...manifests?.staticManifest }
|
|
3091
|
+
(manifests) => ({ windows: [], ...manifests?.staticManifest } ?? { windows: [] }));
|
|
3092
3092
|
const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
|
|
3093
3093
|
const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
|
|
3094
3094
|
const gridLayout = createSelector(windowManifest, (manifest) => (manifest.grid ?? {}).layout ?? DashboardGridLayout.MANUAL);
|
|
@@ -3151,7 +3151,7 @@ const datasourceFilters = createSelector(feature$5, (state) => state?.manifests.
|
|
|
3151
3151
|
? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
|
|
3152
3152
|
attribute: attribute.id,
|
|
3153
3153
|
operator: filter.operator ?? '',
|
|
3154
|
-
value: filter.value
|
|
3154
|
+
value: filter.value
|
|
3155
3155
|
})),
|
|
3156
3156
|
obj), {})
|
|
3157
3157
|
: {});
|
|
@@ -3774,7 +3774,9 @@ class SearchService {
|
|
|
3774
3774
|
let filterFormed = '';
|
|
3775
3775
|
if (this.filters[id]) {
|
|
3776
3776
|
filterFormed = [];
|
|
3777
|
-
this.filters[id]
|
|
3777
|
+
this.filters[id]
|
|
3778
|
+
.filter((filter) => filter.value !== null && filter.value !== undefined)
|
|
3779
|
+
.forEach((filter) => {
|
|
3778
3780
|
filterFormed.push('filter=' + filter.attribute + ',' + filter.operator + ',' + filter.value);
|
|
3779
3781
|
});
|
|
3780
3782
|
filterFormed = '?' + filterFormed.join('&');
|
|
@@ -8448,15 +8450,15 @@ class DataWidgetComponent extends BaseWidgetComponent {
|
|
|
8448
8450
|
constructor(store, el) {
|
|
8449
8451
|
super(store, el);
|
|
8450
8452
|
this.staticResultSet$ = new BehaviorSubject(null);
|
|
8451
|
-
this.datasourceIds$ = this.manifest$.pipe(map
|
|
8453
|
+
this.datasourceIds$ = this.manifest$.pipe(map((manifest) => (Array.isArray(manifest.datasource) ? manifest.datasource : [manifest.datasource]).filter((id) => !!id)));
|
|
8452
8454
|
this.usedDatasources$ = combineLatest([
|
|
8453
8455
|
this.datasourceIds$,
|
|
8454
8456
|
this.store.select(DataSourceSelectors.getDataSources)
|
|
8455
|
-
]).pipe(map
|
|
8457
|
+
]).pipe(map(([ids, datasources]) => ids
|
|
8456
8458
|
.map((id) => datasources.find((ds) => ds.id === id) ?? id)
|
|
8457
8459
|
.map((nq) => (typeof nq !== 'string' ? nq : UNKNOWN_DATASOURCE(nq)))));
|
|
8458
8460
|
this.resultSet$ = this.initResultSet$();
|
|
8459
|
-
this.allItems$ = this.resultSet$.pipe(filter
|
|
8461
|
+
this.allItems$ = this.resultSet$.pipe(filter((resultSet) => !!resultSet), map((resultSet) => Object.keys(resultSet?.items)
|
|
8460
8462
|
.map((classId) => resultSet.items[classId])
|
|
8461
8463
|
.reduce((prev, curr) => [...prev, ...curr], [])));
|
|
8462
8464
|
}
|
|
@@ -8465,7 +8467,7 @@ class DataWidgetComponent extends BaseWidgetComponent {
|
|
|
8465
8467
|
this.store.select(DashboardSelectors.resultSets),
|
|
8466
8468
|
this.datasourceIds$,
|
|
8467
8469
|
this.staticResultSet$
|
|
8468
|
-
]).pipe(map
|
|
8470
|
+
]).pipe(map(([resultSets, resultSetNamesArray, staticResultSet]) => {
|
|
8469
8471
|
if (!!staticResultSet) {
|
|
8470
8472
|
return staticResultSet;
|
|
8471
8473
|
}
|
|
@@ -8477,7 +8479,7 @@ class DataWidgetComponent extends BaseWidgetComponent {
|
|
|
8477
8479
|
relations: [],
|
|
8478
8480
|
merged: resultSetArray.length
|
|
8479
8481
|
});
|
|
8480
|
-
}), distinctUntilChanged((p, v) => equal(p, v)));
|
|
8482
|
+
}), distinctUntilChanged$1((p, v) => equal(p, v)));
|
|
8481
8483
|
}
|
|
8482
8484
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: DataWidgetComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8483
8485
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: DataWidgetComponent, selector: "pry-data-widget", inputs: { staticResultSet: "staticResultSet" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
@@ -10293,22 +10295,28 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
10293
10295
|
filters: state.manifests.manifest.filters?.filter((filter) => filter.id !== action.id)
|
|
10294
10296
|
}
|
|
10295
10297
|
}
|
|
10296
|
-
})), on(DashboardActions.updateFilterValue, (state, action) =>
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
? { ...filter, value: action.value }
|
|
10306
|
-
: filter)
|
|
10307
|
-
]
|
|
10308
|
-
: []
|
|
10298
|
+
})), on(DashboardActions.updateFilterValue, (state, action) => {
|
|
10299
|
+
const filters = JSON.parse(JSON.stringify(state.manifests.manifest.filters ?? []));
|
|
10300
|
+
const filterToUpdate = filters.find((filter) => filter.id === action.id);
|
|
10301
|
+
if (filterToUpdate) {
|
|
10302
|
+
if (!action.value) {
|
|
10303
|
+
delete filterToUpdate.value;
|
|
10304
|
+
}
|
|
10305
|
+
else {
|
|
10306
|
+
filterToUpdate.value = action.value;
|
|
10309
10307
|
}
|
|
10310
10308
|
}
|
|
10311
|
-
|
|
10309
|
+
return {
|
|
10310
|
+
...state,
|
|
10311
|
+
manifests: {
|
|
10312
|
+
...state.manifests,
|
|
10313
|
+
manifest: {
|
|
10314
|
+
...state.manifests.manifest,
|
|
10315
|
+
filters
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
};
|
|
10319
|
+
}), on(DashboardActions.getWmsFeatures, (state, action) => ({
|
|
10312
10320
|
...state,
|
|
10313
10321
|
wmsFeatures: []
|
|
10314
10322
|
})), on(DashboardActions.addWmsFeatures, (state, action) => ({
|