Docyrus

Form Fields

Controlled DocyField inputs plus the DocyFieldDynamic IField adapter — render any Docyrus field definition with validation tokens, companions, uploads and pickers.

iOSAndroid
Preview Form Fields on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-form-fields
Required Packages(6 packages)
pnpm add @shopify/flash-list @react-native-community/datetimepicker expo-document-picker (optional) expo-image-picker (optional) @react-native-community/geolocation (optional) @react-querybuilder/core

Overview

Two layers, one package:

  • DocyField* controlled inputs — value / onChange components that work standalone (no form library). DocyFieldBase renders label, help text, errors and layout for all of them.
  • DocyFieldDynamic({ field }) — the IField adapter (web DynamicFormField counterpart). Pass a Docyrus IField and it derives label (field.name), placeholder (getFieldPlaceholder), required / read-only, inline options (field.enums), validation tokens (field.validations), companion values (money currency, phone country, status sub-status / notes / follow-up) and every value conversion the native control needs (date strings ↔ Date, [start, end] ranges, expanded { id, name } records → ids + seeded options). Desktop-only editors render a read-only value instead of nothing.

Optional pickers (expo-document-picker, expo-image-picker) are loaded lazily — image / file fields offer only the sources that are installed.

Usage

import { DocyFieldDynamic } from '@/components/docyrus-native/form-fields';

const field = {
  id: 'budget', slug: 'budget', name: 'Budget', type: 'field-money', validations: ['required', 'min:0']
};

<DocyFieldDynamic
  field={field}
  value={record.budget}
  record={record}
  onChange={value => setRecord(prev => ({ ...prev, budget: value }))}
  onCompanionChange={(key, value) => setRecord(prev => ({ ...prev, [key]: value }))} />
import { DocyFieldText, DocyFieldRelation } from '@/components/docyrus-native/form-fields';

<DocyFieldText name="title" label="Title" value={title} onChange={setTitle} validationTokens={['required', 'maxLength:80']} />

<DocyFieldRelation
  name="account"
  label="Account"
  enumOptions={accounts}
  value={accountId}
  onChange={setAccountId}
  onSearch={searchAccounts}
  onCreateRecord={async name => createAccount(name)}
  onExpand={option => router.push(`/accounts/${option.id}`)} />

DocyFieldDynamic

Two modes:

  • IField mode — DocyrusFormFieldProps (below).
  • Legacy mode — fieldType + the controlled DocyField* props (DocyFieldDynamicLegacyProps). Kept for existing code.

DocyrusFormFieldProps

PropTypeDefaultDescription
fieldIField—Field definition (required)
valueunknown—Controlled value (API shape — ids, ISO strings, StoredFileValue, …)
onChange(value: unknown) => void—Called with the next value in the API shape
onBlur / onFocus() => void—Focus handlers
recordRecord<string, unknown>—Companion values keyed by companion slug (__<slug>_currency, __<slug>_country, __<slug>_secondary, …) — usually the whole record
onCompanionChange(key: string, value: unknown) => void—Companion change (key = full companion slug)
disabledboolean—Disable the input
requiredbooleanfrom field.validationsLabel asterisk + required validation
readOnlybooleanfrom field.readOnlyForce read-only
errorstring—External error
descriptionstring—Help text below the field
labelstringfield.nameLabel override
enumOptionsEnumOption[]field.enumsOptions for select-based fields
appSlug / dataSourceSlugstring—Dynamic enum loading context
onLoadMore / hasMore() => void / boolean—Picker pagination
onSearch / searching(query) => void / boolean—Remote search
onCreateRecord(name: string) => Promise<EnumOption>—Relation: create from the search text
renderCreateForm({ onCreated }) => ReactNode—Relation: custom inline create form
itemTemplate(option: EnumOption) => ReactNode—Custom option rendering
variant'dropdown' | 'card''dropdown'Card list for select / radio / relation; field-multiSelect + card renders a checkbox group
columnCount1 | 2 | 3 | 4 | 5—Card columns (clamped to 2 on phones)
onImageUpload / onFileUploadFieldUploadHandler—(file: NativeFile) => Promise<StoredFileValue | null>
onExpand(option: EnumOption) => void—Relation expand button
renderExpandContent(option: EnumOption) => ReactNode—Relation expand content (bottom sheet)
expandIconReactNode—Custom expand glyph
onComposeEmail(email: string) => void—Email compose button
onSendMessage(phone: string) => void—Phone send-message button
clientRestApiClient—Email / phone fields: open EmailComposeDialog / InstantMessageComposeDialog. onComposeEmail / onSendMessage win when set
aiAssistantboolean—Reserved (not yet on native)
renderOptionsEditor() => ReactNode—Enum "Manage options" footer inside the picker sheet (field-enum / field-systemEnum; filled by useDocyrusFormView({ enumEditor }))
size'sm' | 'md' | 'lg''md'Field size
fieldVariant'default' | 'filled' | 'outlined''default'Input chrome
labelAlignment'top' | 'left' | 'right''top'Label placement
showLabelbooleantrueRender the label
clearablebooleantrueClear affordance on optional pickers
autoOpenboolean—Open the picker on mount
onPickerClose() => void—Picker sheet closed
validationTokensstring[] | nullfield.validationsToken list to enforce; null disables
validationsDocyFieldValidationRule[]—Extra object rules
classNamestring—Container class

