Interface: IAuxiliaryBarService
molecule.IAuxiliaryBarService
Hierarchy
↳
IAuxiliaryBarService
Implemented by
Properties
state
• Protected
Abstract
state: IAuxiliaryBar
Inherited from
Defined in
Methods
addAuxiliaryBar
▸ addAuxiliaryBar(tabs
): void
Parameters
Name | Type |
---|---|
tabs | IAuxiliaryData | IAuxiliaryData [] |
Returns
void
Defined in
services/workbench/auxiliaryBarService.ts:19
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
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
Inherited from
Defined in
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Inherited from
Defined in
getCurrentTab
▸ getCurrentTab(): undefined
| IAuxiliaryData
Get the current tab
Returns
undefined
| IAuxiliaryData
Defined in
services/workbench/auxiliaryBarService.ts:18
getState
▸ getState(): IAuxiliaryBar
Get the Component state
Returns
Inherited from
Defined in
onTabClick
▸ onTabClick(callback
): void
Called when auxiliary tab title clicked
Parameters
Name | Type |
---|---|
callback | (key : UniqueId ) => void |
Returns
void
Defined in
services/workbench/auxiliaryBarService.ts:39
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (prevState : IAuxiliaryBar , nextState : IAuxiliaryBar ) => void |
Returns
void
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
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
Inherited from
Defined in
reset
▸ reset(): void
Reset all states
Returns
void
Defined in
services/workbench/auxiliaryBarService.ts:43
setActive
▸ setActive(current
): void
Set the active one on data
Parameters
Name | Type |
---|---|
current | undefined | UniqueId |
Returns
void
Defined in
services/workbench/auxiliaryBarService.ts:23
setChildren
▸ setChildren(children
): void
Set the children of auxiliary bar
Parameters
Name | Type |
---|---|
children | ReactNode |
Returns
void
Defined in
services/workbench/auxiliaryBarService.ts:35
setMode
▸ setMode(mode
): IAuxiliaryBarMode
Set the mode of auxiliary bar
Parameters
Name | Type |
---|---|
mode | IAuxiliaryBarMode | (preState : IAuxiliaryBarMode ) => IAuxiliaryBarMode |
Returns
Defined in
services/workbench/auxiliaryBarService.ts:27
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
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
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