@conduction/nextcloud-vue 2.102.0 → 2.103.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/CnConversationThread/CnConversationThread.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +73 -0
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js +99 -64
- package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +46 -0
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js +37 -2
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +29 -6
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +113 -20
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +387 -359
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +14 -0
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -2
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +10 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +97 -3
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +46 -2
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue.js +9 -0
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue.js.map +1 -0
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue2.js +165 -0
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue2.js.map +1 -0
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue3.js +85 -0
- package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue3.js.map +1 -0
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue.js +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js +54 -6
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js +3 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +8 -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/components/CnWizardDialog/CnWizardDialog.vue.js +1 -1
- package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue2.js +19 -0
- package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue3.js +1 -1
- package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue3.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/mixins/pageViews.js +8 -1
- package/dist/esm/mixins/pageViews.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +472 -383
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/visibleWhen.js +13 -2
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +10707 -9883
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +472 -383
- package/package.json +1 -1
- package/src/components/CnConversationThread/CnConversationThread.md +17 -0
- package/src/components/CnConversationThread/CnConversationThread.vue +113 -8
- package/src/components/CnConversationThread/CnConversationWidget.vue +60 -1
- package/src/components/CnDashboardPage/CnDashboardPage.md +4 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +29 -6
- package/src/components/CnDetailPage/CnDetailPage.md +1 -1
- package/src/components/CnFormDialog/CnFormDialog.md +1 -1
- package/src/components/CnFormDialog/CnFormDialog.vue +127 -0
- package/src/components/CnIndexPage/CnIndexPage.md +10 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +18 -3
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +10 -1
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +134 -2
- package/src/components/CnSearchSelect/CnSearchSelect.vue +283 -0
- package/src/components/CnSearchSelect/index.js +12 -0
- package/src/components/CnSetupWizard/CnSetupWizard.vue +56 -6
- package/src/components/CnTabsWidget/CnTabsWidget.vue +8 -1
- package/src/components/CnWizardDialog/CnWizardDialog.vue +20 -1
- package/src/components/index.js +1 -0
- package/src/css/dialog.css +5 -3
- package/src/index.js +1 -0
- package/src/mixins/pageViews.js +8 -1
- package/src/schemas/app-manifest-v2.schema.json +53 -6
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/visibleWhen.js +13 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnTabsWidget.vue3.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue?vue&type=template&id=dbbc6ecc&lang.js"],"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{{ 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: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.stack.length\"\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<CnDetailWidgetHost\n\t\t\t\t\tv-else-if=\"entry.widget\"\n\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t@selectObject=\"onSelectObject\" />\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 { 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 { normalizeLook } from '../../composables/useLook.js'\nimport { headerLinkTarget, 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 { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.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\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},\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; `count` 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 * `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}), overflow?: 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\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\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 widgets = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null)\n\t\t\t\t\t\t\t.filter((w) => w && !this.hiddenByWorkspace(w) && !this.hiddenByRecord(w))\n\t\t\t\t\t: []\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.objectData)\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\tresolved.push({\n\t\t\t\t\tkey: `${widgetId || 'tab'}-${index}`,\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\tgrid: this.stackGrid(tab, widgets),\n\t\t\t\t\tcount,\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\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 widgetHeaderLink(this.activeTab?.widget)\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// 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 first tab that is in the strip. Tab 0 is the default, and\n\t * when tab 0 sits under \"More\" the strip would open on a tab the author\n\t * 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 first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = 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},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tmethods: {\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. Heights follow the\n\t\t * 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\treturn widgets.map((widget) => placed.get(widget.id) ?? share)\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 * 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}|null} The list.\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\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 = 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/** @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__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":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_createElementBlock","_Fragment","_renderList","_createTextVNode","_toDisplayString","_createVNode","_createElementVNode","_normalizeClass","_normal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,MAAA,CAAA,gBAAA;AAClB,sBAAA,QAAQ,EAAE,MAAI,CAAA,QAAA;AACd,sBAAA,MAAM,EAAE,MAAI,CAAA,UAAA;AACZ,sBAAA,UAAU,EAAE,MAAI,CAAA,UAAA;AAChB,sBAAA,YAAY,EAAE,MAAY,CAAA,YAAA;AAC1B,sBAAA,QAAQ,EAAE,MAAQ,CAAA,QAAA;AAClB,sBAAA,MAAM,EAAE,MAAM,CAAA,MAAA;AACd,sBAAA,KAAK,EAAE,MAAK,CAAA,KAAA;AACZ,sBAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,sBAAA,kBAAkB,EAAG,MAAiB,CAAA,kBAAA;AACtC,sBAAA,UAAI,EAAA,MAAA,CAAA,UAAA;AACJ,sBAAA,UAAI,EAAA,QAAA,CAAA,UAAA;AACJ,sBAAA,iBAAA,EAAA,QAAA,CAAA,iBAAA;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnTabsWidget.vue3.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue?vue&type=template&id=78877482&lang.js"],"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{{ 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: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.stack.length\"\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<CnDetailWidgetHost\n\t\t\t\t\tv-else-if=\"entry.widget\"\n\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t@selectObject=\"onSelectObject\" />\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 { 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 { normalizeLook } from '../../composables/useLook.js'\nimport { headerLinkTarget, 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 { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.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\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},\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; `count` 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 * `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}), overflow?: 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\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 widgets = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null)\n\t\t\t\t\t\t\t.filter((w) => w && !this.hiddenByWorkspace(w) && !this.hiddenByRecord(w))\n\t\t\t\t\t: []\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.objectData)\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\tgrid: this.stackGrid(tab, widgets),\n\t\t\t\t\tcount,\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\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 widgetHeaderLink(this.activeTab?.widget)\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// 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 first tab that is in the strip. Tab 0 is the default, and\n\t * when tab 0 sits under \"More\" the strip would open on a tab the author\n\t * 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 first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = 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},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tmethods: {\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. Heights follow the\n\t\t * 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\treturn widgets.map((widget) => placed.get(widget.id) ?? share)\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 * 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}|null} The list.\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\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 = 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/** @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__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":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_createElementBlock","_Fragment","_renderList","_createTextVNode","_toDisplayString","_createVNode","_createElementVNode","_normalizeClass","_normalizeStyle"],"mappings":";;AAWM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,gBAAgB,GAAA;AAyFjB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;;;;;;;;;;;;;;;;AAvFpC,MAAA,YAAU,EAAE,QAAU,CAAA,UAAA;AACtB,MAAA,SAAS,EAAE,QAAQ,CAAA,SAAA;aACZ,EAAE,QAAY,CAAA,YAAA;sBACJ,EAAC,QAAO,CAAA,OAAA;AAC1B,MAAA,KAAK,EAAC,sBAAY;AACjB,MAAA,sBAAkB,EAAE,QAAW,CAAA,WAAA;;AAIrB,MAAA,SAAO,UAIhB,MAOW;AALL,QAAA,CAAA,QAAA,CAAA,sBAAI,CAAA,GAAA;AAFV,aAAAA,SAAA,EAAA,EAAAC,WAAA,CAOWC,uBANN,CAAA,QAAA,CAAA,sBAAsB,CAAC,GAAG,GAD/BC,UAOW,CAAA;;AAJX,cAAA,KAAK,EAAC,6BAAM;AACZ,c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ardDialog.vue2.js';
|
|
|
2
2
|
import { render } from './CnWizardDialog.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-1bd3640c";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -149,6 +149,12 @@ var script = {
|
|
|
149
149
|
* Empty uses the dialog title.
|
|
150
150
|
*/
|
|
151
151
|
eyebrowContext: { type: String, default: '' },
|
|
152
|
+
/**
|
|
153
|
+
* Board look: head the dialog with the current step's label, the
|
|
154
|
+
* dialog title moving to the eyebrow's context. The result phase and
|
|
155
|
+
* the Nextcloud look keep `dialogTitle`.
|
|
156
|
+
*/
|
|
157
|
+
stepHeading: { type: Boolean, default: false },
|
|
152
158
|
/**
|
|
153
159
|
* The eyebrow sentence, with `{context}`, `{step}` and `{total}`
|
|
154
160
|
* placeholders, so it can be translated.
|
|
@@ -240,6 +246,19 @@ var script = {
|
|
|
240
246
|
.replace('{total}', String(this.steps.length))
|
|
241
247
|
},
|
|
242
248
|
|
|
249
|
+
/**
|
|
250
|
+
* The dialog's heading: the current step's label with `stepHeading`
|
|
251
|
+
* in the board look, otherwise `dialogTitle`.
|
|
252
|
+
*
|
|
253
|
+
* @return {string} The heading.
|
|
254
|
+
*/
|
|
255
|
+
shownTitle() {
|
|
256
|
+
if (this.stepHeading && this.isBoardLook && this.result === null && this.currentStep && this.currentStep.label) {
|
|
257
|
+
return this.currentStep.label
|
|
258
|
+
}
|
|
259
|
+
return this.dialogTitle
|
|
260
|
+
},
|
|
261
|
+
|
|
243
262
|
/** @return {object} The check icon, the default finishing icon. */
|
|
244
263
|
Check() {
|
|
245
264
|
return Check
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnWizardDialog.vue2.js","sources":["../../../../src/components/CnWizardDialog/CnWizardDialog.vue"],"sourcesContent":["<template>\n\t<CnDialog\n\t\t:look=\"look\"\n\t\t:width=\"width\"\n\t\tdefaultWidth=\"wizard\"\n\t\t:eyebrow=\"boardEyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:name=\"dialogTitle\"\n\t\tsize=\"large\"\n\t\t:open=\"dialogOpen\"\n\t\t:noClose=\"loading || !cancellable\"\n\t\tdata-testid=\"cn-modal\"\n\t\tdata-testid-modal=\"cn-wizard-dialog\"\n\t\t@update:open=\"dialogOpen = $event\"\n\t\t@closing=\"onClose\">\n\t\t<!-- Result phase: rendered after a successful `submit()`. -->\n\t\t<div v-if=\"result !== null\"\n\t\t\tclass=\"cn-wizard-dialog__result\"\n\t\t\tdata-testid-phase=\"result\">\n\t\t\t<NcNoteCard v-if=\"result.success\" type=\"success\">\n\t\t\t\t{{ result.message || successText }}\n\t\t\t</NcNoteCard>\n\t\t\t<NcNoteCard v-else-if=\"result.error\" type=\"error\">\n\t\t\t\t{{ result.error }}\n\t\t\t</NcNoteCard>\n\t\t\t<!-- @slot result-extra Optional extra content (e.g. batch\n\t\t\t progress poller, summary table) rendered below the\n\t\t\t success/error banner. Scope: { result }. -->\n\t\t\t<slot name=\"result-extra\" :result=\"result\" />\n\t\t</div>\n\n\t\t<!-- Wizard phase: progress bar + current step body. -->\n\t\t<div v-else\n\t\t\tclass=\"cn-wizard-dialog__wizard\"\n\t\t\tdata-testid-phase=\"form\">\n\t\t\t<!-- Progress indicator: an ordered list with the current step marked.\n\t\t\t A finished step is a button when allowJumpBack is true. -->\n\t\t\t<CnStepper\n\t\t\t\t:steps=\"steps\"\n\t\t\t\t:currentIndex=\"currentIndex\"\n\t\t\t\t:allowJumpBack=\"allowJumpBack\"\n\t\t\t\t:look=\"look\"\n\t\t\t\t@jump=\"jumpTo\" />\n\n\t\t\t<!-- Validation error from the current step's validate() result. -->\n\t\t\t<NcNoteCard v-if=\"validationError\" type=\"error\">\n\t\t\t\t{{ validationError }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- Current step body — a dynamic slot named by step id. -->\n\t\t\t<div class=\"cn-wizard-dialog__step-body\" :data-step-id=\"currentStep.id\">\n\t\t\t\t<!-- @slot step-{id} Per-step body. Scope: { next,\n\t\t\t\t back, jumpTo, submit, currentStep, stepIndex,\n\t\t\t\t totalSteps, stepData, setStepData, isFirst,\n\t\t\t\t isLast }. -->\n\t\t\t\t<slot\n\t\t\t\t\t:name=\"'step-' + currentStep.id\"\n\t\t\t\t\t:next=\"next\"\n\t\t\t\t\t:back=\"back\"\n\t\t\t\t\t:jumpTo=\"jumpTo\"\n\t\t\t\t\t:submit=\"submit\"\n\t\t\t\t\t:currentStep=\"currentStep\"\n\t\t\t\t\t:stepIndex=\"currentIndex\"\n\t\t\t\t\t:totalSteps=\"steps.length\"\n\t\t\t\t\t:stepData=\"stepData\"\n\t\t\t\t\t:setStepData=\"setStepData\"\n\t\t\t\t\t:isFirst=\"isFirst\"\n\t\t\t\t\t:isLast=\"isLast\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<!-- Result phase actions: just Close. -->\n\t\t\t<NcButton v-if=\"result !== null\" @click=\"onClose\">\n\t\t\t\t{{ closeLabel }}\n\t\t\t</NcButton>\n\n\t\t\t<!-- Wizard phase actions: Cancel + Back + Next/Submit.\n\t\t\t The testids exist because these buttons are the only way\n\t\t\t through a wizard and their LABELS are translated: an e2e that\n\t\t\t clicks \"Next\" passes on an English instance and times out on a\n\t\t\t Dutch one, reporting a broken dialog rather than a missing\n\t\t\t string. -->\n\t\t\t<template v-else>\n\t\t\t\t<NcButton v-if=\"cancellable\" data-testid=\"cn-wizard-cancel\" @click=\"onClose\">\n\t\t\t\t\t{{ cancelLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-if=\"!isFirst\"\n\t\t\t\t\tdata-testid=\"cn-wizard-back\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t@click=\"back\">\n\t\t\t\t\t<template v-if=\"isBoardLook\" #icon>\n\t\t\t\t\t\t<ChevronLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ backLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"primary\"\n\t\t\t\t\tdata-testid=\"cn-wizard-next\"\n\t\t\t\t\t:alignment=\"isBoardLook && !isLast ? 'center-reverse' : 'center'\"\n\t\t\t\t\t:disabled=\"loading || nextDisabled\"\n\t\t\t\t\t@click=\"isLast ? submit() : next()\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" :size=\"20\" />\n\t\t\t\t\t\t<template v-else-if=\"isBoardLook\">\n\t\t\t\t\t\t\t<ChevronRight v-if=\"!isLast\" :size=\"20\" />\n\t\t\t\t\t\t\t<component :is=\"submitIcon || Check\" v-else :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ isLast ? submitLabel : nextLabel }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue'\nimport ChevronRight from 'vue-material-design-icons/ChevronRight.vue'\nimport CnDialog from '../CnDialog/CnDialog.vue'\nimport CnStepper from '../CnStepper/CnStepper.vue'\nimport { dialogBoardMixin } from '../../mixins/dialogBoard.js'\n\n/**\n * CnWizardDialog — Multi-step modal with per-step slots,\n * back/next navigation, optional per-step validation, and a single\n * result phase.\n *\n * Each step is declared in the `steps[]` prop (`{ id, label,\n * optional?, icon? }`) and rendered via a `#step-{id}` named slot\n * with the navigation API exposed through the slot scope. The\n * wizard owns the progress indicator, the back/next chrome, the\n * loading lifecycle, and the result-phase banner — the consumer\n * owns the per-step body + the data collection logic.\n *\n * Per-step validation is opt-in via the `validate` prop:\n *\n * ```js\n * async function validate(stepId, stepData) {\n * if (stepId === 'audience' && !stepData.cohort) {\n * return 'Pick a cohort first.'\n * }\n * return true\n * }\n * ```\n *\n * Returning `true` (or any truthy non-string) advances; returning a\n * string surfaces it as an error banner above the step body and\n * blocks the navigation.\n *\n * The result phase is entered by the consumer calling\n * `setResult({ success?, message?, error? })` after `@submit` fires.\n *\n * Use [`CnFormDialog`](../CnFormDialog/) for single-step forms.\n * Use [`CnExportWizard`](../CnExportWizard/) for the specific\n * scope+format+delivery export-trigger shape.\n *\n * ```vue\n * <CnWizardDialog\n * ref=\"wizard\"\n * dialog-title=\"Bulk enrol\"\n * :steps=\"[\n * { id: 'audience', label: 'Audience' },\n * { id: 'course', label: 'Course' },\n * { id: 'confirm', label: 'Confirm' },\n * ]\"\n * :validate=\"validateStep\"\n * @submit=\"onSubmit\"\n * @close=\"show = false\">\n * <template #step-audience=\"{ next, stepData, setStepData }\">\n * <CohortPicker :value=\"stepData.cohort\" @input=\"v => setStepData({ cohort: v })\" />\n * </template>\n * <template #step-course=\"{ next, back, stepData, setStepData }\">\n * <CoursePicker :value=\"stepData.course\" @input=\"v => setStepData({ course: v })\" />\n * </template>\n * <template #step-confirm=\"{ back, submit, stepData }\">\n * <p>Enrol {{ stepData.audience.cohort.size }} learners into {{ stepData.course.course.name }}?</p>\n * </template>\n * </CnWizardDialog>\n * ```\n */\nexport default {\n\tname: 'CnWizardDialog',\n\tcomponents: { CnDialog, CnStepper, ChevronLeft, ChevronRight, NcButton, NcNoteCard, NcLoadingIcon },\n\n\tmixins: [dialogBoardMixin],\n\tprops: {\n\t\t/**\n\t\t * Step declarations. Order is significant — the wizard\n\t\t * navigates linearly between adjacent steps unless the\n\t\t * consumer calls `jumpTo()` from a slot scope.\n\t\t *\n\t\t * @type {Array<{ id: string, label: string, optional?: boolean, icon?: string }>}\n\t\t */\n\t\tsteps: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\t\t\tvalidator: (v) => Array.isArray(v) && v.length > 0\n\t\t\t\t&& v.every((s) => s && typeof s.id === 'string' && typeof s.label === 'string'),\n\t\t},\n\n\t\t/**\n\t\t * Dialog title shown in the NcDialog header.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdialogTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Wizard'),\n\t\t},\n\n\t\t/**\n\t\t * Step id to start on. Defaults to the first step in `steps[]`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialStep: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Per-step validator. Async function returning `true` to\n\t\t * advance, a string to surface as an error banner + block\n\t\t * navigation, or `false` to block silently. Called from\n\t\t * `next()` and `submit()`. When omitted, navigation always\n\t\t * proceeds.\n\t\t *\n\t\t * @type {(stepId: string, stepData: object) => Promise<boolean|string>}\n\t\t */\n\t\tvalidate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Whether the progress indicator allows jumping back to a\n\t\t * completed step via click. Forward jumps are NEVER allowed\n\t\t * via the progress indicator (consumer-side `jumpTo` is\n\t\t * unrestricted).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tallowJumpBack: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Seed values for `stepData` (the cross-step object passed\n\t\t * to every slot scope). Useful for prefilling on edit-style\n\t\t * wizards.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tdefaults: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The context in the board look's eyebrow (\"<context>, step N of M\").\n\t\t * Empty uses the dialog title.\n\t\t */\n\t\teyebrowContext: { type: String, default: '' },\n\t\t/**\n\t\t * The eyebrow sentence, with `{context}`, `{step}` and `{total}`\n\t\t * placeholders, so it can be translated.\n\t\t */\n\t\tstepEyebrow: { type: String, default: () => t('nextcloud-vue', '{context}, step {step} of {total}') },\n\t\t/**\n\t\t * Icon component on the finishing button of the last step (board look).\n\t\t * Empty draws a check.\n\t\t *\n\t\t * @type {object|Function|null}\n\t\t */\n\t\tsubmitIcon: { type: [Object, Function], default: null },\n\n\t\t/** Cancel-button label (wizard phase). */\n\t\tcancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },\n\t\t/** Back-button label. */\n\t\tbackLabel: { type: String, default: () => t('nextcloud-vue', 'Back') },\n\t\t/** Next-button label (intermediate steps). */\n\t\tnextLabel: { type: String, default: () => t('nextcloud-vue', 'Next') },\n\t\t/** Submit-button label (last step). */\n\t\tsubmitLabel: { type: String, default: () => t('nextcloud-vue', 'Submit') },\n\t\t/** Close-button label (result phase). */\n\t\tcloseLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },\n\t\t/** Success banner default text when result.message is empty. */\n\t\tsuccessText: { type: String, default: () => t('nextcloud-vue', 'Done.') },\n\t\t/**\n\t\t * Whether the dialog can be dismissed (Cancel button, ESC, backdrop\n\t\t * click) before reaching the result phase. `false` hides Cancel and\n\t\t * disables all other close affordances — use for a step that must\n\t\t * be completed, not merely skipped. The result-phase Close button is\n\t\t * unaffected (a completed wizard is always dismissible).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tcancellable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the Next / Submit button, whatever the step's `validate`\n\t\t * would say. For a host that knows the wizard cannot go on yet, such as\n\t\t * `CnSetupWizard` while a required app is missing.\n\t\t *\n\t\t * @type {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tnextDisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close', 'step-change', 'submit'],\n\tdata() {\n\t\tconst initialIndex = this.resolveInitialIndex()\n\t\treturn {\n\t\t\tcurrentIndex: initialIndex,\n\t\t\tstepData: { ...this.defaults },\n\t\t\tloading: false,\n\t\t\tresult: null,\n\t\t\tvalidationError: '',\n\t\t\t/**\n\t\t\t * Drives NcDialog's `open` prop directly. NcDialog's own `open`\n\t\t\t * prop defaults to `true` and is NOT self-managing on close — its\n\t\t\t * internal `showModal` flag resets back to `true` ~300ms after\n\t\t\t * any close (animation bookkeeping for next time it's reopened\n\t\t\t * via the prop), so without an explicit `false` here the dialog\n\t\t\t * reopens itself right after Cancel/ESC/backdrop-click.\n\t\t\t */\n\t\t\tdialogOpen: true,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The board look's eyebrow, \"<context>, step N of M\", updated on every step\n\t\t * change. Empty in the Nextcloud look and in the result phase.\n\t\t *\n\t\t * @return {string} The eyebrow.\n\t\t */\n\t\tboardEyebrow() {\n\t\t\tif (!this.isBoardLook || this.result !== null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn this.stepEyebrow\n\t\t\t\t.replace('{context}', this.eyebrowContext || this.eyebrow || this.dialogTitle)\n\t\t\t\t.replace('{step}', String(this.currentIndex + 1))\n\t\t\t\t.replace('{total}', String(this.steps.length))\n\t\t},\n\n\t\t/** @return {object} The check icon, the default finishing icon. */\n\t\tCheck() {\n\t\t\treturn Check\n\t\t},\n\n\t\t/**\n\t\t * The currently-active step object from `steps[]`.\n\t\t *\n\t\t * @return {object} The current step definition.\n\t\t */\n\t\tcurrentStep() {\n\t\t\treturn this.steps[this.currentIndex] || this.steps[0]\n\t\t},\n\n\t\t/**\n\t\t * Whether the current step is the first one.\n\t\t *\n\t\t * @return {boolean} True when on the first step.\n\t\t */\n\t\tisFirst() {\n\t\t\treturn this.currentIndex === 0\n\t\t},\n\n\t\t/**\n\t\t * Whether the current step is the last one (drives the\n\t\t * Next → Submit label flip).\n\t\t *\n\t\t * @return {boolean} True when on the last step.\n\t\t */\n\t\tisLast() {\n\t\t\treturn this.currentIndex === this.steps.length - 1\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Resolve the index of `initialStep` (falling back to 0 when\n\t\t * unset / not found).\n\t\t *\n\t\t * @return {number} Step index in the range [0, steps.length).\n\t\t */\n\t\tresolveInitialIndex() {\n\t\t\tif (!this.initialStep) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\tconst idx = this.steps.findIndex((s) => s.id === this.initialStep)\n\t\t\treturn idx >= 0 ? idx : 0\n\t\t},\n\n\t\t/**\n\t\t * Merge a partial step-data object onto the shared state.\n\t\t * Each slot scope receives this so consumers can write their\n\t\t * step's data without owning a `data()` block in their slot\n\t\t * component.\n\t\t *\n\t\t * @param {object} partial Fields to merge.\n\t\t * @return {void}\n\t\t */\n\t\tsetStepData(partial) {\n\t\t\tthis.stepData = { ...this.stepData, ...partial }\n\t\t},\n\n\t\t/**\n\t\t * Run the consumer's `validate` prop (if provided) for the\n\t\t * current step. Returns true on pass; sets `validationError`\n\t\t * and returns false on fail.\n\t\t *\n\t\t * @return {Promise<boolean>} Whether validation passed.\n\t\t */\n\t\tasync runValidation() {\n\t\t\tthis.validationError = ''\n\t\t\tif (typeof this.validate !== 'function') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst outcome = await this.validate(this.currentStep.id, this.stepData)\n\t\t\t\tif (outcome === true) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tif (typeof outcome === 'string') {\n\t\t\t\t\tthis.validationError = outcome\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\treturn Boolean(outcome)\n\t\t\t} catch (e) {\n\t\t\t\tthis.validationError = e && e.message ? e.message : 'Validation failed.'\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Advance to the next step after validation. Emits\n\t\t * `@step-change` with the new step id.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync next() {\n\t\t\tif (this.nextDisabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.isLast) {\n\t\t\t\treturn this.submit()\n\t\t\t}\n\t\t\tconst ok = await this.runValidation()\n\t\t\tif (!ok) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.currentIndex += 1\n\t\t\t/**\n\t\t\t * @event step-change Emitted on every step navigation\n\t\t\t * (next / back / jumpTo / submit).\n\t\t\t * @type {{ stepId: string, stepIndex: number, direction: 'next'|'back'|'jump' }}\n\t\t\t */\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'next',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Step back to the previous step. No validation runs on\n\t\t * back navigation — consumers can reach back without\n\t\t * losing the current step's draft.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tback() {\n\t\t\tif (this.isFirst) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex -= 1\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'back',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Jump to an arbitrary step by id. Validation is skipped\n\t\t * (the consumer is responsible for re-running it before\n\t\t * `submit()` if it matters).\n\t\t *\n\t\t * @param {string} stepId Target step id.\n\t\t * @return {void}\n\t\t */\n\t\tjumpTo(stepId) {\n\t\t\tconst idx = this.steps.findIndex((s) => s.id === stepId)\n\t\t\tif (idx < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex = idx\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'jump',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Submit the wizard. Runs the current step's validation;\n\t\t * on pass flips `loading` on and emits `@submit` with the\n\t\t * accumulated `stepData`. The parent is responsible for\n\t\t * calling `setResult()` to flip into the result phase.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync submit() {\n\t\t\tif (this.nextDisabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst ok = await this.runValidation()\n\t\t\tif (!ok) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\t/**\n\t\t\t * @event submit Emitted when the user reaches the final\n\t\t\t * step and clicks Submit (or `submit()` is called\n\t\t\t * programmatically from a slot scope). Payload is the\n\t\t\t * accumulated `stepData`.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('submit', { ...this.stepData })\n\t\t},\n\n\t\t/**\n\t\t * Public method called by the parent to switch the wizard\n\t\t * into the result phase.\n\t\t *\n\t\t * @param {object} result `{ success?, message?, error? }`.\n\t\t * @return {void}\n\t\t */\n\t\tsetResult(result) {\n\t\t\tthis.result = result || { success: true }\n\t\t\tthis.loading = false\n\t\t},\n\n\t\t/**\n\t\t * Public method for a NON-terminal submit failure: stops the\n\t\t * loading spinner and surfaces `message` as the error banner above\n\t\t * the (still-editable) current step, WITHOUT entering the result\n\t\t * phase — so the user can correct the input and resubmit. Use this\n\t\t * instead of `setResult({ error })` when the failure is recoverable\n\t\t * (e.g. a taken slug, a validation conflict).\n\t\t *\n\t\t * @param {string} message The error to show above the step body.\n\t\t * @return {void}\n\t\t */\n\t\tsetError(message) {\n\t\t\tthis.loading = false\n\t\t\tthis.validationError = message || ''\n\t\t},\n\n\t\t/**\n\t\t * Close-button handler. Resets local state so the next open\n\t\t * starts fresh and emits `@close`.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonClose() {\n\t\t\tthis.result = null\n\t\t\tthis.loading = false\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex = this.resolveInitialIndex()\n\t\t\tthis.stepData = { ...this.defaults }\n\t\t\tthis.dialogOpen = false\n\t\t\t/**\n\t\t\t * @event close Emitted when the dialog should close.\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-wizard-dialog__step-body {\n\tmin-height: 200px;\n}\n\n.cn-wizard-dialog__result {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n</style>\n"],"names":["CnDialog","CnStepper","t"],"mappings":";;;;;;;;;AA6HA;;;;AAIC;;;;;;AAMA;AACA;;AAEA;;AAEA;AACA;;;;;AAKA;AACA;;;AAGA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;AAGA;;;AAGA;;AAEA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;AACtB,CAAA,UAAU,EAAE,YAAEA,UAAQ,aAAEC,YAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe;;CAEnG,MAAM,EAAE,CAAC,gBAAgB,CAAC;AAC1B,CAAA,KAAK,EAAE;AACN;AACC;;AAEA;AACA;AACA;;AAED,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,KAAK;GACX,QAAQ,EAAE,IAAI;AACd,GAAA,SAAS,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC,CAAE,IAAG,CAAC,CAAC,SAAS,CAAA;AAChD,OAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA,IAAK,OAAO,CAAC,CAAC,EAAC,KAAM,QAAO,IAAK,OAAO,CAAC,CAAC,KAAI,KAAM,QAAQ,CAAC;GAChF;;AAED;AACC;AACA;;;EAGD,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,MAAMC,SAAC,CAAC,eAAe,EAAE,QAAQ,CAAC;GAC3C;;AAED;;AAEC;;;EAGD,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;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ACnB,GAAA,IAAI,CAAC,eAAgB,GAAE,OAAQ,IAAG,GAAC;GACnC;;AAED;;;AAGC;;;AAGD,EAAA,OAAO,GAAG;AACT,GAAA,IAAI,CAAC,MAAK,GAAI,KAAG;AACjB,GAAA,IAAI,CAAC,OAAQ,GAAE,MAAI;GACnB,IAAI,CAAC,eAAc,GAAI,GAAC;AACxB,GAAA,IAAI,CAAC,YAAa,GAAE,IAAI,CAAC,mBAAmB,GAAC;AAC7C,GAAA,IAAI,CAAC,QAAO,GAAI,EAAE,GAAG,IAAI,CAAC,QAAS,GAAA;AACnC,GAAA,IAAI,CAAC,UAAS,GAAI,MAAI;AACtB;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnWizardDialog.vue2.js","sources":["../../../../src/components/CnWizardDialog/CnWizardDialog.vue"],"sourcesContent":["<template>\n\t<CnDialog\n\t\t:look=\"look\"\n\t\t:width=\"width\"\n\t\tdefaultWidth=\"wizard\"\n\t\t:eyebrow=\"boardEyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:name=\"shownTitle\"\n\t\tsize=\"large\"\n\t\t:open=\"dialogOpen\"\n\t\t:noClose=\"loading || !cancellable\"\n\t\tdata-testid=\"cn-modal\"\n\t\tdata-testid-modal=\"cn-wizard-dialog\"\n\t\t@update:open=\"dialogOpen = $event\"\n\t\t@closing=\"onClose\">\n\t\t<!-- Result phase: rendered after a successful `submit()`. -->\n\t\t<div v-if=\"result !== null\"\n\t\t\tclass=\"cn-wizard-dialog__result\"\n\t\t\tdata-testid-phase=\"result\">\n\t\t\t<NcNoteCard v-if=\"result.success\" type=\"success\">\n\t\t\t\t{{ result.message || successText }}\n\t\t\t</NcNoteCard>\n\t\t\t<NcNoteCard v-else-if=\"result.error\" type=\"error\">\n\t\t\t\t{{ result.error }}\n\t\t\t</NcNoteCard>\n\t\t\t<!-- @slot result-extra Optional extra content (e.g. batch\n\t\t\t progress poller, summary table) rendered below the\n\t\t\t success/error banner. Scope: { result }. -->\n\t\t\t<slot name=\"result-extra\" :result=\"result\" />\n\t\t</div>\n\n\t\t<!-- Wizard phase: progress bar + current step body. -->\n\t\t<div v-else\n\t\t\tclass=\"cn-wizard-dialog__wizard\"\n\t\t\tdata-testid-phase=\"form\">\n\t\t\t<!-- Progress indicator: an ordered list with the current step marked.\n\t\t\t A finished step is a button when allowJumpBack is true. -->\n\t\t\t<CnStepper\n\t\t\t\t:steps=\"steps\"\n\t\t\t\t:currentIndex=\"currentIndex\"\n\t\t\t\t:allowJumpBack=\"allowJumpBack\"\n\t\t\t\t:look=\"look\"\n\t\t\t\t@jump=\"jumpTo\" />\n\n\t\t\t<!-- Validation error from the current step's validate() result. -->\n\t\t\t<NcNoteCard v-if=\"validationError\" type=\"error\">\n\t\t\t\t{{ validationError }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- Current step body — a dynamic slot named by step id. -->\n\t\t\t<div class=\"cn-wizard-dialog__step-body\" :data-step-id=\"currentStep.id\">\n\t\t\t\t<!-- @slot step-{id} Per-step body. Scope: { next,\n\t\t\t\t back, jumpTo, submit, currentStep, stepIndex,\n\t\t\t\t totalSteps, stepData, setStepData, isFirst,\n\t\t\t\t isLast }. -->\n\t\t\t\t<slot\n\t\t\t\t\t:name=\"'step-' + currentStep.id\"\n\t\t\t\t\t:next=\"next\"\n\t\t\t\t\t:back=\"back\"\n\t\t\t\t\t:jumpTo=\"jumpTo\"\n\t\t\t\t\t:submit=\"submit\"\n\t\t\t\t\t:currentStep=\"currentStep\"\n\t\t\t\t\t:stepIndex=\"currentIndex\"\n\t\t\t\t\t:totalSteps=\"steps.length\"\n\t\t\t\t\t:stepData=\"stepData\"\n\t\t\t\t\t:setStepData=\"setStepData\"\n\t\t\t\t\t:isFirst=\"isFirst\"\n\t\t\t\t\t:isLast=\"isLast\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<!-- Result phase actions: just Close. -->\n\t\t\t<NcButton v-if=\"result !== null\" @click=\"onClose\">\n\t\t\t\t{{ closeLabel }}\n\t\t\t</NcButton>\n\n\t\t\t<!-- Wizard phase actions: Cancel + Back + Next/Submit.\n\t\t\t The testids exist because these buttons are the only way\n\t\t\t through a wizard and their LABELS are translated: an e2e that\n\t\t\t clicks \"Next\" passes on an English instance and times out on a\n\t\t\t Dutch one, reporting a broken dialog rather than a missing\n\t\t\t string. -->\n\t\t\t<template v-else>\n\t\t\t\t<NcButton v-if=\"cancellable\" data-testid=\"cn-wizard-cancel\" @click=\"onClose\">\n\t\t\t\t\t{{ cancelLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-if=\"!isFirst\"\n\t\t\t\t\tdata-testid=\"cn-wizard-back\"\n\t\t\t\t\t:disabled=\"loading\"\n\t\t\t\t\t@click=\"back\">\n\t\t\t\t\t<template v-if=\"isBoardLook\" #icon>\n\t\t\t\t\t\t<ChevronLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ backLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"primary\"\n\t\t\t\t\tdata-testid=\"cn-wizard-next\"\n\t\t\t\t\t:alignment=\"isBoardLook && !isLast ? 'center-reverse' : 'center'\"\n\t\t\t\t\t:disabled=\"loading || nextDisabled\"\n\t\t\t\t\t@click=\"isLast ? submit() : next()\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" :size=\"20\" />\n\t\t\t\t\t\t<template v-else-if=\"isBoardLook\">\n\t\t\t\t\t\t\t<ChevronRight v-if=\"!isLast\" :size=\"20\" />\n\t\t\t\t\t\t\t<component :is=\"submitIcon || Check\" v-else :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ isLast ? submitLabel : nextLabel }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue'\nimport ChevronRight from 'vue-material-design-icons/ChevronRight.vue'\nimport CnDialog from '../CnDialog/CnDialog.vue'\nimport CnStepper from '../CnStepper/CnStepper.vue'\nimport { dialogBoardMixin } from '../../mixins/dialogBoard.js'\n\n/**\n * CnWizardDialog — Multi-step modal with per-step slots,\n * back/next navigation, optional per-step validation, and a single\n * result phase.\n *\n * Each step is declared in the `steps[]` prop (`{ id, label,\n * optional?, icon? }`) and rendered via a `#step-{id}` named slot\n * with the navigation API exposed through the slot scope. The\n * wizard owns the progress indicator, the back/next chrome, the\n * loading lifecycle, and the result-phase banner — the consumer\n * owns the per-step body + the data collection logic.\n *\n * Per-step validation is opt-in via the `validate` prop:\n *\n * ```js\n * async function validate(stepId, stepData) {\n * if (stepId === 'audience' && !stepData.cohort) {\n * return 'Pick a cohort first.'\n * }\n * return true\n * }\n * ```\n *\n * Returning `true` (or any truthy non-string) advances; returning a\n * string surfaces it as an error banner above the step body and\n * blocks the navigation.\n *\n * The result phase is entered by the consumer calling\n * `setResult({ success?, message?, error? })` after `@submit` fires.\n *\n * Use [`CnFormDialog`](../CnFormDialog/) for single-step forms.\n * Use [`CnExportWizard`](../CnExportWizard/) for the specific\n * scope+format+delivery export-trigger shape.\n *\n * ```vue\n * <CnWizardDialog\n * ref=\"wizard\"\n * dialog-title=\"Bulk enrol\"\n * :steps=\"[\n * { id: 'audience', label: 'Audience' },\n * { id: 'course', label: 'Course' },\n * { id: 'confirm', label: 'Confirm' },\n * ]\"\n * :validate=\"validateStep\"\n * @submit=\"onSubmit\"\n * @close=\"show = false\">\n * <template #step-audience=\"{ next, stepData, setStepData }\">\n * <CohortPicker :value=\"stepData.cohort\" @input=\"v => setStepData({ cohort: v })\" />\n * </template>\n * <template #step-course=\"{ next, back, stepData, setStepData }\">\n * <CoursePicker :value=\"stepData.course\" @input=\"v => setStepData({ course: v })\" />\n * </template>\n * <template #step-confirm=\"{ back, submit, stepData }\">\n * <p>Enrol {{ stepData.audience.cohort.size }} learners into {{ stepData.course.course.name }}?</p>\n * </template>\n * </CnWizardDialog>\n * ```\n */\nexport default {\n\tname: 'CnWizardDialog',\n\tcomponents: { CnDialog, CnStepper, ChevronLeft, ChevronRight, NcButton, NcNoteCard, NcLoadingIcon },\n\n\tmixins: [dialogBoardMixin],\n\tprops: {\n\t\t/**\n\t\t * Step declarations. Order is significant — the wizard\n\t\t * navigates linearly between adjacent steps unless the\n\t\t * consumer calls `jumpTo()` from a slot scope.\n\t\t *\n\t\t * @type {Array<{ id: string, label: string, optional?: boolean, icon?: string }>}\n\t\t */\n\t\tsteps: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\t\t\tvalidator: (v) => Array.isArray(v) && v.length > 0\n\t\t\t\t&& v.every((s) => s && typeof s.id === 'string' && typeof s.label === 'string'),\n\t\t},\n\n\t\t/**\n\t\t * Dialog title shown in the NcDialog header.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdialogTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Wizard'),\n\t\t},\n\n\t\t/**\n\t\t * Step id to start on. Defaults to the first step in `steps[]`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialStep: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Per-step validator. Async function returning `true` to\n\t\t * advance, a string to surface as an error banner + block\n\t\t * navigation, or `false` to block silently. Called from\n\t\t * `next()` and `submit()`. When omitted, navigation always\n\t\t * proceeds.\n\t\t *\n\t\t * @type {(stepId: string, stepData: object) => Promise<boolean|string>}\n\t\t */\n\t\tvalidate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Whether the progress indicator allows jumping back to a\n\t\t * completed step via click. Forward jumps are NEVER allowed\n\t\t * via the progress indicator (consumer-side `jumpTo` is\n\t\t * unrestricted).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tallowJumpBack: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Seed values for `stepData` (the cross-step object passed\n\t\t * to every slot scope). Useful for prefilling on edit-style\n\t\t * wizards.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tdefaults: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The context in the board look's eyebrow (\"<context>, step N of M\").\n\t\t * Empty uses the dialog title.\n\t\t */\n\t\teyebrowContext: { type: String, default: '' },\n\t\t/**\n\t\t * Board look: head the dialog with the current step's label, the\n\t\t * dialog title moving to the eyebrow's context. The result phase and\n\t\t * the Nextcloud look keep `dialogTitle`.\n\t\t */\n\t\tstepHeading: { type: Boolean, default: false },\n\t\t/**\n\t\t * The eyebrow sentence, with `{context}`, `{step}` and `{total}`\n\t\t * placeholders, so it can be translated.\n\t\t */\n\t\tstepEyebrow: { type: String, default: () => t('nextcloud-vue', '{context}, step {step} of {total}') },\n\t\t/**\n\t\t * Icon component on the finishing button of the last step (board look).\n\t\t * Empty draws a check.\n\t\t *\n\t\t * @type {object|Function|null}\n\t\t */\n\t\tsubmitIcon: { type: [Object, Function], default: null },\n\n\t\t/** Cancel-button label (wizard phase). */\n\t\tcancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },\n\t\t/** Back-button label. */\n\t\tbackLabel: { type: String, default: () => t('nextcloud-vue', 'Back') },\n\t\t/** Next-button label (intermediate steps). */\n\t\tnextLabel: { type: String, default: () => t('nextcloud-vue', 'Next') },\n\t\t/** Submit-button label (last step). */\n\t\tsubmitLabel: { type: String, default: () => t('nextcloud-vue', 'Submit') },\n\t\t/** Close-button label (result phase). */\n\t\tcloseLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },\n\t\t/** Success banner default text when result.message is empty. */\n\t\tsuccessText: { type: String, default: () => t('nextcloud-vue', 'Done.') },\n\t\t/**\n\t\t * Whether the dialog can be dismissed (Cancel button, ESC, backdrop\n\t\t * click) before reaching the result phase. `false` hides Cancel and\n\t\t * disables all other close affordances — use for a step that must\n\t\t * be completed, not merely skipped. The result-phase Close button is\n\t\t * unaffected (a completed wizard is always dismissible).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tcancellable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the Next / Submit button, whatever the step's `validate`\n\t\t * would say. For a host that knows the wizard cannot go on yet, such as\n\t\t * `CnSetupWizard` while a required app is missing.\n\t\t *\n\t\t * @type {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tnextDisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close', 'step-change', 'submit'],\n\tdata() {\n\t\tconst initialIndex = this.resolveInitialIndex()\n\t\treturn {\n\t\t\tcurrentIndex: initialIndex,\n\t\t\tstepData: { ...this.defaults },\n\t\t\tloading: false,\n\t\t\tresult: null,\n\t\t\tvalidationError: '',\n\t\t\t/**\n\t\t\t * Drives NcDialog's `open` prop directly. NcDialog's own `open`\n\t\t\t * prop defaults to `true` and is NOT self-managing on close — its\n\t\t\t * internal `showModal` flag resets back to `true` ~300ms after\n\t\t\t * any close (animation bookkeeping for next time it's reopened\n\t\t\t * via the prop), so without an explicit `false` here the dialog\n\t\t\t * reopens itself right after Cancel/ESC/backdrop-click.\n\t\t\t */\n\t\t\tdialogOpen: true,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The board look's eyebrow, \"<context>, step N of M\", updated on every step\n\t\t * change. Empty in the Nextcloud look and in the result phase.\n\t\t *\n\t\t * @return {string} The eyebrow.\n\t\t */\n\t\tboardEyebrow() {\n\t\t\tif (!this.isBoardLook || this.result !== null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn this.stepEyebrow\n\t\t\t\t.replace('{context}', this.eyebrowContext || this.eyebrow || this.dialogTitle)\n\t\t\t\t.replace('{step}', String(this.currentIndex + 1))\n\t\t\t\t.replace('{total}', String(this.steps.length))\n\t\t},\n\n\t\t/**\n\t\t * The dialog's heading: the current step's label with `stepHeading`\n\t\t * in the board look, otherwise `dialogTitle`.\n\t\t *\n\t\t * @return {string} The heading.\n\t\t */\n\t\tshownTitle() {\n\t\t\tif (this.stepHeading && this.isBoardLook && this.result === null && this.currentStep && this.currentStep.label) {\n\t\t\t\treturn this.currentStep.label\n\t\t\t}\n\t\t\treturn this.dialogTitle\n\t\t},\n\n\t\t/** @return {object} The check icon, the default finishing icon. */\n\t\tCheck() {\n\t\t\treturn Check\n\t\t},\n\n\t\t/**\n\t\t * The currently-active step object from `steps[]`.\n\t\t *\n\t\t * @return {object} The current step definition.\n\t\t */\n\t\tcurrentStep() {\n\t\t\treturn this.steps[this.currentIndex] || this.steps[0]\n\t\t},\n\n\t\t/**\n\t\t * Whether the current step is the first one.\n\t\t *\n\t\t * @return {boolean} True when on the first step.\n\t\t */\n\t\tisFirst() {\n\t\t\treturn this.currentIndex === 0\n\t\t},\n\n\t\t/**\n\t\t * Whether the current step is the last one (drives the\n\t\t * Next → Submit label flip).\n\t\t *\n\t\t * @return {boolean} True when on the last step.\n\t\t */\n\t\tisLast() {\n\t\t\treturn this.currentIndex === this.steps.length - 1\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Resolve the index of `initialStep` (falling back to 0 when\n\t\t * unset / not found).\n\t\t *\n\t\t * @return {number} Step index in the range [0, steps.length).\n\t\t */\n\t\tresolveInitialIndex() {\n\t\t\tif (!this.initialStep) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\tconst idx = this.steps.findIndex((s) => s.id === this.initialStep)\n\t\t\treturn idx >= 0 ? idx : 0\n\t\t},\n\n\t\t/**\n\t\t * Merge a partial step-data object onto the shared state.\n\t\t * Each slot scope receives this so consumers can write their\n\t\t * step's data without owning a `data()` block in their slot\n\t\t * component.\n\t\t *\n\t\t * @param {object} partial Fields to merge.\n\t\t * @return {void}\n\t\t */\n\t\tsetStepData(partial) {\n\t\t\tthis.stepData = { ...this.stepData, ...partial }\n\t\t},\n\n\t\t/**\n\t\t * Run the consumer's `validate` prop (if provided) for the\n\t\t * current step. Returns true on pass; sets `validationError`\n\t\t * and returns false on fail.\n\t\t *\n\t\t * @return {Promise<boolean>} Whether validation passed.\n\t\t */\n\t\tasync runValidation() {\n\t\t\tthis.validationError = ''\n\t\t\tif (typeof this.validate !== 'function') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst outcome = await this.validate(this.currentStep.id, this.stepData)\n\t\t\t\tif (outcome === true) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tif (typeof outcome === 'string') {\n\t\t\t\t\tthis.validationError = outcome\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\treturn Boolean(outcome)\n\t\t\t} catch (e) {\n\t\t\t\tthis.validationError = e && e.message ? e.message : 'Validation failed.'\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Advance to the next step after validation. Emits\n\t\t * `@step-change` with the new step id.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync next() {\n\t\t\tif (this.nextDisabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.isLast) {\n\t\t\t\treturn this.submit()\n\t\t\t}\n\t\t\tconst ok = await this.runValidation()\n\t\t\tif (!ok) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.currentIndex += 1\n\t\t\t/**\n\t\t\t * @event step-change Emitted on every step navigation\n\t\t\t * (next / back / jumpTo / submit).\n\t\t\t * @type {{ stepId: string, stepIndex: number, direction: 'next'|'back'|'jump' }}\n\t\t\t */\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'next',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Step back to the previous step. No validation runs on\n\t\t * back navigation — consumers can reach back without\n\t\t * losing the current step's draft.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tback() {\n\t\t\tif (this.isFirst) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex -= 1\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'back',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Jump to an arbitrary step by id. Validation is skipped\n\t\t * (the consumer is responsible for re-running it before\n\t\t * `submit()` if it matters).\n\t\t *\n\t\t * @param {string} stepId Target step id.\n\t\t * @return {void}\n\t\t */\n\t\tjumpTo(stepId) {\n\t\t\tconst idx = this.steps.findIndex((s) => s.id === stepId)\n\t\t\tif (idx < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex = idx\n\t\t\tthis.$emit('step-change', {\n\t\t\t\tstepId: this.currentStep.id,\n\t\t\t\tstepIndex: this.currentIndex,\n\t\t\t\tdirection: 'jump',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Submit the wizard. Runs the current step's validation;\n\t\t * on pass flips `loading` on and emits `@submit` with the\n\t\t * accumulated `stepData`. The parent is responsible for\n\t\t * calling `setResult()` to flip into the result phase.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync submit() {\n\t\t\tif (this.nextDisabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst ok = await this.runValidation()\n\t\t\tif (!ok) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\t/**\n\t\t\t * @event submit Emitted when the user reaches the final\n\t\t\t * step and clicks Submit (or `submit()` is called\n\t\t\t * programmatically from a slot scope). Payload is the\n\t\t\t * accumulated `stepData`.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('submit', { ...this.stepData })\n\t\t},\n\n\t\t/**\n\t\t * Public method called by the parent to switch the wizard\n\t\t * into the result phase.\n\t\t *\n\t\t * @param {object} result `{ success?, message?, error? }`.\n\t\t * @return {void}\n\t\t */\n\t\tsetResult(result) {\n\t\t\tthis.result = result || { success: true }\n\t\t\tthis.loading = false\n\t\t},\n\n\t\t/**\n\t\t * Public method for a NON-terminal submit failure: stops the\n\t\t * loading spinner and surfaces `message` as the error banner above\n\t\t * the (still-editable) current step, WITHOUT entering the result\n\t\t * phase — so the user can correct the input and resubmit. Use this\n\t\t * instead of `setResult({ error })` when the failure is recoverable\n\t\t * (e.g. a taken slug, a validation conflict).\n\t\t *\n\t\t * @param {string} message The error to show above the step body.\n\t\t * @return {void}\n\t\t */\n\t\tsetError(message) {\n\t\t\tthis.loading = false\n\t\t\tthis.validationError = message || ''\n\t\t},\n\n\t\t/**\n\t\t * Close-button handler. Resets local state so the next open\n\t\t * starts fresh and emits `@close`.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonClose() {\n\t\t\tthis.result = null\n\t\t\tthis.loading = false\n\t\t\tthis.validationError = ''\n\t\t\tthis.currentIndex = this.resolveInitialIndex()\n\t\t\tthis.stepData = { ...this.defaults }\n\t\t\tthis.dialogOpen = false\n\t\t\t/**\n\t\t\t * @event close Emitted when the dialog should close.\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-wizard-dialog__step-body {\n\tmin-height: 200px;\n}\n\n.cn-wizard-dialog__result {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n</style>\n"],"names":["CnDialog","CnStepper","t"],"mappings":";;;;;;;;;AA6HA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AI,CAAC,OAAQ,GAAE,MAAI;GACnB;;AAED;;;;;;AAMC;AACA;;;;AAID,EAAA,QAAQ,CAAC,OAAO,EAAE;AACjB,GAAA,IAAI,CAAC,OAAQ,GAAE,MAAI;AACnB,GAAA,IAAI,CAAC,eAAgB,GAAE,OAAQ,IAAG,GAAC;GACnC;;AAED;;;AAGC;;;AAGD,EAAA,OAAO,GAAG;AACT,GAAA,IAAI,CAAC,MAAK,GAAI,KAAG;AACjB,GAAA,IAAI,CAAC,OAAQ,GAAE,MAAI;GACnB,IAAI,CAAC,eAAc,GAAI,GAAC;AACxB,GAAA,IAAI,CAAC,YAAa,GAAE,IAAI,CAAC,mBAAmB,GAAC;AAC7C,GAAA,IAAI,CAAC,QAAO,GAAI,EAAE,GAAG,IAAI,CAAC,QAAS,GAAA;AACnC,GAAA,IAAI,CAAC,UAAS,GAAI,MAAI;AACtB;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
|
|
@@ -27,7 +27,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27
27
|
defaultWidth: "wizard",
|
|
28
28
|
eyebrow: $options.boardEyebrow,
|
|
29
29
|
subtitle: _ctx.subtitle,
|
|
30
|
-
name: $
|
|
30
|
+
name: $options.shownTitle,
|
|
31
31
|
size: "large",
|
|
32
32
|
open: $data.dialogOpen,
|
|
33
33
|
noClose: $data.loading || !$props.cancellable,
|