Field type → native control

IFieldTypeControl
field-text / -textarea / -email / -url / -passwordDocyFieldText / Textarea / Email / Url / Password
field-codeDocyFieldCode (single-line monospace)
field-codeEditor / -json / -jsonata / -handlebarsDocyFieldCode (multiline, json parses)
field-markdownDocyFieldMarkdown (SimpleMarkdownEditor: toolbar + Write / Preview)
field-number / -percent / -money / -duration / -ratingNumber / Percent / Money (+ currency companion) / Duration (options.editorOptions.increment/maxHours) / Rating (field.maxRating)
field-checkbox / -switch / -sliderCheckbox / Switch / Slider
field-phonePhone (__<slug>_country, legacy country_code)
field-color / -icon / -currencyColor / Icon / CurrencyCode
field-select / -enum / -systemEnumSelect / Enum; field.nested → DocyFieldTreeSelect
field-radioGroup / -statusRadioGroup (RadioGroup options, variant: 'card', columnCount 1–5) / Status (+ sub-status, notes, follow-up)
field-userSelect / -userMultiSelect / -relationUser pickers / Relation (itemMapping, nested, create, expand)
field-multiSelect / -tagSelectMultiSelect (variant: 'card' → CheckboxGroup) / TagSelect
field-date / -dateTime / -time / -dateRangeDate (YYYY-MM-DD) / Datetime (ISO) / Time (HH:mm) / DateRange ([start, end])
field-file / -image / -avatarFile / Image (options.gallery, options.maxImages) / Avatar (AvatarSelect; reads + writes the three field.avatarMapping columns through record / onCompanionChange)
field-queryBuilderDocyFieldQueryBuilder (sheet with QueryBuilderDocyrus)
field-schemaRepeaterDocyFieldSchemaRepeater (options.schema, maxItems, …)
field-taskList / -locationSelect / -approvalStatus / -uploadTaskList / LocationSelect / ApprovalStatus / Upload
field-htmlEditor / -docEditor / -emailEditor / -jsonSchema / -adaptiveCard / -dsqlDocyFieldReadOnlyValue + "edit on web" hint
computed (field-formula, -identity, -autonumber, …)DocyFieldReadOnlyValue

Base Props (DocyFieldBaseProps)

PropTypeDefaultDescription
namestring—Field identifier (required)
labelstring—Label text
placeholderstring—Placeholder
helpTextstring—Helper text below the field
requiredbooleanfalseAsterisk + required validation (always enforced)
disabledbooleanfalseDisable interaction
readOnlybooleanfalsePrevent editing
hiddenbooleanfalseRender nothing
size'sm' | 'md' | 'lg''md'Size
variant'default' | 'filled' | 'outlined''default'Input chrome
labelAlignment'top' | 'left' | 'right''top'Label placement
showLabelbooleantrueRender the label
validationsDocyFieldValidationRule[]—Object rules (required, min, max, pattern, custom async)
validationTokensstring[] | null—IField token DSL — see Validation tokens
clearablebooleanpicker-dependentClear ("×") affordance when the value is set and the field is optional
autoOpenboolean—Open the picker sheet on mount (used by EditableValue)
onPickerClose() => void—Called when the picker sheet closes
errorstring—External error (shown immediately)
className / labelClassName / errorClassName / helpTextClassNamestring—Class overrides

