import { GridOptions, RowNode } from 'ag-grid-community'; import 'ag-grid-enterprise'; import * as _ from 'lodash'; import { IAdaptableBlotter, EmitterCallback } from '../Utilities/Interface/IAdaptableBlotter'; import { IAdaptableBlotterStore } from '../Redux/Store/Interface/IAdaptableStore'; import { ICalendarService } from '../Utilities/Services/Interface/ICalendarService'; import { IValidationService } from '../Utilities/Services/Interface/IValidationService'; import { StyleService } from '../Utilities/Services/StyleService'; import { IChartService } from '../Utilities/Services/Interface/IChartService'; import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService'; import { IFreeTextColumnService } from '../Utilities/Services/Interface/IFreeTextColumnService'; import { IStrategyCollection } from '../Strategy/Interface/IStrategy'; import { DistinctCriteriaPairValue } from '../PredefinedConfig/Common/Enums'; import { IPPStyle } from '../Utilities/Interface/Reports/IPPStyle'; import { IColumn } from '../Utilities/Interface/IColumn'; import { IBlotterApi } from '../Api/Interface/IBlotterApi'; import { AdaptableBlotterOptions } from '../BlotterOptions/AdaptableBlotterOptions'; import { GridCell } from '../Utilities/Interface/Selection/GridCell'; import { IRawValueDisplayValuePair } from '../View/UIInterfaces'; import { IDataService } from '../Utilities/Services/Interface/IDataService'; import { IScheduleService } from '../Utilities/Services/Interface/IScheduleService'; import { IAuditLogService } from '../Utilities/Services/Interface/IAuditLogService'; import { ISearchService } from '../Utilities/Services/Interface/ISearchService'; import { PercentBar } from '../PredefinedConfig/RunTimeState/PercentBarState'; import { CalculatedColumn } from '../PredefinedConfig/RunTimeState/CalculatedColumnState'; import { FreeTextColumn } from '../PredefinedConfig/RunTimeState/FreeTextColumnState'; import { ColumnSort, VendorGridInfo } from '../PredefinedConfig/RunTimeState/LayoutState'; import { ActionColumn } from '../PredefinedConfig/DesignTimeState/ActionColumnState'; import { AdaptableBlotterTheme } from '../PredefinedConfig/RunTimeState/ThemeState'; declare type RuntimeConfig = { instantiateGrid?: (...args: any[]) => any; }; export declare class AdaptableBlotter implements IAdaptableBlotter { api: IBlotterApi; strategies: IStrategyCollection; adaptableBlotterStore: IAdaptableBlotterStore; blotterOptions: AdaptableBlotterOptions; vendorGridName: any; CalendarService: ICalendarService; DataService: IDataService; ValidationService: IValidationService; AuditLogService: IAuditLogService; StyleService: StyleService; ChartService: IChartService; CalculatedColumnExpressionService: ICalculatedColumnExpressionService; FreeTextColumnService: IFreeTextColumnService; ScheduleService: IScheduleService; SearchService: ISearchService; embedColumnMenu: boolean; private calculatedColumnPathMap; private useRowNodeLookUp; private abContainerElement; private gridContainerElement; gridOptions: GridOptions; isInitialised: boolean; private throttleOnDataChangedUser; private throttleOnDataChangedExternal; hasQuickFilter: boolean; private agGridHelper; private renderGrid; private runtimeConfig?; private emitter; constructor(blotterOptions: AdaptableBlotterOptions, renderGrid?: boolean, runtimeConfig?: RuntimeConfig); on: (eventName: string, callback: EmitterCallback) => () => void; emit: (eventName: string, data?: any) => Promise; private initStore; private tryInstantiateAgGrid; debouncedSetColumnIntoStore: (() => void) & _.Cancelable; debouncedSaveGridLayout: (() => void) & _.Cancelable; debouncedSetSelectedCells: (() => void) & _.Cancelable; debouncedSetSelectedRows: (() => void) & _.Cancelable; debouncedFilterGrid: (() => void) & _.Cancelable; private filterOnUserDataChange; private filterOnExternalDataChange; private createFilterWrapper; private createQuickFilterWrapper; private _currentEditor; reloadGrid(): void; applyGridFiltering(): void; private applyDataChange; clearGridFiltering(): void; clearColumnFiltering(columnIds: string[]): void; hideFilterFormPopup: Function; hideFilterForm(): void; setNewColumnListOrder(VisibleColumnList: Array): void; setColumnIntoStore(): void; private createColumn; private addFiltersToVendorColumn; private getQuickSearchClassName; private addQuickSearchStyleToColumn; createMainMenu(): void; getPrimaryKeyValueFromRecord(record: RowNode): any; gridHasCurrentEditValue(): boolean; getCurrentCellEditValue(): any; getActiveCell(): GridCell; saveGridLayout(): void; setSelectedCells(): void; setSelectedRows(): void; private getColumnDataType; private getabColDefValue; setValue(gridCell: GridCell): void; private updateValue; setValueBatch(gridCellBatch: GridCell[]): void; private updateBatchValue; cancelEdit(): void; getRecordIsSatisfiedFunction(id: any, distinctCriteria: DistinctCriteriaPairValue): (columnId: string) => any; getRecordIsSatisfiedFunctionFromRecord(record: RowNode, distinctCriteria: DistinctCriteriaPairValue): (columnId: string) => any; private isColumnReadonly; private isColumnSortable; private isColumnFilterable; setCustomSort(columnId: string, comparer: Function): void; removeCustomSort(columnId: string): void; getColumnValueDisplayValuePairDistinctList(columnId: string, distinctCriteria: DistinctCriteriaPairValue, visibleRowsOnly: boolean): Array; private addDistinctColumnValue; private useRawValueForColumn; getDisplayValue(id: any, columnId: string): string; getDisplayValueFromRecord(row: RowNode, columnId: string): string; getDisplayValueFromRawValue(columnId: string, rawValue: any): any; private getRenderedValue; getRawValueFromRecord(row: RowNode, columnId: string): any; getDataRowFromRecord(record: any): any; setCellClassRules(cellClassRules: any, columnId: string, type: 'ConditionalStyle' | 'QuickSearch' | 'FlashingCell' | 'FormatColumn'): void; forAllRecordsDo(func: (record: any) => any): void; forAllVisibleRecordsDo(func: (record: any) => any): void; redraw(): void; testredrawRow(rowNode: RowNode): void; refreshCells(rows: RowNode[], columnIds: string[]): void; editCalculatedColumnInGrid(calculatedColumn: CalculatedColumn): void; removeCalculatedColumnFromGrid(calculatedColumnID: string): void; addCalculatedColumnToGrid(calculatedColumn: CalculatedColumn): void; addFreeTextColumnToGrid(freeTextColumn: FreeTextColumn): void; addActionColumnToGrid(actionColumn: ActionColumn): void; private addSpecialColumnToState; isGroupRecord(record: any): boolean; getFirstRecord(): RowNode; destroy(): void; getIPPStyle(): IPPStyle; private getBlotterContainerElement; private getGridContainerElement; private initInternalGridLogic; addPercentBar(pcr: PercentBar): void; private onRowDataChanged; removePercentBar(pcr: PercentBar): void; editPercentBar(pcr: PercentBar): void; private onSortChanged; getRowCount(): number; getColumnCount(): number; getVisibleRowCount(): number; getVisibleColumnCount(): number; selectColumn(columnId: string): void; setColumnSort(columnSorts: ColumnSort[]): void; setGridData(dataSource: any): void; private updateQuickSearchRangeVisibleColumn; private checkColumnsDataTypeSet; getVendorGridState(visibleCols: string[], forceFetch: boolean): VendorGridInfo; setVendorGridState(vendorGridState: VendorGridInfo): void; private setColumnVisible; private moveColumn; private setColumnState; isSelectable(): boolean; private isQuickFilterActive; showQuickFilter(): void; hideQuickFilter(): void; applyBlotterTheme(theme: AdaptableBlotterTheme | string): void; private applyFinalRendering; private getGeneralOptions; private getState; private dispatchAction; } export {};