UICheckbox

ui/form.UICheckbox

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

Hierarchy

Implements

constructor

new UICheckbox(jodit, options): UICheckbox

Parameters

Name Type
jodit IViewBased<IViewOptions>
options Partial<{ className: string ; autocomplete: boolean ; name: string ; value: string | number ; icon: string ; label: string ; ref: string ; type: "number" | "text" | "checkbox" | "url" | "file" | "hidden" ; placeholder: string ; required: boolean ; validators: string[] ; clearButton?: boolean ; onChange?: (value: string) => void } & { checked: boolean ; switch: boolean }>

Returns

UICheckbox

Overrides

UIInput.constructor

Defined in

src/core/ui/form/inputs/checkbox/checkbox.ts#43

STATUSES

Static STATUSES: Object = STATUSES

Type declaration

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

Inherited from

UIInput.STATUSES

Defined in

src/core/component/component.ts#40


async

async: IAsync

Implementation of

IUICheckBox.async

Inherited from

UIInput.async

Defined in

src/core/component/component.ts#44


uid

Readonly uid: string

Implementation of

IUICheckBox.uid

Inherited from

UIInput.uid

Defined in

src/core/component/component.ts#59


ownerWindow

ownerWindow: Window = window

The window in which jodit was created

Implementation of

IUICheckBox.ownerWindow

Inherited from

UIInput.ownerWindow

Defined in

src/core/component/component.ts#109


jodit

jodit: IViewBased<IViewOptions>

Parent View element

Implementation of

IUICheckBox.jodit

Inherited from

UIInput.jodit

Defined in

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


container

container: HTMLElement

Implementation of

IUICheckBox.container

Inherited from

UIInput.container

Defined in

src/core/ui/element.ts#32


name

name: string = ''

Implementation of

IUICheckBox.name

Inherited from

UIInput.name

Defined in

src/core/ui/element.ts#33


mods

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

Implementation of

IUICheckBox.mods

Inherited from

UIInput.mods

Defined in

src/core/ui/element.ts#119


defaultState

Static defaultState: { className: string ; autocomplete: boolean ; name: string ; value: string | number ; icon: string ; label: string ; ref: string ; type: "number" | "text" | "checkbox" | "url" | "file" | "hidden" ; placeholder: string ; required: boolean ; validators: string[] ; clearButton?: boolean ; onChange?: (value: string) => void } & { checked: boolean ; switch: boolean }

Overrides

UIInput.defaultState

Defined in

src/core/ui/form/inputs/checkbox/checkbox.ts#26


state

state: { className: string ; autocomplete: boolean ; name: string ; value: string | number ; icon: string ; label: string ; ref: string ; type: "number" | "text" | "checkbox" | "url" | "file" | "hidden" ; placeholder: string ; required: boolean ; validators: string[] ; clearButton?: boolean ; onChange?: (value: string) => void } & { checked: boolean ; switch: boolean }

Implementation of

IUICheckBox.state

Overrides

UIInput.state

Defined in

src/core/ui/form/inputs/checkbox/checkbox.ts#33


nativeInput

nativeInput: HTMLTextAreaElement | HTMLInputElement | HTMLSelectElement

Implementation of

IUICheckBox.nativeInput

Inherited from

UIInput.nativeInput

Defined in

src/core/ui/form/inputs/input/input.ts#34

componentName

get componentName(): string

Returns

string

Implementation of

IUICheckBox.componentName

Inherited from

UIInput.componentName

Defined in

src/core/component/component.ts#46


ownerDocument

get ownerDocument(): Document

The document in which jodit was created

Returns

Document

Implementation of

IUICheckBox.ownerDocument

Inherited from

UIInput.ownerDocument

Defined in

src/core/component/component.ts#95


od

get od(): Document

Shortcut for this.ownerDocument

Returns

Document

Implementation of

IUICheckBox.od

Inherited from

UIInput.od

Defined in

src/core/component/component.ts#102


ow

get ow(): Window

Returns

Window

Implementation of

IUICheckBox.ow

Inherited from

UIInput.ow

Defined in

src/core/component/component.ts#110


isReady

get isReady(): boolean

Component is ready for work

Returns

boolean

Implementation of

IUICheckBox.isReady

Inherited from

UIInput.isReady

Defined in

src/core/component/component.ts#145


isDestructed

get isDestructed(): boolean

Component was destructed

Returns

boolean

Implementation of

IUICheckBox.isDestructed

Inherited from

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

IUICheckBox.isInDestruct

Inherited from

UIInput.isInDestruct

Defined in

src/core/component/component.ts#160


componentStatus

get componentStatus(): ComponentStatus

Current component status

Returns

ComponentStatus

Implementation of

IUICheckBox.componentStatus

Inherited from

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

IUICheckBox.componentStatus

Inherited from

UIInput.componentStatus

Defined in

src/core/component/component.ts#217


j

get j(): T

Shortcut for this.jodit

Returns

T

Implementation of

IUICheckBox.j

Inherited from

UIInput.j

Defined in

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


