vcomply-workflow-engine 6.0.55 → 6.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/interfaces/responsibilty.interface.mjs +1 -1
- package/esm2022/lib/services/common.service.mjs +31 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-one-time/frequency-one-time.component.mjs +2 -2
- package/esm2022/lib/sharedComponents/frequency/frequency-random/frequency-random.component.mjs +7 -2
- package/esm2022/lib/sharedComponents/frequency/frequency.service.mjs +63 -2
- package/esm2022/lib/sharedComponents/program-list/pipes/check-selected-items.pipes.mjs +7 -4
- package/esm2022/lib/sharedComponents/program-list/program-list/program-list.component.mjs +3 -4
- package/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +19 -223
- package/esm2022/lib/workflow-policy/workflow-policy.component.mjs +51 -27
- package/esm2022/lib/workflow-services/policy.service.mjs +4 -4
- package/esm2022/lib/workflow-services/responsibility.service.mjs +33 -20
- package/fesm2022/vcomply-workflow-engine.mjs +210 -279
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/lib/interfaces/responsibilty.interface.d.ts +8 -8
- package/lib/services/common.service.d.ts +24 -0
- package/lib/sharedComponents/frequency/frequency-random/frequency-random.component.d.ts +1 -0
- package/lib/sharedComponents/frequency/frequency.service.d.ts +57 -0
- package/lib/sharedComponents/program-list/program-list/program-list.component.d.ts +2 -3
- package/lib/workflow-compliance/workflow-compliance.component.d.ts +2 -1
- package/lib/workflow-policy/workflow-policy.component.d.ts +5 -2
- package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
- package/lib/workflow-services/responsibility.service.d.ts +12 -1
- package/package.json +1 -1
|
@@ -37,23 +37,23 @@ interface Evidence {
|
|
|
37
37
|
}
|
|
38
38
|
interface Program {
|
|
39
39
|
id: number[];
|
|
40
|
+
tags: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
40
43
|
}
|
|
41
44
|
export interface Responsibility {
|
|
42
45
|
title: string;
|
|
43
46
|
key: number;
|
|
44
|
-
riskClass: 'low' | '
|
|
47
|
+
riskClass: 'low' | 'low_medium' | 'medium_high' | 'high';
|
|
45
48
|
notes: string;
|
|
46
49
|
objective: string;
|
|
47
50
|
frequency: Frequency;
|
|
48
|
-
|
|
51
|
+
assignor: number;
|
|
49
52
|
assignee: Assignee;
|
|
50
|
-
responsibilityCenter: ResponsibilityCenter;
|
|
51
|
-
reviewer: Reviewer;
|
|
52
|
-
overseer: Overseer;
|
|
53
|
+
responsibilityCenter: ResponsibilityCenter | undefined;
|
|
54
|
+
reviewer: Reviewer | undefined;
|
|
55
|
+
overseer: Overseer | undefined;
|
|
53
56
|
evidence: Evidence;
|
|
54
|
-
tags: {
|
|
55
|
-
[key: string]: string;
|
|
56
|
-
};
|
|
57
57
|
program: Program;
|
|
58
58
|
grcObjectId: any[];
|
|
59
59
|
assessmentId: string;
|
|
@@ -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
|
}
|
|
@@ -48,6 +48,63 @@ export declare class FrequencyService {
|
|
|
48
48
|
getResponsibilityList(payload: any): import("rxjs").Observable<any>;
|
|
49
49
|
getResponsibilitiesCount(payload: any): import("rxjs").Observable<any>;
|
|
50
50
|
formatDate(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Converts a frequency configuration object into a standardized FrequencyObject format.
|
|
53
|
+
*
|
|
54
|
+
* @param frequency - The input frequency configuration object with the following properties:
|
|
55
|
+
* - case: The type of frequency ('one_time' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'semester' | 'yearly' | 'random' | 'ongoing' | 'on_completion_of' | 'biannually')
|
|
56
|
+
* - window: Number of days before the task can be started
|
|
57
|
+
* - failedAfter: Number of days after which the task is considered failed
|
|
58
|
+
* - continuous_failed_days: Number of days after which the task is auto-deactivated
|
|
59
|
+
* - day: The day of occurrence
|
|
60
|
+
* - timeIn24Hr: Time in 24-hour format
|
|
61
|
+
* - every: Frequency interval
|
|
62
|
+
* - selectedDay: Array of selected days for weekly frequency (1-7 representing Monday-Sunday)
|
|
63
|
+
* - selectedMonth: Array of selected months (0-11 representing January-December)
|
|
64
|
+
* - startFrom: Unix timestamp for the start date
|
|
65
|
+
* - lifecycleDetails: String in format "YYYY-MM-DD~~N" where N is the number of occurrences
|
|
66
|
+
* - randomTypeSelected: Index for random frequency type (0: weekly, 1: monthly, 2: quarterly, 3: yearly)
|
|
67
|
+
* - randomInstances: Number of random occurrences
|
|
68
|
+
* - selectedType: Number of reminders for ongoing frequency
|
|
69
|
+
* - selectedOngoingType: Index for ongoing frequency type (1: week, 2: month, 3: quarter, 4: semester, 5: year)
|
|
70
|
+
*
|
|
71
|
+
* @returns A FrequencyObject with the following structure:
|
|
72
|
+
* - type: Frequency type
|
|
73
|
+
* - startBefore: Days before task can start
|
|
74
|
+
* - endAfter: Days after which task fails
|
|
75
|
+
* - autoDeactivate: Days after which task is deactivated
|
|
76
|
+
* - day: Day of occurrence
|
|
77
|
+
* - time: Time in 24-hour format
|
|
78
|
+
* - repeatOptions: {
|
|
79
|
+
* every: number,
|
|
80
|
+
* repeatOn: string (binary representation of selected days/months),
|
|
81
|
+
* lifecycle: {
|
|
82
|
+
* startFrom: string (YYYY-MM-DD),
|
|
83
|
+
* endBy?: string (YYYY-MM-DD),
|
|
84
|
+
* endAfter?: number
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* - random?: { type: string, occurrence: number }
|
|
88
|
+
* - onComplete: {}
|
|
89
|
+
* - onGoing: { reminders: number, startOf: 'week' | 'month' | 'quarter' | 'semester' | 'year' }
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const frequency = {
|
|
94
|
+
* case: 'weekly',
|
|
95
|
+
* window: 2,
|
|
96
|
+
* failedAfter: 1,
|
|
97
|
+
* continuous_failed_days: 3,
|
|
98
|
+
* day: 1,
|
|
99
|
+
* timeIn24Hr: '09:00:00',
|
|
100
|
+
* every: 1,
|
|
101
|
+
* selectedDay: [1, 3, 5], // Monday, Wednesday, Friday
|
|
102
|
+
* startFrom: 1678900000,
|
|
103
|
+
* lifecycleDetails: '2024-12-31~~10'
|
|
104
|
+
* };
|
|
105
|
+
* const result = setFrequencyObject(frequency);
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
51
108
|
setFrequencyObject(frequency: any): FrequencyObject | null;
|
|
52
109
|
repeatOptions(frequency: any): string;
|
|
53
110
|
getOngoing(frequency: any): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
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; }; "
|
|
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(
|
|
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.
|
|
@@ -503,6 +503,7 @@ export declare class WorkflowComplianceComponent implements OnInit {
|
|
|
503
503
|
organisation_id: any;
|
|
504
504
|
_id: any;
|
|
505
505
|
};
|
|
506
|
+
removeProgram(program: any): void;
|
|
506
507
|
populateResponsibilityDetails(): void;
|
|
507
508
|
populateFrequencyDetails(frequency: any): void;
|
|
508
509
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowComplianceComponent, never>;
|
|
@@ -227,8 +227,9 @@ export declare class WorkflowPolicyComponent implements OnInit {
|
|
|
227
227
|
templateUrl: string;
|
|
228
228
|
isTemplateClosed: boolean;
|
|
229
229
|
programListUrl: any;
|
|
230
|
-
selectedPrograms:
|
|
230
|
+
selectedPrograms: any;
|
|
231
231
|
allProgamSelected: ListItem[];
|
|
232
|
+
linkProgram: any;
|
|
232
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);
|
|
233
234
|
policyForm: PolicyForm;
|
|
234
235
|
ngOnInit(): void;
|
|
@@ -416,7 +417,9 @@ export declare class WorkflowPolicyComponent implements OnInit {
|
|
|
416
417
|
setNavigationUrl(): void;
|
|
417
418
|
navigateToTemplate(): void;
|
|
418
419
|
onItemsSelectedChange(items: ListItem[]): void;
|
|
419
|
-
|
|
420
|
+
selectCategory(): void;
|
|
421
|
+
removeProgram(program: any): void;
|
|
422
|
+
getLinkProgram(): void;
|
|
420
423
|
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowPolicyComponent, never>;
|
|
421
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>;
|
|
422
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): "compliance" | "
|
|
170
|
+
setCategoryType(type: any): "compliance" | "others" | "strategic" | "operational";
|
|
171
171
|
getRCList(): void;
|
|
172
172
|
getCategoryList(): void;
|
|
173
173
|
getOwnersList(): void;
|
|
@@ -56,7 +56,18 @@ export declare class ResponsibilityService {
|
|
|
56
56
|
addGRCObject(payload: any): Observable<any[]>;
|
|
57
57
|
updateGRCObject(payload: any, _id: string): Observable<any[]>;
|
|
58
58
|
buildResponsibilityPayload(event: any): Responsibility | null;
|
|
59
|
-
|
|
59
|
+
getOverseer(event: any): {
|
|
60
|
+
success: {
|
|
61
|
+
userId: any;
|
|
62
|
+
userGroupId: any;
|
|
63
|
+
};
|
|
64
|
+
fail: {
|
|
65
|
+
userId: any;
|
|
66
|
+
userGroupId: any;
|
|
67
|
+
};
|
|
68
|
+
} | undefined;
|
|
69
|
+
getRiskClass(riskClass: 0 | 1 | 2 | 3): 'low' | 'low_medium' | 'medium_high' | 'high';
|
|
70
|
+
transformData(input: any): any;
|
|
60
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<ResponsibilityService, [null, null, { optional: true; }]>;
|
|
61
72
|
static ɵprov: i0.ɵɵInjectableDeclaration<ResponsibilityService>;
|
|
62
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vcomply-workflow-engine",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.57",
|
|
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 "
|