Interface: IExplorerService
services.IExplorerService
Hierarchy
Component\<IExplorer>↳
IExplorerService
Table of contents
Properties
Methods
- addAction
- addPanel
- getAction
- onClick
- onCollapseAllFolders
- onPanelToolbarClick
- onRemovePanel
- removeAction
- removePanel
- reset
- setExpandedPanels
- subscribe
- toggleHeaderBar
- togglePanel
- unsubscribe
- updateAction
- updatePanel
Properties
state
• Protected Abstract state: IExplorer
Inherited from
Component.state
Defined in
Methods
addAction
▸ addAction(action): void
Only add an action in toolbar actions
Parameters
| Name | Type |
|---|---|
action | IMenuItemProps |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:39
addPanel
▸ addPanel(panel): void
Add a new panel, as well as add a new data for toolbar data
Parameters
| Name | Type |
|---|---|
panel | IExplorerPanelItem | IExplorerPanelItem[] |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:14
getAction
▸ getAction(id): undefined | IMenuItemProps
Get the specific action in toolbar actions
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
undefined | IMenuItemProps
Defined in
src/services/workbench/explorer/explorerService.ts:44
onClick
▸ onClick(callback): any
Listen to the Explorer header toolbar click event
Parameters
| Name | Type |
|---|---|
callback | (e: MouseEvent, item: IActionBarItemProps\<any>) => void |
Returns
any
Defined in
src/services/workbench/explorer/explorerService.ts:63
onCollapseAllFolders
▸ onCollapseAllFolders(callback): void
Listen to the FolderTree Panel collapse all folders event
Parameters
| Name | Type |
|---|---|
callback | () => void |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:73
onPanelToolbarClick
▸ onPanelToolbarClick(callback): void
Listen to the Explorer panel toolbar click event
Parameters
| Name | Type |
|---|---|
callback | (panel: IExplorerPanelItem, toolbarId: string) => void |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:78
onRemovePanel
▸ onRemovePanel(callback): void
Listen to the Explorer panel remove event
Parameters
| Name | Type |
|---|---|
callback | (panel: IExplorerPanelItem) => void |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:68
removeAction
▸ removeAction(id): void
Remove the specific header toolbar action
Parameters
| Name | Type | Description |
|---|---|---|
id | UniqueId | action id |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:54
removePanel
▸ removePanel(id): void
Remove a panel via id, as well as remove the corresponding action bar
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:27
reset
▸ reset(): void
Reset the ExplorerService state, it's mainly for customizing the Explorer
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:58
setExpandedPanels
▸ setExpandedPanels(activePanelKeys): void
Set expanded Panels of Explore
Parameters
| Name | Type |
|---|---|
activePanelKeys | UniqueId[] |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:23
subscribe
▸ subscribe(name, listener): void
Subscribe the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | string[] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Component.subscribe
Defined in
src/common/event/eventBus.ts:11
toggleHeaderBar
▸ toggleHeaderBar(id): void
Only toggle the toolbar status
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:35
togglePanel
▸ togglePanel(id): void
Toggle panel hidden, as well as toggle the toolbar status
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:31
unsubscribe
▸ unsubscribe(name, listener?): void
Unsubscribe the specific event and the listener function
Parameters
| Name | Type | Description |
|---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Inherited from
Component.unsubscribe
Defined in
src/common/event/eventBus.ts:39
updateAction
▸ updateAction(action): void
Update the action in toolbar actions
Parameters
| Name | Type |
|---|---|
action | Partial\<IMenuItemProps> |
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:49
updatePanel
▸ updatePanel(data): void
Update the panels data, as well as modify toolbar data
Parameters
| Name | Type |
|---|---|
data | Partial\<IExplorerPanelItem> |
Returns
void