import { OnInit, EventEmitter, OnDestroy, SimpleChanges, QueryList } from '@angular/core'; import { Subject, Subscription } from 'rxjs'; import { I2vVideoGridComponent } from '../i2v-video-grid/i2v-video-grid.component'; import { CustomOption } from '../models/IOption'; import { NgxLiveViewService } from '../ngx-live-view.service'; import * as i0 from "@angular/core"; export interface Tile { color: string; cols: number; rows: number; text: string; } export interface GridElement { id: number; cameraId: number; cameraName: string; playbackMode: string; time_out: number; eventObject: any; info: any; byAction: any; color: string; ComponentName: string; } export declare class GridComponent implements OnInit, OnDestroy { private _NgxLiveViewService; playDuplicate: boolean; gridMode: string; cameras: any[]; idx: string; DataSubject: Subject; eventDataSubject: Subject; Rows: number; Cols: number; header: boolean; hideTime: boolean; GridConfig: any; RowRatio: number; parentHeight: number; parentWidth: number; options: CustomOption[]; playerServerIp: string; streamerIp: string; CloseElement: EventEmitter; clearGrid: EventEmitter; NodeDrop: EventEmitter; GridArrayChanged: EventEmitter; playbackModeChangeEmitter: EventEmitter; PlayerNameChange: EventEmitter; videoStartEmitterFromGrid: EventEmitter; dimensionChange: EventEmitter; CloseCard: EventEmitter; VerifyEvent: EventEmitter; Minimize: EventEmitter; Maximize: EventEmitter; FunctionClick: EventEmitter; alerts: QueryList; newEntrySubscription: Subscription; GridArray: any[]; id: number; row: string; col: string; h: string; edit: boolean; renderType: string; height: string; rowHeight: string; rowsArray: any[]; colsArray: any[]; numbers: number[]; selectedGridElements: any; gridFullScreen: boolean; GridParentDivHeight: string; queueLimit: number; constructor(_NgxLiveViewService: NgxLiveViewService); ngOnInit(): void; ngOnDestroy(): void; /** * The function closeCard() is a function that emits an event called onCloseCard, The event is emitted with the parameter this.idx, which is the index of the card that is being * closed from the child component to the parent component. */ closeCard(): void; /** * This function sets the grid dimensions and then calls the ChangeLayout() function. * @param {number} rows - number, cols: number * @param {number} cols - number of columns */ setGridDimensions(rows: number, cols: number): void; /** * If the item is a video, and the item is live, and the item is not already present, and the grid is not * full, then add the item to the grid. * @param {GridElement} item - GridElement - this is the object that is being dragged. * @param {string} [parentNode] - The id of the element that the user dropped the item on. */ setElementInGrid(item: GridElement, parentNode?: number): void; /** * The ngOnChanges() function is called whenever a property of the component is changed. * * The function checks if the property that was changed is the gridMode property. If it is, then the * GridArray is emptied and the ChangeLayout() function is called to reinitialize the grid array. * @param {SimpleChanges} changes - SimpleChanges */ ngOnChanges(changes: SimpleChanges): void; /** * Change grid size i.e. change in rows and cols * It takes in a number of rows and columns and then creates a grid of that size * @param {number} [specialElementNumber] - the index of the element that is special (i.e. the one * that is not a square) * @param {number} [SErows] - number of rows of the special element * @param {number} [SEcols] - number of columns of the special element * @param {string} [renderType] - "row" or "column" */ ChangeLayout(specialElementNumber?: number, SErows?: number, SEcols?: number, renderType?: string): void; /** * It removes an element from an array and emits the event to parent component for Close Element and Grid Array Changed * @param {any} id - the id of the element to be removed */ closeElement(id: any): void; /** * If the selectedGridElements array contains the id of the current element in the GridArray, then * remove the id from the selectedGridElements array and remove the element from the GridArray. * If the selectedGridElements array is empty, then clear the GridArray. */ closeGridCard(): void; /** * It clear the Grid Array */ clearCard(): void; /** * If the gridId and camId are both greater than -1, then if the GridArray[gridId] is not empty, emit * the GridArray[gridId].cameraId, then find the index of the GridArray that matches the camId, if * the index is -1, then find the camera that matches the camId, then set the GridArray[gridId] to * the camera, id, camId, cameraName, time_out, playbackMode, ComponentName, selected, playerName, * and timeRange, then emit the operation, id, and position, then emit the gridId * @param {number} gridId - The index of the grid that the camera is being dropped into. * @param {number} camId - number - the id of the camera that was dropped */ onDropByIndex(gridId: number, camId: number): void; /** * It plays all the child resources of the node which are droppabe * @param {string | any[]} nodes - string | any[] */ playALLChildResources(nodes: string | any[]): void; /** * Find the index of the object in the array that has a cameraId property that matches the id * parameter, and if it exists, remove it from the array. * @param {number} id - number - the id of the camera to close */ closeById(id: number): void; /** * It returns the number of occupied grids in the GridArray. * @returns The number of occupied grids. */ getNoOfOccupiedGrids(): number; /** * When the playerNameChange event is emitted, find the element in the GridArray that matches the id, * and set the playerName to the new value and emit an event to parent Component. * @param - { id: any; playerName: any; } */ playerNameChange($event: { id: any; playerName: any; }): void; /** * "When the video starts, emit an event to the parent component with the id and wmode of the video." * @param event - { id: any; wmode: any; } */ onVideoStarted(event: { id: any; wmode: any; }): void; /** * It takes a div element, toggle it for full screen and set rowHeight for the Video Grid. */ fullScreen(): Promise; /** * "The function resizes the grid based on the width and height of the parent container." */ resizeGrid(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }