vcomply-workflow-engine 6.0.91 → 6.0.93
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/add-multiple-responsibility-with-tab/add-multiple-responsibility-with-tab.component.mjs +7 -30
- package/esm2022/lib/constants/api.constants.mjs +6 -1
- package/esm2022/lib/interfaces/frequency.interface.mjs +2 -0
- package/esm2022/lib/interfaces/iframe-type.mjs +7 -0
- package/esm2022/lib/interfaces/responsibilty.interface.mjs +1 -1
- package/esm2022/lib/more-option/more-option.component.mjs +17 -183
- package/esm2022/lib/report-a-case/services/report-a-case.service.mjs +3 -2
- package/esm2022/lib/report-a-case/workflow-case/workflow-case.component.mjs +4 -7
- package/esm2022/lib/services/common.service.mjs +40 -1
- package/esm2022/lib/services/iframe.service.mjs +14 -1
- package/esm2022/lib/sharedComponents/bulk-responsibility-view/bulk-responsibility-view.component.mjs +3 -6
- package/esm2022/lib/sharedComponents/format-and-evidence/format-and-evidence.component.mjs +10 -21
- package/esm2022/lib/sharedComponents/frequency/frequency-annual/frequency-annual.component.mjs +5 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-biannual/frequency-biannual.component.mjs +5 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-container/frequency-container.component.mjs +5 -5
- package/esm2022/lib/sharedComponents/frequency/frequency-daily/frequency-daily.component.mjs +2 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-monthly/frequency-monthly.component.mjs +6 -2
- package/esm2022/lib/sharedComponents/frequency/frequency-one-time/frequency-one-time.component.mjs +3 -2
- package/esm2022/lib/sharedComponents/frequency/frequency-ongoing/frequency-ongoing.component.mjs +3 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-quarterly/frequency-quarterly.component.mjs +5 -1
- package/esm2022/lib/sharedComponents/frequency/frequency-random/frequency-random.component.mjs +9 -2
- package/esm2022/lib/sharedComponents/frequency/frequency-weekly/frequency-weekly.component.mjs +4 -2
- package/esm2022/lib/sharedComponents/frequency/frequency.service.mjs +267 -5
- package/esm2022/lib/sharedComponents/link-responsibility/link-responsibility.component.mjs +48 -16
- package/esm2022/lib/sharedComponents/link-responsibility/link-responsibility.module.mjs +8 -4
- package/esm2022/lib/sharedComponents/list-container/list-container.component.mjs +52 -0
- package/esm2022/lib/sharedComponents/program-list/constant.mjs +27 -0
- package/esm2022/lib/sharedComponents/program-list/interfaces/data-source.interface.mjs +2 -0
- package/esm2022/lib/sharedComponents/program-list/interfaces/list-item.interface.mjs +2 -0
- package/esm2022/lib/sharedComponents/program-list/pipes/check-selected-items.pipes.mjs +23 -0
- package/esm2022/lib/sharedComponents/program-list/program-list/program-list.component.mjs +269 -0
- package/esm2022/lib/sharedComponents/program-list/program-list.module.mjs +51 -0
- package/esm2022/lib/sharedComponents/program-list/services/list-utils.service.mjs +27 -0
- package/esm2022/lib/sharedComponents/program-list/services/program-list-api.service.mjs +32 -0
- package/esm2022/lib/ui-kit/loaders/loaders.module.mjs +24 -0
- package/esm2022/lib/ui-kit/loaders/table-loader/table-loader.component.mjs +19 -0
- package/esm2022/lib/workflow/grc-object/grc-object-container/grc-object-container.component.mjs +45 -17
- package/esm2022/lib/workflow/shared/components/grc-category-listing/grc-category-listing.component.mjs +13 -10
- package/esm2022/lib/workflow/shared/components/program-responsibility-listing/program-responsibility-listing.component.mjs +62 -35
- package/esm2022/lib/workflow/shared/services/grc.service.mjs +15 -2
- package/esm2022/lib/workflow/shared/workflow-pipes/get-user-details.pipe.mjs +26 -0
- package/esm2022/lib/workflow/shared/workflow-pipes/workflow-pipes.module.mjs +8 -3
- package/esm2022/lib/workflow-compliance/workflow-compliance.component.mjs +294 -453
- package/esm2022/lib/workflow-engine-container/api-constants.mjs +3 -2
- package/esm2022/lib/workflow-engine-container/workflow-engine-container.component.mjs +32 -53
- package/esm2022/lib/workflow-engine.module.mjs +11 -7
- package/esm2022/lib/workflow-policy/workflow-policy.component.mjs +46 -29
- package/esm2022/lib/workflow-program/constants.mjs +3 -3
- package/esm2022/lib/workflow-program/workflow-program.component.mjs +125 -338
- package/esm2022/lib/workflow-services/policy.service.mjs +8 -9
- package/esm2022/lib/workflow-services/programs.service.mjs +26 -113
- package/esm2022/lib/workflow-services/responsibility.service.mjs +60 -55
- package/fesm2022/vcomply-workflow-engine.mjs +4796 -4532
- package/fesm2022/vcomply-workflow-engine.mjs.map +1 -1
- package/lib/add-multiple-responsibility-with-tab/add-multiple-responsibility-with-tab.component.d.ts +0 -3
- package/lib/constants/api.constants.d.ts +5 -0
- package/lib/interfaces/frequency.interface.d.ts +37 -0
- package/lib/interfaces/iframe-type.d.ts +5 -0
- package/lib/interfaces/responsibilty.interface.d.ts +13 -13
- package/lib/services/common.service.d.ts +28 -0
- package/lib/services/iframe.service.d.ts +6 -0
- package/lib/sharedComponents/bulk-responsibility-view/bulk-responsibility-view.component.d.ts +0 -6
- package/lib/sharedComponents/format-and-evidence/format-and-evidence.component.d.ts +1 -4
- package/lib/sharedComponents/frequency/frequency-random/frequency-random.component.d.ts +1 -0
- package/lib/sharedComponents/frequency/frequency.service.d.ts +92 -2
- package/lib/sharedComponents/link-responsibility/link-responsibility.component.d.ts +2 -1
- package/lib/sharedComponents/link-responsibility/link-responsibility.module.d.ts +2 -1
- package/lib/sharedComponents/list-container/list-container.component.d.ts +9 -0
- package/lib/sharedComponents/program-list/constant.d.ts +20 -0
- package/lib/sharedComponents/program-list/interfaces/data-source.interface.d.ts +4 -0
- package/lib/sharedComponents/program-list/interfaces/list-item.interface.d.ts +5 -0
- package/lib/sharedComponents/program-list/pipes/check-selected-items.pipes.d.ts +7 -0
- package/lib/sharedComponents/program-list/program-list/program-list.component.d.ts +125 -0
- package/lib/sharedComponents/program-list/program-list.module.d.ts +15 -0
- package/lib/sharedComponents/program-list/services/list-utils.service.d.ts +7 -0
- package/lib/sharedComponents/program-list/services/program-list-api.service.d.ts +14 -0
- package/lib/ui-kit/loaders/loaders.module.d.ts +8 -0
- package/lib/ui-kit/loaders/table-loader/table-loader.component.d.ts +9 -0
- package/lib/workflow/grc-object/grc-object-container/grc-object-container.component.d.ts +5 -1
- package/lib/workflow/shared/components/grc-category-listing/grc-category-listing.component.d.ts +3 -1
- package/lib/workflow/shared/components/program-responsibility-listing/program-responsibility-listing.component.d.ts +6 -2
- package/lib/workflow/shared/services/grc.service.d.ts +1 -0
- package/lib/workflow/shared/workflow-pipes/get-user-details.pipe.d.ts +7 -0
- package/lib/workflow/shared/workflow-pipes/workflow-pipes.module.d.ts +3 -2
- package/lib/workflow-compliance/workflow-compliance.component.d.ts +32 -10
- package/lib/workflow-engine-container/api-constants.d.ts +1 -0
- package/lib/workflow-engine-container/workflow-engine-container.component.d.ts +5 -2
- package/lib/workflow-engine.module.d.ts +3 -2
- package/lib/workflow-policy/workflow-policy.component.d.ts +9 -0
- package/lib/workflow-program/workflow-program.component.d.ts +8 -4
- package/lib/workflow-risk/workflow-risk.component.d.ts +1 -1
- package/lib/workflow-services/policy.service.d.ts +1 -1
- package/lib/workflow-services/programs.service.d.ts +13 -53
- package/lib/workflow-services/responsibility.service.d.ts +17 -4
- package/package.json +1 -1
- package/esm2022/lib/constants/policy.constant.mjs +0 -6
- package/esm2022/lib/constants/regix.constants.mjs +0 -4
- package/esm2022/lib/constants/responsibility.mjs +0 -8
- package/esm2022/lib/interfaces/policy.interface.mjs +0 -2
- package/esm2022/lib/sharedComponents/pipes/risk-class.pipe.mjs +0 -19
- package/lib/constants/policy.constant.d.ts +0 -2
- package/lib/constants/regix.constants.d.ts +0 -3
- package/lib/constants/responsibility.d.ts +0 -7
- package/lib/interfaces/policy.interface.d.ts +0 -5
- package/lib/sharedComponents/pipes/risk-class.pipe.d.ts +0 -7
package/lib/add-multiple-responsibility-with-tab/add-multiple-responsibility-with-tab.component.d.ts
CHANGED
|
@@ -64,8 +64,6 @@ export declare class AddMultipleResponsibilityWithTabComponent implements OnInit
|
|
|
64
64
|
responsibilityData: any;
|
|
65
65
|
featureflag: any;
|
|
66
66
|
ffBulkUploadOptimization: boolean;
|
|
67
|
-
isDayInvalid: boolean;
|
|
68
|
-
isDateFormatInvalid: boolean;
|
|
69
67
|
constructor(riskService: AddRiskService, responsibilityService: ResponsibilityService, authService: AuthService, frequencyService: FrequencyBulkService, snackBar: SnackBarService, iframeService: IframeService);
|
|
70
68
|
ngOnChanges(changes: SimpleChanges): void;
|
|
71
69
|
ngOnInit(): void;
|
|
@@ -134,7 +132,6 @@ export declare class AddMultipleResponsibilityWithTabComponent implements OnInit
|
|
|
134
132
|
* @returns An object with the following properties:
|
|
135
133
|
*/
|
|
136
134
|
setReportDetails(report: any, tabType: string, isProgram: boolean): any;
|
|
137
|
-
isValidRiskClass(riskClass: any): boolean;
|
|
138
135
|
/**
|
|
139
136
|
* It takes a string, removes all whitespace, and returns the string
|
|
140
137
|
* @param {any} name - the name of the responsibility
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface FrequencyObject {
|
|
2
|
+
type: 'one_time' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'semester' | 'yearly' | 'random' | 'ongoing' | 'on_completion_of' | 'biannually';
|
|
3
|
+
endAfter: number;
|
|
4
|
+
startBefore: number;
|
|
5
|
+
autoDeactivate: number;
|
|
6
|
+
day: number;
|
|
7
|
+
time: string;
|
|
8
|
+
repeatOptions?: RepeatOptions;
|
|
9
|
+
random?: Random | {};
|
|
10
|
+
onComplete?: OnComplete | {};
|
|
11
|
+
onGoing?: OnGoing | {};
|
|
12
|
+
}
|
|
13
|
+
interface RepeatOptions {
|
|
14
|
+
every: number;
|
|
15
|
+
repeatOn: string;
|
|
16
|
+
lifecycle: Lifecycle;
|
|
17
|
+
}
|
|
18
|
+
interface Random {
|
|
19
|
+
type: string;
|
|
20
|
+
occurrences: number;
|
|
21
|
+
}
|
|
22
|
+
interface OnComplete {
|
|
23
|
+
rId: number;
|
|
24
|
+
aId: number;
|
|
25
|
+
rcId: number;
|
|
26
|
+
startAfter: number;
|
|
27
|
+
}
|
|
28
|
+
interface OnGoing {
|
|
29
|
+
reminders: number;
|
|
30
|
+
startOf: 'week' | 'month' | 'quarter' | 'semester' | 'year';
|
|
31
|
+
}
|
|
32
|
+
interface Lifecycle {
|
|
33
|
+
startFrom: string;
|
|
34
|
+
endBy: string | undefined;
|
|
35
|
+
endAfter: number | undefined;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
interface Frequency {
|
|
2
|
-
type:
|
|
2
|
+
type: string;
|
|
3
3
|
}
|
|
4
4
|
interface Assignee {
|
|
5
|
-
type: 'all' | '
|
|
5
|
+
type: 'all' | 'any';
|
|
6
6
|
userId: number[];
|
|
7
7
|
userGroupId: number[];
|
|
8
8
|
}
|
|
@@ -11,11 +11,11 @@ interface ResponsibilityCenter {
|
|
|
11
11
|
id: number[];
|
|
12
12
|
}
|
|
13
13
|
interface ReviewerFrequency {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
completeBy: number;
|
|
15
|
+
endAfter: number;
|
|
16
16
|
}
|
|
17
17
|
interface Reviewer {
|
|
18
|
-
type: 'sequential' | '
|
|
18
|
+
type: 'sequential' | 'any';
|
|
19
19
|
frequency: ReviewerFrequency;
|
|
20
20
|
userId: number[];
|
|
21
21
|
}
|
|
@@ -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,34 @@ 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
|
+
pid: string;
|
|
32
|
+
}>>, linkedProgramIds?: string[]): {
|
|
33
|
+
added: string[];
|
|
34
|
+
removed: string[];
|
|
35
|
+
};
|
|
36
|
+
transformResponsibilitiesData(currentResponsibilityIds: number[], linkedResponsibilityIds?: number[]): {
|
|
37
|
+
added: number[];
|
|
38
|
+
removed: number[];
|
|
39
|
+
};
|
|
12
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommonService, never>;
|
|
13
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<CommonService>;
|
|
14
42
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class IframeService {
|
|
3
3
|
redirectIfInIframe(targetUrl: string, mode?: boolean): void;
|
|
4
|
+
postMessage(message: any): void;
|
|
5
|
+
private getOrigin;
|
|
6
|
+
getCloseWebviewMessage(event: string, data: any): {
|
|
7
|
+
event: string;
|
|
8
|
+
data: any;
|
|
9
|
+
};
|
|
4
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<IframeService, never>;
|
|
5
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<IframeService>;
|
|
6
12
|
}
|
package/lib/sharedComponents/bulk-responsibility-view/bulk-responsibility-view.component.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class BulkResponsibilityViewComponent {
|
|
4
|
-
VALIDATION_MESSAGES: {
|
|
5
|
-
RISK_CLASS: string;
|
|
6
|
-
DAY: string;
|
|
7
|
-
DATE_FORMAT: string;
|
|
8
|
-
DUE_DATE: string;
|
|
9
|
-
};
|
|
10
4
|
responsibilityBulkUpload: any;
|
|
11
5
|
fileName: any;
|
|
12
6
|
defaultOwner: any;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import { AuthService } from '../../workflow-services/auth.service';
|
|
3
3
|
import { PolicyService } from '../../workflow-services/policy.service';
|
|
4
|
-
import { SnackBarService } from '../../ui-kit/snack-bar/snack-bar.service';
|
|
5
4
|
import { ResponsibilityService } from '../../workflow-services/responsibility.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class FormatAndEvidenceComponent implements OnInit {
|
|
8
7
|
private responsibilityService;
|
|
9
8
|
private policyService;
|
|
10
9
|
private authService;
|
|
11
|
-
private snackbarService;
|
|
12
10
|
ASSETS: {
|
|
13
11
|
responsibility_center: string;
|
|
14
12
|
case_type: string;
|
|
@@ -70,7 +68,7 @@ export declare class FormatAndEvidenceComponent implements OnInit {
|
|
|
70
68
|
set formatEvidanceData(value: any);
|
|
71
69
|
isNewLinkDisabled: boolean;
|
|
72
70
|
isEditDisabled: boolean;
|
|
73
|
-
constructor(responsibilityService: ResponsibilityService, policyService: PolicyService, authService: AuthService
|
|
71
|
+
constructor(responsibilityService: ResponsibilityService, policyService: PolicyService, authService: AuthService);
|
|
74
72
|
formate: any;
|
|
75
73
|
newLink: {
|
|
76
74
|
link: string;
|
|
@@ -85,7 +83,6 @@ export declare class FormatAndEvidenceComponent implements OnInit {
|
|
|
85
83
|
editLink(index: number): void;
|
|
86
84
|
deleteLink(index: number): void;
|
|
87
85
|
resetNewLink(): void;
|
|
88
|
-
private fileProcessing;
|
|
89
86
|
onFileDropped(files: any): void;
|
|
90
87
|
uploadFile(file: any, uid: string): void;
|
|
91
88
|
deleteAttachment(index: number): void;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Configurations } from '../../configurations';
|
|
3
3
|
import { AuthService } from '../../workflow-services/auth.service';
|
|
4
|
+
import { FrequencyObject } from '../../interfaces/frequency.interface';
|
|
5
|
+
import { GrcService } from '../../workflow/shared/services/grc.service';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class FrequencyService {
|
|
6
8
|
private http;
|
|
7
9
|
private authService;
|
|
10
|
+
private grcService;
|
|
8
11
|
monthArray: Array<string>;
|
|
9
12
|
dayName: Array<string>;
|
|
10
13
|
quarterlyMonth: Array<string>;
|
|
@@ -30,7 +33,7 @@ export declare class FrequencyService {
|
|
|
30
33
|
};
|
|
31
34
|
frequencyDetails: object;
|
|
32
35
|
private env;
|
|
33
|
-
constructor(http: HttpClient, authService: AuthService, config?: Configurations);
|
|
36
|
+
constructor(http: HttpClient, authService: AuthService, grcService: GrcService, config?: Configurations);
|
|
34
37
|
timeFrom12hTo24h(value: string): string;
|
|
35
38
|
timeIn12(value: any): string;
|
|
36
39
|
frameworkStartDate(row: any): number;
|
|
@@ -46,7 +49,94 @@ export declare class FrequencyService {
|
|
|
46
49
|
changeTimeZone(date: any): Date;
|
|
47
50
|
getResponsibilityList(payload: any): import("rxjs").Observable<any>;
|
|
48
51
|
getResponsibilitiesCount(payload: any): import("rxjs").Observable<any>;
|
|
52
|
+
getAllResponsibilities(pageNo: number): import("rxjs").Observable<any[]>;
|
|
49
53
|
formatDate(): string;
|
|
50
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Converts a frequency configuration object into a standardized FrequencyObject format.
|
|
56
|
+
*
|
|
57
|
+
* @param frequency - The input frequency configuration object with the following properties:
|
|
58
|
+
* - case: The type of frequency ('one_time' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'semester' | 'yearly' | 'random' | 'ongoing' | 'on_completion_of' | 'biannually')
|
|
59
|
+
* - window: Number of days before the task can be started
|
|
60
|
+
* - failedAfter: Number of days after which the task is considered failed
|
|
61
|
+
* - continuous_failed_days: Number of days after which the task is auto-deactivated
|
|
62
|
+
* - day: The day of occurrence
|
|
63
|
+
* - timeIn24Hr: Time in 24-hour format
|
|
64
|
+
* - every: Frequency interval
|
|
65
|
+
* - selectedDay: Array of selected days for weekly frequency (1-7 representing Monday-Sunday)
|
|
66
|
+
* - selectedMonth: Array of selected months (0-11 representing January-December)
|
|
67
|
+
* - startFrom: Unix timestamp for the start date
|
|
68
|
+
* - lifecycleDetails: String in format "YYYY-MM-DD~~N" where N is the number of occurrences
|
|
69
|
+
* - randomTypeSelected: Index for random frequency type (0: weekly, 1: monthly, 2: quarterly, 3: yearly)
|
|
70
|
+
* - randomInstances: Number of random occurrences
|
|
71
|
+
* - selectedType: Number of reminders for ongoing frequency
|
|
72
|
+
* - selectedOngoingType: Index for ongoing frequency type (1: week, 2: month, 3: quarter, 4: semester, 5: year)
|
|
73
|
+
*
|
|
74
|
+
* @returns A FrequencyObject with the following structure:
|
|
75
|
+
* - type: Frequency type
|
|
76
|
+
* - startBefore: Days before task can start
|
|
77
|
+
* - endAfter: Days after which task fails
|
|
78
|
+
* - autoDeactivate: Days after which task is deactivated
|
|
79
|
+
* - day: Day of occurrence
|
|
80
|
+
* - time: Time in 24-hour format
|
|
81
|
+
* - repeatOptions: {
|
|
82
|
+
* every: number,
|
|
83
|
+
* repeatOn: string (binary representation of selected days/months),
|
|
84
|
+
* lifecycle: {
|
|
85
|
+
* startFrom: string (YYYY-MM-DD),
|
|
86
|
+
* endBy?: string (YYYY-MM-DD),
|
|
87
|
+
* endAfter?: number
|
|
88
|
+
* }
|
|
89
|
+
* }
|
|
90
|
+
* - random?: { type: string, occurrence: number }
|
|
91
|
+
* - onComplete: {}
|
|
92
|
+
* - onGoing: { reminders: number, startOf: 'week' | 'month' | 'quarter' | 'semester' | 'year' }
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const frequency = {
|
|
97
|
+
* case: 'weekly',
|
|
98
|
+
* window: 2,
|
|
99
|
+
* failedAfter: 1,
|
|
100
|
+
* continuous_failed_days: 3,
|
|
101
|
+
* day: 1,
|
|
102
|
+
* timeIn24Hr: '09:00:00',
|
|
103
|
+
* every: 1,
|
|
104
|
+
* selectedDay: [1, 3, 5], // Monday, Wednesday, Friday
|
|
105
|
+
* startFrom: 1678900000,
|
|
106
|
+
* lifecycleDetails: '2024-12-31~~10'
|
|
107
|
+
* };
|
|
108
|
+
* const result = setFrequencyObject(frequency);
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
setFrequencyObject(frequency: any): FrequencyObject | null;
|
|
112
|
+
repeatOptions(frequency: any): string;
|
|
113
|
+
getOngoing(frequency: any): {
|
|
114
|
+
reminders: any;
|
|
115
|
+
startOf: string;
|
|
116
|
+
};
|
|
117
|
+
getRandomFrequency(frequency: any): {
|
|
118
|
+
type: string;
|
|
119
|
+
occurrence: any;
|
|
120
|
+
};
|
|
121
|
+
createFrequencyPattern(frequency: any): string;
|
|
122
|
+
getDay(repeatOptions: string): string;
|
|
123
|
+
getMonth(repeatOptions: string): string;
|
|
124
|
+
getLifecyclePattern(frequency: any): {
|
|
125
|
+
startFrom: number;
|
|
126
|
+
pattern: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Converts a date string in "YYYY-MM-DD" format to "DD-Month-YYYY~~0".
|
|
130
|
+
*
|
|
131
|
+
* @param {string} dateString - The input date string in "YYYY-MM-DD" format.
|
|
132
|
+
* @returns {string} - The formatted date string in "DD-Month-YYYY~~0" format.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* formatDateString("2025-03-27"); // Returns "27-March-2025~~0"
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
formatDateString(dateString: string): string;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FrequencyService, [null, null, null, { optional: true; }]>;
|
|
51
141
|
static ɵprov: i0.ɵɵInjectableDeclaration<FrequencyService>;
|
|
52
142
|
}
|
|
@@ -57,7 +57,8 @@ export declare class LinkResponsibilityListComponent implements OnInit {
|
|
|
57
57
|
ngOnInit(): void;
|
|
58
58
|
back(): void;
|
|
59
59
|
getResponsibilityValues(): void;
|
|
60
|
-
getResponsibilityList(): void;
|
|
60
|
+
getResponsibilityList(pageNo?: number): void;
|
|
61
|
+
private mapResponsibilitiesData;
|
|
61
62
|
responsibilityPageChange(pageNumber: number): void;
|
|
62
63
|
deleteItem(item: any): void;
|
|
63
64
|
save(event: any): void;
|
|
@@ -8,8 +8,9 @@ import * as i6 from "../../formgroup/formgroup.module";
|
|
|
8
8
|
import * as i7 from "../no-data/no-data.module";
|
|
9
9
|
import * as i8 from "../v-loader/v-loader.module";
|
|
10
10
|
import * as i9 from "../../ui-kit/popover/popover.module";
|
|
11
|
+
import * as i10 from "../../ui-kit/pagination/pagination.module";
|
|
11
12
|
export declare class LinkResponsibilityModule {
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<LinkResponsibilityModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LinkResponsibilityModule, [typeof i1.LinkResponsibilityListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PipesModule, typeof i5.FloatingBarModule, typeof i6.FormgroupModule, typeof i7.NoDataModule, typeof i8.VLoaderModule, typeof i9.PopoverModule], [typeof i1.LinkResponsibilityListComponent]>;
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LinkResponsibilityModule, [typeof i1.LinkResponsibilityListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PipesModule, typeof i5.FloatingBarModule, typeof i6.FormgroupModule, typeof i7.NoDataModule, typeof i8.VLoaderModule, typeof i9.PopoverModule, typeof i10.PaginationModule], [typeof i1.LinkResponsibilityListComponent]>;
|
|
14
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<LinkResponsibilityModule>;
|
|
15
16
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ListContainerComponent {
|
|
4
|
+
heading: string;
|
|
5
|
+
close: EventEmitter<void>;
|
|
6
|
+
onClose(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListContainerComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListContainerComponent, "app-list-container", never, { "heading": { "alias": "heading"; "required": false; }; }, { "close": "close"; }, never, ["[body]", "[footer]"], false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const PROGRAM_TABLE_HEADERS: string[];
|
|
2
|
+
export declare const PAGINATION_OPTIONS: {
|
|
3
|
+
PAGE_SIZE: number;
|
|
4
|
+
DEFAULT_CURRENT_PAGE: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const PROGRAM_TYPE_LIST: {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const PROGRAM_OBJECT: {
|
|
11
|
+
regulations: number;
|
|
12
|
+
standards: number;
|
|
13
|
+
internal_controls: number;
|
|
14
|
+
others: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const PROGRAM_NO_DATA: {
|
|
17
|
+
programList: string;
|
|
18
|
+
categoryList: string;
|
|
19
|
+
search: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CheckSelectedItemsPipe implements PipeTransform {
|
|
4
|
+
transform(id: string, selectedItems: any): boolean;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckSelectedItemsPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CheckSelectedItemsPipe, "checkSelectedItems", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ListItem } from '../interfaces/list-item.interface';
|
|
3
|
+
import { ListUtilsService } from '../services/list-utils.service';
|
|
4
|
+
import { ProgramListApiService } from '../services/program-list-api.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* A reusable component for displaying and managing a list of programs with filtering, pagination, and category viewing capabilities.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Program listing with pagination
|
|
11
|
+
* - Search functionality with debounce
|
|
12
|
+
* - Program type filtering
|
|
13
|
+
* - Category viewing for selected programs
|
|
14
|
+
* - Multi-select capability
|
|
15
|
+
*
|
|
16
|
+
* @template T Extends ListItem interface for type safety of list items
|
|
17
|
+
*/
|
|
18
|
+
export declare class ProgramListComponent<T extends ListItem> implements OnInit, OnChanges, OnDestroy {
|
|
19
|
+
private listUtils;
|
|
20
|
+
private programListApiService;
|
|
21
|
+
/** Array of items to be displayed in the list */
|
|
22
|
+
items: T[];
|
|
23
|
+
/** Object containing selected items, keyed by program ID */
|
|
24
|
+
selectedItems: any | null;
|
|
25
|
+
/** URL configuration object for API endpoints */
|
|
26
|
+
url: any;
|
|
27
|
+
/** Event emitted when an item is selected */
|
|
28
|
+
itemSelected: EventEmitter<T>;
|
|
29
|
+
/** Event emitted when an item is deselected */
|
|
30
|
+
itemDeselected: EventEmitter<T>;
|
|
31
|
+
/** Event emitted when the selection changes */
|
|
32
|
+
itemsSelectedChange: EventEmitter<T[]>;
|
|
33
|
+
tableHeaders: string[];
|
|
34
|
+
currentPage: number;
|
|
35
|
+
pageSize: number;
|
|
36
|
+
totalPages: number;
|
|
37
|
+
searchTerm: string;
|
|
38
|
+
paginatedItems: T[];
|
|
39
|
+
activeProgram: any | null;
|
|
40
|
+
categoryList: any[];
|
|
41
|
+
programTypeList: any[];
|
|
42
|
+
selectedProgramType: any[];
|
|
43
|
+
loaderState: any;
|
|
44
|
+
appliedProgramType: any[];
|
|
45
|
+
PROGRAM_NO_DATA: any;
|
|
46
|
+
ASSETS: any;
|
|
47
|
+
/** Subject for handling debounced search */
|
|
48
|
+
private searchSubject;
|
|
49
|
+
/** Subject for cleanup subscriptions */
|
|
50
|
+
private destroy$;
|
|
51
|
+
constructor(listUtils: ListUtilsService, programListApiService: ProgramListApiService);
|
|
52
|
+
/** Initialize component by fetching program list */
|
|
53
|
+
ngOnInit(): void;
|
|
54
|
+
/** Handle changes to inputs */
|
|
55
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
56
|
+
/** Fetch program list from API */
|
|
57
|
+
getProgramList(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Load data and initialize pagination
|
|
60
|
+
* @param data Array of items to load
|
|
61
|
+
*/
|
|
62
|
+
loadData(data: any): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handle item selection/deselection
|
|
65
|
+
* @param event Selection event
|
|
66
|
+
* @param item Item being selected/deselected
|
|
67
|
+
*/
|
|
68
|
+
selectItem(event: any, item: any): void;
|
|
69
|
+
/**
|
|
70
|
+
* Deselect a specific item
|
|
71
|
+
* @param item Item to deselect
|
|
72
|
+
*/
|
|
73
|
+
deselectItem(item: T): void;
|
|
74
|
+
/**
|
|
75
|
+
* Check if an item is selected
|
|
76
|
+
* @param item Item to check
|
|
77
|
+
* @returns Boolean indicating if item is selected
|
|
78
|
+
*/
|
|
79
|
+
isSelected(item: T): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Navigate to specific page
|
|
82
|
+
* @param page Page number to navigate to
|
|
83
|
+
* @param data Data to paginate
|
|
84
|
+
*/
|
|
85
|
+
goToPage(page: number, data: any): void;
|
|
86
|
+
/**
|
|
87
|
+
* Get array of page numbers for pagination
|
|
88
|
+
* @returns Array of page numbers
|
|
89
|
+
*/
|
|
90
|
+
getPageNumbers(): number[];
|
|
91
|
+
/**
|
|
92
|
+
* Paginate items and update view
|
|
93
|
+
* @param data Data to paginate
|
|
94
|
+
*/
|
|
95
|
+
paginateItems(data: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* View categories for a selected program
|
|
98
|
+
* @param item Program to view categories for
|
|
99
|
+
*/
|
|
100
|
+
viewCategory(item?: any): void;
|
|
101
|
+
/**
|
|
102
|
+
* Add parent tree information to categories
|
|
103
|
+
* @param categories Array of categories
|
|
104
|
+
* @returns Categories with parent tree information
|
|
105
|
+
*/
|
|
106
|
+
addParentTreeToCategories(categories: any[]): any[];
|
|
107
|
+
/**
|
|
108
|
+
* Handle program type filter selection
|
|
109
|
+
* @param event Selection event
|
|
110
|
+
* @param item Program type being selected/deselected
|
|
111
|
+
*/
|
|
112
|
+
selectFilter(event: any, item: any): void;
|
|
113
|
+
/** Reset all applied filters */
|
|
114
|
+
resetFilter(): void;
|
|
115
|
+
/** Apply selected filters to the program list */
|
|
116
|
+
onFilterChange(): void;
|
|
117
|
+
/** Trigger debounced search */
|
|
118
|
+
search(): void;
|
|
119
|
+
/** Perform search on items */
|
|
120
|
+
private performSearch;
|
|
121
|
+
/** Cleanup subscriptions on component destruction */
|
|
122
|
+
ngOnDestroy(): void;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgramListComponent<any>, never>;
|
|
124
|
+
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>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./program-list/program-list.component";
|
|
3
|
+
import * as i2 from "./pipes/check-selected-items.pipes";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "../../formgroup/formgroup.module";
|
|
7
|
+
import * as i6 from "../../ui-kit/no-data/no-data.module";
|
|
8
|
+
import * as i7 from "../../ui-kit/popover/popover.module";
|
|
9
|
+
import * as i8 from "../../ui-kit/loaders/loaders.module";
|
|
10
|
+
import * as i9 from "../../pipes/pipes.module";
|
|
11
|
+
export declare class ProgramListModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgramListModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ProgramListModule, [typeof i1.ProgramListComponent, typeof i2.CheckSelectedItemsPipe], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.FormgroupModule, typeof i6.NoDataModule, typeof i7.PopoverModule, typeof i8.LoadersModule, typeof i9.PipesModule], [typeof i1.ProgramListComponent]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ProgramListModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ListUtilsService {
|
|
3
|
+
paginate<T>(items: T[], currentPage: number, pageSize: number): T[];
|
|
4
|
+
getPageNumbers(totalItems: number, pageSize: number): number[];
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListUtilsService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ListUtilsService>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Configurations } from '../../../configurations';
|
|
4
|
+
import { AuthService } from '../../../workflow-services/auth.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ProgramListApiService {
|
|
7
|
+
private http;
|
|
8
|
+
private authService;
|
|
9
|
+
env: any;
|
|
10
|
+
constructor(http: HttpClient, authService: AuthService, config?: Configurations);
|
|
11
|
+
getProgramList(apiUrl: string): Observable<any>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgramListApiService, [null, null, { optional: true; }]>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProgramListApiService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./table-loader/table-loader.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class LoadersModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadersModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LoadersModule, [typeof i1.TableLoaderComponent], [typeof i2.CommonModule], [typeof i1.TableLoaderComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LoadersModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class TableLoaderComponent implements OnInit {
|
|
4
|
+
listSize: number[];
|
|
5
|
+
constructor();
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableLoaderComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableLoaderComponent, "app-table-loader", never, { "listSize": { "alias": "listSize"; "required": false; }; }, {}, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -8,6 +8,7 @@ import { UiKitService } from '../../../workflow-services/ui-kit.service';
|
|
|
8
8
|
import { ComplianceCommonService } from '../../../workflow-services/common-workflow-services/compliance-common.service';
|
|
9
9
|
import { OrganizationCommonService } from '../../../workflow-services/common-workflow-services/organization-common.service';
|
|
10
10
|
import { IframeService } from '../../../services/iframe.service';
|
|
11
|
+
import { CommonService } from '../../../services/common.service';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
export declare class GrcObjectContainerComponent implements OnInit, OnDestroy {
|
|
13
14
|
private grcService;
|
|
@@ -17,6 +18,7 @@ export declare class GrcObjectContainerComponent implements OnInit, OnDestroy {
|
|
|
17
18
|
private complianceCommonService;
|
|
18
19
|
private organizationCommonService;
|
|
19
20
|
private iframeService;
|
|
21
|
+
private CommonService;
|
|
20
22
|
MODE: 'CREATE' | 'EDIT';
|
|
21
23
|
ID: string;
|
|
22
24
|
ALL_TEXT: {
|
|
@@ -96,6 +98,7 @@ export declare class GrcObjectContainerComponent implements OnInit, OnDestroy {
|
|
|
96
98
|
selectedProgram: any[];
|
|
97
99
|
selectedResponsibility: any[];
|
|
98
100
|
submitLoader: boolean;
|
|
101
|
+
linkedResponsibilities: any;
|
|
99
102
|
populateOption: EventEmitter<any>;
|
|
100
103
|
pickerChanged: EventEmitter<any>;
|
|
101
104
|
closeWorkflow: EventEmitter<any>;
|
|
@@ -104,7 +107,7 @@ export declare class GrcObjectContainerComponent implements OnInit, OnDestroy {
|
|
|
104
107
|
hideElementsFromMoreOptions: EventEmitter<any>;
|
|
105
108
|
otherGRCSubscription: Subscription;
|
|
106
109
|
hideMoreOption: any;
|
|
107
|
-
constructor(grcService: GrcService, apiService: ResponsibilityService, authService: AuthService, uiKitService: UiKitService, complianceCommonService: ComplianceCommonService, organizationCommonService: OrganizationCommonService, iframeService: IframeService);
|
|
110
|
+
constructor(grcService: GrcService, apiService: ResponsibilityService, authService: AuthService, uiKitService: UiKitService, complianceCommonService: ComplianceCommonService, organizationCommonService: OrganizationCommonService, iframeService: IframeService, CommonService: CommonService);
|
|
108
111
|
ngOnDestroy(): void;
|
|
109
112
|
ngOnInit(): void;
|
|
110
113
|
getSubscriptionDetails(): void;
|
|
@@ -170,6 +173,7 @@ export declare class GrcObjectContainerComponent implements OnInit, OnDestroy {
|
|
|
170
173
|
resetOtherGRCCard(): void;
|
|
171
174
|
resetDataOnRCChange(): void;
|
|
172
175
|
resetMoreOptionsOnRCChange(): void;
|
|
176
|
+
getAllResponsibilities(): void;
|
|
173
177
|
static ɵfac: i0.ɵɵFactoryDeclaration<GrcObjectContainerComponent, never>;
|
|
174
178
|
static ɵcmp: i0.ɵɵComponentDeclaration<GrcObjectContainerComponent, "lib-grc-object-container", never, { "grcType": { "alias": "grcType"; "required": false; }; "MODE": { "alias": "MODE"; "required": false; }; "ID": { "alias": "ID"; "required": false; }; }, { "populateOption": "populateOption"; "pickerChanged": "pickerChanged"; "closeWorkflow": "closeWorkflow"; "disconnectRefresh": "disconnectRefresh"; "resetForm": "resetForm"; "hideElementsFromMoreOptions": "hideElementsFromMoreOptions"; }, never, never, false, never>;
|
|
175
179
|
}
|