Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- func Checkbox(row entity.Config) templ.Component
- func Color(row entity.Config) templ.Component
- func Date(row entity.Config) templ.Component
- func Datetime(row entity.Config) templ.Component
- func Dropdown(row entity.Config) templ.Component
- func Email(row entity.Config) templ.Component
- func KVList(row entity.Config) templ.Component
- func KVListSummary(v entity.Config) string
- func Number(row entity.Config) templ.Component
- func Picker(row entity.Config) templ.Component
- func Secret(row entity.Config) templ.Component
- func Text(row entity.Config) templ.Component
- func Textarea(row entity.Config) templ.Component
- func URL(row entity.Config) templ.Component
Constants ¶
const FieldClass = "" /* 298-byte string literal not displayed */
FieldClass is the shared Tailwind class string for text-like widgets that need full-width styling. The Picker widget uses it for its search input. Other widgets (Text, Dropdown, etc.) keep their own intentional widths so admin Settings page renders with the original two-column layout.
Variables ¶
This section is empty.
Functions ¶
func Checkbox ¶
Checkbox renders a boolean. The hidden "false" input ensures an unchecked box still posts a value (browsers skip unchecked checkboxes).
func Color ¶
Color pairs the native picker with a mirrored hex text field so admins can copy/paste values as well as pick them.
func KVList ¶ added in v0.5.4
KVList renders an editable multi-row table widget. Options holds pipe-separated column names (e.g. "id|name"); Value is a JSON array of string-keyed objects: [{"id":"1","name":"Sales Report"},...].
The hidden input named "value" carries the serialized JSON. It is also stamped with `data-field-key=<row.Key>` so contexts that look up editables by field-key (workflow inspector's argEditable) can find this widget. Serialization happens live on every row edit so the JSON stays current without depending on a form submit.
func KVListSummary ¶ added in v0.5.4
KVListSummary returns a compact human-readable summary of a kvlist value: "N entries: col1:col2, ..." (first 3 rows, then "+N more").
func Picker ¶ added in v0.13.0
Picker renders an inline-chip multi-select.
Single input box — chips appear inline as the operator commits each token. Behaviour:
- Type → debounced lookup against <data-picker-lookup-url>?source=<data-picker-source>&q=<text>. Dropdown of {id, name} candidates; click a row to add the chip.
- Press comma, Enter, or paste a comma/newline-separated blob → each non-empty token becomes a chip with id = name (fallback when the lookup endpoint can't resolve / isn't wired).
- Backspace at empty input pops the last chip. Matches Gmail / Slack recipient field UX.
Value lives on the hidden <input data-field-key> as JSON `[{id, name}, ...]`. Mutations fire `input` + `change` on the hidden input so DOM-polling consumers catch the edit.
Init JS at internal/tools/agents/js/widgets/picker.js — load it once per page (the workflow editor does so via editor.templ). The script auto-wires every .wf-picker on DOMContentLoaded and exposes window.wickInitPickers(root) for hydrate flows that inject pickers via innerHTML.
func Secret ¶
Secret masks the stored value and never pre-fills the input. To keep the current value, the admin cancels; to rotate it, they type a new one.
Types ¶
This section is empty.