UIList

ui/group.UIList

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

Type parameters

Name Type
T extends IViewBased = IViewBased

Hierarchy

Implements

constructor

new UIList<T>(jodit): UIList<T>

Type parameters

Name Type
T extends IViewBased<IViewOptions> = IViewBased<IViewOptions>

Parameters

Name Type
jodit T

Returns

UIList<T>

Overrides

UIGroup.constructor

Defined in

src/core/ui/group/list.ts#54

STATUSES

Static STATUSES: Object = STATUSES

Type declaration

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

Inherited from

UIGroup.STATUSES

Defined in

src/core/component/component.ts#41


async

async: IAsync

Implementation of

IUIList.async

Inherited from

UIGroup.async

Defined in

src/core/component/component.ts#45


uid

Readonly uid: string

Implementation of

IUIList.uid

Inherited from

UIGroup.uid

Defined in

src/core/component/component.ts#60


ownerWindow

ownerWindow: Window = window

The window in which jodit was created

Implementation of

IUIList.ownerWindow

Inherited from

UIGroup.ownerWindow

Defined in

src/core/component/component.ts#110


container

container: HTMLElement

Implementation of

IUIList.container

Inherited from

UIGroup.container

Defined in

src/core/ui/element.ts#32


name

name: string = ''

Implementation of

IUIList.name

Inherited from

UIGroup.name

Defined in

src/core/ui/element.ts#33


mods

Readonly mods: IDictionary<null | string | boolean> = {}

Implementation of

IUIList.mods

Inherited from

UIGroup.mods

Defined in

src/core/ui/element.ts#119


syncMod

syncMod: boolean = false

Synchronize mods to all children

Inherited from

UIGroup.syncMod

Defined in

src/core/ui/group/group.ts#42


elements

elements: IUIElement[] = []

Implementation of

IUIList.elements

Inherited from

UIGroup.elements

Defined in

src/core/ui/group/group.ts#44


buttonSize

buttonSize: "small" | "tiny" | "xsmall" | "middle" | "large" = 'middle'

Implementation of

IUIList.buttonSize

Inherited from

UIGroup.buttonSize

Defined in

src/core/ui/group/group.ts#71


options

Optional Readonly options: IDictionary

Inherited from

UIGroup.options

Defined in

src/core/ui/group/group.ts#155


jodit

jodit: T

Parent View element

Implementation of

IUIList.jodit

Overrides

UIGroup.jodit

Defined in

src/core/ui/group/list.ts#44


mode

mode: "vertical" | "horizontal" = 'horizontal'

Implementation of

IUIList.mode

Defined in

src/core/ui/group/list.ts#46

componentName

get componentName(): string

Returns

string

Implementation of

IUIList.componentName

Inherited from

UIGroup.componentName

Defined in

src/core/component/component.ts#47


ownerDocument

get ownerDocument(): Document

The document in which jodit was created

Returns

Document

Implementation of

IUIList.ownerDocument

Inherited from

UIGroup.ownerDocument

Defined in

src/core/component/component.ts#96


od

get od(): Document

Shortcut for this.ownerDocument

Returns

Document

Implementation of

IUIList.od

Inherited from

UIGroup.od

Defined in

src/core/component/component.ts#103


ow

get ow(): Window

Returns

Window

Implementation of

IUIList.ow

Inherited from

UIGroup.ow

Defined in

src/core/component/component.ts#111


isReady

get isReady(): boolean

Component is ready for work

Returns

boolean

Implementation of

IUIList.isReady

Inherited from

UIGroup.isReady

Defined in

src/core/component/component.ts#146


isDestructed

get isDestructed(): boolean

Component was destructed

Returns

boolean

Implementation of

IUIList.isDestructed

Inherited from

UIGroup.isDestructed

Defined in

src/core/component/component.ts#153


isInDestruct

get isInDestruct(): boolean

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

Returns

boolean

Implementation of

IUIList.isInDestruct

Inherited from

UIGroup.isInDestruct

Defined in

src/core/component/component.ts#161


