@conduction/nextcloud-vue 2.92.0 → 2.94.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/CnActionsMenu/CnActionsMenu.vue2.js +1 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js +2 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +28 -8
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +37 -2
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +57 -4
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +44 -17
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue.js +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js +44 -2
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js +140 -59
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js.map +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +139 -3
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js +60 -12
- package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +111 -42
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +117 -73
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +34 -39
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +7 -7
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +5 -3
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +6 -4
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapPage/CnFeaturesAndRoadmapPage.vue2.js +46 -0
- package/dist/esm/components/CnFeaturesAndRoadmapPage/CnFeaturesAndRoadmapPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapPage/CnFeaturesAndRoadmapPage.vue3.js +6 -2
- package/dist/esm/components/CnFeaturesAndRoadmapPage/CnFeaturesAndRoadmapPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue.js +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js +82 -9
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue3.js +104 -90
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue3.js.map +1 -1
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js +9 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js.map +1 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js +355 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js.map +1 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js +462 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js.map +1 -0
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +21 -0
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +402 -391
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnIcon/semanticIcons.js +2 -2
- package/dist/esm/components/CnIcon/semanticIcons.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +141 -7
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +5 -2
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnNcWidgetWidget/CnNcWidgetWidget.vue.js +1 -1
- package/dist/esm/components/CnNcWidgetWidget/CnNcWidgetWidget.vue2.js +22 -1
- package/dist/esm/components/CnNcWidgetWidget/CnNcWidgetWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnNcWidgetWidget/CnNcWidgetWidget.vue3.js +20 -14
- package/dist/esm/components/CnNcWidgetWidget/CnNcWidgetWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnNotificationPreferences/CnNotificationPreferences.vue.js +1 -1
- package/dist/esm/components/CnNotificationPreferences/CnNotificationPreferences.vue2.js +2 -0
- package/dist/esm/components/CnNotificationPreferences/CnNotificationPreferences.vue2.js.map +1 -1
- package/dist/esm/components/CnNotificationPreferences/CnNotificationPreferences.vue3.js +15 -5
- package/dist/esm/components/CnNotificationPreferences/CnNotificationPreferences.vue3.js.map +1 -1
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue.js +8 -0
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue.js.map +1 -0
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue2.js +114 -0
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue2.js.map +1 -0
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue3.js +45 -0
- package/dist/esm/components/CnPageHeader/CnHeaderTrail.vue3.js.map +1 -0
- package/dist/esm/components/CnPageHeader/CnPageHeader.vue2.js +38 -2
- package/dist/esm/components/CnPageHeader/CnPageHeader.vue2.js.map +1 -1
- package/dist/esm/components/CnPageHeader/CnPageHeader.vue3.js +12 -2
- package/dist/esm/components/CnPageHeader/CnPageHeader.vue3.js.map +1 -1
- package/dist/esm/components/CnPagination/CnPagination.vue2.js.map +1 -1
- package/dist/esm/components/CnPagination/CnPagination.vue3.js +56 -51
- package/dist/esm/components/CnPagination/CnPagination.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +3 -3
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRoadmapTab/CnRoadmapTab.vue.js +1 -1
- package/dist/esm/components/CnRoadmapTab/CnRoadmapTab.vue2.js +8 -30
- package/dist/esm/components/CnRoadmapTab/CnRoadmapTab.vue2.js.map +1 -1
- package/dist/esm/components/CnRoadmapTab/CnRoadmapTab.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +24 -0
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js +3 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnTabs/CnTabs.vue.js +1 -1
- package/dist/esm/components/CnTabs/CnTabs.vue2.js +39 -2
- package/dist/esm/components/CnTabs/CnTabs.vue2.js.map +1 -1
- package/dist/esm/components/CnTabs/CnTabs.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +85 -8
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js +37 -9
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue.js +9 -0
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue.js.map +1 -0
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue2.js +164 -0
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue2.js.map +1 -0
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue3.js +93 -0
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +4 -3
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue.js +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +32 -0
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +31 -20
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
- package/dist/esm/composables/indexSources.js +9 -0
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/l10n/en.json.js +24 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +24 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1190 -410
- package/dist/esm/utils/dueText.js +49 -8
- package/dist/esm/utils/dueText.js.map +1 -1
- package/dist/esm/utils/featureCatalog.js +135 -0
- package/dist/esm/utils/featureCatalog.js.map +1 -0
- package/dist/esm/utils/fillTemplate.js +74 -3
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/esm/utils/headerMeta.js +62 -12
- package/dist/esm/utils/headerMeta.js.map +1 -1
- package/dist/esm/utils/roadmapIssues.js +86 -0
- package/dist/esm/utils/roadmapIssues.js.map +1 -0
- package/dist/esm/utils/userDisplayName.js +47 -0
- package/dist/esm/utils/userDisplayName.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +16229 -13423
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1190 -410
- package/l10n/en.json +24 -1
- package/l10n/nl.json +24 -1
- package/package.json +1 -1
- package/src/components/CnActionsMenu/CnActionsMenu.vue +3 -1
- package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +39 -1
- package/src/components/CnAppRoot/CnAppRoot.md +2 -0
- package/src/components/CnAppRoot/CnAppRoot.vue +66 -5
- package/src/components/CnChoiceCards/CnChoiceCards.md +27 -0
- package/src/components/CnChoiceCards/CnChoiceCards.vue +168 -3
- package/src/components/CnCountdownWidget/CnCountdownWidget.vue +222 -6
- package/src/components/CnDashboardPage/CnDashboardPage.vue +141 -8
- package/src/components/CnDataTable/CnDataTable.md +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +41 -46
- package/src/components/CnDetailPage/CnDetailPage.vue +5 -3
- package/src/components/CnFactsWidget/CnFactsWidget.vue +6 -4
- package/src/components/CnFeaturesAndRoadmapPage/CnFeaturesAndRoadmapPage.vue +51 -1
- package/src/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue +98 -13
- package/src/components/CnFeaturesBoard/CnFeaturesBoard.vue +1053 -0
- package/src/components/CnFormDialog/CnFormDialog.vue +606 -562
- package/src/components/CnIndexPage/CnIndexPage.vue +144 -7
- package/src/components/CnNcWidgetWidget/CnNcWidgetWidget.vue +23 -2
- package/src/components/CnNotificationPreferences/CnNotificationPreferences.vue +5 -0
- package/src/components/CnPageHeader/CnHeaderTrail.vue +140 -0
- package/src/components/CnPageHeader/CnPageHeader.md +11 -0
- package/src/components/CnPageHeader/CnPageHeader.vue +42 -0
- package/src/components/CnPagination/CnPagination.vue +10 -2
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +3 -3
- package/src/components/CnRoadmapTab/CnRoadmapTab.vue +6 -28
- package/src/components/CnSettingsPage/CnSettingsPage.vue +26 -0
- package/src/components/CnTabs/CnTabs.vue +39 -2
- package/src/components/CnTabsWidget/CnTabsWidget.vue +106 -13
- package/src/components/CnUserSettingsDialog/CnUserSettingsDialog.vue +305 -0
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +4 -3
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +8 -0
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +43 -2
- package/src/composables/indexSources.js +9 -0
- package/src/css/dialog.css +61 -0
- package/src/css/look-board-detail.css +8 -0
- package/src/css/look-board-index.css +27 -1
- package/src/css/look-board.css +60 -0
- package/src/css/page-header.css +16 -0
- package/src/schemas/app-manifest-v2.schema.json +30 -17
- package/src/utils/dueText.js +49 -8
- package/src/utils/featureCatalog.js +132 -0
- package/src/utils/fillTemplate.js +73 -2
- package/src/utils/headerMeta.js +62 -12
- package/src/utils/roadmapIssues.js +82 -0
- package/src/utils/userDisplayName.js +54 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -447,7 +447,7 @@ var script = {
|
|
|
447
447
|
if (this.showRequestFeature) {
|
|
448
448
|
return true
|
|
449
449
|
}
|
|
450
|
-
if (this.hasPrimaryItems || this.$slots['primary-items']) {
|
|
450
|
+
if (this.hasPrimaryItems || this.$slots['primary-items'] || this.$slots['lead-items']) {
|
|
451
451
|
return true
|
|
452
452
|
}
|
|
453
453
|
return Boolean(this.$slots['action-items']) || Boolean(this.$slots && this.$slots['action-items'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnActionsMenu.vue2.js","sources":["../../../../src/components/CnActionsMenu/CnActionsMenu.vue"],"sourcesContent":["<!--\n CnActionsMenu — Shared \"…\" overflow Actions menu.\n\n Renders the canonical action set that appears on every Conduction\n surface — Refresh, then the mandatory trio Request a feature / Report a\n bug / Documentation — inside a single NcActions overflow. Request a\n feature opens the forge's feature-request issue form directly, exactly\n like Report a bug (team decision 2026-09-04: the in-product suggestion\n modal is gone — the forge is where the conversation happens, in English).\n Used by CnWidgetWrapper (widgets) and the page-level headers of\n CnDetailPage / CnDashboardPage so the three surfaces stay in lockstep.\n\n The trio is not optional and not conditional on configuration: each item\n resolves its own target (a forge new-issue deep-link for the bug report,\n `cnDocumentationBaseUrl` + the surface's `docsAnchor` for the docs link),\n so a host that passes no URLs still renders all three. That is the point\n — the items used to be per-host markup, and OpenRegister's widgets shipped\n without the Documentation entry while OpenCatalogi's were inconsistent.\n-->\n<template>\n\t<!-- Root <template v-if> (Vue 3 native fragment, renders no DOM node — was\n\t vue-frag <Fragment>) so NcActions stays in its host's flex/grid flow. -->\n\t<template v-if=\"hasOverflowMenu\">\n\t\t<NcActions\n\t\t\t:forceMenu=\"true\"\n\t\t\t:forceName=\"true\"\n\t\t\t:menuName=\"actionsMenuLabel\"\n\t\t\t:variant=\"variant || undefined\"\n\t\t\t:open=\"menuOpen\"\n\t\t\t:data-testid=\"`${testidBase}-actions`\"\n\t\t\t@update:open=\"menuOpen = $event\">\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t</template>\n\t\t\t<!-- Stays open while refreshing; onRefreshClick closes the menu once the refresh settles. -->\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"showRefresh\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-refresh`\"\n\t\t\t\t:disabled=\"refreshBusy\"\n\t\t\t\t:closeAfterClick=\"false\"\n\t\t\t\t@click=\"onRefreshClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"refreshBusy\" :size=\"20\" />\n\t\t\t\t\t<Refresh v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ refreshLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<!-- @slot primary-items The surface's OWN actions — a page's\n\t\t\t manifest `headerActions`, say — rendered above the canonical\n\t\t\t trio. They sit here rather than in `#action-items` because a\n\t\t\t case's Add party belongs above Report a bug, not under it.\n\t\t\t The caller owns the trailing NcActionSeparator: only the\n\t\t\t caller knows whether its v-for produced any items, and a\n\t\t\t separator rendered here would strand itself when it did\n\t\t\t not. -->\n\t\t\t<slot name=\"primary-items\" />\n\t\t\t<!-- The canonical trio — Request a feature / Report a bug /\n\t\t\t Documentation — renders on EVERY surface. None of the three\n\t\t\t is conditional on a URL being configured any more: each\n\t\t\t resolves its own target (see resolvedDocumentationUrl /\n\t\t\t resolvedReportBugUrl), so a host that forgets to pass one\n\t\t\t still gets a working item instead of a silently missing one.\n\t\t\t `showRequestFeature` / `showReportBug` / `showDocumentation`\n\t\t\t exist only for the rare surface that must suppress one\n\t\t\t deliberately; they all default to true. -->\n\t\t\t<!-- A real link whenever the form's URL is known, so it can be\n\t\t\t middle-clicked or copied; a button only for a host with no\n\t\t\t URL that handles @request-feature itself. -->\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showRequestFeature && resolvedRequestFeatureUrl\"\n\t\t\t\t:href=\"resolvedRequestFeatureUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionButton\n\t\t\t\tv-else-if=\"showRequestFeature\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showReportBug && resolvedReportBugUrl\"\n\t\t\t\t:href=\"resolvedReportBugUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-report-bug`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BugOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ reportBugLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showDocumentation && resolvedDocumentationUrl\"\n\t\t\t\t:href=\"resolvedDocumentationUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-documentation`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BookOpenVariant :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ documentationLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<!-- @slot action-items Additional NcActionButton-family items\n\t\t\t rendered inside the overflow menu, after the built-in\n\t\t\t Refresh + Request-a-feature / Report-a-bug / Documentation\n\t\t\t group. -->\n\t\t\t<slot name=\"action-items\" />\n\t\t</NcActions>\n\t</template>\n</template>\n\n<script>\nimport { emit as emitOnBus } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionLink, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue'\nimport BugOutline from 'vue-material-design-icons/BugOutline.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\nimport LightbulbOutline from 'vue-material-design-icons/LightbulbOutline.vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport { buildBugReportUrl, buildFeatureRequestUrl, DEFAULT_FORGE } from '../../utils/forge.js'\n\n/**\n * The fleet's per-app documentation site, derived from the app id. Used only\n * when no `documentationUrl` prop and no `cnDocumentationBaseUrl` inject are\n * available, so that the Documentation item is never absent — an app that\n * hosts its docs anywhere else provides the base instead.\n *\n * @param {string} appId Consuming app's slug.\n * @return {string} Documentation base URL, or '' when the app id is unknown.\n */\nfunction defaultDocsBase(appId) {\n\tconst id = String(appId || '').trim()\n\tif (!id) {\n\t\treturn ''\n\t}\n\treturn `https://${id}.conduction.nl/docs/`\n}\n\n/**\n * Resolve a documentation deep-link from a base URL and a per-widget\n * anchor. An anchor already starting with `#`, `/` or a `scheme://` is\n * used as written (respectively appended, resolved against the base's\n * origin, or taken whole); a bare slug becomes a `#fragment`, which is\n * how a docs page addresses one section of itself.\n *\n * @param {string} base Documentation base URL.\n * @param {string} anchor Per-widget anchor / path fragment.\n * @return {string} The resolved URL, or '' when there is no base to build on.\n */\nexport function resolveDocsUrl(base, anchor) {\n\tconst a = String(anchor || '').trim()\n\tif (a.includes('://')) {\n\t\treturn a\n\t}\n\tconst b = String(base || '').trim()\n\tif (!b) {\n\t\treturn ''\n\t}\n\tif (!a) {\n\t\treturn b\n\t}\n\tif (a.startsWith('#')) {\n\t\treturn `${b.replace(/#.*$/, '')}${a}`\n\t}\n\tif (a.startsWith('/')) {\n\t\ttry {\n\t\t\treturn new URL(a, b).toString()\n\t\t} catch {\n\t\t\treturn `${b.replace(/\\/+$/, '')}${a}`\n\t\t}\n\t}\n\treturn `${b.replace(/#.*$/, '').replace(/\\/+$/, '')}#${a}`\n}\n\n/**\n * Build a synthetic event object handed to host listeners alongside the\n * action payload. Mirrors the Vue 3 / DOM Event API enough to let a host\n * call `event.preventDefault()` to suppress the menu's built-in default\n * handler. Because Vue's `$emit` is synchronous, the same object also\n * propagates up through wrapping components (e.g. CnWidgetWrapper\n * re-emitting `@refresh`), so a host listener on the outer component can\n * still suppress the default.\n *\n * `waitUntil(promise)` lets a listener keep the Refresh item spinning, and the\n * menu open, until that promise settles.\n *\n * @param {(promise: Promise<unknown>) => void} [waitUntil] Collector for refresh work.\n * @return {{defaultPrevented: boolean, preventDefault: () => void, waitUntil: (promise: Promise<unknown>) => void}}\n */\nfunction createSyntheticEvent(waitUntil = () => {}) {\n\tconst ev = {\n\t\tdefaultPrevented: false,\n\t\tpreventDefault() {\n\t\t\tthis.defaultPrevented = true\n\t\t},\n\t\twaitUntil,\n\t}\n\treturn ev\n}\n\n/** Shortest time the Refresh spinner shows, so a fast refresh is still visible. */\nconst MIN_REFRESH_SPIN_MS = 400\n\n/** Longest the Refresh item waits on `waitUntil` work; axios has no default timeout. */\nconst MAX_REFRESH_WAIT_MS = 15000\n\n/**\n * CnActionsMenu — the shared built-in overflow Actions menu.\n *\n * Renders Refresh plus the mandatory trio Request a feature / Report a bug /\n * Documentation. The trio is unconditional: the bug link is built from the\n * app's forge repo and the docs link from the app-wide documentation base\n * plus this surface's `docsAnchor`, so no host can ship a menu missing one.\n * Pass `docsAnchor` per widget type — that is what makes Documentation open\n * that widget's own section instead of the docs homepage.\n *\n * ```vue\n * <CnActionsMenu\n * :widget-id=\"resolvedWidgetId\"\n * :title=\"displayTitle\"\n * :surface=\"`widget:${resolvedWidgetId}`\"\n * docs-anchor=\"open-cases\"\n * testid-base=\"cn-widget-wrapper\"\n * @refresh=\"(p, e) => $emit('refresh', p, e)\"\n * @request-feature=\"(p, e) => $emit('request-feature', p, e)\">\n * <template #action-items><slot name=\"action-items\" /></template>\n * </CnActionsMenu>\n * ```\n */\nexport default {\n\tname: 'CnActionsMenu',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionLink,\n\t\tNcLoadingIcon,\n\t\tDotsHorizontal,\n\t\tRefresh,\n\t\tLightbulbOutline,\n\t\tBookOpenVariant,\n\t\tBugOutline,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consuming app's slug (e.g. \"pipelinq\"). Provided by CnAppRoot.\n\t\t * Defaults to empty string when no CnAppRoot ancestor exists.\n\t\t */\n\t\tcnAppId: { default: () => '' },\n\t\t/**\n\t\t * Repo slug both forge deep-links target (e.g.\n\t\t * `ConductionNL/pipelinq`) — the Request-a-feature and Report-a-bug\n\t\t * new-issue forms. Provided by CnAppRoot from the manifest's\n\t\t * `nav.featureRequestRepo` field (with fallback to\n\t\t * `ConductionNL/<appId>`). Empty when no ancestor — the default\n\t\t * handler warns and skips opening rather than open a broken link.\n\t\t */\n\t\tcnFeatureRequestRepo: { default: () => '' },\n\t\t/**\n\t\t * Forge config (`{type, baseUrl}`) both new-issue deep-links are\n\t\t * built against. Provided by CnAppRoot from `manifest.nav.forge`.\n\t\t * Defaults to DEFAULT_FORGE when no CnAppRoot ancestor exists —\n\t\t * a third hardcoded Codeberg default lived here, so a menu mounted\n\t\t * standalone contradicted both the fleet default and the app it was\n\t\t * reporting for.\n\t\t */\n\t\tcnFeatureRequestForge: { default: () => ({ ...DEFAULT_FORGE }) },\n\t\t/**\n\t\t * Resolver for a widget's manifest title — the AUTHORED English\n\t\t * source string — provided by CnDashboardPage as\n\t\t * `(widgetId) => string`. The `title` prop this component receives\n\t\t * has already been through the host translate function\n\t\t * — CnDashboardPage's getWidgetTitle is the display chokepoint — and\n\t\t * may also be a user-typed customTitle in the user's own language, so\n\t\t * it is the wrong thing to put in a bug-report title. Returns '' when\n\t\t * no dashboard ancestor provides it (a standalone widget, a detail\n\t\t * page) or the widget def carries no title, and the link falls back\n\t\t * to the surface slug.\n\t\t */\n\t\tcnWidgetTitleSource: { default: () => () => '' },\n\t\t/**\n\t\t * App-wide documentation base URL (e.g.\n\t\t * `https://pipelinq.conduction.nl/docs`), provided by CnAppRoot from\n\t\t * `manifest.nav.documentationUrl`. Every widget's Documentation item\n\t\t * is built from this base plus the widget's own `docsAnchor`, so the\n\t\t * link lands on that widget's section rather than the docs homepage.\n\t\t * Empty when no ancestor provides one — the host's explicit\n\t\t * `documentationUrl` prop then has to carry the whole URL.\n\t\t */\n\t\tcnDocumentationBaseUrl: { default: () => '' },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Whether the Refresh item renders. The parent surface is\n\t\t * responsible for any opt-out aliasing (e.g. CnWidgetWrapper's\n\t\t * `hideRefresh`) and passes the resolved boolean here.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the Request-a-feature item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit documentation link target, opened in a new tab. Wins over\n\t\t * the `cnDocumentationBaseUrl` + `docsAnchor` pair. Leave empty (the\n\t\t * default) to let the menu build the per-widget deep-link itself.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * This surface's own section in the app's documentation, appended to\n\t\t * the app-wide `cnDocumentationBaseUrl`. A bare slug (`open-cases`)\n\t\t * becomes a `#fragment`; a value starting with `/` is resolved as a\n\t\t * path; a full `scheme://` URL is used as written. Supplying it is\n\t\t * what makes the Documentation item land on THIS widget's section\n\t\t * rather than the docs homepage.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocsAnchor: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the Documentation item renders. Defaults to true — the\n\t\t * canonical trio is meant to be present on every surface; set false\n\t\t * only where a docs link genuinely cannot exist.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the \"Report a bug\" item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowReportBug: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit \"Report a bug\" target. Empty (the default) builds a\n\t\t * new-issue deep-link on the app's forge from the injected\n\t\t * `cnFeatureRequestRepo` + `cnFeatureRequestForge`, pre-filled with\n\t\t * the surface's title.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\treportBugUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Pre-translated label for the Report-a-bug action. */\n\t\treportBugLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Report a bug'),\n\t\t},\n\n\t\t/**\n\t\t * Pre-translated label for the Documentation item. Defaults to the\n\t\t * lib's translation of \"Documentation\".\n\t\t */\n\t\tdocumentationLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Documentation'),\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded on the `@refresh` / `@request-feature`\n\t\t * payloads (as `widgetId`) and on the `cn:widget:refresh`\n\t\t * event-bus payload. The parent resolves it (explicit id or\n\t\t * slugified title).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Human-readable title carried on action payloads.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable `surface` slug naming where the menu sits (e.g.\n\t\t * `widget:<id>`, `detail:<id>`, `dashboard:<id>`). Used as the\n\t\t * English headline fallback for both new-issue deep-links when no\n\t\t * authored title can be recovered.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optional `specRef` slug. Accepted for backward compatibility with\n\t\t * hosts that bound it for the removed in-product suggestion modal;\n\t\t * no longer forwarded anywhere (the forge issue form asks for its\n\t\t * own context).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tspecRef: { // eslint-disable-line vue/no-unused-properties -- published prop kept so hosts that still bind it do not leak it into $attrs\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether a refresh is currently in flight. While true, the Refresh\n\t\t * item is disabled and shows a loading spinner for exactly as long as\n\t\t * this stays true — so the spinner reflects the real refresh time.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\trefreshing: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Event-bus channel the default Refresh handler emits on when no\n\t\t * host listener suppresses it. Widgets use `cn:widget:refresh`;\n\t\t * page surfaces pass `cn:page:refresh`.\n\t\t */\n\t\trefreshChannel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn:widget:refresh',\n\t\t},\n\n\t\t/** Pre-translated label for the Refresh action. */\n\t\trefreshLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Refresh'),\n\t\t},\n\n\t\t/** Pre-translated label for the Request-a-feature action. */\n\t\trequestFeatureLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Request a feature'),\n\t\t},\n\n\t\t/** Pre-translated aria-label / tooltip for the overflow trigger. */\n\t\tactionsMenuLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Actions'),\n\t\t},\n\n\t\t/**\n\t\t * How the trigger button is drawn: `tertiary` (NcActions' own default,\n\t\t * used when empty), `secondary` for a header that wants a bordered\n\t\t * button, as the board look's \"More\".\n\t\t *\n\t\t * @type {''|'primary'|'secondary'|'tertiary'|'tertiary-no-background'}\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-the-detail-header-buttons-follow-one-order\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Tell the menu that `#primary-items` has content. Only needed by a\n\t\t * host that switches every built-in item off: the menu decides whether\n\t\t * to render at all in a computed, and a slot that fills in later (a\n\t\t * page's actions arrive after mount) is not something a computed\n\t\t * notices. With any built-in item showing, the menu renders anyway\n\t\t * and this changes nothing.\n\t\t */\n\t\thasPrimaryItems: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Prefix for the `data-testid`s emitted on the menu container and\n\t\t * its items: `<base>-actions` (container), `<base>-action-refresh`,\n\t\t * `<base>-action-request-feature`, `<base>-action-report-bug`,\n\t\t * `<base>-action-documentation`.\n\t\t * Lets each host keep its own stable testids.\n\t\t */\n\t\ttestidBase: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn-actions-menu',\n\t\t},\n\t},\n\n\temits: ['refresh', 'request-feature'],\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Whether the overflow menu is open. */\n\t\t\tmenuOpen: false,\n\t\t\t/** Whether a refresh this menu started is still settling. */\n\t\t\trefreshPending: false,\n\t\t\t/** Close the menu once the host's `refreshing` falls back to false. */\n\t\t\tcloseWhenIdle: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Whether the Refresh item spins: the host's flag or our own pending refresh. */\n\t\trefreshBusy() {\n\t\t\treturn this.refreshing || this.refreshPending\n\t\t},\n\n\t\t/**\n\t\t * Whether the overflow `…` menu renders at all. True when at least\n\t\t * one built-in item is visible OR the caller provided an\n\t\t * `action-items` slot.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasOverflowMenu() {\n\t\t\tif (this.showRefresh) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showDocumentation && this.resolvedDocumentationUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showReportBug && this.resolvedReportBugUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showRequestFeature) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.hasPrimaryItems || this.$slots['primary-items']) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn Boolean(this.$slots['action-items']) || Boolean(this.$slots && this.$slots['action-items'])\n\t\t},\n\n\t\t/**\n\t\t * The Documentation item's target: the explicit `documentationUrl`\n\t\t * when given, otherwise the app-wide base deep-linked with this\n\t\t * surface's `docsAnchor`.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDocumentationUrl() {\n\t\t\tif (this.documentationUrl) {\n\t\t\t\treturn this.docsAnchor\n\t\t\t\t\t? resolveDocsUrl(this.documentationUrl, this.docsAnchor)\n\t\t\t\t\t: this.documentationUrl\n\t\t\t}\n\t\t\tif (this.cnDocumentationBaseUrl) {\n\t\t\t\treturn resolveDocsUrl(this.cnDocumentationBaseUrl, this.docsAnchor)\n\t\t\t}\n\t\t\t// Last resort so the item is never simply MISSING — an absent\n\t\t\t// Documentation entry is the defect this menu exists to prevent.\n\t\t\t// The fleet's convention is one docs site per app id; an app that\n\t\t\t// hosts its docs elsewhere sets `cnDocumentationBaseUrl` on\n\t\t\t// CnAppRoot, and the warning below says so.\n\t\t\treturn resolveDocsUrl(defaultDocsBase(this.cnAppId), this.docsAnchor)\n\t\t},\n\n\t\t/**\n\t\t * This surface's title AS AUTHORED, for anything that must not be\n\t\t * localized. Asks the injected dashboard resolver for the widget's\n\t\t * manifest source string; '' when nothing can supply one.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceTitle() {\n\t\t\tconst resolve = this.cnWidgetTitleSource\n\t\t\tif (typeof resolve !== 'function' || !this.widgetId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn String(resolve(this.widgetId) || '').trim()\n\t\t\t} catch {\n\t\t\t\t// A host resolver that throws must not take the menu with it —\n\t\t\t\t// the link degrades to the surface slug.\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The Report-a-bug target: the explicit `reportBugUrl` when given,\n\t\t * otherwise a new-issue deep-link on the app's forge, pre-filled with\n\t\t * a title naming the surface the report came from.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedReportBugUrl() {\n\t\t\tif (this.reportBugUrl) {\n\t\t\t\treturn this.reportBugUrl\n\t\t\t}\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// buildBugReportUrl owns both the host (one resolveForge for the\n\t\t\t// whole suggestion flow) and the bug-report issue FORM. This was\n\t\t\t// hand-rolled here against a local copy of the forge host map that\n\t\t\t// defaulted to Codeberg, so a menu mounted without a CnAppRoot sent\n\t\t\t// bug reports to a different host than the Request-a-feature item\n\t\t\t// directly above it — and it linked the BLANK issue form, so every\n\t\t\t// in-product report arrived with no steps, no expected/actual and\n\t\t\t// no severity.\n\t\t\t//\n\t\t\t// The headline must be ENGLISH: the `title` prop is already\n\t\t\t// translated (CnDashboardPage's getWidgetTitle is the display\n\t\t\t// chokepoint), so a report from a French UI read \"[BUG] Activité\n\t\t\t// récente\" and one from a Russian UI was in Cyrillic — unreadable\n\t\t\t// to a maintainer, even though the English msgid was sitting in the\n\t\t\t// manifest. `cnWidgetTitleSource` hands back that manifest string,\n\t\t\t// skipping any user-typed customTitle for the same reason.\n\t\t\t//\n\t\t\t// With no dashboard ancestor to ask, fall back to the surface slug\n\t\t\t// rather than the translated prop: a slug is English by\n\t\t\t// construction, and \"always English\" is the point. The localized\n\t\t\t// title is deliberately not carried in the URL at all — see\n\t\t\t// buildBugReportUrl for why it was dropped.\n\t\t\treturn buildBugReportUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The Request-a-feature target: the forge's feature-request issue\n\t\t * FORM, built exactly like resolvedReportBugUrl — same repo, same\n\t\t * forge, same English-headline rules (see that computed for why the\n\t\t * headline is never the translated title). Empty when no repo can\n\t\t * be resolved, in which case the click handler warns and does\n\t\t * nothing rather than open a broken link.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRequestFeatureUrl() {\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn buildFeatureRequestUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\trefreshing(busy) {\n\t\t\tif (!busy && this.closeWhenIdle) {\n\t\t\t\tthis.closeWhenIdle = false\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Refresh click — emits `@refresh`, then runs the built-in default\n\t\t * (emit on `refreshChannel`) unless a host called\n\t\t * `event.preventDefault()` on the second handler arg. The item spins\n\t\t * and the menu stays open until every promise handed to `waitUntil`\n\t\t * (on the event or the bus payload) settles, or 15 s pass, and the\n\t\t * host's `refreshing` is false; then the menu closes.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRefreshClick() {\n\t\t\tif (this.refreshBusy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst work = []\n\t\t\tconst waitUntil = (promise) => {\n\t\t\t\twork.push(Promise.resolve(promise))\n\t\t\t}\n\t\t\tconst ev = createSyntheticEvent(waitUntil)\n\t\t\tthis.refreshPending = true\n\t\t\tconst startedAt = Date.now()\n\t\t\t/**\n\t\t\t * @event refresh User clicked the Refresh item. Payload:\n\t\t\t * `{ widgetId, title }`. Handlers may call the second arg's\n\t\t\t * `preventDefault()` to suppress the built-in default (event-bus\n\t\t\t * emit on `refreshChannel`), and its `waitUntil(promise)` to keep\n\t\t\t * the item spinning until that work settles.\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('refresh', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (!ev.defaultPrevented) {\n\t\t\t\temitOnBus(this.refreshChannel, {\n\t\t\t\t\twidgetId: this.widgetId,\n\t\t\t\t\ttitle: this.title,\n\t\t\t\t\twaitUntil,\n\t\t\t\t})\n\t\t\t}\n\t\t\tlet ceiling\n\t\t\tawait Promise.race([\n\t\t\t\tPromise.allSettled(work),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tceiling = setTimeout(resolve, MAX_REFRESH_WAIT_MS)\n\t\t\t\t}),\n\t\t\t])\n\t\t\tclearTimeout(ceiling)\n\t\t\tconst hold = MIN_REFRESH_SPIN_MS - (Date.now() - startedAt)\n\t\t\tif (hold > 0) {\n\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, hold))\n\t\t\t}\n\t\t\tthis.refreshPending = false\n\t\t\tif (this.refreshing) {\n\t\t\t\tthis.closeWhenIdle = true\n\t\t\t} else {\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Request-a-feature click — emits `@request-feature`. The item is a\n\t\t * link to the forge's feature-request form, so the browser opens it\n\t\t * unless a host called `event.preventDefault()`, which then cancels\n\t\t * the link. With no `cnFeatureRequestRepo` the item is a button and\n\t\t * this only warns.\n\t\t *\n\t\t * @param {Event} [nativeEvent] The link's click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRequestFeatureClick(nativeEvent) {\n\t\t\tconst ev = createSyntheticEvent()\n\t\t\t/**\n\t\t\t * @event request-feature User clicked the Request a feature\n\t\t\t * item. Payload: `{ widgetId, title }`. Handlers may call the\n\t\t\t * second arg's `preventDefault()` to suppress the built-in\n\t\t\t * default (opening the forge's feature-request issue form).\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('request-feature', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (ev.defaultPrevented) {\n\t\t\t\tif (nativeEvent && typeof nativeEvent.preventDefault === 'function') {\n\t\t\t\t\tnativeEvent.preventDefault()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!this.resolvedRequestFeatureUrl) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnActionsMenu] Cannot open the feature-request form: missing cnFeatureRequestRepo inject (mount under CnAppRoot or bind a custom @request-feature listener).')\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["t","emitOnBus"],"mappings":";;;;;;;;;;AAoIA;AACC;AACA;;;AAGA;AACA;AACA;;AAED,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/B,CAAA,MAAM,EAAC,GAAI,MAAM,CAAC,KAAM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AAC;IACF,EAAA;AACD,GAAA,YAAY,CAAC,OAAO,EAAA;GACpB,MAAM,IAAK,GAAE,uBAAuB,IAAI,CAAC,GAAG,EAAC,GAAI,SAAS,EAAA;GAC1D,IAAI,IAAK,GAAE,CAAC,EAAE;IACb,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAA;AACzD,IAAA;GACA,IAAI,CAAC,iBAAiB,MAAI;AAC1B,GAAA,IAAI,IAAI,CAAC,UAAU,EAAE;IACpB,IAAI,CAAC,gBAAgB,KAAG;IACvB,MAAK;AACN,IAAA,IAAI,CAAC,QAAS,GAAE,MAAI;AACrB,IAAA;GACA;;AAED;;;;;AAKC;AACA;;;;AAID,EAAA,qBAAqB,CAAC,WAAW,EAAE;GAClC,MAAM,EAAG,GAAE,oBAAoB,GAAC;AAChC;;;;;AAKC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAI,EAAG,EAAE,EAAE,EAAA;GAChF,IAAI,EAAE,CAAC,gBAAgB,EAAE;AACxB,IAAA,IAAI,WAAY,IAAG,OAAO,WAAW,CAAC,cAAe,KAAI,UAAU,EAAE;KACpE,WAAW,CAAC,cAAc,GAAC;AAC5B,KAAA;IACA,MAAK;AACN,IAAA;AACA,GAAA,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE;AACpC;AACA,IAAA,OAAO,CAAC,IAAI,CAAC,+JAA+J,EAAA;AAC7K,IAAA;GACA;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnActionsMenu.vue2.js","sources":["../../../../src/components/CnActionsMenu/CnActionsMenu.vue"],"sourcesContent":["<!--\n CnActionsMenu — Shared \"…\" overflow Actions menu.\n\n Renders the canonical action set that appears on every Conduction\n surface — Refresh, then the mandatory trio Request a feature / Report a\n bug / Documentation — inside a single NcActions overflow. Request a\n feature opens the forge's feature-request issue form directly, exactly\n like Report a bug (team decision 2026-09-04: the in-product suggestion\n modal is gone — the forge is where the conversation happens, in English).\n Used by CnWidgetWrapper (widgets) and the page-level headers of\n CnDetailPage / CnDashboardPage so the three surfaces stay in lockstep.\n\n The trio is not optional and not conditional on configuration: each item\n resolves its own target (a forge new-issue deep-link for the bug report,\n `cnDocumentationBaseUrl` + the surface's `docsAnchor` for the docs link),\n so a host that passes no URLs still renders all three. That is the point\n — the items used to be per-host markup, and OpenRegister's widgets shipped\n without the Documentation entry while OpenCatalogi's were inconsistent.\n-->\n<template>\n\t<!-- Root <template v-if> (Vue 3 native fragment, renders no DOM node — was\n\t vue-frag <Fragment>) so NcActions stays in its host's flex/grid flow. -->\n\t<template v-if=\"hasOverflowMenu\">\n\t\t<NcActions\n\t\t\t:forceMenu=\"true\"\n\t\t\t:forceName=\"true\"\n\t\t\t:menuName=\"actionsMenuLabel\"\n\t\t\t:variant=\"variant || undefined\"\n\t\t\t:open=\"menuOpen\"\n\t\t\t:data-testid=\"`${testidBase}-actions`\"\n\t\t\t@update:open=\"menuOpen = $event\">\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t</template>\n\t\t\t<!-- @slot lead-items Items rendered at the very top of the menu, above Refresh: the tabs a board strip lists here instead of drawing them (CnTabsWidget). The caller owns any separator after them. -->\n\t\t\t<slot name=\"lead-items\" />\n\t\t\t<!-- Stays open while refreshing; onRefreshClick closes the menu once the refresh settles. -->\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"showRefresh\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-refresh`\"\n\t\t\t\t:disabled=\"refreshBusy\"\n\t\t\t\t:closeAfterClick=\"false\"\n\t\t\t\t@click=\"onRefreshClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"refreshBusy\" :size=\"20\" />\n\t\t\t\t\t<Refresh v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ refreshLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<!-- @slot primary-items The surface's OWN actions — a page's\n\t\t\t manifest `headerActions`, say — rendered above the canonical\n\t\t\t trio. They sit here rather than in `#action-items` because a\n\t\t\t case's Add party belongs above Report a bug, not under it.\n\t\t\t The caller owns the trailing NcActionSeparator: only the\n\t\t\t caller knows whether its v-for produced any items, and a\n\t\t\t separator rendered here would strand itself when it did\n\t\t\t not. -->\n\t\t\t<slot name=\"primary-items\" />\n\t\t\t<!-- The canonical trio — Request a feature / Report a bug /\n\t\t\t Documentation — renders on EVERY surface. None of the three\n\t\t\t is conditional on a URL being configured any more: each\n\t\t\t resolves its own target (see resolvedDocumentationUrl /\n\t\t\t resolvedReportBugUrl), so a host that forgets to pass one\n\t\t\t still gets a working item instead of a silently missing one.\n\t\t\t `showRequestFeature` / `showReportBug` / `showDocumentation`\n\t\t\t exist only for the rare surface that must suppress one\n\t\t\t deliberately; they all default to true. -->\n\t\t\t<!-- A real link whenever the form's URL is known, so it can be\n\t\t\t middle-clicked or copied; a button only for a host with no\n\t\t\t URL that handles @request-feature itself. -->\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showRequestFeature && resolvedRequestFeatureUrl\"\n\t\t\t\t:href=\"resolvedRequestFeatureUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionButton\n\t\t\t\tv-else-if=\"showRequestFeature\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showReportBug && resolvedReportBugUrl\"\n\t\t\t\t:href=\"resolvedReportBugUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-report-bug`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BugOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ reportBugLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showDocumentation && resolvedDocumentationUrl\"\n\t\t\t\t:href=\"resolvedDocumentationUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-documentation`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BookOpenVariant :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ documentationLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<!-- @slot action-items Additional NcActionButton-family items\n\t\t\t rendered inside the overflow menu, after the built-in\n\t\t\t Refresh + Request-a-feature / Report-a-bug / Documentation\n\t\t\t group. -->\n\t\t\t<slot name=\"action-items\" />\n\t\t</NcActions>\n\t</template>\n</template>\n\n<script>\nimport { emit as emitOnBus } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionLink, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue'\nimport BugOutline from 'vue-material-design-icons/BugOutline.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\nimport LightbulbOutline from 'vue-material-design-icons/LightbulbOutline.vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport { buildBugReportUrl, buildFeatureRequestUrl, DEFAULT_FORGE } from '../../utils/forge.js'\n\n/**\n * The fleet's per-app documentation site, derived from the app id. Used only\n * when no `documentationUrl` prop and no `cnDocumentationBaseUrl` inject are\n * available, so that the Documentation item is never absent — an app that\n * hosts its docs anywhere else provides the base instead.\n *\n * @param {string} appId Consuming app's slug.\n * @return {string} Documentation base URL, or '' when the app id is unknown.\n */\nfunction defaultDocsBase(appId) {\n\tconst id = String(appId || '').trim()\n\tif (!id) {\n\t\treturn ''\n\t}\n\treturn `https://${id}.conduction.nl/docs/`\n}\n\n/**\n * Resolve a documentation deep-link from a base URL and a per-widget\n * anchor. An anchor already starting with `#`, `/` or a `scheme://` is\n * used as written (respectively appended, resolved against the base's\n * origin, or taken whole); a bare slug becomes a `#fragment`, which is\n * how a docs page addresses one section of itself.\n *\n * @param {string} base Documentation base URL.\n * @param {string} anchor Per-widget anchor / path fragment.\n * @return {string} The resolved URL, or '' when there is no base to build on.\n */\nexport function resolveDocsUrl(base, anchor) {\n\tconst a = String(anchor || '').trim()\n\tif (a.includes('://')) {\n\t\treturn a\n\t}\n\tconst b = String(base || '').trim()\n\tif (!b) {\n\t\treturn ''\n\t}\n\tif (!a) {\n\t\treturn b\n\t}\n\tif (a.startsWith('#')) {\n\t\treturn `${b.replace(/#.*$/, '')}${a}`\n\t}\n\tif (a.startsWith('/')) {\n\t\ttry {\n\t\t\treturn new URL(a, b).toString()\n\t\t} catch {\n\t\t\treturn `${b.replace(/\\/+$/, '')}${a}`\n\t\t}\n\t}\n\treturn `${b.replace(/#.*$/, '').replace(/\\/+$/, '')}#${a}`\n}\n\n/**\n * Build a synthetic event object handed to host listeners alongside the\n * action payload. Mirrors the Vue 3 / DOM Event API enough to let a host\n * call `event.preventDefault()` to suppress the menu's built-in default\n * handler. Because Vue's `$emit` is synchronous, the same object also\n * propagates up through wrapping components (e.g. CnWidgetWrapper\n * re-emitting `@refresh`), so a host listener on the outer component can\n * still suppress the default.\n *\n * `waitUntil(promise)` lets a listener keep the Refresh item spinning, and the\n * menu open, until that promise settles.\n *\n * @param {(promise: Promise<unknown>) => void} [waitUntil] Collector for refresh work.\n * @return {{defaultPrevented: boolean, preventDefault: () => void, waitUntil: (promise: Promise<unknown>) => void}}\n */\nfunction createSyntheticEvent(waitUntil = () => {}) {\n\tconst ev = {\n\t\tdefaultPrevented: false,\n\t\tpreventDefault() {\n\t\t\tthis.defaultPrevented = true\n\t\t},\n\t\twaitUntil,\n\t}\n\treturn ev\n}\n\n/** Shortest time the Refresh spinner shows, so a fast refresh is still visible. */\nconst MIN_REFRESH_SPIN_MS = 400\n\n/** Longest the Refresh item waits on `waitUntil` work; axios has no default timeout. */\nconst MAX_REFRESH_WAIT_MS = 15000\n\n/**\n * CnActionsMenu — the shared built-in overflow Actions menu.\n *\n * Renders Refresh plus the mandatory trio Request a feature / Report a bug /\n * Documentation. The trio is unconditional: the bug link is built from the\n * app's forge repo and the docs link from the app-wide documentation base\n * plus this surface's `docsAnchor`, so no host can ship a menu missing one.\n * Pass `docsAnchor` per widget type — that is what makes Documentation open\n * that widget's own section instead of the docs homepage.\n *\n * ```vue\n * <CnActionsMenu\n * :widget-id=\"resolvedWidgetId\"\n * :title=\"displayTitle\"\n * :surface=\"`widget:${resolvedWidgetId}`\"\n * docs-anchor=\"open-cases\"\n * testid-base=\"cn-widget-wrapper\"\n * @refresh=\"(p, e) => $emit('refresh', p, e)\"\n * @request-feature=\"(p, e) => $emit('request-feature', p, e)\">\n * <template #action-items><slot name=\"action-items\" /></template>\n * </CnActionsMenu>\n * ```\n */\nexport default {\n\tname: 'CnActionsMenu',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionLink,\n\t\tNcLoadingIcon,\n\t\tDotsHorizontal,\n\t\tRefresh,\n\t\tLightbulbOutline,\n\t\tBookOpenVariant,\n\t\tBugOutline,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consuming app's slug (e.g. \"pipelinq\"). Provided by CnAppRoot.\n\t\t * Defaults to empty string when no CnAppRoot ancestor exists.\n\t\t */\n\t\tcnAppId: { default: () => '' },\n\t\t/**\n\t\t * Repo slug both forge deep-links target (e.g.\n\t\t * `ConductionNL/pipelinq`) — the Request-a-feature and Report-a-bug\n\t\t * new-issue forms. Provided by CnAppRoot from the manifest's\n\t\t * `nav.featureRequestRepo` field (with fallback to\n\t\t * `ConductionNL/<appId>`). Empty when no ancestor — the default\n\t\t * handler warns and skips opening rather than open a broken link.\n\t\t */\n\t\tcnFeatureRequestRepo: { default: () => '' },\n\t\t/**\n\t\t * Forge config (`{type, baseUrl}`) both new-issue deep-links are\n\t\t * built against. Provided by CnAppRoot from `manifest.nav.forge`.\n\t\t * Defaults to DEFAULT_FORGE when no CnAppRoot ancestor exists —\n\t\t * a third hardcoded Codeberg default lived here, so a menu mounted\n\t\t * standalone contradicted both the fleet default and the app it was\n\t\t * reporting for.\n\t\t */\n\t\tcnFeatureRequestForge: { default: () => ({ ...DEFAULT_FORGE }) },\n\t\t/**\n\t\t * Resolver for a widget's manifest title — the AUTHORED English\n\t\t * source string — provided by CnDashboardPage as\n\t\t * `(widgetId) => string`. The `title` prop this component receives\n\t\t * has already been through the host translate function\n\t\t * — CnDashboardPage's getWidgetTitle is the display chokepoint — and\n\t\t * may also be a user-typed customTitle in the user's own language, so\n\t\t * it is the wrong thing to put in a bug-report title. Returns '' when\n\t\t * no dashboard ancestor provides it (a standalone widget, a detail\n\t\t * page) or the widget def carries no title, and the link falls back\n\t\t * to the surface slug.\n\t\t */\n\t\tcnWidgetTitleSource: { default: () => () => '' },\n\t\t/**\n\t\t * App-wide documentation base URL (e.g.\n\t\t * `https://pipelinq.conduction.nl/docs`), provided by CnAppRoot from\n\t\t * `manifest.nav.documentationUrl`. Every widget's Documentation item\n\t\t * is built from this base plus the widget's own `docsAnchor`, so the\n\t\t * link lands on that widget's section rather than the docs homepage.\n\t\t * Empty when no ancestor provides one — the host's explicit\n\t\t * `documentationUrl` prop then has to carry the whole URL.\n\t\t */\n\t\tcnDocumentationBaseUrl: { default: () => '' },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Whether the Refresh item renders. The parent surface is\n\t\t * responsible for any opt-out aliasing (e.g. CnWidgetWrapper's\n\t\t * `hideRefresh`) and passes the resolved boolean here.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the Request-a-feature item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit documentation link target, opened in a new tab. Wins over\n\t\t * the `cnDocumentationBaseUrl` + `docsAnchor` pair. Leave empty (the\n\t\t * default) to let the menu build the per-widget deep-link itself.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * This surface's own section in the app's documentation, appended to\n\t\t * the app-wide `cnDocumentationBaseUrl`. A bare slug (`open-cases`)\n\t\t * becomes a `#fragment`; a value starting with `/` is resolved as a\n\t\t * path; a full `scheme://` URL is used as written. Supplying it is\n\t\t * what makes the Documentation item land on THIS widget's section\n\t\t * rather than the docs homepage.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocsAnchor: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the Documentation item renders. Defaults to true — the\n\t\t * canonical trio is meant to be present on every surface; set false\n\t\t * only where a docs link genuinely cannot exist.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the \"Report a bug\" item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowReportBug: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit \"Report a bug\" target. Empty (the default) builds a\n\t\t * new-issue deep-link on the app's forge from the injected\n\t\t * `cnFeatureRequestRepo` + `cnFeatureRequestForge`, pre-filled with\n\t\t * the surface's title.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\treportBugUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Pre-translated label for the Report-a-bug action. */\n\t\treportBugLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Report a bug'),\n\t\t},\n\n\t\t/**\n\t\t * Pre-translated label for the Documentation item. Defaults to the\n\t\t * lib's translation of \"Documentation\".\n\t\t */\n\t\tdocumentationLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Documentation'),\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded on the `@refresh` / `@request-feature`\n\t\t * payloads (as `widgetId`) and on the `cn:widget:refresh`\n\t\t * event-bus payload. The parent resolves it (explicit id or\n\t\t * slugified title).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Human-readable title carried on action payloads.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable `surface` slug naming where the menu sits (e.g.\n\t\t * `widget:<id>`, `detail:<id>`, `dashboard:<id>`). Used as the\n\t\t * English headline fallback for both new-issue deep-links when no\n\t\t * authored title can be recovered.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optional `specRef` slug. Accepted for backward compatibility with\n\t\t * hosts that bound it for the removed in-product suggestion modal;\n\t\t * no longer forwarded anywhere (the forge issue form asks for its\n\t\t * own context).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tspecRef: { // eslint-disable-line vue/no-unused-properties -- published prop kept so hosts that still bind it do not leak it into $attrs\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether a refresh is currently in flight. While true, the Refresh\n\t\t * item is disabled and shows a loading spinner for exactly as long as\n\t\t * this stays true — so the spinner reflects the real refresh time.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\trefreshing: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Event-bus channel the default Refresh handler emits on when no\n\t\t * host listener suppresses it. Widgets use `cn:widget:refresh`;\n\t\t * page surfaces pass `cn:page:refresh`.\n\t\t */\n\t\trefreshChannel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn:widget:refresh',\n\t\t},\n\n\t\t/** Pre-translated label for the Refresh action. */\n\t\trefreshLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Refresh'),\n\t\t},\n\n\t\t/** Pre-translated label for the Request-a-feature action. */\n\t\trequestFeatureLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Request a feature'),\n\t\t},\n\n\t\t/** Pre-translated aria-label / tooltip for the overflow trigger. */\n\t\tactionsMenuLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Actions'),\n\t\t},\n\n\t\t/**\n\t\t * How the trigger button is drawn: `tertiary` (NcActions' own default,\n\t\t * used when empty), `secondary` for a header that wants a bordered\n\t\t * button, as the board look's \"More\".\n\t\t *\n\t\t * @type {''|'primary'|'secondary'|'tertiary'|'tertiary-no-background'}\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-the-detail-header-buttons-follow-one-order\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Tell the menu that `#primary-items` has content. Only needed by a\n\t\t * host that switches every built-in item off: the menu decides whether\n\t\t * to render at all in a computed, and a slot that fills in later (a\n\t\t * page's actions arrive after mount) is not something a computed\n\t\t * notices. With any built-in item showing, the menu renders anyway\n\t\t * and this changes nothing.\n\t\t */\n\t\thasPrimaryItems: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Prefix for the `data-testid`s emitted on the menu container and\n\t\t * its items: `<base>-actions` (container), `<base>-action-refresh`,\n\t\t * `<base>-action-request-feature`, `<base>-action-report-bug`,\n\t\t * `<base>-action-documentation`.\n\t\t * Lets each host keep its own stable testids.\n\t\t */\n\t\ttestidBase: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn-actions-menu',\n\t\t},\n\t},\n\n\temits: ['refresh', 'request-feature'],\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Whether the overflow menu is open. */\n\t\t\tmenuOpen: false,\n\t\t\t/** Whether a refresh this menu started is still settling. */\n\t\t\trefreshPending: false,\n\t\t\t/** Close the menu once the host's `refreshing` falls back to false. */\n\t\t\tcloseWhenIdle: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Whether the Refresh item spins: the host's flag or our own pending refresh. */\n\t\trefreshBusy() {\n\t\t\treturn this.refreshing || this.refreshPending\n\t\t},\n\n\t\t/**\n\t\t * Whether the overflow `…` menu renders at all. True when at least\n\t\t * one built-in item is visible OR the caller provided an\n\t\t * `action-items` slot.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasOverflowMenu() {\n\t\t\tif (this.showRefresh) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showDocumentation && this.resolvedDocumentationUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showReportBug && this.resolvedReportBugUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showRequestFeature) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.hasPrimaryItems || this.$slots['primary-items'] || this.$slots['lead-items']) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn Boolean(this.$slots['action-items']) || Boolean(this.$slots && this.$slots['action-items'])\n\t\t},\n\n\t\t/**\n\t\t * The Documentation item's target: the explicit `documentationUrl`\n\t\t * when given, otherwise the app-wide base deep-linked with this\n\t\t * surface's `docsAnchor`.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDocumentationUrl() {\n\t\t\tif (this.documentationUrl) {\n\t\t\t\treturn this.docsAnchor\n\t\t\t\t\t? resolveDocsUrl(this.documentationUrl, this.docsAnchor)\n\t\t\t\t\t: this.documentationUrl\n\t\t\t}\n\t\t\tif (this.cnDocumentationBaseUrl) {\n\t\t\t\treturn resolveDocsUrl(this.cnDocumentationBaseUrl, this.docsAnchor)\n\t\t\t}\n\t\t\t// Last resort so the item is never simply MISSING — an absent\n\t\t\t// Documentation entry is the defect this menu exists to prevent.\n\t\t\t// The fleet's convention is one docs site per app id; an app that\n\t\t\t// hosts its docs elsewhere sets `cnDocumentationBaseUrl` on\n\t\t\t// CnAppRoot, and the warning below says so.\n\t\t\treturn resolveDocsUrl(defaultDocsBase(this.cnAppId), this.docsAnchor)\n\t\t},\n\n\t\t/**\n\t\t * This surface's title AS AUTHORED, for anything that must not be\n\t\t * localized. Asks the injected dashboard resolver for the widget's\n\t\t * manifest source string; '' when nothing can supply one.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceTitle() {\n\t\t\tconst resolve = this.cnWidgetTitleSource\n\t\t\tif (typeof resolve !== 'function' || !this.widgetId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn String(resolve(this.widgetId) || '').trim()\n\t\t\t} catch {\n\t\t\t\t// A host resolver that throws must not take the menu with it —\n\t\t\t\t// the link degrades to the surface slug.\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The Report-a-bug target: the explicit `reportBugUrl` when given,\n\t\t * otherwise a new-issue deep-link on the app's forge, pre-filled with\n\t\t * a title naming the surface the report came from.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedReportBugUrl() {\n\t\t\tif (this.reportBugUrl) {\n\t\t\t\treturn this.reportBugUrl\n\t\t\t}\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// buildBugReportUrl owns both the host (one resolveForge for the\n\t\t\t// whole suggestion flow) and the bug-report issue FORM. This was\n\t\t\t// hand-rolled here against a local copy of the forge host map that\n\t\t\t// defaulted to Codeberg, so a menu mounted without a CnAppRoot sent\n\t\t\t// bug reports to a different host than the Request-a-feature item\n\t\t\t// directly above it — and it linked the BLANK issue form, so every\n\t\t\t// in-product report arrived with no steps, no expected/actual and\n\t\t\t// no severity.\n\t\t\t//\n\t\t\t// The headline must be ENGLISH: the `title` prop is already\n\t\t\t// translated (CnDashboardPage's getWidgetTitle is the display\n\t\t\t// chokepoint), so a report from a French UI read \"[BUG] Activité\n\t\t\t// récente\" and one from a Russian UI was in Cyrillic — unreadable\n\t\t\t// to a maintainer, even though the English msgid was sitting in the\n\t\t\t// manifest. `cnWidgetTitleSource` hands back that manifest string,\n\t\t\t// skipping any user-typed customTitle for the same reason.\n\t\t\t//\n\t\t\t// With no dashboard ancestor to ask, fall back to the surface slug\n\t\t\t// rather than the translated prop: a slug is English by\n\t\t\t// construction, and \"always English\" is the point. The localized\n\t\t\t// title is deliberately not carried in the URL at all — see\n\t\t\t// buildBugReportUrl for why it was dropped.\n\t\t\treturn buildBugReportUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The Request-a-feature target: the forge's feature-request issue\n\t\t * FORM, built exactly like resolvedReportBugUrl — same repo, same\n\t\t * forge, same English-headline rules (see that computed for why the\n\t\t * headline is never the translated title). Empty when no repo can\n\t\t * be resolved, in which case the click handler warns and does\n\t\t * nothing rather than open a broken link.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRequestFeatureUrl() {\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn buildFeatureRequestUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\trefreshing(busy) {\n\t\t\tif (!busy && this.closeWhenIdle) {\n\t\t\t\tthis.closeWhenIdle = false\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Refresh click — emits `@refresh`, then runs the built-in default\n\t\t * (emit on `refreshChannel`) unless a host called\n\t\t * `event.preventDefault()` on the second handler arg. The item spins\n\t\t * and the menu stays open until every promise handed to `waitUntil`\n\t\t * (on the event or the bus payload) settles, or 15 s pass, and the\n\t\t * host's `refreshing` is false; then the menu closes.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRefreshClick() {\n\t\t\tif (this.refreshBusy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst work = []\n\t\t\tconst waitUntil = (promise) => {\n\t\t\t\twork.push(Promise.resolve(promise))\n\t\t\t}\n\t\t\tconst ev = createSyntheticEvent(waitUntil)\n\t\t\tthis.refreshPending = true\n\t\t\tconst startedAt = Date.now()\n\t\t\t/**\n\t\t\t * @event refresh User clicked the Refresh item. Payload:\n\t\t\t * `{ widgetId, title }`. Handlers may call the second arg's\n\t\t\t * `preventDefault()` to suppress the built-in default (event-bus\n\t\t\t * emit on `refreshChannel`), and its `waitUntil(promise)` to keep\n\t\t\t * the item spinning until that work settles.\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('refresh', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (!ev.defaultPrevented) {\n\t\t\t\temitOnBus(this.refreshChannel, {\n\t\t\t\t\twidgetId: this.widgetId,\n\t\t\t\t\ttitle: this.title,\n\t\t\t\t\twaitUntil,\n\t\t\t\t})\n\t\t\t}\n\t\t\tlet ceiling\n\t\t\tawait Promise.race([\n\t\t\t\tPromise.allSettled(work),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tceiling = setTimeout(resolve, MAX_REFRESH_WAIT_MS)\n\t\t\t\t}),\n\t\t\t])\n\t\t\tclearTimeout(ceiling)\n\t\t\tconst hold = MIN_REFRESH_SPIN_MS - (Date.now() - startedAt)\n\t\t\tif (hold > 0) {\n\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, hold))\n\t\t\t}\n\t\t\tthis.refreshPending = false\n\t\t\tif (this.refreshing) {\n\t\t\t\tthis.closeWhenIdle = true\n\t\t\t} else {\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Request-a-feature click — emits `@request-feature`. The item is a\n\t\t * link to the forge's feature-request form, so the browser opens it\n\t\t * unless a host called `event.preventDefault()`, which then cancels\n\t\t * the link. With no `cnFeatureRequestRepo` the item is a button and\n\t\t * this only warns.\n\t\t *\n\t\t * @param {Event} [nativeEvent] The link's click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRequestFeatureClick(nativeEvent) {\n\t\t\tconst ev = createSyntheticEvent()\n\t\t\t/**\n\t\t\t * @event request-feature User clicked the Request a feature\n\t\t\t * item. Payload: `{ widgetId, title }`. Handlers may call the\n\t\t\t * second arg's `preventDefault()` to suppress the built-in\n\t\t\t * default (opening the forge's feature-request issue form).\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('request-feature', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (ev.defaultPrevented) {\n\t\t\t\tif (nativeEvent && typeof nativeEvent.preventDefault === 'function') {\n\t\t\t\t\tnativeEvent.preventDefault()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!this.resolvedRequestFeatureUrl) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnActionsMenu] Cannot open the feature-request form: missing cnFeatureRequestRepo inject (mount under CnAppRoot or bind a custom @request-feature listener).')\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["t","emitOnBus"],"mappings":";;;;;;;;;;AAsIA;AACC;AACA;;;AAGA;AACA;AACA;;AAED,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/B,CAAA,MAAM,EAAC,GAAI,MAAM,CAAC,KAAM,IAAG,EAAE,CAAC,CAAC,IAAI,GAAC;AACpC,CAAA,IAAI,CAAC,EAAE,EAAE;AACR,EAAA,OAAO,EAAC;AACT,EAAA;AACA,CAAA,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,oBAAoB,CAAA;AAC1C,CAAA;;AAEA;;;;;AAKC;AACA;AACA;;;;AAIM,SAAS,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,CAAA,MAAM,CAAE,GAAE,MAAM,CAAC,MAAO,IAAG,EAAE,CAAC,CAAC,IAAI,GAAC;AACpC,CAAA,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACtB,EAAA,OAAO,CAAA;AACR,EAAA;CACA,MAAM,CAAA,GAAI,MAAM,CAAC,IAAG,IAAK,EAAE,CAAC,CAAC,IAAI,GAAC;AAClC,CAAA,IAAI,CAAC,CAAC,EAAE;AACP,EAAA,OAAO,EAAC;AACT,EAAA;AACA,CAAA,IAAI,CAAC,CAAC,EAAE;AACP,EAAA,OAAO,CAAA;AACR,EAAA;AACA,CAAA,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AACtB,EAAA,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EA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E;AACxB,IAAA,IAAI,WAAY,IAAG,OAAO,WAAW,CAAC,cAAe,KAAI,UAAU,EAAE;KACpE,WAAW,CAAC,cAAc,GAAC;AAC5B,KAAA;IACA,MAAK;AACN,IAAA;AACA,GAAA,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE;AACpC;AACA,IAAA,OAAO,CAAC,IAAI,CAAC,+JAA+J,EAAA;AAC7K,IAAA;GACA;EACD;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, toDisplayString, createCommentVNode
|
|
1
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
2
|
|
|
3
3
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4
4
|
const _component_DotsHorizontal = resolveComponent("DotsHorizontal");
|
|
@@ -26,6 +26,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
26
26
|
createVNode(_component_DotsHorizontal, { size: 20 })
|
|
27
27
|
]),
|
|
28
28
|
default: withCtx(() => [
|
|
29
|
+
renderSlot(_ctx.$slots, "lead-items"),
|
|
29
30
|
($props.showRefresh)
|
|
30
31
|
? (openBlock(), createBlock(_component_NcActionButton, {
|
|
31
32
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnActionsMenu.vue3.js","sources":["../../../../src/components/CnActionsMenu/CnActionsMenu.vue?vue&type=template&id=9478972a&lang.js"],"sourcesContent":["<!--\n CnActionsMenu — Shared \"…\" overflow Actions menu.\n\n Renders the canonical action set that appears on every Conduction\n surface — Refresh, then the mandatory trio Request a feature / Report a\n bug / Documentation — inside a single NcActions overflow. Request a\n feature opens the forge's feature-request issue form directly, exactly\n like Report a bug (team decision 2026-09-04: the in-product suggestion\n modal is gone — the forge is where the conversation happens, in English).\n Used by CnWidgetWrapper (widgets) and the page-level headers of\n CnDetailPage / CnDashboardPage so the three surfaces stay in lockstep.\n\n The trio is not optional and not conditional on configuration: each item\n resolves its own target (a forge new-issue deep-link for the bug report,\n `cnDocumentationBaseUrl` + the surface's `docsAnchor` for the docs link),\n so a host that passes no URLs still renders all three. That is the point\n — the items used to be per-host markup, and OpenRegister's widgets shipped\n without the Documentation entry while OpenCatalogi's were inconsistent.\n-->\n<template>\n\t<!-- Root <template v-if> (Vue 3 native fragment, renders no DOM node — was\n\t vue-frag <Fragment>) so NcActions stays in its host's flex/grid flow. -->\n\t<template v-if=\"hasOverflowMenu\">\n\t\t<NcActions\n\t\t\t:forceMenu=\"true\"\n\t\t\t:forceName=\"true\"\n\t\t\t:menuName=\"actionsMenuLabel\"\n\t\t\t:variant=\"variant || undefined\"\n\t\t\t:open=\"menuOpen\"\n\t\t\t:data-testid=\"`${testidBase}-actions`\"\n\t\t\t@update:open=\"menuOpen = $event\">\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t</template>\n\t\t\t<!-- Stays open while refreshing; onRefreshClick closes the menu once the refresh settles. -->\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"showRefresh\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-refresh`\"\n\t\t\t\t:disabled=\"refreshBusy\"\n\t\t\t\t:closeAfterClick=\"false\"\n\t\t\t\t@click=\"onRefreshClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"refreshBusy\" :size=\"20\" />\n\t\t\t\t\t<Refresh v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ refreshLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<!-- @slot primary-items The surface's OWN actions — a page's\n\t\t\t manifest `headerActions`, say — rendered above the canonical\n\t\t\t trio. They sit here rather than in `#action-items` because a\n\t\t\t case's Add party belongs above Report a bug, not under it.\n\t\t\t The caller owns the trailing NcActionSeparator: only the\n\t\t\t caller knows whether its v-for produced any items, and a\n\t\t\t separator rendered here would strand itself when it did\n\t\t\t not. -->\n\t\t\t<slot name=\"primary-items\" />\n\t\t\t<!-- The canonical trio — Request a feature / Report a bug /\n\t\t\t Documentation — renders on EVERY surface. None of the three\n\t\t\t is conditional on a URL being configured any more: each\n\t\t\t resolves its own target (see resolvedDocumentationUrl /\n\t\t\t resolvedReportBugUrl), so a host that forgets to pass one\n\t\t\t still gets a working item instead of a silently missing one.\n\t\t\t `showRequestFeature` / `showReportBug` / `showDocumentation`\n\t\t\t exist only for the rare surface that must suppress one\n\t\t\t deliberately; they all default to true. -->\n\t\t\t<!-- A real link whenever the form's URL is known, so it can be\n\t\t\t middle-clicked or copied; a button only for a host with no\n\t\t\t URL that handles @request-feature itself. -->\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showRequestFeature && resolvedRequestFeatureUrl\"\n\t\t\t\t:href=\"resolvedRequestFeatureUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionButton\n\t\t\t\tv-else-if=\"showRequestFeature\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showReportBug && resolvedReportBugUrl\"\n\t\t\t\t:href=\"resolvedReportBugUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-report-bug`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BugOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ reportBugLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showDocumentation && resolvedDocumentationUrl\"\n\t\t\t\t:href=\"resolvedDocumentationUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-documentation`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BookOpenVariant :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ documentationLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<!-- @slot action-items Additional NcActionButton-family items\n\t\t\t rendered inside the overflow menu, after the built-in\n\t\t\t Refresh + Request-a-feature / Report-a-bug / Documentation\n\t\t\t group. -->\n\t\t\t<slot name=\"action-items\" />\n\t\t</NcActions>\n\t</template>\n</template>\n\n<script>\nimport { emit as emitOnBus } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionLink, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue'\nimport BugOutline from 'vue-material-design-icons/BugOutline.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\nimport LightbulbOutline from 'vue-material-design-icons/LightbulbOutline.vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport { buildBugReportUrl, buildFeatureRequestUrl, DEFAULT_FORGE } from '../../utils/forge.js'\n\n/**\n * The fleet's per-app documentation site, derived from the app id. Used only\n * when no `documentationUrl` prop and no `cnDocumentationBaseUrl` inject are\n * available, so that the Documentation item is never absent — an app that\n * hosts its docs anywhere else provides the base instead.\n *\n * @param {string} appId Consuming app's slug.\n * @return {string} Documentation base URL, or '' when the app id is unknown.\n */\nfunction defaultDocsBase(appId) {\n\tconst id = String(appId || '').trim()\n\tif (!id) {\n\t\treturn ''\n\t}\n\treturn `https://${id}.conduction.nl/docs/`\n}\n\n/**\n * Resolve a documentation deep-link from a base URL and a per-widget\n * anchor. An anchor already starting with `#`, `/` or a `scheme://` is\n * used as written (respectively appended, resolved against the base's\n * origin, or taken whole); a bare slug becomes a `#fragment`, which is\n * how a docs page addresses one section of itself.\n *\n * @param {string} base Documentation base URL.\n * @param {string} anchor Per-widget anchor / path fragment.\n * @return {string} The resolved URL, or '' when there is no base to build on.\n */\nexport function resolveDocsUrl(base, anchor) {\n\tconst a = String(anchor || '').trim()\n\tif (a.includes('://')) {\n\t\treturn a\n\t}\n\tconst b = String(base || '').trim()\n\tif (!b) {\n\t\treturn ''\n\t}\n\tif (!a) {\n\t\treturn b\n\t}\n\tif (a.startsWith('#')) {\n\t\treturn `${b.replace(/#.*$/, '')}${a}`\n\t}\n\tif (a.startsWith('/')) {\n\t\ttry {\n\t\t\treturn new URL(a, b).toString()\n\t\t} catch {\n\t\t\treturn `${b.replace(/\\/+$/, '')}${a}`\n\t\t}\n\t}\n\treturn `${b.replace(/#.*$/, '').replace(/\\/+$/, '')}#${a}`\n}\n\n/**\n * Build a synthetic event object handed to host listeners alongside the\n * action payload. Mirrors the Vue 3 / DOM Event API enough to let a host\n * call `event.preventDefault()` to suppress the menu's built-in default\n * handler. Because Vue's `$emit` is synchronous, the same object also\n * propagates up through wrapping components (e.g. CnWidgetWrapper\n * re-emitting `@refresh`), so a host listener on the outer component can\n * still suppress the default.\n *\n * `waitUntil(promise)` lets a listener keep the Refresh item spinning, and the\n * menu open, until that promise settles.\n *\n * @param {(promise: Promise<unknown>) => void} [waitUntil] Collector for refresh work.\n * @return {{defaultPrevented: boolean, preventDefault: () => void, waitUntil: (promise: Promise<unknown>) => void}}\n */\nfunction createSyntheticEvent(waitUntil = () => {}) {\n\tconst ev = {\n\t\tdefaultPrevented: false,\n\t\tpreventDefault() {\n\t\t\tthis.defaultPrevented = true\n\t\t},\n\t\twaitUntil,\n\t}\n\treturn ev\n}\n\n/** Shortest time the Refresh spinner shows, so a fast refresh is still visible. */\nconst MIN_REFRESH_SPIN_MS = 400\n\n/** Longest the Refresh item waits on `waitUntil` work; axios has no default timeout. */\nconst MAX_REFRESH_WAIT_MS = 15000\n\n/**\n * CnActionsMenu — the shared built-in overflow Actions menu.\n *\n * Renders Refresh plus the mandatory trio Request a feature / Report a bug /\n * Documentation. The trio is unconditional: the bug link is built from the\n * app's forge repo and the docs link from the app-wide documentation base\n * plus this surface's `docsAnchor`, so no host can ship a menu missing one.\n * Pass `docsAnchor` per widget type — that is what makes Documentation open\n * that widget's own section instead of the docs homepage.\n *\n * ```vue\n * <CnActionsMenu\n * :widget-id=\"resolvedWidgetId\"\n * :title=\"displayTitle\"\n * :surface=\"`widget:${resolvedWidgetId}`\"\n * docs-anchor=\"open-cases\"\n * testid-base=\"cn-widget-wrapper\"\n * @refresh=\"(p, e) => $emit('refresh', p, e)\"\n * @request-feature=\"(p, e) => $emit('request-feature', p, e)\">\n * <template #action-items><slot name=\"action-items\" /></template>\n * </CnActionsMenu>\n * ```\n */\nexport default {\n\tname: 'CnActionsMenu',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionLink,\n\t\tNcLoadingIcon,\n\t\tDotsHorizontal,\n\t\tRefresh,\n\t\tLightbulbOutline,\n\t\tBookOpenVariant,\n\t\tBugOutline,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consuming app's slug (e.g. \"pipelinq\"). Provided by CnAppRoot.\n\t\t * Defaults to empty string when no CnAppRoot ancestor exists.\n\t\t */\n\t\tcnAppId: { default: () => '' },\n\t\t/**\n\t\t * Repo slug both forge deep-links target (e.g.\n\t\t * `ConductionNL/pipelinq`) — the Request-a-feature and Report-a-bug\n\t\t * new-issue forms. Provided by CnAppRoot from the manifest's\n\t\t * `nav.featureRequestRepo` field (with fallback to\n\t\t * `ConductionNL/<appId>`). Empty when no ancestor — the default\n\t\t * handler warns and skips opening rather than open a broken link.\n\t\t */\n\t\tcnFeatureRequestRepo: { default: () => '' },\n\t\t/**\n\t\t * Forge config (`{type, baseUrl}`) both new-issue deep-links are\n\t\t * built against. Provided by CnAppRoot from `manifest.nav.forge`.\n\t\t * Defaults to DEFAULT_FORGE when no CnAppRoot ancestor exists —\n\t\t * a third hardcoded Codeberg default lived here, so a menu mounted\n\t\t * standalone contradicted both the fleet default and the app it was\n\t\t * reporting for.\n\t\t */\n\t\tcnFeatureRequestForge: { default: () => ({ ...DEFAULT_FORGE }) },\n\t\t/**\n\t\t * Resolver for a widget's manifest title — the AUTHORED English\n\t\t * source string — provided by CnDashboardPage as\n\t\t * `(widgetId) => string`. The `title` prop this component receives\n\t\t * has already been through the host translate function\n\t\t * — CnDashboardPage's getWidgetTitle is the display chokepoint — and\n\t\t * may also be a user-typed customTitle in the user's own language, so\n\t\t * it is the wrong thing to put in a bug-report title. Returns '' when\n\t\t * no dashboard ancestor provides it (a standalone widget, a detail\n\t\t * page) or the widget def carries no title, and the link falls back\n\t\t * to the surface slug.\n\t\t */\n\t\tcnWidgetTitleSource: { default: () => () => '' },\n\t\t/**\n\t\t * App-wide documentation base URL (e.g.\n\t\t * `https://pipelinq.conduction.nl/docs`), provided by CnAppRoot from\n\t\t * `manifest.nav.documentationUrl`. Every widget's Documentation item\n\t\t * is built from this base plus the widget's own `docsAnchor`, so the\n\t\t * link lands on that widget's section rather than the docs homepage.\n\t\t * Empty when no ancestor provides one — the host's explicit\n\t\t * `documentationUrl` prop then has to carry the whole URL.\n\t\t */\n\t\tcnDocumentationBaseUrl: { default: () => '' },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Whether the Refresh item renders. The parent surface is\n\t\t * responsible for any opt-out aliasing (e.g. CnWidgetWrapper's\n\t\t * `hideRefresh`) and passes the resolved boolean here.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the Request-a-feature item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit documentation link target, opened in a new tab. Wins over\n\t\t * the `cnDocumentationBaseUrl` + `docsAnchor` pair. Leave empty (the\n\t\t * default) to let the menu build the per-widget deep-link itself.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * This surface's own section in the app's documentation, appended to\n\t\t * the app-wide `cnDocumentationBaseUrl`. A bare slug (`open-cases`)\n\t\t * becomes a `#fragment`; a value starting with `/` is resolved as a\n\t\t * path; a full `scheme://` URL is used as written. Supplying it is\n\t\t * what makes the Documentation item land on THIS widget's section\n\t\t * rather than the docs homepage.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocsAnchor: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the Documentation item renders. Defaults to true — the\n\t\t * canonical trio is meant to be present on every surface; set false\n\t\t * only where a docs link genuinely cannot exist.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the \"Report a bug\" item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowReportBug: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit \"Report a bug\" target. Empty (the default) builds a\n\t\t * new-issue deep-link on the app's forge from the injected\n\t\t * `cnFeatureRequestRepo` + `cnFeatureRequestForge`, pre-filled with\n\t\t * the surface's title.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\treportBugUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Pre-translated label for the Report-a-bug action. */\n\t\treportBugLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Report a bug'),\n\t\t},\n\n\t\t/**\n\t\t * Pre-translated label for the Documentation item. Defaults to the\n\t\t * lib's translation of \"Documentation\".\n\t\t */\n\t\tdocumentationLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Documentation'),\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded on the `@refresh` / `@request-feature`\n\t\t * payloads (as `widgetId`) and on the `cn:widget:refresh`\n\t\t * event-bus payload. The parent resolves it (explicit id or\n\t\t * slugified title).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Human-readable title carried on action payloads.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable `surface` slug naming where the menu sits (e.g.\n\t\t * `widget:<id>`, `detail:<id>`, `dashboard:<id>`). Used as the\n\t\t * English headline fallback for both new-issue deep-links when no\n\t\t * authored title can be recovered.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optional `specRef` slug. Accepted for backward compatibility with\n\t\t * hosts that bound it for the removed in-product suggestion modal;\n\t\t * no longer forwarded anywhere (the forge issue form asks for its\n\t\t * own context).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tspecRef: { // eslint-disable-line vue/no-unused-properties -- published prop kept so hosts that still bind it do not leak it into $attrs\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether a refresh is currently in flight. While true, the Refresh\n\t\t * item is disabled and shows a loading spinner for exactly as long as\n\t\t * this stays true — so the spinner reflects the real refresh time.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\trefreshing: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Event-bus channel the default Refresh handler emits on when no\n\t\t * host listener suppresses it. Widgets use `cn:widget:refresh`;\n\t\t * page surfaces pass `cn:page:refresh`.\n\t\t */\n\t\trefreshChannel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn:widget:refresh',\n\t\t},\n\n\t\t/** Pre-translated label for the Refresh action. */\n\t\trefreshLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Refresh'),\n\t\t},\n\n\t\t/** Pre-translated label for the Request-a-feature action. */\n\t\trequestFeatureLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Request a feature'),\n\t\t},\n\n\t\t/** Pre-translated aria-label / tooltip for the overflow trigger. */\n\t\tactionsMenuLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Actions'),\n\t\t},\n\n\t\t/**\n\t\t * How the trigger button is drawn: `tertiary` (NcActions' own default,\n\t\t * used when empty), `secondary` for a header that wants a bordered\n\t\t * button, as the board look's \"More\".\n\t\t *\n\t\t * @type {''|'primary'|'secondary'|'tertiary'|'tertiary-no-background'}\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-the-detail-header-buttons-follow-one-order\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Tell the menu that `#primary-items` has content. Only needed by a\n\t\t * host that switches every built-in item off: the menu decides whether\n\t\t * to render at all in a computed, and a slot that fills in later (a\n\t\t * page's actions arrive after mount) is not something a computed\n\t\t * notices. With any built-in item showing, the menu renders anyway\n\t\t * and this changes nothing.\n\t\t */\n\t\thasPrimaryItems: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Prefix for the `data-testid`s emitted on the menu container and\n\t\t * its items: `<base>-actions` (container), `<base>-action-refresh`,\n\t\t * `<base>-action-request-feature`, `<base>-action-report-bug`,\n\t\t * `<base>-action-documentation`.\n\t\t * Lets each host keep its own stable testids.\n\t\t */\n\t\ttestidBase: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn-actions-menu',\n\t\t},\n\t},\n\n\temits: ['refresh', 'request-feature'],\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Whether the overflow menu is open. */\n\t\t\tmenuOpen: false,\n\t\t\t/** Whether a refresh this menu started is still settling. */\n\t\t\trefreshPending: false,\n\t\t\t/** Close the menu once the host's `refreshing` falls back to false. */\n\t\t\tcloseWhenIdle: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Whether the Refresh item spins: the host's flag or our own pending refresh. */\n\t\trefreshBusy() {\n\t\t\treturn this.refreshing || this.refreshPending\n\t\t},\n\n\t\t/**\n\t\t * Whether the overflow `…` menu renders at all. True when at least\n\t\t * one built-in item is visible OR the caller provided an\n\t\t * `action-items` slot.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasOverflowMenu() {\n\t\t\tif (this.showRefresh) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showDocumentation && this.resolvedDocumentationUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showReportBug && this.resolvedReportBugUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showRequestFeature) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.hasPrimaryItems || this.$slots['primary-items']) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn Boolean(this.$slots['action-items']) || Boolean(this.$slots && this.$slots['action-items'])\n\t\t},\n\n\t\t/**\n\t\t * The Documentation item's target: the explicit `documentationUrl`\n\t\t * when given, otherwise the app-wide base deep-linked with this\n\t\t * surface's `docsAnchor`.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDocumentationUrl() {\n\t\t\tif (this.documentationUrl) {\n\t\t\t\treturn this.docsAnchor\n\t\t\t\t\t? resolveDocsUrl(this.documentationUrl, this.docsAnchor)\n\t\t\t\t\t: this.documentationUrl\n\t\t\t}\n\t\t\tif (this.cnDocumentationBaseUrl) {\n\t\t\t\treturn resolveDocsUrl(this.cnDocumentationBaseUrl, this.docsAnchor)\n\t\t\t}\n\t\t\t// Last resort so the item is never simply MISSING — an absent\n\t\t\t// Documentation entry is the defect this menu exists to prevent.\n\t\t\t// The fleet's convention is one docs site per app id; an app that\n\t\t\t// hosts its docs elsewhere sets `cnDocumentationBaseUrl` on\n\t\t\t// CnAppRoot, and the warning below says so.\n\t\t\treturn resolveDocsUrl(defaultDocsBase(this.cnAppId), this.docsAnchor)\n\t\t},\n\n\t\t/**\n\t\t * This surface's title AS AUTHORED, for anything that must not be\n\t\t * localized. Asks the injected dashboard resolver for the widget's\n\t\t * manifest source string; '' when nothing can supply one.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceTitle() {\n\t\t\tconst resolve = this.cnWidgetTitleSource\n\t\t\tif (typeof resolve !== 'function' || !this.widgetId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn String(resolve(this.widgetId) || '').trim()\n\t\t\t} catch {\n\t\t\t\t// A host resolver that throws must not take the menu with it —\n\t\t\t\t// the link degrades to the surface slug.\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The Report-a-bug target: the explicit `reportBugUrl` when given,\n\t\t * otherwise a new-issue deep-link on the app's forge, pre-filled with\n\t\t * a title naming the surface the report came from.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedReportBugUrl() {\n\t\t\tif (this.reportBugUrl) {\n\t\t\t\treturn this.reportBugUrl\n\t\t\t}\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// buildBugReportUrl owns both the host (one resolveForge for the\n\t\t\t// whole suggestion flow) and the bug-report issue FORM. This was\n\t\t\t// hand-rolled here against a local copy of the forge host map that\n\t\t\t// defaulted to Codeberg, so a menu mounted without a CnAppRoot sent\n\t\t\t// bug reports to a different host than the Request-a-feature item\n\t\t\t// directly above it — and it linked the BLANK issue form, so every\n\t\t\t// in-product report arrived with no steps, no expected/actual and\n\t\t\t// no severity.\n\t\t\t//\n\t\t\t// The headline must be ENGLISH: the `title` prop is already\n\t\t\t// translated (CnDashboardPage's getWidgetTitle is the display\n\t\t\t// chokepoint), so a report from a French UI read \"[BUG] Activité\n\t\t\t// récente\" and one from a Russian UI was in Cyrillic — unreadable\n\t\t\t// to a maintainer, even though the English msgid was sitting in the\n\t\t\t// manifest. `cnWidgetTitleSource` hands back that manifest string,\n\t\t\t// skipping any user-typed customTitle for the same reason.\n\t\t\t//\n\t\t\t// With no dashboard ancestor to ask, fall back to the surface slug\n\t\t\t// rather than the translated prop: a slug is English by\n\t\t\t// construction, and \"always English\" is the point. The localized\n\t\t\t// title is deliberately not carried in the URL at all — see\n\t\t\t// buildBugReportUrl for why it was dropped.\n\t\t\treturn buildBugReportUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The Request-a-feature target: the forge's feature-request issue\n\t\t * FORM, built exactly like resolvedReportBugUrl — same repo, same\n\t\t * forge, same English-headline rules (see that computed for why the\n\t\t * headline is never the translated title). Empty when no repo can\n\t\t * be resolved, in which case the click handler warns and does\n\t\t * nothing rather than open a broken link.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRequestFeatureUrl() {\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn buildFeatureRequestUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\trefreshing(busy) {\n\t\t\tif (!busy && this.closeWhenIdle) {\n\t\t\t\tthis.closeWhenIdle = false\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Refresh click — emits `@refresh`, then runs the built-in default\n\t\t * (emit on `refreshChannel`) unless a host called\n\t\t * `event.preventDefault()` on the second handler arg. The item spins\n\t\t * and the menu stays open until every promise handed to `waitUntil`\n\t\t * (on the event or the bus payload) settles, or 15 s pass, and the\n\t\t * host's `refreshing` is false; then the menu closes.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRefreshClick() {\n\t\t\tif (this.refreshBusy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst work = []\n\t\t\tconst waitUntil = (promise) => {\n\t\t\t\twork.push(Promise.resolve(promise))\n\t\t\t}\n\t\t\tconst ev = createSyntheticEvent(waitUntil)\n\t\t\tthis.refreshPending = true\n\t\t\tconst startedAt = Date.now()\n\t\t\t/**\n\t\t\t * @event refresh User clicked the Refresh item. Payload:\n\t\t\t * `{ widgetId, title }`. Handlers may call the second arg's\n\t\t\t * `preventDefault()` to suppress the built-in default (event-bus\n\t\t\t * emit on `refreshChannel`), and its `waitUntil(promise)` to keep\n\t\t\t * the item spinning until that work settles.\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('refresh', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (!ev.defaultPrevented) {\n\t\t\t\temitOnBus(this.refreshChannel, {\n\t\t\t\t\twidgetId: this.widgetId,\n\t\t\t\t\ttitle: this.title,\n\t\t\t\t\twaitUntil,\n\t\t\t\t})\n\t\t\t}\n\t\t\tlet ceiling\n\t\t\tawait Promise.race([\n\t\t\t\tPromise.allSettled(work),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tceiling = setTimeout(resolve, MAX_REFRESH_WAIT_MS)\n\t\t\t\t}),\n\t\t\t])\n\t\t\tclearTimeout(ceiling)\n\t\t\tconst hold = MIN_REFRESH_SPIN_MS - (Date.now() - startedAt)\n\t\t\tif (hold > 0) {\n\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, hold))\n\t\t\t}\n\t\t\tthis.refreshPending = false\n\t\t\tif (this.refreshing) {\n\t\t\t\tthis.closeWhenIdle = true\n\t\t\t} else {\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Request-a-feature click — emits `@request-feature`. The item is a\n\t\t * link to the forge's feature-request form, so the browser opens it\n\t\t * unless a host called `event.preventDefault()`, which then cancels\n\t\t * the link. With no `cnFeatureRequestRepo` the item is a button and\n\t\t * this only warns.\n\t\t *\n\t\t * @param {Event} [nativeEvent] The link's click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRequestFeatureClick(nativeEvent) {\n\t\t\tconst ev = createSyntheticEvent()\n\t\t\t/**\n\t\t\t * @event request-feature User clicked the Request a feature\n\t\t\t * item. Payload: `{ widgetId, title }`. Handlers may call the\n\t\t\t * second arg's `preventDefault()` to suppress the built-in\n\t\t\t * default (opening the forge's feature-request issue form).\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('request-feature', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (ev.defaultPrevented) {\n\t\t\t\tif (nativeEvent && typeof nativeEvent.preventDefault === 'function') {\n\t\t\t\t\tnativeEvent.preventDefault()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!this.resolvedRequestFeatureUrl) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnActionsMenu] Cannot open the feature-request form: missing cnFeatureRequestRepo inject (mount under CnAppRoot or bind a custom @request-feature listener).')\n\t\t\t}\n\t\t},\n\t},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.vue3.js","sources":["../../../../src/components/CnActionsMenu/CnActionsMenu.vue?vue&type=template&id=42d23a04&lang.js"],"sourcesContent":["<!--\n CnActionsMenu — Shared \"…\" overflow Actions menu.\n\n Renders the canonical action set that appears on every Conduction\n surface — Refresh, then the mandatory trio Request a feature / Report a\n bug / Documentation — inside a single NcActions overflow. Request a\n feature opens the forge's feature-request issue form directly, exactly\n like Report a bug (team decision 2026-09-04: the in-product suggestion\n modal is gone — the forge is where the conversation happens, in English).\n Used by CnWidgetWrapper (widgets) and the page-level headers of\n CnDetailPage / CnDashboardPage so the three surfaces stay in lockstep.\n\n The trio is not optional and not conditional on configuration: each item\n resolves its own target (a forge new-issue deep-link for the bug report,\n `cnDocumentationBaseUrl` + the surface's `docsAnchor` for the docs link),\n so a host that passes no URLs still renders all three. That is the point\n — the items used to be per-host markup, and OpenRegister's widgets shipped\n without the Documentation entry while OpenCatalogi's were inconsistent.\n-->\n<template>\n\t<!-- Root <template v-if> (Vue 3 native fragment, renders no DOM node — was\n\t vue-frag <Fragment>) so NcActions stays in its host's flex/grid flow. -->\n\t<template v-if=\"hasOverflowMenu\">\n\t\t<NcActions\n\t\t\t:forceMenu=\"true\"\n\t\t\t:forceName=\"true\"\n\t\t\t:menuName=\"actionsMenuLabel\"\n\t\t\t:variant=\"variant || undefined\"\n\t\t\t:open=\"menuOpen\"\n\t\t\t:data-testid=\"`${testidBase}-actions`\"\n\t\t\t@update:open=\"menuOpen = $event\">\n\t\t\t<template #icon>\n\t\t\t\t<DotsHorizontal :size=\"20\" />\n\t\t\t</template>\n\t\t\t<!-- @slot lead-items Items rendered at the very top of the menu, above Refresh: the tabs a board strip lists here instead of drawing them (CnTabsWidget). The caller owns any separator after them. -->\n\t\t\t<slot name=\"lead-items\" />\n\t\t\t<!-- Stays open while refreshing; onRefreshClick closes the menu once the refresh settles. -->\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"showRefresh\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-refresh`\"\n\t\t\t\t:disabled=\"refreshBusy\"\n\t\t\t\t:closeAfterClick=\"false\"\n\t\t\t\t@click=\"onRefreshClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"refreshBusy\" :size=\"20\" />\n\t\t\t\t\t<Refresh v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ refreshLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<!-- @slot primary-items The surface's OWN actions — a page's\n\t\t\t manifest `headerActions`, say — rendered above the canonical\n\t\t\t trio. They sit here rather than in `#action-items` because a\n\t\t\t case's Add party belongs above Report a bug, not under it.\n\t\t\t The caller owns the trailing NcActionSeparator: only the\n\t\t\t caller knows whether its v-for produced any items, and a\n\t\t\t separator rendered here would strand itself when it did\n\t\t\t not. -->\n\t\t\t<slot name=\"primary-items\" />\n\t\t\t<!-- The canonical trio — Request a feature / Report a bug /\n\t\t\t Documentation — renders on EVERY surface. None of the three\n\t\t\t is conditional on a URL being configured any more: each\n\t\t\t resolves its own target (see resolvedDocumentationUrl /\n\t\t\t resolvedReportBugUrl), so a host that forgets to pass one\n\t\t\t still gets a working item instead of a silently missing one.\n\t\t\t `showRequestFeature` / `showReportBug` / `showDocumentation`\n\t\t\t exist only for the rare surface that must suppress one\n\t\t\t deliberately; they all default to true. -->\n\t\t\t<!-- A real link whenever the form's URL is known, so it can be\n\t\t\t middle-clicked or copied; a button only for a host with no\n\t\t\t URL that handles @request-feature itself. -->\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showRequestFeature && resolvedRequestFeatureUrl\"\n\t\t\t\t:href=\"resolvedRequestFeatureUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionButton\n\t\t\t\tv-else-if=\"showRequestFeature\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-request-feature`\"\n\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t@click=\"onRequestFeatureClick\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<LightbulbOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ requestFeatureLabel }}\n\t\t\t</NcActionButton>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showReportBug && resolvedReportBugUrl\"\n\t\t\t\t:href=\"resolvedReportBugUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-report-bug`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BugOutline :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ reportBugLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<NcActionLink\n\t\t\t\tv-if=\"showDocumentation && resolvedDocumentationUrl\"\n\t\t\t\t:href=\"resolvedDocumentationUrl\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\t:data-testid=\"`${testidBase}-action-documentation`\"\n\t\t\t\t:closeAfterClick=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<BookOpenVariant :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ documentationLabel }}\n\t\t\t</NcActionLink>\n\t\t\t<!-- @slot action-items Additional NcActionButton-family items\n\t\t\t rendered inside the overflow menu, after the built-in\n\t\t\t Refresh + Request-a-feature / Report-a-bug / Documentation\n\t\t\t group. -->\n\t\t\t<slot name=\"action-items\" />\n\t\t</NcActions>\n\t</template>\n</template>\n\n<script>\nimport { emit as emitOnBus } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcActionLink, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue'\nimport BugOutline from 'vue-material-design-icons/BugOutline.vue'\nimport DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'\nimport LightbulbOutline from 'vue-material-design-icons/LightbulbOutline.vue'\nimport Refresh from 'vue-material-design-icons/Refresh.vue'\nimport { buildBugReportUrl, buildFeatureRequestUrl, DEFAULT_FORGE } from '../../utils/forge.js'\n\n/**\n * The fleet's per-app documentation site, derived from the app id. Used only\n * when no `documentationUrl` prop and no `cnDocumentationBaseUrl` inject are\n * available, so that the Documentation item is never absent — an app that\n * hosts its docs anywhere else provides the base instead.\n *\n * @param {string} appId Consuming app's slug.\n * @return {string} Documentation base URL, or '' when the app id is unknown.\n */\nfunction defaultDocsBase(appId) {\n\tconst id = String(appId || '').trim()\n\tif (!id) {\n\t\treturn ''\n\t}\n\treturn `https://${id}.conduction.nl/docs/`\n}\n\n/**\n * Resolve a documentation deep-link from a base URL and a per-widget\n * anchor. An anchor already starting with `#`, `/` or a `scheme://` is\n * used as written (respectively appended, resolved against the base's\n * origin, or taken whole); a bare slug becomes a `#fragment`, which is\n * how a docs page addresses one section of itself.\n *\n * @param {string} base Documentation base URL.\n * @param {string} anchor Per-widget anchor / path fragment.\n * @return {string} The resolved URL, or '' when there is no base to build on.\n */\nexport function resolveDocsUrl(base, anchor) {\n\tconst a = String(anchor || '').trim()\n\tif (a.includes('://')) {\n\t\treturn a\n\t}\n\tconst b = String(base || '').trim()\n\tif (!b) {\n\t\treturn ''\n\t}\n\tif (!a) {\n\t\treturn b\n\t}\n\tif (a.startsWith('#')) {\n\t\treturn `${b.replace(/#.*$/, '')}${a}`\n\t}\n\tif (a.startsWith('/')) {\n\t\ttry {\n\t\t\treturn new URL(a, b).toString()\n\t\t} catch {\n\t\t\treturn `${b.replace(/\\/+$/, '')}${a}`\n\t\t}\n\t}\n\treturn `${b.replace(/#.*$/, '').replace(/\\/+$/, '')}#${a}`\n}\n\n/**\n * Build a synthetic event object handed to host listeners alongside the\n * action payload. Mirrors the Vue 3 / DOM Event API enough to let a host\n * call `event.preventDefault()` to suppress the menu's built-in default\n * handler. Because Vue's `$emit` is synchronous, the same object also\n * propagates up through wrapping components (e.g. CnWidgetWrapper\n * re-emitting `@refresh`), so a host listener on the outer component can\n * still suppress the default.\n *\n * `waitUntil(promise)` lets a listener keep the Refresh item spinning, and the\n * menu open, until that promise settles.\n *\n * @param {(promise: Promise<unknown>) => void} [waitUntil] Collector for refresh work.\n * @return {{defaultPrevented: boolean, preventDefault: () => void, waitUntil: (promise: Promise<unknown>) => void}}\n */\nfunction createSyntheticEvent(waitUntil = () => {}) {\n\tconst ev = {\n\t\tdefaultPrevented: false,\n\t\tpreventDefault() {\n\t\t\tthis.defaultPrevented = true\n\t\t},\n\t\twaitUntil,\n\t}\n\treturn ev\n}\n\n/** Shortest time the Refresh spinner shows, so a fast refresh is still visible. */\nconst MIN_REFRESH_SPIN_MS = 400\n\n/** Longest the Refresh item waits on `waitUntil` work; axios has no default timeout. */\nconst MAX_REFRESH_WAIT_MS = 15000\n\n/**\n * CnActionsMenu — the shared built-in overflow Actions menu.\n *\n * Renders Refresh plus the mandatory trio Request a feature / Report a bug /\n * Documentation. The trio is unconditional: the bug link is built from the\n * app's forge repo and the docs link from the app-wide documentation base\n * plus this surface's `docsAnchor`, so no host can ship a menu missing one.\n * Pass `docsAnchor` per widget type — that is what makes Documentation open\n * that widget's own section instead of the docs homepage.\n *\n * ```vue\n * <CnActionsMenu\n * :widget-id=\"resolvedWidgetId\"\n * :title=\"displayTitle\"\n * :surface=\"`widget:${resolvedWidgetId}`\"\n * docs-anchor=\"open-cases\"\n * testid-base=\"cn-widget-wrapper\"\n * @refresh=\"(p, e) => $emit('refresh', p, e)\"\n * @request-feature=\"(p, e) => $emit('request-feature', p, e)\">\n * <template #action-items><slot name=\"action-items\" /></template>\n * </CnActionsMenu>\n * ```\n */\nexport default {\n\tname: 'CnActionsMenu',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcActionLink,\n\t\tNcLoadingIcon,\n\t\tDotsHorizontal,\n\t\tRefresh,\n\t\tLightbulbOutline,\n\t\tBookOpenVariant,\n\t\tBugOutline,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consuming app's slug (e.g. \"pipelinq\"). Provided by CnAppRoot.\n\t\t * Defaults to empty string when no CnAppRoot ancestor exists.\n\t\t */\n\t\tcnAppId: { default: () => '' },\n\t\t/**\n\t\t * Repo slug both forge deep-links target (e.g.\n\t\t * `ConductionNL/pipelinq`) — the Request-a-feature and Report-a-bug\n\t\t * new-issue forms. Provided by CnAppRoot from the manifest's\n\t\t * `nav.featureRequestRepo` field (with fallback to\n\t\t * `ConductionNL/<appId>`). Empty when no ancestor — the default\n\t\t * handler warns and skips opening rather than open a broken link.\n\t\t */\n\t\tcnFeatureRequestRepo: { default: () => '' },\n\t\t/**\n\t\t * Forge config (`{type, baseUrl}`) both new-issue deep-links are\n\t\t * built against. Provided by CnAppRoot from `manifest.nav.forge`.\n\t\t * Defaults to DEFAULT_FORGE when no CnAppRoot ancestor exists —\n\t\t * a third hardcoded Codeberg default lived here, so a menu mounted\n\t\t * standalone contradicted both the fleet default and the app it was\n\t\t * reporting for.\n\t\t */\n\t\tcnFeatureRequestForge: { default: () => ({ ...DEFAULT_FORGE }) },\n\t\t/**\n\t\t * Resolver for a widget's manifest title — the AUTHORED English\n\t\t * source string — provided by CnDashboardPage as\n\t\t * `(widgetId) => string`. The `title` prop this component receives\n\t\t * has already been through the host translate function\n\t\t * — CnDashboardPage's getWidgetTitle is the display chokepoint — and\n\t\t * may also be a user-typed customTitle in the user's own language, so\n\t\t * it is the wrong thing to put in a bug-report title. Returns '' when\n\t\t * no dashboard ancestor provides it (a standalone widget, a detail\n\t\t * page) or the widget def carries no title, and the link falls back\n\t\t * to the surface slug.\n\t\t */\n\t\tcnWidgetTitleSource: { default: () => () => '' },\n\t\t/**\n\t\t * App-wide documentation base URL (e.g.\n\t\t * `https://pipelinq.conduction.nl/docs`), provided by CnAppRoot from\n\t\t * `manifest.nav.documentationUrl`. Every widget's Documentation item\n\t\t * is built from this base plus the widget's own `docsAnchor`, so the\n\t\t * link lands on that widget's section rather than the docs homepage.\n\t\t * Empty when no ancestor provides one — the host's explicit\n\t\t * `documentationUrl` prop then has to carry the whole URL.\n\t\t */\n\t\tcnDocumentationBaseUrl: { default: () => '' },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Whether the Refresh item renders. The parent surface is\n\t\t * responsible for any opt-out aliasing (e.g. CnWidgetWrapper's\n\t\t * `hideRefresh`) and passes the resolved boolean here.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the Request-a-feature item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit documentation link target, opened in a new tab. Wins over\n\t\t * the `cnDocumentationBaseUrl` + `docsAnchor` pair. Leave empty (the\n\t\t * default) to let the menu build the per-widget deep-link itself.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * This surface's own section in the app's documentation, appended to\n\t\t * the app-wide `cnDocumentationBaseUrl`. A bare slug (`open-cases`)\n\t\t * becomes a `#fragment`; a value starting with `/` is resolved as a\n\t\t * path; a full `scheme://` URL is used as written. Supplying it is\n\t\t * what makes the Documentation item land on THIS widget's section\n\t\t * rather than the docs homepage.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdocsAnchor: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether the Documentation item renders. Defaults to true — the\n\t\t * canonical trio is meant to be present on every surface; set false\n\t\t * only where a docs link genuinely cannot exist.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Whether the \"Report a bug\" item renders.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tshowReportBug: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Explicit \"Report a bug\" target. Empty (the default) builds a\n\t\t * new-issue deep-link on the app's forge from the injected\n\t\t * `cnFeatureRequestRepo` + `cnFeatureRequestForge`, pre-filled with\n\t\t * the surface's title.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\treportBugUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Pre-translated label for the Report-a-bug action. */\n\t\treportBugLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Report a bug'),\n\t\t},\n\n\t\t/**\n\t\t * Pre-translated label for the Documentation item. Defaults to the\n\t\t * lib's translation of \"Documentation\".\n\t\t */\n\t\tdocumentationLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Documentation'),\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded on the `@refresh` / `@request-feature`\n\t\t * payloads (as `widgetId`) and on the `cn:widget:refresh`\n\t\t * event-bus payload. The parent resolves it (explicit id or\n\t\t * slugified title).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Human-readable title carried on action payloads.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable `surface` slug naming where the menu sits (e.g.\n\t\t * `widget:<id>`, `detail:<id>`, `dashboard:<id>`). Used as the\n\t\t * English headline fallback for both new-issue deep-links when no\n\t\t * authored title can be recovered.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optional `specRef` slug. Accepted for backward compatibility with\n\t\t * hosts that bound it for the removed in-product suggestion modal;\n\t\t * no longer forwarded anywhere (the forge issue form asks for its\n\t\t * own context).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tspecRef: { // eslint-disable-line vue/no-unused-properties -- published prop kept so hosts that still bind it do not leak it into $attrs\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether a refresh is currently in flight. While true, the Refresh\n\t\t * item is disabled and shows a loading spinner for exactly as long as\n\t\t * this stays true — so the spinner reflects the real refresh time.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\trefreshing: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Event-bus channel the default Refresh handler emits on when no\n\t\t * host listener suppresses it. Widgets use `cn:widget:refresh`;\n\t\t * page surfaces pass `cn:page:refresh`.\n\t\t */\n\t\trefreshChannel: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn:widget:refresh',\n\t\t},\n\n\t\t/** Pre-translated label for the Refresh action. */\n\t\trefreshLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Refresh'),\n\t\t},\n\n\t\t/** Pre-translated label for the Request-a-feature action. */\n\t\trequestFeatureLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Request a feature'),\n\t\t},\n\n\t\t/** Pre-translated aria-label / tooltip for the overflow trigger. */\n\t\tactionsMenuLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Actions'),\n\t\t},\n\n\t\t/**\n\t\t * How the trigger button is drawn: `tertiary` (NcActions' own default,\n\t\t * used when empty), `secondary` for a header that wants a bordered\n\t\t * button, as the board look's \"More\".\n\t\t *\n\t\t * @type {''|'primary'|'secondary'|'tertiary'|'tertiary-no-background'}\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-the-detail-header-buttons-follow-one-order\n\t\t */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Tell the menu that `#primary-items` has content. Only needed by a\n\t\t * host that switches every built-in item off: the menu decides whether\n\t\t * to render at all in a computed, and a slot that fills in later (a\n\t\t * page's actions arrive after mount) is not something a computed\n\t\t * notices. With any built-in item showing, the menu renders anyway\n\t\t * and this changes nothing.\n\t\t */\n\t\thasPrimaryItems: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Prefix for the `data-testid`s emitted on the menu container and\n\t\t * its items: `<base>-actions` (container), `<base>-action-refresh`,\n\t\t * `<base>-action-request-feature`, `<base>-action-report-bug`,\n\t\t * `<base>-action-documentation`.\n\t\t * Lets each host keep its own stable testids.\n\t\t */\n\t\ttestidBase: {\n\t\t\ttype: String,\n\t\t\tdefault: 'cn-actions-menu',\n\t\t},\n\t},\n\n\temits: ['refresh', 'request-feature'],\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Whether the overflow menu is open. */\n\t\t\tmenuOpen: false,\n\t\t\t/** Whether a refresh this menu started is still settling. */\n\t\t\trefreshPending: false,\n\t\t\t/** Close the menu once the host's `refreshing` falls back to false. */\n\t\t\tcloseWhenIdle: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Whether the Refresh item spins: the host's flag or our own pending refresh. */\n\t\trefreshBusy() {\n\t\t\treturn this.refreshing || this.refreshPending\n\t\t},\n\n\t\t/**\n\t\t * Whether the overflow `…` menu renders at all. True when at least\n\t\t * one built-in item is visible OR the caller provided an\n\t\t * `action-items` slot.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasOverflowMenu() {\n\t\t\tif (this.showRefresh) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showDocumentation && this.resolvedDocumentationUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showReportBug && this.resolvedReportBugUrl) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.showRequestFeature) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (this.hasPrimaryItems || this.$slots['primary-items'] || this.$slots['lead-items']) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn Boolean(this.$slots['action-items']) || Boolean(this.$slots && this.$slots['action-items'])\n\t\t},\n\n\t\t/**\n\t\t * The Documentation item's target: the explicit `documentationUrl`\n\t\t * when given, otherwise the app-wide base deep-linked with this\n\t\t * surface's `docsAnchor`.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDocumentationUrl() {\n\t\t\tif (this.documentationUrl) {\n\t\t\t\treturn this.docsAnchor\n\t\t\t\t\t? resolveDocsUrl(this.documentationUrl, this.docsAnchor)\n\t\t\t\t\t: this.documentationUrl\n\t\t\t}\n\t\t\tif (this.cnDocumentationBaseUrl) {\n\t\t\t\treturn resolveDocsUrl(this.cnDocumentationBaseUrl, this.docsAnchor)\n\t\t\t}\n\t\t\t// Last resort so the item is never simply MISSING — an absent\n\t\t\t// Documentation entry is the defect this menu exists to prevent.\n\t\t\t// The fleet's convention is one docs site per app id; an app that\n\t\t\t// hosts its docs elsewhere sets `cnDocumentationBaseUrl` on\n\t\t\t// CnAppRoot, and the warning below says so.\n\t\t\treturn resolveDocsUrl(defaultDocsBase(this.cnAppId), this.docsAnchor)\n\t\t},\n\n\t\t/**\n\t\t * This surface's title AS AUTHORED, for anything that must not be\n\t\t * localized. Asks the injected dashboard resolver for the widget's\n\t\t * manifest source string; '' when nothing can supply one.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsourceTitle() {\n\t\t\tconst resolve = this.cnWidgetTitleSource\n\t\t\tif (typeof resolve !== 'function' || !this.widgetId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\ttry {\n\t\t\t\treturn String(resolve(this.widgetId) || '').trim()\n\t\t\t} catch {\n\t\t\t\t// A host resolver that throws must not take the menu with it —\n\t\t\t\t// the link degrades to the surface slug.\n\t\t\t\treturn ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The Report-a-bug target: the explicit `reportBugUrl` when given,\n\t\t * otherwise a new-issue deep-link on the app's forge, pre-filled with\n\t\t * a title naming the surface the report came from.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedReportBugUrl() {\n\t\t\tif (this.reportBugUrl) {\n\t\t\t\treturn this.reportBugUrl\n\t\t\t}\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// buildBugReportUrl owns both the host (one resolveForge for the\n\t\t\t// whole suggestion flow) and the bug-report issue FORM. This was\n\t\t\t// hand-rolled here against a local copy of the forge host map that\n\t\t\t// defaulted to Codeberg, so a menu mounted without a CnAppRoot sent\n\t\t\t// bug reports to a different host than the Request-a-feature item\n\t\t\t// directly above it — and it linked the BLANK issue form, so every\n\t\t\t// in-product report arrived with no steps, no expected/actual and\n\t\t\t// no severity.\n\t\t\t//\n\t\t\t// The headline must be ENGLISH: the `title` prop is already\n\t\t\t// translated (CnDashboardPage's getWidgetTitle is the display\n\t\t\t// chokepoint), so a report from a French UI read \"[BUG] Activité\n\t\t\t// récente\" and one from a Russian UI was in Cyrillic — unreadable\n\t\t\t// to a maintainer, even though the English msgid was sitting in the\n\t\t\t// manifest. `cnWidgetTitleSource` hands back that manifest string,\n\t\t\t// skipping any user-typed customTitle for the same reason.\n\t\t\t//\n\t\t\t// With no dashboard ancestor to ask, fall back to the surface slug\n\t\t\t// rather than the translated prop: a slug is English by\n\t\t\t// construction, and \"always English\" is the point. The localized\n\t\t\t// title is deliberately not carried in the URL at all — see\n\t\t\t// buildBugReportUrl for why it was dropped.\n\t\t\treturn buildBugReportUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The Request-a-feature target: the forge's feature-request issue\n\t\t * FORM, built exactly like resolvedReportBugUrl — same repo, same\n\t\t * forge, same English-headline rules (see that computed for why the\n\t\t * headline is never the translated title). Empty when no repo can\n\t\t * be resolved, in which case the click handler warns and does\n\t\t * nothing rather than open a broken link.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRequestFeatureUrl() {\n\t\t\tconst repo = String(this.cnFeatureRequestRepo || '').trim()\n\t\t\tif (!repo) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn buildFeatureRequestUrl(this.cnFeatureRequestForge, repo, {\n\t\t\t\ttitle: this.sourceTitle,\n\t\t\t\tsurface: this.surface || this.widgetId,\n\t\t\t})\n\t\t},\n\t},\n\n\twatch: {\n\t\trefreshing(busy) {\n\t\t\tif (!busy && this.closeWhenIdle) {\n\t\t\t\tthis.closeWhenIdle = false\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Refresh click — emits `@refresh`, then runs the built-in default\n\t\t * (emit on `refreshChannel`) unless a host called\n\t\t * `event.preventDefault()` on the second handler arg. The item spins\n\t\t * and the menu stays open until every promise handed to `waitUntil`\n\t\t * (on the event or the bus payload) settles, or 15 s pass, and the\n\t\t * host's `refreshing` is false; then the menu closes.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRefreshClick() {\n\t\t\tif (this.refreshBusy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst work = []\n\t\t\tconst waitUntil = (promise) => {\n\t\t\t\twork.push(Promise.resolve(promise))\n\t\t\t}\n\t\t\tconst ev = createSyntheticEvent(waitUntil)\n\t\t\tthis.refreshPending = true\n\t\t\tconst startedAt = Date.now()\n\t\t\t/**\n\t\t\t * @event refresh User clicked the Refresh item. Payload:\n\t\t\t * `{ widgetId, title }`. Handlers may call the second arg's\n\t\t\t * `preventDefault()` to suppress the built-in default (event-bus\n\t\t\t * emit on `refreshChannel`), and its `waitUntil(promise)` to keep\n\t\t\t * the item spinning until that work settles.\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('refresh', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (!ev.defaultPrevented) {\n\t\t\t\temitOnBus(this.refreshChannel, {\n\t\t\t\t\twidgetId: this.widgetId,\n\t\t\t\t\ttitle: this.title,\n\t\t\t\t\twaitUntil,\n\t\t\t\t})\n\t\t\t}\n\t\t\tlet ceiling\n\t\t\tawait Promise.race([\n\t\t\t\tPromise.allSettled(work),\n\t\t\t\tnew Promise((resolve) => {\n\t\t\t\t\tceiling = setTimeout(resolve, MAX_REFRESH_WAIT_MS)\n\t\t\t\t}),\n\t\t\t])\n\t\t\tclearTimeout(ceiling)\n\t\t\tconst hold = MIN_REFRESH_SPIN_MS - (Date.now() - startedAt)\n\t\t\tif (hold > 0) {\n\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, hold))\n\t\t\t}\n\t\t\tthis.refreshPending = false\n\t\t\tif (this.refreshing) {\n\t\t\t\tthis.closeWhenIdle = true\n\t\t\t} else {\n\t\t\t\tthis.menuOpen = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Request-a-feature click — emits `@request-feature`. The item is a\n\t\t * link to the forge's feature-request form, so the browser opens it\n\t\t * unless a host called `event.preventDefault()`, which then cancels\n\t\t * the link. With no `cnFeatureRequestRepo` the item is a button and\n\t\t * this only warns.\n\t\t *\n\t\t * @param {Event} [nativeEvent] The link's click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRequestFeatureClick(nativeEvent) {\n\t\t\tconst ev = createSyntheticEvent()\n\t\t\t/**\n\t\t\t * @event request-feature User clicked the Request a feature\n\t\t\t * item. Payload: `{ widgetId, title }`. Handlers may call the\n\t\t\t * second arg's `preventDefault()` to suppress the built-in\n\t\t\t * default (opening the forge's feature-request issue form).\n\t\t\t * @type {{ widgetId: string, title: string }}\n\t\t\t */\n\t\t\tthis.$emit('request-feature', { widgetId: this.widgetId, title: this.title }, ev)\n\t\t\tif (ev.defaultPrevented) {\n\t\t\t\tif (nativeEvent && typeof nativeEvent.preventDefault === 'function') {\n\t\t\t\t\tnativeEvent.preventDefault()\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (!this.resolvedRequestFeatureUrl) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnActionsMenu] Cannot open the feature-request form: missing cnFeatureRequestRepo inject (mount under CnAppRoot or bind a custom @request-feature listener).')\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_createBlock","_createTextVNode","_renderSlot","_createVNode"],"mappings":";;;;;;;;;;;;;UAyCiB,QAAU,CAAA,eAAA;;;AAEvB,QAAA,SAAQ,EAAG,IAAI;AACd,QAAA,SAAQ,EAAE,IAAK;gBACR,EAAE,MAAgB,CAAA,gBAAA;QAC1B,OAAO,EAAE,MAAC,CAAA,OAAA,IAAA,SAAA;AACV,QAAA,IAAI,EAAE,KAAQ,CAAA,QAAA;AACd,QAAA,aAAW,KAAI,MAAA,CAAA,UAAA,CAAA,QAAA,CAAA;QACf,eAAW,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,KAAQ,CAAA,QAAA,GAAG,MAAM,CAAA,CAAA;;AACpB,QAAA,IAAI,gBACe;qBAAA,CAAA,yBAAA,EAAA,EAAZ,IAAI,IAAI,EAAA,CAAA;;+BAGA;oBAAA,CAAA,IAAA,CAAA,MAAA,EAAA,YAAA,CAAA;WAGnB,MAAW,CAAA,WAAA;4BADbA,WAWY,CAAA,yBAAA,EAAA;;AATf,gBAAA,aAAW,KAAM,MAAS,CAAA,UAAA,CAAA,eAAA,CAAA;wBAClB,EAAE,Q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,GACX,mBAAG,MAAY,CAAA,mBAAA,CAAA,EAAA,CAAA,YAAA;;;;;AAGT,UAAA,CAAA,MAAA,CAAA,aAAa,IAAI,QAAA,CAAA,oBAAA;;;AACtB,gBAAA,IAAI,EAAE,QAAM,CAAA,oBAAA;AACb,gBAAA,MAAM,EAAC,QAAQ;AACX,gBAAA,kBAAa,MAAU,CAAA,UAAA,CAAA,kBAAA,CAAA;+BACX,EAAE,IAAI;;AACX,gBAAA,IAAE,UACZ,MAAyB;kBAAzBE,WAAyB,CAAA,qBAAA,EAAA,EAAZ,IAAI,EAAE,EAAE,EAAA,CAAA;;iCACb,MACT;AADS,kBAAAF,eAAA,CAAA,GACT,mBAAG,MAAI,CAAA,cAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnAdminSettingsShell.vue2.js';
|
|
|
2
2
|
import { render } from './CnAdminSettingsShell.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-29bf49ca";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -12,15 +12,16 @@ import Refresh from 'vue-material-design-icons/Refresh.vue';
|
|
|
12
12
|
import __sfc_main$1 from '../CnBuildiqEditButton/CnBuildiqEditButton.vue.js';
|
|
13
13
|
import __sfc_main$2 from '../CnCredentials/CnCredentials.vue.js';
|
|
14
14
|
import __sfc_main from '../CnEnvironmentBanner/CnEnvironmentBanner.vue.js';
|
|
15
|
-
import __sfc_main$
|
|
15
|
+
import __sfc_main$5 from '../CnSetupWizard/CnSetupWizard.vue.js';
|
|
16
16
|
import { useEnvironment } from '../../composables/useEnvironment.js';
|
|
17
17
|
import { useLook, normalizeLook } from '../../composables/useLook.js';
|
|
18
18
|
import { ensureTranslations } from '../../l10n/index.js';
|
|
19
19
|
import { buildFeatureRequestUrl } from '../../utils/forge.js';
|
|
20
20
|
import { prefixUrl } from '../../utils/headers.js';
|
|
21
|
-
import __sfc_main$
|
|
22
|
-
import __sfc_main$6 from '../CnTabs/
|
|
23
|
-
import __sfc_main$
|
|
21
|
+
import __sfc_main$3 from '../CnSettingsSection/CnSettingsSection.vue.js';
|
|
22
|
+
import __sfc_main$6 from '../CnTabs/CnTab.vue.js';
|
|
23
|
+
import __sfc_main$7 from '../CnTabs/CnTabs.vue.js';
|
|
24
|
+
import __sfc_main$4 from '../CnVersionInfoCard/CnVersionInfoCard.vue.js';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* The tab the address names.
|
|
@@ -130,10 +131,11 @@ var script = {
|
|
|
130
131
|
BookOpenVariant,
|
|
131
132
|
NcSettingsSection,
|
|
132
133
|
CnCredentials: __sfc_main$2,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
CnSettingsSection: __sfc_main$3,
|
|
135
|
+
CnVersionInfoCard: __sfc_main$4,
|
|
136
|
+
CnSetupWizard: __sfc_main$5,
|
|
137
|
+
CnTab: __sfc_main$6,
|
|
138
|
+
CnTabs: __sfc_main$7,
|
|
137
139
|
NcButton,
|
|
138
140
|
NcLoadingIcon,
|
|
139
141
|
Refresh,
|
|
@@ -419,6 +421,19 @@ var script = {
|
|
|
419
421
|
default: true,
|
|
420
422
|
},
|
|
421
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Where the support lines go: `card`, in the version card's footer (the
|
|
426
|
+
* default), or `end`, as their own wide card after everything else on
|
|
427
|
+
* the first tab (board PqBeheer).
|
|
428
|
+
*
|
|
429
|
+
* @spec openspec/changes/admin-shell-support-end/specs/settings-board-look/spec.md#requirement-support-can-be-its-own-card-at-the-end
|
|
430
|
+
*/
|
|
431
|
+
supportPosition: {
|
|
432
|
+
type: String,
|
|
433
|
+
default: 'card',
|
|
434
|
+
validator: (value) => ['card', 'end'].includes(value),
|
|
435
|
+
},
|
|
436
|
+
|
|
422
437
|
/** Support contact email. */
|
|
423
438
|
supportEmail: {
|
|
424
439
|
type: String,
|
|
@@ -526,6 +541,11 @@ var script = {
|
|
|
526
541
|
return this.versionCardPosition === 'end'
|
|
527
542
|
},
|
|
528
543
|
|
|
544
|
+
/** @return {boolean} Whether the support lines are their own card at the end. */
|
|
545
|
+
supportAtEnd() {
|
|
546
|
+
return this.supportPosition === 'end'
|
|
547
|
+
},
|
|
548
|
+
|
|
529
549
|
/**
|
|
530
550
|
* The crumbs that have a label.
|
|
531
551
|
*
|