StatusBar

modules/status-bar.StatusBar

The base class of all Jodit UI components. Provides work with a life cycle.

Hierarchy

Implements

constructor

new StatusBar(jodit, target): StatusBar

Parameters

Name Type
jodit IJodit
target HTMLElement

Returns

StatusBar

Inherited from

ViewComponent.constructor

Defined in

src/modules/status-bar/status-bar.ts#104

STATUSES

Static STATUSES: Object = STATUSES

Type declaration

Name Type
beforeInit "beforeInit"
ready "ready"
beforeDestruct "beforeDestruct"
destructed "destructed"

Inherited from

ViewComponent.STATUSES

Defined in

src/core/component/component.ts#40


async

async: IAsync

Implementation of

IStatusBar.async

Inherited from

ViewComponent.async

Defined in

src/core/component/component.ts#44


uid

Readonly uid: string

Implementation of

IStatusBar.uid

Inherited from

ViewComponent.uid

Defined in

src/core/component/component.ts#59


ownerWindow

ownerWindow: Window = window

The window in which jodit was created

Implementation of

IStatusBar.ownerWindow

Inherited from

ViewComponent.ownerWindow

Defined in

src/core/component/component.ts#109


jodit

jodit: IJodit

Parent View element

Inherited from

ViewComponent.jodit

Defined in

src/core/component/view-component.ts#22


container

container: HTMLDivElement

Implementation of

IStatusBar.container

Defined in

src/modules/status-bar/status-bar.ts#37


mods

Readonly mods: IDictionary<ModType> = {}

Implementation of

IStatusBar.mods

Inherited from

Mods.mods

Defined in

src/modules/status-bar/status-bar.ts#60


target

Readonly target: HTMLElement

Defined in

src/modules/status-bar/status-bar.ts#106

componentName

get componentName(): string

Returns

string

Implementation of

IStatusBar.componentName

Defined in

src/core/component/component.ts#46


ownerDocument

get ownerDocument(): Document

The document in which jodit was created

Returns

Document

Implementation of

IStatusBar.ownerDocument

Defined in

src/core/component/component.ts#95


od

get od(): Document

Shortcut for this.ownerDocument

Returns

Document

Implementation of

IStatusBar.od

Defined in

src/core/component/component.ts#102


ow

get ow(): Window

Returns

Window

Implementation of

IStatusBar.ow

Defined in

src/core/component/component.ts#110


isReady

get isReady(): boolean

Component is ready for work

Returns

boolean

Implementation of

IStatusBar.isReady

Defined in

src/core/component/component.ts#145


isDestructed

get isDestructed(): boolean

Component was destructed

Returns

boolean

Implementation of

IStatusBar.isDestructed

Defined in

src/core/component/component.ts#152


isInDestruct

get isInDestruct(): boolean

The component is currently undergoing destructuring or has already been destroyed.
Those. you should not the app froze new events on him now or do anything else with him.

Returns

boolean

Implementation of

IStatusBar.isInDestruct

Defined in

src/core/component/component.ts#160


componentStatus

get componentStatus(): ComponentStatus

Current component status

Returns

ComponentStatus

Implementation of

IStatusBar.componentStatus

Defined in

src/core/component/component.ts#210

set componentStatus(componentStatus): void

Setter for current component status

Parameters

Name Type
componentStatus ComponentStatus

Returns

void

Implementation of

IStatusBar.componentStatus

Defined in

src/core/component/component.ts#217


j

get j(): T

Shortcut for this.jodit

Returns

T

Defined in

src/core/component/view-component.ts#27


defaultTimeout

get defaultTimeout(): number

Returns

number

Defined in

src/core/component/view-component.ts#31


isShown

get isShown(): boolean

Status bar is shown

Returns

boolean

Implementation of

IStatusBar.isShown

Defined in

src/modules/status-bar/status-bar.ts#56

getFullElName

getFullElName(elementName): string

Calc BEM element class name

Parameters

Name Type Description
elementName string element name in the bem classification

Returns

string

Inherited from

ViewComponent.getFullElName

Defined in

src/core/component/component.ts#65

getFullElName(elementName, mod): string

Parameters

Name Type
elementName string
mod string

Returns

string

Inherited from

ViewComponent.getFullElName

Defined in

src/core/component/component.ts#66

getFullElName(elementName, mod, modValue): string

Parameters

Name Type
elementName string
mod string
modValue string | boolean

Returns

string

Inherited from

ViewComponent.getFullElName

Defined in

src/core/component/component.ts#67


get

get<T>(chain, obj?): Nullable<T>

