CRUDUI

Home > @polyspec/crudui-generator-core > WidgetCtx

WidgetCtx interface

Inputs every widget evaluator needs for one leaf field.

Signature:

export interface WidgetCtx 

Properties

Property

Modifiers

Type

Description

attributes?

Attrs

(Optional) Declared attributes of the control (design.attributes) in declaration order.

design

ResolvedDesign

Resolved design appearance for this field.

idPrefix?

string

(Optional) Stable DOM identifier prefix.

keyPrefix?

string

(Optional) Optional name/id prefix.

messages?

FormMessages

(Optional) Interface messages of the form language, for the controls a widget writes itself.

path

string

Dot path within the form.

rowSegments?

readonly number[]

(Optional) Positions of repeated rows in the path, derived from form structure.

spec

Record<string, unknown>

The composed (single-spec) field node.

t

Translate

Content translator (active language).

value

unknown

The field's current value.