Skip to main content

Property

Defined in: js-api/src/entities/property.ts:122

Strongly-typed property associated with an object. Used for reflection, serialization, UI generation, and other introspection-dependent tasks.

Samples:

Extended by

Implements

Constructors

Constructor

new Property(dart): Property

Defined in: js-api/src/entities/property.ts:126

Parameters

ParameterType
dartany

Returns

Property

Properties

PropertyModifierTypeDescriptionDefined in
dartreadonlyany-js-api/src/entities/property.ts:123
optionspublicanyAdditional options.js-api/src/entities/property.ts:124
propertyOptionsstaticobject-js-api/src/entities/property.ts:322
propertyOptions.caption?publicIProperty & IPropertyMetaCustom field caption shown in [PropertyGrid] Deprecated The property will be removed soon. Use friendlyName insteadjs-api/src/entities/property.ts:87
propertyOptions.category?publicIProperty & IPropertyMetaCorresponding category on the context paneljs-api/src/entities/property.ts:69
propertyOptions.choices?publicIProperty & IPropertyMetaList of choices. Applicable to string properties onlyjs-api/src/entities/property.ts:57
propertyOptions.columnTypeFilter?publicIProperty & IPropertyMetaFilter for columns, can be numerical, numerical_no_datetime, categorical, datetime, categorical_or_datetime, or directly a column type (string, int...) Applicable when type = Columnjs-api/src/entities/property.ts:103
propertyOptions.defaultValue?publicIProperty & IPropertyMetaDefault value used for deserialization and cloning. See also initialValue.js-api/src/entities/property.ts:63
propertyOptions.description?publicIProperty & IPropertyMetaProperty descriptionjs-api/src/entities/property.ts:33
propertyOptions.editor?publicIProperty & IPropertyMetaCustom editor (such as slider or text area)js-api/src/entities/property.ts:66
propertyOptions.fieldName?publicIProperty & IPropertyMetaName of the corresponding JavaScript field. No need to specify it if it is the same as name.js-api/src/entities/property.ts:93
propertyOptions.format?publicIProperty & IPropertyMetaValue format, such as '0.000'js-api/src/entities/property.ts:72
propertyOptions.friendlyName?publicIProperty & IPropertyMetaCustom field friendly name shown in [PropertyGrid]js-api/src/entities/property.ts:90
propertyOptions.initialValue?publicIProperty & IPropertyMetaInitial value used when initializing UI. See also defaultValuejs-api/src/entities/property.ts:60
propertyOptions.inputType?publicIProperty & IPropertyMetaProperty input typejs-api/src/entities/property.ts:27
propertyOptions.max?publicIProperty & IPropertyMetaMaximum value. Applicable to numerical properties onlyjs-api/src/entities/property.ts:45
propertyOptions.min?publicIProperty & IPropertyMetaMinimum value. Applicable to numerical properties onlyjs-api/src/entities/property.ts:42
propertyOptions.name?publicIProperty & IPropertyMetaProperty namejs-api/src/entities/property.ts:21
propertyOptions.nullable?publicIProperty & IPropertyMetaWhether an empty value is allowed. This is used by validators.js-api/src/entities/property.ts:30
propertyOptions.options?publicIProperty & IPropertyMetaAdditional options.js-api/src/entities/property.ts:98
propertyOptions.semType?publicIProperty & IPropertyMetaSemantic typejs-api/src/entities/property.ts:36
propertyOptions.showPlusMinus?publicIProperty & IPropertyMetaWhether a plus/minus clicker appears next to the number input. Applies to numerical columns only.js-api/src/entities/property.ts:54
propertyOptions.showSlider?publicIProperty & IPropertyMetaWhether a slider appears next to the number input. Applies to numerical columns only.js-api/src/entities/property.ts:51
propertyOptions.step?publicIProperty & IPropertyMetaStep to be used in a slider. Only applies to numerical properties.js-api/src/entities/property.ts:48
propertyOptions.tags?publicIProperty & IPropertyMeta-js-api/src/entities/property.ts:95
propertyOptions.type?publicIProperty & IPropertyMetaProperty data type. See TYPE.js-api/src/entities/property.ts:24
propertyOptions.units?publicIProperty & IPropertyMetaUnits of measurement. See also: [postfix]js-api/src/entities/property.ts:39
propertyOptions.userEditable?publicIProperty & IPropertyMetaWhether the property should be editable via the UIjs-api/src/entities/property.ts:75
propertyOptions.validators?publicIProperty & IPropertyMetaList of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): stringnull. [null] indicates that the value is valid, [string] describes a validation error.
propertyOptions.valueValidators?publicIProperty & IPropertyMetaList of value validators (functions that take a value and return error message or null)js-api/src/entities/property.ts:83
propertyOptions.viewer?publicIProperty & IPropertyMeta-js-api/src/entities/property.ts:106

