JsonLayout
Where the fields of a definition go. It holds items, for one page, or steps, for several.
ts
type JsonLayout =
| { items: readonly JsonLayoutItem[]; ui?: Record<string, unknown> }
| { steps: readonly JsonLayoutStep[]; ui?: Record<string, unknown> }Explanation
See layout and steps. The builder's getLayout() gives the layout with every reference resolved, as a FormLayout.
JsonLayoutStep
JsonLayoutStepidstring: optional, unique across the layoutlabelstring: optionaldescriptionstring: optionalitemsreadonly JsonLayoutItem[]uiRecord<string, unknown>: optional
JsonLayoutItem
ts
type JsonLayoutItem =
| string
| JsonLayoutField
| JsonLayoutSection
| JsonLayoutRow
| JsonLayoutSlot
| JsonLayoutDisplayA string is a field by its dot path, or '*' for every field not placed elsewhere.
JsonLayoutField
JsonLayoutFieldfieldstring: its dot path, from the fields around ititemsreadonly JsonLayoutItem[]: optional, lays out the fields of a group or of each item of a listspannumber: optional, in a row
JsonLayoutSection
JsonLayoutSectiontype'section'idstring: optionallabelstring: optionaldescriptionstring: optionalitemsreadonly JsonLayoutItem[]uiRecord<string, unknown>: optionalspannumber: optional, in a row
JsonLayoutRow
JsonLayoutRowtype'row'idstring: optionalitemsreadonly JsonLayoutItem[]: its cellsuiRecord<string, unknown>: optionalspannumber: optional, in a row
JsonLayoutSlot
JsonLayoutSlottype'slot'namestringspannumber: optional, in a row
JsonLayoutDisplay
JsonLayoutDisplaytypestring: a display element's type, like'heading'idstring: optionalspannumber: optional, in a row[prop: string]unknown: its type's props, liketext