@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
125 lines (124 loc) • 7.41 kB
TypeScript
/// <reference types="react" />
import { ApiBase } from '../Implementation/ApiBase';
import { UIConfirmation } from '../../Utilities/Interface/MessagePopups';
import { InternalState } from '../../AdaptableState/InternalState';
import { Action } from 'redux';
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
import { AdaptableMenuItem } from '../../AdaptableState/Common/Menu';
import { AdaptableModule } from '../../AdaptableState/Common/Types';
import { CellDataChangedInfo } from '../../AdaptableState/Common/CellDataChangedInfo';
import { AdaptableIcon, AdaptableObjectLookupCriteria, AdaptableQuery, AdaptableState, BaseContext, InitialState } from '../../types';
import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
import { ICalculatedColumnExpressionService } from '../../Utilities/Services/Interface/ICalculatedColumnExpressionService';
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
import { IDataService } from '../../Utilities/Services/Interface/IDataService';
import { IQueryLanguageService } from '../../Utilities/Services/Interface/IQueryLanguageService';
import { IAlertService } from '../../Utilities/Services/Interface/IAlertService';
import { IRowNode } from 'ag-grid-enterprise';
import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
import { ButtonStyle } from '../../AdaptableState/Common/ButtonStyle';
import { AdaptableButton } from '../../AdaptableState/Common/AdaptableButton';
import { AdaptableFrameworkComponent } from '../../agGrid/AdaptableFrameworkComponent';
import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
import { IModuleCollection } from '../../Strategy/Interface/IModule';
import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../AdaptableState/Common/AdaptableObject';
import { AdaptableForm, CellSummmaryInfo, FormContext, RowDataChangeTrigger, RowDataChangedInfo } from '../../../types';
import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
import { AnnotationsService } from '../../Utilities/Services/AnnotationsService';
import { RowFormService } from '../../Utilities/Services/RowFormService';
import { WindowModalPosition, WindowModalSize } from '../../components/WindowModal';
import { FlashingCellService } from '../../Utilities/Services/FlashingCellService';
import { AgGridAdapter } from '../../agGrid/AgGridAdapter';
export declare class AdaptableInternalApi extends ApiBase {
getInternalState(): InternalState;
getAdaptableJSXElement(): React.JSX.Element;
showPopupConfirmation(confirmation: UIConfirmation): void;
showPopupScreen(module: AdaptableModule, componentName: string, popupParams?: ModuleParams, popupProps?: {
[key: string]: any;
}): void;
showPopupForm(config: {
Id: string;
Form: AdaptableForm<FormContext>;
FormProps?: any;
prepareContext?: (context: FormContext) => Promise<FormContext> | FormContext;
}): void;
showPopupWindow({ id, title, icon, popupProps, factoryId, }: {
id: string;
title: string;
icon?: string;
popupProps: {
[key: string]: any;
size?: WindowModalSize;
position?: WindowModalPosition;
};
factoryId: string;
}): void;
hidePopupScreen(): void;
setSettingsPanelItems(menuItems: AdaptableMenuItem[]): void;
setDashboardModuleButtons(menuItems: AdaptableMenuItem[]): void;
getToolbarTitle(): string;
buildCellDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
buildRowDataChangedInfo(dataRows: any[], rowNodes: IRowNode[], rowTrigger: RowDataChangeTrigger): RowDataChangedInfo;
getAdaptableInstance(): IAdaptable;
getAgGridAdapter(): AgGridAdapter;
getInitialState(): InitialState;
getState(): AdaptableState;
getValidationService(): IValidationService;
getModuleService(): IModuleService;
getDataService(): IDataService;
getAnnotationsService(): AnnotationsService;
getCalculatedColumnExpressionService(): ICalculatedColumnExpressionService;
getQueryLanguageService(): IQueryLanguageService;
getAlertService(): IAlertService;
getTeamSharingService(): ITeamSharingService;
getMetamodelService(): IMetamodelService;
getRowFormService(): RowFormService;
getFdc3Service(): Fdc3Service;
getFlashingCellService(): FlashingCellService;
getModules(): IModuleCollection;
forAllRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
includeGroupRows?: boolean;
filterFn?: (rowNode: IRowNode) => boolean;
}): void;
forAllVisibleRowNodesDo(func: (rowNode: IRowNode, index: number) => void, config?: {
includeGroupRows?: boolean;
filterFn?: (rowNode: IRowNode) => boolean;
}): void;
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext, defaultWidthHeight?: {
height: number | string;
width: number | string;
}): AdaptableIcon | undefined;
isDocumentationLinksDisplayed(): boolean;
getQueryPreviewData(): any;
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
initializeDataChangeHistory(): void;
executeWithProgressIndicator(label: string, executeFn: () => void, errorHandlingFn?: () => void): void;
getCorrectEnglishVariant(wordToSpell: string): string;
shouldDisplayTagSections(): boolean;
getAvailableTags(): AdaptableObjectTag[] | undefined;
private getObjectTags;
private getLayoutTags;
dispatchReduxAction(action: Action): void;
showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
getAdaptableQueryExpressionText(query: Partial<AdaptableQuery>): string;
/**
* Gets a value from a rowData object using a field name.
* Supports deep values (e.g. fieldName = 'address.street')
*/
getValueUsingField(rowData: Record<string, any>, fieldName: string): any;
/**
* Sets a value in a rowData object using a field name.
* Supports deep values (e.g. fieldName = 'address.street')
*/
setValueUsingField(rowData: Record<string, any>, fieldName: string, newValue: any): Record<string, any>;
findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
buildBaseContext(): BaseContext;
setCellSummaryInfo(cellSummaryInfo: CellSummmaryInfo): void;
}