componentStatus

get componentStatus(): ComponentStatus

Current component status

Returns

ComponentStatus

Implementation of

IUIList.componentStatus

Inherited from

UIGroup.componentStatus

Defined in

src/core/component/component.ts#211

set componentStatus(componentStatus): void

Setter for current component status

Parameters

Name Type
componentStatus ComponentStatus

Returns

void

Implementation of

IUIList.componentStatus

Inherited from

UIGroup.componentStatus

Defined in

src/core/component/component.ts#218


j

get j(): T

Shortcut for this.jodit

Returns

T

Implementation of

IUIList.j

Inherited from

UIGroup.j

Defined in

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


defaultTimeout

get defaultTimeout(): number

Returns

number

Implementation of

IUIList.defaultTimeout

Inherited from

UIGroup.defaultTimeout

Defined in

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


parentElement

get parentElement(): Nullable<IUIElement>

Returns

Nullable<IUIElement>

Implementation of

IUIList.parentElement

Inherited from

UIGroup.parentElement

Defined in

src/core/ui/element.ts#37

set parentElement(parentElement): void

Parameters

Name Type
parentElement Nullable<IUIElement>

Returns

void

Implementation of

IUIList.parentElement

Inherited from

UIGroup.parentElement

Defined in

src/core/ui/element.ts#41


allChildren

get allChildren(): IUIElement[]

All group children

Returns

IUIElement[]

Implementation of

IUIList.allChildren

Inherited from

UIGroup.allChildren

Defined in

src/core/ui/group/group.ts#49


buttons

get buttons(): IUIButton[]

All buttons from list

Returns

IUIButton[]

Implementation of

IUIList.buttons

Defined in

src/core/ui/group/list.ts#68

getFullElName

getFullElName(elementName): string

Calc BEM element class name

Parameters

Name Type Description
elementName string element name in the bem classification

Returns

string

Implementation of

IUIList.getFullElName

Inherited from

UIGroup.getFullElName

Defined in

src/core/component/component.ts#66

getFullElName(elementName, mod): string

Parameters

Name Type
elementName string
mod string

Returns

string

Implementation of

IUIList.getFullElName

Inherited from

UIGroup.getFullElName

Defined in

src/core/component/component.ts#67

getFullElName(elementName, mod, modValue): string

Parameters

Name Type
elementName string
mod string
modValue string | boolean

Returns

string

Implementation of

IUIList.getFullElName

Inherited from

UIGroup.getFullElName

Defined in

src/core/component/component.ts#68


bindDestruct

bindDestruct(component): this

Bind destructor to some View

Parameters

Name Type
component IComponent<IViewBased<IViewOptions>>

Returns

this

Implementation of

IUIList.bindDestruct

Inherited from

UIGroup.bindDestruct

Defined in

src/core/component/component.ts#171


setStatus

setStatus(componentStatus): void

Set component status

Parameters

Name Type Description
componentStatus ComponentStatus component status

Returns

void

See

ComponentStatus

Implementation of

IUIList.setStatus

Inherited from

UIGroup.setStatus

Defined in

src/core/component/component.ts#227


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

Implementation of

IUIList.hookStatus

Inherited from

UIGroup.hookStatus

Defined in

src/core/component/component.ts#266


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

UIGroup.isInstanceOf

Defined in

src/core/component/component.ts#284


i18n

i18n(text, ...params): string

Parameters

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

Returns

string

Implementation of

IUIList.i18n

Inherited from

UIGroup.i18n

Defined in

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


setParentView

setParentView(jodit): this

Attach component to View

Parameters

Name Type
jodit T

Returns

this

Implementation of

IUIList.setParentView

Inherited from

UIGroup.setParentView

Defined in

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


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>

Implementation of

IUIList.getElm

Inherited from

UIGroup.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[]

Implementation of

IUIList.getElms

Inherited from

UIGroup.getElms

Defined in

src/core/traits/elms.ts#30


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

Implementation of

IUIList.setMod

Inherited from

UIGroup.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

Implementation of

