Skip to main content
Data components display and edit extracted document data within V2 data forms. Each component binds to the data context via taxonomy tag paths, rendering the appropriate editor or display based on the taxon type defined in your taxonomy.

v2:attributeEditor

The core editing component. It resolves a taxonomy tag path to a data object attribute and renders the correct editor (text input, dropdown, date picker, etc.) based on the taxon type.

Props

When valueFrom is set, the editor becomes a read-only input that displays the value from the referenced tag path. It checks shared formValues first, then falls back to searching data object attributes.

Editor Options

The editorOptions object provides fine-grained control over editor behavior and appearance.
allowDirectExtract and aiExtraction are mutually exclusive. Use allowDirectExtract for fields where the value can be copied verbatim from the document. Use aiExtraction when an LLM should interpret and extract the value.
When aiExtraction is configured without an explicit placeholder, the editor auto-sets the placeholder to “Select text in document, then click to extract”. When allowDirectExtract is configured without a placeholder, it auto-sets to “Select text in document to copy value”.

Examples

Basic attribute editor:
Read-only editor with value mirrored from another field:
Checkbox editor:
SELECTION field rendered as stacked radio buttons:

v2:label

A read-only text display component. Use it for static headings, section titles, or descriptive text within a form.

Props

Example

Labels support dynamic text via bindings:

v2:table

A row-based data display and editing component. It scopes rows by the parent taxonomy path of the first column’s tag metadata, then renders each matching data object as a table row with inline attribute editors.

Props

Each entry in columns has the following shape:

Example

A three-column table for invoice line items:
When no matching data objects are found, the table displays a “No line items found” placeholder.

v2:grid

An enhanced data grid backed by the KodexaDataObjectGrid component (ag-Grid). It provides sorting, filtering, grouping, and inline editing for repeating data objects.

Props

The grid automatically builds its column definitions from the children of the specified groupTaxon in the taxonomy. All data objects in the current data context are passed to the grid, which filters them internally by path and parent ID. Each entry in sort is a V2GridSortEntry: Provide exactly one of tagPath or header per entry to select the column to sort on. For example, a default ascending sort on a line-item amount column: { "tagPath": "invoice/lineItems/amount", "direction": "asc" }. sort sets the row order for the first load of a fresh task; it does not re-sort the grid on every change. After that first load the order is locked: as operators type into cells the grid no longer reorders, and a newly added row is inserted in place (by its source ordering) rather than jumping to a sorted position mid-entry. Operators can still re-sort manually by clicking a column header, which overrides the declared default. The resulting row order is persisted per task, so it is restored when the task is reopened or refreshed and is seen by other operators viewing the same task. Persistence is written only when an operator adds or removes a row — not on load and not on cell edits.

Custom columns

Each entry in columns mounts a registered V2 component as the cell renderer for that column, alongside the taxon-driven attribute columns. Use this for columns that don’t map to a single taxon attribute — source-document badges, copy buttons, per-row delete affordances. A sortable custom column paired with a matching sort entry — the grid loads with the “Source” column sorted ascending:

Example

A grid for financial line items:
Grid with AI extraction:
When aiExtraction is configured, an “AI Extract” button appears in the grid toolbar. Target fields are automatically derived from the group taxon’s children unless explicitly overridden via targetPaths.

v2:dataTable

A read-only data grid for rendering arbitrary JSON data, powered by AG Grid. Unlike v2:table (which binds to taxonomy tag paths and renders inline attribute editors), v2:dataTable takes a plain array of objects and renders them in a fully-featured grid with sorting, filtering, and column resizing. It is typically used as a child of v2:serviceBridgeView to display bridge responses, but can be used anywhere with binding expressions. The grid automatically uses the platform’s AG Grid theme, matching light/dark mode.

Props

Each entry in columns:

Built-in Features

Because v2:dataTable uses AG Grid under the hood, you get these features automatically:
  • Quick filter — a search box above the grid filters across all columns as you type (enabled by default, disable with filterable: false)
  • Pagination — a footer showing row counts (e.g. “1 to 10 of 25”) with page navigation controls. Defaults to 10 rows per page, configurable via pageSize.
  • Sorting — click any column header to sort ascending/descending
  • Column filtering — each column header shows a filter icon with type-appropriate filtering (text search for strings, set filter for booleans)
  • Column resizing — drag column borders to resize
  • Theme integration — automatically follows the platform’s light/dark mode

Examples

With explicit columns (quick filter and pagination are enabled by default):
Custom page size with quick filter disabled:
Boolean column with checkmark rendering:
With auto-inferred columns (column headers derived from property names):
Static data via props (no bridge required):

