vcomply-workflow-engine 6.0.54 → 6.0.56

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 (23) hide show
  1. package/esm2022/lib/more-option/more-option.component.mjs +1 -4
  2. package/esm2022/lib/services/common.service.mjs +31 -1
  3. package/esm2022/lib/sharedComponents/frequency/frequency-one-time/frequency-one-time.component.mjs +2 -2
  4. package/esm2022/lib/sharedComponents/frequency/frequency-random/frequency-random.component.mjs +7 -2
  5. package/esm2022/lib/sharedComponents/frequency/frequency.service.mjs +6 -2
  6. package/esm2022/lib/sharedComponents/program-list/pipes/check-selected-items.pipes.mjs +7 -4
  7. package/esm2022/lib/sharedComponents/program-list/program-list/program-list.component.mjs +4 -5
  8. package/esm2022/lib/ui-kit/loaders/table-loader/table-loader.component.mjs +2 -2
  9. package/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +16 -226
  10. package/esm2022/lib/workflow-policy/workflow-policy.component.mjs +73 -29
  11. package/esm2022/lib/workflow-services/policy.service.mjs +4 -4
  12. package/esm2022/lib/workflow-services/responsibility.service.mjs +9 -2
  13. package/fesm2022/vcomply-workflow-engine.mjs +138 -262
  14. package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
  15. package/lib/add-multiple-risk/add-multiple-risk.component.d.ts +1 -1
  16. package/lib/services/common.service.d.ts +24 -0
  17. package/lib/sharedComponents/frequency/frequency-random/frequency-random.component.d.ts +1 -0
  18. package/lib/sharedComponents/program-list/program-list/program-list.component.d.ts +2 -3
  19. package/lib/workflow-compliance/workflow-compliance.component.d.ts +2 -3
  20. package/lib/workflow-policy/workflow-policy.component.d.ts +9 -0
  21. package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
  22. package/lib/workflow-services/responsibility.service.d.ts +1 -0
  23. package/package.json +1 -1
@@ -159,7 +159,7 @@ export declare class AddMultipleRiskComponent implements OnInit, OnChanges {
159
159
  * @param {string} [label] - the label of the risk
160
160
  * @returns The return value is the value of the last expression in the function.
161
161
  */
162
- setRiskLabel(label?: string): 1 | 2;
162
+ setRiskLabel(label?: string): 2 | 1;
163
163
  /**
164
164
  * "If the date is a number, convert it to a date object, then create a new date object with the
165
165
  * timezone set to the user's timezone, then return the date in the format YYYY-MM-DD."
@@ -9,6 +9,30 @@ export declare class CommonService {
9
9
  };
10
10
  handleDocumentClick(datePickerObject: any): boolean;
11
11
  private closeDatePickerIfOpen;
12
+ /**
13
+ * Transforms program data to identify added and removed program IDs.
14
+ * This method compares the current program selection with previously linked programs
15
+ * to determine which programs have been added or removed.
16
+ *
17
+ * @param input - An object containing program selections, where each key represents a category
18
+ * and its value is an array of program objects with an 'id' property.
19
+ * @param linkedProgramIds - Array of previously linked program IDs
20
+ *
21
+ * @returns An object containing:
22
+ * - added: Array of program IDs that are newly selected
23
+ * - removed: Array of program IDs that were previously linked but are no longer selected
24
+ *
25
+ * @example
26
+ * // If input is { category1: [{id: 1}, {id: 2}], category2: [{id: 3}] }
27
+ * // And linkedProgramIds is [1, 4]
28
+ * // Returns { added: [2, 3], removed: [4] }
29
+ */
30
+ transformProgramData(input: Record<string, Array<{
31
+ id: number;
32
+ }>>, linkedProgramIds?: number[]): {
33
+ added: number[];
34
+ removed: number[];
35
+ };
12
36
  static ɵfac: i0.ɵɵFactoryDeclaration<CommonService, never>;
13
37
  static ɵprov: i0.ɵɵInjectableDeclaration<CommonService>;
14
38
  }
