@provoly/dashboard 0.14.9 → 0.14.11
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-layout/admin-layout.component.d.ts +5 -3
- package/assets/svgs/map.svg +1 -1
- package/components/metadata-editor/metadata-editor.component.d.ts +1 -3
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +1 -1
- package/esm2022/admin/components/admin-layout/admin-layout.component.mjs +10 -7
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +1 -1
- package/esm2022/admin/i18n/en.translations.mjs +2 -2
- package/esm2022/admin/i18n/fr.translations.mjs +5 -5
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +8 -29
- package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +2 -2
- package/esm2022/lib/core/components/about/about.component.mjs +29 -0
- package/esm2022/lib/core/components/about/pry-about.module.mjs +21 -0
- package/esm2022/lib/core/components/icon/icon.component.mjs +5 -1
- package/esm2022/lib/core/i18n/en.translations.mjs +13 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +13 -2
- package/esm2022/lib/core/i18n/i18n.pipe.mjs +4 -3
- package/esm2022/lib/core/i18n/i18n.service.mjs +5 -5
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/public-api.mjs +3 -1
- package/esm2022/lib/core/store/class/class.effects.mjs +1 -1
- package/esm2022/lib/core/store/config/config.actions.mjs +5 -2
- package/esm2022/lib/core/store/config/config.effects.mjs +4 -1
- package/esm2022/lib/core/store/config/config.reducer.mjs +10 -3
- package/esm2022/lib/core/store/config/config.selectors.mjs +6 -4
- package/esm2022/lib/core/store/config/config.service.mjs +36 -2
- package/esm2022/lib/core/store/config/versions.interface.mjs +2 -0
- package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +15 -1
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -17
- package/esm2022/lib/dashboard/components/manifests/manifests.component.mjs +3 -1
- package/esm2022/lib/dashboard/components/widgets/base-widget.component.mjs +3 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +2 -2
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +12 -4
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +7 -1
- package/esm2022/lib/dashboard/store/manifest.service.mjs +2 -3
- package/esm2022/notification/store/notification.effects.mjs +3 -3
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +23 -18
- package/esm2022/presentation/components/presentation.component.mjs +18 -18
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +3 -3
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +6 -3
- package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.mjs +6 -3
- package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors.component.mjs +2 -2
- package/esm2022/supervision/components/supervision-layout/supervision-layout.component.mjs +2 -2
- package/esm2022/supervision/components/supervision.component.mjs +2 -2
- package/esm2022/supervision/store/supervision.actions.mjs +1 -1
- package/esm2022/supervision/store/supervision.reducer.mjs +3 -2
- package/esm2022/supervision/store/supervision.selectors.mjs +2 -2
- package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +18 -11
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +20 -6
- package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +1 -2
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +2 -2
- package/fesm2022/provoly-dashboard-admin.mjs +15 -12
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +7 -28
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-notification.mjs +2 -2
- package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +41 -37
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +7 -4
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-supervision.mjs +11 -8
- package/fesm2022/provoly-dashboard-supervision.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +17 -10
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +19 -6
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +184 -56
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/about/about.component.d.ts +12 -0
- package/lib/core/components/about/pry-about.module.d.ts +10 -0
- package/lib/core/i18n/en.translations.d.ts +11 -0
- package/lib/core/i18n/fr.translations.d.ts +11 -0
- package/lib/core/i18n/i18n.service.d.ts +2 -2
- package/lib/core/model/widget-map-manifest.interface.d.ts +2 -0
- package/lib/core/public-api.d.ts +2 -0
- package/lib/core/store/config/config.actions.d.ts +12 -0
- package/lib/core/store/config/config.effects.d.ts +6 -0
- package/lib/core/store/config/config.reducer.d.ts +2 -0
- package/lib/core/store/config/config.selectors.d.ts +1 -0
- package/lib/core/store/config/config.service.d.ts +2 -0
- package/lib/core/store/config/versions.interface.d.ts +10 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +4 -4
- package/lib/dashboard/store/manifest.service.d.ts +1 -1
- package/package.json +25 -25
- package/presentation/components/add-edit-presentation/add-edit-presentation.component.d.ts +4 -3
- package/presentation/components/presentation.component.d.ts +2 -2
- package/presentation/style/_o-pry-new-presentation.scss +7 -0
- package/restitution/components/restitution-list-item/restitution-list-item.component.d.ts +3 -2
- package/styles/layout/_o-base-layout.scss +8 -1
- package/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.d.ts +1 -1
- package/supervision/store/supervision.actions.d.ts +2 -2
- package/supervision/store/supervision.reducer.d.ts +1 -1
- package/supervision/store/supervision.selectors.d.ts +1 -1
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +7 -0
- package/widgets/widget-aggregated-chart/i18n/fr.translations.d.ts +0 -1
|
@@ -150,18 +150,29 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
150
150
|
const ordinate = classes
|
|
151
151
|
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.ordinate.attribute))
|
|
152
152
|
.find((attr) => !!attr);
|
|
153
|
+
const groupBy = classes
|
|
154
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.groupBy?.attribute))
|
|
155
|
+
.find((attr) => !!attr);
|
|
153
156
|
const abscissaFieldType = fields.find((field) => field.id === abscissa?.field)?.type ?? FieldType.STRING;
|
|
154
157
|
const ordinateFieldType = fields.find((field) => field.id === ordinate?.field)?.type ?? FieldType.STRING;
|
|
158
|
+
const groupByFieldType = fields.find((field) => field.id === groupBy?.field)?.type ?? FieldType.STRING;
|
|
155
159
|
return {
|
|
156
160
|
abscissa: {
|
|
157
161
|
fieldType: abscissaFieldType,
|
|
158
|
-
vegaType: this.translateToVegaType(abscissaFieldType, abscissa?.name ?? '')
|
|
162
|
+
vegaType: this.translateToVegaType(abscissaFieldType, abscissa?.name ?? ''),
|
|
163
|
+
name: abscissa?.name ?? ''
|
|
159
164
|
},
|
|
160
165
|
ordinate: {
|
|
161
166
|
fieldType: ordinateFieldType,
|
|
162
167
|
vegaType: options.ordinate.operation === Operation.COUNT || options.ordinate.operation === Operation.DISTINCT
|
|
163
168
|
? VegaType.QUANTITATIVE
|
|
164
|
-
: this.translateToVegaType(ordinateFieldType, ordinate?.name ?? '')
|
|
169
|
+
: this.translateToVegaType(ordinateFieldType, ordinate?.name ?? ''),
|
|
170
|
+
name: ordinate?.name ?? ''
|
|
171
|
+
},
|
|
172
|
+
groupBy: {
|
|
173
|
+
fieldType: groupByFieldType,
|
|
174
|
+
vegaType: this.translateToVegaType(groupByFieldType, groupBy?.name),
|
|
175
|
+
name: groupBy?.name ?? ''
|
|
165
176
|
}
|
|
166
177
|
};
|
|
167
178
|
}));
|
|
@@ -192,6 +203,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
192
203
|
]).pipe(map(([options, types, values, size, display]) => {
|
|
193
204
|
const isCircular = [GraphType.CIRCULAR, GraphType.DONUT].includes(options.graph.type);
|
|
194
205
|
const stacked = options.graph.type.startsWith('bar') ? !options.graph.stacked : options.graph.stacked;
|
|
206
|
+
const legendTitle = this.translateService.instant(options.groupBy ? types.groupBy.name ?? '' : '@pry.widget.chart.legendLabel');
|
|
195
207
|
return mergeDeep({
|
|
196
208
|
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
197
209
|
title: this.getTitle(options),
|
|
@@ -252,7 +264,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
252
264
|
: undefined,
|
|
253
265
|
theta: isCircular ? { field: 'value', type: types.ordinate.vegaType } : undefined,
|
|
254
266
|
color: {
|
|
255
|
-
title:
|
|
267
|
+
title: legendTitle,
|
|
256
268
|
field: !isCircular ? 'series' : 'key',
|
|
257
269
|
legend: options.graph.legend,
|
|
258
270
|
scale: options.graph.legend ? { scheme: options.groupBy?.color ?? this.schemes[0].id } : undefined
|
|
@@ -270,7 +282,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
270
282
|
{ field: 'value', type: types.ordinate.vegaType, title: options.ordinate.label },
|
|
271
283
|
{
|
|
272
284
|
field: 'series',
|
|
273
|
-
title:
|
|
285
|
+
title: legendTitle,
|
|
274
286
|
type: 'nominal'
|
|
275
287
|
}
|
|
276
288
|
]
|
|
@@ -301,7 +313,9 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
301
313
|
renderer: 'canvas',
|
|
302
314
|
formatLocale: this.translateService.instantObject('@pry.widget.chart.numberLocale'),
|
|
303
315
|
timeFormatLocale: this.translateService.instantObject('@pry.widget.chart.timeFormatLocale')
|
|
304
|
-
})
|
|
316
|
+
})
|
|
317
|
+
.then((result) => (this.view = result.view))
|
|
318
|
+
.catch((err) => console.error('Cannot display chart', err));
|
|
305
319
|
}
|
|
306
320
|
else {
|
|
307
321
|
setTimeout(() => this.trigger$.next(), 100);
|
|
@@ -801,7 +815,6 @@ const frTranslations = {
|
|
|
801
815
|
title: 'Opération'
|
|
802
816
|
},
|
|
803
817
|
chooseParameters: "Merci de sélectionner les paramètres afin d'afficher le graphique",
|
|
804
|
-
series: 'Regroupement',
|
|
805
818
|
type: 'Type de graphique',
|
|
806
819
|
title: 'Titre du graphique',
|
|
807
820
|
graphType: {
|