Component

@Serializable(with = ComponentSerializer::class)
data class Component(val id: ComponentId, val component: String, val catalogId: String? = null, val accessibility: AccessibilityAttributes? = null, val metadata: Metadata? = null, val properties: Map<String, JsonElement> = emptyMap())

One component of a surface: the envelope properties every component has, plus the properties its catalog defines.

The catalog-defined half is kept as an unparsed properties bag on purpose. Which properties a component may carry, and what each of them means, is decided by the catalog the surface names — so a protocol model that closed this set could only ever be right for one catalog. Resolving properties against the catalog, and rejecting a component that carries one the catalog does not define, is the validator's job.

Constructors

Link copied to clipboard
constructor(id: ComponentId, component: String, catalogId: String? = null, accessibility: AccessibilityAttributes? = null, metadata: Metadata? = null, properties: Map<String, JsonElement> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val properties: Map<String, JsonElement>