Ga naar hoofdinhoud

CnObjectMetadataWidget

Read-only metadata display widget. Automatically extracts and formats system metadata from an OpenRegister object (@self block: id, uuid, uri, register, schema, created, updated, owner, etc.).

Usage

<CnObjectMetadataWidget :object-data="currentObject" />

Props

PropTypeDefaultDescription
titleString'Metadata'Widget title in the card header
iconObject|FunctionnullOptional MDI icon component
object-dataObjectrequiredThe object containing metadata (flat or with @self block)
layoutString'horizontal'Grid layout mode: 'grid' or 'horizontal'
columnsNumber0Number of grid columns (layout='grid' only)
label-widthNumber150Min width for labels in horizontal layout
extra-itemsArray[]Additional { label, value } items to display
includeArray|nullnullWhitelist of metadata field keys to show
excludeArray[]Metadata field keys to hide
collapsibleBooleanfalseWhether the card can be collapsed
collapsedBooleanfalseInitial collapsed state
empty-labelString'No metadata available'Label when no metadata is found

Slots

SlotDescription
#header-actionsButtons in the widget header (right side of the title)

Known metadata fields

The widget recognizes these fields from the object or its @self block:

id, uuid, uri, register, schema, status, owner, organization, created, updated, folder, textRepresentation, locked, version

Examples

Selective display

<CnObjectMetadataWidget
:object-data="entity"
:include="['id', 'uuid', 'created', 'updated', 'owner']" />

With extra items

<CnObjectMetadataWidget
title="System info"
:object-data="entity"
:extra-items="[
{ label: 'Source', value: entity.source },
{ label: 'Catalog', value: entity.catalog },
]" />