@conduction/nextcloud-vue 2.74.0 → 2.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js +19 -14
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +2 -2
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +77 -26
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +22 -14
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js +23 -4
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue.js +9 -0
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue.js.map +1 -0
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue2.js +107 -0
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue2.js.map +1 -0
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue3.js +79 -0
- package/dist/esm/components/CnBrandBar/CnBrandBar.vue3.js.map +1 -0
- package/dist/esm/components/CnCardGrid/CnCardGrid.vue2.js +6 -0
- package/dist/esm/components/CnCardGrid/CnCardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnCardGrid/CnCardGrid.vue3.js +3 -2
- package/dist/esm/components/CnCardGrid/CnCardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnCredentials/CnCredentials.vue2.js +11 -10
- package/dist/esm/components/CnCredentials/CnCredentials.vue2.js.map +1 -1
- package/dist/esm/components/CnCredentials/CnCredentials.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +8 -5
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnEnvironmentBanner/CnEnvironmentBanner.vue2.js +4 -1
- package/dist/esm/components/CnEnvironmentBanner/CnEnvironmentBanner.vue2.js.map +1 -1
- package/dist/esm/components/CnEnvironmentBanner/CnEnvironmentBanner.vue3.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +7 -0
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +14 -7
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnFormPage/CnFormPage.vue2.js +32 -0
- package/dist/esm/components/CnFormPage/CnFormPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFormPage/CnFormPage.vue3.js +6 -3
- package/dist/esm/components/CnFormPage/CnFormPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +144 -6
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +14 -13
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/selfModeActions.js +90 -14
- package/dist/esm/components/CnIndexPage/selfModeActions.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js +15 -3
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
- package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js +26 -0
- package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js +26 -9
- package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +19 -3
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue2.js +18 -2
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue2.js.map +1 -1
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue3.js +2 -2
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue3.js.map +1 -1
- package/dist/esm/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue2.js +153 -38
- package/dist/esm/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue3.js +74 -56
- package/dist/esm/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js +16 -0
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue2.js.map +1 -1
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue3.js +2 -2
- package/dist/esm/components/CnStatsBlock/CnStatsBlock.vue3.js.map +1 -1
- package/dist/esm/composables/useObjectLock.js +41 -10
- package/dist/esm/composables/useObjectLock.js.map +1 -1
- package/dist/esm/directives/cnSelectAria.js +55 -0
- package/dist/esm/directives/cnSelectAria.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +7 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +8 -2
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +154 -2
- package/dist/esm/store/useObjectStore.js +37 -9
- package/dist/esm/store/useObjectStore.js.map +1 -1
- package/dist/esm/utils/cnFetch.js +17 -2
- package/dist/esm/utils/cnFetch.js.map +1 -1
- package/dist/esm/utils/objectSignals.js +44 -0
- package/dist/esm/utils/objectSignals.js.map +1 -0
- package/dist/esm/utils/resolveBrand.js +38 -0
- package/dist/esm/utils/resolveBrand.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +9640 -8649
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +154 -2
- package/l10n/en.json +7 -1
- package/l10n/nl.json +8 -2
- package/package.json +1 -1
- package/src/components/CnAppNav/CnAppNav.vue +21 -16
- package/src/components/CnAppRoot/CnAppRoot.vue +53 -0
- package/src/components/CnBannerWidget/CnBannerWidget.vue +23 -4
- package/src/components/CnBrandBar/CnBrandBar.vue +230 -0
- package/src/components/CnCardGrid/CnCardGrid.md +1 -0
- package/src/components/CnCardGrid/CnCardGrid.vue +7 -0
- package/src/components/CnCredentials/CnCredentials.vue +17 -16
- package/src/components/CnDetailPage/CnDetailPage.vue +8 -5
- package/src/components/CnEnvironmentBanner/CnEnvironmentBanner.vue +4 -1
- package/src/components/CnFormDialog/CnFormDialog.vue +10 -0
- package/src/components/CnFormPage/CnFormPage.vue +33 -0
- package/src/components/CnIndexPage/CnIndexPage.md +15 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +157 -18
- package/src/components/CnIndexPage/selfModeActions.js +89 -13
- package/src/components/CnIndexPage/useSelfFetchList.js +15 -3
- package/src/components/CnObjectCard/CnObjectCard.md +1 -0
- package/src/components/CnObjectCard/CnObjectCard.vue +89 -1
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +19 -3
- package/src/components/CnQuickFilterBar/CnQuickFilterBar.vue +20 -4
- package/src/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue +181 -38
- package/src/components/CnStatsBlock/CnStatsBlock.vue +18 -2
- package/src/composables/__tests__/useObjectLock.endpoints.spec.js +83 -0
- package/src/composables/useObjectLock.js +41 -10
- package/src/css/form-field.css +1 -1
- package/src/css/look-board-index.css +35 -1
- package/src/directives/cnSelectAria.js +54 -0
- package/src/index.js +1 -0
- package/src/schemas/app-manifest-v2.schema.json +6 -1
- package/src/store/useObjectStore.js +37 -9
- package/src/utils/cnFetch.js +16 -1
- package/src/utils/index.js +1 -0
- package/src/utils/objectSignals.js +41 -0
- package/src/utils/resolveBrand.js +37 -0
- package/src/utils/validateManifestV2.compiled.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnRelatedObjectsWidget.vue2.js","sources":["../../../../src/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue"],"sourcesContent":["<!--\n CnRelatedObjectsWidget — Everything linked to an object, in one widget.\n\n Two rendering modes share the CnWidgetWrapper chrome:\n\n • Tabbed self-fetch (default, `layout=\"tabs\"`) — when an object's\n register/schema/id can be resolved (from props or `objectData['@self']`),\n the widget calls OpenRegister directly:\n /relations (notes, tasks, mails, events, contacts, deck), /uses + /used\n (merged into Objects), /files — and renders one TAB per non-empty group\n with a count badge, showing the items inline. Each leaf tab carries an\n \"open in sidebar\" affordance that emits `open-integration` without\n replacing the inline content. A host's `extraSections` join the strip as\n further tabs: content the widget cannot resolve itself is still content\n about this object, and dropping it on the mode the widget picks for itself\n is a loss the host has no way to see.\n\n • Legacy list (`layout=\"list\"`, or when register/schema can't be resolved) —\n the original flat sections driven by the object store's\n fetchUses/fetchUsed/fetchContracts/fetchFiles actions plus the static\n leaf-integration \"Linked apps\" list. This path is deprecated; it warns once.\n\n Sits on the CnWidgetWrapper chrome, so it carries the shared overflow\n Actions menu (Refresh / Documentation / Request a feature). Refresh\n refetches every section.\n-->\n<template>\n\t<CnWidgetWrapper\n\t\t:title=\"title\"\n\t\t:showTitle=\"!bare\"\n\t\t:borderless=\"bare\"\n\t\t:widgetId=\"widgetId || objectType\"\n\t\t:documentationUrl=\"documentationUrl\"\n\t\t:refreshing=\"loading\"\n\t\tflush>\n\t\t<!-- Total beside the card title. Carries the count that the tab strip\n\t\t would otherwise show — notably when `hideSingleTabTitle` hid it. -->\n\t\t<template v-if=\"useTabs && showTotalCount && totalCount > 0\" #title-meta>\n\t\t\t<span class=\"cn-related-objects-widget__count\">{{ totalCount }}</span>\n\t\t</template>\n\n\t\t<div class=\"cn-related-objects-widget\">\n\t\t\t<!-- Tabbed self-fetch mode -->\n\t\t\t<template v-if=\"useTabs\">\n\t\t\t\t<div v-if=\"tabStripVisible\" class=\"cn-related-objects-widget__tabs\" role=\"tablist\">\n\t\t\t\t\t<button v-for=\"group in visibleGroups\"\n\t\t\t\t\t\t:key=\"`tab-${group.key}`\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t:aria-selected=\"String(group.key === activeKey)\"\n\t\t\t\t\t\tclass=\"cn-related-objects-widget__tab\"\n\t\t\t\t\t\t:class=\"[{ 'cn-related-objects-widget__tab--active': group.key === activeKey }]\"\n\t\t\t\t\t\t@click=\"activeKey = group.key\">\n\t\t\t\t\t\t<CnIcon :name=\"group.icon\" :size=\"18\" class=\"cn-related-objects-widget__tab-icon\" />\n\t\t\t\t\t\t<span class=\"cn-related-objects-widget__tab-label\">{{ group.label }}</span>\n\t\t\t\t\t\t<span class=\"cn-related-objects-widget__count\">{{ group.total }}</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t<section v-if=\"activeGroup\" class=\"cn-related-objects-widget__panel\" role=\"tabpanel\">\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"(item, i) in activeGroup.items\"\n\t\t\t\t\t\t\t:key=\"`item-${activeGroup.key}-${item.id || i}`\">\n\t\t\t\t\t\t\t<!-- A row with an owning-app page is a real link; the rest\n\t\t\t\t\t\t\t stay buttons that emit or expand. -->\n\t\t\t\t\t\t\t<a v-if=\"activeGroupHrefs[i]\"\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\t\t:href=\"activeGroupHrefs[i]\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"activeGroup.icon\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<div v-else\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\t\t:class=\"{ 'cn-related-objects-widget__row--expanded': isExpanded(activeGroup.key, item) }\"\n\t\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t@click=\"onSelectGroupItem(activeGroup, item)\"\n\t\t\t\t\t\t\t\t@keydown.enter=\"onSelectGroupItem(activeGroup, item)\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"activeGroup.icon\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t\t<p v-if=\"item.detail && isExpanded(activeGroup.key, item)\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__detail\">\n\t\t\t\t\t\t\t\t\t{{ item.detail }}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<div v-if=\"loading && !visibleGroups.length\" class=\"cn-related-objects-widget__empty\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<CnEmptyContent v-else-if=\"hasLoaded && !visibleGroups.length\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__empty-state\"\n\t\t\t\t\t:name=\"resolvedEmptyLabel\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CnIcon :name=\"emptyIconName\" :size=\"48\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnEmptyContent>\n\t\t\t</template>\n\n\t\t\t<!-- Legacy list mode (deprecated) -->\n\t\t\t<template v-else>\n\t\t\t\t<!-- Objects -->\n\t\t\t\t<section v-if=\"showObjects && objectItems.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ objectsLabel }} <span class=\"cn-related-objects-widget__count\">{{ objectItems.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"item in objectItems\"\n\t\t\t\t\t\t\t:key=\"`obj-${item.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectObject(item.raw)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectObject(item.raw)\">\n\t\t\t\t\t\t\t<FileTreeOutline class=\"cn-related-objects-widget__icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Files -->\n\t\t\t\t<section v-if=\"showFiles && fileItems.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ filesLabel }} <span class=\"cn-related-objects-widget__count\">{{ fileItems.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"item in fileItems\"\n\t\t\t\t\t\t\t:key=\"`file-${item.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectFile(item.raw)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectFile(item.raw)\">\n\t\t\t\t\t\t\t<Paperclip class=\"cn-related-objects-widget__icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Host-supplied extra sections (e.g. mails resolved by a leaf) -->\n\t\t\t\t<section v-for=\"section in extraSections\"\n\t\t\t\t\t:key=\"`extra-${section.key}`\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 v-if=\"(section.items || []).length\" class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ section.label }} <span class=\"cn-related-objects-widget__count\">{{ section.items.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul v-if=\"(section.items || []).length\" class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"(item, i) in section.items\"\n\t\t\t\t\t\t\t:key=\"`extra-${section.key}-${i}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectExtra(section.key, item)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectExtra(section.key, item)\">\n\t\t\t\t\t\t\t<CnIcon v-if=\"section.icon\"\n\t\t\t\t\t\t\t\t:name=\"section.icon\"\n\t\t\t\t\t\t\t\t:size=\"20\"\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label || item.title || item.name }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Linked apps — leaf integrations carrying related content -->\n\t\t\t\t<section v-if=\"showIntegrations && linkedApps.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ linkedAppsLabel }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list cn-related-objects-widget__list--apps\">\n\t\t\t\t\t\t<li v-for=\"app in linkedApps\"\n\t\t\t\t\t\t\t:key=\"`app-${app.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row cn-related-objects-widget__row--app\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onOpenIntegration(app.id)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onOpenIntegration(app.id)\">\n\t\t\t\t\t\t\t<CnIcon :name=\"app.icon || 'PuzzleOutline'\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ app.label }}</span>\n\t\t\t\t\t\t\t<ChevronRight class=\"cn-related-objects-widget__chevron\" :size=\"20\" />\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Empty -->\n\t\t\t\t<div v-if=\"loading && isEmpty\" class=\"cn-related-objects-widget__empty\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<CnEmptyContent v-else-if=\"hasLoaded && isEmpty\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__empty-state\"\n\t\t\t\t\t:name=\"resolvedEmptyLabel\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CnIcon :name=\"emptyIconName\" :size=\"48\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnEmptyContent>\n\t\t\t</template>\n\t\t</div>\n\n\t\t<!-- Add footer — lets the user actually create related content\n\t\t (upload files, write notes) instead of only viewing it. Rendered\n\t\t only on the tabbed self-fetch path (uploads need register/schema/id). -->\n\t\t<template v-if=\"addFooterVisible\" #footer>\n\t\t\t<div class=\"cn-related-objects-widget__footer\">\n\t\t\t\t<NcButton v-if=\"soleAddable && soleAddable.key === 'files'\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t:disabled=\"uploading\"\n\t\t\t\t\t@click=\"openFilePicker\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ uploading ? t('nextcloud-vue', 'Uploading…') : addLabelFor(soleAddable) }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcActions v-else\n\t\t\t\t\t:menuName=\"t('nextcloud-vue', 'Add')\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t:forceMenu=\"true\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<NcActionButton v-if=\"groupAllowed('files')\" :closeAfterClick=\"true\" @click=\"openFilePicker\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Paperclip :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Upload file') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<!--\n\t\t\t\t\t\t`model-value` / `@update:model-value`, not `value` /\n\t\t\t\t\t\t`@update:value`: @nextcloud/vue 9's NcActionInput declares\n\t\t\t\t\t\tonly `modelValue` and emits only `submit` /\n\t\t\t\t\t\t`update:modelValue`. The old pair fell through as an inert\n\t\t\t\t\t\tDOM attribute and a listener that never fired, so the note\n\t\t\t\t\t\tdraft stayed empty and Add note submitted nothing.\n\t\t\t\t\t-->\n\t\t\t\t\t<NcActionInput v-if=\"groupAllowed('notes')\"\n\t\t\t\t\t\t:modelValue=\"noteDraft\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Add note')\"\n\t\t\t\t\t\t@update:modelValue=\"noteDraft = $event\"\n\t\t\t\t\t\t@submit=\"onAddNote\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<CnIcon name=\"CommentTextOutline\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Add note') }}\n\t\t\t\t\t</NcActionInput>\n\t\t\t\t\t<NcActionButton v-for=\"group in emitAddableGroups\"\n\t\t\t\t\t\t:key=\"`add-${group.key}`\"\n\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t@click=\"onAddGroup(group.key)\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<CnIcon :name=\"group.icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ addLabelFor(group) }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\t\t\t\t<span v-if=\"addError\" class=\"cn-related-objects-widget__add-error\">{{ addError }}</span>\n\t\t\t\t<!-- `:ref`, not `ref` — every other binding here is static and\n\t\t\t\t the handler is cached, so a static ref lets the compiler\n\t\t\t\t hoist this vnode to module scope, leaving its ref with no\n\t\t\t\t owner instance. Vue's guard for that is dev-only, so in a\n\t\t\t\t production build it throws\n\t\t\t\t `Cannot read properties of null (reading 'refs')` and\n\t\t\t\t aborts the render. See CnFilesTab for the full account. -->\n\t\t\t\t<input :ref=\"fileInputRef\"\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tmultiple\n\t\t\t\t\tclass=\"cn-related-objects-widget__file-input\"\n\t\t\t\t\t@change=\"onFilesPicked\">\n\t\t\t</div>\n\t\t</template>\n\t</CnWidgetWrapper>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcActionButton, NcActionInput, NcActions, NcButton } from '@nextcloud/vue'\nimport ChevronRight from 'vue-material-design-icons/ChevronRight.vue'\nimport FileTreeOutline from 'vue-material-design-icons/FileTreeOutline.vue'\nimport Paperclip from 'vue-material-design-icons/Paperclip.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\nimport { registerIntegrationIcons } from '../../integrations/icons.js'\nimport { useObjectStore } from '../../store/index.js'\nimport { buildHeaders } from '../../utils/headers.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnWidgetWrapper } from '../CnWidgetWrapper/index.js'\n\n// ⚠️ THIS WIDGET RENDERS INTEGRATION ICONS AND DID NOT REGISTER THEM.\n//\n// `LEAF_GROUPS` below names an MDI icon per section and `CnIcon` resolves those\n// against a registry the HOST app populates — and a host registers the handful\n// of icons it uses, not the integration set. `registerIntegrationIcons()` fixes\n// that, which is why CnIntegrationWidget and CnIntegrationWidgetEmpty both call\n// it at module load.\n//\n// This widget called nothing. It happened to look right on any page that ALSO\n// rendered one of those two components, because the registry is global and\n// whichever module loaded first filled it — so the icons were correct exactly\n// when something unrelated to this widget was on the page, and a help-circle\n// otherwise. Measured on the widget's own import graph: 7 of its 19 sections —\n// contacts, notes, tasks, talk, polls, bookmarks and photos — fell back.\n//\n// A defect that depends on what ELSE is mounted is not intermittent; it is\n// deterministic per page, and looks like a styling quirk on the pages where it\n// shows. Idempotent, so calling it here costs nothing where another component\n// already has.\nregisterIntegrationIcons()\n\n/** Event-bus channel CnWidgetWrapper's Refresh action broadcasts on. */\nconst REFRESH_BUS_CHANNEL = 'cn:widget:refresh'\n\n/** Core sidebar tabs that are not \"related content\" leaves. */\nconst CORE_TABS = ['files', 'notes', 'tags', 'tasks', 'auditTrail', 'shares']\n\n/** One-time guard so the legacy-path deprecation warning logs only once. */\nlet legacyWarned = false\n\n/**\n * Schema titles by numeric schema id, shared by every widget on the page so a\n * schema is asked for once. OpenRegister's `/uses` and `/used` answer\n * `@self.schema` as that id (\"120\"), which is not a word anyone can read.\n *\n * @type {Map<string, Promise<string>>}\n */\nconst schemaTitleCache = new Map()\n\n/**\n * Whether a value is a bare number, the way OpenRegister names a schema by id.\n *\n * @param {string|number|undefined|null} value The value.\n * @return {boolean}\n */\nfunction isNumericId(value) {\n\treturn (typeof value === 'number' && Number.isFinite(value))\n\t\t|| (typeof value === 'string' && /^\\d+$/.test(value.trim()))\n}\n\n/**\n * Leaf groups surfaced by the aggregated `/relations` endpoint, in tab order.\n * `responseKey` is the key in the `/relations` payload; `integrationId` is the\n * sidebar tab the \"open in sidebar\" affordance deep-links to; `key` is this\n * widget's own section id.\n *\n * ⚠️ `icon` AND `integrationId` ARE BOTH ANSWERED BY THE INTEGRATION REGISTRY,\n * SO THIS TABLE IS A SECOND COPY OF DATA THAT ALREADY EXISTS — and it had\n * drifted from it. Talk wore `Forum` here and `ChatOutline` in the registry;\n * `Forum` and `ImageMultiple` are in NO registry at all, so those two sections\n * fell back even on a page where every other icon resolved; and `timetracker`\n * named no integration whatsoever — the registry id is `time-tracker` — so that\n * row's deep link opened nothing and reported nothing.\n *\n * The copy stays (importing the registry here would be a cycle), but\n * `tests/components/relatedObjectIcons.spec.js` now holds every row against it:\n * same integration, same icon, and an `integrationId` that names something real.\n */\nconst LEAF_GROUPS = [\n\t{ key: 'mails', responseKey: 'emails', icon: 'Email', integrationId: 'email', requiredApp: 'mail' },\n\t{ key: 'events', responseKey: 'events', icon: 'Calendar', integrationId: 'calendar', requiredApp: 'calendar' },\n\t{ key: 'contacts', responseKey: 'contacts', icon: 'AccountBox', integrationId: 'contacts', requiredApp: 'contacts' },\n\t{ key: 'notes', responseKey: 'notes', icon: 'CommentTextOutline', integrationId: 'notes', requiredApp: '' },\n\t{ key: 'tasks', responseKey: 'tasks', icon: 'CheckboxMarkedOutline', integrationId: 'tasks', requiredApp: 'tasks' },\n\t{ key: 'deck', responseKey: 'deck', icon: 'ViewColumnOutline', integrationId: 'deck', requiredApp: 'deck' },\n\t// Additional pluggable leaf integrations — surfaced automatically when the\n\t// owning app is installed and the object has links (empty groups are hidden\n\t// by `visibleGroups`). Server side is wired in RelationsController::LEAF_INTEGRATIONS.\n\t{ key: 'talk', responseKey: 'talk', icon: 'ChatOutline', integrationId: 'talk', requiredApp: 'spreed' },\n\t{ key: 'forms', responseKey: 'forms', icon: 'ClipboardText', integrationId: 'forms', requiredApp: 'forms' },\n\t{ key: 'maps', responseKey: 'maps', icon: 'MapMarker', integrationId: 'maps', requiredApp: 'maps' },\n\t{ key: 'polls', responseKey: 'polls', icon: 'Poll', integrationId: 'polls', requiredApp: 'polls' },\n\t{ key: 'bookmarks', responseKey: 'bookmarks', icon: 'Bookmark', integrationId: 'bookmarks', requiredApp: 'bookmarks' },\n\t{ key: 'collectives', responseKey: 'collectives', icon: 'BookOpenPageVariant', integrationId: 'collectives', requiredApp: 'collectives' },\n\t{ key: 'photos', responseKey: 'photos', icon: 'Image', integrationId: 'photos', requiredApp: 'photos' },\n\t{ key: 'cospend', responseKey: 'cospend', icon: 'CurrencyEur', integrationId: 'cospend', requiredApp: 'cospend' },\n\t{ key: 'timetracker', responseKey: 'timetracker', icon: 'Clock', integrationId: 'time-tracker', requiredApp: 'timemanager' },\n\t{ key: 'analytics', responseKey: 'analytics', icon: 'ChartBar', integrationId: 'analytics', requiredApp: 'analytics' },\n\t{ key: 'flow', responseKey: 'flow', icon: 'SitemapOutline', integrationId: 'flow', requiredApp: '' },\n\t{ key: 'openproject', responseKey: 'openproject', icon: 'Briefcase', integrationId: 'openproject', requiredApp: 'integration_openproject' },\n\t{ key: 'xwiki', responseKey: 'xwiki', icon: 'FileDocumentMultiple', integrationId: 'xwiki', requiredApp: '' },\n]\n\n/**\n * CnRelatedObjectsWidget — Everything linked to an object, in one widget.\n *\n * In the default tabbed mode the widget resolves an object's\n * register/schema/id (from props or `objectData['@self']`) and fetches its\n * relations directly from OpenRegister — the aggregated `/relations` groups\n * (mails, meetings, contacts, notes, tasks, deck), `/uses` + `/used` (merged\n * into Objects) and `/files` — rendering one tab per non-empty group with a\n * count badge and the items inline. Each leaf tab offers an \"open in sidebar\"\n * affordance that emits `open-integration`.\n *\n * Passing `layout=\"list\"` (or mounting without a resolvable register/schema)\n * falls back to the deprecated store-action path that renders flat sections\n * plus the static leaf-integration \"Linked apps\" list.\n *\n * ```vue\n * <CnRelatedObjectsWidget\n * :object-data=\"lead\"\n * @select-object=\"openObject\"\n * @open-integration=\"openSidebarTab\" />\n * ```\n */\nexport default {\n\tname: 'CnRelatedObjectsWidget',\n\n\tcomponents: {\n\t\tCnWidgetWrapper,\n\t\tCnIcon,\n\t\tFileTreeOutline,\n\t\tPaperclip,\n\t\tChevronRight,\n\t\tPlus,\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionInput,\n\t\tNcButton,\n\t\tCnEmptyContent,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * The host app's translator (CnAppRoot provides it), so a schema title\n\t\t * reads in the app's language. Without it a title reads as stored.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/** Widget title shown in the header. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Related'),\n\t\t},\n\n\t\t/**\n\t\t * Drop the card chrome: no header, no border. For a surface that already\n\t\t * supplies both, such as a `CnTabsWidget` panel, where a second title\n\t\t * inside the panel reads as a heading nested in its own heading.\n\t\t *\n\t\t * The header is where `CnWidgetWrapper` renders its Actions menu, so a\n\t\t * bare widget has none. That is the point: the surface hoists it.\n\t\t */\n\t\tbare: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The registered object type slug (used for legacy store fetches). */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The object's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The object data — used to derive id/register/schema when not passed explicitly. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * OpenRegister register slug. When omitted, derived from\n\t\t * `objectData['@self'].register`. Required (with `schema`) for the\n\t\t * tabbed self-fetch path.\n\t\t */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * OpenRegister schema slug. When omitted, derived from\n\t\t * `objectData['@self'].schema`. Required (with `register`) for the\n\t\t * tabbed self-fetch path.\n\t\t */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Render mode. `'tabs'` (default) self-fetches from OpenRegister and\n\t\t * renders a tab per non-empty group. `'list'` forces the deprecated\n\t\t * store-action list path.\n\t\t *\n\t\t * @type {'tabs'|'list'}\n\t\t */\n\t\tlayout: {\n\t\t\ttype: String,\n\t\t\tdefault: 'tabs',\n\t\t\tvalidator: (value) => ['tabs', 'list'].includes(value),\n\t\t},\n\n\t\t/** Include `/contracts` relations in the Objects group (opt-in). */\n\t\tshowContracts: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whitelist of relation-group keys to display (tabbed path). When\n\t\t * non-empty, ONLY these groups render — e.g. `['objects', 'files',\n\t\t * 'mails']`. Empty (default) shows every non-empty group. Lets a detail\n\t\t * page carry several Related widgets each scoped to different relations.\n\t\t * Keys: `objects`, `files`, and the leaf groups (mails, events, contacts,\n\t\t * notes, tasks, deck, talk, forms, maps, polls, …).\n\t\t *\n\t\t * @type {string[]}\n\t\t */\n\t\tincludeGroups: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Object store instance (legacy list path only). When omitted, the\n\t\t * widget tries Pinia auto-detection. Relation/file sections only render\n\t\t * when the store exposes the matching `fetch*` actions.\n\t\t */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Show the related-objects (uses/used/contracts) section/tab. */\n\t\tshowObjects: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the files section/tab. */\n\t\tshowFiles: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the leaf-integration entry-point section (legacy list path). */\n\t\tshowIntegrations: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Integration ids to omit from the \"Linked apps\" section (on top of\n\t\t * the always-omitted core tabs files/notes/tags/tasks/audit/shares).\n\t\t *\n\t\t * @type {string[]}\n\t\t */\n\t\texcludeIntegrations: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Extra related sections the widget cannot resolve itself — content a\n\t\t * host knows about that OpenRegister's relation endpoints do not\n\t\t * return. Each: `{ key, label, icon?, items: [] }`.\n\t\t *\n\t\t * Renders on BOTH paths. On the legacy list path each section is a\n\t\t * flat block; on the tabbed path each becomes a tab beside the\n\t\t * self-fetched ones, and a row click emits `select-extra` rather than\n\t\t * being deep-linked, because the host owns these rows and this widget\n\t\t * knows nothing about where they live.\n\t\t *\n\t\t * A section with no items renders nothing at all, so a host can bind\n\t\t * a section unconditionally and let it appear when it fills.\n\t\t *\n\t\t * `includeGroups` does NOT filter these. That whitelist scopes which\n\t\t * of the widget's OWN groups it fetches and shows; a section handed\n\t\t * over explicitly by the host is not one of those, and dropping it\n\t\t * would be silent.\n\t\t *\n\t\t * @type {Array<{ key: string, label: string, icon?: string, items: object[] }>}\n\t\t */\n\t\textraSections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Documentation link for the overflow Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Stable id forwarded to the widget chrome. Falls back to objectType. */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Section/tab heading for related objects. */\n\t\tobjectsLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Objects'),\n\t\t},\n\n\t\t/** Section/tab heading for files. */\n\t\tfilesLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Files'),\n\t\t},\n\n\t\t/** Section heading for the leaf-integration entry points (legacy list path). */\n\t\tlinkedAppsLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Linked apps'),\n\t\t},\n\n\t\t/**\n\t\t * Deprecated no-op label, kept for backward compatibility.\n\t\t *\n\t\t * @deprecated No longer rendered — tabbed mode deep-links each item to its\n\t\t * owning Nextcloud app instead of offering an open-in-sidebar action.\n\t\t */\n\t\topenInSidebarLabel: { // eslint-disable-line vue/no-unused-properties -- deprecated no-op, kept so apps still passing it do not leak it onto the DOM through $attrs.\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Open in sidebar'),\n\t\t},\n\n\t\t/**\n\t\t * Empty-state label shown when nothing is related. When left at its\n\t\t * default, a contextual label is derived instead: a widget scoped to a\n\t\t * single relation group (`includeGroups: ['files']`) shows\n\t\t * \"No files yet\", an unscoped one shows \"No relations yet\".\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Nothing related yet'),\n\t\t},\n\n\t\t/**\n\t\t * Render the \"Add\" footer (upload file / add note / per-group add\n\t\t * events) on the tabbed self-fetch path. Disable for read-only hosts.\n\t\t */\n\t\tshowAddFooter: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Suppress the tab strip when only one group is visible. A lone tab\n\t\t * repeats the widget title verbatim (\"Files\" card carrying a \"Files\"\n\t\t * tab), so hide it and let the card header stand alone.\n\t\t */\n\t\thideSingleTabTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Render a count pill beside the widget title totalling every visible\n\t\t * group. Keeps the count reachable once `hideSingleTabTitle` has taken\n\t\t * the sole tab — and its pill — away.\n\t\t */\n\t\tshowTotalCount: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: [\n\t\t'add',\n\t\t'file-uploaded',\n\t\t'note-added',\n\t\t'open-integration',\n\t\t'select-extra',\n\t\t'select-file',\n\t\t'select-object',\n\t\t'select-related',\n\t],\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/**\n\t\t\t * The file input element, set by the template's function ref (kept off `$refs` so the ref stays dynamic — see the template).\n\t\t\t *\n\t\t\t * @type {HTMLInputElement|null}\n\t\t\t */\n\t\t\tfileInputEl: null,\n\t\t\t/** Schema titles by numeric schema id, for object rows. */\n\t\t\tschemaTitles: {},\n\t\t\t/** Whether any section/tab is currently fetching. */\n\t\t\tloading: false,\n\t\t\t/** True once the first fetch has completed (gates the empty state). */\n\t\t\thasLoaded: false,\n\t\t\t/** Merged related-object rows (legacy list path). */\n\t\t\tobjectItems: [],\n\t\t\t/** File rows (legacy list path). */\n\t\t\tfileItems: [],\n\t\t\t/** Tab groups (tabbed self-fetch path): `{ key, label, icon, integrationId, items, total }`. */\n\t\t\tgroups: [],\n\t\t\t/** Active tab key. */\n\t\t\tactiveKey: '',\n\t\t\t/** Key of the inline-expanded row (`{group}-{id}`) for leaves with no owning-app page (e.g. notes). */\n\t\t\texpandedKey: '',\n\t\t\t/** Whether a footer file upload is in flight. */\n\t\t\tuploading: false,\n\t\t\t/** Last add-footer error message (upload / note create). */\n\t\t\taddError: '',\n\t\t\t/** Bound text of the footer's \"Add note\" input. */\n\t\t\tnoteDraft: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The object-data record, guaranteed to be a plain object. The\n\t\t * `object-data` prop is often `null` while the host's object is still\n\t\t * loading (CnDetailPage binds `:object-data=\"currentObject\"`), so guard\n\t\t * it here — the resolver computeds below must never dereference null.\n\t\t *\n\t\t * @return {object} the object data, or an empty object.\n\t\t */\n\t\tsafeObjectData() {\n\t\t\treturn (this.objectData && typeof this.objectData === 'object') ? this.objectData : {}\n\t\t},\n\n\t\t/** Resolved object id — explicit prop wins, else from object data. */\n\t\tresolvedId() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.objectId || this.safeObjectData.id || self.id || ''\n\t\t},\n\n\t\t/** Resolved register slug — explicit prop wins, else from `@self`. */\n\t\tresolvedRegister() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.register || self.register || ''\n\t\t},\n\n\t\t/** Resolved schema slug — explicit prop wins, else from `@self`. */\n\t\tresolvedSchema() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.schema || self.schema || ''\n\t\t},\n\n\t\t/** True when the tabbed self-fetch path is usable. */\n\t\tuseTabs() {\n\t\t\treturn this.layout === 'tabs'\n\t\t\t\t&& Boolean(this.resolvedRegister && this.resolvedSchema && this.resolvedId)\n\t\t},\n\n\t\t/**\n\t\t * The host's `extraSections`, normalised into the same group shape the\n\t\t * tab strip and the panel render. A section with no items is dropped,\n\t\t * so an unconditionally-bound section costs nothing until it fills.\n\t\t *\n\t\t * Kept as a COMPUTED rather than pushed into `groups` inside\n\t\t * `loadTabs()`: a host typically resolves these rows asynchronously\n\t\t * after mount (dossiq's planned follow-ups are one endpoint call), and\n\t\t * a value copied into `groups` at fetch time would never pick that up.\n\t\t *\n\t\t * @return {Array<object>} Group descriptors, `isExtra: true`.\n\t\t */\n\t\textraGroups() {\n\t\t\treturn (this.extraSections || [])\n\t\t\t\t.filter((section) => section && (section.items || []).length > 0)\n\t\t\t\t.map((section) => {\n\t\t\t\t\tconst items = section.items.map((raw, i) => ({\n\t\t\t\t\t\tid: String(raw?.id ?? i),\n\t\t\t\t\t\tlabel: raw?.label || raw?.title || raw?.name || '',\n\t\t\t\t\t\tmeta: typeof raw?.meta === 'string' ? raw.meta : '',\n\t\t\t\t\t\tdetail: '',\n\t\t\t\t\t\traw,\n\t\t\t\t\t}))\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: section.key,\n\t\t\t\t\t\tlabel: section.label,\n\t\t\t\t\t\ticon: section.icon || 'LinkVariant',\n\t\t\t\t\t\tintegrationId: '',\n\t\t\t\t\t\titems,\n\t\t\t\t\t\ttotal: items.length,\n\t\t\t\t\t\tisExtra: true,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Tab groups that have at least one item (tabbed path), honouring the\n\t\t * `includeGroups` whitelist when set.\n\t\t *\n\t\t * Host-supplied `extraSections` are appended and are deliberately NOT\n\t\t * subject to `includeGroups` — see the prop's docblock.\n\t\t */\n\t\tvisibleGroups() {\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\tconst own = this.groups.filter((group) => (group.total > 0 || group.items.length > 0)\n\t\t\t\t&& (allow.length === 0 || allow.includes(group.key)))\n\t\t\treturn [...own, ...this.extraGroups]\n\t\t},\n\n\t\t/**\n\t\t * Whether the tab strip renders. A single visible group makes the strip\n\t\t * a restatement of the card header, so `hideSingleTabTitle` drops it.\n\t\t *\n\t\t * @return {boolean} true when the tab strip should be shown.\n\t\t */\n\t\ttabStripVisible() {\n\t\t\tif (!this.visibleGroups.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !(this.hideSingleTabTitle && this.visibleGroups.length === 1)\n\t\t},\n\n\t\t/**\n\t\t * Items across every visible group — rendered as a pill beside the\n\t\t * widget title. Falls back to the loaded item count when a group\n\t\t * reports no server-side total.\n\t\t *\n\t\t * @return {number} the summed total.\n\t\t */\n\t\ttotalCount() {\n\t\t\treturn this.visibleGroups.reduce(\n\t\t\t\t(sum, group) => sum + (group.total || group.items.length || 0),\n\t\t\t\t0,\n\t\t\t)\n\t\t},\n\n\t\t/** Placeholder shown in the body while the first fetch is in flight. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/** The currently active group, defaulting to the first visible one. */\n\t\tactiveGroup() {\n\t\t\tif (!this.visibleGroups.length) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.visibleGroups.find((group) => group.key === this.activeKey) || this.visibleGroups[0]\n\t\t},\n\n\t\t/**\n\t\t * The owning-app link of each row in the active group, by index; ''\n\t\t * where the row routes through the host instead (related objects,\n\t\t * host-supplied sections, leaves without a page).\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tactiveGroupHrefs() {\n\t\t\tconst group = this.activeGroup\n\t\t\tif (!group || group.isExtra || group.key === 'objects') {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn group.items.map((item) => this.resolveItemHref(group.key, item.raw || {}))\n\t\t},\n\n\t\t/** Leaf integrations that can carry related content (legacy list path). */\n\t\tlinkedApps() {\n\t\t\tconst omit = new Set([...CORE_TABS, ...this.excludeIntegrations])\n\t\t\treturn (this.integrations || []).filter((entry) => !omit.has(entry.id))\n\t\t},\n\n\t\t/** True when every legacy section is empty. */\n\t\tisEmpty() {\n\t\t\tif (this.objectItems.length || this.fileItems.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (this.extraSections.some((s) => (s.items || []).length)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (this.showIntegrations && this.linkedApps.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\t/** Single configured relation group key, or '' when unscoped/multi. */\n\t\tsingleSourceKey() {\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\treturn allow.length === 1 ? allow[0] : ''\n\t\t},\n\n\t\t/**\n\t\t * Effective empty-state label: an explicit `emptyLabel` wins; otherwise\n\t\t * a single-source widget names its source (\"No files yet\") and an\n\t\t * unscoped/multi-source one shows the generic \"No relations yet\".\n\t\t */\n\t\tresolvedEmptyLabel() {\n\t\t\tconst legacyDefault = t('nextcloud-vue', 'Nothing related yet')\n\t\t\tif (this.emptyLabel && this.emptyLabel !== legacyDefault) {\n\t\t\t\treturn this.emptyLabel\n\t\t\t}\n\t\t\tif (this.singleSourceKey) {\n\t\t\t\treturn t('nextcloud-vue', 'No {source} yet', { source: this.groupLabelFor(this.singleSourceKey).toLowerCase() })\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'No relations yet')\n\t\t},\n\n\t\t/** Empty-state icon: the single source's own icon, else a generic link. */\n\t\temptyIconName() {\n\t\t\tif (this.singleSourceKey) {\n\t\t\t\treturn this.groupIconFor(this.singleSourceKey)\n\t\t\t}\n\t\t\treturn 'LinkVariant'\n\t\t},\n\n\t\t/** Whether the Add footer renders (prop + tabbed path with a real object). */\n\t\taddFooterVisible() {\n\t\t\treturn this.showAddFooter && this.useTabs && this.addableGroups.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Relation groups the footer can add to, honouring `includeGroups`\n\t\t * and the show* switches. Files and notes have built-in flows; other\n\t\t * groups surface an entry that emits `add` for the host to handle.\n\t\t */\n\t\taddableGroups() {\n\t\t\tconst candidates = [\n\t\t\t\t...(this.showObjects ? [{ key: 'objects', label: this.objectsLabel, icon: 'FileTreeOutline' }] : []),\n\t\t\t\t...(this.showFiles ? [{ key: 'files', label: this.filesLabel, icon: 'Paperclip' }] : []),\n\t\t\t\t...LEAF_GROUPS.map((def) => ({ key: def.key, label: this.leafLabel(def.key), icon: def.icon })),\n\t\t\t]\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\tif (allow.length === 0) {\n\t\t\t\t// Unscoped widgets keep the footer focused on the two built-in\n\t\t\t\t// flows instead of listing every conceivable leaf group.\n\t\t\t\treturn candidates.filter((g) => ['files', 'notes'].includes(g.key))\n\t\t\t}\n\t\t\treturn candidates.filter((g) => allow.includes(g.key))\n\t\t},\n\n\t\t/** The only addable group when exactly one is configured, else null. */\n\t\tsoleAddable() {\n\t\t\treturn this.addableGroups.length === 1 ? this.addableGroups[0] : null\n\t\t},\n\n\t\t/** Addable groups without a built-in flow — rendered as emit-`add` entries. */\n\t\temitAddableGroups() {\n\t\t\treturn this.addableGroups.filter((g) => !['files', 'notes'].includes(g.key))\n\t\t},\n\t},\n\n\twatch: {\n\t\tresolvedId() {\n\t\t\tthis.loadAll()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadAll()\n\t\tsubscribe(REFRESH_BUS_CHANNEL, this.onBusRefresh)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe(REFRESH_BUS_CHANNEL, this.onBusRefresh)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Function ref for the file input. A method, so the binding is stable\n\t\t * across renders; being a function ref is what keeps the vnode dynamic.\n\t\t *\n\t\t * @param {HTMLInputElement|null} el The element, or null on unmount.\n\t\t * @return {void}\n\t\t */\n\t\tfileInputRef(el) {\n\t\t\tthis.fileInputEl = el || null\n\t\t},\n\n\t\t/**\n\t\t * Display label for a relation group key.\n\t\t *\n\t\t * @param {string} key - Group key (`objects`, `files`, or a leaf key).\n\t\t * @return {string}\n\t\t */\n\t\tgroupLabelFor(key) {\n\t\t\tif (key === 'objects') {\n\t\t\t\treturn this.objectsLabel\n\t\t\t}\n\t\t\tif (key === 'files') {\n\t\t\t\treturn this.filesLabel\n\t\t\t}\n\t\t\treturn this.leafLabel(key)\n\t\t},\n\n\t\t/**\n\t\t * Icon name for a relation group key.\n\t\t *\n\t\t * @param {string} key - Group key.\n\t\t * @return {string}\n\t\t */\n\t\tgroupIconFor(key) {\n\t\t\tif (key === 'objects') {\n\t\t\t\treturn 'FileTreeOutline'\n\t\t\t}\n\t\t\tif (key === 'files') {\n\t\t\t\treturn 'Paperclip'\n\t\t\t}\n\t\t\tconst def = LEAF_GROUPS.find((g) => g.key === key)\n\t\t\treturn (def && (this.integrationIcon(def.integrationId) || def.icon)) || 'LinkVariant'\n\t\t},\n\n\t\t/**\n\t\t * Whether a group is available to the Add footer.\n\t\t *\n\t\t * @param {string} key - Group key.\n\t\t * @return {boolean}\n\t\t */\n\t\tgroupAllowed(key) {\n\t\t\treturn this.addableGroups.some((g) => g.key === key)\n\t\t},\n\n\t\t/**\n\t\t * \"Add …\" label for a group entry.\n\t\t *\n\t\t * @param {{ key: string, label: string }} group - The addable group.\n\t\t * @return {string}\n\t\t */\n\t\taddLabelFor(group) {\n\t\t\treturn t('nextcloud-vue', 'Add {source}', { source: String(group.label || group.key).toLowerCase() })\n\t\t},\n\n\t\t/** Open the hidden file input for the footer upload flow. */\n\t\topenFilePicker() {\n\t\t\tthis.addError = ''\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.click()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Upload the picked files to the object and refresh the groups.\n\t\t *\n\t\t * @param {Event} event - The file input change event.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onFilesPicked(event) {\n\t\t\tconst files = Array.from((event.target && event.target.files) || [])\n\t\t\tevent.target.value = ''\n\t\t\tif (!files.length || this.uploading) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.uploading = true\n\t\t\tthis.addError = ''\n\t\t\ttry {\n\t\t\t\tconst formData = new FormData()\n\t\t\t\tfiles.forEach((file) => formData.append('files[]', file))\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/filesMultipart', {\n\t\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\t\tid: this.resolvedId,\n\t\t\t\t})\n\t\t\t\t// buildHeaders(null): let the browser set the multipart boundary.\n\t\t\t\tconst response = await fetch(url, { method: 'POST', headers: buildHeaders(null), body: formData })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`${response.status}`)\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * @event file-uploaded Files were uploaded via the Add footer.\n\t\t\t\t * @type {File[]}\n\t\t\t\t */\n\t\t\t\tthis.$emit('file-uploaded', files)\n\t\t\t\tawait this.loadAll()\n\t\t\t} catch {\n\t\t\t\tthis.addError = t('nextcloud-vue', 'Upload failed')\n\t\t\t} finally {\n\t\t\t\tthis.uploading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Create a note on the object from the footer's note input.\n\t\t *\n\t\t * Reads `noteDraft` rather than the submitted form: NcActionInput's\n\t\t * input carries no `name`, so a FormData lookup always comes back null\n\t\t * and the note is silently dropped.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onAddNote() {\n\t\t\tconst message = String(this.noteDraft || '').trim()\n\t\t\tif (!message) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.addError = ''\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/notes', {\n\t\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\t\tid: this.resolvedId,\n\t\t\t\t})\n\t\t\t\tconst response = await fetch(url, {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: buildHeaders(),\n\t\t\t\t\tbody: JSON.stringify({ message }),\n\t\t\t\t})\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`${response.status}`)\n\t\t\t\t}\n\t\t\t\tthis.noteDraft = ''\n\t\t\t\t/**\n\t\t\t\t * @event note-added A note was created via the Add footer.\n\t\t\t\t * @type {string}\n\t\t\t\t */\n\t\t\t\tthis.$emit('note-added', message)\n\t\t\t\tawait this.loadAll()\n\t\t\t} catch {\n\t\t\t\tthis.addError = t('nextcloud-vue', 'Could not add note')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Emit the add request for groups without a built-in flow.\n\t\t *\n\t\t * @param {string} key - The group key (objects, mails, events, …).\n\t\t */\n\t\tonAddGroup(key) {\n\t\t\t/**\n\t\t\t * @event add An Add-footer entry without a built-in flow was\n\t\t\t * activated; the host routes it (e.g. open a link-object dialog).\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('add', key)\n\t\t},\n\n\t\t/**\n\t\t * Emit the related-object selection for the host to route.\n\t\t *\n\t\t * @param {object} raw - The related object record.\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object A related-object row was clicked.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-object', raw)\n\t\t},\n\n\t\t/**\n\t\t * Emit the file selection for the host to route.\n\t\t *\n\t\t * @param {object} raw - The file record.\n\t\t */\n\t\tonSelectFile(raw) {\n\t\t\t/**\n\t\t\t * @event select-file A file row was clicked.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-file', raw)\n\t\t},\n\n\t\t/**\n\t\t * Handle a click on a tabbed-path row that has no owning-app link\n\t\t * (rows with one render as a real `<a>`): emit a host-routed event.\n\t\t * Related objects always route through the host (their owning app's\n\t\t * detail page).\n\t\t *\n\t\t * @param {object} group - The active group descriptor.\n\t\t * @param {object} item - The clicked, normalised row (`item.raw` is the record).\n\t\t */\n\t\tonSelectGroupItem(group, item) {\n\t\t\t// A host-supplied section's rows belong to the host: this widget\n\t\t\t// did not fetch them and has no owning-app page to deep-link to,\n\t\t\t// so the click goes straight back out as `select-extra` — the same\n\t\t\t// event the legacy list path emits for the same rows.\n\t\t\tif (group.isExtra) {\n\t\t\t\tthis.onSelectExtra(group.key, item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (group.key === 'objects') {\n\t\t\t\tthis.onSelectObject(item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (group.key === 'files') {\n\t\t\t\tthis.onSelectFile(item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// No owning-app page to deep-link to (e.g. notes are NC comments) —\n\t\t\t// toggle the body text inline so the click does something useful\n\t\t\t// instead of silently nothing.\n\t\t\tif (item.detail) {\n\t\t\t\tconst key = `${group.key}-${item.id}`\n\t\t\t\tthis.expandedKey = (this.expandedKey === key) ? '' : key\n\t\t\t}\n\t\t\t/**\n\t\t\t * @event select-related A leaf-group row (mails, events, …) was clicked\n\t\t\t * and no owning-app deep link could be resolved.\n\t\t\t * @type {{ group: string, item: object }}\n\t\t\t */\n\t\t\tthis.$emit('select-related', { group: group.key, item: item.raw })\n\t\t},\n\n\t\t/**\n\t\t * Whether a row is currently inline-expanded (no-deep-link leaves).\n\t\t *\n\t\t * @param {string} groupKey - The active group key.\n\t\t * @param {object} item - The normalised row.\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded(groupKey, item) {\n\t\t\treturn this.expandedKey === `${groupKey}-${item.id}`\n\t\t},\n\n\t\t/**\n\t\t * Resolve the owning-app deep link for a related item, or '' when none\n\t\t * can be built (the caller then falls back to a host-routed event).\n\t\t *\n\t\t * @param {string} groupKey - The group key (files, contacts, deck, …).\n\t\t * @param {object} raw - The leaf/file record.\n\t\t * @return {string} A Nextcloud URL, or '' when unresolved.\n\t\t */\n\t\tresolveItemHref(groupKey, raw) {\n\t\t\t// A record may carry its own absolute owning-app link.\n\t\t\tif (raw.url || raw.link || raw.accessUrl) {\n\t\t\t\treturn raw.url || raw.link || raw.accessUrl\n\t\t\t}\n\t\t\t// Files → canonical Nextcloud file permalink (Files + Viewer).\n\t\t\tif (groupKey === 'files') {\n\t\t\t\tconst fileid = raw.id || raw.fileid\n\t\t\t\treturn fileid ? generateUrl('/f/{fileid}', { fileid: String(fileid) }) : ''\n\t\t\t}\n\t\t\t// Contacts → open the contact card in the Contacts app.\n\t\t\tif (groupKey === 'contacts' && raw.contactUid) {\n\t\t\t\tconst key = raw.addressbookId !== null && raw.addressbookId !== undefined ? `${raw.contactUid}~${raw.addressbookId}` : String(raw.contactUid)\n\t\t\t\treturn generateUrl('/apps/contacts/All contacts/{key}', { key })\n\t\t\t}\n\t\t\t// Deck → open the card on its board.\n\t\t\tif (groupKey === 'deck' && raw.boardId && (raw.cardId || raw.id)) {\n\t\t\t\treturn generateUrl('/apps/deck/board/{board}/card/{card}', { board: String(raw.boardId), card: String(raw.cardId || raw.id) })\n\t\t\t}\n\t\t\t// Tasks → open the task in the Tasks app.\n\t\t\tif (groupKey === 'tasks') {\n\t\t\t\tconst cal = raw.calendarId || raw.calendarUri\n\t\t\t\tconst task = raw.uri || raw.uid || raw.id\n\t\t\t\tif (cal && task) {\n\t\t\t\t\treturn generateUrl('/apps/tasks/#/calendars/{cal}/tasks/{task}', { cal: String(cal), task: String(task) })\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Meetings/events → open the event in the Calendar app (dav path, base64url).\n\t\t\tif (groupKey === 'events') {\n\t\t\t\tconst cal = raw.calendarUri || raw.calendarId\n\t\t\t\tconst ev = raw.uri || (raw.uid ? `${raw.uid}.ics` : '')\n\t\t\t\tif (cal && ev) {\n\t\t\t\t\tconst token = btoa(`${cal}/${ev}`).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n\t\t\t\t\treturn generateUrl('/apps/calendar/edit/{token}', { token })\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Mails → open the message in the Mail app.\n\t\t\tif (groupKey === 'mails' && (raw.messageId || raw.id)) {\n\t\t\t\treturn generateUrl('/apps/mail/box/0/{id}', { id: String(raw.messageId || raw.id) })\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\t/**\n\t\t * The registered integration's icon name, or '' when not registered.\n\t\t *\n\t\t * @param {string} integrationId - The integration id.\n\t\t * @return {string}\n\t\t */\n\t\tintegrationIcon(integrationId) {\n\t\t\tif (!integrationId || typeof this.getById !== 'function') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst entry = this.getById(integrationId)\n\t\t\treturn (entry && entry.icon) || ''\n\t\t},\n\n\t\t/**\n\t\t * Emit a click in a host-supplied extra section. Reached from both\n\t\t * paths: the legacy list's own rows, and a tabbed-path row whose\n\t\t * group came from `extraSections`.\n\t\t *\n\t\t * @param {string} sectionKey - The section's key.\n\t\t * @param {object} item - The clicked item.\n\t\t */\n\t\tonSelectExtra(sectionKey, item) {\n\t\t\t/**\n\t\t\t * @event select-extra A row in a host-supplied `extraSections`\n\t\t\t * group was clicked, on either the list or the tabbed path.\n\t\t\t * @type {{ section: string, item: object }}\n\t\t\t */\n\t\t\tthis.$emit('select-extra', { section: sectionKey, item })\n\t\t},\n\n\t\t/**\n\t\t * Emit the leaf-integration open request for the host to route\n\t\t * (the detail-page auto-body deep-links the sidebar tab).\n\t\t *\n\t\t * @param {string} integrationId - The leaf integration id.\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration A \"Linked apps\" row or a tab's\n\t\t\t * \"open in sidebar\" affordance was activated.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('open-integration', integrationId)\n\t\t},\n\n\t\t/**\n\t\t * Build an OpenRegister object sub-resource URL.\n\t\t *\n\t\t * @param {string} suffix - The sub-resource (e.g. 'relations', 'uses', 'files').\n\t\t * @return {string} The fully-qualified API URL.\n\t\t */\n\t\trelatedUrl(suffix) {\n\t\t\treturn generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/{suffix}', {\n\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\tid: this.resolvedId,\n\t\t\t\tsuffix,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * GET an OpenRegister sub-resource, returning the parsed JSON or null.\n\t\t *\n\t\t * @param {string} suffix - The sub-resource suffix.\n\t\t * @return {Promise<object|null>}\n\t\t */\n\t\tasync fetchSubResource(suffix) {\n\t\t\ttry {\n\t\t\t\t// `no-store`: relations change as the user links content; a stale\n\t\t\t\t// cached empty response would wrongly show the empty state on load.\n\t\t\t\tconst response = await fetch(this.relatedUrl(suffix), { method: 'GET', headers: buildHeaders(), cache: 'no-store' })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\treturn await response.json()\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Resolve the object store: explicit prop first, then Pinia (legacy path).\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tgetStore() {\n\t\t\tif (this.store) {\n\t\t\t\treturn this.store\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (!this.$pinia) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\treturn useObjectStore()\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Normalise a related object into a display row.\n\t\t *\n\t\t * @param {object} raw - The related object record.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoObjectRow(raw) {\n\t\t\tconst self = raw['@self'] || {}\n\t\t\tconst id = raw.id || self.id || self.uuid || ''\n\t\t\tconst isUuid = (v) => typeof v === 'string' && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v.trim())\n\t\t\t// Pick a human label. Skip `@self.name` when OpenRegister has fallen\n\t\t\t// back to the bare uuid (schemas with no configured name field), and\n\t\t\t// cover common display properties across schemas — including Dutch\n\t\t\t// ones (onderwerp, omschrijving, naam, titel) — before the schema/id.\n\t\t\tconst label = [\n\t\t\t\traw.title,\n\t\t\t\traw.name,\n\t\t\t\traw.displayName,\n\t\t\t\traw.label,\n\t\t\t\traw.onderwerp,\n\t\t\t\traw.subject,\n\t\t\t\traw.omschrijving,\n\t\t\t\traw.naam,\n\t\t\t\traw.titel,\n\t\t\t\tself.title,\n\t\t\t\tself.name,\n\t\t\t\traw.summary,\n\t\t\t\traw.description,\n\t\t\t].find((v) => typeof v === 'string' && v.trim() && !isUuid(v))\n\t\t\t|| [raw.givenName, raw.familyName].filter((v) => typeof v === 'string' && v.trim()).join(' ')\n\t\t\t// OpenRegister names the schema by numeric id: show its title, never the number.\n\t\t\tconst schema = this.schemaName(self.schema || raw.schema)\n\t\t\tconst finalLabel = label || schema || String(id)\n\t\t\treturn { id, label: finalLabel, meta: schema === finalLabel ? '' : schema, raw }\n\t\t},\n\n\t\t/**\n\t\t * How a row names its schema: the translated title for a numeric id\n\t\t * (empty until it is read, or when it cannot be), a slug as it is.\n\t\t *\n\t\t * @param {string|number|undefined|null} schema - `@self.schema` of the related object.\n\t\t * @return {string}\n\t\t */\n\t\tschemaName(schema) {\n\t\t\tif (isNumericId(schema)) {\n\t\t\t\tconst title = this.schemaTitles[String(schema).trim()]\n\t\t\t\treturn title ? this.cnTranslate(title) : ''\n\t\t\t}\n\t\t\treturn typeof schema === 'string' ? schema : ''\n\t\t},\n\n\t\t/**\n\t\t * Read the titles of the numeric schema ids in these envelopes once,\n\t\t * before the rows are built, so no row shows a number first.\n\t\t *\n\t\t * @param {Array<object|null>} envelopes - The `{ results }` payloads.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync resolveSchemaTitles(envelopes) {\n\t\t\tconst ids = new Set()\n\t\t\tfor (const envelope of envelopes) {\n\t\t\t\tfor (const raw of ((envelope && envelope.results) || [])) {\n\t\t\t\t\tconst schema = (raw && (raw['@self'] || {}).schema) ?? (raw && raw.schema)\n\t\t\t\t\tif (isNumericId(schema)) {\n\t\t\t\t\t\tids.add(String(schema).trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst titles = { ...this.schemaTitles }\n\t\t\tawait Promise.all([...ids].filter((id) => !(id in titles)).map(async (id) => {\n\t\t\t\tif (!schemaTitleCache.has(id)) {\n\t\t\t\t\tschemaTitleCache.set(id, this.fetchSchemaTitle(id))\n\t\t\t\t}\n\t\t\t\ttitles[id] = await schemaTitleCache.get(id)\n\t\t\t}))\n\t\t\tthis.schemaTitles = titles\n\t\t},\n\n\t\t/**\n\t\t * GET one schema's title; '' when it cannot be read.\n\t\t *\n\t\t * @param {string} id - The numeric schema id.\n\t\t * @return {Promise<string>}\n\t\t */\n\t\tasync fetchSchemaTitle(id) {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(generateUrl('/apps/openregister/api/schemas/{id}', { id }), { method: 'GET', headers: buildHeaders() })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\t\t\t\tconst schema = await response.json()\n\t\t\t\tconst title = schema && (schema.title || schema.slug)\n\t\t\t\treturn typeof title === 'string' ? title : ''\n\t\t\t} catch {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Normalise a file record into a display row.\n\t\t *\n\t\t * @param {object} raw - The file record.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoFileRow(raw) {\n\t\t\tconst id = raw.id || raw.fileid || raw.name || ''\n\t\t\tconst label = raw.name || raw.title || raw.basename || String(id)\n\t\t\tconst size = raw.size !== null && raw.size !== undefined ? this.formatSize(raw.size) : ''\n\t\t\treturn { id, label, meta: size, raw }\n\t\t},\n\n\t\t/**\n\t\t * Normalise a leaf-relation record (mail, event, contact, …) into a row.\n\t\t *\n\t\t * @param {object} raw - The leaf record.\n\t\t * @param {number} index - Position fallback for the id.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoLeafRow(raw, index) {\n\t\t\tconst id = raw.id || raw.uuid || raw.uri || `leaf-${index}`\n\t\t\t// Leaf shapes vary by type: contacts use displayName, events/tasks use\n\t\t\t// summary, mails use subject, deck uses cardTitle, polls use question,\n\t\t\t// talk uses roomName, notes/comments use message — fall back through the\n\t\t\t// union of known title fields so no leaf renders its numeric link id.\n\t\t\tconst label = raw.title || raw.cardTitle || raw.albumName || raw.displayName\n\t\t\t\t|| raw.fullName || raw.summary || raw.subject || raw.question || raw.roomName\n\t\t\t\t|| raw.projectName || raw.reportName || raw.name || raw.basename\n\t\t\t\t|| raw.message || raw.content || raw.label || String(id)\n\t\t\tconst meta = raw.date || raw.linkedAt || raw.createdAt || ''\n\t\t\t// Body text for leaves that have no owning-app page (notes/comments) —\n\t\t\t// shown inline on click since there's nowhere to deep-link to.\n\t\t\tconst detail = raw.content || raw.message || raw.description || raw.comment || ''\n\t\t\treturn {\n\t\t\t\tid: String(id),\n\t\t\t\tlabel,\n\t\t\t\tmeta: typeof meta === 'string' ? meta : '',\n\t\t\t\tdetail: typeof detail === 'string' ? detail : '',\n\t\t\t\traw,\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Human-readable byte size.\n\t\t *\n\t\t * @param {number} bytes - Raw byte count.\n\t\t * @return {string}\n\t\t */\n\t\tformatSize(bytes) {\n\t\t\tif (!Number.isFinite(bytes)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst units = ['B', 'KB', 'MB', 'GB']\n\t\t\tlet n = bytes\n\t\t\tlet u = 0\n\t\t\twhile (n >= 1024 && u < units.length - 1) {\n\t\t\t\tn /= 1024\n\t\t\t\tu++\n\t\t\t}\n\t\t\treturn `${n.toFixed(u === 0 ? 0 : 1)} ${units[u]}`\n\t\t},\n\n\t\t/**\n\t\t * Dispatch to the tabbed self-fetch or the legacy store path.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadAll() {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tif (this.useTabs) {\n\t\t\t\t\tawait this.loadTabs()\n\t\t\t\t} else {\n\t\t\t\t\tawait this.loadViaStore()\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t\tthis.hasLoaded = true\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Fetch every group directly from OpenRegister and build the tabs.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadTabs() {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst [relations, uses, used, contracts, files] = await Promise.all([\n\t\t\t\t\tthis.fetchSubResource('relations'),\n\t\t\t\t\tthis.showObjects ? this.fetchSubResource('uses') : null,\n\t\t\t\t\tthis.showObjects ? this.fetchSubResource('used') : null,\n\t\t\t\t\t(this.showObjects && this.showContracts) ? this.fetchSubResource('contracts') : null,\n\t\t\t\t\tthis.showFiles ? this.fetchSubResource('files') : null,\n\t\t\t\t])\n\n\t\t\t\tconst groups = []\n\n\t\t\t\tif (this.showObjects) {\n\t\t\t\t\tawait this.resolveSchemaTitles([uses, used, contracts])\n\t\t\t\t\tconst objectItems = this.mergeObjectResults([uses, used, contracts])\n\t\t\t\t\tgroups.push({ key: 'objects', label: this.objectsLabel, icon: 'FileTreeOutline', integrationId: '', items: objectItems, total: objectItems.length })\n\t\t\t\t}\n\n\t\t\t\tif (this.showFiles) {\n\t\t\t\t\tconst fileResults = (files && files.results) || []\n\t\t\t\t\tgroups.push({ key: 'files', label: this.filesLabel, icon: 'Paperclip', integrationId: 'files', items: fileResults.map((f) => this.toFileRow(f)), total: files ? (files.total ?? fileResults.length) : 0 })\n\t\t\t\t}\n\n\t\t\t\tfor (const def of LEAF_GROUPS) {\n\t\t\t\t\tconst block = relations && relations[def.responseKey]\n\t\t\t\t\tconst results = (block && block.results) || []\n\t\t\t\t\tgroups.push({\n\t\t\t\t\t\tkey: def.key,\n\t\t\t\t\t\tlabel: this.leafLabel(def.key),\n\t\t\t\t\t\t// Prefer the registered integration's icon so it matches the\n\t\t\t\t\t\t// sidebar/linked-apps; fall back to the known-good default.\n\t\t\t\t\t\ticon: this.integrationIcon(def.integrationId) || def.icon,\n\t\t\t\t\t\tintegrationId: def.integrationId,\n\t\t\t\t\t\trequiredApp: def.requiredApp,\n\t\t\t\t\t\titems: results.map((r, i) => this.toLeafRow(r, i)),\n\t\t\t\t\t\ttotal: block ? (block.total ?? results.length) : 0,\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.groups = groups\n\t\t\t\tif (!this.activeGroup && this.visibleGroups.length) {\n\t\t\t\t\tthis.activeKey = this.visibleGroups[0].key\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Merge uses/used/contracts result envelopes into deduped object rows.\n\t\t *\n\t\t * @param {Array<object|null>} envelopes - The `{ results }` payloads.\n\t\t * @return {Array<{ id: string, label: string, meta: string, raw: object }>}\n\t\t */\n\t\tmergeObjectResults(envelopes) {\n\t\t\tconst seen = new Set()\n\t\t\tconst merged = []\n\t\t\tfor (const envelope of envelopes) {\n\t\t\t\tfor (const raw of ((envelope && envelope.results) || [])) {\n\t\t\t\t\tconst row = this.toObjectRow(raw)\n\t\t\t\t\tconst key = String(row.id)\n\t\t\t\t\tif (key && seen.has(key)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif (key) {\n\t\t\t\t\t\tseen.add(key)\n\t\t\t\t\t}\n\t\t\t\t\tmerged.push(row)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\t/**\n\t\t * Translated label for a leaf group key.\n\t\t *\n\t\t * @param {string} key - The group key.\n\t\t * @return {string}\n\t\t */\n\t\tleafLabel(key) {\n\t\t\tconst labels = {\n\t\t\t\tmails: t('nextcloud-vue', 'Mails'),\n\t\t\t\tevents: t('nextcloud-vue', 'Meetings'),\n\t\t\t\tcontacts: t('nextcloud-vue', 'Contacts'),\n\t\t\t\tnotes: t('nextcloud-vue', 'Notes'),\n\t\t\t\ttasks: t('nextcloud-vue', 'Tasks'),\n\t\t\t\tdeck: t('nextcloud-vue', 'Deck'),\n\t\t\t\ttalk: t('nextcloud-vue', 'Talk'),\n\t\t\t\tforms: t('nextcloud-vue', 'Forms'),\n\t\t\t\tmaps: t('nextcloud-vue', 'Maps'),\n\t\t\t\tpolls: t('nextcloud-vue', 'Polls'),\n\t\t\t\tbookmarks: t('nextcloud-vue', 'Bookmarks'),\n\t\t\t\tcollectives: t('nextcloud-vue', 'Collectives'),\n\t\t\t\tphotos: t('nextcloud-vue', 'Photos'),\n\t\t\t\tcospend: t('nextcloud-vue', 'Cospend'),\n\t\t\t\ttimetracker: t('nextcloud-vue', 'Time tracking'),\n\t\t\t\tanalytics: t('nextcloud-vue', 'Analytics'),\n\t\t\t\tflow: t('nextcloud-vue', 'Flows'),\n\t\t\t\topenproject: t('nextcloud-vue', 'OpenProject'),\n\t\t\t\txwiki: t('nextcloud-vue', 'Wiki'),\n\t\t\t}\n\t\t\treturn labels[key] || key\n\t\t},\n\n\t\t/**\n\t\t * Legacy store-action path: fetch relations/files from the object store.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadViaStore() {\n\t\t\tif (!legacyWarned) {\n\t\t\t\tlegacyWarned = true\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnRelatedObjectsWidget] The store-action list path is deprecated; pass an object with `@self` (or register/schema props) to use the tabbed self-fetch path.')\n\t\t\t}\n\n\t\t\tconst store = this.getStore()\n\t\t\tconst type = this.objectType\n\t\t\tconst id = this.resolvedId\n\t\t\tif (!store || !type || !id) {\n\t\t\t\tthis.objectItems = []\n\t\t\t\tthis.fileItems = []\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tif (this.showObjects) {\n\t\t\t\t\tconst calls = []\n\t\t\t\t\tif (typeof store.fetchUses === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchUses(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof store.fetchUsed === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchUsed(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof store.fetchContracts === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchContracts(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tconst groups = await Promise.all(calls)\n\t\t\t\t\tawait this.resolveSchemaTitles(groups.map((results) => ({ results: results || [] })))\n\t\t\t\t\tconst seen = new Set()\n\t\t\t\t\tconst merged = []\n\t\t\t\t\tfor (const group of groups) {\n\t\t\t\t\t\tfor (const raw of (group || [])) {\n\t\t\t\t\t\t\tconst row = this.toObjectRow(raw)\n\t\t\t\t\t\t\tconst key = String(row.id)\n\t\t\t\t\t\t\tif (key && seen.has(key)) {\n\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tseen.add(key)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmerged.push(row)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.objectItems = merged\n\t\t\t\t}\n\n\t\t\t\tif (this.showFiles && typeof store.fetchFiles === 'function') {\n\t\t\t\t\tconst files = await store.fetchFiles(type, id)\n\t\t\t\t\tthis.fileItems = (files || []).map((f) => this.toFileRow(f))\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Refetch when the shared widget Refresh fires for this widget.\n\t\t *\n\t\t * @param {{ widgetId: string }} payload - Bus payload.\n\t\t */\n\t\tonBusRefresh(payload) {\n\t\t\tconst mine = this.widgetId || this.objectType\n\t\t\tif (!payload || !payload.widgetId || !mine || payload.widgetId === mine) {\n\t\t\t\tthis.loadAll()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-related-objects-widget__group {\n\tpadding: calc(2 * var(--default-grid-baseline, 4px)) 0;\n}\n\n.cn-related-objects-widget__group + .cn-related-objects-widget__group {\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-related-objects-widget__group-title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tmargin: 0 0 4px;\n\tpadding: 0 calc(2 * var(--default-grid-baseline, 4px));\n\tfont-size: 0.8em;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.02em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tpadding: calc(1.5 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-related-objects-widget__tab {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 10px;\n\tborder: none;\n\tborder-radius: var(--border-radius-pill, 16px);\n\tbackground: transparent;\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-related-objects-widget__tab:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-related-objects-widget__tab--active {\n\tbackground: var(--color-primary-element-light, var(--color-background-dark));\n\tcolor: var(--color-primary-element-light-text, var(--color-main-text));\n}\n\n.cn-related-objects-widget__tab:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-related-objects-widget__tab-icon {\n\tflex: 0 0 auto;\n}\n\n.cn-related-objects-widget__panel-actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tpadding: 4px calc(2 * var(--default-grid-baseline, 4px)) 0;\n}\n\n.cn-related-objects-widget__open-sidebar {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 2px 8px;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__open-sidebar:hover {\n\ttext-decoration: underline;\n}\n\n.cn-related-objects-widget__count {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-width: 18px;\n\theight: 18px;\n\tpadding: 0 5px;\n\tborder-radius: 9px;\n\tbackground: var(--color-background-dark);\n\tfont-size: 0.9em;\n\tfont-weight: 600;\n}\n\n.cn-related-objects-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-related-objects-widget__row {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 10px;\n\tpadding: calc(1.5 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tcursor: pointer;\n\tborder-radius: var(--border-radius);\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\n.cn-related-objects-widget__detail {\n\tflex-basis: 100%;\n\tmargin: 4px 0 0 calc(20px + 10px);\n\tpadding: 8px 10px;\n\tfont-size: 0.9em;\n\twhite-space: pre-wrap;\n\toverflow-wrap: anywhere;\n\tcolor: var(--color-main-text);\n\tbackground: var(--color-background-hover);\n\tborder-radius: var(--border-radius);\n}\n\n.cn-related-objects-widget__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-related-objects-widget__row:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-related-objects-widget__icon {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--color-main-text);\n}\n\n.cn-related-objects-widget__meta {\n\tflex: 0 0 auto;\n\tfont-size: 0.85em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__chevron {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__empty {\n\tpadding: calc(3 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tcolor: var(--color-text-maxcontrast);\n\tfont-style: italic;\n}\n\n.cn-related-objects-widget__empty-state {\n\t/* NcEmptyContent defaults to filling tall parents; inside a widget cell a\n\t compact block reads better. */\n\tpadding: calc(4 * var(--default-grid-baseline, 4px)) 0;\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__footer {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: calc(2 * var(--default-grid-baseline, 4px));\n\tpadding: calc(2 * var(--default-grid-baseline, 4px));\n}\n\n.cn-related-objects-widget__add-error {\n\tcolor: var(--color-error);\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__file-input {\n\tdisplay: none;\n}\n</style>\n"],"names":["CnWidgetWrapper","CnIcon","FileTreeOutline","CnEmptyContent","t"],"mappings":";;;;;;;;;;;;;;;;AAuSA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,GAAC;;AAEzB;AACA,MAAM,sBAAsB,oBAAkB;;AAE9C;AACA,MAAM,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAA;;AAE5E;AACA,IAAI,YAAW,GAAI,MAAI;;AAEvB;;;;AAIC;AACA;;AAED,MAAM,gBAAiB,GAAE,IAAI,GAAG,GAAC;;AAEjC;AACC;AACA;;AAEA;;AAED,SAAS,WAAW,CAAC,KAAK,EAAE;CAC3B,OAAO,CAAC,OAAO,KAAM,KAAI,QAAO,IAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;MACtD,OAAO,KAAM,KAAI,QAAS,IAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;AAC7D,CAAA;;AAEA;AACC;AACA;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AAC,CAAC,CAAC,EAAA;AAC5D,KAAA;AACD,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,OAAQ,GAAE,MAAI;AACpB,IAAA;GACA;;AAED;;AAEC;AACA;;AAED,EAAA,YAAY,CAAC,OAAO,EAAE;AACrB,GAAA,MAAM,IAAG,GAAI,IAAI,CAAC,QAAS,IAAG,IAAI,CAAC,WAAS;AAC5C,GAAA,IAAI,CAAC,OAAM,IAAK,CAAC,OAAO,CAAC,QAAS,IAAG,CAAC,IAAG,IAAK,OAAO,CAAC,QAAO,KAAM,IAAI,EAAE;IACxE,IAAI,CAAC,OAAO,GAAC;AACd,IAAA;GACA;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnRelatedObjectsWidget.vue2.js","sources":["../../../../src/components/CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue"],"sourcesContent":["<!--\n CnRelatedObjectsWidget — Everything linked to an object, in one widget.\n\n Two rendering modes share the CnWidgetWrapper chrome:\n\n • Tabbed self-fetch (default, `layout=\"tabs\"`) — when an object's\n register/schema/id can be resolved (from props or `objectData['@self']`),\n the widget calls OpenRegister directly:\n /relations (notes, tasks, mails, events, contacts, deck), /uses + /used\n (merged into Objects), /files — and renders one TAB per non-empty group\n with a count badge, showing the items inline. Each leaf tab carries an\n \"open in sidebar\" affordance that emits `open-integration` without\n replacing the inline content. A host's `extraSections` join the strip as\n further tabs: content the widget cannot resolve itself is still content\n about this object, and dropping it on the mode the widget picks for itself\n is a loss the host has no way to see.\n\n • Legacy list (`layout=\"list\"`, or when register/schema can't be resolved) —\n the original flat sections driven by the object store's\n fetchUses/fetchUsed/fetchContracts/fetchFiles actions plus the static\n leaf-integration \"Linked apps\" list. This path is deprecated; it warns once.\n\n Sits on the CnWidgetWrapper chrome, so it carries the shared overflow\n Actions menu (Refresh / Documentation / Request a feature). Refresh\n refetches every section.\n-->\n<template>\n\t<CnWidgetWrapper\n\t\t:title=\"title\"\n\t\t:showTitle=\"!bare\"\n\t\t:borderless=\"bare\"\n\t\t:widgetId=\"widgetId || objectType\"\n\t\t:documentationUrl=\"documentationUrl\"\n\t\t:refreshing=\"loading\"\n\t\tflush>\n\t\t<!-- Total beside the card title. Carries the count that the tab strip\n\t\t would otherwise show — notably when `hideSingleTabTitle` hid it. -->\n\t\t<template v-if=\"useTabs && showTotalCount && totalCount > 0\" #title-meta>\n\t\t\t<span class=\"cn-related-objects-widget__count\">{{ totalCount }}</span>\n\t\t</template>\n\n\t\t<div class=\"cn-related-objects-widget\">\n\t\t\t<!-- Tabbed self-fetch mode -->\n\t\t\t<template v-if=\"useTabs\">\n\t\t\t\t<div v-if=\"tabStripVisible\" class=\"cn-related-objects-widget__tabs\" role=\"tablist\">\n\t\t\t\t\t<button v-for=\"group in visibleGroups\"\n\t\t\t\t\t\t:key=\"`tab-${group.key}`\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t:aria-selected=\"String(group.key === activeKey)\"\n\t\t\t\t\t\tclass=\"cn-related-objects-widget__tab\"\n\t\t\t\t\t\t:class=\"[{ 'cn-related-objects-widget__tab--active': group.key === activeKey }]\"\n\t\t\t\t\t\t@click=\"activeKey = group.key\">\n\t\t\t\t\t\t<CnIcon :name=\"group.icon\" :size=\"18\" class=\"cn-related-objects-widget__tab-icon\" />\n\t\t\t\t\t\t<span class=\"cn-related-objects-widget__tab-label\">{{ group.label }}</span>\n\t\t\t\t\t\t<span class=\"cn-related-objects-widget__count\">{{ group.total }}</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t<section v-if=\"activeGroup\" class=\"cn-related-objects-widget__panel\" role=\"tabpanel\">\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"(item, i) in activeGroup.items\"\n\t\t\t\t\t\t\t:key=\"`item-${activeGroup.key}-${item.id || i}`\">\n\t\t\t\t\t\t\t<!-- A row with an owning-app page is a real link; the rest\n\t\t\t\t\t\t\t stay buttons that emit or expand. -->\n\t\t\t\t\t\t\t<a v-if=\"activeGroupHrefs[i]\"\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\t\t:href=\"activeGroupHrefs[i]\"\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"activeGroup.icon\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<div v-else\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\t\t:class=\"{ 'cn-related-objects-widget__row--expanded': isExpanded(activeGroup.key, item) }\"\n\t\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t@click=\"onSelectGroupItem(activeGroup, item)\"\n\t\t\t\t\t\t\t\t@keydown.enter=\"onSelectGroupItem(activeGroup, item)\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"activeGroup.icon\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t\t<p v-if=\"item.detail && isExpanded(activeGroup.key, item)\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__detail\">\n\t\t\t\t\t\t\t\t\t{{ item.detail }}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<p v-if=\"visibleGroups.length && pendingSections.length\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__section-status\"\n\t\t\t\t\tdata-testid=\"cn-related-pending\"\n\t\t\t\t\trole=\"status\">\n\t\t\t\t\t{{ pendingLabel }}\n\t\t\t\t</p>\n\t\t\t\t<p v-for=\"failed in failedSections\"\n\t\t\t\t\t:key=\"`failed-${failed.key}`\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__section-error\"\n\t\t\t\t\tdata-testid=\"cn-related-section-error\"\n\t\t\t\t\t:data-section=\"failed.key\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Could not load {section}.', { section: failed.label }) }}\n\t\t\t\t</p>\n\n\t\t\t\t<div v-if=\"loading && !visibleGroups.length\" class=\"cn-related-objects-widget__empty\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<CnEmptyContent v-else-if=\"hasLoaded && !visibleGroups.length\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__empty-state\"\n\t\t\t\t\t:name=\"resolvedEmptyLabel\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CnIcon :name=\"emptyIconName\" :size=\"48\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnEmptyContent>\n\t\t\t</template>\n\n\t\t\t<!-- Legacy list mode (deprecated) -->\n\t\t\t<template v-else>\n\t\t\t\t<!-- Objects -->\n\t\t\t\t<section v-if=\"showObjects && objectItems.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ objectsLabel }} <span class=\"cn-related-objects-widget__count\">{{ objectItems.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"item in objectItems\"\n\t\t\t\t\t\t\t:key=\"`obj-${item.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectObject(item.raw)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectObject(item.raw)\">\n\t\t\t\t\t\t\t<FileTreeOutline class=\"cn-related-objects-widget__icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Files -->\n\t\t\t\t<section v-if=\"showFiles && fileItems.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ filesLabel }} <span class=\"cn-related-objects-widget__count\">{{ fileItems.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"item in fileItems\"\n\t\t\t\t\t\t\t:key=\"`file-${item.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectFile(item.raw)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectFile(item.raw)\">\n\t\t\t\t\t\t\t<Paperclip class=\"cn-related-objects-widget__icon\" :size=\"20\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-related-objects-widget__meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Host-supplied extra sections (e.g. mails resolved by a leaf) -->\n\t\t\t\t<section v-for=\"section in extraSections\"\n\t\t\t\t\t:key=\"`extra-${section.key}`\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 v-if=\"(section.items || []).length\" class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ section.label }} <span class=\"cn-related-objects-widget__count\">{{ section.items.length }}</span>\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul v-if=\"(section.items || []).length\" class=\"cn-related-objects-widget__list\">\n\t\t\t\t\t\t<li v-for=\"(item, i) in section.items\"\n\t\t\t\t\t\t\t:key=\"`extra-${section.key}-${i}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onSelectExtra(section.key, item)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onSelectExtra(section.key, item)\">\n\t\t\t\t\t\t\t<CnIcon v-if=\"section.icon\"\n\t\t\t\t\t\t\t\t:name=\"section.icon\"\n\t\t\t\t\t\t\t\t:size=\"20\"\n\t\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ item.label || item.title || item.name }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Linked apps — leaf integrations carrying related content -->\n\t\t\t\t<section v-if=\"showIntegrations && linkedApps.length\" class=\"cn-related-objects-widget__group\">\n\t\t\t\t\t<h4 class=\"cn-related-objects-widget__group-title\">\n\t\t\t\t\t\t{{ linkedAppsLabel }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-related-objects-widget__list cn-related-objects-widget__list--apps\">\n\t\t\t\t\t\t<li v-for=\"app in linkedApps\"\n\t\t\t\t\t\t\t:key=\"`app-${app.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-related-objects-widget__row cn-related-objects-widget__row--app\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t@click=\"onOpenIntegration(app.id)\"\n\t\t\t\t\t\t\t@keydown.enter=\"onOpenIntegration(app.id)\">\n\t\t\t\t\t\t\t<CnIcon :name=\"app.icon || 'PuzzleOutline'\" :size=\"20\" class=\"cn-related-objects-widget__icon\" />\n\t\t\t\t\t\t\t<span class=\"cn-related-objects-widget__label\">{{ app.label }}</span>\n\t\t\t\t\t\t\t<ChevronRight class=\"cn-related-objects-widget__chevron\" :size=\"20\" />\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Empty -->\n\t\t\t\t<div v-if=\"loading && isEmpty\" class=\"cn-related-objects-widget__empty\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<CnEmptyContent v-else-if=\"hasLoaded && isEmpty\"\n\t\t\t\t\tclass=\"cn-related-objects-widget__empty-state\"\n\t\t\t\t\t:name=\"resolvedEmptyLabel\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CnIcon :name=\"emptyIconName\" :size=\"48\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnEmptyContent>\n\t\t\t</template>\n\t\t</div>\n\n\t\t<!-- Add footer — lets the user actually create related content\n\t\t (upload files, write notes) instead of only viewing it. Rendered\n\t\t only on the tabbed self-fetch path (uploads need register/schema/id). -->\n\t\t<template v-if=\"addFooterVisible\" #footer>\n\t\t\t<div class=\"cn-related-objects-widget__footer\">\n\t\t\t\t<NcButton v-if=\"soleAddable && soleAddable.key === 'files'\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t:disabled=\"uploading\"\n\t\t\t\t\t@click=\"openFilePicker\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ uploading ? t('nextcloud-vue', 'Uploading…') : addLabelFor(soleAddable) }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcActions v-else\n\t\t\t\t\t:menuName=\"t('nextcloud-vue', 'Add')\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t:forceMenu=\"true\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<NcActionButton v-if=\"groupAllowed('files')\" :closeAfterClick=\"true\" @click=\"openFilePicker\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Paperclip :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Upload file') }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<!--\n\t\t\t\t\t\t`model-value` / `@update:model-value`, not `value` /\n\t\t\t\t\t\t`@update:value`: @nextcloud/vue 9's NcActionInput declares\n\t\t\t\t\t\tonly `modelValue` and emits only `submit` /\n\t\t\t\t\t\t`update:modelValue`. The old pair fell through as an inert\n\t\t\t\t\t\tDOM attribute and a listener that never fired, so the note\n\t\t\t\t\t\tdraft stayed empty and Add note submitted nothing.\n\t\t\t\t\t-->\n\t\t\t\t\t<NcActionInput v-if=\"groupAllowed('notes')\"\n\t\t\t\t\t\t:modelValue=\"noteDraft\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Add note')\"\n\t\t\t\t\t\t@update:modelValue=\"noteDraft = $event\"\n\t\t\t\t\t\t@submit=\"onAddNote\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<CnIcon name=\"CommentTextOutline\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Add note') }}\n\t\t\t\t\t</NcActionInput>\n\t\t\t\t\t<NcActionButton v-for=\"group in emitAddableGroups\"\n\t\t\t\t\t\t:key=\"`add-${group.key}`\"\n\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t@click=\"onAddGroup(group.key)\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<CnIcon :name=\"group.icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ addLabelFor(group) }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</NcActions>\n\t\t\t\t<span v-if=\"addError\" class=\"cn-related-objects-widget__add-error\">{{ addError }}</span>\n\t\t\t\t<!-- `:ref`, not `ref` — every other binding here is static and\n\t\t\t\t the handler is cached, so a static ref lets the compiler\n\t\t\t\t hoist this vnode to module scope, leaving its ref with no\n\t\t\t\t owner instance. Vue's guard for that is dev-only, so in a\n\t\t\t\t production build it throws\n\t\t\t\t `Cannot read properties of null (reading 'refs')` and\n\t\t\t\t aborts the render. See CnFilesTab for the full account. -->\n\t\t\t\t<input :ref=\"fileInputRef\"\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\tmultiple\n\t\t\t\t\tclass=\"cn-related-objects-widget__file-input\"\n\t\t\t\t\t@change=\"onFilesPicked\">\n\t\t\t</div>\n\t\t</template>\n\t</CnWidgetWrapper>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcActionButton, NcActionInput, NcActions, NcButton } from '@nextcloud/vue'\nimport ChevronRight from 'vue-material-design-icons/ChevronRight.vue'\nimport FileTreeOutline from 'vue-material-design-icons/FileTreeOutline.vue'\nimport Paperclip from 'vue-material-design-icons/Paperclip.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\nimport { registerIntegrationIcons } from '../../integrations/icons.js'\nimport { useObjectStore } from '../../store/index.js'\nimport { buildHeaders } from '../../utils/headers.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnWidgetWrapper } from '../CnWidgetWrapper/index.js'\n\n// ⚠️ THIS WIDGET RENDERS INTEGRATION ICONS AND DID NOT REGISTER THEM.\n//\n// `LEAF_GROUPS` below names an MDI icon per section and `CnIcon` resolves those\n// against a registry the HOST app populates — and a host registers the handful\n// of icons it uses, not the integration set. `registerIntegrationIcons()` fixes\n// that, which is why CnIntegrationWidget and CnIntegrationWidgetEmpty both call\n// it at module load.\n//\n// This widget called nothing. It happened to look right on any page that ALSO\n// rendered one of those two components, because the registry is global and\n// whichever module loaded first filled it — so the icons were correct exactly\n// when something unrelated to this widget was on the page, and a help-circle\n// otherwise. Measured on the widget's own import graph: 7 of its 19 sections —\n// contacts, notes, tasks, talk, polls, bookmarks and photos — fell back.\n//\n// A defect that depends on what ELSE is mounted is not intermittent; it is\n// deterministic per page, and looks like a styling quirk on the pages where it\n// shows. Idempotent, so calling it here costs nothing where another component\n// already has.\nregisterIntegrationIcons()\n\n/** Event-bus channel CnWidgetWrapper's Refresh action broadcasts on. */\nconst REFRESH_BUS_CHANNEL = 'cn:widget:refresh'\n\n/** Core sidebar tabs that are not \"related content\" leaves. */\nconst CORE_TABS = ['files', 'notes', 'tags', 'tasks', 'auditTrail', 'shares']\n\n/** One-time guard so the legacy-path deprecation warning logs only once. */\nlet legacyWarned = false\n\n/**\n * Schema titles by numeric schema id, shared by every widget on the page so a\n * schema is asked for once. OpenRegister's `/uses` and `/used` answer\n * `@self.schema` as that id (\"120\"), which is not a word anyone can read.\n *\n * @type {Map<string, Promise<string>>}\n */\nconst schemaTitleCache = new Map()\n\n/**\n * Whether a value is a bare number, the way OpenRegister names a schema by id.\n *\n * @param {string|number|undefined|null} value The value.\n * @return {boolean}\n */\nfunction isNumericId(value) {\n\treturn (typeof value === 'number' && Number.isFinite(value))\n\t\t|| (typeof value === 'string' && /^\\d+$/.test(value.trim()))\n}\n\n/**\n * Leaf groups surfaced by the aggregated `/relations` endpoint, in tab order.\n * `responseKey` is the key in the `/relations` payload; `integrationId` is the\n * sidebar tab the \"open in sidebar\" affordance deep-links to; `key` is this\n * widget's own section id.\n *\n * ⚠️ `icon` AND `integrationId` ARE BOTH ANSWERED BY THE INTEGRATION REGISTRY,\n * SO THIS TABLE IS A SECOND COPY OF DATA THAT ALREADY EXISTS — and it had\n * drifted from it. Talk wore `Forum` here and `ChatOutline` in the registry;\n * `Forum` and `ImageMultiple` are in NO registry at all, so those two sections\n * fell back even on a page where every other icon resolved; and `timetracker`\n * named no integration whatsoever — the registry id is `time-tracker` — so that\n * row's deep link opened nothing and reported nothing.\n *\n * The copy stays (importing the registry here would be a cycle), but\n * `tests/components/relatedObjectIcons.spec.js` now holds every row against it:\n * same integration, same icon, and an `integrationId` that names something real.\n */\nconst LEAF_GROUPS = [\n\t{ key: 'mails', responseKey: 'emails', icon: 'Email', integrationId: 'email', requiredApp: 'mail' },\n\t{ key: 'events', responseKey: 'events', icon: 'Calendar', integrationId: 'calendar', requiredApp: 'calendar' },\n\t{ key: 'contacts', responseKey: 'contacts', icon: 'AccountBox', integrationId: 'contacts', requiredApp: 'contacts' },\n\t{ key: 'notes', responseKey: 'notes', icon: 'CommentTextOutline', integrationId: 'notes', requiredApp: '' },\n\t{ key: 'tasks', responseKey: 'tasks', icon: 'CheckboxMarkedOutline', integrationId: 'tasks', requiredApp: 'tasks' },\n\t{ key: 'deck', responseKey: 'deck', icon: 'ViewColumnOutline', integrationId: 'deck', requiredApp: 'deck' },\n\t// Additional pluggable leaf integrations — surfaced automatically when the\n\t// owning app is installed and the object has links (empty groups are hidden\n\t// by `visibleGroups`). Server side is wired in RelationsController::LEAF_INTEGRATIONS.\n\t{ key: 'talk', responseKey: 'talk', icon: 'ChatOutline', integrationId: 'talk', requiredApp: 'spreed' },\n\t{ key: 'forms', responseKey: 'forms', icon: 'ClipboardText', integrationId: 'forms', requiredApp: 'forms' },\n\t{ key: 'maps', responseKey: 'maps', icon: 'MapMarker', integrationId: 'maps', requiredApp: 'maps' },\n\t{ key: 'polls', responseKey: 'polls', icon: 'Poll', integrationId: 'polls', requiredApp: 'polls' },\n\t{ key: 'bookmarks', responseKey: 'bookmarks', icon: 'Bookmark', integrationId: 'bookmarks', requiredApp: 'bookmarks' },\n\t{ key: 'collectives', responseKey: 'collectives', icon: 'BookOpenPageVariant', integrationId: 'collectives', requiredApp: 'collectives' },\n\t{ key: 'photos', responseKey: 'photos', icon: 'Image', integrationId: 'photos', requiredApp: 'photos' },\n\t{ key: 'cospend', responseKey: 'cospend', icon: 'CurrencyEur', integrationId: 'cospend', requiredApp: 'cospend' },\n\t{ key: 'timetracker', responseKey: 'timetracker', icon: 'Clock', integrationId: 'time-tracker', requiredApp: 'timemanager' },\n\t{ key: 'analytics', responseKey: 'analytics', icon: 'ChartBar', integrationId: 'analytics', requiredApp: 'analytics' },\n\t{ key: 'flow', responseKey: 'flow', icon: 'SitemapOutline', integrationId: 'flow', requiredApp: '' },\n\t{ key: 'openproject', responseKey: 'openproject', icon: 'Briefcase', integrationId: 'openproject', requiredApp: 'integration_openproject' },\n\t{ key: 'xwiki', responseKey: 'xwiki', icon: 'FileDocumentMultiple', integrationId: 'xwiki', requiredApp: '' },\n]\n\n/**\n * CnRelatedObjectsWidget — Everything linked to an object, in one widget.\n *\n * In the default tabbed mode the widget resolves an object's\n * register/schema/id (from props or `objectData['@self']`) and fetches its\n * relations directly from OpenRegister — the aggregated `/relations` groups\n * (mails, meetings, contacts, notes, tasks, deck), `/uses` + `/used` (merged\n * into Objects) and `/files` — rendering one tab per non-empty group with a\n * count badge and the items inline. Each leaf tab offers an \"open in sidebar\"\n * affordance that emits `open-integration`.\n *\n * Passing `layout=\"list\"` (or mounting without a resolvable register/schema)\n * falls back to the deprecated store-action path that renders flat sections\n * plus the static leaf-integration \"Linked apps\" list.\n *\n * ```vue\n * <CnRelatedObjectsWidget\n * :object-data=\"lead\"\n * @select-object=\"openObject\"\n * @open-integration=\"openSidebarTab\" />\n * ```\n */\nexport default {\n\tname: 'CnRelatedObjectsWidget',\n\n\tcomponents: {\n\t\tCnWidgetWrapper,\n\t\tCnIcon,\n\t\tFileTreeOutline,\n\t\tPaperclip,\n\t\tChevronRight,\n\t\tPlus,\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionInput,\n\t\tNcButton,\n\t\tCnEmptyContent,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * The host app's translator (CnAppRoot provides it), so a schema title\n\t\t * reads in the app's language. Without it a title reads as stored.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/** Widget title shown in the header. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Related'),\n\t\t},\n\n\t\t/**\n\t\t * Drop the card chrome: no header, no border. For a surface that already\n\t\t * supplies both, such as a `CnTabsWidget` panel, where a second title\n\t\t * inside the panel reads as a heading nested in its own heading.\n\t\t *\n\t\t * The header is where `CnWidgetWrapper` renders its Actions menu, so a\n\t\t * bare widget has none. That is the point: the surface hoists it.\n\t\t */\n\t\tbare: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The registered object type slug (used for legacy store fetches). */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The object's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The object data — used to derive id/register/schema when not passed explicitly. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * OpenRegister register slug. When omitted, derived from\n\t\t * `objectData['@self'].register`. Required (with `schema`) for the\n\t\t * tabbed self-fetch path.\n\t\t */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * OpenRegister schema slug. When omitted, derived from\n\t\t * `objectData['@self'].schema`. Required (with `register`) for the\n\t\t * tabbed self-fetch path.\n\t\t */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Render mode. `'tabs'` (default) self-fetches from OpenRegister and\n\t\t * renders a tab per non-empty group. `'list'` forces the deprecated\n\t\t * store-action list path.\n\t\t *\n\t\t * @type {'tabs'|'list'}\n\t\t */\n\t\tlayout: {\n\t\t\ttype: String,\n\t\t\tdefault: 'tabs',\n\t\t\tvalidator: (value) => ['tabs', 'list'].includes(value),\n\t\t},\n\n\t\t/** Include `/contracts` relations in the Objects group (opt-in). */\n\t\tshowContracts: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Whitelist of relation-group keys to display (tabbed path). When\n\t\t * non-empty, ONLY these groups render — e.g. `['objects', 'files',\n\t\t * 'mails']`. Empty (default) shows every non-empty group. Lets a detail\n\t\t * page carry several Related widgets each scoped to different relations.\n\t\t * Keys: `objects`, `files`, and the leaf groups (mails, events, contacts,\n\t\t * notes, tasks, deck, talk, forms, maps, polls, …).\n\t\t *\n\t\t * @type {string[]}\n\t\t */\n\t\tincludeGroups: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Object store instance (legacy list path only). When omitted, the\n\t\t * widget tries Pinia auto-detection. Relation/file sections only render\n\t\t * when the store exposes the matching `fetch*` actions.\n\t\t */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Show the related-objects (uses/used/contracts) section/tab. */\n\t\tshowObjects: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the files section/tab. */\n\t\tshowFiles: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the leaf-integration entry-point section (legacy list path). */\n\t\tshowIntegrations: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Integration ids to omit from the \"Linked apps\" section (on top of\n\t\t * the always-omitted core tabs files/notes/tags/tasks/audit/shares).\n\t\t *\n\t\t * @type {string[]}\n\t\t */\n\t\texcludeIntegrations: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Extra related sections the widget cannot resolve itself — content a\n\t\t * host knows about that OpenRegister's relation endpoints do not\n\t\t * return. Each: `{ key, label, icon?, items: [] }`.\n\t\t *\n\t\t * Renders on BOTH paths. On the legacy list path each section is a\n\t\t * flat block; on the tabbed path each becomes a tab beside the\n\t\t * self-fetched ones, and a row click emits `select-extra` rather than\n\t\t * being deep-linked, because the host owns these rows and this widget\n\t\t * knows nothing about where they live.\n\t\t *\n\t\t * A section with no items renders nothing at all, so a host can bind\n\t\t * a section unconditionally and let it appear when it fills.\n\t\t *\n\t\t * `includeGroups` does NOT filter these. That whitelist scopes which\n\t\t * of the widget's OWN groups it fetches and shows; a section handed\n\t\t * over explicitly by the host is not one of those, and dropping it\n\t\t * would be silent.\n\t\t *\n\t\t * @type {Array<{ key: string, label: string, icon?: string, items: object[] }>}\n\t\t */\n\t\textraSections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Documentation link for the overflow Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Stable id forwarded to the widget chrome. Falls back to objectType. */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Section/tab heading for related objects. */\n\t\tobjectsLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Objects'),\n\t\t},\n\n\t\t/** Section/tab heading for files. */\n\t\tfilesLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Files'),\n\t\t},\n\n\t\t/** Section heading for the leaf-integration entry points (legacy list path). */\n\t\tlinkedAppsLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Linked apps'),\n\t\t},\n\n\t\t/**\n\t\t * Deprecated no-op label, kept for backward compatibility.\n\t\t *\n\t\t * @deprecated No longer rendered — tabbed mode deep-links each item to its\n\t\t * owning Nextcloud app instead of offering an open-in-sidebar action.\n\t\t */\n\t\topenInSidebarLabel: { // eslint-disable-line vue/no-unused-properties -- deprecated no-op, kept so apps still passing it do not leak it onto the DOM through $attrs.\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Open in sidebar'),\n\t\t},\n\n\t\t/**\n\t\t * Empty-state label shown when nothing is related. When left at its\n\t\t * default, a contextual label is derived instead: a widget scoped to a\n\t\t * single relation group (`includeGroups: ['files']`) shows\n\t\t * \"No files yet\", an unscoped one shows \"No relations yet\".\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Nothing related yet'),\n\t\t},\n\n\t\t/**\n\t\t * Render the \"Add\" footer (upload file / add note / per-group add\n\t\t * events) on the tabbed self-fetch path. Disable for read-only hosts.\n\t\t */\n\t\tshowAddFooter: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Suppress the tab strip when only one group is visible. A lone tab\n\t\t * repeats the widget title verbatim (\"Files\" card carrying a \"Files\"\n\t\t * tab), so hide it and let the card header stand alone.\n\t\t */\n\t\thideSingleTabTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Render a count pill beside the widget title totalling every visible\n\t\t * group. Keeps the count reachable once `hideSingleTabTitle` has taken\n\t\t * the sole tab — and its pill — away.\n\t\t */\n\t\tshowTotalCount: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: [\n\t\t'add',\n\t\t'file-uploaded',\n\t\t'note-added',\n\t\t'open-integration',\n\t\t'select-extra',\n\t\t'select-file',\n\t\t'select-object',\n\t\t'select-related',\n\t],\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/**\n\t\t\t * The file input element, set by the template's function ref (kept off `$refs` so the ref stays dynamic — see the template).\n\t\t\t *\n\t\t\t * @type {HTMLInputElement|null}\n\t\t\t */\n\t\t\tfileInputEl: null,\n\t\t\t/** Schema titles by numeric schema id, for object rows. */\n\t\t\tschemaTitles: {},\n\t\t\t/** Whether any section/tab is currently fetching. */\n\t\t\tloading: false,\n\t\t\t/** True once the first fetch has completed (gates the empty state). */\n\t\t\thasLoaded: false,\n\t\t\t/** Merged related-object rows (legacy list path). */\n\t\t\tobjectItems: [],\n\t\t\t/** File rows (legacy list path). */\n\t\t\tfileItems: [],\n\t\t\t/** Tab groups (tabbed self-fetch path): `{ key, label, icon, integrationId, items, total }`. */\n\t\t\tgroups: [],\n\t\t\t/** Active tab key. */\n\t\t\tactiveKey: '',\n\t\t\t/** Keys of the tabbed sections whose request is still in flight (`objects`, `files`, `relations`). */\n\t\t\tpendingSections: [],\n\t\t\t/** Tabbed sections whose request failed: `{ key, label }`. */\n\t\t\tfailedSections: [],\n\t\t\t/** Bumped per `loadTabs()`; an answer from an older load is dropped. */\n\t\t\tloadToken: 0,\n\t\t\t/** Key of the inline-expanded row (`{group}-{id}`) for leaves with no owning-app page (e.g. notes). */\n\t\t\texpandedKey: '',\n\t\t\t/** Whether a footer file upload is in flight. */\n\t\t\tuploading: false,\n\t\t\t/** Last add-footer error message (upload / note create). */\n\t\t\taddError: '',\n\t\t\t/** Bound text of the footer's \"Add note\" input. */\n\t\t\tnoteDraft: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The object-data record, guaranteed to be a plain object. The\n\t\t * `object-data` prop is often `null` while the host's object is still\n\t\t * loading (CnDetailPage binds `:object-data=\"currentObject\"`), so guard\n\t\t * it here — the resolver computeds below must never dereference null.\n\t\t *\n\t\t * @return {object} the object data, or an empty object.\n\t\t */\n\t\tsafeObjectData() {\n\t\t\treturn (this.objectData && typeof this.objectData === 'object') ? this.objectData : {}\n\t\t},\n\n\t\t/** Resolved object id — explicit prop wins, else from object data. */\n\t\tresolvedId() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.objectId || this.safeObjectData.id || self.id || ''\n\t\t},\n\n\t\t/** Resolved register slug — explicit prop wins, else from `@self`. */\n\t\tresolvedRegister() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.register || self.register || ''\n\t\t},\n\n\t\t/** Resolved schema slug — explicit prop wins, else from `@self`. */\n\t\tresolvedSchema() {\n\t\t\tconst self = this.safeObjectData['@self'] || {}\n\t\t\treturn this.schema || self.schema || ''\n\t\t},\n\n\t\t/** True when the tabbed self-fetch path is usable. */\n\t\tuseTabs() {\n\t\t\treturn this.layout === 'tabs'\n\t\t\t\t&& Boolean(this.resolvedRegister && this.resolvedSchema && this.resolvedId)\n\t\t},\n\n\t\t/**\n\t\t * The host's `extraSections`, normalised into the same group shape the\n\t\t * tab strip and the panel render. A section with no items is dropped,\n\t\t * so an unconditionally-bound section costs nothing until it fills.\n\t\t *\n\t\t * Kept as a COMPUTED rather than pushed into `groups` inside\n\t\t * `loadTabs()`: a host typically resolves these rows asynchronously\n\t\t * after mount (dossiq's planned follow-ups are one endpoint call), and\n\t\t * a value copied into `groups` at fetch time would never pick that up.\n\t\t *\n\t\t * @return {Array<object>} Group descriptors, `isExtra: true`.\n\t\t */\n\t\textraGroups() {\n\t\t\treturn (this.extraSections || [])\n\t\t\t\t.filter((section) => section && (section.items || []).length > 0)\n\t\t\t\t.map((section) => {\n\t\t\t\t\tconst items = section.items.map((raw, i) => ({\n\t\t\t\t\t\tid: String(raw?.id ?? i),\n\t\t\t\t\t\tlabel: raw?.label || raw?.title || raw?.name || '',\n\t\t\t\t\t\tmeta: typeof raw?.meta === 'string' ? raw.meta : '',\n\t\t\t\t\t\tdetail: '',\n\t\t\t\t\t\traw,\n\t\t\t\t\t}))\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: section.key,\n\t\t\t\t\t\tlabel: section.label,\n\t\t\t\t\t\ticon: section.icon || 'LinkVariant',\n\t\t\t\t\t\tintegrationId: '',\n\t\t\t\t\t\titems,\n\t\t\t\t\t\ttotal: items.length,\n\t\t\t\t\t\tisExtra: true,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Tab groups that have at least one item (tabbed path), honouring the\n\t\t * `includeGroups` whitelist when set.\n\t\t *\n\t\t * Host-supplied `extraSections` are appended and are deliberately NOT\n\t\t * subject to `includeGroups` — see the prop's docblock.\n\t\t */\n\t\tvisibleGroups() {\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\tconst own = this.groups.filter((group) => (group.total > 0 || group.items.length > 0)\n\t\t\t\t&& (allow.length === 0 || allow.includes(group.key)))\n\t\t\treturn [...own, ...this.extraGroups]\n\t\t},\n\n\t\t/**\n\t\t * Whether the tab strip renders. A single visible group makes the strip\n\t\t * a restatement of the card header, so `hideSingleTabTitle` drops it.\n\t\t *\n\t\t * @return {boolean} true when the tab strip should be shown.\n\t\t */\n\t\ttabStripVisible() {\n\t\t\tif (!this.visibleGroups.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !(this.hideSingleTabTitle && this.visibleGroups.length === 1)\n\t\t},\n\n\t\t/**\n\t\t * Items across every visible group — rendered as a pill beside the\n\t\t * widget title. Falls back to the loaded item count when a group\n\t\t * reports no server-side total.\n\t\t *\n\t\t * @return {number} the summed total.\n\t\t */\n\t\ttotalCount() {\n\t\t\treturn this.visibleGroups.reduce(\n\t\t\t\t(sum, group) => sum + (group.total || group.items.length || 0),\n\t\t\t\t0,\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * The line under the panel naming the sections still loading, once\n\t\t * another section is already on screen.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tpendingLabel() {\n\t\t\tconst labels = {\n\t\t\t\tobjects: this.objectsLabel,\n\t\t\t\tfiles: this.filesLabel,\n\t\t\t\trelations: t('nextcloud-vue', 'Linked items'),\n\t\t\t}\n\t\t\tconst names = this.pendingSections.map((key) => labels[key] || key).join(', ')\n\t\t\treturn t('nextcloud-vue', 'Still loading: {sections}', { sections: names })\n\t\t},\n\n\t\t/** Placeholder shown in the body while the first fetch is in flight. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/** The currently active group, defaulting to the first visible one. */\n\t\tactiveGroup() {\n\t\t\tif (!this.visibleGroups.length) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.visibleGroups.find((group) => group.key === this.activeKey) || this.visibleGroups[0]\n\t\t},\n\n\t\t/**\n\t\t * The owning-app link of each row in the active group, by index; ''\n\t\t * where the row routes through the host instead (related objects,\n\t\t * host-supplied sections, leaves without a page).\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tactiveGroupHrefs() {\n\t\t\tconst group = this.activeGroup\n\t\t\tif (!group || group.isExtra || group.key === 'objects') {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn group.items.map((item) => this.resolveItemHref(group.key, item.raw || {}))\n\t\t},\n\n\t\t/** Leaf integrations that can carry related content (legacy list path). */\n\t\tlinkedApps() {\n\t\t\tconst omit = new Set([...CORE_TABS, ...this.excludeIntegrations])\n\t\t\treturn (this.integrations || []).filter((entry) => !omit.has(entry.id))\n\t\t},\n\n\t\t/** True when every legacy section is empty. */\n\t\tisEmpty() {\n\t\t\tif (this.objectItems.length || this.fileItems.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (this.extraSections.some((s) => (s.items || []).length)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (this.showIntegrations && this.linkedApps.length) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\t/** Single configured relation group key, or '' when unscoped/multi. */\n\t\tsingleSourceKey() {\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\treturn allow.length === 1 ? allow[0] : ''\n\t\t},\n\n\t\t/**\n\t\t * Effective empty-state label: an explicit `emptyLabel` wins; otherwise\n\t\t * a single-source widget names its source (\"No files yet\") and an\n\t\t * unscoped/multi-source one shows the generic \"No relations yet\".\n\t\t */\n\t\tresolvedEmptyLabel() {\n\t\t\tconst legacyDefault = t('nextcloud-vue', 'Nothing related yet')\n\t\t\tif (this.emptyLabel && this.emptyLabel !== legacyDefault) {\n\t\t\t\treturn this.emptyLabel\n\t\t\t}\n\t\t\tif (this.singleSourceKey) {\n\t\t\t\treturn t('nextcloud-vue', 'No {source} yet', { source: this.groupLabelFor(this.singleSourceKey).toLowerCase() })\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'No relations yet')\n\t\t},\n\n\t\t/** Empty-state icon: the single source's own icon, else a generic link. */\n\t\temptyIconName() {\n\t\t\tif (this.singleSourceKey) {\n\t\t\t\treturn this.groupIconFor(this.singleSourceKey)\n\t\t\t}\n\t\t\treturn 'LinkVariant'\n\t\t},\n\n\t\t/** Whether the Add footer renders (prop + tabbed path with a real object). */\n\t\taddFooterVisible() {\n\t\t\treturn this.showAddFooter && this.useTabs && this.addableGroups.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Relation groups the footer can add to, honouring `includeGroups`\n\t\t * and the show* switches. Files and notes have built-in flows; other\n\t\t * groups surface an entry that emits `add` for the host to handle.\n\t\t */\n\t\taddableGroups() {\n\t\t\tconst candidates = [\n\t\t\t\t...(this.showObjects ? [{ key: 'objects', label: this.objectsLabel, icon: 'FileTreeOutline' }] : []),\n\t\t\t\t...(this.showFiles ? [{ key: 'files', label: this.filesLabel, icon: 'Paperclip' }] : []),\n\t\t\t\t...LEAF_GROUPS.map((def) => ({ key: def.key, label: this.leafLabel(def.key), icon: def.icon })),\n\t\t\t]\n\t\t\tconst allow = Array.isArray(this.includeGroups) ? this.includeGroups : []\n\t\t\tif (allow.length === 0) {\n\t\t\t\t// Unscoped widgets keep the footer focused on the two built-in\n\t\t\t\t// flows instead of listing every conceivable leaf group.\n\t\t\t\treturn candidates.filter((g) => ['files', 'notes'].includes(g.key))\n\t\t\t}\n\t\t\treturn candidates.filter((g) => allow.includes(g.key))\n\t\t},\n\n\t\t/** The only addable group when exactly one is configured, else null. */\n\t\tsoleAddable() {\n\t\t\treturn this.addableGroups.length === 1 ? this.addableGroups[0] : null\n\t\t},\n\n\t\t/** Addable groups without a built-in flow — rendered as emit-`add` entries. */\n\t\temitAddableGroups() {\n\t\t\treturn this.addableGroups.filter((g) => !['files', 'notes'].includes(g.key))\n\t\t},\n\t},\n\n\twatch: {\n\t\tresolvedId() {\n\t\t\tthis.loadAll()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadAll()\n\t\tsubscribe(REFRESH_BUS_CHANNEL, this.onBusRefresh)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe(REFRESH_BUS_CHANNEL, this.onBusRefresh)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Function ref for the file input. A method, so the binding is stable\n\t\t * across renders; being a function ref is what keeps the vnode dynamic.\n\t\t *\n\t\t * @param {HTMLInputElement|null} el The element, or null on unmount.\n\t\t * @return {void}\n\t\t */\n\t\tfileInputRef(el) {\n\t\t\tthis.fileInputEl = el || null\n\t\t},\n\n\t\t/**\n\t\t * Display label for a relation group key.\n\t\t *\n\t\t * @param {string} key - Group key (`objects`, `files`, or a leaf key).\n\t\t * @return {string}\n\t\t */\n\t\tgroupLabelFor(key) {\n\t\t\tif (key === 'objects') {\n\t\t\t\treturn this.objectsLabel\n\t\t\t}\n\t\t\tif (key === 'files') {\n\t\t\t\treturn this.filesLabel\n\t\t\t}\n\t\t\treturn this.leafLabel(key)\n\t\t},\n\n\t\t/**\n\t\t * Icon name for a relation group key.\n\t\t *\n\t\t * @param {string} key - Group key.\n\t\t * @return {string}\n\t\t */\n\t\tgroupIconFor(key) {\n\t\t\tif (key === 'objects') {\n\t\t\t\treturn 'FileTreeOutline'\n\t\t\t}\n\t\t\tif (key === 'files') {\n\t\t\t\treturn 'Paperclip'\n\t\t\t}\n\t\t\tconst def = LEAF_GROUPS.find((g) => g.key === key)\n\t\t\treturn (def && (this.integrationIcon(def.integrationId) || def.icon)) || 'LinkVariant'\n\t\t},\n\n\t\t/**\n\t\t * Whether a group is available to the Add footer.\n\t\t *\n\t\t * @param {string} key - Group key.\n\t\t * @return {boolean}\n\t\t */\n\t\tgroupAllowed(key) {\n\t\t\treturn this.addableGroups.some((g) => g.key === key)\n\t\t},\n\n\t\t/**\n\t\t * \"Add …\" label for a group entry.\n\t\t *\n\t\t * @param {{ key: string, label: string }} group - The addable group.\n\t\t * @return {string}\n\t\t */\n\t\taddLabelFor(group) {\n\t\t\treturn t('nextcloud-vue', 'Add {source}', { source: String(group.label || group.key).toLowerCase() })\n\t\t},\n\n\t\t/** Open the hidden file input for the footer upload flow. */\n\t\topenFilePicker() {\n\t\t\tthis.addError = ''\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.click()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Upload the picked files to the object and refresh the groups.\n\t\t *\n\t\t * @param {Event} event - The file input change event.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onFilesPicked(event) {\n\t\t\tconst files = Array.from((event.target && event.target.files) || [])\n\t\t\tevent.target.value = ''\n\t\t\tif (!files.length || this.uploading) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.uploading = true\n\t\t\tthis.addError = ''\n\t\t\ttry {\n\t\t\t\tconst formData = new FormData()\n\t\t\t\tfiles.forEach((file) => formData.append('files[]', file))\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/filesMultipart', {\n\t\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\t\tid: this.resolvedId,\n\t\t\t\t})\n\t\t\t\t// buildHeaders(null): let the browser set the multipart boundary.\n\t\t\t\tconst response = await fetch(url, { method: 'POST', headers: buildHeaders(null), body: formData })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`${response.status}`)\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * @event file-uploaded Files were uploaded via the Add footer.\n\t\t\t\t * @type {File[]}\n\t\t\t\t */\n\t\t\t\tthis.$emit('file-uploaded', files)\n\t\t\t\tawait this.loadAll()\n\t\t\t} catch {\n\t\t\t\tthis.addError = t('nextcloud-vue', 'Upload failed')\n\t\t\t} finally {\n\t\t\t\tthis.uploading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Create a note on the object from the footer's note input.\n\t\t *\n\t\t * Reads `noteDraft` rather than the submitted form: NcActionInput's\n\t\t * input carries no `name`, so a FormData lookup always comes back null\n\t\t * and the note is silently dropped.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onAddNote() {\n\t\t\tconst message = String(this.noteDraft || '').trim()\n\t\t\tif (!message) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.addError = ''\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/notes', {\n\t\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\t\tid: this.resolvedId,\n\t\t\t\t})\n\t\t\t\tconst response = await fetch(url, {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\theaders: buildHeaders(),\n\t\t\t\t\tbody: JSON.stringify({ message }),\n\t\t\t\t})\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthrow new Error(`${response.status}`)\n\t\t\t\t}\n\t\t\t\tthis.noteDraft = ''\n\t\t\t\t/**\n\t\t\t\t * @event note-added A note was created via the Add footer.\n\t\t\t\t * @type {string}\n\t\t\t\t */\n\t\t\t\tthis.$emit('note-added', message)\n\t\t\t\tawait this.loadAll()\n\t\t\t} catch {\n\t\t\t\tthis.addError = t('nextcloud-vue', 'Could not add note')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Emit the add request for groups without a built-in flow.\n\t\t *\n\t\t * @param {string} key - The group key (objects, mails, events, …).\n\t\t */\n\t\tonAddGroup(key) {\n\t\t\t/**\n\t\t\t * @event add An Add-footer entry without a built-in flow was\n\t\t\t * activated; the host routes it (e.g. open a link-object dialog).\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('add', key)\n\t\t},\n\n\t\t/**\n\t\t * Emit the related-object selection for the host to route.\n\t\t *\n\t\t * @param {object} raw - The related object record.\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object A related-object row was clicked.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-object', raw)\n\t\t},\n\n\t\t/**\n\t\t * Emit the file selection for the host to route.\n\t\t *\n\t\t * @param {object} raw - The file record.\n\t\t */\n\t\tonSelectFile(raw) {\n\t\t\t/**\n\t\t\t * @event select-file A file row was clicked.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-file', raw)\n\t\t},\n\n\t\t/**\n\t\t * Handle a click on a tabbed-path row that has no owning-app link\n\t\t * (rows with one render as a real `<a>`): emit a host-routed event.\n\t\t * Related objects always route through the host (their owning app's\n\t\t * detail page).\n\t\t *\n\t\t * @param {object} group - The active group descriptor.\n\t\t * @param {object} item - The clicked, normalised row (`item.raw` is the record).\n\t\t */\n\t\tonSelectGroupItem(group, item) {\n\t\t\t// A host-supplied section's rows belong to the host: this widget\n\t\t\t// did not fetch them and has no owning-app page to deep-link to,\n\t\t\t// so the click goes straight back out as `select-extra` — the same\n\t\t\t// event the legacy list path emits for the same rows.\n\t\t\tif (group.isExtra) {\n\t\t\t\tthis.onSelectExtra(group.key, item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (group.key === 'objects') {\n\t\t\t\tthis.onSelectObject(item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (group.key === 'files') {\n\t\t\t\tthis.onSelectFile(item.raw)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// No owning-app page to deep-link to (e.g. notes are NC comments) —\n\t\t\t// toggle the body text inline so the click does something useful\n\t\t\t// instead of silently nothing.\n\t\t\tif (item.detail) {\n\t\t\t\tconst key = `${group.key}-${item.id}`\n\t\t\t\tthis.expandedKey = (this.expandedKey === key) ? '' : key\n\t\t\t}\n\t\t\t/**\n\t\t\t * @event select-related A leaf-group row (mails, events, …) was clicked\n\t\t\t * and no owning-app deep link could be resolved.\n\t\t\t * @type {{ group: string, item: object }}\n\t\t\t */\n\t\t\tthis.$emit('select-related', { group: group.key, item: item.raw })\n\t\t},\n\n\t\t/**\n\t\t * Whether a row is currently inline-expanded (no-deep-link leaves).\n\t\t *\n\t\t * @param {string} groupKey - The active group key.\n\t\t * @param {object} item - The normalised row.\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded(groupKey, item) {\n\t\t\treturn this.expandedKey === `${groupKey}-${item.id}`\n\t\t},\n\n\t\t/**\n\t\t * Resolve the owning-app deep link for a related item, or '' when none\n\t\t * can be built (the caller then falls back to a host-routed event).\n\t\t *\n\t\t * @param {string} groupKey - The group key (files, contacts, deck, …).\n\t\t * @param {object} raw - The leaf/file record.\n\t\t * @return {string} A Nextcloud URL, or '' when unresolved.\n\t\t */\n\t\tresolveItemHref(groupKey, raw) {\n\t\t\t// A record may carry its own absolute owning-app link.\n\t\t\tif (raw.url || raw.link || raw.accessUrl) {\n\t\t\t\treturn raw.url || raw.link || raw.accessUrl\n\t\t\t}\n\t\t\t// Files → canonical Nextcloud file permalink (Files + Viewer).\n\t\t\tif (groupKey === 'files') {\n\t\t\t\tconst fileid = raw.id || raw.fileid\n\t\t\t\treturn fileid ? generateUrl('/f/{fileid}', { fileid: String(fileid) }) : ''\n\t\t\t}\n\t\t\t// Contacts → open the contact card in the Contacts app.\n\t\t\tif (groupKey === 'contacts' && raw.contactUid) {\n\t\t\t\tconst key = raw.addressbookId !== null && raw.addressbookId !== undefined ? `${raw.contactUid}~${raw.addressbookId}` : String(raw.contactUid)\n\t\t\t\treturn generateUrl('/apps/contacts/All contacts/{key}', { key })\n\t\t\t}\n\t\t\t// Deck → open the card on its board.\n\t\t\tif (groupKey === 'deck' && raw.boardId && (raw.cardId || raw.id)) {\n\t\t\t\treturn generateUrl('/apps/deck/board/{board}/card/{card}', { board: String(raw.boardId), card: String(raw.cardId || raw.id) })\n\t\t\t}\n\t\t\t// Tasks → open the task in the Tasks app.\n\t\t\tif (groupKey === 'tasks') {\n\t\t\t\tconst cal = raw.calendarId || raw.calendarUri\n\t\t\t\tconst task = raw.uri || raw.uid || raw.id\n\t\t\t\tif (cal && task) {\n\t\t\t\t\treturn generateUrl('/apps/tasks/#/calendars/{cal}/tasks/{task}', { cal: String(cal), task: String(task) })\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Meetings/events → open the event in the Calendar app (dav path, base64url).\n\t\t\tif (groupKey === 'events') {\n\t\t\t\tconst cal = raw.calendarUri || raw.calendarId\n\t\t\t\tconst ev = raw.uri || (raw.uid ? `${raw.uid}.ics` : '')\n\t\t\t\tif (cal && ev) {\n\t\t\t\t\tconst token = btoa(`${cal}/${ev}`).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n\t\t\t\t\treturn generateUrl('/apps/calendar/edit/{token}', { token })\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Mails → open the message in the Mail app.\n\t\t\tif (groupKey === 'mails' && (raw.messageId || raw.id)) {\n\t\t\t\treturn generateUrl('/apps/mail/box/0/{id}', { id: String(raw.messageId || raw.id) })\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\t/**\n\t\t * The registered integration's icon name, or '' when not registered.\n\t\t *\n\t\t * @param {string} integrationId - The integration id.\n\t\t * @return {string}\n\t\t */\n\t\tintegrationIcon(integrationId) {\n\t\t\tif (!integrationId || typeof this.getById !== 'function') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst entry = this.getById(integrationId)\n\t\t\treturn (entry && entry.icon) || ''\n\t\t},\n\n\t\t/**\n\t\t * Emit a click in a host-supplied extra section. Reached from both\n\t\t * paths: the legacy list's own rows, and a tabbed-path row whose\n\t\t * group came from `extraSections`.\n\t\t *\n\t\t * @param {string} sectionKey - The section's key.\n\t\t * @param {object} item - The clicked item.\n\t\t */\n\t\tonSelectExtra(sectionKey, item) {\n\t\t\t/**\n\t\t\t * @event select-extra A row in a host-supplied `extraSections`\n\t\t\t * group was clicked, on either the list or the tabbed path.\n\t\t\t * @type {{ section: string, item: object }}\n\t\t\t */\n\t\t\tthis.$emit('select-extra', { section: sectionKey, item })\n\t\t},\n\n\t\t/**\n\t\t * Emit the leaf-integration open request for the host to route\n\t\t * (the detail-page auto-body deep-links the sidebar tab).\n\t\t *\n\t\t * @param {string} integrationId - The leaf integration id.\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration A \"Linked apps\" row or a tab's\n\t\t\t * \"open in sidebar\" affordance was activated.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('open-integration', integrationId)\n\t\t},\n\n\t\t/**\n\t\t * Build an OpenRegister object sub-resource URL.\n\t\t *\n\t\t * @param {string} suffix - The sub-resource (e.g. 'relations', 'uses', 'files').\n\t\t * @return {string} The fully-qualified API URL.\n\t\t */\n\t\trelatedUrl(suffix) {\n\t\t\treturn generateUrl('/apps/openregister/api/objects/{register}/{schema}/{id}/{suffix}', {\n\t\t\t\tregister: this.resolvedRegister,\n\t\t\t\tschema: this.resolvedSchema,\n\t\t\t\tid: this.resolvedId,\n\t\t\t\tsuffix,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * GET an OpenRegister sub-resource, returning the parsed JSON or null.\n\t\t *\n\t\t * @param {string} suffix - The sub-resource suffix.\n\t\t * @return {Promise<object|null>}\n\t\t */\n\t\tasync fetchSubResource(suffix) {\n\t\t\treturn (await this.fetchSection(suffix)).data\n\t\t},\n\n\t\t/**\n\t\t * GET an OpenRegister sub-resource and say whether it answered, so a\n\t\t * section can tell \"nothing linked\" from \"could not load\".\n\t\t *\n\t\t * @param {string} suffix - The sub-resource suffix.\n\t\t * @return {Promise<{ ok: boolean, data: object|null }>}\n\t\t */\n\t\tasync fetchSection(suffix) {\n\t\t\ttry {\n\t\t\t\t// `no-store`: relations change as the user links content; a stale\n\t\t\t\t// cached empty response would wrongly show the empty state on load.\n\t\t\t\tconst response = await fetch(this.relatedUrl(suffix), { method: 'GET', headers: buildHeaders(), cache: 'no-store' })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\treturn { ok: false, data: null }\n\t\t\t\t}\n\t\t\t\treturn { ok: true, data: await response.json() }\n\t\t\t} catch {\n\t\t\t\treturn { ok: false, data: null }\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Resolve the object store: explicit prop first, then Pinia (legacy path).\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tgetStore() {\n\t\t\tif (this.store) {\n\t\t\t\treturn this.store\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (!this.$pinia) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\treturn useObjectStore()\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Normalise a related object into a display row.\n\t\t *\n\t\t * @param {object} raw - The related object record.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoObjectRow(raw) {\n\t\t\tconst self = raw['@self'] || {}\n\t\t\tconst id = raw.id || self.id || self.uuid || ''\n\t\t\tconst isUuid = (v) => typeof v === 'string' && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v.trim())\n\t\t\t// Pick a human label. Skip `@self.name` when OpenRegister has fallen\n\t\t\t// back to the bare uuid (schemas with no configured name field), and\n\t\t\t// cover common display properties across schemas — including Dutch\n\t\t\t// ones (onderwerp, omschrijving, naam, titel) — before the schema/id.\n\t\t\tconst label = [\n\t\t\t\traw.title,\n\t\t\t\traw.name,\n\t\t\t\traw.displayName,\n\t\t\t\traw.label,\n\t\t\t\traw.onderwerp,\n\t\t\t\traw.subject,\n\t\t\t\traw.omschrijving,\n\t\t\t\traw.naam,\n\t\t\t\traw.titel,\n\t\t\t\tself.title,\n\t\t\t\tself.name,\n\t\t\t\traw.summary,\n\t\t\t\traw.description,\n\t\t\t].find((v) => typeof v === 'string' && v.trim() && !isUuid(v))\n\t\t\t|| [raw.givenName, raw.familyName].filter((v) => typeof v === 'string' && v.trim()).join(' ')\n\t\t\t// OpenRegister names the schema by numeric id: show its title, never the number.\n\t\t\tconst schema = this.schemaName(self.schema || raw.schema)\n\t\t\tconst finalLabel = label || schema || String(id)\n\t\t\treturn { id, label: finalLabel, meta: schema === finalLabel ? '' : schema, raw }\n\t\t},\n\n\t\t/**\n\t\t * How a row names its schema: the translated title for a numeric id\n\t\t * (empty until it is read, or when it cannot be), a slug as it is.\n\t\t *\n\t\t * @param {string|number|undefined|null} schema - `@self.schema` of the related object.\n\t\t * @return {string}\n\t\t */\n\t\tschemaName(schema) {\n\t\t\tif (isNumericId(schema)) {\n\t\t\t\tconst title = this.schemaTitles[String(schema).trim()]\n\t\t\t\treturn title ? this.cnTranslate(title) : ''\n\t\t\t}\n\t\t\treturn typeof schema === 'string' ? schema : ''\n\t\t},\n\n\t\t/**\n\t\t * Read the titles of the numeric schema ids in these envelopes once,\n\t\t * before the rows are built, so no row shows a number first.\n\t\t *\n\t\t * @param {Array<object|null>} envelopes - The `{ results }` payloads.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync resolveSchemaTitles(envelopes) {\n\t\t\tconst ids = new Set()\n\t\t\tfor (const envelope of envelopes) {\n\t\t\t\tfor (const raw of ((envelope && envelope.results) || [])) {\n\t\t\t\t\tconst schema = (raw && (raw['@self'] || {}).schema) ?? (raw && raw.schema)\n\t\t\t\t\tif (isNumericId(schema)) {\n\t\t\t\t\t\tids.add(String(schema).trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst titles = { ...this.schemaTitles }\n\t\t\tawait Promise.all([...ids].filter((id) => !(id in titles)).map(async (id) => {\n\t\t\t\tif (!schemaTitleCache.has(id)) {\n\t\t\t\t\tschemaTitleCache.set(id, this.fetchSchemaTitle(id))\n\t\t\t\t}\n\t\t\t\ttitles[id] = await schemaTitleCache.get(id)\n\t\t\t}))\n\t\t\tthis.schemaTitles = titles\n\t\t},\n\n\t\t/**\n\t\t * GET one schema's title; '' when it cannot be read.\n\t\t *\n\t\t * @param {string} id - The numeric schema id.\n\t\t * @return {Promise<string>}\n\t\t */\n\t\tasync fetchSchemaTitle(id) {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(generateUrl('/apps/openregister/api/schemas/{id}', { id }), { method: 'GET', headers: buildHeaders() })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\treturn ''\n\t\t\t\t}\n\t\t\t\tconst schema = await response.json()\n\t\t\t\tconst title = schema && (schema.title || schema.slug)\n\t\t\t\treturn typeof title === 'string' ? title : ''\n\t\t\t} catch {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Normalise a file record into a display row.\n\t\t *\n\t\t * @param {object} raw - The file record.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoFileRow(raw) {\n\t\t\tconst id = raw.id || raw.fileid || raw.name || ''\n\t\t\tconst label = raw.name || raw.title || raw.basename || String(id)\n\t\t\tconst size = raw.size !== null && raw.size !== undefined ? this.formatSize(raw.size) : ''\n\t\t\treturn { id, label, meta: size, raw }\n\t\t},\n\n\t\t/**\n\t\t * Normalise a leaf-relation record (mail, event, contact, …) into a row.\n\t\t *\n\t\t * @param {object} raw - The leaf record.\n\t\t * @param {number} index - Position fallback for the id.\n\t\t * @return {{ id: string, label: string, meta: string, raw: object }}\n\t\t */\n\t\ttoLeafRow(raw, index) {\n\t\t\tconst id = raw.id || raw.uuid || raw.uri || `leaf-${index}`\n\t\t\t// Leaf shapes vary by type: contacts use displayName, events/tasks use\n\t\t\t// summary, mails use subject, deck uses cardTitle, polls use question,\n\t\t\t// talk uses roomName, notes/comments use message — fall back through the\n\t\t\t// union of known title fields so no leaf renders its numeric link id.\n\t\t\tconst label = raw.title || raw.cardTitle || raw.albumName || raw.displayName\n\t\t\t\t|| raw.fullName || raw.summary || raw.subject || raw.question || raw.roomName\n\t\t\t\t|| raw.projectName || raw.reportName || raw.name || raw.basename\n\t\t\t\t|| raw.message || raw.content || raw.label || String(id)\n\t\t\tconst meta = raw.date || raw.linkedAt || raw.createdAt || ''\n\t\t\t// Body text for leaves that have no owning-app page (notes/comments) —\n\t\t\t// shown inline on click since there's nowhere to deep-link to.\n\t\t\tconst detail = raw.content || raw.message || raw.description || raw.comment || ''\n\t\t\treturn {\n\t\t\t\tid: String(id),\n\t\t\t\tlabel,\n\t\t\t\tmeta: typeof meta === 'string' ? meta : '',\n\t\t\t\tdetail: typeof detail === 'string' ? detail : '',\n\t\t\t\traw,\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Human-readable byte size.\n\t\t *\n\t\t * @param {number} bytes - Raw byte count.\n\t\t * @return {string}\n\t\t */\n\t\tformatSize(bytes) {\n\t\t\tif (!Number.isFinite(bytes)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst units = ['B', 'KB', 'MB', 'GB']\n\t\t\tlet n = bytes\n\t\t\tlet u = 0\n\t\t\twhile (n >= 1024 && u < units.length - 1) {\n\t\t\t\tn /= 1024\n\t\t\t\tu++\n\t\t\t}\n\t\t\treturn `${n.toFixed(u === 0 ? 0 : 1)} ${units[u]}`\n\t\t},\n\n\t\t/**\n\t\t * Dispatch to the tabbed self-fetch or the legacy store path.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadAll() {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tif (this.useTabs) {\n\t\t\t\t\tawait this.loadTabs()\n\t\t\t\t} else {\n\t\t\t\t\tawait this.loadViaStore()\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t\tthis.hasLoaded = true\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Fetch every group directly from OpenRegister and build the tabs,\n\t\t * one section at a time.\n\t\t *\n\t\t * 🔴 EACH SECTION SHOWS WHEN ITS OWN REQUEST RETURNS. This used to wait\n\t\t * for relations, uses, used, contracts and files together behind one\n\t\t * `Promise.all`, so the relations call (0.45 s on pipelinq's lead page)\n\t\t * sat behind uses/used (about 9 s) and the card said \"Loading …\" the\n\t\t * whole time. Now the groups are laid out up front in their fixed order\n\t\t * and filled in place as each answer arrives, so a slow section never\n\t\t * reorders or hides a fast one. A section still in flight is named in\n\t\t * `pendingSections`; one whose request failed in `failedSections`.\n\t\t *\n\t\t * @spec openspec/changes/r4-object-lock-url-and-credentials-copy/specs/related-objects-progressive/spec.md\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadTabs() {\n\t\t\tconst token = ++this.loadToken\n\t\t\tconst current = () => token === this.loadToken\n\t\t\tthis.loading = true\n\t\t\tthis.failedSections = []\n\n\t\t\tconst objectSuffixes = this.showObjects\n\t\t\t\t? ['uses', 'used', ...(this.showContracts ? ['contracts'] : [])]\n\t\t\t\t: []\n\t\t\tconst sections = [\n\t\t\t\t...(this.showObjects ? [{ key: 'objects', label: this.objectsLabel }] : []),\n\t\t\t\t...(this.showFiles ? [{ key: 'files', label: this.filesLabel }] : []),\n\t\t\t\t{ key: 'relations', label: t('nextcloud-vue', 'Linked items') },\n\t\t\t]\n\t\t\tthis.pendingSections = sections.map((section) => section.key)\n\n\t\t\t// Lay out every group now, in its fixed order, empty. visibleGroups\n\t\t\t// hides an empty group, so nothing shows until a section fills it.\n\t\t\tconst groups = []\n\t\t\tif (this.showObjects) {\n\t\t\t\tgroups.push({ key: 'objects', label: this.objectsLabel, icon: 'FileTreeOutline', integrationId: '', items: [], total: 0 })\n\t\t\t}\n\t\t\tif (this.showFiles) {\n\t\t\t\tgroups.push({ key: 'files', label: this.filesLabel, icon: 'Paperclip', integrationId: 'files', items: [], total: 0 })\n\t\t\t}\n\t\t\tfor (const def of LEAF_GROUPS) {\n\t\t\t\tgroups.push({\n\t\t\t\t\tkey: def.key,\n\t\t\t\t\tlabel: this.leafLabel(def.key),\n\t\t\t\t\t// Prefer the registered integration's icon so it matches the\n\t\t\t\t\t// sidebar/linked-apps; fall back to the known-good default.\n\t\t\t\t\ticon: this.integrationIcon(def.integrationId) || def.icon,\n\t\t\t\t\tintegrationId: def.integrationId,\n\t\t\t\t\trequiredApp: def.requiredApp,\n\t\t\t\t\titems: [],\n\t\t\t\t\ttotal: 0,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthis.groups = groups\n\n\t\t\tconst setGroup = (key, items, total) => {\n\t\t\t\tconst index = this.groups.findIndex((group) => group.key === key)\n\t\t\t\tif (index === -1) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst next = this.groups.slice()\n\t\t\t\tnext[index] = { ...next[index], items, total }\n\t\t\t\tthis.groups = next\n\t\t\t}\n\t\t\tconst settle = (key, ok) => {\n\t\t\t\tthis.pendingSections = this.pendingSections.filter((k) => k !== key)\n\t\t\t\tif (!ok) {\n\t\t\t\t\tconst section = sections.find((s) => s.key === key)\n\t\t\t\t\tthis.failedSections = [...this.failedSections, { key, label: section ? section.label : key }]\n\t\t\t\t}\n\t\t\t\t// Keep the tab the reader saw first: pin it, so a slower section\n\t\t\t\t// that sorts before it does not take the panel away.\n\t\t\t\tif (!this.activeKey && this.visibleGroups.length) {\n\t\t\t\t\tthis.activeKey = this.visibleGroups[0].key\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst loadRelations = this.fetchSection('relations').then(({ ok, data }) => {\n\t\t\t\tif (!current()) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tfor (const def of LEAF_GROUPS) {\n\t\t\t\t\tconst block = data && data[def.responseKey]\n\t\t\t\t\tconst results = (block && block.results) || []\n\t\t\t\t\tsetGroup(def.key, results.map((r, i) => this.toLeafRow(r, i)), block ? (block.total ?? results.length) : 0)\n\t\t\t\t}\n\t\t\t\tsettle('relations', ok)\n\t\t\t})\n\n\t\t\tconst loadFiles = this.showFiles\n\t\t\t\t? this.fetchSection('files').then(({ ok, data }) => {\n\t\t\t\t\t\tif (!current()) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst fileResults = (data && data.results) || []\n\t\t\t\t\t\tsetGroup('files', fileResults.map((f) => this.toFileRow(f)), data ? (data.total ?? fileResults.length) : 0)\n\t\t\t\t\t\tsettle('files', ok)\n\t\t\t\t\t})\n\t\t\t\t: null\n\n\t\t\t// uses, used and contracts merge into one Objects group: each answer\n\t\t\t// re-merges what has arrived so far, and the group stays pending\n\t\t\t// until the last of them is in.\n\t\t\tconst envelopes = objectSuffixes.map(() => null)\n\t\t\tlet objectsOk = true\n\t\t\tconst loadObjects = objectSuffixes.length\n\t\t\t\t? Promise.all(objectSuffixes.map((suffix, i) => this.fetchSection(suffix).then(async ({ ok, data }) => {\n\t\t\t\t\t\tif (!current()) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tobjectsOk = objectsOk && ok\n\t\t\t\t\t\tenvelopes[i] = data\n\t\t\t\t\t\tawait this.resolveSchemaTitles([data])\n\t\t\t\t\t\tif (!current()) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst objectItems = this.mergeObjectResults(envelopes)\n\t\t\t\t\t\tsetGroup('objects', objectItems, objectItems.length)\n\t\t\t\t\t}))).then(() => {\n\t\t\t\t\t\tif (current()) {\n\t\t\t\t\t\t\tsettle('objects', objectsOk)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t: null\n\n\t\t\ttry {\n\t\t\t\tawait Promise.all([loadRelations, loadFiles, loadObjects])\n\t\t\t} finally {\n\t\t\t\tif (current()) {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t\tthis.pendingSections = []\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Merge uses/used/contracts result envelopes into deduped object rows.\n\t\t *\n\t\t * @param {Array<object|null>} envelopes - The `{ results }` payloads.\n\t\t * @return {Array<{ id: string, label: string, meta: string, raw: object }>}\n\t\t */\n\t\tmergeObjectResults(envelopes) {\n\t\t\tconst seen = new Set()\n\t\t\tconst merged = []\n\t\t\tfor (const envelope of envelopes) {\n\t\t\t\tfor (const raw of ((envelope && envelope.results) || [])) {\n\t\t\t\t\tconst row = this.toObjectRow(raw)\n\t\t\t\t\tconst key = String(row.id)\n\t\t\t\t\tif (key && seen.has(key)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tif (key) {\n\t\t\t\t\t\tseen.add(key)\n\t\t\t\t\t}\n\t\t\t\t\tmerged.push(row)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\t/**\n\t\t * Translated label for a leaf group key.\n\t\t *\n\t\t * @param {string} key - The group key.\n\t\t * @return {string}\n\t\t */\n\t\tleafLabel(key) {\n\t\t\tconst labels = {\n\t\t\t\tmails: t('nextcloud-vue', 'Mails'),\n\t\t\t\tevents: t('nextcloud-vue', 'Meetings'),\n\t\t\t\tcontacts: t('nextcloud-vue', 'Contacts'),\n\t\t\t\tnotes: t('nextcloud-vue', 'Notes'),\n\t\t\t\ttasks: t('nextcloud-vue', 'Tasks'),\n\t\t\t\tdeck: t('nextcloud-vue', 'Deck'),\n\t\t\t\ttalk: t('nextcloud-vue', 'Talk'),\n\t\t\t\tforms: t('nextcloud-vue', 'Forms'),\n\t\t\t\tmaps: t('nextcloud-vue', 'Maps'),\n\t\t\t\tpolls: t('nextcloud-vue', 'Polls'),\n\t\t\t\tbookmarks: t('nextcloud-vue', 'Bookmarks'),\n\t\t\t\tcollectives: t('nextcloud-vue', 'Collectives'),\n\t\t\t\tphotos: t('nextcloud-vue', 'Photos'),\n\t\t\t\tcospend: t('nextcloud-vue', 'Cospend'),\n\t\t\t\ttimetracker: t('nextcloud-vue', 'Time tracking'),\n\t\t\t\tanalytics: t('nextcloud-vue', 'Analytics'),\n\t\t\t\tflow: t('nextcloud-vue', 'Flows'),\n\t\t\t\topenproject: t('nextcloud-vue', 'OpenProject'),\n\t\t\t\txwiki: t('nextcloud-vue', 'Wiki'),\n\t\t\t}\n\t\t\treturn labels[key] || key\n\t\t},\n\n\t\t/**\n\t\t * Legacy store-action path: fetch relations/files from the object store.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadViaStore() {\n\t\t\tif (!legacyWarned) {\n\t\t\t\tlegacyWarned = true\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnRelatedObjectsWidget] The store-action list path is deprecated; pass an object with `@self` (or register/schema props) to use the tabbed self-fetch path.')\n\t\t\t}\n\n\t\t\tconst store = this.getStore()\n\t\t\tconst type = this.objectType\n\t\t\tconst id = this.resolvedId\n\t\t\tif (!store || !type || !id) {\n\t\t\t\tthis.objectItems = []\n\t\t\t\tthis.fileItems = []\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tif (this.showObjects) {\n\t\t\t\t\tconst calls = []\n\t\t\t\t\tif (typeof store.fetchUses === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchUses(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof store.fetchUsed === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchUsed(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof store.fetchContracts === 'function') {\n\t\t\t\t\t\tcalls.push(store.fetchContracts(type, id))\n\t\t\t\t\t}\n\t\t\t\t\tconst groups = await Promise.all(calls)\n\t\t\t\t\tawait this.resolveSchemaTitles(groups.map((results) => ({ results: results || [] })))\n\t\t\t\t\tconst seen = new Set()\n\t\t\t\t\tconst merged = []\n\t\t\t\t\tfor (const group of groups) {\n\t\t\t\t\t\tfor (const raw of (group || [])) {\n\t\t\t\t\t\t\tconst row = this.toObjectRow(raw)\n\t\t\t\t\t\t\tconst key = String(row.id)\n\t\t\t\t\t\t\tif (key && seen.has(key)) {\n\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (key) {\n\t\t\t\t\t\t\t\tseen.add(key)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmerged.push(row)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.objectItems = merged\n\t\t\t\t}\n\n\t\t\t\tif (this.showFiles && typeof store.fetchFiles === 'function') {\n\t\t\t\t\tconst files = await store.fetchFiles(type, id)\n\t\t\t\t\tthis.fileItems = (files || []).map((f) => this.toFileRow(f))\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Refetch when the shared widget Refresh fires for this widget.\n\t\t *\n\t\t * @param {{ widgetId: string }} payload - Bus payload.\n\t\t */\n\t\tonBusRefresh(payload) {\n\t\t\tconst mine = this.widgetId || this.objectType\n\t\t\tif (!payload || !payload.widgetId || !mine || payload.widgetId === mine) {\n\t\t\t\tthis.loadAll()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-related-objects-widget__group {\n\tpadding: calc(2 * var(--default-grid-baseline, 4px)) 0;\n}\n\n.cn-related-objects-widget__group + .cn-related-objects-widget__group {\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-related-objects-widget__group-title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tmargin: 0 0 4px;\n\tpadding: 0 calc(2 * var(--default-grid-baseline, 4px));\n\tfont-size: 0.8em;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.02em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tpadding: calc(1.5 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-related-objects-widget__tab {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 10px;\n\tborder: none;\n\tborder-radius: var(--border-radius-pill, 16px);\n\tbackground: transparent;\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-related-objects-widget__tab:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-related-objects-widget__tab--active {\n\tbackground: var(--color-primary-element-light, var(--color-background-dark));\n\tcolor: var(--color-primary-element-light-text, var(--color-main-text));\n}\n\n.cn-related-objects-widget__tab:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-related-objects-widget__tab-icon {\n\tflex: 0 0 auto;\n}\n\n.cn-related-objects-widget__panel-actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tpadding: 4px calc(2 * var(--default-grid-baseline, 4px)) 0;\n}\n\n.cn-related-objects-widget__open-sidebar {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 2px 8px;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__open-sidebar:hover {\n\ttext-decoration: underline;\n}\n\n.cn-related-objects-widget__count {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-width: 18px;\n\theight: 18px;\n\tpadding: 0 5px;\n\tborder-radius: 9px;\n\tbackground: var(--color-background-dark);\n\tfont-size: 0.9em;\n\tfont-weight: 600;\n}\n\n.cn-related-objects-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-related-objects-widget__row {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 10px;\n\tpadding: calc(1.5 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tcursor: pointer;\n\tborder-radius: var(--border-radius);\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\n.cn-related-objects-widget__detail {\n\tflex-basis: 100%;\n\tmargin: 4px 0 0 calc(20px + 10px);\n\tpadding: 8px 10px;\n\tfont-size: 0.9em;\n\twhite-space: pre-wrap;\n\toverflow-wrap: anywhere;\n\tcolor: var(--color-main-text);\n\tbackground: var(--color-background-hover);\n\tborder-radius: var(--border-radius);\n}\n\n.cn-related-objects-widget__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-related-objects-widget__row:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-related-objects-widget__icon {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--color-main-text);\n}\n\n.cn-related-objects-widget__meta {\n\tflex: 0 0 auto;\n\tfont-size: 0.85em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__chevron {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__empty {\n\tpadding: calc(3 * var(--default-grid-baseline, 4px)) calc(2 * var(--default-grid-baseline, 4px));\n\tcolor: var(--color-text-maxcontrast);\n\tfont-style: italic;\n}\n\n.cn-related-objects-widget__section-status {\n\tmargin: 0;\n\tpadding: var(--default-grid-baseline, 4px) calc(2 * var(--default-grid-baseline, 4px));\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__section-error {\n\tmargin: 0;\n\tpadding: var(--default-grid-baseline, 4px) calc(2 * var(--default-grid-baseline, 4px));\n\tcolor: var(--color-error-text, var(--color-error));\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__empty-state {\n\t/* NcEmptyContent defaults to filling tall parents; inside a widget cell a\n\t compact block reads better. */\n\tpadding: calc(4 * var(--default-grid-baseline, 4px)) 0;\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-related-objects-widget__footer {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: calc(2 * var(--default-grid-baseline, 4px));\n\tpadding: calc(2 * var(--default-grid-baseline, 4px));\n}\n\n.cn-related-objects-widget__add-error {\n\tcolor: var(--color-error);\n\tfont-size: 0.85em;\n}\n\n.cn-related-objects-widget__file-input {\n\tdisplay: none;\n}\n</style>\n"],"names":["CnWidgetWrapper","CnIcon","FileTreeOutline","CnEmptyContent","t"],"mappings":";;;;;;;;;;;;;;;;AAqTA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,GAAC;;AAEzB;AACA,MAAM,sBAAsB,oBAAkB;;AAE9C;AACA,MAAM,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAA;;AAE5E;AACA,IAAI,YAAW,GAAI,MAAI;;AAEvB;;;;AAIC;AACA;;AAED,MAAM,gBAAiB,GAAE,IAAI,GAAG,GAAC;;AAEjC;AACC;AACA;;AAEA;;AAED,SAAS,WAAW,CAAC,KAAK,EAAE;CAC3B,OAAO,CAAC,OAAO,KAAM,KAAI,QAAO,IAAK,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;MACtD,OAAO,KAAM,KAAI,QAAS,IAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,I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