@conduction/nextcloud-vue 2.80.0 → 2.81.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/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +3 -3
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +80 -4
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +95 -91
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js +140 -10
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js +52 -16
- package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +17 -3
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +63 -52
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue.js +10 -0
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue.js.map +1 -0
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue2.js +252 -0
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue3.js +140 -0
- package/dist/esm/components/CnChipsFieldWidget/CnChipsFieldWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnChipsFieldWidget/index.js +26 -0
- package/dist/esm/components/CnChipsFieldWidget/index.js.map +1 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue.js +10 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue.js.map +1 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue2.js +354 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue3.js +172 -0
- package/dist/esm/components/CnChoicePickerWidget/CnChoicePickerWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnChoicePickerWidget/index.js +27 -0
- package/dist/esm/components/CnChoicePickerWidget/index.js.map +1 -0
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +2 -2
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +65 -5
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +19 -11
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +3 -2
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +72 -0
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +21 -4
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDocumentReviewList/CnDocumentReviewWidget.vue2.js +1 -1
- package/dist/esm/components/CnDocumentReviewList/CnDocumentReviewWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnDocumentReviewList/CnDocumentReviewWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFacetSidebar/CnFacetSidebar.vue2.js +7 -7
- package/dist/esm/components/CnFacetSidebar/CnFacetSidebar.vue2.js.map +1 -1
- package/dist/esm/components/CnFacetSidebar/CnFacetSidebar.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +131 -0
- 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/CnFieldListWidget/CnFieldListWidget.vue2.js +80 -5
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +282 -69
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +302 -4
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +417 -244
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js +101 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +141 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
- package/dist/esm/components/CnFormPage/CnFormPage.vue2.js +60 -0
- package/dist/esm/components/CnFormPage/CnFormPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFormPage/CnFormPage.vue3.js +74 -49
- package/dist/esm/components/CnFormPage/CnFormPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +29 -2
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +48 -4
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +7 -7
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
- package/dist/esm/components/CnNextStepCard/CnNextStepWidget.vue2.js +1 -1
- package/dist/esm/components/CnNextStepCard/CnNextStepWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +65 -2
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +6 -2
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +63 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +8 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +14 -0
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js +5 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue.js +10 -0
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue2.js +174 -0
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue3.js +75 -0
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnRadioCardsWidget/index.js +28 -0
- package/dist/esm/components/CnRadioCardsWidget/index.js.map +1 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +30 -6
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +34 -25
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue.js +10 -0
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue2.js +222 -0
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue3.js +64 -0
- package/dist/esm/components/CnSavedViewsWidget/CnSavedViewsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnSavedViewsWidget/index.js +30 -0
- package/dist/esm/components/CnSavedViewsWidget/index.js.map +1 -0
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue2.js.map +1 -1
- package/dist/esm/components/CnSegmentedControl/CnSegmentedControl.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue.js +10 -0
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue.js.map +1 -0
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue2.js +347 -0
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue3.js +184 -0
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnSettingsFormWidget/index.js +27 -0
- package/dist/esm/components/CnSettingsFormWidget/index.js.map +1 -0
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +87 -6
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js +84 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js +85 -41
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue.js +10 -0
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue2.js +159 -0
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue3.js +60 -0
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnSwitchRowsWidget/index.js +26 -0
- package/dist/esm/components/CnSwitchRowsWidget/index.js.map +1 -0
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +47 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js +16 -14
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +80 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +75 -32
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js +10 -0
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js.map +1 -0
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js +269 -0
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js +106 -0
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnToggleTableWidget/index.js +27 -0
- package/dist/esm/components/CnToggleTableWidget/index.js.map +1 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +7 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +7 -2
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/dashboardRegistration.js +5 -0
- package/dist/esm/components/CnWidgetObjectTable/dashboardRegistration.js.map +1 -1
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue2.js +197 -6
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue3.js +96 -50
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue3.js.map +1 -1
- package/dist/esm/composables/useListView.js +4 -4
- package/dist/esm/composables/useListView.js.map +1 -1
- package/dist/esm/index.js +17 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +9 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +55 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +1041 -12
- package/dist/esm/utils/contentHeaderLink.js +51 -0
- package/dist/esm/utils/contentHeaderLink.js.map +1 -0
- package/dist/esm/utils/facets.js +75 -3
- package/dist/esm/utils/facets.js.map +1 -1
- package/dist/esm/utils/fetchFilterCounts.js +40 -5
- package/dist/esm/utils/fetchFilterCounts.js.map +1 -1
- package/dist/esm/utils/fillTemplate.js +7 -1
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/esm/utils/initials.js +32 -0
- package/dist/esm/utils/initials.js.map +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js +7 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/objectWrite.js +59 -0
- package/dist/esm/utils/objectWrite.js.map +1 -0
- package/dist/esm/utils/pageControls.js +81 -0
- package/dist/esm/utils/pageControls.js.map +1 -0
- package/dist/esm/utils/personalLenses.js +40 -3
- package/dist/esm/utils/personalLenses.js.map +1 -1
- package/dist/esm/utils/resolveFilterTokens.js +1 -1
- package/dist/esm/utils/resolveFilterTokens.js.map +1 -1
- package/dist/esm/utils/resolveManifestTokens.js +2 -0
- package/dist/esm/utils/resolveManifestTokens.js.map +1 -1
- package/dist/esm/utils/sentinelTokens.js +19 -1
- package/dist/esm/utils/sentinelTokens.js.map +1 -1
- package/dist/esm/utils/userGroupsPeek.js +91 -0
- package/dist/esm/utils/userGroupsPeek.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/esm/utils/visibleWhen.js +57 -5
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/esm/utils/widgetDispatch.js +1 -1
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/esm/utils/widgetVisibility.js +4 -57
- package/dist/esm/utils/widgetVisibility.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +13589 -7833
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1041 -12
- package/l10n/en.json +9 -1
- package/l10n/nl.json +55 -1
- package/package.json +2 -1
- package/scripts/check-docs-mdx.mjs +108 -0
- package/src/components/CnActionsBar/CnActionsBar.vue +6 -1
- package/src/components/CnAppRoot/CnAppRoot.md +4 -2
- package/src/components/CnAppRoot/CnAppRoot.vue +151 -59
- package/src/components/CnBannerWidget/CnBannerWidget.vue +205 -20
- package/src/components/CnCellRenderer/CnCellRenderer.md +2 -0
- package/src/components/CnCellRenderer/CnCellRenderer.vue +47 -4
- package/src/components/CnChipsFieldWidget/CnChipsFieldWidget.vue +433 -0
- package/src/components/CnChipsFieldWidget/index.js +25 -0
- package/src/components/CnChoicePickerWidget/CnChoicePickerWidget.vue +556 -0
- package/src/components/CnChoicePickerWidget/index.js +26 -0
- package/src/components/CnConversationThread/CnConversationWidget.vue +1 -1
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +2 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +78 -5
- package/src/components/CnDataTable/CnDataTable.vue +21 -12
- package/src/components/CnDetailPage/CnDetailPage.vue +89 -3
- package/src/components/CnDocumentReviewList/CnDocumentReviewWidget.vue +1 -1
- package/src/components/CnFacetSidebar/CnFacetSidebar.vue +7 -7
- package/src/components/CnFactsWidget/CnFactsWidget.vue +142 -2
- package/src/components/CnFieldListWidget/CnFieldListWidget.vue +268 -6
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +588 -117
- package/src/components/CnFilesBrowser/filesBrowser.js +100 -0
- package/src/components/CnFilesBrowser/filesBrowserColumns.js +140 -0
- package/src/components/CnFormPage/CnFormPage.vue +81 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +56 -4
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +7 -7
- package/src/components/CnNextStepCard/CnNextStepWidget.vue +1 -1
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +69 -2
- package/src/components/CnObjectSidebar/CnFilesTab.vue +70 -1
- package/src/components/CnObjectSidebar/CnNotesTab.vue +16 -0
- package/src/components/CnRadioCardsWidget/CnRadioCardsWidget.vue +313 -0
- package/src/components/CnRadioCardsWidget/index.js +27 -0
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +55 -6
- package/src/components/CnSavedViewsWidget/CnSavedViewsWidget.vue +296 -0
- package/src/components/CnSavedViewsWidget/index.js +29 -0
- package/src/components/CnSegmentedControl/CnSegmentedControl.vue +13 -0
- package/src/components/CnSettingsFormWidget/CnSettingsFormWidget.vue +555 -0
- package/src/components/CnSettingsFormWidget/index.js +26 -0
- package/src/components/CnStatWidget/CnStatWidget.vue +87 -6
- package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +180 -3
- package/src/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue +226 -0
- package/src/components/CnSwitchRowsWidget/index.js +25 -0
- package/src/components/CnTabsWidget/CnTabsWidget.vue +82 -3
- package/src/components/CnTasksWidget/CnTasksWidget.vue +175 -15
- package/src/components/CnToggleTableWidget/CnToggleTableWidget.vue +386 -0
- package/src/components/CnToggleTableWidget/index.js +26 -0
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +7 -0
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +7 -2
- package/src/components/CnWidgetObjectTable/dashboardRegistration.js +5 -0
- package/src/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue +309 -11
- package/src/components/index.js +15 -0
- package/src/composables/useListView.js +4 -4
- package/src/css/look-board-detail.css +36 -2
- package/src/css/look-board-index.css +39 -8
- package/src/css/look-board.css +72 -0
- package/src/index.js +15 -0
- package/src/schemas/app-manifest-v2.schema.json +93 -9
- package/src/utils/contentHeaderLink.js +48 -0
- package/src/utils/facets.js +74 -2
- package/src/utils/fetchFilterCounts.js +39 -4
- package/src/utils/fillTemplate.js +7 -1
- package/src/utils/initials.js +29 -0
- package/src/utils/libraryWidgetKeys.js +7 -0
- package/src/utils/objectWrite.js +55 -0
- package/src/utils/pageControls.js +78 -0
- package/src/utils/personalLenses.js +39 -2
- package/src/utils/resolveFilterTokens.js +3 -1
- package/src/utils/resolveManifestTokens.js +2 -0
- package/src/utils/sentinelTokens.js +19 -1
- package/src/utils/userGroupsPeek.js +87 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/visibleWhen.js +56 -4
- package/src/utils/widgetDispatch.js +1 -1
- package/src/utils/widgetVisibility.js +7 -56
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnTabsWidget.vue3.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue?vue&type=template&id=1dbd6122&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-tabs-widget\">\n\t\t<CnTabs\n\t\t\t:aria-label=\"stripLabel\"\n\t\t\t:moreLabel=\"moreLabel\"\n\t\t\t:variant=\"stripVariant\"\n\t\t\tclass=\"cn-tabs-widget__tabs\"\n\t\t\t@update:activeIndex=\"onTabChange\">\n\t\t\t<!-- One Actions menu for the whole widget, bound to whichever child\n\t\t\t is showing. This is the point of the component: six tabbed\n\t\t\t widgets used to mean six card headers stacked down the page. -->\n\t\t\t<template #nav-end>\n\t\t\t\t<CnActionsMenu\n\t\t\t\t\t:showRefresh=\"showRefresh\"\n\t\t\t\t\t:showRequestFeature=\"showRequestFeature\"\n\t\t\t\t\t:showDocumentation=\"showDocumentation\"\n\t\t\t\t\t:documentationUrl=\"documentationUrl\"\n\t\t\t\t\t:widgetId=\"activeWidgetId\"\n\t\t\t\t\t:title=\"activeTitle\"\n\t\t\t\t\t:variant=\"isBoard ? 'secondary' : undefined\"\n\t\t\t\t\t:surface=\"`widget:${activeWidgetId}`\"\n\t\t\t\t\trefreshChannel=\"cn:widget:refresh\"\n\t\t\t\t\ttestidBase=\"cn-tabs-widget\">\n\t\t\t\t\t<!-- The open panel's own items, below the built-in trio.\n\t\t\t\t\t A panel draws no header, so these would otherwise have\n\t\t\t\t\t nowhere to go: the data widget's Metadata and full edit\n\t\t\t\t\t dialog vanished outright when the panel stopped drawing\n\t\t\t\t\t a card. They are rendered here rather than rebuilt here\n\t\t\t\t\t because `run` closes over the widget that published it,\n\t\t\t\t\t which is what keeps the dialog's per-widget config and\n\t\t\t\t\t the widget's own save path. See utils/panelActions.js.\n\n\t\t\t\t\t Only the ACTIVE panel's items. `lazy` keeps a visited\n\t\t\t\t\t tab mounted, so several panels publish at once and an\n\t\t\t\t\t unfiltered list would offer actions for a sheet nobody\n\t\t\t\t\t is looking at. -->\n\t\t\t\t\t<template v-if=\"activePanelActions.length\" #action-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"action in activePanelActions\"\n\t\t\t\t\t\t\t:key=\"action.key\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"action.run()\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ action.label }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\t\t\t\t</CnActionsMenu>\n\t\t\t</template>\n\n\t\t\t<CnTab\n\t\t\t\tv-for=\"(entry, index) in resolvedTabs\"\n\t\t\t\t:key=\"entry.key\"\n\t\t\t\t:active=\"index === activeIndex\"\n\t\t\t\t:title=\"entry.label\"\n\t\t\t\t:count=\"entry.count\"\n\t\t\t\t:overflow=\"entry.overflow\"\n\t\t\t\t:disabled=\"entry.pending\"\n\t\t\t\tlazy\n\t\t\t\t@click=\"activeIndex = index\">\n\t\t\t\t<template #title>\n\t\t\t\t\t<span class=\"cn-tabs-widget__title\">\n\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\tv-if=\"entry.icon && !isBoard\"\n\t\t\t\t\t\t\t:name=\"entry.icon\"\n\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\tclass=\"cn-tabs-widget__title-icon\" />\n\t\t\t\t\t\t{{ entry.label }}\n\t\t\t\t\t\t<NcLoadingIcon\n\t\t\t\t\t\t\tv-if=\"entry.pending\"\n\t\t\t\t\t\t\t:size=\"14\"\n\t\t\t\t\t\t\t:name=\"loadingLabel\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-pending\" />\n\t\t\t\t\t</span>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- A stack (`widgetIds`): every widget is a titled card; the\n\t\t\t\t first joins the open tab, the next ones stand below it. -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"entry.widget && entry.stack.length\"\n\t\t\t\t\tclass=\"cn-tabs-widget__stack\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-stack\">\n\t\t\t\t\t<div class=\"cn-tabs-widget__stack-first\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"child in entry.stack\"\n\t\t\t\t\t\t:key=\"`${entry.key}-${child.id}`\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__stack-item\"\n\t\t\t\t\t\t:data-testid=\"`cn-tabs-widget-stack-${child.id}`\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"child\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\tv-else-if=\"entry.widget\"\n\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t<CnEmptyContent v-else :name=\"missingLabel(entry)\" />\n\t\t\t</CnTab>\n\t\t</CnTabs>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcLoadingIcon } from '@nextcloud/vue'\nimport CnDetailWidgetHost from '../CnDetailWidgetHost/CnDetailWidgetHost.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnTab from '../CnTabs/CnTab.vue'\nimport CnTabs from '../CnTabs/CnTabs.vue'\nimport { normalizeLook } from '../../composables/useLook.js'\nimport { resolveTabCount } from '../../utils/detailActionModel.js'\nimport { fetchListTotal } from '../../utils/fetchFilterCounts.js'\nimport { isActivityWidget } from '../../utils/headerMeta.js'\nimport { PANEL_ACTION_SINK } from '../../utils/panelActions.js'\nimport { evaluateVisibleWhen, evaluateVisibleWhenLocal, isLocallyDecidableVisibleWhen } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.js'\nimport { CnActionsMenu } from '../CnActionsMenu/index.js'\n\n/**\n * CnTabsWidget — a widget that holds other widgets, one per tab.\n *\n * A detail page that carries notes, files, related records, sub-records, mail\n * and appointments renders six cards, each with its own header and its own\n * Actions menu, stacked down the page. All six say roughly the same thing about\n * one record, and only one of them is being read at a time. This widget puts\n * them behind a tab strip instead.\n *\n * ## What the tabs take over\n *\n * The strip owns the title and the card. A child renders through\n * `CnDetailWidgetHost` with `chrome=\"bare\"`, so it draws no header and no\n * border of its own, and its content fills the panel exactly as it would have\n * filled its card. The tab label is what the widget's card header used to say.\n *\n * The Actions menu moves OUT of the panels and into the bar, beside the strip\n * rather than inside it, and rebinds to whichever child is showing. So there is\n * one menu, and it always acts on what you are looking at.\n *\n * ## Configuring it\n *\n * `content.tabs[]` names the children and their labels, so a deployment can\n * relabel or reorder tabs, or drop one, without touching code:\n *\n * ```js\n * content: {\n * tabs: [\n * { widgetId: 'case-notes', label: 'Notes', icon: 'NoteTextOutline' },\n * { widgetId: 'case-files', label: 'Files and attachments' },\n * ],\n * }\n * ```\n *\n * `label` and `icon` are optional and fall back to the child widget's own\n * title and icon, so the common case is a list of `widgetId`s.\n *\n * ## Panels are lazy, and stay mounted\n *\n * Each panel is a `CnTab` with `lazy`, so a child only mounts when its tab is\n * first opened. Six eager panels that each fetch on `mounted()` would fire six\n * requests on page load to answer five questions nobody asked. Once opened, a\n * panel stays mounted, so switching back never refetches.\n *\n * ## A named tab whose widget is missing\n *\n * The tab still renders, and its panel says which widget id did not resolve.\n * Dropping the tab would be worse: `content.tabs[]` is hand-authored config,\n * and a typo that silently removes a tab is a typo nobody finds.\n */\nexport default {\n\tname: 'CnTabsWidget',\n\n\tcomponents: {\n\t\tCnActionsMenu,\n\t\tCnDetailWidgetHost,\n\t\tCnIcon,\n\t\tCnTab,\n\t\tCnTabs,\n\t\tNcActionButton,\n\t\tCnEmptyContent,\n\t\tNcLoadingIcon,\n\t},\n\n\t/**\n\t * Offer the panels a way to put their own menu items in the strip's menu.\n\t *\n\t * Re-provided one level down by `CnDetailWidgetHost`, which knows the id to\n\t * key by; see utils/panelActions.js for why the items travel up instead of\n\t * being rebuilt here.\n\t *\n\t * @return {object} The provided sink.\n\t */\n\tprovide() {\n\t\treturn {\n\t\t\t[PANEL_ACTION_SINK]: {\n\t\t\t\t/**\n\t\t\t\t * Publish a panel's items, under one SOURCE.\n\t\t\t\t *\n\t\t\t\t * A panel has two possible publishers: the host, for an action\n\t\t\t\t * the host itself would have drawn (the catalog Add), and the\n\t\t\t\t * widget inside it, for its own menu items. Keyed by source so\n\t\t\t\t * the two coexist; a single slot per widget meant whichever\n\t\t\t\t * published last silently replaced the other.\n\t\t\t\t *\n\t\t\t\t * Replaces the map rather than mutating it so the computed that\n\t\t\t\t * reads it re-evaluates on any change.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {object[]} items Its PanelAction descriptors.\n\t\t\t\t * @param {string} [source] Who is publishing: `host` or `widget`.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tset: (id, items, source = 'widget') => {\n\t\t\t\t\t// `activePanelActions` spreads what is stored, so a\n\t\t\t\t\t// non-array becomes one menu item per character.\n\t\t\t\t\tif (!id || !Array.isArray(items)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst forId = { ...(this.panelActionsByWidget[id] || {}), [source]: items }\n\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: forId }\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Withdraw one source's items, on unmount or when that\n\t\t\t\t * publisher's own menu comes back. The other source's items\n\t\t\t\t * stay.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {string} [source] Who is withdrawing.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tclear: (id, source = 'widget') => {\n\t\t\t\t\tconst forId = this.panelActionsByWidget[id]\n\t\t\t\t\tif (!forId || !(source in forId)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [source]: _removed, ...keptSources } = forId\n\t\t\t\t\tif (Object.keys(keptSources).length) {\n\t\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: keptSources }\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [id]: _gone, ...rest } = this.panelActionsByWidget\n\t\t\t\t\tthis.panelActionsByWidget = rest\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t},\n\n\tinject: {\n\t\t/** The app's look, provided by CnAppRoot or CnPageRenderer (`nextcloud` or `board`). */\n\t\tcnLook: { default: 'nextcloud' },\n\t\t/** The tab list's name under the board look, provided by CnDetailPage (`config.tabsLabel`). */\n\t\tcnDetailTabsLabel: { default: null },\n\t\t/**\n\t\t * The host's translate (CnAppRoot provides `cnTranslate`), so a tab\n\t\t * label written in the manifest reads in the user's language.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's config: `{ tabs, ariaLabel }`.\n\t\t *\n\t\t * `tabs[]` entries are `{ widgetId, label?, icon?, count?, countField?, overflow? }`.\n\t\t * `label` and `icon` fall back to the referenced widget's own title and\n\t\t * icon. `count` is a number shown after the label; `countField` reads\n\t\t * it off the record instead (a list counts its items). `countFrom`\n\t\t * counts a list on the server: `\"widget\"` counts the child widget's\n\t\t * own list (`content.register`, `schema`, `filter`, tokens such as\n\t\t * `@objectId` resolved), an object `{ register, schema, filter? }`\n\t\t * names the list; `count` and `countField` win over it. `overflow: true`\n\t\t * lists the tab under \"More\".\n\t\t *\n\t\t * `maxVisibleTabs` caps the strip: later tabs go under \"More\".\n\t\t * `hideEmpty: true` moves a tab whose count is 0 there too.\n\t\t * `moreLabel` names that menu. `variant: \"segmented\"` draws the strip\n\t\t * as a pill switch (CnTabs' segmented variant); `line` is the default.\n\t\t *\n\t\t * @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}), overflow?: boolean}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Every widget definition available on the surface, for `content.tabs[]`\n\t\t * to reference by id.\n\t\t *\n\t\t * The surface passes its whole list rather than the resolved children\n\t\t * because a tab may name a widget that does not exist, and this component\n\t\t * has to be able to say so.\n\t\t *\n\t\t * @type {object[]}\n\t\t */\n\t\tavailableWidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The bound record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The loaded record, or null while it is still being fetched. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The resolved object-type slug. */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The resolved JSON Schema object, needed by a `data` child. */\n\t\tschemaObject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** OpenRegister register slug of the surface. */\n\t\tregister: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** OpenRegister schema slug of the surface. */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The effective object store. */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Rendering surface forwarded to integration children (AD-19). */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'detail-page',\n\t\t},\n\n\t\t/** Object context forwarded to integration children. */\n\t\tintegrationContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The consumer's component registry, for custom child widget types. */\n\t\tcnRegistry: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Show the Refresh entry in the hoisted Actions menu. */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Request-a-feature entry in the hoisted Actions menu. */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Documentation entry in the hoisted Actions menu. */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Documentation URL for the hoisted Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['geo-saved', 'open-integration', 'select-object'],\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveIndex: 0,\n\t\t\t// Key of the tab showing, so it stays the active one when a tab\n\t\t\t// before it appears or disappears.\n\t\t\tactiveKey: '',\n\t\t\t// Result of each tab's SOURCE-mode `visibleWhen`, by the tab's index\n\t\t\t// in `content.tabs`. A missing entry means the count is pending.\n\t\t\tsourceVisibility: {},\n\t\t\t// Bumped per evaluation round, so a slow answer from an earlier round is dropped.\n\t\t\tvisibilitySeq: 0,\n\t\t\t// Totals counted for tabs with `countFrom`, by position in `content.tabs`.\n\t\t\twidgetCounts: {},\n\t\t\tcountSeq: 0,\n\t\t\t// Tab id named by the route hash that has not appeared yet (still pending).\n\t\t\thashTargetId: '',\n\t\t\t// Items published by the panels, keyed by widget id. Keyed rather\n\t\t\t// than a flat list because `lazy` keeps a visited tab mounted, so\n\t\t\t// more than one panel publishes at a time.\n\t\t\tpanelActionsByWidget: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The open panel's own menu items, or an empty list.\n\t\t *\n\t\t * @return {object[]} PanelAction descriptors for the active tab.\n\t\t */\n\t\tactivePanelActions() {\n\t\t\tconst forId = this.panelActionsByWidget[this.activeWidgetId]\n\t\t\tif (!forId) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\t// Host first, then the widget's own: the catalog Add is about the\n\t\t\t// panel as a whole, the widget's items about what is in it.\n\t\t\treturn [...(forId.host || []), ...(forId.widget || [])]\n\t\t},\n\n\t\t/**\n\t\t * The configured tabs, each paired with the widget definition it names.\n\t\t *\n\t\t * A tab goes under the strip's \"More\" menu when it says `overflow`, when\n\t\t * `content.hideEmpty` is set and its count is 0, or when\n\t\t * `content.maxVisibleTabs` places are already taken. `count` is a\n\t\t * literal, or read off the record through `countField`.\n\t\t *\n\t\t * @return {object[]} `{ key, widgetId, label, icon, widget, count, overflow }` per tab.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tresolvedTabs() {\n\t\t\tconst authored = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\t// The board look: the activity is the History tab and the last tab,\n\t\t\t// whatever its place in the manifest. `index` stays the position in\n\t\t\t// `content.tabs`, which the source-mode conditions are keyed on.\n\t\t\tconst isActivityTab = (tab) => {\n\t\t\t\tconst id = this.tabWidgetIds(tab)[0]\n\t\t\t\treturn isActivityWidget(this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t}\n\t\t\tconst ordered = authored.map((tab, index) => ({ tab, index }))\n\t\t\tif (this.isBoard) {\n\t\t\t\tordered.sort((a, b) => (Number(isActivityTab(a.tab)) - Number(isActivityTab(b.tab))) || (a.index - b.index))\n\t\t\t}\n\t\t\tconst tabs = ordered.map(({ tab }) => tab)\n\t\t\tconst originalIndex = ordered.map(({ index }) => index)\n\t\t\tconst max = Number(this.content?.maxVisibleTabs)\n\t\t\tconst hideEmpty = this.content?.hideEmpty === true\n\t\t\t// How many tabs have taken a place in the strip so far. A tab that\n\t\t\t// is already going under \"More\" does not use one up.\n\t\t\tlet placed = 0\n\t\t\tconst resolved = []\n\t\t\ttabs.forEach((tab, position) => {\n\t\t\t\tconst index = originalIndex[position]\n\t\t\t\t// A tab whose condition is false is absent, not empty.\n\t\t\t\tconst visibility = this.tabVisibility(tab, index)\n\t\t\t\tif (visibility === 'hidden') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// A stack (`widgetIds`) resolves every id; one that names no\n\t\t\t\t// widget is skipped. The first that resolves is the panel's.\n\t\t\t\tconst ids = this.tabWidgetIds(tab)\n\t\t\t\tconst widgets = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null).filter(Boolean)\n\t\t\t\t\t: []\n\t\t\t\tconst widget = ids.length > 1\n\t\t\t\t\t? (widgets[0] || null)\n\t\t\t\t\t: (this.availableWidgets.find((w) => w && w.id === ids[0]) || null)\n\t\t\t\tconst widgetId = widget ? widget.id : ids[0]\n\t\t\t\tconst declared = resolveTabCount(typeof tab === 'object' ? tab : null, this.objectData)\n\t\t\t\tconst counted = this.widgetCounts[index]\n\t\t\t\tconst count = declared === null && typeof counted === 'number' ? counted : declared\n\t\t\t\t// The board strip has no \"More\": every tab is in the strip.\n\t\t\t\tlet overflow = !this.isBoard && ((tab && tab.overflow === true) || (hideEmpty && count === 0))\n\t\t\t\tif (!overflow && !this.isBoard) {\n\t\t\t\t\tif (Number.isFinite(max) && max > 0 && placed >= max) {\n\t\t\t\t\t\toverflow = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaced += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresolved.push({\n\t\t\t\t\tkey: `${widgetId || 'tab'}-${index}`,\n\t\t\t\t\tid: (tab && typeof tab === 'object' && tab.id) || widgetId || '',\n\t\t\t\t\twidgetId,\n\t\t\t\t\tlabel: this.tabLabel(tab, widget, widgetId),\n\t\t\t\t\ticon: (tab && tab.icon) || widget?.icon || '',\n\t\t\t\t\twidget,\n\t\t\t\t\tstack: widgets.slice(1),\n\t\t\t\t\tcount,\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\n\t\t},\n\n\t\t/** @return {string} The keys of the tabs in the strip, to notice one appearing or going. */\n\t\tvisibleKeys() {\n\t\t\treturn this.resolvedTabs.map((tab) => tab.key).join('|')\n\t\t},\n\n\t\t/** @return {string} Accessible name of a pending tab's spinner. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/**\n\t\t * The lists the tabs count (`countFrom`), serialised, to count again\n\t\t * when they change.\n\t\t *\n\t\t * @return {string} The key.\n\t\t */\n\t\tcountSourcesKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => this.countSourceOf(tab)))\n\t\t},\n\n\t\t/** @return {string} The source-mode conditions, serialised, to re-evaluate when they change. */\n\t\tsourceConditionsKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => (tab && typeof tab === 'object' && tab.visibleWhen && !isLocallyDecidableVisibleWhen(tab.visibleWhen)) ? tab.visibleWhen : null))\n\t\t},\n\n\t\t/**\n\t\t * Name of the menu that holds the tabs that are not in the strip.\n\t\t *\n\t\t * @return {string|undefined} The configured label, or undefined for the default.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tmoreLabel() {\n\t\t\tconst label = this.content?.moreLabel\n\t\t\treturn typeof label === 'string' && label !== '' ? label : undefined\n\t\t},\n\n\t\t/**\n\t\t * The tab currently showing.\n\t\t *\n\t\t * @return {object|null} The resolved tab, or null when there are none.\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.resolvedTabs[this.activeIndex] || null\n\t\t},\n\n\t\t/**\n\t\t * The active child's id, so the hoisted Refresh reaches THAT child's\n\t\t * fetch over `cn:widget:refresh` rather than a sibling's.\n\t\t *\n\t\t * @return {string} The active widget id.\n\t\t */\n\t\tactiveWidgetId() {\n\t\t\treturn this.activeTab?.widgetId || ''\n\t\t},\n\n\t\t/**\n\t\t * The active child's label, so the Actions menu names what it acts on.\n\t\t *\n\t\t * @return {string} The active tab's label.\n\t\t */\n\t\tactiveTitle() {\n\t\t\treturn this.activeTab?.label || ''\n\t\t},\n\n\t\t/**\n\t\t * The strip's look: `segmented` when the content asks for it, else\n\t\t * CnTabs' default `line`. An unknown value falls back to `line`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-tabs-widget-renders-a-segmented-strip\n\t\t * @return {('line'|'segmented')} The CnTabs variant.\n\t\t */\n\t\tstripVariant() {\n\t\t\treturn this.content?.variant === 'segmented' ? 'segmented' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * Accessible name for the tab strip.\n\t\t *\n\t\t * @return {string} The aria-label.\n\t\t */\n\t\tstripLabel() {\n\t\t\tconst named = this.isBoard && this.cnDetailTabsLabel ? this.cnDetailTabsLabel.value : ''\n\t\t\treturn this.content?.ariaLabel || named || t('nextcloud-vue', 'Details')\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip is drawn in the board look.\n\t\t *\n\t\t * @return {boolean} True in the board look.\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-folder-tabs-take-the-board-strip\n\t\t */\n\t\tisBoard() {\n\t\t\treturn normalizeLook(this.cnLook) === 'board'\n\t\t},\n\t},\n\n\twatch: {\n\t\tactiveIndex(index) {\n\t\t\tthis.activeKey = this.resolvedTabs[index]?.key || ''\n\t\t},\n\n\t\t// A tab appeared or went. Keep the same tab active; when it is the active\n\t\t// tab that went, the first visible one takes over and the hash follows.\n\t\tvisibleKeys() {\n\t\t\tif (this.hashTargetId !== '') {\n\t\t\t\tconst arrived = this.resolvedTabs.findIndex((tab) => tab.id === this.hashTargetId && !tab.pending)\n\t\t\t\tif (arrived >= 0) {\n\t\t\t\t\tthis.activeIndex = arrived\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this.resolvedTabs.some((tab) => tab.id === this.hashTargetId)) {\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst stay = this.resolvedTabs.findIndex((tab) => tab.key === this.activeKey)\n\t\t\tif (stay >= 0) {\n\t\t\t\tif (stay !== this.activeIndex) {\n\t\t\t\t\tthis.activeIndex = stay\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tthis.activeIndex = first >= 0 ? first : 0\n\t\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\t\tthis.syncHash()\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.sourceVisibility = {}\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.widgetCounts = {}\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tcountSourcesKey() {\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tsourceConditionsKey() {\n\t\t\tthis.refreshSourceVisibility()\n\t\t},\n\t},\n\n\t/**\n\t * Open on the first tab that is in the strip. Tab 0 is the default, and\n\t * when tab 0 sits under \"More\" the strip would open on a tab the author\n\t * chose to tuck away.\n\t *\n\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t */\n\tcreated() {\n\t\t// A route hash naming a tab opens that tab. One naming a hidden tab is\n\t\t// ignored, without an error; one naming a tab still pending is honoured\n\t\t// once its condition answers.\n\t\tconst wanted = this.currentHash()\n\t\tconst named = wanted === '' ? -1 : this.resolvedTabs.findIndex((tab) => tab.id === wanted)\n\t\tif (named >= 0 && !this.resolvedTabs[named].pending) {\n\t\t\tthis.activeIndex = named\n\t\t} else {\n\t\t\tif (named >= 0) {\n\t\t\t\tthis.hashTargetId = wanted\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = first >= 0 ? first : this.resolvedTabs.findIndex((tab) => !tab.overflow)\n\t\t\tif (fallback > 0) {\n\t\t\t\tthis.activeIndex = fallback\n\t\t\t}\n\t\t}\n\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\tthis.refreshSourceVisibility()\n\t\tthis.refreshWidgetCounts()\n\t},\n\n\tmounted() {\n\t\tthis._onRefresh = () => {\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.refreshWidgetCounts()\n\t\t}\n\t\tsubscribe('cn:page:refresh', this._onRefresh)\n\t\tsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The widget ids a tab names: `widgetIds` (a stack) when it holds at\n\t\t * least one id, else `widgetId`, or the bare string.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {string[]} The ids, at least one entry (possibly undefined).\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-a-tab-can-hold-a-stack-of-widgets\n\t\t */\n\t\ttabWidgetIds(tab) {\n\t\t\tif (typeof tab === 'string') {\n\t\t\t\treturn [tab]\n\t\t\t}\n\t\t\tif (tab && Array.isArray(tab.widgetIds)) {\n\t\t\t\tconst ids = tab.widgetIds.filter((id) => typeof id === 'string' && id !== '')\n\t\t\t\tif (ids.length) {\n\t\t\t\t\treturn ids\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [tab?.widgetId]\n\t\t},\n\n\t\t/**\n\t\t * The label a tab shows: the authored `label`, else (board look) History\n\t\t * for the activity widget, else the child widget's title, else its id.\n\t\t * A manifest label or title goes through the host's translate; the\n\t\t * library's own History is translated by the library catalogue.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {object|null} widget The widget definition it names.\n\t\t * @param {string} widgetId The widget id.\n\t\t * @return {string} The label.\n\t\t * @spec openspec/changes/screens-detail-labels-parity/specs/detail-labels-board-look/spec.md#requirement-detail-labels-read-in-the-users-language\n\t\t */\n\t\ttabLabel(tab, widget, widgetId) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tif (tab && typeof tab.label === 'string' && tab.label !== '') {\n\t\t\t\treturn translate(tab.label)\n\t\t\t}\n\t\t\tif (this.isBoard && isActivityWidget(widget)) {\n\t\t\t\treturn t('nextcloud-vue', 'History')\n\t\t\t}\n\t\t\tconst title = widgetTitleOf(widget)\n\t\t\treturn title ? translate(title) : (widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether a tab shows: `visible`, `hidden`, or `pending` while its\n\t\t * condition cannot be decided yet (object not loaded, count not back).\n\t\t *\n\t\t * @param {string|object} tab The tab entry.\n\t\t * @param {number} index Its index in `content.tabs`.\n\t\t * @return {('visible'|'hidden'|'pending')} The state.\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\ttabVisibility(tab, index) {\n\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\tif (!cond) {\n\t\t\t\treturn 'visible'\n\t\t\t}\n\t\t\tif (isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\tif (!this.objectData) {\n\t\t\t\t\treturn 'pending'\n\t\t\t\t}\n\t\t\t\treturn evaluateVisibleWhenLocal(cond, this.objectData) ? 'visible' : 'hidden'\n\t\t\t}\n\t\t\tconst answer = this.sourceVisibility[index]\n\t\t\tif (answer === undefined) {\n\t\t\t\treturn 'pending'\n\t\t\t}\n\t\t\treturn answer ? 'visible' : 'hidden'\n\t\t},\n\n\t\t/**\n\t\t * Count the rows behind each source-mode condition: once on mount, when\n\t\t * the record changes, and after a refresh a write triggers. A tab keeps\n\t\t * its last answer while the new one is on its way, so the strip does\n\t\t * not jump.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\tasync refreshSourceVisibility() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.visibilitySeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\t\tif (!cond || isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst answer = await evaluateVisibleWhen(cond, ctx)\n\t\t\t\tif (seq === this.visibilitySeq) {\n\t\t\t\t\tthis.sourceVisibility = { ...this.sourceVisibility, [index]: answer }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The list a tab counts (`countFrom`): `\"widget\"` counts the child\n\t\t * widget's own list (its `content.register`, `content.schema` and\n\t\t * `content.filter`); an object `{ register, schema, filter? }` names\n\t\t * the list itself. Null for a tab that does not ask, or a child with\n\t\t * no list.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {{register: string, schema: string, filter: object}|null} The list.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tcountSourceOf(tab) {\n\t\t\tconst from = tab && typeof tab === 'object' ? tab.countFrom : null\n\t\t\tlet source = null\n\t\t\tif (from === 'widget') {\n\t\t\t\t// A stack counts its first widget that has a list.\n\t\t\t\tconst lists = this.tabWidgetIds(tab)\n\t\t\t\t\t.map((id) => this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t\t\t.filter((w) => w && w.content && typeof w.content === 'object' && w.content.register && w.content.schema)\n\t\t\t\tsource = lists.length ? lists[0].content : null\n\t\t\t} else if (from && typeof from === 'object') {\n\t\t\t\tsource = from\n\t\t\t}\n\t\t\tif (!source || typeof source.register !== 'string' || source.register === '' || typeof source.schema !== 'string' || source.schema === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst filter = source.filter && typeof source.filter === 'object' && !Array.isArray(source.filter) ? source.filter : {}\n\t\t\treturn { register: source.register, schema: source.schema, filter }\n\t\t},\n\n\t\t/**\n\t\t * Count the list behind every tab with `countFrom`: once on mount,\n\t\t * when the record changes and after a refresh. A tab keeps its last\n\t\t * total while the new one is on its way; a failed count shows none.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync refreshWidgetCounts() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.countSeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst source = this.countSourceOf(tab)\n\t\t\t\tif (!source) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst total = await fetchListTotal(source.register, source.schema, source.filter, ctx).catch(() => null)\n\t\t\t\tif (seq === this.countSeq) {\n\t\t\t\t\tthis.widgetCounts = { ...this.widgetCounts, [index]: total }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/** @return {string} The route hash without its `#`, or ''. */\n\t\tcurrentHash() {\n\t\t\tconst fromRoute = this.$route && typeof this.$route.hash === 'string' ? this.$route.hash : ''\n\t\t\tconst raw = fromRoute !== '' ? fromRoute : (typeof window !== 'undefined' && window.location ? window.location.hash : '')\n\t\t\treturn typeof raw === 'string' ? raw.replace(/^#/, '') : ''\n\t\t},\n\n\t\t/**\n\t\t * After the active tab went, point a deep link's hash at the tab now showing.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tsyncHash() {\n\t\t\tconst id = this.activeTab?.id\n\t\t\tconst route = this.$route\n\t\t\tif (!id || !route || !route.hash || !this.$router || typeof this.$router.replace !== 'function') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$router.replace({ hash: `#${id}`, query: route.query })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a geo child's save so the surface can reload the record.\n\t\t *\n\t\t * @param {object} geo The saved geometry.\n\t\t * @return {void}\n\t\t */\n\t\tonGeoSaved(geo) {\n\t\t\t/**\n\t\t\t * @event geo-saved Re-emitted from a geo child that saved a geometry.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('geo-saved', geo)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's request to open an integration.\n\t\t *\n\t\t * @param {string} integrationId The integration to open.\n\t\t * @return {void}\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration Re-emitted from a related child asking to open an integration.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('open-integration', integrationId)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's object click; the page opens the object.\n\t\t *\n\t\t * @param {object} raw The clicked object.\n\t\t * @return {void}\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object Re-emitted from a related child whose object row was clicked. Payload is the raw object.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-object', raw)\n\t\t},\n\n\t\t/**\n\t\t * Follow the strip's own selection, so keyboard navigation moves the\n\t\t * hoisted Actions menu too.\n\t\t *\n\t\t * @param {number} index The newly selected tab index.\n\t\t * @return {void}\n\t\t */\n\t\tonTabChange(index) {\n\t\t\tif (typeof index === 'number' && index >= 0) {\n\t\t\t\tthis.activeIndex = index\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Empty-state text for a tab whose widget id resolves to nothing.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The message.\n\t\t */\n\t\tmissingLabel(entry) {\n\t\t\treturn t('nextcloud-vue', 'No widget found for \"{id}\"', { id: entry.widgetId || '' })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* A stack (`widgetIds`): the panel's widget, then cards 20px apart. */\n.cn-tabs-widget__stack {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n\n/* The panel is the card; the strip is not inside it. There is no title bar\n above the tabs either: the open tab names the panel, so a title row would\n say the same thing twice and cost a row of height on a card that is mostly\n content.\n\n The card chrome used to wrap the strip as well, which drew a border and a\n pair of rounded corners ABOVE the tabs and boxed them in. Folder tabs are\n drawn as the edge of the sheet they open, so a second edge around them\n reads as a header the widget does not have. Border, radius and background\n now live on the panel below, and the strip sits bare on the page. */\n/* The class is doubled on purpose, and the four properties below are RESET\n rather than simply omitted.\n\n Nextcloud serves every enabled app's assets on every page, each app bundles\n this library's compiled CSS, and the Vue scope id is derived from the file\n PATH, so `data-v-1dbd6122` is byte-identical across library versions. An app\n still on an older release therefore ships a rule with exactly this selector\n and the OLD declarations, and it lands on the pages of an app already on the\n new one. Measured on a dossiq case page: three stale copies of the pre-fix\n rule, one from hermiq's `companion.css` (its companion bundle loads on every\n page by design) and two inline from other apps' bundles. Same specificity,\n so source order decided, and the card border came back around the strip.\n\n Dropping a declaration cannot beat a rule that sets it, so `border` and the\n rest are explicitly zeroed. Doubling the class takes this selector to\n (0,3,0) against the stale (0,2,0), which wins on specificity rather than on\n `!important` or on load order this library does not control. The same\n technique, for the same reason, is used on `.cn-tabs__nav .cn-tabs__nav-item`\n in CnTabs to beat Nextcloud's own button margin. */\n.cn-tabs-widget.cn-tabs-widget {\n\tbackground-color: transparent;\n\tborder: 0;\n\tborder-radius: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tmin-height: 0;\n\toverflow: visible;\n\tpadding: 0;\n}\n\n/* No inset, so the first tab starts at the panel's own left edge. The 8px\n here was there to clear the card's rounded top corner; that corner is gone\n from the strip now, and the inset it existed for left the first tab floating\n 8px inside the sheet it opens.\n\n The bar's own bottom rule is switched off and redrawn as a pseudo-element\n that stops one corner radius short of the right edge. CnTabs draws its rule\n across the bar's whole width, which is the sheet's top edge everywhere\n except at the far right, where the panel's top-right corner curves away\n below it: the rule ran straight on to the widget's edge and read as a\n border sticking out past a rounded corner (Ruben, 2026-09-13). Ending it\n where the curve begins makes the rule and the curve one continuous edge. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar) {\n\tborder-bottom: none;\n\tpadding: 0;\n\tposition: relative;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar::after) {\n\tborder-bottom: 1px solid var(--color-border);\n\tcontent: '';\n\tinset-block-end: 0;\n\tinset-inline: 0 var(--border-radius-large);\n\tpointer-events: none;\n\tposition: absolute;\n}\n\n/* The open tab erases the slice of the rule directly above the panel with its\n own background-coloured bottom edge, which only works if it paints ABOVE the\n pseudo-element: a positioned pseudo-element otherwise paints over every\n in-flow sibling, rule included. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__nav-item--active) {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.cn-tabs-widget__tabs {\n\tdisplay: flex;\n\tflex-direction: column;\n\t/* Grow to the widget's height, so the panel fills the grid cell the\n\t layout gave it. Without this the strip plus the open panel took only\n\t the height of the panel's content, and a cell of nine rows ended in\n\t 130px of nothing under a sheet that stopped short of its own card. */\n\tflex: 1 1 auto;\n\tmin-height: 0;\n}\n\n/* The panel area is the scroll region, so the strip stays put while a long\n child scrolls under it.\n\n Padded on all four sides. The top was once zeroed to protect the join with\n the open tab, but padding sits inside the painted box — only a margin would\n have opened that gap, and a zero top put every panel's content against the\n strip. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content) {\n\tbackground-color: var(--color-main-background);\n\t/* Three sides only: the bar's rule (redrawn above, stopping at the corner)\n\t is this sheet's top edge, and the open tab erases the slice of it\n\t directly above the panel so the two read as one surface. A border-top\n\t here would put a second line under that tab which the tab cannot paint\n\t over. */\n\tborder: 1px solid var(--color-border);\n\tborder-top: none;\n\t/* Three rounded corners. The top-left stays square because the first tab\n\t is drawn joined to the panel there, and a curve under it would curl the\n\t sheet away from that tab. The top-right has no tab above it: the strip\n\t ends where the last tab ends and the Actions menu floats free, so a\n\t square corner there read as a sheet cut off, not as a tab's edge. */\n\tborder-radius: 0 var(--border-radius-large) var(--border-radius-large) var(--border-radius-large);\n\tflex: 1 1 auto;\n\tmin-height: 0;\n\toverflow: auto;\n\tpadding: 12px;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tab) {\n\theight: 100%;\n}\n\n.cn-tabs-widget__title {\n\talign-items: center;\n\tdisplay: inline-flex;\n\tgap: 6px;\n}\n\n.cn-tabs-widget__title-icon {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["_createVNode","_createElementBlock","_Fragment","_renderList","_createBlock","_openBlock","_createElementVNode","_createTextVNode","_toDisplayString"],"mappings":";;AAWM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,gBAAgB,GAAA;AA6DjB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;;;OAmB9B,EAAC,uBAAQ;AACZ,EAAA,aAAS,EAAC,sBAAU;;AACjB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,6BAAU,GAAA;;;;;;;;;;;;;;IAjFvBA;AACC,MAAA,YAAU,EAAE,QAAU,CAAA,UAAA;eACb,EAAE,QAAQ,CAAA,SAAA;aACZ,EAAE,QAAY,CAAA,YAAA;AACtB,MAAA,KAAK,EAAC,sBAAY;AACjB,MAAA,sBAAa,EAAA,QAAA,CAAA,WAAA;;AAIH,MAAA,SAAO,gBAqCF;mBAAA,CAAA,wBAAA,EAAA;AAnCb,UAAA,WAAW,EAAE,MAAK,CAAA,WAAA;AAClB,UAAA,kBAAmB,EAAC,MAAkB,CAAA,kBAAA;AACtC,UAAA,iBAAiB,EAAE,MAAgB,CAAA,iBAAA;AACnC,UAAA,gBAAgB,EAAE,MAAc,CAAA,gBAA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EAAA,MAAA,CAAA,kBAAA;AACF,0BAAA,UAAC,EAAA,MAAA,CAAA,UAAA;AACD,0BAAA,UAAQ,EAAE,QAAI,CAAA,UAAA;AACd,0BAAA,iBAAe,EAAE,QAAG,CAAA,iBAAA;AACpB,0BAAA,cAAY,EAAE,QAAI,CAAA,cAAA;;;;;AAIV,kBAAA,CAAA,KAAK,CAAC,MAAE;kCADnBI;;sBAEC,MAAM,EAAE,KAAK,CAAC,MAAM;AACrB,sBAAA,MAAM,EAAC,MAAM;AACZ,sBAAA,gBAAgB,EAAE,MAAA,CAAA,gBAAA;AAClB,sBAAA,QAAQ,EAAE,MAAI,CAAA,QAAA;AACd,sBAAA,MAAM,EAAE,MAAI,CAAA,UAAA;AACZ,sBAAA,UAAU,EAAE,MAAI,CAAA,UAAA;AAChB,sBAAA,YAAY,EAAE,MAAY,CAAA,YAAA;AAC1B,sBAAA,QAAQ,EAAE,MAAQ,CAAA,QAAA;AAClB,sBAAA,MAAM,EAAE,MAAM,CAAA,MAAA;AACd,sBAAA,KAAK,EAAE,MAAK,CAAA,KAAA;AACZ,sBAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,sBAAA,kBAAkB,EAAG,MAAiB,CAAA,kBAAA;AACtC,sBAAA,UAAI,EAAA,MAAA,CAAA,UAAA;AACJ,sBAAA,UAAI,EAAA,QAAA,CAAA,UAAA;AACJ,sBAAA,iBAAA,EAAA,QAAA,CAAA,iBAAA;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnTabsWidget.vue3.js","sources":["../../../../src/components/CnTabsWidget/CnTabsWidget.vue?vue&type=template&id=1dbd6122&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-tabs-widget\">\n\t\t<CnTabs\n\t\t\t:aria-label=\"stripLabel\"\n\t\t\t:moreLabel=\"moreLabel\"\n\t\t\t:variant=\"stripVariant\"\n\t\t\tclass=\"cn-tabs-widget__tabs\"\n\t\t\t@update:activeIndex=\"onTabChange\">\n\t\t\t<!-- One Actions menu for the whole widget, bound to whichever child\n\t\t\t is showing. This is the point of the component: six tabbed\n\t\t\t widgets used to mean six card headers stacked down the page. -->\n\t\t\t<template #nav-end>\n\t\t\t\t<CnActionsMenu\n\t\t\t\t\t:showRefresh=\"showRefresh\"\n\t\t\t\t\t:showRequestFeature=\"showRequestFeature\"\n\t\t\t\t\t:showDocumentation=\"showDocumentation\"\n\t\t\t\t\t:documentationUrl=\"documentationUrl\"\n\t\t\t\t\t:widgetId=\"activeWidgetId\"\n\t\t\t\t\t:title=\"activeTitle\"\n\t\t\t\t\t:variant=\"isBoard ? 'secondary' : undefined\"\n\t\t\t\t\t:surface=\"`widget:${activeWidgetId}`\"\n\t\t\t\t\trefreshChannel=\"cn:widget:refresh\"\n\t\t\t\t\ttestidBase=\"cn-tabs-widget\">\n\t\t\t\t\t<!-- The open panel's own items, below the built-in trio.\n\t\t\t\t\t A panel draws no header, so these would otherwise have\n\t\t\t\t\t nowhere to go: the data widget's Metadata and full edit\n\t\t\t\t\t dialog vanished outright when the panel stopped drawing\n\t\t\t\t\t a card. They are rendered here rather than rebuilt here\n\t\t\t\t\t because `run` closes over the widget that published it,\n\t\t\t\t\t which is what keeps the dialog's per-widget config and\n\t\t\t\t\t the widget's own save path. See utils/panelActions.js.\n\n\t\t\t\t\t Only the ACTIVE panel's items. `lazy` keeps a visited\n\t\t\t\t\t tab mounted, so several panels publish at once and an\n\t\t\t\t\t unfiltered list would offer actions for a sheet nobody\n\t\t\t\t\t is looking at. -->\n\t\t\t\t\t<template v-if=\"activePanelActions.length\" #action-items>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-for=\"action in activePanelActions\"\n\t\t\t\t\t\t\t:key=\"action.key\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"action.run()\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ action.label }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</template>\n\t\t\t\t</CnActionsMenu>\n\t\t\t</template>\n\n\t\t\t<CnTab\n\t\t\t\tv-for=\"(entry, index) in resolvedTabs\"\n\t\t\t\t:key=\"entry.key\"\n\t\t\t\t:active=\"index === activeIndex\"\n\t\t\t\t:title=\"entry.label\"\n\t\t\t\t:count=\"entry.count\"\n\t\t\t\t:overflow=\"entry.overflow\"\n\t\t\t\t:disabled=\"entry.pending\"\n\t\t\t\tlazy\n\t\t\t\t@click=\"activeIndex = index\">\n\t\t\t\t<template #title>\n\t\t\t\t\t<span class=\"cn-tabs-widget__title\">\n\t\t\t\t\t\t<CnIcon\n\t\t\t\t\t\t\tv-if=\"entry.icon && !isBoard\"\n\t\t\t\t\t\t\t:name=\"entry.icon\"\n\t\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\t\tclass=\"cn-tabs-widget__title-icon\" />\n\t\t\t\t\t\t{{ entry.label }}\n\t\t\t\t\t\t<NcLoadingIcon\n\t\t\t\t\t\t\tv-if=\"entry.pending\"\n\t\t\t\t\t\t\t:size=\"14\"\n\t\t\t\t\t\t\t:name=\"loadingLabel\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tabs-widget-pending\" />\n\t\t\t\t\t</span>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- A stack (`widgetIds`): every widget is a titled card; the\n\t\t\t\t first joins the open tab, the next ones stand below it. -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"entry.widget && entry.stack.length\"\n\t\t\t\t\tclass=\"cn-tabs-widget__stack\"\n\t\t\t\t\t:class=\"{ 'cn-tabs-widget__stack--grid': !!entry.grid }\"\n\t\t\t\t\tdata-testid=\"cn-tabs-widget-stack\">\n\t\t\t\t\t<div class=\"cn-tabs-widget__stack-first\" :style=\"spanStyle(entry.grid, 0)\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"(child, childIndex) in entry.stack\"\n\t\t\t\t\t\t:key=\"`${entry.key}-${child.id}`\"\n\t\t\t\t\t\tclass=\"cn-tabs-widget__stack-item\"\n\t\t\t\t\t\t:style=\"spanStyle(entry.grid, childIndex + 1)\"\n\t\t\t\t\t\t:data-testid=\"`cn-tabs-widget-stack-${child.id}`\">\n\t\t\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\t\t\t:widget=\"child\"\n\t\t\t\t\t\t\tchrome=\"card\"\n\t\t\t\t\t\t\t:showCardTitle=\"true\"\n\t\t\t\t\t\t\t:showActions=\"false\"\n\t\t\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<CnDetailWidgetHost\n\t\t\t\t\tv-else-if=\"entry.widget\"\n\t\t\t\t\t:widget=\"entry.widget\"\n\t\t\t\t\tchrome=\"bare\"\n\t\t\t\t\t:availableWidgets=\"availableWidgets\"\n\t\t\t\t\t:objectId=\"objectId\"\n\t\t\t\t\t:object=\"objectData\"\n\t\t\t\t\t:objectType=\"objectType\"\n\t\t\t\t\t:schemaObject=\"schemaObject\"\n\t\t\t\t\t:register=\"register\"\n\t\t\t\t\t:schema=\"schema\"\n\t\t\t\t\t:store=\"store\"\n\t\t\t\t\t:surface=\"surface\"\n\t\t\t\t\t:integrationContext=\"integrationContext\"\n\t\t\t\t\t:cnRegistry=\"cnRegistry\"\n\t\t\t\t\t@geoSaved=\"onGeoSaved\"\n\t\t\t\t\t@openIntegration=\"onOpenIntegration\"\n\t\t\t\t\t@selectObject=\"onSelectObject\" />\n\t\t\t\t<CnEmptyContent v-else :name=\"missingLabel(entry)\" />\n\t\t\t</CnTab>\n\t\t</CnTabs>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcActionButton, NcLoadingIcon } from '@nextcloud/vue'\nimport CnDetailWidgetHost from '../CnDetailWidgetHost/CnDetailWidgetHost.vue'\nimport CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnTab from '../CnTabs/CnTab.vue'\nimport CnTabs from '../CnTabs/CnTabs.vue'\nimport { normalizeLook } from '../../composables/useLook.js'\nimport { resolveTabCount } from '../../utils/detailActionModel.js'\nimport { fetchListTotal } from '../../utils/fetchFilterCounts.js'\nimport { isActivityWidget } from '../../utils/headerMeta.js'\nimport { PANEL_ACTION_SINK } from '../../utils/panelActions.js'\nimport { evaluateVisibleWhen, evaluateVisibleWhenLocal, isLocallyDecidableVisibleWhen } from '../../utils/visibleWhen.js'\nimport { widgetTitleOf } from '../../utils/widgetDispatch.js'\nimport { CnActionsMenu } from '../CnActionsMenu/index.js'\n\n/**\n * CnTabsWidget — a widget that holds other widgets, one per tab.\n *\n * A detail page that carries notes, files, related records, sub-records, mail\n * and appointments renders six cards, each with its own header and its own\n * Actions menu, stacked down the page. All six say roughly the same thing about\n * one record, and only one of them is being read at a time. This widget puts\n * them behind a tab strip instead.\n *\n * ## What the tabs take over\n *\n * The strip owns the title and the card. A child renders through\n * `CnDetailWidgetHost` with `chrome=\"bare\"`, so it draws no header and no\n * border of its own, and its content fills the panel exactly as it would have\n * filled its card. The tab label is what the widget's card header used to say.\n *\n * The Actions menu moves OUT of the panels and into the bar, beside the strip\n * rather than inside it, and rebinds to whichever child is showing. So there is\n * one menu, and it always acts on what you are looking at.\n *\n * ## Configuring it\n *\n * `content.tabs[]` names the children and their labels, so a deployment can\n * relabel or reorder tabs, or drop one, without touching code:\n *\n * ```js\n * content: {\n * tabs: [\n * { widgetId: 'case-notes', label: 'Notes', icon: 'NoteTextOutline' },\n * { widgetId: 'case-files', label: 'Files and attachments' },\n * ],\n * }\n * ```\n *\n * `label` and `icon` are optional and fall back to the child widget's own\n * title and icon, so the common case is a list of `widgetId`s.\n *\n * ## Panels are lazy, and stay mounted\n *\n * Each panel is a `CnTab` with `lazy`, so a child only mounts when its tab is\n * first opened. Six eager panels that each fetch on `mounted()` would fire six\n * requests on page load to answer five questions nobody asked. Once opened, a\n * panel stays mounted, so switching back never refetches.\n *\n * ## A named tab whose widget is missing\n *\n * The tab still renders, and its panel says which widget id did not resolve.\n * Dropping the tab would be worse: `content.tabs[]` is hand-authored config,\n * and a typo that silently removes a tab is a typo nobody finds.\n */\nexport default {\n\tname: 'CnTabsWidget',\n\n\tcomponents: {\n\t\tCnActionsMenu,\n\t\tCnDetailWidgetHost,\n\t\tCnIcon,\n\t\tCnTab,\n\t\tCnTabs,\n\t\tNcActionButton,\n\t\tCnEmptyContent,\n\t\tNcLoadingIcon,\n\t},\n\n\t/**\n\t * Offer the panels a way to put their own menu items in the strip's menu.\n\t *\n\t * Re-provided one level down by `CnDetailWidgetHost`, which knows the id to\n\t * key by; see utils/panelActions.js for why the items travel up instead of\n\t * being rebuilt here.\n\t *\n\t * @return {object} The provided sink.\n\t */\n\tprovide() {\n\t\treturn {\n\t\t\t[PANEL_ACTION_SINK]: {\n\t\t\t\t/**\n\t\t\t\t * Publish a panel's items, under one SOURCE.\n\t\t\t\t *\n\t\t\t\t * A panel has two possible publishers: the host, for an action\n\t\t\t\t * the host itself would have drawn (the catalog Add), and the\n\t\t\t\t * widget inside it, for its own menu items. Keyed by source so\n\t\t\t\t * the two coexist; a single slot per widget meant whichever\n\t\t\t\t * published last silently replaced the other.\n\t\t\t\t *\n\t\t\t\t * Replaces the map rather than mutating it so the computed that\n\t\t\t\t * reads it re-evaluates on any change.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {object[]} items Its PanelAction descriptors.\n\t\t\t\t * @param {string} [source] Who is publishing: `host` or `widget`.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tset: (id, items, source = 'widget') => {\n\t\t\t\t\t// `activePanelActions` spreads what is stored, so a\n\t\t\t\t\t// non-array becomes one menu item per character.\n\t\t\t\t\tif (!id || !Array.isArray(items)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst forId = { ...(this.panelActionsByWidget[id] || {}), [source]: items }\n\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: forId }\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Withdraw one source's items, on unmount or when that\n\t\t\t\t * publisher's own menu comes back. The other source's items\n\t\t\t\t * stay.\n\t\t\t\t *\n\t\t\t\t * @param {string} id The publishing widget's id.\n\t\t\t\t * @param {string} [source] Who is withdrawing.\n\t\t\t\t * @return {void}\n\t\t\t\t */\n\t\t\t\tclear: (id, source = 'widget') => {\n\t\t\t\t\tconst forId = this.panelActionsByWidget[id]\n\t\t\t\t\tif (!forId || !(source in forId)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [source]: _removed, ...keptSources } = forId\n\t\t\t\t\tif (Object.keys(keptSources).length) {\n\t\t\t\t\t\tthis.panelActionsByWidget = { ...this.panelActionsByWidget, [id]: keptSources }\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst { [id]: _gone, ...rest } = this.panelActionsByWidget\n\t\t\t\t\tthis.panelActionsByWidget = rest\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t},\n\n\tinject: {\n\t\t/** The app's look, provided by CnAppRoot or CnPageRenderer (`nextcloud` or `board`). */\n\t\tcnLook: { default: 'nextcloud' },\n\t\t/** The tab list's name under the board look, provided by CnDetailPage (`config.tabsLabel`). */\n\t\tcnDetailTabsLabel: { default: null },\n\t\t/**\n\t\t * The host's translate (CnAppRoot provides `cnTranslate`), so a tab\n\t\t * label written in the manifest reads in the user's language.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's config: `{ tabs, ariaLabel }`.\n\t\t *\n\t\t * `tabs[]` entries are `{ widgetId, label?, icon?, count?, countField?, overflow? }`.\n\t\t * `label` and `icon` fall back to the referenced widget's own title and\n\t\t * icon. `count` is a number shown after the label; `countField` reads\n\t\t * it off the record instead (a list counts its items). `countFrom`\n\t\t * counts a list on the server: `\"widget\"` counts the child widget's\n\t\t * own list (`content.register`, `schema`, `filter`, tokens such as\n\t\t * `@objectId` resolved), an object `{ register, schema, filter? }`\n\t\t * names the list; `count` and `countField` win over it. `overflow: true`\n\t\t * lists the tab under \"More\".\n\t\t *\n\t\t * A tab with `widgetIds` can lay them out in a grid instead of one under\n\t\t * the other: `columns: 4` gives each a quarter of the row, and\n\t\t * `layout: [{ widgetId, gridWidth }]` sets a width (of 12) per widget, as\n\t\t * the page grid does. Widgets wrap onto the next row.\n\t\t *\n\t\t * `maxVisibleTabs` caps the strip: later tabs go under \"More\".\n\t\t * `hideEmpty: true` moves a tab whose count is 0 there too.\n\t\t * `moreLabel` names that menu. `variant: \"segmented\"` draws the strip\n\t\t * as a pill switch (CnTabs' segmented variant); `line` is the default.\n\t\t *\n\t\t * @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}), overflow?: boolean, columns?: number, layout?: Array<{widgetId: string, gridWidth: number}>}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Every widget definition available on the surface, for `content.tabs[]`\n\t\t * to reference by id.\n\t\t *\n\t\t * The surface passes its whole list rather than the resolved children\n\t\t * because a tab may name a widget that does not exist, and this component\n\t\t * has to be able to say so.\n\t\t *\n\t\t * @type {object[]}\n\t\t */\n\t\tavailableWidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The bound record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The loaded record, or null while it is still being fetched. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The resolved object-type slug. */\n\t\tobjectType: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The resolved JSON Schema object, needed by a `data` child. */\n\t\tschemaObject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** OpenRegister register slug of the surface. */\n\t\tregister: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** OpenRegister schema slug of the surface. */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The effective object store. */\n\t\tstore: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Rendering surface forwarded to integration children (AD-19). */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'detail-page',\n\t\t},\n\n\t\t/** Object context forwarded to integration children. */\n\t\tintegrationContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The consumer's component registry, for custom child widget types. */\n\t\tcnRegistry: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Show the Refresh entry in the hoisted Actions menu. */\n\t\tshowRefresh: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Request-a-feature entry in the hoisted Actions menu. */\n\t\tshowRequestFeature: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Show the Documentation entry in the hoisted Actions menu. */\n\t\tshowDocumentation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Documentation URL for the hoisted Actions menu. */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['geo-saved', 'open-integration', 'select-object'],\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveIndex: 0,\n\t\t\t// Key of the tab showing, so it stays the active one when a tab\n\t\t\t// before it appears or disappears.\n\t\t\tactiveKey: '',\n\t\t\t// Result of each tab's SOURCE-mode `visibleWhen`, by the tab's index\n\t\t\t// in `content.tabs`. A missing entry means the count is pending.\n\t\t\tsourceVisibility: {},\n\t\t\t// Bumped per evaluation round, so a slow answer from an earlier round is dropped.\n\t\t\tvisibilitySeq: 0,\n\t\t\t// Totals counted for tabs with `countFrom`, by position in `content.tabs`.\n\t\t\twidgetCounts: {},\n\t\t\tcountSeq: 0,\n\t\t\t// Tab id named by the route hash that has not appeared yet (still pending).\n\t\t\thashTargetId: '',\n\t\t\t// Items published by the panels, keyed by widget id. Keyed rather\n\t\t\t// than a flat list because `lazy` keeps a visited tab mounted, so\n\t\t\t// more than one panel publishes at a time.\n\t\t\tpanelActionsByWidget: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The open panel's own menu items, or an empty list.\n\t\t *\n\t\t * @return {object[]} PanelAction descriptors for the active tab.\n\t\t */\n\t\tactivePanelActions() {\n\t\t\tconst forId = this.panelActionsByWidget[this.activeWidgetId]\n\t\t\tif (!forId) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\t// Host first, then the widget's own: the catalog Add is about the\n\t\t\t// panel as a whole, the widget's items about what is in it.\n\t\t\treturn [...(forId.host || []), ...(forId.widget || [])]\n\t\t},\n\n\t\t/**\n\t\t * The configured tabs, each paired with the widget definition it names.\n\t\t *\n\t\t * A tab goes under the strip's \"More\" menu when it says `overflow`, when\n\t\t * `content.hideEmpty` is set and its count is 0, or when\n\t\t * `content.maxVisibleTabs` places are already taken. `count` is a\n\t\t * literal, or read off the record through `countField`.\n\t\t *\n\t\t * @return {object[]} `{ key, widgetId, label, icon, widget, count, overflow }` per tab.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tresolvedTabs() {\n\t\t\tconst authored = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\t// The board look: the activity is the History tab and the last tab,\n\t\t\t// whatever its place in the manifest. `index` stays the position in\n\t\t\t// `content.tabs`, which the source-mode conditions are keyed on.\n\t\t\tconst isActivityTab = (tab) => {\n\t\t\t\tconst id = this.tabWidgetIds(tab)[0]\n\t\t\t\treturn isActivityWidget(this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t}\n\t\t\tconst ordered = authored.map((tab, index) => ({ tab, index }))\n\t\t\tif (this.isBoard) {\n\t\t\t\tordered.sort((a, b) => (Number(isActivityTab(a.tab)) - Number(isActivityTab(b.tab))) || (a.index - b.index))\n\t\t\t}\n\t\t\tconst tabs = ordered.map(({ tab }) => tab)\n\t\t\tconst originalIndex = ordered.map(({ index }) => index)\n\t\t\tconst max = Number(this.content?.maxVisibleTabs)\n\t\t\tconst hideEmpty = this.content?.hideEmpty === true\n\t\t\t// How many tabs have taken a place in the strip so far. A tab that\n\t\t\t// is already going under \"More\" does not use one up.\n\t\t\tlet placed = 0\n\t\t\tconst resolved = []\n\t\t\ttabs.forEach((tab, position) => {\n\t\t\t\tconst index = originalIndex[position]\n\t\t\t\t// A tab whose condition is false is absent, not empty.\n\t\t\t\tconst visibility = this.tabVisibility(tab, index)\n\t\t\t\tif (visibility === 'hidden') {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\t// A stack (`widgetIds`) resolves every id; one that names no\n\t\t\t\t// widget is skipped. The first that resolves is the panel's.\n\t\t\t\tconst ids = this.tabWidgetIds(tab)\n\t\t\t\tconst widgets = ids.length > 1\n\t\t\t\t\t? ids.map((id) => this.availableWidgets.find((w) => w && w.id === id) || null).filter(Boolean)\n\t\t\t\t\t: []\n\t\t\t\tconst widget = ids.length > 1\n\t\t\t\t\t? (widgets[0] || null)\n\t\t\t\t\t: (this.availableWidgets.find((w) => w && w.id === ids[0]) || null)\n\t\t\t\tconst widgetId = widget ? widget.id : ids[0]\n\t\t\t\tconst declared = resolveTabCount(typeof tab === 'object' ? tab : null, this.objectData)\n\t\t\t\tconst counted = this.widgetCounts[index]\n\t\t\t\tconst count = declared === null && typeof counted === 'number' ? counted : declared\n\t\t\t\t// The board strip has no \"More\": every tab is in the strip.\n\t\t\t\tlet overflow = !this.isBoard && ((tab && tab.overflow === true) || (hideEmpty && count === 0))\n\t\t\t\tif (!overflow && !this.isBoard) {\n\t\t\t\t\tif (Number.isFinite(max) && max > 0 && placed >= max) {\n\t\t\t\t\t\toverflow = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tplaced += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresolved.push({\n\t\t\t\t\tkey: `${widgetId || 'tab'}-${index}`,\n\t\t\t\t\tid: (tab && typeof tab === 'object' && tab.id) || widgetId || '',\n\t\t\t\t\twidgetId,\n\t\t\t\t\tlabel: this.tabLabel(tab, widget, widgetId),\n\t\t\t\t\ticon: (tab && tab.icon) || widget?.icon || '',\n\t\t\t\t\twidget,\n\t\t\t\t\tstack: widgets.slice(1),\n\t\t\t\t\tgrid: this.stackGrid(tab, widgets),\n\t\t\t\t\tcount,\n\t\t\t\t\toverflow,\n\t\t\t\t\tpending: visibility === 'pending',\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn resolved\n\t\t},\n\n\t\t/** @return {string} The keys of the tabs in the strip, to notice one appearing or going. */\n\t\tvisibleKeys() {\n\t\t\treturn this.resolvedTabs.map((tab) => tab.key).join('|')\n\t\t},\n\n\t\t/** @return {string} Accessible name of a pending tab's spinner. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading …')\n\t\t},\n\n\t\t/**\n\t\t * The lists the tabs count (`countFrom`), serialised, to count again\n\t\t * when they change.\n\t\t *\n\t\t * @return {string} The key.\n\t\t */\n\t\tcountSourcesKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => this.countSourceOf(tab)))\n\t\t},\n\n\t\t/** @return {string} The source-mode conditions, serialised, to re-evaluate when they change. */\n\t\tsourceConditionsKey() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\treturn JSON.stringify(tabs.map((tab) => (tab && typeof tab === 'object' && tab.visibleWhen && !isLocallyDecidableVisibleWhen(tab.visibleWhen)) ? tab.visibleWhen : null))\n\t\t},\n\n\t\t/**\n\t\t * Name of the menu that holds the tabs that are not in the strip.\n\t\t *\n\t\t * @return {string|undefined} The configured label, or undefined for the default.\n\t\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t\t */\n\t\tmoreLabel() {\n\t\t\tconst label = this.content?.moreLabel\n\t\t\treturn typeof label === 'string' && label !== '' ? label : undefined\n\t\t},\n\n\t\t/**\n\t\t * The tab currently showing.\n\t\t *\n\t\t * @return {object|null} The resolved tab, or null when there are none.\n\t\t */\n\t\tactiveTab() {\n\t\t\treturn this.resolvedTabs[this.activeIndex] || null\n\t\t},\n\n\t\t/**\n\t\t * The active child's id, so the hoisted Refresh reaches THAT child's\n\t\t * fetch over `cn:widget:refresh` rather than a sibling's.\n\t\t *\n\t\t * @return {string} The active widget id.\n\t\t */\n\t\tactiveWidgetId() {\n\t\t\treturn this.activeTab?.widgetId || ''\n\t\t},\n\n\t\t/**\n\t\t * The active child's label, so the Actions menu names what it acts on.\n\t\t *\n\t\t * @return {string} The active tab's label.\n\t\t */\n\t\tactiveTitle() {\n\t\t\treturn this.activeTab?.label || ''\n\t\t},\n\n\t\t/**\n\t\t * The strip's look: `segmented` when the content asks for it, else\n\t\t * CnTabs' default `line`. An unknown value falls back to `line`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-tabs-widget-renders-a-segmented-strip\n\t\t * @return {('line'|'segmented')} The CnTabs variant.\n\t\t */\n\t\tstripVariant() {\n\t\t\treturn this.content?.variant === 'segmented' ? 'segmented' : 'line'\n\t\t},\n\n\t\t/**\n\t\t * Accessible name for the tab strip.\n\t\t *\n\t\t * @return {string} The aria-label.\n\t\t */\n\t\tstripLabel() {\n\t\t\tconst named = this.isBoard && this.cnDetailTabsLabel ? this.cnDetailTabsLabel.value : ''\n\t\t\treturn this.content?.ariaLabel || named || t('nextcloud-vue', 'Details')\n\t\t},\n\n\t\t/**\n\t\t * Whether the strip is drawn in the board look.\n\t\t *\n\t\t * @return {boolean} True in the board look.\n\t\t * @spec openspec/changes/screens-detail-page-parity/specs/detail-page-board-look/spec.md#requirement-folder-tabs-take-the-board-strip\n\t\t */\n\t\tisBoard() {\n\t\t\treturn normalizeLook(this.cnLook) === 'board'\n\t\t},\n\t},\n\n\twatch: {\n\t\tactiveIndex(index) {\n\t\t\tthis.activeKey = this.resolvedTabs[index]?.key || ''\n\t\t},\n\n\t\t// A tab appeared or went. Keep the same tab active; when it is the active\n\t\t// tab that went, the first visible one takes over and the hash follows.\n\t\tvisibleKeys() {\n\t\t\tif (this.hashTargetId !== '') {\n\t\t\t\tconst arrived = this.resolvedTabs.findIndex((tab) => tab.id === this.hashTargetId && !tab.pending)\n\t\t\t\tif (arrived >= 0) {\n\t\t\t\t\tthis.activeIndex = arrived\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this.resolvedTabs.some((tab) => tab.id === this.hashTargetId)) {\n\t\t\t\t\tthis.hashTargetId = ''\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst stay = this.resolvedTabs.findIndex((tab) => tab.key === this.activeKey)\n\t\t\tif (stay >= 0) {\n\t\t\t\tif (stay !== this.activeIndex) {\n\t\t\t\t\tthis.activeIndex = stay\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tthis.activeIndex = first >= 0 ? first : 0\n\t\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\t\tthis.syncHash()\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.sourceVisibility = {}\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.widgetCounts = {}\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tcountSourcesKey() {\n\t\t\tthis.refreshWidgetCounts()\n\t\t},\n\n\t\tsourceConditionsKey() {\n\t\t\tthis.refreshSourceVisibility()\n\t\t},\n\t},\n\n\t/**\n\t * Open on the first tab that is in the strip. Tab 0 is the default, and\n\t * when tab 0 sits under \"More\" the strip would open on a tab the author\n\t * chose to tuck away.\n\t *\n\t * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-tab-counts-and-overflow\n\t */\n\tcreated() {\n\t\t// A route hash naming a tab opens that tab. One naming a hidden tab is\n\t\t// ignored, without an error; one naming a tab still pending is honoured\n\t\t// once its condition answers.\n\t\tconst wanted = this.currentHash()\n\t\tconst named = wanted === '' ? -1 : this.resolvedTabs.findIndex((tab) => tab.id === wanted)\n\t\tif (named >= 0 && !this.resolvedTabs[named].pending) {\n\t\t\tthis.activeIndex = named\n\t\t} else {\n\t\t\tif (named >= 0) {\n\t\t\t\tthis.hashTargetId = wanted\n\t\t\t}\n\t\t\tconst first = this.resolvedTabs.findIndex((tab) => !tab.overflow && !tab.pending)\n\t\t\tconst fallback = first >= 0 ? first : this.resolvedTabs.findIndex((tab) => !tab.overflow)\n\t\t\tif (fallback > 0) {\n\t\t\t\tthis.activeIndex = fallback\n\t\t\t}\n\t\t}\n\t\tthis.activeKey = this.resolvedTabs[this.activeIndex]?.key || ''\n\t\tthis.refreshSourceVisibility()\n\t\tthis.refreshWidgetCounts()\n\t},\n\n\tmounted() {\n\t\tthis._onRefresh = () => {\n\t\t\tthis.refreshSourceVisibility()\n\t\t\tthis.refreshWidgetCounts()\n\t\t}\n\t\tsubscribe('cn:page:refresh', this._onRefresh)\n\t\tsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tbeforeUnmount() {\n\t\tunsubscribe('cn:page:refresh', this._onRefresh)\n\t\tunsubscribe('cn:widget:refresh', this._onRefresh)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The grid a stack lays its widgets out in, as one column span (of 12)\n\t\t * per widget in order, or null for the plain vertical stack. A tab says\n\t\t * `columns: 4` (every widget spans a quarter of the row) and/or\n\t\t * `layout: [{ widgetId, gridWidth }]`, the page grid's width key per\n\t\t * widget (of 12; a widget it does not name takes the `columns` share, or\n\t\t * the whole row). Widgets wrap onto the next row. Heights follow the\n\t\t * content.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {Array<object>} widgets The widgets of the stack, in order.\n\t\t * @return {number[]|null} The column span of each widget, or null.\n\t\t */\n\t\tstackGrid(tab, widgets) {\n\t\t\tif (!tab || typeof tab !== 'object' || widgets.length < 2) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst clamp = (value) => Math.min(12, Math.max(1, Math.floor(Number(value))))\n\t\t\tconst columns = Number(tab.columns)\n\t\t\tconst share = Number.isFinite(columns) && columns >= 1 ? clamp(12 / Math.min(12, Math.floor(columns))) : 12\n\t\t\tconst placed = new Map((Array.isArray(tab.layout) ? tab.layout : [])\n\t\t\t\t.filter((entry) => entry && typeof entry.widgetId === 'string' && Number.isFinite(Number(entry.gridWidth)))\n\t\t\t\t.map((entry) => [entry.widgetId, clamp(entry.gridWidth)]))\n\t\t\tif (placed.size === 0 && share === 12) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn widgets.map((widget) => placed.get(widget.id) ?? share)\n\t\t},\n\n\t\t/**\n\t\t * The inline column span of one widget of a gridded stack.\n\t\t *\n\t\t * @param {number[]|null} grid The spans of the stack, or null.\n\t\t * @param {number} index The widget's position in the stack.\n\t\t * @return {object|undefined} The style, or undefined without a grid.\n\t\t */\n\t\tspanStyle(grid, index) {\n\t\t\treturn grid ? { gridColumn: `span ${grid[index] || 12}` } : undefined\n\t\t},\n\n\t\t/**\n\t\t * The widget ids a tab names: `widgetIds` (a stack) when it holds at\n\t\t * least one id, else `widgetId`, or the bare string.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {string[]} The ids, at least one entry (possibly undefined).\n\t\t * @spec openspec/changes/screens-relation-pages/specs/relation-pages/spec.md#requirement-a-tab-can-hold-a-stack-of-widgets\n\t\t */\n\t\ttabWidgetIds(tab) {\n\t\t\tif (typeof tab === 'string') {\n\t\t\t\treturn [tab]\n\t\t\t}\n\t\t\tif (tab && Array.isArray(tab.widgetIds)) {\n\t\t\t\tconst ids = tab.widgetIds.filter((id) => typeof id === 'string' && id !== '')\n\t\t\t\tif (ids.length) {\n\t\t\t\t\treturn ids\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [tab?.widgetId]\n\t\t},\n\n\t\t/**\n\t\t * The label a tab shows: the authored `label`, else (board look) History\n\t\t * for the activity widget, else the child widget's title, else its id.\n\t\t * A manifest label or title goes through the host's translate; the\n\t\t * library's own History is translated by the library catalogue.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @param {object|null} widget The widget definition it names.\n\t\t * @param {string} widgetId The widget id.\n\t\t * @return {string} The label.\n\t\t * @spec openspec/changes/screens-detail-labels-parity/specs/detail-labels-board-look/spec.md#requirement-detail-labels-read-in-the-users-language\n\t\t */\n\t\ttabLabel(tab, widget, widgetId) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\tif (tab && typeof tab.label === 'string' && tab.label !== '') {\n\t\t\t\treturn translate(tab.label)\n\t\t\t}\n\t\t\tif (this.isBoard && isActivityWidget(widget)) {\n\t\t\t\treturn t('nextcloud-vue', 'History')\n\t\t\t}\n\t\t\tconst title = widgetTitleOf(widget)\n\t\t\treturn title ? translate(title) : (widgetId || '')\n\t\t},\n\n\t\t/**\n\t\t * Whether a tab shows: `visible`, `hidden`, or `pending` while its\n\t\t * condition cannot be decided yet (object not loaded, count not back).\n\t\t *\n\t\t * @param {string|object} tab The tab entry.\n\t\t * @param {number} index Its index in `content.tabs`.\n\t\t * @return {('visible'|'hidden'|'pending')} The state.\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\ttabVisibility(tab, index) {\n\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\tif (!cond) {\n\t\t\t\treturn 'visible'\n\t\t\t}\n\t\t\tif (isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\tif (!this.objectData) {\n\t\t\t\t\treturn 'pending'\n\t\t\t\t}\n\t\t\t\treturn evaluateVisibleWhenLocal(cond, this.objectData) ? 'visible' : 'hidden'\n\t\t\t}\n\t\t\tconst answer = this.sourceVisibility[index]\n\t\t\tif (answer === undefined) {\n\t\t\t\treturn 'pending'\n\t\t\t}\n\t\t\treturn answer ? 'visible' : 'hidden'\n\t\t},\n\n\t\t/**\n\t\t * Count the rows behind each source-mode condition: once on mount, when\n\t\t * the record changes, and after a refresh a write triggers. A tab keeps\n\t\t * its last answer while the new one is on its way, so the strip does\n\t\t * not jump.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/tabs-widget-visible-if/tasks.md#task-2\n\t\t */\n\t\tasync refreshSourceVisibility() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.visibilitySeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst cond = tab && typeof tab === 'object' ? tab.visibleWhen : null\n\t\t\t\tif (!cond || isLocallyDecidableVisibleWhen(cond)) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst answer = await evaluateVisibleWhen(cond, ctx)\n\t\t\t\tif (seq === this.visibilitySeq) {\n\t\t\t\t\tthis.sourceVisibility = { ...this.sourceVisibility, [index]: answer }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The list a tab counts (`countFrom`): `\"widget\"` counts the child\n\t\t * widget's own list (its `content.register`, `content.schema` and\n\t\t * `content.filter`); an object `{ register, schema, filter? }` names\n\t\t * the list itself. Null for a tab that does not ask, or a child with\n\t\t * no list.\n\t\t *\n\t\t * @param {object|string} tab The `content.tabs[]` entry.\n\t\t * @return {{register: string, schema: string, filter: object}|null} The list.\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tcountSourceOf(tab) {\n\t\t\tconst from = tab && typeof tab === 'object' ? tab.countFrom : null\n\t\t\tlet source = null\n\t\t\tif (from === 'widget') {\n\t\t\t\t// A stack counts its first widget that has a list.\n\t\t\t\tconst lists = this.tabWidgetIds(tab)\n\t\t\t\t\t.map((id) => this.availableWidgets.find((w) => w && w.id === id))\n\t\t\t\t\t.filter((w) => w && w.content && typeof w.content === 'object' && w.content.register && w.content.schema)\n\t\t\t\tsource = lists.length ? lists[0].content : null\n\t\t\t} else if (from && typeof from === 'object') {\n\t\t\t\tsource = from\n\t\t\t}\n\t\t\tif (!source || typeof source.register !== 'string' || source.register === '' || typeof source.schema !== 'string' || source.schema === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst filter = source.filter && typeof source.filter === 'object' && !Array.isArray(source.filter) ? source.filter : {}\n\t\t\treturn { register: source.register, schema: source.schema, filter }\n\t\t},\n\n\t\t/**\n\t\t * Count the list behind every tab with `countFrom`: once on mount,\n\t\t * when the record changes and after a refresh. A tab keeps its last\n\t\t * total while the new one is on its way; a failed count shows none.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list\n\t\t */\n\t\tasync refreshWidgetCounts() {\n\t\t\tconst tabs = Array.isArray(this.content?.tabs) ? this.content.tabs : []\n\t\t\tconst seq = ++this.countSeq\n\t\t\tconst ctx = { objectId: this.objectId, object: this.objectData || undefined }\n\t\t\tawait Promise.all(tabs.map(async (tab, index) => {\n\t\t\t\tconst source = this.countSourceOf(tab)\n\t\t\t\tif (!source) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst total = await fetchListTotal(source.register, source.schema, source.filter, ctx).catch(() => null)\n\t\t\t\tif (seq === this.countSeq) {\n\t\t\t\t\tthis.widgetCounts = { ...this.widgetCounts, [index]: total }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/** @return {string} The route hash without its `#`, or ''. */\n\t\tcurrentHash() {\n\t\t\tconst fromRoute = this.$route && typeof this.$route.hash === 'string' ? this.$route.hash : ''\n\t\t\tconst raw = fromRoute !== '' ? fromRoute : (typeof window !== 'undefined' && window.location ? window.location.hash : '')\n\t\t\treturn typeof raw === 'string' ? raw.replace(/^#/, '') : ''\n\t\t},\n\n\t\t/**\n\t\t * After the active tab went, point a deep link's hash at the tab now showing.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tsyncHash() {\n\t\t\tconst id = this.activeTab?.id\n\t\t\tconst route = this.$route\n\t\t\tif (!id || !route || !route.hash || !this.$router || typeof this.$router.replace !== 'function') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$router.replace({ hash: `#${id}`, query: route.query })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a geo child's save so the surface can reload the record.\n\t\t *\n\t\t * @param {object} geo The saved geometry.\n\t\t * @return {void}\n\t\t */\n\t\tonGeoSaved(geo) {\n\t\t\t/**\n\t\t\t * @event geo-saved Re-emitted from a geo child that saved a geometry.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('geo-saved', geo)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's request to open an integration.\n\t\t *\n\t\t * @param {string} integrationId The integration to open.\n\t\t * @return {void}\n\t\t */\n\t\tonOpenIntegration(integrationId) {\n\t\t\t/**\n\t\t\t * @event open-integration Re-emitted from a related child asking to open an integration.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('open-integration', integrationId)\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a related child's object click; the page opens the object.\n\t\t *\n\t\t * @param {object} raw The clicked object.\n\t\t * @return {void}\n\t\t */\n\t\tonSelectObject(raw) {\n\t\t\t/**\n\t\t\t * @event select-object Re-emitted from a related child whose object row was clicked. Payload is the raw object.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('select-object', raw)\n\t\t},\n\n\t\t/**\n\t\t * Follow the strip's own selection, so keyboard navigation moves the\n\t\t * hoisted Actions menu too.\n\t\t *\n\t\t * @param {number} index The newly selected tab index.\n\t\t * @return {void}\n\t\t */\n\t\tonTabChange(index) {\n\t\t\tif (typeof index === 'number' && index >= 0) {\n\t\t\t\tthis.activeIndex = index\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Empty-state text for a tab whose widget id resolves to nothing.\n\t\t *\n\t\t * @param {object} entry The resolved tab.\n\t\t * @return {string} The message.\n\t\t */\n\t\tmissingLabel(entry) {\n\t\t\treturn t('nextcloud-vue', 'No widget found for \"{id}\"', { id: entry.widgetId || '' })\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* A stack (`widgetIds`): the panel's widget, then cards 20px apart. */\n.cn-tabs-widget__stack {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 20px;\n}\n\n/* A gridded stack (`columns` / `layout` on the tab): 12 columns, widgets wrap\n onto the next row, a row's cards as tall as the tallest. Narrow, it is the\n plain stack again. */\n.cn-tabs-widget__stack--grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(12, minmax(0, 1fr));\n\talign-items: stretch;\n}\n\n.cn-tabs-widget__stack--grid > * {\n\tmin-width: 0;\n}\n\n@media (max-width: 700px) {\n\t.cn-tabs-widget__stack--grid {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n\n\t.cn-tabs-widget__stack--grid > * {\n\t\tgrid-column: auto !important;\n\t}\n}\n\n/* The panel is the card; the strip is not inside it. There is no title bar\n above the tabs either: the open tab names the panel, so a title row would\n say the same thing twice and cost a row of height on a card that is mostly\n content.\n\n The card chrome used to wrap the strip as well, which drew a border and a\n pair of rounded corners ABOVE the tabs and boxed them in. Folder tabs are\n drawn as the edge of the sheet they open, so a second edge around them\n reads as a header the widget does not have. Border, radius and background\n now live on the panel below, and the strip sits bare on the page. */\n/* The class is doubled on purpose, and the four properties below are RESET\n rather than simply omitted.\n\n Nextcloud serves every enabled app's assets on every page, each app bundles\n this library's compiled CSS, and the Vue scope id is derived from the file\n PATH, so `data-v-1dbd6122` is byte-identical across library versions. An app\n still on an older release therefore ships a rule with exactly this selector\n and the OLD declarations, and it lands on the pages of an app already on the\n new one. Measured on a dossiq case page: three stale copies of the pre-fix\n rule, one from hermiq's `companion.css` (its companion bundle loads on every\n page by design) and two inline from other apps' bundles. Same specificity,\n so source order decided, and the card border came back around the strip.\n\n Dropping a declaration cannot beat a rule that sets it, so `border` and the\n rest are explicitly zeroed. Doubling the class takes this selector to\n (0,3,0) against the stale (0,2,0), which wins on specificity rather than on\n `!important` or on load order this library does not control. The same\n technique, for the same reason, is used on `.cn-tabs__nav .cn-tabs__nav-item`\n in CnTabs to beat Nextcloud's own button margin. */\n.cn-tabs-widget.cn-tabs-widget {\n\tbackground-color: transparent;\n\tborder: 0;\n\tborder-radius: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tmin-height: 0;\n\toverflow: visible;\n\tpadding: 0;\n}\n\n/* No inset, so the first tab starts at the panel's own left edge. The 8px\n here was there to clear the card's rounded top corner; that corner is gone\n from the strip now, and the inset it existed for left the first tab floating\n 8px inside the sheet it opens.\n\n The bar's own bottom rule is switched off and redrawn as a pseudo-element\n that stops one corner radius short of the right edge. CnTabs draws its rule\n across the bar's whole width, which is the sheet's top edge everywhere\n except at the far right, where the panel's top-right corner curves away\n below it: the rule ran straight on to the widget's edge and read as a\n border sticking out past a rounded corner (Ruben, 2026-09-13). Ending it\n where the curve begins makes the rule and the curve one continuous edge. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar) {\n\tborder-bottom: none;\n\tpadding: 0;\n\tposition: relative;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tabs__bar::after) {\n\tborder-bottom: 1px solid var(--color-border);\n\tcontent: '';\n\tinset-block-end: 0;\n\tinset-inline: 0 var(--border-radius-large);\n\tpointer-events: none;\n\tposition: absolute;\n}\n\n/* The open tab erases the slice of the rule directly above the panel with its\n own background-coloured bottom edge, which only works if it paints ABOVE the\n pseudo-element: a positioned pseudo-element otherwise paints over every\n in-flow sibling, rule included. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__nav-item--active) {\n\tposition: relative;\n\tz-index: 1;\n}\n\n.cn-tabs-widget__tabs {\n\tdisplay: flex;\n\tflex-direction: column;\n\t/* Grow to the widget's height, so the panel fills the grid cell the\n\t layout gave it. Without this the strip plus the open panel took only\n\t the height of the panel's content, and a cell of nine rows ended in\n\t 130px of nothing under a sheet that stopped short of its own card. */\n\tflex: 1 1 auto;\n\tmin-height: 0;\n}\n\n/* The panel area is the scroll region, so the strip stays put while a long\n child scrolls under it.\n\n Padded on all four sides. The top was once zeroed to protect the join with\n the open tab, but padding sits inside the painted box — only a margin would\n have opened that gap, and a zero top put every panel's content against the\n strip. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content) {\n\tbackground-color: var(--color-main-background);\n\t/* Three sides only: the bar's rule (redrawn above, stopping at the corner)\n\t is this sheet's top edge, and the open tab erases the slice of it\n\t directly above the panel so the two read as one surface. A border-top\n\t here would put a second line under that tab which the tab cannot paint\n\t over. */\n\tborder: 1px solid var(--color-border);\n\tborder-top: none;\n\t/* Three rounded corners. The top-left stays square because the first tab\n\t is drawn joined to the panel there, and a curve under it would curl the\n\t sheet away from that tab. The top-right has no tab above it: the strip\n\t ends where the last tab ends and the Actions menu floats free, so a\n\t square corner there read as a sheet cut off, not as a tab's edge. */\n\tborder-radius: 0 var(--border-radius-large) var(--border-radius-large) var(--border-radius-large);\n\tflex: 1 1 auto;\n\tmin-height: 0;\n\toverflow: auto;\n\tpadding: 12px;\n}\n\n.cn-tabs-widget__tabs :deep(.cn-tab) {\n\theight: 100%;\n}\n\n/* A list widget's footer Add bleeds through its card's 16px content padding\n (margin 0 -16px -16px). The panel of a tab pads 12px, so on a tab that\n holds the list directly the footer stuck out 4px on the right and at the\n bottom and made the panel scroll. It bleeds exactly the panel's padding. */\n.cn-tabs-widget__tabs :deep(.cn-tabs__content > .cn-tab > .cn-detail-widget-host--bare .cn-object-list-widget__add) {\n\tmargin: auto -12px -12px;\n}\n\n.cn-tabs-widget__title {\n\talign-items: center;\n\tdisplay: inline-flex;\n\tgap: 6px;\n}\n\n.cn-tabs-widget__title-icon {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["_createVNode","_createElementBlock","_Fragment","_renderList","_createBlock","_openBlock","_createElementVNode","_createTextVNode","_toDisplayString","_normalizeClass","_normalizeStyle"],"mappings":";;AAWM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,gBAAgB,GAAA;AA6DjB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;;;;;;;;;;;;;;IA5DrCA;AACC,MAAA,YAAU,EAAE,QAAU,CAAA,UAAA;eACb,EAAE,QAAQ,CAAA,SAAA;aACZ,EAAE,QAAY,CAAA,YAAA;AACtB,MAAA,KAAK,EAAC,sBAAY;AACjB,MAAA,sBAAa,EAAA,QAAA,CAAA,WAAA;;AAIH,MAAA,SAAO,gBAqCF;mBAAA,CAAA,wBAAA,EAAA;AAnCb,UAAA,WAAW,EAAE,MAAK,CAAA,WAAA;AAClB,UAAA,kBAAmB,EAAC,MAAkB,CAAA,kBAAA;AACtC,UAAA,iBAAiB,EAAE,MAAgB,CAAA,iBAAA;AACnC,UAAA,gBAAgB,EAAE,MAAc,CAAA,gBAAA;AAChC,UAAA,Q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ud/vue';
|
|
|
7
7
|
import { ref, inject } from 'vue';
|
|
8
8
|
import { taskDueLabel, taskDeepLink } from '../../composables/indexSources.js';
|
|
9
9
|
import { useEndpointSource } from '../../composables/useEndpointSource.js';
|
|
10
|
+
import { contentHeaderLink } from '../../utils/contentHeaderLink.js';
|
|
10
11
|
import { openRowTarget } from '../../utils/linkNavigation.js';
|
|
11
12
|
import { preventMiddleClickAutoscroll, isRowMiddleClick } from '../../utils/rowAuxClick.js';
|
|
12
13
|
|
|
@@ -102,8 +103,14 @@ var script = {
|
|
|
102
103
|
* receiving the task uuid as `:id`. Omitted = the click opens the
|
|
103
104
|
* task's openregister deep link instead.
|
|
104
105
|
* - `emptyText` — override for the empty-inbox line.
|
|
106
|
+
* - `variant` — `list` draws a checkbox list: a checkbox that completes
|
|
107
|
+
* the viewer's own task, the title, the subject on a second muted
|
|
108
|
+
* line and the due date at its right. Default: the compact rows.
|
|
109
|
+
* - `viewAllRoute` / `viewAllLabel` — a "View all" text link in the
|
|
110
|
+
* card header: a route name or location `{ name, params?, query? }`,
|
|
111
|
+
* and its label (default "View all"). `headerLink` works too.
|
|
105
112
|
*
|
|
106
|
-
* @type {{scope?: string, limit?: number, pollSeconds?: number, rowRoute?: string, emptyText?: string}}
|
|
113
|
+
* @type {{scope?: string, limit?: number, pollSeconds?: number, rowRoute?: string, emptyText?: string, variant?: string, viewAllRoute?: (string|object), viewAllLabel?: string}}
|
|
107
114
|
*/
|
|
108
115
|
content: {
|
|
109
116
|
type: Object,
|
|
@@ -131,6 +138,8 @@ var script = {
|
|
|
131
138
|
},
|
|
132
139
|
},
|
|
133
140
|
|
|
141
|
+
emits: ['header'],
|
|
142
|
+
|
|
134
143
|
setup(props) {
|
|
135
144
|
// The shared endpoint engine owns request dedup, the short-TTL cache
|
|
136
145
|
// and the cn:page:refresh / cn:widget:refresh subscriptions — the
|
|
@@ -170,10 +179,30 @@ var script = {
|
|
|
170
179
|
data() {
|
|
171
180
|
return {
|
|
172
181
|
pollTimer: null,
|
|
182
|
+
/** Uuids of the tasks a checkbox is completing, until the next read. */
|
|
183
|
+
completing: [],
|
|
173
184
|
}
|
|
174
185
|
},
|
|
175
186
|
|
|
176
187
|
computed: {
|
|
188
|
+
/**
|
|
189
|
+
* Whether the rows draw as the checkbox list (`content.variant: 'list'`).
|
|
190
|
+
*
|
|
191
|
+
* @return {boolean}
|
|
192
|
+
*/
|
|
193
|
+
isList() {
|
|
194
|
+
return this.content.variant === 'list'
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The header "View all" link the content declares, or null.
|
|
199
|
+
*
|
|
200
|
+
* @return {object|null}
|
|
201
|
+
*/
|
|
202
|
+
headerLink() {
|
|
203
|
+
return contentHeaderLink(this.content)
|
|
204
|
+
},
|
|
205
|
+
|
|
177
206
|
/**
|
|
178
207
|
* Effective translate function: the explicit prop, then the injected
|
|
179
208
|
* host one, then `@nextcloud/l10n` under the library's own app id.
|
|
@@ -274,6 +303,19 @@ var script = {
|
|
|
274
303
|
},
|
|
275
304
|
},
|
|
276
305
|
|
|
306
|
+
watch: {
|
|
307
|
+
headerLink: {
|
|
308
|
+
immediate: true,
|
|
309
|
+
handler(link) {
|
|
310
|
+
/**
|
|
311
|
+
* @event header Emitted with the card header's parts: the "View all" link, if any.
|
|
312
|
+
* @type {{link: (object|null), note: string}}
|
|
313
|
+
*/
|
|
314
|
+
this.$emit('header', { link, note: '' });
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
|
|
277
319
|
mounted() {
|
|
278
320
|
this.startPolling();
|
|
279
321
|
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
|
@@ -340,6 +382,43 @@ var script = {
|
|
|
340
382
|
return task.displayTitle || task.title || String(task.uuid || '')
|
|
341
383
|
},
|
|
342
384
|
|
|
385
|
+
/**
|
|
386
|
+
* The subject (the case a task sits on), for the list variant's second line.
|
|
387
|
+
*
|
|
388
|
+
* @param {object} task The task row.
|
|
389
|
+
* @return {string} The subject's title, or ''.
|
|
390
|
+
*/
|
|
391
|
+
subjectOf(task) {
|
|
392
|
+
return task.subject && task.subject.title ? String(task.subject.title) : ''
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Whether the list variant draws a checkbox on the row: the viewer's own
|
|
397
|
+
* open task, with no outcome list to choose from.
|
|
398
|
+
*
|
|
399
|
+
* @param {object} task The task row.
|
|
400
|
+
* @return {boolean}
|
|
401
|
+
*/
|
|
402
|
+
canCheck(task) {
|
|
403
|
+
return this.canComplete(task) && !(Array.isArray(task.outcomes) && task.outcomes.length > 0)
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Complete a task from its checkbox, with the server's default outcome.
|
|
408
|
+
*
|
|
409
|
+
* @param {object} task The task row.
|
|
410
|
+
* @return {Promise<void>}
|
|
411
|
+
*/
|
|
412
|
+
async check(task) {
|
|
413
|
+
const uuid = String(task.uuid || '');
|
|
414
|
+
if (uuid === '' || this.completing.includes(uuid)) {
|
|
415
|
+
return
|
|
416
|
+
}
|
|
417
|
+
this.completing = [...this.completing, uuid];
|
|
418
|
+
await this.postVerb(task, 'complete', { outcome: 'done' });
|
|
419
|
+
this.completing = this.completing.filter((id) => id !== uuid);
|
|
420
|
+
},
|
|
421
|
+
|
|
343
422
|
/**
|
|
344
423
|
* The secondary line: subject, state and priority — whichever of
|
|
345
424
|
* those the row actually carries, in words.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnTasksWidget.vue2.js","sources":["../../../../src/components/CnTasksWidget/CnTasksWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-tasks-widget\">\n\t\t<!-- One quiet line on failure, never a leaked axios status string\n\t\t (ADR-062). The real error goes to the console. -->\n\t\t<p v-if=\"error\" class=\"cn-tasks-widget__error\">\n\t\t\t{{ tr('Could not load the tasks') }}\n\t\t</p>\n\t\t<div v-else-if=\"loading && rows.length === 0\" class=\"cn-tasks-widget__loading\">\n\t\t\t<NcLoadingIcon :size=\"24\" />\n\t\t</div>\n\t\t<!-- An empty inbox is the GOOD state, not an error and not a void:\n\t\t one muted line, no illustration. -->\n\t\t<p v-else-if=\"rows.length === 0\" class=\"cn-tasks-widget__empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<template v-else>\n\t\t\t<!-- The count states the server TOTAL, never the rendered length\n\t\t\t (ADR-062): the number a person acts on is how much work\n\t\t\t exists, not how much fits the cell. -->\n\t\t\t<p class=\"cn-tasks-widget__count\">\n\t\t\t\t{{ countLabel }}\n\t\t\t</p>\n\t\t\t<ul class=\"cn-tasks-widget__list\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"task in rows\"\n\t\t\t\t\t:key=\"task.uuid\"\n\t\t\t\t\tclass=\"cn-tasks-widget__row\"\n\t\t\t\t\t:data-state=\"task.state\"\n\t\t\t\t\t@click=\"onRowClick(task, $event)\"\n\t\t\t\t\t@mousedown=\"preventMiddleClickAutoscroll\"\n\t\t\t\t\t@auxclick=\"onRowAuxClick(task, $event)\">\n\t\t\t\t\t<span class=\"cn-tasks-widget__body\">\n\t\t\t\t\t\t<span class=\"cn-tasks-widget__name\">{{ titleOf(task) }}</span>\n\t\t\t\t\t\t<span class=\"cn-tasks-widget__meta\">{{ metaLine(task) }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<!-- Overdue is carried by the WORDING (taskDueLabel) and by\n\t\t\t\t\t weight; the colour only reinforces it. -->\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"cn-tasks-widget__due\"\n\t\t\t\t\t\t:class=\"{ 'cn-tasks-widget__due--overdue': task.overdue === true }\">\n\t\t\t\t\t\t{{ dueLabel(task) }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<!-- Only verbs the contract can accept are offered; the\n\t\t\t\t\t server still authorizes, and a refusal is toasted in\n\t\t\t\t\t its own words. Stopped clicks: the menu must not also\n\t\t\t\t\t open the row. -->\n\t\t\t\t\t<NcActions\n\t\t\t\t\t\tv-if=\"canClaim(task) || canComplete(task)\"\n\t\t\t\t\t\tclass=\"cn-tasks-widget__actions\"\n\t\t\t\t\t\t:forceMenu=\"true\"\n\t\t\t\t\t\t:aria-label=\"tr('Task actions')\"\n\t\t\t\t\t\t@click.stop>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"canClaim(task)\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"claim(task)\">\n\t\t\t\t\t\t\t{{ tr('Claim') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<template v-if=\"canComplete(task)\">\n\t\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\t\tv-for=\"outcome in outcomesOf(task)\"\n\t\t\t\t\t\t\t\t:key=\"outcomeId(outcome)\"\n\t\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t\t@click=\"complete(task, outcomeId(outcome))\">\n\t\t\t\t\t\t\t\t{{ completeLabel(outcome) }}\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActions>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<!-- The remainder is a count, never a scrollbar (ADR-062). -->\n\t\t\t<p v-if=\"hiddenCount > 0\" class=\"cn-tasks-widget__more\">\n\t\t\t\t{{ moreLabel }}\n\t\t\t</p>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { showError } from '@nextcloud/dialogs'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcActionButton, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport { taskDeepLink, taskDueLabel } from '../../composables/indexSources.js'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { openRowTarget } from '../../utils/linkNavigation.js'\nimport { isRowMiddleClick, preventMiddleClickAutoscroll } from '../../utils/rowAuxClick.js'\n\n/**\n * The OpenRegister inbox read (openregister flow-task-entity). One endpoint\n * for the whole fleet: every app's human tasks live on OpenRegister's one\n * task store, so the widget is app-agnostic and ships no controller.\n *\n * @type {string}\n */\nconst FLOW_TASKS_URL = '/apps/openregister/api/flow-tasks'\n\n/**\n * The CMMN states, in the reading a dashboard needs. Labels double as the\n * meta-line words, so state never rests on styling.\n *\n * @type {Record<string, string>}\n */\nconst STATE_LABELS = {\n\tavailable: 'Available',\n\tenabled: 'Ready to claim',\n\tactive: 'In progress',\n\tcompleted: 'Completed',\n\tterminated: 'Terminated',\n\tdisabled: 'Disabled',\n}\n\n/**\n * The priority vocabulary (openregister Task::PRIORITIES).\n *\n * @type {Record<string, string>}\n */\nconst PRIORITY_LABELS = {\n\tlow: 'Low',\n\tnormal: 'Normal',\n\thigh: 'High',\n\turgent: 'Urgent',\n}\n\n/**\n * CnTasksWidget — the viewer's open tasks, from OpenRegister's task inbox.\n *\n * Reads `flow-tasks` with `isTerminal=false` (an inbox widget that showed\n * finished tasks would never drain), scoped by `content.scope` and sorted by\n * due date so the most urgent row sits on top. Placed by its registry type\n * key `tasks`:\n *\n * ```js\n * { id: 'my-tasks', type: 'tasks', title: 'My tasks',\n * content: { scope: 'assigned', limit: 6, pollSeconds: 30 } }\n * ```\n *\n * Why it polls: tasks are handed out, claimed and completed by OTHER people\n * and by flows, so a widget that only reflected its mount moment would be\n * wrong within minutes and look identical to being right. Polling pauses\n * while the tab is hidden.\n *\n * Quick actions offer only what the row's contract can accept: claim on a\n * pooled row, complete (per declared outcome) on the viewer's own open row.\n * The server still authorizes; a refusal surfaces its `error` message as a\n * toast and the widget refetches, so a lost claim race corrects the row.\n *\n * @spec openspec/changes/cn-tasks-entity-source/specs/cn-tasks-entity-source/spec.md\n */\nexport default {\n\tname: 'CnTasksWidget',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Host translate function, provided by CnAppRoot (identity by default)\n\t\t * so a library string localises through the consuming app's l10n.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's persisted configuration blob.\n\t\t *\n\t\t * - `scope` — whose relationship to list: `assigned` (default),\n\t\t * `pooled`, `watched` or `all`. Whose INBOX it is stays the\n\t\t * endpoint's decision; scope never names another user.\n\t\t * - `limit` — rows to request AND show (1–50, default 6). The count\n\t\t * line always states the server total regardless of this cap.\n\t\t * - `pollSeconds` — refetch interval (default 30; `0` disables).\n\t\t * - `rowRoute` — vue-router route NAME to open on a row click,\n\t\t * receiving the task uuid as `:id`. Omitted = the click opens the\n\t\t * task's openregister deep link instead.\n\t\t * - `emptyText` — override for the empty-inbox line.\n\t\t *\n\t\t * @type {{scope?: string, limit?: number, pollSeconds?: number, rowRoute?: string, emptyText?: string}}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Widget placement id, so the per-widget Refresh action\n\t\t * (`cn:widget:refresh`) reaches this instance's fetch.\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 * Translate function. Falls back to the injected `cnTranslate`.\n\t\t * Provide explicitly when mounting outside a CnAppRoot ancestor.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\t// The shared endpoint engine owns request dedup, the short-TTL cache\n\t\t// and the cn:page:refresh / cn:widget:refresh subscriptions — the\n\t\t// same binding CnFlowRunsWidget uses, so a page-level Refresh updates\n\t\t// this widget with everything else on the page.\n\t\tconst widgetIdRef = ref(props.widgetId)\n\t\tconst source = () => ({\n\t\t\turl: FLOW_TASKS_URL,\n\t\t\tmethod: 'GET',\n\t\t\tparams: {\n\t\t\t\tscope: normaliseScope(props.content && props.content.scope),\n\t\t\t\t// An inbox drains: finished tasks leave the widget. The index\n\t\t\t\t// page's \"everything\" tab is the place to read history.\n\t\t\t\tisTerminal: 'false',\n\t\t\t\t// Ascending due date: the most urgent (overdue first) on top.\n\t\t\t\tsort: 'dueAt',\n\t\t\t\tlimit: normaliseLimit(props.content && props.content.limit),\n\t\t\t},\n\t\t})\n\t\tconst { data, loading, error, refetch } = useEndpointSource(source, {\n\t\t\twidgetId: widgetIdRef,\n\t\t})\n\n\t\t// `inject` is re-read in setup so Vue 2.7 and Vue 3 resolve it\n\t\t// identically to the Options `inject` block (CnStatWidget precedent).\n\t\tconst injectedTranslate = inject('cnTranslate', null)\n\n\t\treturn {\n\t\t\tpayload: data,\n\t\t\tloading,\n\t\t\terror,\n\t\t\trefetch,\n\t\t\tinjectedTranslate,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tpollTimer: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Effective translate function: the explicit prop, then the injected\n\t\t * host one, then `@nextcloud/l10n` under the library's own app id.\n\t\t *\n\t\t * @return {(key: string) => string}\n\t\t */\n\t\ttr() {\n\t\t\tconst fn = this.translate ?? this.injectedTranslate ?? this.cnTranslate\n\t\t\tif (typeof fn === 'function') {\n\t\t\t\treturn (key) => fn(key)\n\t\t\t}\n\t\t\treturn (key) => t('nextcloud-vue', key)\n\t\t},\n\n\t\t/**\n\t\t * The signed-in viewer's uid, for the per-row action offer. Empty\n\t\t * outside a Nextcloud session (the offer then collapses to claim on\n\t\t * pooled rows only, which is the safe reading).\n\t\t *\n\t\t * @return {string} The uid, or ''.\n\t\t */\n\t\tviewerUid() {\n\t\t\treturn getCurrentUser()?.uid || ''\n\t\t},\n\n\t\t/**\n\t\t * The rows to render — the endpoint's bounded page, defensively\n\t\t * re-capped so a wider server default can never overflow the cell.\n\t\t *\n\t\t * @return {Array<object>} The task rows.\n\t\t */\n\t\trows() {\n\t\t\tconst results = (this.payload && this.payload.results) || []\n\t\t\tif (Array.isArray(results) === false) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn results.slice(0, normaliseLimit(this.content.limit))\n\t\t},\n\n\t\t/**\n\t\t * The server's honest total, independent of the rendered page.\n\t\t *\n\t\t * @return {number} The open-task total (never negative).\n\t\t */\n\t\ttotal() {\n\t\t\tconst total = Number((this.payload && this.payload.total) ?? this.rows.length)\n\t\t\tif (Number.isFinite(total) === false) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn Math.max(0, total)\n\t\t},\n\n\t\t/** The count line above the rows. */\n\t\tcountLabel() {\n\t\t\tif (this.total === 1) {\n\t\t\t\treturn this.tr('1 open task')\n\t\t\t}\n\t\t\treturn this.tr('{count} open tasks').replace('{count}', String(this.total))\n\t\t},\n\n\t\t/**\n\t\t * How many open tasks exist beyond the rendered rows.\n\t\t *\n\t\t * @return {number} The hidden task count (never negative).\n\t\t */\n\t\thiddenCount() {\n\t\t\treturn Math.max(0, this.total - this.rows.length)\n\t\t},\n\n\t\t/** The \"+N more\" line. */\n\t\tmoreLabel() {\n\t\t\treturn this.tr('+{count} more').replace('{count}', String(this.hiddenCount))\n\t\t},\n\n\t\t/** The empty-inbox line. */\n\t\temptyLabel() {\n\t\t\tconst override = this.content.emptyText\n\t\t\tif (typeof override === 'string' && override !== '') {\n\t\t\t\treturn this.tr(override)\n\t\t\t}\n\t\t\treturn this.tr('No open tasks')\n\t\t},\n\n\t\t/**\n\t\t * Poll interval in ms, or 0 when polling is off. Floored at 5s so a\n\t\t * mis-authored `pollSeconds: 0.1` cannot turn a dashboard into a\n\t\t * request storm; `0` remains an explicit opt-out.\n\t\t *\n\t\t * @return {number} The interval in milliseconds.\n\t\t */\n\t\tpollMs() {\n\t\t\tconst raw = this.content.pollSeconds\n\t\t\tconst seconds = (raw === undefined || raw === null) ? 30 : Number(raw)\n\t\t\tif (Number.isFinite(seconds) === false || seconds <= 0) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn Math.max(5, seconds) * 1000\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.startPolling()\n\t\tdocument.addEventListener('visibilitychange', this.onVisibilityChange)\n\t},\n\n\tbeforeUnmount() {\n\t\tthis.stopPolling()\n\t\tdocument.removeEventListener('visibilitychange', this.onVisibilityChange)\n\t},\n\n\tmethods: {\n\t\tpreventMiddleClickAutoscroll,\n\n\t\t/**\n\t\t * Start (or restart) the refetch interval, unless polling is off.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tstartPolling() {\n\t\t\tthis.stopPolling()\n\t\t\tif (this.pollMs === 0 || document.hidden === true) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.pollTimer = setInterval(() => {\n\t\t\t\tthis.refetch(true)\n\t\t\t}, this.pollMs)\n\t\t},\n\n\t\t/**\n\t\t * Clear the refetch interval.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tstopPolling() {\n\t\t\tif (this.pollTimer !== null) {\n\t\t\t\tclearInterval(this.pollTimer)\n\t\t\t\tthis.pollTimer = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Pause polling while the tab is hidden; refetch once and resume on\n\t\t * return, so the dashboard shows current work rather than whatever\n\t\t * was true when the tab was backgrounded.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonVisibilityChange() {\n\t\t\tif (document.hidden === true) {\n\t\t\t\tthis.stopPolling()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.refetch(true)\n\t\t\tthis.startPolling()\n\t\t},\n\n\t\t/**\n\t\t * The row's display title (server-synthesized when untitled).\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The title.\n\t\t */\n\t\ttitleOf(task) {\n\t\t\treturn task.displayTitle || task.title || String(task.uuid || '')\n\t\t},\n\n\t\t/**\n\t\t * The secondary line: subject, state and priority — whichever of\n\t\t * those the row actually carries, in words.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The meta line.\n\t\t */\n\t\tmetaLine(task) {\n\t\t\tconst parts = []\n\t\t\tif (task.subject && task.subject.title) {\n\t\t\t\tparts.push(String(task.subject.title))\n\t\t\t}\n\t\t\tconst state = STATE_LABELS[task.state]\n\t\t\tparts.push(state ? this.tr(state) : String(task.state || ''))\n\t\t\tconst priority = PRIORITY_LABELS[task.priority]\n\t\t\tif (priority && task.priority !== 'normal') {\n\t\t\t\tparts.push(this.tr(priority))\n\t\t\t}\n\t\t\treturn parts.join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * The due wording for a row, from the server's derived projection.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The due label, or '' without a due date.\n\t\t */\n\t\tdueLabel(task) {\n\t\t\treturn taskDueLabel(task)\n\t\t},\n\n\t\t/**\n\t\t * Whether the row offers claim: pooled (no assignee) and still open.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {boolean} True when claim is offered.\n\t\t */\n\t\tcanClaim(task) {\n\t\t\treturn !task.assignee && task.isTerminal !== true\n\t\t},\n\n\t\t/**\n\t\t * Whether the row offers complete: the viewer's own open task.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {boolean} True when complete is offered.\n\t\t */\n\t\tcanComplete(task) {\n\t\t\treturn this.viewerUid !== ''\n\t\t\t\t&& task.assignee === this.viewerUid\n\t\t\t\t&& task.isTerminal !== true\n\t\t},\n\n\t\t/**\n\t\t * The outcomes to offer on complete: the row's declared list, else\n\t\t * one entry for the server's default outcome.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {Array<object|string>} The outcome entries.\n\t\t */\n\t\toutcomesOf(task) {\n\t\t\tif (Array.isArray(task.outcomes) && task.outcomes.length > 0) {\n\t\t\t\treturn task.outcomes\n\t\t\t}\n\t\t\treturn ['done']\n\t\t},\n\n\t\t/**\n\t\t * The wire value of one outcome entry (a string, or `{id, label}`).\n\t\t *\n\t\t * @param {object|string} outcome The outcome entry.\n\t\t * @return {string} The outcome id.\n\t\t */\n\t\toutcomeId(outcome) {\n\t\t\tif (outcome && typeof outcome === 'object') {\n\t\t\t\treturn String(outcome.id ?? outcome.value ?? outcome.label ?? '')\n\t\t\t}\n\t\t\treturn String(outcome ?? '')\n\t\t},\n\n\t\t/**\n\t\t * The menu label for one complete entry.\n\t\t *\n\t\t * @param {object|string} outcome The outcome entry.\n\t\t * @return {string} The label.\n\t\t */\n\t\tcompleteLabel(outcome) {\n\t\t\tconst id = this.outcomeId(outcome)\n\t\t\tconst label = (outcome && typeof outcome === 'object' && outcome.label)\n\t\t\t\t? String(outcome.label)\n\t\t\t\t: id\n\t\t\tif (id === 'done') {\n\t\t\t\treturn this.tr('Complete')\n\t\t\t}\n\t\t\treturn this.tr('Complete: {outcome}').replace('{outcome}', label)\n\t\t},\n\n\t\t/**\n\t\t * Claim a pooled task.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tclaim(task) {\n\t\t\treturn this.postVerb(task, 'claim', {})\n\t\t},\n\n\t\t/**\n\t\t * Complete the viewer's own task with an outcome.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @param {string} outcome The chosen outcome id.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tcomplete(task, outcome) {\n\t\t\treturn this.postVerb(task, 'complete', { outcome })\n\t\t},\n\n\t\t/**\n\t\t * POST one lifecycle verb and refetch either way: on success the row\n\t\t * moved, and on a refusal (a lost claim race, a revoked task) the\n\t\t * list is stale in exactly the way the refusal proves. The refusal\n\t\t * itself is toasted in the SERVER'S words (ADR-062 forbids leaking\n\t\t * the raw status line, and the endpoint's `error` string is written\n\t\t * for people).\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @param {string} verb The lifecycle verb.\n\t\t * @param {object} body The verb body.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tasync postVerb(task, verb, body) {\n\t\t\tconst uuid = String(task.uuid || '')\n\t\t\tif (uuid === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`${FLOW_TASKS_URL}/${uuid}/${verb}`), body)\n\t\t\t} catch (error) {\n\t\t\t\tconst message = error?.response?.data?.error\n\t\t\t\tshowError(typeof message === 'string' && message !== ''\n\t\t\t\t\t? message\n\t\t\t\t\t: this.tr('The task action was refused'))\n\t\t\t}\n\t\t\tthis.refetch(true)\n\t\t},\n\n\t\t/**\n\t\t * Open the clicked task: the configured route with the uuid as `id`,\n\t\t * else the task's openregister deep link. A ctrl/cmd/shift or middle\n\t\t * click opens it in a new tab.\n\t\t *\n\t\t * @param {object} task The clicked task row.\n\t\t * @param {MouseEvent} [event] The originating click/auxclick event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowClick(task, event) {\n\t\t\tconst uuid = String(task.uuid || '')\n\t\t\tif (uuid === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst rowRoute = this.content.rowRoute\n\t\t\tif (typeof rowRoute === 'string' && rowRoute !== '' && this.$router) {\n\t\t\t\topenRowTarget(event, { name: rowRoute, params: { id: uuid } }, this.$router)\n\t\t\t\treturn\n\t\t\t}\n\t\t\topenRowTarget(event, taskDeepLink(uuid))\n\t\t},\n\n\t\t/**\n\t\t * Middle click on a task row: open it in a new tab.\n\t\t *\n\t\t * @param {object} task The clicked task row.\n\t\t * @param {MouseEvent} event The auxclick event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowAuxClick(task, event) {\n\t\t\tif (isRowMiddleClick(event)) {\n\t\t\t\tthis.onRowClick(task, event)\n\t\t\t}\n\t\t},\n\t},\n}\n\n/**\n * Clamp a configured row limit into the range the endpoint accepts.\n *\n * @param {unknown} raw The configured limit.\n * @return {number} A limit between 1 and 50 (default 6).\n */\nfunction normaliseLimit(raw) {\n\tconst n = Number(raw)\n\tif (Number.isFinite(n) === false || n <= 0) {\n\t\treturn 6\n\t}\n\treturn Math.min(50, Math.round(n))\n}\n\n/**\n * Clamp a configured scope onto the endpoint's vocabulary.\n *\n * @param {unknown} raw The configured scope.\n * @return {string} One of assigned, pooled, watched, all (default assigned).\n */\nfunction normaliseScope(raw) {\n\treturn ['assigned', 'pooled', 'watched', 'all'].includes(raw) ? raw : 'assigned'\n}\n</script>\n\n<style scoped>\n.cn-tasks-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-tasks-widget__loading {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 8px 0;\n}\n\n.cn-tasks-widget__empty,\n.cn-tasks-widget__error,\n.cn-tasks-widget__more {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-tasks-widget__more {\n\tpadding-top: 4px;\n}\n\n.cn-tasks-widget__count {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.04em;\n}\n\n.cn-tasks-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\tmin-width: 0;\n}\n\n.cn-tasks-widget__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 6px 0;\n\tborder-bottom: 1px solid var(--color-border);\n\tmin-width: 0;\n\tcursor: pointer;\n}\n\n.cn-tasks-widget__row:last-child {\n\tborder-bottom: none;\n}\n\n.cn-tasks-widget__body {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 0;\n\tflex: 1 1 auto;\n}\n\n.cn-tasks-widget__name {\n\tfont-weight: 600;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.cn-tasks-widget__row:hover .cn-tasks-widget__name {\n\ttext-decoration: underline;\n}\n\n.cn-tasks-widget__meta {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.cn-tasks-widget__due {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-variant-numeric: tabular-nums;\n}\n\n/* Overdue: weight AND colour on top of the wording, which already says\n \"Overdue by N days\" — the signal survives monochrome. */\n.cn-tasks-widget__due--overdue {\n\tcolor: var(--color-error, #d91f2d);\n\tfont-weight: 600;\n}\n\n.cn-tasks-widget__actions {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["t","axios"],"mappings":";;;;;;;;;;;;AA+FA;AACC;;;AAGA;;;AAGD,MAAM,cAAe,GAAE,oCAAkC;;AAEzD;;AAEC;AACA;;;AAGD,MAAM,eAAe;AACpB,CAAA,SAAS,EAAE,WAAW;CACtB,OAAO,EAAE,gBAAgB;AACzB,CAAA,MAAM,EAAE,aAAa;AACrB,CAAA,SAAS,EAAE,WAAW;CACtB,UAAU,EAAE,YAAY;AACxB,CAAA,QAAQ,EAAE,UAAU;AACrB,EAAA;;AAEA;;AAEC;;;AAGD,MAAM,kBAAkB;AACvB,CAAA,GAAG,EAAE,KAAK;AACV,CAAA,MAAM,EAAE,QAAQ;CAChB,IAAI,EAAE,MAAM;AACZ,CAAA,MAAM,EAAE,QAAQ;AACjB,EAAA;;AAEA;AACC;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;;;;AAIA;AACA;;AAEA;;;AAGA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,eAAe;;CAErB,UAAU,EAAE;AACX,EAAA,SAAS;AACT,EAAA,cAAc;EACd,aAAa;EACb;;AAED,CAAA,MAAM,EAAE;AACP;;;;AAIA,EAAA,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK;EAC5C;;AAED,CAAA,KAAK,EAA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,GAAA,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,EAAA;GACvC;;AAED;AACC;AACA;AACA;AACA;;;EAGD,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;GAC1B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;IAC5B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAA;AAC5B,IAAA;GACA;EACD;AACF,EAAA;;AAEA;;AAEC;AACA;AACA;;AAED,SAAS,cAAc,CAAC,GAAG,EAAE;AAC5B,CAAA,MAAM,IAAI,MAAM,CAAC,GAAG,EAAA;AACpB,CAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAE,KAAI,KAAI,IAAK,CAAA,IAAK,CAAC,EAAE;AAC3C,EAAA,OAAO,CAAA;AACR,EAAA;AACA,CAAA,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AAClC,CAAA;;AAEA;;AAEC;AACA;AACA;;AAED,SAAS,cAAc,CAAC,GAAG,EAAE;AAC5B,CAAA,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAA,GAAI,GAAI,GAAE,UAAS;AAChF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnTasksWidget.vue2.js","sources":["../../../../src/components/CnTasksWidget/CnTasksWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-tasks-widget\" :class=\"{ 'cn-tasks-widget--list': isList }\">\n\t\t<!-- One quiet line on failure, never a leaked axios status string\n\t\t (ADR-062). The real error goes to the console. -->\n\t\t<p v-if=\"error\" class=\"cn-tasks-widget__error\">\n\t\t\t{{ tr('Could not load the tasks') }}\n\t\t</p>\n\t\t<div v-else-if=\"loading && rows.length === 0\" class=\"cn-tasks-widget__loading\">\n\t\t\t<NcLoadingIcon :size=\"24\" />\n\t\t</div>\n\t\t<!-- An empty inbox is the GOOD state, not an error and not a void:\n\t\t one muted line, no illustration. -->\n\t\t<p v-else-if=\"rows.length === 0\" class=\"cn-tasks-widget__empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<template v-else>\n\t\t\t<!-- The count states the server TOTAL, never the rendered length\n\t\t\t (ADR-062): the number a person acts on is how much work\n\t\t\t exists, not how much fits the cell. -->\n\t\t\t<p v-if=\"!isList\" class=\"cn-tasks-widget__count\">\n\t\t\t\t{{ countLabel }}\n\t\t\t</p>\n\t\t\t<ul class=\"cn-tasks-widget__list\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"task in rows\"\n\t\t\t\t\t:key=\"task.uuid\"\n\t\t\t\t\tclass=\"cn-tasks-widget__row\"\n\t\t\t\t\t:data-state=\"task.state\"\n\t\t\t\t\t@click=\"onRowClick(task, $event)\"\n\t\t\t\t\t@mousedown=\"preventMiddleClickAutoscroll\"\n\t\t\t\t\t@auxclick=\"onRowAuxClick(task, $event)\">\n\t\t\t\t\t<!-- List variant: a checkbox completes the viewer's own task\n\t\t\t\t\t (the task with a declared outcome list keeps the menu, as\n\t\t\t\t\t a checkbox cannot choose an outcome). Other rows get a\n\t\t\t\t\t spacer so the titles stay aligned. -->\n\t\t\t\t\t<template v-if=\"isList\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tv-if=\"canCheck(task)\"\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tclass=\"cn-tasks-widget__check\"\n\t\t\t\t\t\t\t:checked=\"completing.includes(String(task.uuid))\"\n\t\t\t\t\t\t\t:disabled=\"completing.includes(String(task.uuid))\"\n\t\t\t\t\t\t\t:aria-label=\"tr('Mark {title} as done').replace('{title}', titleOf(task))\"\n\t\t\t\t\t\t\tdata-testid=\"cn-tasks-widget-check\"\n\t\t\t\t\t\t\t@click.stop\n\t\t\t\t\t\t\t@change=\"check(task)\">\n\t\t\t\t\t\t<span v-else class=\"cn-tasks-widget__check-spacer\" aria-hidden=\"true\" />\n\t\t\t\t\t\t<span class=\"cn-tasks-widget__body\">\n\t\t\t\t\t\t\t<span class=\"cn-tasks-widget__name\">{{ titleOf(task) }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-tasks-widget__meta cn-tasks-widget__meta--split\">\n\t\t\t\t\t\t\t\t<span class=\"cn-tasks-widget__subject\">{{ subjectOf(task) }}</span>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"cn-tasks-widget__due\"\n\t\t\t\t\t\t\t\t\t:class=\"{ 'cn-tasks-widget__due--overdue': task.overdue === true }\">\n\t\t\t\t\t\t\t\t\t{{ dueLabel(task) }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<span class=\"cn-tasks-widget__body\">\n\t\t\t\t\t\t\t<span class=\"cn-tasks-widget__name\">{{ titleOf(task) }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-tasks-widget__meta\">{{ metaLine(task) }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<!-- Overdue is carried by the WORDING (taskDueLabel) and by\n\t\t\t\t\t\t weight; the colour only reinforces it. -->\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclass=\"cn-tasks-widget__due\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-tasks-widget__due--overdue': task.overdue === true }\">\n\t\t\t\t\t\t\t{{ dueLabel(task) }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<!-- Only verbs the contract can accept are offered; the\n\t\t\t\t\t server still authorizes, and a refusal is toasted in\n\t\t\t\t\t its own words. Stopped clicks: the menu must not also\n\t\t\t\t\t open the row. -->\n\t\t\t\t\t<NcActions\n\t\t\t\t\t\tv-if=\"(canClaim(task) || canComplete(task)) && !(isList && canCheck(task))\"\n\t\t\t\t\t\tclass=\"cn-tasks-widget__actions\"\n\t\t\t\t\t\t:forceMenu=\"true\"\n\t\t\t\t\t\t:aria-label=\"tr('Task actions')\"\n\t\t\t\t\t\t@click.stop>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"canClaim(task)\"\n\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t@click=\"claim(task)\">\n\t\t\t\t\t\t\t{{ tr('Claim') }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<template v-if=\"canComplete(task)\">\n\t\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\t\tv-for=\"outcome in outcomesOf(task)\"\n\t\t\t\t\t\t\t\t:key=\"outcomeId(outcome)\"\n\t\t\t\t\t\t\t\t:closeAfterClick=\"true\"\n\t\t\t\t\t\t\t\t@click=\"complete(task, outcomeId(outcome))\">\n\t\t\t\t\t\t\t\t{{ completeLabel(outcome) }}\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActions>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<!-- The remainder is a count, never a scrollbar (ADR-062). -->\n\t\t\t<p v-if=\"hiddenCount > 0\" class=\"cn-tasks-widget__more\">\n\t\t\t\t{{ moreLabel }}\n\t\t\t</p>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport axios from '@nextcloud/axios'\nimport { showError } from '@nextcloud/dialogs'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcActionButton, NcActions, NcLoadingIcon } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport { taskDeepLink, taskDueLabel } from '../../composables/indexSources.js'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { contentHeaderLink } from '../../utils/contentHeaderLink.js'\nimport { openRowTarget } from '../../utils/linkNavigation.js'\nimport { isRowMiddleClick, preventMiddleClickAutoscroll } from '../../utils/rowAuxClick.js'\n\n/**\n * The OpenRegister inbox read (openregister flow-task-entity). One endpoint\n * for the whole fleet: every app's human tasks live on OpenRegister's one\n * task store, so the widget is app-agnostic and ships no controller.\n *\n * @type {string}\n */\nconst FLOW_TASKS_URL = '/apps/openregister/api/flow-tasks'\n\n/**\n * The CMMN states, in the reading a dashboard needs. Labels double as the\n * meta-line words, so state never rests on styling.\n *\n * @type {Record<string, string>}\n */\nconst STATE_LABELS = {\n\tavailable: 'Available',\n\tenabled: 'Ready to claim',\n\tactive: 'In progress',\n\tcompleted: 'Completed',\n\tterminated: 'Terminated',\n\tdisabled: 'Disabled',\n}\n\n/**\n * The priority vocabulary (openregister Task::PRIORITIES).\n *\n * @type {Record<string, string>}\n */\nconst PRIORITY_LABELS = {\n\tlow: 'Low',\n\tnormal: 'Normal',\n\thigh: 'High',\n\turgent: 'Urgent',\n}\n\n/**\n * CnTasksWidget — the viewer's open tasks, from OpenRegister's task inbox.\n *\n * Reads `flow-tasks` with `isTerminal=false` (an inbox widget that showed\n * finished tasks would never drain), scoped by `content.scope` and sorted by\n * due date so the most urgent row sits on top. Placed by its registry type\n * key `tasks`:\n *\n * ```js\n * { id: 'my-tasks', type: 'tasks', title: 'My tasks',\n * content: { scope: 'assigned', limit: 6, pollSeconds: 30 } }\n * ```\n *\n * Why it polls: tasks are handed out, claimed and completed by OTHER people\n * and by flows, so a widget that only reflected its mount moment would be\n * wrong within minutes and look identical to being right. Polling pauses\n * while the tab is hidden.\n *\n * Quick actions offer only what the row's contract can accept: claim on a\n * pooled row, complete (per declared outcome) on the viewer's own open row.\n * The server still authorizes; a refusal surfaces its `error` message as a\n * toast and the widget refetches, so a lost claim race corrects the row.\n *\n * @spec openspec/changes/cn-tasks-entity-source/specs/cn-tasks-entity-source/spec.md\n */\nexport default {\n\tname: 'CnTasksWidget',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Host translate function, provided by CnAppRoot (identity by default)\n\t\t * so a library string localises through the consuming app's l10n.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget's persisted configuration blob.\n\t\t *\n\t\t * - `scope` — whose relationship to list: `assigned` (default),\n\t\t * `pooled`, `watched` or `all`. Whose INBOX it is stays the\n\t\t * endpoint's decision; scope never names another user.\n\t\t * - `limit` — rows to request AND show (1–50, default 6). The count\n\t\t * line always states the server total regardless of this cap.\n\t\t * - `pollSeconds` — refetch interval (default 30; `0` disables).\n\t\t * - `rowRoute` — vue-router route NAME to open on a row click,\n\t\t * receiving the task uuid as `:id`. Omitted = the click opens the\n\t\t * task's openregister deep link instead.\n\t\t * - `emptyText` — override for the empty-inbox line.\n\t\t * - `variant` — `list` draws a checkbox list: a checkbox that completes\n\t\t * the viewer's own task, the title, the subject on a second muted\n\t\t * line and the due date at its right. Default: the compact rows.\n\t\t * - `viewAllRoute` / `viewAllLabel` — a \"View all\" text link in the\n\t\t * card header: a route name or location `{ name, params?, query? }`,\n\t\t * and its label (default \"View all\"). `headerLink` works too.\n\t\t *\n\t\t * @type {{scope?: string, limit?: number, pollSeconds?: number, rowRoute?: string, emptyText?: string, variant?: string, viewAllRoute?: (string|object), viewAllLabel?: string}}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Widget placement id, so the per-widget Refresh action\n\t\t * (`cn:widget:refresh`) reaches this instance's fetch.\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 * Translate function. Falls back to the injected `cnTranslate`.\n\t\t * Provide explicitly when mounting outside a CnAppRoot ancestor.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['header'],\n\n\tsetup(props) {\n\t\t// The shared endpoint engine owns request dedup, the short-TTL cache\n\t\t// and the cn:page:refresh / cn:widget:refresh subscriptions — the\n\t\t// same binding CnFlowRunsWidget uses, so a page-level Refresh updates\n\t\t// this widget with everything else on the page.\n\t\tconst widgetIdRef = ref(props.widgetId)\n\t\tconst source = () => ({\n\t\t\turl: FLOW_TASKS_URL,\n\t\t\tmethod: 'GET',\n\t\t\tparams: {\n\t\t\t\tscope: normaliseScope(props.content && props.content.scope),\n\t\t\t\t// An inbox drains: finished tasks leave the widget. The index\n\t\t\t\t// page's \"everything\" tab is the place to read history.\n\t\t\t\tisTerminal: 'false',\n\t\t\t\t// Ascending due date: the most urgent (overdue first) on top.\n\t\t\t\tsort: 'dueAt',\n\t\t\t\tlimit: normaliseLimit(props.content && props.content.limit),\n\t\t\t},\n\t\t})\n\t\tconst { data, loading, error, refetch } = useEndpointSource(source, {\n\t\t\twidgetId: widgetIdRef,\n\t\t})\n\n\t\t// `inject` is re-read in setup so Vue 2.7 and Vue 3 resolve it\n\t\t// identically to the Options `inject` block (CnStatWidget precedent).\n\t\tconst injectedTranslate = inject('cnTranslate', null)\n\n\t\treturn {\n\t\t\tpayload: data,\n\t\t\tloading,\n\t\t\terror,\n\t\t\trefetch,\n\t\t\tinjectedTranslate,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tpollTimer: null,\n\t\t\t/** Uuids of the tasks a checkbox is completing, until the next read. */\n\t\t\tcompleting: [],\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Whether the rows draw as the checkbox list (`content.variant: 'list'`).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisList() {\n\t\t\treturn this.content.variant === 'list'\n\t\t},\n\n\t\t/**\n\t\t * The header \"View all\" link the content declares, or null.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\theaderLink() {\n\t\t\treturn contentHeaderLink(this.content)\n\t\t},\n\n\t\t/**\n\t\t * Effective translate function: the explicit prop, then the injected\n\t\t * host one, then `@nextcloud/l10n` under the library's own app id.\n\t\t *\n\t\t * @return {(key: string) => string}\n\t\t */\n\t\ttr() {\n\t\t\tconst fn = this.translate ?? this.injectedTranslate ?? this.cnTranslate\n\t\t\tif (typeof fn === 'function') {\n\t\t\t\treturn (key) => fn(key)\n\t\t\t}\n\t\t\treturn (key) => t('nextcloud-vue', key)\n\t\t},\n\n\t\t/**\n\t\t * The signed-in viewer's uid, for the per-row action offer. Empty\n\t\t * outside a Nextcloud session (the offer then collapses to claim on\n\t\t * pooled rows only, which is the safe reading).\n\t\t *\n\t\t * @return {string} The uid, or ''.\n\t\t */\n\t\tviewerUid() {\n\t\t\treturn getCurrentUser()?.uid || ''\n\t\t},\n\n\t\t/**\n\t\t * The rows to render — the endpoint's bounded page, defensively\n\t\t * re-capped so a wider server default can never overflow the cell.\n\t\t *\n\t\t * @return {Array<object>} The task rows.\n\t\t */\n\t\trows() {\n\t\t\tconst results = (this.payload && this.payload.results) || []\n\t\t\tif (Array.isArray(results) === false) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn results.slice(0, normaliseLimit(this.content.limit))\n\t\t},\n\n\t\t/**\n\t\t * The server's honest total, independent of the rendered page.\n\t\t *\n\t\t * @return {number} The open-task total (never negative).\n\t\t */\n\t\ttotal() {\n\t\t\tconst total = Number((this.payload && this.payload.total) ?? this.rows.length)\n\t\t\tif (Number.isFinite(total) === false) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn Math.max(0, total)\n\t\t},\n\n\t\t/** The count line above the rows. */\n\t\tcountLabel() {\n\t\t\tif (this.total === 1) {\n\t\t\t\treturn this.tr('1 open task')\n\t\t\t}\n\t\t\treturn this.tr('{count} open tasks').replace('{count}', String(this.total))\n\t\t},\n\n\t\t/**\n\t\t * How many open tasks exist beyond the rendered rows.\n\t\t *\n\t\t * @return {number} The hidden task count (never negative).\n\t\t */\n\t\thiddenCount() {\n\t\t\treturn Math.max(0, this.total - this.rows.length)\n\t\t},\n\n\t\t/** The \"+N more\" line. */\n\t\tmoreLabel() {\n\t\t\treturn this.tr('+{count} more').replace('{count}', String(this.hiddenCount))\n\t\t},\n\n\t\t/** The empty-inbox line. */\n\t\temptyLabel() {\n\t\t\tconst override = this.content.emptyText\n\t\t\tif (typeof override === 'string' && override !== '') {\n\t\t\t\treturn this.tr(override)\n\t\t\t}\n\t\t\treturn this.tr('No open tasks')\n\t\t},\n\n\t\t/**\n\t\t * Poll interval in ms, or 0 when polling is off. Floored at 5s so a\n\t\t * mis-authored `pollSeconds: 0.1` cannot turn a dashboard into a\n\t\t * request storm; `0` remains an explicit opt-out.\n\t\t *\n\t\t * @return {number} The interval in milliseconds.\n\t\t */\n\t\tpollMs() {\n\t\t\tconst raw = this.content.pollSeconds\n\t\t\tconst seconds = (raw === undefined || raw === null) ? 30 : Number(raw)\n\t\t\tif (Number.isFinite(seconds) === false || seconds <= 0) {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t\treturn Math.max(5, seconds) * 1000\n\t\t},\n\t},\n\n\twatch: {\n\t\theaderLink: {\n\t\t\timmediate: true,\n\t\t\thandler(link) {\n\t\t\t\t/**\n\t\t\t\t * @event header Emitted with the card header's parts: the \"View all\" link, if any.\n\t\t\t\t * @type {{link: (object|null), note: string}}\n\t\t\t\t */\n\t\t\t\tthis.$emit('header', { link, note: '' })\n\t\t\t},\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.startPolling()\n\t\tdocument.addEventListener('visibilitychange', this.onVisibilityChange)\n\t},\n\n\tbeforeUnmount() {\n\t\tthis.stopPolling()\n\t\tdocument.removeEventListener('visibilitychange', this.onVisibilityChange)\n\t},\n\n\tmethods: {\n\t\tpreventMiddleClickAutoscroll,\n\n\t\t/**\n\t\t * Start (or restart) the refetch interval, unless polling is off.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tstartPolling() {\n\t\t\tthis.stopPolling()\n\t\t\tif (this.pollMs === 0 || document.hidden === true) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.pollTimer = setInterval(() => {\n\t\t\t\tthis.refetch(true)\n\t\t\t}, this.pollMs)\n\t\t},\n\n\t\t/**\n\t\t * Clear the refetch interval.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tstopPolling() {\n\t\t\tif (this.pollTimer !== null) {\n\t\t\t\tclearInterval(this.pollTimer)\n\t\t\t\tthis.pollTimer = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Pause polling while the tab is hidden; refetch once and resume on\n\t\t * return, so the dashboard shows current work rather than whatever\n\t\t * was true when the tab was backgrounded.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonVisibilityChange() {\n\t\t\tif (document.hidden === true) {\n\t\t\t\tthis.stopPolling()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.refetch(true)\n\t\t\tthis.startPolling()\n\t\t},\n\n\t\t/**\n\t\t * The row's display title (server-synthesized when untitled).\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The title.\n\t\t */\n\t\ttitleOf(task) {\n\t\t\treturn task.displayTitle || task.title || String(task.uuid || '')\n\t\t},\n\n\t\t/**\n\t\t * The subject (the case a task sits on), for the list variant's second line.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The subject's title, or ''.\n\t\t */\n\t\tsubjectOf(task) {\n\t\t\treturn task.subject && task.subject.title ? String(task.subject.title) : ''\n\t\t},\n\n\t\t/**\n\t\t * Whether the list variant draws a checkbox on the row: the viewer's own\n\t\t * open task, with no outcome list to choose from.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {boolean}\n\t\t */\n\t\tcanCheck(task) {\n\t\t\treturn this.canComplete(task) && !(Array.isArray(task.outcomes) && task.outcomes.length > 0)\n\t\t},\n\n\t\t/**\n\t\t * Complete a task from its checkbox, with the server's default outcome.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync check(task) {\n\t\t\tconst uuid = String(task.uuid || '')\n\t\t\tif (uuid === '' || this.completing.includes(uuid)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.completing = [...this.completing, uuid]\n\t\t\tawait this.postVerb(task, 'complete', { outcome: 'done' })\n\t\t\tthis.completing = this.completing.filter((id) => id !== uuid)\n\t\t},\n\n\t\t/**\n\t\t * The secondary line: subject, state and priority — whichever of\n\t\t * those the row actually carries, in words.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The meta line.\n\t\t */\n\t\tmetaLine(task) {\n\t\t\tconst parts = []\n\t\t\tif (task.subject && task.subject.title) {\n\t\t\t\tparts.push(String(task.subject.title))\n\t\t\t}\n\t\t\tconst state = STATE_LABELS[task.state]\n\t\t\tparts.push(state ? this.tr(state) : String(task.state || ''))\n\t\t\tconst priority = PRIORITY_LABELS[task.priority]\n\t\t\tif (priority && task.priority !== 'normal') {\n\t\t\t\tparts.push(this.tr(priority))\n\t\t\t}\n\t\t\treturn parts.join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * The due wording for a row, from the server's derived projection.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {string} The due label, or '' without a due date.\n\t\t */\n\t\tdueLabel(task) {\n\t\t\treturn taskDueLabel(task)\n\t\t},\n\n\t\t/**\n\t\t * Whether the row offers claim: pooled (no assignee) and still open.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {boolean} True when claim is offered.\n\t\t */\n\t\tcanClaim(task) {\n\t\t\treturn !task.assignee && task.isTerminal !== true\n\t\t},\n\n\t\t/**\n\t\t * Whether the row offers complete: the viewer's own open task.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {boolean} True when complete is offered.\n\t\t */\n\t\tcanComplete(task) {\n\t\t\treturn this.viewerUid !== ''\n\t\t\t\t&& task.assignee === this.viewerUid\n\t\t\t\t&& task.isTerminal !== true\n\t\t},\n\n\t\t/**\n\t\t * The outcomes to offer on complete: the row's declared list, else\n\t\t * one entry for the server's default outcome.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {Array<object|string>} The outcome entries.\n\t\t */\n\t\toutcomesOf(task) {\n\t\t\tif (Array.isArray(task.outcomes) && task.outcomes.length > 0) {\n\t\t\t\treturn task.outcomes\n\t\t\t}\n\t\t\treturn ['done']\n\t\t},\n\n\t\t/**\n\t\t * The wire value of one outcome entry (a string, or `{id, label}`).\n\t\t *\n\t\t * @param {object|string} outcome The outcome entry.\n\t\t * @return {string} The outcome id.\n\t\t */\n\t\toutcomeId(outcome) {\n\t\t\tif (outcome && typeof outcome === 'object') {\n\t\t\t\treturn String(outcome.id ?? outcome.value ?? outcome.label ?? '')\n\t\t\t}\n\t\t\treturn String(outcome ?? '')\n\t\t},\n\n\t\t/**\n\t\t * The menu label for one complete entry.\n\t\t *\n\t\t * @param {object|string} outcome The outcome entry.\n\t\t * @return {string} The label.\n\t\t */\n\t\tcompleteLabel(outcome) {\n\t\t\tconst id = this.outcomeId(outcome)\n\t\t\tconst label = (outcome && typeof outcome === 'object' && outcome.label)\n\t\t\t\t? String(outcome.label)\n\t\t\t\t: id\n\t\t\tif (id === 'done') {\n\t\t\t\treturn this.tr('Complete')\n\t\t\t}\n\t\t\treturn this.tr('Complete: {outcome}').replace('{outcome}', label)\n\t\t},\n\n\t\t/**\n\t\t * Claim a pooled task.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tclaim(task) {\n\t\t\treturn this.postVerb(task, 'claim', {})\n\t\t},\n\n\t\t/**\n\t\t * Complete the viewer's own task with an outcome.\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @param {string} outcome The chosen outcome id.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tcomplete(task, outcome) {\n\t\t\treturn this.postVerb(task, 'complete', { outcome })\n\t\t},\n\n\t\t/**\n\t\t * POST one lifecycle verb and refetch either way: on success the row\n\t\t * moved, and on a refusal (a lost claim race, a revoked task) the\n\t\t * list is stale in exactly the way the refusal proves. The refusal\n\t\t * itself is toasted in the SERVER'S words (ADR-062 forbids leaking\n\t\t * the raw status line, and the endpoint's `error` string is written\n\t\t * for people).\n\t\t *\n\t\t * @param {object} task The task row.\n\t\t * @param {string} verb The lifecycle verb.\n\t\t * @param {object} body The verb body.\n\t\t * @return {Promise<void>} Resolves when the verb settled.\n\t\t */\n\t\tasync postVerb(task, verb, body) {\n\t\t\tconst uuid = String(task.uuid || '')\n\t\t\tif (uuid === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait axios.post(generateUrl(`${FLOW_TASKS_URL}/${uuid}/${verb}`), body)\n\t\t\t} catch (error) {\n\t\t\t\tconst message = error?.response?.data?.error\n\t\t\t\tshowError(typeof message === 'string' && message !== ''\n\t\t\t\t\t? message\n\t\t\t\t\t: this.tr('The task action was refused'))\n\t\t\t}\n\t\t\tthis.refetch(true)\n\t\t},\n\n\t\t/**\n\t\t * Open the clicked task: the configured route with the uuid as `id`,\n\t\t * else the task's openregister deep link. A ctrl/cmd/shift or middle\n\t\t * click opens it in a new tab.\n\t\t *\n\t\t * @param {object} task The clicked task row.\n\t\t * @param {MouseEvent} [event] The originating click/auxclick event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowClick(task, event) {\n\t\t\tconst uuid = String(task.uuid || '')\n\t\t\tif (uuid === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst rowRoute = this.content.rowRoute\n\t\t\tif (typeof rowRoute === 'string' && rowRoute !== '' && this.$router) {\n\t\t\t\topenRowTarget(event, { name: rowRoute, params: { id: uuid } }, this.$router)\n\t\t\t\treturn\n\t\t\t}\n\t\t\topenRowTarget(event, taskDeepLink(uuid))\n\t\t},\n\n\t\t/**\n\t\t * Middle click on a task row: open it in a new tab.\n\t\t *\n\t\t * @param {object} task The clicked task row.\n\t\t * @param {MouseEvent} event The auxclick event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowAuxClick(task, event) {\n\t\t\tif (isRowMiddleClick(event)) {\n\t\t\t\tthis.onRowClick(task, event)\n\t\t\t}\n\t\t},\n\t},\n}\n\n/**\n * Clamp a configured row limit into the range the endpoint accepts.\n *\n * @param {unknown} raw The configured limit.\n * @return {number} A limit between 1 and 50 (default 6).\n */\nfunction normaliseLimit(raw) {\n\tconst n = Number(raw)\n\tif (Number.isFinite(n) === false || n <= 0) {\n\t\treturn 6\n\t}\n\treturn Math.min(50, Math.round(n))\n}\n\n/**\n * Clamp a configured scope onto the endpoint's vocabulary.\n *\n * @param {unknown} raw The configured scope.\n * @return {string} One of assigned, pooled, watched, all (default assigned).\n */\nfunction normaliseScope(raw) {\n\treturn ['assigned', 'pooled', 'watched', 'all'].includes(raw) ? raw : 'assigned'\n}\n</script>\n\n<style scoped>\n.cn-tasks-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n}\n\n.cn-tasks-widget__loading {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 8px 0;\n}\n\n.cn-tasks-widget__empty,\n.cn-tasks-widget__error,\n.cn-tasks-widget__more {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-tasks-widget__more {\n\tpadding-top: 4px;\n}\n\n.cn-tasks-widget__count {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n\ttext-transform: uppercase;\n\tletter-spacing: 0.04em;\n}\n\n.cn-tasks-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\tmin-width: 0;\n}\n\n.cn-tasks-widget__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 6px 0;\n\tborder-bottom: 1px solid var(--color-border);\n\tmin-width: 0;\n\tcursor: pointer;\n}\n\n.cn-tasks-widget__row:last-child {\n\tborder-bottom: none;\n}\n\n.cn-tasks-widget__body {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-width: 0;\n\tflex: 1 1 auto;\n}\n\n.cn-tasks-widget__name {\n\tfont-weight: 600;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.cn-tasks-widget__row:hover .cn-tasks-widget__name {\n\ttext-decoration: underline;\n}\n\n.cn-tasks-widget__meta {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.cn-tasks-widget__due {\n\tflex: 0 0 auto;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-variant-numeric: tabular-nums;\n}\n\n/* List variant, after the dashboard board's My tasks card: a checkbox, the\n title, the subject on a muted second line and the due date at its right. */\n.cn-tasks-widget--list .cn-tasks-widget__row {\n\talign-items: flex-start;\n\tgap: 12px;\n\tpadding: 12px 0;\n}\n\n.cn-tasks-widget--list .cn-tasks-widget__name {\n\tfont-weight: 400;\n\tfont-size: 15px;\n\tline-height: 1.35;\n\tcolor: var(--color-main-text);\n}\n\n.cn-tasks-widget__check,\n.cn-tasks-widget__check-spacer {\n\tflex: none;\n\twidth: 20px;\n\theight: 20px;\n\tmargin: 1px 0 0;\n}\n\n.cn-tasks-widget__check {\n\taccent-color: var(--color-primary-element);\n\tcursor: pointer;\n}\n\n.cn-tasks-widget__meta--split {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tgap: 8px;\n\tfont-size: 13px;\n\toverflow: visible;\n}\n\n.cn-tasks-widget__subject {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.cn-tasks-widget--list .cn-tasks-widget__due {\n\tfont-size: 13px;\n\tfont-weight: 500;\n}\n\n.cn-tasks-widget--list .cn-tasks-widget__due--overdue {\n\tfont-weight: 600;\n}\n\n/* Overdue: weight AND colour on top of the wording, which already says\n \"Overdue by N days\" — the signal survives monochrome. */\n.cn-tasks-widget__due--overdue {\n\tcolor: var(--color-error, #d91f2d);\n\tfont-weight: 600;\n}\n\n.cn-tasks-widget__actions {\n\tflex: 0 0 auto;\n}\n</style>\n"],"names":["t","axios"],"mappings":";;;;;;;;;;;;;AA8HA;AACC;;;AAGA;;;AAGD,MAAM,cAAe,GAAE,oCAAkC;;AAEzD;;AAEC;AACA;;;AAGD,MAAM,eAAe;AACpB,CAAA,SAAS,EAAE,WAAW;CACtB,OAAO,EAAE,gBAAgB;AACzB,CAAA,MAAM,EAAE,aAAa;AACrB,CAAA,SAAS,EAAE,WAAW;CACtB,UAAU,EAAE,YAAY;AACxB,CAAA,QAAQ,EAAE,UAAU;AACrB,EAAA;;AAEA;;AAEC;;;AAGD,MAAM,kBAAkB;AACvB,CAAA,GAAG,EAAE,KAAK;AACV,CAAA,MAAM,EAAE,QAAQ;CAChB,IAAI,EAAE,MAAM;AACZ,CAAA,MAAM,EAAE,QAAQ;AACjB,EAAA;;AAEA;AACC;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;;;;AAIA;AACA;;AAEA;;;AAGA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,eAAe;;CAErB,UAAU,EAAE;AACX,EAAA,SAAS;AACT,EAAA,cAAc;EACd,aAAa;EACb;;AAED,CAAA,MAAM,EAAE;AACP;;;;AAIA,EAAA,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK;EAC5C;;AAED,CAAA,KAAK,EAAE;AACN;AACC;AACA;;;;;;;;;AASA;AACA;;;;;;;AAOA;AACA;;AAED,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;AAED;;;;AAIA,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;;AAGC;AAC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