UNPKG

@adaptabletools/adaptable

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

153 lines (152 loc) 8.92 kB
import { Action } from 'redux'; import { AdaptableVariant, IAdaptable } from '../../AdaptableInterfaces/IAdaptable'; import { AdaptableState } from '../../AdaptableState/AdaptableState'; import { AdaptableModule } from '../../AdaptableState/Common/Types'; import { AdaptableObject } from '../../AdaptableState/Common/AdaptableObject'; import { ModuleInfo } from '../../Strategy/Interface/IModule'; import { AdaptableOptions } from '../../AdaptableOptions/AdaptableOptions'; import { AdaptableApi } from '../AdaptableApi'; import { GridApi as AgGridApi } from 'ag-grid-enterprise'; import { ExportOptions } from '../../AdaptableOptions/ExportOptions'; import { ActionColumnApi, ActionColumnOptions, AlertApi, AlertOptions, ApplicationApi, BulkUpdateApi, CalculatedColumnApi, CalendarApi, CalendarOptions, CellSummaryApi, CellSummaryOptions, ChartingApi, ChartingOptions, ColumnApi, FilterApi, ColumnOptions, CommentOptions, StateApi, ContainerOptions, CustomSortApi, CustomSortOptions, DashboardApi, DashboardOptions, DataChangeHistoryApi, DataChangeHistoryOptions, DataSetApi, DataSetOptions, EditOptions, EntitlementApi, EntitlementOptions, EventApi, ExportApi, ExpressionApi, ExpressionOptions, Fdc3Api, Fdc3Options, FlashingCellApi, FlashingCellOptions, FormatColumnApi, FormatColumnOptions, FreeTextColumnApi, GridApi, GridFilterApi, LayoutApi, LayoutAssociatedObject, LayoutOptions, NamedQueryApi, NoteOptions, NotificationsOptions, PluginsApi, PlusMinusApi, PredicateApi, PredicateOptions, QuickSearchApi, QuickSearchOptions, ScheduleApi, ColumnScopeApi, SettingsPanelApi, SettingsPanelOptions, ShortcutApi, SmartEditApi, StateOptions, StatusBarApi, StyledColumnApi, SystemStatusApi, TeamSharingApi, TeamSharingOptions, ThemeApi, ToolPanelApi, ToolPanelOptions, UserInterfaceApi, UserInterfaceOptions, ColumnMenuOptions, ContextMenuOptions, FilterOptions, ColumnFilterApi, OptionsApi } from '../../types'; import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps'; import { AdaptableInternalApi } from '../Internal/AdaptableInternalApi'; import { AdaptableLogger } from '../../agGrid/AdaptableLogger'; import { IAdaptableStore } from '../../Redux/Store/Interface/IAdaptableStore'; import { RowFormOptions } from '../../AdaptableOptions/RowFormOptions'; import { RowFormApi } from '../RowFormApi'; export declare abstract class ApiBase { protected _adaptable: IAdaptable; /** * Constructor for all the api classes which simply takes and assigns an instance of Adaptable * @param _adaptable the core IAdaptable object */ constructor(_adaptable: IAdaptable); protected getAdatableLogger(): AdaptableLogger; protected logInfo(message: string, ...optionalParams: any[]): void; protected logSuccess(message: string, ...optionalParams: any[]): void; protected logWarn(message: string, ...optionalParams: any[]): void; protected logError(message: string, ...optionalParams: any[]): void; protected getAdaptableVariant(): AdaptableVariant; protected isAdapTableReady(): boolean; /** * Base api helper method which ensure that Adaptable Object being used in the function is not null or undefined * * If it does not exist then we log an error and the api method should stop * @param item AdaptableObject being checked * @param name the name of the object if it has one (e.g. if its a search) * @param type the actual type of the object being checked */ protected checkItemExists(item: any, name: string, type: string): boolean; protected checkArrayExists(array: any): boolean; protected handleLayoutAssociatedObjects<T extends LayoutAssociatedObject>(objectList: T[], module: AdaptableModule, config?: { includeLayoutNotAssociatedObjects?: boolean; associatedWithLayout?: string; }): T[]; /** * Base api Helper method that dispatches a *Redux Action* to the Store * @param action the Redux Action to be dispatched */ protected dispatchAction(action: Action): void; /** * Returns the entire State from the Store * * This is a simple *getState()* call */ getAdaptableState(): AdaptableState; protected getAdaptableStore(): IAdaptableStore; protected addUidToAdaptableObject(adaptableObject: AdaptableObject): void; protected getModuleInfoByModuleId(module: AdaptableModule): ModuleInfo; protected showModulePopup(module: AdaptableModule, moduleParams?: ModuleParams): void; protected getOptions(): AdaptableOptions; protected getActionColumnOptions(): ActionColumnOptions; protected getRowFormOptions(): RowFormOptions; protected getColumnOptions(): ColumnOptions; protected getCommentOptions(): CommentOptions; protected getNoteOptions(): NoteOptions; protected getCustomSortOptions(): CustomSortOptions; protected getDataSetOptions(): DataSetOptions; protected getCalendarOptions(): CalendarOptions; protected getCellSummaryOptions(): CellSummaryOptions; protected getContainerOptions(): ContainerOptions; protected getNotificationsOptions(): NotificationsOptions; protected getAlertOptions(): AlertOptions; protected getDashboardOptions(): DashboardOptions; protected getEditOptions(): EditOptions; protected getExportOptions(): ExportOptions; protected getLayoutOptions(): LayoutOptions; protected getColumnMenuOptions(): ColumnMenuOptions; protected getContextMenuOptions(): ContextMenuOptions; protected getFilterOptions(): FilterOptions; protected getExpressionOptions(): ExpressionOptions; protected getPredicateOptions(): PredicateOptions; protected getQuickSearchOptions(): QuickSearchOptions; protected getFormatColumnOptions(): FormatColumnOptions; protected getStateOptions(): StateOptions; protected getTeamSharingOptions(): TeamSharingOptions; protected getUserInterfaceOptions(): UserInterfaceOptions; protected getToolPanelOptions(): ToolPanelOptions; protected getChartingOptions(): ChartingOptions; protected getDataChangeHistoryOptions(): DataChangeHistoryOptions; protected getEntitlementOptions(): EntitlementOptions; protected getFlashingCellOptions(): FlashingCellOptions; protected getSettingsPanelOptions(): SettingsPanelOptions; protected getFdc3Options(): Fdc3Options; protected getAdaptableApi(): AdaptableApi; protected getAgGridApi(): AgGridApi; protected getAdaptableInternalApi(): AdaptableInternalApi; protected getActionColumnApi(): ActionColumnApi; protected getApplicationApi(): ApplicationApi; protected getAlertApi(): AlertApi; protected getFlashingCellApi(): FlashingCellApi; protected getPredicateApi(): PredicateApi; protected getBulkUpdateApi(): BulkUpdateApi; protected getCalendarApi(): CalendarApi; protected getCalculatedColumnApi(): CalculatedColumnApi; protected getCellSummaryApi(): CellSummaryApi; protected getColumnApi(): ColumnApi; protected getStateApi(): StateApi; protected getCustomSortApi(): CustomSortApi; protected getDashboardApi(): DashboardApi; protected getDataSetApi(): DataSetApi; protected getEntitlementApi(): EntitlementApi; protected getEventApi(): EventApi; protected getExportApi(): ExportApi; protected getFormatColumnApi(): FormatColumnApi; protected getFreeTextColumnApi(): FreeTextColumnApi; protected getGridApi(): GridApi; protected getLayoutApi(): LayoutApi; protected getGridFilterApi(): GridFilterApi; protected getColumnFilterApi(): ColumnFilterApi; protected getFilterApi(): FilterApi; protected getRowFormApi(): RowFormApi; protected getPlusMinusApi(): PlusMinusApi; protected getQuickSearchApi(): QuickSearchApi; protected getScheduleApi(): ScheduleApi; protected getShortcutApi(): ShortcutApi; protected getSmartEditApi(): SmartEditApi; protected getSystemStatusApi(): SystemStatusApi; protected getThemeApi(): ThemeApi; protected getUserInterfaceApi(): UserInterfaceApi; protected getNamedQueryApi(): NamedQueryApi; protected getExpressionApi(): ExpressionApi; protected getPluginsApi(): PluginsApi; protected getSettingsPanelApi(): SettingsPanelApi; protected getStyledColumnApi(): StyledColumnApi; protected getToolPanelApi(): ToolPanelApi; protected getTeamSharingApi(): TeamSharingApi; protected getColumnScopeApi(): ColumnScopeApi; protected getDataChangeHistoryApi(): DataChangeHistoryApi; protected getChartingApi(): ChartingApi; protected getStatusBarApi(): StatusBarApi; protected getFdc3Api(): Fdc3Api; protected getOptionsApi(): OptionsApi; destroy(): void; } /** * Configuration for API methods which load `LayoutAssociatedObject` */ export interface LayoutAssociatedObjectLoadConfig { includeLayoutNotAssociatedObjects?: boolean; associatedWithLayout?: string; }