Class: ExplorerService
molecule.ExplorerService
Hierarchy
Implements
Constructors
constructor
• new ExplorerService()
Overrides
Defined in
services/workbench/explorer/explorerService.ts:96
Properties
state
• Protected state: IExplorer
Implementation of
Overrides
Defined in
services/workbench/explorer/explorerService.ts:95
Methods
addAction
▸ addAction(action): void
Only add an action in toolbar actions
Parameters
| Name | Type |
|---|---|
action | IMenuItemProps | IMenuItemProps[] |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:210
addPanel
▸ addPanel(data): void
Add a new panel, as well as add a new data for toolbar data
Parameters
| Name | Type |
|---|---|
data | IExplorerPanelItem | IExplorerPanelItem[] |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:177
count
▸ count(name): number
Count the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Event name |
Returns
number
Implementation of
Inherited from
Defined in
emit
▸ emit(name, ...args): void
Emit the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Implementation of
Inherited from
Defined in
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Implementation of
Inherited from
Defined in
getAction
▸ getAction(id): undefined | IMenuItemProps
Get the specific action in toolbar actions
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
undefined | IMenuItemProps
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:111
getState
▸ getState(): IExplorer
Get the Component state
Returns
Implementation of
Inherited from
Defined in
onClick
▸ onClick(callback): void
Listen to the Explorer header toolbar click event
Parameters
| Name | Type |
|---|---|
callback | (e: MouseEvent, item: IActionBarItemProps<any>) => void |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:322
onCollapseAllFolders
▸ onCollapseAllFolders(callback): void
Listen to the FolderTree Panel collapse all folders event
Parameters
| Name | Type |
|---|---|
callback | () => void |
Returns
void
Implementation of
IExplorerService.onCollapseAllFolders
Defined in
services/workbench/explorer/explorerService.ts:332
onPanelToolbarClick
▸ onPanelToolbarClick(callback): void
Listen to the Explorer panel toolbar click event
Parameters
| Name | Type |
|---|---|
callback | (panel: IExplorerPanelItem, toolbarId: string) => void |
Returns
void
Implementation of
IExplorerService.onPanelToolbarClick
Defined in
services/workbench/explorer/explorerService.ts:336
onRemovePanel
▸ onRemovePanel(callback): void
Listen to the Explorer panel remove event
Parameters
| Name | Type |
|---|---|
callback | (panel: IExplorerPanelItem) => void |
Returns
void
Implementation of
IExplorerService.onRemovePanel
Defined in
services/workbench/explorer/explorerService.ts:328
onUpdateState
▸ onUpdateState(listener): void
Listen to the Component state update event
Parameters
| Name | Type |
|---|---|
listener | (prevState: IExplorer, nextState: IExplorer) => void |
Returns
void
Implementation of
IExplorerService.onUpdateState
Inherited from
Defined in
removeAction
▸ removeAction(id): void
Remove the specific header toolbar action
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:257
removeOnUpdateState
▸ removeOnUpdateState(listener?): void
Remove the Component update event listening, default is remove all, also you can remove one by pass the listener
Parameters
| Name | Type |
|---|---|
listener? | Function |
Returns
void
Implementation of
IExplorerService.removeOnUpdateState
Inherited from
Defined in
removePanel
▸ removePanel(id): void
Remove a panel via id, as well as remove the corresponding action bar
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:242
render
▸ render(nextState?): void
Initiative notify the component to render the view by the state
Parameters
| Name | Type |
|---|---|
nextState? | IExplorer |
Returns
void
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset the ExplorerService state, it's mainly for customizing the Explorer
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:315
setExpandedPanels
▸ setExpandedPanels(activePanelKeys): void
Set expanded Panels of Explore
Parameters
| Name | Type |
|---|---|
activePanelKeys | UniqueId[] |
Returns
void
Implementation of
IExplorerService.setExpandedPanels
Defined in
services/workbench/explorer/explorerService.ts:101
setState
▸ setState(values, callback?): void
Set the state values, and notify the view component to re render
Parameters
| Name | Type | Description |
|---|---|---|
values | Partial<IExplorer> | update target state values |
callback? | (prevState: IExplorer, nextState: IExplorer) => void | - |
Returns
void
Implementation of
Inherited from
Defined in
subscribe
▸ subscribe(name, listener): void
Subscribe the service event
Parameters
| Name | Type | Description |
|---|---|---|
name | string | string[] | Event name |
listener | Function | Listener function |
Returns
void
Implementation of
Inherited from
Defined in
toggleHeaderBar
▸ toggleHeaderBar(id): void
Only toggle the toolbar status
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Implementation of
IExplorerService.toggleHeaderBar
Defined in
services/workbench/explorer/explorerService.ts:293
toggleIcon
▸ Private toggleIcon(icon?): "" | "check"
Parameters
| Name | Type |
|---|---|
icon? | string |
Returns
"" | "check"
Defined in
services/workbench/explorer/explorerService.ts:107
togglePanel
▸ togglePanel(id): void
Toggle panel hidden, as well as toggle the toolbar status
Parameters
| Name | Type |
|---|---|
id | UniqueId |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:277
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
Implementation of
Inherited from
Defined in
updateAction
▸ updateAction(action): void
Update the action in toolbar actions
Parameters
| Name | Type |
|---|---|
action | Partial<IMenuItemProps> |
Returns
void
Implementation of
Defined in
services/workbench/explorer/explorerService.ts:145
updatePanel
▸ updatePanel(data): void
Update the panels data, as well as modify toolbar data
Parameters
| Name | Type |
|---|---|
data | Partial<IExplorerPanelItem> |
Returns
void