@provoly/dashboard 1.2.0 → 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 +1 -1
- 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,6 +1,13 @@
|
|
|
1
1
|
export interface AnalyticWidgetOptions {
|
|
2
2
|
primaryProp: string;
|
|
3
|
-
secondaryProp
|
|
3
|
+
secondaryProp?: string;
|
|
4
4
|
verticalProp: string;
|
|
5
5
|
valueProp: string;
|
|
6
|
+
colorConfig?: {
|
|
7
|
+
prop: string;
|
|
8
|
+
colors: string[];
|
|
9
|
+
};
|
|
10
|
+
format?: {
|
|
11
|
+
suffix?: string;
|
|
12
|
+
};
|
|
6
13
|
}
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { ElementRef } from '@angular/core';
|
|
|
2
2
|
import { AnalyticWidgetOptions, Attribute, Class, DataWidgetComponent, ResultSet } from '@provoly/dashboard';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { Store } from '@ngrx/store';
|
|
5
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
7
8
|
optionsCopy: AnalyticWidgetOptions;
|
|
@@ -33,14 +34,31 @@ export declare class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
33
34
|
[p: string]: any;
|
|
34
35
|
};
|
|
35
36
|
}[]>;
|
|
37
|
+
colorMap$: Observable<{
|
|
38
|
+
[vertical: string]: {
|
|
39
|
+
[primary: string]: string | undefined;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
36
42
|
height$: Observable<number>;
|
|
37
43
|
classes$: Observable<Class[]>;
|
|
38
44
|
availableProperties$: Observable<Attribute[]>;
|
|
39
45
|
change($event: string, prop: 'primaryProp' | 'secondaryProp' | 'valueProp' | 'verticalProp'): void;
|
|
46
|
+
changeColorConfig($event: string | string[], prop: 'prop' | 'colors'): void;
|
|
47
|
+
changeFormat($event: string, prop?: string): void;
|
|
40
48
|
constructor(store: Store<any>, el: ElementRef);
|
|
41
49
|
private matchAttributeValue;
|
|
42
50
|
private createValueMap;
|
|
43
51
|
getPropertyLabelsForLevel(rs: ResultSet, property: string, level?: number): string[];
|
|
52
|
+
createColorMap(verticalProps: string[], primaryProps: string[], rs: ResultSet, options: AnalyticWidgetOptions): {
|
|
53
|
+
[k: string]: {
|
|
54
|
+
[k: string]: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
toggleColorConfig($event: boolean): void;
|
|
58
|
+
toggleFormat($event: boolean): void;
|
|
59
|
+
modifyColorScheme($event?: string, index?: number): void;
|
|
60
|
+
removeColor(index: number): void;
|
|
61
|
+
drop(event: CdkDragDrop<string[]>): void;
|
|
44
62
|
emitManifest(): void;
|
|
45
63
|
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetAnalyticComponent, never>;
|
|
46
64
|
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetAnalyticComponent, "pry-widget-analytic", never, {}, {}, never, never, false, never>;
|
|
@@ -40,4 +40,52 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
&__color-picker-container {
|
|
45
|
+
margin-top: toRem(10);
|
|
46
|
+
gap: toRem(15);
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__color-picker {
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__color-picker-remove {
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: -20px;
|
|
57
|
+
top: -10px;
|
|
58
|
+
z-index: 2;
|
|
59
|
+
color: #263340;
|
|
60
|
+
padding: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__color-picker-add {
|
|
64
|
+
padding: toRem(12);
|
|
65
|
+
border: 1px solid #263340;
|
|
66
|
+
border-radius: 50%;
|
|
67
|
+
width: 20px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cdk-drop-list-dragging .cdk-drag {
|
|
72
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cdk-drag-animating {
|
|
76
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.cdk-drop-list-dragging .o-widget__analytic__color-picker:not(.cdk-drag-placeholder) {
|
|
80
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
43
81
|
}
|
|
82
|
+
|
|
83
|
+
.cdk-drag-preview {
|
|
84
|
+
box-sizing: border-box;
|
|
85
|
+
border-radius: 50%;
|
|
86
|
+
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
|
|
87
|
+
0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
88
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
@@ -8,12 +8,13 @@ import * as i4 from "@angular/forms";
|
|
|
8
8
|
import * as i5 from "@angular/cdk/overlay";
|
|
9
9
|
import * as i6 from "@provoly/dashboard";
|
|
10
10
|
import * as i7 from "@provoly/dashboard/components/checkbox";
|
|
11
|
-
import * as i8 from "@provoly/dashboard/
|
|
11
|
+
import * as i8 from "@provoly/dashboard/components/color-picker";
|
|
12
|
+
import * as i9 from "@angular/cdk/drag-drop";
|
|
12
13
|
export declare class WidgetAnalyticModule extends BaseWidgetModule {
|
|
13
14
|
private pryTranslateService;
|
|
14
15
|
constructor(pryTranslateService: PryI18nService);
|
|
15
16
|
getComponent(): Type<BaseWidgetComponent>;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetAnalyticModule, never>;
|
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetAnalyticModule, [typeof i1.WidgetAnalyticComponent, typeof i2.PryWidgetAnalyticCssComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.OverlayModule, typeof i6.PryCoreModule, typeof i6.PryDashboardModule, typeof i6.PrySelectModule, typeof i6.PryIconModule, typeof i7.PryCheckboxModule, typeof i6.PryToggleModule, typeof
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetAnalyticModule, [typeof i1.WidgetAnalyticComponent, typeof i2.PryWidgetAnalyticCssComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.OverlayModule, typeof i6.PryCoreModule, typeof i6.PryDashboardModule, typeof i6.PrySelectModule, typeof i6.PryIconModule, typeof i7.PryCheckboxModule, typeof i6.PryToggleModule, typeof i6.PryI18nModule, typeof i3.AsyncPipe, typeof i8.PryColorPickerModule, typeof i9.DragDropModule], [typeof i1.WidgetAnalyticComponent]>;
|
|
18
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<WidgetAnalyticModule>;
|
|
19
20
|
}
|