Safe get any field

Type parameters

Name
T

Parameters

Name Type Description
chain string the path to be traversed in the obj object
obj? IDictionary the object in which the value is searched

Returns

Nullable<T>

Example

private a = {
  b: {
    c: {
      e: {
        g: {
          color: 'red'
        }
      }
    }
  }
}

this.get('a.b.c.e.g.color'); // Safe access to color
// instead using optionsl chaining
this?.a?.b?.c?.e?.g?.color

Inherited from

ViewComponent.get

Defined in

src/core/component/component.ts#138


bindDestruct

bindDestruct(component): this

Bind destructor to some View

Parameters

Name Type
component IComponent<IViewBased<IViewOptions>>

Returns

this

Inherited from

ViewComponent.bindDestruct

Defined in

src/core/component/component.ts#170


setStatus

setStatus(componentStatus): void

Set component status

Parameters

Name Type Description
componentStatus ComponentStatus component status

Returns

void

See

ComponentStatus

Inherited from

ViewComponent.setStatus

Defined in

src/core/component/component.ts#226


hookStatus

hookStatus(status, callback): void

Adds a handler for changing the component's status

Parameters

Name Type Description
status ComponentStatus the status at which the callback is triggered
callback (component: this) => void a function that will be called when the status is status

Returns

void

Inherited from

ViewComponent.hookStatus

Defined in

src/core/component/component.ts#265


isInstanceOf

isInstanceOf<T>(c, constructorFunc): c is T

Type parameters

Name Type
T extends Component

Parameters

Name Type
c unknown
constructorFunc Function

Returns

c is T

Inherited from

ViewComponent.isInstanceOf

Defined in

src/core/component/component.ts#283


i18n

i18n(text, ...params): string

Parameters

Name Type
text string
...params (string | number)[]

Returns

string

Inherited from

ViewComponent.i18n

Defined in

src/core/component/view-component.ts#35


setParentView

setParentView(jodit): this

Attach component to View

Parameters

Name Type
jodit IJodit

Returns

this

Inherited from

ViewComponent.setParentView

Defined in

src/core/component/view-component.ts#42


getElm

getElm<T>(this, elementName): Nullable<HTMLElement>

Return element with BEM class name

Type parameters

Name Type
T extends IComponent<IViewBased<IViewOptions>> & IContainer & IElms

Parameters

Name Type
this T
elementName string

Returns

Nullable<HTMLElement>

Inherited from

Elms.getElm

Defined in

src/core/traits/elms.ts#18


getElms

getElms<T>(this, elementName): HTMLElement[]

Return elements with BEM class name

Type parameters

Name Type
T extends IComponent<IViewBased<IViewOptions>> & IContainer & IElms

Parameters

Name Type
this T
elementName string

Returns

HTMLElement[]

Inherited from

Elms.getElms

Defined in

src/core/traits/elms.ts#30


afterSetMod

afterSetMod(name, value): void

Parameters

Name Type
name string
value ModType

Returns

void

Inherited from

Mods.afterSetMod

Defined in

src/core/traits/mods.ts#23


setMod

setMod<T>(this, name, value, container?): T

Set/remove BEM class modification

Type parameters

Name Type
T extends IComponent<IViewBased<IViewOptions>> & IContainer & IMods

Parameters

Name Type Description
this T -
name string -
value ModType if null, mod will be removed
container? HTMLElement -

Returns

T

Inherited from

Mods.setMod

Defined in

src/core/traits/mods.ts#30


getMod

getMod(this, name): ModType

Get BEM class modification value

Parameters

Name Type
this IMods
name string

Returns

ModType

Inherited from

Mods.getMod

Defined in

src/core/traits/mods.ts#64


className

className(): string

Returns

string

Inherited from

ViewComponent.className

Defined in

src/modules/status-bar/status-bar.ts#33


hide

hide(): void

Hide statusbar

Returns

void

Defined in

src/modules/status-bar/status-bar.ts#42


show

show(): void

Show statusbar

Returns

void

Defined in

src/modules/status-bar/status-bar.ts#49


getHeight

getHeight(): number

Height of statusbar

Returns

number

Defined in

src/modules/status-bar/status-bar.ts#65


append

append(child, inTheRight?): void

Add element in statusbar

Parameters

Name Type Default value
child HTMLElement undefined
inTheRight boolean false

Returns

void

Defined in

src/modules/status-bar/status-bar.ts#84


destruct

destruct(): void

Returns

void

Inherited from

ViewComponent.destruct

Defined in

jodit/src/modules/status-bar/status-bar.ts:116