Documentation
Workflow Execution Service (WES)
Components
I/O Form

EccClientGa4ghWesIoForm Component

2.0.0-alpha.52
<ecc-client-ga4gh-wes-io-form/>
ECCClientGa4ghWesIoForm

A proposal (cloud-components#444): the element, its event and the libraries behind it may still change.

Overview

The ecc-client-ga4gh-wes-io-form component renders the input form of a workflow from its GA4GH IO Schema (opens in a new tab) (version 0.3.0, commit 2c3dc49 (opens in a new tab)). It renders the inputs of the schema, validates the values in the browser and emits them; the app submits them, e.g. as workflow_params of a WES run.

  1. The schema is checked offline against the profile (see I/O Schemas). A schema that doesn't conform shows its errors, with the JSON Pointer of each, and no form.
  2. Each input gets a control by its type, format and enum:
InputControl
stringText field
string with format date, time or date-timeDate, time or date-and-time picker
integer, numberText field that gives a number
booleanCheckbox
enum or const (any type)Dropdown
object with propertiesA group with a field per property, at any depth
array with itemsA list with a field per item, "Add" and "Remove" within minItems and maxItems
Branches of allOf with properties (e.g. nf-core parameter groups)Sections of the object, with the branch's title and description
anyOf or oneOf without a typeA choice of the branch (by its title, else its type), then the branch's control
Anything else (e.g. prefixItems, objects without properties)JSON text area

A widget hint (x-ga4gh-ui-widget) chooses the control where it fits its schema, with the keywords it needs next to it, as the profile's UI widgets (opens in a new tab) define:

WidgetControl
text, number, checkbox, date-picker, time-picker, datetime-pickerAs above
textareaText area
sliderSlider within the bounds, in steps of multipleOf (else 1 for integers, any step for numbers); an exclusive bound moves one step inward (a thousandth of the range without a step)
dropdown, radioDropdown (radio buttons are rendered as a dropdown for now)
dropdown or tags on an array with items.enumMultiple choice
tags on an array of stringsOne tag per line
typeaheadText field with the examples as suggestions; with enum, a dropdown
switchCheckbox (for now)
color-pickerColour picker, giving #rrggbb in lowercase

File references (x-ga4gh-file, also as a branch of anyOf or oneOf) get a text field for a URI or a relative path. Their values are checked by the profile's rules (see File references) against allowedSchemes, narrowed by the reference's schemes; the checks follow the schema, not the controls, so they also cover branches of anyOf or oneOf that the form doesn't show, items of lists and tags, prefixItems, contains, maps (patternProperties, additionalProperties, unevaluatedProperties), dependentSchemas and both then and else (references by JSON Pointer, $anchor, $dynamicAnchor and $id, also inside embedded resources; $dynamicRef to every schema with its anchor name, and a value behind a reference the checks can't follow is refused). In a union, a string isn't checked as a file reference only if a branch without a file reference surely takes it: every keyword of that branch (also through allOf and $ref) is type, const, enum, pattern, minLength, maxLength or an annotation, and the string passes them. File reference text is kept as entered, so surrounding spaces make it invalid. Values nested more than 64 levels deep are refused. Refused values make the form invalid, and refused defaults aren't prefilled. A picker for DRS or storage is up to the app for now.

A widget that doesn't fit, a viewer, or a custom: widget renders the input by its type. Inputs whose type allows null get a "No value (null)" checkbox, which disables the control while it is checked. Required inputs are marked with * (also when an allOf branch requires them). Inputs with more than 1000 properties, and lists with more than 1000 items, are edited as JSON. 3. Inputs start from their default values (a union without one from the default of its first branch); inputs the user clears are left out of the values, not sent as null or "". A schema's own default is kept as it is, also "" or null. 4. Errors show at their input once it was changed, and at all inputs after reportValidity(). 5. A schema's x-ga4gh-error-message replaces the validator's messages for failures at its value, once per value; of several, the outermost wins (the input's own over that of a shared definition it refers to). Failures of a property's value use the property's message; a missing property uses the message of its object. 6. Inputs with x-ga4gh-hidden: true are listed under a collapsed "Advanced" section, except inputs that must be set (required, without a default) and inputs whose values fail.

Values follow the profile's widget table: a time is an RFC 3339 full-time with the offset of the browser's time zone (14:30:00+01:00), a date-time is in UTC (2026-12-14T09:15:00Z). Text that isn't a number is kept, so that the error says what is wrong.

Security

Schemas are treated as untrusted: titles, descriptions and choices are shown as text, never as markup. Descriptions with x-ga4gh-description-format: markdown are shown as plain text unless the app switches Markdown on (see Descriptions).

Usage

The preview renders example schemas of the IO Schema profile and shows what the form emits.

Properties

PropertyAttributeTypeDefaultDescription
schemaobjectundefinedThe IO schema of the workflow.
valuesobjectundefinedValues to start from instead of the defaults.
allowedSchemesallowed-schemesstring[]["drs", "https"]URI schemes that file references and links in descriptions may have; the attribute takes them separated by spaces or commas, in any case. Changing it checks the values again (defaults refused at load stay out).
inputValuesobjectThe current values (read only, a copy).

Methods

MethodDescription
reportValidity()Shows the errors of all inputs and returns whether the values are valid.

Events

EventDetailDescription
ecc-io-form-changed{ values, valid, errors }When the schema is loaded and whenever a value changes. errors holds { pointer, message }, with JSON Pointers into values.

CSS Parts

PartDescription
baseThe form.

Released under Apache 2.0 License.

Copyright © 2023-2026 ELIXIR