fieldtype

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 7 Imported by: 0

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

View Source
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

func Checkbox(row entity.Config) templ.Component

Checkbox renders a boolean. The hidden "false" input ensures an unchecked box still posts a value (browsers skip unchecked checkboxes).

func Color

func Color(row entity.Config) templ.Component

Color pairs the native picker with a mirrored hex text field so admins can copy/paste values as well as pick them.

func Date

func Date(row entity.Config) templ.Component

func Datetime

func Datetime(row entity.Config) templ.Component
func Dropdown(row entity.Config) templ.Component

func Email

func Email(row entity.Config) templ.Component

func KVList added in v0.5.4

func KVList(row entity.Config) templ.Component

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

func KVListSummary(v entity.Config) string

KVListSummary returns a compact human-readable summary of a kvlist value: "N entries: col1:col2, ..." (first 3 rows, then "+N more").

func Number

func Number(row entity.Config) templ.Component

func Picker added in v0.13.0

func Picker(row entity.Config) templ.Component

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

func Secret(row entity.Config) templ.Component

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.

func Text

func Text(row entity.Config) templ.Component

Text renders a plain single-line text input.

func Textarea

func Textarea(row entity.Config) templ.Component

func URL

func URL(row entity.Config) templ.Component

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL