@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
60 lines (59 loc) • 2.39 kB
TypeScript
import { ToolPanelState, ToolPanelVisibilityMode } from '../AdaptableState/ToolPanelState';
import { CustomToolPanel, ToolPanelButtonContext } from '../AdaptableOptions/ToolPanelOptions';
import { AdaptableButton } from '../AdaptableState/Common/AdaptableButton';
import { AdaptableModuleButtons, AdaptableToolPanel } from '../AdaptableState/Common/Types';
/**
* Functions for managing the AdapTable ToolPanel Component (at side of grid)
*/
export interface ToolPanelApi {
/**
* Retrieves Tool Panel section from Tool Panel State
*/
getToolPanelState(): ToolPanelState;
/**
* Opens Settings Panel with Tool Panel section selected and visible
*/
showToolPanelPopup(): void;
/**
* Opens the Adaptable ToolPanel Component
*/
openAdapTableToolPanel(): void;
/**
* Closes the Tool Panel section (irrespective of which toolpanel is showing)
*/
closeAdapTableToolPanel(): void;
/**
* Retrieves all Custom Tool Panels defined in ToolPanelOptions
*/
getCustomToolPanels(): CustomToolPanel[];
/**
* Retrieves all Custom Tool Panel Buttons defined in ToolPanelOptions
*/
getCustomToolPanelButtons(): AdaptableButton<ToolPanelButtonContext>[];
/**
* Retrieves the CustomToolPanel with the given name (or undefined if no match is found)
* @param name the CustomToolPanel name
*/
getCustomToolPanelByName(name: string): CustomToolPanel | undefined;
/**
* Sets the given Adaptable ToolPanel with the provided visibilityMode (expanded / collapsed)
* @param adaptableToolPanel
* @param visibilityMode
*/
setAdaptableToolPanelVisibilityMode(adaptableToolPanel: AdaptableToolPanel, visibilityMode: ToolPanelVisibilityMode): void;
/**
* Sets the Custom ToolPanel with the given name with the provided visibilityMode (expanded / collapsed)
* @param customToolPanelName
* @param visibilityMode
*/
setCustomToolPanelVisibilityMode(customToolPanelName: string, visibilityMode: ToolPanelVisibilityMode): void;
/**
* Sets the Module buttons in the Adaptable ToolPanel
* @param moduleButtons the module buttons
*/
setModuleButtons(moduleButtons: AdaptableModuleButtons): void;
/**
* Sets the Module buttons from the Adaptable ToolPanel
*/
getModuleButtons(): AdaptableModuleButtons;
}