Skip to main content

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-dataObjectnullThe object containing metadata (flat or with @self block). Optional — null renders the empty state (e.g. before the object loads).
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
groupedBooleantrueSort the fields into categories, each under its own heading. false renders one flat grid.
other-labelString'Other'Heading for extra-items, which carry no category of their own
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 recognises these fields from the object or its @self block, and sorts them into five categories. A category with nothing in it is dropped rather than shown as an empty heading.

CategoryFields
Identityid, uuid, uri, version, textRepresentation
Locationregister, schema, schemaVersion, folder
Ownershipowner, organisation, organization
Lifecyclestatus, created, updated, locked
Archivingread from @self._retention, see below

folder renders as a link into Files when it holds a numeric node id. A folder stored as a path is shown as plain text, because a deep-link built from a path would go nowhere.

The archiving category​

These come from @self._retention, the abstract archival answer OpenRegister resolves for every object. They use MDTO concepts under English names.

FieldShows
appraisalWhat happens to the record: keep permanently, destroy, or not yet determined
retentionPeriodHow long it is kept, read from an ISO-8601 duration
disposalDateThe date the appraisal takes effect
recordStateWhere the record sits in the Archiefwet lifecycle
disposalCategoryThe selection list category the decision came from
basisOn whose authority the period rests
sourceThe named selection list or schema behind it
sourceVersionWhich revision of that selection list was applied
sourceConsultedAtWhen the selection list was consulted
legalHoldAn active hold, with its reason

The widget shows nothing archival for an object that carries no obligation.

When an object does carry a decision, the four core rows (appraisal, retentionPeriod, disposalDate, recordState) always show, with a dash when a fact is missing. A missing disposal date is itself an answer a records officer needs, and a row that is simply absent reads as a panel that never looked. The provenance rows appear only when they carry a value, unless a host names them in include, in which case they show blank too. Blank rows carry the cn-detail-grid__value--empty class.

Examples​

Selective display​

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

One flat list instead of categories​

<CnObjectMetadataWidget :object-data="entity" :grouped="false" />

With extra items​

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