import { KeyValue } from '@angular/common'; import { OnDestroy, OnInit } from '@angular/core'; import { EditorConfig } from '@vcomply/editor'; import { SubSink } from '../../subsink.class'; import { DialogConfig } from '../../ui-kit/dialog/dialog-config'; import { DialogRef } from '../../ui-kit/dialog/dialog-ref'; import { SnackBarService } from '../../ui-kit/snack-bar/snack-bar.service'; import { QuickViewService } from '../services/quick-view.service'; import * as i0 from "@angular/core"; export declare class InherentRiskAssessmentDialogComponent implements OnInit, OnDestroy { private dialog; dialogConfig: DialogConfig; private snackBarService; private quickView; animation: boolean; hideControls: number; hideGuide: boolean; selectedRcIndex: number; riskAssessmentData: any; assessmentEditorIndex: number; PREVIOUS_APPLY_SAME_VALUE: boolean; isApplySame: boolean; lastSelectedIndex: number; errorPresent: boolean; loader: boolean; automationEnabled: boolean; riskProperties: { errorMessage: string; riskAssessment: { scoreUpdated: string; weightageHelpingText: string; assessmentConfirmParticipant: string; disabledAssessmentButton: string; incompleteAssessment: string; assessmentCompleted: string; editAssessment: string; saveForLater: string; myScoreApplied: string; avgScoreApplied: string; skipControlAssessment: string; revertSkippedAssessment: string; performanceHelpingText: string; effectivnessHelpingText: string; completeIfControlEnabled: string; completeIfControlDisabled: string; myScoreConfirmation: string; averageScoreConfirmation: string; myScoreButton: string; averageScoreButton: string; acceptedWithAutomation: string; transferredWithAutomation: string; mitigatedWithAutomation: string; avoidedWithAutomation: string; automationWithoutStrategy: string; editRatingConfirmation: string; editRatingSuccessful: string; updateDeadline: string; updateDeadlineConfirmed: string; applySameForAllRC: string; applyNotSameForAllRC: string; inherentConfirmationMessage: string; }; manageRisk: { deleteRiskSuccessful: string; deleteMultipleRisksSuccessful: string; oversightAdded: string; descriptionUpdated: string; riskMoved: string; responseStrategyUpdated: string; }; riskTreatment: { enableSameRating: string; disableSameRating: string; weightageHelpingText: string; effectivnessHelpingText: string; rcHelpingText: string; completeStepConfirmation: string; saveForLater: string; treatmentPlanSaveForLater: string; treatmentCompleted: string; treatmentMoreThanOnce: string; treatmentPlanMoreThanOnce: string; editRatingConfirmation: string; treatmentRestart: string; controlRemoved: string; treatmentPlanRemoved: string; predefinedAutomationRules: string; }; riskWorkshop: { createWorkshop: string; createWorkshopSave: string; deleteWorkshop: string; deleteParticipant: string; deleteWorkshopDialog: string; deleteParticipantDialog: string; sendInvite: string; resendInvite: string; }; discussionBoard: { commentAdded: string; singleFileUpload: string; multipleFilesUpload: string; fileAndComment: string; deleteComment: string; deleteFile: string; }; }; private tempAutomationPayload; responseStrategyActive: boolean; confirmationMessage: string; private respStartegyMessage; automationMessage: string; onConfirmationPopup: boolean; automationRadio: Array; automationType: string; showInherentConfirmation: boolean; inherentMessage: string; subscriptions: SubSink; constructor(dialog: DialogRef, dialogConfig: DialogConfig, snackBarService: SnackBarService, quickView: QuickViewService); ngOnInit(): void; closeForm(type?: any): void; description: EditorConfig; showControls(index: number): void; showGuide(): void; closeGuide(): void; InitializeValues(): void; /** * It takes in 5 parameters, and updates the score, scoreName, scoreColor, and calculation_value * properties of the riskAssessmentData object. * @param {number} scoringCriteriaValue - number, scoringCriteriaKey: string, scoreValue: string, * weightageValue: number, scoreColor: string * @param {string} scoringCriteriaKey - string * @param {string} scoreValue - string * @param {number} weightageValue - number = 0; * @param {string} scoreColor - string = '#ffffff'; */ updateRating(scoringCriteriaValue: number, scoringCriteriaKey: string, scoreValue: string, weightageValue: number, scoreColor: string): void; /** * Calculates the total score for a risk for a particular user */ calculateTotalScore(): void; /** * Validates for error for all risk factors on complete RC */ checkForRcLevelError(): void; /** * Checks if error is present in any rc ratings */ checkForOverallError(): void; /** * Keeps the order of key value pairs as per the response from server side * @param a * @param b * @returns */ originalOrder: (a: KeyValue, b: KeyValue) => number; /** * Can be removed * @param reason Explanation for each score criteria selected * @param scoreCriteria Risk factor for which explanation is modified */ updateReason(reason: string, scoreCriteria: string): void; /** * Initialises the structure and values for the selected RC * @param rcIndex Index of rc for which scores need to be selected */ updateSelectedDetails(rcIndex: number): void; /** * It takes an event, and if the event is true, it sets the assessmentDetails of each element in the * inherentDetails array to the assessmentDetails of the element at the selectedRcIndex. If the event * is false, it sets the assessmentDetails of each element in the inherentDetails array to an empty * array, unless the index of the element is the same as the selectedRcIndex. * @param {any} event - any - this is the checkbox value */ applySameRating(event: any): void; /** * Checks if automation rules are applied or not */ checkForAutomation(): void; /** * Save the details if automation rules are not applied */ saveCompletedDetails(): void; /** * Validates the scores selected by user on click of Next button * @returns The flag indicating if error is present or not */ validateScore(): boolean; /** * Saves the assessment details on server side * @param payload Details to be saved on server side * @param automationEnabled Flag to check whether automation rules are applied or not */ saveAssessmentDetailsOnServer(payload: any, automationEnabled: number): void; /** * * @param saveForLaterFlag Flag to check whether user clicked on save for later or next */ saveDetails(saveForLaterFlag: boolean): void; inherentAction(event: any): void; onReason(event: any, key: string): void; onAction(event: string): void; onApplySameForRC(event: boolean): void; getAutomationButton(event: boolean): void; onSelected(event: string): void; closeConfirmation(closeType: string): void; onKeydownHandler(event: KeyboardEvent): void; setAllRCSameValue(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }