Skip to main content
Version: 1.x

Class: AuxiliaryBarService

molecule.AuxiliaryBarService

Hierarchy

Implements

Constructors

constructor

new AuxiliaryBarService()

Overrides

Component.constructor

Defined in

services/workbench/auxiliaryBarService.ts:53

Properties

state

state: IAuxiliaryBar

Implementation of

IAuxiliaryBarService.state

Overrides

Component.state

Defined in

services/workbench/auxiliaryBarService.ts:51

Methods

addAuxiliaryBar

addAuxiliaryBar(tabs): void

Parameters

NameType
tabsIAuxiliaryData | IAuxiliaryData[]

Returns

void

Implementation of

IAuxiliaryBarService.addAuxiliaryBar

Defined in

services/workbench/auxiliaryBarService.ts:64


count

count(name): number

Count the service event

Parameters

NameTypeDescription
namestringEvent name

Returns

number

Implementation of

IAuxiliaryBarService.count

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

Implementation of

IAuxiliaryBarService.emit

Inherited from

Component.emit

Defined in

common/event/eventBus.ts:20


forceUpdate

forceUpdate(): void

Force to update the Component

Returns

void

Implementation of

IAuxiliaryBarService.forceUpdate

Inherited from

Component.forceUpdate

Defined in

react/component.ts:81


getCurrentTab

getCurrentTab(): undefined | IAuxiliaryData

Get the current tab

Returns

undefined | IAuxiliaryData

Implementation of

IAuxiliaryBarService.getCurrentTab

Defined in

services/workbench/auxiliaryBarService.ts:58


getState

getState(): IAuxiliaryBar

Get the Component state

Returns

IAuxiliaryBar

Implementation of

IAuxiliaryBarService.getState

Inherited from

Component.getState

Defined in

react/component.ts:85


onTabClick

onTabClick(callback): void

Called when auxiliary tab title clicked

Parameters

NameType
callback(key: UniqueId) => void

Returns

void

Implementation of

IAuxiliaryBarService.onTabClick

Defined in

services/workbench/auxiliaryBarService.ts:106


onUpdateState

onUpdateState(listener): void

Listen to the Component state update event

Parameters

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

Returns

void

Implementation of

IAuxiliaryBarService.onUpdateState

Inherited from

Component.onUpdateState

Defined in

react/component.ts:73


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

Implementation of

IAuxiliaryBarService.removeOnUpdateState

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?IAuxiliaryBar

Returns

void

Implementation of

IAuxiliaryBarService.render

Inherited from

Component.render

Defined in

react/component.ts:69


reset

reset(): void

Reset all states

Returns

void

Implementation of

IAuxiliaryBarService.reset

Defined in

services/workbench/auxiliaryBarService.ts:101


setActive

setActive(current): void

Set the active one on data

Parameters

NameType
currentundefined | UniqueId

Returns

void

Implementation of

IAuxiliaryBarService.setActive

Defined in

services/workbench/auxiliaryBarService.ts:71


setChildren

setChildren(children): void

Set the children of auxiliary bar

Parameters

NameType
childrenReactNode

Returns

void

Implementation of

IAuxiliaryBarService.setChildren

Defined in

services/workbench/auxiliaryBarService.ts:75


setMode

setMode(mode): IAuxiliaryBarMode

Set the mode of auxiliary bar

Parameters

NameType
modeIAuxiliaryBarMode | (preState: IAuxiliaryBarMode) => IAuxiliaryBarMode

Returns

IAuxiliaryBarMode

Implementation of

IAuxiliaryBarService.setMode

Defined in

services/workbench/auxiliaryBarService.ts:81


setState

setState(values, callback?): void

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

Parameters

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

Returns

void

Implementation of

IAuxiliaryBarService.setState

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

Implementation of

IAuxiliaryBarService.subscribe

Inherited from

Component.subscribe

Defined in

common/event/eventBus.ts:11


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

Implementation of

IAuxiliaryBarService.unsubscribe

Inherited from

Component.unsubscribe

Defined in

common/event/eventBus.ts:37