@provoly/hypervisor 0.0.21 → 0.0.23

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 (41) hide show
  1. package/assets/svgs/i.svg +18 -0
  2. package/esm2022/src/lib/event/detail/event-detail.component.mjs +92 -32
  3. package/esm2022/src/lib/event/filters/choice/choice-filter.component.mjs +21 -21
  4. package/esm2022/src/lib/event/filters/date/date-filter.component.mjs +7 -9
  5. package/esm2022/src/lib/event/filters/event-filters.component.mjs +14 -9
  6. package/esm2022/src/lib/event/filters/hvy-unit-filter.class.mjs +21 -1
  7. package/esm2022/src/lib/event/list/event-list.component.mjs +10 -8
  8. package/esm2022/src/lib/event-summary/list/event-summary-list.component.mjs +4 -3
  9. package/esm2022/src/lib/event-summary/page/event-summary-page.component.mjs +12 -5
  10. package/esm2022/src/lib/general/i18n/en.translations.mjs +25 -18
  11. package/esm2022/src/lib/general/i18n/fr.translations.mjs +33 -24
  12. package/esm2022/src/lib/general/status-display/status-display.component.mjs +3 -3
  13. package/esm2022/src/lib/model/event/hyp-event-detail.interface.mjs +1 -1
  14. package/esm2022/src/lib/model/event/hyp-event-summary.interface.mjs +1 -1
  15. package/esm2022/src/lib/model/event/hyp-event.interface.mjs +1 -1
  16. package/esm2022/src/lib/store/event/event.actions.mjs +2 -2
  17. package/esm2022/src/lib/store/event/event.effects.mjs +3 -3
  18. package/esm2022/src/lib/store/event/event.reducer.mjs +15 -13
  19. package/esm2022/src/lib/store/event/event.service.mjs +21 -31
  20. package/esm2022/src/lib/store/event-summary/event-summary.service.mjs +5 -5
  21. package/fesm2022/provoly-hypervisor.mjs +316 -226
  22. package/fesm2022/provoly-hypervisor.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/src/lib/event/detail/event-detail.component.d.ts +16 -2
  25. package/src/lib/event/filters/choice/choice-filter.component.d.ts +6 -5
  26. package/src/lib/event/filters/date/date-filter.component.d.ts +5 -4
  27. package/src/lib/event/filters/event-filters.component.d.ts +5 -3
  28. package/src/lib/event/filters/hvy-unit-filter.class.d.ts +14 -2
  29. package/src/lib/event/list/event-list.component.d.ts +3 -0
  30. package/src/lib/general/i18n/en.translations.d.ts +7 -0
  31. package/src/lib/general/i18n/fr.translations.d.ts +9 -0
  32. package/src/lib/model/event/hyp-event-detail.interface.d.ts +1 -2
  33. package/src/lib/model/event/hyp-event-summary.interface.d.ts +0 -1
  34. package/src/lib/model/event/hyp-event.interface.d.ts +1 -0
  35. package/src/lib/model/hyp-procedure.interface.d.ts +1 -1
  36. package/src/lib/store/event/event.actions.d.ts +4 -0
  37. package/src/lib/store/event/event.service.d.ts +9 -3
  38. package/styles/components/_m-hvy-event-summary-item.scss +37 -7
  39. package/styles/components/_o-hvy-event-detail.scss +41 -0
  40. package/styles/components/_o-hvy-event-filters.scss +3 -0
  41. package/styles/components/_o-hvy-events-table.scss +2 -1
@@ -1,15 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, Component, Input, EventEmitter, Output, ContentChildren, forwardRef, signal, computed, TemplateRef, ViewChild, InjectionToken, NgModule, Inject } from '@angular/core';
2
+ import { Injectable, Pipe, Component, Input, EventEmitter, Output, TemplateRef, ViewChild, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule, Inject } from '@angular/core';
3
3
  import * as i3 from '@provoly/dashboard';
4
4
  import { DEFAULT_ICON_URL, SubscriptionnerDirective, PryI18nModule, PryCoreModule, PryIconModule, PrySelectModule, PryDatePickerModule } from '@provoly/dashboard';
5
5
  import * as i1$1 from '@ngrx/store';
6
6
  import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
7
- import { mergeMap, of, combineLatest, map, fromEvent, withLatestFrom, filter, auditTime } from 'rxjs';
7
+ import * as i3$1 from '@angular/cdk/overlay';
8
+ import { OverlayConfig } from '@angular/cdk/overlay';
9
+ import { TemplatePortal } from '@angular/cdk/portal';
10
+ import { mergeMap, of, combineLatest, map, fromEvent, withLatestFrom, filter, auditTime, BehaviorSubject } from 'rxjs';
8
11
  import * as i1 from '@angular/common/http';
9
12
  import { HttpParams } from '@angular/common/http';
10
- import * as i3$1 from '@provoly/dashboard/components/checkbox';
13
+ import * as i4 from '@provoly/dashboard/components/checkbox';
11
14
  import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
12
- import * as i4 from '@angular/forms';
15
+ import * as i5 from '@angular/forms';
13
16
  import { FormsModule } from '@angular/forms';
14
17
  import * as i1$2 from '@angular/common';
15
18
  import { NgForOf, AsyncPipe, NgStyle, DatePipe, KeyValuePipe, JsonPipe } from '@angular/common';
@@ -17,9 +20,6 @@ import * as i2 from '@angular/router';
17
20
  import { RouterLink } from '@angular/router';
18
21
  import * as i10 from '@provoly/dashboard/components/sinceDate';
19
22
  import { PrySinceDateModule } from '@provoly/dashboard/components/sinceDate';
20
- import * as i2$1 from '@angular/cdk/overlay';
21
- import { OverlayConfig } from '@angular/cdk/overlay';
22
- import { TemplatePortal } from '@angular/cdk/portal';
23
23
  import { map as map$1, debounceTime, mergeMap as mergeMap$1, catchError } from 'rxjs/operators';
24
24
  import * as i1$3 from '@ngrx/effects';
25
25
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
@@ -60,7 +60,7 @@ const EventActions = {
60
60
  status: createAction('[Event] Close Event or Procedure', props()),
61
61
  statusSuccess: createAction('[Event] Close success'),
62
62
  statusFailure: createAction('[Event] Close failure', props()),
63
- sort: createAction('[Event] set log event sorting', props()),
63
+ sort: createAction('[Event] set log event sorting', props())
64
64
  };
65
65
 
66
66
  const HypervisorActions = {
@@ -171,11 +171,11 @@ class StatusDisplayComponent {
171
171
  this.targetsDisplayed = this.targetStatuses.length > 0 && !this.targetsDisplayed;
172
172
  }
173
173
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: StatusDisplayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: { event: "event", modifiable: "modifiable" }, outputs: { modified: "modified" }, ngImport: i0, template: "<span class=\"a-chip -md -{{event.status}} a-chip-status\" (click)=\"toggle()\" >\n {{ '@hvy.event.status.' + event.status | i18n }}\n @if (targetStatuses.length > 0) {\n <pry-icon iconSvg=\"chevron_bottom\" [width]=\"10\" [height]=\"10\"></pry-icon>\n }\n</span>\n@if (targetsDisplayed) {\n <div class=\"a-chip-status__target\">\n <div class=\"a-chip-status__target__filler\"></div>\n @for (status of targetStatuses;track status) {\n <div class=\"a-chip-status__target__item\" (click)=\"trigger(status)\">{{ '@hvy.event.status.' + status | i18n }}</div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
174
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: { event: "event", modifiable: "modifiable" }, outputs: { modified: "modified" }, ngImport: i0, template: "<span class=\"a-chip -{{event.status}} a-chip-status\" (click)=\"toggle()\">\n {{ '@hvy.event.status.' + event.status | i18n }}\n @if (targetStatuses.length > 0) {\n <pry-icon iconSvg=\"chevron_bottom\" [width]=\"10\" [height]=\"10\"></pry-icon>\n }\n</span>\n@if (targetsDisplayed) {\n <div class=\"a-chip-status__target\">\n <div class=\"a-chip-status__target__filler\"></div>\n @for (status of targetStatuses; track status) {\n <div class=\"a-chip-status__target__item\" (click)=\"trigger(status)\">{{ '@hvy.event.status.' + status | i18n }}\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
175
175
  }
176
176
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: StatusDisplayComponent, decorators: [{
177
177
  type: Component,
178
- args: [{ selector: 'hvy-status-display', template: "<span class=\"a-chip -md -{{event.status}} a-chip-status\" (click)=\"toggle()\" >\n {{ '@hvy.event.status.' + event.status | i18n }}\n @if (targetStatuses.length > 0) {\n <pry-icon iconSvg=\"chevron_bottom\" [width]=\"10\" [height]=\"10\"></pry-icon>\n }\n</span>\n@if (targetsDisplayed) {\n <div class=\"a-chip-status__target\">\n <div class=\"a-chip-status__target__filler\"></div>\n @for (status of targetStatuses;track status) {\n <div class=\"a-chip-status__target__item\" (click)=\"trigger(status)\">{{ '@hvy.event.status.' + status | i18n }}</div>\n }\n </div>\n}\n" }]
178
+ args: [{ selector: 'hvy-status-display', template: "<span class=\"a-chip -{{event.status}} a-chip-status\" (click)=\"toggle()\">\n {{ '@hvy.event.status.' + event.status | i18n }}\n @if (targetStatuses.length > 0) {\n <pry-icon iconSvg=\"chevron_bottom\" [width]=\"10\" [height]=\"10\"></pry-icon>\n }\n</span>\n@if (targetsDisplayed) {\n <div class=\"a-chip-status__target\">\n <div class=\"a-chip-status__target__filler\"></div>\n @for (status of targetStatuses; track status) {\n <div class=\"a-chip-status__target__item\" (click)=\"trigger(status)\">{{ '@hvy.event.status.' + status | i18n }}\n </div>\n }\n </div>\n}\n" }]
179
179
  }], propDecorators: { modified: [{
180
180
  type: Output
181
181
  }], event: [{
@@ -218,12 +218,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
218
218
  class EventDetailComponent extends SubscriptionnerDirective {
219
219
  static { this.CARD_HEIGHT = 75; }
220
220
  set events(events) {
221
- this._events = events.filter(ev => !!ev);
221
+ this._events = events.filter((ev) => !!ev);
222
222
  this.eventModifications = new Array(this._events.length);
223
223
  this.opened = this._events.length === 1 ? [true] : [];
224
- this.canCloseSome = this._events.filter(ev => ev.status !== 'DONE').length > 0;
224
+ this.canCloseSome = this._events.filter((ev) => ev.status !== 'DONE').length > 0;
225
225
  }
226
- ;
227
226
  set procedure(procedure) {
228
227
  this._procedure = procedure;
229
228
  this.procedureModifications = {};
@@ -233,10 +232,12 @@ class EventDetailComponent extends SubscriptionnerDirective {
233
232
  this.procedureModifications = {};
234
233
  this._outputModifications();
235
234
  }
236
- constructor(equipmentService, store) {
235
+ constructor(equipmentService, store, overlay, viewContainerRef) {
237
236
  super();
238
237
  this.equipmentService = equipmentService;
239
238
  this.store = store;
239
+ this.overlay = overlay;
240
+ this.viewContainerRef = viewContainerRef;
240
241
  this.opened = [];
241
242
  this.criticalities = HypEventCriticality.values;
242
243
  this._events = [];
@@ -253,16 +254,24 @@ class EventDetailComponent extends SubscriptionnerDirective {
253
254
  this.moveInitialIndex = 0;
254
255
  this.initialActionList = [];
255
256
  this.previousOffset = 0;
257
+ this.changeStatusContext = {
258
+ comment: '',
259
+ events: [],
260
+ status: 'DONE',
261
+ all: false
262
+ };
256
263
  }
257
264
  get events() {
258
265
  return this._events.map((evt, idx) => ({ ...evt, ...(this.eventModifications[idx] ?? {}) }));
259
266
  }
260
267
  get procedure() {
261
- return this._procedure ? ({
262
- ...this._procedure,
263
- ...(this.procedureModifications ?? {}),
264
- events: this.events,
265
- }) : undefined;
268
+ return this._procedure
269
+ ? {
270
+ ...this._procedure,
271
+ ...(this.procedureModifications ?? {}),
272
+ events: this.events
273
+ }
274
+ : undefined;
266
275
  }
267
276
  toggle(i) {
268
277
  this.opened[i] = !this.opened[i];
@@ -295,7 +304,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
295
304
  eqName: true,
296
305
  eqEntity: true,
297
306
  startDate: true,
298
- endDate: true,
307
+ endDate: true
299
308
  };
300
309
  }
301
310
  switch (event.type) {
@@ -312,7 +321,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
312
321
  eqName: true,
313
322
  eqEntity: true,
314
323
  startDate: true,
315
- endDate: true,
324
+ endDate: true
316
325
  };
317
326
  case 'REPORT':
318
327
  return {
@@ -326,7 +335,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
326
335
  eqName: false,
327
336
  eqEntity: true,
328
337
  startDate: true,
329
- endDate: true,
338
+ endDate: true
330
339
  };
331
340
  case 'OPERATOR':
332
341
  return {
@@ -340,7 +349,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
340
349
  eqName: false,
341
350
  eqEntity: false,
342
351
  startDate: false,
343
- endDate: false,
352
+ endDate: false
344
353
  };
345
354
  }
346
355
  }
@@ -363,7 +372,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
363
372
  }
364
373
  validateEvents(events) {
365
374
  this.errors = [];
366
- events.forEach(event => {
375
+ events.forEach((event) => {
367
376
  const eventErrors = [];
368
377
  if (!event.name || event.name.length === 0) {
369
378
  eventErrors.push({ field: 'name', code: 'required' });
@@ -394,20 +403,62 @@ class EventDetailComponent extends SubscriptionnerDirective {
394
403
  this.eventErrors.next(this.errors);
395
404
  }
396
405
  hasError(prop, idx) {
397
- return this.errors[idx]?.find(err => err.field === prop) ?? false;
406
+ return this.errors[idx]?.find((err) => err.field === prop) ?? false;
398
407
  }
399
408
  categories(event) {
400
409
  return CATEGORIES_BY_TYPE.values[event.type];
401
410
  }
402
411
  changeStatus($event, event) {
403
- this.store.dispatch(EventActions.status({ targetStatus: $event, event: event }));
412
+ this.changeStatusContext.events = [event];
413
+ this.changeStatusContext.status = $event;
414
+ this.changeStatusContext.all = false;
415
+ this.toggleConfirm();
404
416
  }
405
417
  closeAll() {
406
- if (!this.procedure) {
407
- this.store.dispatch(EventActions.status({ targetStatus: 'DONE', event: this.events[0] }));
418
+ this.changeStatusContext.all = true;
419
+ this.changeStatusContext.events = this.events;
420
+ this.changeStatusContext.status = 'DONE';
421
+ this.toggleConfirm();
422
+ }
423
+ confirmedClose() {
424
+ if (this.changeStatusContext.all) {
425
+ if (!this.procedure) {
426
+ this.store.dispatch(EventActions.status({
427
+ targetStatus: this.changeStatusContext.status,
428
+ event: this.changeStatusContext.events[0],
429
+ comment: this.changeStatusContext.comment
430
+ }));
431
+ }
432
+ else {
433
+ this.store.dispatch(EventActions.status({
434
+ targetStatus: this.changeStatusContext.status,
435
+ procedure: this.procedure,
436
+ comment: this.changeStatusContext.comment
437
+ }));
438
+ }
408
439
  }
409
440
  else {
410
- this.store.dispatch(EventActions.status({ targetStatus: 'DONE', procedure: this.procedure }));
441
+ this.store.dispatch(EventActions.status({
442
+ targetStatus: this.changeStatusContext.status,
443
+ event: this.changeStatusContext.events[0],
444
+ comment: this.changeStatusContext.comment
445
+ }));
446
+ }
447
+ this.toggleConfirm();
448
+ }
449
+ toggleConfirm() {
450
+ if (!this.overlayRef) {
451
+ this.overlayRef = this.overlay.create(new OverlayConfig({
452
+ hasBackdrop: true,
453
+ backdropClass: 'backdrop-dark',
454
+ panelClass: ['o-hvy-close-confirm']
455
+ }));
456
+ this.overlayRef.backdropClick().subscribe(() => this.toggleConfirm());
457
+ this.overlayRef.attach(new TemplatePortal(this.confirmDialog, this.viewContainerRef));
458
+ }
459
+ else {
460
+ this.overlayRef.dispose();
461
+ this.overlayRef = undefined;
411
462
  }
412
463
  }
413
464
  onMouseDown($event) {
@@ -447,18 +498,24 @@ class EventDetailComponent extends SubscriptionnerDirective {
447
498
  allowDrop($event) {
448
499
  $event.preventDefault();
449
500
  }
450
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventDetailComponent, deps: [{ token: EquipmentService }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
451
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { events: "events", procedure: "procedure", cancelModifications: "cancelModifications" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ '@hvy.event.detail' | i18n }}</h1>\n @if (events.length > 1) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\"\n (click)=\"closeAll()\">{{ '@hvy.event.log.event.close' | i18n }}\n </button>\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</button>\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events;track event.id;let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon [iconSvg]=\"!opened[idx] ? 'chevron_bottom' : 'chevron_top'\" (click)=\"toggle(idx)\"></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <hvy-status-display [event]=\"event\" [modifiable]=\"event.status !== 'DONE'\"\n (modified)=\"changeStatus($event, event)\"></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }}: {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }}: {{ event.address }}</div>\n } @else {\n @if (access(event);as accessValue) {\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span></td>\n <td><input type=\"text\" class=\"a-form-field\" [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\" [readonly]=\"accessValue.name\"></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\" [disabled]=\"accessValue.category\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.criticality\" [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span></td>\n <td><textarea [ngModel]=\"event.description\" class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"></textarea></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }}</td>\n <td><textarea [ngModel]=\"event.address\" class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"></textarea></td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\" (change)=\"modifyEvent(idx, 'source', $event)\"></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }}</td>\n <td>\n <input type=\"text\" class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.equipment?.entity ?? ''\"\n readonly></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}</td>\n <td>\n <pry-select [items]=\"DOMAINS\" [ngModel]=\"event.domain\" i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\" (change)=\"modifyEvent(idx, 'startDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\" (change)=\"modifyEvent(idx, 'endDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\" readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\" [value]=\"event.closeDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }}</h3>\n <textarea [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\"\n [disabled]=\"newComentContent.length === 0\">{{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>{{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}</h2>\n </div>\n @if (procedure) {\n <div>\n <p>{{ procedure.name }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <div class=\"o-hvy-events-detail__procedure__actions\" (drag)=\"move($event)\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\">\n @for (action of procedure.actions;track action.id;let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action\" [draggable]=\"true\" (dragstart)=\"dragStart($event, action, idx)\" (mousedown)=\"onMouseDown($event)\">\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox [ngModel]=\"action.status === 'DONE'\"></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div>\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\">\n {{ '@chh.actions.associate' | i18n }}\n </button>\n }\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i3$1.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.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: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["event", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
501
+ confirmDisabled() {
502
+ return this.changeStatusContext.comment.length === 0;
503
+ }
504
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventDetailComponent, deps: [{ token: EquipmentService }, { token: i1$1.Store }, { token: i3$1.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
505
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventDetailComponent, selector: "hvy-event-detail", inputs: { events: "events", procedure: "procedure", cancelModifications: "cancelModifications" }, outputs: { modifiedEvents: "modifiedEvents", modifiedProcedure: "modifiedProcedure", eventErrors: "eventErrors" }, viewQueries: [{ propertyName: "confirmDialog", first: true, predicate: ["confirmDialog"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ '@hvy.event.detail' | i18n }}</h1>\n @if (events.length > 1) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\"\n (click)=\"closeAll()\">{{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n @if (!canCloseSome) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</button>\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon [iconSvg]=\"!opened[idx] ? 'chevron_bottom' : 'chevron_top'\" (click)=\"toggle(idx)\"></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <hvy-status-display [event]=\"event\" [modifiable]=\"event.status !== 'DONE'\"\n (modified)=\"changeStatus($event, event)\"></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }}: {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }}: {{ event.address }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span></td>\n <td><input type=\"text\" class=\"a-form-field\" [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\" [readonly]=\"accessValue.name\"></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\" [disabled]=\"accessValue.category\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.criticality\" [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span></td>\n <td><textarea [ngModel]=\"event.description\" class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"></textarea></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }}</td>\n <td><textarea [ngModel]=\"event.address\" class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"></textarea></td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\" (change)=\"modifyEvent(idx, 'source', $event)\"></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }}</td>\n <td>\n <input type=\"text\" class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.equipment?.entity ?? ''\"\n readonly></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}</td>\n <td>\n <pry-select [items]=\"DOMAINS\" [ngModel]=\"event.domain\" i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\" (change)=\"modifyEvent(idx, 'startDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\" (change)=\"modifyEvent(idx, 'endDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\" readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\" [value]=\"event.closeDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }}</h3>\n <textarea [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\"\n [disabled]=\"newComentContent.length === 0\">{{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>{{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}</h2>\n </div>\n @if (procedure) {\n <div>\n <p>{{ procedure.name }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <div class=\"o-hvy-events-detail__procedure__actions\" (drag)=\"move($event)\" (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\">\n @for (action of procedure.actions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action\" [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\" (mousedown)=\"onMouseDown($event)\">\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox [ngModel]=\"action.status === 'DONE'\"></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div>\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</h2>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span>:\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\"\n [disabled]=\"confirmDisabled()\">{{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.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: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["event", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ProgressDisplayComponent, selector: "hvy-progress-display", inputs: ["progress"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: ForDatetimeLocalPipe, name: "forDateTimeLocal" }] }); }
452
506
  }
453
507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventDetailComponent, decorators: [{
454
508
  type: Component,
455
- args: [{ selector: 'hvy-event-detail', template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ '@hvy.event.detail' | i18n }}</h1>\n @if (events.length > 1) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\"\n (click)=\"closeAll()\">{{ '@hvy.event.log.event.close' | i18n }}\n </button>\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</button>\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events;track event.id;let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon [iconSvg]=\"!opened[idx] ? 'chevron_bottom' : 'chevron_top'\" (click)=\"toggle(idx)\"></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <hvy-status-display [event]=\"event\" [modifiable]=\"event.status !== 'DONE'\"\n (modified)=\"changeStatus($event, event)\"></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }}: {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }}: {{ event.address }}</div>\n } @else {\n @if (access(event);as accessValue) {\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span></td>\n <td><input type=\"text\" class=\"a-form-field\" [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\" [readonly]=\"accessValue.name\"></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\" [disabled]=\"accessValue.category\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.criticality\" [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span></td>\n <td><textarea [ngModel]=\"event.description\" class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"></textarea></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }}</td>\n <td><textarea [ngModel]=\"event.address\" class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"></textarea></td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\" (change)=\"modifyEvent(idx, 'source', $event)\"></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }}</td>\n <td>\n <input type=\"text\" class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.equipment?.entity ?? ''\"\n readonly></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}</td>\n <td>\n <pry-select [items]=\"DOMAINS\" [ngModel]=\"event.domain\" i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\" (change)=\"modifyEvent(idx, 'startDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\" (change)=\"modifyEvent(idx, 'endDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\" readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\" [value]=\"event.closeDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }}</h3>\n <textarea [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\"\n [disabled]=\"newComentContent.length === 0\">{{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>{{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}</h2>\n </div>\n @if (procedure) {\n <div>\n <p>{{ procedure.name }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <div class=\"o-hvy-events-detail__procedure__actions\" (drag)=\"move($event)\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\">\n @for (action of procedure.actions;track action.id;let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action\" [draggable]=\"true\" (dragstart)=\"dragStart($event, action, idx)\" (mousedown)=\"onMouseDown($event)\">\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox [ngModel]=\"action.status === 'DONE'\"></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div>\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\">\n {{ '@chh.actions.associate' | i18n }}\n </button>\n }\n </div>\n </div>\n </div>\n</div>\n" }]
456
- }], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }], propDecorators: { modifiedEvents: [{
509
+ args: [{ selector: 'hvy-event-detail', template: "<div class=\"o-hvy-events-detail\">\n <div class=\"o-hvy-events-detail__header\">\n <div class=\"o-hvy-events-detail__header__split\">\n <h1>{{ '@hvy.event.detail' | i18n }}</h1>\n @if (events.length > 1) {\n <button class=\"a-btn a-btn--secondary -fix-right\" [disabled]=\"!canCloseSome\"\n (click)=\"closeAll()\">{{ (canCloseSome ? '@hvy.event.log.event.close' : '@hvy.event.log.event.closed') | i18n }}\n </button>\n @if (!canCloseSome) {\n <div\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'... TODO: get closing comment ...'\"\n data-tooltip-position=\"bottom\">\n <pry-icon iconSvg=\"i\" [height]=\"18\" [width]=\"18\">i</pry-icon>\n </div>\n }\n }\n </div>\n <div class=\"o-hvy-events-detail__header__split\">\n <button class=\"a-btn a-btn--secondary\">{{ '@hvy.event.log.procedure.delete' | i18n }}</button>\n </div>\n </div>\n <div class=\"o-hvy-events-detail__container\">\n <div class=\"o-hvy-events-detail__container__scrollable\">\n <div class=\"o-hvy-events-detail__events\">\n @for (event of events; track event.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__events__event\">\n <div class=\"o-hvy-events-detail__events__event__header\">\n <pry-icon [iconSvg]=\"!opened[idx] ? 'chevron_bottom' : 'chevron_top'\" (click)=\"toggle(idx)\"></pry-icon>\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n <h2>{{ event.name }}</h2>\n <hvy-status-display [event]=\"event\" [modifiable]=\"event.status !== 'DONE'\"\n (modified)=\"changeStatus($event, event)\"></hvy-status-display>\n </div>\n <div class=\"o-hvy-events-detail__events__event__content\">\n @if (!opened[idx]) {\n <div>{{ '@hvy.event.log.event.description' | i18n }}: {{ event.description }}</div>\n <div>{{ '@hvy.event.log.event.address' | i18n }}: {{ event.address }}</div>\n } @else {\n @if (access(event); as accessValue) {\n <h3>{{ '@hvy.event.log.event.detail' | i18n }}</h3>\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.event.log.event.name' | i18n }}<span class=\"required\">*</span></td>\n <td><input type=\"text\" class=\"a-form-field\" [class.-error]=\"hasError('name', idx)\"\n [value]=\"event.name\"\n (change)=\"modifyEvent(idx, 'name', $event)\" [readonly]=\"accessValue.name\"></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.category' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.category\"\n [items]=\"categories(event)\"\n [class.-error]=\"hasError('category', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'category', $event)\"\n i18nPrefix=\"@hvy.event.category.\" [disabled]=\"accessValue.category\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.criticality.name' | i18n }}<span class=\"required\">*</span></td>\n <td>\n <pry-select [ngModel]=\"event.criticality\" [items]=\"criticalities\"\n [class.-error]=\"hasError('criticality', idx)\"\n i18nPrefix=\"@hvy.event.criticality.\"\n [disabled]=\"accessValue.criticality\"\n (ngModelChange)=\"modifyEvent(idx, 'criticality', $event)\"></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.description' | i18n }}<span class=\"required\">*</span></td>\n <td><textarea [ngModel]=\"event.description\" class=\"a-form-field\"\n [class.-error]=\"hasError('description', idx)\"\n [readonly]=\"accessValue.description\"\n (ngModelChange)=\"modifyEvent(idx, 'description', $event)\"></textarea></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.log.event.address' | i18n }}</td>\n <td><textarea [ngModel]=\"event.address\" class=\"a-form-field\"\n [class.-error]=\"hasError('address', idx)\"\n [readonly]=\"accessValue.address\"\n (ngModelChange)=\"modifyEvent(idx, 'address', $event)\"></textarea></td>\n </tr>\n @if (['ALERT', 'REPORT'].includes(event.type)) {\n <tr>\n <td>{{ '@hvy.event.source' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.externalSourceRef ?? ''\"\n [class.-error]=\"hasError('source', idx)\"\n [readonly]=\"accessValue.source\" (change)=\"modifyEvent(idx, 'source', $event)\"></td>\n </tr>\n }\n <tr>\n <td>{{ '@hvy.event.equipment' | i18n }}</td>\n <td>\n <input type=\"text\" class=\"a-form-field\"\n [value]=\"event.equipment?.name ?? ''\"\n [class.-error]=\"hasError('equipment', idx)\"\n [readonly]=\"accessValue.eqName\"\n (change)=\"changeEquipment(idx, $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.equipmentEntity' | i18n }}</td>\n <td><input type=\"text\" class=\"a-form-field\" [value]=\"event.equipment?.entity ?? ''\"\n readonly></td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}</td>\n <td>\n <pry-select [items]=\"DOMAINS\" [ngModel]=\"event.domain\" i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain', idx)\"\n (ngModelChange)=\"modifyEvent(idx, 'domain', $event)\"\n [disabled]=\"accessValue.domain\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.startDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.startDate | forDateTimeLocal\"\n [class.-error]=\"hasError('startDate', idx)\"\n [readonly]=\"accessValue.startDate\" (change)=\"modifyEvent(idx, 'startDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>\n {{ '@hvy.event.endDate' | i18n }}\n @if (event.category === 'MANIFESTATION') {\n <span class=\"required\">*</span>\n }\n </td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.endDate | forDateTimeLocal\"\n [class.-error]=\"hasError('endDate', idx)\"\n [readonly]=\"accessValue.endDate\" (change)=\"modifyEvent(idx, 'endDate', $event)\">\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.creationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.creationDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.lastModificationDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\"\n [value]=\"event.lastModificationDate | forDateTimeLocal\" readonly>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.closeDate' | i18n }}</td>\n <td>\n <input type=\"datetime-local\" class=\"a-form-field\" [value]=\"event.closeDate | forDateTimeLocal\"\n readonly>\n </td>\n </tr>\n </tbody>\n </table>\n <div class=\"o-hvy-events-detail__events__event__content__comments\">\n <h3>{{ '@hvy.event.log.event.comments.name' | i18n }}</h3>\n <textarea [placeholder]=\"('@hvy.event.log.event.comments.placeholder' | i18n) + '...'\"\n [(ngModel)]=\"newComentContent\"></textarea>\n <div class=\"o-hvy-events-detail__events__event__content__comments__button\">\n <button class=\"a-btn a-btn--primary\"\n [disabled]=\"newComentContent.length === 0\">{{ '@hvy.action.comment' | i18n }}\n </button>\n </div>\n </div>\n }\n }\n </div>\n </div>\n }\n </div>\n <div class=\"o-hvy-events-detail__procedure\">\n <div class=\"o-hvy-events-detail__procedure__header\">\n <h2>{{ (events.length === 1 ? '@hvy.event.log.procedure.name1' : '@hvy.event.log.procedure.name') | i18n }}</h2>\n </div>\n @if (procedure) {\n <div>\n <p>{{ procedure.name }}</p>\n </div>\n <div class=\"o-hvy-events-detail__procedure__progress\">\n <p>{{ '@hvy.event.log.procedure.progress' | i18n }}</p>\n <hvy-progress-display [progress]=\"procedure.progress\"></hvy-progress-display>\n </div>\n <div class=\"o-hvy-events-detail__procedure__actions\" (drag)=\"move($event)\" (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\">\n @for (action of procedure.actions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action\" [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\" (mousedown)=\"onMouseDown($event)\">\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox [ngModel]=\"action.status === 'DONE'\"></pry-checkbox>\n <div>{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n } @empty {\n <div>\n {{ '@hvy.event.log.procedure.noAction' | i18n }}\n </div>\n }\n </div>\n <div>\n <button class=\"a-btn a-btn--primary\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.event.log.procedure.addAction' | i18n }}\n </button>\n </div>\n } @else {\n <button class=\"a-btn a-btn--secondary\">\n {{ '@hvy.action.associate' | i18n }}\n </button>\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #confirmDialog>\n <div\n class=\"o-hvy-close-confirm__dialog\"\n aria-labelledby=\"confirm\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <h2>{{ (changeStatusContext.events.length === 1 ? '@hvy.event.close.one' : '@hvy.event.close.multi') | i18n }}</h2>\n <ul>\n @for (event of changeStatusContext.events; track event.id) {\n <li>{{ event.name }}</li>\n }\n </ul>\n <p class=\"o-hvy-close-confirm__dialog__comment-title\">\n {{ '@hvy.event.close.comment' | i18n }}<span class=\"required\">*</span>:\n </p>\n <div class=\"o-hvy-close-confirm__dialog__comment\">\n <textarea [(ngModel)]=\"changeStatusContext.comment\" class=\"a-form-field\"></textarea>\n </div>\n <div class=\"o-hvy-close-confirm__dialog__actions\">\n <button class=\"a-btn a-btn--primary\" (click)=\"confirmedClose()\"\n [disabled]=\"confirmDisabled()\">{{ '@hvy.action.validate' | i18n }}\n </button>\n <button class=\"a-btn a-btn--secondary\" (click)=\"toggleConfirm()\">{{ '@hvy.action.cancel' | i18n }}</button>\n </div>\n </div>\n</ng-template>\n" }]
510
+ }], ctorParameters: () => [{ type: EquipmentService }, { type: i1$1.Store }, { type: i3$1.Overlay }, { type: i0.ViewContainerRef }], propDecorators: { modifiedEvents: [{
457
511
  type: Output
458
512
  }], modifiedProcedure: [{
459
513
  type: Output
460
514
  }], eventErrors: [{
461
515
  type: Output
516
+ }], confirmDialog: [{
517
+ type: ViewChild,
518
+ args: ['confirmDialog', { read: TemplateRef }]
462
519
  }], events: [{
463
520
  type: Input
464
521
  }], procedure: [{
@@ -474,41 +531,43 @@ const eventInitialState = {
474
531
  loading: false,
475
532
  filters: {},
476
533
  selectedIds: [],
477
- details: {},
534
+ details: {}
478
535
  };
479
536
  const internalReducer$1 = createReducer(eventInitialState, on(EventActions.load, (state, action) => ({
480
537
  ...state,
481
- loading: true,
538
+ loading: true
482
539
  })), on(EventActions.loadSuccess, (state, { events, startingFrom }) => {
483
- return ({
540
+ return {
484
541
  ...state,
485
542
  loading: false,
486
543
  noMoreEvents: events.length < 20,
487
- events: [...state.events.slice(0, startingFrom), ...events],
488
- });
544
+ events: [...state.events.slice(0, startingFrom), ...events]
545
+ };
489
546
  }), on(EventActions.loadFailure, (state, action) => ({
490
547
  ...state,
491
548
  loading: false,
492
- events: [],
549
+ events: []
493
550
  })), on(EventActions.select, (state, { ids, cumulative }) => ({
494
551
  ...state,
495
- selectedIds: !cumulative ? ids : [...state.selectedIds, ...ids].reduce((p, c) => p.indexOf(c) === -1 ? [...p, c] : p.filter(p1 => p1 !== c), []),
552
+ selectedIds: !cumulative
553
+ ? ids
554
+ : [...state.selectedIds, ...ids].reduce((p, c) => (p.indexOf(c) === -1 ? [...p, c] : p.filter((p1) => p1 !== c)), [])
496
555
  })), on(EventActions.get, EventActions.getForProcedure, (state, _) => ({
497
556
  ...state,
498
- details: {},
557
+ details: {}
499
558
  })), on(EventActions.getSuccess, (state, { event, procedure }) => ({
500
559
  ...state,
501
- details: { event, procedure },
560
+ details: { event, procedure }
502
561
  })), on(EventActions.sort, (state, { field, order }) => ({
503
562
  ...state,
504
563
  events: [],
505
564
  noMoreEvents: false,
506
- sort: { field, order },
507
- })), on(EventActions.filter, (state, { filters }) => ({
565
+ sort: { field, order }
566
+ })), on(EventActions.filter, (state, { filters, filterSet }) => ({
508
567
  ...state,
509
568
  events: [],
510
569
  noMoreEvents: false,
511
- filters: filters,
570
+ filters: { ...state.filters, [filterSet]: filters }
512
571
  })));
513
572
  function eventReducer(state, action) {
514
573
  return internalReducer$1(state, action);
@@ -557,8 +616,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
557
616
  }] } });
558
617
 
559
618
  const EVENT_LINK = {
560
- fn: (event, store) => ['./', event.id],
619
+ fn: (event, store) => ['./', event.id]
561
620
  };
621
+ const SCROLL_PX_TO_TRIGGER_FETCH_PAGE = { value: 200 };
562
622
  class EventListComponent extends SubscriptionnerDirective {
563
623
  constructor(store, el) {
564
624
  super();
@@ -566,11 +626,11 @@ class EventListComponent extends SubscriptionnerDirective {
566
626
  this.el = el;
567
627
  this.EVENT_LINK = EVENT_LINK;
568
628
  this._store = this.store;
569
- this._inhibate = false;
629
+ this._inhibate = true;
570
630
  this.store.dispatch(EventActions.load({}));
571
631
  this.events$ = this.store.select(EventSelectors.events);
572
632
  this.selectedIds$ = this.store.select(EventSelectors.selectedIds);
573
- this.allSelected$ = combineLatest([this.events$, this.selectedIds$]).pipe(map(([events, selectedIds]) => events.filter(ev => !selectedIds.includes(ev.id)).length === 0));
633
+ this.allSelected$ = combineLatest([this.events$, this.selectedIds$]).pipe(map(([events, selectedIds]) => events.filter((ev) => !selectedIds.includes(ev.id)).length === 0));
574
634
  }
575
635
  ngAfterViewInit() {
576
636
  this.subscriptions.add(fromEvent(this.el.nativeElement, 'scroll')
@@ -579,7 +639,8 @@ class EventListComponent extends SubscriptionnerDirective {
579
639
  map((e) => {
580
640
  const target = e.currentTarget;
581
641
  return target.scrollHeight - target.offsetHeight - target.scrollTop;
582
- }), withLatestFrom(this.store.select(EventSelectors.noMoreEvents)), filter(([remaningScroll, noMore]) => !noMore && remaningScroll < 200), auditTime(200)).subscribe(() => {
642
+ }), withLatestFrom(this.store.select(EventSelectors.noMoreEvents)), filter(([remaningScroll, noMore]) => !noMore && remaningScroll < SCROLL_PX_TO_TRIGGER_FETCH_PAGE.value), auditTime(200))
643
+ .subscribe(() => {
583
644
  this.store.dispatch(EventActions.load({ next: true }));
584
645
  }));
585
646
  }
@@ -592,18 +653,18 @@ class EventListComponent extends SubscriptionnerDirective {
592
653
  selectAll($event) {
593
654
  if (!this._inhibate) {
594
655
  this.inhibate();
595
- const tmpSub = this.events$.subscribe(events => {
596
- this.store.dispatch(EventActions.select({ ids: $event ? events.map(ev => ev.id) : [], cumulative: false }));
656
+ const tmpSub = this.events$.subscribe((events) => {
657
+ this.store.dispatch(EventActions.select({ ids: $event ? events.map((ev) => ev.id) : [], cumulative: false }));
597
658
  setTimeout(() => tmpSub.unsubscribe(), 10);
598
659
  });
599
660
  }
600
661
  }
601
662
  inhibate() {
602
663
  this._inhibate = true;
603
- setTimeout(() => this._inhibate = false, 100);
664
+ setTimeout(() => (this._inhibate = false), 100);
604
665
  }
605
666
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventListComponent, deps: [{ token: i1$1.Store }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
606
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventListComponent, selector: "hvy-event-list", usesInheritance: true, ngImport: i0, template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <pry-checkbox [ngModel]=\"allSelected$|async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>{{ '@hvy.event.criticality.name' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</th>\n <th>{{ '@hvy.event.category.name' | i18n }}</th>\n <th>{{ '@hvy.event.address' | i18n }}</th>\n <th>\n <hvy-column-order field=\"creationDate\">{{ '@hvy.event.creationDate' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"lastModificationDate\">{{ '@hvy.event.lastModificationDate' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"procedureProgress\">{{ '@hvy.procedure.progress' | i18n }}</hvy-column-order>\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (event of events$|async; track event.id) {\n <tr class=\"o-hvy-events-table__line\" (click)=\"select(event, $event)\">\n <td class=\"o-hvy-events-table__line__cell\">\n <pry-checkbox [ngModel]=\"(selectedIds$|async)!.includes(event.id)\"></pry-checkbox>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">{{ event.name }}</div>\n <div\n class=\"o-hvy-events-table__line__cell__name__sub\">{{ event.equipment?.name ? event.equipment?.name : '' }}\n </div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ '@hvy.event.category.' + event.category | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.address }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.creationDate| sinceDate: { onlyLocale: true } }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.lastModificationDate | sinceDate: { onlyLocale: true } }}\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n <hvy-status-display [event]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n {{ event.procedureProgress }} %\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"EVENT_LINK.fn(event, _store)\">\n > {{ '@hvy.action.consult' | i18n }} @if (event.linkedEvents > 1) {\n ({{ event.linkedEvents }})\n }\n </a>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.event.log.empty' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "component", type: i3$1.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["event", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ColumnOrderComponent, selector: "hvy-column-order", inputs: ["field"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i10.PrySinceDatePipe, name: "sinceDate" }] }); }
667
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventListComponent, selector: "hvy-event-list", usesInheritance: true, ngImport: i0, template: "<table class=\"o-hvy-events-table\">\n <thead>\n <tr class=\"o-hvy-events-table__header\">\n <th>\n <pry-checkbox [ngModel]=\"allSelected$|async\" (ngModelChange)=\"selectAll($event)\"></pry-checkbox>\n </th>\n <th>{{ '@hvy.event.criticality.name' | i18n }}</th>\n <th>{{ '@hvy.event.name' | i18n }}</th>\n <th>{{ '@hvy.event.category.name' | i18n }}</th>\n <th>{{ '@hvy.event.address' | i18n }}</th>\n <th>\n <hvy-column-order field=\"creationDate\">{{ '@hvy.event.creationDate' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"lastModificationDate\">{{ '@hvy.event.lastModificationDate' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"status\">{{ '@hvy.event.status.name' | i18n }}</hvy-column-order>\n </th>\n <th>\n <hvy-column-order field=\"procedureProgress\">{{ '@hvy.procedure.progress' | i18n }}</hvy-column-order>\n </th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @for (event of events$|async; track event.id) {\n <tr class=\"o-hvy-events-table__line\" (click)=\"select(event, $event)\">\n <td class=\"o-hvy-events-table__line__cell\">\n <pry-checkbox [ngModel]=\"(selectedIds$|async)!.includes(event.id)\"></pry-checkbox>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n <hvy-icon-display [event]=\"event\"></hvy-icon-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <div class=\"o-hvy-events-table__line__cell__name__main\">{{ event.name }}</div>\n <div\n class=\"o-hvy-events-table__line__cell__name__sub\">{{ event.equipment?.name ? event.equipment?.name : '' }}\n </div>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">{{ '@hvy.event.category.' + event.category | i18n }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.address }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.creationDate| sinceDate: { onlyLocale: true } }}</td>\n <td class=\"o-hvy-events-table__line__cell\">{{ event.lastModificationDate | sinceDate: { onlyLocale: true } }}\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n <hvy-status-display [event]=\"event\"></hvy-status-display>\n </td>\n <td class=\"o-hvy-events-table__line__cell -centered\">\n {{ event.procedureProgress }} %\n </td>\n <td class=\"o-hvy-events-table__line__cell\">\n <a [routerLink]=\"EVENT_LINK.fn(event, _store)\">\n > {{ '@hvy.action.consult' | i18n }} @if (event.linkedEvents > 1) {\n ({{ event.linkedEvents }})\n }\n </a>\n </td>\n </tr>\n } @empty {\n <tr>\n <td class=\"o-hvy-events-table__empty\" colspan=\"50\">\n <div>{{ '@hvy.event.log.empty' | i18n }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n </td>\n </tr>\n }\n </tbody>\n</table>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: IconDisplayComponent, selector: "hvy-icon-display", inputs: ["event"] }, { kind: "component", type: StatusDisplayComponent, selector: "hvy-status-display", inputs: ["event", "modifiable"], outputs: ["modified"] }, { kind: "component", type: ColumnOrderComponent, selector: "hvy-column-order", inputs: ["field"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i10.PrySinceDatePipe, name: "sinceDate" }] }); }
607
668
  }
608
669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventListComponent, decorators: [{
609
670
  type: Component,
@@ -614,30 +675,43 @@ class EventFiltersComponent extends SubscriptionnerDirective {
614
675
  constructor(store) {
615
676
  super();
616
677
  this.store = store;
678
+ this.filterSet = 'global';
679
+ }
680
+ ngAfterViewInit() {
681
+ this.filters.forEach((filter) => (filter.filterSet = this.filterSet));
617
682
  }
618
683
  filter() {
619
- const filters = this.filters.map(filter => filter.getParams())
620
- .reduce((p, c) => ({ ...p, ...c }), {});
621
- this.store.dispatch(EventActions.filter({ filters }));
684
+ const filters = this.filters.map((filter) => filter.getParams()).reduce((p, c) => ({ ...p, ...c }), {});
685
+ this.store.dispatch(EventActions.filter({ filters, filterSet: this.filterSet }));
622
686
  }
623
687
  reset() {
624
- this.filters.forEach(filter => filter.reset());
625
- this.store.dispatch(EventActions.filter({ filters: {} }));
688
+ this.filters.forEach((filter) => filter.reset());
689
+ this.store.dispatch(EventActions.filter({ filters: {}, filterSet: this.filterSet }));
626
690
  }
627
691
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventFiltersComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
628
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: EventFiltersComponent, selector: "hvy-event-filters", queries: [{ propertyName: "filters", predicate: ["filter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-filters\">\n <ng-content></ng-content>\n <div class=\"o-hvy-event-filters__buttons\">\n <button (click)=\"reset()\" class=\"a-btn a-btn--secondary\">\n <pry-icon iconSvg=\"reset_filter_event\"></pry-icon>\n </button>\n <button (click)=\"filter()\" class=\"a-btn a-btn--primary\">\n {{ '@hvy.event.filter.name' | i18n }}\n <pry-icon iconSvg=\"event_filter\"></pry-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
692
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: EventFiltersComponent, selector: "hvy-event-filters", inputs: { filterSet: "filterSet" }, queries: [{ propertyName: "filters", predicate: ["filter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-filters\">\n <ng-content></ng-content>\n <div class=\"o-hvy-event-filters__buttons\">\n <button (click)=\"reset()\" class=\"a-btn a-btn--secondary\">\n <pry-icon iconSvg=\"reset_filter_event\"></pry-icon>\n </button>\n <button (click)=\"filter()\" class=\"a-btn a-btn--primary\">\n {{ '@hvy.event.filter.name' | i18n }}\n <pry-icon iconSvg=\"event_filter\"></pry-icon>\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
629
693
  }
630
694
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventFiltersComponent, decorators: [{
631
695
  type: Component,
632
696
  args: [{ selector: 'hvy-event-filters', template: "<div class=\"o-hvy-event-filters\">\n <ng-content></ng-content>\n <div class=\"o-hvy-event-filters__buttons\">\n <button (click)=\"reset()\" class=\"a-btn a-btn--secondary\">\n <pry-icon iconSvg=\"reset_filter_event\"></pry-icon>\n </button>\n <button (click)=\"filter()\" class=\"a-btn a-btn--primary\">\n {{ '@hvy.event.filter.name' | i18n }}\n <pry-icon iconSvg=\"event_filter\"></pry-icon>\n </button>\n </div>\n</div>\n" }]
633
- }], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { filters: [{
697
+ }], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { filterSet: [{
698
+ type: Input
699
+ }], filters: [{
634
700
  type: ContentChildren,
635
701
  args: ['filter', { descendants: true }]
636
702
  }] } });
637
703
 
638
704
  class HvyUnitFilterComponent extends SubscriptionnerDirective {
705
+ set filterSet(filterSet) {
706
+ this._filterSet$.next(filterSet);
707
+ }
708
+ get filterSet() {
709
+ return this._filterSet$.value;
710
+ }
639
711
  constructor() {
640
712
  super();
713
+ this.prop = 'no-prop-defined';
714
+ this._filterSet$ = new BehaviorSubject('global');
641
715
  }
642
716
  getParams() {
643
717
  throw new Error('Must use sub implementation');
@@ -645,16 +719,24 @@ class HvyUnitFilterComponent extends SubscriptionnerDirective {
645
719
  reset() {
646
720
  throw new Error('Must use sub implementation');
647
721
  }
722
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HvyUnitFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
723
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.3", type: HvyUnitFilterComponent, inputs: { prop: "prop", filterSet: "filterSet" }, usesInheritance: true, ngImport: i0 }); }
648
724
  }
725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: HvyUnitFilterComponent, decorators: [{
726
+ type: Directive
727
+ }], ctorParameters: () => [], propDecorators: { prop: [{
728
+ type: Input
729
+ }], filterSet: [{
730
+ type: Input
731
+ }] } });
649
732
 
650
733
  class DateFilterComponent extends HvyUnitFilterComponent {
651
734
  constructor(store) {
652
735
  super();
653
736
  this.store = store;
654
- this.prop = 'no-prop-defined';
655
737
  this.value = '';
656
- this.subscriptions.add(this.store.select(EventSelectors.filters).subscribe(filters => {
657
- this.value = filters[this.prop] ? (filters[this.prop][0] ?? '') : '';
738
+ this.subscriptions.add(combineLatest([this.store.select(EventSelectors.filters), this._filterSet$]).subscribe(([filters, filterSet]) => {
739
+ this.value = (filters[filterSet] ?? {})[this.prop] ? (filters[filterSet] ?? {})[this.prop][0] ?? '' : '';
658
740
  }));
659
741
  }
660
742
  getParams() {
@@ -671,14 +753,12 @@ class DateFilterComponent extends HvyUnitFilterComponent {
671
753
  this.value = $event instanceof Event ? $event.target?.value : $event;
672
754
  }
673
755
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DateFilterComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
674
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: DateFilterComponent, selector: "hvy-date-filter", inputs: { prop: "prop" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }); }
756
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.3", type: DateFilterComponent, selector: "hvy-date-filter", providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }); }
675
757
  }
676
758
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DateFilterComponent, decorators: [{
677
759
  type: Component,
678
760
  args: [{ selector: 'hvy-date-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => DateFilterComponent) }], template: "<div class=\"o-hvy-date-filters\">\n <input type=\"date\" class=\"a-form-field\"\n [value]=\"value\"\n (change)=\"triggerChange($event)\">\n</div>\n" }]
679
- }], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { prop: [{
680
- type: Input
681
- }] } });
761
+ }], ctorParameters: () => [{ type: i1$1.Store }] });
682
762
 
683
763
  class ChoiceFilterComponent extends HvyUnitFilterComponent {
684
764
  static { this.idCounter = 0; }
@@ -690,12 +770,10 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
690
770
  this.i18nService = i18nService;
691
771
  this.ref = ref;
692
772
  this.id = -1;
693
- this.prop = 'no-prop-defined';
694
773
  this.label = 'no-label-defined';
695
774
  this.i18nPrefix = '';
696
775
  this.value = signal([]);
697
776
  this.choices = [];
698
- this.inhibate = false;
699
777
  this.displayValue = computed(() => {
700
778
  if (this.allSelected()) {
701
779
  return this.i18nService.instant('@hvy.event.filter.choice.all');
@@ -711,9 +789,12 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
711
789
  this.id = ChoiceFilterComponent.idCounter++;
712
790
  }
713
791
  ngAfterViewInit() {
714
- this.subscriptions.add(this.store.select(EventSelectors.filters).subscribe(filters => {
715
- this.assignValue(filters.hasOwnProperty(this.prop) ?
716
- filters[this.prop].length === 1 && filters[this.prop][0] === '' ? [] : filters[this.prop] : this.allValues());
792
+ this.subscriptions.add(combineLatest([this.store.select(EventSelectors.filters), this._filterSet$]).subscribe(([filters, filterSet]) => {
793
+ this.assignValue((filters[filterSet] ?? {}).hasOwnProperty(this.prop)
794
+ ? filters[filterSet][this.prop].length === 1 && filters[filterSet][this.prop][0] === ''
795
+ ? []
796
+ : filters[filterSet][this.prop]
797
+ : this.allValues());
717
798
  }));
718
799
  }
719
800
  getParams() {
@@ -731,7 +812,7 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
731
812
  this.overlayRef = this.overlay.create(new OverlayConfig({
732
813
  hasBackdrop: true,
733
814
  backdropClass: 'backdrop',
734
- panelClass: ['m-context-menu-wrapper', 'o-choice-filter-popup'],
815
+ panelClass: ['m-context-menu-wrapper', 'o-choice-filter-popup']
735
816
  }));
736
817
  this.overlayRef.backdropClick().subscribe(() => this.toggleModal());
737
818
  this.overlayRef.attach(new TemplatePortal(this.template, this.viewContainerRef));
@@ -757,49 +838,47 @@ class ChoiceFilterComponent extends HvyUnitFilterComponent {
757
838
  }
758
839
  toggle(elt) {
759
840
  const isSelected = this.isSelected(elt);
760
- const eltSubKeys = !elt.children ? [elt.key] : elt.children.map(ch => ch.key);
841
+ const eltSubKeys = !elt.children ? [elt.key] : elt.children.map((ch) => ch.key);
761
842
  if (!isSelected) {
762
843
  this.assignValue([...new Set([...this.value(), ...eltSubKeys])]);
763
844
  }
764
845
  else {
765
- this.assignValue(this.value().filter(v => !eltSubKeys.includes(v)));
846
+ this.assignValue(this.value().filter((v) => !eltSubKeys.includes(v)));
766
847
  }
767
848
  }
768
849
  allSelected() {
769
- return this.choices.map(choice => this.isSelected(choice)).reduce((p, c) => p && c, true);
850
+ return this.choices.map((choice) => this.isSelected(choice)).reduce((p, c) => p && c, true);
770
851
  }
771
852
  isSelected(choice) {
772
853
  if (!choice.children) {
773
854
  return this.value().includes(choice.key);
774
855
  }
775
856
  else {
776
- return choice.children.map(child => this.isSelected(child)).reduce((p, c) => p && c, true);
857
+ return choice.children.map((child) => this.isSelected(child)).reduce((p, c) => p && c, true);
777
858
  }
778
859
  }
779
860
  allValues() {
780
861
  return this.choices
781
- .map(choice => !choice.children ? [choice.key] : choice.children.map(child => child.key))
862
+ .map((choice) => (!choice.children ? [choice.key] : choice.children.map((child) => child.key)))
782
863
  .reduce((p, c) => [...p, ...c], []);
783
864
  }
784
865
  assignValue(value) {
785
- if (!this.inhibate) {
866
+ if (!this.inhibate || this.inhibate !== this.filterSet) {
786
867
  this.triggerInhibate();
787
868
  this.value.set(value);
788
869
  }
789
870
  }
790
871
  triggerInhibate() {
791
- this.inhibate = true;
792
- setTimeout(() => this.inhibate = false, 50);
872
+ this.inhibate = this.filterSet;
873
+ setTimeout(() => (this.inhibate = undefined), 50);
793
874
  }
794
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ChoiceFilterComponent, deps: [{ token: i1$1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: i3.PryI18nService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
795
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: { prop: "prop", label: "label", i18nPrefix: "i18nPrefix", choices: "choices" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }}:</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"manage-account\"\n tabindex=\"-1\"\n id=\"account-menu\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i3$1.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
875
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ChoiceFilterComponent, deps: [{ token: i1$1.Store }, { token: i3$1.Overlay }, { token: i0.ViewContainerRef }, { token: i3.PryI18nService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
876
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: ChoiceFilterComponent, selector: "hvy-choice-filter", inputs: { label: "label", i18nPrefix: "i18nPrefix", choices: "choices" }, providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, read: TemplateRef }], usesInheritance: true, ngImport: i0, template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }} :</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"choice\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
796
877
  }
797
878
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ChoiceFilterComponent, decorators: [{
798
879
  type: Component,
799
- args: [{ selector: 'hvy-choice-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }}:</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"manage-account\"\n tabindex=\"-1\"\n id=\"account-menu\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n" }]
800
- }], ctorParameters: () => [{ type: i1$1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: i3.PryI18nService }, { type: i0.ElementRef }], propDecorators: { prop: [{
801
- type: Input
802
- }], label: [{
880
+ args: [{ selector: 'hvy-choice-filter', providers: [{ provide: HvyUnitFilterComponent, useExisting: forwardRef(() => ChoiceFilterComponent) }], template: "<button (click)=\"toggleModal()\" #button class=\"o-hvy-choice-filter -horizontal\"\n [class.-highlight]=\"displayValue() !== ('@hvy.event.filter.choice.all' | i18n)\" [class.-focus]=\"overlayRef\">\n <div class=\"o-hvy-choice-filter__choice-value\">\n <span class=\"o-hvy-choice-filter__label\">{{ label | i18n }} :</span>\n <span class=\"o-hvy-choice-filter__value\" type=\"text\" id=\"select_{{id}}\">{{ displayValue() }}</span>\n </div>\n <pry-icon [iconSvg]=\"!!overlayRef ? 'chevron_top' : 'chevron_bottom'\" [width]=\"10\" [height]=\"10\"></pry-icon>\n</button>\n\n<ng-template #template>\n <div\n class=\"m-context-menu o-hvy-choice-filter\"\n aria-labelledby=\"choice\"\n tabindex=\"-1\"\n id=\"choice\"\n role=\"menu\"\n aria-modal=\"true\"\n >\n <div class=\"o-hvy-choice-filter__all\">\n <pry-checkbox [ngModel]=\"allSelected()\" (ngModelChange)=\"clickAll()\">\n <span>{{ '@hvy.event.filter.choice.all' | i18n }}</span>\n </pry-checkbox>\n </div>\n @for (elt of choices; track elt.key) {\n @if (!elt.children) {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n } @else {\n <pry-checkbox [ngModel]=\"isSelected(elt)\" (ngModelChange)=\"toggle(elt)\" class=\"o-hvy-choice-filter__root\">\n <span>{{ i18nPrefix + elt.key | i18n }}</span>\n </pry-checkbox>\n @for (child of elt.children; track child.key) {\n <pry-checkbox [ngModel]=\"isSelected(child)\" (ngModelChange)=\"toggle(child)\"\n class=\"o-hvy-choice-filter__child\">\n <span>{{ i18nPrefix + child.key | i18n }}</span>\n </pry-checkbox>\n }\n }\n }\n </div>\n</ng-template>\n" }]
881
+ }], ctorParameters: () => [{ type: i1$1.Store }, { type: i3$1.Overlay }, { type: i0.ViewContainerRef }, { type: i3.PryI18nService }, { type: i0.ElementRef }], propDecorators: { label: [{
803
882
  type: Input
804
883
  }], i18nPrefix: [{
805
884
  type: Input
@@ -855,6 +934,81 @@ const HypEventStatus = {
855
934
  values: ['NEW', 'IN_PROGRESS', 'DONE'],
856
935
  };
857
936
 
937
+ const eventForWriteAPI = (event) => ({
938
+ ...event,
939
+ equipmentId: event.equipment?.id
940
+ });
941
+
942
+ const procedureForWriteAPI = (procedure) => ({
943
+ ...procedure,
944
+ events: procedure.events.map(eventForWriteAPI)
945
+ });
946
+
947
+ const PAGE_SIZE_FETCH = { value: 20 };
948
+ const KNOWN_FILTER_SETS = {
949
+ EVENTS: 'events'
950
+ };
951
+ class EventService {
952
+ constructor(httpClient, store) {
953
+ this.httpClient = httpClient;
954
+ this.store = store;
955
+ }
956
+ list(startWith = 0, pageSize = PAGE_SIZE_FETCH.value) {
957
+ return this.store.select(HypSelectors.url).pipe(withLatestFrom(this.store.select(EventSelectors.filters), this.store.select(EventSelectors.sort)), mergeMap(([url, filterSets, sort]) => {
958
+ const filters = filterSets[KNOWN_FILTER_SETS.EVENTS] ?? {};
959
+ let params = new HttpParams();
960
+ Object.keys(filters).forEach((filter) => {
961
+ filters[filter].forEach((filterValue) => {
962
+ params = params.append(filter, filterValue);
963
+ });
964
+ });
965
+ params = params.set('page', startWith / pageSize + 1);
966
+ if (sort) {
967
+ params = params.set('sort', sort.field).set('order', sort.order);
968
+ }
969
+ return this.httpClient.get(encodeURI(`${url}/events`), { params });
970
+ }));
971
+ }
972
+ get(id) {
973
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
974
+ return this.httpClient.get(encodeURI(`${url}/events/id/${id}`));
975
+ }));
976
+ }
977
+ getProcedure(id) {
978
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
979
+ return this.httpClient.get(encodeURI(`${url}/procedures/id/${id}`));
980
+ }));
981
+ }
982
+ save(event) {
983
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
984
+ return this.httpClient.post(encodeURI(`${url}/events/${event.type.toLowerCase()}`), eventForWriteAPI(event));
985
+ }));
986
+ }
987
+ saveProcedure(procedure) {
988
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
989
+ return this.httpClient.post(encodeURI(`${url}/procedures`), procedureForWriteAPI(procedure));
990
+ }));
991
+ }
992
+ status(event, status, comment) {
993
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
994
+ return this.httpClient.put(encodeURI(`${url}/events/id/${event.id}/close`), { status, comment });
995
+ }));
996
+ }
997
+ statusProcedure(procedure, status, comment) {
998
+ return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
999
+ return this.httpClient.put(encodeURI(`${url}/procedures/id/${procedure.id}/close`), { status, comment });
1000
+ }));
1001
+ }
1002
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, deps: [{ token: i1.HttpClient }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
1003
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, providedIn: 'root' }); }
1004
+ }
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, decorators: [{
1006
+ type: Injectable,
1007
+ args: [{
1008
+ providedIn: 'root'
1009
+ }]
1010
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Store }] });
1011
+
858
1012
  class EventSummaryItemComponent {
859
1013
  constructor(store) {
860
1014
  this.store = store;
@@ -889,8 +1043,8 @@ class EventSummaryListComponent {
889
1043
  this.itemLinkBase = this.itemLinkBase.length > 0 ? this.itemLinkBase : ['events'];
890
1044
  }
891
1045
  filterAndRoute(status) {
892
- this.router.navigate([...this.consultLink]);
893
- this.store.dispatch(EventActions.filter({ filters: { status: [status] } }));
1046
+ this.router.navigate([...this.consultLink], { queryParams: { status: this.status } });
1047
+ this.store.dispatch(EventActions.filter({ filters: { status: [status] }, filterSet: KNOWN_FILTER_SETS.EVENTS }));
894
1048
  }
895
1049
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryListComponent, deps: [{ token: i1$1.Store }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
896
1050
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventSummaryListComponent, selector: "hvy-event-summary-list", inputs: { events: "events", totalEventCount: "totalEventCount", status: "status", consultLink: "consultLink", itemLinkBase: "itemLinkBase" }, ngImport: i0, template: "<div class=\"o-hvy-event-summary-list -hvy-{{status.toLowerCase()}}\">\n <div class=\"o-hvy-event-summary-list__header\">\n <h3 class=\"o-hvy-event-summary-list__title\">\n {{ '@hvy.eventSummary.statusLabels.' + status | i18n }}\n </h3>\n <span class=\"o-hvy-event-summary-list__counter\">\n {{ totalEventCount }}\n </span>\n </div>\n <div class=\"o-hvy-event-summary-list__content\">\n @for (event of events;track event.id) {\n <hvy-event-summary-item\n [event]=\"event\"\n [linkBase]=\"itemLinkBase\">\n </hvy-event-summary-item>\n } @empty {\n <span class=\"o-hvy-event-summary-list__no-content\">\n {{ '@hvy.eventSummary.noContent' | i18n }}\n </span>\n }\n </div>\n <div class=\"o-hvy-event-summary-list__footer\">\n <a class=\"o-hvy-event-summary-list__footer-button\" (click)=\"filterAndRoute(status)\">\n > {{ '@hvy.action.consult' | i18n }}\n <pry-icon iconSvg=\"arrow\"></pry-icon>\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: EventSummaryItemComponent, selector: "hvy-event-summary-item", inputs: ["event", "linkBase"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
@@ -919,25 +1073,31 @@ class EventSummaryPageComponent extends SubscriptionnerDirective {
919
1073
  this.summaries = {
920
1074
  NEW: { events: [], count: 0 },
921
1075
  IN_PROGRESS: { events: [], count: 0 },
922
- DONE: { events: [], count: 0 },
1076
+ DONE: { events: [], count: 0 }
923
1077
  };
924
1078
  this.criticalityList = [...HypEventStatus.values, 'ALL'];
925
1079
  this.criticalityOrder = (a, b) => {
926
1080
  return this.criticalityList.indexOf(a.key) - this.criticalityList.indexOf(b.key);
927
1081
  };
928
1082
  this.store.dispatch(EventSummaryActions.load());
929
- this.selectedCriticality$ = this.store.select(EventSelectors.filters).pipe(map$1((filters) => filters['criticality']?.[0] ?? 'ALL'));
1083
+ this.selectedCriticality$ = this.store
1084
+ .select(EventSelectors.filters)
1085
+ .pipe(map$1((filters) => (filters[KNOWN_FILTER_SETS.EVENTS] ?? {})['criticality']?.[0] ?? 'ALL'));
930
1086
  this.subscriptions.add(this.store.select(EventSummarySelectors.summaries).subscribe((summaries) => {
931
1087
  this.summaries = summaries;
932
1088
  }));
933
1089
  }
934
1090
  filterByCriticality($event) {
935
- $event === 'ALL' ? this.store.dispatch(EventActions.filter({ filters: { criticality: [] } })) :
936
- this.store.dispatch(EventActions.filter({ filters: { criticality: [$event] } }));
1091
+ $event === 'ALL'
1092
+ ? this.store.dispatch(EventActions.filter({ filters: { criticality: [] }, filterSet: KNOWN_FILTER_SETS.EVENTS }))
1093
+ : this.store.dispatch(EventActions.filter({
1094
+ filters: { criticality: [$event] },
1095
+ filterSet: KNOWN_FILTER_SETS.EVENTS
1096
+ }));
937
1097
  this.store.dispatch(EventSummaryActions.load());
938
1098
  }
939
1099
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryPageComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
940
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-summary-page\">\n <div class=\"o-hvy-event-summary-page__header\">\n @if (pageTitle) {\n <h3 class=\"o-hvy-event-summary-page__title\">{{ pageTitle }}</h3>\n }\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\">\n <label class=\"a-label m-filter__label\" for=\"criticality-filter\">{{ '@hvy.event.criticality.name' | i18n }}\n :&nbsp;</label>\n <pry-select\n id=\"criticality-filter\"\n class=\"o-hvy-event-summary-page__filter\"\n [items]=\"criticalityList\"\n [ngModel]=\"selectedCriticality$ | async\"\n (ngModelChange)=\"filterByCriticality($event)\"\n [translate]=\"true\"\n i18nPrefix=\"@hvy.eventSummary.criticalityLabels.\"\n >\n </pry-select>\n </div>\n </div>\n <div class=\"o-hvy-event-summary-page__content\">\n <div class=\"o-hvy-event-summary-page__content__sub\">\n @for (summaryList of summaries | keyvalue: criticalityOrder;track summaryList.key) {\n <hvy-event-summary-list\n class=\"o-hvy-event-summary-page__summary-list\"\n [status]=\"summaryList.key\"\n [totalEventCount]=\"summaryList.value.count\"\n [events]=\"summaryList.value.events\"\n [consultLink]=\"consultLink\">\n </hvy-event-summary-list>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.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: EventSummaryListComponent, selector: "hvy-event-summary-list", inputs: ["events", "totalEventCount", "status", "consultLink", "itemLinkBase"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.KeyValuePipe, name: "keyvalue" }] }); }
1100
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.3", type: EventSummaryPageComponent, selector: "hvy-event-summary-page", inputs: { pageTitle: "pageTitle", consultLink: "consultLink" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-event-summary-page\">\n <div class=\"o-hvy-event-summary-page__header\">\n @if (pageTitle) {\n <h3 class=\"o-hvy-event-summary-page__title\">{{ pageTitle }}</h3>\n }\n <div class=\"m-filter__input-wrapper m-filter__input-wrapper--dropdown\">\n <label class=\"a-label m-filter__label\" for=\"criticality-filter\">{{ '@hvy.event.criticality.name' | i18n }}\n :&nbsp;</label>\n <pry-select\n id=\"criticality-filter\"\n class=\"o-hvy-event-summary-page__filter\"\n [items]=\"criticalityList\"\n [ngModel]=\"selectedCriticality$ | async\"\n (ngModelChange)=\"filterByCriticality($event)\"\n [translate]=\"true\"\n i18nPrefix=\"@hvy.eventSummary.criticalityLabels.\"\n >\n </pry-select>\n </div>\n </div>\n <div class=\"o-hvy-event-summary-page__content\">\n <div class=\"o-hvy-event-summary-page__content__sub\">\n @for (summaryList of summaries | keyvalue: criticalityOrder;track summaryList.key) {\n <hvy-event-summary-list\n class=\"o-hvy-event-summary-page__summary-list\"\n [status]=\"summaryList.key\"\n [totalEventCount]=\"summaryList.value.count\"\n [events]=\"summaryList.value.events\"\n [consultLink]=\"consultLink\">\n </hvy-event-summary-list>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.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: EventSummaryListComponent, selector: "hvy-event-summary-list", inputs: ["events", "totalEventCount", "status", "consultLink", "itemLinkBase"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }, { kind: "pipe", type: i1$2.KeyValuePipe, name: "keyvalue" }] }); }
941
1101
  }
942
1102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventSummaryPageComponent, decorators: [{
943
1103
  type: Component,
@@ -958,13 +1118,13 @@ const enTranslations = {
958
1118
  name: 'Event type',
959
1119
  ALERT: 'Alert',
960
1120
  REPORT: 'Report',
961
- OPERATOR: 'Operator',
1121
+ OPERATOR: 'Operator'
962
1122
  },
963
1123
  status: {
964
1124
  name: 'Status',
965
1125
  NEW: 'Open',
966
1126
  IN_PROGRESS: 'In progress',
967
- DONE: 'Done',
1127
+ DONE: 'Done'
968
1128
  },
969
1129
  address: 'Address',
970
1130
  source: 'External reference',
@@ -978,7 +1138,7 @@ const enTranslations = {
978
1138
  creationDate: 'Creation date',
979
1139
  lastModificationDate: 'Modification date',
980
1140
  closeDate: 'Close date',
981
- detail: "Events description",
1141
+ detail: 'Events description',
982
1142
  log: {
983
1143
  name: 'Events log',
984
1144
  event: {
@@ -989,8 +1149,8 @@ const enTranslations = {
989
1149
  category: 'Category',
990
1150
  comments: {
991
1151
  name: 'Event comments',
992
- placeholder: 'Write your comment',
993
- },
1152
+ placeholder: 'Write your comment'
1153
+ }
994
1154
  },
995
1155
  procedure: {
996
1156
  delete: 'Delete procedure',
@@ -998,28 +1158,32 @@ const enTranslations = {
998
1158
  noAction: 'No actions',
999
1159
  name: 'Common procedure',
1000
1160
  addAction: 'Add action'
1001
- },
1161
+ }
1002
1162
  },
1003
1163
  category: {
1004
- name: "Event category",
1164
+ name: 'Event category',
1005
1165
  ALERT_MALFUNCTION: 'Dysfunction alert',
1006
1166
  REPORT: 'GRC report',
1007
1167
  OPERATOR_EVENT: 'Operator event',
1008
1168
  ALERT_LIMIT: 'Limit alert',
1009
- MANIFESTATION: 'Manifestation',
1169
+ MANIFESTATION: 'Manifestation'
1010
1170
  },
1011
1171
  criticality: {
1012
1172
  name: 'Criticality',
1013
1173
  LOW: 'Low',
1014
1174
  MEDIUM: 'Middle',
1015
- HIGH: 'High',
1175
+ HIGH: 'High'
1016
1176
  },
1017
1177
  filter: {
1018
1178
  name: 'Filter',
1019
1179
  choice: {
1020
- all: "All"
1180
+ all: 'All'
1021
1181
  },
1022
1182
  reset: 'Reset'
1183
+ },
1184
+ close: {
1185
+ one: 'Close event',
1186
+ multi: 'Close events'
1023
1187
  }
1024
1188
  },
1025
1189
  eventSummary: {
@@ -1027,26 +1191,29 @@ const enTranslations = {
1027
1191
  statusLabels: {
1028
1192
  NEW: 'Open',
1029
1193
  IN_PROGRESS: 'In progress',
1030
- DONE: 'Done',
1194
+ DONE: 'Done'
1031
1195
  },
1032
1196
  criticalityLabels: {
1033
1197
  LOW: 'Low',
1034
1198
  MEDIUM: 'Medium',
1035
1199
  HIGH: 'High',
1036
- ALL: 'All',
1037
- },
1200
+ ALL: 'All'
1201
+ }
1038
1202
  },
1039
1203
  procedure: {
1040
1204
  name: 'Procedure',
1041
- progress: 'Procedure progress %',
1205
+ progress: 'Procedure progress %'
1042
1206
  },
1043
1207
  action: {
1044
1208
  consult: 'Consult',
1045
1209
  close: 'Close',
1046
1210
  send: 'Send',
1047
- comment: 'Comment'
1048
- },
1049
- },
1211
+ comment: 'Comment',
1212
+ associate: 'Link to procedure',
1213
+ validate: 'Validate',
1214
+ cancel: 'Cancel'
1215
+ }
1216
+ }
1050
1217
  };
1051
1218
 
1052
1219
  const frTranslations = {
@@ -1054,33 +1221,33 @@ const frTranslations = {
1054
1221
  event: {
1055
1222
  name: 'Événements',
1056
1223
  type: {
1057
- name: 'Type d\'événement',
1224
+ name: "Type d'événement",
1058
1225
  ALERT: 'Alerte',
1059
1226
  REPORT: 'Signalement',
1060
- OPERATOR: 'Opérateur',
1227
+ OPERATOR: 'Opérateur'
1061
1228
  },
1062
1229
  status: {
1063
1230
  name: 'Statut événement',
1064
1231
  NEW: 'Nouveau',
1065
1232
  IN_PROGRESS: 'En cours',
1066
- DONE: 'Clôturé',
1233
+ DONE: 'Clôturé'
1067
1234
  },
1068
1235
  address: 'Adresse',
1069
1236
  source: 'Référence externe',
1070
1237
  equipment: 'Référence matériel',
1071
- equipmentEntity: 'Entité de l\'équipement',
1238
+ equipmentEntity: "Entité de l'équipement",
1072
1239
  domain: {
1073
- name: 'Métier',
1240
+ name: 'Métier'
1074
1241
  },
1075
1242
  startDate: 'Date de début',
1076
1243
  endDate: 'Date de fin',
1077
1244
  creationDate: 'Date de création',
1078
- lastModificationDate: 'Date dernières modifications',
1245
+ lastModificationDate: 'Date de dernière modification',
1079
1246
  closeDate: 'Date de clotûre',
1080
1247
  detail: 'Description des événements',
1081
1248
  log: {
1082
1249
  name: 'Journal des événements',
1083
- empty: 'Aucun événement n\'a été créé',
1250
+ empty: "Aucun événement n'a été créé",
1084
1251
  event: {
1085
1252
  description: 'Description',
1086
1253
  address: 'Adresse',
@@ -1088,160 +1255,84 @@ const frTranslations = {
1088
1255
  name: 'Nom',
1089
1256
  category: 'Catégorie',
1090
1257
  close: 'Clôturer tous ces événements',
1258
+ closed: 'Tous clôturés',
1091
1259
  comments: {
1092
- name: 'Commentaires de l\'événement',
1093
- placeholder: 'Écrivez votre commentaire',
1094
- },
1260
+ name: "Commentaires de l'événement",
1261
+ placeholder: 'Écrivez votre commentaire'
1262
+ }
1095
1263
  },
1096
1264
  procedure: {
1097
1265
  delete: 'Supprimer la procédure',
1098
1266
  progress: 'Progression',
1099
- noAction: 'Pas d\'action',
1267
+ noAction: "Pas d'action",
1100
1268
  name: 'Procédure commune',
1101
1269
  name1: 'Procédure',
1102
- addAction: 'Ajouter une action',
1103
- },
1270
+ addAction: 'Ajouter une action'
1271
+ }
1104
1272
  },
1105
1273
  category: {
1106
- name: 'Catégorie d\'événement',
1274
+ name: "Catégorie d'événement",
1107
1275
  ALERT_MALFUNCTION: 'Alerte Dysfonctionnement',
1108
1276
  REPORT: 'Signalement GRC',
1109
1277
  OPERATOR_EVENT: 'Evènement Opérateur',
1110
1278
  ALERT_LIMIT: 'Alerte Seuil',
1111
- MANIFESTATION: 'Manifestation',
1279
+ MANIFESTATION: 'Manifestation'
1112
1280
  },
1113
1281
  criticality: {
1114
1282
  name: 'Criticité',
1115
1283
  LOW: 'Bas',
1116
1284
  MEDIUM: 'Moyen',
1117
- HIGH: 'Haut',
1285
+ HIGH: 'Haut'
1118
1286
  },
1119
1287
  filter: {
1120
1288
  name: 'Filtrer',
1121
1289
  choice: {
1122
- all: 'Tous',
1290
+ all: 'Tous'
1123
1291
  },
1124
1292
  reset: 'Réinitialiser'
1125
1293
  },
1294
+ close: {
1295
+ one: 'Êtes-vous sûr de vouloir clôturer cet événement ?',
1296
+ multi: 'Êtes-vous sûr de vouloir clôturer ces événements ?',
1297
+ comment: 'Commentaire de clôture'
1298
+ }
1126
1299
  },
1127
1300
  eventSummary: {
1128
1301
  noContent: 'Aucun événement avec la criticité donnée',
1129
1302
  statusLabels: {
1130
1303
  NEW: 'Nouveaux',
1131
1304
  IN_PROGRESS: 'En cours',
1132
- DONE: 'Clôturés',
1305
+ DONE: 'Clôturés'
1133
1306
  },
1134
1307
  criticalityLabels: {
1135
1308
  LOW: 'Bas',
1136
1309
  MEDIUM: 'Moyen',
1137
1310
  HIGH: 'Haut',
1138
- ALL: 'Tous',
1139
- },
1311
+ ALL: 'Tous'
1312
+ }
1140
1313
  },
1141
1314
  procedure: {
1142
1315
  name: 'Procédure',
1143
- progress: '% avancement procédure',
1316
+ progress: '% avancement procédure'
1144
1317
  },
1145
1318
  action: {
1146
1319
  consult: 'Consulter',
1147
1320
  close: 'Clotûrer',
1148
1321
  send: 'Envoyer',
1149
1322
  comment: 'Commenter',
1150
- },
1151
- },
1323
+ associate: 'Associer à une procédure',
1324
+ validate: 'Valider',
1325
+ cancel: 'Annuler'
1326
+ }
1327
+ }
1152
1328
  };
