本文へ移動

@eightkk/vue-weave / core / TimelineFieldSpec

Interface: TimelineFieldSpec<R> ​

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

Type Parameters ​

R ​

R extends TimelineRow = TimelineRow

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.


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.


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.


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


get ​

get: (row) => FieldValue

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

Raw value of the row. column.value only supplies display text.

Parameters ​

row ​

R

Returns ​

FieldValue


id ​

id: string

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


integer? ​

optional integer?: boolean

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

number only: require an integer.


kind ​

kind: TimelineFieldKind

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


max? ​

optional max?: number

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

Inclusive upper bound for number, time and duration.


min? ​

optional min?: number

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

Inclusive lower bound for number, time and duration.


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.


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; }


required? ​

optional required?: boolean

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


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.


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.


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.


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.

MIT ライセンスで公開しています。