IUIList.getMod

Inherited from

UIGroup.getMod

Defined in

src/core/traits/mods.ts#64


bubble

bubble(callback): this

Apply callback for all parents

Parameters

Name Type
callback (parent: IUIElement) => void

Returns

this

Implementation of

IUIList.bubble

Inherited from

UIGroup.bubble

Defined in

src/core/ui/element.ts#51


updateParentElement

updateParentElement(target): this

Parameters

Name Type
target IUIElement

Returns

this

Implementation of

IUIList.updateParentElement

Inherited from

UIGroup.updateParentElement

Defined in

src/core/ui/element.ts#62


get

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

Type parameters

Name
T

Parameters

Name Type
chain string
obj? IDictionary

Returns

Nullable<T>

Implementation of

IUIList.get

Inherited from

UIGroup.get

Defined in

src/core/ui/element.ts#68


closest

closest<T>(type): Nullable<T extends typeof UIElement ? InstanceType<T> : T>

Find match parent

Type parameters

Name Type
T extends typeof UIElement | UIElement<IViewBased<IViewOptions>>

Parameters

Name Type
type Function | UIElement<IViewBased<IViewOptions>>

Returns

Nullable<T extends typeof UIElement ? InstanceType<T> : T>

Implementation of

IUIList.closest

Inherited from

UIGroup.closest

Defined in

src/core/ui/element.ts#75


closestElement

closestElement(node, type): Nullable<IUIElement>

Find closest UIElement in DOM

Parameters

Name Type
node Node
type Function

Returns

Nullable<IUIElement>

Inherited from

UIGroup.closestElement

Defined in

src/core/ui/element.ts#106


appendTo

appendTo(element): this

Append container to element

Parameters

Name Type
element HTMLElement

Returns

this

Implementation of

IUIList.appendTo

Inherited from

UIGroup.appendTo

Defined in

src/core/ui/element.ts#131


update

update(): void

Update all children

Returns

void

Implementation of

IUIList.update

Inherited from

UIGroup.update

Defined in

src/core/ui/group/group.ts#77


append

append(elm, distElement?): this

Append new element into group

Parameters

Name Type
elm IUIElement | IUIElement[]
distElement? string

Returns

this

Implementation of

IUIList.append

Inherited from

UIGroup.append

Defined in

src/core/ui/group/group.ts#85


afterSetMod

afterSetMod(name, value): void

Parameters

Name Type
name string
value ModType

Returns

void

Implementation of

IUIList.afterSetMod

Inherited from

UIGroup.afterSetMod

Defined in

src/core/ui/group/group.ts#111


remove

remove(elm): this

Remove element from group

Parameters

Name Type
elm IUIElement

Returns

this

Implementation of

IUIList.remove

Inherited from

UIGroup.remove

Defined in

src/core/ui/group/group.ts#127


clear

clear(): this

Clear group

Returns

this

Implementation of

IUIList.clear

Inherited from

UIGroup.clear

Defined in

src/core/ui/group/group.ts#142


destruct

destruct(): any

Returns

any

Implementation of

IUIList.destruct

Inherited from

UIGroup.destruct

Defined in

src/core/ui/group/group.ts#166


className

className(): string

Returns

string

Implementation of

IUIList.className

Overrides

UIGroup.className

Defined in

src/core/ui/group/list.ts#40


getButtonsNames

getButtonsNames(): string[]

Helper for getting full plain button list

Returns

string[]

Implementation of

IUIList.getButtonsNames

Defined in

src/core/ui/group/list.ts#77


setRemoveButtons

setRemoveButtons(removeButtons?): this

Parameters

Name Type
removeButtons? string[]

Returns

this

Implementation of

IUIList.setRemoveButtons

Defined in

src/core/ui/group/list.ts#85


build

build(items, target?): IUIList

Parameters

Name Type Default value
items ButtonsOption undefined
target Nullable<HTMLElement> null

Returns

IUIList

Implementation of

IUIList.build

Defined in

jodit/src/core/ui/group/list.ts:90