Package-level declarations

Types

Link copied to clipboard

UI event emitted for a component interaction, enriched with document context. Provides variants for field-level and cell-level interactions.

Functions

Link copied to clipboard
fun ErrorFormState(error: Error, modifier: Modifier = Modifier)
Link copied to clipboard
fun Form(editor: DocumentEditor, mode: Mode = Mode.fill, maxAllowedSizeMB: Int? = null, onUpload: suspend (ComponentEvent<AbstractFileEditor>) -> List<String>? = null, onCapture: suspend (ComponentEvent<AbstractCompStringEditor>) -> String?? = null, onBlur: (event: ComponentEvent<*>) -> Unit? = null, onFocus: (event: ComponentEvent<*>) -> Unit? = null, license: String? = Secrets.LICENSE, allowDuplicatingPages: Boolean = true, navigation: @Composable (navigator: PageCollection, state: PageCollectionState) -> Unit? = { navigator, state -> if (state.pages.isNotEmpty()) { JoyPageSelector( state = state, allowDuplicatingPages = allowDuplicatingPages && mode != Mode.readonly, onChange = { navigator.navigate(it) }, onDuplicate = { navigator.duplicate(it, it.name) } ) } }, error: @Composable (Error) -> Unit = { ErrorFormState(it) }, onFieldChange: (event: ComponentEvent<*>) -> Unit? = null, showUnsupportedFields: Boolean = false, showUnsupportedColumns: Boolean = true, showRowNumbers: Boolean = true, modifier: Modifier = Modifier, arrangement: Arrangement.Vertical = Arrangement.spacedBy(16.dp), contentPadding: PaddingValues = PaddingValues(0.dp))

High-level composable to render a document using a DocumentEditor. Orchestrates page navigation, component rendering and event emission.

Link copied to clipboard
fun rememberDocumentEditor(document: Document, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Remember a DocumentEditor for a given Document across recompositions. Uses Compose remember with inputs to recreate the editor when they change.

fun rememberDocumentEditor(json: String, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Remember a DocumentEditor for a JSON string input across recompositions. Parses the JSON and delegates to editorOf with the given parameters.