v2:markdown

Renders markdown content as formatted HTML using the platform’s KodexaMarkdown renderer. Supports headings, lists, tables, code blocks, and all standard markdown syntax. Typically used as a child of v2:serviceBridgeView to display formatted text from bridge responses.

Props

Examples

Static markdown:
Dynamic content from a bridge response:
Markdown with size variant:

v2:knowledgeSection

Displays knowledge base content within a form. It looks up a knowledge item by type from the workspace’s document families, loads the item’s markdown content, and renders it in a collapsible section.

Props

The component handles three states: loading (with a spinner), not found (with an italicized message), and loaded (with an expandable section showing the title and rendered markdown).

Example

The component searches across all document families in the current workspace for a knowledge item matching the specified type. The item’s instructionMarkdown property is rendered as formatted HTML with support for headings, lists, tables, and code blocks.

v2:exceptions

Displays validation exceptions for data objects in the current scope. It aggregates exceptions from all data objects, filters by status and tag paths, and renders each exception as a compact card.

Props

The component listens for workspace:dataExceptionsUpdated events and refreshes automatically when exceptions change.

Example

v2:attributeSourceBadge

A grid cell renderer that surfaces the source document(s) an attribute was extracted or promoted from, as one or more colored, clickable pills. For each attribute on the row at tagPath, it walks the attribute’s spatial anchor (tagId) to the containing page, reads the preprocessor-set document_type + group sequence, and renders one badge per distinct (document_type, group) tuple. Clicking a badge dispatches workspace.focusTag(tagId, viewId), highlighting the source content in the document viewer.

Props

Use the badge as a custom column on a v2:grid — its instance numbering ("Bill of Lading #1, #2, …") is scoped per document type, so a form rendering multiple BoLs alongside multiple Invoices shows the right number for each pill regardless of how the underlying preprocessor sequences them.

Example

v2:attributeCopyButton

A grid cell renderer that promotes the row’s attribute at sourceTagPath up to an ancestor scalar at targetTagPath. The source attribute’s tagId is carried onto the target so click-to-source navigation in the document viewer keeps working after the copy. The target is also stamped with ownerUri = user://<reviewer email>, exactly as a manual edit, so the edited-value indicator appears on the promoted field (blue when the source carried a tagId/document anchor, yellow — shown as “Not from Document” — when it did not). Click semantics: overwrites the destination silently and idempotently. If the target already has an attribute for that tag, it is updated in place (preserving its id so downstream watchers see a value change, not a delete + add). Duplicate target attributes left over from prior sessions are pruned automatically.

Props

Examples

Single-field promotion:
Multi-field promotion with relatedCopies — promotes weight and its UOM together:

v2:attributeCopyAction

A scalar sibling-copy inline icon button for form layouts (not grid cells). Clicking it reads the value at sourceTagPath and writes it to a sibling scalar at targetTagPath on the same parent data object. Where v2:attributeCopyButton is a grid cell renderer that promotes a row attribute up to an ancestor scalar by walking the ag-grid row’s parent chain, v2:attributeCopyAction resolves both paths at the form / data-context level — there is no grid row involved. Source and target must therefore live on the same parent taxonomy path (they are siblings). It sits alongside v2:attributeRowPromote (a row-level promote variant); use v2:attributeCopyAction for the form-layout, sibling-to-sibling case.

Props

Behavior

  • Value resolution prefers dataContext.formValues, then the stored attribute (decimalValue, then stringValue), then a display-only formula-engine fallback for FORMULA taxons that have not persisted a value yet (the formula source is evaluated through the formula engine so the button works on stale-at-init documents). The fallback is never written back.
  • The write always sets stringValue, value, and decimalValue so number-typed targets (NUMBER, CURRENCY, DECIMAL, INTEGER, PERCENTAGE) re-render immediately rather than showing the stale prior string.
  • The source attribute’s tagId is carried onto the target so click-to-source navigation keeps working, and the target is stamped with ownerUri = user://<reviewer email> — exactly as a manual edit — so the edited-value indicator appears (blue when the source had a tagId/document anchor, yellow when it did not).
  • The button is disabled while the source resolves to empty, zero, or non-numeric, and shows a brief green checkmark on success.
  • An existing target attribute is updated in place (its id is preserved) and duplicate targets are pruned.

Example

In a plain form layout (not inside v2:grid columns), copy a computed line-items total into an editable total field, carrying the currency scalar along with it:

v2:attributeRowPromote