@@ -52,6 +52,7 @@ export declare class FrequencyRandomComponent implements OnInit {
52
52
  getQuarterlyFrequency(): {
53
53
  pattern: string;
54
54
  placeholder: string;
55
+ monthSequence: number[];
55
56
  };
56
57
  getYearlyFrequency(): {
57
58
  pattern: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter, TemplateRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { ListItem } from '../interfaces/list-item.interface';
3
3
  import { ListUtilsService } from '../services/list-utils.service';
4
4
  import { ProgramListApiService } from '../services/program-list-api.service';
@@ -8,7 +8,6 @@ export declare class ProgramListComponent<T extends ListItem> implements OnInit,
8
8
  private programListApiService;
9
9
  items: T[];
10
10
  selectedItems: any | null;
11
- itemTemplate: TemplateRef<any> | undefined;
12
11
  url: any;
13
12
  itemSelected: EventEmitter<T>;
14
13
  itemDeselected: EventEmitter<T>;
@@ -42,5 +41,5 @@ export declare class ProgramListComponent<T extends ListItem> implements OnInit,
42
41
  resetFilter(): void;
43
42
  onFilterChange(): void;
44
43
  static ɵfac: i0.ɵɵFactoryDeclaration<ProgramListComponent<any>, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<ProgramListComponent<any>, "app-program-list", never, { "items": { "alias": "items"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "url": { "alias": "url"; "required": false; }; }, { "itemSelected": "itemSelected"; "itemDeselected": "itemDeselected"; "itemsSelectedChange": "itemsSelectedChange"; }, never, never, false, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProgramListComponent<any>, "app-program-list", never, { "items": { "alias": "items"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "url": { "alias": "url"; "required": false; }; }, { "itemSelected": "itemSelected"; "itemDeselected": "itemDeselected"; "itemsSelectedChange": "itemsSelectedChange"; }, never, never, false, never>;
46
45
  }
@@ -465,7 +465,7 @@ export declare class WorkflowComplianceComponent implements OnInit {
465
465
  */
466
466
  postAssessment(event: any): void;
467
467
  setIsUploaded(event: any): void;
468
- checkDefaultProgramOnRemove(program: any): void;
468
+ checkDefaultProgramOnRemove(event: any): void;
469
469
  /**
470
470
  * It takes an array of numbers and returns an array of unique numbers.
471
471
  * @param {any} array - The array you want to get the unique values from.
@@ -494,8 +494,6 @@ export declare class WorkflowComplianceComponent implements OnInit {
494
494
  programs: ListItem[];
495
495
  selectedPrograms: any[];
496
496
  customItemTemplate: TemplateRef<any> | undefined;
497
- onItemSelected(item: ListItem): void;
498
- onItemDeselected(item: ListItem): void;
499
497
  onItemsSelectedChange(items: ListItem[]): void;
500
498
  selectCategory(): void;
501
499
  get currentUserInfo(): {
@@ -505,6 +503,7 @@ export declare class WorkflowComplianceComponent implements OnInit {
505
503
  organisation_id: any;
506
504
  _id: any;
507
505
  };
506
+ removeProgram(program: any): void;
508
507
  populateResponsibilityDetails(): void;
509
508
  populateFrequencyDetails(frequency: any): void;
510
509
  static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowComplianceComponent, never>;
@@ -17,6 +17,7 @@ import { OrganizationUserService } from '../workflow-services/organization-user.
17
17
  import { OrganizationCommonService } from '../workflow-services/common-workflow-services/organization-common.service';
18
18
  import { ComplianceCommonService } from '../workflow-services/common-workflow-services/compliance-common.service';
19
19
  import { IframeService } from '../services/iframe.service';
20
+ import { ListItem } from '../sharedComponents/program-list/interfaces/list-item.interface';
20
21
  import * as i0 from "@angular/core";
21
22
  export declare class WorkflowPolicyComponent implements OnInit {
22
23
  private policyService;
@@ -225,6 +226,10 @@ export declare class WorkflowPolicyComponent implements OnInit {
225
226
  templateView: boolean;
226
227
  templateUrl: string;
227
228
  isTemplateClosed: boolean;
229
+ programListUrl: any;
230
+ selectedPrograms: any;
231
+ allProgamSelected: ListItem[];
232
+ linkProgram: any;
228
233
  constructor(policyService: PolicyService, snackBar: SnackBarService, uiKitService: UiKitService, authService: AuthService, responsibilityService: ResponsibilityService, router: Router, route: ActivatedRoute, frequencyService: FrequencyService, platformLocation: PlatformLocation, changeRef: ChangeDetectorRef, restApiService: RestApiService, commonService: CommonService, organizationUserService: OrganizationUserService, organizationCommonService: OrganizationCommonService, complianceCommonService: ComplianceCommonService, iframeService: IframeService);
229
234
  policyForm: PolicyForm;
230
235
  ngOnInit(): void;
@@ -411,6 +416,10 @@ export declare class WorkflowPolicyComponent implements OnInit {
411
416
  onTemplateSelect(event: any, isPreselected?: boolean): void;
412
417
  setNavigationUrl(): void;
413
418
  navigateToTemplate(): void;
419
+ onItemsSelectedChange(items: ListItem[]): void;
420
+ selectCategory(): void;
421
+ removeProgram(program: any): void;
422
+ getLinkProgram(): void;
414
423
  static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowPolicyComponent, never>;
415
424
  static ɵcmp: i0.ɵɵComponentDeclaration<WorkflowPolicyComponent, "app-workflow-policy", never, { "mode": { "alias": "mode"; "required": false; }; "policyId": { "alias": "policyId"; "required": false; }; "feature": { "alias": "feature"; "required": false; }; "convertFileData": { "alias": "convertFileData"; "required": false; }; "selectedCategory": { "alias": "selectedCategory"; "required": false; }; "isSendForAttestation": { "alias": "isSendForAttestation"; "required": false; }; "templateId": { "alias": "templateId"; "required": false; }; }, { "pickerChanged": "pickerChanged"; "showConfirmationAlert": "showConfirmationAlert"; "populateOption": "populateOption"; "disconnectRefresh": "disconnectRefresh"; "shiftToEditMode": "shiftToEditMode"; }, never, never, false, never>;
416
425
  }
@@ -167,7 +167,7 @@ export declare class WorkflowRiskComponent implements OnInit {
167
167
  setPopupButtons(): void;
168
168
  getRiskDetails(riskId: any): void;
169
169
  populateOptionalFields(): void;
170
- setCategoryType(type: any): "others" | "strategic" | "operational" | "compliance";
170
+ setCategoryType(type: any): "others" | "compliance" | "strategic" | "operational";
171
171
  getRCList(): void;
172
172
  getCategoryList(): void;
173
173
  getOwnersList(): void;
@@ -57,6 +57,7 @@ export declare class ResponsibilityService {
57
57
  updateGRCObject(payload: any, _id: string): Observable<any[]>;
58
58
  buildResponsibilityPayload(event: any): Responsibility | null;
59
59
  getRiskClass(riskClass: 0 | 1 | 2 | 3): 'low' | 'low-medium' | 'medium-high' | 'high';
60
+ transformData(input: any): any;
60
61
  static ɵfac: i0.ɵɵFactoryDeclaration<ResponsibilityService, [null, null, { optional: true; }]>;
61
62
  static ɵprov: i0.ɵɵInjectableDeclaration<ResponsibilityService>;
62
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vcomply-workflow-engine",
3
- "version": "6.0.54",
3
+ "version": "6.0.56",
4
4
  "peerDependencies": {
5
5
  "@angular/common": " 12.x || 13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x ",
6
6
  "@angular/core": " 12.x || 13.x || 14.x || 15.x || 16.x || 17.x || 18.x || 19.x "