Skip to main content

CnIntegrationCard

Generic surface-aware widget for the pluggable integration registry. Used as the widget component for the 18 leaf integrations that don't yet need a bespoke widget — every leaf registration points its widget at this component and passes the integration's id via the registration descriptor.

Branches on the surface prop per AD-19:

surfaceRenders
detail-pageFull list of linked things (title + subtitle).
user-dashboard / app-dashboardCompact list (max 5 items).
single-entityOne row chip, resolved via the value prop when a schema property declares referenceType: '<id>' (AD-18).

Same /api/objects/{register}/{schema}/{objectId}/integrations/{id} endpoint as CnIntegrationTab; a 503 from the endpoint renders a quiet "currently unavailable" state.

Wraps: CnDetailCard

Usage

You don't normally mount CnIntegrationCard directly — CnDashboardPage / CnDetailPage / CnFormDialog resolve it from the registry. To register a leaf using the generic widget:

import { CnIntegrationTab, CnIntegrationCard } from '@conduction/nextcloud-vue'

window.OCA.OpenRegister.integrations.register({
id: 'bookmarks',
label: t('myapp', 'Bookmarks'),
icon: 'Bookmark',
requiredApp: 'bookmarks',
group: 'docs',
tab: CnIntegrationTab,
widget: CnIntegrationCard,
})

Props

PropTypeDefaultNotes
integrationIdString— (required)Stable provider id (matches PHP-side).
registerString— (required)OpenRegister register id (slug or uuid).
schemaString— (required)OpenRegister schema id (slug or uuid).
objectIdString— (required)Parent object uuid.
surfaceString'detail-page'One of 'user-dashboard', 'app-dashboard', 'detail-page', 'single-entity'.
valueString''Single-entity reference (id or canonical).
titleString''Override the card title (defaults to integration id).
iconObjectLinkVariantOptional MDI component for the card icon.
apiBaseString'/apps/openregister/api'Base API URL.
collapsibleBooleantrueWhether the card body is collapsible.
emptyLabelStringtranslated 'Nothing linked yet'Empty-state label.
unavailableLabelStringtranslated 'This integration is currently unavailable.'503 state copy.

See also