import { AfterViewChecked, ChangeDetectorRef, DoCheck, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { AgGridAngular } from 'ag-grid-angular'; import { ColDef, ColGroupDef, FilterChangedEvent, FirstDataRenderedEvent, GridReadyEvent, SelectionChangedEvent, SideBarDef, GetRowIdFunc, CellValueChangedEvent, GridOptions, GetLocaleTextParams, SortChangedEvent, CellEditingStartedEvent } from 'ag-grid-community'; import { ApiCallParams } from '../../core.interface'; import { ApiCallService, CoreService } from '../../core.service'; import { HelperService } from '../../helper.service'; import { CustomPluralPipe } from '../../pipes/eagna.pipe'; import { SharedService } from '../../shared.service'; import { agThemeType, editableIndicator, ExtendedGridDefinition, fieldMapperType, GridPeferences, GridResponse, rowModelType, gridDefaultColumns } from '../grid.interface'; import { MessageService, PrimeIcons } from 'primeng/api'; import { AbstractCoreService } from '../../abstract-core'; import { GridService } from '../grid.service'; import { LowerCasePipe, UpperCasePipe } from '@angular/common'; import * as i0 from "@angular/core"; export declare class GridComponent implements OnInit, OnDestroy, AfterViewChecked, DoCheck { private _helper; private _activatedRoute; private _pluralPipe; private _lowerCase; private _messageService; private _gridService; private _upperCase; sharedService: SharedService; _coreService: CoreService; private _cdr; private _ilocale; private _coreServiceImpl; private _apiCallService?; constructor(_helper: HelperService, _activatedRoute: ActivatedRoute, _pluralPipe: CustomPluralPipe, _lowerCase: LowerCasePipe, _messageService: MessageService, _gridService: GridService, _upperCase: UpperCasePipe, sharedService: SharedService, _coreService: CoreService, _cdr: ChangeDetectorRef, _ilocale: string, _coreServiceImpl: AbstractCoreService, _apiCallService?: ApiCallService | undefined); private _noReadRendered; private _agLangProvider; private _currentPage; private _jumpToLastPage; private _nextPage; private _sortChanged; private _initSortModel?; private _initFilterModel; private _subscription; private _isQuerying; private _userPrefReInit; private _locale; private _dateDelimeter; private _dateFormat; private _gridEnv; darkMode: boolean; picons: typeof PrimeIcons; tOverlay: { loading?: string; noRows?: string; }; defaultColumns: gridDefaultColumns; duplicateApiParams?: (data: any) => any; isDebug: boolean; dateFiltersToLocale: boolean; digitsInfo: string; isReadonly: boolean; firstResult?: GridResponse; agGrid: AgGridAngular; appProject: string | undefined; gridId: string | undefined; agClass: string; agStyle?: string | { [p: string]: any; } | undefined; agTheme: agThemeType; columnDefs: (ColDef | ColGroupDef)[] | undefined; rowModelType: rowModelType; rowData: any[] | undefined; /** AbstractCore Service that should have been implemented */ coreServiceImpl: AbstractCoreService | undefined; tokenRequired: boolean; holder?: HTMLDivElement | string; /** * 2-way Binding property to acccess gridParams easily when grid is ready (GridReadyEvent) */ gridParams: GridReadyEvent | undefined; gridParamsChange: EventEmitter; /** * The string to be used as initial value in Search Box when enableSideBar, enableCustomToolPanel and enableGridSearch are on, defaulted to '' */ searchQuery: { value: string; }; /** * Whether the sidebar is to be displayed in Grid or not, defaulted to true */ enableSideBar: boolean; /** * Whether the custom panel (Grid Options) is to be displayed in the sidebar, defaulted to true */ enableCustomToolPanel: boolean; /** * Grid Insights tool panel, turned off for pilot */ enableAnalysisToolPanel: boolean; /** * If opted to never offer analysis of a grid at all, turn this off */ analysisOption: boolean; /** * Whether saving of columns and filters is turned on or not, defaulted to true */ enableSaveColumnsAndFilters: boolean; /** * Whether the search is to be used in Grid Options sidebar or not, defaulted to true */ enableGridSearch: boolean; gridOptions: GridOptions; extendedGridDefinition: ExtendedGridDefinition; extraParams: any; floatingFilter: boolean; /** * Optionally tell the Grid what sidebar tab should be activated by default. */ defaultToolPanel: "customTools" | "filters" | "columns" | ""; pivotMode: boolean; /** * Change the way how Editable Columns shows the edit (pencil) indicator: defaulted to 'hover' * hide: to never show the pencil icon * show: to permanently show the pencil icon * hover: only show the pencil icon upon hover */ editableInd: editableIndicator; /** * Standard api definition that will be used by the Grid, only for non-ClientSide (e.g. serverSide) */ apiCallParams: ApiCallParams | undefined; /** * Optionally tells the Grid not to load the userPreferences for some instances, defaulted to false */ skipUserPref: boolean; /** * Optionally append the Api request with aggs_filter object same as current filters, defaulted to false */ aggsFilters: boolean; /** * If serverSideStoreType is full, optionally set limit for backend query, else limit will not be send */ limit: number | undefined; /** * Acts as external event emitter when a column is being filtered */ filteringCustomCallback: ((apiParams: any, col: any, colCurrentFilter: any) => any) | undefined; /** * Turn this on when using Lazy loaded Route. This will be used when urlState is not provided */ isFeatureModule: boolean; /** * String to override the formula , this is used in saving filters/coluns in user preference api * If not provided, it is computed as the current url route (the last children. it's important to turn on @isFeatureModule when using lazy loaded Module) */ urlState: string | undefined; /** * Used for Grids that are declared in Modal, so that the id to be used in user preferences will be */ modalId: string | undefined; /** * Optionally tell the Grid to not use (Blank) in the filter aggregiation */ dontAddBlankFilter: boolean; /** * Optionally override column keys as its filtering keys */ defaultFilterOptions: any; /** * To override Grids Api filter aggs data pattern. * If not supplied, by default: {suffix: "_aggs", * extraField: "buckets", * objectKey: "key" * } * where the aggregation structure is e.g. {id: {buckets: [key: , key: , ...]} */ fieldMapper?: fieldMapperType; /** * If enabled, filters and columns change event will save changes in Memory */ enableFiltersAndColumnsMemory: boolean; enableProfile: boolean; /** Override this rowIdKey(s) to specify which data attribute is/are the unique key (or keys combination), default value: ['id'] */ rowIdKey: string | string[] | undefined; defaultColDef: ColDef | undefined; components: { [p: string]: any; } | undefined; columnTypes: { [key: string]: ColDef; } | undefined; pagination: boolean; paginationAutoPageSize: boolean; paginationPageSize: number; cacheOverflowSize: number; maxConcurrentDatasourceRequests: number; infiniteInitialRowCount: number; maxBlocksInCache: number; cacheBlockSize: number; serverSideInfiniteScroll: boolean; getRowId: GetRowIdFunc | undefined; localeText?: { [key: string]: string; }; getLocaleText: (params: GetLocaleTextParams) => string; icons: any; sideBarParams: any; excelMode: boolean; isPivotModeOn: boolean; /** Specifies the side bar components. */ sideBar: SideBarDef | string | string[] | boolean | null | undefined; /** * Grid internal property used in styling */ gridHasFiltersApplied: boolean; /** * Grid rendering indicator that can optionally be changed externally (not most of time) * as this property is originally designed as internal for Grid itself */ protected hasRendered: { gridReady: boolean; firstFilter: boolean; firstSort: boolean; forcedDestroyed: boolean; }; on: boolean; private _appConfigName; userPref?: { grid: GridPeferences | undefined; darkMode: boolean; }; private _restoringChart; private _origRowModelType; private _orig_num_results; private _colsAndChartState; private _orig_pagination; private _pivotingList; private _chartRef; private _reset_cache; private _cacheLastUpdate$; private _colsAndChartState$; private _loadedProfile; private _isFilterAndSortingApplied; private _currentSelections; private _selectionBeforeRefreshSubject; private _selectionBeforeRefresh$; private _isRefreshed; private _dataSource; private _serverSideDataSource; private _pSuccessData?; private _apiCallParamsParams; private _searchValueValue; private _isServerSideInstance; private _isInfiniteInstance; private _isIDataSourceInstance; private _isIServerSideDatasourceInstance; ngOnInit(): void; private _initUserGridPref; private _initGrid; private _reapplyTheme; private _initExtendedGridDefinition; private _initContextMenu; private _initGetRowId; private _initColumnDefs; private _initColumnTypes; private _initPagination; private _initComponents; toggleOn(): void; destroyAndLive(_p?: { timeout?: number; inBetweenCallback?: (_a?: any) => void; }): void; private _requery; private _updatePreferences; private _saveColumns; private _saveFilters; private _initSideBar; private _getUrlState; private _extractUserPref; applyFilters(): void; _saveTheme(newAgTheme: agThemeType): void; private _isConditionDateType; private _isLocaleDate; private _dateFiltersToLocale; private _getKeyToUse; private _appendUserPref; private _setUserColumns; private _setUserFilters; private _disableEnableNextPrevious; /** * Grid internal method that performs action onGridReady * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.onGridReady to extend this method */ onGridReady(params: GridReadyEvent): void; private _onFirstDataRendered; onFirstDataRendered(params: FirstDataRenderedEvent): void; private _initDataValidation; /** * Grid internal method that performs action onSelectionChanged * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.selectionChanged to extend this method */ onSelectionChanged(params: SelectionChangedEvent): void; onFilterChanged(params: FilterChangedEvent): void; /** * Grid internal method that performs action onCellValueChanged * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.cellValueChanged to extend this method */ onCellValueChanged(params: CellValueChangedEvent): void; /** * Grid internal method that performs action onCellEditingStarted * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.cellEditingStarted to extend this method */ onCellEditingStarted(params: CellEditingStartedEvent): void; /** * Grid internal method that performs action onCellEditingStopped * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.cellEditingStopped to extend this method */ onCellEditingStopped(params: any): void; /** * Cal this method to force refresh the grid cells (by rows or columns) * @param cellsToRefresh columns: array of column [colId1, colId2...], (or rows: [RowNode1, RowNode2...], or rowNodes: [RowNode1, RowNode2...]) * @param params Grid Options params (e.g. params.api) */ forceRefreshCells(cellsToRefresh?: { columns?: any[]; rows?: any[]; rowNodes?: any[]; }, params?: any): void; /** * Grid internal method that performs action onColumnResized * @params params Grid Options params (e.g. params.api) * Use extendedGridDefinition?.columnResized to extend this method */ onColumnResized(p: any): void; private _clearColumns; private _clearFilters; private _initAgGridChartTheme; private _setUserPreferences; stageEditableDataState(p?: GridReadyEvent | undefined, rowNodes?: any[], reselect?: boolean): void; /** * Call this method when to get the current row selections, returns [] if empty */ getSelectedNodes(filterFunc?: (node: any) => boolean): any[]; /** * Call this method when to get all rows, returns [] if empty */ getAllNodes(): any[]; /** * Call this method to identify if Grid has any field that has isChanged: [col1, col2, etc.] row data */ isChanged(): boolean; /** * Call this method to identify if Grid has any field that has _errors: [col1, col2, etc.] row data */ hasErrors(): boolean; /** * Call this method to identify if Grid has any field that has _duplicates: [col1, col2, etc.] row data */ hasDuplicates(): boolean; private _doesGridHas; onPaginationChanged(p: any): void; onSortChanged(p: SortChangedEvent): void; /** * Instead of wondering how to refresh the currently loaded grid data for which GRID_TYPE * Use this global method that applies to all * Technically will do the refresh cache for non-CLIENTSIDE * and will reinitiate the grid lifecycle for CLIENTSIDE. * @param purge: turn this off normal refresh without purging the entire data * @param route?: optionally provide route for grouped grid, e.g. ['Group1', 2, 'Group3'] */ refresh(params?: { gridParams?: any; redrawRows?: any[] | { refreshWithIds: any[]; idField?: string; } | ApiCallParams; purge?: boolean; route?: any[]; dontReselect?: boolean; }): void; ngAfterViewInit(): void; ngOnDestroy(): void; ngAfterViewChecked(): void; ngDoCheck(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }