@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.
Files changed (204) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
  7. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
  8. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
  9. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
  10. package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
  11. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
  12. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
  13. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
  14. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
  15. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
  16. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
  17. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
  18. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
  19. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
  20. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  21. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
  22. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  23. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
  24. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  25. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  26. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
  27. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
  28. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
  29. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
  30. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
  31. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
  32. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
  33. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
  34. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
  35. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
  36. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
  37. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
  38. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
  39. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
  40. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
  41. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
  42. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
  43. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
  44. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
  45. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
  46. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
  47. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
  48. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
  49. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  50. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
  51. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  52. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
  53. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  54. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
  55. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
  56. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
  57. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
  59. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
  60. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
  61. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
  62. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
  63. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
  64. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
  65. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
  66. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
  70. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  71. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  72. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
  73. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  74. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
  75. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  76. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
  77. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
  78. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  79. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
  80. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  81. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  82. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
  83. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  84. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
  85. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  86. package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
  87. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
  88. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
  89. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
  90. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
  91. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  92. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  93. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  94. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
  95. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
  96. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
  97. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
  98. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
  99. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
  100. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
  101. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
  102. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
  103. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
  104. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
  105. package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
  106. package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
  107. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
  108. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
  109. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
  110. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
  111. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
  112. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  113. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  114. package/dist/esm/composables/indexSources.js +24 -4
  115. package/dist/esm/composables/indexSources.js.map +1 -1
  116. package/dist/esm/composables/useFlowStore.js +75 -4
  117. package/dist/esm/composables/useFlowStore.js.map +1 -1
  118. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
  119. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
  120. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
  121. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
  122. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
  123. package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
  124. package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
  125. package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
  126. package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
  127. package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
  128. package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
  129. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
  130. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
  131. package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
  132. package/dist/esm/index.js +3 -0
  133. package/dist/esm/index.js.map +1 -1
  134. package/dist/esm/l10n/en.json.js +52 -1
  135. package/dist/esm/l10n/en.json.js.map +1 -1
  136. package/dist/esm/l10n/nl.json.js +51 -1
  137. package/dist/esm/l10n/nl.json.js.map +1 -1
  138. package/dist/esm/library-style.js +1 -1
  139. package/dist/esm/nextcloud-vue.css +1203 -812
  140. package/dist/esm/utils/dialogWidths.js +6 -4
  141. package/dist/esm/utils/dialogWidths.js.map +1 -1
  142. package/dist/esm/utils/fieldPill.js +77 -0
  143. package/dist/esm/utils/fieldPill.js.map +1 -0
  144. package/dist/esm/utils/flowCondition.js +177 -0
  145. package/dist/esm/utils/flowCondition.js.map +1 -0
  146. package/dist/esm/utils/flowRunStatus.js +64 -1
  147. package/dist/esm/utils/flowRunStatus.js.map +1 -1
  148. package/dist/esm/utils/flowStepList.js +385 -0
  149. package/dist/esm/utils/flowStepList.js.map +1 -0
  150. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  151. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  152. package/dist/esm/utils/searchRefusal.js +35 -1
  153. package/dist/esm/utils/searchRefusal.js.map +1 -1
  154. package/dist/esm/utils/widgetDispatch.js +1 -1
  155. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  156. package/dist/nextcloud-vue.cjs.js +14837 -11411
  157. package/dist/nextcloud-vue.cjs.js.map +2 -2
  158. package/dist/nextcloud-vue.css +1203 -812
  159. package/l10n/en.json +52 -1
  160. package/l10n/nl.json +51 -1
  161. package/package.json +1 -1
  162. package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
  163. package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
  164. package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
  165. package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
  166. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
  167. package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  168. package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
  169. package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
  170. package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
  171. package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
  172. package/src/components/CnFlowDetail/index.js +2 -0
  173. package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
  174. package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
  175. package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
  176. package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
  177. package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
  178. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
  179. package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
  180. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
  181. package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
  182. package/src/components/CnStepper/CnStepper.vue +14 -5
  183. package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
  184. package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
  185. package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
  186. package/src/components/CnTaskFormWidget/index.js +23 -0
  187. package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
  188. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  189. package/src/components/index.js +2 -1
  190. package/src/composables/indexSources.js +24 -4
  191. package/src/composables/useFlowStore.js +75 -4
  192. package/src/css/index-page.css +10 -0
  193. package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
  194. package/src/dialogs/CnFlowEditModal.vue +26 -6
  195. package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
  196. package/src/index.js +3 -0
  197. package/src/utils/dialogWidths.js +6 -4
  198. package/src/utils/fieldPill.js +73 -0
  199. package/src/utils/flowCondition.js +173 -0
  200. package/src/utils/flowRunStatus.js +63 -0
  201. package/src/utils/flowStepList.js +381 -0
  202. package/src/utils/libraryWidgetKeys.js +1 -0
  203. package/src/utils/searchRefusal.js +33 -0
  204. package/src/utils/widgetDispatch.js +1 -1
@@ -45,6 +45,12 @@
45
45
  {{ group.title }}
46
46
  </component>
47
47
  <span v-if="group.count" class="cn-grouped-cards__count" data-testid="cn-grouped-cards-count">{{ group.count }}</span>
48
+ <CnStatusBadge
49
+ v-if="group.pill"
50
+ :label="group.pill.label"
51
+ :variant="group.pill.variant"
52
+ size="small"
53
+ data-testid="cn-grouped-cards-group-pill" />
48
54
  </header>
49
55
  <p
50
56
  v-for="(line, lineIndex) in group.lines"
@@ -66,6 +72,15 @@
66
72
  <span class="cn-grouped-cards__item-title">{{ item.title }}</span>
67
73
  <span v-if="item.meta" class="cn-grouped-cards__item-meta">{{ item.meta }}</span>
68
74
  <span v-if="item.flag" class="cn-grouped-cards__item-flag" data-testid="cn-grouped-cards-flag">{{ item.flag }}</span>
75
+ <span v-if="item.date || item.pill" class="cn-grouped-cards__item-end">
76
+ <span v-if="item.date" class="cn-grouped-cards__item-date" data-testid="cn-grouped-cards-item-date">{{ item.date }}</span>
77
+ <CnStatusBadge
78
+ v-if="item.pill"
79
+ :label="item.pill.label"
80
+ :variant="item.pill.variant"
81
+ size="small"
82
+ data-testid="cn-grouped-cards-item-pill" />
83
+ </span>
69
84
  <CnActionButtons
70
85
  v-if="item.actions.length > 0"
71
86
  class="cn-grouped-cards__item-actions"
@@ -132,8 +147,10 @@
132
147
  import { translate as t } from '@nextcloud/l10n'
133
148
  import { NcButton, NcLoadingIcon, NcProgressBar } from '@nextcloud/vue'
134
149
  import { inject, ref } from 'vue'
150
+ import CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'
135
151
  import { useEndpointSource } from '../../composables/useEndpointSource.js'
136
152
  import innerHeading from '../../mixins/innerHeading.js'