Value Props (DocyFieldProps<V>)

PropTypeDescription
valueVControlled value
onChange(value: V) => voidChange handler
onBlur() => voidBlur handler
onFocus() => voidFocus handler

Validation tokens

IField.validations is a flat token list — required, minLength:N, maxLength:N, pattern:RE, min:N, max:N — enforced by the same validateValidationTokens module the web form engine uses (synced copy). Empty values only fail required; length bounds apply to strings and arrays; range bounds to numbers; unknown tokens and malformed bounds are ignored. Tokens run after the object validations rules.

import { validateValidationTokens, parseValidationTokens } from '@/components/docyrus-native/form-fields';

validateValidationTokens('ab', ['required', 'minLength:3'], { label: 'Code' });
// → 'Code must be at least 3 characters'

Select-Based Fields

Select Props (DocyFieldSelectProps<V>)

PropTypeDefaultDescription
enumOptionsEnumOption[][]Options ({ id, name, color?, icon?, parent?, description? })
searchablebooleantrueSearch box in the sheet (shown with > 5 options or remote search)
searchPlaceholderstringui.formField.searchPlaceholderSearch placeholder
onSearch / searching(query) => void / boolean—Remote search
onLoadMore / hasMore() => void / boolean—Pagination (end-reached)
itemTemplate(option) => ReactNode—Custom option + selected rendering
displayVariant'dropdown' | 'card''dropdown'Inline card list instead of trigger + sheet
columnCount1 | 2 | 3 | 4 | 52Card columns (max 2 on phones)

Options with both icon and color render as a solid chip (shouldRenderEnumOptionChip) using the WCAG-contrast badge colors (getEnumBadgeColors).

DocyFieldSelect / DocyFieldEnum

DocyFieldEnum also accepts renderOptionsEditor?: () => ReactNode — rendered below the option list in the picker sheet.

Single-select storing the option id. DocyFieldEnum also serves field-systemEnum. Clearing writes ''.

DocyFieldTreeSelect

Single-select over nested options (parent / nestedByProp), indented tree in a searchable sheet.

PropTypeDefaultDescription
nestedByPropstring'parent'Parent-reference property

DocyFieldMultiSelect / DocyFieldTagSelect / DocyFieldUserMultiSelect

Multi-select storing string[] ids. Selected options render as chips; DocyFieldMultiSelect / DocyFieldUserMultiSelect show a clear affordance.

DocyFieldCheckboxGroup

Checkbox list storing string[] ids (web CheckboxGroupFormField). displayVariant="card" renders bordered cards with the option description and icon.

DocyFieldRadioGroup

PropTypeDefaultDescription
Renders the options-driven RadioGroup (web RadioGroupFormField parity). Options map id → value, name → label, plus description / icon / color. Picking the selected option again no longer clears it (web parity). A custom itemTemplate falls back to the select-style card list.
PropTypeDefaultDescription
direction'vertical' | 'horizontal''vertical'Orientation of the default layout (when columnCount is 1)
displayVariant'dropdown' | 'card'—card → bordered option cards; anything else → default radio list
columnCount1 | 2 | 3 | 4 | 51Grid columns — 1 below 400pt window width, max 2 below 768pt

DocyFieldUserSelect

Avatar + name rows (option photo / avatar / image icon and email shown when present).

DocyFieldRelation

PropTypeDefaultDescription
nested / nestedByPropboolean / string— / 'parent'Tree options
itemMapping{ iconField?, colorField?, imageField?, descriptionField? }—Map record columns onto the row visuals
onCreateRecord(name: string) => Promise<EnumOption>—"Create "query"" row in the sheet
renderCreateForm({ onCreated }) => ReactNode—Custom create form inside the sheet
onExpand(option) => void—Expand button next to the selection
renderExpandContent(option) => ReactNode—Expand content in a bottom sheet
expandIconReactNode—Custom expand glyph

Selecting the current record again clears it (web parity).

DocyFieldStatus

PropTypeDefaultDescription
companionValuesStatusCompanionValues{}{ secondary?, description?, followup_date? }
onCompanionChange(key: StatusCompanionKey, value: string | null) => void—Enables the companion form: sub-status (child options), notes, follow-up date; committed on Confirm
inlinebooleanfalseStatus list + companion form inline (no sheet)