1153
1329
 
1154
- const eventForWriteAPI = (event) => ({
1155
- ...event,
1156
- equipmentId: event.equipment?.id
1157
- });
1158
-
1159
1330
  const HypEventType = { values: ['ALERT', 'REPORT', 'OPERATOR'] };
1160
1331
 
1161
- const procedureForWriteAPI = (procedure) => ({
1162
- ...procedure,
1163
- events: procedure.events.map(eventForWriteAPI)
1164
- });
1165
-
1166
1332
  /*
1167
1333
  * Public API Surface of hypervisor
1168
1334
  */
1169
1335
 
1170
- class EventService {
1171
- constructor(httpClient, store) {
1172
- this.httpClient = httpClient;
1173
- this.store = store;
1174
- }
1175
- list(startWith = 0) {
1176
- return this.store
1177
- .select(HypSelectors.url)
1178
- .pipe(withLatestFrom(this.store.select(EventSelectors.filters), this.store.select(EventSelectors.sort)), mergeMap(([url, filters, sort]) => {
1179
- let params = new HttpParams();
1180
- Object.keys(filters).forEach(filter => {
1181
- filters[filter].forEach((filterValue) => {
1182
- params = params.append(filter, filterValue);
1183
- });
1184
- });
1185
- const pageSize = 20;
1186
- params = params.set('page', (startWith / pageSize) + 1);
1187
- if (sort) {
1188
- params = params.set('sort', sort.field).set('order', sort.order);
1189
- }
1190
- return this.httpClient.get(encodeURI(`${url}/events`), { params });
1191
- }));
1192
- }
1193
- get(id) {
1194
- return this.store
1195
- .select(HypSelectors.url)
1196
- .pipe(mergeMap((url) => {
1197
- return this.httpClient.get(encodeURI(`${url}/events/id/${id}`));
1198
- }));
1199
- }
1200
- getProcedure(id) {
1201
- return this.store
1202
- .select(HypSelectors.url)
1203
- .pipe(mergeMap((url) => {
1204
- return this.httpClient.get(encodeURI(`${url}/procedures/id/${id}`));
1205
- }));
1206
- }
1207
- save(event) {
1208
- return this.store
1209
- .select(HypSelectors.url)
1210
- .pipe(mergeMap((url) => {
1211
- return this.httpClient.post(encodeURI(`${url}/events/${event.type.toLowerCase()}`), eventForWriteAPI(event));
1212
- }));
1213
- }
1214
- saveProcedure(procedure) {
1215
- return this.store
1216
- .select(HypSelectors.url)
1217
- .pipe(mergeMap((url) => {
1218
- return this.httpClient.post(encodeURI(`${url}/procedures`), procedureForWriteAPI(procedure));
1219
- }));
1220
- }
1221
- status(event, status) {
1222
- return this.store
1223
- .select(HypSelectors.url)
1224
- .pipe(mergeMap((url) => {
1225
- return this.httpClient.put(encodeURI(`${url}/events/id/${event.id}/close`), { status });
1226
- }));
1227
- }
1228
- statusProcedure(procedure, status) {
1229
- return this.store
1230
- .select(HypSelectors.url)
1231
- .pipe(mergeMap((url) => {
1232
- return this.httpClient.put(encodeURI(`${url}/procedures/id/${procedure.id}/close`), { status });
1233
- }));
1234
- }
1235
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, deps: [{ token: i1.HttpClient }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
1236
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, providedIn: 'root' }); }
1237
- }
1238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: EventService, decorators: [{
1239
- type: Injectable,
1240
- args: [{
1241
- providedIn: 'root',
1242
- }]
1243
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Store }] });
1244
-
1245
1336
  class EventEffects {
1246
1337
  constructor(actions$, eventService, store) {
1247
1338
  this.actions$ = actions$;
@@ -1254,10 +1345,10 @@ class EventEffects {
1254
1345
  this.saveProcedure$ = createEffect(() => this.actions$.pipe(ofType(EventActions.saveProcedure), debounceTime(200), mergeMap$1((action) => this.eventService.saveProcedure(action.procedure).pipe(map$1((procedure) => EventActions.saveSuccess({ procedure: action.procedure })), catchError((error) => [EventActions.saveFailure({ error: error })])))));
1255
1346
  this.close$ = createEffect(() => this.actions$.pipe(ofType(EventActions.status), debounceTime(200), mergeMap$1((action) => {
1256
1347
  if (!!action.event) {
1257
- return this.eventService.status(action.event, action.targetStatus).pipe(map$1((event) => EventActions.statusSuccess()), catchError((error) => [EventActions.statusFailure({ error: error })]));
1348
+ return this.eventService.status(action.event, action.targetStatus, action.comment).pipe(map$1((event) => EventActions.statusSuccess()), catchError((error) => [EventActions.statusFailure({ error: error })]));
1258
1349
  }
1259
1350
  else {
1260
- return this.eventService.statusProcedure(action.procedure, action.targetStatus).pipe(map$1((event) => EventActions.statusSuccess()), catchError((error) => [EventActions.statusFailure({ error: error })]));
1351
+ return this.eventService.statusProcedure(action.procedure, action.targetStatus, action.comment).pipe(map$1((event) => EventActions.statusSuccess()), catchError((error) => [EventActions.statusFailure({ error: error })]));
1261
1352
  }
1262
1353
  })));
1263
1354
  this.sort$ = createEffect(() => this.actions$.pipe(ofType(EventActions.sort, EventActions.filter), debounceTime(200), map$1(() => EventActions.load({}))));
@@ -1302,11 +1393,10 @@ class EventSummaryService {
1302
1393
  this.store = store;
1303
1394
  }
1304
1395
  list() {
1305
- return this.store
1306
- .select(HypSelectors.url)
1307
- .pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filters]) => {
1396
+ return this.store.select(HypSelectors.url).pipe(withLatestFrom(this.store.select(EventSelectors.filters)), mergeMap(([url, filterSets]) => {
1397
+ const filters = filterSets[KNOWN_FILTER_SETS.EVENTS];
1308
1398
  let params = new HttpParams();
1309
- Object.keys(filters).forEach(filter => {
1399
+ Object.keys(filters).forEach((filter) => {
1310
1400
  filters[filter].forEach((filterValue) => {
1311
1401
  params = params.set(filter, filterValue);
1312
1402
  });
@@ -1491,5 +1581,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImpor
1491
1581
  * Generated bundle index. Do not edit.
1492
1582
  */
1493
1583
 
1494
- export { CATEGORIES_BY_TYPE, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, EVENT_LINK, EVENT_TO_ICON, EquipmentService, EventActions, EventDetailComponent, EventEffects, EventFiltersComponent, EventIconPipe, EventListComponent, EventSelectors, EventService, EventSummaryActions, EventSummaryEffects, EventSummaryItemComponent, EventSummaryListComponent, EventSummaryPageComponent, EventSummarySelectors, ForDatetimeLocalPipe, HYP_BASE_CONFIG, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventType, HypSelectors, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, ProgressDisplayComponent, PvyHypervisorModule, StatusDisplayComponent, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, procedureForWriteAPI };
1584
+ export { CATEGORIES_BY_TYPE, ChoiceFilterComponent, ColumnOrderComponent, DOMAINS, DateFilterComponent, EVENT_LINK, EVENT_TO_ICON, EquipmentService, EventActions, EventDetailComponent, EventEffects, EventFiltersComponent, EventIconPipe, EventListComponent, EventSelectors, EventService, EventSummaryActions, EventSummaryEffects, EventSummaryItemComponent, EventSummaryListComponent, EventSummaryPageComponent, EventSummarySelectors, ForDatetimeLocalPipe, HYP_BASE_CONFIG, HypEventCategory, HypEventCriticality, HypEventStatus, HypEventType, HypSelectors, HypervisorActions, HypervisorEffects, HypervisorService, IconDisplayComponent, KNOWN_FILTER_SETS, PAGE_SIZE_FETCH, ProgressDisplayComponent, PvyHypervisorModule, SCROLL_PX_TO_TRIGGER_FETCH_PAGE, StatusDisplayComponent, enTranslations, eventFeatureKey, eventForWriteAPI, eventInitialState, eventReducer, eventSummaryFeatureKey, eventSummaryInitialState, eventSummaryReducer, frTranslations, hypFeatureKey, hypInitialState, hypervisorReducer, procedureForWriteAPI };
1495
1585
  //# sourceMappingURL=provoly-hypervisor.mjs.map