153
+ import { fieldPill } from '../../utils/fieldPill.js'
137
154
  import { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'
138
155
  import { unwrapAppConfig } from '../../utils/formatMetric.js'
139
156
  import { languageMapText } from '../../utils/languageMapText.js'
@@ -206,7 +223,7 @@ function readable(row) {
206
223
  export default {
207
224
  name: 'CnGroupedCardsWidget',
208
225
 
209
- components: { CnActionButtons, NcButton, NcLoadingIcon, NcProgressBar },
226
+ components: { CnActionButtons, CnStatusBadge, NcButton, NcLoadingIcon, NcProgressBar },
210
227
 
211
228
  mixins: [innerHeading],
212
229
 
@@ -263,6 +280,17 @@ export default {
263
280
  * - `itemsPath` with `itemGroupField` reads the cards from one flat list of the payload instead of
264
281
  * from each group: a card belongs to the group whose `id` its `itemGroupField` names. Cards
265
282
  * naming no group gather under `ungroupedTitle`; without that title they are left out.
283
+ * - `groupPill` (a pill config as record-list's `pill`: `{ field, labels?, colorMap?, ... }`)
284
+ * draws a status pill beside the group's title, read from the group.
285
+ * - `itemPill` (the same shape, plus `overdueWhen` and `overdueLabel`) draws a pill at the
286
+ * card's end; while the local condition `overdueWhen` holds on the card, the pill reads
287
+ * `overdueLabel` in the error tone. `itemDate` is a template drawn before that pill
288
+ * (`"{targetDate|date}"`).
289
+ * - `headerSubtitle` is the line under the card title, reported to the host as `header`
290
+ * `{ subtitle }`: a template with `{groups}` and `{items}` (the numbers drawn), or
291
+ * `{ parts, separator?, suffix? }` where a part is such a template or `{ count: "groups" |
292
+ * "items", one, other }`; the parts join with `separator` (default ", "), and `suffix`
293
+ * follows after " · ".
266
294
  *
267
295
  * A language map (`{ nl, en }`) reads in the user's language, and a list
268
296
  * of plain values reads joined with ", ". Texts go through the app's
@@ -288,6 +316,8 @@ export default {
288
316
  },
289
317
  },
290
318
 
319
+ emits: ['header'],
320
+
291
321
  setup(props) {
292
322
  const objectCtxRaw = inject('cnObjectContext', null)
293
323
  const workspaceRaw = inject('cnWorkspaceContext', null)
@@ -366,6 +396,7 @@ export default {
366
396
  lines: this.linesOf(group, raw),
367
397
  count: this.countOf(items.length),
368
398
  items,
399
+ pill: this.groupPillOf(raw),
369
400
  action: this.groupActionFor(raw, index),
370
401
  progress: this.progressOf(raw, group),
371
402
  ...this.extraOf(raw),
@@ -416,6 +447,47 @@ export default {
416
447
  }
417
448
  },
418
449
 
450
+ /**
451
+ * The line under the card title (`content.headerSubtitle`), once the
452
+ * payload is read.
453
+ *
454
+ * @return {string} The line, '' without a declaration or a payload.
455
+ * @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
456
+ */
457
+ headerSubtitleText() {
458
+ const spec = this.content?.headerSubtitle
459
+ if (!spec || this.payload === null || this.payload === undefined || this.error) {
460
+ return ''
461
+ }
462
+ const counts = {
463
+ groups: this.groups.length,
464
+ items: this.groups.reduce((sum, group) => sum + group.items.length, 0),
465
+ }
466
+ const fillCounts = (text) => this.translate(text).replace(/\{groups\}/g, String(counts.groups)).replace(/\{items\}/g, String(counts.items))
467
+ if (typeof spec === 'string') {
468
+ return fillCounts(spec)
469
+ }
470
+ if (typeof spec !== 'object' || !Array.isArray(spec.parts)) {
471
+ return ''
472
+ }
473
+ const line = spec.parts
474
+ .map((part) => {
475
+ if (typeof part === 'string') {
476
+ return fillCounts(part)
477
+ }
478
+ if (part && typeof part === 'object' && (part.count === 'groups' || part.count === 'items')) {
479
+ const count = counts[part.count]
480
+ const template = count === 1 ? part.one : part.other
481
+ return typeof template === 'string' && template !== '' ? this.translate(template).replace(/\{count\}/g, String(count)) : ''
482
+ }
483
+ return ''
484
+ })
485
+ .filter((text) => text !== '')
486
+ .join(typeof spec.separator === 'string' ? spec.separator : ', ')
487
+ const suffix = typeof spec.suffix === 'string' && spec.suffix !== '' ? this.translate(spec.suffix) : ''
488
+ return [line, suffix].filter((text) => text !== '').join(' · ')
489
+ },
490
+
419
491
  /** @return {string} The heading above the groups, filled from the payload. */
420
492
  heading() {
421
493
  const template = this.content?.heading
@@ -449,7 +521,59 @@ export default {
449
521
  },
450
522
  },
451
523
 
524
+ watch: {
525
+ /**
526
+ * Report the counts line to the card around the widget.
527
+ *
528
+ * @param {string} subtitle The line, or ''.
529
+ */
530
+ headerSubtitleText: {
531
+ immediate: true,
532
+ /** @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 */
533
+ handler(subtitle) {
534
+ if (this.content?.headerSubtitle) {
535
+ /**
536
+ * @event header The card header's line under the title.
537
+ * @type {{subtitle: string}}
538
+ */
539
+ this.$emit('header', { subtitle })
540
+ }
541
+ },
542
+ },
543
+ },
544
+
452
545
  methods: {
546
+ /**
547
+ * The status pill of a group (`content.groupPill`).
548
+ *
549
+ * @param {object} raw The group as read.
550
+ * @return {{label: string, variant: string}|null} The pill, or null.
551
+ * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-groups-and-cards-can-carry-a-status-pill
552
+ */
553
+ groupPillOf(raw) {
554
+ const spec = this.content?.groupPill
555
+ return spec ? fieldPill(raw, spec, { translate: (text) => this.translate(text), fill: (template, row) => this.fill(template, readable(row)) }) : null
556
+ },
557
+
558
+ /**
559
+ * The status pill at a card's end (`content.itemPill`): `overdueLabel`
560
+ * in the error tone while `overdueWhen` holds on the card.
561
+ *
562
+ * @param {object} rawItem The card as read.
563
+ * @return {{label: string, variant: string}|null} The pill, or null.
564
+ * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md#requirement-groups-and-cards-can-carry-a-status-pill
565
+ */
566
+ itemPillOf(rawItem) {
567
+ const spec = this.content?.itemPill
568
+ if (!spec || typeof spec !== 'object') {
569
+ return null
570
+ }
571
+ if (spec.overdueWhen && typeof spec.overdueLabel === 'string' && spec.overdueLabel !== '' && evaluateVisibleWhenLocal(spec.overdueWhen, rawItem)) {
572
+ return { label: this.translate(spec.overdueLabel), variant: 'error' }
573
+ }
574
+ return fieldPill(rawItem, spec, { translate: (text) => this.translate(text), fill: (template, row) => this.fill(template, readable(row)) })
575
+ },
576
+
453
577
  /**
454
578
  * The `groupAction` for one group, with every `@group.<path>` token in
455
579
  * its strings read from that group, and its id made unique per group.
@@ -546,6 +670,8 @@ export default {
546
670
  title: this.fill(titleTemplate, item),
547
671
  meta: this.metaOf(item, rawItem, metaSpec),
548
672
  flag,
673
+ pill: spec.title ? null : this.itemPillOf(rawItem),
674
+ date: spec.title || !c.itemDate ? '' : this.fill(c.itemDate, item),
549
675
  actions: this.itemActionsFor(actions, rawItem, rawGroup, key),
550
676
  }
551
677
  })
@@ -852,6 +978,20 @@ export default {
852
978
  color: var(--color-main-text);
853
979
  }
854
980
 
981
+ .cn-grouped-cards__item-end {
982
+ display: flex;
983
+ align-items: center;
984
+ justify-content: flex-end;
985
+ gap: 8px;
986
+ align-self: flex-end;
987
+ }
988
+
989
+ .cn-grouped-cards__item-date {
990
+ color: var(--color-text-maxcontrast);
991
+ font-size: 13px;
992
+ white-space: nowrap;
993
+ }
994
+
855
995
  .cn-grouped-cards__item-flag {
856
996
  color: var(--color-text-error, var(--color-error-text, var(--color-error)));
857
997
  font-size: 13px;
@@ -16,7 +16,8 @@
16
16
  variant="secondary"
17
17
  :data-testid="`cn-index-header-button-${button.key}`">
18
18
  <template #icon>
19
- <DotsHorizontal :size="20" />
19
+ <CnIcon v-if="button.action === 'export' && button.icon" :name="button.icon" :size="20" />
20
+ <DotsHorizontal v-else :size="20" />
20
21
  </template>
21
22
  <!-- The menu's entries (`items` on the button; the page's header
22
23
  actions when it names none): a header action, a built-in by
@@ -33,6 +34,23 @@
33
34
  <NcActionSeparator
34
35
  v-else-if="entry.kind === 'separator'"
35
36
  :data-testid="`cn-index-header-menu-${entry.key}`" />
37
+ <!-- A muted line closing the menu (an Export menu's `note`). -->
38
+ <NcActionText
39
+ v-else-if="entry.kind === 'note'"
40
+ class="cn-index-header-menu__note"
41
+ :data-testid="`cn-index-header-menu-${entry.key}`">
42
+ {{ entry.label }}
43
+ </NcActionText>
44
+ <!-- An entry with a description: the label bold, the description
45
+ muted under it (an Export menu's formats). -->
46
+ <NcActionButton
47
+ v-else-if="entry.description"
48
+ :name="entry.label"
49
+ :closeAfterClick="true"
50
+ :data-testid="`cn-index-header-menu-${entry.key}`"
51
+ @click="entry.run()">
52
+ {{ entry.description }}
53
+ </NcActionButton>
36
54
  <NcActionLink
37
55
  v-else-if="entry.href"
38
56
  :href="entry.href"
@@ -76,17 +94,17 @@
76
94
  </template>
77
95
 
78
96
  <script>
79
- import { NcActionButton, NcActionCaption, NcActionLink, NcActions, NcActionSeparator } from '@nextcloud/vue'
97
+ import { NcActionButton, NcActionCaption, NcActionLink, NcActions, NcActionSeparator, NcActionText } from '@nextcloud/vue'
80
98
  import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
81
99
  import { CnIcon } from '../CnIcon/index.js'
82
100
 
83
101
  export default {
84
102
  name: 'CnIndexHeaderMenu',
85
103
 
86
- components: { CnIcon, DotsHorizontal, NcActionButton, NcActionCaption, NcActionLink, NcActions, NcActionSeparator },
104
+ components: { CnIcon, DotsHorizontal, NcActionButton, NcActionCaption, NcActionLink, NcActions, NcActionSeparator, NcActionText },
87
105
 
88
106
  props: {
89
- /** The resolved header button: `{ key, label }`. */
107
+ /** The resolved header button: `{ key, label, action?, icon? }`; an Export menu draws its icon. */
90
108
  button: {
91
109
  type: Object,
92
110
  required: true,
@@ -40,6 +40,11 @@
40
40
  :button="button"
41
41
  :entries="headerMenuEntries(button)"
42
42
  @linkClick="onHeaderMenuLinkClick" />
43
+ <!-- An Export with `menu`: one entry per format, and the note under them. -->
44
+ <CnIndexHeaderMenu
45
+ v-else-if="button.action === 'export' && button.exportMenu"
46
+ :button="button"
47
+ :entries="exportMenuEntries(button)" />
43
48
  <NcButton
44
49
  v-else
45
50
  :variant="button.variant"
@@ -666,6 +671,8 @@
666
671
  :nameField="massActionNameField"
667
672
  :size="formSize"
668
673
  :columns="formColumns"
674
+ :eyebrow="formHeaderText(formEyebrow)"
675
+ :subtitle="formHeaderText(formSubtitle)"
669
676
  :initialData="resolvedCreateDefaults"
670
677
  :draftAppId="draftAppId"
671
678
  :allowDraft="allowDraft && !rowFormTarget && (!editItem || editItem[draftField] === true)"
@@ -685,6 +692,8 @@
685
692
  :includeFields="rowFormTarget ? null : includeFields"
686
693
  :fieldOverrides="rowFormTarget ? {} : fieldOverrides"
687
694
  :nameField="massActionNameField"
695
+ :eyebrow="formHeaderText(formEyebrow)"
696
+ :subtitle="formHeaderText(formSubtitle)"
688
697
  :initialValues="resolvedCreateDefaults"
689
698
  @confirm="onFormConfirm"
690
699
  @close="closeFormDialog" />
@@ -755,6 +764,20 @@
755
764
  <!-- @slot before-collection Content rendered above the collection in EVERY view mode (table, cards, list, map) — e.g. a folder/group strip that must stay visually separate from the objects instead of masquerading as rows or cards. -->
756
765
  <slot name="before-collection" />
757
766
 
767
+ <!-- Counters a named source supplies (`counters()`), above the rows. -->
768
+ <CnKpiGrid v-if="sourceCounters.length > 0"
769
+ columns="auto"
770
+ class="cn-index-page__counters"
771
+ data-testid="cn-index-counters">
772
+ <CnStatsBlock v-for="counter in sourceCounters"
773
+ :key="counter.id"
774
+ :title="counter.label"
775
+ :count="counter.count"
776
+ :countLabel="counter.note"
777
+ :variant="counter.variant"
778
+ showZeroCount />
779
+ </CnKpiGrid>
780
+
758
781
  <!-- A sort option whose endpoint could not answer: the list fell
759
782
  back to the option's own order, and says so. -->
760
783
  <p v-if="sortSourceFellBack && sortSourceFailedNote"
@@ -800,19 +823,19 @@
800
823
 
801
824
  <!-- A search the server refused for its grammar: the term with the
802
825
  character it stopped at, the server's reason, and what to do. -->
803
- <div v-else-if="searchRefusal"
826
+ <div v-else-if="searchRefused && !searchRefusalAsNotice"
804
827
  class="cn-index-page__search-refusal"
805
828
  role="status"
806
829
  data-testid="cn-index-page-search-refusal">
807
830
  <NcNoteCard type="warning">
808
831
  <p class="cn-index-page__search-refusal-headline">
809
- {{ t('nextcloud-vue', 'This search could not be read from character {position}.', { position: searchRefusal.position }) }}
832
+ {{ t('nextcloud-vue', 'This search could not be read from character {position}.', { position: searchRefused.position }) }}
810
833
  </p>
811
834
  <p class="cn-index-page__search-refusal-term" data-testid="cn-index-page-search-refusal-term">
812
- <span>{{ searchRefusal.before }}</span><mark v-if="searchRefusal.at">{{ searchRefusal.at }}</mark><span>{{ searchRefusal.after }}</span>
835
+ <span>{{ searchRefused.before }}</span><mark v-if="searchRefused.at">{{ searchRefused.at }}</mark><span>{{ searchRefused.after }}</span>
813
836
  </p>
814
837
  <p class="cn-index-page__search-refusal-muted">
815
- {{ searchRefusal.message }}
838
+ {{ searchRefused.message }}
816
839
  </p>
817
840
  <p class="cn-index-page__search-refusal-muted">
818
841
  {{ searchRefusalHintText }}
@@ -821,7 +844,7 @@
821
844
  </div>
822
845
 
823
846
  <!-- Error state: the latest self-fetch failed (e.g. a search term the server rejects) -->
824
- <div v-else-if="selfFetchFailed || sourceFailed"
847
+ <div v-else-if="(selfFetchFailed && !searchRefusalAsNotice) || sourceFailed"
825
848
  class="cn-index-page__empty"
826
849
  role="status"
827
850
  data-testid="cn-index-page-fetch-error">
@@ -1435,8 +1458,10 @@ import CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'
1435
1458
  import CnCardNotices from '../CnCardNotices/CnCardNotices.vue'
1436
1459
  import CnEmptyContent from '../CnEmptyContent/CnEmptyContent.vue'
1437
1460
  import CnFollowToggle from '../CnFollowToggle/CnFollowToggle.vue'
1461
+ import CnKpiGrid from '../CnKpiGrid/CnKpiGrid.vue'
1438
1462
  import CnRealtimeToast from '../CnRealtimeToast/CnRealtimeToast.vue'
1439
1463
  import CnRelatedFieldFilters from '../CnRelatedFieldFilters/CnRelatedFieldFilters.vue'
1464
+ import CnStatsBlock from '../CnStatsBlock/CnStatsBlock.vue'
1440
1465
  import CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'
1441
1466
  import CnIndexHeaderMenu from './CnIndexHeaderMenu.vue'
1442
1467
  import CnIndexPageWidgets from './CnIndexPageWidgets.vue'
@@ -1505,7 +1530,7 @@ import { viewCriteriaSummary } from '../../utils/savedViewSummary.js'
1505
1530
  import { saveEdited } from '../../utils/saveEdited.js'
1506
1531
  import { columnsFromSchema, fieldsFromSchema, isGroupProp } from '../../utils/schema.js'
1507
1532
  import { resolveScopeLayout, resolveScopePresentation } from '../../utils/scopeListLayout.js'
1508
- import { readSearchRefusal } from '../../utils/searchRefusal.js'
1533
+ import { readSearchRefusal, searchRefusalNotice } from '../../utils/searchRefusal.js'
1509
1534
  import { orderToSortKeys } from '../../utils/sortOrder.js'
1510
1535
  import { annotateRows, filterSourceRows, pageSourceRows, rowsFromSourceBody } from '../../utils/sortSourceRows.js'
1511
1536
  import { stripTrailingSlashes } from '../../utils/trailingSlashes.js'
@@ -1947,6 +1972,8 @@ export default {
1947
1972
  CnIndexHeaderMenu,
1948
1973
  CnIndexPageWidgets,
1949
1974
  CnRelatedFieldFilters,
1975
+ CnKpiGrid,
1976
+ CnStatsBlock,
1950
1977
  CnStatusBadge,
1951
1978
  NcNoteCard,
1952
1979
  CnBuildiqEditButton,
@@ -2410,6 +2437,18 @@ export default {
2410
2437
  default: null,
2411
2438
  },
2412
2439
 
2440
+ /**
2441
+ * Header buttons per view (manifest `config.headerButtonsByView`),
2442
+ * `{ table?, cards?, list?, board?, map? }`, each a list as
2443
+ * `headerButtons`: the board view reads "Downloaden" where the table
2444
+ * reads "Exporteren" with a menu (DqWerkbord, DqZaken). A view it does
2445
+ * not name keeps `headerButtons`; a scope's own buttons come first.
2446
+ */
2447
+ headerButtonsByView: {
2448
+ type: Object,
2449
+ default: null,
2450
+ },
2451
+
2413
2452
  /**
2414
2453
  * Text added to the count line after a middle dot while a quick filter
2415
2454
  * or lens is selected (manifest `config.countSuffixByFilter`),
@@ -3520,6 +3559,21 @@ export default {
3520
3559
  default: '',
3521
3560
  },
3522
3561
 
3562
+ /**
3563
+ * A refused search keeps the rows the list had and says so in an
3564
+ * alert above the list, under the search field (DqZaken): `{ title?,
3565
+ * after? }` (manifest `config.searchRefusal`), the title with
3566
+ * `{position}` ("Search term not understood at position {position}:")
3567
+ * and the line after the server's reason ("The list is not filtered;
3568
+ * adjust the term."). Unset, the refusal replaces the rows.
3569
+ *
3570
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-a-refused-search-can-keep-the-rows-and-say-so-under-the-search-field
3571
+ */
3572
+ searchRefusal: {
3573
+ type: Object,
3574
+ default: null,
3575
+ },
3576
+
3523
3577
  /** Accessible label for the loading spinner (NcLoadingIcon aria-label) */
3524
3578
  loadingText: {
3525
3579
  type: String,
@@ -3774,6 +3828,25 @@ export default {
3774
3828
  validator: (value) => value === 1 || value === 2,
3775
3829
  },
3776
3830
 
3831
+ /**
3832
+ * The small line above the built-in Add/Edit form's title (board
3833
+ * look). A string for both, or `{ create, edit }` per mode; either
3834
+ * goes through the host `cnTranslate`. Empty draws none.
3835
+ */
3836
+ formEyebrow: {
3837
+ type: [String, Object],
3838
+ default: '',
3839
+ },
3840
+
3841
+ /**
3842
+ * The muted line under the built-in Add/Edit form's title. Same
3843
+ * shape as `formEyebrow`.
3844
+ */
3845
+ formSubtitle: {
3846
+ type: [String, Object],
3847
+ default: '',
3848
+ },
3849
+
3777
3850
  /**
3778
3851
  * The app a form draft belongs to, forwarded to every form this page
3779
3852
  * opens as CnFormDialog's `draftAppId`, so what a user typed and did not
@@ -5069,9 +5142,16 @@ export default {
5069
5142
  /**
5070
5143
  * @return {Array<object>} The manifest's notices, then the ones this page's actions raised.
5071
5144
  * @spec openspec/changes/card-state-notices/specs/card-state-notices/spec.md#requirement-an-index-page-draws-its-notices-above-the-list
5145
+ * @spec openspec/changes/notice-text-from-endpoint/specs/card-state-notices/spec.md#requirement-an-index-page-notice-can-belong-to-saved-views
5072
5146
  */
5073
5147
  pageNotices() {
5074
- return [...(Array.isArray(this.notices) ? this.notices : []), ...this.runtimeNotices]
5148
+ const view = this.appliedSavedView
5149
+ const names = [this.appliedSavedViewId, ...(view ? [view.id, view.slug, view.uuid] : [])].filter((v) => v !== undefined && v !== null && v !== '').map(String)
5150
+ // `savedViews` keeps a notice to the saved views it names (DqTeamwachtrij).
5151
+ const declared = (Array.isArray(this.notices) ? this.notices : [])
5152
+ .filter((notice) => !notice || !Array.isArray(notice.savedViews) || notice.savedViews.some((id) => names.includes(String(id))))
5153
+ const refusal = this.searchRefusalAsNotice ? [searchRefusalNotice(this.searchRefused, this.searchRefusal, (text) => this.cnTranslate(text))] : []
5154
+ return [...refusal, ...declared, ...this.runtimeNotices]
5075
5155
  },
5076
5156
 
5077
5157
  /**
@@ -5372,10 +5452,21 @@ export default {
5372
5452
  * @spec openspec/changes/index-search-refusal/specs/index-search-refusal/spec.md#requirement-a-refused-search-is-said-where-it-was-typed
5373
5453
  * @return {object|null}
5374
5454
  */
5375
- searchRefusal() {
5455
+ searchRefused() {
5376
5456
  return this.selfFetchFailed ? readSearchRefusal(this.list.error.value, this.effectiveSearchValue) : null
5377
5457
  },
5378
5458
 
5459
+ /**
5460
+ * Whether a refused search keeps the rows and says so in a notice under
5461
+ * the search field (`searchRefusal` set), rather than in place of them.
5462
+ *
5463
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-a-refused-search-can-keep-the-rows-and-say-so-under-the-search-field
5464
+ * @return {boolean}
5465
+ */
5466
+ searchRefusalAsNotice() {
5467
+ return this.searchRefused !== null && !!this.searchRefusal && typeof this.searchRefusal === 'object'
5468
+ },
5469
+
5379
5470
  /**
5380
5471
  * Whether the named source sends the search term to its server.
5381
5472
  *
@@ -5462,7 +5553,11 @@ export default {
5462
5553
  return t('nextcloud-vue', 'Correct that character, or search for plain words. AND, OR and NOT work in capitals, and quotes make a phrase.')
5463
5554
  },
5464
5555
 
5465
- /** Rows: store collection in self-fetch mode, else the `objects` prop. */
5556
+ /**
5557
+ * Rows: store collection in self-fetch mode, else the `objects` prop.
5558
+ *
5559
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-a-refused-search-can-keep-the-rows-and-say-so-under-the-search-field
5560
+ */
5466
5561
  effectiveObjects() {
5467
5562
  if (this.isNamedSource) {
5468
5563
  const sortsRows = !!(this.namedSource && this.namedSource.sortsRows === true)
@@ -5477,7 +5572,7 @@ export default {
5477
5572
  if (this.sortSourceShown) {
5478
5573
  return this.sortSourceView.rows
5479
5574
  }
5480
- if (this.selfFetchFailed) {
5575
+ if (this.selfFetchFailed && !this.searchRefusalAsNotice) {
5481
5576
  return []
5482
5577
  }
5483
5578
  const rows = this.isSelfFetchMode ? (this.list.objects.value || []) : this.objects
@@ -7826,12 +7921,16 @@ export default {
7826
7921
  return this.refreshing || this.internalRefreshing
7827
7922
  },
7828
7923
 
7829
- /** Pagination: store pagination in self-fetch mode, else the `pagination` prop. */
7924
+ /**
7925
+ * Pagination: store pagination in self-fetch mode, else the `pagination` prop.
7926
+ *
7927
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-a-refused-search-can-keep-the-rows-and-say-so-under-the-search-field
7928
+ */
7830
7929
  effectivePagination() {
7831
7930
  if (this.sortSourceShown) {
7832
7931
  return this.sortSourceView.pagination
7833
7932
  }
7834
- if (this.selfFetchFailed) {
7933
+ if (this.selfFetchFailed && !this.searchRefusalAsNotice) {
7835
7934
  return { ...this.list.pagination.value, total: 0, page: 1, pages: 1 }
7836
7935
  }
7837
7936
  // A named source that reports its own total (the search source)
@@ -8502,6 +8601,7 @@ export default {
8502
8601
  * `CnRowActions` sees the same `{ handler: fn }` shape it does
8503
8602
  * for built-in defaults. Function-typed handlers (the existing
8504
8603
  * runtime path) pass through untouched.
8604
+ *
8505
8605
  * @spec openspec/changes/card-state-notices/specs/card-state-notices/spec.md#requirement-an-index-page-draws-its-notices-above-the-list
8506
8606
  */
8507
8607
  mergedActions() {
@@ -8579,6 +8679,17 @@ export default {
8579
8679
  return refs
8580
8680
  },
8581
8681
 
8682
+ /**
8683
+ * The counters a named source draws above its rows.
8684
+ *
8685
+ * @return {Array<object>} The tiles, `{id, label, count, note, variant}`.
8686
+ */
8687
+ sourceCounters() {
8688
+ const source = this.isNamedSource ? this.namedSource : null
8689
+
8690
+ return source && typeof source.counters === 'function' ? source.counters() : []
8691
+ },
8692
+
8582
8693
  /**
8583
8694
  * The page tabs a named source declares, each `{id, label, to, count?}`.
8584
8695
  *
@@ -8771,10 +8882,15 @@ export default {
8771
8882
  * @spec openspec/changes/zuiddrecht-pixel-gaps-3/specs/zuiddrecht-pixel-gaps-3/spec.md#requirement-an-index-page-can-take-the-board-header
8772
8883
  * @spec openspec/changes/screens-index-header-buttons-parity/specs/index-list-board-look/spec.md#requirement-the-add-header-button-carries-a-plus
8773
8884
  * @spec openspec/changes/header-action-href/specs/header-action-href/spec.md#requirement-a-header-action-with-href-is-a-link-that-runs-and-emits-nothing
8885
+ * @spec openspec/changes/index-export-menu/specs/index-header/spec.md#requirement-header-buttons-can-differ-per-view
8774
8886
  * @return {Array<{key: string, label: string, action: string, variant: string, icon: string, format: string, link: ({href: string, target: (string|undefined)}|null)}>}
8775
8887
  */
8776
8888
  resolvedHeaderButtons() {
8777
- const headerButtons = this.presented('headerButtons')
8889
+ const byView = this.headerButtonsByView
8890
+ const ownForView = byView && typeof byView === 'object' && (this.activeScopePresentation || {}).headerButtons === undefined
8891
+ ? byView[this.currentViewMode]
8892
+ : undefined
8893
+ const headerButtons = Array.isArray(ownForView) ? ownForView : this.presented('headerButtons')
8778
8894
  const declared = Array.isArray(headerButtons) ? headerButtons : []
8779
8895
  const builtInActions = new Set(['add', 'export', 'import', 'refresh', 'save-view', 'actions-menu'])
8780
8896
  return declared
@@ -8831,6 +8947,10 @@ export default {
8831
8947
  ? button.items.filter((item) => (typeof item === 'string' && item !== '')
8832
8948
  || (item && typeof item === 'object' && typeof item.heading === 'string' && item.heading !== ''))
8833
8949
  : null,
8950
+ exportMenu: button.action === 'export' && Array.isArray(button.menu)
8951
+ ? button.menu.filter((entry) => entry && (entry.format === 'csv' || entry.format === 'excel') && typeof entry.label === 'string' && entry.label !== '')
8952
+ : null,
8953
+ note: typeof button.note === 'string' && button.note !== '' ? this.cnTranslate(button.note) : '',
8834
8954
  }
8835
8955
  })
8836
8956
  .filter((button) => button.label !== '')
@@ -10179,6 +10299,23 @@ export default {
10179
10299
  },
10180
10300
 
10181
10301
  methods: {
10302
+ /**
10303
+ * The eyebrow or subtitle of the built-in Add/Edit form: `value` as a
10304
+ * string, or its `create` / `edit` entry for the open mode. A row
10305
+ * action's own form (`rowFormTarget`) draws none.
10306
+ *
10307
+ * @param {string|object} value `formEyebrow` or `formSubtitle`.
10308
+ * @return {string} The translated text, or ''.
10309
+ * @spec openspec/changes/index-form-eyebrow-subtitle/specs/index-page/spec.md#requirement-an-index-pages-form-can-carry-an-eyebrow-and-a-subtitle
10310
+ */
10311
+ formHeaderText(value) {
10312
+ if (!value || this.rowFormTarget) {
10313
+ return ''
10314
+ }
10315
+ const text = typeof value === 'string' ? value : value[this.editItem ? 'edit' : 'create']
10316
+ return text ? this.cnTranslate(text) : ''
10317
+ },
10318
+
10182
10319
  /**
10183
10320
  * Show a notice above the list, replacing an earlier answer.
10184
10321
  *
@@ -11357,6 +11494,28 @@ export default {
11357
11494
  this.$emit('header-action', { action: entry.key, id: entry.key })
11358
11495
  },
11359
11496
 
11497
+ /**
11498
+ * The entries of an Export button's menu (`menu`): one per format,
11499
+ * its label bold and its description muted, each running the export
11500
+ * in that format; the button's `note` as a muted line after them.
11501
+ *
11502
+ * @param {object} button The resolved Export button.
11503
+ * @return {Array<object>} The menu entries.
11504
+ * @spec openspec/changes/index-export-menu/specs/index-header/spec.md#requirement-an-export-header-button-can-be-a-menu-of-formats
11505
+ */
11506
+ exportMenuEntries(button) {
11507
+ const entries = (button.exportMenu || []).map((entry) => ({
11508
+ key: `export-${entry.format}`,
11509
+ label: this.cnTranslate(entry.label),
11510
+ description: typeof entry.description === 'string' && entry.description !== '' ? this.cnTranslate(entry.description) : '',
11511
+ run: () => this.onHeaderButton({ ...button, format: entry.format }),
11512
+ }))
11513
+ if (button.note) {
11514
+ entries.push({ key: 'export-note', kind: 'note', label: button.note })
11515
+ }
11516
+ return entries
11517
+ },
11518
+
11360
11519
  /**
11361
11520
  * A header button was clicked: run its built-in action, or dispatch
11362
11521
  * it as the `headerActions` entry with that id. A button that is a