@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.
- package/esm2022/filters/date/date-filter.component.mjs +21 -42
- package/esm2022/lib/core/model/filter.interface.mjs +1 -1
- package/esm2022/lib/core/store/search/search.service.mjs +10 -2
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +1 -1
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +5 -2
- package/esm2022/lib/dashboard/date-utils.mjs +21 -1
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -2
- package/esm2022/lib/dashboard/widget-loader.function.mjs +15 -4
- package/esm2022/notification/components/notification/content/notification-content.component.mjs +3 -3
- package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +5 -2
- package/fesm2022/provoly-dashboard-filters-date.mjs +20 -41
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-notification.mjs +2 -2
- package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +4 -1
- package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +68 -26
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/filters/date/date-filter.component.d.ts +2 -8
- package/lib/core/model/filter.interface.d.ts +1 -0
- package/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.d.ts +3 -0
- package/lib/dashboard/date-utils.d.ts +13 -0
- package/package.json +1 -1
- package/widgets/widget-analytic/component/widget-analytic.component.d.ts +1 -1
|
@@ -7,69 +7,48 @@ import * as i3 from '@angular/forms';
|
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i4 from '@provoly/dashboard';
|
|
9
9
|
import { BaseFilterComponent, BaseFilterModule, PryCoreModule, PryI18nModule, PryDatePickerModule, PryIconModule } from '@provoly/dashboard';
|
|
10
|
-
import { Subject, combineLatest, debounceTime, startWith } from 'rxjs';
|
|
11
|
-
import { skipWhile, distinctUntilChanged } from 'rxjs/operators';
|
|
12
10
|
import * as i1 from '@ngrx/store';
|
|
13
11
|
|
|
14
12
|
class DateFilterComponent extends BaseFilterComponent {
|
|
15
13
|
constructor(store) {
|
|
16
14
|
super(store);
|
|
17
|
-
this.
|
|
18
|
-
this.date1$ = new Subject();
|
|
19
|
-
this.date2$ = new Subject();
|
|
15
|
+
this.dates = ['', ''];
|
|
20
16
|
this.type = 'date';
|
|
21
17
|
}
|
|
22
18
|
ngOnInit() {
|
|
23
19
|
super.ngOnInit();
|
|
24
20
|
if (this.filter?.hasDateRange) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.subscriptions.add(combineLatest([
|
|
29
|
-
this.date1$.pipe(debounceTime(1000), startWith(this.date1)),
|
|
30
|
-
this.date2$.pipe(debounceTime(1000), startWith(this.date2))
|
|
31
|
-
])
|
|
32
|
-
.pipe(skipWhile(([date1, date2]) => date1 === this.date1 && date2 === this.date2))
|
|
33
|
-
.subscribe(([date1, date2]) => {
|
|
34
|
-
if (date1 && date2) {
|
|
35
|
-
this.setFilter(date1 + ',' + date2);
|
|
36
|
-
}
|
|
37
|
-
else if (!date1 && !date2) {
|
|
38
|
-
this.setFilter('');
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
// subscription responsible for updating the ui
|
|
42
|
-
this.subscriptions.add(combineLatest([this.date1$.pipe(startWith(this.date1)), this.date2$.pipe(startWith(this.date2))])
|
|
43
|
-
.pipe(skipWhile(([date1, date2]) => date1 === this.date1 && date2 === this.date2))
|
|
44
|
-
.subscribe(([date1, date2]) => {
|
|
45
|
-
this.date1 = date1 ? date1 : '';
|
|
46
|
-
this.date2 = date2 ? date2 : '';
|
|
47
|
-
}));
|
|
21
|
+
if (this.filter?.value) {
|
|
22
|
+
this.dates = this.filter?.value.toString().split(',');
|
|
23
|
+
}
|
|
48
24
|
}
|
|
49
25
|
else {
|
|
50
|
-
this.
|
|
26
|
+
this.dates[0] = (this.filter?.value ?? '').toString();
|
|
51
27
|
}
|
|
52
28
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
29
|
+
onDateChange(index, value) {
|
|
30
|
+
this.dates[index] = value;
|
|
31
|
+
if (this.filter?.hasDateRange) {
|
|
32
|
+
if (this.dates.filter((date) => !!date).length === this.dates.length) {
|
|
33
|
+
super.updateFilter(this.dates.join(','));
|
|
34
|
+
}
|
|
35
|
+
else if (this.dates.filter((date) => !!date).length === 0) {
|
|
36
|
+
super.updateFilter('');
|
|
37
|
+
}
|
|
62
38
|
}
|
|
63
39
|
else {
|
|
64
|
-
|
|
40
|
+
super.updateFilter(value ?? '');
|
|
65
41
|
}
|
|
66
42
|
}
|
|
43
|
+
clearDate(index) {
|
|
44
|
+
this.onDateChange(index, '');
|
|
45
|
+
}
|
|
67
46
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DateFilterComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: DateFilterComponent, selector: "pry-date-filter", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"
|
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: DateFilterComponent, selector: "pry-date-filter", usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--date\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n <ng-template #dateRange>\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name + '1'\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n <span class=\"m-filter__date-input-separator\"> - </span>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[1]\"\n (ngModelChange)=\"onDateChange(1, $event)\"\n type=\"date\"\n [id]=\"filter.name + '2'\"\n />\n <span\n *ngIf=\"!!dates[1]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(1)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "pipe", type: i4.I18nPipe, name: "i18n" }] }); }
|
|
69
48
|
}
|
|
70
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
71
50
|
type: Component,
|
|
72
|
-
args: [{ selector: 'pry-date-filter', template: "<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"
|
|
51
|
+
args: [{ selector: 'pry-date-filter', template: "<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--date\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n <ng-template #dateRange>\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name + '1'\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n <span class=\"m-filter__date-input-separator\"> - </span>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[1]\"\n (ngModelChange)=\"onDateChange(1, $event)\"\n type=\"date\"\n [id]=\"filter.name + '2'\"\n />\n <span\n *ngIf=\"!!dates[1]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(1)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">\u00D7</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n" }]
|
|
73
52
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
74
53
|
|
|
75
54
|
class PryDateFilterModule extends BaseFilterModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-filters-date.mjs","sources":["../../../../projects/provoly/dashboard/filters/date/date-filter.component.ts","../../../../projects/provoly/dashboard/filters/date/date-filter.component.html","../../../../projects/provoly/dashboard/filters/date/date-filter.module.ts","../../../../projects/provoly/dashboard/filters/date/provoly-dashboard-filters-date.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { BaseFilterComponent, SubscriptionnerDirective } from '@provoly/dashboard';\nimport { combineLatest, debounceTime, startWith, Subject } from 'rxjs';\nimport { distinctUntilChanged, skipWhile } from 'rxjs/operators';\n\n@Component({\n selector: 'pry-date-filter',\n templateUrl: './date-filter.component.html'\n})\nexport class DateFilterComponent extends BaseFilterComponent implements SubscriptionnerDirective, OnInit {\n value$ = new Subject<string>();\n date1?: string;\n date2?: string;\n date1$ = new Subject<string>();\n date2$ = new Subject<string>();\n\n constructor(store: Store) {\n super(store);\n this.type = 'date';\n }\n\n override ngOnInit() {\n super.ngOnInit();\n if (this.filter?.hasDateRange) {\n this.date1 = (this.filter?.value ?? '').toString().split(',')[0];\n this.date2 = (this.filter?.value ?? '').toString().split(',')[1];\n // subscription responsible for dispatching filter value to the store\n this.subscriptions.add(\n combineLatest([\n this.date1$.pipe(debounceTime(1000), startWith(this.date1)),\n this.date2$.pipe(debounceTime(1000), startWith(this.date2))\n ])\n .pipe(skipWhile(([date1, date2]) => date1 === this.date1 && date2 === this.date2))\n .subscribe(([date1, date2]) => {\n if (date1 && date2) {\n this.setFilter(date1 + ',' + date2);\n } else if (!date1 && !date2) {\n this.setFilter('');\n }\n })\n );\n // subscription responsible for updating the ui\n this.subscriptions.add(\n combineLatest([this.date1$.pipe(startWith(this.date1)), this.date2$.pipe(startWith(this.date2))])\n .pipe(skipWhile(([date1, date2]) => date1 === this.date1 && date2 === this.date2))\n .subscribe(([date1, date2]) => {\n this.date1 = date1 ? date1 : '';\n this.date2 = date2 ? date2 : '';\n })\n );\n } else {\n this.subscriptions.add(\n this.value$.pipe(distinctUntilChanged(), debounceTime(1000)).subscribe((value) => this.setFilter(value))\n );\n }\n }\n\n setFilter(value: string) {\n super.updateFilter(value);\n }\n\n changeValue($event: string) {\n this.value$.next($event);\n }\n\n clearDate(index: number) {\n if (index === 1) {\n this.date1$.next('');\n } else {\n this.date2$.next('');\n }\n }\n}\n","<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"_value\"\n (ngModelChange)=\"changeValue($event)\"\n type=\"date\"\n [id]=\"filter.name\"\n />\n <span\n *ngIf=\"!!_value\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--date\"\n (click)=\"setFilter('')\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n <ng-template #dateRange>\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"date1\"\n (ngModelChange)=\"date1$.next($event)\"\n type=\"date\"\n [id]=\"filter.name + '1'\"\n />\n <span\n *ngIf=\"!!date1\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(1)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n <span class=\"m-filter__date-input-separator\"> - </span>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"date2\"\n (ngModelChange)=\"date2$.next($event)\"\n type=\"date\"\n [id]=\"filter.name + '2'\"\n />\n <span\n *ngIf=\"!!date2\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(2)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseFilterComponent,\n BaseFilterModule,\n PryCoreModule,\n PryDatePickerModule,\n PryI18nModule,\n PryIconModule\n} from '@provoly/dashboard';\nimport { DateFilterComponent } from './date-filter.component';\n\n@NgModule({\n declarations: [DateFilterComponent],\n imports: [CommonModule, FormsModule, OverlayModule, PryCoreModule, PryI18nModule, PryDatePickerModule, PryIconModule],\n exports: [DateFilterComponent]\n})\nexport class PryDateFilterModule extends BaseFilterModule {\n override getComponent() {\n return DateFilterComponent as Type<BaseFilterComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAUM,MAAO,mBAAoB,SAAQ,mBAAmB,CAAA;AAO1D,IAAA,WAAA,CAAY,KAAY,EAAA;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;AAPf,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAU,CAAC;AAG/B,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAU,CAAC;AAI7B,QAAA,IAA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version":3,"file":"provoly-dashboard-filters-date.mjs","sources":["../../../../projects/provoly/dashboard/filters/date/date-filter.component.ts","../../../../projects/provoly/dashboard/filters/date/date-filter.component.html","../../../../projects/provoly/dashboard/filters/date/date-filter.module.ts","../../../../projects/provoly/dashboard/filters/date/provoly-dashboard-filters-date.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { BaseFilterComponent, DateUtils, SubscriptionnerDirective } from '@provoly/dashboard';\n\n@Component({\n selector: 'pry-date-filter',\n templateUrl: './date-filter.component.html'\n})\nexport class DateFilterComponent extends BaseFilterComponent implements SubscriptionnerDirective, OnInit {\n dates: string[] = ['', ''];\n\n constructor(store: Store) {\n super(store);\n this.type = 'date';\n }\n\n override ngOnInit() {\n super.ngOnInit();\n if (this.filter?.hasDateRange) {\n if (this.filter?.value) {\n this.dates = this.filter?.value.toString().split(',');\n }\n } else {\n this.dates[0] = (this.filter?.value ?? '').toString();\n }\n }\n\n onDateChange(index: number, value: string) {\n this.dates[index] = value;\n if (this.filter?.hasDateRange) {\n if (this.dates.filter((date) => !!date).length === this.dates.length) {\n super.updateFilter(this.dates.join(','));\n } else if (this.dates.filter((date) => !!date).length === 0) {\n super.updateFilter('');\n }\n } else {\n super.updateFilter(value ?? '');\n }\n }\n\n clearDate(index: number) {\n this.onDateChange(index, '');\n }\n}\n","<div *ngIf=\"filter\" class=\"m-filter\">\n <div *ngIf=\"!filter?.hasDateRange; else dateRange\">\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--date\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n <ng-template #dateRange>\n <div class=\"m-filter__wrapper\">\n <div class=\"m-filter__input-wrapper\">\n <label class=\"a-label m-filter__label\" for=\"{{ filter.name }}\">{{ filter.name }} : </label>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[0]\"\n (ngModelChange)=\"onDateChange(0, $event)\"\n type=\"date\"\n [id]=\"filter.name + '1'\"\n />\n <span\n *ngIf=\"!!dates[0]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(0)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n <span class=\"m-filter__date-input-separator\"> - </span>\n <div class=\"m-filter__wrapper\">\n <input\n class=\"m-filter__input\"\n [ngModel]=\"dates[1]\"\n (ngModelChange)=\"onDateChange(1, $event)\"\n type=\"date\"\n [id]=\"filter.name + '2'\"\n />\n <span\n *ngIf=\"!!dates[1]\"\n class=\"m-filter__clear-wrapper m-filter__clear-wrapper--two-dates\"\n (click)=\"clearDate(1)\"\n [title]=\"'@pry.filters.clear' | i18n\"\n >\n <span class=\"m-filter__clear\">×</span>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </span>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n BaseFilterComponent,\n BaseFilterModule,\n PryCoreModule,\n PryDatePickerModule,\n PryI18nModule,\n PryIconModule\n} from '@provoly/dashboard';\nimport { DateFilterComponent } from './date-filter.component';\n\n@NgModule({\n declarations: [DateFilterComponent],\n imports: [CommonModule, FormsModule, OverlayModule, PryCoreModule, PryI18nModule, PryDatePickerModule, PryIconModule],\n exports: [DateFilterComponent]\n})\nexport class PryDateFilterModule extends BaseFilterModule {\n override getComponent() {\n return DateFilterComponent as Type<BaseFilterComponent>;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAQM,MAAO,mBAAoB,SAAQ,mBAAmB,CAAA;AAG1D,IAAA,WAAA,CAAY,KAAY,EAAA;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;AAHf,QAAA,IAAA,CAAA,KAAK,GAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAIzB,QAAA,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;KACpB;IAEQ,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;AACjB,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE;AAC7B,YAAA,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE;AACtB,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACvD;SACF;aAAM;AACL,YAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC;SACvD;KACF;IAED,YAAY,CAAC,KAAa,EAAE,KAAa,EAAA;AACvC,QAAA,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AAC1B,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE;YAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,C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,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGzG,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,CAAC;oBACrH,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -77,11 +77,11 @@ class PryNotificationContentComponent {
|
|
|
77
77
|
return this.i18nService.instant(translationBase + title) !== translationBase + title;
|
|
78
78
|
}
|
|
79
79
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PryNotificationContentComponent, deps: [{ token: i3.Store }, { token: i2.Router }, { token: i1.PryI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: PryNotificationContentComponent, selector: "pry-notification-content", outputs: { closed: "closed" }, host: { listeners: { "window:resize": "ngDoCheck()" } }, viewQueries: [{ propertyName: "caret", first: true, predicate: ["caret"], descendants: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true }], ngImport: i0, template: "<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n
|
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: PryNotificationContentComponent, selector: "pry-notification-content", outputs: { closed: "closed" }, host: { listeners: { "window:resize": "ngDoCheck()" } }, viewQueries: [{ propertyName: "caret", first: true, predicate: ["caret"], descendants: true }, { propertyName: "button", first: true, predicate: ["button"], descendants: true }], ngImport: i0, template: "<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n: { count: (notifications$ | async)?.length } }}\n </button>\n </div>\n </ng-template>\n </div>\n <div class=\"m-notifications-list__content\">\n <ul class=\"m-notifications-list__items\">\n <li class=\"m-notifications-list__items__li\" *ngFor=\"let notification of notifications$ | async; let last = last\">\n <div class=\"m-notifications-list__items__li__txt\">\n <h3 class=\"a-h3\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.title.' + notification.text.code | i18n: notification.text.param)\n : notification.text.title\n }}\n <span>{{ notification.creationDate | date: \"dd/MM' 'H':'mm\" }}</span>\n </h3>\n <p class=\"a-p desc\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.message.' + notification.text.code | i18n: notification.text.param)\n : notification.text.code\n }}\n </p>\n <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n {{ '@pry.notif.link' | i18n }}\n </a>\n </div>\n <button\n class=\"a-btn a-btn--delete\"\n (click)=\"delete(notification)\"\n (keydown.tab)=\"last ? closeToEscape() : null\"\n title=\"{{ '@pry.notif.delete' | i18n }}\"\n >\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.notif.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DatePipe, name: "date" }, { kind: "pipe", type: i1.I18nPipe, name: "i18n" }] }); }
|
|
81
81
|
}
|
|
82
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PryNotificationContentComponent, decorators: [{
|
|
83
83
|
type: Component,
|
|
84
|
-
args: [{ selector: 'pry-notification-content', template: "<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n
|
|
84
|
+
args: [{ selector: 'pry-notification-content', template: "<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n: { count: (notifications$ | async)?.length } }}\n </button>\n </div>\n </ng-template>\n </div>\n <div class=\"m-notifications-list__content\">\n <ul class=\"m-notifications-list__items\">\n <li class=\"m-notifications-list__items__li\" *ngFor=\"let notification of notifications$ | async; let last = last\">\n <div class=\"m-notifications-list__items__li__txt\">\n <h3 class=\"a-h3\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.title.' + notification.text.code | i18n: notification.text.param)\n : notification.text.title\n }}\n <span>{{ notification.creationDate | date: \"dd/MM' 'H':'mm\" }}</span>\n </h3>\n <p class=\"a-p desc\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.message.' + notification.text.code | i18n: notification.text.param)\n : notification.text.code\n }}\n </p>\n <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n {{ '@pry.notif.link' | i18n }}\n </a>\n </div>\n <button\n class=\"a-btn a-btn--delete\"\n (click)=\"delete(notification)\"\n (keydown.tab)=\"last ? closeToEscape() : null\"\n title=\"{{ '@pry.notif.delete' | i18n }}\"\n >\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.notif.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</div>\n" }]
|
|
85
85
|
}], ctorParameters: () => [{ type: i3.Store }, { type: i2.Router }, { type: i1.PryI18nService }], propDecorators: { closed: [{
|
|
86
86
|
type: Output
|
|
87
87
|
}], caret: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-notification.mjs","sources":["../../../../projects/provoly/dashboard/notification/store/notification.actions.ts","../../../../projects/provoly/dashboard/notification/store/notification.selectors.ts","../../../../projects/provoly/dashboard/notification/components/notification/content/notification-content.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/content/notification-content.component.html","../../../../projects/provoly/dashboard/notification/style/css.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/notification.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/notification.component.html","../../../../projects/provoly/dashboard/notification/i18n/en.translations.ts","../../../../projects/provoly/dashboard/notification/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/notification/store/notification.service.ts","../../../../projects/provoly/dashboard/notification/store/notification.effects.ts","../../../../projects/provoly/dashboard/notification/store/notification.reducer.ts","../../../../projects/provoly/dashboard/notification/notification.module.ts","../../../../projects/provoly/dashboard/notification/provoly-dashboard-notification.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport { PryNotification } from '@provoly/dashboard';\n\nexport const NotificationActions = {\n add: createAction('[Notification] received', props<{ notification: PryNotification }>()),\n delete: createAction('[Notification] delete', props<{ id: string }>()),\n deleteSuccess: createAction('[Notification] delete success', props<{ id: string }>()),\n deleteAll: createAction('[Notification] delete all'),\n deleteAllSuccess: createAction('[Notification] delete all success')\n};\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { notificationFeatureKey } from '@provoly/dashboard';\nimport * as fromNotification from './notification.reducer';\n\nconst feature = createFeatureSelector<fromNotification.NotificationState>(notificationFeatureKey);\n\nconst list = createSelector(feature, (state) => state.list);\n\nexport const NotificationSelectors = {\n feature,\n list\n};\n","import {\n AfterViewInit,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostListener,\n Output,\n ViewChild\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { PryI18nService, PryNotification } from '@provoly/dashboard';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { NotificationActions } from '../../../store/notification.actions';\nimport { NotificationSelectors } from '../../../store/notification.selectors';\n\n@Component({\n selector: 'pry-notification-content',\n templateUrl: './notification-content.component.html'\n})\nexport class PryNotificationContentComponent implements DoCheck, AfterViewInit {\n open: boolean = false;\n notifications$: Observable<PryNotification[]>;\n @Output() closed = new EventEmitter<boolean>();\n @ViewChild('caret') caret!: ElementRef;\n @ViewChild('button') button!: ElementRef<HTMLButtonElement>;\n left: number = 0;\n\n constructor(\n protected store: Store,\n private router: Router,\n private i18nService: PryI18nService\n ) {\n this.notifications$ = this.store\n .select(NotificationSelectors.list)\n .pipe(\n map((notifications: PryNotification[]) =>\n [...notifications].sort((a, b) => (a.creationDate < b.creationDate ? 1 : -1))\n )\n );\n }\n\n ngAfterViewInit() {\n if (!this.open) {\n this.button?.nativeElement.focus();\n }\n }\n\n @HostListener('window:resize')\n ngDoCheck() {\n if (this.caret) {\n this.left = this.caret.nativeElement.offsetWidth - 48;\n }\n }\n\n delete(notification: PryNotification) {\n this.store.dispatch(NotificationActions.delete({ id: notification.id }));\n }\n\n deleteAll() {\n this.store.dispatch(NotificationActions.deleteAll());\n }\n\n goTo(notification: PryNotification) {\n const link = notification.link ?? '';\n if (link.startsWith('http')) {\n window.location.href = link;\n } else {\n this.router.navigateByUrl(notification.link ?? '');\n }\n this.closed.next(true);\n }\n\n closeToEscape() {\n this.closed.next(true);\n }\n\n hasTranslation(title: string, translationBase: string) {\n return this.i18nService.instant(translationBase + title) !== translationBase + title;\n }\n}\n","<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n : { count: (notifications$ | async)?.length } }}\n </button>\n </div>\n </ng-template>\n </div>\n <div class=\"m-notifications-list__content\">\n <ul class=\"m-notifications-list__items\">\n <li class=\"m-notifications-list__items__li\" *ngFor=\"let notification of notifications$ | async; let last = last\">\n <div class=\"m-notifications-list__items__li__txt\">\n <h3 class=\"a-h3\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.title.' + notification.text.code | i18n)\n : notification.text.title\n }}\n <span>{{ notification.creationDate | date : \"dd/MM' 'H':'mm\" }}</span>\n </h3>\n <p class=\"a-p desc\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.message.' + notification.text.code | i18n : notification.text.param)\n : notification.text.code\n }}\n </p>\n <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n {{ '@pry.notif.link' | i18n }}\n </a>\n </div>\n <button\n class=\"a-btn a-btn--delete\"\n (click)=\"delete(notification)\"\n (keydown.tab)=\"last ? closeToEscape() : null\"\n title=\"{{ '@pry.notif.delete' | i18n }}\"\n >\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.notif.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-notification-css',\n template: '',\n styleUrls: ['./_m-notifications.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryNotificationCssComponent {}\n","import { Overlay, OverlayConfig } from '@angular/cdk/overlay';\nimport { Component, ElementRef, ViewChild } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { PryDialogRef, PryDialogService, PryNotification, SubscriptionnerDirective } from '@provoly/dashboard';\nimport { Observable } from 'rxjs';\nimport { NotificationSelectors } from '../../store/notification.selectors';\nimport { PryNotificationContentComponent } from './content/notification-content.component';\n\n@Component({\n selector: 'pry-notification',\n templateUrl: './notification.component.html'\n})\nexport class PryNotificationComponent extends SubscriptionnerDirective {\n @ViewChild('ref') ref!: ElementRef<HTMLButtonElement>;\n notifications$: Observable<PryNotification[]>;\n isOpened: boolean = false;\n dialogRef?: PryDialogRef<PryNotificationContentComponent>;\n\n constructor(private dialog: PryDialogService, private overlay: Overlay, protected store: Store<any>) {\n super();\n this.notifications$ = this.store.select(NotificationSelectors.list);\n }\n\n toggle() {\n this.isOpened = true;\n this.dialogRef = this.dialog.open(\n PryNotificationContentComponent,\n {\n overlayConfig: new OverlayConfig({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.ref)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ])\n })\n },\n () => {\n this.isOpened = false;\n }\n );\n this.subscriptions.add(\n this.dialogRef?.component?.closed.subscribe((isClosed) => {\n if (isClosed) {\n this.dialogRef?.close();\n this.ref.nativeElement.focus();\n }\n })\n );\n }\n}\n","<pry-notification-css></pry-notification-css>\n<div\n class=\"m-notifications\"\n *ngIf=\"notifications$ | async as notifications\"\n [class.has-unread]=\"notifications.length > 0\"\n>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n aria-controls=\"notifications_list\"\n [attr.aria-expanded]=\"isOpened\"\n aria-haspopup=\"true\"\n id=\"read_notifications\"\n #ref\n (click)=\"toggle()\"\n [title]=\"notifications.length <= 1 ? ('@pry.notif.notification' | i18n: {count : notifications.length} ) : ('@pry.notif.notifications' | i18n : {count : notifications.length})\"\n >\n <pry-icon iconSvg=\"notifications\"></pry-icon>\n <span *ngIf=\"notifications.length > 0\" class=\"a-pastille -unread\"\n >{{ notifications.length }} <span class=\"u-visually-hidden\">{{ '@pry.notif.label' | i18n | lowercase }}</span>\n </span>\n </button>\n</div>\n","export const enTranslations = {\n '@pry': {\n notif: {\n label: 'Notifications',\n link: 'See',\n notifications: 'You have {{count}} notifications',\n notification: 'You have {{count}} notification',\n deleteAll: 'Delete all ({{count}})',\n delete: 'Delete notification',\n noNotifications: 'No notification',\n title: {\n DASHBOARD_PRIVATE: 'Presentation',\n DASHBOARD_PUBLIC: 'Presentation',\n DASHBOARD_DELETED: 'Presentation'\n },\n message: {\n DASHBOARD_PRIVATE: 'Access to presentation <{{name}}> has been restrained',\n DASHBOARD_PUBLIC: 'Presentation <{{name}}> is available',\n DASHBOARD_DELETED: 'Presentation <{{name}}> has been removed'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n notif: {\n label: 'Notifications',\n link: 'Voir',\n notifications: 'Vous avez {{count}} notifications',\n notification:'Vous avez {{count}} notification',\n deleteAll: 'Tout supprimer ({{count}})',\n delete: 'Supprimer la notification',\n noNotifications: 'Aucune notification actuellement',\n title: {\n DASHBOARD_PRIVATE: 'Présentation',\n DASHBOARD_PUBLIC: 'Présentation',\n DASHBOARD_DELETED: 'Présentation'\n },\n message: {\n DASHBOARD_PRIVATE: \"L'accès à la présentation <{{name}}> a été restreint\",\n DASHBOARD_PUBLIC: 'La présentation <{{name}}> est disponible',\n DASHBOARD_DELETED: 'La présentation <{{name}}> a été supprimée'\n }\n }\n }\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { ConfigSelectors } from '@provoly/dashboard';\nimport { mergeMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationService {\n constructor(private httpClient: HttpClient, private store: Store<any>) {}\n\n deleteNotification(id: string) {\n return this.store\n .select(ConfigSelectors.refUrl)\n .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me/id/${id}`))));\n }\n\n deleteAllNotifications() {\n return this.store\n .select(ConfigSelectors.refUrl)\n .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me`))));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { WebsocketService, wsMessage } from '@provoly/dashboard';\nimport { map, mergeMap } from 'rxjs';\nimport { NotificationActions } from './notification.actions';\nimport { NotificationService } from './notification.service';\n\n@Injectable()\nexport class NotificationEffects {\n constructor(\n private actions$: Actions,\n private wsService: WebsocketService,\n private store: Store,\n private notificationService: NotificationService\n ) {\n wsService.messages$('notification').subscribe((msg: wsMessage) => {\n setTimeout(\n () =>\n this.store.dispatch(\n NotificationActions.add({\n notification: {\n text: msg.payload.text,\n link: msg.payload.link,\n creationDate: msg.payload.creationDate,\n id: msg.id\n }\n })\n ),\n 1\n );\n });\n }\n\n deleteNotification$ = createEffect(() =>\n this.actions$.pipe(\n ofType(NotificationActions.delete),\n mergeMap((action) =>\n this.notificationService\n .deleteNotification(action.id)\n .pipe(map(() => NotificationActions.deleteSuccess({ id: action.id })))\n )\n )\n );\n\n deleteAllNotifications$ = createEffect(() =>\n this.actions$.pipe(\n ofType(NotificationActions.deleteAll),\n mergeMap((action) =>\n this.notificationService.deleteAllNotifications().pipe(map(() => NotificationActions.deleteAllSuccess()))\n )\n )\n );\n}\n","import { createReducer, on } from '@ngrx/store';\nimport { PryNotification } from '@provoly/dashboard';\nimport { NotificationActions } from './notification.actions';\n\nexport interface NotificationState {\n list: PryNotification[];\n}\n\nexport const initialNotificationState: NotificationState = {\n list: []\n};\n\nexport const notificationReducer = createReducer(\n initialNotificationState,\n on(NotificationActions.add, (state, action) => {\n const allNotifications = [...state.list, { ...action.notification }];\n const uniqueIds = [...new Set(allNotifications.map((notif) => notif.id))];\n return {\n ...state,\n list: uniqueIds.map((id) => allNotifications.find((notif) => notif.id === id)) as PryNotification[]\n };\n }),\n on(NotificationActions.deleteSuccess, (state, action) => ({\n ...state,\n list: state.list.filter((notification: PryNotification) => notification.id !== action.id)\n })),\n on(NotificationActions.deleteAllSuccess, (state, action) => ({\n ...state,\n list: []\n }))\n);\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport {\n notificationFeatureKey,\n PryCoreModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule\n} from '@provoly/dashboard';\nimport { PrySearchModule } from '@provoly/dashboard/search';\nimport { PryNotificationContentComponent } from './components/notification/content/notification-content.component';\nimport { PryNotificationComponent } from './components/notification/notification.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { NotificationEffects } from './store/notification.effects';\nimport { notificationReducer } from './store/notification.reducer';\nimport { PryNotificationCssComponent } from './style/css.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PryCoreModule,\n StoreModule.forFeature(notificationFeatureKey, notificationReducer),\n EffectsModule.forFeature([NotificationEffects]),\n PryIconModule,\n PrySearchModule,\n PryI18nModule\n ],\n declarations: [PryNotificationComponent, PryNotificationContentComponent, PryNotificationCssComponent],\n exports: [PryNotificationComponent, PryNotificationContentComponent]\n})\nexport class PryNotificationModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'notification', frTranslations);\n this.pryTranslateService.addLangObject('en', 'notification', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i3","i2","i5.PryNotificationCssComponent","map","i4.NotificationService"],"mappings":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AAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAHjB,wBAAwB,EAAE,+BAA+B,EAAE,2BAA2B,aARnG,YAAY;AACZ,YAAA,aAAa,oDAGb,aAAa;YACb,eAAe;YACf,aAAa,CAAA,EAAA,OAAA,EAAA,CAGL,wBAAwB,EAAE,+BAA+B,CAAA,EAAA,CAAA,CAAA,EAAA;AAExD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,YAAY;YACZ,aAAa;AACb,YAAA,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACnE,YAAA,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;YAC/C,aAAa;YACb,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKJ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;AACb,wBAAA,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACnE,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;wBAC/C,aAAa;wBACb,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,+BAA+B,EAAE,2BAA2B,CAAC;AACtG,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,+BAA+B,CAAC;AACrE,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-notification.mjs","sources":["../../../../projects/provoly/dashboard/notification/store/notification.actions.ts","../../../../projects/provoly/dashboard/notification/store/notification.selectors.ts","../../../../projects/provoly/dashboard/notification/components/notification/content/notification-content.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/content/notification-content.component.html","../../../../projects/provoly/dashboard/notification/style/css.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/notification.component.ts","../../../../projects/provoly/dashboard/notification/components/notification/notification.component.html","../../../../projects/provoly/dashboard/notification/i18n/en.translations.ts","../../../../projects/provoly/dashboard/notification/i18n/fr.translations.ts","../../../../projects/provoly/dashboard/notification/store/notification.service.ts","../../../../projects/provoly/dashboard/notification/store/notification.effects.ts","../../../../projects/provoly/dashboard/notification/store/notification.reducer.ts","../../../../projects/provoly/dashboard/notification/notification.module.ts","../../../../projects/provoly/dashboard/notification/provoly-dashboard-notification.ts"],"sourcesContent":["import { createAction, props } from '@ngrx/store';\nimport { PryNotification } from '@provoly/dashboard';\n\nexport const NotificationActions = {\n add: createAction('[Notification] received', props<{ notification: PryNotification }>()),\n delete: createAction('[Notification] delete', props<{ id: string }>()),\n deleteSuccess: createAction('[Notification] delete success', props<{ id: string }>()),\n deleteAll: createAction('[Notification] delete all'),\n deleteAllSuccess: createAction('[Notification] delete all success')\n};\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { notificationFeatureKey } from '@provoly/dashboard';\nimport * as fromNotification from './notification.reducer';\n\nconst feature = createFeatureSelector<fromNotification.NotificationState>(notificationFeatureKey);\n\nconst list = createSelector(feature, (state) => state.list);\n\nexport const NotificationSelectors = {\n feature,\n list\n};\n","import {\n AfterViewInit,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostListener,\n Output,\n ViewChild\n} from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { PryI18nService, PryNotification } from '@provoly/dashboard';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { NotificationActions } from '../../../store/notification.actions';\nimport { NotificationSelectors } from '../../../store/notification.selectors';\n\n@Component({\n selector: 'pry-notification-content',\n templateUrl: './notification-content.component.html'\n})\nexport class PryNotificationContentComponent implements DoCheck, AfterViewInit {\n open: boolean = false;\n notifications$: Observable<PryNotification[]>;\n @Output() closed = new EventEmitter<boolean>();\n @ViewChild('caret') caret!: ElementRef;\n @ViewChild('button') button!: ElementRef<HTMLButtonElement>;\n left: number = 0;\n\n constructor(\n protected store: Store,\n private router: Router,\n private i18nService: PryI18nService\n ) {\n this.notifications$ = this.store\n .select(NotificationSelectors.list)\n .pipe(\n map((notifications: PryNotification[]) =>\n [...notifications].sort((a, b) => (a.creationDate < b.creationDate ? 1 : -1))\n )\n );\n }\n\n ngAfterViewInit() {\n if (!this.open) {\n this.button?.nativeElement.focus();\n }\n }\n\n @HostListener('window:resize')\n ngDoCheck() {\n if (this.caret) {\n this.left = this.caret.nativeElement.offsetWidth - 48;\n }\n }\n\n delete(notification: PryNotification) {\n this.store.dispatch(NotificationActions.delete({ id: notification.id }));\n }\n\n deleteAll() {\n this.store.dispatch(NotificationActions.deleteAll());\n }\n\n goTo(notification: PryNotification) {\n const link = notification.link ?? '';\n if (link.startsWith('http')) {\n window.location.href = link;\n } else {\n this.router.navigateByUrl(notification.link ?? '');\n }\n this.closed.next(true);\n }\n\n closeToEscape() {\n this.closed.next(true);\n }\n\n hasTranslation(title: string, translationBase: string) {\n return this.i18nService.instant(translationBase + title) !== translationBase + title;\n }\n}\n","<div\n class=\"m-notifications-list\"\n id=\"notifications_list\"\n aria-labelledby=\"read_notifications\"\n aria-hidden=\"false\"\n #caret\n (keydown.escape)=\"closeToEscape()\"\n>\n <span class=\"caret-top\" [style.left.px]=\"left\"></span>\n <div class=\"m-notifications-list__header\">\n <h2 class=\"a-h2\">{{ '@pry.notif.label' | i18n }}</h2>\n <p class=\"a-p none\" *ngIf=\"(notifications$ | async)?.length === 0; else notification\">\n {{ '@pry.notif.noNotifications' | i18n }}\n </p>\n <ng-template #notification>\n <div class=\"m-btn-group\">\n <button type=\"button\" #button class=\"a-btn a-btn--primary\" (click)=\"deleteAll()\">\n {{ '@pry.notif.deleteAll' | i18n: { count: (notifications$ | async)?.length } }}\n </button>\n </div>\n </ng-template>\n </div>\n <div class=\"m-notifications-list__content\">\n <ul class=\"m-notifications-list__items\">\n <li class=\"m-notifications-list__items__li\" *ngFor=\"let notification of notifications$ | async; let last = last\">\n <div class=\"m-notifications-list__items__li__txt\">\n <h3 class=\"a-h3\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.title.' + notification.text.code | i18n: notification.text.param)\n : notification.text.title\n }}\n <span>{{ notification.creationDate | date: \"dd/MM' 'H':'mm\" }}</span>\n </h3>\n <p class=\"a-p desc\">\n {{\n hasTranslation(notification.text.code, '@pry.notif.title.')\n ? ('@pry.notif.message.' + notification.text.code | i18n: notification.text.param)\n : notification.text.code\n }}\n </p>\n <a *ngIf=\"!!notification.link\" (click)=\"goTo(notification)\">\n {{ '@pry.notif.link' | i18n }}\n </a>\n </div>\n <button\n class=\"a-btn a-btn--delete\"\n (click)=\"delete(notification)\"\n (keydown.tab)=\"last ? closeToEscape() : null\"\n title=\"{{ '@pry.notif.delete' | i18n }}\"\n >\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"close\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.notif.delete' | i18n }}</span>\n </button>\n </li>\n </ul>\n </div>\n</div>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'pry-notification-css',\n template: '',\n styleUrls: ['./_m-notifications.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class PryNotificationCssComponent {}\n","import { Overlay, OverlayConfig } from '@angular/cdk/overlay';\nimport { Component, ElementRef, ViewChild } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { PryDialogRef, PryDialogService, PryNotification, SubscriptionnerDirective } from '@provoly/dashboard';\nimport { Observable } from 'rxjs';\nimport { NotificationSelectors } from '../../store/notification.selectors';\nimport { PryNotificationContentComponent } from './content/notification-content.component';\n\n@Component({\n selector: 'pry-notification',\n templateUrl: './notification.component.html'\n})\nexport class PryNotificationComponent extends SubscriptionnerDirective {\n @ViewChild('ref') ref!: ElementRef<HTMLButtonElement>;\n notifications$: Observable<PryNotification[]>;\n isOpened: boolean = false;\n dialogRef?: PryDialogRef<PryNotificationContentComponent>;\n\n constructor(private dialog: PryDialogService, private overlay: Overlay, protected store: Store<any>) {\n super();\n this.notifications$ = this.store.select(NotificationSelectors.list);\n }\n\n toggle() {\n this.isOpened = true;\n this.dialogRef = this.dialog.open(\n PryNotificationContentComponent,\n {\n overlayConfig: new OverlayConfig({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-transparent-backdrop',\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.ref)\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ])\n })\n },\n () => {\n this.isOpened = false;\n }\n );\n this.subscriptions.add(\n this.dialogRef?.component?.closed.subscribe((isClosed) => {\n if (isClosed) {\n this.dialogRef?.close();\n this.ref.nativeElement.focus();\n }\n })\n );\n }\n}\n","<pry-notification-css></pry-notification-css>\n<div\n class=\"m-notifications\"\n *ngIf=\"notifications$ | async as notifications\"\n [class.has-unread]=\"notifications.length > 0\"\n>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n aria-controls=\"notifications_list\"\n [attr.aria-expanded]=\"isOpened\"\n aria-haspopup=\"true\"\n id=\"read_notifications\"\n #ref\n (click)=\"toggle()\"\n [title]=\"notifications.length <= 1 ? ('@pry.notif.notification' | i18n: {count : notifications.length} ) : ('@pry.notif.notifications' | i18n : {count : notifications.length})\"\n >\n <pry-icon iconSvg=\"notifications\"></pry-icon>\n <span *ngIf=\"notifications.length > 0\" class=\"a-pastille -unread\"\n >{{ notifications.length }} <span class=\"u-visually-hidden\">{{ '@pry.notif.label' | i18n | lowercase }}</span>\n </span>\n </button>\n</div>\n","export const enTranslations = {\n '@pry': {\n notif: {\n label: 'Notifications',\n link: 'See',\n notifications: 'You have {{count}} notifications',\n notification: 'You have {{count}} notification',\n deleteAll: 'Delete all ({{count}})',\n delete: 'Delete notification',\n noNotifications: 'No notification',\n title: {\n DASHBOARD_PRIVATE: 'Presentation',\n DASHBOARD_PUBLIC: 'Presentation',\n DASHBOARD_DELETED: 'Presentation'\n },\n message: {\n DASHBOARD_PRIVATE: 'Access to presentation <{{name}}> has been restrained',\n DASHBOARD_PUBLIC: 'Presentation <{{name}}> is available',\n DASHBOARD_DELETED: 'Presentation <{{name}}> has been removed'\n }\n }\n }\n};\n","export const frTranslations = {\n '@pry': {\n notif: {\n label: 'Notifications',\n link: 'Voir',\n notifications: 'Vous avez {{count}} notifications',\n notification:'Vous avez {{count}} notification',\n deleteAll: 'Tout supprimer ({{count}})',\n delete: 'Supprimer la notification',\n noNotifications: 'Aucune notification actuellement',\n title: {\n DASHBOARD_PRIVATE: 'Présentation',\n DASHBOARD_PUBLIC: 'Présentation',\n DASHBOARD_DELETED: 'Présentation'\n },\n message: {\n DASHBOARD_PRIVATE: \"L'accès à la présentation <{{name}}> a été restreint\",\n DASHBOARD_PUBLIC: 'La présentation <{{name}}> est disponible',\n DASHBOARD_DELETED: 'La présentation <{{name}}> a été supprimée'\n }\n }\n }\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { ConfigSelectors } from '@provoly/dashboard';\nimport { mergeMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationService {\n constructor(private httpClient: HttpClient, private store: Store<any>) {}\n\n deleteNotification(id: string) {\n return this.store\n .select(ConfigSelectors.refUrl)\n .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me/id/${id}`))));\n }\n\n deleteAllNotifications() {\n return this.store\n .select(ConfigSelectors.refUrl)\n .pipe(mergeMap((url) => this.httpClient.delete(encodeURI(`${url}/notification/me`))));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Store } from '@ngrx/store';\nimport { WebsocketService, wsMessage } from '@provoly/dashboard';\nimport { map, mergeMap } from 'rxjs';\nimport { NotificationActions } from './notification.actions';\nimport { NotificationService } from './notification.service';\n\n@Injectable()\nexport class NotificationEffects {\n constructor(\n private actions$: Actions,\n private wsService: WebsocketService,\n private store: Store,\n private notificationService: NotificationService\n ) {\n wsService.messages$('notification').subscribe((msg: wsMessage) => {\n setTimeout(\n () =>\n this.store.dispatch(\n NotificationActions.add({\n notification: {\n text: msg.payload.text,\n link: msg.payload.link,\n creationDate: msg.payload.creationDate,\n id: msg.id\n }\n })\n ),\n 1\n );\n });\n }\n\n deleteNotification$ = createEffect(() =>\n this.actions$.pipe(\n ofType(NotificationActions.delete),\n mergeMap((action) =>\n this.notificationService\n .deleteNotification(action.id)\n .pipe(map(() => NotificationActions.deleteSuccess({ id: action.id })))\n )\n )\n );\n\n deleteAllNotifications$ = createEffect(() =>\n this.actions$.pipe(\n ofType(NotificationActions.deleteAll),\n mergeMap((action) =>\n this.notificationService.deleteAllNotifications().pipe(map(() => NotificationActions.deleteAllSuccess()))\n )\n )\n );\n}\n","import { createReducer, on } from '@ngrx/store';\nimport { PryNotification } from '@provoly/dashboard';\nimport { NotificationActions } from './notification.actions';\n\nexport interface NotificationState {\n list: PryNotification[];\n}\n\nexport const initialNotificationState: NotificationState = {\n list: []\n};\n\nexport const notificationReducer = createReducer(\n initialNotificationState,\n on(NotificationActions.add, (state, action) => {\n const allNotifications = [...state.list, { ...action.notification }];\n const uniqueIds = [...new Set(allNotifications.map((notif) => notif.id))];\n return {\n ...state,\n list: uniqueIds.map((id) => allNotifications.find((notif) => notif.id === id)) as PryNotification[]\n };\n }),\n on(NotificationActions.deleteSuccess, (state, action) => ({\n ...state,\n list: state.list.filter((notification: PryNotification) => notification.id !== action.id)\n })),\n on(NotificationActions.deleteAllSuccess, (state, action) => ({\n ...state,\n list: []\n }))\n);\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\nimport {\n notificationFeatureKey,\n PryCoreModule,\n PryI18nModule,\n PryI18nService,\n PryIconModule\n} from '@provoly/dashboard';\nimport { PrySearchModule } from '@provoly/dashboard/search';\nimport { PryNotificationContentComponent } from './components/notification/content/notification-content.component';\nimport { PryNotificationComponent } from './components/notification/notification.component';\nimport { enTranslations } from './i18n/en.translations';\nimport { frTranslations } from './i18n/fr.translations';\nimport { NotificationEffects } from './store/notification.effects';\nimport { notificationReducer } from './store/notification.reducer';\nimport { PryNotificationCssComponent } from './style/css.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PryCoreModule,\n StoreModule.forFeature(notificationFeatureKey, notificationReducer),\n EffectsModule.forFeature([NotificationEffects]),\n PryIconModule,\n PrySearchModule,\n PryI18nModule\n ],\n declarations: [PryNotificationComponent, PryNotificationContentComponent, PryNotificationCssComponent],\n exports: [PryNotificationComponent, PryNotificationContentComponent]\n})\nexport class PryNotificationModule {\n constructor(private pryTranslateService: PryI18nService) {\n this.pryTranslateService.addLangObject('fr', 'notification', frTranslations);\n this.pryTranslateService.addLangObject('en', 'notification', enTranslations);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i3","i2","i5.PryNotificationCssComponent","map","i4.NotificationService"],"mappings":";;;;;;;;;;;;;;;;;;;AAGa,MAAA,mBAAmB,GAAG;AACjC,IAAA,GAAG,EAAE,YAAY,CAAC,yBAAyB,EAAE,KAAK,EAAqC,CAAC;AACxF,IAAA,MAAM,EAAE,YAAY,CAAC,uBAAuB,EAAE,KAAK,EAAkB,CAAC;AACtE,IAAA,aAAa,EAAE,YAAY,CAAC,+BAA+B,EAAE,KAAK,EAAkB,CAAC;AACrF,IAAA,SAAS,EAAE,YAAY,CAAC,2BAA2B,CAAC;AACpD,IA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AA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,YAAY;YACZ,aAAa;AACb,YAAA,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACnE,YAAA,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;YAC/C,aAAa;YACb,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKJ,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;AACb,wBAAA,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;AACnE,wBAAA,aAAa,CAAC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;wBAC/C,aAAa;wBACb,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,+BAA+B,EAAE,2BAA2B,CAAC;AACtG,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,+BAA+B,CAAC;AACrE,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
|
|
@@ -94,6 +94,9 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
94
94
|
this.valuePropField$ = combineLatest([this.availableProperties$, this.options$]).pipe(map(([attributes, options]) => attributes.find((attr) => attr.technicalName === options.valueProp)?.field));
|
|
95
95
|
}
|
|
96
96
|
matchAttributeValue(item, prop, comparisonValue) {
|
|
97
|
+
if (prop === 'level' && !('level' in item.attributes)) {
|
|
98
|
+
return comparisonValue === '1';
|
|
99
|
+
}
|
|
97
100
|
return comparisonValue && prop ? item.attributes[prop].value == comparisonValue : true;
|
|
98
101
|
}
|
|
99
102
|
createValueMap(verticalProps, primaryProps, secondaryProps, rs, options, level) {
|
|
@@ -126,7 +129,7 @@ class WidgetAnalyticComponent extends DataWidgetComponent {
|
|
|
126
129
|
.map((items) => items
|
|
127
130
|
.filter((item) => level && 'level' in item.attributes
|
|
128
131
|
? [level, '' + level].includes(item.attributes['level'].value)
|
|
129
|
-
:
|
|
132
|
+
: level === undefined || level === 1)
|
|
130
133
|
.map((item) => item.attributes[property]?.value + ''))
|
|
131
134
|
.flat()
|
|
132
135
|
.flat();
|