@provoly/dashboard 1.4.4 → 1.4.5

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 (24) hide show
  1. package/esm2022/filters/date/date-filter.component.mjs +21 -42
  2. package/esm2022/lib/core/model/filter.interface.mjs +1 -1
  3. package/esm2022/lib/core/store/search/search.service.mjs +10 -2
  4. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +1 -1
  5. package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +5 -2
  6. package/esm2022/lib/dashboard/date-utils.mjs +21 -1
  7. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -2
  8. package/esm2022/lib/dashboard/widget-loader.function.mjs +15 -4
  9. package/esm2022/notification/components/notification/content/notification-content.component.mjs +3 -3
  10. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +5 -2
  11. package/fesm2022/provoly-dashboard-filters-date.mjs +20 -41
  12. package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
  13. package/fesm2022/provoly-dashboard-notification.mjs +2 -2
  14. package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
  15. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +4 -1
  16. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
  17. package/fesm2022/provoly-dashboard.mjs +68 -26
  18. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  19. package/filters/date/date-filter.component.d.ts +2 -8
  20. package/lib/core/model/filter.interface.d.ts +1 -0
  21. package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +3 -0
  22. package/lib/dashboard/date-utils.d.ts +13 -0
  23. package/package.json +1 -1
  24. package/widgets/widget-analytic/component/widget-analytic.component.d.ts +1 -1
@@ -1,18 +1,12 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
3
3
  import { BaseFilterComponent, SubscriptionnerDirective } from '@provoly/dashboard';
4
- import { Subject } from 'rxjs';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class DateFilterComponent extends BaseFilterComponent implements SubscriptionnerDirective, OnInit {
7
- value$: Subject<string>;
8
- date1?: string;
9
- date2?: string;
10
- date1$: Subject<string>;
11
- date2$: Subject<string>;
6
+ dates: string[];
12
7
  constructor(store: Store);
13
8
  ngOnInit(): void;
14
- setFilter(value: string): void;
15
- changeValue($event: string): void;
9
+ onDateChange(index: number, value: string): void;
16
10
  clearDate(index: number): void;
17
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DateFilterComponent, never>;
18
12
  static ɵcmp: i0.ɵɵComponentDeclaration<DateFilterComponent, "pry-date-filter", never, {}, {}, never, never, false, never>;
@@ -19,4 +19,5 @@ export interface FilterContext {
19
19
  attribute: string;
20
20
  operator: string;
21
21
  value: string | number | string[] | number[] | undefined;
22
+ type: string;
22
23
  }
@@ -7,6 +7,9 @@ import { Store } from '@ngrx/store';
7
7
  import { DataSource } from '../../../../core/store/data-source/data-source.model';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare const WIDGET_DEFINITION: InjectionToken<string>;
10
+ export declare const NON_EXCLUDE_GEO_WIDGET_TYPES: {
11
+ values: string[];
12
+ };
10
13
  export declare class WidgetFactoryService {
11
14
  private injector;
12
15
  private store;
@@ -2,5 +2,18 @@ import { AbstractControl, ValidationErrors } from '@angular/forms';
2
2
  export declare class DateUtils {
3
3
  static formatDate(date: Date): string;
4
4
  static onlyPastDateValidator(control: AbstractControl): ValidationErrors | null;
5
+ /**
6
+ * Converts a string date into an ISO-8601 string format
7
+ *
8
+ * Works with this formats :
9
+ * - "YYYY-MM-DD" : '2024-12-31' --> '2024-12-31T00:00:00.000Z'
10
+ * - "MM/DD/YYYY" : '12/31/2024' --> '2024-12-30T23:00:00.000Z' (format FR donc prise en compte de la locale : UTC+1)
11
+ * - "YYYY" : '2025' --> '2025-01-01T00:00:00.000Z'
12
+ *
13
+ * @param dateAsString the date to convert (example : 2024-12-31)
14
+ * @see Date.parse
15
+ * @see Date.toISOString
16
+ */
17
+ static parseToIsoString(dateAsString: string): string;
5
18
  static isInTheFuture(date: Date): boolean;
6
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "17.x || 18.x",
@@ -48,7 +48,7 @@ export declare class WidgetAnalyticComponent extends DataWidgetComponent {
48
48
  constructor(store: Store<any>, el: ElementRef);
49
49
  private matchAttributeValue;
50
50
  private createValueMap;
51
- getPropertyLabelsForLevel(rs: ResultSet, property: string, level?: number): string[];
51
+ private getPropertyLabelsForLevel;
52
52
  createColorMap(verticalProps: string[], primaryProps: string[], rs: ResultSet, options: AnalyticWidgetOptions): {
53
53
  [k: string]: {
54
54
  [k: string]: string | undefined;