@provoly/hypervisor 0.0.125 → 0.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/hypervisor",
3
- "version": "0.0.125",
3
+ "version": "0.0.127",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "16.x || 17.x",
6
6
  "@angular/common": "16.x || 17.x",
@@ -8,10 +8,11 @@ import { Store } from '@ngrx/store';
8
8
  import { Overlay, OverlayRef } from '@angular/cdk/overlay';
9
9
  import { BehaviorSubject, Observable, Subject } from 'rxjs';
10
10
  import { HypCommentsService } from '../../store/comments/comments.service';
11
- import { HypComment } from '../../model/comment.interface';
12
11
  import { HypServiceTooltip } from '../../model/event/hyp-event-tooltip.interface';
13
12
  import { HvyEventDetailsTooltipComponent } from './event-details-tooltip.component';
14
13
  import { EventService } from '../../store/event/event.service';
14
+ import { HypAction } from '../../model/procedure/hyp-action.interface';
15
+ import { HypComment } from '../../model/comment.interface';
15
16
  import * as i0 from "@angular/core";
16
17
  export type ChangeStatusContext = {
17
18
  comment: string;
@@ -21,9 +22,11 @@ export type ChangeStatusContext = {
21
22
  };
22
23
  export interface HypEquipmentWithMatching extends HypEquipment {
23
24
  html: string;
25
+ displayName: string;
24
26
  }
25
27
  export interface HypEventDetailsWithMatching extends HypEventDetails {
26
28
  html: string;
29
+ displayName: string;
27
30
  }
28
31
  export declare class EventDetailComponent extends SubscriptionnerDirective {
29
32
  private equipmentService;
@@ -63,9 +66,6 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
63
66
  confirmDialog: TemplateRef<any>;
64
67
  comfirmDialogOpened: EventEmitter<ChangeStatusContext>;
65
68
  triggerComment$: BehaviorSubject<void>;
66
- comments$?: Observable<{
67
- [p: number]: HypComment[];
68
- }>;
69
69
  onEquipmentSearch$: Subject<number>;
70
70
  equipmentSelectValue: (string | HypEquipment | undefined)[];
71
71
  equipments$: Observable<HypEquipmentWithMatching[]>;
@@ -73,7 +73,13 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
73
73
  onEventSearch$: Subject<number>;
74
74
  eventSelectValue: (string | HypEventDetails | undefined)[];
75
75
  events$: Observable<HypEventDetailsWithMatching[]>;
76
- parentName: string[];
76
+ commented: EventEmitter<{
77
+ event: HypEventDetails;
78
+ comments: HypComment[];
79
+ } | {
80
+ action: HypAction;
81
+ comments: HypComment[];
82
+ }>;
77
83
  set events(events: HypEventDetails[]);
78
84
  set procedure(procedure: HypProcedure);
79
85
  set cancelModifications(evt: any);
@@ -124,11 +130,6 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
124
130
  openAssociationModal(): void;
125
131
  openDeleteModal(): void;
126
132
  private convertDate;
127
- updateComment(event: HypEventDetails, comment: {
128
- id: string;
129
- message: string;
130
- }): void;
131
- displayEquipment: string[];
132
133
  selectedEquipmentChange($event: string | HypEquipment, index: number): void;
133
134
  equipmentsEvents: {
134
135
  events?: HypEventDetails[];
@@ -139,6 +140,14 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
139
140
  toggleDetailsTooltip(idx: number): void;
140
141
  selectedParentChange($event: string | HypEventDetails, index: number): void;
141
142
  addOneEvent(): void;
143
+ actionCommented($event: {
144
+ action: HypAction;
145
+ comments: HypComment[];
146
+ }): void;
147
+ updateComment(event: HypEventDetails, comment: {
148
+ id: string;
149
+ message: string;
150
+ }): void;
142
151
  static ɵfac: i0.ɵɵFactoryDeclaration<EventDetailComponent, never>;
143
- static ɵcmp: i0.ɵɵComponentDeclaration<EventDetailComponent, "hvy-event-detail", never, { "title": { "alias": "title"; "required": false; }; "me": { "alias": "me"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "readonlyProcedure": { "alias": "readonlyProcedure"; "required": false; }; "enableEditActions": { "alias": "enableEditActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "procedure": { "alias": "procedure"; "required": false; }; "cancelModifications": { "alias": "cancelModifications"; "required": false; }; "equipmentName": { "alias": "equipmentName"; "required": false; }; }, { "modifiedEvents": "modifiedEvents"; "modifiedProcedure": "modifiedProcedure"; "eventErrors": "eventErrors"; "addedEvent": "addedEvent"; "comfirmDialogOpened": "comfirmDialogOpened"; }, never, never, false, never>;
152
+ static ɵcmp: i0.ɵɵComponentDeclaration<EventDetailComponent, "hvy-event-detail", never, { "title": { "alias": "title"; "required": false; }; "me": { "alias": "me"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "readonlyProcedure": { "alias": "readonlyProcedure"; "required": false; }; "enableEditActions": { "alias": "enableEditActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "procedure": { "alias": "procedure"; "required": false; }; "cancelModifications": { "alias": "cancelModifications"; "required": false; }; "equipmentName": { "alias": "equipmentName"; "required": false; }; }, { "modifiedEvents": "modifiedEvents"; "modifiedProcedure": "modifiedProcedure"; "eventErrors": "eventErrors"; "addedEvent": "addedEvent"; "comfirmDialogOpened": "comfirmDialogOpened"; "commented": "commented"; }, never, never, false, never>;
144
153
  }
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import { HypComment } from '../../model/comment.interface';
3
3
  import { Subject, Subscription } from 'rxjs';
4
+ import { HypCommentsService } from '../../store/comments/comments.service';
4
5
  import * as i0 from "@angular/core";
5
6
  export type HypAugmentedComment = HypComment & {
6
7
  day: string;
@@ -9,7 +10,7 @@ export type HypAugmentedComment = HypComment & {
9
10
  previousMessage: string;
10
11
  };
11
12
  export declare class HvyCommentsComponent implements OnDestroy {
12
- _comments: HypAugmentedComment[];
13
+ private commentsService;
13
14
  readonly: boolean | null;
14
15
  newComment: string;
15
16
  commented: EventEmitter<{
@@ -19,13 +20,17 @@ export declare class HvyCommentsComponent implements OnDestroy {
19
20
  more: boolean;
20
21
  me: string | null | undefined;
21
22
  type: 'actions' | 'events';
23
+ objectId?: string | number;
22
24
  displayEmpty: boolean;
25
+ commentCount: number;
26
+ lastComment?: HypComment;
23
27
  opened: boolean;
24
28
  subTrigger?: Subscription;
25
- set comments(comments: HypComment[] | null);
29
+ additionnalComments: HypComment[];
26
30
  set trigger(trigger$: Subject<boolean>);
31
+ constructor(commentsService: HypCommentsService);
27
32
  ngOnDestroy(): void;
28
- get comments(): HypComment[] | null;
33
+ get comments(): HypAugmentedComment[];
29
34
  addComment(): void;
30
35
  editComment(comment: HypAugmentedComment): void;
31
36
  saveComment(comment: HypAugmentedComment): void;
@@ -33,5 +38,5 @@ export declare class HvyCommentsComponent implements OnDestroy {
33
38
  toggleMore(): void;
34
39
  toggle(): void;
35
40
  static ɵfac: i0.ɵɵFactoryDeclaration<HvyCommentsComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<HvyCommentsComponent, "hvy-comments", never, { "readonly": { "alias": "readonly"; "required": false; }; "me": { "alias": "me"; "required": false; }; "type": { "alias": "type"; "required": false; }; "displayEmpty": { "alias": "displayEmpty"; "required": false; }; "comments": { "alias": "comments"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; }, { "commented": "commented"; }, never, never, false, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<HvyCommentsComponent, "hvy-comments", never, { "readonly": { "alias": "readonly"; "required": false; }; "me": { "alias": "me"; "required": false; }; "type": { "alias": "type"; "required": false; }; "objectId": { "alias": "objectId"; "required": false; }; "displayEmpty": { "alias": "displayEmpty"; "required": false; }; "commentCount": { "alias": "commentCount"; "required": false; }; "lastComment": { "alias": "lastComment"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; }, { "commented": "commented"; }, never, never, false, never>;
37
42
  }
@@ -8,7 +8,8 @@ export declare class HvyActionParameterComponent {
8
8
  _type: string;
9
9
  private componentRef?;
10
10
  param: boolean;
11
- events: HypEventDetails[];
11
+ _events: HypEventDetails[];
12
+ set events(events: HypEventDetails[]);
12
13
  set isParam(param: boolean);
13
14
  set type(type: string);
14
15
  set action(action: any);
@@ -3,9 +3,9 @@ import { PryDialogService, SubscriptionnerDirective } from '@provoly/dashboard';
3
3
  import { HypAction } from '../../model/procedure/hyp-action.interface';
4
4
  import { Overlay } from '@angular/cdk/overlay';
5
5
  import { HypCommentsService } from '../../store/comments/comments.service';
6
- import { BehaviorSubject, Observable, Subject } from 'rxjs';
7
- import { HypComment } from '../../model/comment.interface';
6
+ import { Subject } from 'rxjs';
8
7
  import { HypEventDetails } from '../../model/event/hyp-event-detail.interface';
8
+ import { HypComment } from '../../model/comment.interface';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class ProcedureActionsComponent extends SubscriptionnerDirective {
11
11
  private pryDialog;
@@ -19,6 +19,10 @@ export declare class ProcedureActionsComponent extends SubscriptionnerDirective
19
19
  previousOffset: number;
20
20
  dragTarget?: EventTarget | null;
21
21
  modified: EventEmitter<HypAction[]>;
22
+ commented: EventEmitter<{
23
+ action: HypAction;
24
+ comments: HypComment[];
25
+ }>;
22
26
  mode: 'model' | 'procedure';
23
27
  me: string | null | undefined;
24
28
  readonly: boolean | null;
@@ -27,10 +31,6 @@ export declare class ProcedureActionsComponent extends SubscriptionnerDirective
27
31
  ACTIONS_TYPES: string[];
28
32
  _actions: HypAction[];
29
33
  menuButtons: QueryList<ElementRef>;
30
- triggerComment$: BehaviorSubject<void>;
31
- comments$?: Observable<{
32
- [p: string]: HypComment[];
33
- }>;
34
34
  triggers: {
35
35
  [p: string]: Subject<boolean>;
36
36
  };
@@ -57,5 +57,5 @@ export declare class ProcedureActionsComponent extends SubscriptionnerDirective
57
57
  message: string;
58
58
  }): void;
59
59
  static ɵfac: i0.ɵɵFactoryDeclaration<ProcedureActionsComponent, never>;
60
- static ɵcmp: i0.ɵɵComponentDeclaration<ProcedureActionsComponent, "hvy-procedure-actions", never, { "mode": { "alias": "mode"; "required": false; }; "me": { "alias": "me"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "enableEditActions": { "alias": "enableEditActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "modified": "modified"; }, never, never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProcedureActionsComponent, "hvy-procedure-actions", never, { "mode": { "alias": "mode"; "required": false; }; "me": { "alias": "me"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "enableEditActions": { "alias": "enableEditActions"; "required": false; }; "events": { "alias": "events"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "modified": "modified"; "commented": "commented"; }, never, never, false, never>;
61
61
  }
@@ -1,4 +1,5 @@
1
1
  import { HypEvent } from './hyp-event.interface';
2
+ import { HypComment } from '../comment.interface';
2
3
  export interface HypEventDetails extends HypEvent {
3
4
  address: string;
4
5
  description: string;
@@ -20,6 +21,8 @@ export interface HypEventDetails extends HypEvent {
20
21
  linkedEvents: number;
21
22
  procedureProgress?: number;
22
23
  domain?: string;
24
+ lastComment: HypComment;
25
+ commentCount: number;
23
26
  }
24
27
  export declare const eventForWriteAPI: (event: HypEventDetails) => {
25
28
  equipmentId: string | undefined;
@@ -44,6 +47,8 @@ export declare const eventForWriteAPI: (event: HypEventDetails) => {
44
47
  linkedEvents: number;
45
48
  procedureProgress?: number | undefined;
46
49
  domain?: string | undefined;
50
+ lastComment: HypComment;
51
+ commentCount: number;
47
52
  id: number;
48
53
  name: string;
49
54
  criticality: string;
@@ -1,3 +1,4 @@
1
+ import { HypComment } from '../comment.interface';
1
2
  export interface HypAction {
2
3
  id: string;
3
4
  type: string;
@@ -5,4 +6,6 @@ export interface HypAction {
5
6
  lastModificationDate: string;
6
7
  _initial?: HypAction;
7
8
  _status?: 'modify' | 'create';
9
+ lastComment?: HypComment;
10
+ commentsCount: number;
8
11
  }
@@ -34,6 +34,8 @@ export declare const procedureForWriteAPI: (procedure: HypProcedure) => {
34
34
  linkedEvents: number;
35
35
  procedureProgress?: number | undefined;
36
36
  domain?: string | undefined;
37
+ lastComment: import("../comment.interface").HypComment;
38
+ commentCount: number;
37
39
  id: number;
38
40
  name: string;
39
41
  criticality: string;
@@ -27,7 +27,7 @@ export declare class EventService {
27
27
  statusProcedure(procedure: HypProcedure, status: string, comment: string): Observable<void>;
28
28
  associateProcedure(procedureId: number, eventIds: number[]): Observable<HypProcedure>;
29
29
  export(archived: boolean): Observable<import("@angular/common/http").HttpResponse<ArrayBuffer>>;
30
- search(search: string | undefined): Observable<HypEventDetails[]>;
30
+ search(search: string | undefined, fields: string[], statuses?: string[]): Observable<HypEventDetails[]>;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
32
32
  static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
33
33
  }