CommandPalette
show a searchable command palette (cmd/ctrl+p)
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: CommandPaletteOptions) |
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
dynamicCmds: import("../commands/commands.js").CommandObject[] |
|
| Private Members | ||
| private |
|
|
| private |
|
|
| private |
_defaultIcon: * |
|
| private |
|
|
| private |
_lastSearch: * |
|
| private |
_numResults: * |
|
| private |
bg: * |
|
| private |
cursorIndex: * |
|
| private |
id: * |
|
| private |
|
|
| private |
|
|
Method Summary
| Public Methods | ||
| public |
addDynamic(category: string, title: string, func: Function, icon: string): * |
|
| public |
addResult(cmd: Object, num: Number, idx: Number): String add result |
|
| public |
close() |
|
| public |
doSearch(str: String) |
|
| public |
execIndex(el: *) |
|
| public |
getBookmarkIconForCmd(cmdName: String): * |
|
| public |
isCmdInSidebar(cmdName: string): * |
|
| public |
isVisible(): * |
|
| public |
keyDown(e: KeyboardEvent) |
|
| public |
navigate(dir: number) |
|
| public |
onBookmarkIconClick(ev: MouseEvent) |
|
| public |
onResultClick(ev: PointerEvent) |
|
| public |
removeDynamic(id: string) |
|
| public |
show() |
|
Public Constructors
public constructor(options: CommandPaletteOptions) source
Params:
| Name | Type | Attribute | Description |
| options | CommandPaletteOptions |
Public Members
public : * source
public dynamicCmds: import("../commands/commands.js").CommandObject[] source
Private Members
private _bookmarkActiveIcon: * source
private _bookmarkInactiveIcon: * source
private _defaultIcon: * source
private _findTimeoutId: * source
private _lastSearch: * source
private _numResults: * source
private bg: * source
private cursorIndex: * source
private id: * source
private options: CommandPaletteOptions source
private resultCommands: * source
Public Methods
public addDynamic(category: string, title: string, func: Function, icon: string): * source
Params:
| Name | Type | Attribute | Description |
| category | string | ||
| title | string | ||
| func | Function | ||
| icon | string |
Return:
| * |
public addResult(cmd: Object, num: Number, idx: Number): String source
add result
Params:
| Name | Type | Attribute | Description |
| cmd | Object | ||
| num | Number | ||
| idx | Number |
Return:
| String |
public close() source
public doSearch(str: String) source
Params:
| Name | Type | Attribute | Description |
| str | String | String |
public execIndex(el: *) source
Params:
| Name | Type | Attribute | Description |
| el | * |
public getBookmarkIconForCmd(cmdName: String): * source
Params:
| Name | Type | Attribute | Description |
| cmdName | String |
Return:
| * |
public isCmdInSidebar(cmdName: string): * source
Params:
| Name | Type | Attribute | Description |
| cmdName | string |
Return:
| * |
public keyDown(e: KeyboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | KeyboardEvent |
public navigate(dir: number) source
Params:
| Name | Type | Attribute | Description |
| dir | number |
|
public onBookmarkIconClick(ev: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| ev | MouseEvent |
public onResultClick(ev: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| ev | PointerEvent |
public removeDynamic(id: string) source
Params:
| Name | Type | Attribute | Description |
| id | string |