Accessors

caption

Get Signature

get caption(): string

Defined in: js-api/src/entities/property.ts:148

Custom field caption shown in the UI

Deprecated

The property will be removed soon. Use friendlyName instead

Returns

string

Set Signature

set caption(s): void

Defined in: js-api/src/entities/property.ts:149

Custom field caption shown in [PropertyGrid]

Deprecated

The property will be removed soon. Use friendlyName instead

Parameters
ParameterType
sstring
Returns

void

Custom field caption shown in [PropertyGrid]

Deprecated

The property will be removed soon. Use friendlyName instead

Implementation of

IProperty.caption


category

Get Signature

get category(): string

Defined in: js-api/src/entities/property.ts:156

Property category

Returns

string

Set Signature

set category(s): void

Defined in: js-api/src/entities/property.ts:157

Corresponding category on the context panel

Parameters
ParameterType
sstring
Returns

void

Corresponding category on the context panel

Implementation of

IProperty.category


choices

Get Signature

get choices(): string[]

Defined in: js-api/src/entities/property.ts:242

List of possible values of that property. PropertyGrid will use it to populate combo boxes.

Returns

string[]

Set Signature

set choices(x): void

Defined in: js-api/src/entities/property.ts:243

List of choices. Applicable to string properties only

Parameters
ParameterType
xstring[]
Returns

void

List of choices. Applicable to string properties only

Implementation of

IProperty.choices


columnTypeFilter

Get Signature

get columnTypeFilter(): ColumnTypeFilter | null

Defined in: js-api/src/entities/property.ts:255

Column type filter (previously "columnFilter")

Returns

ColumnTypeFilter | null

Filter for columns, can be numerical, numerical_no_datetime, categorical, datetime, categorical_or_datetime, or directly a column type (string, int...) Applicable when type = Column

Implementation of

IProperty.columnTypeFilter


defaultValue

Get Signature

get defaultValue(): any

Defined in: js-api/src/entities/property.ts:200

Default value

Returns

any

Set Signature

set defaultValue(s): void

Defined in: js-api/src/entities/property.ts:201

Default value used for deserialization and cloning. See also initialValue.

Parameters
ParameterType
sany
Returns

void

Default value used for deserialization and cloning. See also initialValue.

Implementation of

IProperty.defaultValue


description

Get Signature

get description(): string

Defined in: js-api/src/entities/property.ts:183

Description

Returns

string

Set Signature

set description(s): void

Defined in: js-api/src/entities/property.ts:184

Property description

Parameters
ParameterType
sstring
Returns

void

Property description

Implementation of

IProperty.description


editor

Get Signature

get editor(): string

Defined in: js-api/src/entities/property.ts:204

Property editor

Returns

string

Set Signature

set editor(s): void

Defined in: js-api/src/entities/property.ts:205

Custom editor (such as slider or text area)

Parameters
ParameterType
sstring
Returns

void

Custom editor (such as slider or text area)

Implementation of

IProperty.editor


format

Get Signature

get format(): string

Defined in: js-api/src/entities/property.ts:212

Format to be used for displaying the value.

Returns

string

Set Signature

set format(s): void

Defined in: js-api/src/entities/property.ts:213

Value format, such as '0.000'

Parameters
ParameterType
sstring
Returns

void

Value format, such as '0.000'

Implementation of

IProperty.format


friendlyName

Get Signature

get friendlyName(): string

Defined in: js-api/src/entities/property.ts:152

Custom field caption shown in the UI

Returns

string

Set Signature

set friendlyName(s): void

Defined in: js-api/src/entities/property.ts:153

Custom field friendly name shown in [PropertyGrid]

Parameters
ParameterType
sstring
Returns

void

Custom field friendly name shown in [PropertyGrid]

Implementation of

IProperty.friendlyName


get

Get Signature

get get(): PropertyGetter

Defined in: js-api/src/entities/property.ts:135

Property getter is a function that accepts one parameter (item) and returns the property value.

Returns

PropertyGetter

Set Signature

set get(x): void

Defined in: js-api/src/entities/property.ts:136

Parameters
ParameterType
xPropertyGetter
Returns

void


includeInLayout

Get Signature

get includeInLayout(): boolean

Defined in: js-api/src/entities/property.ts:171

Applies to viewers properties whether to include the property in the layout or not.

Returns

boolean

Set Signature

set includeInLayout(s): void

Defined in: js-api/src/entities/property.ts:172

Parameters
ParameterType
sboolean
Returns

void


initialValue

Get Signature

get initialValue(): string

Defined in: js-api/src/entities/property.ts:196

Initial value used when initializing UI

Returns

string

Set Signature

set initialValue(s): void

Defined in: js-api/src/entities/property.ts:197