Options flagged force_description / force_followup_date require notes / a date before Confirm; is_final_option shows a "Final" tag.

DocyFieldCurrencyCode

Searchable ISO currency picker storing the code.

PropTypeDefaultDescription
currencies{ code, name }[]COMMON_CURRENCIESCurrency list

Text & Code Fields

DocyFieldText

PropTypeDefaultDescription
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Auto-capitalization
autoCorrectbooleantrueAuto-correct
autoCompletestring'off'Autofill hint
keyboardTypestring'default'Keyboard
returnKeyTypestring'done'Return key
maxLengthnumber—Max characters
secureTextEntrybooleanfalseMask input
selectTextOnFocusbooleanfalseSelect on focus
clearButtonMode'never' | 'while-editing' | 'unless-editing' | 'always''while-editing'iOS clear button
onSubmitEditing() => void—Return pressed
leftIcon / rightIconReactNode—Adornments

DocyFieldTextarea

PropTypeDefaultDescription
numberOfLinesnumber4Visible lines
maxLengthnumber—Max characters
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Auto-capitalization
autoCorrectbooleantrueAuto-correct
minHeight / maxHeightnumber80 / —Height bounds

DocyFieldCode

Monospace editor for code / JSON / JSONata / Handlebars (no syntax highlighting).

PropTypeDefaultDescription
language'text' | 'json' | 'jsonata' | 'handlebars' | 'sql' | 'javascript' | 'html''text'json parses on change (invalid JSON → inline error)
singleLinebooleanfalseSingle-line mode
minHeight / maxHeightnumber120 / —Height bounds

DocyFieldMarkdown

Wraps the native SimpleMarkdownEditor (web MarkdownEditorFormField parity): formatting toolbar, Write / Preview tabs, optional stats footer. The value is the markdown string. The toolbar is hidden when the field is disabled / read-only.

PropTypeDefaultDescription
toolbarbooleantrueShow the formatting toolbar
showStatsbooleanfalseWords / characters footer
resizableboolean—Accepted for web parity — ignored on native
autoResizebooleanfalseGrow with the content between minHeight and maxHeight
minHeightnumber | string220Minimum editor height
maxHeightnumber | string | null—Maximum editor height
previewboolean | 'toggle''toggle''toggle' → Write / Preview tabs, true → preview below the input, false → no preview

DocyFieldEmail

PropTypeDefaultDescription
onComposeEmail(email: string) => void—Compose button once the value is a valid address
clientRestApiClient—Without onComposeEmail: the button opens EmailComposeDialog

DocyFieldPhone

PropTypeDefaultDescription
countryCodestring—Prefix shown before the number
onSendMessage(phone: string) => void—Message button (receives country code + number)
clientRestApiClient—Without onSendMessage: the button opens InstantMessageComposeDialog

DocyFieldPassword

PropTypeDefaultDescription
showStrengthbooleanfalseStrength bar
minLengthnumber—Strength threshold
maxLengthnumber—Max characters

DocyFieldUrl

No extra props (url keyboard).

Numeric & Boolean Fields

DocyFieldNumber

Keeps the raw text while typing (partial decimals like 12. survive), accepts , or . as the decimal separator, clamps / rounds on blur.

PropTypeDefaultDescription
min / maxnumber—Clamp on blur
decimalPlacesnumber—Round on blur

DocyFieldPercent

PropTypeDefaultDescription
decimalPlacesnumber—Decimal places

DocyFieldMoney

PropTypeDefaultDescription
currencystring'USD'Currency code
onCurrencyChange(currency: string) => void—Enables the currency sheet
currencyOptions{ code, name }[]COMMON_CURRENCIESCurrencies

DocyFieldDuration

Value in seconds.

PropTypeDefaultDescription
showSecondsbooleanfalseSeconds input
maxHoursnumber23Hour clamp
incrementnumber—Minute step (snaps entered minutes)

DocyFieldRating

PropTypeDefaultDescription
maxRatingnumber5Stars

DocyFieldCheckbox / DocyFieldSwitch / DocyFieldSlider

