跳到主要内容
版本:Next

Interface: IExplorerService

molecule.IExplorerService

Hierarchy

Implemented by

Properties

state

Protected Abstract state: IExplorer

Inherited from

Component.state

Defined in

react/component.ts:44

Methods

addAction

addAction(action): void

Only add an action in toolbar actions

Parameters

NameType
actionIMenuItemProps

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:46


addPanel

addPanel(panel): void

Add a new panel, as well as add a new data for toolbar data

Parameters

NameType
panelIExplorerPanelItem | IExplorerPanelItem[]

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:21


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Inherited from

Component.count

Defined in

common/event/eventBus.ts:28


emit

emit(name, ...args): void

Emit the service event

Parameters

NameTypeDescription
namestringEvent name
...argsanyArguments

Returns

void

Inherited from

Component.emit

Defined in

common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Inherited from

Component.forceUpdate

Defined in

react/component.ts:81


getAction

getAction(id): undefined | IMenuItemProps

Get the specific action in toolbar actions

Parameters

NameType
idUniqueId

Returns

undefined | IMenuItemProps

Defined in

services/workbench/explorer/explorerService.ts:51


getState

getState(): IExplorer

Get the Component state

Returns

IExplorer

Inherited from

Component.getState

Defined in

react/component.ts:85


onClick

onClick(callback): any

Listen to the Explorer header toolbar click event

Parameters

NameType
callback(e: MouseEvent, item: IActionBarItemProps<any>) => void

Returns

any

Defined in

services/workbench/explorer/explorerService.ts:70


onCollapseAllFolders

onCollapseAllFolders(callback): void

Listen to the FolderTree Panel collapse all folders event

Parameters

NameType
callback() => void

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:80


onPanelToolbarClick

onPanelToolbarClick(callback): void

Listen to the Explorer panel toolbar click event

Parameters

NameType
callback(panel: IExplorerPanelItem, toolbarId: string) => void

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:85


onRemovePanel

onRemovePanel(callback): void

Listen to the Explorer panel remove event

Parameters

NameType
callback(panel: IExplorerPanelItem) => void

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:75


onUpdateState

onUpdateState(listener): void

Listen to the Component state update event

Parameters

NameType
listener(prevState: IExplorer, nextState: IExplorer) => void

Returns

void

Inherited from

Component.onUpdateState

Defined in

react/component.ts:73


removeAction

removeAction(id): void

Remove the specific header toolbar action

Parameters

NameTypeDescription
idUniqueIdaction id

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:61


removeOnUpdateState

removeOnUpdateState(listener?): void

Remove the Component update event listening, default is remove all, also you can remove one by pass the listener

Parameters

NameType
listener?Function

Returns

void

Inherited from

Component.removeOnUpdateState

Defined in

react/component.ts:77


removePanel

removePanel(id): void

Remove a panel via id, as well as remove the corresponding action bar

Parameters

NameType
idUniqueId

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:34


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IExplorer

Returns

void

Inherited from

Component.render

Defined in

react/component.ts:69


reset

reset(): void

Reset the ExplorerService state, it's mainly for customizing the Explorer

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:65


setExpandedPanels

setExpandedPanels(activePanelKeys): void

Set expanded Panels of Explore

Parameters

NameType
activePanelKeysUniqueId[]

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:30


setState

setState(values, callback?): void

Set the state values, and notify the view component to re render

Parameters

NameTypeDescription
valuesPartial<IExplorer>update target state values
callback?(prevState: IExplorer, nextState: IExplorer) => void-

Returns

void

Inherited from

Component.setState

Defined in

react/component.ts:56


subscribe

subscribe(name, listener): void

Subscribe the service event

Parameters

NameTypeDescription
namestring | string[]Event name
listenerFunctionListener function

Returns

void

Inherited from

Component.subscribe

Defined in

common/event/eventBus.ts:11


toggleHeaderBar

toggleHeaderBar(id): void

Only toggle the toolbar status

Parameters

NameType
idUniqueId

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:42


togglePanel

togglePanel(id): void

Toggle panel hidden, as well as toggle the toolbar status

Parameters

NameType
idUniqueId

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:38


unsubscribe

unsubscribe(name, listener?): void

Unsubscribe the specific event and the listener function

Parameters

NameTypeDescription
nameanyThe event name
listener?Functionoptional, it unsubscribes events via name if not pass the listener function

Returns

void

Inherited from

Component.unsubscribe

Defined in

common/event/eventBus.ts:37


updateAction

updateAction(action): void

Update the action in toolbar actions

Parameters

NameType
actionPartial<IMenuItemProps>

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:56


updatePanel

updatePanel(data): void

Update the panels data, as well as modify toolbar data

Parameters

NameType
dataPartial<IExplorerPanelItem>

Returns

void

Defined in

services/workbench/explorer/explorerService.ts:25