English
@eightkk/vue-weave / core / InspectorField
Interface: InspectorField<T>
Defined in: src/core/diagramEditor.ts:68
One field of PropertyInspector. It is a typed field (TimelineFieldSpec: parsing, formatting and validation are shared with GanttChart columns) whose getter reads the inspected item, plus a label and presentation options.
Extends
Omit<TimelineFieldSpec,"kind"|"get">
Type Parameters
T
T extends InspectorItem = InspectorItem
Properties
allowNegative?
optionalallowNegative?:boolean
Defined in: src/core/fieldEditing.ts:47
duration only: accept negative values. Other kinds are not restricted unless min says so.
Inherited from
Omit.allowNegative
choices?
optionalchoices?: readonlyFieldChoice[]
Defined in: src/core/fieldEditing.ts:32
Allowed options for select. The built-in formatter shows a choice's label (else its value) and the built-in parser reads a label or a value back; see parseFieldValue for how duplicate labels are resolved.
Inherited from
Omit.choices
description?
optionaldescription?:string
Defined in: src/core/diagramEditor.ts:77
Help text under the control; it also describes the control.
durationBasis?
optionaldurationBasis?:FieldDurationBasis
Defined in: src/core/fieldEditing.ts:62
duration only: whether the value is elapsed or working time. Surfaced for editors to display.
Inherited from
Omit.durationBasis
format?
optionalformat?: (value) =>string
Defined in: src/core/fieldEditing.ts:26
Custom formatter. It replaces the built-in formatter for the kind.
Parameters
value
Returns
string
Inherited from
Omit.format
get
get: (
item) =>FieldValue
Defined in: src/core/diagramEditor.ts:73
The raw value of the item.
Parameters
item
T
Returns
id
id:
string
Defined in: src/core/fieldEditing.ts:19
Inherited from
Omit.id
integer?
optionalinteger?:boolean
Defined in: src/core/fieldEditing.ts:45
number only: require an integer.
Inherited from
Omit.integer
kind
kind:
InspectorFieldKind
Defined in: src/core/diagramEditor.ts:69
label
label:
string
Defined in: src/core/diagramEditor.ts:71
The visible label and accessible name of the control.
max?
optionalmax?:number
Defined in: src/core/fieldEditing.ts:43
Inclusive upper bound for number, time and duration.
Inherited from
Omit.max
min?
optionalmin?:number
Defined in: src/core/fieldEditing.ts:41
Inclusive lower bound for number, time and duration.
Inherited from
Omit.min
multiple?
optionalmultiple?:boolean
Defined in: src/core/fieldEditing.ts:39
select only: accept an array of choices. The built-in formatter joins the entries with , and writes an entry that is empty, contains a comma or a double quote, or starts or ends with whitespace in double quotes, with inner quotes doubled (as in CSV). The built-in parser splits the text at unquoted commas and reads each entry like a single selection.
Inherited from
Omit.multiple
parse?
optionalparse?: (text) =>FieldValue| {error:string; }
Defined in: src/core/fieldEditing.ts:24
Custom text parser. It replaces the built-in parser for the kind.
Parameters
text
string
Returns
FieldValue | { error: string; }
Inherited from
Omit.parse
placeholder?
optionalplaceholder?:string
Defined in: src/core/diagramEditor.ts:78
readonly?
optionalreadonly?:boolean
Defined in: src/core/diagramEditor.ts:75
Shows the value without letting it be edited.
required?
optionalrequired?:boolean
Defined in: src/core/fieldEditing.ts:27
Inherited from
Omit.required
timeZone?
optionaltimeZone?:string
Defined in: src/core/fieldEditing.ts:54
time only: IANA time zone name (for example Asia/Tokyo) used for text without an offset. Daylight saving is applied; a skipped wall time resolves to the transition and a repeated one to its earlier occurrence. The built-in formatter appends the offset (for example 2026-11-01 01:30 -05:00) to a wall time that occurs twice, so formatted text parses back to the same instant. Takes precedence over utcOffsetMinutes.
Inherited from
Omit.timeZone
unitLabel?
optionalunitLabel?:string
Defined in: src/core/fieldEditing.ts:66
duration only: optional suffix such as h, appended when formatting and accepted when parsing.
Inherited from
Omit.unitLabel
unitSize?
optionalunitSize?:number
Defined in: src/core/fieldEditing.ts:64
duration only: model units in one displayed unit (3600000 for hours when the model uses milliseconds). Default 1.
Inherited from
Omit.unitSize
utcOffsetMinutes?
optionalutcOffsetMinutes?:number
Defined in: src/core/fieldEditing.ts:60
time only: fixed offset from UTC in minutes (for example 540 for UTC+09:00). The built-in parser and formatter never use the runtime's local time zone. Without it, parse and format are required for time fields (unless timeZone is set); an offset written in the text itself (Z, +09:00) wins over this one.
Inherited from
Omit.utcOffsetMinutes