defaultTimeout

get defaultTimeout(): number

Returns

number

Implementation of

IUICheckBox.defaultTimeout

Inherited from

UIInput.defaultTimeout

Defined in

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


parentElement

get parentElement(): Nullable<IUIElement>

Returns

Nullable<IUIElement>

Implementation of

IUICheckBox.parentElement

Inherited from

UIInput.parentElement

Defined in

src/core/ui/element.ts#37

set parentElement(parentElement): void

Parameters

Name Type
parentElement Nullable<IUIElement>

Returns

void

Implementation of

IUICheckBox.parentElement

Inherited from

UIInput.parentElement

Defined in

src/core/ui/element.ts#41


error

set error(value): void

Parameters

Name Type
value string

Returns

void

Implementation of

IUICheckBox.error

Inherited from

UIInput.error

Defined in

src/core/ui/form/inputs/input/input.ts#147


value

get value(): string

Returns

string

Implementation of

IUICheckBox.value

Inherited from

UIInput.value

Defined in

src/core/ui/form/inputs/input/input.ts#161

set value(value): void

Parameters

Name Type
value string

Returns

void

Implementation of

IUICheckBox.value

Inherited from

UIInput.value

Defined in

src/core/ui/form/inputs/input/input.ts#165


isFocused

get isFocused(): boolean

Returns

boolean

Implementation of

IUICheckBox.isFocused

Inherited from

UIInput.isFocused

Defined in

src/core/ui/form/inputs/input/input.ts#294

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

IUICheckBox.getFullElName

Inherited from

UIInput.getFullElName

Defined in

src/core/component/component.ts#65

getFullElName(elementName, mod): string

Parameters

Name Type
elementName string
mod string

Returns

string

Implementation of

IUICheckBox.getFullElName

Inherited from

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

Implementation of

IUICheckBox.getFullElName

Inherited from

UIInput.getFullElName

Defined in

src/core/component/component.ts#67


bindDestruct

bindDestruct(component): this

Bind destructor to some View

Parameters

Name Type
component IComponent<IViewBased<IViewOptions>>

Returns

this

Implementation of

IUICheckBox.bindDestruct

Inherited from

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

Implementation of

IUICheckBox.setStatus

Inherited from

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

Implementation of

IUICheckBox.hookStatus

Inherited from

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

UIInput.isInstanceOf

Defined in

src/core/component/component.ts#283


i18n

i18n(text, ...params): string

Parameters

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

Returns

string

Implementation of

IUICheckBox.i18n

Inherited from

UIInput.i18n

Defined in

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


setParentView

setParentView(jodit): this

Attach component to View

Parameters

Name Type
jodit IViewBased<IViewOptions>

Returns

this

Implementation of

IUICheckBox.setParentView

Inherited from

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

Implementation of

IUICheckBox.getElm

Inherited from

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

IUICheckBox.getElms

Inherited from

UIInput.getElms

Defined in

src/core/traits/elms.ts#30


afterSetMod

afterSetMod(name, value): void

Parameters

Name Type
name string
value ModType

Returns

void

Implementation of

IUICheckBox.afterSetMod

Inherited from

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

Implementation of

IUICheckBox.setMod

Inherited from

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

IUICheckBox.getMod

Inherited from

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

IUICheckBox.bubble

Inherited from

UIInput.bubble

Defined in

src/core/ui/element.ts#51


updateParentElement

updateParentElement(target): this

Parameters

Name Type
target IUIElement

Returns

this

Implementation of

IUICheckBox.updateParentElement

Inherited from

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

IUICheckBox.get

Inherited from

UIInput.get

Defined in

src/core/ui/element.ts#68


closest

closest<T>(type): Nullable<T extends typeof UIElement ? InstanceType<T<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>> : T>

Implementation of

IUICheckBox.closest

Inherited from

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

UIInput.closestElement

Defined in

src/core/ui/element.ts#106


update

update(): void

Update UI from state

Returns

void

Implementation of

IUICheckBox.update

Inherited from

UIInput.update

Defined in

src/core/ui/element.ts#124


appendTo

appendTo(element): this

Append container to element

Parameters

Name Type
element HTMLElement

Returns

this

Implementation of

IUICheckBox.appendTo

Inherited from

UIInput.appendTo

Defined in

src/core/ui/element.ts#131


destruct

destruct(): any

Returns

any

Implementation of

IUICheckBox.destruct

Inherited from

UIInput.destruct

Defined in

src/core/ui/element.ts#187


className

className(): string

Returns

string

Implementation of

IUICheckBox.className

Overrides

UIInput.className

Defined in

src/core/ui/form/inputs/checkbox/checkbox.ts#21


validate

validate(): boolean

Returns

boolean

Implementation of

IUICheckBox.validate

Inherited from

UIInput.validate

Defined in

src/core/ui/form/inputs/input/input.ts#200


focus

focus(): void

Returns

void

Implementation of

IUICheckBox.focus

Inherited from

UIInput.focus

Defined in

jodit/src/core/ui/form/inputs/input/input.ts:290