Class: AuxiliaryBarService
molecule.AuxiliaryBarService
Hierarchy
↳
AuxiliaryBarService
Implements
Constructors
constructor
• new AuxiliaryBarService()
Overrides
Defined in
services/workbench/auxiliaryBarService.ts:53
Properties
state
• state: IAuxiliaryBar
Implementation of
Overrides
Defined in
services/workbench/auxiliaryBarService.ts:51
Methods
addAuxiliaryBar
▸ addAuxiliaryBar(tabs): void
Parameters
| Name | Type |
|---|---|
tabs | IAuxiliaryData | IAuxiliaryData[] |
Returns
void
Implementation of
IAuxiliaryBarService.addAuxiliaryBar
Defined in
services/workbench/auxiliaryBarService.ts:64
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
IAuxiliaryBarService.forceUpdate
Inherited from
Defined in
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
Implementation of
Inherited from
Defined in
onTabClick
▸ onTabClick(callback): void
Called when auxiliary tab title clicked
Parameters
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
listener | (prevState: IAuxiliaryBar, nextState: IAuxiliaryBar) => void |
Returns
void
Implementation of
IAuxiliaryBarService.onUpdateState
Inherited from
Defined in
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
IAuxiliaryBarService.removeOnUpdateState
Inherited from
Defined in
render
▸ render(nextState?): void
Initiative notify the component to render the view by the state
Parameters
| Name | Type |
|---|---|
nextState? | IAuxiliaryBar |
Returns
void
Implementation of
Inherited from
Defined in
reset
▸ reset(): void
Reset all states
Returns
void
Implementation of
Defined in
services/workbench/auxiliaryBarService.ts:101
setActive
▸ setActive(current): void
Set the active one on data
Parameters
| Name | Type |
|---|---|
current | undefined | 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
| Name | Type |
|---|---|
children | ReactNode |
Returns
void
Implementation of
IAuxiliaryBarService.setChildren
Defined in
services/workbench/auxiliaryBarService.ts:75
setMode
▸ setMode(mode): IAuxiliaryBarMode
Set the mode of auxiliary bar
Parameters
| Name | Type |
|---|---|
mode | IAuxiliaryBarMode | (preState: IAuxiliaryBarMode) => IAuxiliaryBarMode |
Returns
Implementation of
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
| Name | Type | Description |
|---|---|---|
values | Partial<IAuxiliaryBar> | update target state values |
callback? | (prevState: IAuxiliaryBar, nextState: IAuxiliaryBar) => 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
IAuxiliaryBarService.subscribe
Inherited from
Defined in
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
IAuxiliaryBarService.unsubscribe