@conduction/nextcloud-vue 2.145.0 → 2.146.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/CnAiCompanion/CnAiChatPanel.vue2.js.map +1 -1
- package/dist/esm/components/CnAiCompanion/CnAiChatPanel.vue3.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +12 -2
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +42 -30
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +22 -0
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +46 -8
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +3 -3
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js +1 -0
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js +21 -2
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue.js +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +601 -280
- package/dist/esm/utils/detailObjectContext.js +7 -2
- package/dist/esm/utils/detailObjectContext.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/visibleWhen.js +6 -0
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +175 -63
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +601 -280
- package/package.json +1 -1
- package/src/components/CnAiCompanion/CnAiChatPanel.vue +3 -0
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +4 -2
- package/src/components/CnDataTable/CnDataTable.vue +19 -2
- package/src/components/CnDetailPage/CnDetailPage.md +1 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +23 -0
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +1 -0
- package/src/components/CnFactsWidget/CnFactsWidget.vue +74 -9
- package/src/components/CnNotesCard/CnNotesCard.vue +7 -2
- package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +21 -2
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +1 -0
- package/src/components/CnRetentionWidget/CnRetentionWidget.vue +2 -0
- package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -1
- package/src/css/dialog.css +7 -0
- package/src/css/look-board-detail.css +152 -8
- package/src/css/look-board-index.css +78 -0
- package/src/css/look-board.css +33 -3
- package/src/css/table.css +9 -0
- package/src/schemas/app-manifest-v2.schema.json +2 -2
- package/src/utils/detailObjectContext.js +7 -2
- package/src/utils/validateManifestV2.compiled.js +2 -2
- package/src/utils/visibleWhen.js +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnTabsWidget.vue2.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-tabs-widget\">\n\t\t<CnTabs\n\t\t\t:aria-label=\"stripLabel\"\n\t\t\t:moreLabel=\"moreLabel\"\n\t\t\t:variant=\"stripVariant\"\n\t\t\t:overflowInNavEnd=\"isBoard\"\n\t\t\tclass=\"cn-tabs-widget__tabs\"\n\t\t\t@update:activeIndex=\"onTabChange\">\n\t\t\t<!-- One Actions menu for the whole widget, bound to whichever child\n\t\t\t is showing. This is the point of the component: six tabbed\n\t\t\t widgets used to mean six card headers stacked down the page. -->\n\t\t\t<template #nav-end>\n\t\t\t\t<!-- The open panel's header link (\"All sales invoices\"): a panel\n\t\t\t\t draws no card header, so the link its widget declares is\n\t\t\t\t drawn here, and changes with the tab. -->\n\t\t\t\t<component\n\t\t\t\t\t:is=\"activeHeaderLinkTarget.tag\"\n\t\t\t\t\tv-if=\"activeHeaderLinkTarget.tag\"\n\t\t\t\t\tclass=\"cn-tabs-widget__header-link\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-header-link\"\n\t\t\t\t\tv-bind=\"activeHeaderLinkTarget.attrs\">\n\t\t\t\t\t{{ cnTranslate(activeHeaderLink.label) }}\n\t\t\t\t</component>\n\t\t\t\t<CnActionsMenu\n\t\t\t\t\tv-if=\"showActions || menuTabs.length\"\n\t\t\t\t\t:showRefresh=\"showActions && showRefresh\"\n\t\t\t\t\t:showRequestFeature=\"showActions && showRequestFeature\"\n\t\t\t\t\t:showDocumentation=\"showActions && showDocumentation\"\n\t\t\t\t\t:showReportBug=\"showActions\"\n\t\t\t\t\t:documentationUrl=\"documentationUrl\"\n\t\t\t\t\t:widgetId=\"activeWidgetId\"\n\t\t\t\t\t:title=\"activeTitle\"\n\t\t\t\t\t:variant=\"isBoard ? 'secondary' : undefined\"\n\t\t\t\t\t:surface=\"`widget:${activeWidgetId}`\"\n\t\t\t\t\trefreshChannel=\"cn:widget:refresh\"\n\t\t\t\t\ttestidBase=\"cn-tabs-widget\">\n\t\t\t\t\t<!-- Board look: the tabs that are not in the strip, at the\n\t\t\t\t\t top of the menu, in place of a \"More\" button. -->\n\t\t\t\t\t<template v-if=\"menuTabs.length\" #lead-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"entry in menuTabs\"\n\t\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t\t:disabled=\"entry.pending || null\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-menu-tab\"\n\t\t\t\t\t\t\t@click=\"openMenuTab(entry)\">\n\t\t\t\t\t\t\t<template v-if=\"entry.icon\" #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"entry.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ menuTabLabel(entry) }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator v-if=\"showActions\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<!-- The open panel's own items, below the built-in trio.\n\t\t\t\t\t A panel draws no header, so these would otherwise have\n\t\t\t\t\t nowhere to go: the data widget's Metadata and full edit\n\t\t\t\t\t dialog vanished outright when the panel stopped drawing\n\t\t\t\t\t a card. They are rendered here rather than rebuilt here\n\t\t\t\t\t because `run` closes over the widget that published it,\n\t\t\t\t\t which is what keeps the dialog's per-widget config and\n\t\t\t\t\t the widget's own save path. See utils/panelActions.js.\n\n\t\t\t\t\t Only the ACTIVE panel's items. `lazy` keeps a visited\n\t\t\t\t\t tab mounted, so several panels publish at once and an\n\t\t\t\t\t unfiltered list would offer actions for a sheet nobody\n\t\t\t\t\t is looking at. -->\n\t\t\t\t\t<template v-if=\"showActions && activePanelActions.length\" #action-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"action in activePanelActions\"\n\t\t\t\t\t\t\t:key=\"action.key\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"action.run()\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ action.label }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\t\t\t\t</CnActionsMenu>\n\t\t\t</template>\n\n\t\t\t<CnTab\n\t\t\t\tv-for=\"(entry, index) in resolvedTabs\"\n\t\t\t\t:key=\"entry.key\"\n\t\t\t\t:active=\"index === activeIndex\"\n\t\t\t\t:title=\"entry.label\"\n\t\t\t\t:count=\"entry.count\"\n\t\t\t\t:countLabel=\"entry.unreadLabel\"\n\t\t\t\t:overflow=\"entry.overflow\"\n\t\t\t\t:disabled=\"entry.pending\"\n\t\t\t\tlazy\n\t\t\t\t@click=\"activeIndex = index\">\n\t\t\t\t<template #title>\n\t\t\t\t\t<span class=\"cn-tabs-widget__title\">\n\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\tv-if=\"entry.icon && !isBoard\"\n\t\t\t\t\t\t\t:name=\"entry.icon\"\n\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\tclass=\"cn-tabs-widget__title-icon\" />\n\t\t\t\t\t\t{{ entry.label }}\n\t\t\t\t\t\t<NcLoadingIcon\n\t\t\t\t\t\t\tv-if=\"entry.pending\"\n\t\t\t\t\t\t\t:size=\"14\"\n\t\t\t\t\t\t\t:name=\"loadingLabel\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-pending\" />\n\t\t\t\t\t</span>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- A stack (`widgetIds`): every widget is a titled card; the\n\t\t\t\t first joins the open tab, the next ones stand below it. -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"entry.widget && entry.isStack\"\n\t\t\t\t\tclass=\"cn-tabs-widget__stack\"\n\t\t\t\t\t:class=\"{ 'cn-tabs-widget__stack--grid': !!entry.grid }\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-stack\">\n\t\t\t\t\t<div class=\"cn-tabs-widget__stack-first\" :style=\"spanStyle(entry.grid, 0)\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"(child, childIndex) in entry.stack\"\n\t\t\t\t\t\t:key=\"`${entry.key}-${child.id}`\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__stack-item\"\n\t\t\t\t\t\t:style=\"spanStyle(entry.grid, childIndex + 1)\"\n\t\t\t\t\t\t:data-testid=\"`cn-tabs-widget-stack-${child.id}`\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"child\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showHeaderLink=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<template v-else-if=\"entry.widget\">\n\t\t\t\t\t<!-- A single widget with a title of its own heads its panel\n\t\t\t\t\t (DqZaakDocumenten); a title the tab already shows is not\n\t\t\t\t\t repeated. -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"panelHeading(entry)\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__panel-heading\"\n\t\t\t\t\t\t:class=\"{ 'cn-tabs-widget__panel-heading--actions': panelHeaderActions(entry).length > 0 }\"\n\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-panel-heading\">\n\t\t\t\t\t\t<div class=\"cn-tabs-widget__panel-heading-text\">\n\t\t\t\t\t\t\t<h2 class=\"cn-tabs-widget__panel-title\">\n\t\t\t\t\t\t\t\t{{ panelHeading(entry).title }}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<span v-if=\"panelHeading(entry).subtitle\" class=\"cn-tabs-widget__panel-subtitle\">{{ panelHeading(entry).subtitle }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<CnWidgetHeaderActionButtons v-if=\"panelHeaderActions(entry).length > 0\" :actions=\"panelHeaderActions(entry)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- The widget's manifest `headerActions` with no heading to\n\t\t\t\t\t sit in: a row of their own above the panel's content. -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else-if=\"panelHeaderActions(entry).length > 0\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__panel-actions\"\n\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-panel-actions\">\n\t\t\t\t\t\t<CnWidgetHeaderActionButtons :actions=\"panelHeaderActions(entry)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t</template>\n\t\t\t\t<CnEmptyContent v-else :name=\"missingLabel(entry)\" />\n\t\t\t</CnTab>\n\t\t</CnTabs>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionSeparator, NcLoadingIcon } from '@nextcloud/vue'\nimport CnDetailWidgetHost from '../CnDetailWidgetHost/CnDetailWidgetHost.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnTab from '../CnTabs/CnTab.vue'\nimport CnTabs from '../CnTabs/CnTabs.vue'\nimport CnWidgetHeaderActionButtons from '../CnWidgetWrapper/CnWidgetHeaderActionButtons.vue'\nimport { normalizeLook } from '../../composables/useLook.js'\nimport { dispatchAction } from '../../utils/actionsDispatcher.js'\nimport { headerLinkTarget, resolveHeaderLink, widgetHeaderLink } from '../../utils/contentHeaderLink.js'\nimport { resolveTabCount } from '../../utils/detailActionModel.js'\nimport { detailWidgetVisible } from '../../utils/detailWidgetVisibility.js'\nimport { fetchListTotal } from '../../utils/fetchFilterCounts.js'\nimport { isActivityWidget } from '../../utils/headerMeta.js'\nimport { PANEL_ACTION_SINK } from '../../utils/panelActions.js'\nimport { setSubResourceRead } from '../../utils/recordInteractions.js'\nimport { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition, readVisibleWhenValue } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.js'\nimport { resolveWidgetHeaderActions } from '../../utils/widgetHeaderActions.js'\nimport { CnActionsMenu } from '../CnActionsMenu/index.js'\n\n/**\n * CnTabsWidget — a widget that holds other widgets, one per tab.\n *\n * A detail page that carries notes, files, related records, sub-records, mail\n * and appointments renders six cards, each with its own header and its own\n * Actions menu, stacked down the page. All six say roughly the same thing about\n * one record, and only one of them is being read at a time. This widget puts\n * them behind a tab strip instead.\n *\n * ## What the tabs take over\n *\n * The strip owns the title and the card. A child renders through\n * `CnDetailWidgetHost` with `chrome=\"bare\"`, so it draws no header and no\n * border of its own, and its content fills the panel exactly as it would have\n * filled its card. The tab label is what the widget's card header used to say.\n *\n * The Actions menu moves OUT of the panels and into the bar, beside the strip\n * rather than inside it, and rebinds to whichever child is showing. So there is\n * one menu, and it always acts on what you are looking at.\n *\n * ## Configuring it\n *\n * `content.tabs[]` names the children and their labels, so a deployment can\n * relabel or reorder tabs, or drop one, without touching code:\n *\n * ```js\n * content: {\n * tabs: [\n * { widgetId: 'case-notes', label: 'Notes', icon: 'NoteTextOutline' },\n * { widgetId: 'case-files', label: 'Files and attachments' },\n * ],\n * }\n * ```\n *\n * `label` and `icon` are optional and fall back to the child widget's own\n * title and icon, so the common case is a list of `widgetId`s.\n *\n * ## Panels are lazy, and stay mounted\n *\n * Each panel is a `CnTab` with `lazy`, so a child only mounts when its tab is\n * first opened. Six eager panels that each fetch on `mounted()` would fire six\n * requests on page load to answer five questions nobody asked. Once opened, a\n * panel stays mounted, so switching back never refetches.\n *\n * ## A named tab whose widget is missing\n *\n * The tab still renders, and its panel says which widget id did not resolve.\n * Dropping the tab would be worse: `content.tabs[]` is hand-authored config,\n * and a typo that silently removes a tab is a typo nobody finds.\n */\nexport default {\n\tname: 'CnTabsWidget',\n\n\tcomponents: {\n\t\tCnActionsMenu,\n\t\tCnDetailWidgetHost,\n\t\tCnIcon,\n\t\tCnTab,\n\t\tCnTabs,\n\t\tCnWidgetHeaderActionButtons,\n\t\tNcActionButton,\n\t\tNcActionSeparator,\n\t\tCnEmptyContent,\n\t\tNcLoadingIcon,\n\t},\n\n\t/**\n\t * Offer the panels a way to put their own menu items in the strip's menu.\n\t *\n\t * Re-provided one level down by `CnDetailWidgetHost`, which knows the id to\n\t * key by; see utils/panelActions.js for why the items travel up instead of\n\t * being rebuilt here.\n\t *\n\t * @return {object} The provided sink.\n\t */\n\tprovide() {\n\t\treturn {\n\t\t\t[PANEL_ACTION_SINK]: {\n\t\t\t\t/**\n\t\t\t\t * Publish a panel's items, under one SOURCE.\n\t\t\t\t *\n\t\t\t\t * A panel has two possible publishers: the host, for an action\n\t\t\t\t * the host itself would have drawn (the catalog Add), and the\n\t\t\t\t * widget inside it, for its own menu items. Keyed by source so\n\t\t\t\t * the two coexist; a single slot per widget meant whichever\n\t\t\t\t * published last silently replaced the other.\n\t\t\t\t *\n\t\t\t\t * Replaces the map rather than mutating it so the computed that\n\t\t\t\t * reads it re-evaluates on any change.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {object[]} items Its PanelAction descriptors.\n\t\t\t\t * @param {string} [source] Who is publishing: `host` or `widget`.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tset: (id, items, source = 'widget') => {\n\t\t\t\t\t// `activePanelActions` spreads what is stored, so a\n\t\t\t\t\t// non-array becomes one menu item per character.\n\t\t\t\t\tif (!id || !Array.isArray(items)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst forId = { ...(this.panelActionsByWidget[id] || {}), [source]: items }\n\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: forId }\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Withdraw one source's items, on unmount or when that\n\t\t\t\t * publisher's own menu comes back. The other source's items\n\t\t\t\t * stay.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {string} [source] Who is withdrawing.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tclear: (id, source = 'widget') => {\n\t\t\t\t\tconst forId = this.panelActionsByWidget[id]\n\t\t\t\t\tif (!forId || !(source in forId)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [source]: _removed, ...keptSources } = forId\n\t\t\t\t\tif (Object.keys(keptSources).length) {\n\t\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: keptSources }\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [id]: _gone, ...rest } = this.panelActionsByWidget\n\t\t\t\t\tthis.panelActionsByWidget = rest\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t},\n\n\tinject: {\n\t\t/** The app's look, provided by CnAppRoot or CnPageRenderer (`nextcloud` or `board`). */\n\t\tcnLook: { default: 'nextcloud' },\n\t\t/** The tab list's name under the board look, provided by CnDetailPage (`config.tabsLabel`). */\n\t\tcnDetailTabsLabel: { default: null },\n\t\t/**\n\t\t * The records the detail page's `visibilityContext` names, keyed\n\t\t * by name (a case's case type), provided by CnDetailPage. A tab's\n\t\t * `visibleWhen` reads them as `@context.<name>`. Null on any other page.\n\t\t */\n\t\tcnDetailVisibilityRows: { default: null },\n\t\t/**\n\t\t * The page's workspace bag (CnDashboardPage provides it), which a\n\t\t * page control such as a chips filter writes. A widget in a stack is\n\t\t * left out while its workspace `visibleWhen` does not hold. Null off a\n\t\t * dashboard.\n\t\t */\n\t\tcnWorkspaceContext: { default: null },\n\t\t/**\n\t\t * The host's translate (CnAppRoot provides `cnTranslate`), so a tab\n\t\t * label written in the manifest reads in the user's language.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's action dispatcher (CnPageRenderer), for a panel widget's `headerActions`. */\n\t\tcnDispatchAction: { default: null },\n\t\t/** The detail page's record edit form (`{ available, open }`), for an `edit-record` header action. */\n\t\tcnRecordEdit: { default: null },\n\t\t/**\n\t\t * CnDetailPage's report of the open body tab, so its side column can\n\t\t * follow the tab (a side entry's `tabs`). Null on any other page.\n\t\t */\n\t\tcnDetailReportTab: { default: null },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's config: `{ tabs, ariaLabel }`.\n\t\t *\n\t\t * `tabs[]` entries are `{ widgetId, label?, icon?, count?, countField?, overflow? }`.\n\t\t * `label` and `icon` fall back to the referenced widget's own title and\n\t\t * icon. `count` is a number shown after the label; `countField` reads\n\t\t * it off the record instead (a list counts its items). `countFrom`\n\t\t * counts a list on the server: `\"widget\"` counts the child widget's\n\t\t * own list (`content.register`, `schema`, `filter`, tokens such as\n\t\t * `@objectId` resolved), an object `{ register, schema, filter? }`\n\t\t * names the list, and `{ endpoint, field? }` counts the list (or reads\n\t\t * the number) an endpoint answers with, `@objectId` resolved; `count`\n\t\t * and `countField` win over it. `overflow: true`\n\t\t * lists the tab under \"More\".\n\t\t *\n\t\t * A tab with `widgetIds` can lay them out in a grid instead of one under\n\t\t * the other: `columns: 4` gives each a quarter of the row, and\n\t\t * `layout: [{ widgetId, gridWidth }]` sets a width (of 12) per widget, as\n\t\t * the page grid does. Widgets wrap onto the next row.\n\t\t *\n\t\t * A tab with `default: true` is the one the strip opens on, unless a\n\t\t * route hash names another tab or the marked tab sits under \"More\".\n\t\t *\n\t\t * `maxVisibleTabs` caps the strip: later tabs go under \"More\" (in the\n\t\t * board look: into the Actions menu, with History kept in the strip).\n\t\t * `hideEmpty: true` moves a tab whose count is 0 there too.\n\t\t * `moreLabel` names that menu. `variant: \"segmented\"` draws the strip\n\t\t * as a pill switch (CnTabs' segmented variant); `line` is the default.\n\t\t *\n\t\t * @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}|{endpoint: string, field?: string}), overflow?: boolean, default?: boolean, columns?: number, layout?: Array<{widgetId: string, gridWidth: number}>}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Every widget definition available on the surface, for `content.tabs[]`\n\t\t * to reference by id.\n\t\t *\n\t\t * The surface passes its whole list rather than the resolved children\n\t\t * because a tab may name a widget that does not exist, and this component\n\t\t * has to be able to say so.\n\t\t *\n\t\t * @type {object[]}\n\t\t */\n\t\tavailableWidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The bound record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The loaded record, or null while it is still being fetched. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The resolved object-type slug. */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The resolved JSON Schema object, needed by a `data` child. */\n\t\tschemaObject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** OpenRegister register slug of the surface. */\n\t\tregister: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** OpenRegister schema slug of the surface. */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The effective object store. */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Rendering surface forwarded to integration children (AD-19). */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'detail-page',\n\t\t},\n\n\t\t/** Object context forwarded to integration children. */\n\t\tintegrationContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The consumer's component registry, for custom child widget types. */\n\t\tcnRegistry: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip draws its Actions menu at all. `false` drops the\n\t\t * whole menu, the open panel's own items included, for a board that\n\t\t * draws none. Manifest: `content.showActions` on the tabs widget.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-actions-off/specs/tabs-widget-actions-off/spec.md#requirement-a-manifest-can-turn-off-the-tab-strips-actions-menu\n\t\t */\n\t\tshowActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Refresh entry in the hoisted Actions menu. */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Request-a-feature entry in the hoisted Actions menu. */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Documentation entry in the hoisted Actions menu. */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Documentation URL for the hoisted Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['geo-saved', 'open-integration', 'select-object'],\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveIndex: 0,\n\t\t\t// Key of the tab showing, so it stays the active one when a tab\n\t\t\t// before it appears or disappears.\n\t\t\tactiveKey: '',\n\t\t\t// Result of each tab's SOURCE-mode `visibleWhen`, by the tab's index\n\t\t\t// in `content.tabs`. A missing entry means the count is pending.\n\t\t\tsourceVisibility: {},\n\t\t\t// Bumped per evaluation round, so a slow answer from an earlier round is dropped.\n\t\t\tvisibilitySeq: 0,\n\t\t\t// Totals counted for tabs with `countFrom`, by position in `content.tabs`.\n\t\t\twidgetCounts: {},\n\t\t\t// Read-state parts this page has marked read since it opened\n\t\t\t// (`badgeSource: 'readState'`), so their counts go without a reload.\n\t\t\treadCleared: {},\n\t\t\tcountSeq: 0,\n\t\t\t// Tab id named by the route hash that has not appeared yet (still pending).\n\t\t\thashTargetId: '',\n\t\t\t// Items published by the panels, keyed by widget id. Keyed rather\n\t\t\t// than a flat list because `lazy` keeps a visited tab mounted, so\n\t\t\t// more than one panel publishes at a time.\n\t\t\tpanelActionsByWidget: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * What a tab's `visibleWhen` reads: the record, with the records the\n\t\t * detail page's `visibilityContext` names under `@context.<name>`. Null while\n\t\t * the record, or one of those records, is not there yet.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/detail-widgets-visible-when/specs/detail-widgets-visible-when/spec.md#requirement-a-detail-page-can-load-records-a-condition-names\n\t\t */\n\t\tconditionData() {\n\t\t\tif (!this.objectData) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst holder = this.cnDetailVisibilityRows\n\t\t\tif (!holder) {\n\t\t\t\treturn this.objectData\n\t\t\t}\n\t\t\tconst rows = holder.value\n\t\t\tif (!rows) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { ...this.objectData, '@context': rows }\n\t\t},\n\n\t\t/**\n\t\t * The open panel's own menu items, or an empty list.\n\t\t *\n\t\t * @return {object[]} PanelAction descriptors for the active tab.\n\t\t */\n\t\tactivePanelActions() {\n\t\t\tconst forId = this.panelActionsByWidget[this.activeWidgetId]\n\t\t\tif (!forId) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\t// Host first, then the widget's own: the catalog Add is about the\n\t\t\t// panel as a whole, the widget's items about what is in it.\n\t\t\treturn [...(forId.host || []), ...(forId.widget || [])]\n\t\t},\n\n\t\t/**\n\t\t * The tabs the board look lists at the top of the Actions menu: the\n\t\t * overflow tabs, less the one that is open (it is in the strip).\n\t\t * Empty outside the board look, where CnTabs draws \"More\".\n\t\t *\n\t\t * @return {object[]} Resolved tabs, in strip order.\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\tmenuTabs() {\n\t\t\tif (!this.isBoard) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn this.resolvedTabs.filter((entry, index) => entry.overflow && index !== this.activeIndex)\n\t\t},\n\n\t\t/**\n\t\t * The configured tabs, each paired with the widget definition it names.\n\t\t *\n\t\t * A tab goes under the strip's \"More\" menu when it says `overflow`, when\n\t\t * `content.hideEmpty` is set and its count is 0, or when\n\t\t * `content.maxVisibleTabs` places are already taken. `count` is a\n\t\t * literal, or read off the record through `countField`. In the board\n\t\t * look those tabs are listed in the Actions menu instead, and the\n\t\t * activity (History) tab always stays in the strip.\n\t\t *\n\t\t * @return {object[]} `{ key, widgetId, label, icon, widget, count, overflow }` per tab.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\tresolvedTabs() {\n\t\t\tconst authored = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\t// The board look: the activity is the History tab and the last tab,\n\t\t\t// whatever its place in the manifest. `index` stays the position in\n\t\t\t// `content.tabs`, which the source-mode conditions are keyed on.\n\t\t\tconst isActivityTab = (tab) => {\n\t\t\t\tconst id = this.tabWidgetIds(tab)[0]\n\t\t\t\treturn isActivityWidget(this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t}\n\t\t\tconst ordered = authored.map((tab, index) => ({ tab, index }))\n\t\t\tif (this.isBoard) {\n\t\t\t\tordered.sort((a, b) => (Number(isActivityTab(a.tab)) - Number(isActivityTab(b.tab))) || (a.index - b.index))\n\t\t\t}\n\t\t\tconst tabs = ordered.map(({ tab }) => tab)\n\t\t\tconst originalIndex = ordered.map(({ index }) => index)\n\t\t\tconst max = Number(this.content?.maxVisibleTabs)\n\t\t\tconst hideEmpty = this.content?.hideEmpty === true\n\t\t\t// The board keeps its History tab in the strip, so it holds one of\n\t\t\t// the `maxVisibleTabs` places from the start.\n\t\t\tconst pinActivity = this.isBoard && tabs.some((tab, position) => isActivityTab(tab) && this.tabVisibility(tab, originalIndex[position]) !== 'hidden')\n\t\t\t// How many tabs have taken a place in the strip so far. A tab that\n\t\t\t// is already going under \"More\" does not use one up.\n\t\t\tlet placed = pinActivity ? 1 : 0\n\t\t\tconst resolved = []\n\t\t\tconst usedKeys = new Set()\n\t\t\ttabs.forEach((tab, position) => {\n\t\t\t\tconst index = originalIndex[position]\n\t\t\t\t// A tab whose condition is false is absent, not empty.\n\t\t\t\tconst visibility = this.tabVisibility(tab, index)\n\t\t\t\tif (visibility === 'hidden') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// A stack (`widgetIds`) resolves every id; one that names no\n\t\t\t\t// widget is skipped. The first that resolves is the panel's.\n\t\t\t\tconst ids = this.tabWidgetIds(tab)\n\t\t\t\tconst named = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null).filter(Boolean)\n\t\t\t\t\t: []\n\t\t\t\tconst widgets = named.filter((w) => !this.hiddenByWorkspace(w) && !this.hiddenByRecord(w))\n\t\t\t\tconst widget = ids.length > 1\n\t\t\t\t\t? (widgets[0] || null)\n\t\t\t\t\t: (this.availableWidgets.find((w) => w && w.id === ids[0]) || null)\n\t\t\t\tconst widgetId = widget ? widget.id : ids[0]\n\t\t\t\tconst declared = resolveTabCount(typeof tab === 'object' ? tab : null, this.countObject)\n\t\t\t\tconst counted = this.widgetCounts[index]\n\t\t\t\tconst count = declared === null && typeof counted === 'number' ? counted : declared\n\t\t\t\tconst pinned = pinActivity && isActivityTab(tab)\n\t\t\t\tlet overflow = !pinned && ((tab && tab.overflow === true) || (hideEmpty && count === 0))\n\t\t\t\tif (!overflow && !pinned) {\n\t\t\t\t\tif (Number.isFinite(max) && max > 0 && placed >= max) {\n\t\t\t\t\t\toverflow = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaced += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Keyed on the tab's own id, else its place in `content.tabs`:\n\t\t\t\t// never on the widget the panel starts with, which changes when\n\t\t\t\t// a stack's first card turns visible and would remount the panel.\n\t\t\t\tconst ownId = tab && typeof tab === 'object' && typeof tab.id === 'string' ? tab.id : ''\n\t\t\t\tconst key = ownId !== '' && !usedKeys.has(ownId) ? ownId : `tab-${index}`\n\t\t\t\tusedKeys.add(key)\n\t\t\t\tresolved.push({\n\t\t\t\t\tkey,\n\t\t\t\t\tid: (tab && typeof tab === 'object' && tab.id) || widgetId || '',\n\t\t\t\t\twidgetId,\n\t\t\t\t\tlabel: this.tabLabel(tab, widget, widgetId),\n\t\t\t\t\ticon: (tab && tab.icon) || widget?.icon || '',\n\t\t\t\t\twidget,\n\t\t\t\t\tstack: widgets.slice(1),\n\t\t\t\t\t// A stack of two or more widgets stays a stack of titled cards\n\t\t\t\t\t// when conditions leave one of them showing (DqSociaalDomein\n\t\t\t\t\t// \"De melding\"): the record decides which cards show, not\n\t\t\t\t\t// whether the panel is a card.\n\t\t\t\t\tisStack: named.length > 1,\n\t\t\t\t\tgrid: this.stackGrid(tab, widgets),\n\t\t\t\t\tcount,\n\t\t\t\t\tunreadKey: this.unreadKeyOf(tab, widgetId),\n\t\t\t\t\tunreadLabel: this.unreadLabelOf(tab, widgetId),\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t\topensFirst: Boolean(tab && typeof tab === 'object' && tab.default === true),\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Whether the tabs badge what is new on each part of the record and\n\t\t * mark that part read when it is opened (`content.badgeSource: 'readState'`).\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\treadStateBadges() {\n\t\t\treturn this.content?.badgeSource === 'readState'\n\t\t},\n\n\t\t/**\n\t\t * The record the tab counts read: the record itself, less the\n\t\t * read-state parts this page has already marked read.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tcountObject() {\n\t\t\tconst record = this.objectData\n\t\t\tconst counts = record && record['@self'] && record['@self'].unreadCounts\n\t\t\tif (!counts || typeof counts !== 'object' || Object.keys(this.readCleared).length === 0) {\n\t\t\t\treturn record\n\t\t\t}\n\t\t\tconst left = { ...counts }\n\t\t\tfor (const key of Object.keys(this.readCleared)) {\n\t\t\t\tleft[key] = 0\n\t\t\t}\n\t\t\treturn { ...record, '@self': { ...record['@self'], unreadCounts: left } }\n\t\t},\n\n\t\t/** @return {string} The keys of the tabs in the strip, to notice one appearing or going. */\n\t\tvisibleKeys() {\n\t\t\treturn this.resolvedTabs.map((tab) => tab.key).join('|')\n\t\t},\n\n\t\t/** @return {string} Accessible name of a pending tab's spinner. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/**\n\t\t * The lists the tabs count (`countFrom`), serialised, to count again\n\t\t * when they change.\n\t\t *\n\t\t * @return {string} The key.\n\t\t */\n\t\tcountSourcesKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => this.countSourceOf(tab)))\n\t\t},\n\n\t\t/** @return {string} The source-mode conditions, serialised, to re-evaluate when they change. */\n\t\tsourceConditionsKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => (tab && typeof tab === 'object' && tab.visibleWhen && !isLocallyDecidableVisibleWhen(tab.visibleWhen)) ? tab.visibleWhen : null))\n\t\t},\n\n\t\t/**\n\t\t * Name of the menu that holds the tabs that are not in the strip.\n\t\t *\n\t\t * @return {string|undefined} The configured label, or undefined for the default.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tmoreLabel() {\n\t\t\tconst label = this.content?.moreLabel\n\t\t\treturn typeof label === 'string' && label !== '' ? label : undefined\n\t\t},\n\n\t\t/**\n\t\t * The tab currently showing.\n\t\t *\n\t\t * @return {object|null} The resolved tab, or null when there are none.\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.resolvedTabs[this.activeIndex] || null\n\t\t},\n\n\t\t/**\n\t\t * The active child's id, so the hoisted Refresh reaches THAT child's\n\t\t * fetch over `cn:widget:refresh` rather than a sibling's.\n\t\t *\n\t\t * @return {string} The active widget id.\n\t\t */\n\t\tactiveWidgetId() {\n\t\t\treturn this.activeTab?.widgetId || ''\n\t\t},\n\n\t\t/**\n\t\t * The header link the open tab's widget declares (`headerLink` on the\n\t\t * definition, or in its content), or null. For a stack, the first\n\t\t * widget's.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-header-link/specs/tabs-widget-header-link/spec.md#requirement-the-tab-strip-draws-the-open-panels-header-link\n\t\t * @return {object|null}\n\t\t */\n\t\tactiveHeaderLink() {\n\t\t\treturn resolveHeaderLink(widgetHeaderLink(this.activeTab?.widget), { objectId: this.objectId, object: this.objectData })\n\t\t},\n\n\t\t/**\n\t\t * How to draw the open panel's header link: a router link for a\n\t\t * route, an anchor for an href, nothing otherwise.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-header-link/specs/tabs-widget-header-link/spec.md#requirement-the-tab-strip-draws-the-open-panels-header-link\n\t\t * @return {{tag: string, attrs: object}}\n\t\t */\n\t\tactiveHeaderLinkTarget() {\n\t\t\treturn headerLinkTarget(this.activeHeaderLink, Boolean(this.$router))\n\t\t},\n\n\t\t/**\n\t\t * The active child's label, so the Actions menu names what it acts on.\n\t\t *\n\t\t * @return {string} The active tab's label.\n\t\t */\n\t\tactiveTitle() {\n\t\t\treturn this.activeTab?.label || ''\n\t\t},\n\n\t\t/**\n\t\t * The strip's look: `segmented` when the content asks for it, else\n\t\t * CnTabs' default `line`. An unknown value falls back to `line`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-tabs-widget-renders-a-segmented-strip\n\t\t * @return {('line'|'segmented')} The CnTabs variant.\n\t\t */\n\t\tstripVariant() {\n\t\t\treturn this.content?.variant === 'segmented' ? 'segmented' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * Accessible name for the tab strip.\n\t\t *\n\t\t * @return {string} The aria-label.\n\t\t */\n\t\tstripLabel() {\n\t\t\tconst named = this.isBoard && this.cnDetailTabsLabel ? this.cnDetailTabsLabel.value : ''\n\t\t\treturn this.content?.ariaLabel || named || t('nextcloud-vue', 'Details')\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip is drawn in the board look.\n\t\t *\n\t\t * @return {boolean} True in the board look.\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-folder-tabs-take-the-board-strip\n\t\t */\n\t\tisBoard() {\n\t\t\treturn normalizeLook(this.cnLook) === 'board'\n\t\t},\n\t},\n\n\twatch: {\n\t\tactiveIndex(index) {\n\t\t\tthis.activeKey = this.resolvedTabs[index]?.key || ''\n\t\t},\n\n\t\t// The open tab's part of the record is now seen: on opening a tab, and\n\t\t// when the record arrives with something new on the open one.\n\t\t'activeTab.key': function() {\n\t\t\tthis.markActiveTabRead()\n\t\t},\n\n\t\t'activeTab.unreadLabel': {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.markActiveTabRead()\n\t\t\t},\n\t\t},\n\n\t\t// Tell the detail page which tab is open (side cards per tab).\n\t\t'activeTab.id': {\n\t\t\timmediate: true,\n\t\t\thandler(id) {\n\t\t\t\tif (typeof this.cnDetailReportTab === 'function') {\n\t\t\t\t\tthis.cnDetailReportTab(id || '')\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t// A tab appeared or went. Keep the same tab active; when it is the active\n\t\t// tab that went, the first visible one takes over and the hash follows.\n\t\tvisibleKeys() {\n\t\t\tif (this.hashTargetId !== '') {\n\t\t\t\tconst arrived = this.resolvedTabs.findIndex((tab) => tab.id === this.hashTargetId && !tab.pending)\n\t\t\t\tif (arrived >= 0) {\n\t\t\t\t\tthis.activeIndex = arrived\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this.resolvedTabs.some((tab) => tab.id === this.hashTargetId)) {\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst stay = this.resolvedTabs.findIndex((tab) => tab.key === this.activeKey)\n\t\t\tif (stay >= 0) {\n\t\t\t\tif (stay !== this.activeIndex) {\n\t\t\t\t\tthis.activeIndex = stay\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tthis.activeIndex = first >= 0 ? first : 0\n\t\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\t\tthis.syncHash()\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.sourceVisibility = {}\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.widgetCounts = {}\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tcountSourcesKey() {\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tsourceConditionsKey() {\n\t\t\tthis.refreshSourceVisibility()\n\t\t},\n\t},\n\n\t/**\n\t * Open on the tab marked `default: true`, else on the first tab that is in\n\t * the strip. Tab 0 is not enough: when tab 0 sits under \"More\" the strip\n\t * would open on a tab the author chose to tuck away.\n\t *\n\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t */\n\tcreated() {\n\t\t// A route hash naming a tab opens that tab. One naming a hidden tab is\n\t\t// ignored, without an error; one naming a tab still pending is honoured\n\t\t// once its condition answers.\n\t\tconst wanted = this.currentHash()\n\t\tconst named = wanted === '' ? -1 : this.resolvedTabs.findIndex((tab) => tab.id === wanted)\n\t\tif (named >= 0 && !this.resolvedTabs[named].pending) {\n\t\t\tthis.activeIndex = named\n\t\t} else {\n\t\t\tif (named >= 0) {\n\t\t\t\tthis.hashTargetId = wanted\n\t\t\t}\n\t\t\tconst marked = this.resolvedTabs.findIndex((tab) => tab.opensFirst && !tab.overflow && !tab.pending)\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = marked >= 0 ? marked : first >= 0 ? first : this.resolvedTabs.findIndex((tab) => !tab.overflow)\n\t\t\tif (fallback > 0) {\n\t\t\t\tthis.activeIndex = fallback\n\t\t\t}\n\t\t}\n\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\tthis.refreshSourceVisibility()\n\t\tthis.refreshWidgetCounts()\n\t},\n\n\tmounted() {\n\t\tthis._onRefresh = () => {\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.refreshWidgetCounts()\n\t\t}\n\t\tsubscribe('cn:page:refresh', this._onRefresh)\n\t\tsubscribe('cn:widget:refresh', this._onRefresh)\n\t\t// A hash that changes on an open page (a header link `{ tab }`) opens that tab.\n\t\tthis._onHashChange = () => this.openTabById(decodeURIComponent(window.location.hash.replace(/^#/, '')))\n\t\twindow.addEventListener('hashchange', this._onHashChange)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t\twindow.removeEventListener('hashchange', this._onHashChange)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Open the tab with this id; one still pending opens once it appears,\n\t\t * and an unknown or hidden id changes nothing.\n\t\t *\n\t\t * @spec openspec/changes/header-link-switches-tab/specs/header-link/spec.md#requirement-a-header-link-can-open-another-tab-of-the-page\n\t\t * @param {string} id The tab id.\n\t\t * @return {void}\n\t\t */\n\t\topenTabById(id) {\n\t\t\tif (!id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst index = this.resolvedTabs.findIndex((tab) => tab.id === id)\n\t\t\tif (index < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.resolvedTabs[index].pending) {\n\t\t\t\tthis.hashTargetId = id\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeIndex = index\n\t\t},\n\n\t\t/**\n\t\t * The read-state part a tab counts: `unreadKey`, else its id, else its widget id.\n\t\t *\n\t\t * @param {object|string} tab The tab declaration.\n\t\t * @param {string} widgetId The tab's widget id.\n\t\t * @return {string} The part, or ''.\n\t\t */\n\t\tunreadKeyOf(tab, widgetId) {\n\t\t\tconst own = tab && typeof tab === 'object' ? tab : {}\n\t\t\treturn String(own.unreadKey || own.id || widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * What a screen reader hears after a tab's name when its part holds\n\t\t * something unseen (\"3 new\"), under `badgeSource: 'readState'`. The count\n\t\t * pill alone is a bare number.\n\t\t *\n\t\t * @param {object|string} tab The tab declaration.\n\t\t * @param {string} widgetId The tab's widget id.\n\t\t * @return {string} The label, or '' when nothing is new.\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tunreadLabelOf(tab, widgetId) {\n\t\t\tif (!this.readStateBadges || (tab && typeof tab === 'object' && (typeof tab.count === 'number' || tab.countField || tab.countObjectRows))) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst key = this.unreadKeyOf(tab, widgetId)\n\t\t\tconst counts = this.countObject && this.countObject['@self'] && this.countObject['@self'].unreadCounts\n\t\t\tconst count = counts && key ? Number(counts[key]) : 0\n\t\t\tif (!Number.isFinite(count) || count < 1) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn n('nextcloud-vue', '{count} new', '{count} new', count, { count })\n\t\t},\n\n\t\t/**\n\t\t * Mark the open tab's part of the record read (`PUT .../read-state`\n\t\t * with `subResource`), once, and drop its count. A refused write keeps\n\t\t * the count: an unseen part that stays marked is the safe direction.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tasync markActiveTabRead() {\n\t\t\tconst tab = this.activeTab\n\t\t\tif (!this.readStateBadges || !tab || !tab.unreadLabel || !this.objectId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = tab.unreadKey\n\t\t\tif (this.readCleared[key]) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst outcome = await setSubResourceRead(String(this.register || ''), String(this.schema || ''), String(this.objectId), key)\n\t\t\tif (outcome && outcome.ok) {\n\t\t\t\tthis.readCleared = { ...this.readCleared, [key]: true }\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Whether a page control hides a widget of a stack right now: its\n\t\t * `visibleWhen` (on the widget, its content or its props) is a\n\t\t * workspace condition that does not hold. Off a dashboard there is no\n\t\t * workspace, and nothing is hidden. Other conditions are not looked at\n\t\t * here.\n\t\t *\n\t\t * @param {object} widget The widget definition.\n\t\t * @return {boolean} True when the widget must not draw.\n\t\t * @spec openspec/changes/tabs-stack-follows-page-controls/specs/tabs-widget/spec.md#requirement-a-widget-in-a-tab-stack-follows-the-page-controls\n\t\t */\n\t\thiddenByWorkspace(widget) {\n\t\t\tconst cond = widget.visibleWhen || widget.content?.visibleWhen || widget.props?.visibleWhen || null\n\t\t\tif (!isWorkspaceCondition(cond)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst bag = this.cnWorkspaceContext\n\t\t\tif (!bag || typeof bag !== 'object') {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !evaluateWorkspaceCondition(cond, 'value' in bag ? bag.value : bag)\n\t\t},\n\n\t\t/**\n\t\t * Whether the record hides a widget of a stack on a detail page: its\n\t\t * own `visibleWhen` reads a field of the record or of a record the\n\t\t * page's `visibilityContext` names (`@context.<name>`), and does not\n\t\t * hold, as a grid widget's would not. Hidden while those records\n\t\t * load. Off a detail page (no record), and for a condition that needs\n\t\t * a request, nothing is hidden here.\n\t\t *\n\t\t * @param {object} widget The widget definition.\n\t\t * @return {boolean} True when the widget must not draw.\n\t\t * @spec openspec/changes/tab-stack-child-visible-when/specs/tab-stack-child-visible-when/spec.md#requirement-a-widget-in-a-tab-stack-on-a-detail-page-follows-its-own-condition\n\t\t */\n\t\thiddenByRecord(widget) {\n\t\t\tconst cond = widget.visibleWhen\n\t\t\tif (!this.objectData || !cond || typeof cond !== 'object' || isWorkspaceCondition(cond) || !isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !detailWidgetVisible(widget, this.conditionData)\n\t\t},\n\n\t\t/**\n\t\t * The grid a stack lays its widgets out in, as one column span (of 12)\n\t\t * per widget in order, or null for the plain vertical stack. A tab says\n\t\t * `columns: 4` (every widget spans a quarter of the row) and/or\n\t\t * `layout: [{ widgetId, gridWidth }]`, the page grid's width key per\n\t\t * widget (of 12; a widget it does not name takes the `columns` share, or\n\t\t * the whole row). Widgets wrap onto the next row. A widget `layout`\n\t\t * places that ends up alone in its row (its partner hidden for this\n\t\t * record) takes the whole row. Heights follow the content.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {Array<object>} widgets The widgets of the stack, in order.\n\t\t * @return {number[]|null} The column span of each widget, or null.\n\t\t */\n\t\tstackGrid(tab, widgets) {\n\t\t\tif (!tab || typeof tab !== 'object' || widgets.length < 2) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst clamp = (value) => Math.min(12, Math.max(1, Math.floor(Number(value))))\n\t\t\tconst columns = Number(tab.columns)\n\t\t\tconst share = Number.isFinite(columns) && columns >= 1 ? clamp(12 / Math.min(12, Math.floor(columns))) : 12\n\t\t\tconst placed = new Map((Array.isArray(tab.layout) ? tab.layout : [])\n\t\t\t\t.filter((entry) => entry && typeof entry.widgetId === 'string' && Number.isFinite(Number(entry.gridWidth)))\n\t\t\t\t.map((entry) => [entry.widgetId, clamp(entry.gridWidth)]))\n\t\t\tif (placed.size === 0 && share === 12) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst spans = widgets.map((widget) => placed.get(widget.id) ?? share)\n\t\t\t// A widget `layout` sets beside a partner fills its row when it is\n\t\t\t// alone there: the partner is hidden for this record, and half a\n\t\t\t// row with nothing beside it is a hole, not a layout.\n\t\t\tconst rows = []\n\t\t\tlet used = 12\n\t\t\tspans.forEach((span, index) => {\n\t\t\t\tif (used + span > 12) {\n\t\t\t\t\trows.push([])\n\t\t\t\t\tused = 0\n\t\t\t\t}\n\t\t\t\trows[rows.length - 1].push(index)\n\t\t\t\tused += span\n\t\t\t})\n\t\t\trows.forEach((row) => {\n\t\t\t\tif (row.length === 1 && placed.has(widgets[row[0]].id)) {\n\t\t\t\t\tspans[row[0]] = 12\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn spans\n\t\t},\n\n\t\t/**\n\t\t * The inline column span of one widget of a gridded stack.\n\t\t *\n\t\t * @param {number[]|null} grid The spans of the stack, or null.\n\t\t * @param {number} index The widget's position in the stack.\n\t\t * @return {object|undefined} The style, or undefined without a grid.\n\t\t */\n\t\tspanStyle(grid, index) {\n\t\t\treturn grid ? { gridColumn: `span ${grid[index] || 12}` } : undefined\n\t\t},\n\n\t\t/**\n\t\t * The widget ids a tab names: `widgetIds` (a stack) when it holds at\n\t\t * least one id, else `widgetId`, or the bare string.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {string[]} The ids, at least one entry (possibly undefined).\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-a-tab-can-hold-a-stack-of-widgets\n\t\t */\n\t\ttabWidgetIds(tab) {\n\t\t\tif (typeof tab === 'string') {\n\t\t\t\treturn [tab]\n\t\t\t}\n\t\t\tif (tab && Array.isArray(tab.widgetIds)) {\n\t\t\t\tconst ids = tab.widgetIds.filter((id) => typeof id === 'string' && id !== '')\n\t\t\t\tif (ids.length) {\n\t\t\t\t\treturn ids\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [tab?.widgetId]\n\t\t},\n\n\t\t/**\n\t\t * A single widget's manifest `headerActions`, for its panel's heading\n\t\t * row: gated on the record, dispatched through the page's dispatcher.\n\t\t *\n\t\t * @param {object} entry A resolved tab.\n\t\t * @return {Array<object>} The buttons.\n\t\t * @spec openspec/changes/widget-header-actions/specs/widget-header-actions/spec.md#requirement-the-card-that-titles-a-widget-draws-its-header-actions\n\t\t */\n\t\tpanelHeaderActions(entry) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\treturn resolveWidgetHeaderActions(entry && entry.widget, {\n\t\t\t\tobject: this.objectData || {},\n\t\t\t\tobjectId: this.objectId,\n\t\t\t\ttranslate,\n\t\t\t\trecordEdit: this.cnRecordEdit,\n\t\t\t\tdispatch: (action) => (typeof this.cnDispatchAction === 'function'\n\t\t\t\t\t? this.cnDispatchAction(action)\n\t\t\t\t\t: dispatchAction(action, { router: this.$router || null })),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The title row a single widget's panel draws: the widget's own title\n\t\t * and its description, through the app's translate. None when the\n\t\t * widget has no title or no description, or the tab already shows the\n\t\t * title: a title alone names what the tab already names, so the\n\t\t * widget stays bare in its panel.\n\t\t *\n\t\t * @param {object} entry A resolved tab.\n\t\t * @return {{title: string, subtitle: string}|null} The heading, or null.\n\t\t */\n\t\tpanelHeading(entry) {\n\t\t\tconst widget = entry && entry.widget\n\t\t\tconst raw = widgetTitleOf(widget)\n\t\t\tif (!raw) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tconst title = translate(raw)\n\t\t\tif (title === entry.label) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!widget || typeof widget.description !== 'string' || widget.description === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { title, subtitle: translate(widget.description) }\n\t\t},\n\n\t\t/**\n\t\t * The label a tab shows: the authored `label`, else (board look) History\n\t\t * for the activity widget, else the child widget's title, else its id.\n\t\t * A manifest label or title goes through the host's translate; the\n\t\t * library's own History is translated by the library catalogue.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {object|null} widget The widget definition it names.\n\t\t * @param {string} widgetId The widget id.\n\t\t * @return {string} The label.\n\t\t * @spec openspec/changes/screens-detail-labels-parity/specs/detail-labels-board-look/spec.md#requirement-detail-labels-read-in-the-users-language\n\t\t */\n\t\ttabLabel(tab, widget, widgetId) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tif (tab && typeof tab.label === 'string' && tab.label !== '') {\n\t\t\t\treturn translate(tab.label)\n\t\t\t}\n\t\t\tif (this.isBoard && isActivityWidget(widget)) {\n\t\t\t\treturn t('nextcloud-vue', 'History')\n\t\t\t}\n\t\t\tconst title = widgetTitleOf(widget)\n\t\t\treturn title ? translate(title) : (widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether a tab shows: `visible`, `hidden`, or `pending` while its\n\t\t * condition cannot be decided yet (object not loaded, count not back).\n\t\t *\n\t\t * @param {string|object} tab The tab entry.\n\t\t * @param {number} index Its index in `content.tabs`.\n\t\t * @return {('visible'|'hidden'|'pending')} The state.\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\ttabVisibility(tab, index) {\n\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\tif (!cond) {\n\t\t\t\treturn 'visible'\n\t\t\t}\n\t\t\tif (isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\tconst data = this.conditionData\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn 'pending'\n\t\t\t\t}\n\t\t\t\treturn evaluateVisibleWhenLocal(cond, data) ? 'visible' : 'hidden'\n\t\t\t}\n\t\t\tconst answer = this.sourceVisibility[index]\n\t\t\tif (answer === undefined) {\n\t\t\t\treturn 'pending'\n\t\t\t}\n\t\t\treturn answer ? 'visible' : 'hidden'\n\t\t},\n\n\t\t/**\n\t\t * Count the rows behind each source-mode condition: once on mount, when\n\t\t * the record changes, and after a refresh a write triggers. A tab keeps\n\t\t * its last answer while the new one is on its way, so the strip does\n\t\t * not jump.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\tasync refreshSourceVisibility() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.visibilitySeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.conditionData || this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\t\tif (!cond || isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst answer = await evaluateVisibleWhen(cond, ctx)\n\t\t\t\tif (seq === this.visibilitySeq) {\n\t\t\t\t\tthis.sourceVisibility = { ...this.sourceVisibility, [index]: answer }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The list a tab counts (`countFrom`): `\"widget\"` counts the child\n\t\t * widget's own list (its `content.register`, `content.schema` and\n\t\t * `content.filter`); an object `{ register, schema, filter? }` names\n\t\t * the list itself. Null for a tab that does not ask, or a child with\n\t\t * no list.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {{register: string, schema: string, filter: object}|{endpoint: string, field: string}|null} The list, or the endpoint to count.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tcountSourceOf(tab) {\n\t\t\tconst from = tab && typeof tab === 'object' ? tab.countFrom : null\n\t\t\tlet source = null\n\t\t\tif (from === 'widget') {\n\t\t\t\t// A stack counts its first widget that has a list: flat\n\t\t\t\t// (`content.register`) or a dashboard table's `content.source`.\n\t\t\t\tconst lists = this.tabWidgetIds(tab)\n\t\t\t\t\t.map((id) => this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t\t\t.map((w) => (w && w.content && typeof w.content === 'object' ? w.content : null))\n\t\t\t\t\t.map((content) => (content && content.source && typeof content.source === 'object' && content.source.register ? content.source : content))\n\t\t\t\t\t.filter((content) => content && content.register && content.schema)\n\t\t\t\tsource = lists.length ? lists[0] : null\n\t\t\t} else if (from && typeof from === 'object') {\n\t\t\t\tif (typeof from.endpoint === 'string' && from.endpoint !== '') {\n\t\t\t\t\treturn { endpoint: from.endpoint, field: typeof from.field === 'string' ? from.field : '' }\n\t\t\t\t}\n\t\t\t\tsource = from\n\t\t\t}\n\t\t\tif (!source || typeof source.register !== 'string' || source.register === '' || typeof source.schema !== 'string' || source.schema === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst filter = source.filter && typeof source.filter === 'object' && !Array.isArray(source.filter) ? source.filter : {}\n\t\t\treturn { register: source.register, schema: source.schema, filter }\n\t\t},\n\n\t\t/**\n\t\t * Count the list behind every tab with `countFrom`: once on mount,\n\t\t * when the record changes and after a refresh. A tab keeps its last\n\t\t * total while the new one is on its way; a failed count shows none.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync refreshWidgetCounts() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.countSeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst source = this.countSourceOf(tab)\n\t\t\t\tif (!source) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst total = source.endpoint\n\t\t\t\t\t? await this.countEndpoint(source, ctx)\n\t\t\t\t\t: await fetchListTotal(source.register, source.schema, source.filter, ctx).catch(() => null)\n\t\t\t\tif (seq === this.countSeq) {\n\t\t\t\t\tthis.widgetCounts = { ...this.widgetCounts, [index]: total }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Count what an endpoint answers: the list at `field` (or the body),\n\t\t * or the number there. Null when the request fails or nothing countable\n\t\t * comes back.\n\t\t *\n\t\t * @param {{endpoint: string, field: string}} source The endpoint and the path to read.\n\t\t * @param {object} ctx The record context its tokens resolve against.\n\t\t * @return {Promise<number|null>} The count.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync countEndpoint(source, ctx) {\n\t\t\ttry {\n\t\t\t\tconst value = await readVisibleWhenValue({ endpoint: source.endpoint, field: source.field }, ctx)\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.length\n\t\t\t\t}\n\t\t\t\tconst number = Number(value)\n\t\t\t\treturn value !== null && value !== '' && Number.isFinite(number) ? number : null\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/** @return {string} The route hash without its `#`, or ''. */\n\t\tcurrentHash() {\n\t\t\tconst fromRoute = this.$route && typeof this.$route.hash === 'string' ? this.$route.hash : ''\n\t\t\tconst raw = fromRoute !== '' ? fromRoute : (typeof window !== 'undefined' && window.location ? window.location.hash : '')\n\t\t\treturn typeof raw === 'string' ? raw.replace(/^#/, '') : ''\n\t\t},\n\n\t\t/**\n\t\t * After the active tab went, point a deep link's hash at the tab now showing.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tsyncHash() {\n\t\t\tconst id = this.activeTab?.id\n\t\t\tconst route = this.$route\n\t\t\tif (!id || !route || !route.hash || !this.$router || typeof this.$router.replace !== 'function') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$router.replace({ hash: `#${id}`, query: route.query })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a geo child's save so the surface can reload the record.\n\t\t *\n\t\t * @param {object} geo The saved geometry.\n\t\t * @return {void}\n\t\t */\n\t\tonGeoSaved(geo) {\n\t\t\t/**\n\t\t\t * @event geo-saved Re-emitted from a geo child that saved a geometry.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('geo-saved', geo)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's request to open an integration.\n\t\t *\n\t\t * @param {string} integrationId The integration to open.\n\t\t * @return {void}\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration Re-emitted from a related child asking to open an integration.\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 * Re-emit a related child's object click; the page opens the object.\n\t\t *\n\t\t * @param {object} raw The clicked object.\n\t\t * @return {void}\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object Re-emitted from a related child whose object row was clicked. Payload is the raw object.\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 * Follow the strip's own selection, so keyboard navigation moves the\n\t\t * hoisted Actions menu too.\n\t\t *\n\t\t * @param {number} index The newly selected tab index.\n\t\t * @return {void}\n\t\t */\n\t\tonTabChange(index) {\n\t\t\tif (typeof index === 'number' && index >= 0) {\n\t\t\t\tthis.activeIndex = index\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Open a tab picked from the Actions menu, then move focus to it in\n\t\t * the strip, so a keyboard user lands on the tab they chose.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {void}\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\topenMenuTab(entry) {\n\t\t\tconst index = this.resolvedTabs.indexOf(entry)\n\t\t\tif (index < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeIndex = index\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tconst button = this.$el?.querySelector?.('[role=\"tab\"][aria-selected=\"true\"]')\n\t\t\t\tif (button && typeof button.focus === 'function') {\n\t\t\t\t\tbutton.focus()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * A menu tab's text: its label, and its count when it has one.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The menu label.\n\t\t */\n\t\tmenuTabLabel(entry) {\n\t\t\tconst hasCount = entry.count !== null && entry.count !== undefined && entry.count !== ''\n\t\t\treturn hasCount ? `${entry.label} (${entry.count})` : entry.label\n\t\t},\n\n\t\t/**\n\t\t * Empty-state text for a tab whose widget id resolves to nothing.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The message.\n\t\t */\n\t\tmissingLabel(entry) {\n\t\t\treturn t('nextcloud-vue', 'No widget found for \"{id}\"', { id: entry.widgetId || '' })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* A stack (`widgetIds`): the panel's widget, then cards 20px apart. */\n.cn-tabs-widget__panel-heading {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 16px;\n}\n\n.cn-tabs-widget__panel-heading--actions {\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-tabs-widget__panel-heading-text {\n\tdisplay: flex;\n\tflex: 1 1 260px;\n\tflex-direction: column;\n\tgap: 4px;\n\tmin-width: 0;\n}\n\n.cn-tabs-widget__panel-actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tmargin-bottom: 16px;\n}\n\n.cn-tabs-widget__panel-title {\n\tmargin: 0;\n\tfont-size: 17px;\n\tfont-weight: 700;\n}\n\n.cn-tabs-widget__panel-subtitle {\n\tfont-size: 14px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tabs-widget__stack {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n\n/* A gridded stack (`columns` / `layout` on the tab): 12 columns, widgets wrap\n onto the next row, a row's cards as tall as the tallest. Narrow, it is the\n plain stack again. */\n.cn-tabs-widget__stack--grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(12, minmax(0, 1fr));\n\talign-items: stretch;\n}\n\n.cn-tabs-widget__stack--grid > * {\n\tmin-width: 0;\n}\n\n@media (max-width: 700px) {\n\t.cn-tabs-widget__stack--grid {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n\n\t.cn-tabs-widget__stack--grid > * {\n\t\tgrid-column: auto !important;\n\t}\n}\n\n/* The panel is the card; the strip is not inside it. There is no title bar\n above the tabs either: the open tab names the panel, so a title row would\n say the same thing twice and cost a row of height on a card that is mostly\n content.\n\n The card chrome used to wrap the strip as well, which drew a border and a\n pair of rounded corners ABOVE the tabs and boxed them in. Folder tabs are\n drawn as the edge of the sheet they open, so a second edge around them\n reads as a header the widget does not have. Border, radius and background\n now live on the panel below, and the strip sits bare on the page. */\n/* The class is doubled on purpose, and the four properties below are RESET\n rather than simply omitted.\n\n Nextcloud serves every enabled app's assets on every page, each app bundles\n this library's compiled CSS, and the Vue scope id is derived from the file\n PATH, so `data-v-1dbd6122` is byte-identical across library versions. An app\n still on an older release therefore ships a rule with exactly this selector\n and the OLD declarations, and it lands on the pages of an app already on the\n new one. Measured on a dossiq case page: three stale copies of the pre-fix\n rule, one from hermiq's `companion.css` (its companion bundle loads on every\n page by design) and two inline from other apps' bundles. Same specificity,\n so source order decided, and the card border came back around the strip.\n\n Dropping a declaration cannot beat a rule that sets it, so `border` and the\n rest are explicitly zeroed. Doubling the class takes this selector to\n (0,3,0) against the stale (0,2,0), which wins on specificity rather than on\n `!important` or on load order this library does not control. The same\n technique, for the same reason, is used on `.cn-tabs__nav .cn-tabs__nav-item`\n in CnTabs to beat Nextcloud's own button margin. */\n.cn-tabs-widget.cn-tabs-widget {\n\tbackground-color: transparent;\n\tborder: 0;\n\tborder-radius: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tmin-height: 0;\n\toverflow: visible;\n\tpadding: 0;\n}\n\n/* No inset, so the first tab starts at the panel's own left edge. The 8px\n here was there to clear the card's rounded top corner; that corner is gone\n from the strip now, and the inset it existed for left the first tab floating\n 8px inside the sheet it opens.\n\n The bar's own bottom rule is switched off and redrawn as a pseudo-element\n that stops one corner radius short of the right edge. CnTabs draws its rule\n across the bar's whole width, which is the sheet's top edge everywhere\n except at the far right, where the panel's top-right corner curves away\n below it: the rule ran straight on to the widget's edge and read as a\n border sticking out past a rounded corner (Ruben, 2026-09-13). Ending it\n where the curve begins makes the rule and the curve one continuous edge. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar) {\n\tborder-bottom: none;\n\tpadding: 0;\n\tposition: relative;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar::after) {\n\tborder-bottom: 1px solid var(--color-border);\n\tcontent: '';\n\tinset-block-end: 0;\n\tinset-inline: 0 var(--border-radius-large);\n\tpointer-events: none;\n\tposition: absolute;\n}\n\n/* The open tab erases the slice of the rule directly above the panel with its\n own background-coloured bottom edge, which only works if it paints ABOVE the\n pseudo-element: a positioned pseudo-element otherwise paints over every\n in-flow sibling, rule included. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__nav-item--active) {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.cn-tabs-widget__tabs {\n\tdisplay: flex;\n\tflex-direction: column;\n\t/* Grow to the widget's height, so the panel fills the grid cell the\n\t layout gave it. Without this the strip plus the open panel took only\n\t the height of the panel's content, and a cell of nine rows ended in\n\t 130px of nothing under a sheet that stopped short of its own card. */\n\tflex: 1 1 auto;\n\tmin-height: 0;\n}\n\n/* The panel area is the scroll region, so the strip stays put while a long\n child scrolls under it.\n\n Padded on all four sides. The top was once zeroed to protect the join with\n the open tab, but padding sits inside the painted box — only a margin would\n have opened that gap, and a zero top put every panel's content against the\n strip. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content) {\n\tbackground-color: var(--color-main-background);\n\t/* Three sides only: the bar's rule (redrawn above, stopping at the corner)\n\t is this sheet's top edge, and the open tab erases the slice of it\n\t directly above the panel so the two read as one surface. A border-top\n\t here would put a second line under that tab which the tab cannot paint\n\t over. */\n\tborder: 1px solid var(--color-border);\n\tborder-top: none;\n\t/* Three rounded corners. The top-left stays square because the first tab\n\t is drawn joined to the panel there, and a curve under it would curl the\n\t sheet away from that tab. The top-right has no tab above it: the strip\n\t ends where the last tab ends and the Actions menu floats free, so a\n\t square corner there read as a sheet cut off, not as a tab's edge. */\n\tborder-radius: 0 var(--border-radius-large) var(--border-radius-large) var(--border-radius-large);\n\tflex: 1 1 auto;\n\tmin-height: 0;\n\toverflow: auto;\n\tpadding: 12px;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tab) {\n\theight: 100%;\n}\n\n/* A list widget's footer Add bleeds through its card's 16px content padding\n (margin 0 -16px -16px). The panel of a tab pads 12px, so on a tab that\n holds the list directly the footer stuck out 4px on the right and at the\n bottom and made the panel scroll. It bleeds exactly the panel's padding. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content > .cn-tab > .cn-detail-widget-host--bare .cn-object-list-widget__add) {\n\tmargin: auto -12px -12px;\n}\n\n/* The open panel's header link, beside the strip. Same look and theme hooks\n as a card header link (CnWidgetWrapper). */\n.cn-tabs-widget__header-link {\n\talign-self: center;\n\tpadding: 0 calc(1 * var(--default-grid-baseline));\n\tcolor: var(--color-primary-element);\n\tfont-size: var(--cn-widget-header-link-size, 14px);\n\tfont-weight: var(--cn-widget-header-link-weight, 600);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n}\n\n.cn-tabs-widget__header-link:hover,\n.cn-tabs-widget__header-link:focus-visible {\n\ttext-decoration: underline;\n}\n\n.cn-tabs-widget__header-link:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n\tborder-radius: var(--border-radius-small, 4px);\n}\n\n.cn-tabs-widget__title {\n\talign-items: center;\n\tdisplay: inline-flex;\n\tgap: 6px;\n}\n\n.cn-tabs-widget__title-icon {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["CnActionsMenu","CnDetailWidgetHost","CnIcon","CnTab","CnTabs","CnWidgetHeaderActionButtons","CnEmptyContent","t","n","translate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmPA;;AAEC;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGD,aAAe;AACd,CAAA,IAAI,EAAE,cAAc;;CAEpB,UAAU,EAAE;iBACXA,UAAa;AACb,sBAAAC,YAAkB;AAClB,UAAAC,YAAM;SACNC,YAAK;AACL,UAAAC,YAAM;+BACNC,YAA2B;AAC3B,EAAA,cAAc;AACd,EAAA,iBAAiB;AACjB,kBAAAC,YAAc;EACd,aAAa;EACb;;AAED;;AAEC;AACA;;AAEA;AACA;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AC,CAAA,GAAI,KAAK,CAAC,KAAI;GAChE;;AAED;;AAEC;AACA;;;AAGD,EAAA,YAAY,CAAC,KAAK,EAAE;AACnB,GAAA,OAAOF,SAAC,CAAC,eAAe,EAAE,4BAA4B,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,QAAS,IAAG,IAAI,CAAA;GACpF;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnTabsWidget.vue2.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-tabs-widget\">\n\t\t<CnTabs\n\t\t\t:aria-label=\"stripLabel\"\n\t\t\t:moreLabel=\"moreLabel\"\n\t\t\t:variant=\"stripVariant\"\n\t\t\t:overflowInNavEnd=\"isBoard\"\n\t\t\tclass=\"cn-tabs-widget__tabs\"\n\t\t\t@update:activeIndex=\"onTabChange\">\n\t\t\t<!-- One Actions menu for the whole widget, bound to whichever child\n\t\t\t is showing. This is the point of the component: six tabbed\n\t\t\t widgets used to mean six card headers stacked down the page. -->\n\t\t\t<template #nav-end>\n\t\t\t\t<!-- The open panel's header link (\"All sales invoices\"): a panel\n\t\t\t\t draws no card header, so the link its widget declares is\n\t\t\t\t drawn here, and changes with the tab. -->\n\t\t\t\t<component\n\t\t\t\t\t:is=\"activeHeaderLinkTarget.tag\"\n\t\t\t\t\tv-if=\"activeHeaderLinkTarget.tag\"\n\t\t\t\t\tclass=\"cn-tabs-widget__header-link\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-header-link\"\n\t\t\t\t\tv-bind=\"activeHeaderLinkTarget.attrs\">\n\t\t\t\t\t{{ cnTranslate(activeHeaderLink.label) }}\n\t\t\t\t</component>\n\t\t\t\t<CnActionsMenu\n\t\t\t\t\tv-if=\"showActions || menuTabs.length\"\n\t\t\t\t\t:showRefresh=\"showActions && showRefresh\"\n\t\t\t\t\t:showRequestFeature=\"showActions && showRequestFeature\"\n\t\t\t\t\t:showDocumentation=\"showActions && showDocumentation\"\n\t\t\t\t\t:showReportBug=\"showActions\"\n\t\t\t\t\t:documentationUrl=\"documentationUrl\"\n\t\t\t\t\t:widgetId=\"activeWidgetId\"\n\t\t\t\t\t:title=\"activeTitle\"\n\t\t\t\t\t:variant=\"isBoard ? 'secondary' : undefined\"\n\t\t\t\t\t:surface=\"`widget:${activeWidgetId}`\"\n\t\t\t\t\trefreshChannel=\"cn:widget:refresh\"\n\t\t\t\t\ttestidBase=\"cn-tabs-widget\">\n\t\t\t\t\t<!-- Board look: the tabs that are not in the strip, at the\n\t\t\t\t\t top of the menu, in place of a \"More\" button. -->\n\t\t\t\t\t<template v-if=\"menuTabs.length\" #lead-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"entry in menuTabs\"\n\t\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t\t:disabled=\"entry.pending || null\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-menu-tab\"\n\t\t\t\t\t\t\t@click=\"openMenuTab(entry)\">\n\t\t\t\t\t\t\t<template v-if=\"entry.icon\" #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"entry.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ menuTabLabel(entry) }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionSeparator v-if=\"showActions\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<!-- The open panel's own items, below the built-in trio.\n\t\t\t\t\t A panel draws no header, so these would otherwise have\n\t\t\t\t\t nowhere to go: the data widget's Metadata and full edit\n\t\t\t\t\t dialog vanished outright when the panel stopped drawing\n\t\t\t\t\t a card. They are rendered here rather than rebuilt here\n\t\t\t\t\t because `run` closes over the widget that published it,\n\t\t\t\t\t which is what keeps the dialog's per-widget config and\n\t\t\t\t\t the widget's own save path. See utils/panelActions.js.\n\n\t\t\t\t\t Only the ACTIVE panel's items. `lazy` keeps a visited\n\t\t\t\t\t tab mounted, so several panels publish at once and an\n\t\t\t\t\t unfiltered list would offer actions for a sheet nobody\n\t\t\t\t\t is looking at. -->\n\t\t\t\t\t<template v-if=\"showActions && activePanelActions.length\" #action-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"action in activePanelActions\"\n\t\t\t\t\t\t\t:key=\"action.key\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"action.run()\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ action.label }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\t\t\t\t</CnActionsMenu>\n\t\t\t</template>\n\n\t\t\t<CnTab\n\t\t\t\tv-for=\"(entry, index) in resolvedTabs\"\n\t\t\t\t:key=\"entry.key\"\n\t\t\t\t:active=\"index === activeIndex\"\n\t\t\t\t:title=\"entry.label\"\n\t\t\t\t:count=\"entry.count\"\n\t\t\t\t:countLabel=\"entry.unreadLabel\"\n\t\t\t\t:overflow=\"entry.overflow\"\n\t\t\t\t:disabled=\"entry.pending\"\n\t\t\t\tlazy\n\t\t\t\t@click=\"activeIndex = index\">\n\t\t\t\t<template #title>\n\t\t\t\t\t<span class=\"cn-tabs-widget__title\">\n\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\tv-if=\"entry.icon && !isBoard\"\n\t\t\t\t\t\t\t:name=\"entry.icon\"\n\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\tclass=\"cn-tabs-widget__title-icon\" />\n\t\t\t\t\t\t{{ entry.label }}\n\t\t\t\t\t\t<NcLoadingIcon\n\t\t\t\t\t\t\tv-if=\"entry.pending\"\n\t\t\t\t\t\t\t:size=\"14\"\n\t\t\t\t\t\t\t:name=\"loadingLabel\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-pending\" />\n\t\t\t\t\t</span>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- A stack (`widgetIds`): every widget is a titled card; the\n\t\t\t\t first joins the open tab, the next ones stand below it. -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"entry.widget && entry.isStack\"\n\t\t\t\t\tclass=\"cn-tabs-widget__stack\"\n\t\t\t\t\t:class=\"{ 'cn-tabs-widget__stack--grid': !!entry.grid }\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-stack\">\n\t\t\t\t\t<div class=\"cn-tabs-widget__stack-first\" :style=\"spanStyle(entry.grid, 0)\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"(child, childIndex) in entry.stack\"\n\t\t\t\t\t\t:key=\"`${entry.key}-${child.id}`\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__stack-item\"\n\t\t\t\t\t\t:style=\"spanStyle(entry.grid, childIndex + 1)\"\n\t\t\t\t\t\t:data-testid=\"`cn-tabs-widget-stack-${child.id}`\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"child\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showHeaderLink=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<template v-else-if=\"entry.widget\">\n\t\t\t\t\t<!-- A single widget with a title of its own heads its panel\n\t\t\t\t\t (DqZaakDocumenten); a title the tab already shows is not\n\t\t\t\t\t repeated. -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"panelHeading(entry)\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__panel-heading\"\n\t\t\t\t\t\t:class=\"{ 'cn-tabs-widget__panel-heading--actions': panelHeaderActions(entry).length > 0 }\"\n\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-panel-heading\">\n\t\t\t\t\t\t<div class=\"cn-tabs-widget__panel-heading-text\">\n\t\t\t\t\t\t\t<h2 class=\"cn-tabs-widget__panel-title\">\n\t\t\t\t\t\t\t\t{{ panelHeading(entry).title }}\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t<span v-if=\"panelHeading(entry).subtitle\" class=\"cn-tabs-widget__panel-subtitle\">{{ panelHeading(entry).subtitle }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<CnWidgetHeaderActionButtons v-if=\"panelHeaderActions(entry).length > 0\" :actions=\"panelHeaderActions(entry)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<!-- The widget's manifest `headerActions` with no heading to\n\t\t\t\t\t sit in: a row of their own above the panel's content. -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-else-if=\"panelHeaderActions(entry).length > 0\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__panel-actions\"\n\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-panel-actions\">\n\t\t\t\t\t\t<CnWidgetHeaderActionButtons :actions=\"panelHeaderActions(entry)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t</template>\n\t\t\t\t<CnEmptyContent v-else :name=\"missingLabel(entry)\" />\n\t\t\t</CnTab>\n\t\t</CnTabs>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionSeparator, NcLoadingIcon } from '@nextcloud/vue'\nimport CnDetailWidgetHost from '../CnDetailWidgetHost/CnDetailWidgetHost.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnTab from '../CnTabs/CnTab.vue'\nimport CnTabs from '../CnTabs/CnTabs.vue'\nimport CnWidgetHeaderActionButtons from '../CnWidgetWrapper/CnWidgetHeaderActionButtons.vue'\nimport { normalizeLook } from '../../composables/useLook.js'\nimport { dispatchAction } from '../../utils/actionsDispatcher.js'\nimport { headerLinkTarget, resolveHeaderLink, widgetHeaderLink } from '../../utils/contentHeaderLink.js'\nimport { resolveTabCount } from '../../utils/detailActionModel.js'\nimport { detailWidgetVisible } from '../../utils/detailWidgetVisibility.js'\nimport { fetchListTotal } from '../../utils/fetchFilterCounts.js'\nimport { isActivityWidget } from '../../utils/headerMeta.js'\nimport { PANEL_ACTION_SINK } from '../../utils/panelActions.js'\nimport { setSubResourceRead } from '../../utils/recordInteractions.js'\nimport { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition, readVisibleWhenValue } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.js'\nimport { resolveWidgetHeaderActions } from '../../utils/widgetHeaderActions.js'\nimport { CnActionsMenu } from '../CnActionsMenu/index.js'\n\n/**\n * CnTabsWidget — a widget that holds other widgets, one per tab.\n *\n * A detail page that carries notes, files, related records, sub-records, mail\n * and appointments renders six cards, each with its own header and its own\n * Actions menu, stacked down the page. All six say roughly the same thing about\n * one record, and only one of them is being read at a time. This widget puts\n * them behind a tab strip instead.\n *\n * ## What the tabs take over\n *\n * The strip owns the title and the card. A child renders through\n * `CnDetailWidgetHost` with `chrome=\"bare\"`, so it draws no header and no\n * border of its own, and its content fills the panel exactly as it would have\n * filled its card. The tab label is what the widget's card header used to say.\n *\n * The Actions menu moves OUT of the panels and into the bar, beside the strip\n * rather than inside it, and rebinds to whichever child is showing. So there is\n * one menu, and it always acts on what you are looking at.\n *\n * ## Configuring it\n *\n * `content.tabs[]` names the children and their labels, so a deployment can\n * relabel or reorder tabs, or drop one, without touching code:\n *\n * ```js\n * content: {\n * tabs: [\n * { widgetId: 'case-notes', label: 'Notes', icon: 'NoteTextOutline' },\n * { widgetId: 'case-files', label: 'Files and attachments' },\n * ],\n * }\n * ```\n *\n * `label` and `icon` are optional and fall back to the child widget's own\n * title and icon, so the common case is a list of `widgetId`s.\n *\n * ## Panels are lazy, and stay mounted\n *\n * Each panel is a `CnTab` with `lazy`, so a child only mounts when its tab is\n * first opened. Six eager panels that each fetch on `mounted()` would fire six\n * requests on page load to answer five questions nobody asked. Once opened, a\n * panel stays mounted, so switching back never refetches.\n *\n * ## A named tab whose widget is missing\n *\n * The tab still renders, and its panel says which widget id did not resolve.\n * Dropping the tab would be worse: `content.tabs[]` is hand-authored config,\n * and a typo that silently removes a tab is a typo nobody finds.\n */\nexport default {\n\tname: 'CnTabsWidget',\n\n\tcomponents: {\n\t\tCnActionsMenu,\n\t\tCnDetailWidgetHost,\n\t\tCnIcon,\n\t\tCnTab,\n\t\tCnTabs,\n\t\tCnWidgetHeaderActionButtons,\n\t\tNcActionButton,\n\t\tNcActionSeparator,\n\t\tCnEmptyContent,\n\t\tNcLoadingIcon,\n\t},\n\n\t/**\n\t * Offer the panels a way to put their own menu items in the strip's menu.\n\t *\n\t * Re-provided one level down by `CnDetailWidgetHost`, which knows the id to\n\t * key by; see utils/panelActions.js for why the items travel up instead of\n\t * being rebuilt here.\n\t *\n\t * @return {object} The provided sink.\n\t */\n\tprovide() {\n\t\treturn {\n\t\t\t[PANEL_ACTION_SINK]: {\n\t\t\t\t/**\n\t\t\t\t * Publish a panel's items, under one SOURCE.\n\t\t\t\t *\n\t\t\t\t * A panel has two possible publishers: the host, for an action\n\t\t\t\t * the host itself would have drawn (the catalog Add), and the\n\t\t\t\t * widget inside it, for its own menu items. Keyed by source so\n\t\t\t\t * the two coexist; a single slot per widget meant whichever\n\t\t\t\t * published last silently replaced the other.\n\t\t\t\t *\n\t\t\t\t * Replaces the map rather than mutating it so the computed that\n\t\t\t\t * reads it re-evaluates on any change.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {object[]} items Its PanelAction descriptors.\n\t\t\t\t * @param {string} [source] Who is publishing: `host` or `widget`.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tset: (id, items, source = 'widget') => {\n\t\t\t\t\t// `activePanelActions` spreads what is stored, so a\n\t\t\t\t\t// non-array becomes one menu item per character.\n\t\t\t\t\tif (!id || !Array.isArray(items)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst forId = { ...(this.panelActionsByWidget[id] || {}), [source]: items }\n\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: forId }\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Withdraw one source's items, on unmount or when that\n\t\t\t\t * publisher's own menu comes back. The other source's items\n\t\t\t\t * stay.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {string} [source] Who is withdrawing.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tclear: (id, source = 'widget') => {\n\t\t\t\t\tconst forId = this.panelActionsByWidget[id]\n\t\t\t\t\tif (!forId || !(source in forId)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [source]: _removed, ...keptSources } = forId\n\t\t\t\t\tif (Object.keys(keptSources).length) {\n\t\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: keptSources }\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [id]: _gone, ...rest } = this.panelActionsByWidget\n\t\t\t\t\tthis.panelActionsByWidget = rest\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t},\n\n\tinject: {\n\t\t/** The app's look, provided by CnAppRoot or CnPageRenderer (`nextcloud` or `board`). */\n\t\tcnLook: { default: 'nextcloud' },\n\t\t/** The tab list's name under the board look, provided by CnDetailPage (`config.tabsLabel`). */\n\t\tcnDetailTabsLabel: { default: null },\n\t\t/**\n\t\t * The records the detail page's `visibilityContext` names, keyed\n\t\t * by name (a case's case type), provided by CnDetailPage. A tab's\n\t\t * `visibleWhen` reads them as `@context.<name>`. Null on any other page.\n\t\t */\n\t\tcnDetailVisibilityRows: { default: null },\n\t\t/**\n\t\t * The page's workspace bag (CnDashboardPage provides it), which a\n\t\t * page control such as a chips filter writes. A widget in a stack is\n\t\t * left out while its workspace `visibleWhen` does not hold. Null off a\n\t\t * dashboard.\n\t\t */\n\t\tcnWorkspaceContext: { default: null },\n\t\t/**\n\t\t * The host's translate (CnAppRoot provides `cnTranslate`), so a tab\n\t\t * label written in the manifest reads in the user's language.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's action dispatcher (CnPageRenderer), for a panel widget's `headerActions`. */\n\t\tcnDispatchAction: { default: null },\n\t\t/** The detail page's record edit form (`{ available, open }`), for an `edit-record` header action. */\n\t\tcnRecordEdit: { default: null },\n\t\t/**\n\t\t * CnDetailPage's report of the open body tab, so its side column can\n\t\t * follow the tab (a side entry's `tabs`). Null on any other page.\n\t\t */\n\t\tcnDetailReportTab: { default: null },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's config: `{ tabs, ariaLabel }`.\n\t\t *\n\t\t * `tabs[]` entries are `{ widgetId, label?, icon?, count?, countField?, overflow? }`.\n\t\t * `label` and `icon` fall back to the referenced widget's own title and\n\t\t * icon. `count` is a number shown after the label; `countField` reads\n\t\t * it off the record instead (a list counts its items). `countFrom`\n\t\t * counts a list on the server: `\"widget\"` counts the child widget's\n\t\t * own list (`content.register`, `schema`, `filter`, tokens such as\n\t\t * `@objectId` resolved), an object `{ register, schema, filter? }`\n\t\t * names the list, and `{ endpoint, field? }` counts the list (or reads\n\t\t * the number) an endpoint answers with, `@objectId` resolved; `count`\n\t\t * and `countField` win over it. `overflow: true`\n\t\t * lists the tab under \"More\".\n\t\t *\n\t\t * A tab with `widgetIds` can lay them out in a grid instead of one under\n\t\t * the other: `columns: 4` gives each a quarter of the row, and\n\t\t * `layout: [{ widgetId, gridWidth }]` sets a width (of 12) per widget, as\n\t\t * the page grid does. Widgets wrap onto the next row.\n\t\t *\n\t\t * A tab with `default: true` is the one the strip opens on, unless a\n\t\t * route hash names another tab or the marked tab sits under \"More\".\n\t\t *\n\t\t * `maxVisibleTabs` caps the strip: later tabs go under \"More\" (in the\n\t\t * board look: into the Actions menu, with History kept in the strip).\n\t\t * `hideEmpty: true` moves a tab whose count is 0 there too.\n\t\t * `moreLabel` names that menu. `variant: \"segmented\"` draws the strip\n\t\t * as a pill switch (CnTabs' segmented variant); `line` is the default.\n\t\t *\n\t\t * @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}|{endpoint: string, field?: string}), overflow?: boolean, default?: boolean, columns?: number, layout?: Array<{widgetId: string, gridWidth: number}>}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Every widget definition available on the surface, for `content.tabs[]`\n\t\t * to reference by id.\n\t\t *\n\t\t * The surface passes its whole list rather than the resolved children\n\t\t * because a tab may name a widget that does not exist, and this component\n\t\t * has to be able to say so.\n\t\t *\n\t\t * @type {object[]}\n\t\t */\n\t\tavailableWidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The bound record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The loaded record, or null while it is still being fetched. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The resolved object-type slug. */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The resolved JSON Schema object, needed by a `data` child. */\n\t\tschemaObject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** OpenRegister register slug of the surface. */\n\t\tregister: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** OpenRegister schema slug of the surface. */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The effective object store. */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Rendering surface forwarded to integration children (AD-19). */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'detail-page',\n\t\t},\n\n\t\t/** Object context forwarded to integration children. */\n\t\tintegrationContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The consumer's component registry, for custom child widget types. */\n\t\tcnRegistry: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip draws its Actions menu at all. `false` drops the\n\t\t * whole menu, the open panel's own items included, for a board that\n\t\t * draws none. Manifest: `content.showActions` on the tabs widget.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-actions-off/specs/tabs-widget-actions-off/spec.md#requirement-a-manifest-can-turn-off-the-tab-strips-actions-menu\n\t\t */\n\t\tshowActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Refresh entry in the hoisted Actions menu. */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Request-a-feature entry in the hoisted Actions menu. */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Documentation entry in the hoisted Actions menu. */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Documentation URL for the hoisted Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['geo-saved', 'open-integration', 'select-object'],\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveIndex: 0,\n\t\t\t// Key of the tab showing, so it stays the active one when a tab\n\t\t\t// before it appears or disappears.\n\t\t\tactiveKey: '',\n\t\t\t// Result of each tab's SOURCE-mode `visibleWhen`, by the tab's index\n\t\t\t// in `content.tabs`. A missing entry means the count is pending.\n\t\t\tsourceVisibility: {},\n\t\t\t// Bumped per evaluation round, so a slow answer from an earlier round is dropped.\n\t\t\tvisibilitySeq: 0,\n\t\t\t// Totals counted for tabs with `countFrom`, by position in `content.tabs`.\n\t\t\twidgetCounts: {},\n\t\t\t// Read-state parts this page has marked read since it opened\n\t\t\t// (`badgeSource: 'readState'`), so their counts go without a reload.\n\t\t\treadCleared: {},\n\t\t\tcountSeq: 0,\n\t\t\t// Tab id named by the route hash that has not appeared yet (still pending).\n\t\t\thashTargetId: '',\n\t\t\t// Items published by the panels, keyed by widget id. Keyed rather\n\t\t\t// than a flat list because `lazy` keeps a visited tab mounted, so\n\t\t\t// more than one panel publishes at a time.\n\t\t\tpanelActionsByWidget: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * What a tab's `visibleWhen` reads: the record, with the records the\n\t\t * detail page's `visibilityContext` names under `@context.<name>`. Null while\n\t\t * the record, or one of those records, is not there yet.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/detail-widgets-visible-when/specs/detail-widgets-visible-when/spec.md#requirement-a-detail-page-can-load-records-a-condition-names\n\t\t */\n\t\tconditionData() {\n\t\t\tif (!this.objectData) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst holder = this.cnDetailVisibilityRows\n\t\t\tif (!holder) {\n\t\t\t\treturn this.objectData\n\t\t\t}\n\t\t\tconst rows = holder.value\n\t\t\tif (!rows) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { ...this.objectData, '@context': rows }\n\t\t},\n\n\t\t/**\n\t\t * The open panel's own menu items, or an empty list.\n\t\t *\n\t\t * @return {object[]} PanelAction descriptors for the active tab.\n\t\t */\n\t\tactivePanelActions() {\n\t\t\tconst forId = this.panelActionsByWidget[this.activeWidgetId]\n\t\t\tif (!forId) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\t// Host first, then the widget's own: the catalog Add is about the\n\t\t\t// panel as a whole, the widget's items about what is in it.\n\t\t\treturn [...(forId.host || []), ...(forId.widget || [])]\n\t\t},\n\n\t\t/**\n\t\t * The tabs the board look lists at the top of the Actions menu: the\n\t\t * overflow tabs, less the one that is open (it is in the strip).\n\t\t * Empty outside the board look, where CnTabs draws \"More\".\n\t\t *\n\t\t * @return {object[]} Resolved tabs, in strip order.\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\tmenuTabs() {\n\t\t\tif (!this.isBoard) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn this.resolvedTabs.filter((entry, index) => entry.overflow && index !== this.activeIndex)\n\t\t},\n\n\t\t/**\n\t\t * The configured tabs, each paired with the widget definition it names.\n\t\t *\n\t\t * A tab goes under the strip's \"More\" menu when it says `overflow`, when\n\t\t * `content.hideEmpty` is set and its count is 0, or when\n\t\t * `content.maxVisibleTabs` places are already taken. `count` is a\n\t\t * literal, or read off the record through `countField`. In the board\n\t\t * look those tabs are listed in the Actions menu instead, and the\n\t\t * activity (History) tab always stays in the strip.\n\t\t *\n\t\t * @return {object[]} `{ key, widgetId, label, icon, widget, count, overflow }` per tab.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\tresolvedTabs() {\n\t\t\tconst authored = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\t// The board look: the activity is the History tab and the last tab,\n\t\t\t// whatever its place in the manifest. `index` stays the position in\n\t\t\t// `content.tabs`, which the source-mode conditions are keyed on.\n\t\t\tconst isActivityTab = (tab) => {\n\t\t\t\tconst id = this.tabWidgetIds(tab)[0]\n\t\t\t\treturn isActivityWidget(this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t}\n\t\t\tconst ordered = authored.map((tab, index) => ({ tab, index }))\n\t\t\tif (this.isBoard) {\n\t\t\t\tordered.sort((a, b) => (Number(isActivityTab(a.tab)) - Number(isActivityTab(b.tab))) || (a.index - b.index))\n\t\t\t}\n\t\t\tconst tabs = ordered.map(({ tab }) => tab)\n\t\t\tconst originalIndex = ordered.map(({ index }) => index)\n\t\t\tconst max = Number(this.content?.maxVisibleTabs)\n\t\t\tconst hideEmpty = this.content?.hideEmpty === true\n\t\t\t// The board keeps its History tab in the strip, so it holds one of\n\t\t\t// the `maxVisibleTabs` places from the start.\n\t\t\tconst pinActivity = this.isBoard && tabs.some((tab, position) => isActivityTab(tab) && this.tabVisibility(tab, originalIndex[position]) !== 'hidden')\n\t\t\t// How many tabs have taken a place in the strip so far. A tab that\n\t\t\t// is already going under \"More\" does not use one up.\n\t\t\tlet placed = pinActivity ? 1 : 0\n\t\t\tconst resolved = []\n\t\t\tconst usedKeys = new Set()\n\t\t\ttabs.forEach((tab, position) => {\n\t\t\t\tconst index = originalIndex[position]\n\t\t\t\t// A tab whose condition is false is absent, not empty.\n\t\t\t\tconst visibility = this.tabVisibility(tab, index)\n\t\t\t\tif (visibility === 'hidden') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// A stack (`widgetIds`) resolves every id; one that names no\n\t\t\t\t// widget is skipped. The first that resolves is the panel's.\n\t\t\t\tconst ids = this.tabWidgetIds(tab)\n\t\t\t\tconst named = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null).filter(Boolean)\n\t\t\t\t\t: []\n\t\t\t\tconst widgets = named.filter((w) => !this.hiddenByWorkspace(w) && !this.hiddenByRecord(w))\n\t\t\t\tconst widget = ids.length > 1\n\t\t\t\t\t? (widgets[0] || null)\n\t\t\t\t\t: (this.availableWidgets.find((w) => w && w.id === ids[0]) || null)\n\t\t\t\tconst widgetId = widget ? widget.id : ids[0]\n\t\t\t\tconst declared = resolveTabCount(typeof tab === 'object' ? tab : null, this.countObject)\n\t\t\t\tconst counted = this.widgetCounts[index]\n\t\t\t\tconst count = declared === null && typeof counted === 'number' ? counted : declared\n\t\t\t\tconst pinned = pinActivity && isActivityTab(tab)\n\t\t\t\tlet overflow = !pinned && ((tab && tab.overflow === true) || (hideEmpty && count === 0))\n\t\t\t\tif (!overflow && !pinned) {\n\t\t\t\t\tif (Number.isFinite(max) && max > 0 && placed >= max) {\n\t\t\t\t\t\toverflow = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaced += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Keyed on the tab's own id, else its place in `content.tabs`:\n\t\t\t\t// never on the widget the panel starts with, which changes when\n\t\t\t\t// a stack's first card turns visible and would remount the panel.\n\t\t\t\tconst ownId = tab && typeof tab === 'object' && typeof tab.id === 'string' ? tab.id : ''\n\t\t\t\tconst key = ownId !== '' && !usedKeys.has(ownId) ? ownId : `tab-${index}`\n\t\t\t\tusedKeys.add(key)\n\t\t\t\tresolved.push({\n\t\t\t\t\tkey,\n\t\t\t\t\tid: (tab && typeof tab === 'object' && tab.id) || widgetId || '',\n\t\t\t\t\twidgetId,\n\t\t\t\t\tlabel: this.tabLabel(tab, widget, widgetId),\n\t\t\t\t\ticon: (tab && tab.icon) || widget?.icon || '',\n\t\t\t\t\twidget,\n\t\t\t\t\tstack: widgets.slice(1),\n\t\t\t\t\t// A stack of two or more widgets stays a stack of titled cards\n\t\t\t\t\t// when conditions leave one of them showing (DqSociaalDomein\n\t\t\t\t\t// \"De melding\"): the record decides which cards show, not\n\t\t\t\t\t// whether the panel is a card.\n\t\t\t\t\tisStack: named.length > 1,\n\t\t\t\t\tgrid: this.stackGrid(tab, widgets),\n\t\t\t\t\tcount,\n\t\t\t\t\tunreadKey: this.unreadKeyOf(tab, widgetId),\n\t\t\t\t\tunreadLabel: this.unreadLabelOf(tab, widgetId),\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t\topensFirst: Boolean(tab && typeof tab === 'object' && tab.default === true),\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Whether the tabs badge what is new on each part of the record and\n\t\t * mark that part read when it is opened (`content.badgeSource: 'readState'`).\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\treadStateBadges() {\n\t\t\treturn this.content?.badgeSource === 'readState'\n\t\t},\n\n\t\t/**\n\t\t * The record the tab counts read: the record itself, less the\n\t\t * read-state parts this page has already marked read.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tcountObject() {\n\t\t\tconst record = this.objectData\n\t\t\tconst counts = record && record['@self'] && record['@self'].unreadCounts\n\t\t\tif (!counts || typeof counts !== 'object' || Object.keys(this.readCleared).length === 0) {\n\t\t\t\treturn record\n\t\t\t}\n\t\t\tconst left = { ...counts }\n\t\t\tfor (const key of Object.keys(this.readCleared)) {\n\t\t\t\tleft[key] = 0\n\t\t\t}\n\t\t\treturn { ...record, '@self': { ...record['@self'], unreadCounts: left } }\n\t\t},\n\n\t\t/** @return {string} The keys of the tabs in the strip, to notice one appearing or going. */\n\t\tvisibleKeys() {\n\t\t\treturn this.resolvedTabs.map((tab) => tab.key).join('|')\n\t\t},\n\n\t\t/** @return {string} Accessible name of a pending tab's spinner. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/**\n\t\t * The lists the tabs count (`countFrom`), serialised, to count again\n\t\t * when they change.\n\t\t *\n\t\t * @return {string} The key.\n\t\t */\n\t\tcountSourcesKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => this.countSourceOf(tab)))\n\t\t},\n\n\t\t/** @return {string} The source-mode conditions, serialised, to re-evaluate when they change. */\n\t\tsourceConditionsKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => (tab && typeof tab === 'object' && tab.visibleWhen && !isLocallyDecidableVisibleWhen(tab.visibleWhen)) ? tab.visibleWhen : null))\n\t\t},\n\n\t\t/**\n\t\t * Name of the menu that holds the tabs that are not in the strip.\n\t\t *\n\t\t * @return {string|undefined} The configured label, or undefined for the default.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tmoreLabel() {\n\t\t\tconst label = this.content?.moreLabel\n\t\t\treturn typeof label === 'string' && label !== '' ? label : undefined\n\t\t},\n\n\t\t/**\n\t\t * The tab currently showing.\n\t\t *\n\t\t * @return {object|null} The resolved tab, or null when there are none.\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.resolvedTabs[this.activeIndex] || null\n\t\t},\n\n\t\t/**\n\t\t * The active child's id, so the hoisted Refresh reaches THAT child's\n\t\t * fetch over `cn:widget:refresh` rather than a sibling's.\n\t\t *\n\t\t * @return {string} The active widget id.\n\t\t */\n\t\tactiveWidgetId() {\n\t\t\treturn this.activeTab?.widgetId || ''\n\t\t},\n\n\t\t/**\n\t\t * The header link the open tab's widget declares (`headerLink` on the\n\t\t * definition, or in its content), or null. For a stack, the first\n\t\t * widget's.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-header-link/specs/tabs-widget-header-link/spec.md#requirement-the-tab-strip-draws-the-open-panels-header-link\n\t\t * @return {object|null}\n\t\t */\n\t\tactiveHeaderLink() {\n\t\t\treturn resolveHeaderLink(widgetHeaderLink(this.activeTab?.widget), { objectId: this.objectId, object: this.objectData })\n\t\t},\n\n\t\t/**\n\t\t * How to draw the open panel's header link: a router link for a\n\t\t * route, an anchor for an href, nothing otherwise.\n\t\t *\n\t\t * @spec openspec/changes/tabs-widget-header-link/specs/tabs-widget-header-link/spec.md#requirement-the-tab-strip-draws-the-open-panels-header-link\n\t\t * @return {{tag: string, attrs: object}}\n\t\t */\n\t\tactiveHeaderLinkTarget() {\n\t\t\treturn headerLinkTarget(this.activeHeaderLink, Boolean(this.$router))\n\t\t},\n\n\t\t/**\n\t\t * The active child's label, so the Actions menu names what it acts on.\n\t\t *\n\t\t * @return {string} The active tab's label.\n\t\t */\n\t\tactiveTitle() {\n\t\t\treturn this.activeTab?.label || ''\n\t\t},\n\n\t\t/**\n\t\t * The strip's look: `segmented` when the content asks for it, else\n\t\t * CnTabs' default `line`. An unknown value falls back to `line`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-tabs-widget-renders-a-segmented-strip\n\t\t * @return {('line'|'segmented')} The CnTabs variant.\n\t\t */\n\t\tstripVariant() {\n\t\t\treturn this.content?.variant === 'segmented' ? 'segmented' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * Accessible name for the tab strip.\n\t\t *\n\t\t * @return {string} The aria-label.\n\t\t */\n\t\tstripLabel() {\n\t\t\tconst named = this.isBoard && this.cnDetailTabsLabel ? this.cnDetailTabsLabel.value : ''\n\t\t\treturn this.content?.ariaLabel || named || t('nextcloud-vue', 'Details')\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip is drawn in the board look.\n\t\t *\n\t\t * @return {boolean} True in the board look.\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-folder-tabs-take-the-board-strip\n\t\t */\n\t\tisBoard() {\n\t\t\treturn normalizeLook(this.cnLook) === 'board'\n\t\t},\n\t},\n\n\twatch: {\n\t\tactiveIndex(index) {\n\t\t\tthis.activeKey = this.resolvedTabs[index]?.key || ''\n\t\t},\n\n\t\t// The open tab's part of the record is now seen: on opening a tab, and\n\t\t// when the record arrives with something new on the open one.\n\t\t'activeTab.key': function() {\n\t\t\tthis.markActiveTabRead()\n\t\t},\n\n\t\t'activeTab.unreadLabel': {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.markActiveTabRead()\n\t\t\t},\n\t\t},\n\n\t\t// Tell the detail page which tab is open (side cards per tab).\n\t\t'activeTab.id': {\n\t\t\timmediate: true,\n\t\t\thandler(id) {\n\t\t\t\tif (typeof this.cnDetailReportTab === 'function') {\n\t\t\t\t\tthis.cnDetailReportTab(id || '')\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t// A tab appeared or went. Keep the same tab active; when it is the active\n\t\t// tab that went, the first visible one takes over and the hash follows.\n\t\tvisibleKeys() {\n\t\t\tif (this.hashTargetId !== '') {\n\t\t\t\tconst arrived = this.resolvedTabs.findIndex((tab) => tab.id === this.hashTargetId && !tab.pending)\n\t\t\t\tif (arrived >= 0) {\n\t\t\t\t\tthis.activeIndex = arrived\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this.resolvedTabs.some((tab) => tab.id === this.hashTargetId)) {\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst stay = this.resolvedTabs.findIndex((tab) => tab.key === this.activeKey)\n\t\t\tif (stay >= 0) {\n\t\t\t\tif (stay !== this.activeIndex) {\n\t\t\t\t\tthis.activeIndex = stay\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tthis.activeIndex = first >= 0 ? first : 0\n\t\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\t\tthis.syncHash()\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.sourceVisibility = {}\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.widgetCounts = {}\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tcountSourcesKey() {\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tsourceConditionsKey() {\n\t\t\tthis.refreshSourceVisibility()\n\t\t},\n\t},\n\n\t/**\n\t * Open on the tab marked `default: true`, else on the first tab that is in\n\t * the strip. Tab 0 is not enough: when tab 0 sits under \"More\" the strip\n\t * would open on a tab the author chose to tuck away.\n\t *\n\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t */\n\tcreated() {\n\t\t// A route hash naming a tab opens that tab. One naming a hidden tab is\n\t\t// ignored, without an error; one naming a tab still pending is honoured\n\t\t// once its condition answers.\n\t\tconst wanted = this.currentHash()\n\t\tconst named = wanted === '' ? -1 : this.resolvedTabs.findIndex((tab) => tab.id === wanted)\n\t\tif (named >= 0 && !this.resolvedTabs[named].pending) {\n\t\t\tthis.activeIndex = named\n\t\t} else {\n\t\t\tif (named >= 0) {\n\t\t\t\tthis.hashTargetId = wanted\n\t\t\t}\n\t\t\tconst marked = this.resolvedTabs.findIndex((tab) => tab.opensFirst && !tab.overflow && !tab.pending)\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = marked >= 0 ? marked : first >= 0 ? first : this.resolvedTabs.findIndex((tab) => !tab.overflow)\n\t\t\tif (fallback > 0) {\n\t\t\t\tthis.activeIndex = fallback\n\t\t\t}\n\t\t}\n\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\tthis.refreshSourceVisibility()\n\t\tthis.refreshWidgetCounts()\n\t},\n\n\tmounted() {\n\t\tthis._onRefresh = () => {\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.refreshWidgetCounts()\n\t\t}\n\t\tsubscribe('cn:page:refresh', this._onRefresh)\n\t\tsubscribe('cn:widget:refresh', this._onRefresh)\n\t\t// A hash that changes on an open page (a header link `{ tab }`) opens that tab.\n\t\tthis._onHashChange = () => this.openTabById(decodeURIComponent(window.location.hash.replace(/^#/, '')))\n\t\twindow.addEventListener('hashchange', this._onHashChange)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t\twindow.removeEventListener('hashchange', this._onHashChange)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Open the tab with this id; one still pending opens once it appears,\n\t\t * and an unknown or hidden id changes nothing.\n\t\t *\n\t\t * @spec openspec/changes/header-link-switches-tab/specs/header-link/spec.md#requirement-a-header-link-can-open-another-tab-of-the-page\n\t\t * @param {string} id The tab id.\n\t\t * @return {void}\n\t\t */\n\t\topenTabById(id) {\n\t\t\tif (!id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst index = this.resolvedTabs.findIndex((tab) => tab.id === id)\n\t\t\tif (index < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.resolvedTabs[index].pending) {\n\t\t\t\tthis.hashTargetId = id\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeIndex = index\n\t\t},\n\n\t\t/**\n\t\t * The read-state part a tab counts: `unreadKey`, else its id, else its widget id.\n\t\t *\n\t\t * @param {object|string} tab The tab declaration.\n\t\t * @param {string} widgetId The tab's widget id.\n\t\t * @return {string} The part, or ''.\n\t\t */\n\t\tunreadKeyOf(tab, widgetId) {\n\t\t\tconst own = tab && typeof tab === 'object' ? tab : {}\n\t\t\treturn String(own.unreadKey || own.id || widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * What a screen reader hears after a tab's name when its part holds\n\t\t * something unseen (\"3 new\"), under `badgeSource: 'readState'`. The count\n\t\t * pill alone is a bare number.\n\t\t *\n\t\t * @param {object|string} tab The tab declaration.\n\t\t * @param {string} widgetId The tab's widget id.\n\t\t * @return {string} The label, or '' when nothing is new.\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tunreadLabelOf(tab, widgetId) {\n\t\t\tif (!this.readStateBadges || (tab && typeof tab === 'object' && (typeof tab.count === 'number' || tab.countField || tab.countObjectRows))) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst key = this.unreadKeyOf(tab, widgetId)\n\t\t\tconst counts = this.countObject && this.countObject['@self'] && this.countObject['@self'].unreadCounts\n\t\t\tconst count = counts && key ? Number(counts[key]) : 0\n\t\t\tif (!Number.isFinite(count) || count < 1) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn n('nextcloud-vue', '{count} new', '{count} new', count, { count })\n\t\t},\n\n\t\t/**\n\t\t * Mark the open tab's part of the record read (`PUT .../read-state`\n\t\t * with `subResource`), once, and drop its count. A refused write keeps\n\t\t * the count: an unseen part that stays marked is the safe direction.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-opening-a-tab-marks-its-part-read\n\t\t */\n\t\tasync markActiveTabRead() {\n\t\t\tconst tab = this.activeTab\n\t\t\tif (!this.readStateBadges || !tab || !tab.unreadLabel || !this.objectId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = tab.unreadKey\n\t\t\tif (this.readCleared[key]) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst outcome = await setSubResourceRead(String(this.register || ''), String(this.schema || ''), String(this.objectId), key)\n\t\t\tif (outcome && outcome.ok) {\n\t\t\t\tthis.readCleared = { ...this.readCleared, [key]: true }\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Whether a page control hides a widget of a stack right now: its\n\t\t * `visibleWhen` (on the widget, its content or its props) is a\n\t\t * workspace condition that does not hold. Off a dashboard there is no\n\t\t * workspace, and nothing is hidden. Other conditions are not looked at\n\t\t * here.\n\t\t *\n\t\t * @param {object} widget The widget definition.\n\t\t * @return {boolean} True when the widget must not draw.\n\t\t * @spec openspec/changes/tabs-stack-follows-page-controls/specs/tabs-widget/spec.md#requirement-a-widget-in-a-tab-stack-follows-the-page-controls\n\t\t */\n\t\thiddenByWorkspace(widget) {\n\t\t\tconst cond = widget.visibleWhen || widget.content?.visibleWhen || widget.props?.visibleWhen || null\n\t\t\tif (!isWorkspaceCondition(cond)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst bag = this.cnWorkspaceContext\n\t\t\tif (!bag || typeof bag !== 'object') {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !evaluateWorkspaceCondition(cond, 'value' in bag ? bag.value : bag)\n\t\t},\n\n\t\t/**\n\t\t * Whether the record hides a widget of a stack on a detail page: its\n\t\t * own `visibleWhen` reads a field of the record or of a record the\n\t\t * page's `visibilityContext` names (`@context.<name>`), and does not\n\t\t * hold, as a grid widget's would not. Hidden while those records\n\t\t * load. Off a detail page (no record), and for a condition that needs\n\t\t * a request, nothing is hidden here.\n\t\t *\n\t\t * @param {object} widget The widget definition.\n\t\t * @return {boolean} True when the widget must not draw.\n\t\t * @spec openspec/changes/tab-stack-child-visible-when/specs/tab-stack-child-visible-when/spec.md#requirement-a-widget-in-a-tab-stack-on-a-detail-page-follows-its-own-condition\n\t\t */\n\t\thiddenByRecord(widget) {\n\t\t\tconst cond = widget.visibleWhen\n\t\t\tif (!this.objectData || !cond || typeof cond !== 'object' || isWorkspaceCondition(cond) || !isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !detailWidgetVisible(widget, this.conditionData)\n\t\t},\n\n\t\t/**\n\t\t * The grid a stack lays its widgets out in, as one column span (of 12)\n\t\t * per widget in order, or null for the plain vertical stack. A tab says\n\t\t * `columns: 4` (every widget spans a quarter of the row) and/or\n\t\t * `layout: [{ widgetId, gridWidth }]`, the page grid's width key per\n\t\t * widget (of 12; a widget it does not name takes the `columns` share, or\n\t\t * the whole row). Widgets wrap onto the next row. A widget `layout`\n\t\t * places that ends up alone in its row (its partner hidden for this\n\t\t * record) takes the whole row. Heights follow the content.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {Array<object>} widgets The widgets of the stack, in order.\n\t\t * @return {number[]|null} The column span of each widget, or null.\n\t\t */\n\t\tstackGrid(tab, widgets) {\n\t\t\tif (!tab || typeof tab !== 'object' || widgets.length < 2) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst clamp = (value) => Math.min(12, Math.max(1, Math.floor(Number(value))))\n\t\t\tconst columns = Number(tab.columns)\n\t\t\tconst share = Number.isFinite(columns) && columns >= 1 ? clamp(12 / Math.min(12, Math.floor(columns))) : 12\n\t\t\tconst placed = new Map((Array.isArray(tab.layout) ? tab.layout : [])\n\t\t\t\t.filter((entry) => entry && typeof entry.widgetId === 'string' && Number.isFinite(Number(entry.gridWidth)))\n\t\t\t\t.map((entry) => [entry.widgetId, clamp(entry.gridWidth)]))\n\t\t\tif (placed.size === 0 && share === 12) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst spans = widgets.map((widget) => placed.get(widget.id) ?? share)\n\t\t\t// A widget `layout` sets beside a partner fills its row when it is\n\t\t\t// alone there: the partner is hidden for this record, and half a\n\t\t\t// row with nothing beside it is a hole, not a layout.\n\t\t\tconst rows = []\n\t\t\tlet used = 12\n\t\t\tspans.forEach((span, index) => {\n\t\t\t\tif (used + span > 12) {\n\t\t\t\t\trows.push([])\n\t\t\t\t\tused = 0\n\t\t\t\t}\n\t\t\t\trows[rows.length - 1].push(index)\n\t\t\t\tused += span\n\t\t\t})\n\t\t\trows.forEach((row) => {\n\t\t\t\tif (row.length === 1 && placed.has(widgets[row[0]].id)) {\n\t\t\t\t\tspans[row[0]] = 12\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn spans\n\t\t},\n\n\t\t/**\n\t\t * The inline column span of one widget of a gridded stack.\n\t\t *\n\t\t * @param {number[]|null} grid The spans of the stack, or null.\n\t\t * @param {number} index The widget's position in the stack.\n\t\t * @return {object|undefined} The style, or undefined without a grid.\n\t\t */\n\t\tspanStyle(grid, index) {\n\t\t\treturn grid ? { gridColumn: `span ${grid[index] || 12}` } : undefined\n\t\t},\n\n\t\t/**\n\t\t * The widget ids a tab names: `widgetIds` (a stack) when it holds at\n\t\t * least one id, else `widgetId`, or the bare string.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {string[]} The ids, at least one entry (possibly undefined).\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-a-tab-can-hold-a-stack-of-widgets\n\t\t */\n\t\ttabWidgetIds(tab) {\n\t\t\tif (typeof tab === 'string') {\n\t\t\t\treturn [tab]\n\t\t\t}\n\t\t\tif (tab && Array.isArray(tab.widgetIds)) {\n\t\t\t\tconst ids = tab.widgetIds.filter((id) => typeof id === 'string' && id !== '')\n\t\t\t\tif (ids.length) {\n\t\t\t\t\treturn ids\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [tab?.widgetId]\n\t\t},\n\n\t\t/**\n\t\t * A single widget's manifest `headerActions`, for its panel's heading\n\t\t * row: gated on the record, dispatched through the page's dispatcher.\n\t\t *\n\t\t * @param {object} entry A resolved tab.\n\t\t * @return {Array<object>} The buttons.\n\t\t * @spec openspec/changes/widget-header-actions/specs/widget-header-actions/spec.md#requirement-the-card-that-titles-a-widget-draws-its-header-actions\n\t\t */\n\t\tpanelHeaderActions(entry) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\treturn resolveWidgetHeaderActions(entry && entry.widget, {\n\t\t\t\tobject: this.objectData || {},\n\t\t\t\tobjectId: this.objectId,\n\t\t\t\ttranslate,\n\t\t\t\trecordEdit: this.cnRecordEdit,\n\t\t\t\tdispatch: (action) => (typeof this.cnDispatchAction === 'function'\n\t\t\t\t\t? this.cnDispatchAction(action)\n\t\t\t\t\t: dispatchAction(action, { router: this.$router || null })),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The title row a single widget's panel draws: the widget's own title\n\t\t * and its description, through the app's translate. None when the\n\t\t * widget has no title or no description, or the tab already shows the\n\t\t * title: a title alone names what the tab already names, so the\n\t\t * widget stays bare in its panel.\n\t\t *\n\t\t * @param {object} entry A resolved tab.\n\t\t * @return {{title: string, subtitle: string}|null} The heading, or null.\n\t\t */\n\t\tpanelHeading(entry) {\n\t\t\tconst widget = entry && entry.widget\n\t\t\tconst raw = widgetTitleOf(widget)\n\t\t\tif (!raw) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tconst title = translate(raw)\n\t\t\tif (title === entry.label) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!widget || typeof widget.description !== 'string' || widget.description === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { title, subtitle: translate(widget.description) }\n\t\t},\n\n\t\t/**\n\t\t * The label a tab shows: the authored `label`, else (board look) History\n\t\t * for the activity widget, else the child widget's title, else its id.\n\t\t * A manifest label or title goes through the host's translate; the\n\t\t * library's own History is translated by the library catalogue.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {object|null} widget The widget definition it names.\n\t\t * @param {string} widgetId The widget id.\n\t\t * @return {string} The label.\n\t\t * @spec openspec/changes/screens-detail-labels-parity/specs/detail-labels-board-look/spec.md#requirement-detail-labels-read-in-the-users-language\n\t\t */\n\t\ttabLabel(tab, widget, widgetId) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tif (tab && typeof tab.label === 'string' && tab.label !== '') {\n\t\t\t\treturn translate(tab.label)\n\t\t\t}\n\t\t\tif (this.isBoard && isActivityWidget(widget)) {\n\t\t\t\treturn t('nextcloud-vue', 'History')\n\t\t\t}\n\t\t\tconst title = widgetTitleOf(widget)\n\t\t\treturn title ? translate(title) : (widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether a tab shows: `visible`, `hidden`, or `pending` while its\n\t\t * condition cannot be decided yet (object not loaded, count not back).\n\t\t *\n\t\t * @param {string|object} tab The tab entry.\n\t\t * @param {number} index Its index in `content.tabs`.\n\t\t * @return {('visible'|'hidden'|'pending')} The state.\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\ttabVisibility(tab, index) {\n\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\tif (!cond) {\n\t\t\t\treturn 'visible'\n\t\t\t}\n\t\t\tif (isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\tconst data = this.conditionData\n\t\t\t\tif (!data) {\n\t\t\t\t\treturn 'pending'\n\t\t\t\t}\n\t\t\t\treturn evaluateVisibleWhenLocal(cond, data) ? 'visible' : 'hidden'\n\t\t\t}\n\t\t\tconst answer = this.sourceVisibility[index]\n\t\t\tif (answer === undefined) {\n\t\t\t\treturn 'pending'\n\t\t\t}\n\t\t\treturn answer ? 'visible' : 'hidden'\n\t\t},\n\n\t\t/**\n\t\t * Count the rows behind each source-mode condition: once on mount, when\n\t\t * the record changes, and after a refresh a write triggers. A tab keeps\n\t\t * its last answer while the new one is on its way, so the strip does\n\t\t * not jump.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\tasync refreshSourceVisibility() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.visibilitySeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.conditionData || this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\t\tif (!cond || isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst answer = await evaluateVisibleWhen(cond, ctx)\n\t\t\t\tif (seq === this.visibilitySeq) {\n\t\t\t\t\tthis.sourceVisibility = { ...this.sourceVisibility, [index]: answer }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The list a tab counts (`countFrom`): `\"widget\"` counts the child\n\t\t * widget's own list (its `content.register`, `content.schema` and\n\t\t * `content.filter`); an object `{ register, schema, filter? }` names\n\t\t * the list itself. Null for a tab that does not ask, or a child with\n\t\t * no list.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {{register: string, schema: string, filter: object}|{endpoint: string, field: string}|null} The list, or the endpoint to count.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tcountSourceOf(tab) {\n\t\t\tconst from = tab && typeof tab === 'object' ? tab.countFrom : null\n\t\t\tlet source = null\n\t\t\tif (from === 'widget') {\n\t\t\t\t// A stack counts its first widget that has a list: flat\n\t\t\t\t// (`content.register`) or a dashboard table's `content.source`.\n\t\t\t\tconst lists = this.tabWidgetIds(tab)\n\t\t\t\t\t.map((id) => this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t\t\t.map((w) => (w && w.content && typeof w.content === 'object' ? w.content : null))\n\t\t\t\t\t.map((content) => (content && content.source && typeof content.source === 'object' && content.source.register ? content.source : content))\n\t\t\t\t\t.filter((content) => content && content.register && content.schema)\n\t\t\t\tsource = lists.length ? lists[0] : null\n\t\t\t} else if (from && typeof from === 'object') {\n\t\t\t\tif (typeof from.endpoint === 'string' && from.endpoint !== '') {\n\t\t\t\t\treturn { endpoint: from.endpoint, field: typeof from.field === 'string' ? from.field : '' }\n\t\t\t\t}\n\t\t\t\tsource = from\n\t\t\t}\n\t\t\tif (!source || typeof source.register !== 'string' || source.register === '' || typeof source.schema !== 'string' || source.schema === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst filter = source.filter && typeof source.filter === 'object' && !Array.isArray(source.filter) ? source.filter : {}\n\t\t\treturn { register: source.register, schema: source.schema, filter }\n\t\t},\n\n\t\t/**\n\t\t * Count the list behind every tab with `countFrom`: once on mount,\n\t\t * when the record changes and after a refresh. A tab keeps its last\n\t\t * total while the new one is on its way; a failed count shows none.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync refreshWidgetCounts() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.countSeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst source = this.countSourceOf(tab)\n\t\t\t\tif (!source) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst total = source.endpoint\n\t\t\t\t\t? await this.countEndpoint(source, ctx)\n\t\t\t\t\t: await fetchListTotal(source.register, source.schema, source.filter, ctx).catch(() => null)\n\t\t\t\tif (seq === this.countSeq) {\n\t\t\t\t\tthis.widgetCounts = { ...this.widgetCounts, [index]: total }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Count what an endpoint answers: the list at `field` (or the body),\n\t\t * or the number there. Null when the request fails or nothing countable\n\t\t * comes back.\n\t\t *\n\t\t * @param {{endpoint: string, field: string}} source The endpoint and the path to read.\n\t\t * @param {object} ctx The record context its tokens resolve against.\n\t\t * @return {Promise<number|null>} The count.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync countEndpoint(source, ctx) {\n\t\t\ttry {\n\t\t\t\tconst value = await readVisibleWhenValue({ endpoint: source.endpoint, field: source.field }, ctx)\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.length\n\t\t\t\t}\n\t\t\t\tconst number = Number(value)\n\t\t\t\treturn value !== null && value !== '' && Number.isFinite(number) ? number : null\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/** @return {string} The route hash without its `#`, or ''. */\n\t\tcurrentHash() {\n\t\t\tconst fromRoute = this.$route && typeof this.$route.hash === 'string' ? this.$route.hash : ''\n\t\t\tconst raw = fromRoute !== '' ? fromRoute : (typeof window !== 'undefined' && window.location ? window.location.hash : '')\n\t\t\treturn typeof raw === 'string' ? raw.replace(/^#/, '') : ''\n\t\t},\n\n\t\t/**\n\t\t * After the active tab went, point a deep link's hash at the tab now showing.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tsyncHash() {\n\t\t\tconst id = this.activeTab?.id\n\t\t\tconst route = this.$route\n\t\t\tif (!id || !route || !route.hash || !this.$router || typeof this.$router.replace !== 'function') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$router.replace({ hash: `#${id}`, query: route.query })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a geo child's save so the surface can reload the record.\n\t\t *\n\t\t * @param {object} geo The saved geometry.\n\t\t * @return {void}\n\t\t */\n\t\tonGeoSaved(geo) {\n\t\t\t/**\n\t\t\t * @event geo-saved Re-emitted from a geo child that saved a geometry.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('geo-saved', geo)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's request to open an integration.\n\t\t *\n\t\t * @param {string} integrationId The integration to open.\n\t\t * @return {void}\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration Re-emitted from a related child asking to open an integration.\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 * Re-emit a related child's object click; the page opens the object.\n\t\t *\n\t\t * @param {object} raw The clicked object.\n\t\t * @return {void}\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object Re-emitted from a related child whose object row was clicked. Payload is the raw object.\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 * Follow the strip's own selection, so keyboard navigation moves the\n\t\t * hoisted Actions menu too.\n\t\t *\n\t\t * @param {number} index The newly selected tab index.\n\t\t * @return {void}\n\t\t */\n\t\tonTabChange(index) {\n\t\t\tif (typeof index === 'number' && index >= 0) {\n\t\t\t\tthis.activeIndex = index\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Open a tab picked from the Actions menu, then move focus to it in\n\t\t * the strip, so a keyboard user lands on the tab they chose.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {void}\n\t\t * @spec openspec/changes/board-tabs-overflow-in-actions/specs/board-tabs-overflow-in-actions/spec.md#requirement-board-tabs-list-their-overflow-in-the-actions-menu\n\t\t */\n\t\topenMenuTab(entry) {\n\t\t\tconst index = this.resolvedTabs.indexOf(entry)\n\t\t\tif (index < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeIndex = index\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tconst button = this.$el?.querySelector?.('[role=\"tab\"][aria-selected=\"true\"]')\n\t\t\t\tif (button && typeof button.focus === 'function') {\n\t\t\t\t\tbutton.focus()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * A menu tab's text: its label, and its count when it has one.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The menu label.\n\t\t */\n\t\tmenuTabLabel(entry) {\n\t\t\tconst hasCount = entry.count !== null && entry.count !== undefined && entry.count !== ''\n\t\t\treturn hasCount ? `${entry.label} (${entry.count})` : entry.label\n\t\t},\n\n\t\t/**\n\t\t * Empty-state text for a tab whose widget id resolves to nothing.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The message.\n\t\t */\n\t\tmissingLabel(entry) {\n\t\t\treturn t('nextcloud-vue', 'No widget found for \"{id}\"', { id: entry.widgetId || '' })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* A stack (`widgetIds`): the panel's widget, then cards 20px apart. */\n.cn-tabs-widget__panel-heading {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-bottom: 16px;\n}\n\n.cn-tabs-widget__panel-heading--actions {\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 10px 16px;\n}\n\n.cn-tabs-widget__panel-heading-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmin-width: 0;\n}\n\n/* The 260px basis is a width in the actions row; in the column heading it\n would be a height. */\n.cn-tabs-widget__panel-heading--actions > .cn-tabs-widget__panel-heading-text {\n\tflex: 1 1 260px;\n}\n\n.cn-tabs-widget__panel-actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tmargin-bottom: 16px;\n}\n\n.cn-tabs-widget__panel-title {\n\tmargin: 0;\n\tfont-size: 17px;\n\tfont-weight: 700;\n}\n\n.cn-tabs-widget__panel-subtitle {\n\tfont-size: 14px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tabs-widget__stack {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n\n/* A gridded stack (`columns` / `layout` on the tab): 12 columns, widgets wrap\n onto the next row, a row's cards as tall as the tallest. Narrow, it is the\n plain stack again. */\n.cn-tabs-widget__stack--grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(12, minmax(0, 1fr));\n\talign-items: stretch;\n}\n\n.cn-tabs-widget__stack--grid > * {\n\tmin-width: 0;\n}\n\n@media (max-width: 700px) {\n\t.cn-tabs-widget__stack--grid {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n\n\t.cn-tabs-widget__stack--grid > * {\n\t\tgrid-column: auto !important;\n\t}\n}\n\n/* The panel is the card; the strip is not inside it. There is no title bar\n above the tabs either: the open tab names the panel, so a title row would\n say the same thing twice and cost a row of height on a card that is mostly\n content.\n\n The card chrome used to wrap the strip as well, which drew a border and a\n pair of rounded corners ABOVE the tabs and boxed them in. Folder tabs are\n drawn as the edge of the sheet they open, so a second edge around them\n reads as a header the widget does not have. Border, radius and background\n now live on the panel below, and the strip sits bare on the page. */\n/* The class is doubled on purpose, and the four properties below are RESET\n rather than simply omitted.\n\n Nextcloud serves every enabled app's assets on every page, each app bundles\n this library's compiled CSS, and the Vue scope id is derived from the file\n PATH, so `data-v-1dbd6122` is byte-identical across library versions. An app\n still on an older release therefore ships a rule with exactly this selector\n and the OLD declarations, and it lands on the pages of an app already on the\n new one. Measured on a dossiq case page: three stale copies of the pre-fix\n rule, one from hermiq's `companion.css` (its companion bundle loads on every\n page by design) and two inline from other apps' bundles. Same specificity,\n so source order decided, and the card border came back around the strip.\n\n Dropping a declaration cannot beat a rule that sets it, so `border` and the\n rest are explicitly zeroed. Doubling the class takes this selector to\n (0,3,0) against the stale (0,2,0), which wins on specificity rather than on\n `!important` or on load order this library does not control. The same\n technique, for the same reason, is used on `.cn-tabs__nav .cn-tabs__nav-item`\n in CnTabs to beat Nextcloud's own button margin. */\n.cn-tabs-widget.cn-tabs-widget {\n\tbackground-color: transparent;\n\tborder: 0;\n\tborder-radius: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tmin-height: 0;\n\toverflow: visible;\n\tpadding: 0;\n}\n\n/* No inset, so the first tab starts at the panel's own left edge. The 8px\n here was there to clear the card's rounded top corner; that corner is gone\n from the strip now, and the inset it existed for left the first tab floating\n 8px inside the sheet it opens.\n\n The bar's own bottom rule is switched off and redrawn as a pseudo-element\n that stops one corner radius short of the right edge. CnTabs draws its rule\n across the bar's whole width, which is the sheet's top edge everywhere\n except at the far right, where the panel's top-right corner curves away\n below it: the rule ran straight on to the widget's edge and read as a\n border sticking out past a rounded corner (Ruben, 2026-09-13). Ending it\n where the curve begins makes the rule and the curve one continuous edge. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar) {\n\tborder-bottom: none;\n\tpadding: 0;\n\tposition: relative;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar::after) {\n\tborder-bottom: 1px solid var(--color-border);\n\tcontent: '';\n\tinset-block-end: 0;\n\tinset-inline: 0 var(--border-radius-large);\n\tpointer-events: none;\n\tposition: absolute;\n}\n\n/* The open tab erases the slice of the rule directly above the panel with its\n own background-coloured bottom edge, which only works if it paints ABOVE the\n pseudo-element: a positioned pseudo-element otherwise paints over every\n in-flow sibling, rule included. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__nav-item--active) {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.cn-tabs-widget__tabs {\n\tdisplay: flex;\n\tflex-direction: column;\n\t/* Grow to the widget's height, so the panel fills the grid cell the\n\t layout gave it. Without this the strip plus the open panel took only\n\t the height of the panel's content, and a cell of nine rows ended in\n\t 130px of nothing under a sheet that stopped short of its own card. */\n\tflex: 1 1 auto;\n\tmin-height: 0;\n}\n\n/* The panel area is the scroll region, so the strip stays put while a long\n child scrolls under it.\n\n Padded on all four sides. The top was once zeroed to protect the join with\n the open tab, but padding sits inside the painted box — only a margin would\n have opened that gap, and a zero top put every panel's content against the\n strip. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content) {\n\tbackground-color: var(--color-main-background);\n\t/* Three sides only: the bar's rule (redrawn above, stopping at the corner)\n\t is this sheet's top edge, and the open tab erases the slice of it\n\t directly above the panel so the two read as one surface. A border-top\n\t here would put a second line under that tab which the tab cannot paint\n\t over. */\n\tborder: 1px solid var(--color-border);\n\tborder-top: none;\n\t/* Three rounded corners. The top-left stays square because the first tab\n\t is drawn joined to the panel there, and a curve under it would curl the\n\t sheet away from that tab. The top-right has no tab above it: the strip\n\t ends where the last tab ends and the Actions menu floats free, so a\n\t square corner there read as a sheet cut off, not as a tab's edge. */\n\tborder-radius: 0 var(--border-radius-large) var(--border-radius-large) var(--border-radius-large);\n\tflex: 1 1 auto;\n\tmin-height: 0;\n\toverflow: auto;\n\tpadding: 12px;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tab) {\n\theight: 100%;\n}\n\n/* A list widget's footer Add bleeds through its card's 16px content padding\n (margin 0 -16px -16px). The panel of a tab pads 12px, so on a tab that\n holds the list directly the footer stuck out 4px on the right and at the\n bottom and made the panel scroll. It bleeds exactly the panel's padding. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content > .cn-tab > .cn-detail-widget-host--bare .cn-object-list-widget__add) {\n\tmargin: auto -12px -12px;\n}\n\n/* The open panel's header link, beside the strip. Same look and theme hooks\n as a card header link (CnWidgetWrapper). */\n.cn-tabs-widget__header-link {\n\talign-self: center;\n\tpadding: 0 calc(1 * var(--default-grid-baseline));\n\tcolor: var(--color-primary-element);\n\tfont-size: var(--cn-widget-header-link-size, 14px);\n\tfont-weight: var(--cn-widget-header-link-weight, 600);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n}\n\n.cn-tabs-widget__header-link:hover,\n.cn-tabs-widget__header-link:focus-visible {\n\ttext-decoration: underline;\n}\n\n.cn-tabs-widget__header-link:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n\tborder-radius: var(--border-radius-small, 4px);\n}\n\n.cn-tabs-widget__title {\n\talign-items: center;\n\tdisplay: inline-flex;\n\tgap: 6px;\n}\n\n.cn-tabs-widget__title-icon {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["CnActionsMenu","CnDetailWidgetHost","CnIcon","CnTab","CnTabs","CnWidgetHeaderActionButtons","CnEmptyContent","t","n","translate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmPA;;AAEC;AACA;;AAEA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGD,aAAe;AACd,CAAA,IAAI,EAAE,cAAc;;CAEpB,UAAU,EAAE;iBACXA,UAAa;AACb,sBAAAC,YAAkB;AAClB,UAAAC,YAAM;SACNC,YAAK;AACL,UAAAC,YAAM;+BACNC,YAA2B;AAC3B,EAAA,cAAc;AACd,EAAA,iBAAiB;AACjB,kBAAAC,YAAc;EACd,aAAa;EACb;;AAED;;AAEC;AACA;;AAEA;AACA;AACA;;AAED,CAAA,OAAO,GAAG;AACT,EAAA,OAAO;AACN,GAAA,CAAC,iBAAiB,GAAG;AACpB;AACC;AACA;;;;;AAKA;AACA;;AAEA;AACA;AACA;;;;;AAKD,IAAA,GAAG,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAK,GAAI,QAAQ,KAAK;AACtC;AACA;AACA,KAAA,IAAI,CAAC,EAAG,IAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;MACjC,MAAK;AACN,MAAA;AACA,KAAA,MAAM,KAAM,GAAE,EAAE,IAAI,I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