Skip to content

@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 ​

Type Parameters ​

T ​

T extends InspectorItem = InspectorItem

Properties ​

allowNegative? ​

optional allowNegative?: 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? ​

optional choices?: readonly FieldChoice[]

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? ​

optional description?: string

Defined in: src/core/diagramEditor.ts:77

Help text under the control; it also describes the control.


durationBasis? ​

optional durationBasis?: 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? ​

optional format?: (value) => string

Defined in: src/core/fieldEditing.ts:26

Custom formatter. It replaces the built-in formatter for the kind.

Parameters ​

value ​

FieldValue

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 ​

FieldValue


id ​

id: string

Defined in: src/core/fieldEditing.ts:19

Inherited from ​

Omit.id


integer? ​

optional integer?: 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? ​

optional max?: number

Defined in: src/core/fieldEditing.ts:43

Inclusive upper bound for number, time and duration.

Inherited from ​

Omit.max


min? ​

optional min?: number

Defined in: src/core/fieldEditing.ts:41

Inclusive lower bound for number, time and duration.

Inherited from ​

Omit.min


multiple? ​

optional multiple?: 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? ​

optional parse?: (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? ​

optional placeholder?: string

Defined in: src/core/diagramEditor.ts:78


readonly? ​

optional readonly?: boolean

Defined in: src/core/diagramEditor.ts:75

Shows the value without letting it be edited.


required? ​

optional required?: boolean

Defined in: src/core/fieldEditing.ts:27

Inherited from ​

Omit.required


timeZone? ​

optional timeZone?: 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? ​

optional unitLabel?: 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? ​

optional unitSize?: 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? ​

optional utcOffsetMinutes?: 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

Released under the MIT License.