@provoly/hypervisor 0.0.124 → 0.0.126

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 (22) hide show
  1. package/esm2022/src/lib/event/detail/add-event/add-event.component.mjs +2 -2
  2. package/esm2022/src/lib/event/detail/event-detail.component.mjs +44 -21
  3. package/esm2022/src/lib/general/comments/comments.component.mjs +38 -23
  4. package/esm2022/src/lib/general/procedure-actions/action-parameters/action-parameter.component.mjs +9 -3
  5. package/esm2022/src/lib/general/procedure-actions/procedure-actions.component.mjs +10 -9
  6. package/esm2022/src/lib/model/event/hyp-event-detail.interface.mjs +1 -1
  7. package/esm2022/src/lib/model/procedure/hyp-action.interface.mjs +1 -1
  8. package/esm2022/src/lib/procedure/model-detail/procedure-model-detail.component.mjs +1 -1
  9. package/esm2022/src/lib/store/event/event.service.mjs +8 -3
  10. package/fesm2022/provoly-hypervisor.mjs +101 -50
  11. package/fesm2022/provoly-hypervisor.mjs.map +1 -1
  12. package/package.json +1 -1
  13. package/src/lib/event/detail/event-detail.component.d.ts +19 -9
  14. package/src/lib/general/comments/comments.component.d.ts +9 -4
  15. package/src/lib/general/procedure-actions/action-parameters/action-parameter.component.d.ts +2 -1
  16. package/src/lib/general/procedure-actions/procedure-actions.component.d.ts +7 -7
  17. package/src/lib/model/event/hyp-event-detail.interface.d.ts +7 -0
  18. package/src/lib/model/procedure/hyp-action.interface.d.ts +3 -0
  19. package/src/lib/model/procedure/hyp-procedure.interface.d.ts +3 -0
  20. package/src/lib/store/event/event.service.d.ts +1 -1
  21. package/styles/components/_o-hvy-event-detail-add.scss +4 -0
  22. package/styles/components/_o-hvy-event-detail.scss +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/hypervisor",
3
- "version": "0.0.124",
3
+ "version": "0.0.126",
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;
@@ -63,9 +64,6 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
63
64
  confirmDialog: TemplateRef<any>;
64
65
  comfirmDialogOpened: EventEmitter<ChangeStatusContext>;
65
66
  triggerComment$: BehaviorSubject<void>;
66
- comments$?: Observable<{
67
- [p: number]: HypComment[];
68
- }>;
69
67
  onEquipmentSearch$: Subject<number>;
70
68
  equipmentSelectValue: (string | HypEquipment | undefined)[];
71
69
  equipments$: Observable<HypEquipmentWithMatching[]>;
@@ -74,6 +72,13 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
74
72
  eventSelectValue: (string | HypEventDetails | undefined)[];
75
73
  events$: Observable<HypEventDetailsWithMatching[]>;
76
74
  parentName: string[];
75
+ commented: EventEmitter<{
76
+ event: HypEventDetails;
77
+ comments: HypComment[];
78
+ } | {
79
+ action: HypAction;
80
+ comments: HypComment[];
81
+ }>;
77
82
  set events(events: HypEventDetails[]);
78
83
  set procedure(procedure: HypProcedure);
79
84
  set cancelModifications(evt: any);
@@ -124,10 +129,7 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
124
129
  openAssociationModal(): void;
125
130
  openDeleteModal(): void;
126
131
  private convertDate;
127
- updateComment(event: HypEventDetails, comment: {
128
- id: string;
129
- message: string;
130
- }): void;
132
+ displayEquipment: string[];
131
133
  selectedEquipmentChange($event: string | HypEquipment, index: number): void;
132
134
  equipmentsEvents: {
133
135
  events?: HypEventDetails[];
@@ -138,6 +140,14 @@ export declare class EventDetailComponent extends SubscriptionnerDirective {
138
140
  toggleDetailsTooltip(idx: number): void;
139
141
  selectedParentChange($event: string | HypEventDetails, index: number): void;
140
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;
141
151
  static ɵfac: i0.ɵɵFactoryDeclaration<EventDetailComponent, never>;
142
- 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>;
143
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;
@@ -10,6 +11,7 @@ export interface HypEventDetails extends HypEvent {
10
11
  name: string;
11
12
  type: string;
12
13
  entity: string;
14
+ family: string;
13
15
  };
14
16
  externalSourceRef?: string;
15
17
  startDate?: string;
@@ -19,6 +21,8 @@ export interface HypEventDetails extends HypEvent {
19
21
  linkedEvents: number;
20
22
  procedureProgress?: number;
21
23
  domain?: string;
24
+ lastComment: HypComment;
25
+ commentCount: number;
22
26
  }
23
27
  export declare const eventForWriteAPI: (event: HypEventDetails) => {
24
28
  equipmentId: string | undefined;
@@ -33,6 +37,7 @@ export declare const eventForWriteAPI: (event: HypEventDetails) => {
33
37
  name: string;
34
38
  type: string;
35
39
  entity: string;
40
+ family: string;
36
41
  } | undefined;
37
42
  externalSourceRef?: string | undefined;
38
43
  startDate?: string | undefined;
@@ -42,6 +47,8 @@ export declare const eventForWriteAPI: (event: HypEventDetails) => {
42
47
  linkedEvents: number;
43
48
  procedureProgress?: number | undefined;
44
49
  domain?: string | undefined;
50
+ lastComment: HypComment;
51
+ commentCount: number;
45
52
  id: number;
46
53
  name: string;
47
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
  }
@@ -24,6 +24,7 @@ export declare const procedureForWriteAPI: (procedure: HypProcedure) => {
24
24
  name: string;
25
25
  type: string;
26
26
  entity: string;
27
+ family: string;
27
28
  } | undefined;
28
29
  externalSourceRef?: string | undefined;
29
30
  startDate?: string | undefined;
@@ -33,6 +34,8 @@ export declare const procedureForWriteAPI: (procedure: HypProcedure) => {
33
34
  linkedEvents: number;
34
35
  procedureProgress?: number | undefined;
35
36
  domain?: string | undefined;
37
+ lastComment: import("../comment.interface").HypComment;
38
+ commentCount: number;
36
39
  id: number;
37
40
  name: string;
38
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, statuses?: string[]): Observable<HypEventDetails[]>;
31
31
  static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
32
32
  static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
33
33
  }
@@ -20,6 +20,10 @@
20
20
  .a-pry-select__content {
21
21
  input {
22
22
  width: toRem(500);
23
+
24
+ &::placeholder {
25
+ font-style: italic;
26
+ }
23
27
  }
24
28
  }
25
29
  }
@@ -45,7 +45,7 @@
45
45
  padding: 0;
46
46
  border-radius: 50%;
47
47
  margin: 0;
48
- transform: translateY(toRem(5));
48
+ transform: translateY(toRem(3));
49
49
  cursor: pointer;
50
50
 
51
51
  pry-icon {