PropTypeDefaultDescription
checkboxLabel / checkboxPositionstring / 'left' | 'right'— / 'left'Checkbox
switchLabel / switchPositionstring / 'left' | 'right'— / 'right'Switch
onColor / offColor / thumbColorstring—Switch colors
min / max / stepnumber0 / 100 / 1Slider range
showValue / showMinMax / showTooltipbooleantrue / false / trueSlider display
formatValue(value: number) => string—Slider label format
tintColorstring—Slider tint

Date & Time Fields

Date / datetime / date-range triggers use the tenant format when a DateFormatProvider (e.g. DocyrusTenantProvider) is mounted, else the picker preset.

DocyFieldDate / DocyFieldDatetime

PropTypeDefaultDescription
valueDate | nullnullValue (the IField adapter converts YYYY-MM-DD / ISO strings)
mode'date' | 'datetime' | 'time''date'Picker mode (DocyFieldDatetime fixes datetime)
minimumDate / maximumDateDate—Bounds
dateFormat'short' | 'medium' | 'long' | 'full''medium'Fallback format preset
timeFormat'12h' | '24h''12h'Fallback time format
clearablebooleantrueClear button (hidden when required / locked)
calendarIcon / clearIconReactNode—Custom icons
iconSize / iconColornumber / string20 / —Icon styling

DocyFieldTime

Value HH:mm string.

DocyFieldDateRange

PropTypeDefaultDescription
value{ startDate: Date | null; endDate: Date | null }—Range (adapter converts [start, end])
minimumDate / maximumDateDate—Bounds
dateFormat'short' | 'medium' | 'long' | 'full''medium'Fallback format
separatorstring' – 'Separator
clearablebooleantrueClear button
allowSameDatebooleantrueAllow start = end
calendarIcon / clearIcon / iconSize / iconColor——Icons

Files & Media

Values follow the Docyrus StoredFileValue contract: { file_name, source, file_size, file_type, signed_url, file_data? }. Pickers resolve a NativeFile ({ uri, name, type, size? }) that is handed to the upload handler; without one the field stores a local StoredFileValue pointing at the picked URI.

DocyFieldImage

PropTypeDefaultDescription
valueStoredFileValue | StoredFileValue[] | null—Image(s)
onImageUpload(file: NativeFile) => Promise<StoredFileValue | null>—Upload handler
onImageDelete(image: StoredFileValue) => Promise<void> | void—Called on remove
onPickImage() => Promise<NativeFile | null | void>—Custom picker
gallerybooleanfalseMultiple images (horizontal strip)
maxImagesnumber—Gallery limit
stencilShape'rectangle' | 'circle''rectangle'Thumbnail shape
thumbWidth / thumbHeightnumber112 (88 gallery) / 88Thumbnail size

DocyFieldFile

PropTypeDefaultDescription
valueStoredFileValue | null—File
onFileUploadFieldUploadHandler—Upload handler
onPickFile() => Promise<NativeFile | null | void>—Custom picker
acceptstring[]—MIME filters

DocyFieldAvatar

PropTypeDefaultDescription
Renders the native AvatarSelect (icon / emoji / color / image) — web AvatarField parity.
PropTypeDefaultDescription
valueAvatarFieldValue ({ icon, color, image: AvatarImageValue | null })—Avatar
iconField / colorField / imageFieldstring | nullicon / color / imageColumn mapping used for the payload
onPayloadChange(payload: Record<string, unknown>, value: AvatarFieldValue) => void—Mapped buildAvatarPayload columns on every change
uploadImage(asset: AvatarUploadAsset) => Promise<AvatarImageValue>—Uploads the picked / cropped image
onImageUploadFieldUploadHandler—Docyrus storage upload (used when uploadImage is absent); the stored file becomes value.image
editorDisplay'inline' | 'popover''popover'Editor in an ActionSheet from the thumbnail, or in place
imageCrop'system' | 'editor''system'OS crop UI or the native ImageEditor

DocyFieldUpload

Native multi-file field (UploadedFile[]).

PropTypeDefaultDescription
maxFilesnumber10Max files
maxSizeBytesnumber—Size limit
allowedTypesstring[]—MIME filters
onUpload(files: UploadedFile[]) => Promise<void>—Upload callback
uploadLabelstring—Button label

Complex Fields

DocyFieldApprovalStatus

Approval workflow (web parity): last-response summary, optional comments, status-dependent actions (Send for approval → Approve / Reject / Request revision → Resend / Withdraw) and response history. Each action prepends a step.

