import { OnDestroy, OnInit } from '@angular/core'; import { Subscription } from 'rxjs'; import { SubSink } from '../../../subsink.class'; import { DialogConfig } from '../../../ui-kit/dialog/dialog-config'; import { DialogRef } from '../../../ui-kit/dialog/dialog-ref'; import { DialogService } from '../../../ui-kit/dialog/dialog.service'; import { AuthService } from '../../services/auth.service'; import { QuickViewService } from '../../services/quick-view.service'; import { WorkflowService } from '../../workflow/workflow.service'; import * as i0 from "@angular/core"; export declare class LinkControlNotOnVComplyDialogComponent implements OnInit, OnDestroy { private dialog; private dialogForm; private dialogConfig; private quickViewService; private authService; private workflowService; controls: boolean; noControls: boolean; programCountLoader: boolean; searchString: string; programLoader: boolean; selectedControls: any[]; previousSelectedControls: any; deletedControls: any; programData: any; categoryData: any; controlData: any; categoryLoader: boolean; selectedProgram: any; selectedCategory: any; programCall: Subscription; categoryCall: Subscription; controlCall: Subscription; nonControlCall: Subscription; currentBusinessCycle: any; programSortValue: number; categorySortValue: number; controlSortValue: number; selectedRC: any; isWorkFlowOpen: boolean; responsibilityPageNumber: number; controlList: any; controlsLoader: boolean; controlsCount: any; showCreateControlButton: boolean; selectedNoControls: any[]; deletedNoControls: any[]; previousSelectedNoControls: any[]; isCreateClose: boolean; selectedRCIds: any[]; pageName: string; isFormOpen: boolean; subscriptions: SubSink; title: string; featureFlag: any; constructor(dialog: DialogRef, dialogForm: DialogService, dialogConfig: DialogConfig, quickViewService: QuickViewService, authService: AuthService, workflowService: WorkflowService); programTypes: any; selectedTab: 'REGULATIONS' | 'STANDARDS' | 'INTERNAL_CONTROLS' | 'OTHERS'; ngOnInit(): void; closeForm(): void; onKeydownHandler(event: KeyboardEvent): void; setCreateControlButtonVisibilityStatus(): void; /** * Opens the create a control not on vcomply form */ createControl(): void; createVComplyControl(): void; closeWorkflow(evt: any): void; clickControls(): void; /** * This function is called when the user clicks on the "+ CREATE A CONTROL NOT ON VCOMPLY" button. * It sets the controlData variable to an empty object, sets the controls and noControls variables * to true and false respectively, resets the program, category, and control variables, * sets the searchString variable to an empty string, and calls the getNotOnVComplyControls() function * which makes API call to fetch controls not on vcomply. */ clickNoControls(): void; selectProgramType(tab: any): void; stateObject: { ACTIVE: number; DRAFT: number; COMPLETED: number; APPROVED: number; INACTIVE: number; }; getProgramsCount(paramsObject?: any): void; handleSearch(event: any): void; /** * If the search string is not equal to the event, then set the search string to the event, set the * current page to 1, and get the not on vcomply controls by making API call inside getNotOnVComplyControls function. * @param {any} event - any - the search string */ handleSearchNotOnVcomply(event: any): void; getProgramsList(event?: any): void; getProgramType(): number; programPageChange(event: number): void; getCategoryByProgramId(program: any): void; categoryPageChange(event: number): void; getControlsByCategoryId(category: any): void; resetLists(): void; getControls(event?: any): void; /** * It makes an API call to get data of controls not on vcomply and update the variable controlData. * params : contains the queryparams required for the API like pageNo, sortvalue, sortby field and searchtext */ getNotOnVComplyControls(): void; programSort(sortValue: number): void; categorySort(sortValue: number): void; controlSort(sortValue: number): void; /** * When the page changes, set the current page to the new page and get the controls. * @param {number} event - number - the page number that was clicked */ controlPageChange(event: number): void; resetProgramVariable(): void; resetCategoryVariable(): void; resetControlVariable(): void; /** * When the user selects a control, the selectedControls array is updated with the selected control. * @param {any} event - any - this is the event that is triggered when the user selects a control. */ updatedSelectedControls(event: any): void; /** * This function is called when the child component emits an event, and it updates the * deletedControls variable in the parent component. * @param {any} event - any - this is the event that is being passed from the child component. */ updatedDeletedControls(event: any): void; removeLinkedResponsibility(control: any): void; /** * It removes a control from the selectedControls array and adds it to the deletedControls array. * @param {any} control - any - the control that is being removed */ removeResponsibility(control: any): void; removeNotOnVcomply(control: any): void; /** * "The function next() is called when the user clicks the next button in the dialog. The function * closes the dialog and passes the selected controls and deleted controls to the parent component." * */ next(): void; cancel(): void; /** * It takes an array of objects, and for each object, it takes an array of strings, and for each * string, it finds the object in another array that has a matching string, and then it increments or * decrements a property of that object. * @param {any[]} selectedControls - any[] - this is an array of objects that contain a property * called programTypeArr which is an array of strings. * @param {boolean} action - boolean - true if the checkbox is checked, false if it's unchecked */ updateSelectedValueCount(selectedControls: any[], action: boolean): void; /** * It takes an array of objects, and if the object has a property called item_id, it will find the * object in the array of objects that has the same item_id and update the effectiveness property of * that object. * * I'm trying to write a test for this function, but I'm having trouble figuring out how to mock the * data. * * Here's what I have so far: * @param {any[]} selectedControls - any[] = [{item_id: 1, effectiveness: 'High'}, {item_id: 2, * effectiveness: 'Low'}] */ updateEffectivenessOnLoad(selectedControls: any[]): void; getCountOfDifferentControls(): void; /** * If the selectedRC object has a child_ids_arr property, then set the selectedRCIds array to the * value of the child_ids_arr property. Otherwise, set the selectedRCIds array to an empty array. * Then, push the rc_id property of the selectedRC object to the selectedRCIds array. */ setRCIdWithChildIds(): void; /** * If the calledFrom parameter is null, undefined, or an empty string, then the pageName is set to * 'Controls'. * If the calledFrom parameter is 'RESIDUAL RISK ASSESSMENT', then the pageName is set to 'Controls'. * * If the calledFrom parameter is 'TREATMENT PLAN', then the pageName is set to 'Treatment Plan'. * If the calledFrom parameter is anything else, then the pageName is set to 'Controls'. * * @param {string} calledFrom - string = 'Residual Risk Assessment' */ getPageName(calledFrom: string): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }