Skip to main content

JsInputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:190

Base class for JS value editors

Extends​

Extended by​

Type Parameters​

Type ParameterDefault type
Tany

Constructors​

Constructor​

new JsInputBase<T>(): JsInputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:212

Returns​

JsInputBase<T>

Overrides​

InputBase.constructor

Properties​

PropertyTypeInherited fromDefined in
dartanyInputBase.dartjs-api/src/widgets/inputs-base.ts:22

Accessors​

caption​

Get Signature​

get caption(): string

Defined in: js-api/src/widgets/inputs-base.ts:56

Returns​

string

Set Signature​

set caption(s): void

Defined in: js-api/src/widgets/inputs-base.ts:59

Parameters​
ParameterType
sstring
Returns​

void

Inherited from​

InputBase.caption


captionLabel​

Get Signature​

get captionLabel(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:69

Returns​

HTMLElement

Inherited from​

InputBase.captionLabel


classList​

Get Signature​

get classList(): DOMTokenList

Defined in: js-api/src/widgets/inputs-base.ts:177

Returns​

DOMTokenList

Inherited from​

InputBase.classList


dataType​

Get Signature​

get abstract dataType(): string

Defined in: js-api/src/widgets/inputs-base.ts:194

Data type this input can edit. See Type.

Returns​

string

Overrides​

InputBase.dataType


enabled​

Get Signature​

get enabled(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:95

Whether the input is enabled

Returns​

boolean

Set Signature​

set enabled(v): void

Defined in: js-api/src/widgets/inputs-base.ts:96

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.enabled


format​

Get Signature​

get format(): string

Defined in: js-api/src/widgets/inputs-base.ts:66

Value format.

Returns​

string

Set Signature​

set format(s): void

Defined in: js-api/src/widgets/inputs-base.ts:67

Parameters​
ParameterType
sstring
Returns​

void

Inherited from​

InputBase.format


input​

Get Signature​

get input(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:204

Returns the actual input

Returns​

HTMLElement

Overrides​

InputBase.input


inputType​

Get Signature​

get abstract inputType(): string

Defined in: js-api/src/widgets/inputs-base.ts:193

Input type identifier (such as "Slider" for the slider input). See InputType.

Returns​

string

Overrides​

InputBase.inputType


notify​

Get Signature​

get notify(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:79

Whether events are thrown on value set

Returns​

boolean

Set Signature​

set notify(v): void

Defined in: js-api/src/widgets/inputs-base.ts:80

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.notify


nullable​

Get Signature​

get nullable(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:75

Whether empty values are allowed

Returns​

boolean

Set Signature​

set nullable(v): void

Defined in: js-api/src/widgets/inputs-base.ts:76

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.nullable


onChanged​

Get Signature​

get onChanged(): Observable<T>

Defined in: js-api/src/widgets/inputs-base.ts:103

Occurs when [value] is changed, either by user or programmatically.

Returns​

Observable<T>

Inherited from​

InputBase.onChanged


onInput​

Get Signature​

get onInput(): Observable<Event>

Defined in: js-api/src/widgets/inputs-base.ts:106

Occurs when [value] is changed by user.

Returns​

Observable<Event>

Inherited from​

InputBase.onInput


onValidated​

Get Signature​

get onValidated(): Observable<string[]>

Defined in: js-api/src/widgets/inputs-base.ts:118

Occurs after each validation run, with the resulting messages.

Returns​

Observable<string[]>

Inherited from​

InputBase.onValidated


property​

Get Signature​

get property(): any

Defined in: js-api/src/widgets/inputs-base.ts:62

Property if associated with

Returns​

any

Set Signature​

set property(p): void

Defined in: js-api/src/widgets/inputs-base.ts:63

Parameters​
ParameterType
pProperty
Returns​

void

Inherited from​

InputBase.property


readOnly​

Get Signature​

get readOnly(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:91

Whether the input is readonly

Returns​

boolean

Set Signature​

set readOnly(v): void

Defined in: js-api/src/widgets/inputs-base.ts:92

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.readOnly


root​

Get Signature​

get root(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:54

Visual root (typically a div element that contains caption and input)

Returns​

HTMLElement

Inherited from​

InputBase.root


stringValue​

Get Signature​

get stringValue(): string

Defined in: js-api/src/widgets/inputs-base.ts:209

String representation of the value

Returns​

string

Set Signature​

set stringValue(value): void

Defined in: js-api/src/widgets/inputs-base.ts:210

String representation of the value

Parameters​
ParameterType
valuestring
Returns​

void

Overrides​

InputBase.stringValue


validationResults​

Get Signature​

get validationResults(): string[]

Defined in: js-api/src/widgets/inputs-base.ts:109

Messages of the current validation results (empty when the input is valid).

Returns​

string[]

Inherited from​

InputBase.validationResults


validity​

Get Signature​

get validity(): string | null

Defined in: js-api/src/widgets/inputs-base.ts:112

Current validation message(s), or null when the input is valid.

Returns​

string | null

Inherited from​

InputBase.validity


value​

Get Signature​

get value(): T

Defined in: js-api/src/widgets/inputs-base.ts:206

Input value

Returns​

T

Set Signature​

set value(value): void

Defined in: js-api/src/widgets/inputs-base.ts:207

Input value

Parameters​
ParameterType
valueT
Returns​

void

Overrides​

InputBase.value


visible​

Get Signature​

get visible(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:99

Whether the input is visible. When set, also updates the visibility of its category header.

Returns​

boolean

Set Signature​

set visible(v): void

Defined in: js-api/src/widgets/inputs-base.ts:100

Parameters​
ParameterType
vboolean
Returns​

void

Inherited from​

InputBase.visible

Methods​

addCaption()​

addCaption(caption): InputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:143

Adds the specified caption

Parameters​

ParameterType
captionstring

Returns​

InputBase<T>

Inherited from​

InputBase.addCaption


addOptions()​

addOptions(options): InputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:155

Adds the specified options

Parameters​

ParameterType
optionsHTMLElement

Returns​

InputBase<T>

Inherited from​

InputBase.addOptions


addPatternMenu()​

addPatternMenu(pattern): void

Defined in: js-api/src/widgets/inputs-base.ts:161

Adds a usage example to the input's hamburger menu

Parameters​

ParameterType
patternany

Returns​

void

Inherited from​

InputBase.addPatternMenu


addPostfix()​

addPostfix(postfix): InputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:149

Adds the specified postfix

Parameters​

ParameterType
postfixstring

Returns​

InputBase<T>

Inherited from​

InputBase.addPostfix


addValidator()​

addValidator(validator): void

Defined in: js-api/src/widgets/inputs-base.ts:167

Adds a validator that accepts a string representation of the edited value and returns null if valid, or error message if invalid

Parameters​

ParameterType
validator(value) => string | null

Returns​

void

Inherited from​

InputBase.addValidator


fireChanged()​

fireChanged(): any

Defined in: js-api/src/widgets/inputs-base.ts:133

Fires the 'changed' event (value has changed). See also fireInput

Returns​

any

Inherited from​

InputBase.fireChanged


fireInput()​

fireInput(): any

Defined in: js-api/src/widgets/inputs-base.ts:138

Fires the 'input' event (user input). See also fireChanged

Returns​

any

Inherited from​

InputBase.fireInput


getInput()​

abstract getInput(): HTMLElement

Defined in: js-api/src/widgets/inputs-base.ts:196

Returns​

HTMLElement


getStringValue()​

abstract getStringValue(): string

Defined in: js-api/src/widgets/inputs-base.ts:201

Returns​

string


getValue()​

abstract getValue(): T

Defined in: js-api/src/widgets/inputs-base.ts:198

Returns​

T


init()​

init(): any

Defined in: js-api/src/widgets/inputs-base.ts:128

Returns​

any

Inherited from​

InputBase.init


load()​

load(s): any

Defined in: js-api/src/widgets/inputs-base.ts:126

Loads the value. Used in dialog history. See also load

Parameters​

ParameterType
sany

Returns​

any

Inherited from​

InputBase.load


save()​

save(): any

Defined in: js-api/src/widgets/inputs-base.ts:121

Saves the value. Used in dialog history. See also load

Returns​

any

Inherited from​

InputBase.save


setStringValue()​

abstract setStringValue(value): void

Defined in: js-api/src/widgets/inputs-base.ts:202

Parameters​

ParameterType
valuestring

Returns​

void


setTooltip()​

setTooltip(msg, tooltipCheck?): InputBase<T>

Defined in: js-api/src/widgets/inputs-base.ts:172

Sets the tooltip

Parameters​

ParameterTypeDefault value
msgstringundefined
tooltipCheck(() => boolean) | nullnull

Returns​

InputBase<T>

Inherited from​

InputBase.setTooltip


setValue()​

abstract setValue(value): void

Defined in: js-api/src/widgets/inputs-base.ts:199

Parameters​

ParameterType
valueT

Returns​

void


validate()​

validate(): boolean

Defined in: js-api/src/widgets/inputs-base.ts:183

Performs immediate validation of the input and returns the result.

Returns​

boolean

True if the input is valid; otherwise, false.

Inherited from​

InputBase.validate


forColumn()​

static forColumn<T>(column): InputBase<T | null>

Defined in: js-api/src/widgets/inputs-base.ts:41

Creates input for the specified column

Type Parameters​

Type ParameterDefault type
Tany

Parameters​

ParameterType
columnColumn<T>

Returns​

InputBase<T | null>

Inherited from​

InputBase.forColumn


forInputType()​

static forInputType(inputType): InputBase

Defined in: js-api/src/widgets/inputs-base.ts:36

Creates input for the specified input type

Parameters​

ParameterType
inputTypestring | InputType

Returns​

InputBase

Inherited from​

InputBase.forInputType


forProperty()​

static forProperty(property, source?): InputBase

Defined in: js-api/src/widgets/inputs-base.ts:31

Creates input for the specified property, and optionally binds it to the specified object

Parameters​

ParameterTypeDefault value
propertyPropertyundefined
sourceanynull

Returns​

InputBase

Inherited from​

InputBase.forProperty