PropTypeDefaultDescription
valueApprovalValueObject | string | null—Workflow value (bare status strings accepted)
canRespondbooleantrueAllow Approve / Reject / Request revision
currentUserApprovalUserSnapshot | nullnullStamped on every step
commentPlaceholderstring—Comment placeholder

DocyFieldQueryBuilder

Summary trigger → full-height sheet with QueryBuilderDocyrus; commits on Apply. Value: react-querybuilder RuleGroupType (JSON strings accepted).

PropTypeDefaultDescription
fieldsDocyrusQBField[]from enumOptionsQuery builder fields
enumOptionsEnumOption[]—One text field per option when fields is omitted

DocyFieldSchemaRepeater

Repeatable group of sub-fields rendered through DocyFieldDynamic; key / value mode without schema.

PropTypeDefaultDescription
valueSchemaRepeaterRowValue[] | null—Rows ({ id, ... })
schemaIField[]—Sub-fields
schemaEnumOptionsRecord<string, EnumOption[]>—Options per sub-field slug
minItems / maxItemsnumber0 / —Bounds
collapsible / defaultCollapsedbooleantrue / falseCollapsing
cloneablebooleanfalseDuplicate action
sortablebooleantrueMove up / down
showHeaderbooleantrueCard header per row
itemLabel(item, index) => string#nRow label
addLabelstringui.schemaRepeater.addAdd button label

DocyFieldReadOnlyValue

Read-only fallback (DocyValueDynamic inside the field chrome).

PropTypeDefaultDescription
fieldIField—Field definition
recordRecord<string, unknown>—Companion values
enumOptionsEnumOption[]—Options
hintstring | null"Editing is available on the web app."Hint below the value; null hides

DocyFieldContactChannels

Stores a ContactChannel[] on the bound field and edits it inline with the backend-agnostic ContactChannelsManager (web ContactChannelsFormField). For live API-backed management use ContactChannelsPanel.

PropTypeDefaultDescription
valueContactChannel[]—Channels
brandsContactBrand[]—Brands for labelling / scoping consent
enableConsentbooleantruePer-channel consent editor
enableValidationbooleantrueValidation status chips
groupByKindbooleantrueGroup channels under kind headers

DocyFieldColor / DocyFieldIcon / DocyFieldTaskList / DocyFieldLocationSelect / DocyFieldHidden

ComponentExtra props
DocyFieldColor— (palette sheet)
DocyFieldIcon— (featured icons + exact key)
DocyFieldTaskListvalue TaskItem[] ({ id, title, completed })
DocyFieldLocationSelectallowCurrentLocation (true), showCoordinates (true), predefinedLocations, requestLocationPermission, googleMapsApiKey
DocyFieldHiddenname, value, onChange

Utilities

ExportDescription
getFieldPlaceholder(field, fallback?)placeholder → options.placeholder → fallback
shouldRenderEnumOptionChip(option)icon + color → solid chip
getEnumBadgeColors(color)Solid background + WCAG readable text ({ style })
getEnumColorValue(color)Any color format → rgb(...)
getEnumBadgeColorsNative(color, isDark, theme) / getEnumDotColorNativeTheme-aware variants
toLocalDateString(date)Timezone-safe YYYY-MM-DD
parseDuration(text)HH:MM:SS, HH:MM (two parts = hours:minutes) or seconds
formatDateRange(start, end, formatDate?)Range text (tenant formatter optional)
validateValidationTokens / parseValidationTokens / readToken / DEFAULT_VALIDATION_MESSAGESToken DSL
canClearValue / ClearFieldButtonShared clear affordance
EnumOptionDisplayShared option display (chip / inline)
extractEnumOptions / toIField / getFieldValue / normalizeOptionValue / resolveOptionNameIField helpers
normalizeApprovalValue / toApprovalStatusCode / APPROVAL_STATUSApproval helpers
normalizeStoredFiles / toLocalStoredFile / getStoredFileNameFile value helpers
FORM_FIELD_MAPField type → controlled component
SelectModalShared option sheet

Components

