@provoly/dashboard 1.1.12 → 1.2.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/components/sinceDate/sinceDate.pipe.d.ts +2 -0
- package/esm2022/components/sinceDate/sinceDate.pipe.mjs +27 -10
- package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
- package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
- package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +1 -1
- package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +88 -14
- package/esm2022/widgets/widget-analytic/i18n/en.translations.mjs +7 -2
- package/esm2022/widgets/widget-analytic/i18n/fr.translations.mjs +7 -2
- package/esm2022/widgets/widget-analytic/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-analytic/widget-analytic.module.mjs +12 -8
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs +26 -9
- package/fesm2022/provoly-dashboard-components-sinceDate.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +112 -24
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +4 -2
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/i18n/en.translations.d.ts +2 -1
- package/lib/core/i18n/fr.translations.d.ts +2 -1
- package/lib/core/model/widget-analytic-manifest.interface.d.ts +8 -1
- package/package.json +7 -7
- package/widgets/widget-analytic/component/widget-analytic.component.d.ts +18 -0
- package/widgets/widget-analytic/i18n/en.translations.d.ts +5 -0
- package/widgets/widget-analytic/i18n/fr.translations.d.ts +5 -0
- package/widgets/widget-analytic/style/_o-widget-analytic.scss +48 -0
- package/widgets/widget-analytic/widget-analytic.module.d.ts +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-components-sinceDate.mjs","sources":["../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.pipe.ts","../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.module.ts","../../../../projects/provoly/dashboard/components/sinceDate/provoly-dashboard-components-sinceDate.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Pipe({\n name: 'sinceDate'\n})\nexport class PrySinceDatePipe implements PipeTransform {\n constructor(private translateService: PryI18nService) {}\n\n transform(value: string, ...args: any[]): string {\n const date = new Date(value);\n
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-components-sinceDate.mjs","sources":["../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.pipe.ts","../../../../projects/provoly/dashboard/components/sinceDate/sinceDate.module.ts","../../../../projects/provoly/dashboard/components/sinceDate/provoly-dashboard-components-sinceDate.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { PryI18nService } from '@provoly/dashboard';\n\n@Pipe({\n name: 'sinceDate'\n})\nexport class PrySinceDatePipe implements PipeTransform {\n private _now?: Date;\n\n constructor(private translateService: PryI18nService) {}\n\n transform(value: string, ...args: any[]): string {\n const date = new Date(value);\n\n if (!!args[0] && args[0].onlyLocale) {\n return date.toLocaleString();\n }\n\n if (isNaN(date.getTime())) {\n return '';\n }\n\n const dateNow = this._now ?? new Date();\n\n if (\n date.getFullYear() === dateNow.getFullYear() &&\n date.getMonth() === dateNow.getMonth() &&\n date.getDate() === dateNow.getDate()\n ) {\n return this.translateService.instant('@pry.toolbox.today', {\n hour: `${date.getHours()}`.padStart(2, '0'),\n min: `${date.getMinutes()}`.padStart(2, '0')\n });\n }\n\n const dayDiff = this.getDayDiff(date, dateNow);\n const dayDiffAbs = Math.ceil(Math.abs(dayDiff));\n const dayDiffPast = dayDiff > 0;\n if (dayDiffAbs > 30) {\n return date.toLocaleString();\n } else {\n return this.translateService.instant(dayDiffPast ? '@pry.toolbox.since_day' : '@pry.toolbox.from_day', {\n day: dayDiffAbs,\n plural: dayDiffAbs >= 2 ? 's' : ''\n });\n }\n }\n\n getDayDiff(startDate: Date, endDate: Date): number {\n const msInDay = 24 * 60 * 60 * 1000;\n return (endDate.getTime() - startDate.getTime()) / msInDay;\n }\n\n useNow(date?: Date) {\n this._now = date;\n return this;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { PrySinceDatePipe } from './sinceDate.pipe';\n\n@NgModule({\n declarations: [PrySinceDatePipe],\n exports: [PrySinceDatePipe]\n})\nexport class PrySinceDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAMa,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CAAoB,gBAAgC,EAAA;QAAhC,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAgB;KAAI;AAExD,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,IAAW,EAAA;AACrC,QAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;AAE7B,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE;AACnC,YAAA,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;SAC9B;QAED,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE;AACzB,YAAA,OAAO,EAAE,CAAC;SACX;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QAExC,IACE,IAAI,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,WAAW,EAAE;AAC5C,YAAA,IAAI,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,QAAQ,EAAE;YACtC,IAAI,CAAC,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,EAAE,EACpC;AACA,YAAA,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,oBAAoB,EAAE;AACzD,gBAAA,IAAI,EAAE,CAAA,EAAG,IAAI,CAAC,QAAQ,EAAE,CAA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,EAAA,CAAA,CAAA,EAAA;4GAAhB,gBAAgB,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA,EAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AAClB,iBAAA,CAAA;;;MCEY,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,gBAAgB,CAAA,EAAA,OAAA,EAAA,CACrB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEf,kBAAkB,EAAA,CAAA,CAAA,EAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;oBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC5B,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -2,29 +2,49 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
3
|
import * as i4 from '@provoly/dashboard';
|
|
4
4
|
import { DataWidgetComponent, ClassSelectors, WIDGET_HEADER_HEIGHT, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryI18nModule } from '@provoly/dashboard';
|
|
5
|
-
import { map, combineLatest } from 'rxjs';
|
|
5
|
+
import { map, combineLatest, startWith } from 'rxjs';
|
|
6
|
+
import { filter } from 'rxjs/operators';
|
|
6
7
|
import * as i1 from '@ngrx/store';
|
|
7
8
|
import * as i2 from '@angular/common';
|
|
8
9
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
9
10
|
import * as i3 from '@angular/forms';
|
|
10
11
|
import { FormsModule } from '@angular/forms';
|
|
11
|
-
import
|
|
12
|
+
import * as i5 from '@provoly/dashboard/components/checkbox';
|
|
12
13
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
13
|
-
import
|
|
14
|
+
import * as i6 from '@provoly/dashboard/components/color-picker';
|
|
15
|
+
import { PryColorPickerModule } from '@provoly/dashboard/components/color-picker';
|
|
16
|
+
import * as i7 from '@angular/cdk/drag-drop';
|
|
17
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
18
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
14
19
|
|
|
15
20
|
class PryWidgetAnalyticCssComponent {
|
|
16
21
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryWidgetAnalyticCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryWidgetAnalyticCssComponent, selector: "pry-widget-analytic-css", ngImport: i0, template: '', isInline: true, styles: [".o-widget__analytic__table,.o-widget__analytic__table table{width:100%}.o-widget__analytic__table table th,.o-widget__analytic__table table td{text-align:center}.o-widget__analytic__table table th:first-child,.o-widget__analytic__table table td:first-child{text-align:left}.o-widget__analytic__table table .primary-header th:not(:first-child){background-color:#d7e7f7}.o-widget__analytic__table table .secondary-header th:not(:first-child){background-color:#f3f8fc}.o-widget__analytic__table table .partial-total th,.o-widget__analytic__table table .partial-total td{background-color:#f0f0f0}.o-widget__analytic__table table .grand-total th,.o-widget__analytic__table table .grand-total td{background-color:#bdb9da}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: PryWidgetAnalyticCssComponent, selector: "pry-widget-analytic-css", ngImport: i0, template: '', isInline: true, styles: [".o-widget__analytic__table,.o-widget__analytic__table table{width:100%}.o-widget__analytic__table table th,.o-widget__analytic__table table td{text-align:center}.o-widget__analytic__table table th:first-child,.o-widget__analytic__table table td:first-child{text-align:left}.o-widget__analytic__table table .primary-header th:not(:first-child){background-color:#d7e7f7}.o-widget__analytic__table table .secondary-header th:not(:first-child){background-color:#f3f8fc}.o-widget__analytic__table table .partial-total th,.o-widget__analytic__table table .partial-total td{background-color:#f0f0f0}.o-widget__analytic__table table .grand-total th,.o-widget__analytic__table table .grand-total td{background-color:#bdb9da}.o-widget__analytic__color-picker-container{margin-top:.625rem;gap:.9375rem;flex-wrap:wrap}.o-widget__analytic__color-picker{position:relative}.o-widget__analytic__color-picker-remove{position:absolute;right:-20px;top:-10px;z-index:2;color:#263340;padding:0}.o-widget__analytic__color-picker-add{padding:.75rem;border:1px solid #263340;border-radius:50%;width:20px}.cdk-drop-list-dragging .cdk-drag,.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging .o-widget__analytic__color-picker:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;border-radius:50%;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
18
23
|
}
|
|
19
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PryWidgetAnalyticCssComponent, decorators: [{
|
|
20
25
|
type: Component,
|
|
21
|
-
args: [{ selector: 'pry-widget-analytic-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-widget__analytic__table,.o-widget__analytic__table table{width:100%}.o-widget__analytic__table table th,.o-widget__analytic__table table td{text-align:center}.o-widget__analytic__table table th:first-child,.o-widget__analytic__table table td:first-child{text-align:left}.o-widget__analytic__table table .primary-header th:not(:first-child){background-color:#d7e7f7}.o-widget__analytic__table table .secondary-header th:not(:first-child){background-color:#f3f8fc}.o-widget__analytic__table table .partial-total th,.o-widget__analytic__table table .partial-total td{background-color:#f0f0f0}.o-widget__analytic__table table .grand-total th,.o-widget__analytic__table table .grand-total td{background-color:#bdb9da}\n"] }]
|
|
26
|
+
args: [{ selector: 'pry-widget-analytic-css', template: '', encapsulation: ViewEncapsulation.None, styles: [".o-widget__analytic__table,.o-widget__analytic__table table{width:100%}.o-widget__analytic__table table th,.o-widget__analytic__table table td{text-align:center}.o-widget__analytic__table table th:first-child,.o-widget__analytic__table table td:first-child{text-align:left}.o-widget__analytic__table table .primary-header th:not(:first-child){background-color:#d7e7f7}.o-widget__analytic__table table .secondary-header th:not(:first-child){background-color:#f3f8fc}.o-widget__analytic__table table .partial-total th,.o-widget__analytic__table table .partial-total td{background-color:#f0f0f0}.o-widget__analytic__table table .grand-total th,.o-widget__analytic__table table .grand-total td{background-color:#bdb9da}.o-widget__analytic__color-picker-container{margin-top:.625rem;gap:.9375rem;flex-wrap:wrap}.o-widget__analytic__color-picker{position:relative}.o-widget__analytic__color-picker-remove{position:absolute;right:-20px;top:-10px;z-index:2;color:#263340;padding:0}.o-widget__analytic__color-picker-add{padding:.75rem;border:1px solid #263340;border-radius:50%;width:20px}.cdk-drop-list-dragging .cdk-drag,.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging .o-widget__analytic__color-picker:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{box-sizing:border-box;border-radius:50%;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}\n"] }]
|
|
22
27
|
}] });
|
|
23
28
|
|
|
24
29
|
class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
25
30
|
change($event, prop) {
|
|
26
31
|
this.optionsCopy[prop] = $event;
|
|
27
32
|
}
|
|
33
|
+
changeColorConfig($event, prop) {
|
|
34
|
+
switch (prop) {
|
|
35
|
+
case 'prop': {
|
|
36
|
+
this.optionsCopy.colorConfig.prop = $event;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
case 'colors': {
|
|
40
|
+
this.optionsCopy.colorConfig.colors = $event;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
changeFormat($event, prop = 'suffix') {
|
|
46
|
+
this.optionsCopy.format.suffix = $event;
|
|
47
|
+
}
|
|
28
48
|
constructor(store, el) {
|
|
29
49
|
super(store, el);
|
|
30
50
|
this.optionsCopy = { primaryProp: '', secondaryProp: '', verticalProp: '', valueProp: '' };
|
|
@@ -34,16 +54,16 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
34
54
|
this.subscriptions.add(this.options$.subscribe((options) => {
|
|
35
55
|
this.optionsCopy = JSON.parse(JSON.stringify(options));
|
|
36
56
|
}));
|
|
37
|
-
this.primaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.primaryProp)));
|
|
38
|
-
this.secondaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.secondaryProp, 1)));
|
|
39
|
-
this.verticalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 1)));
|
|
57
|
+
this.primaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(filter(([options]) => !!options.primaryProp), map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.primaryProp)));
|
|
58
|
+
this.secondaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(filter(([options]) => !!options.secondaryProp), map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.secondaryProp, 1)));
|
|
59
|
+
this.verticalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(filter(([options]) => !!options.verticalProp), map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 1)));
|
|
40
60
|
this.totalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 2)));
|
|
41
61
|
this.grandTotalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 3)));
|
|
42
62
|
this.lines$ = combineLatest([
|
|
43
63
|
this.options$,
|
|
44
|
-
this.primaryProperty
|
|
45
|
-
this.secondaryProperty
|
|
46
|
-
this.verticalProperty
|
|
64
|
+
this.primaryProperty$.pipe(startWith([])),
|
|
65
|
+
this.secondaryProperty$.pipe(startWith(undefined)),
|
|
66
|
+
this.verticalProperty$.pipe(startWith([])),
|
|
47
67
|
this.resultSet$
|
|
48
68
|
]).pipe(map(([options, primaryProps, secondaryProps, verticalProps, rs]) => this.createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, 1)));
|
|
49
69
|
this.totals$ = combineLatest([
|
|
@@ -59,6 +79,12 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
59
79
|
this.grandTotalProperty$,
|
|
60
80
|
this.resultSet$
|
|
61
81
|
]).pipe(map(([options, primaryProps, verticalProps, rs]) => this.createValueMap(verticalProps, primaryProps, undefined, rs, options, 3)));
|
|
82
|
+
this.colorMap$ = combineLatest([
|
|
83
|
+
this.options$,
|
|
84
|
+
this.resultSet$,
|
|
85
|
+
this.verticalProperty$,
|
|
86
|
+
this.primaryProperty$
|
|
87
|
+
]).pipe(filter(([options]) => !!options.colorConfig), map(([options, rs, vertical, primary]) => this.createColorMap(vertical, primary, rs, options)));
|
|
62
88
|
this.availableProperties$ = combineLatest([this.classes$, this.resultSet$]).pipe(map(([classes, rs]) => {
|
|
63
89
|
const presentClassesId = Object.keys(rs.items);
|
|
64
90
|
const presentClasses = presentClassesId
|
|
@@ -68,7 +94,7 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
68
94
|
}));
|
|
69
95
|
}
|
|
70
96
|
matchAttributeValue(item, prop, comparisonValue) {
|
|
71
|
-
return comparisonValue ? item.attributes[prop].value == comparisonValue : true;
|
|
97
|
+
return comparisonValue && prop ? item.attributes[prop].value == comparisonValue : true;
|
|
72
98
|
}
|
|
73
99
|
createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, level) {
|
|
74
100
|
return verticalProps.map((vertical) => {
|
|
@@ -87,7 +113,7 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
87
113
|
value[primary][secondary] = matchingItem.attributes[options.valueProp].value;
|
|
88
114
|
}
|
|
89
115
|
else {
|
|
90
|
-
value[primary] = matchingItem.attributes[options.valueProp]
|
|
116
|
+
value[primary] = matchingItem.attributes[options.valueProp]?.value;
|
|
91
117
|
}
|
|
92
118
|
}
|
|
93
119
|
});
|
|
@@ -98,7 +124,7 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
98
124
|
getPropertyLabelsForLevel(rs, property, level) {
|
|
99
125
|
const values = Object.values(rs.items)
|
|
100
126
|
.map((items) => items
|
|
101
|
-
.filter((item) => level
|
|
127
|
+
.filter((item) => level && 'level' in item.attributes
|
|
102
128
|
? [level, '' + level].includes(item.attributes['level'].value)
|
|
103
129
|
: true)
|
|
104
130
|
.map((item) => item.attributes[property].value + ''))
|
|
@@ -106,6 +132,55 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
106
132
|
.flat();
|
|
107
133
|
return [...new Set(values)];
|
|
108
134
|
}
|
|
135
|
+
createColorMap(verticalProps, primaryProps, rs, options) {
|
|
136
|
+
return options.colorConfig
|
|
137
|
+
? Object.fromEntries(verticalProps.map((vertical) => [
|
|
138
|
+
vertical,
|
|
139
|
+
Object.fromEntries(primaryProps.map((primary) => {
|
|
140
|
+
const matchingItem = (rs.items[Object.keys(rs.items)[0]] ?? []).find((item) => this.matchAttributeValue(item, options.primaryProp, primary) &&
|
|
141
|
+
this.matchAttributeValue(item, options.verticalProp, vertical));
|
|
142
|
+
return [
|
|
143
|
+
primary,
|
|
144
|
+
matchingItem && matchingItem.attributes[options.valueProp].value !== 0
|
|
145
|
+
? options.colorConfig?.colors[matchingItem.attributes[options.colorConfig.prop].value -
|
|
146
|
+
1]
|
|
147
|
+
: '#FFFFFF'
|
|
148
|
+
];
|
|
149
|
+
}))
|
|
150
|
+
]))
|
|
151
|
+
: {};
|
|
152
|
+
}
|
|
153
|
+
toggleColorConfig($event) {
|
|
154
|
+
if ($event !== !!this.optionsCopy.colorConfig) {
|
|
155
|
+
if (!this.optionsCopy.colorConfig) {
|
|
156
|
+
this.optionsCopy.colorConfig = { prop: '', colors: [] };
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.optionsCopy.colorConfig = undefined;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
toggleFormat($event) {
|
|
164
|
+
if ($event !== !!this.optionsCopy.format) {
|
|
165
|
+
if (!this.optionsCopy.format) {
|
|
166
|
+
this.optionsCopy.format = { suffix: '' };
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
this.optionsCopy.format = undefined;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
modifyColorScheme($event, index) {
|
|
174
|
+
$event && index !== undefined
|
|
175
|
+
? (this.optionsCopy.colorConfig.colors[index] = $event)
|
|
176
|
+
: this.optionsCopy.colorConfig.colors.push('#FFFFFF');
|
|
177
|
+
}
|
|
178
|
+
removeColor(index) {
|
|
179
|
+
this.optionsCopy.colorConfig.colors.splice(index, 1);
|
|
180
|
+
}
|
|
181
|
+
drop(event) {
|
|
182
|
+
this.optionsCopy.colorConfig.colors.splice(event.currentIndex, 0, this.optionsCopy.colorConfig.colors.splice(event.previousIndex, 1)[0]);
|
|
183
|
+
}
|
|
109
184
|
emitManifest() {
|
|
110
185
|
this.manifestModified.emit({
|
|
111
186
|
widgetIndex: this.widgetIndex,
|
|
@@ -113,11 +188,11 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
113
188
|
});
|
|
114
189
|
}
|
|
115
190
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetAnalyticComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
116
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: WidgetAnalyticComponent, selector: "pry-widget-analytic", usesInheritance: true, ngImport: i0, template: "<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n <tr class=\"secondary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <th>{{ secondary }}</th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @for (line of lines$ | async; track line.name) {\n <tr>\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n </tbody>\n <tfoot>\n @for (line of totals$ | async; track line.name) {\n <tr class=\"partial-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n @for (line of grandTotals$ | async; track line.name) {\n <tr class=\"grand-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n <td [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ line.value[primary] }}\n </td>\n }\n </tr>\n }\n </tfoot>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i4.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i4.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: PryWidgetAnalyticCssComponent, selector: "pry-widget-analytic-css" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
191
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: WidgetAnalyticComponent, selector: "pry-widget-analytic", usesInheritance: true, ngImport: i0, template: "<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n [clearable]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleColorConfig($event)\" [ngModel]=\"!!optionsCopy.colorConfig\">\n {{ '@pry.widget.analytic.colorConfig' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.colorConfig) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colorProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorConfig($event, 'prop')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.colorConfig.prop\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"colorProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colors' | i18n }}</label>\n <div\n class=\"o-widget__analytic__color-picker-container u-display-flex -align-center\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n cdkDropListOrientation=\"horizontal\"\n >\n @for (color of optionsCopy.colorConfig.colors; track color; let i = $index) {\n <div class=\"o-widget__analytic__color-picker\" cdkDrag>\n <pry-color-picker\n [ngModel]=\"color\"\n (ngModelChange)=\"modifyColorScheme($event, i)\"\n ></pry-color-picker>\n <button (click)=\"removeColor(i)\" class=\"o-widget__analytic__color-picker-remove\">\n <pry-icon iconSvg=\"close\" [height]=\"15\" [width]=\"15\"></pry-icon>\n </button>\n <div *cdkDragPreview>\n <pry-color-picker [ngModel]=\"color\"></pry-color-picker>\n </div>\n </div>\n }\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only o-widget__analytic__color-picker-add\"\n (click)=\"modifyColorScheme()\"\n >\n <pry-icon iconSvg=\"add\" [height]=\"20\" [width]=\"20\"></pry-icon>\n </button>\n </div>\n </div>\n }\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleFormat($event)\" [ngModel]=\"!!optionsCopy.format\">\n {{ '@pry.widget.analytic.format' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.format) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"format\">{{ '@pry.widget.analytic.suffix' | i18n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n id=\"format\"\n [ngModel]=\"optionsCopy.format.suffix\"\n (ngModelChange)=\"changeFormat($event)\"\n />\n </div>\n }\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n @if (optionsCopy.secondaryProp) {\n <tr class=\"secondary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <th>{{ secondary }}</th>\n }\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (line of lines$ | async; track line.name) {\n <tr>\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @if (optionsCopy.secondaryProp) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary][secondary]\n }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n } @else {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary] }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n }\n </tr>\n }\n </tbody>\n <tfoot>\n @for (line of totals$ | async; track line.name) {\n <tr class=\"partial-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n @for (line of grandTotals$ | async; track line.name) {\n <tr class=\"grand-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n <td [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ line.value[primary] }}\n </td>\n }\n </tr>\n }\n </tfoot>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i4.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i4.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i4.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i5.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i6.PryColorPickerComponent, selector: "pry-color-picker" }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "component", type: PryWidgetAnalyticCssComponent, selector: "pry-widget-analytic-css" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
117
192
|
}
|
|
118
193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetAnalyticComponent, decorators: [{
|
|
119
194
|
type: Component,
|
|
120
|
-
args: [{ selector: 'pry-widget-analytic', template: "<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n <tr class=\"secondary-header\">\n
|
|
195
|
+
args: [{ selector: 'pry-widget-analytic', template: "<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n [clearable]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleColorConfig($event)\" [ngModel]=\"!!optionsCopy.colorConfig\">\n {{ '@pry.widget.analytic.colorConfig' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.colorConfig) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colorProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorConfig($event, 'prop')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.colorConfig.prop\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"colorProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colors' | i18n }}</label>\n <div\n class=\"o-widget__analytic__color-picker-container u-display-flex -align-center\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n cdkDropListOrientation=\"horizontal\"\n >\n @for (color of optionsCopy.colorConfig.colors; track color; let i = $index) {\n <div class=\"o-widget__analytic__color-picker\" cdkDrag>\n <pry-color-picker\n [ngModel]=\"color\"\n (ngModelChange)=\"modifyColorScheme($event, i)\"\n ></pry-color-picker>\n <button (click)=\"removeColor(i)\" class=\"o-widget__analytic__color-picker-remove\">\n <pry-icon iconSvg=\"close\" [height]=\"15\" [width]=\"15\"></pry-icon>\n </button>\n <div *cdkDragPreview>\n <pry-color-picker [ngModel]=\"color\"></pry-color-picker>\n </div>\n </div>\n }\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only o-widget__analytic__color-picker-add\"\n (click)=\"modifyColorScheme()\"\n >\n <pry-icon iconSvg=\"add\" [height]=\"20\" [width]=\"20\"></pry-icon>\n </button>\n </div>\n </div>\n }\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleFormat($event)\" [ngModel]=\"!!optionsCopy.format\">\n {{ '@pry.widget.analytic.format' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.format) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"format\">{{ '@pry.widget.analytic.suffix' | i18n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n id=\"format\"\n [ngModel]=\"optionsCopy.format.suffix\"\n (ngModelChange)=\"changeFormat($event)\"\n />\n </div>\n }\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n @if (optionsCopy.secondaryProp) {\n <tr class=\"secondary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <th>{{ secondary }}</th>\n }\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (line of lines$ | async; track line.name) {\n <tr>\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @if (optionsCopy.secondaryProp) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary][secondary]\n }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n } @else {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary] }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n }\n </tr>\n }\n </tbody>\n <tfoot>\n @for (line of totals$ | async; track line.name) {\n <tr class=\"partial-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n @for (line of grandTotals$ | async; track line.name) {\n <tr class=\"grand-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n <td [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ line.value[primary] }}\n </td>\n }\n </tr>\n }\n </tfoot>\n </table>\n </div>\n</div>\n" }]
|
|
121
196
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i0.ElementRef }] });
|
|
122
197
|
|
|
123
198
|
const enTranslations = {
|
|
@@ -127,7 +202,12 @@ const enTranslations = {
|
|
|
127
202
|
primaryProp: 'Attribute that contains the horizontal primary field',
|
|
128
203
|
secondaryProp: 'Attribute that contains the horizontal secondary field',
|
|
129
204
|
verticalProp: 'Attribute that contains the vertical attribute',
|
|
130
|
-
valueProp: 'Attribute that contains the value'
|
|
205
|
+
valueProp: 'Attribute that contains the value',
|
|
206
|
+
colorConfig: 'Cell color configuration',
|
|
207
|
+
colorProp: 'Color attribute',
|
|
208
|
+
colors: 'Colors',
|
|
209
|
+
format: 'Value formatting',
|
|
210
|
+
suffix: 'Suffix'
|
|
131
211
|
}
|
|
132
212
|
}
|
|
133
213
|
}
|
|
@@ -140,7 +220,12 @@ const frTranslations = {
|
|
|
140
220
|
primaryProp: 'Attribut horizontal primaire',
|
|
141
221
|
secondaryProp: 'Attribut horizontal secondaire',
|
|
142
222
|
verticalProp: 'Attribut vertical',
|
|
143
|
-
valueProp: 'Attribut contenant la valeur'
|
|
223
|
+
valueProp: 'Attribut contenant la valeur',
|
|
224
|
+
colorConfig: 'Configuration des couleurs de cellules',
|
|
225
|
+
colorProp: 'Attribut de la couleur',
|
|
226
|
+
colors: 'Couleurs',
|
|
227
|
+
format: 'Formattage des valeurs',
|
|
228
|
+
suffix: 'Suffixe'
|
|
144
229
|
}
|
|
145
230
|
}
|
|
146
231
|
}
|
|
@@ -166,9 +251,10 @@ class WidgetAnalyticModule extends BaseWidgetModule {
|
|
|
166
251
|
PryIconModule,
|
|
167
252
|
PryCheckboxModule,
|
|
168
253
|
PryToggleModule,
|
|
169
|
-
WidgetMapModule,
|
|
170
254
|
PryI18nModule,
|
|
171
|
-
AsyncPipe
|
|
255
|
+
AsyncPipe,
|
|
256
|
+
PryColorPickerModule,
|
|
257
|
+
DragDropModule], exports: [WidgetAnalyticComponent] }); }
|
|
172
258
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetAnalyticModule, imports: [CommonModule,
|
|
173
259
|
FormsModule,
|
|
174
260
|
OverlayModule,
|
|
@@ -178,8 +264,9 @@ class WidgetAnalyticModule extends BaseWidgetModule {
|
|
|
178
264
|
PryIconModule,
|
|
179
265
|
PryCheckboxModule,
|
|
180
266
|
PryToggleModule,
|
|
181
|
-
|
|
182
|
-
|
|
267
|
+
PryI18nModule,
|
|
268
|
+
PryColorPickerModule,
|
|
269
|
+
DragDropModule] }); }
|
|
183
270
|
}
|
|
184
271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: WidgetAnalyticModule, decorators: [{
|
|
185
272
|
type: NgModule,
|
|
@@ -195,9 +282,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
|
|
|
195
282
|
PryIconModule,
|
|
196
283
|
PryCheckboxModule,
|
|
197
284
|
PryToggleModule,
|
|
198
|
-
WidgetMapModule,
|
|
199
285
|
PryI18nModule,
|
|
200
|
-
AsyncPipe
|
|
286
|
+
AsyncPipe,
|
|
287
|
+
PryColorPickerModule,
|
|
288
|
+
DragDropModule
|
|
201
289
|
],
|
|
202
290
|
exports: [WidgetAnalyticComponent]
|
|
203
291
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-widgets-widget-analytic.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-analytic/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/component/widget-analytic.component.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/component/widget-analytic.component.html","../../../../projects/provoly/dashboard/widgets/widget-analytic/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/widget-analytic.module.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/provoly-dashboard-widgets-widget-analytic.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-analytic-css',\n template: '',\n styleUrls: ['./_o-widget-analytic.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetAnalyticCssComponent {}\n","import { Component, ElementRef } from '@angular/core';\nimport {\n AnalyticWidgetOptions,\n Attribute,\n AttributeSimpleValue,\n Class,\n ClassSelectors,\n DataWidgetComponent,\n Item,\n ResultSet,\n WIDGET_HEADER_HEIGHT\n} from '@provoly/dashboard';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { Store } from '@ngrx/store';\n\n@Component({\n selector: 'pry-widget-analytic',\n templateUrl: './widget-analytic.component.html'\n})\nexport class WidgetAnalyticComponent extends DataWidgetComponent {\n optionsCopy: AnalyticWidgetOptions = { primaryProp: '', secondaryProp: '', verticalProp: '', valueProp: '' };\n options$: Observable<AnalyticWidgetOptions>;\n\n primaryProperty$: Observable<string[]>;\n secondaryProperty$: Observable<string[]>;\n verticalProperty$: Observable<string[]>;\n totalProperty$: Observable<string[]>;\n grandTotalProperty$: Observable<string[]>;\n lines$: Observable<{ name: string; value: { [key: string]: { [key: string]: any } } }[]>;\n totals$: Observable<{ name: string; value: { [key: string]: { [key: string]: any } } }[]>;\n grandTotals$: Observable<{ name: any; value: { [p: string]: any } }[]>;\n height$: Observable<number>;\n classes$: Observable<Class[]>;\n availableProperties$: Observable<Attribute[]>;\n\n change($event: string, prop: 'primaryProp' | 'secondaryProp' | 'valueProp' | 'verticalProp') {\n this.optionsCopy[prop] = $event;\n }\n\n constructor(store: Store<any>, el: ElementRef) {\n super(store, el);\n this.options$ = this.manifest$.pipe(map((manifest) => (manifest.options ?? {}) as AnalyticWidgetOptions));\n this.classes$ = this.store.select(ClassSelectors.classes);\n this.height$ = combineLatest([this.widgetSize$, this.displayHeader$]).pipe(\n map(([size, header]) => size.height - (header ? WIDGET_HEADER_HEIGHT.value : 0))\n );\n this.subscriptions.add(\n this.options$.subscribe((options) => {\n this.optionsCopy = JSON.parse(JSON.stringify(options));\n })\n );\n this.primaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.primaryProp))\n );\n this.secondaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.secondaryProp, 1))\n );\n this.verticalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 1))\n );\n this.totalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 2))\n );\n this.grandTotalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 3))\n );\n\n this.lines$ = combineLatest([\n this.options$,\n this.primaryProperty$,\n this.secondaryProperty$,\n this.verticalProperty$,\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, secondaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, 1)\n )\n );\n\n this.totals$ = combineLatest([\n this.options$,\n this.primaryProperty$,\n this.secondaryProperty$,\n this.totalProperty$,\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, secondaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, 2)\n )\n );\n\n this.grandTotals$ = combineLatest([\n this.options$,\n this.primaryProperty$,\n this.grandTotalProperty$,\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, undefined, rs, options, 3)\n )\n );\n\n this.availableProperties$ = combineLatest([this.classes$, this.resultSet$]).pipe(\n map(([classes, rs]) => {\n const presentClassesId = Object.keys(rs.items);\n const presentClasses = presentClassesId\n .map((classId) => classes.find((cl) => cl.id === classId))\n .filter((cl) => !!cl) as Class[];\n return presentClasses.map((cl) => cl.attributes).flat();\n })\n );\n }\n\n private matchAttributeValue(item: Item, prop: string, comparisonValue: string | undefined) {\n return comparisonValue ? (item.attributes[prop] as AttributeSimpleValue).value == comparisonValue : true;\n }\n\n private createValueMap(\n verticalProps: string[],\n primaryProps: string[],\n secondaryProps: string[] | undefined,\n rs: ResultSet,\n options: AnalyticWidgetOptions,\n level?: number\n ) {\n return verticalProps.map((vertical) => {\n const value = {} as { [key: string]: { [key: string]: any } | any };\n primaryProps.forEach((primary) => {\n (secondaryProps ?? [undefined]).forEach((secondary) => {\n const matchingItem = (rs.items[Object.keys(rs.items)[0]] ?? []).find(\n (item) =>\n this.matchAttributeValue(item, options.primaryProp, primary) &&\n this.matchAttributeValue(item, options.secondaryProp, secondary) &&\n this.matchAttributeValue(item, options.verticalProp, vertical) &&\n this.matchAttributeValue(item, 'level', level + '')\n );\n if (!!matchingItem) {\n if (!!secondary) {\n if (!value[primary]) {\n value[primary] = {};\n }\n value[primary][secondary] = (matchingItem!.attributes[options.valueProp] as AttributeSimpleValue).value;\n } else {\n value[primary] = (matchingItem!.attributes[options.valueProp] as AttributeSimpleValue).value;\n }\n }\n });\n });\n return { name: vertical, value };\n });\n }\n\n getPropertyLabelsForLevel(rs: ResultSet, property: string, level?: number) {\n const values = Object.values(rs.items)\n .map((items) =>\n items\n .filter((item) =>\n level\n ? [level, '' + level].includes(\n (item.attributes['level'] as AttributeSimpleValue).value as string | number\n )\n : true\n )\n .map((item) => (item.attributes[property] as AttributeSimpleValue).value + '')\n )\n .flat()\n .flat();\n return [...new Set(values)];\n }\n\n emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n}\n","<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n <tr class=\"secondary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <th>{{ secondary }}</th>\n }\n }\n </tr>\n </thead>\n <tbody>\n @for (line of lines$ | async; track line.name) {\n <tr>\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n </tbody>\n <tfoot>\n @for (line of totals$ | async; track line.name) {\n <tr class=\"partial-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n @for (line of grandTotals$ | async; track line.name) {\n <tr class=\"grand-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n <td [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ line.value[primary] }}\n </td>\n }\n </tr>\n }\n </tfoot>\n </table>\n </div>\n</div>\n","export const enTranslations = {\n '@pry': {\n widget: {\n analytic: {\n primaryProp: 'Attribute that contains the horizontal primary field',\n secondaryProp: 'Attribute that contains the horizontal secondary field',\n verticalProp: 'Attribute that contains the vertical attribute',\n valueProp: 'Attribute that contains the value'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n analytic: {\n primaryProp: 'Attribut horizontal primaire',\n secondaryProp: 'Attribut horizontal secondaire',\n verticalProp: 'Attribut vertical',\n valueProp: 'Attribut contenant la valeur'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetMapModule } from '@provoly/dashboard/widgets/widget-map';\nimport { WidgetAnalyticComponent } from './component/widget-analytic.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetAnalyticCssComponent } from './style/css.component';\n\n@NgModule({\n declarations: [WidgetAnalyticComponent, PryWidgetAnalyticCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n WidgetMapModule,\n PryI18nModule,\n AsyncPipe\n ],\n exports: [WidgetAnalyticComponent]\n})\nexport class WidgetAnalyticModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-vega', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-vega', enTranslations);\n }\n\n override getComponent() {\n return WidgetAnalyticComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i5.PryWidgetAnalyticCssComponent","i1"],"mappings":";;;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,+DAJ9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+sBAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EA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AAe;YACf,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlBhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,6BAA6B,CAAC;AACtE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;wBACb,kBAAkB;wBAClB,eAAe;wBACf,aAAa;wBACb,iBAAiB;wBACjB,eAAe;wBACf,eAAe;wBACf,aAAa;wBACb,SAAS;AACV,qBAAA;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA,CAAA;;;ACvCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-widgets-widget-analytic.mjs","sources":["../../../../projects/provoly/dashboard/widgets/widget-analytic/style/css.component.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/component/widget-analytic.component.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/component/widget-analytic.component.html","../../../../projects/provoly/dashboard/widgets/widget-analytic/i18n/en.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/widget-analytic.module.ts","../../../../projects/provoly/dashboard/widgets/widget-analytic/provoly-dashboard-widgets-widget-analytic.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-widget-analytic-css',\n template: '',\n styleUrls: ['./_o-widget-analytic.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryWidgetAnalyticCssComponent {}\n","import { Component, ElementRef } from '@angular/core';\nimport {\n AnalyticWidgetOptions,\n Attribute,\n AttributeSimpleValue,\n Class,\n ClassSelectors,\n DataWidgetComponent,\n Item,\n ResultSet,\n WIDGET_HEADER_HEIGHT\n} from '@provoly/dashboard';\nimport { combineLatest, map, Observable, startWith } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { filter } from 'rxjs/operators';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\n\n@Component({\n selector: 'pry-widget-analytic',\n templateUrl: './widget-analytic.component.html'\n})\nexport class WidgetAnalyticComponent extends DataWidgetComponent {\n optionsCopy: AnalyticWidgetOptions = { primaryProp: '', secondaryProp: '', verticalProp: '', valueProp: '' };\n options$: Observable<AnalyticWidgetOptions>;\n\n primaryProperty$: Observable<string[]>;\n secondaryProperty$: Observable<string[]>;\n verticalProperty$: Observable<string[]>;\n totalProperty$: Observable<string[]>;\n grandTotalProperty$: Observable<string[]>;\n lines$: Observable<{ name: string; value: { [key: string]: { [key: string]: any } } }[]>;\n totals$: Observable<{ name: string; value: { [key: string]: { [key: string]: any } } }[]>;\n grandTotals$: Observable<{ name: any; value: { [p: string]: any } }[]>;\n colorMap$: Observable<{ [vertical: string]: { [primary: string]: string | undefined } }>;\n height$: Observable<number>;\n classes$: Observable<Class[]>;\n availableProperties$: Observable<Attribute[]>;\n\n change($event: string, prop: 'primaryProp' | 'secondaryProp' | 'valueProp' | 'verticalProp') {\n this.optionsCopy[prop] = $event;\n }\n\n changeColorConfig($event: string | string[], prop: 'prop' | 'colors') {\n switch (prop) {\n case 'prop': {\n this.optionsCopy.colorConfig!.prop = $event as string;\n break;\n }\n case 'colors': {\n this.optionsCopy.colorConfig!.colors = $event as string[];\n break;\n }\n }\n }\n\n changeFormat($event: string, prop = 'suffix') {\n this.optionsCopy.format!.suffix = $event;\n }\n\n constructor(store: Store<any>, el: ElementRef) {\n super(store, el);\n this.options$ = this.manifest$.pipe(map((manifest) => (manifest.options ?? {}) as AnalyticWidgetOptions));\n this.classes$ = this.store.select(ClassSelectors.classes);\n this.height$ = combineLatest([this.widgetSize$, this.displayHeader$]).pipe(\n map(([size, header]) => size.height - (header ? WIDGET_HEADER_HEIGHT.value : 0))\n );\n this.subscriptions.add(\n this.options$.subscribe((options) => {\n this.optionsCopy = JSON.parse(JSON.stringify(options));\n })\n );\n this.primaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n filter(([options]) => !!options.primaryProp),\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.primaryProp))\n );\n this.secondaryProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n filter(([options]) => !!options.secondaryProp),\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.secondaryProp!, 1))\n );\n this.verticalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n filter(([options]) => !!options.verticalProp),\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 1))\n );\n this.totalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 2))\n );\n this.grandTotalProperty$ = combineLatest([this.options$, this.resultSet$]).pipe(\n map(([options, rs]) => this.getPropertyLabelsForLevel(rs, options.verticalProp, 3))\n );\n\n this.lines$ = combineLatest([\n this.options$,\n this.primaryProperty$.pipe(startWith([])),\n this.secondaryProperty$.pipe(startWith(undefined)),\n this.verticalProperty$.pipe(startWith([])),\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, secondaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, 1)\n )\n );\n\n this.totals$ = combineLatest([\n this.options$,\n this.primaryProperty$,\n this.secondaryProperty$,\n this.totalProperty$,\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, secondaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, 2)\n )\n );\n\n this.grandTotals$ = combineLatest([\n this.options$,\n this.primaryProperty$,\n this.grandTotalProperty$,\n this.resultSet$\n ]).pipe(\n map(([options, primaryProps, verticalProps, rs]) =>\n this.createValueMap(verticalProps, primaryProps, undefined, rs, options, 3)\n )\n );\n\n this.colorMap$ = combineLatest([\n this.options$,\n this.resultSet$,\n this.verticalProperty$,\n this.primaryProperty$\n ]).pipe(\n filter(([options]) => !!options.colorConfig),\n map(([options, rs, vertical, primary]) => this.createColorMap(vertical, primary, rs, options))\n );\n\n this.availableProperties$ = combineLatest([this.classes$, this.resultSet$]).pipe(\n map(([classes, rs]) => {\n const presentClassesId = Object.keys(rs.items);\n const presentClasses = presentClassesId\n .map((classId) => classes.find((cl) => cl.id === classId))\n .filter((cl) => !!cl) as Class[];\n return presentClasses.map((cl) => cl.attributes).flat();\n })\n );\n }\n\n private matchAttributeValue(item: Item, prop?: string, comparisonValue?: string) {\n return comparisonValue && prop ? (item.attributes[prop] as AttributeSimpleValue).value == comparisonValue : true;\n }\n\n private createValueMap(\n verticalProps: string[],\n primaryProps: string[],\n secondaryProps: string[] | undefined,\n rs: ResultSet,\n options: AnalyticWidgetOptions,\n level?: number\n ) {\n return verticalProps.map((vertical) => {\n const value = {} as { [key: string]: { [key: string]: any } | any };\n primaryProps.forEach((primary) => {\n (secondaryProps ?? [undefined]).forEach((secondary) => {\n const matchingItem = (rs.items[Object.keys(rs.items)[0]] ?? []).find(\n (item) =>\n this.matchAttributeValue(item, options.primaryProp, primary) &&\n this.matchAttributeValue(item, options.secondaryProp, secondary) &&\n this.matchAttributeValue(item, options.verticalProp, vertical) &&\n this.matchAttributeValue(item, 'level', level + '')\n );\n if (!!matchingItem) {\n if (!!secondary) {\n if (!value[primary]) {\n value[primary] = {};\n }\n value[primary][secondary] = (matchingItem!.attributes[options.valueProp] as AttributeSimpleValue).value;\n } else {\n value[primary] = (matchingItem!.attributes[options.valueProp] as AttributeSimpleValue)?.value;\n }\n }\n });\n });\n return { name: vertical, value };\n });\n }\n\n getPropertyLabelsForLevel(rs: ResultSet, property: string, level?: number) {\n const values = Object.values(rs.items)\n .map((items) =>\n items\n .filter((item) =>\n level && 'level' in item.attributes\n ? [level, '' + level].includes(\n (item.attributes['level'] as AttributeSimpleValue).value as string | number\n )\n : true\n )\n .map((item) => (item.attributes[property] as AttributeSimpleValue).value + '')\n )\n .flat()\n .flat();\n return [...new Set(values)];\n }\n\n createColorMap(verticalProps: string[], primaryProps: string[], rs: ResultSet, options: AnalyticWidgetOptions) {\n return options.colorConfig\n ? Object.fromEntries(\n verticalProps.map((vertical) => [\n vertical,\n Object.fromEntries(\n primaryProps.map((primary) => {\n const matchingItem = (rs.items[Object.keys(rs.items)[0]] ?? []).find(\n (item) =>\n this.matchAttributeValue(item, options.primaryProp, primary) &&\n this.matchAttributeValue(item, options.verticalProp, vertical)\n );\n\n return [\n primary,\n matchingItem && (matchingItem.attributes[options.valueProp] as AttributeSimpleValue).value !== 0\n ? options.colorConfig?.colors[\n ((matchingItem.attributes[options.colorConfig!.prop] as AttributeSimpleValue).value as number) -\n 1\n ]\n : '#FFFFFF'\n ];\n })\n )\n ])\n )\n : {};\n }\n\n toggleColorConfig($event: boolean) {\n if ($event !== !!this.optionsCopy.colorConfig) {\n if (!this.optionsCopy.colorConfig) {\n this.optionsCopy.colorConfig = { prop: '', colors: [] };\n } else {\n this.optionsCopy.colorConfig = undefined;\n }\n }\n }\n\n toggleFormat($event: boolean) {\n if ($event !== !!this.optionsCopy.format) {\n if (!this.optionsCopy.format) {\n this.optionsCopy.format = { suffix: '' };\n } else {\n this.optionsCopy.format = undefined;\n }\n }\n }\n\n modifyColorScheme($event?: string, index?: number) {\n $event && index !== undefined\n ? (this.optionsCopy.colorConfig!.colors[index] = $event)\n : this.optionsCopy.colorConfig!.colors.push('#FFFFFF');\n }\n\n removeColor(index: number) {\n this.optionsCopy.colorConfig!.colors.splice(index, 1);\n }\n\n drop(event: CdkDragDrop<string[]>) {\n this.optionsCopy.colorConfig!.colors.splice(\n event.currentIndex,\n 0,\n this.optionsCopy.colorConfig!.colors.splice(event.previousIndex, 1)[0]\n );\n }\n\n emitManifest() {\n this.manifestModified.emit({\n widgetIndex: this.widgetIndex,\n manifest: { ...this.manifest, options: this.optionsCopy }\n });\n }\n}\n","<pry-widget-analytic-css></pry-widget-analytic-css>\n<div class=\"o-widget o-widget__analytic\">\n <pry-widget-header\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__fields\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"primaryProp\">{{ '@pry.widget.analytic.primaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'primaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.primaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"primaryProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"secondaryProp\">{{ '@pry.widget.analytic.secondaryProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'secondaryProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.secondaryProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"secondaryProp\"\n [clearable]=\"true\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"verticalProp\">{{ '@pry.widget.analytic.verticalProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'verticalProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.verticalProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"verticalProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"valueProp\">{{ '@pry.widget.analytic.valueProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"change($event, 'valueProp')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.valueProp\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"valueProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleColorConfig($event)\" [ngModel]=\"!!optionsCopy.colorConfig\">\n {{ '@pry.widget.analytic.colorConfig' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.colorConfig) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colorProp' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeColorConfig($event, 'prop')\"\n [items]=\"availableProperties$ | async\"\n [ngModel]=\"optionsCopy.colorConfig.prop\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"colorProp\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"colorProp\">{{ '@pry.widget.analytic.colors' | i18n }}</label>\n <div\n class=\"o-widget__analytic__color-picker-container u-display-flex -align-center\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n cdkDropListOrientation=\"horizontal\"\n >\n @for (color of optionsCopy.colorConfig.colors; track color; let i = $index) {\n <div class=\"o-widget__analytic__color-picker\" cdkDrag>\n <pry-color-picker\n [ngModel]=\"color\"\n (ngModelChange)=\"modifyColorScheme($event, i)\"\n ></pry-color-picker>\n <button (click)=\"removeColor(i)\" class=\"o-widget__analytic__color-picker-remove\">\n <pry-icon iconSvg=\"close\" [height]=\"15\" [width]=\"15\"></pry-icon>\n </button>\n <div *cdkDragPreview>\n <pry-color-picker [ngModel]=\"color\"></pry-color-picker>\n </div>\n </div>\n }\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only o-widget__analytic__color-picker-add\"\n (click)=\"modifyColorScheme()\"\n >\n <pry-icon iconSvg=\"add\" [height]=\"20\" [width]=\"20\"></pry-icon>\n </button>\n </div>\n </div>\n }\n </div>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleFormat($event)\" [ngModel]=\"!!optionsCopy.format\">\n {{ '@pry.widget.analytic.format' | i18n }}\n </pry-checkbox>\n @if (optionsCopy.format) {\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"format\">{{ '@pry.widget.analytic.suffix' | i18n }}</label>\n <input\n type=\"text\"\n class=\"a-form-field\"\n id=\"format\"\n [ngModel]=\"optionsCopy.format.suffix\"\n (ngModelChange)=\"changeFormat($event)\"\n />\n </div>\n }\n </div>\n </div>\n </pry-settings>\n </pry-widget-header>\n <div class=\"o-widget__analytic__table\">\n <table [style.height.px]=\"height$ | async\">\n <thead>\n <tr class=\"primary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n <th [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ primary }}\n </th>\n }\n </tr>\n @if (optionsCopy.secondaryProp) {\n <tr class=\"secondary-header\">\n <th></th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <th>{{ secondary }}</th>\n }\n }\n </tr>\n }\n </thead>\n <tbody>\n @for (line of lines$ | async; track line.name) {\n <tr>\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @if (optionsCopy.secondaryProp) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary][secondary]\n }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n } @else {\n <td\n [ngStyle]=\"\n optionsCopy.colorConfig ? { 'background-color': (colorMap$ | async)?.[line.name]?.[primary] } : {}\n \"\n >\n {{ line.value[primary] }}{{ optionsCopy.format?.suffix ? ' ' + optionsCopy.format?.suffix : '' }}\n </td>\n }\n }\n </tr>\n }\n </tbody>\n <tfoot>\n @for (line of totals$ | async; track line.name) {\n <tr class=\"partial-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n @for (secondary of secondaryProperty$ | async; track secondary) {\n <td>\n {{ line.value[primary][secondary] }}\n </td>\n }\n }\n </tr>\n }\n @for (line of grandTotals$ | async; track line.name) {\n <tr class=\"grand-total\">\n <th>{{ line.name }}</th>\n @for (primary of primaryProperty$ | async; track primary) {\n <td [colSpan]=\"(secondaryProperty$ | async)?.length ?? 1\">\n {{ line.value[primary] }}\n </td>\n }\n </tr>\n }\n </tfoot>\n </table>\n </div>\n</div>\n","export const enTranslations = {\n '@pry': {\n widget: {\n analytic: {\n primaryProp: 'Attribute that contains the horizontal primary field',\n secondaryProp: 'Attribute that contains the horizontal secondary field',\n verticalProp: 'Attribute that contains the vertical attribute',\n valueProp: 'Attribute that contains the value',\n colorConfig: 'Cell color configuration',\n colorProp: 'Color attribute',\n colors: 'Colors',\n format: 'Value formatting',\n suffix: 'Suffix'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n widget: {\n analytic: {\n primaryProp: 'Attribut horizontal primaire',\n secondaryProp: 'Attribut horizontal secondaire',\n verticalProp: 'Attribut vertical',\n valueProp: 'Attribut contenant la valeur',\n colorConfig: 'Configuration des couleurs de cellules',\n colorProp: 'Attribut de la couleur',\n colors: 'Couleurs',\n format: 'Formattage des valeurs',\n suffix: 'Suffixe'\n }\n }\n }\n};\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseWidgetComponent,\n BaseWidgetModule,\n PryCoreModule,\n PryDashboardModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule,\n PrySelectModule,\n PryToggleModule\n} from '@provoly/dashboard';\nimport { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';\nimport { WidgetAnalyticComponent } from './component/widget-analytic.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { PryWidgetAnalyticCssComponent } from './style/css.component';\nimport { PryColorPickerModule } from '@provoly/dashboard/components/color-picker';\nimport { CdkDrag, CdkDropList, DragDropModule } from '@angular/cdk/drag-drop';\n\n@NgModule({\n declarations: [WidgetAnalyticComponent, PryWidgetAnalyticCssComponent],\n imports: [\n CommonModule,\n FormsModule,\n OverlayModule,\n PryCoreModule,\n PryDashboardModule,\n PrySelectModule,\n PryIconModule,\n PryCheckboxModule,\n PryToggleModule,\n PryI18nModule,\n AsyncPipe,\n PryColorPickerModule,\n DragDropModule\n ],\n exports: [WidgetAnalyticComponent]\n})\nexport class WidgetAnalyticModule extends BaseWidgetModule {\n constructor(private pryTranslateService: PryI18nService) {\n super();\n this.pryTranslateService.addLangObject('fr', 'widget-vega', frTranslations);\n this.pryTranslateService.addLangObject('en', 'widget-vega', enTranslations);\n }\n\n override getComponent() {\n return WidgetAnalyticComponent as Type<BaseWidgetComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i8.PryWidgetAnalyticCssComponent","i1"],"mappings":";;;;;;;;;;;;;;;;;;;MAQa,6BAA6B,CAAA;8GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,6BAA6B,+DAJ9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,q7CAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAID,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBANzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA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;;;;"}
|
|
@@ -332,8 +332,9 @@ const enTranslations$1 = {
|
|
|
332
332
|
},
|
|
333
333
|
tile: 'Tiles',
|
|
334
334
|
template: 'HTML Template',
|
|
335
|
-
|
|
335
|
+
today: 'Today at {{hour}}:{{min}}',
|
|
336
336
|
since_day: '{{day}} day{{plural}} ago',
|
|
337
|
+
from_day: 'In {{day}} day{{plural}}',
|
|
337
338
|
layout: {
|
|
338
339
|
'0': 'Free layout',
|
|
339
340
|
'0_detailled': 'Free mode display, rendering size and positioning fully customizable by the user.',
|
|
@@ -744,8 +745,9 @@ const frTranslations$1 = {
|
|
|
744
745
|
},
|
|
745
746
|
tile: 'Tuiles',
|
|
746
747
|
template: 'Template HTML',
|
|
747
|
-
|
|
748
|
+
today: "Aujourd'hui à {{hour}}:{{min}}",
|
|
748
749
|
since_day: 'Il y a {{day}} jour{{plural}}',
|
|
750
|
+
from_day: 'Dans {{day}} jour{{plural}}',
|
|
749
751
|
layout: {
|
|
750
752
|
'0': 'Composition libre',
|
|
751
753
|
'0_detailled': "Affichage en mode libre, la taille et le positionnement des restitutions sont entièrement paramétrables par l'utilisateur.",
|