Skip to main content
Version: 1.x

Interface: IPanelService

molecule.IPanelService

Hierarchy

Implemented by

Properties

outputEditorInstance

Readonly outputEditorInstance: undefined | IStandaloneCodeEditor

The editorInstance of Output

Defined in

services/workbench/panelService.ts:26


state

Protected Abstract state: IPanel

Inherited from

Component.state

Defined in

react/component.ts:44

Methods

add

add(data): void

Add new Panel items

Parameters

NameType
dataIPanelItem<any> | IPanelItem<any>[]

Returns

void

Defined in

services/workbench/panelService.ts:51


appendOutput

appendOutput(content): void

Append the content into Output panel

Parameters

NameType
contentstring

Returns

void

Defined in

services/workbench/panelService.ts:98


cleanOutput

cleanOutput(): void

Clean the Output content

Returns

void

Defined in

services/workbench/panelService.ts:102


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


getOutputValue

getOutputValue(): string

Get the value of Output Panel

Returns

string

Defined in

services/workbench/panelService.ts:93


getPanel

getPanel(id): undefined | IPanelItem<any>

Get the specific panel

Parameters

NameType
idUniqueId

Returns

undefined | IPanelItem<any>

Defined in

services/workbench/panelService.ts:46


getState

getState(): IPanel

Get the Component state

Returns

IPanel

Inherited from

Component.getState

Defined in

react/component.ts:85


onTabChange

onTabChange(callback): void

Listen to the Panel tabs onChange event

Parameters

NameType
callback(panelId: UniqueId) => void

Returns

void

Defined in

services/workbench/panelService.ts:77


onTabClose

onTabClose(callback): void

Listen to the Panel tabs close event

Parameters

NameType
callback(panelId: UniqueId) => void

Returns

void

Defined in

services/workbench/panelService.ts:89


onToolbarClick

onToolbarClick(callback): void

Listen to the Panel toolbar click event

Parameters

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

Returns

void

Defined in

services/workbench/panelService.ts:82


onUpdateState

onUpdateState(listener): void

Listen to the Component state update event

Parameters

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

Returns

void

Inherited from

Component.onUpdateState

Defined in

react/component.ts:73


open

open(panel): void

Open a new or existing panel item as the active in Panel view

Parameters

NameType
panelIPanelItem<any>

Returns

void

Defined in

services/workbench/panelService.ts:41


remove

remove(id): undefined | IPanelItem<any>

Remove the specific panel

Parameters

NameType
idUniqueId

Returns

undefined | IPanelItem<any>

Defined in

services/workbench/panelService.ts:68


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


render

render(nextState?): void

Initiative notify the component to render the view by the state

Parameters

NameType
nextState?IPanel

Returns

void

Inherited from

Component.render

Defined in

react/component.ts:69


reset

reset(): void

Reset data in state

Returns

void

Defined in

services/workbench/panelService.ts:106


setActive

setActive(id): void

Set the current active panel

This method will log error when couldn't find target panel in state data. So if you want to add a panel and meanwhile active it, please use the open method

Parameters

NameTypeDescription
idUniqueIdtarget panel id

Returns

void

Defined in

services/workbench/panelService.ts:36


setState

setState(values, callback?): void

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

Parameters

NameTypeDescription
valuesPartial<IPanel>update target state values
callback?(prevState: IPanel, nextState: IPanel) => 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


toggleMaximize

toggleMaximize(): void

Toggle the panel between maximized or normal

Returns

void

Defined in

services/workbench/panelService.ts:72


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


update

update(panel): undefined | IPanelItem<any>

Update the specific panel

Parameters

NameTypeDescription
panelIPanelItem<any>the id field is required

Returns

undefined | IPanelItem<any>

Defined in

services/workbench/panelService.ts:56


updateOutput

updateOutput(panel): undefined | IPanelItem<any>

Update the Output panel, except the value

If you want to update the value of this panel, please use the appendOutput method

Parameters

NameType
panelIPanelItem<any>

Returns

undefined | IPanelItem<any>

Defined in

services/workbench/panelService.ts:63