Interface: IExplorerService
molecule.IExplorerService
Hierarchy
Implemented by
Properties
state
• Protected
Abstract
state: IExplorer
Inherited from
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:41
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:21
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Inherited from
Defined in
src/common/event/eventBus.ts:28
emit
▸ emit(name
, ...args
): void
Emit the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Inherited from
Defined in
src/common/event/eventBus.ts:20
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Inherited from
Defined in
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:46
getState
▸ getState(): IExplorer
Get the Component state
Returns
Inherited from
Defined in
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:65
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:75
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:70
onUpdateState
▸ onUpdateState(callback
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
callback | (prevState : IExplorer , nextState : IExplorer ) => void |
Returns
void
Inherited from
Defined in
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:56
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
Returns
void
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
Defined in
src/services/workbench/explorer/explorerService.ts:29
render
▸ render(nextState?
): void
Initiative notify the component to render the view by the state
Parameters
Name | Type |
---|---|
nextState? | IExplorer |
Returns
void
Inherited from
Defined in
reset
▸ reset(): void
Reset the ExplorerService state, it's mainly for customizing the Explorer
Returns
void
Defined in
src/services/workbench/explorer/explorerService.ts:60
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
Inherited from
Defined in
subscribe
▸ subscribe(name
, callback
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
callback | Function | Callback function |
Returns
void
Inherited from
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:37
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:33
unsubscribe
▸ unsubscribe(name
): void
Unsubscribe the specific event
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
Returns
void
Inherited from
Defined in
src/common/event/eventBus.ts:37
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:51
updatePanel
▸ updatePanel(data
): void
Update the panels data, as well as modify toolbar data
Parameters
Name | Type |
---|---|
data | Partial <IExplorerPanelItem > |
Returns
void