Expand description
VAPP-217 (eApps U2): the HOST half of the RecordForm and RecordTable
macros, the mirror of src/host/record-macros.ts
(fixtures/record-macros.json locks both). A macro sees only its node’s
props, so before a template is reduced the host fills every RecordForm /
RecordTable node of the flat component list from its kind’s schema: the
fields with their checks, the table columns (the Data tab’s typed
widths), the rows binding, the draft path and the actions. The macro
table then expands the filled node like any other.
Constants§
- RECORD_
FORM_ ROOT - RECORD_
ISSUES_ PATH - RECORD_
LONG_ TEXT - A string longer than this (its
maxLength) is a Textarea. - RECORD_
MEMBERS_ PATH - The team’s members and issues the macros’ Selects read (one binding per
surface, outside the package’s
sources: the macro’s own). - RECORD_
MENU_ WIDTH - RECORD_
TABLE_ ROOT - RECORD_
UPDATED_ WIDTH
Functions§
- field_
label closeDate/close_date→Close date.- fill_
record_ macros - Every RecordForm / RecordTable of a template’s flat component list,
filled from
records(the package’srecordsobject); other components untouched. Returns(components, bindings): a RecordTable appends its phone row<id>__row, when editable its Delete<id>__rowDelete, and the binding/recordTable/<id>/rows. - is_
record_ macro_ binding - A record macro’s own source at its own path passes any
sources. - record_
columns - The Data tab’s column order: required (in order), then the rest by name.
- record_
form_ fields - The form fields of a kind, values under
path(files left out). - record_
macro_ issues - VAPP-217: a writing RecordForm / editable RecordTable needs
records.upsert(a table alsorecords.delete) infunctions; a RecordTable’srecords:<kind>must passsourceswhen set. At the macro’s component. - record_
table_ columns - The table columns: the chosen fields (default every one), typed and
sized like the Data tab, then
updatedAt, then the row menu. - uses_
record_ macros - True when a template uses a record macro.