ComponentDescription
DocyFieldBaseLabel / error / help-text wrapper
DocyFieldDynamicIField adapter + legacy dispatcher
DocyFieldText, DocyFieldTextarea, DocyFieldCode, DocyFieldMarkdown, DocyFieldEmail, DocyFieldUrl, DocyFieldPasswordText
DocyFieldNumber, DocyFieldPercent, DocyFieldMoney, DocyFieldDuration, DocyFieldRating, DocyFieldSliderNumeric
DocyFieldCheckbox, DocyFieldSwitch, DocyFieldCheckboxGroupBoolean
DocyFieldSelect, DocyFieldEnum, DocyFieldTreeSelect, DocyFieldMultiSelect, DocyFieldTagSelect, DocyFieldRadioGroup, DocyFieldStatus, DocyFieldUserSelect, DocyFieldUserMultiSelect, DocyFieldRelation, DocyFieldCurrencyCodeSelection
DocyFieldDate, DocyFieldDatetime, DocyFieldTime, DocyFieldDateRangeDate / time
DocyFieldFile, DocyFieldImage, DocyFieldAvatar, DocyFieldUploadFiles
DocyFieldPhone, DocyFieldContactChannels, DocyFieldColor, DocyFieldIcon, DocyFieldTaskList, DocyFieldLocationSelect, DocyFieldApprovalStatus, DocyFieldQueryBuilder, DocyFieldSchemaRepeater, DocyFieldReadOnlyValue, DocyFieldHiddenOther

Type Exports

TypeDescription
IField, IFieldType, EnumOptionDocyrus field contract (web parity)
DocyrusFormFieldPropsIField adapter props
StoredFileValue, NativeFile, FieldUploadHandlerUpload contract
CustomValidationRule, ComputedBooleanFormula, FieldAction, FieldActionBlock, FieldActionBlockItem, FieldActionStep, FieldActionCondition, FieldActionPropertyOverrides, FormAction, FormActionTriggerType, FormCustomValidationRuleForm-engine types (web parity)
DocyFieldBaseProps, DocyFieldProps<V>, DocyFieldSelectProps<V>, DocyFieldMultiSelectProps, DocyFieldRenderProps<V>, DocyFieldValidationRule, DocyFieldSize, DocyFieldVariant, DocyFieldLabelAlignmentControlled field props
DocyFieldDynamicProps, DocyFieldDynamicLegacyPropsDispatcher props
StatusCompanionKey, StatusCompanionValuesStatus companions
ApprovalStatusValue, ApprovalValueObject, ApprovalStepValue, ApprovalUserSnapshot, ApprovalWorkflowStatusApproval
DocyFieldContactChannelsPropsContact-channels field props
ImageFieldValue, FileFieldValue, AvatarFieldValue, SchemaRepeaterRowValue, DocyFieldDateRangeValue, TaskItem, LocationInfo, UploadedFileField values
ValidationTokenName, ValidationConstraints, ValidationMessages, ValidateTokensOptionsToken DSL
DocyFieldCodeLanguage, EnumColorResult, DocyrusFieldLike, SelectModalPropsMisc

Breaking changes (web-parity release)

  • Enum / select values are option ids (already fixed in the hotfix release).
  • DocyFieldFile / DocyFieldImage values are StoredFileValue (file_name, file_size, file_type, signed_url) — the legacy { name, mime_type, size, uri } shape is still read but no longer written. onPickImage / onPickFile / onPickAvatar now resolve a NativeFile.
  • DocyFieldApprovalStatus writes the web ApprovalValueObject with uppercase statuses (WAITING_FOR_APPROVAL, …); lowercase strings are read.
  • DocyFieldCurrencyCode is a picker (was a 3-letter text input).
  • parseDuration('1:30') returns 5400 (HH:MM), not 90.
  • getEnumBadgeColorsNative returns solid colors with WCAG text instead of pastel tints.
  • DocyFieldBase enforces required even without an explicit rule.
  • DocyFieldAvatar renders AvatarSelect; its value is the lib AvatarFieldValue (image is an AvatarImageValue object, not a URL string) and onPickAvatar was removed (use uploadImage / onImageUpload). Through DocyFieldDynamic it edits the three avatarMapping columns instead of its own slug.
  • DocyFieldMarkdown wraps SimpleMarkdownEditor; the textarea props (numberOfLines, maxLength, …) and defaultPreview were removed (use preview).
  • DocyFieldRadioGroup renders RadioGroup; re-selecting the active option no longer clears the value.
  • Copy moved from embedded en / tr maps to useUiTranslation() keys (ui.formField.*, ui.formFields.*, ui.common.*).

On this page