A grid cell renderer (a custom column on v2:grid) that surfaces N promote destinations as a single “Promote to…” dropdown per row. It replaces the older pattern of one v2:attributeCopyButton chevron column per destination. How it differs from its siblings: v2:attributeCopyButton is one chevron button per single destination column; v2:attributeRowPromote collapses multiple destinations into one dropdown driven by a targets array, and adds an optional per-target sourceTagPath override. (v2:attributeCopyAction is the scalar form-button variant for non-grid layouts.)

Props

The grid injects the cell context automatically, so authors do not set a params prop. Each entry in targets is a PromoteTarget:

Behavior

The promote is idempotent — it follows the same resolve / update / dedupe path as v2:attributeCopyButton, updating an existing target attribute in place (preserving its id), creating one if absent, and pruning duplicates. The source tagId is carried onto the target so click-to-source navigation keeps working, and the target is stamped with ownerUri = user://<reviewer email> — exactly as a manual edit — so the edited-value indicator appears on the promoted field (blue when the source had a tagId/document anchor, yellow when it did not). It writes decimalValue so number-typed targets (NUMBER, CURRENCY, DECIMAL, INTEGER, PERCENTAGE) render immediately without tabbing away. The dropdown is disabled when the row has no source value or while a promote is in flight, and shows a transient green checkmark confirmation on success.

Example

Place it as a custom column inside v2:grid. Here a per-row weight promotes to two ancestor scalars — one target overrides the source to a parent-level scalar, and each carries its unit-of-measure along:

v2:attributeRowDeleteButton

A grid cell renderer that deletes the row’s data object inline, with no confirmation prompt. Surfaces the same behavior as the 3-dots actions menu’s “Delete Row” item as an always-visible button so reviewers don’t have to open a menu per row when scrubbing extraction noise from tables that frequently pick up junk rows (freight classes, accessorials). For bulk operations across multiple rows, use v2:gridDeleteBySource — that component confirms before deleting.

Props

Example

v2:gridDeleteBySource

A toolbar component that sits above a v2:grid and surfaces one Remove all <source> rows button per distinct source document detected on the configured tagPath. “Source” is the same (document_type, group) tuple v2:attributeSourceBadge shows, so reviewers see consistent source identity between the badge in the grid and the buttons above it. Each button deletes every row in the group taxon whose configured-path attribute resolves to that source, after a single confirmation prompt. Designed for tables that frequently pick up rows from the wrong document — freight class line items pulled from the invoice instead of the BoL, or accessorials extracted from a manifest the reviewer wants to discard.

Props

The toolbar renders nothing when no source can be resolved (empty grid, unloaded document), so it doesn’t reserve dead vertical space.

Example

Place the toolbar in the same parent layout as the grid:

v2:routeTimeline

Renders a group taxon’s rows as a numbered vertical timeline of draggable stop cards for ordered lists (e.g. a multi-stop shipment route). Drag-reorder rewrites a per-row sequence attribute to the new 1-based order.

Props

Toolbar and features

Drag-reorder renumbers every row’s sequenceTag attribute to its new 1-based position; rows that are missing the sequence attribute are seeded (the attribute is created) so they can take a dropped position. The ”+ Add stop” toolbar button is gated by allowAdd. It creates a parent row plus an empty child sub-object and seeds the sequence at the end of the list. The “AI extract stop” toolbar button is gated by aiExtraction. It runs a single-record, selection-anchored LLM extraction: anchored on the user’s highlighted / selected text plus the line-numbered page text, it fills one parent record plus one level of nested sub-object (e.g. the address), writes per-attribute document highlights, and seeds the sequence at the end of the list. The config object mirrors the aiExtraction used by v2:grid: modelType is SMALL (default) or LARGE, and the prompt is supplied via promptRef (a stored prompt reference) or an inline prompt string. Per card (subject to readonly and slice gating): a type pill driven by typeTag (pickup, intermediate, and delivery values render distinct colors; anything else is a neutral pill); an optional location-code badge; the name and address summary; a find-in-document button (visible only when a navigable source anchor exists) that scrolls to and highlights the source content; an expand chevron when expandable is set; and a per-row delete (no confirmation). When expandable is true, the inline edit panel edits the row’s direct-child scalars (stopDetailTags) and its nested sub-object group (addressDetailTags). The sequence is never editable from the panel — drag order owns it. The panel is suppressed when readonly is set. With show: "firstLast" and more than 2 rows, the timeline collapses to the first and last card and disables drag and hides the toolbar (Add / AI). At 2 or fewer rows it falls back to "all" behavior.

Example

A vertical timeline for a multi-stop shipment route, with add and AI extraction enabled and an expandable edit panel. The detail-tag defaults are overridden with neutral per-form tags: