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:
| surface | Renders |
|---|---|
detail-page | Full list of linked things (title + subtitle). |
user-dashboard / app-dashboard | Compact list (max 5 items). |
single-entity | One 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,
})