Initial value used when initializing UI. See also defaultValue

Parameters
ParameterType
sstring
Returns

void

Initial value used when initializing UI. See also defaultValue

Implementation of

IProperty.initialValue


inputType

Get Signature

get inputType(): string

Defined in: js-api/src/entities/property.ts:179

Input type. See also InputType

Returns

string

Set Signature

set inputType(s): void

Defined in: js-api/src/entities/property.ts:180

Property input type

Parameters
ParameterType
sstring
Returns

void

Property input type

Implementation of

IProperty.inputType


isOptional

Get Signature

get isOptional(): boolean

Defined in: js-api/src/entities/property.ts:192

Whether this function parameter is optional (declared with a default value). What the platform's own call machinery consults; false for non-parameter properties.

Returns

boolean

Set Signature

set isOptional(x): void

Defined in: js-api/src/entities/property.ts:193

Parameters
ParameterType
xboolean
Returns

void


isVectorizable

Get Signature

get isVectorizable(): boolean

Defined in: js-api/src/entities/property.ts:250

Returns

boolean


max

Get Signature

get max(): number

Defined in: js-api/src/entities/property.ts:224

Maximum value. Used when constructing UI (sliders), validating, etc.

Returns

number

Set Signature

set max(s): void

Defined in: js-api/src/entities/property.ts:225

Maximum value. Applicable to numerical properties only

Parameters
ParameterType
snumber
Returns

void

Maximum value. Applicable to numerical properties only

Implementation of

IProperty.max


min

Get Signature

get min(): number

Defined in: js-api/src/entities/property.ts:220

Minimum value. Used when constructing UI (sliders), validating, etc.

Returns

number

Set Signature

set min(s): void

Defined in: js-api/src/entities/property.ts:221

Minimum value. Applicable to numerical properties only

Parameters
ParameterType
snumber
Returns

void

Minimum value. Applicable to numerical properties only

Implementation of

IProperty.min


name

Get Signature

get name(): string

Defined in: js-api/src/entities/property.ts:143

Property name

Returns

string

Set Signature

set name(s): void

Defined in: js-api/src/entities/property.ts:144

Property name

Parameters
ParameterType
sstring
Returns

void

Property name

Implementation of

IProperty.name


nullable

Get Signature

get nullable(): boolean

Defined in: js-api/src/entities/property.ts:187

Nullable

Returns

boolean

Set Signature

set nullable(s): void

Defined in: js-api/src/entities/property.ts:188

Whether an empty value is allowed. This is used by validators.

Parameters
ParameterType
sboolean
Returns

void

Whether an empty value is allowed. This is used by validators.

Implementation of

IProperty.nullable


propertySubType

Get Signature

get propertySubType(): TYPE

Defined in: js-api/src/entities/property.ts:168

Property subtype

Returns

TYPE


propertyType

Get Signature

get propertyType(): TYPE

Defined in: js-api/src/entities/property.ts:164

Property type. Same as type

Returns

TYPE

Set Signature

set propertyType(s): void

Defined in: js-api/src/entities/property.ts:165

Parameters
ParameterType
sTYPE
Returns

void


semType

Get Signature

get semType(): string

Defined in: js-api/src/entities/property.ts:175

Semantic type

Returns

string

Set Signature

set semType(s): void

Defined in: js-api/src/entities/property.ts:176

Semantic type

Parameters
ParameterType
sstring
Returns

void

Semantic type

Implementation of

IProperty.semType


set

Get Signature

get set(): PropertySetter

Defined in: js-api/src/entities/property.ts:139

Property setter

Returns

PropertySetter

Set Signature

set set(x): void

Defined in: js-api/src/entities/property.ts:140

Parameters
ParameterType
xPropertySetter
Returns

void


showPlusMinus

Get Signature

get showPlusMinus(): boolean

Defined in: js-api/src/entities/property.ts:236

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Returns

boolean

Set Signature

set showPlusMinus(s): void

Defined in: js-api/src/entities/property.ts:237

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Parameters
ParameterType
sboolean
Returns

void

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Implementation of

IProperty.showPlusMinus


showSlider

Get Signature

get showSlider(): boolean

Defined in: js-api/src/entities/property.ts:232

Whether a slider appears next to the number input. Applies to numerical columns only.

Returns

boolean

Set Signature

set showSlider(s): void

Defined in: js-api/src/entities/property.ts:233

Whether a slider appears next to the number input. Applies to numerical columns only.

Parameters
ParameterType
sboolean
Returns

void

Whether a slider appears next to the number input. Applies to numerical columns only.

Implementation of

IProperty.showSlider


step

Get Signature

get step(): number

Defined in: js-api/src/entities/property.ts:228

Step to be used in a slider. Only applies to numerical properties.

Returns

number

Set Signature

