@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.
Files changed (25) hide show
  1. package/components/sinceDate/sinceDate.pipe.d.ts +2 -0
  2. package/esm2022/components/sinceDate/sinceDate.pipe.mjs +27 -10
  3. package/esm2022/lib/core/i18n/en.translations.mjs +3 -2
  4. package/esm2022/lib/core/i18n/fr.translations.mjs +3 -2
  5. package/esm2022/lib/core/model/widget-analytic-manifest.interface.mjs +1 -1
  6. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +88 -14
  7. package/esm2022/widgets/widget-analytic/i18n/en.translations.mjs +7 -2
  8. package/esm2022/widgets/widget-analytic/i18n/fr.translations.mjs +7 -2
  9. package/esm2022/widgets/widget-analytic/style/css.component.mjs +2 -2
  10. package/esm2022/widgets/widget-analytic/widget-analytic.module.mjs +12 -8
  11. package/fesm2022/provoly-dashboard-components-sinceDate.mjs +26 -9
  12. package/fesm2022/provoly-dashboard-components-sinceDate.mjs.map +1 -1
  13. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +112 -24
  14. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
  15. package/fesm2022/provoly-dashboard.mjs +4 -2
  16. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  17. package/lib/core/i18n/en.translations.d.ts +2 -1
  18. package/lib/core/i18n/fr.translations.d.ts +2 -1
  19. package/lib/core/model/widget-analytic-manifest.interface.d.ts +8 -1
  20. package/package.json +7 -7
  21. package/widgets/widget-analytic/component/widget-analytic.component.d.ts +18 -0
  22. package/widgets/widget-analytic/i18n/en.translations.d.ts +5 -0
  23. package/widgets/widget-analytic/i18n/fr.translations.d.ts +5 -0
  24. package/widgets/widget-analytic/style/_o-widget-analytic.scss +48 -0
  25. package/widgets/widget-analytic/widget-analytic.module.d.ts +3 -2
@@ -143,8 +143,9 @@ export declare const enTranslations: {
143
143
  };
144
144
  tile: string;
145
145
  template: string;
146
- now: string;
146
+ today: string;
147
147
  since_day: string;
148
+ from_day: string;
148
149
  layout: {
149
150
  '0': string;
150
151
  '0_detailled': string;
@@ -143,8 +143,9 @@ export declare const frTranslations: {
143
143
  };
144
144
  tile: string;
145
145
  template: string;
146
- now: string;
146
+ today: string;
147
147
  since_day: string;
148
+ from_day: string;
148
149
  layout: {
149
150
  '0': string;
150
151
  '0_detailled': string;
@@ -1,6 +1,13 @@
1
1
  export interface AnalyticWidgetOptions {
2
2
  primaryProp: string;
3
- secondaryProp: string;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "1.1.12",
3
+ "version": "1.2.1",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "16.x || 17.x",
@@ -108,6 +108,12 @@
108
108
  "esm": "./esm2022/pipeline/provoly-dashboard-pipeline.mjs",
109
109
  "default": "./fesm2022/provoly-dashboard-pipeline.mjs"
110
110
  },
111
+ "./presentation": {
112
+ "types": "./presentation/index.d.ts",
113
+ "esm2022": "./esm2022/presentation/provoly-dashboard-presentation.mjs",
114
+ "esm": "./esm2022/presentation/provoly-dashboard-presentation.mjs",
115
+ "default": "./fesm2022/provoly-dashboard-presentation.mjs"
116
+ },
111
117
  "./restitution": {
112
118
  "types": "./restitution/index.d.ts",
113
119
  "esm2022": "./esm2022/restitution/provoly-dashboard-restitution.mjs",
@@ -120,12 +126,6 @@
120
126
  "esm": "./esm2022/search/provoly-dashboard-search.mjs",
121
127
  "default": "./fesm2022/provoly-dashboard-search.mjs"
122
128
  },
123
- "./presentation": {
124
- "types": "./presentation/index.d.ts",
125
- "esm2022": "./esm2022/presentation/provoly-dashboard-presentation.mjs",
126
- "esm": "./esm2022/presentation/provoly-dashboard-presentation.mjs",
127
- "default": "./fesm2022/provoly-dashboard-presentation.mjs"
128
- },
129
129
  "./toolbox": {
130
130
  "types": "./toolbox/index.d.ts",
131
131
  "esm2022": "./esm2022/toolbox/provoly-dashboard-toolbox.mjs",
@@ -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>;
@@ -6,6 +6,11 @@ export declare const enTranslations: {
6
6
  secondaryProp: string;
7
7
  verticalProp: string;
8
8
  valueProp: string;
9
+ colorConfig: string;
10
+ colorProp: string;
11
+ colors: string;
12
+ format: string;
13
+ suffix: string;
9
14
  };
10
15
  };
11
16
  };
@@ -6,6 +6,11 @@ export declare const frTranslations: {
6
6
  secondaryProp: string;
7
7
  verticalProp: string;
8
8
  valueProp: string;
9
+ colorConfig: string;
10
+ colorProp: string;
11
+ colors: string;
12
+ format: string;
13
+ suffix: string;
9
14
  };
10
15
  };
11
16
  };
@@ -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/widgets/widget-map";
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 i8.WidgetMapModule, typeof i6.PryI18nModule, typeof i3.AsyncPipe], [typeof i1.WidgetAnalyticComponent]>;
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
  }