EntityProperty
Defined in: js-api/src/entities/property.ts:264
A dynamic property associated with the entity.
Extends
Constructors
Constructor
new EntityProperty(
dart):EntityProperty
Defined in: js-api/src/entities/property.ts:265
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
EntityProperty
Overrides
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
dart | readonly | any | - | Property.dart | js-api/src/entities/property.ts:33 |
options | public | any | Additional options. | Property.options | js-api/src/entities/property.ts:34 |
propertyOptions | static | object | - | Property.propertyOptions | js-api/src/entities/property.ts:233 |
propertyOptions.caption? | public | IProperty & IPropertyAnnotation | Custom field caption shown in [PropertyGrid] Deprecated The property will be removed soon. Use friendlyName instead | - | js-api/src/entities/property-meta.ts:73 |
propertyOptions.category? | public | IProperty & IPropertyAnnotation | Corresponding category on the context panel; groups the property in a property panel. | - | js-api/src/entities/property-meta.ts:63 |
propertyOptions.choices? | public | IProperty & IPropertyAnnotation | List of choices. Applicable to string properties only | - | js-api/src/entities/property-meta.ts:56 |
propertyOptions.columnTypeFilter? | public | IProperty & IPropertyAnnotation | 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 | - | js-api/src/entities/property-meta.ts:111 |
propertyOptions.defaultValue? | public | IProperty & IPropertyAnnotation | Default value used for deserialization and cloning. See also initialValue. | - | js-api/src/entities/property-meta.ts:90 |
propertyOptions.description? | public | IProperty & IPropertyAnnotation | Property description | - | js-api/src/entities/property-meta.ts:32 |
propertyOptions.editor? | public | IProperty & IPropertyAnnotation | Platform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only for the types Dart honors it for (input_base.dart:702-728). | - | js-api/src/entities/property-meta.ts:60 |
propertyOptions.fieldName? | public | IProperty & IPropertyAnnotation | Name of the corresponding JavaScript field. No need to specify it if it is the same as name. | - | js-api/src/entities/property-meta.ts:101 |
propertyOptions.format? | public | IProperty & IPropertyAnnotation | Value format, such as '0.000', applied through DG.format where the platform is loaded. | - | js-api/src/entities/property-meta.ts:66 |
propertyOptions.friendlyName? | public | IProperty & IPropertyAnnotation | Custom field friendly name shown in [PropertyGrid] | - | js-api/src/entities/property-meta.ts:69 |
propertyOptions.get? | public | IProperty & IPropertyAnnotation | Reads the property value off an object. A property with no set renders read-only. | - | js-api/src/entities/property-meta.ts:81 |
propertyOptions.initialValue? | public | IProperty & IPropertyAnnotation | Initial value used when initializing UI. See also defaultValue | - | js-api/src/entities/property-meta.ts:87 |
propertyOptions.inputType? | public | IProperty & IPropertyAnnotation | Platform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every other hint, as it does in input_base.dart:668. | - | js-api/src/entities/property-meta.ts:26 |
propertyOptions.max? | public | IProperty & IPropertyAnnotation | Maximum value. Applicable to numerical properties only | - | js-api/src/entities/property-meta.ts:44 |
propertyOptions.min? | public | IProperty & IPropertyAnnotation | Minimum value. Applicable to numerical properties only | - | js-api/src/entities/property-meta.ts:41 |
propertyOptions.name? | public | IProperty & IPropertyAnnotation | Property name | - | js-api/src/entities/property-meta.ts:16 |
propertyOptions.nullable? | public | IProperty & IPropertyAnnotation | Whether an empty value is allowed. This is used by validators. | - | js-api/src/entities/property-meta.ts:29 |
propertyOptions.options? | public | IProperty & IPropertyAnnotation | Additional options. | - | js-api/src/entities/property-meta.ts:106 |
propertyOptions.propertyType? | public | IProperty & IPropertyAnnotation | Property data type; same as type, and read first where both appear (as on a DG.Property). | - | js-api/src/entities/property-meta.ts:22 |
propertyOptions.semType? | public | IProperty & IPropertyAnnotation | Semantic type | - | js-api/src/entities/property-meta.ts:35 |
propertyOptions.set? | public | IProperty & IPropertyAnnotation | Writes the property value to an object. | - | js-api/src/entities/property-meta.ts:84 |
propertyOptions.showPlusMinus? | public | IProperty & IPropertyAnnotation | Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only. | - | js-api/src/entities/property-meta.ts:53 |
propertyOptions.showSlider? | public | IProperty & IPropertyAnnotation | Whether a slider appears next to the number input. Applies to numerical columns only. | - | js-api/src/entities/property-meta.ts:50 |
propertyOptions.step? | public | IProperty & IPropertyAnnotation | Step to be used in a slider. Only applies to numerical properties. | - | js-api/src/entities/property-meta.ts:47 |
propertyOptions.tags? | public | IProperty & IPropertyAnnotation | - | - | js-api/src/entities/property-meta.ts:103 |
propertyOptions.type? | public | IProperty & IPropertyAnnotation | Property data type. See TYPE. | - | js-api/src/entities/property-meta.ts:19 |
propertyOptions.units? | public | IProperty & IPropertyAnnotation | Units of measurement. See also: [postfix] | - | js-api/src/entities/property-meta.ts:38 |
propertyOptions.userEditable? | public | IProperty & IPropertyAnnotation | Whether the property should be editable via the UI | - | js-api/src/entities/property-meta.ts:116 |
propertyOptions.validators? | public | IProperty & IPropertyAnnotation | 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. | - |
propertyOptions.valueValidators? | public | IProperty & IPropertyAnnotation | List of value validators (functions that take a value and return error message or null) | - | js-api/src/entities/property-meta.ts:98 |
propertyOptions.viewer? | public | IProperty & IPropertyAnnotation | - | - | js-api/src/entities/property-meta.ts:113 |
Accessors
caption
Get Signature
get caption():
string
Defined in: js-api/src/entities/property.ts:58
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:59
Custom field caption shown in [PropertyGrid]
Deprecated
The property will be removed soon. Use friendlyName instead
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Custom field caption shown in [PropertyGrid]
Deprecated
The property will be removed soon. Use friendlyName instead
Inherited from
category
Get Signature
get category():
string
Defined in: js-api/src/entities/property.ts:66
Property category
Returns
string
Set Signature
set category(
s):void
Defined in: js-api/src/entities/property.ts:67
Corresponding category on the context panel; groups the property in a property panel.
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Corresponding category on the context panel; groups the property in a property panel.
Inherited from
choices
Get Signature
get choices():
string[]
Defined in: js-api/src/entities/property.ts:152
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:153
List of choices. Applicable to string properties only
Parameters
| Parameter | Type |
|---|---|
x | string[] |
Returns
void
List of choices. Applicable to string properties only
Inherited from
columnTypeFilter
Get Signature
get columnTypeFilter():
ColumnTypeFilter|null
Defined in: js-api/src/entities/property.ts:165
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
Inherited from
defaultValue
Get Signature
get defaultValue():
any
Defined in: js-api/src/entities/property.ts:110
Default value
Returns
any
Set Signature
set defaultValue(
s):void
Defined in: js-api/src/entities/property.ts:111
Default value used for deserialization and cloning. See also initialValue.
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
void
Default value used for deserialization and cloning. See also initialValue.
Inherited from
description
Get Signature
get description():
string
Defined in: js-api/src/entities/property.ts:93
Description
Returns
string
Set Signature
set description(
s):void
Defined in: js-api/src/entities/property.ts:94
Property description
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Property description
Inherited from
editor
Get Signature
get editor():
string
Defined in: js-api/src/entities/property.ts:114
Property editor
Returns
string
Set Signature
set editor(
s):void
Defined in: js-api/src/entities/property.ts:115
Platform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only
for the types Dart honors it for (input_base.dart:702-728).
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Platform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only
for the types Dart honors it for (input_base.dart:702-728).
Inherited from
format
Get Signature
get format():
string
Defined in: js-api/src/entities/property.ts:122
Format to be used for displaying the value.
Returns
string
Set Signature
set format(
s):void
Defined in: js-api/src/entities/property.ts:123
Value format, such as '0.000', applied through DG.format where the platform is loaded.
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Value format, such as '0.000', applied through DG.format where the platform is loaded.
Inherited from
friendlyName
Get Signature
get friendlyName():
string
Defined in: js-api/src/entities/property.ts:62
Custom field caption shown in the UI
Returns
string
Set Signature
set friendlyName(
s):void
Defined in: js-api/src/entities/property.ts:63
Custom field friendly name shown in [PropertyGrid]
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Custom field friendly name shown in [PropertyGrid]
Inherited from
get
Get Signature
get get():
PropertyGetter
Defined in: js-api/src/entities/property.ts:45
Property getter is a function that accepts one parameter (item) and returns the property value.
Returns
Set Signature
set get(
x):void
Defined in: js-api/src/entities/property.ts:46
Reads the property value off an object. A property with no set renders read-only.
Parameters
| Parameter | Type |
|---|---|
x | PropertyGetter |
Returns
void
Reads the property value off an object. A property with no set renders read-only.
Inherited from
includeInLayout
Get Signature
get includeInLayout():
boolean
Defined in: js-api/src/entities/property.ts:81
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:82
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
void
Inherited from
initialValue
Get Signature
get initialValue():
string
Defined in: js-api/src/entities/property.ts:106
Initial value used when initializing UI
Returns
string
Set Signature
set initialValue(
s):void
Defined in: js-api/src/entities/property.ts:107
Initial value used when initializing UI. See also defaultValue
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Initial value used when initializing UI. See also defaultValue
Inherited from
inputType
Get Signature
get inputType():
string
Defined in: js-api/src/entities/property.ts:89
Input type. See also InputType
Returns
string
Set Signature
set inputType(
s):void
Defined in: js-api/src/entities/property.ts:90
Platform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every
other hint, as it does in input_base.dart:668.
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Platform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every
other hint, as it does in input_base.dart:668.
Inherited from
isOptional
Get Signature
get isOptional():
boolean
Defined in: js-api/src/entities/property.ts:102
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:103
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
void
Inherited from
isVectorizable
Get Signature
get isVectorizable():
boolean
Defined in: js-api/src/entities/property.ts:160
Returns
boolean
Inherited from
max
Get Signature
get max():
number
Defined in: js-api/src/entities/property.ts:134
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:135
Maximum value. Applicable to numerical properties only
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
void
Maximum value. Applicable to numerical properties only
Inherited from
min
Get Signature
get min():
number
Defined in: js-api/src/entities/property.ts:130
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:131
Minimum value. Applicable to numerical properties only
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
void
Minimum value. Applicable to numerical properties only
Inherited from
name
Get Signature
get name():
string
Defined in: js-api/src/entities/property.ts:53
Property name
Returns
string
Set Signature
set name(
s):void
Defined in: js-api/src/entities/property.ts:54
Property name
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Property name
Inherited from
nullable
Get Signature
get nullable():
boolean
Defined in: js-api/src/entities/property.ts:97
Nullable
Returns
boolean
Set Signature
set nullable(
s):void
Defined in: js-api/src/entities/property.ts:98
Whether an empty value is allowed. This is used by validators.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
void
Whether an empty value is allowed. This is used by validators.
Inherited from
propertySubType
Get Signature
get propertySubType():
TYPE
Defined in: js-api/src/entities/property.ts:78
Property subtype
Returns
Inherited from
propertyType
Get Signature
get propertyType():
TYPE
Defined in: js-api/src/entities/property.ts:74
Property type. Same as type
Returns
Set Signature
set propertyType(
s):void
Defined in: js-api/src/entities/property.ts:75
Property data type; same as type, and read first where both appear (as on a DG.Property).
Parameters
| Parameter | Type |
|---|---|
s | TYPE |
Returns
void
Property data type; same as type, and read first where both appear (as on a DG.Property).
Inherited from
semType
Get Signature
get semType():
string
Defined in: js-api/src/entities/property.ts:85
Semantic type
Returns
string
Set Signature
set semType(
s):void
Defined in: js-api/src/entities/property.ts:86
Semantic type
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Semantic type
Inherited from
set
Get Signature
get set():
PropertySetter
Defined in: js-api/src/entities/property.ts:49
Property setter
Returns
Set Signature
set set(
x):void
Defined in: js-api/src/entities/property.ts:50
Writes the property value to an object.
Parameters
| Parameter | Type |
|---|---|
x | PropertySetter |
Returns
void
Writes the property value to an object.
Inherited from
showPlusMinus
Get Signature
get showPlusMinus():
boolean
Defined in: js-api/src/entities/property.ts:146
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:147
Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
void
Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.
Inherited from
showSlider
Get Signature
get showSlider():
boolean
Defined in: js-api/src/entities/property.ts:142
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:143
Whether a slider appears next to the number input. Applies to numerical columns only.
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
void
Whether a slider appears next to the number input. Applies to numerical columns only.
Inherited from
step
Get Signature
get step():
number
Defined in: js-api/src/entities/property.ts:138
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:139
Step to be used in a slider. Only applies to numerical properties.
Parameters
| Parameter | Type |
|---|---|
s | number |
Returns
void
Step to be used in a slider. Only applies to numerical properties.
Inherited from
type
Get Signature
get type():
TYPE
Defined in: js-api/src/entities/property.ts:70
Property type. Same as propertyType
Returns
Set Signature
set type(
s):void
Defined in: js-api/src/entities/property.ts:71
Property data type. See TYPE.
Parameters
| Parameter | Type |
|---|---|
s | TYPE |
Returns
void
Property data type. See TYPE.
Inherited from
units
Get Signature
get units():
string
Defined in: js-api/src/entities/property.ts:118
Units of measurement.
Returns
string
Set Signature
set units(
s):void
Defined in: js-api/src/entities/property.ts:119
Units of measurement. See also: [postfix]
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
void
Units of measurement. See also: [postfix]
Inherited from
userEditable
Get Signature
get userEditable():
boolean
Defined in: js-api/src/entities/property.ts:126
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:127
Whether the property should be editable via the UI
Parameters
| Parameter | Type |
|---|---|
s | boolean |
Returns
void
Whether the property should be editable via the UI
Inherited from
validators
Get Signature
get validators():
string[]
Defined in: js-api/src/entities/property.ts:157
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:158
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
| Parameter | Type |
|---|---|
x | string[] |
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.
Inherited from
vectorName
Get Signature
get vectorName():
string
Defined in: js-api/src/entities/property.ts:162
Returns
string
Inherited from
Methods
fromOptions()
fromOptions(
opt?):Property
Defined in: js-api/src/entities/property.ts:170
Applies the specified options
Parameters
| Parameter | Type |
|---|---|
opt? | IProperty |
Returns
Inherited from
bool()
staticbool(name,getter,setter,defaultValue):Property
Defined in: js-api/src/entities/property.ts:200
Creates a bool property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter |
setter | PropertySetter |
defaultValue | any |
Returns
Inherited from
create()
staticcreate(name,type):EntityProperty
Defined in: js-api/src/entities/property.ts:269
Creates a property
Parameters
| Parameter | Type |
|---|---|
name | string |
type | string |
Returns
EntityProperty
Overrides
dateTime()
staticdateTime(name,getter,setter,defaultValue):Property
Defined in: js-api/src/entities/property.ts:205
Creates a datetime property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter |
setter | PropertySetter |
defaultValue | any |
Returns
Inherited from
float()
staticfloat(name,getter,setter,defaultValue):Property
Defined in: js-api/src/entities/property.ts:190
Creates a float property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter |
setter | PropertySetter |
defaultValue | any |
Returns
Inherited from
fromOptions()
staticfromOptions(options):Property
Defined in: js-api/src/entities/property.ts:224
Parameters
| Parameter | Type |
|---|---|
options | IProperty |
Returns
Inherited from
int()
staticint(name,getter,setter,defaultValue):Property
Defined in: js-api/src/entities/property.ts:185
Creates an integer property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter |
setter | PropertySetter |
defaultValue | any |
Returns
Inherited from
js()
staticjs(name,type,options?):Property
Defined in: js-api/src/entities/property.ts:210
Creates property for the JavaScript objects with the corresponding property name
Parameters
| Parameter | Type |
|---|---|
name | string |
type | TYPE |
options? | IProperty |
Returns
Inherited from
jsBool()
staticjsBool(name,options?):Property
Defined in: js-api/src/entities/property.ts:219
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
jsDateTime()
staticjsDateTime(name,options?):Property
Defined in: js-api/src/entities/property.ts:222
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
jsFloat()
staticjsFloat(name,options?):Property
Defined in: js-api/src/entities/property.ts:220
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
jsInt()
staticjsInt(name,options?):Property
Defined in: js-api/src/entities/property.ts:218
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
jsString()
staticjsString(name,options?):Property
Defined in: js-api/src/entities/property.ts:221
Parameters
| Parameter | Type |
|---|---|
name | string |
options? | IProperty |
Returns
Inherited from
registerAttachedProperty()
staticregisterAttachedProperty(typeName,property):void
Defined in: js-api/src/entities/property.ts:229
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
| Parameter | Type |
|---|---|
typeName | string |
property | Property |
Returns
void
Inherited from
Property.registerAttachedProperty
string()
staticstring(name,getter,setter,defaultValue):Property
Defined in: js-api/src/entities/property.ts:195
Creates a string property
Parameters
| Parameter | Type |
|---|---|
name | string |
getter | PropertyGetter |
setter | PropertySetter |
defaultValue | any |