ShortcutApi
Provides run-time access to Shortcut Module and associated state
TypeScript
export interfaceMethods
| Method | Description |
|---|---|
| addShortcut(shortcut) | Adds new Shortcut to the state |
| deleteShortcut(shortcut) | Deletes Shortcut from the state |
| editShortcut(shortcut) | Edits Shortcut in state |
| getActiveShortcuts(config) | Gets all active (not-suspended) Shortcuts in Adaptable State |
| getShortcutById(id, config) | Retrieves Shortcut by Id |
| getShortcutByName(name) | Retrieves a Shortcut by its Name |
| getShortcuts(config) | Gets all Shortcuts in Adaptable State |
| getShortcutState() | Retrieves Shortcut section from Adaptable State |
| getSuspendedShortcuts(config) | Gets all suspended Shortcuts in Adaptable State |
| openShortcutSettingsPanel() | Opens Settings Panel with Shortcut section selected and visible |
| suspendAllShortcut() | Suspends all Shortcuts |
| suspendShortcut(shortcut) | Suspends Shortcut definition |
| unSuspendAllShortcut() | Activates all suspended Shortcut |
| unSuspendShortcut(shortcut) | Activates a suspended Shortcut definition |
Method Details
addShortcut
Adds new Shortcut to the state
TypeScript
addShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to add |
Returns
deleteShortcut
Deletes Shortcut from the state
TypeScript
deleteShortcut(shortcut: Shortcut): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to delete |
Returns
void
editShortcut
Edits Shortcut in state
TypeScript
editShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to edit |
Returns
getActiveShortcuts
Gets all active (not-suspended) Shortcuts in Adaptable State
TypeScript
getActiveShortcuts(config?: LayoutExtendedConfig): Shortcut[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
Shortcut[]
getShortcutById
Retrieves Shortcut by Id
TypeScript
getShortcutById(id: Shortcut['Uuid'], config?: LayoutExtendedConfig): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | Shortcut['Uuid'] | Shortcut id |
| config | LayoutExtendedConfig |
Returns
getShortcutByName
Retrieves a Shortcut by its Name
TypeScript
getShortcutByName(name: string): Shortcut | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the Shortcut |
Returns
Shortcut | undefined
getShortcuts
Gets all Shortcuts in Adaptable State
TypeScript
getShortcuts(config?: LayoutExtendedConfig): Shortcut[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
Shortcut[]
getShortcutState
Retrieves Shortcut section from Adaptable State
TypeScript
getShortcutState(): ShortcutState;Returns
getSuspendedShortcuts
Gets all suspended Shortcuts in Adaptable State
TypeScript
getSuspendedShortcuts(config?: LayoutExtendedConfig): Shortcut[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
Shortcut[]
openShortcutSettingsPanel
Opens Settings Panel with Shortcut section selected and visible
TypeScript
openShortcutSettingsPanel(): void;Returns
void
suspendAllShortcut
Suspends all Shortcuts
TypeScript
suspendAllShortcut(): void;Returns
void
suspendShortcut
Suspends Shortcut definition
TypeScript
suspendShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to suspend |
Returns
unSuspendAllShortcut
Activates all suspended Shortcut
TypeScript
unSuspendAllShortcut(): void;Returns
void
unSuspendShortcut
Activates a suspended Shortcut definition
TypeScript
unSuspendShortcut(shortcut: Shortcut): Shortcut;Parameters
| Parameter | Type | Description |
|---|---|---|
| shortcut | Shortcut | Shortcut to suspend |