Skip to content

Latest commit

 

History

History
736 lines (377 loc) · 13.3 KB

EditorWidget.md

File metadata and controls

736 lines (377 loc) · 13.3 KB

@serenity-is/corelib / EditorWidget

Class: EditorWidget<P>

Extends

Extended by

Type Parameters

P

Constructors

new EditorWidget()

new EditorWidget<P>(props): EditorWidget<P>

Parameters

props

EditorProps<P>

Returns

EditorWidget<P>

Overrides

Widget.constructor

Defined in

src/ui/editors/editorwidget.ts:19

Properties

domNode

readonly domNode: HTMLElement

Inherited from

Widget.domNode

Defined in

src/ui/widgets/widget.ts:17


idPrefix

readonly idPrefix: string

Inherited from

Widget.idPrefix

Defined in

src/ui/widgets/widget.ts:16


options

protected readonly options: WidgetProps<EditorProps<P>>

Inherited from

Widget.options

Defined in

src/ui/widgets/widget.ts:14


uniqueName

readonly uniqueName: string

Inherited from

Widget.uniqueName

Defined in

src/ui/widgets/widget.ts:15


isComponent

readonly static isComponent: true = true

Inherited from

Widget.isComponent

Defined in

src/ui/widgets/widget.ts:223


typeInfo

static typeInfo: ClassTypeInfo<"Serenity.EditorWidget">

Overrides

Widget.typeInfo

Defined in

src/ui/editors/editorwidget.ts:17

Accessors

element

Get Signature

get element(): Fluent<HTMLElement>

Returns a Fluent(this.domNode) object

Returns

Fluent<HTMLElement>

Inherited from

Widget.element

Defined in

src/ui/widgets/widget.ts:63


props

Get Signature

get props(): WidgetProps<P>

Returns

WidgetProps<P>

Inherited from

Widget.props

Defined in

src/ui/widgets/widget.ts:207


readOnly

Get Signature

get readOnly(): boolean

Returns

boolean

Set Signature

set readOnly(value): void

Parameters
value

boolean

Returns

void

Defined in

src/ui/editors/editorwidget.ts:23

Methods

addCssClass()

protected addCssClass(): void

Returns

void

Inherited from

Widget.addCssClass

Defined in

src/ui/widgets/widget.ts:67


addValidationRule()

Call Signature

addValidationRule(rule, uniqueName?): void

Parameters
rule

(input) => string

uniqueName?

string

Returns

void

Inherited from

Widget.addValidationRule

Defined in

src/ui/widgets/widget.ts:99

Call Signature

addValidationRule(uniqueName, rule): void

Parameters
uniqueName

string

rule

(input) => string

Returns

void

Inherited from

Widget.addValidationRule

Defined in

src/ui/widgets/widget.ts:100


afterRender()

protected afterRender(callback): void

Parameters

callback

() => void

Returns

void

Inherited from

Widget.afterRender

Defined in

src/ui/widgets/widget.ts:146


byId()

protected byId<TElement>(id): Fluent<TElement>

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

Fluent<TElement>

Inherited from

Widget.byId

Defined in

src/ui/widgets/widget.ts:106


change()

change(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

Widget.change

Defined in

src/ui/widgets/widget.ts:118


changeSelect2()

changeSelect2(handler): void

Parameters

handler

(e) => void

Returns

void

Inherited from

Widget.changeSelect2

Defined in

src/ui/widgets/widget.ts:122


deferRender()

protected deferRender(): boolean

Returns

boolean

Inherited from

Widget.deferRender

Defined in

src/ui/widgets/widget.ts:71


destroy()

destroy(): void

Returns

void

Inherited from

Widget.destroy

Defined in

src/ui/widgets/widget.ts:47


findById()

protected findById<TElement>(id): TElement

Type Parameters

TElement extends HTMLElement = HTMLElement

Parameters

id

string

Returns

TElement

Inherited from

Widget.findById

Defined in

src/ui/widgets/widget.ts:110


getCssClass()

protected getCssClass(): string

Returns

string

Inherited from

Widget.getCssClass

Defined in

src/ui/widgets/widget.ts:75


getCustomAttribute()

protected getCustomAttribute<TAttr>(attrType, inherit): TAttr

Type Parameters

TAttr

Parameters

attrType

(...args) => TAttr

inherit

boolean = true

Returns

TAttr

Inherited from

Widget.getCustomAttribute

Defined in

src/ui/widgets/widget.ts:142


getGridField()

getGridField(): Fluent<HTMLElement>

Returns

Fluent<HTMLElement>

Inherited from

Widget.getGridField

Defined in

src/ui/widgets/widget.ts:114


init()

init(): this

Returns

this

Inherited from

Widget.init

Defined in

src/ui/widgets/widget.ts:157


internalRenderContents()

internalRenderContents(): void

Returns

void

Inherited from

Widget.internalRenderContents

Defined in

src/ui/widgets/widget.ts:177


legacyTemplateRender()

protected legacyTemplateRender(): boolean

Returns

boolean

Inherited from

Widget.legacyTemplateRender

Defined in

src/ui/widgets/widget.ts:194


render()

render(): any

Returns the main element for this widget or the document fragment. As widgets may get their elements from props unlike regular JSX widgets, this method should not be overridden. Override renderContents() instead.

Returns

any

Inherited from

Widget.render

Defined in

src/ui/widgets/widget.ts:167


renderContents()

protected renderContents(): any

Returns

any

Inherited from

Widget.renderContents

Defined in

src/ui/widgets/widget.ts:188


syncOrAsyncThen()

protected syncOrAsyncThen<T>(syncMethod, asyncMethod, then): void

Type Parameters

T

Parameters

syncMethod

() => T

asyncMethod

() => PromiseLike<T>

then

(v) => void

Returns

void

Inherited from

Widget.syncOrAsyncThen

Defined in

src/ui/widgets/widget.ts:211


useIdPrefix()

protected useIdPrefix(): IdPrefixType

Returns

IdPrefixType

Inherited from

Widget.useIdPrefix

Defined in

src/ui/widgets/widget.ts:218


create()

static create<TWidget, P>(params): TWidget

Type Parameters

TWidget extends Widget<P>

P

Parameters

params

CreateWidgetParams<TWidget, P>

Returns

TWidget

Inherited from

Widget.create

Defined in

src/ui/widgets/widget.ts:130


createDefaultElement()

static createDefaultElement(): HTMLElement

Returns

HTMLElement

Inherited from

Widget.createDefaultElement

Defined in

src/ui/widgets/widget.ts:56


getWidgetName()

static getWidgetName(type): string

Parameters

type

Function

Returns

string

Inherited from

Widget.getWidgetName

Defined in

src/ui/widgets/widget.ts:95