Package-level declarations

Types

Link copied to clipboard
data class ActionContext<T>(val sourceValue: T?, val sourceControlContext: ControlContext, val formState: FormState, val formSchema: FormSchema, val errorManager: ErrorManager, val trigger: FormActionTrigger, val coroutineScope: CoroutineScope, val payload: Any? = null)

Context given to a ControlAction, with access to the form state and tools.

Link copied to clipboard
data class BigDecimalValidation(val min: BigDecimal? = null, val max: BigDecimal? = null, val step: BigDecimal? = null, val decimalPlaces: Int? = null) : ValidationOptions

Validation options of high-precision numbers (BigDecimal).

Link copied to clipboard

How values are compared in dependencies.

Link copied to clipboard
abstract class Control<T : Any>(val label: String?, val required: Boolean?, val dependencies: Map<String, ControlDependency<*>>?, val validationOptions: ValidationOptions? = null, val actions: List<ControlAction<T>>? = null, val hasStandardLayout: Boolean = true)

Abstract base class of all form controls.

Link copied to clipboard
class ControlAction<T>(val executeOnInit: Boolean = false, val action: suspend ActionContext<T>.() -> Unit)

Defines an action to run after a control's value changes.

Link copied to clipboard
data class ControlContext(val localName: String, val statePath: String = "", val controlPath: String = "", val parent: ControlContext? = null)

Rendering and state context of a control in the form hierarchy.

Link copied to clipboard
data class ControlDependency<T>(val controlPath: String, val value: T, val dependencyType: DependencyType, val comparisonType: ComparisonType)

Defines a dependency between controls.

Link copied to clipboard
data class ControlResultData(val currentValue: Any?, val initialValue: Any?)

Result of processing a single form control.

Link copied to clipboard
data class ControlState<T>(val value: MutableState<T?> = mutableStateOf(null), val initValue: MutableState<T?> = mutableStateOf(null), val displayText: MutableState<String?> = mutableStateOf(null), val labelOverride: MutableState<String?> = mutableStateOf(null))

Reactive state of a single form control.

Link copied to clipboard
abstract class ControlValidator<T : Any>

Abstract base class of all form control validators.

Link copied to clipboard
data class DateTimeValidation<T>(val min: T? = null, val max: T? = null) : ValidationOptions

Generic validation options of all date and time controls.

Link copied to clipboard

Type of a dependency between controls.

Link copied to clipboard
data class DoubleValidation(val min: Double? = null, val max: Double? = null, val step: Double? = null, val decimalPlaces: Int? = null) : ValidationOptions

Validation options of floating-point numbers.

Link copied to clipboard

Alias for the map holding the results of all form controls.

Link copied to clipboard
data class IntegerValidation(val min: Int? = null, val max: Int? = null, val step: Int? = null) : ValidationOptions

Validation options of integers.

Link copied to clipboard
data class IntervalValidation(val min: Duration? = null, val max: Duration? = null) : ValidationOptions

Validation options of time intervals.

Link copied to clipboard
data class RepeatableValidation(val minItems: Int? = null, val maxItems: Int? = null, val uniqueFields: List<String> = emptyList()) : ValidationOptions

Validation options of repeatable controls.

Link copied to clipboard
data class StringListValidation(val minItems: Int? = null, val maxItems: Int? = null, val itemValidation: StringValidation? = null) : ValidationOptions

Validation options of text lists.

Link copied to clipboard
data class StringValidation(val minLength: Int? = null, val maxLength: Int? = null, val pattern: Regex? = null, val patternErrorMessage: String? = null) : ValidationOptions

Validation options of text fields.

Link copied to clipboard
sealed class ValidationOptions

Validation options of form controls. Defines validation rules that apply to the various control types.

Properties

Link copied to clipboard
private val ROW_ID: Regex

Functions

Link copied to clipboard
internal fun describeValue(value: Any?): String

A value for exception messages: 'text' (Type), cut to 100 characters, or null.

Link copied to clipboard

Returns the current value of a control as Any?. A field of a hidden section has null, like every hidden control.

Link copied to clipboard
inline fun <T> FormResultData.getCurrentAs(path: String): T

Returns the current value of a control as type T.

Link copied to clipboard

Returns the initial value of a control as Any?. Hiding does not change the initial value, also in a hidden section.

Link copied to clipboard
inline fun <T> FormResultData.getInitialAs(path: String): T

Returns the initial value of a control as type T.

Link copied to clipboard
internal inline fun <T> resultAs(path: String, value: Any?): T

value read from path as T, or FormResultException when it is not one.

Link copied to clipboard
Link copied to clipboard