StateApi
Range of functions to access Initial and Full Adaptable State
export interfaceMethods
| Method | Description |
|---|---|
| copyAllStateToClipboard() | Copies all Adaptable state to clipboard |
| copyUserStateToClipboard() | Copies User State sections of Adaptable State to clipboard |
| dispatchStateReadyAction(module) | Sent by each Module when it is Ready |
| getAdaptableFilterState() | Gets filter-related sections of Adaptable State |
| getAdaptableSortState() | Gets sort-related sections of Adaptable State |
| getAlertState(returnJson) | Returns Alert section of Adaptable State |
| getAllState() | Retrieves ALL state which is currently stored by Adaptable (both persistent and transient/internal) |
| getApplicationState(returnJson) | Returns Application section of Adaptable State |
| getCalculatedColumnState(returnJson) | Returns Calculated Column section of Adaptable State |
| getChartingState(returnJson) | Returns Charting section of Adaptable State |
| getCustomSortState(returnJson) | Returns Custom Sort section of Adaptable State |
| getDashboardState(returnJson) | Returns Dashboard section of Adaptable State |
| getDescriptionForModule(adaptableModule) | Retrieves a brief description of an AdapTable Module |
| getExportState(returnJson) | Returns Export section of Adaptable State |
| getFlashingCellState(returnJson) | Returns Flashing Cell section of Adaptable State |
| getFormatColumnState(returnJson) | Returns Format Column section of Adaptable State |
| getFreeTextColumnState(returnJson) | Returns FreeText Column section of Adaptable State |
| getHelpPageForModule(adaptableModule) | Retrieves the help page for an AdapTable Module |
| getInitialState() | Returns the Initial Adaptable State |
| getLayoutState(returnJson) | Returns Layout section of Adaptable State |
| getNamedQueryState(returnJson) | Returns Query section of Adaptable State |
| getNoteState(returnJson) | Returns Note section of Adaptable State |
| getPersistentState() | Retrieves the persistent state in Adaptable, i.e. state that is passed to the StateOptions.persistState() function. |
| getPlusMinusState(returnJson) | Returns Plus Minus section of Adaptable State |
| getQuickSearchState(returnJson) | Returns Quick Search section of Adaptable State |
| getScheduleState(returnJson) | Returns Schedule section of Adaptable State |
| getShortcutState(returnJson) | Returns Shortcut section of Adaptable State |
| getStatusBarState(returnJson) | Returns StatusBar section of Adaptable State |
| getStyledColumnState(returnJson) | Returns StyledColumn section of Adaptable State |
| getThemeState(returnJson) | Returns Theme section of Adaptable State |
| getToolPanelState(returnJson) | Returns Tool Panel section of Adaptable State |
| getUserStateByStateKey(stateKey, returnJson) | Returns given section of Adaptable State (as JSON or object) |
| incrementUserStateRevision(stateKey) | Adds '1' to current revision number of State element |
| loadUserState(state) | Loads supplied user state, replacing (NOT merging) existing User(persisted) State. |
| persistAdaptableState() | Persists the current Adaptable State to storage. |
| reloadInitialState(newInitialState) | Reloads existing (or supplied) Initial State; clears persistent state by calling StateOptions.clearState |
| setAdaptableStateKey(adaptableStateKey, config) | Changes key used for persisting AdaptableState into localStorage; optionally provides an initialState to load |
Method Details
copyAllStateToClipboard
Copies all Adaptable state to clipboard
copyAllStateToClipboard(): void;Returns
void
copyUserStateToClipboard
Copies User State sections of Adaptable State to clipboard
copyUserStateToClipboard(): void;Returns
void
dispatchStateReadyAction
Sent by each Module when it is Ready
dispatchStateReadyAction(module: AdaptableModule): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| module | AdaptableModule | Module which is Ready |
Returns
void
getAdaptableFilterState
Gets filter-related sections of Adaptable State
getAdaptableFilterState(): AdaptableFilterState;Returns
getAdaptableSortState
Gets sort-related sections of Adaptable State
getAdaptableSortState(): AdaptableSortState;Returns
getAlertState
Returns Alert section of Adaptable State
getAlertState(returnJson?: boolean): AlertState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getAllState
Retrieves ALL state which is currently stored by Adaptable (both persistent and transient/internal)
getAllState(): AdaptableState;Returns
getApplicationState
Returns Application section of Adaptable State
getApplicationState(returnJson?: boolean): ApplicationState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getCalculatedColumnState
Returns Calculated Column section of Adaptable State
getCalculatedColumnState(returnJson?: boolean): CalculatedColumnState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getChartingState
Returns Charting section of Adaptable State
getChartingState(returnJson?: boolean): ChartingState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getCustomSortState
Returns Custom Sort section of Adaptable State
getCustomSortState(returnJson?: boolean): CustomSortState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getDashboardState
Returns Dashboard section of Adaptable State
getDashboardState(returnJson?: boolean): DashboardState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getDescriptionForModule
Retrieves a brief description of an AdapTable Module
getDescriptionForModule(adaptableModule: AdaptableModule): string;Parameters
| Parameter | Type | Description |
|---|---|---|
| adaptableModule | AdaptableModule | Adaptable Module to get description for |
Returns
string
getExportState
Returns Export section of Adaptable State
getExportState(returnJson?: boolean): ExportState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getFlashingCellState
Returns Flashing Cell section of Adaptable State
getFlashingCellState(returnJson?: boolean): FlashingCellState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getFormatColumnState
Returns Format Column section of Adaptable State
getFormatColumnState(returnJson?: boolean): FormatColumnState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getFreeTextColumnState
Returns FreeText Column section of Adaptable State
getFreeTextColumnState(returnJson?: boolean): FreeTextColumnState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getHelpPageForModule
Retrieves the help page for an AdapTable Module
getHelpPageForModule(adaptableModule: AdaptableModule): string;Parameters
| Parameter | Type | Description |
|---|---|---|
| adaptableModule | AdaptableModule | Adaptable Module to get help page for |
Returns
string
getInitialState
Returns the Initial Adaptable State
getInitialState(): InitialState | any;Returns
InitialState | any
getLayoutState
Returns Layout section of Adaptable State
getLayoutState(returnJson?: boolean): LayoutState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getNamedQueryState
Returns Query section of Adaptable State
getNamedQueryState(returnJson?: boolean): NamedQueryState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getNoteState
Returns Note section of Adaptable State
getNoteState(returnJson?: boolean): NoteState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getPersistentState
Retrieves the persistent state in Adaptable, i.e. state that is passed to the StateOptions.persistState() function.
getPersistentState(): AdaptablePersistentState;Returns
getPlusMinusState
Returns Plus Minus section of Adaptable State
getPlusMinusState(returnJson?: boolean): PlusMinusState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getQuickSearchState
Returns Quick Search section of Adaptable State
getQuickSearchState(returnJson?: boolean): QuickSearchState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getScheduleState
Returns Schedule section of Adaptable State
getScheduleState(returnJson?: boolean): ScheduleState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getShortcutState
Returns Shortcut section of Adaptable State
getShortcutState(returnJson?: boolean): ShortcutState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getStatusBarState
Returns StatusBar section of Adaptable State
getStatusBarState(returnJson?: boolean): StatusBarState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getStyledColumnState
Returns StyledColumn section of Adaptable State
getStyledColumnState(returnJson?: boolean): StyledColumnState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getThemeState
Returns Theme section of Adaptable State
getThemeState(returnJson?: boolean): ThemeState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getToolPanelState
Returns Tool Panel section of Adaptable State
getToolPanelState(returnJson?: boolean): ToolPanelState;Parameters
| Parameter | Type | Description |
|---|---|---|
| returnJson | boolean | return as JSON rather than object |
Returns
getUserStateByStateKey
Returns given section of Adaptable State (as JSON or object)
getUserStateByStateKey(stateKey: AdaptableStateKey, returnJson?: boolean): BaseState | string;Parameters
| Parameter | Type | Description |
|---|---|---|
| stateKey | AdaptableStateKey | section of State to return |
| returnJson | boolean | whether to return section as JSON or object |
Returns
BaseState | string
incrementUserStateRevision
Adds '1' to current revision number of State element
incrementUserStateRevision(stateKey: AdaptableStateKey): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| stateKey | AdaptableStateKey | Adaptable State Key to update |
Returns
void
loadUserState
Loads supplied user state, replacing (NOT merging) existing User(persisted) State.
loadUserState(state: InitialState): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| state | InitialState |
Returns
void
persistAdaptableState
Persists the current Adaptable State to storage.
This method first calls StateOption.saveState() to prepare the state and then StateOptions.persistState() to save it to the configured storage.
persistAdaptableState(): Promise<AdaptableState>;Returns
Promise<AdaptableState>
reloadInitialState
Reloads existing (or supplied) Initial State; clears persistent state by calling StateOptions.clearState
reloadInitialState(newInitialState?: InitialState): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| newInitialState | InitialState | optional new InitialState to load |
Returns
void
setAdaptableStateKey
Changes key used for persisting AdaptableState into localStorage; optionally provides an initialState to load
setAdaptableStateKey(adaptableStateKey: string, config?: {
initialState?: InitialState;
flushCurrentState?: boolean;
progressIndicatorLabel?: string;
}): Promise<void>;Parameters
| Parameter | Type | Description |
|---|---|---|
| adaptableStateKey | string | key for persisting the AdaptableState into localStorage |
| config | \{ initialState?:InitialState; flushCurrentState?: boolean; progressIndicatorLabel?: string; \} |
Returns
Promise<void>