set step(s): void

Defined in: js-api/src/entities/property.ts:229

Step to be used in a slider. Only applies to numerical properties.

Parameters
ParameterType
snumber
Returns

void

Step to be used in a slider. Only applies to numerical properties.

Implementation of

IProperty.step


type

Get Signature

get type(): TYPE

Defined in: js-api/src/entities/property.ts:160

Property type. Same as propertyType

Returns

TYPE

Set Signature

set type(s): void

Defined in: js-api/src/entities/property.ts:161

Property data type. See TYPE.

Parameters
ParameterType
sTYPE
Returns

void

Property data type. See TYPE.

Implementation of

IProperty.type


units

Get Signature

get units(): string

Defined in: js-api/src/entities/property.ts:208

Units of measurement.

Returns

string

Set Signature

set units(s): void

Defined in: js-api/src/entities/property.ts:209

Units of measurement. See also: [postfix]

Parameters
ParameterType
sstring
Returns

void

Units of measurement. See also: [postfix]

Implementation of

IProperty.units


userEditable

Get Signature

get userEditable(): boolean

Defined in: js-api/src/entities/property.ts:216

Whether a user can edit this property from the UI.

Returns

boolean

Set Signature

set userEditable(s): void

Defined in: js-api/src/entities/property.ts:217

Whether the property should be editable via the UI

Parameters
ParameterType
sboolean
Returns

void

Whether the property should be editable via the UI

Implementation of

IProperty.userEditable


validators

Get Signature

get validators(): string[]

Defined in: js-api/src/entities/property.ts:247

Validation conditions to be checked when editing the property. See also PropertyValidator.

Returns

string[]

Set Signature

set validators(x): void

Defined in: js-api/src/entities/property.ts:248

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.

Parameters
ParameterType
xstring[]
Returns

void

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.

Implementation of

IProperty.validators


vectorName

Get Signature

get vectorName(): string

Defined in: js-api/src/entities/property.ts:252

Returns

string

Methods

fromOptions()

fromOptions(opt?): Property

Defined in: js-api/src/entities/property.ts:260

Applies the specified options

Parameters

ParameterType
opt?IProperty

Returns

Property


bool()

static bool(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:290

Creates a bool property

Parameters

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns

Property


create()

static create(name, type, getter, setter, defaultValue?): Property

Defined in: js-api/src/entities/property.ts:267

Creates a property

Parameters

ParameterTypeDefault value
namestringundefined
type"string" | "bigint" | "object" | "map" | "file" | "view" | "blob" | "bool" | "int" | "double" | "byte_array" | "datetime" | "qnum" | "dataframe" | "numerical" | "categorical" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "GridCellRenderArgs" | "element" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
getterPropertyGetterundefined
setterPropertySetterundefined
defaultValueanynull

Returns

Property


dateTime()

static dateTime(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:295

Creates a datetime property

Parameters

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns

Property


float()

static float(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:280

Creates a float property

Parameters

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns

Property


fromOptions()

static fromOptions(options): Property

Defined in: js-api/src/entities/property.ts:313

Parameters

ParameterType
optionsIProperty

Returns

Property


int()

static int(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:275

Creates an integer property

Parameters

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns

Property


js()

static js(name, type, options?): Property

Defined in: js-api/src/entities/property.ts:300

Creates property for the JavaScript objects with the corresponding property name

Parameters

ParameterType
namestring
typeTYPE
options?IProperty

Returns

Property


jsBool()

static jsBool(name, options?): Property

Defined in: js-api/src/entities/property.ts:308

Parameters

ParameterType
namestring
options?IProperty

Returns

Property


jsDateTime()

static jsDateTime(name, options?): Property

Defined in: js-api/src/entities/property.ts:311

Parameters

ParameterType
namestring
options?IProperty

Returns

Property


jsFloat()

static jsFloat(name, options?): Property

Defined in: js-api/src/entities/property.ts:309

Parameters

ParameterType
namestring
options?IProperty

Returns

Property


jsInt()

static jsInt(name, options?): Property

Defined in: js-api/src/entities/property.ts:307

Parameters

ParameterType
namestring
options?IProperty

Returns

Property


jsString()

static jsString(name, options?): Property

Defined in: js-api/src/entities/property.ts:310

Parameters

ParameterType
namestring
options?IProperty

Returns

Property


registerAttachedProperty()

static registerAttachedProperty(typeName, property): void

Defined in: js-api/src/entities/property.ts:318

Registers the attached (dynamic) property for the specified type. It is editable via the context panel, and gets saved into the view layout as well. Property getter/setter typically uses Widget's "temp" property for storing the value.

Parameters

ParameterType
typeNamestring
propertyProperty

Returns

void


string()

static string(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:285

Creates a string property

Parameters

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns

Property