@conduction/nextcloud-vue 2.177.0 → 2.179.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/CnActionDialog/CnActionDialog.vue.js +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
- package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/composables/indexSources.js +24 -4
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/composables/useFlowStore.js +75 -4
- package/dist/esm/composables/useFlowStore.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
- package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
- package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +52 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +51 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1203 -812
- package/dist/esm/utils/dialogWidths.js +6 -4
- package/dist/esm/utils/dialogWidths.js.map +1 -1
- package/dist/esm/utils/fieldPill.js +77 -0
- package/dist/esm/utils/fieldPill.js.map +1 -0
- package/dist/esm/utils/flowCondition.js +177 -0
- package/dist/esm/utils/flowCondition.js.map +1 -0
- package/dist/esm/utils/flowRunStatus.js +64 -1
- package/dist/esm/utils/flowRunStatus.js.map +1 -1
- package/dist/esm/utils/flowStepList.js +385 -0
- package/dist/esm/utils/flowStepList.js.map +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/searchRefusal.js +35 -1
- package/dist/esm/utils/searchRefusal.js.map +1 -1
- package/dist/esm/utils/widgetDispatch.js +1 -1
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +14837 -11411
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1203 -812
- package/l10n/en.json +52 -1
- package/l10n/nl.json +51 -1
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
- package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
- package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
- package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
- package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
- package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
- package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
- package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
- package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
- package/src/components/CnFlowDetail/index.js +2 -0
- package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
- package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
- package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
- package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
- package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
- package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
- package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
- package/src/components/CnStepper/CnStepper.vue +14 -5
- package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
- package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
- package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
- package/src/components/CnTaskFormWidget/index.js +23 -0
- package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/src/components/index.js +2 -1
- package/src/composables/indexSources.js +24 -4
- package/src/composables/useFlowStore.js +75 -4
- package/src/css/index-page.css +10 -0
- package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
- package/src/dialogs/CnFlowEditModal.vue +26 -6
- package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
- package/src/index.js +3 -0
- package/src/utils/dialogWidths.js +6 -4
- package/src/utils/fieldPill.js +73 -0
- package/src/utils/flowCondition.js +173 -0
- package/src/utils/flowRunStatus.js +63 -0
- package/src/utils/flowStepList.js +381 -0
- package/src/utils/libraryWidgetKeys.js +1 -0
- package/src/utils/searchRefusal.js +33 -0
- package/src/utils/widgetDispatch.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnGroupedCardsWidget.vue2.js","sources":["../../../../src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-grouped-cards\" data-testid=\"cn-grouped-cards\">\n\t\t<h2 v-if=\"heading\" class=\"cn-grouped-cards__heading\" data-testid=\"cn-grouped-cards-heading\">\n\t\t\t{{ heading }}\n\t\t</h2>\n\t\t<!-- `actions`: a row of buttons above the groups (\"Bekijken als flow\",\n\t\t \"Taak toevoegen\" on DqZaaktype). -->\n\t\t<CnActionButtons\n\t\t\tv-if=\"topActions.length > 0\"\n\t\t\tclass=\"cn-grouped-cards__actions\"\n\t\t\t:actions=\"topActions\"\n\t\t\tdata-testid=\"cn-grouped-cards-actions\" />\n\t\t<p v-if=\"error\"\n\t\t\tclass=\"cn-grouped-cards__state\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"cn-grouped-cards-error\">\n\t\t\t{{ errorLabel }}\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"cn-grouped-cards-retry\" @click=\"retry\">\n\t\t\t\t{{ retryLabel }}\n\t\t\t</NcButton>\n\t\t</p>\n\t\t<div v-else-if=\"loading && groups.length === 0\" class=\"cn-grouped-cards__loading\">\n\t\t\t<NcLoadingIcon :size=\"20\" :name=\"loadingLabel\" />\n\t\t</div>\n\t\t<p v-else-if=\"groups.length === 0 && !extra\" class=\"cn-grouped-cards__state\" data-testid=\"cn-grouped-cards-empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<div\n\t\t\tv-else\n\t\t\tclass=\"cn-grouped-cards__grid\"\n\t\t\t:style=\"{ '--cn-grouped-cards-columns': columns }\">\n\t\t\t<section\n\t\t\t\tv-for=\"group in groups\"\n\t\t\t\t:key=\"group.key\"\n\t\t\t\tclass=\"cn-grouped-cards__group\"\n\t\t\t\t:aria-labelledby=\"group.headingId\"\n\t\t\t\tdata-testid=\"cn-grouped-cards-group\">\n\t\t\t\t<header class=\"cn-grouped-cards__group-header\">\n\t\t\t\t\t<component :is=\"innerHeadingTag\" :id=\"group.headingId\" class=\"cn-grouped-cards__group-title cn-inner-heading\">\n\t\t\t\t\t\t{{ group.title }}\n\t\t\t\t\t</component>\n\t\t\t\t\t<span v-if=\"group.count\" class=\"cn-grouped-cards__count\" data-testid=\"cn-grouped-cards-count\">{{ group.count }}</span>\n\t\t\t\t</header>\n\t\t\t\t<p\n\t\t\t\t\tv-for=\"(line, lineIndex) in group.lines\"\n\t\t\t\t\t:key=\"`line-${lineIndex}`\"\n\t\t\t\t\tclass=\"cn-grouped-cards__group-line\"\n\t\t\t\t\tdata-testid=\"cn-grouped-cards-group-line\">\n\t\t\t\t\t{{ line }}\n\t\t\t\t</p>\n\t\t\t\t<div v-if=\"group.progress\" class=\"cn-grouped-cards__progress\" data-testid=\"cn-grouped-cards-progress\">\n\t\t\t\t\t<NcProgressBar :value=\"group.progress.value\" :aria-label=\"group.progress.label || group.title\" />\n\t\t\t\t\t<span v-if=\"group.progress.label\" class=\"cn-grouped-cards__progress-label\">{{ group.progress.label }}</span>\n\t\t\t\t</div>\n\t\t\t\t<ul v-if=\"group.items.length > 0\" class=\"cn-grouped-cards__items\">\n\t\t\t\t\t<li\n\t\t\t\t\t\tv-for=\"item in group.items\"\n\t\t\t\t\t\t:key=\"item.key\"\n\t\t\t\t\t\tclass=\"cn-grouped-cards__item\"\n\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item\">\n\t\t\t\t\t\t<span class=\"cn-grouped-cards__item-title\">{{ item.title }}</span>\n\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-grouped-cards__item-meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t<span v-if=\"item.flag\" class=\"cn-grouped-cards__item-flag\" data-testid=\"cn-grouped-cards-flag\">{{ item.flag }}</span>\n\t\t\t\t\t\t<CnActionButtons\n\t\t\t\t\t\t\tv-if=\"item.actions.length > 0\"\n\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item-actions\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-row-actions--board': itemActionsMenu }\"\n\t\t\t\t\t\t\t:actions=\"item.actions\"\n\t\t\t\t\t\t\t:overflowOnly=\"itemActionsMenu\"\n\t\t\t\t\t\t\t:overflowAriaLabel=\"itemActionsMenu ? itemMenuLabel(item) : ''\"\n\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item-actions\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<p v-else class=\"cn-grouped-cards__group-empty\">\n\t\t\t\t\t{{ groupEmptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<template v-if=\"group.extraItems\">\n\t\t\t\t\t<h5 class=\"cn-grouped-cards__extra-heading\" data-testid=\"cn-grouped-cards-extra-heading\">\n\t\t\t\t\t\t{{ group.extraHeading }}\n\t\t\t\t\t</h5>\n\t\t\t\t\t<ul v-if=\"group.extraItems.length > 0\" class=\"cn-grouped-cards__items\">\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tv-for=\"item in group.extraItems\"\n\t\t\t\t\t\t\t:key=\"item.key\"\n\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item\"\n\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-extra-item\">\n\t\t\t\t\t\t\t<span class=\"cn-grouped-cards__item-title\">{{ item.title }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-grouped-cards__item-meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t<CnActionButtons\n\t\t\t\t\t\t\t\tv-if=\"item.actions.length > 0\"\n\t\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item-actions\"\n\t\t\t\t\t\t\t\t:actions=\"item.actions\"\n\t\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item-actions\" />\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p v-else class=\"cn-grouped-cards__group-empty\">\n\t\t\t\t\t\t{{ groupEmptyLabel }}\n\t\t\t\t\t</p>\n\t\t\t\t</template>\n\t\t\t\t<!-- `groupAction`: one action per group (\"Add a task\" on a phase),\n\t\t\t\t its `@group.<path>` tokens filled from the group. -->\n\t\t\t\t<CnActionButtons\n\t\t\t\t\tv-if=\"group.action\"\n\t\t\t\t\tclass=\"cn-grouped-cards__group-action\"\n\t\t\t\t\t:actions=\"[group.action]\"\n\t\t\t\t\tdata-testid=\"cn-grouped-cards-group-action\" />\n\t\t\t</section>\n\t\t\t<section\n\t\t\t\tv-if=\"extra\"\n\t\t\t\tclass=\"cn-grouped-cards__group cn-grouped-cards__group--extra\"\n\t\t\t\t:aria-labelledby=\"extra.headingId\"\n\t\t\t\tdata-testid=\"cn-grouped-cards-extra\">\n\t\t\t\t<header class=\"cn-grouped-cards__group-header\">\n\t\t\t\t\t<component :is=\"innerHeadingTag\" :id=\"extra.headingId\" class=\"cn-grouped-cards__group-title cn-inner-heading\">\n\t\t\t\t\t\t{{ extra.title }}\n\t\t\t\t\t</component>\n\t\t\t\t</header>\n\t\t\t\t<p class=\"cn-grouped-cards__extra-text\">\n\t\t\t\t\t{{ extra.text }}\n\t\t\t\t</p>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon, NcProgressBar } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'\nimport { unwrapAppConfig } from '../../utils/formatMetric.js'\nimport { languageMapText } from '../../utils/languageMapText.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { evaluateVisibleWhenLocal } from '../../utils/visibleWhen.js'\nimport { CnActionButtons } from '../CnActionButtons/index.js'\n\nlet uid = 0\n\n/**\n * Unwrap a value that may be a ref.\n *\n * @param {unknown} value The value.\n * @return {unknown} The plain value.\n */\nfunction unwrap(value) {\n\treturn value && typeof value === 'object' && 'value' in value ? value.value : value\n}\n\n/**\n * Whether a value is a language map (`{ nl: \"…\", en: \"…\" }`): an object whose\n * keys are all language codes and whose values are all strings. A nested\n * record such as `{ displayName, telephone }` is not one.\n *\n * @param {unknown} value The value.\n * @return {boolean}\n */\nfunction isLanguageMap(value) {\n\tif (!value || typeof value !== 'object' || Array.isArray(value)) {\n\t\treturn false\n\t}\n\tconst entries = Object.entries(value)\n\treturn entries.length > 0 && entries.every(([key, entry]) => /^[a-z]{2}([_-][A-Za-z]{2})?$/.test(key) && typeof entry === 'string')\n}\n\n/**\n * A row as the templates read it: a language map (`{ nl, en }`) becomes its\n * text in the user's language, and a list of plain values is joined with \", \".\n * Nested objects stay as they are, for a template that reads a deeper path.\n *\n * @param {object} row The row.\n * @return {object} A shallow copy with readable values.\n */\nfunction readable(row) {\n\tif (!row || typeof row !== 'object') {\n\t\treturn {}\n\t}\n\tconst out = {}\n\tfor (const [key, value] of Object.entries(row)) {\n\t\tif (Array.isArray(value)) {\n\t\t\tconst plain = value.filter((entry) => typeof entry === 'string' || typeof entry === 'number')\n\t\t\tout[key] = plain.length === value.length ? plain.join(', ') : value\n\t\t} else if (isLanguageMap(value)) {\n\t\t\tout[key] = languageMapText(value)\n\t\t} else {\n\t\t\tout[key] = value\n\t\t}\n\t}\n\treturn out\n}\n\n/**\n * CnGroupedCardsWidget — groups of cards side by side, read from an app\n * endpoint: a case type's phases, each with the tasks it runs, and a dashed\n * box of what is available in every phase (board DqZaaktype, Fasen en taken).\n *\n * Content-only on a card surface: the detail host or the dashboard draws the\n * titled card around it.\n */\nexport default {\n\tname: 'CnGroupedCardsWidget',\n\n\tcomponents: { CnActionButtons, NcButton, NcLoadingIcon, NcProgressBar },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate function. */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's app config map, for money tokens in a template. */\n\t\tcnAppConfig: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget config: `{ endpointSource, groupsPath?, itemsKey?,\n\t\t * groupTitle?, groupCount?, itemTitle?, itemMeta?, columns?,\n\t\t * extraGroup?, emptyText?, groupEmptyText?, errorText? }`.\n\t\t *\n\t\t * - `endpointSource` (`{ url, params?, responsePath? }`) reads the payload; tokens\n\t\t * such as `@objectId` resolve as on every widget.\n\t\t * - `groupsPath` (default `groups`) is the list of groups in the payload, and\n\t\t * `itemsKey` (default `items`) the list of cards in each group.\n\t\t * - `groupTitle` and `itemTitle` are templates (`\"Phase {order}: {name}\"`,\n\t\t * `\"{title}\"`); `itemMeta` is a template or a list of templates joined\n\t\t * with \" · \", a part whose token is empty being left out.\n\t\t * - `groupCount` (`{ one, other }`, `{count}` filled in) draws a count pill.\n\t\t * - `extraGroup` (`{ title, path, itemText, join? }`) closes the grid with a\n\t\t * dashed box whose entries, read at `path` of the payload, are one line.\n\t\t * - `columns` (default 2) is the number of groups side by side.\n\t\t * - `groupAction` is an action drawn at the foot of every group (as\n\t\t * CnActionButtons draws it), with `@group.<path>` in its strings read\n\t\t * from that group: `{ type: \"open-form\", endpoint: { url:\n\t\t * \"/apps/x/api/phases/@group.id/steps\", method: \"POST\" }, ... }`\n\t\t * adds a card to the group.\n\t\t * - `actions` is a row of actions (as CnActionButtons draws them) above the\n\t\t * groups, drawn also while there are none (\"View as flow\", \"Add a task\").\n\t\t * - `groupLines` lists templates drawn under a group's title, each left out when it does not fill\n\t\t * (a list in place of a template is candidates, the first that fills).\n\t\t * - `itemFlag` (`{ field, label }`) marks a card whose `field` is true with `label` (\"Overdue\").\n\t\t * - `itemActions` are actions on every card (as CnActionButtons draws them). `@item.<path>` and\n\t\t * `@group.<path>` in their strings read the card and its group (URL-encoded in `url`,\n\t\t * `target` and `href`; a value that is exactly one token keeps its type); `visibleWhen` (the\n\t\t * local form, `all` / `any` included) reads `item.<path>` and `group.<path>`.\n\t\t * - `itemMeta` parts may be `{ count, one, other }`: the number at the card's `count` path in\n\t\t * the singular or plural text, `{count}` filled in; or `{ text, when }`: the text only when the\n\t\t * local condition `when` holds on the card.\n\t\t * - `groupLines` entries may be `{ text, when }`: the line only when the local condition\n\t\t * `when` holds on the group; or `{ count, one, other }` (and `when`) as for `itemMeta`.\n\t\t * - `groupProgress` (`{ valuePath, label? }`) draws a progress bar of the group's value (0 to\n\t\t * 100) at `valuePath`, with `label` filled from the group.\n\t\t * - `heading` is a template filled from the payload, drawn as the heading above the groups (on a\n\t\t * page of its own); without a value it is left out.\n\t\t * - `extraItemsKey` with `extraItemsHeading` draws a second list of each group under that\n\t\t * heading (`extraItemTitle`, `extraItemMeta`, `extraItemActions` as for the cards); a plain\n\t\t * string entry reads as `{ value }`.\n\t\t * - `itemsPath` with `itemGroupField` reads the cards from one flat list of the payload instead of\n\t\t * from each group: a card belongs to the group whose `id` its `itemGroupField` names. Cards\n\t\t * naming no group gather under `ungroupedTitle`; without that title they are left out.\n\t\t *\n\t\t * A language map (`{ nl, en }`) reads in the user's language, and a list\n\t\t * of plain values reads joined with \", \". Texts go through the app's\n\t\t * translate.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The current record's id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The current record, for `@object.<field>` tokens. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', null)\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst { data, loading, error, refetch } = useEndpointSource(\n\t\t\t() => props.content?.endpointSource || null,\n\t\t\t{\n\t\t\t\tctx: () => {\n\t\t\t\t\tconst injected = unwrap(objectCtxRaw) || {}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...injected,\n\t\t\t\t\t\tobjectId: props.objectId ?? injected.objectId ?? props.objectData?.id ?? null,\n\t\t\t\t\t\tobject: props.objectData || injected.object || null,\n\t\t\t\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\t\t\t\tconfig: unwrapAppConfig(appConfigRaw) || {},\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t)\n\t\tuid += 1\n\t\treturn { payload: data, loading, error, refetch, idPrefix: `cn-grouped-cards-${uid}` }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The row of actions above the groups (`content.actions`).\n\t\t *\n\t\t * @return {Array<object>} The actions.\n\t\t * @spec openspec/changes/grouped-cards-actions/specs/grouped-cards-widget/spec.md#requirement-a-grouped-cards-widget-can-carry-a-row-of-actions-above-its-groups\n\t\t */\n\t\t/**\n\t\t * Whether each card's actions sit in one \"···\" menu (`content.itemActionsMenu`).\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/grouped-cards-item-menu/specs/grouped-cards-item-menu/spec.md#requirement-a-cards-actions-can-sit-in-one-menu\n\t\t */\n\t\titemActionsMenu() {\n\t\t\treturn this.content?.itemActionsMenu === true\n\t\t},\n\n\t\ttopActions() {\n\t\t\tconst actions = this.content?.actions\n\t\t\treturn Array.isArray(actions) ? actions.filter((action) => action && typeof action === 'object') : []\n\t\t},\n\n\t\t/** @return {number} The groups side by side. */\n\t\tcolumns() {\n\t\t\tconst value = Number(this.content?.columns)\n\t\t\treturn Number.isFinite(value) && value >= 1 ? Math.min(4, Math.floor(value)) : 2\n\t\t},\n\n\t\t/**\n\t\t * The groups ready to draw.\n\t\t *\n\t\t * @return {Array<{key: string, headingId: string, title: string, count: string, items: Array<object>}>} The groups.\n\t\t * @spec openspec/changes/grouped-cards-widget/specs/grouped-cards-widget/spec.md#requirement-a-widget-draws-groups-of-cards-from-an-endpoint\n\t\t */\n\t\tgroups() {\n\t\t\tconst c = this.content || {}\n\t\t\tconst listed = readPath(this.payload, c.groupsPath || 'groups')\n\t\t\tconst list = Array.isArray(listed) ? listed.filter((group) => group && typeof group === 'object') : []\n\t\t\tconst flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath(this.payload, c.itemsPath) : null\n\t\t\tconst groupField = typeof c.itemGroupField === 'string' && c.itemGroupField !== '' ? c.itemGroupField : ''\n\t\t\tconst flatItems = Array.isArray(flat) && groupField ? flat.filter((item) => item && typeof item === 'object') : null\n\t\t\tconst groupIds = new Set(list.map((group) => String(group.id ?? '')).filter((id) => id !== ''))\n\t\t\tconst out = list.map((raw, index) => {\n\t\t\t\tconst group = readable(raw)\n\t\t\t\tconst itemList = flatItems\n\t\t\t\t\t? flatItems.filter((item) => String(item[groupField] ?? '') !== '' && String(item[groupField]) === String(raw.id ?? ''))\n\t\t\t\t\t: (Array.isArray(raw[c.itemsKey || 'items']) ? raw[c.itemsKey || 'items'] : [])\n\t\t\t\tconst items = this.itemsOf(itemList, raw)\n\t\t\t\treturn {\n\t\t\t\t\tkey: String(raw.id ?? `group-${index}`),\n\t\t\t\t\theadingId: `${this.idPrefix}-group-${index}`,\n\t\t\t\t\ttitle: this.fill(c.groupTitle || '{name}', group),\n\t\t\t\t\tlines: this.linesOf(group, raw),\n\t\t\t\t\tcount: this.countOf(items.length),\n\t\t\t\t\titems,\n\t\t\t\t\taction: this.groupActionFor(raw, index),\n\t\t\t\t\tprogress: this.progressOf(raw, group),\n\t\t\t\t\t...this.extraOf(raw),\n\t\t\t\t}\n\t\t\t})\n\t\t\tif (flatItems && typeof c.ungroupedTitle === 'string' && c.ungroupedTitle !== '') {\n\t\t\t\tconst loose = flatItems.filter((item) => !groupIds.has(String(item[groupField] ?? '')))\n\t\t\t\tif (loose.length > 0) {\n\t\t\t\t\tconst items = this.itemsOf(loose, {})\n\t\t\t\t\tout.push({\n\t\t\t\t\t\tkey: 'ungrouped',\n\t\t\t\t\t\theadingId: `${this.idPrefix}-ungrouped`,\n\t\t\t\t\t\ttitle: this.translate(c.ungroupedTitle),\n\t\t\t\t\t\tlines: [],\n\t\t\t\t\t\tcount: this.countOf(items.length),\n\t\t\t\t\t\titems,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The closing box of entries available everywhere, or null.\n\t\t *\n\t\t * @return {{headingId: string, title: string, text: string}|null} The box.\n\t\t * @spec openspec/changes/grouped-cards-widget/specs/grouped-cards-widget/spec.md#requirement-a-widget-draws-groups-of-cards-from-an-endpoint\n\t\t */\n\t\textra() {\n\t\t\tconst spec = this.content?.extraGroup\n\t\t\tif (!spec || typeof spec !== 'object' || !spec.path) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst list = readPath(this.payload, spec.path)\n\t\t\tif (!Array.isArray(list) || list.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst parts = list\n\t\t\t\t.map((entry) => (entry && typeof entry === 'object' ? this.fill(spec.itemText || '{label}', readable(entry)) : languageMapText(entry)))\n\t\t\t\t.filter((text) => text !== '')\n\t\t\tif (parts.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn {\n\t\t\t\theadingId: `${this.idPrefix}-extra`,\n\t\t\t\ttitle: this.translate(spec.title || 'Always available'),\n\t\t\t\ttext: parts.join(typeof spec.join === 'string' ? spec.join : ' · '),\n\t\t\t}\n\t\t},\n\n\t\t/** @return {string} The heading above the groups, filled from the payload. */\n\t\theading() {\n\t\t\tconst template = this.content?.heading\n\t\t\tconst row = this.payload && typeof this.payload === 'object' && !Array.isArray(this.payload) ? readable(this.payload) : {}\n\t\t\treturn template ? this.fill(template, row) : ''\n\t\t},\n\n\t\t/** @return {string} The empty text. */\n\t\temptyLabel() {\n\t\t\treturn this.content?.emptyText ? this.translate(this.content.emptyText) : t('nextcloud-vue', 'Nothing to show yet')\n\t\t},\n\n\t\t/** @return {string} The text of a group without cards. */\n\t\tgroupEmptyLabel() {\n\t\t\treturn this.content?.groupEmptyText ? this.translate(this.content.groupEmptyText) : t('nextcloud-vue', 'Nothing here yet')\n\t\t},\n\n\t\t/** @return {string} The error text. */\n\t\terrorLabel() {\n\t\t\treturn this.content?.errorText ? this.translate(this.content.errorText) : t('nextcloud-vue', 'This list could not be loaded.')\n\t\t},\n\n\t\t/** @return {string} The retry button's text. */\n\t\tretryLabel() {\n\t\t\treturn t('nextcloud-vue', 'Try again')\n\t\t},\n\n\t\t/** @return {string} The loading label. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The `groupAction` for one group, with every `@group.<path>` token in\n\t\t * its strings read from that group, and its id made unique per group.\n\t\t * Null without a `groupAction`, or for a group missing a value a token\n\t\t * names (the action would address no group).\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @param {number} index The group's position.\n\t\t * @return {object|null} The action.\n\t\t * @spec openspec/changes/grouped-cards-group-action/specs/grouped-cards-group-action/spec.md#requirement-every-group-can-carry-an-action\n\t\t */\n\t\tgroupActionFor(raw, index) {\n\t\t\tconst action = this.content?.groupAction\n\t\t\tif (!action || typeof action !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tlet missing = false\n\t\t\tconst fill = (value) => {\n\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\treturn value.replace(/@group\\.([\\w.]+)/g, (token, path) => {\n\t\t\t\t\t\tconst found = readPath(raw, path)\n\t\t\t\t\t\tif (found === undefined || found === null || found === '') {\n\t\t\t\t\t\t\tmissing = true\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn encodeURIComponent(String(found))\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.map(fill)\n\t\t\t\t}\n\t\t\t\tif (value && typeof value === 'object') {\n\t\t\t\t\treturn Object.fromEntries(Object.entries(value).map(([key, inner]) => [key, fill(inner)]))\n\t\t\t\t}\n\t\t\t\treturn value\n\t\t\t}\n\t\t\tconst filled = fill(action)\n\t\t\treturn missing ? null : { ...filled, id: `${action.id || 'group-action'}-${index}` }\n\t\t},\n\n\t\t/**\n\t\t * Translate a text through the host app's catalogue.\n\t\t *\n\t\t * @param {string} text The text.\n\t\t * @return {string} The translated text.\n\t\t */\n\t\ttranslate(text) {\n\t\t\tconst fn = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\treturn fn(text)\n\t\t},\n\n\t\t/**\n\t\t * Fill a template from a row, after translating it.\n\t\t *\n\t\t * @param {string} template The template.\n\t\t * @param {object} row The row.\n\t\t * @return {string} The text, '' when a token is empty.\n\t\t */\n\t\tfill(template, row) {\n\t\t\tif (Array.isArray(template)) {\n\t\t\t\treturn firstFilled(template, row, (text) => this.translate(text), new Date(), { config: unwrapAppConfig(this.cnAppConfig) })\n\t\t\t}\n\t\t\tif (typeof template !== 'string' || template === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn fillTemplate(this.translate(template), row, new Date(), { config: unwrapAppConfig(this.cnAppConfig) })\n\t\t},\n\n\t\t/**\n\t\t * The cards ready to draw.\n\t\t *\n\t\t * @param {Array<object>} list The raw cards.\n\t\t * @param {object} [rawGroup] Their group as read, for `@group` tokens.\n\t\t * @param {object} [spec] `{ title, meta, actions }` for a second list, in place of the card settings.\n\t\t * @return {Array<{key: string, title: string, meta: string, flag: string}>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-grouped-cards-can-join-a-flat-list-and-flag-a-card\n\t\t */\n\t\titemsOf(list, rawGroup = {}, spec = {}) {\n\t\t\tconst c = this.content || {}\n\t\t\tconst titleTemplate = spec.title || c.itemTitle || '{title}'\n\t\t\tconst metaSpec = spec.meta !== undefined ? spec.meta : c.itemMeta\n\t\t\tconst actions = spec.actions !== undefined ? spec.actions : c.itemActions\n\t\t\treturn list\n\t\t\t\t.map((entry) => (typeof entry === 'string' || typeof entry === 'number' ? { value: entry } : entry))\n\t\t\t\t.filter((item) => item && typeof item === 'object')\n\t\t\t\t.map((rawItem, itemIndex) => {\n\t\t\t\t\tconst item = readable(rawItem)\n\t\t\t\t\tconst flag = !spec.title && c.itemFlag && typeof c.itemFlag === 'object' && c.itemFlag.field && rawItem[c.itemFlag.field] === true\n\t\t\t\t\t\t? this.translate(c.itemFlag.label || '')\n\t\t\t\t\t\t: ''\n\t\t\t\t\tconst key = String(rawItem.id ?? rawItem.value ?? `item-${itemIndex}`)\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\ttitle: this.fill(titleTemplate, item),\n\t\t\t\t\t\tmeta: this.metaOf(item, rawItem, metaSpec),\n\t\t\t\t\t\tflag,\n\t\t\t\t\t\tactions: this.itemActionsFor(actions, rawItem, rawGroup, key),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The actions of one card, tokens filled from the card and its group,\n\t\t * those whose `visibleWhen` does not hold left out.\n\t\t *\n\t\t * @param {Array<object>|undefined} actions The configured actions.\n\t\t * @param {object} rawItem The card as read.\n\t\t * @param {object} rawGroup Its group as read.\n\t\t * @param {string} key The card's key, made part of each action id.\n\t\t * @return {Array<object>}\n\t\t * @spec openspec/changes/grouped-cards-item-actions/specs/grouped-cards-item-actions/spec.md#requirement-every-card-can-carry-actions\n\t\t */\n\t\t/**\n\t\t * The name of a card's actions menu: \"Actions for {row}\", the card's title filled in.\n\t\t *\n\t\t * @param {object} item The drawn card.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/grouped-cards-item-menu/specs/grouped-cards-item-menu/spec.md#requirement-a-cards-actions-can-sit-in-one-menu\n\t\t */\n\t\titemMenuLabel(item) {\n\t\t\treturn t('nextcloud-vue', 'Actions for {row}', { row: item.title || '' })\n\t\t},\n\n\t\titemActionsFor(actions, rawItem, rawGroup, key) {\n\t\t\tif (!Array.isArray(actions)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst scope = { item: rawItem, group: rawGroup }\n\t\t\treturn actions\n\t\t\t\t.filter((action) => action && typeof action === 'object')\n\t\t\t\t.filter((action) => !action.visibleWhen || evaluateVisibleWhenLocal(action.visibleWhen, scope))\n\t\t\t\t.map((action, index) => {\n\t\t\t\t\tconst { visibleWhen, ...rest } = action\n\t\t\t\t\treturn { ...this.fillTokens(rest, scope), id: `${action.id || 'item-action'}-${key}-${index}` }\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Fill `@item.<path>` and `@group.<path>` in every string of an action.\n\t\t * In `url`, `target` and `href` a value is URL-encoded; a string that is\n\t\t * exactly one token takes the value as it is.\n\t\t *\n\t\t * @param {unknown} value The action, or a part of it.\n\t\t * @param {object} scope `{ item, group }`.\n\t\t * @param {string} [key] The key the value sits under.\n\t\t * @return {unknown}\n\t\t */\n\t\tfillTokens(value, scope, key = '') {\n\t\t\tconst token = /@(item|group)\\.([\\w.]+)/g\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tconst whole = value.match(/^@(item|group)\\.([\\w.]+)$/)\n\t\t\t\tif (whole && !['url', 'target', 'href'].includes(key)) {\n\t\t\t\t\treturn readPath(scope[whole[1]], whole[2]) ?? null\n\t\t\t\t}\n\t\t\t\tconst encode = ['url', 'target', 'href'].includes(key)\n\t\t\t\treturn value.replace(token, (match, root, path) => {\n\t\t\t\t\tconst found = readPath(scope[root], path)\n\t\t\t\t\tconst text = found === undefined || found === null ? '' : String(found)\n\t\t\t\t\treturn encode ? encodeURIComponent(text) : text\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\treturn value.map((entry) => this.fillTokens(entry, scope))\n\t\t\t}\n\t\t\tif (value && typeof value === 'object') {\n\t\t\t\treturn Object.fromEntries(Object.entries(value).map(([inner, entry]) => [inner, this.fillTokens(entry, scope, inner)]))\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\t/**\n\t\t * A group's progress bar, or null without `groupProgress`.\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @param {object} group The group's readable row.\n\t\t * @return {{value: number, label: string}|null}\n\t\t */\n\t\tprogressOf(raw, group) {\n\t\t\tconst spec = this.content?.groupProgress\n\t\t\tif (!spec || typeof spec !== 'object' || !spec.valuePath) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst value = Number(readPath(raw, spec.valuePath))\n\t\t\tif (!Number.isFinite(value)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { value: Math.max(0, Math.min(100, value)), label: spec.label ? this.fill(spec.label, group) : '' }\n\t\t},\n\n\t\t/**\n\t\t * A group's second list (`extraItemsKey`), or nothing.\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @return {{extraItems?: Array<object>, extraHeading?: string}}\n\t\t */\n\t\textraOf(raw) {\n\t\t\tconst c = this.content || {}\n\t\t\tif (typeof c.extraItemsKey !== 'string' || c.extraItemsKey === '') {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t\tconst list = Array.isArray(raw[c.extraItemsKey]) ? raw[c.extraItemsKey] : []\n\t\t\treturn {\n\t\t\t\textraHeading: this.translate(c.extraItemsHeading || ''),\n\t\t\t\textraItems: this.itemsOf(list, raw, { title: c.extraItemTitle || '{value}', meta: c.extraItemMeta || [], actions: c.extraItemActions || [] }),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The lines under a group's title (`groupLines`), the empty ones left out.\n\t\t *\n\t\t * @param {object} group The group's row.\n\t\t * @param {object} [raw] The group as read, for a line's `when`.\n\t\t * @return {Array<string>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-grouped-cards-can-join-a-flat-list-and-flag-a-card\n\t\t */\n\t\tlinesOf(group, raw = {}) {\n\t\t\tconst spec = this.content?.groupLines\n\t\t\treturn (Array.isArray(spec) ? spec : [])\n\t\t\t\t.filter((line) => !line || typeof line !== 'object' || Array.isArray(line) || !line.when || evaluateVisibleWhenLocal(line.when, raw))\n\t\t\t\t.map((line) => {\n\t\t\t\t\tif (line && typeof line === 'object' && !Array.isArray(line)) {\n\t\t\t\t\t\treturn line.count ? this.countText(line, raw) : this.fill(line.text, group)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fill(line, group)\n\t\t\t\t})\n\t\t\t\t.filter((text) => text !== '')\n\t\t},\n\n\t\t/**\n\t\t * Read the endpoint again after a failed read.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tretry() {\n\t\t\tif (typeof this.refetch === 'function') {\n\t\t\t\tthis.refetch(true)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A card's meta line: one template, or several joined with \" · \", a\n\t\t * part whose token is empty being left out with its separator.\n\t\t *\n\t\t * @param {object} item The card's row.\n\t\t * @param {object} [rawItem] The card as read, for a count part.\n\t\t * @param {Array|string} [spec] The parts, by default `itemMeta`.\n\t\t * @return {string} The line.\n\t\t */\n\t\tmetaOf(item, rawItem = item, spec = this.content?.itemMeta) {\n\t\t\tconst parts = Array.isArray(spec) ? spec : (typeof spec === 'string' ? [spec] : [])\n\t\t\treturn parts\n\t\t\t\t.filter((part) => !part || typeof part !== 'object' || Array.isArray(part) || !part.when || evaluateVisibleWhenLocal(part.when, rawItem))\n\t\t\t\t.map((part) => {\n\t\t\t\t\tif (part && typeof part === 'object' && !Array.isArray(part)) {\n\t\t\t\t\t\treturn part.count ? this.countText(part, rawItem) : this.fill(part.text, item)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fill(part, item)\n\t\t\t\t})\n\t\t\t\t.filter((text) => text !== '')\n\t\t\t\t.join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * A number in its singular or plural text (`{ count, one, other }`).\n\t\t *\n\t\t * @param {object} part The meta part.\n\t\t * @param {object} rawItem The card as read.\n\t\t * @return {string} The text, '' when the number is missing.\n\t\t */\n\t\tcountText(part, rawItem) {\n\t\t\tconst count = Number(readPath(rawItem, part.count))\n\t\t\tif (!Number.isFinite(count)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst template = count === 1 ? part.one : part.other\n\t\t\treturn typeof template === 'string' && template !== '' ? this.translate(template).replace(/\\{count\\}/g, String(count)) : ''\n\t\t},\n\n\t\t/**\n\t\t * The count pill of a group (`groupCount: { one, other }`).\n\t\t *\n\t\t * @param {number} count The number of cards.\n\t\t * @return {string} The text, '' without `groupCount`.\n\t\t */\n\t\tcountOf(count) {\n\t\t\tconst spec = this.content?.groupCount\n\t\t\tif (!spec || typeof spec !== 'object') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst template = count === 1 ? spec.one : spec.other\n\t\t\treturn typeof template === 'string' && template !== '' ? this.translate(template).replace(/\\{count\\}/g, String(count)) : ''\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-grouped-cards__actions {\n\tmargin-block-end: 16px;\n}\n\n.cn-grouped-cards__heading {\n\tmargin: 0 0 12px;\n}\n\n.cn-grouped-cards__progress {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-grouped-cards__progress-label {\n\tcolor: var(--color-text-maxcontrast);\n\twhite-space: nowrap;\n}\n\n.cn-grouped-cards__extra-heading {\n\tmargin: 4px 0 0;\n}\n\n.cn-grouped-cards__item-actions {\n\tmargin-inline-start: auto;\n}\n\n.cn-grouped-cards__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(var(--cn-grouped-cards-columns, 2), minmax(0, 1fr));\n\tgap: 16px;\n}\n\n@media (max-width: 700px) {\n\t.cn-grouped-cards__grid {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n}\n\n.cn-grouped-cards__group {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tpadding: 12px 14px 14px;\n\tborder-radius: var(--border-radius-large, 10px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-grouped-cards__group--extra {\n\tbackground: transparent;\n\tborder: 1px dashed var(--color-border-dark);\n}\n\n.cn-grouped-cards__group-header {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-grouped-cards__group-title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-grouped-cards__group-action {\n\tmargin-top: 8px;\n}\n\n.cn-grouped-cards__count {\n\tpadding: 2px 8px;\n\tborder-radius: var(--border-radius-pill, 12px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n\twhite-space: nowrap;\n}\n\n.cn-grouped-cards__items {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-grouped-cards__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large, 8px);\n\tbackground: var(--color-main-background);\n}\n\n.cn-grouped-cards__item-title {\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-grouped-cards__item-flag {\n\tcolor: var(--color-text-error, var(--color-error-text, var(--color-error)));\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-grouped-cards__group-line {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-grouped-cards__item-meta,\n.cn-grouped-cards__extra-text,\n.cn-grouped-cards__group-empty,\n.cn-grouped-cards__state {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-grouped-cards__loading {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 8px 0;\n}\n</style>\n"],"names":["CnActionButtons","t"],"mappings":";;;;;;;;;;;;AA+IA,IAAI,MAAM,EAAA;;AAEV;;AAEC;;AAEA;;AAED,SAAS,MAAM,CAAC,KAAK,EAAE;AACtB,CAAA,OAAO,KAAI,IAAK,OAAO,KAAM,KAAI,QAAS,IAAG,OAAM,IAAK,KAAI,GAAI,KAAK,CAAC,KAAM,GAAE,KAAI;AACnF,CAAA;;AAEA;;;;AAIC;;AAEA;;AAED,SAAS,aAAa,CAAC,KAAK,EAAE;CAC7B,IAAI,CAAC,KAAI,IAAK,OAAO,KAAI,KAAM,QAAO,IAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;EAChE,OAAO,KAAI;AACZ,EAAA;AACA,CAAA,MAAM,OAAQ,GAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAA;CACpC,OAAO,OAAO,CAAC,MAAK,GAAI,CAAA,IAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,8BAA8B,CAAC,IAAI,CAAC,GAAG,CAAA,IAAK,OAAO,KAAI,KAAM,QAAQ,CAAA;AACnI,CAAA;;AAEA;;;;AAIC;;;;AAID,SAAS,QAAQ,CAAC,GAAG,EAAE;AACtB,CAAA,IAAI,CAAC,GAAE,IAAK,OAAO,GAAI,KAAI,QAAQ,EAAE;AACpC,EAAA,OAAO,EAAC;AACT,EAAA;CACA,MAAM,GAAE,GAAI,GAAC;AACb,CAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAA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AC,EAAE;AAC5B,IAAA,OAAO,EAAC;AACT,IAAA;AACA,GAAA,MAAM,WAAW,UAAU,CAAA,GAAI,IAAI,CAAC,GAAE,GAAI,IAAI,CAAC,MAAI;GACnD,OAAO,OAAO,aAAa,QAAO,IAAK,aAAa,EAAG,GAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,GAAE,EAAC;GAC1H;;AAED;;AAEC;AACA;AACA;;AAED,EAAA,OAAO,CAAC,KAAK,EAAE;AACd,GAAA,MAAM,IAAG,GAAI,IAAI,CAAC,OAAO,EAAE,WAAS;AACpC,GAAA,IAAI,CAAC,IAAK,IAAG,OAAO,IAAG,KAAM,QAAQ,EAAE;AACtC,IAAA,OAAO,EAAC;AACT,IAAA;AACA,GAAA,MAAM,WAAW,UAAU,CAAA,GAAI,IAAI,CAAC,GAAE,GAAI,IAAI,CAAC,MAAI;GACnD,OAAO,OAAO,aAAa,QAAO,IAAK,aAAa,EAAG,GAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,GAAE,EAAC;GAC1H;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnGroupedCardsWidget.vue2.js","sources":["../../../../src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-grouped-cards\" data-testid=\"cn-grouped-cards\">\n\t\t<h2 v-if=\"heading\" class=\"cn-grouped-cards__heading\" data-testid=\"cn-grouped-cards-heading\">\n\t\t\t{{ heading }}\n\t\t</h2>\n\t\t<!-- `actions`: a row of buttons above the groups (\"Bekijken als flow\",\n\t\t \"Taak toevoegen\" on DqZaaktype). -->\n\t\t<CnActionButtons\n\t\t\tv-if=\"topActions.length > 0\"\n\t\t\tclass=\"cn-grouped-cards__actions\"\n\t\t\t:actions=\"topActions\"\n\t\t\tdata-testid=\"cn-grouped-cards-actions\" />\n\t\t<p v-if=\"error\"\n\t\t\tclass=\"cn-grouped-cards__state\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"cn-grouped-cards-error\">\n\t\t\t{{ errorLabel }}\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"cn-grouped-cards-retry\" @click=\"retry\">\n\t\t\t\t{{ retryLabel }}\n\t\t\t</NcButton>\n\t\t</p>\n\t\t<div v-else-if=\"loading && groups.length === 0\" class=\"cn-grouped-cards__loading\">\n\t\t\t<NcLoadingIcon :size=\"20\" :name=\"loadingLabel\" />\n\t\t</div>\n\t\t<p v-else-if=\"groups.length === 0 && !extra\" class=\"cn-grouped-cards__state\" data-testid=\"cn-grouped-cards-empty\">\n\t\t\t{{ emptyLabel }}\n\t\t</p>\n\t\t<div\n\t\t\tv-else\n\t\t\tclass=\"cn-grouped-cards__grid\"\n\t\t\t:style=\"{ '--cn-grouped-cards-columns': columns }\">\n\t\t\t<section\n\t\t\t\tv-for=\"group in groups\"\n\t\t\t\t:key=\"group.key\"\n\t\t\t\tclass=\"cn-grouped-cards__group\"\n\t\t\t\t:aria-labelledby=\"group.headingId\"\n\t\t\t\tdata-testid=\"cn-grouped-cards-group\">\n\t\t\t\t<header class=\"cn-grouped-cards__group-header\">\n\t\t\t\t\t<component :is=\"innerHeadingTag\" :id=\"group.headingId\" class=\"cn-grouped-cards__group-title cn-inner-heading\">\n\t\t\t\t\t\t{{ group.title }}\n\t\t\t\t\t</component>\n\t\t\t\t\t<span v-if=\"group.count\" class=\"cn-grouped-cards__count\" data-testid=\"cn-grouped-cards-count\">{{ group.count }}</span>\n\t\t\t\t\t<CnStatusBadge\n\t\t\t\t\t\tv-if=\"group.pill\"\n\t\t\t\t\t\t:label=\"group.pill.label\"\n\t\t\t\t\t\t:variant=\"group.pill.variant\"\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-group-pill\" />\n\t\t\t\t</header>\n\t\t\t\t<p\n\t\t\t\t\tv-for=\"(line, lineIndex) in group.lines\"\n\t\t\t\t\t:key=\"`line-${lineIndex}`\"\n\t\t\t\t\tclass=\"cn-grouped-cards__group-line\"\n\t\t\t\t\tdata-testid=\"cn-grouped-cards-group-line\">\n\t\t\t\t\t{{ line }}\n\t\t\t\t</p>\n\t\t\t\t<div v-if=\"group.progress\" class=\"cn-grouped-cards__progress\" data-testid=\"cn-grouped-cards-progress\">\n\t\t\t\t\t<NcProgressBar :value=\"group.progress.value\" :aria-label=\"group.progress.label || group.title\" />\n\t\t\t\t\t<span v-if=\"group.progress.label\" class=\"cn-grouped-cards__progress-label\">{{ group.progress.label }}</span>\n\t\t\t\t</div>\n\t\t\t\t<ul v-if=\"group.items.length > 0\" class=\"cn-grouped-cards__items\">\n\t\t\t\t\t<li\n\t\t\t\t\t\tv-for=\"item in group.items\"\n\t\t\t\t\t\t:key=\"item.key\"\n\t\t\t\t\t\tclass=\"cn-grouped-cards__item\"\n\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item\">\n\t\t\t\t\t\t<span class=\"cn-grouped-cards__item-title\">{{ item.title }}</span>\n\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-grouped-cards__item-meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t<span v-if=\"item.flag\" class=\"cn-grouped-cards__item-flag\" data-testid=\"cn-grouped-cards-flag\">{{ item.flag }}</span>\n\t\t\t\t\t\t<span v-if=\"item.date || item.pill\" class=\"cn-grouped-cards__item-end\">\n\t\t\t\t\t\t\t<span v-if=\"item.date\" class=\"cn-grouped-cards__item-date\" data-testid=\"cn-grouped-cards-item-date\">{{ item.date }}</span>\n\t\t\t\t\t\t\t<CnStatusBadge\n\t\t\t\t\t\t\t\tv-if=\"item.pill\"\n\t\t\t\t\t\t\t\t:label=\"item.pill.label\"\n\t\t\t\t\t\t\t\t:variant=\"item.pill.variant\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item-pill\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<CnActionButtons\n\t\t\t\t\t\t\tv-if=\"item.actions.length > 0\"\n\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item-actions\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-row-actions--board': itemActionsMenu }\"\n\t\t\t\t\t\t\t:actions=\"item.actions\"\n\t\t\t\t\t\t\t:overflowOnly=\"itemActionsMenu\"\n\t\t\t\t\t\t\t:overflowAriaLabel=\"itemActionsMenu ? itemMenuLabel(item) : ''\"\n\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item-actions\" />\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<p v-else class=\"cn-grouped-cards__group-empty\">\n\t\t\t\t\t{{ groupEmptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<template v-if=\"group.extraItems\">\n\t\t\t\t\t<h5 class=\"cn-grouped-cards__extra-heading\" data-testid=\"cn-grouped-cards-extra-heading\">\n\t\t\t\t\t\t{{ group.extraHeading }}\n\t\t\t\t\t</h5>\n\t\t\t\t\t<ul v-if=\"group.extraItems.length > 0\" class=\"cn-grouped-cards__items\">\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tv-for=\"item in group.extraItems\"\n\t\t\t\t\t\t\t:key=\"item.key\"\n\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item\"\n\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-extra-item\">\n\t\t\t\t\t\t\t<span class=\"cn-grouped-cards__item-title\">{{ item.title }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.meta\" class=\"cn-grouped-cards__item-meta\">{{ item.meta }}</span>\n\t\t\t\t\t\t\t<CnActionButtons\n\t\t\t\t\t\t\t\tv-if=\"item.actions.length > 0\"\n\t\t\t\t\t\t\t\tclass=\"cn-grouped-cards__item-actions\"\n\t\t\t\t\t\t\t\t:actions=\"item.actions\"\n\t\t\t\t\t\t\t\tdata-testid=\"cn-grouped-cards-item-actions\" />\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p v-else class=\"cn-grouped-cards__group-empty\">\n\t\t\t\t\t\t{{ groupEmptyLabel }}\n\t\t\t\t\t</p>\n\t\t\t\t</template>\n\t\t\t\t<!-- `groupAction`: one action per group (\"Add a task\" on a phase),\n\t\t\t\t its `@group.<path>` tokens filled from the group. -->\n\t\t\t\t<CnActionButtons\n\t\t\t\t\tv-if=\"group.action\"\n\t\t\t\t\tclass=\"cn-grouped-cards__group-action\"\n\t\t\t\t\t:actions=\"[group.action]\"\n\t\t\t\t\tdata-testid=\"cn-grouped-cards-group-action\" />\n\t\t\t</section>\n\t\t\t<section\n\t\t\t\tv-if=\"extra\"\n\t\t\t\tclass=\"cn-grouped-cards__group cn-grouped-cards__group--extra\"\n\t\t\t\t:aria-labelledby=\"extra.headingId\"\n\t\t\t\tdata-testid=\"cn-grouped-cards-extra\">\n\t\t\t\t<header class=\"cn-grouped-cards__group-header\">\n\t\t\t\t\t<component :is=\"innerHeadingTag\" :id=\"extra.headingId\" class=\"cn-grouped-cards__group-title cn-inner-heading\">\n\t\t\t\t\t\t{{ extra.title }}\n\t\t\t\t\t</component>\n\t\t\t\t</header>\n\t\t\t\t<p class=\"cn-grouped-cards__extra-text\">\n\t\t\t\t\t{{ extra.text }}\n\t\t\t\t</p>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon, NcProgressBar } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport innerHeading from '../../mixins/innerHeading.js'\nimport { fieldPill } from '../../utils/fieldPill.js'\nimport { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'\nimport { unwrapAppConfig } from '../../utils/formatMetric.js'\nimport { languageMapText } from '../../utils/languageMapText.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { evaluateVisibleWhenLocal } from '../../utils/visibleWhen.js'\nimport { CnActionButtons } from '../CnActionButtons/index.js'\n\nlet uid = 0\n\n/**\n * Unwrap a value that may be a ref.\n *\n * @param {unknown} value The value.\n * @return {unknown} The plain value.\n */\nfunction unwrap(value) {\n\treturn value && typeof value === 'object' && 'value' in value ? value.value : value\n}\n\n/**\n * Whether a value is a language map (`{ nl: \"…\", en: \"…\" }`): an object whose\n * keys are all language codes and whose values are all strings. A nested\n * record such as `{ displayName, telephone }` is not one.\n *\n * @param {unknown} value The value.\n * @return {boolean}\n */\nfunction isLanguageMap(value) {\n\tif (!value || typeof value !== 'object' || Array.isArray(value)) {\n\t\treturn false\n\t}\n\tconst entries = Object.entries(value)\n\treturn entries.length > 0 && entries.every(([key, entry]) => /^[a-z]{2}([_-][A-Za-z]{2})?$/.test(key) && typeof entry === 'string')\n}\n\n/**\n * A row as the templates read it: a language map (`{ nl, en }`) becomes its\n * text in the user's language, and a list of plain values is joined with \", \".\n * Nested objects stay as they are, for a template that reads a deeper path.\n *\n * @param {object} row The row.\n * @return {object} A shallow copy with readable values.\n */\nfunction readable(row) {\n\tif (!row || typeof row !== 'object') {\n\t\treturn {}\n\t}\n\tconst out = {}\n\tfor (const [key, value] of Object.entries(row)) {\n\t\tif (Array.isArray(value)) {\n\t\t\tconst plain = value.filter((entry) => typeof entry === 'string' || typeof entry === 'number')\n\t\t\tout[key] = plain.length === value.length ? plain.join(', ') : value\n\t\t} else if (isLanguageMap(value)) {\n\t\t\tout[key] = languageMapText(value)\n\t\t} else {\n\t\t\tout[key] = value\n\t\t}\n\t}\n\treturn out\n}\n\n/**\n * CnGroupedCardsWidget — groups of cards side by side, read from an app\n * endpoint: a case type's phases, each with the tasks it runs, and a dashed\n * box of what is available in every phase (board DqZaaktype, Fasen en taken).\n *\n * Content-only on a card surface: the detail host or the dashboard draws the\n * titled card around it.\n */\nexport default {\n\tname: 'CnGroupedCardsWidget',\n\n\tcomponents: { CnActionButtons, CnStatusBadge, NcButton, NcLoadingIcon, NcProgressBar },\n\n\tmixins: [innerHeading],\n\n\tinject: {\n\t\t/** The host app's translate function. */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's app config map, for money tokens in a template. */\n\t\tcnAppConfig: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The widget config: `{ endpointSource, groupsPath?, itemsKey?,\n\t\t * groupTitle?, groupCount?, itemTitle?, itemMeta?, columns?,\n\t\t * extraGroup?, emptyText?, groupEmptyText?, errorText? }`.\n\t\t *\n\t\t * - `endpointSource` (`{ url, params?, responsePath? }`) reads the payload; tokens\n\t\t * such as `@objectId` resolve as on every widget.\n\t\t * - `groupsPath` (default `groups`) is the list of groups in the payload, and\n\t\t * `itemsKey` (default `items`) the list of cards in each group.\n\t\t * - `groupTitle` and `itemTitle` are templates (`\"Phase {order}: {name}\"`,\n\t\t * `\"{title}\"`); `itemMeta` is a template or a list of templates joined\n\t\t * with \" · \", a part whose token is empty being left out.\n\t\t * - `groupCount` (`{ one, other }`, `{count}` filled in) draws a count pill.\n\t\t * - `extraGroup` (`{ title, path, itemText, join? }`) closes the grid with a\n\t\t * dashed box whose entries, read at `path` of the payload, are one line.\n\t\t * - `columns` (default 2) is the number of groups side by side.\n\t\t * - `groupAction` is an action drawn at the foot of every group (as\n\t\t * CnActionButtons draws it), with `@group.<path>` in its strings read\n\t\t * from that group: `{ type: \"open-form\", endpoint: { url:\n\t\t * \"/apps/x/api/phases/@group.id/steps\", method: \"POST\" }, ... }`\n\t\t * adds a card to the group.\n\t\t * - `actions` is a row of actions (as CnActionButtons draws them) above the\n\t\t * groups, drawn also while there are none (\"View as flow\", \"Add a task\").\n\t\t * - `groupLines` lists templates drawn under a group's title, each left out when it does not fill\n\t\t * (a list in place of a template is candidates, the first that fills).\n\t\t * - `itemFlag` (`{ field, label }`) marks a card whose `field` is true with `label` (\"Overdue\").\n\t\t * - `itemActions` are actions on every card (as CnActionButtons draws them). `@item.<path>` and\n\t\t * `@group.<path>` in their strings read the card and its group (URL-encoded in `url`,\n\t\t * `target` and `href`; a value that is exactly one token keeps its type); `visibleWhen` (the\n\t\t * local form, `all` / `any` included) reads `item.<path>` and `group.<path>`.\n\t\t * - `itemMeta` parts may be `{ count, one, other }`: the number at the card's `count` path in\n\t\t * the singular or plural text, `{count}` filled in; or `{ text, when }`: the text only when the\n\t\t * local condition `when` holds on the card.\n\t\t * - `groupLines` entries may be `{ text, when }`: the line only when the local condition\n\t\t * `when` holds on the group; or `{ count, one, other }` (and `when`) as for `itemMeta`.\n\t\t * - `groupProgress` (`{ valuePath, label? }`) draws a progress bar of the group's value (0 to\n\t\t * 100) at `valuePath`, with `label` filled from the group.\n\t\t * - `heading` is a template filled from the payload, drawn as the heading above the groups (on a\n\t\t * page of its own); without a value it is left out.\n\t\t * - `extraItemsKey` with `extraItemsHeading` draws a second list of each group under that\n\t\t * heading (`extraItemTitle`, `extraItemMeta`, `extraItemActions` as for the cards); a plain\n\t\t * string entry reads as `{ value }`.\n\t\t * - `itemsPath` with `itemGroupField` reads the cards from one flat list of the payload instead of\n\t\t * from each group: a card belongs to the group whose `id` its `itemGroupField` names. Cards\n\t\t * naming no group gather under `ungroupedTitle`; without that title they are left out.\n\t\t * - `groupPill` (a pill config as record-list's `pill`: `{ field, labels?, colorMap?, ... }`)\n\t\t * draws a status pill beside the group's title, read from the group.\n\t\t * - `itemPill` (the same shape, plus `overdueWhen` and `overdueLabel`) draws a pill at the\n\t\t * card's end; while the local condition `overdueWhen` holds on the card, the pill reads\n\t\t * `overdueLabel` in the error tone. `itemDate` is a template drawn before that pill\n\t\t * (`\"{targetDate|date}\"`).\n\t\t * - `headerSubtitle` is the line under the card title, reported to the host as `header`\n\t\t * `{ subtitle }`: a template with `{groups}` and `{items}` (the numbers drawn), or\n\t\t * `{ parts, separator?, suffix? }` where a part is such a template or `{ count: \"groups\" |\n\t\t * \"items\", one, other }`; the parts join with `separator` (default \", \"), and `suffix`\n\t\t * follows after \" · \".\n\t\t *\n\t\t * A language map (`{ nl, en }`) reads in the user's language, and a list\n\t\t * of plain values reads joined with \", \". Texts go through the app's\n\t\t * translate.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The current record's id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** The current record, for `@object.<field>` tokens. */\n\t\tobjectData: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['header'],\n\n\tsetup(props) {\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', null)\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst { data, loading, error, refetch } = useEndpointSource(\n\t\t\t() => props.content?.endpointSource || null,\n\t\t\t{\n\t\t\t\tctx: () => {\n\t\t\t\t\tconst injected = unwrap(objectCtxRaw) || {}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...injected,\n\t\t\t\t\t\tobjectId: props.objectId ?? injected.objectId ?? props.objectData?.id ?? null,\n\t\t\t\t\t\tobject: props.objectData || injected.object || null,\n\t\t\t\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\t\t\t\tconfig: unwrapAppConfig(appConfigRaw) || {},\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t)\n\t\tuid += 1\n\t\treturn { payload: data, loading, error, refetch, idPrefix: `cn-grouped-cards-${uid}` }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The row of actions above the groups (`content.actions`).\n\t\t *\n\t\t * @return {Array<object>} The actions.\n\t\t * @spec openspec/changes/grouped-cards-actions/specs/grouped-cards-widget/spec.md#requirement-a-grouped-cards-widget-can-carry-a-row-of-actions-above-its-groups\n\t\t */\n\t\t/**\n\t\t * Whether each card's actions sit in one \"···\" menu (`content.itemActionsMenu`).\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/grouped-cards-item-menu/specs/grouped-cards-item-menu/spec.md#requirement-a-cards-actions-can-sit-in-one-menu\n\t\t */\n\t\titemActionsMenu() {\n\t\t\treturn this.content?.itemActionsMenu === true\n\t\t},\n\n\t\ttopActions() {\n\t\t\tconst actions = this.content?.actions\n\t\t\treturn Array.isArray(actions) ? actions.filter((action) => action && typeof action === 'object') : []\n\t\t},\n\n\t\t/** @return {number} The groups side by side. */\n\t\tcolumns() {\n\t\t\tconst value = Number(this.content?.columns)\n\t\t\treturn Number.isFinite(value) && value >= 1 ? Math.min(4, Math.floor(value)) : 2\n\t\t},\n\n\t\t/**\n\t\t * The groups ready to draw.\n\t\t *\n\t\t * @return {Array<{key: string, headingId: string, title: string, count: string, items: Array<object>}>} The groups.\n\t\t * @spec openspec/changes/grouped-cards-widget/specs/grouped-cards-widget/spec.md#requirement-a-widget-draws-groups-of-cards-from-an-endpoint\n\t\t */\n\t\tgroups() {\n\t\t\tconst c = this.content || {}\n\t\t\tconst listed = readPath(this.payload, c.groupsPath || 'groups')\n\t\t\tconst list = Array.isArray(listed) ? listed.filter((group) => group && typeof group === 'object') : []\n\t\t\tconst flat = typeof c.itemsPath === 'string' && c.itemsPath !== '' ? readPath(this.payload, c.itemsPath) : null\n\t\t\tconst groupField = typeof c.itemGroupField === 'string' && c.itemGroupField !== '' ? c.itemGroupField : ''\n\t\t\tconst flatItems = Array.isArray(flat) && groupField ? flat.filter((item) => item && typeof item === 'object') : null\n\t\t\tconst groupIds = new Set(list.map((group) => String(group.id ?? '')).filter((id) => id !== ''))\n\t\t\tconst out = list.map((raw, index) => {\n\t\t\t\tconst group = readable(raw)\n\t\t\t\tconst itemList = flatItems\n\t\t\t\t\t? flatItems.filter((item) => String(item[groupField] ?? '') !== '' && String(item[groupField]) === String(raw.id ?? ''))\n\t\t\t\t\t: (Array.isArray(raw[c.itemsKey || 'items']) ? raw[c.itemsKey || 'items'] : [])\n\t\t\t\tconst items = this.itemsOf(itemList, raw)\n\t\t\t\treturn {\n\t\t\t\t\tkey: String(raw.id ?? `group-${index}`),\n\t\t\t\t\theadingId: `${this.idPrefix}-group-${index}`,\n\t\t\t\t\ttitle: this.fill(c.groupTitle || '{name}', group),\n\t\t\t\t\tlines: this.linesOf(group, raw),\n\t\t\t\t\tcount: this.countOf(items.length),\n\t\t\t\t\titems,\n\t\t\t\t\tpill: this.groupPillOf(raw),\n\t\t\t\t\taction: this.groupActionFor(raw, index),\n\t\t\t\t\tprogress: this.progressOf(raw, group),\n\t\t\t\t\t...this.extraOf(raw),\n\t\t\t\t}\n\t\t\t})\n\t\t\tif (flatItems && typeof c.ungroupedTitle === 'string' && c.ungroupedTitle !== '') {\n\t\t\t\tconst loose = flatItems.filter((item) => !groupIds.has(String(item[groupField] ?? '')))\n\t\t\t\tif (loose.length > 0) {\n\t\t\t\t\tconst items = this.itemsOf(loose, {})\n\t\t\t\t\tout.push({\n\t\t\t\t\t\tkey: 'ungrouped',\n\t\t\t\t\t\theadingId: `${this.idPrefix}-ungrouped`,\n\t\t\t\t\t\ttitle: this.translate(c.ungroupedTitle),\n\t\t\t\t\t\tlines: [],\n\t\t\t\t\t\tcount: this.countOf(items.length),\n\t\t\t\t\t\titems,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The closing box of entries available everywhere, or null.\n\t\t *\n\t\t * @return {{headingId: string, title: string, text: string}|null} The box.\n\t\t * @spec openspec/changes/grouped-cards-widget/specs/grouped-cards-widget/spec.md#requirement-a-widget-draws-groups-of-cards-from-an-endpoint\n\t\t */\n\t\textra() {\n\t\t\tconst spec = this.content?.extraGroup\n\t\t\tif (!spec || typeof spec !== 'object' || !spec.path) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst list = readPath(this.payload, spec.path)\n\t\t\tif (!Array.isArray(list) || list.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst parts = list\n\t\t\t\t.map((entry) => (entry && typeof entry === 'object' ? this.fill(spec.itemText || '{label}', readable(entry)) : languageMapText(entry)))\n\t\t\t\t.filter((text) => text !== '')\n\t\t\tif (parts.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn {\n\t\t\t\theadingId: `${this.idPrefix}-extra`,\n\t\t\t\ttitle: this.translate(spec.title || 'Always available'),\n\t\t\t\ttext: parts.join(typeof spec.join === 'string' ? spec.join : ' · '),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The line under the card title (`content.headerSubtitle`), once the\n\t\t * payload is read.\n\t\t *\n\t\t * @return {string} The line, '' without a declaration or a payload.\n\t\t * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-a-grouped-cards-card-can-say-its-counts-under-its-title\n\t\t */\n\t\theaderSubtitleText() {\n\t\t\tconst spec = this.content?.headerSubtitle\n\t\t\tif (!spec || this.payload === null || this.payload === undefined || this.error) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst counts = {\n\t\t\t\tgroups: this.groups.length,\n\t\t\t\titems: this.groups.reduce((sum, group) => sum + group.items.length, 0),\n\t\t\t}\n\t\t\tconst fillCounts = (text) => this.translate(text).replace(/\\{groups\\}/g, String(counts.groups)).replace(/\\{items\\}/g, String(counts.items))\n\t\t\tif (typeof spec === 'string') {\n\t\t\t\treturn fillCounts(spec)\n\t\t\t}\n\t\t\tif (typeof spec !== 'object' || !Array.isArray(spec.parts)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst line = spec.parts\n\t\t\t\t.map((part) => {\n\t\t\t\t\tif (typeof part === 'string') {\n\t\t\t\t\t\treturn fillCounts(part)\n\t\t\t\t\t}\n\t\t\t\t\tif (part && typeof part === 'object' && (part.count === 'groups' || part.count === 'items')) {\n\t\t\t\t\t\tconst count = counts[part.count]\n\t\t\t\t\t\tconst template = count === 1 ? part.one : part.other\n\t\t\t\t\t\treturn typeof template === 'string' && template !== '' ? this.translate(template).replace(/\\{count\\}/g, String(count)) : ''\n\t\t\t\t\t}\n\t\t\t\t\treturn ''\n\t\t\t\t})\n\t\t\t\t.filter((text) => text !== '')\n\t\t\t\t.join(typeof spec.separator === 'string' ? spec.separator : ', ')\n\t\t\tconst suffix = typeof spec.suffix === 'string' && spec.suffix !== '' ? this.translate(spec.suffix) : ''\n\t\t\treturn [line, suffix].filter((text) => text !== '').join(' · ')\n\t\t},\n\n\t\t/** @return {string} The heading above the groups, filled from the payload. */\n\t\theading() {\n\t\t\tconst template = this.content?.heading\n\t\t\tconst row = this.payload && typeof this.payload === 'object' && !Array.isArray(this.payload) ? readable(this.payload) : {}\n\t\t\treturn template ? this.fill(template, row) : ''\n\t\t},\n\n\t\t/** @return {string} The empty text. */\n\t\temptyLabel() {\n\t\t\treturn this.content?.emptyText ? this.translate(this.content.emptyText) : t('nextcloud-vue', 'Nothing to show yet')\n\t\t},\n\n\t\t/** @return {string} The text of a group without cards. */\n\t\tgroupEmptyLabel() {\n\t\t\treturn this.content?.groupEmptyText ? this.translate(this.content.groupEmptyText) : t('nextcloud-vue', 'Nothing here yet')\n\t\t},\n\n\t\t/** @return {string} The error text. */\n\t\terrorLabel() {\n\t\t\treturn this.content?.errorText ? this.translate(this.content.errorText) : t('nextcloud-vue', 'This list could not be loaded.')\n\t\t},\n\n\t\t/** @return {string} The retry button's text. */\n\t\tretryLabel() {\n\t\t\treturn t('nextcloud-vue', 'Try again')\n\t\t},\n\n\t\t/** @return {string} The loading label. */\n\t\tloadingLabel() {\n\t\t\treturn t('nextcloud-vue', 'Loading')\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Report the counts line to the card around the widget.\n\t\t *\n\t\t * @param {string} subtitle The line, or ''.\n\t\t */\n\t\theaderSubtitleText: {\n\t\t\timmediate: true,\n\t\t\t/** @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-a-grouped-cards-card-can-say-its-counts-under-its-title */\n\t\t\thandler(subtitle) {\n\t\t\t\tif (this.content?.headerSubtitle) {\n\t\t\t\t\t/**\n\t\t\t\t\t * @event header The card header's line under the title.\n\t\t\t\t\t * @type {{subtitle: string}}\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('header', { subtitle })\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The status pill of a group (`content.groupPill`).\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @return {{label: string, variant: string}|null} The pill, or null.\n\t\t * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-groups-and-cards-can-carry-a-status-pill\n\t\t */\n\t\tgroupPillOf(raw) {\n\t\t\tconst spec = this.content?.groupPill\n\t\t\treturn spec ? fieldPill(raw, spec, { translate: (text) => this.translate(text), fill: (template, row) => this.fill(template, readable(row)) }) : null\n\t\t},\n\n\t\t/**\n\t\t * The status pill at a card's end (`content.itemPill`): `overdueLabel`\n\t\t * in the error tone while `overdueWhen` holds on the card.\n\t\t *\n\t\t * @param {object} rawItem The card as read.\n\t\t * @return {{label: string, variant: string}|null} The pill, or null.\n\t\t * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-groups-and-cards-can-carry-a-status-pill\n\t\t */\n\t\titemPillOf(rawItem) {\n\t\t\tconst spec = this.content?.itemPill\n\t\t\tif (!spec || typeof spec !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (spec.overdueWhen && typeof spec.overdueLabel === 'string' && spec.overdueLabel !== '' && evaluateVisibleWhenLocal(spec.overdueWhen, rawItem)) {\n\t\t\t\treturn { label: this.translate(spec.overdueLabel), variant: 'error' }\n\t\t\t}\n\t\t\treturn fieldPill(rawItem, spec, { translate: (text) => this.translate(text), fill: (template, row) => this.fill(template, readable(row)) })\n\t\t},\n\n\t\t/**\n\t\t * The `groupAction` for one group, with every `@group.<path>` token in\n\t\t * its strings read from that group, and its id made unique per group.\n\t\t * Null without a `groupAction`, or for a group missing a value a token\n\t\t * names (the action would address no group).\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @param {number} index The group's position.\n\t\t * @return {object|null} The action.\n\t\t * @spec openspec/changes/grouped-cards-group-action/specs/grouped-cards-group-action/spec.md#requirement-every-group-can-carry-an-action\n\t\t */\n\t\tgroupActionFor(raw, index) {\n\t\t\tconst action = this.content?.groupAction\n\t\t\tif (!action || typeof action !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tlet missing = false\n\t\t\tconst fill = (value) => {\n\t\t\t\tif (typeof value === 'string') {\n\t\t\t\t\treturn value.replace(/@group\\.([\\w.]+)/g, (token, path) => {\n\t\t\t\t\t\tconst found = readPath(raw, path)\n\t\t\t\t\t\tif (found === undefined || found === null || found === '') {\n\t\t\t\t\t\t\tmissing = true\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn encodeURIComponent(String(found))\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\treturn value.map(fill)\n\t\t\t\t}\n\t\t\t\tif (value && typeof value === 'object') {\n\t\t\t\t\treturn Object.fromEntries(Object.entries(value).map(([key, inner]) => [key, fill(inner)]))\n\t\t\t\t}\n\t\t\t\treturn value\n\t\t\t}\n\t\t\tconst filled = fill(action)\n\t\t\treturn missing ? null : { ...filled, id: `${action.id || 'group-action'}-${index}` }\n\t\t},\n\n\t\t/**\n\t\t * Translate a text through the host app's catalogue.\n\t\t *\n\t\t * @param {string} text The text.\n\t\t * @return {string} The translated text.\n\t\t */\n\t\ttranslate(text) {\n\t\t\tconst fn = typeof this.cnTranslate === 'function' ? this.cnTranslate : (key) => key\n\t\t\treturn fn(text)\n\t\t},\n\n\t\t/**\n\t\t * Fill a template from a row, after translating it.\n\t\t *\n\t\t * @param {string} template The template.\n\t\t * @param {object} row The row.\n\t\t * @return {string} The text, '' when a token is empty.\n\t\t */\n\t\tfill(template, row) {\n\t\t\tif (Array.isArray(template)) {\n\t\t\t\treturn firstFilled(template, row, (text) => this.translate(text), new Date(), { config: unwrapAppConfig(this.cnAppConfig) })\n\t\t\t}\n\t\t\tif (typeof template !== 'string' || template === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn fillTemplate(this.translate(template), row, new Date(), { config: unwrapAppConfig(this.cnAppConfig) })\n\t\t},\n\n\t\t/**\n\t\t * The cards ready to draw.\n\t\t *\n\t\t * @param {Array<object>} list The raw cards.\n\t\t * @param {object} [rawGroup] Their group as read, for `@group` tokens.\n\t\t * @param {object} [spec] `{ title, meta, actions }` for a second list, in place of the card settings.\n\t\t * @return {Array<{key: string, title: string, meta: string, flag: string}>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-grouped-cards-can-join-a-flat-list-and-flag-a-card\n\t\t */\n\t\titemsOf(list, rawGroup = {}, spec = {}) {\n\t\t\tconst c = this.content || {}\n\t\t\tconst titleTemplate = spec.title || c.itemTitle || '{title}'\n\t\t\tconst metaSpec = spec.meta !== undefined ? spec.meta : c.itemMeta\n\t\t\tconst actions = spec.actions !== undefined ? spec.actions : c.itemActions\n\t\t\treturn list\n\t\t\t\t.map((entry) => (typeof entry === 'string' || typeof entry === 'number' ? { value: entry } : entry))\n\t\t\t\t.filter((item) => item && typeof item === 'object')\n\t\t\t\t.map((rawItem, itemIndex) => {\n\t\t\t\t\tconst item = readable(rawItem)\n\t\t\t\t\tconst flag = !spec.title && c.itemFlag && typeof c.itemFlag === 'object' && c.itemFlag.field && rawItem[c.itemFlag.field] === true\n\t\t\t\t\t\t? this.translate(c.itemFlag.label || '')\n\t\t\t\t\t\t: ''\n\t\t\t\t\tconst key = String(rawItem.id ?? rawItem.value ?? `item-${itemIndex}`)\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\ttitle: this.fill(titleTemplate, item),\n\t\t\t\t\t\tmeta: this.metaOf(item, rawItem, metaSpec),\n\t\t\t\t\t\tflag,\n\t\t\t\t\t\tpill: spec.title ? null : this.itemPillOf(rawItem),\n\t\t\t\t\t\tdate: spec.title || !c.itemDate ? '' : this.fill(c.itemDate, item),\n\t\t\t\t\t\tactions: this.itemActionsFor(actions, rawItem, rawGroup, key),\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The actions of one card, tokens filled from the card and its group,\n\t\t * those whose `visibleWhen` does not hold left out.\n\t\t *\n\t\t * @param {Array<object>|undefined} actions The configured actions.\n\t\t * @param {object} rawItem The card as read.\n\t\t * @param {object} rawGroup Its group as read.\n\t\t * @param {string} key The card's key, made part of each action id.\n\t\t * @return {Array<object>}\n\t\t * @spec openspec/changes/grouped-cards-item-actions/specs/grouped-cards-item-actions/spec.md#requirement-every-card-can-carry-actions\n\t\t */\n\t\t/**\n\t\t * The name of a card's actions menu: \"Actions for {row}\", the card's title filled in.\n\t\t *\n\t\t * @param {object} item The drawn card.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/grouped-cards-item-menu/specs/grouped-cards-item-menu/spec.md#requirement-a-cards-actions-can-sit-in-one-menu\n\t\t */\n\t\titemMenuLabel(item) {\n\t\t\treturn t('nextcloud-vue', 'Actions for {row}', { row: item.title || '' })\n\t\t},\n\n\t\titemActionsFor(actions, rawItem, rawGroup, key) {\n\t\t\tif (!Array.isArray(actions)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst scope = { item: rawItem, group: rawGroup }\n\t\t\treturn actions\n\t\t\t\t.filter((action) => action && typeof action === 'object')\n\t\t\t\t.filter((action) => !action.visibleWhen || evaluateVisibleWhenLocal(action.visibleWhen, scope))\n\t\t\t\t.map((action, index) => {\n\t\t\t\t\tconst { visibleWhen, ...rest } = action\n\t\t\t\t\treturn { ...this.fillTokens(rest, scope), id: `${action.id || 'item-action'}-${key}-${index}` }\n\t\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Fill `@item.<path>` and `@group.<path>` in every string of an action.\n\t\t * In `url`, `target` and `href` a value is URL-encoded; a string that is\n\t\t * exactly one token takes the value as it is.\n\t\t *\n\t\t * @param {unknown} value The action, or a part of it.\n\t\t * @param {object} scope `{ item, group }`.\n\t\t * @param {string} [key] The key the value sits under.\n\t\t * @return {unknown}\n\t\t */\n\t\tfillTokens(value, scope, key = '') {\n\t\t\tconst token = /@(item|group)\\.([\\w.]+)/g\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tconst whole = value.match(/^@(item|group)\\.([\\w.]+)$/)\n\t\t\t\tif (whole && !['url', 'target', 'href'].includes(key)) {\n\t\t\t\t\treturn readPath(scope[whole[1]], whole[2]) ?? null\n\t\t\t\t}\n\t\t\t\tconst encode = ['url', 'target', 'href'].includes(key)\n\t\t\t\treturn value.replace(token, (match, root, path) => {\n\t\t\t\t\tconst found = readPath(scope[root], path)\n\t\t\t\t\tconst text = found === undefined || found === null ? '' : String(found)\n\t\t\t\t\treturn encode ? encodeURIComponent(text) : text\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\treturn value.map((entry) => this.fillTokens(entry, scope))\n\t\t\t}\n\t\t\tif (value && typeof value === 'object') {\n\t\t\t\treturn Object.fromEntries(Object.entries(value).map(([inner, entry]) => [inner, this.fillTokens(entry, scope, inner)]))\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\t/**\n\t\t * A group's progress bar, or null without `groupProgress`.\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @param {object} group The group's readable row.\n\t\t * @return {{value: number, label: string}|null}\n\t\t */\n\t\tprogressOf(raw, group) {\n\t\t\tconst spec = this.content?.groupProgress\n\t\t\tif (!spec || typeof spec !== 'object' || !spec.valuePath) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst value = Number(readPath(raw, spec.valuePath))\n\t\t\tif (!Number.isFinite(value)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn { value: Math.max(0, Math.min(100, value)), label: spec.label ? this.fill(spec.label, group) : '' }\n\t\t},\n\n\t\t/**\n\t\t * A group's second list (`extraItemsKey`), or nothing.\n\t\t *\n\t\t * @param {object} raw The group as read.\n\t\t * @return {{extraItems?: Array<object>, extraHeading?: string}}\n\t\t */\n\t\textraOf(raw) {\n\t\t\tconst c = this.content || {}\n\t\t\tif (typeof c.extraItemsKey !== 'string' || c.extraItemsKey === '') {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t\tconst list = Array.isArray(raw[c.extraItemsKey]) ? raw[c.extraItemsKey] : []\n\t\t\treturn {\n\t\t\t\textraHeading: this.translate(c.extraItemsHeading || ''),\n\t\t\t\textraItems: this.itemsOf(list, raw, { title: c.extraItemTitle || '{value}', meta: c.extraItemMeta || [], actions: c.extraItemActions || [] }),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The lines under a group's title (`groupLines`), the empty ones left out.\n\t\t *\n\t\t * @param {object} group The group's row.\n\t\t * @param {object} [raw] The group as read, for a line's `when`.\n\t\t * @return {Array<string>}\n\t\t * @spec openspec/changes/dq-abstract-record-widgets/specs/record-widgets/spec.md#requirement-grouped-cards-can-join-a-flat-list-and-flag-a-card\n\t\t */\n\t\tlinesOf(group, raw = {}) {\n\t\t\tconst spec = this.content?.groupLines\n\t\t\treturn (Array.isArray(spec) ? spec : [])\n\t\t\t\t.filter((line) => !line || typeof line !== 'object' || Array.isArray(line) || !line.when || evaluateVisibleWhenLocal(line.when, raw))\n\t\t\t\t.map((line) => {\n\t\t\t\t\tif (line && typeof line === 'object' && !Array.isArray(line)) {\n\t\t\t\t\t\treturn line.count ? this.countText(line, raw) : this.fill(line.text, group)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fill(line, group)\n\t\t\t\t})\n\t\t\t\t.filter((text) => text !== '')\n\t\t},\n\n\t\t/**\n\t\t * Read the endpoint again after a failed read.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tretry() {\n\t\t\tif (typeof this.refetch === 'function') {\n\t\t\t\tthis.refetch(true)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A card's meta line: one template, or several joined with \" · \", a\n\t\t * part whose token is empty being left out with its separator.\n\t\t *\n\t\t * @param {object} item The card's row.\n\t\t * @param {object} [rawItem] The card as read, for a count part.\n\t\t * @param {Array|string} [spec] The parts, by default `itemMeta`.\n\t\t * @return {string} The line.\n\t\t */\n\t\tmetaOf(item, rawItem = item, spec = this.content?.itemMeta) {\n\t\t\tconst parts = Array.isArray(spec) ? spec : (typeof spec === 'string' ? [spec] : [])\n\t\t\treturn parts\n\t\t\t\t.filter((part) => !part || typeof part !== 'object' || Array.isArray(part) || !part.when || evaluateVisibleWhenLocal(part.when, rawItem))\n\t\t\t\t.map((part) => {\n\t\t\t\t\tif (part && typeof part === 'object' && !Array.isArray(part)) {\n\t\t\t\t\t\treturn part.count ? this.countText(part, rawItem) : this.fill(part.text, item)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fill(part, item)\n\t\t\t\t})\n\t\t\t\t.filter((text) => text !== '')\n\t\t\t\t.join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * A number in its singular or plural text (`{ count, one, other }`).\n\t\t *\n\t\t * @param {object} part The meta part.\n\t\t * @param {object} rawItem The card as read.\n\t\t * @return {string} The text, '' when the number is missing.\n\t\t */\n\t\tcountText(part, rawItem) {\n\t\t\tconst count = Number(readPath(rawItem, part.count))\n\t\t\tif (!Number.isFinite(count)) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst template = count === 1 ? part.one : part.other\n\t\t\treturn typeof template === 'string' && template !== '' ? this.translate(template).replace(/\\{count\\}/g, String(count)) : ''\n\t\t},\n\n\t\t/**\n\t\t * The count pill of a group (`groupCount: { one, other }`).\n\t\t *\n\t\t * @param {number} count The number of cards.\n\t\t * @return {string} The text, '' without `groupCount`.\n\t\t */\n\t\tcountOf(count) {\n\t\t\tconst spec = this.content?.groupCount\n\t\t\tif (!spec || typeof spec !== 'object') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst template = count === 1 ? spec.one : spec.other\n\t\t\treturn typeof template === 'string' && template !== '' ? this.translate(template).replace(/\\{count\\}/g, String(count)) : ''\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-grouped-cards__actions {\n\tmargin-block-end: 16px;\n}\n\n.cn-grouped-cards__heading {\n\tmargin: 0 0 12px;\n}\n\n.cn-grouped-cards__progress {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-grouped-cards__progress-label {\n\tcolor: var(--color-text-maxcontrast);\n\twhite-space: nowrap;\n}\n\n.cn-grouped-cards__extra-heading {\n\tmargin: 4px 0 0;\n}\n\n.cn-grouped-cards__item-actions {\n\tmargin-inline-start: auto;\n}\n\n.cn-grouped-cards__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(var(--cn-grouped-cards-columns, 2), minmax(0, 1fr));\n\tgap: 16px;\n}\n\n@media (max-width: 700px) {\n\t.cn-grouped-cards__grid {\n\t\tgrid-template-columns: minmax(0, 1fr);\n\t}\n}\n\n.cn-grouped-cards__group {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tpadding: 12px 14px 14px;\n\tborder-radius: var(--border-radius-large, 10px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-grouped-cards__group--extra {\n\tbackground: transparent;\n\tborder: 1px dashed var(--color-border-dark);\n}\n\n.cn-grouped-cards__group-header {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-grouped-cards__group-title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-grouped-cards__group-action {\n\tmargin-top: 8px;\n}\n\n.cn-grouped-cards__count {\n\tpadding: 2px 8px;\n\tborder-radius: var(--border-radius-pill, 12px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n\twhite-space: nowrap;\n}\n\n.cn-grouped-cards__items {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-grouped-cards__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large, 8px);\n\tbackground: var(--color-main-background);\n}\n\n.cn-grouped-cards__item-title {\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-grouped-cards__item-end {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\talign-self: flex-end;\n}\n\n.cn-grouped-cards__item-date {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\twhite-space: nowrap;\n}\n\n.cn-grouped-cards__item-flag {\n\tcolor: var(--color-text-error, var(--color-error-text, var(--color-error)));\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-grouped-cards__group-line {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-grouped-cards__item-meta,\n.cn-grouped-cards__extra-text,\n.cn-grouped-cards__group-empty,\n.cn-grouped-cards__state {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-grouped-cards__loading {\n\tdisplay: flex;\n\tjustify-content: center;\n\tpadding: 8px 0;\n}\n</style>\n"],"names":["CnActionButtons","CnStatusBadge","t"],"mappings":";;;;;;;;;;;;;;AAgKA,IAAI,MAAM,EAAA;;AAEV;;AAEC;;AAEA;;AAED,SAAS,MAAM,CAAC,KAAK,EAAE;AACt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nD,OAAO,OAAO,aAAa,QAAO,IAAK,aAAa,EAAG,GAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,GAAE,EAAC;GAC1H;;AAED;;AAEC;AACA;AACA;;AAED,EAAA,OAAO,CAAC,KAAK,EAAE;AACd,GAAA,MAAM,IAAG,GAAI,IAAI,CAAC,OAAO,EAAE,WAAS;AACpC,GAAA,IAAI,CAAC,IAAK,IAAG,OAAO,IAAG,KAAM,QAAQ,EAAE;AACtC,IAAA,OAAO,EAAC;AACT,IAAA;AACA,GAAA,MAAM,WAAW,UAAU,CAAA,GAAI,IAAI,CAAC,GAAE,GAAI,IAAI,CAAC,MAAI;GACnD,OAAO,OAAO,aAAa,QAAO,IAAK,aAAa,EAAG,GAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,GAAE,EAAC;GAC1H;EACD;AACF;;;;"}
|
|
@@ -56,33 +56,43 @@ const _hoisted_14 = {
|
|
|
56
56
|
};
|
|
57
57
|
const _hoisted_15 = {
|
|
58
58
|
key: 2,
|
|
59
|
-
class: "cn-grouped-
|
|
59
|
+
class: "cn-grouped-cards__item-end"
|
|
60
60
|
};
|
|
61
61
|
const _hoisted_16 = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "cn-grouped-cards__item-date",
|
|
64
|
+
"data-testid": "cn-grouped-cards-item-date"
|
|
65
|
+
};
|
|
66
|
+
const _hoisted_17 = {
|
|
67
|
+
key: 2,
|
|
68
|
+
class: "cn-grouped-cards__group-empty"
|
|
69
|
+
};
|
|
70
|
+
const _hoisted_18 = {
|
|
62
71
|
class: "cn-grouped-cards__extra-heading",
|
|
63
72
|
"data-testid": "cn-grouped-cards-extra-heading"
|
|
64
73
|
};
|
|
65
|
-
const
|
|
74
|
+
const _hoisted_19 = {
|
|
66
75
|
key: 0,
|
|
67
76
|
class: "cn-grouped-cards__items"
|
|
68
77
|
};
|
|
69
|
-
const
|
|
70
|
-
const
|
|
78
|
+
const _hoisted_20 = { class: "cn-grouped-cards__item-title" };
|
|
79
|
+
const _hoisted_21 = {
|
|
71
80
|
key: 0,
|
|
72
81
|
class: "cn-grouped-cards__item-meta"
|
|
73
82
|
};
|
|
74
|
-
const
|
|
83
|
+
const _hoisted_22 = {
|
|
75
84
|
key: 1,
|
|
76
85
|
class: "cn-grouped-cards__group-empty"
|
|
77
86
|
};
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
87
|
+
const _hoisted_23 = ["aria-labelledby"];
|
|
88
|
+
const _hoisted_24 = { class: "cn-grouped-cards__group-header" };
|
|
89
|
+
const _hoisted_25 = { class: "cn-grouped-cards__extra-text" };
|
|
81
90
|
|
|
82
91
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
83
92
|
const _component_CnActionButtons = resolveComponent("CnActionButtons");
|
|
84
93
|
const _component_NcButton = resolveComponent("NcButton");
|
|
85
94
|
const _component_NcLoadingIcon = resolveComponent("NcLoadingIcon");
|
|
95
|
+
const _component_CnStatusBadge = resolveComponent("CnStatusBadge");
|
|
86
96
|
const _component_NcProgressBar = resolveComponent("NcProgressBar");
|
|
87
97
|
|
|
88
98
|
return (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -144,6 +154,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
144
154
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["id"])),
|
|
145
155
|
(group.count)
|
|
146
156
|
? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(group.count), 1 /* TEXT */))
|
|
157
|
+
: createCommentVNode("v-if", true),
|
|
158
|
+
(group.pill)
|
|
159
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
160
|
+
key: 1,
|
|
161
|
+
label: group.pill.label,
|
|
162
|
+
variant: group.pill.variant,
|
|
163
|
+
size: "small",
|
|
164
|
+
"data-testid": "cn-grouped-cards-group-pill"
|
|
165
|
+
}, null, 8 /* PROPS */, ["label", "variant"]))
|
|
147
166
|
: createCommentVNode("v-if", true)
|
|
148
167
|
]),
|
|
149
168
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.lines, (line, lineIndex) => {
|
|
@@ -179,9 +198,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
179
198
|
(item.flag)
|
|
180
199
|
? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(item.flag), 1 /* TEXT */))
|
|
181
200
|
: createCommentVNode("v-if", true),
|
|
201
|
+
(item.date || item.pill)
|
|
202
|
+
? (openBlock(), createElementBlock("span", _hoisted_15, [
|
|
203
|
+
(item.date)
|
|
204
|
+
? (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString(item.date), 1 /* TEXT */))
|
|
205
|
+
: createCommentVNode("v-if", true),
|
|
206
|
+
(item.pill)
|
|
207
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
208
|
+
key: 1,
|
|
209
|
+
label: item.pill.label,
|
|
210
|
+
variant: item.pill.variant,
|
|
211
|
+
size: "small",
|
|
212
|
+
"data-testid": "cn-grouped-cards-item-pill"
|
|
213
|
+
}, null, 8 /* PROPS */, ["label", "variant"]))
|
|
214
|
+
: createCommentVNode("v-if", true)
|
|
215
|
+
]))
|
|
216
|
+
: createCommentVNode("v-if", true),
|
|
182
217
|
(item.actions.length > 0)
|
|
183
218
|
? (openBlock(), createBlock(_component_CnActionButtons, {
|
|
184
|
-
key:
|
|
219
|
+
key: 3,
|
|
185
220
|
class: normalizeClass(["cn-grouped-cards__item-actions", { 'cn-row-actions--board': $options.itemActionsMenu }]),
|
|
186
221
|
actions: item.actions,
|
|
187
222
|
overflowOnly: $options.itemActionsMenu,
|
|
@@ -192,21 +227,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
192
227
|
]))
|
|
193
228
|
}), 128 /* KEYED_FRAGMENT */))
|
|
194
229
|
]))
|
|
195
|
-
: (openBlock(), createElementBlock("p",
|
|
230
|
+
: (openBlock(), createElementBlock("p", _hoisted_17, toDisplayString($options.groupEmptyLabel), 1 /* TEXT */)),
|
|
196
231
|
(group.extraItems)
|
|
197
232
|
? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
198
|
-
createElementVNode("h5",
|
|
233
|
+
createElementVNode("h5", _hoisted_18, toDisplayString(group.extraHeading), 1 /* TEXT */),
|
|
199
234
|
(group.extraItems.length > 0)
|
|
200
|
-
? (openBlock(), createElementBlock("ul",
|
|
235
|
+
? (openBlock(), createElementBlock("ul", _hoisted_19, [
|
|
201
236
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.extraItems, (item) => {
|
|
202
237
|
return (openBlock(), createElementBlock("li", {
|
|
203
238
|
key: item.key,
|
|
204
239
|
class: "cn-grouped-cards__item",
|
|
205
240
|
"data-testid": "cn-grouped-cards-extra-item"
|
|
206
241
|
}, [
|
|
207
|
-
createElementVNode("span",
|
|
242
|
+
createElementVNode("span", _hoisted_20, toDisplayString(item.title), 1 /* TEXT */),
|
|
208
243
|
(item.meta)
|
|
209
|
-
? (openBlock(), createElementBlock("span",
|
|
244
|
+
? (openBlock(), createElementBlock("span", _hoisted_21, toDisplayString(item.meta), 1 /* TEXT */))
|
|
210
245
|
: createCommentVNode("v-if", true),
|
|
211
246
|
(item.actions.length > 0)
|
|
212
247
|
? (openBlock(), createBlock(_component_CnActionButtons, {
|
|
@@ -219,7 +254,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
219
254
|
]))
|
|
220
255
|
}), 128 /* KEYED_FRAGMENT */))
|
|
221
256
|
]))
|
|
222
|
-
: (openBlock(), createElementBlock("p",
|
|
257
|
+
: (openBlock(), createElementBlock("p", _hoisted_22, toDisplayString($options.groupEmptyLabel), 1 /* TEXT */))
|
|
223
258
|
], 64 /* STABLE_FRAGMENT */))
|
|
224
259
|
: createCommentVNode("v-if", true),
|
|
225
260
|
(group.action)
|
|
@@ -239,7 +274,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
239
274
|
"aria-labelledby": $options.extra.headingId,
|
|
240
275
|
"data-testid": "cn-grouped-cards-extra"
|
|
241
276
|
}, [
|
|
242
|
-
createElementVNode("header",
|
|
277
|
+
createElementVNode("header", _hoisted_24, [
|
|
243
278
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.innerHeadingTag), {
|
|
244
279
|
id: $options.extra.headingId,
|
|
245
280
|
class: "cn-grouped-cards__group-title cn-inner-heading"
|
|
@@ -250,8 +285,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
250
285
|
_: 1 /* STABLE */
|
|
251
286
|
}, 8 /* PROPS */, ["id"]))
|
|
252
287
|
]),
|
|
253
|
-
createElementVNode("p",
|
|
254
|
-
], 8 /* PROPS */,
|
|
288
|
+
createElementVNode("p", _hoisted_25, toDisplayString($options.extra.text), 1 /* TEXT */)
|
|
289
|
+
], 8 /* PROPS */, _hoisted_23))
|
|
255
290
|
: createCommentVNode("v-if", true)
|
|
256
291
|
], 4 /* STYLE */))
|
|
257
292
|
]))
|