@provoly/dashboard 0.14.10 → 0.14.12
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/admin.module.d.ts +2 -1
- package/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.d.ts +1 -0
- package/admin/components/admin-classes/store/admin-class.actions.d.ts +11 -0
- package/admin/components/admin-classes/store/admin-class.effects.d.ts +5 -0
- package/admin/components/admin-classes/store/admin-class.reducer.d.ts +1 -0
- package/admin/components/admin-classes/store/admin-class.selectors.d.ts +1 -0
- package/admin/i18n/en.translations.d.ts +11 -0
- package/admin/i18n/fr.translations.d.ts +11 -0
- package/admin/store/admin.service.d.ts +1 -0
- package/esm2022/admin/admin.module.mjs +8 -4
- package/esm2022/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.mjs +8 -4
- package/esm2022/admin/components/admin-classes/store/admin-class.actions.mjs +5 -2
- package/esm2022/admin/components/admin-classes/store/admin-class.effects.mjs +4 -1
- package/esm2022/admin/components/admin-classes/store/admin-class.reducer.mjs +6 -2
- package/esm2022/admin/components/admin-classes/store/admin-class.selectors.mjs +4 -2
- package/esm2022/admin/i18n/en.translations.mjs +12 -1
- package/esm2022/admin/i18n/fr.translations.mjs +13 -2
- package/esm2022/admin/store/admin.service.mjs +6 -1
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -2
- package/esm2022/dataset/i18n/fr.translations.mjs +2 -2
- package/esm2022/lib/core/components/about/about.component.mjs +14 -9
- package/esm2022/lib/core/i18n/en.translations.mjs +4 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +4 -2
- package/esm2022/lib/core/model/widget-aggregated-chart-manifest.interface.mjs +2 -1
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +2 -1
- package/esm2022/lib/core/public-api.mjs +4 -1
- package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +101 -0
- package/esm2022/lib/core/store/aggregation/base-aggregation.service.mjs +16 -0
- package/esm2022/lib/core/store/aggregation/frontend-aggregation.service.mjs +210 -0
- package/esm2022/lib/core/store/class/class.interface.mjs +1 -1
- package/esm2022/lib/core/store/config/config.reducer.mjs +2 -2
- package/esm2022/lib/core/store/config/config.service.mjs +13 -13
- package/esm2022/lib/core/store/config/versions.interface.mjs +1 -1
- package/esm2022/lib/core/store/context-menu/context-menu.actions.mjs +1 -1
- package/esm2022/lib/core/store/context-menu/context-menu.reducer.mjs +5 -3
- package/esm2022/lib/core/store/context-menu/context-menu.selectors.mjs +4 -2
- package/esm2022/lib/core/store/field/field.interface.mjs +1 -1
- package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +15 -1
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -2
- package/esm2022/lib/dashboard/components/context-menu/context-menu.component.mjs +23 -17
- package/esm2022/lib/dashboard/components/context-menu/object-edition/object-edition.component.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -3
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +5 -3
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +5 -4
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +8 -9
- package/esm2022/widgets/widget-aggregated-chart/public-api.mjs +1 -4
- package/esm2022/widgets/widget-aggregated-chart/widget-aggregated-chart.module.mjs +2 -3
- package/esm2022/widgets/widget-detail/component/widget-detail.component.mjs +2 -2
- package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +3 -2
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +2 -1
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +66 -31
- package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +3 -2
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +3 -2
- package/esm2022/widgets/widget-table/component/widget-table.component.mjs +47 -52
- package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +3 -2
- package/esm2022/widgets/widget-vega/i18n/en.translations.mjs +4 -2
- package/esm2022/widgets/widget-vega/i18n/fr.translations.mjs +4 -2
- package/fesm2022/provoly-dashboard-admin.mjs +56 -10
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +3 -2
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +4 -3
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +10 -313
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +2 -1
- package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +69 -32
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +47 -52
- package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +2 -1
- package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +6 -2
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +439 -101
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/about/about.component.d.ts +3 -1
- package/lib/core/i18n/en.translations.d.ts +2 -0
- package/lib/core/i18n/fr.translations.d.ts +2 -0
- package/lib/core/model/widget-aggregated-chart-manifest.interface.d.ts +2 -1
- package/lib/core/model/widget-map-manifest.interface.d.ts +1 -0
- package/lib/core/public-api.d.ts +3 -0
- package/{widgets/widget-aggregated-chart/service → lib/core/store/aggregation}/backend-aggregation.service.d.ts +4 -1
- package/{widgets/widget-aggregated-chart/service → lib/core/store/aggregation}/base-aggregation.service.d.ts +14 -1
- package/{widgets/widget-aggregated-chart/service → lib/core/store/aggregation}/frontend-aggregation.service.d.ts +3 -2
- package/lib/core/store/class/class.interface.d.ts +1 -0
- package/lib/core/store/config/config.service.d.ts +2 -1
- package/lib/core/store/config/versions.interface.d.ts +3 -3
- package/lib/core/store/context-menu/context-menu.actions.d.ts +2 -0
- package/lib/core/store/context-menu/context-menu.reducer.d.ts +1 -0
- package/lib/core/store/context-menu/context-menu.selectors.d.ts +1 -0
- package/lib/core/store/field/field.interface.d.ts +1 -0
- package/lib/dashboard/components/context-menu/context-menu.component.d.ts +1 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +6 -1
- package/package.json +7 -7
- package/styles/base/_utils.scss +4 -0
- package/styles/components/_o-pry-admin-classes-customize.scss +6 -4
- package/toolbox/components/save-view/save-view.component.d.ts +2 -1
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +1 -7
- package/widgets/widget-aggregated-chart/public-api.d.ts +0 -3
- package/widgets/widget-map/component/widget-map.component.d.ts +12 -3
- package/widgets/widget-table/component/widget-table.component.d.ts +6 -1
- package/widgets/widget-vega/i18n/en.translations.d.ts +2 -0
- package/widgets/widget-vega/i18n/fr.translations.d.ts +2 -0
- package/esm2022/widgets/widget-aggregated-chart/service/backend-aggregation.service.mjs +0 -96
- package/esm2022/widgets/widget-aggregated-chart/service/base-aggregation.service.mjs +0 -16
- package/esm2022/widgets/widget-aggregated-chart/service/frontend-aggregation.service.mjs +0 -206
|
@@ -191,7 +191,8 @@ const enTranslations$1 = {
|
|
|
191
191
|
replay: 'Version replay : {{value}}',
|
|
192
192
|
exec: 'Version Execution : {{value}}',
|
|
193
193
|
transfo: 'Version Transformation : {{value}}',
|
|
194
|
-
monitor: 'Version Supervision : {{value}}'
|
|
194
|
+
monitor: 'Version Supervision : {{value}}',
|
|
195
|
+
noVersion: 'Version not found'
|
|
195
196
|
},
|
|
196
197
|
header: {
|
|
197
198
|
noCurrentPresentation: 'Presentation not saved'
|
|
@@ -305,6 +306,7 @@ const enTranslations$1 = {
|
|
|
305
306
|
radarchart: 'Radar',
|
|
306
307
|
circlechart: 'Circle packing',
|
|
307
308
|
iframe: 'External application',
|
|
309
|
+
vega: 'Advanced chart',
|
|
308
310
|
graph: 'Graph',
|
|
309
311
|
placeholder: '',
|
|
310
312
|
sub: {
|
|
@@ -533,7 +535,8 @@ const frTranslations$1 = {
|
|
|
533
535
|
replay: 'Rejeu version : ',
|
|
534
536
|
exec: 'Exécution version : ',
|
|
535
537
|
transfo: 'Transformation version : ',
|
|
536
|
-
monitor: 'Supervision version : '
|
|
538
|
+
monitor: 'Supervision version : ',
|
|
539
|
+
noVersion: 'Version non trouvée'
|
|
537
540
|
},
|
|
538
541
|
header: {
|
|
539
542
|
noCurrentPresentation: 'Présentation non sauvegardée'
|
|
@@ -647,6 +650,7 @@ const frTranslations$1 = {
|
|
|
647
650
|
radarchart: 'Radar',
|
|
648
651
|
circlechart: 'Paquets de cercles',
|
|
649
652
|
iframe: 'Application externe',
|
|
653
|
+
vega: 'Graphique avancé',
|
|
650
654
|
graph: 'Relations',
|
|
651
655
|
placeholder: '',
|
|
652
656
|
sub: {
|
|
@@ -1530,7 +1534,7 @@ const initialConfigState = {
|
|
|
1530
1534
|
mapStyles: [],
|
|
1531
1535
|
availableColors: defaultColors,
|
|
1532
1536
|
overlayList: [],
|
|
1533
|
-
breakpoint:
|
|
1537
|
+
breakpoint: 700,
|
|
1534
1538
|
defaultViewUsed: false,
|
|
1535
1539
|
catalog: [],
|
|
1536
1540
|
chartOption: ChartOptionDefault,
|
|
@@ -2266,7 +2270,7 @@ const frTranslations = {
|
|
|
2266
2270
|
ELASTIC_SEARCH: "Erreur d'insertion pour l'élément {{recordId}}",
|
|
2267
2271
|
NO_VALUES: 'Pas de valeur pour la ligne {{recordId}}',
|
|
2268
2272
|
FORMAT_FILE_ERROR: "Le format du fichier transmis n'est pas géré",
|
|
2269
|
-
NO_ATTRIBUTES: "Les données importées ne correspondent pas au modèle de données
|
|
2273
|
+
NO_ATTRIBUTES: "Les données importées ne correspondent pas au modèle de données indiqué en cible de l'import"
|
|
2270
2274
|
}
|
|
2271
2275
|
},
|
|
2272
2276
|
tooltip: {
|
|
@@ -3609,7 +3613,7 @@ class ConfigService {
|
|
|
3609
3613
|
* Get a list of all widgets from catalog
|
|
3610
3614
|
*/
|
|
3611
3615
|
getAllWidgets() {
|
|
3612
|
-
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/widget/catalog`))), catchError((error) => {
|
|
3616
|
+
return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/widget/catalog`))), catchError$1((error) => {
|
|
3613
3617
|
if (error.error instanceof Error) {
|
|
3614
3618
|
// A client-side or network error occurred
|
|
3615
3619
|
if (ConfigService.warn) {
|
|
@@ -3637,6 +3641,9 @@ class ConfigService {
|
|
|
3637
3641
|
return of([]);
|
|
3638
3642
|
}));
|
|
3639
3643
|
}
|
|
3644
|
+
handleBackendVersionError(obs) {
|
|
3645
|
+
return obs.pipe(catchError$1(() => of({})));
|
|
3646
|
+
}
|
|
3640
3647
|
getAllVersions() {
|
|
3641
3648
|
return combineLatest([
|
|
3642
3649
|
this.store.select(ConfigSelectors.refUrl),
|
|
@@ -3647,17 +3654,15 @@ class ConfigService {
|
|
|
3647
3654
|
this.store.select(ConfigSelectors.monitorUrl)
|
|
3648
3655
|
]).pipe(mergeMap(([ref, data, replay, exec, transfo, monitor]) => {
|
|
3649
3656
|
const allVersions = [
|
|
3650
|
-
this.httpClient.get(encodeURI(`${ref}/about/version`)),
|
|
3651
|
-
this.httpClient.get(encodeURI(`${data}/about/version`)),
|
|
3652
|
-
this.httpClient.get(encodeURI(`${replay}/about/version`)),
|
|
3653
|
-
this.httpClient.get(encodeURI(`${exec}/about/version`)),
|
|
3654
|
-
this.httpClient.get(encodeURI(`${transfo}/about/version`)),
|
|
3655
|
-
this.httpClient.get(encodeURI(`${monitor}/about/version`)),
|
|
3656
|
-
this.httpClient
|
|
3657
|
-
.get(encodeURI(`/assets/pry.version`))
|
|
3658
|
-
.pipe(map((version) => ({ libVersion: version })))
|
|
3657
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${ref}/about/version`))),
|
|
3658
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${data}/about/version`))),
|
|
3659
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${replay}/about/version`))),
|
|
3660
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${exec}/about/version`))),
|
|
3661
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${transfo}/about/version`))),
|
|
3662
|
+
this.handleBackendVersionError(this.httpClient.get(encodeURI(`${monitor}/about/version`))),
|
|
3663
|
+
this.httpClient.get(encodeURI(`/assets/pry.version`)).pipe(map((version) => (version ? { libVersion: version } : {})), catchError$1(() => of({})))
|
|
3659
3664
|
];
|
|
3660
|
-
return
|
|
3665
|
+
return combineLatest(allVersions).pipe(map(([refVersion, dataVersion, replayVersion, execVersion, tranfoVersion, monitorVersion, frontend]) => {
|
|
3661
3666
|
const versions = {
|
|
3662
3667
|
ref: refVersion,
|
|
3663
3668
|
data: dataVersion,
|
|
@@ -3839,7 +3844,8 @@ const initialContextMenuState = {
|
|
|
3839
3844
|
itemId: '',
|
|
3840
3845
|
from: '',
|
|
3841
3846
|
resultSet: undefined,
|
|
3842
|
-
coordinates: undefined
|
|
3847
|
+
coordinates: undefined,
|
|
3848
|
+
allowObjectCreation: false
|
|
3843
3849
|
};
|
|
3844
3850
|
const contextMenuReducer = createReducer(initialContextMenuState, on(ContextMenuActions.open, (state, action) => ({
|
|
3845
3851
|
...state,
|
|
@@ -3849,7 +3855,8 @@ const contextMenuReducer = createReducer(initialContextMenuState, on(ContextMenu
|
|
|
3849
3855
|
itemId: action.itemId,
|
|
3850
3856
|
resultSet: action.resultSet,
|
|
3851
3857
|
from: action.from,
|
|
3852
|
-
coordinates: action.coordinates
|
|
3858
|
+
coordinates: action.coordinates,
|
|
3859
|
+
allowObjectCreation: action.allowObjectCreation
|
|
3853
3860
|
})), on(ContextMenuActions.hide, (state, action) => ({
|
|
3854
3861
|
...state,
|
|
3855
3862
|
opened: false,
|
|
@@ -3948,7 +3955,8 @@ const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.w
|
|
|
3948
3955
|
.reduce((p, c) => [...p, ...c], [])
|
|
3949
3956
|
.reduce((p, c) => ({ ...p, [c.rsName ?? '']: [...(p[c.rsName ?? ''] || []), { ...c }] }), {}));
|
|
3950
3957
|
const presentation = createSelector(feature$4, (state) => state?.presentation);
|
|
3951
|
-
const
|
|
3958
|
+
const isCurrentPresentationModified = createSelector(presentation, globalManifest, (state, global) => !equal(global, state.initial));
|
|
3959
|
+
const isCurrentPresentationOwner = createSelector(presentation, (state) => !!state.current && state.current.owner);
|
|
3952
3960
|
const filters = createSelector(feature$4, (state) => state?.manifests.manifest.filters ?? {});
|
|
3953
3961
|
const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.manifest.filters
|
|
3954
3962
|
? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
|
|
@@ -3993,7 +4001,8 @@ const DashboardSelectors = {
|
|
|
3993
4001
|
quickOrder,
|
|
3994
4002
|
presentation,
|
|
3995
4003
|
filters,
|
|
3996
|
-
|
|
4004
|
+
isCurrentPresentationModified,
|
|
4005
|
+
isCurrentPresentationOwner,
|
|
3997
4006
|
datasourceFilters,
|
|
3998
4007
|
wmsFeatures,
|
|
3999
4008
|
displayOptions,
|
|
@@ -4413,6 +4422,7 @@ const itemId = createSelector(feature$3, (state) => state.itemId);
|
|
|
4413
4422
|
const from = createSelector(feature$3, (state) => state.from);
|
|
4414
4423
|
const coordinates = createSelector(feature$3, (state) => state.coordinates);
|
|
4415
4424
|
const resultSet = createSelector(feature$3, (state) => state.resultSet);
|
|
4425
|
+
const allowObjectCreation = createSelector(feature$3, (state) => state.allowObjectCreation);
|
|
4416
4426
|
const ContextMenuSelectors = {
|
|
4417
4427
|
feature: feature$3,
|
|
4418
4428
|
opened,
|
|
@@ -4420,7 +4430,8 @@ const ContextMenuSelectors = {
|
|
|
4420
4430
|
itemId,
|
|
4421
4431
|
resultSet,
|
|
4422
4432
|
from,
|
|
4423
|
-
coordinates
|
|
4433
|
+
coordinates,
|
|
4434
|
+
allowObjectCreation
|
|
4424
4435
|
};
|
|
4425
4436
|
|
|
4426
4437
|
const ItemActions = {
|
|
@@ -5168,6 +5179,362 @@ const RelationTypesSelectors = {
|
|
|
5168
5179
|
openDeleteModale
|
|
5169
5180
|
};
|
|
5170
5181
|
|
|
5182
|
+
class PryAggregationService {
|
|
5183
|
+
aggregate(datasource, options) {
|
|
5184
|
+
throw new Error('You must declare the use of an aggregation service. Add PryBackendAggregationService, PryFrontendAggregationService or a custom service');
|
|
5185
|
+
}
|
|
5186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAggregationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5187
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAggregationService, providedIn: 'root' }); }
|
|
5188
|
+
}
|
|
5189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAggregationService, decorators: [{
|
|
5190
|
+
type: Injectable,
|
|
5191
|
+
args: [{
|
|
5192
|
+
providedIn: 'root'
|
|
5193
|
+
}]
|
|
5194
|
+
}] });
|
|
5195
|
+
|
|
5196
|
+
var Operation;
|
|
5197
|
+
(function (Operation) {
|
|
5198
|
+
Operation["NONE"] = "none";
|
|
5199
|
+
Operation["COUNT"] = "count";
|
|
5200
|
+
Operation["SUM"] = "sum";
|
|
5201
|
+
Operation["DISTINCT"] = "cardinality";
|
|
5202
|
+
Operation["AVERAGE"] = "avg";
|
|
5203
|
+
Operation["MEDIAN"] = "median";
|
|
5204
|
+
Operation["Q1"] = "q1";
|
|
5205
|
+
Operation["Q3"] = "q3";
|
|
5206
|
+
Operation["MIN"] = "min";
|
|
5207
|
+
Operation["MAX"] = "max";
|
|
5208
|
+
Operation["EXTENT"] = "extent";
|
|
5209
|
+
})(Operation || (Operation = {}));
|
|
5210
|
+
var GraphType;
|
|
5211
|
+
(function (GraphType) {
|
|
5212
|
+
GraphType["AREA"] = "area-default";
|
|
5213
|
+
GraphType["AREA_WITH_LINES_AND_POINTS"] = "area-with-lines-and-points";
|
|
5214
|
+
GraphType["BAR"] = "bar-default";
|
|
5215
|
+
GraphType["CIRCULAR"] = "arc-default";
|
|
5216
|
+
GraphType["CURVE"] = "line-default";
|
|
5217
|
+
GraphType["CURVE_WITH_POINTS"] = "line-with-points";
|
|
5218
|
+
GraphType["DONUT"] = "arc-donut";
|
|
5219
|
+
GraphType["HISTOGRAM"] = "bar-histogram";
|
|
5220
|
+
GraphType["POINTS"] = "point-default";
|
|
5221
|
+
})(GraphType || (GraphType = {}));
|
|
5222
|
+
|
|
5223
|
+
class PryBackendAggregationService extends PryAggregationService {
|
|
5224
|
+
constructor(store, snackBar, translateService, httpClient, searchService) {
|
|
5225
|
+
super();
|
|
5226
|
+
this.store = store;
|
|
5227
|
+
this.snackBar = snackBar;
|
|
5228
|
+
this.translateService = translateService;
|
|
5229
|
+
this.httpClient = httpClient;
|
|
5230
|
+
this.searchService = searchService;
|
|
5231
|
+
this.rs = {};
|
|
5232
|
+
this.classes = [];
|
|
5233
|
+
this.fields = [];
|
|
5234
|
+
this.filters = {};
|
|
5235
|
+
this.store.select(DashboardSelectors.resultSets).subscribe((rs) => (this.rs = rs));
|
|
5236
|
+
this.store.select(ClassSelectors.classes).subscribe((classes) => (this.classes = classes));
|
|
5237
|
+
this.store.select(FieldSelectors.fields).subscribe((fields) => (this.fields = fields));
|
|
5238
|
+
this.store.select(DashboardSelectors.datasourceFilters).subscribe((filters) => (this.filters = filters));
|
|
5239
|
+
}
|
|
5240
|
+
aggregate(datasources, options) {
|
|
5241
|
+
const targetDatasource = datasources.find((ds) => ![DEFAULT_NAMED_QUERY_ID, EXPLORE_NAMED_QUERY_ID].includes(ds));
|
|
5242
|
+
if (datasources.length > 1) {
|
|
5243
|
+
this.snackBar.open({
|
|
5244
|
+
type: 'warning',
|
|
5245
|
+
message: this.translateService.instant('@pry.message.backend-only-1-datasource'),
|
|
5246
|
+
timeout: 4000
|
|
5247
|
+
});
|
|
5248
|
+
}
|
|
5249
|
+
if (datasources.includes(DEFAULT_NAMED_QUERY_ID) || datasources.includes(EXPLORE_NAMED_QUERY_ID)) {
|
|
5250
|
+
this.snackBar.open({
|
|
5251
|
+
type: 'warning',
|
|
5252
|
+
message: this.translateService.instant('@pry.message.cannot-aggregate-virtual-ds'),
|
|
5253
|
+
timeout: 4000
|
|
5254
|
+
});
|
|
5255
|
+
}
|
|
5256
|
+
if (!targetDatasource) {
|
|
5257
|
+
console.warn('Aggregation needs a target datasource.');
|
|
5258
|
+
return of({ operation: options.ordinate?.operation ?? 'none', values: [] });
|
|
5259
|
+
}
|
|
5260
|
+
let params = new HttpParams();
|
|
5261
|
+
if (options.abscissa && options.abscissa.attribute) {
|
|
5262
|
+
params = params.set('aggregatedBy', options.abscissa.attribute);
|
|
5263
|
+
}
|
|
5264
|
+
else {
|
|
5265
|
+
console.warn('Aggregation needs an aggregatedBy member.');
|
|
5266
|
+
if (options.ordinate.operation !== Operation.EXTENT) {
|
|
5267
|
+
return of({ operation: options.ordinate.operation, values: [] });
|
|
5268
|
+
}
|
|
5269
|
+
}
|
|
5270
|
+
if (options.abscissa && options.abscissa.limit) {
|
|
5271
|
+
if (options.abscissa.limit.isTimeLimit) {
|
|
5272
|
+
params = params.set('dateInterval', options.abscissa.limit.interval);
|
|
5273
|
+
}
|
|
5274
|
+
else {
|
|
5275
|
+
params = params.set('interval', options.abscissa.limit.at);
|
|
5276
|
+
params = params.set('limitOrder', options.abscissa.limit.order);
|
|
5277
|
+
params = params.set('limitOthers', options.abscissa.limit.others);
|
|
5278
|
+
}
|
|
5279
|
+
}
|
|
5280
|
+
const operation = options.ordinate.operation?.replace(/^none$/, Operation.SUM);
|
|
5281
|
+
params = params.set('operation', operation);
|
|
5282
|
+
if (!!options.ordinate.attribute) {
|
|
5283
|
+
params = params.set('valueField', options.ordinate.attribute);
|
|
5284
|
+
}
|
|
5285
|
+
if (options.groupBy) {
|
|
5286
|
+
params = params.set('groupBy', options.groupBy.attribute);
|
|
5287
|
+
}
|
|
5288
|
+
params = this.searchService.getItemsFilter(targetDatasource, params);
|
|
5289
|
+
return this.store.select(ConfigSelectors.dataUrl).pipe(switchMap((url) => this.httpClient
|
|
5290
|
+
.get(`${url}/data-sources/id/${targetDatasource}/items/aggregate`, {
|
|
5291
|
+
params
|
|
5292
|
+
})
|
|
5293
|
+
.pipe(map((result) => ({
|
|
5294
|
+
...result,
|
|
5295
|
+
operation: options.ordinate.operation === Operation.NONE ? Operation.NONE : result.operation
|
|
5296
|
+
})))));
|
|
5297
|
+
}
|
|
5298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryBackendAggregationService, deps: [{ token: i1.Store }, { token: PrySnackbarService }, { token: PryI18nService }, { token: i1$2.HttpClient }, { token: SearchService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5299
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryBackendAggregationService, providedIn: 'root' }); }
|
|
5300
|
+
}
|
|
5301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryBackendAggregationService, decorators: [{
|
|
5302
|
+
type: Injectable,
|
|
5303
|
+
args: [{
|
|
5304
|
+
providedIn: 'root'
|
|
5305
|
+
}]
|
|
5306
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: PrySnackbarService }, { type: PryI18nService }, { type: i1$2.HttpClient }, { type: SearchService }]; } });
|
|
5307
|
+
|
|
5308
|
+
class ResultsetUtils {
|
|
5309
|
+
static mergeResultSets(rs1, rs2) {
|
|
5310
|
+
if (!rs1)
|
|
5311
|
+
return rs2;
|
|
5312
|
+
if (!rs2)
|
|
5313
|
+
return rs1;
|
|
5314
|
+
const rs1Copy = JSON.parse(JSON.stringify(rs1));
|
|
5315
|
+
Object.keys(rs2.items ?? {}).forEach((key) => {
|
|
5316
|
+
if (!rs1Copy.items[key]) {
|
|
5317
|
+
rs1Copy.items[key] = [];
|
|
5318
|
+
}
|
|
5319
|
+
rs1Copy.items[key].push(...rs2.items[key]);
|
|
5320
|
+
});
|
|
5321
|
+
rs1Copy.relations = [...(rs1Copy.relations ?? []), ...(rs2.relations ?? [])];
|
|
5322
|
+
/* Make items and relations unique in resulted dataset */
|
|
5323
|
+
Object.keys(rs1Copy.items).forEach((key) => {
|
|
5324
|
+
const uniqueList = [...new Set(rs1Copy.items[key].map((it) => it.id))];
|
|
5325
|
+
rs1Copy.items[key] = uniqueList.map((id) => rs1Copy.items[key].find((it) => it.id === id));
|
|
5326
|
+
});
|
|
5327
|
+
const uniqueRelations = [
|
|
5328
|
+
...new Set(rs1Copy.relations.map((rel) => `${rel.relationType}|${rel.source}|${rel.destination}`))
|
|
5329
|
+
];
|
|
5330
|
+
rs1Copy.relations = uniqueRelations.map((key) => {
|
|
5331
|
+
const splittedKey = key.split('|');
|
|
5332
|
+
return rs1Copy.relations.find((rel) => rel.relationType === splittedKey[0] && rel.source === splittedKey[1] && rel.destination === splittedKey[2]);
|
|
5333
|
+
});
|
|
5334
|
+
return rs1Copy;
|
|
5335
|
+
}
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5338
|
+
class PryFrontendAggregationService extends PryAggregationService {
|
|
5339
|
+
constructor(store) {
|
|
5340
|
+
super();
|
|
5341
|
+
this.store = store;
|
|
5342
|
+
}
|
|
5343
|
+
// @ts-ignore
|
|
5344
|
+
aggregate(datasource, options) {
|
|
5345
|
+
return combineLatest([
|
|
5346
|
+
this.store.select(DashboardSelectors.resultSets),
|
|
5347
|
+
this.store.select(ClassSelectors.classes)
|
|
5348
|
+
]).pipe(map(([resultSets, classes]) => {
|
|
5349
|
+
const abscissa = classes
|
|
5350
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.abscissa.attribute))
|
|
5351
|
+
.find((attr) => !!attr)?.name;
|
|
5352
|
+
const ordinate = classes
|
|
5353
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.ordinate.attribute))
|
|
5354
|
+
.find((attr) => !!attr)?.name;
|
|
5355
|
+
if (!abscissa || !ordinate) {
|
|
5356
|
+
throw new Error('abscissaorodinateinvalid');
|
|
5357
|
+
}
|
|
5358
|
+
let data = datasource.map((rsName) => resultSets[rsName ?? '']).filter((rsName) => !!rsName);
|
|
5359
|
+
const resultSet = data.reduce((rs1, rs2) => ResultsetUtils.mergeResultSets(rs1, rs2), {
|
|
5360
|
+
items: {},
|
|
5361
|
+
relations: [],
|
|
5362
|
+
merged: data.length
|
|
5363
|
+
});
|
|
5364
|
+
let items = Object.keys(resultSet.items)
|
|
5365
|
+
.map((classId) => resultSet.items[classId])
|
|
5366
|
+
.reduce((prev, curr) => [...prev, ...curr], []);
|
|
5367
|
+
if (!!options.groupBy) {
|
|
5368
|
+
const groupBy = classes
|
|
5369
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.groupBy?.attribute))
|
|
5370
|
+
.find((attr) => !!attr)?.name;
|
|
5371
|
+
if (!groupBy) {
|
|
5372
|
+
throw new Error('groupByAttributeisinvalid');
|
|
5373
|
+
}
|
|
5374
|
+
const itemsGrouped = this.groupBy(items, groupBy);
|
|
5375
|
+
const values = [];
|
|
5376
|
+
Object.keys(itemsGrouped).forEach((key) => {
|
|
5377
|
+
values.push({
|
|
5378
|
+
key,
|
|
5379
|
+
groupBy: this.getValueFromOperation(itemsGrouped[key], options.ordinate.operation, abscissa, ordinate, options.abscissa.limit)
|
|
5380
|
+
});
|
|
5381
|
+
});
|
|
5382
|
+
return { operation: options.ordinate.operation, values: values };
|
|
5383
|
+
}
|
|
5384
|
+
const values = this.getValueFromOperation(items, options.ordinate.operation, abscissa, ordinate, options.abscissa.limit);
|
|
5385
|
+
return { operation: options.ordinate.operation, values: values };
|
|
5386
|
+
}));
|
|
5387
|
+
}
|
|
5388
|
+
getValueFromOperation(items, operation, abscissa, ordinate, limit) {
|
|
5389
|
+
let result = [];
|
|
5390
|
+
const groupByAbscissa = this.groupBy(items, abscissa);
|
|
5391
|
+
groupByAbscissa.map((test) => console.log(groupByAbscissa[test]));
|
|
5392
|
+
switch (operation) {
|
|
5393
|
+
case Operation.COUNT:
|
|
5394
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5395
|
+
key: key,
|
|
5396
|
+
value: groupByAbscissa[key].length
|
|
5397
|
+
})));
|
|
5398
|
+
break;
|
|
5399
|
+
case Operation.SUM:
|
|
5400
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5401
|
+
key: key,
|
|
5402
|
+
value: this.getSum(groupByAbscissa[key], ordinate)
|
|
5403
|
+
})));
|
|
5404
|
+
break;
|
|
5405
|
+
case Operation.DISTINCT:
|
|
5406
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5407
|
+
key: key,
|
|
5408
|
+
value: this.getDistinct(groupByAbscissa[key], ordinate)
|
|
5409
|
+
})));
|
|
5410
|
+
break;
|
|
5411
|
+
case Operation.AVERAGE:
|
|
5412
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5413
|
+
key: key,
|
|
5414
|
+
value: this.getAverage(groupByAbscissa[key], ordinate)
|
|
5415
|
+
})));
|
|
5416
|
+
break;
|
|
5417
|
+
case Operation.MEDIAN:
|
|
5418
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5419
|
+
key: key,
|
|
5420
|
+
value: this.getQuartile(groupByAbscissa[key], ordinate, 0.5)
|
|
5421
|
+
})));
|
|
5422
|
+
break;
|
|
5423
|
+
case Operation.Q1:
|
|
5424
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5425
|
+
key: key,
|
|
5426
|
+
value: this.getQuartile(groupByAbscissa[key], ordinate, 0.25)
|
|
5427
|
+
})));
|
|
5428
|
+
break;
|
|
5429
|
+
case Operation.Q3:
|
|
5430
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5431
|
+
key: key,
|
|
5432
|
+
value: this.getQuartile(groupByAbscissa[key], ordinate, 0.75)
|
|
5433
|
+
})));
|
|
5434
|
+
break;
|
|
5435
|
+
case Operation.MIN:
|
|
5436
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5437
|
+
key: key,
|
|
5438
|
+
value: this.getMin(groupByAbscissa[key], ordinate)
|
|
5439
|
+
})));
|
|
5440
|
+
break;
|
|
5441
|
+
default:
|
|
5442
|
+
result.push(...Object.keys(groupByAbscissa).map((key) => ({
|
|
5443
|
+
key: key,
|
|
5444
|
+
value: this.getMax(groupByAbscissa[key], ordinate)
|
|
5445
|
+
})));
|
|
5446
|
+
break;
|
|
5447
|
+
}
|
|
5448
|
+
if (limit) {
|
|
5449
|
+
result = this.formatByLimit(result, limit);
|
|
5450
|
+
}
|
|
5451
|
+
return result;
|
|
5452
|
+
}
|
|
5453
|
+
groupBy(items, attribute) {
|
|
5454
|
+
let distincts = [];
|
|
5455
|
+
items.forEach((item) => {
|
|
5456
|
+
let value = this.getValueFromAttribute(item, attribute);
|
|
5457
|
+
if (distincts[value.value]) {
|
|
5458
|
+
distincts[value.value].push(item);
|
|
5459
|
+
}
|
|
5460
|
+
else {
|
|
5461
|
+
distincts[value.value] = [item];
|
|
5462
|
+
}
|
|
5463
|
+
});
|
|
5464
|
+
return distincts;
|
|
5465
|
+
}
|
|
5466
|
+
getValueFromAttribute(item, attribute) {
|
|
5467
|
+
let value = ItemUtils.getAttributeValue(item, attribute);
|
|
5468
|
+
return Array.isArray(value) ? value[0] : value;
|
|
5469
|
+
}
|
|
5470
|
+
getSum(items, attribute) {
|
|
5471
|
+
let sum = 0;
|
|
5472
|
+
items.forEach((item) => {
|
|
5473
|
+
sum += this.getValueFromAttribute(item, attribute).value;
|
|
5474
|
+
});
|
|
5475
|
+
return sum;
|
|
5476
|
+
}
|
|
5477
|
+
getMin(items, attribute) {
|
|
5478
|
+
const result = items.reduce((prev, curr) => {
|
|
5479
|
+
const prevValue = this.getValueFromAttribute(prev, attribute).value;
|
|
5480
|
+
const currValue = this.getValueFromAttribute(curr, attribute).value;
|
|
5481
|
+
return prevValue < currValue ? prev : curr;
|
|
5482
|
+
});
|
|
5483
|
+
return this.getValueFromAttribute(result, attribute).value;
|
|
5484
|
+
}
|
|
5485
|
+
getMax(items, attribute) {
|
|
5486
|
+
const result = items.reduce((prev, curr) => {
|
|
5487
|
+
const prevValue = this.getValueFromAttribute(prev, attribute).value;
|
|
5488
|
+
const currValue = this.getValueFromAttribute(curr, attribute).value;
|
|
5489
|
+
return prevValue > currValue ? prev : curr;
|
|
5490
|
+
});
|
|
5491
|
+
return this.getValueFromAttribute(result, attribute).value;
|
|
5492
|
+
}
|
|
5493
|
+
getAverage(items, attribute) {
|
|
5494
|
+
const allValues = items.map((item) => this.getValueFromAttribute(item, attribute).value);
|
|
5495
|
+
return allValues.reduce((acc, val) => acc + val, 0) / allValues.length;
|
|
5496
|
+
}
|
|
5497
|
+
getDistinct(items, attribute) {
|
|
5498
|
+
return [...new Set(items.map((item) => this.getValueFromAttribute(item, attribute).value))].length;
|
|
5499
|
+
}
|
|
5500
|
+
getQuartile(items, attribute, q) {
|
|
5501
|
+
const allValues = items.map((item) => this.getValueFromAttribute(item, attribute).value);
|
|
5502
|
+
const allValuesSorted = allValues.sort((a, b) => a - b);
|
|
5503
|
+
let pos = (allValuesSorted.length - 1) * q;
|
|
5504
|
+
if (pos % 1 === 0) {
|
|
5505
|
+
return allValuesSorted[pos];
|
|
5506
|
+
}
|
|
5507
|
+
pos = Math.floor(pos);
|
|
5508
|
+
if (allValuesSorted[pos + 1] !== undefined) {
|
|
5509
|
+
return (allValuesSorted[pos] + allValuesSorted[pos + 1]) / 2;
|
|
5510
|
+
}
|
|
5511
|
+
return allValuesSorted[pos];
|
|
5512
|
+
}
|
|
5513
|
+
getPercentile(items, attribute, q) {
|
|
5514
|
+
const allValues = items.map((item) => this.getValueFromAttribute(item, attribute).value);
|
|
5515
|
+
const allValuesSorted = allValues.sort((a, b) => a - b);
|
|
5516
|
+
return ((100 * allValuesSorted.reduce((acc, v) => acc + (v < q ? 1 : 0) + (v === q ? 0.5 : 0), 0)) /
|
|
5517
|
+
allValuesSorted.length);
|
|
5518
|
+
}
|
|
5519
|
+
formatByLimit(data, limit) {
|
|
5520
|
+
if (!limit.isTimeLimit) {
|
|
5521
|
+
data
|
|
5522
|
+
.sort((a, b) => (limit.order === 'asc' ? (a.value > b.value ? 1 : -1) : a.value < b.value ? 1 : -1))
|
|
5523
|
+
.splice(limit.at);
|
|
5524
|
+
return data;
|
|
5525
|
+
}
|
|
5526
|
+
return data;
|
|
5527
|
+
}
|
|
5528
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryFrontendAggregationService, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5529
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryFrontendAggregationService, providedIn: 'root' }); }
|
|
5530
|
+
}
|
|
5531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryFrontendAggregationService, decorators: [{
|
|
5532
|
+
type: Injectable,
|
|
5533
|
+
args: [{
|
|
5534
|
+
providedIn: 'root'
|
|
5535
|
+
}]
|
|
5536
|
+
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
5537
|
+
|
|
5171
5538
|
class LoopScrollColumnComponent {
|
|
5172
5539
|
constructor() {
|
|
5173
5540
|
this.LOOP_COUNTER = [0, 1];
|
|
@@ -7372,6 +7739,7 @@ class ContextMenuComponent extends SubscriptionnerDirective {
|
|
|
7372
7739
|
options: { itemIds: [] }
|
|
7373
7740
|
};
|
|
7374
7741
|
this.isModuleLoaded = {};
|
|
7742
|
+
this.allowObjectCreation$ = this.store.select(ContextMenuSelectors.allowObjectCreation);
|
|
7375
7743
|
this.opened$ = this.store.select(ContextMenuSelectors.opened);
|
|
7376
7744
|
this.position$ = this.store.select(ContextMenuSelectors.position);
|
|
7377
7745
|
this.itemId$ = this.store.select(ContextMenuSelectors.itemId);
|
|
@@ -7394,20 +7762,25 @@ class ContextMenuComponent extends SubscriptionnerDirective {
|
|
|
7394
7762
|
this.widgetFactoryService.isModuleLoaded('graph').subscribe((loaded) => (this.isModuleLoaded['graph'] = loaded));
|
|
7395
7763
|
}
|
|
7396
7764
|
openWithTemplate(position) {
|
|
7397
|
-
this.
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
contextMenu
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7765
|
+
if (this.from !== 'map') {
|
|
7766
|
+
this.overlayRef = this.overlay.create(new OverlayConfig({
|
|
7767
|
+
hasBackdrop: true,
|
|
7768
|
+
panelClass: ['m-context-menu'],
|
|
7769
|
+
backdropClass: 'backdrop'
|
|
7770
|
+
}));
|
|
7771
|
+
this.overlayRef.attach(new TemplatePortal(this.template, this.viewContainerRef));
|
|
7772
|
+
this.store.dispatch(ConfigActions.addingOverlay({ id: this.constructor.name }));
|
|
7773
|
+
this.overlayRef.backdropClick().subscribe(() => this.hide());
|
|
7774
|
+
const contextMenu = document.querySelector('div.m-context-menu');
|
|
7775
|
+
if (!!contextMenu) {
|
|
7776
|
+
contextMenu.style.left =
|
|
7777
|
+
Math.max(0, Math.min(window.innerWidth - contextMenu.clientWidth, position.clientX - 10)) + 'px';
|
|
7778
|
+
contextMenu.style.top =
|
|
7779
|
+
Math.max(0, Math.min(window.innerHeight - contextMenu.clientHeight, position.clientY - 10)) + 'px';
|
|
7780
|
+
}
|
|
7781
|
+
}
|
|
7782
|
+
else {
|
|
7783
|
+
this.hide();
|
|
7411
7784
|
}
|
|
7412
7785
|
}
|
|
7413
7786
|
hide() {
|
|
@@ -7451,11 +7824,11 @@ class ContextMenuComponent extends SubscriptionnerDirective {
|
|
|
7451
7824
|
this.store.dispatch(ConfigActions.closeOverlay({ id: this.constructor.name + '-detail' }));
|
|
7452
7825
|
}
|
|
7453
7826
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ContextMenuComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7454
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ContextMenuComponent, selector: "pry-context-menu", viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "detailTemplate", first: true, predicate: ["detailTemplate"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <ul class=\"m-context-menu__list\">\n <ng-container *ngIf=\"!!itemId\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionAddOrRemove()\">\n {{ ((isSelected$ | async) ? '@pry.context.remove' : '@pry.context.add') | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionInvert()\">\n {{ '@pry.context.invert' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" *ngIf=\"!!resultSet\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"proximity()\" *ngIf=\"!!resultSet\">\n {{ '@pry.context.proximity' | i18n }}\n </button>\n </li>\n <ng-container *ngIf=\"isModuleLoaded['graph']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"explore()\">\n {{ '@pry.context.explore' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *ngIf=\"isModuleLoaded['detail']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"detail()\">\n {{ '@pry.context.detail' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"flyingDetail()\">\n {{ '@pry.context.flyingDetail' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation\n (closed)=\"hide()\"\n [link]=\"true\"\n [object]=\"false\"\n [menu]=\"true\"\n *ngIf=\"(selectedItemsIds?.length ?? 0) > 0\"\n ></pry-object-creation>\n <pry-object-creation (closed)=\"hide()\" [link]=\"true\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation (closed)=\"hide()\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ul>\n</ng-template>\n<ng-template #detailTemplate>\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.context.flyingDetail' | i18n }}</h2>\n <button type=\"button\" (click)=\"hideDetail()\" class=\"a-btn a-btn--icon-only -close\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n <div class=\"o-settings__popup__content\">\n <pry-widget-instanciator [staticManifest]=\"detailManifest\"></pry-widget-instanciator>\n </div>\n <div class=\"o-settings__popup__footer\">\n <button (click)=\"hideDetail()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.action.close' | i18n }}\n </button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: PryObjectEditionComponent, selector: "pry-object-creation", inputs: ["link", "object", "menu"], outputs: ["closed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
7827
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: ContextMenuComponent, selector: "pry-context-menu", viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }, { propertyName: "detailTemplate", first: true, predicate: ["detailTemplate"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<ng-template #template>\n <ul class=\"m-context-menu__list\">\n <ng-container *ngIf=\"!!itemId\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionAddOrRemove()\">\n {{ ((isSelected$ | async) ? '@pry.context.remove' : '@pry.context.add') | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionInvert()\">\n {{ '@pry.context.invert' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" *ngIf=\"!!resultSet\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"proximity()\" *ngIf=\"!!resultSet\">\n {{ '@pry.context.proximity' | i18n }}\n </button>\n </li>\n <ng-container *ngIf=\"isModuleLoaded['graph']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"explore()\">\n {{ '@pry.context.explore' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *ngIf=\"isModuleLoaded['detail']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"detail()\">\n {{ '@pry.context.detail' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"flyingDetail()\">\n {{ '@pry.context.flyingDetail' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation\n (closed)=\"hide()\"\n [link]=\"true\"\n [object]=\"false\"\n [menu]=\"true\"\n *ngIf=\"(selectedItemsIds?.length ?? 0) > 0\"\n ></pry-object-creation>\n <ng-container *ngIf=\"allowObjectCreation$ | async\">\n <pry-object-creation (closed)=\"hide()\" [link]=\"true\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </ng-container>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li *ngIf=\"allowObjectCreation$| async\" class=\"m-context-menu__list__item\">\n <pry-object-creation (closed)=\"hide()\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ul>\n</ng-template>\n<ng-template #detailTemplate>\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.context.flyingDetail' | i18n }}</h2>\n <button type=\"button\" (click)=\"hideDetail()\" class=\"a-btn a-btn--icon-only -close\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n <div class=\"o-settings__popup__content\">\n <pry-widget-instanciator [staticManifest]=\"detailManifest\"></pry-widget-instanciator>\n </div>\n <div class=\"o-settings__popup__footer\">\n <button (click)=\"hideDetail()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.action.close' | i18n }}\n </button>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "directive", type: PryAccessDirective, selector: "[pryAccess]", inputs: ["pryAccess"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: PryObjectEditionComponent, selector: "pry-object-creation", inputs: ["link", "object", "menu"], outputs: ["closed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
7455
7828
|
}
|
|
7456
7829
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
7457
7830
|
type: Component,
|
|
7458
|
-
args: [{ selector: 'pry-context-menu', template: "<ng-template #template>\n <ul class=\"m-context-menu__list\">\n <ng-container *ngIf=\"!!itemId\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionAddOrRemove()\">\n {{ ((isSelected$ | async) ? '@pry.context.remove' : '@pry.context.add') | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionInvert()\">\n {{ '@pry.context.invert' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" *ngIf=\"!!resultSet\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"proximity()\" *ngIf=\"!!resultSet\">\n {{ '@pry.context.proximity' | i18n }}\n </button>\n </li>\n <ng-container *ngIf=\"isModuleLoaded['graph']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"explore()\">\n {{ '@pry.context.explore' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *ngIf=\"isModuleLoaded['detail']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"detail()\">\n {{ '@pry.context.detail' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"flyingDetail()\">\n {{ '@pry.context.flyingDetail' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation\n (closed)=\"hide()\"\n [link]=\"true\"\n [object]=\"false\"\n [menu]=\"true\"\n *ngIf=\"(selectedItemsIds?.length ?? 0) > 0\"\n ></pry-object-creation>\n <pry-object-creation (closed)=\"hide()\" [link]=\"true\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation (closed)=\"hide()\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ul>\n</ng-template>\n<ng-template #detailTemplate>\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.context.flyingDetail' | i18n }}</h2>\n <button type=\"button\" (click)=\"hideDetail()\" class=\"a-btn a-btn--icon-only -close\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n <div class=\"o-settings__popup__content\">\n <pry-widget-instanciator [staticManifest]=\"detailManifest\"></pry-widget-instanciator>\n </div>\n <div class=\"o-settings__popup__footer\">\n <button (click)=\"hideDetail()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.action.close' | i18n }}\n </button>\n </div>\n</ng-template>\n" }]
|
|
7831
|
+
args: [{ selector: 'pry-context-menu', template: "<ng-template #template>\n <ul class=\"m-context-menu__list\">\n <ng-container *ngIf=\"!!itemId\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionAddOrRemove()\">\n {{ ((isSelected$ | async) ? '@pry.context.remove' : '@pry.context.add') | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"selectionInvert()\">\n {{ '@pry.context.invert' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\" *ngIf=\"!!resultSet\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"proximity()\" *ngIf=\"!!resultSet\">\n {{ '@pry.context.proximity' | i18n }}\n </button>\n </li>\n <ng-container *ngIf=\"isModuleLoaded['graph']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"explore()\">\n {{ '@pry.context.explore' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *ngIf=\"isModuleLoaded['detail']\">\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"detail()\">\n {{ '@pry.context.detail' | i18n }}\n </button>\n </li>\n <li class=\"m-context-menu__list__item\">\n <button type=\"button\" class=\"a-btn -link-like\" (click)=\"flyingDetail()\">\n {{ '@pry.context.flyingDetail' | i18n }}\n </button>\n </li>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li class=\"m-context-menu__list__item\">\n <pry-object-creation\n (closed)=\"hide()\"\n [link]=\"true\"\n [object]=\"false\"\n [menu]=\"true\"\n *ngIf=\"(selectedItemsIds?.length ?? 0) > 0\"\n ></pry-object-creation>\n <ng-container *ngIf=\"allowObjectCreation$ | async\">\n <pry-object-creation (closed)=\"hide()\" [link]=\"true\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </ng-container>\n </li>\n </ng-container>\n </ng-container>\n <ng-container *pryAccess=\"{ module: 'dashboard', page: 'dashboard', action: 'edit_object' }\">\n <li *ngIf=\"allowObjectCreation$| async\" class=\"m-context-menu__list__item\">\n <pry-object-creation (closed)=\"hide()\" [object]=\"true\" [menu]=\"true\"></pry-object-creation>\n </li>\n </ng-container>\n </ul>\n</ng-template>\n<ng-template #detailTemplate>\n <div class=\"o-settings__popup__header\">\n <h2 class=\"a-h2\">{{ '@pry.context.flyingDetail' | i18n }}</h2>\n <button type=\"button\" (click)=\"hideDetail()\" class=\"a-btn a-btn--icon-only -close\">\n <pry-icon iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.close' | i18n }}</span>\n </button>\n </div>\n <div class=\"o-settings__popup__content\">\n <pry-widget-instanciator [staticManifest]=\"detailManifest\"></pry-widget-instanciator>\n </div>\n <div class=\"o-settings__popup__footer\">\n <button (click)=\"hideDetail()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.action.close' | i18n }}\n </button>\n </div>\n</ng-template>\n" }]
|
|
7459
7832
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: WidgetFactoryService }]; }, propDecorators: { template: [{
|
|
7460
7833
|
type: ViewChild,
|
|
7461
7834
|
args: ['template', { read: TemplateRef }]
|
|
@@ -8002,32 +8375,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
8002
8375
|
type: Output
|
|
8003
8376
|
}] } });
|
|
8004
8377
|
|
|
8005
|
-
var Operation;
|
|
8006
|
-
(function (Operation) {
|
|
8007
|
-
Operation["NONE"] = "none";
|
|
8008
|
-
Operation["COUNT"] = "count";
|
|
8009
|
-
Operation["SUM"] = "sum";
|
|
8010
|
-
Operation["DISTINCT"] = "cardinality";
|
|
8011
|
-
Operation["AVERAGE"] = "avg";
|
|
8012
|
-
Operation["MEDIAN"] = "median";
|
|
8013
|
-
Operation["Q1"] = "q1";
|
|
8014
|
-
Operation["Q3"] = "q3";
|
|
8015
|
-
Operation["MIN"] = "min";
|
|
8016
|
-
Operation["MAX"] = "max";
|
|
8017
|
-
})(Operation || (Operation = {}));
|
|
8018
|
-
var GraphType;
|
|
8019
|
-
(function (GraphType) {
|
|
8020
|
-
GraphType["AREA"] = "area-default";
|
|
8021
|
-
GraphType["AREA_WITH_LINES_AND_POINTS"] = "area-with-lines-and-points";
|
|
8022
|
-
GraphType["BAR"] = "bar-default";
|
|
8023
|
-
GraphType["CIRCULAR"] = "arc-default";
|
|
8024
|
-
GraphType["CURVE"] = "line-default";
|
|
8025
|
-
GraphType["CURVE_WITH_POINTS"] = "line-with-points";
|
|
8026
|
-
GraphType["DONUT"] = "arc-donut";
|
|
8027
|
-
GraphType["HISTOGRAM"] = "bar-histogram";
|
|
8028
|
-
GraphType["POINTS"] = "point-default";
|
|
8029
|
-
})(GraphType || (GraphType = {}));
|
|
8030
|
-
|
|
8031
8378
|
var TooltipMode;
|
|
8032
8379
|
(function (TooltipMode) {
|
|
8033
8380
|
TooltipMode["CLICK"] = "click";
|
|
@@ -8044,6 +8391,7 @@ const widgetMapConfig = {
|
|
|
8044
8391
|
'upload'
|
|
8045
8392
|
])
|
|
8046
8393
|
};
|
|
8394
|
+
const DEFAULT_PROJECTION = 'EPSG:4326';
|
|
8047
8395
|
|
|
8048
8396
|
const USE_CURRENT_RESULTSET = 'use-current-resultset';
|
|
8049
8397
|
class ToolboxManifestService extends SubscriptionnerDirective {
|
|
@@ -8332,6 +8680,20 @@ class ToolboxManifestService extends SubscriptionnerDirective {
|
|
|
8332
8680
|
},
|
|
8333
8681
|
options: {},
|
|
8334
8682
|
datasource: USE_CURRENT_RESULTSET
|
|
8683
|
+
},
|
|
8684
|
+
vega: {
|
|
8685
|
+
type: 'vega',
|
|
8686
|
+
layout: {
|
|
8687
|
+
x: 1,
|
|
8688
|
+
y: 1,
|
|
8689
|
+
height: 2,
|
|
8690
|
+
width: 3
|
|
8691
|
+
},
|
|
8692
|
+
options: {
|
|
8693
|
+
placeData: ['data', 0, 'values'],
|
|
8694
|
+
baseSpec: {}
|
|
8695
|
+
},
|
|
8696
|
+
datasource: USE_CURRENT_RESULTSET
|
|
8335
8697
|
}
|
|
8336
8698
|
});
|
|
8337
8699
|
this.currentResultSet = [];
|
|
@@ -8419,7 +8781,8 @@ const defaultMenuStructure = [
|
|
|
8419
8781
|
{ icon: 'toc', label: '@pry.toolbox.detail', type: 'detail' },
|
|
8420
8782
|
{ icon: 'graph', label: '@pry.toolbox.graph', type: 'graph' },
|
|
8421
8783
|
{ icon: 'settings_applications', label: '@pry.toolbox.iframe', type: 'iframe' },
|
|
8422
|
-
{ icon: 'tile', label: '@pry.toolbox.tile', type: 'tile' }
|
|
8784
|
+
{ icon: 'tile', label: '@pry.toolbox.tile', type: 'tile' },
|
|
8785
|
+
{ icon: 'bar_chart', label: '@pry.toolbox.vega', type: 'vega' }
|
|
8423
8786
|
]
|
|
8424
8787
|
}
|
|
8425
8788
|
];
|
|
@@ -8701,26 +9064,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
8701
9064
|
}], ctorParameters: function () { return [{ type: PrySnackbarService }, { type: PryI18nService }]; } });
|
|
8702
9065
|
|
|
8703
9066
|
class PryAboutComponent {
|
|
8704
|
-
constructor(store) {
|
|
9067
|
+
constructor(store, i18nService) {
|
|
8705
9068
|
this.store = store;
|
|
9069
|
+
this.i18nService = i18nService;
|
|
8706
9070
|
this.store.dispatch(ConfigActions.loadVersions());
|
|
8707
9071
|
this.version$ = this.store.select(ConfigSelectors.selectVersions);
|
|
8708
9072
|
}
|
|
8709
9073
|
displayVersion(value) {
|
|
8710
9074
|
const backVersion = value;
|
|
8711
|
-
if (backVersion.chartVersion) {
|
|
9075
|
+
if (!!backVersion.chartVersion) {
|
|
8712
9076
|
return `${backVersion.chartVersion}[${backVersion.applicationVersion}]`;
|
|
8713
9077
|
}
|
|
8714
9078
|
const frontVersion = value;
|
|
8715
|
-
|
|
9079
|
+
if (!!frontVersion.libVersion) {
|
|
9080
|
+
return frontVersion.libVersion;
|
|
9081
|
+
}
|
|
9082
|
+
return this.i18nService.instant('@pry.about.noVersion');
|
|
8716
9083
|
}
|
|
8717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAboutComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9084
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAboutComponent, deps: [{ token: i1.Store }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8718
9085
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.6", type: PryAboutComponent, selector: "pry-about", ngImport: i0, template: "<div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n</div>\n<div class=\"description-tooltip title-tooltip\">\n <ul *ngFor=\"let version of (version$ | async) ?? {} | keyvalue\">\n <li>{{ '@pry.about.' + version.key | i18n }} {{ displayVersion(version.value) }}</li>\n </ul>\n</div>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
|
|
8719
9086
|
}
|
|
8720
9087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryAboutComponent, decorators: [{
|
|
8721
9088
|
type: Component,
|
|
8722
9089
|
args: [{ selector: 'pry-about', template: "<div class=\"info-icon description-container description\">\n <span class=\"info-text\">i</span>\n</div>\n<div class=\"description-tooltip title-tooltip\">\n <ul *ngFor=\"let version of (version$ | async) ?? {} | keyvalue\">\n <li>{{ '@pry.about.' + version.key | i18n }} {{ displayVersion(version.value) }}</li>\n </ul>\n</div>\n" }]
|
|
8723
|
-
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
9090
|
+
}], ctorParameters: function () { return [{ type: i1.Store }, { type: PryI18nService }]; } });
|
|
8724
9091
|
|
|
8725
9092
|
const PRY_ABOUT_COMPONENTS = [PryAboutComponent];
|
|
8726
9093
|
class PryAboutModule {
|
|
@@ -8954,36 +9321,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
|
|
|
8954
9321
|
type: Input
|
|
8955
9322
|
}] } });
|
|
8956
9323
|
|
|
8957
|
-
class ResultsetUtils {
|
|
8958
|
-
static mergeResultSets(rs1, rs2) {
|
|
8959
|
-
if (!rs1)
|
|
8960
|
-
return rs2;
|
|
8961
|
-
if (!rs2)
|
|
8962
|
-
return rs1;
|
|
8963
|
-
const rs1Copy = JSON.parse(JSON.stringify(rs1));
|
|
8964
|
-
Object.keys(rs2.items ?? {}).forEach((key) => {
|
|
8965
|
-
if (!rs1Copy.items[key]) {
|
|
8966
|
-
rs1Copy.items[key] = [];
|
|
8967
|
-
}
|
|
8968
|
-
rs1Copy.items[key].push(...rs2.items[key]);
|
|
8969
|
-
});
|
|
8970
|
-
rs1Copy.relations = [...(rs1Copy.relations ?? []), ...(rs2.relations ?? [])];
|
|
8971
|
-
/* Make items and relations unique in resulted dataset */
|
|
8972
|
-
Object.keys(rs1Copy.items).forEach((key) => {
|
|
8973
|
-
const uniqueList = [...new Set(rs1Copy.items[key].map((it) => it.id))];
|
|
8974
|
-
rs1Copy.items[key] = uniqueList.map((id) => rs1Copy.items[key].find((it) => it.id === id));
|
|
8975
|
-
});
|
|
8976
|
-
const uniqueRelations = [
|
|
8977
|
-
...new Set(rs1Copy.relations.map((rel) => `${rel.relationType}|${rel.source}|${rel.destination}`))
|
|
8978
|
-
];
|
|
8979
|
-
rs1Copy.relations = uniqueRelations.map((key) => {
|
|
8980
|
-
const splittedKey = key.split('|');
|
|
8981
|
-
return rs1Copy.relations.find((rel) => rel.relationType === splittedKey[0] && rel.source === splittedKey[1] && rel.destination === splittedKey[2]);
|
|
8982
|
-
});
|
|
8983
|
-
return rs1Copy;
|
|
8984
|
-
}
|
|
8985
|
-
}
|
|
8986
|
-
|
|
8987
9324
|
class DataWidgetComponent extends BaseWidgetComponent {
|
|
8988
9325
|
set staticResultSet(resultSet) {
|
|
8989
9326
|
this.staticResultSet$.next(resultSet);
|
|
@@ -10692,8 +11029,9 @@ const internalReducer = createReducer(dashboardInitialState, on(DashboardActions
|
|
|
10692
11029
|
},
|
|
10693
11030
|
presentation: {
|
|
10694
11031
|
...state.presentation,
|
|
10695
|
-
current: state.presentation.current
|
|
10696
|
-
? action.manifests.find((manifest) => manifest.id === state.presentation.current?.id)
|
|
11032
|
+
current: !!state.presentation.current
|
|
11033
|
+
? action.manifests.find((manifest) => manifest.id === state.presentation.current?.id) ??
|
|
11034
|
+
state.presentation.current
|
|
10697
11035
|
: undefined
|
|
10698
11036
|
}
|
|
10699
11037
|
})), on(DashboardActions.updateStaticManifest, (state, action) => ({
|
|
@@ -11365,5 +11703,5 @@ function filterLoader(module, prop) {
|
|
|
11365
11703
|
* Generated bundle index. Do not edit.
|
|
11366
11704
|
*/
|
|
11367
11705
|
|
|
11368
|
-
export { AccordionComponent, AccordionItemComponent, Aggregation, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, DefaultViewGuard, DisplayMode, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterInstanciatorComponent, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, NamedQueryUtils, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessUtils, PryBaseAccess, PryBaseAccessGuard, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryTooltipDirective, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SearchActions, SearchSelectors, SearchService, SettingsComponent, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getDisplayOptions, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, selectIds$2 as selectIds, selectTotal$2 as selectTotal, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
|
|
11706
|
+
export { AccordionComponent, AccordionItemComponent, Aggregation, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_PROJECTION, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, DefaultViewGuard, DisplayMode, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterInstanciatorComponent, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, NamedQueryUtils, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFrontendAggregationService, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryTooltipDirective, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SearchActions, SearchSelectors, SearchService, SettingsComponent, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getDisplayOptions, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, selectIds$2 as selectIds, selectTotal$2 as selectTotal, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
|
|
11369
11707
|
//# sourceMappingURL=provoly-dashboard.mjs.map
|