@conduction/nextcloud-vue 2.177.0 → 2.178.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 (120) 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/CnCardNotices/CnCardNotices.vue.js +1 -1
  7. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
  8. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
  9. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
  10. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
  11. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  12. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
  13. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  14. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
  15. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  16. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  17. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
  18. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
  19. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
  20. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
  21. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
  22. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
  23. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
  24. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
  25. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
  26. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
  27. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +129 -8
  28. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  29. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +46 -36
  30. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  31. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  32. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
  33. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  34. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
  35. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  36. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
  37. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
  38. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  39. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
  40. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  41. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  42. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
  43. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  44. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
  45. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  46. package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
  47. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
  48. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
  49. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
  50. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
  51. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  52. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  53. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  54. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
  55. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
  56. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
  57. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
  58. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
  59. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
  60. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
  61. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
  62. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
  63. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
  64. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
  65. package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
  66. package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
  67. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
  68. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
  69. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
  70. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
  71. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
  72. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  73. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  74. package/dist/esm/index.js +1 -0
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/l10n/en.json.js +12 -0
  77. package/dist/esm/l10n/en.json.js.map +1 -1
  78. package/dist/esm/l10n/nl.json.js +12 -0
  79. package/dist/esm/l10n/nl.json.js.map +1 -1
  80. package/dist/esm/library-style.js +1 -1
  81. package/dist/esm/nextcloud-vue.css +637 -475
  82. package/dist/esm/utils/fieldPill.js +77 -0
  83. package/dist/esm/utils/fieldPill.js.map +1 -0
  84. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  85. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  86. package/dist/esm/utils/searchRefusal.js +35 -1
  87. package/dist/esm/utils/searchRefusal.js.map +1 -1
  88. package/dist/esm/utils/widgetDispatch.js +1 -1
  89. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  90. package/dist/nextcloud-vue.cjs.js +7416 -5865
  91. package/dist/nextcloud-vue.cjs.js.map +2 -2
  92. package/dist/nextcloud-vue.css +637 -475
  93. package/l10n/en.json +12 -0
  94. package/l10n/nl.json +12 -0
  95. package/package.json +1 -1
  96. package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
  97. package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
  98. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
  99. package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  100. package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
  101. package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
  102. package/src/components/CnIndexPage/CnIndexPage.vue +143 -13
  103. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
  104. package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
  105. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
  106. package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
  107. package/src/components/CnStepper/CnStepper.vue +14 -5
  108. package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
  109. package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
  110. package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
  111. package/src/components/CnTaskFormWidget/index.js +23 -0
  112. package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
  113. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  114. package/src/components/index.js +1 -0
  115. package/src/css/index-page.css +6 -0
  116. package/src/index.js +1 -0
  117. package/src/utils/fieldPill.js +73 -0
  118. package/src/utils/libraryWidgetKeys.js +1 -0
  119. package/src/utils/searchRefusal.js +33 -0
  120. package/src/utils/widgetDispatch.js +1 -1
@@ -20,7 +20,14 @@
20
20
  class="cn-record-list"
21
21
  :class="[`cn-record-list--${presentation}`, { 'cn-record-list--compact': content.density === 'compact', 'cn-record-list--pill-aside': presentation === 'cards' && content.cardPillAside === true, 'cn-record-list--stacked': content.density === 'stacked', 'cn-record-list--tiles': presentation === 'rows' && content.tiles === true, 'cn-record-list--rule-above': content.ruleAbove === true, 'cn-record-list--strong-title': content.strongTitle === true, 'cn-record-list--meta-beside': presentation === 'rows' && content.metaBeside === true, 'cn-record-list--data-table': presentation === 'table' && content.tableLook === 'data', 'cn-record-list--group-cards': isGrouped && content.groupLook === 'cards', 'cn-record-list--chevron': content.chevron === true }]"
22
22
  data-testid="cn-record-list">
23
- <p v-if="intro && !absent" class="cn-record-list__intro" data-testid="cn-record-list-intro">
23
+ <!-- `introAsHeading`: the intro is the group heading of a section
24
+ ("Te laat", "Risico"), dropped with an empty section that says nothing. -->
25
+ <h3 v-if="intro && !absent && introAsHeading && !introHidden"
26
+ class="cn-record-list__group-heading cn-record-list__intro-heading"
27
+ data-testid="cn-record-list-intro">
28
+ {{ intro }}
29
+ </h3>
30
+ <p v-else-if="intro && !absent && !introAsHeading" class="cn-record-list__intro" data-testid="cn-record-list-intro">
24
31
  {{ intro }}
25
32
  </p>
26
33
  <p v-if="absent" class="cn-record-list__empty" data-testid="cn-record-list-absent">
@@ -175,13 +182,42 @@
175
182
  v-for="item in items"
176
183
  :key="item.key"
177
184
  class="cn-record-list__check"
178
- :class="{ 'cn-record-list__check--done': isChecked(item.row) }"
185
+ :class="{
186
+ 'cn-record-list__check--done': isChecked(item.row),
187
+ 'cn-record-list__check--next': checkNextOf(item.row) !== null,
188
+ 'cn-record-list__check--meta-end': checklistMetaAtEnd,
189
+ }"
179
190
  data-testid="cn-record-list-check">
180
191
  <span class="cn-record-list__check-mark" aria-hidden="true">
181
192
  <Check v-if="isChecked(item.row)" :size="14" />
182
193
  </span>
183
- <span class="cn-record-list__check-title">{{ item.title }}</span>
194
+ <span class="cn-record-list__check-body">
195
+ <span class="cn-record-list__check-title">
196
+ {{ item.title }}
197
+ <CnStatusBadge
198
+ v-if="checkNextOf(item.row)"
199
+ class="cn-record-list__check-next-pill"
200
+ :label="checkNextOf(item.row).label"
201
+ variant="primary"
202
+ size="small"
203
+ data-testid="cn-record-list-check-next-pill" />
204
+ </span>
205
+ <span
206
+ v-if="checkMetaOf(item)"
207
+ class="cn-record-list__check-meta"
208
+ :class="{ 'cn-record-list__check-meta--missing': !isChecked(item.row) && checklistMissingText !== '' }"
209
+ data-testid="cn-record-list-check-meta">{{ checkMetaOf(item) }}</span>
210
+ </span>
184
211
  <span class="hidden-visually">{{ isChecked(item.row) ? doneLabel : openLabel }}</span>
212
+ <NcButton
213
+ v-if="checkNextOf(item.row) && checkNextOf(item.row).action"
214
+ class="cn-record-list__check-next-action"
215
+ variant="primary"
216
+ :href="checkNextOf(item.row).action.href || undefined"
217
+ data-testid="cn-record-list-check-next-action"
218
+ @click="checkNextOf(item.row).action.href ? null : runCheckNextAction(item.row)">
219
+ {{ checkNextOf(item.row).action.label }}
220
+ </NcButton>
185
221
  </li>
186
222
  </ul>
187
223
  </div>
@@ -655,6 +691,24 @@
655
691
  class="cn-record-list__footer-reason"
656
692
  data-testid="cn-record-list-footer-reason">{{ footerAction.reason }}</span>
657
693
  </div>
694
+ <!-- `footerActions`: several actions side by side under the list
695
+ (DqZaakDocumenten "Ontvankelijkheid bevestigen", "Aanvulverzoek versturen"). -->
696
+ <div
697
+ v-if="footerActionList.length > 0 && !error"
698
+ class="cn-record-list__footer cn-record-list__footer--actions"
699
+ data-testid="cn-record-list-footer-actions">
700
+ <NcButton
701
+ v-for="entry in footerActionList"
702
+ :key="entry.key"
703
+ :variant="entry.variant"
704
+ :data-testid="`cn-record-list-footer-actions-${entry.key}`"
705
+ @click="runListAction(entry.action)">
706
+ <template v-if="entry.icon" #icon>
707
+ <CnIcon :name="entry.icon" :size="16" />
708
+ </template>
709
+ {{ entry.label }}
710
+ </NcButton>
711
+ </div>
658
712
  </div>
659
713
  </template>
660
714
 
@@ -678,10 +732,10 @@ import { isAppInstalled } from '../../utils/appInstalled.js'
678
732
  import { isBadgeVariant } from '../../utils/badgeVariants.js'
679
733
  import { ageInDays } from '../../utils/boardDate.js'
680
734
  import { resolveDue } from '../../utils/dueText.js'
735
+ import { fieldPill } from '../../utils/fieldPill.js'
681
736
  import { fillCountLabel } from '../../utils/fillCountLabel.js'
682
737
  import { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'
683
738
  import { unwrapAppConfig } from '../../utils/formatMetric.js'
684
- import { variantForColor } from '../../utils/headerFieldChips.js'
685
739
  import { initialsOf } from '../../utils/initials.js'
686
740
  import { lensUnavailableText, readLensReports } from '../../utils/lensAvailability.js'
687
741
  import { isObjectRowsSpec, objectRowsOf } from '../../utils/objectRows.js'
@@ -912,6 +966,7 @@ export default {
912
966
 
913
967
  emits: ['header'],
914
968
 
969
+ /** @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-lists-header-can-carry-a-pill-from-the-answer */
915
970
  setup(props) {
916
971
  const objectCtxRaw = inject('cnObjectContext', null)
917
972
  const workspaceRaw = inject('cnWorkspaceContext', null)
@@ -987,7 +1042,31 @@ export default {
987
1042
  },
988
1043
  },
989
1044
  )
990
- return { epData: data, epLoading: loading, epError: error, epRefusal: refusal, epRefetch: refetch, footnoteValue: footnoteSource.data, footnoteRefetch: footnoteSource.refetch, footerNoteValue: footerNoteSource.data }
1045
+ // A header pill that reads another part of the same answer
1046
+ // (`headerPillFrom: { path }`), through the same cache.
1047
+ const headerPillSource = useEndpointSource(
1048
+ () => {
1049
+ const spec = props.content?.headerPillFrom
1050
+ const source = props.content?.endpointSource
1051
+ if (!spec || typeof spec !== 'object' || typeof spec.path !== 'string' || !source || typeof source !== 'object') {
1052
+ return null
1053
+ }
1054
+ return { ...source, responsePath: spec.path }
1055
+ },
1056
+ {
1057
+ ctx: () => {
1058
+ const injected = unwrap(objectCtxRaw) || {}
1059
+ return {
1060
+ ...injected,
1061
+ objectId: props.objectId ?? injected.objectId ?? props.objectData?.id ?? null,
1062
+ object: props.objectData || injected.object || null,
1063
+ workspace: unwrap(workspaceRaw) || {},
1064
+ config: unwrapAppConfig(appConfigRaw) || {},
1065
+ }
1066
+ },
1067
+ },
1068
+ )
1069
+ return { epData: data, epLoading: loading, epError: error, epRefusal: refusal, epRefetch: refetch, footnoteValue: footnoteSource.data, footnoteRefetch: footnoteSource.refetch, footerNoteValue: footerNoteSource.data, headerPillValue: headerPillSource.data }
991
1070
  },
992
1071
 
993
1072
  data() {
@@ -1706,6 +1785,70 @@ export default {
1706
1785
  return this.items.length > 0 ? Math.round((this.checklistDone / this.items.length) * 100) : 0
1707
1786
  },
1708
1787
 
1788
+ /**
1789
+ * Whether a checklist row draws its meta at the row's end
1790
+ * (`content.metaAt: "end"`) rather than under its title.
1791
+ *
1792
+ * @return {boolean}
1793
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-checklist-row-can-say-where-it-comes-from
1794
+ */
1795
+ checklistMetaAtEnd() {
1796
+ return this.content?.metaAt === 'end'
1797
+ },
1798
+
1799
+ /**
1800
+ * @return {string} What an open checklist row reads in place of its meta (`content.missingText`).
1801
+ *
1802
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-checklist-row-can-say-where-it-comes-from
1803
+ */
1804
+ checklistMissingText() {
1805
+ const text = this.content?.missingText
1806
+ return typeof text === 'string' && text !== '' ? this.translate(text) : ''
1807
+ },
1808
+
1809
+ /**
1810
+ * The actions side by side under the list (`content.footerActions`):
1811
+ * each `{ label, icon?, variant?, visibleWhen?, ...action }`, those whose
1812
+ * `visibleWhen` (a local condition over the page's record) does not
1813
+ * hold left out. The first is primary unless it says otherwise.
1814
+ *
1815
+ * @return {Array<{key: string, label: string, icon: string, variant: string, action: object}>}
1816
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-list-can-end-with-several-actions-side-by-side
1817
+ */
1818
+ footerActionList() {
1819
+ const declared = this.content?.footerActions
1820
+ if (!Array.isArray(declared)) {
1821
+ return []
1822
+ }
1823
+ const record = this.tokenCtx.object || {}
1824
+ return declared
1825
+ .filter((entry) => entry && typeof entry === 'object' && typeof entry.label === 'string' && entry.label !== '')
1826
+ .filter((entry) => !entry.visibleWhen || evaluateVisibleWhenLocal(entry.visibleWhen, record))
1827
+ .map((entry, index) => ({
1828
+ key: String(entry.id || index),
1829
+ label: this.translate(entry.label),
1830
+ icon: typeof entry.icon === 'string' ? entry.icon : '',
1831
+ variant: ['primary', 'secondary', 'tertiary'].includes(entry.variant) ? entry.variant : (index === 0 ? 'primary' : 'secondary'),
1832
+ action: entry,
1833
+ }))
1834
+ },
1835
+
1836
+ /**
1837
+ * The status pill in the card header, read from the endpoint's answer
1838
+ * (`content.headerPillFrom: { path, labels?, colorMap? }`): a verdict
1839
+ * such as `incomplete` reading "Nog niet ontvankelijk" in the warning tone.
1840
+ *
1841
+ * @return {{label: string, variant: string}|null} The pill, or null.
1842
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-lists-header-can-carry-a-pill-from-the-answer
1843
+ */
1844
+ headerPill() {
1845
+ const spec = this.content?.headerPillFrom
1846
+ if (!spec || typeof spec !== 'object' || typeof spec.path !== 'string') {
1847
+ return null
1848
+ }
1849
+ return fieldPill({ value: this.headerPillValue }, { ...spec, field: 'value' }, { translate: (text) => this.translate(text) })
1850
+ },
1851
+
1709
1852
  /** @return {string} What a done checklist row says to a screen reader. */
1710
1853
  doneLabel() {
1711
1854
  return t('nextcloud-vue', 'Done')
@@ -1803,6 +1946,27 @@ export default {
1803
1946
  return this.content?.absentText ? this.translate(this.content.absentText) : t('nextcloud-vue', 'The app these come from is not installed')
1804
1947
  },
1805
1948
 
1949
+ /**
1950
+ * Whether the intro is drawn as a group heading (`content.introAsHeading`).
1951
+ *
1952
+ * @return {boolean}
1953
+ * @spec openspec/changes/record-list-section-intro-heading/specs/record-list/spec.md#requirement-a-sections-intro-can-be-its-group-heading
1954
+ */
1955
+ introAsHeading() {
1956
+ return this.content?.introAsHeading === true
1957
+ },
1958
+
1959
+ /**
1960
+ * Whether a heading intro drops out: the list read no rows and says
1961
+ * nothing about it (`emptyText: ""`).
1962
+ *
1963
+ * @return {boolean}
1964
+ * @spec openspec/changes/record-list-section-intro-heading/specs/record-list/spec.md#requirement-a-sections-intro-can-be-its-group-heading
1965
+ */
1966
+ introHidden() {
1967
+ return this.content?.emptyText === '' && !this.loading && !this.error && this.rows.length === 0
1968
+ },
1969
+
1806
1970
  /** @return {string} The line above the list (`intro`), translated. */
1807
1971
  intro() {
1808
1972
  const text = this.content?.intro
@@ -1946,6 +2110,15 @@ export default {
1946
2110
  this.fetchRows()
1947
2111
  },
1948
2112
 
2113
+ /**
2114
+ * The header pill read from the answer arrives after the rows.
2115
+ *
2116
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-lists-header-can-carry-a-pill-from-the-answer
2117
+ */
2118
+ headerPill() {
2119
+ this.emitHeader()
2120
+ },
2121
+
1949
2122
  rows() {
1950
2123
  this.evaluateEmptyTexts()
1951
2124
  this.loadAggregates()
@@ -2137,6 +2310,18 @@ export default {
2137
2310
  if (!declared || this.footerDisabled) {
2138
2311
  return undefined
2139
2312
  }
2313
+ return this.runListAction(declared)
2314
+ },
2315
+
2316
+ /**
2317
+ * Dispatch an action the list declares (a footer action), without its
2318
+ * drawing keys, through the page's dispatcher when there is one.
2319
+ *
2320
+ * @param {object} declared The declared action.
2321
+ * @return {unknown} What the dispatcher returns.
2322
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-list-can-end-with-several-actions-side-by-side
2323
+ */
2324
+ runListAction(declared) {
2140
2325
  const { disabledWhen, disabledReason, group, variant, visibleWhen, note, wide, ...action } = declared
2141
2326
  if (typeof this.cnDispatchAction === 'function') {
2142
2327
  return this.cnDispatchAction(action)
@@ -2144,6 +2329,57 @@ export default {
2144
2329
  return dispatchAction(action, { router: this.$router || null, tokenCtx: this.tokenCtx, source: { register: this.content?.register, schema: this.content?.schema } })
2145
2330
  },
2146
2331
 
2332
+ /**
2333
+ * The next-step row's own action, when it names no href: dispatched
2334
+ * with the row's `action` object.
2335
+ *
2336
+ * @param {object} row The row.
2337
+ * @return {unknown} What the dispatcher returns.
2338
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-checklist-can-mark-the-next-step
2339
+ */
2340
+ runCheckNextAction(row) {
2341
+ const action = readPath(row, 'action')
2342
+ return action && typeof action === 'object' && action.type ? this.runListAction(action) : undefined
2343
+ },
2344
+
2345
+ /**
2346
+ * The checklist's next-step marking for a row (`content.next`): its
2347
+ * pill label and, when the row names one, its action. Null for a row
2348
+ * where `next.when` does not hold.
2349
+ *
2350
+ * @param {object} row The row.
2351
+ * @return {{label: string, action: ({label: string, href: string}|null)}|null}
2352
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-checklist-can-mark-the-next-step
2353
+ */
2354
+ checkNextOf(row) {
2355
+ const next = this.content?.next
2356
+ if (!next || typeof next !== 'object' || !next.when || !row || !evaluateVisibleWhenLocal(next.when, row)) {
2357
+ return null
2358
+ }
2359
+ const spec = next.action && typeof next.action === 'object' ? next.action : {}
2360
+ const label = readPath(row, spec.labelField || 'action.label')
2361
+ const href = readPath(row, spec.hrefField || 'action.href')
2362
+ return {
2363
+ label: typeof next.label === 'string' && next.label !== '' ? this.translate(next.label) : t('nextcloud-vue', 'Next step'),
2364
+ action: typeof label === 'string' && label !== '' ? { label: this.translate(label), href: typeof href === 'string' ? href : '' } : null,
2365
+ }
2366
+ },
2367
+
2368
+ /**
2369
+ * A checklist row's meta line: `content.missingText` while the row is
2370
+ * not done, else its `meta`.
2371
+ *
2372
+ * @param {object} item The drawn row.
2373
+ * @return {string} The line, or ''.
2374
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-checklist-row-can-say-where-it-comes-from
2375
+ */
2376
+ checkMetaOf(item) {
2377
+ if (!this.isChecked(item.row) && this.checklistMissingText !== '') {
2378
+ return this.checklistMissingText
2379
+ }
2380
+ return item.meta || ''
2381
+ },
2382
+
2147
2383
  /**
2148
2384
  * A row's `bar`: its value, the maximum it is measured against (the
2149
2385
  * row's `maxField`, else the largest row), the filled share and
@@ -3133,68 +3369,13 @@ export default {
3133
3369
  * @param {object} row The row.
3134
3370
  * @param {object} [config] A pill config; the widget's `pill` by default.
3135
3371
  * @return {{label: string, variant: string}|null} The pill, or null.
3136
- */
3137
- pillOf(row, config) {
3138
- const pill = config || this.content?.pill
3139
- if (pill && typeof pill === 'object' && Array.isArray(pill.cases)) {
3140
- return this.pillCaseOf(row, pill)
3141
- }
3142
- if (!pill || typeof pill !== 'object' || !pill.field) {
3143
- return null
3144
- }
3145
- const raw = readPath(row, pill.field)
3146
- if (raw === null || raw === undefined || raw === '' || typeof raw === 'object') {
3147
- return null
3148
- }
3149
- const key = String(raw)
3150
- if (Array.isArray(pill.hideValues) && pill.hideValues.map(String).includes(key)) {
3151
- return null
3152
- }
3153
- const labels = pill.labels && typeof pill.labels === 'object' ? pill.labels : {}
3154
- const map = pill.colorMap && typeof pill.colorMap === 'object' ? pill.colorMap : {}
3155
- const found = Object.keys(map).find((k) => k.toLowerCase() === key.toLowerCase())
3156
- // `variantWhen` colours the pill by the row rather than the value: a
3157
- // finished case is green whatever its case type calls the final status.
3158
- const rule = Array.isArray(pill.variantWhen)
3159
- ? pill.variantWhen.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
3160
- : null
3161
- const colour = pill.colorField ? readPath(row, pill.colorField) : null
3162
- const fromRow = typeof colour === 'string' && colour !== '' ? variantForColor(colour) : null
3163
- const variant = rule ? rule.variant : (found ? map[found] : (fromRow || pill.variant))
3164
- return {
3165
- label: labels[key] ? this.translate(labels[key]) : key,
3166
- variant: isBadgeVariant(variant) ? variant : 'default',
3167
- }
3168
- },
3169
-
3170
- /**
3171
- * The pill of `{ cases: [{ when, label, variant? }], label?, variant? }`:
3172
- * the first case whose `when` (a local condition over the row) holds,
3173
- * else the pill's own `label` and `variant`, else none. For a state that
3174
- * reads more than one field (Concept, Actief, Vastgezet).
3175
- *
3176
- * @param {object} row The row.
3177
- * @param {object} pill The pill config.
3178
- * @return {{label: string, variant: string}|null} The pill, or null.
3179
3372
  * @spec openspec/changes/record-list-pill-cases-footer-choice/specs/record-list/spec.md#requirement-a-record-list-row-pill-can-read-a-state-from-several-fields
3180
- * @spec openspec/changes/record-list-pill-case-template/specs/record-list/spec.md#requirement-a-pill-case-label-can-carry-the-rows-values
3181
3373
  */
3182
- pillCaseOf(row, pill) {
3183
- const found = pill.cases.find((entry) => entry && typeof entry === 'object' && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
3184
- const chosen = found || pill
3185
- if (typeof chosen.label !== 'string' || chosen.label === '') {
3186
- return null
3187
- }
3188
- // A label with `{field}` tokens reads the row ("{value|currency}");
3189
- // one that fills to nothing draws no pill.
3190
- const label = chosen.label.indexOf('{') === -1 ? this.translate(chosen.label) : this.fill(chosen.label, row)
3191
- if (label === '') {
3192
- return null
3193
- }
3194
- return {
3195
- label,
3196
- variant: isBadgeVariant(chosen.variant) ? chosen.variant : 'default',
3197
- }
3374
+ pillOf(row, config) {
3375
+ return fieldPill(row, config || this.content?.pill, {
3376
+ translate: (text) => this.translate(text),
3377
+ fill: (template, values) => this.fill(template, values),
3378
+ })
3198
3379
  },
3199
3380
 
3200
3381
  /**
@@ -3221,9 +3402,16 @@ export default {
3221
3402
  return 'CircleSmall'
3222
3403
  },
3223
3404
 
3224
- /** Tell the card around this list what its header shows. */
3405
+ /**
3406
+ * Tell the card around this list what its header shows.
3407
+ *
3408
+ * @spec openspec/changes/record-list-checklist-sources-and-next-step/specs/record-list/spec.md#requirement-a-record-lists-header-can-carry-a-pill-from-the-answer
3409
+ */
3225
3410
  emitHeader() {
3226
3411
  const header = { link: this.headerLink, note: this.headerNote }
3412
+ if (this.headerPill && !this.error) {
3413
+ header.pill = this.headerPill
3414
+ }
3227
3415
  // `headerSubtitle`: the counts as the muted line under the card title.
3228
3416
  const subtitle = this.content?.headerSubtitle
3229
3417
  if (typeof subtitle === 'string' && subtitle !== '' && !this.error) {
@@ -3476,6 +3664,58 @@ export default {
3476
3664
  color: var(--color-text-maxcontrast);
3477
3665
  }
3478
3666
 
3667
+ .cn-record-list__check-body {
3668
+ display: flex;
3669
+ flex: 1 1 auto;
3670
+ flex-direction: column;
3671
+ min-width: 0;
3672
+ }
3673
+
3674
+ .cn-record-list__check-meta {
3675
+ color: var(--color-text-maxcontrast);
3676
+ font-size: 13px;
3677
+ }
3678
+
3679
+ .cn-record-list__check--meta-end .cn-record-list__check-body {
3680
+ flex-direction: row;
3681
+ align-items: center;
3682
+ justify-content: space-between;
3683
+ gap: 12px;
3684
+ }
3685
+
3686
+ .cn-record-list__check--meta-end .cn-record-list__check-meta {
3687
+ text-align: end;
3688
+ }
3689
+
3690
+ /* The next step spans the row on the primary-light ground (DqTenant Inrichten). */
3691
+ .cn-record-list__check--next {
3692
+ grid-column: 1 / -1;
3693
+ padding: 10px 12px;
3694
+ border-radius: 8px;
3695
+ background: var(--color-primary-element-light);
3696
+ color: var(--color-main-text);
3697
+ }
3698
+
3699
+ .cn-record-list__check--next .cn-record-list__check-title {
3700
+ font-weight: 600;
3701
+ }
3702
+
3703
+ .cn-record-list__check-next-pill {
3704
+ margin-inline-start: 8px;
3705
+ vertical-align: middle;
3706
+ }
3707
+
3708
+ .cn-record-list__check-next-action {
3709
+ flex: none;
3710
+ min-height: 34px;
3711
+ }
3712
+
3713
+ .cn-record-list__footer--actions {
3714
+ display: flex;
3715
+ flex-wrap: wrap;
3716
+ gap: 8px;
3717
+ }
3718
+
3479
3719
  .cn-record-list__check-mark {
3480
3720
  display: inline-flex;
3481
3721
  flex: none;
@@ -3520,6 +3760,10 @@ export default {
3520
3760
  line-height: 1.4;
3521
3761
  }
3522
3762
 
3763
+ .cn-record-list__intro-heading {
3764
+ margin: 0 0 6px;
3765
+ }
3766
+
3523
3767
  .cn-record-list--group-cards .cn-record-list__group-heading {
3524
3768
  margin: 8px 0 6px;
3525
3769
  color: var(--color-text-maxcontrast);
@@ -17,6 +17,13 @@
17
17
  {{ searchLabel }}
18
18
  </button>
19
19
  </form>
20
+ <!-- A term the server could not read: said under the field, the
21
+ results of the last readable term kept. -->
22
+ <CnCardNotices
23
+ v-if="refusalNotice"
24
+ class="cn-search-page__refusal"
25
+ :notices="[refusalNotice]"
26
+ data-testid="cn-search-page-refusal" />
20
27
  </header>
21
28
 
22
29
  <div class="cn-search-page__body">
@@ -95,7 +102,10 @@
95
102
  </template>
96
103
 
97
104
  <script>
105
+ import { parseAxiosError } from '../../utils/errors.js'
98
106
  import { labelLang } from '../../utils/manifestTranslate.js'
107
+ import { readSearchRefusal, searchRefusalNotice } from '../../utils/searchRefusal.js'
108
+ import { CnCardNotices } from '../CnCardNotices/index.js'
99
109
  /**
100
110
  * CnSearchPage — Search surface with a query input, a facet
101
111
  * sidebar, and a results list. Mounted by CnPageRenderer when a
@@ -122,6 +132,8 @@ import { labelLang } from '../../utils/manifestTranslate.js'
122
132
  export default {
123
133
  name: 'CnSearchPage',
124
134
 
135
+ components: { CnCardNotices },
136
+
125
137
  inject: {
126
138
  /** The label lookup from CnAppRoot, so manifest labels show in the user's language. */
127
139
  cnTranslate: { default: null },
@@ -193,6 +205,19 @@ export default {
193
205
  default: (total, shown) => `Showing ${shown} of ${total} results.`,
194
206
  },
195
207
 
208
+ /**
209
+ * The words of a refused search (manifest `config.searchRefusal`):
210
+ * `{ title?, after? }`, the title with `{position}`. A `sources` search
211
+ * the server refuses for its grammar keeps the results it had and says
212
+ * so under the search field.
213
+ *
214
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
215
+ */
216
+ searchRefusal: {
217
+ type: Object,
218
+ default: null,
219
+ },
220
+
196
221
  /**
197
222
  * The lists the page searches itself (manifest `config.sources`). Each
198
223
  * `{ id?, label, register, schema, route?, titleField?, snippetField?,
@@ -219,10 +244,22 @@ export default {
219
244
  sourceFacets: {},
220
245
  sourceLoading: false,
221
246
  sourceRun: 0,
247
+ // The latest `sources` search the server refused for its grammar.
248
+ refusal: null,
222
249
  }
223
250
  },
224
251
 
225
252
  computed: {
253
+ /**
254
+ * The refused search as a notice under the field, or null.
255
+ *
256
+ * @return {object|null}
257
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
258
+ */
259
+ refusalNotice() {
260
+ return this.refusal ? searchRefusalNotice(this.refusal, this.searchRefusal, (text) => this.shown(text)) : null
261
+ },
262
+
226
263
  /** @return {boolean} Whether the page searches its own `sources`. */
227
264
  searchesSources() {
228
265
  return Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)
@@ -438,6 +475,7 @@ export default {
438
475
  * keep what each found. A search started later wins over this one.
439
476
  *
440
477
  * @return {Promise<void>}
478
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
441
479
  */
442
480
  async searchSources() {
443
481
  const run = this.sourceRun + 1
@@ -456,6 +494,11 @@ export default {
456
494
  const rows = Array.isArray(data.results) ? data.results : []
457
495
  return { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }
458
496
  } catch (e) {
497
+ const { status, message, data } = parseAxiosError(e)
498
+ const refused = readSearchRefusal({ status, message, position: data && data.position }, this.localQuery)
499
+ if (refused) {
500
+ return { source, refused }
501
+ }
459
502
  // eslint-disable-next-line no-console
460
503
  console.warn('[CnSearchPage] could not search', source.schema, e)
461
504
  return { source, rows: [], total: 0 }
@@ -464,9 +507,11 @@ export default {
464
507
  if (run !== this.sourceRun) {
465
508
  return
466
509
  }
510
+ const refusedRun = found.find((entry) => entry.refused)
511
+ this.refusal = refusedRun ? refusedRun.refused : null
467
512
  const rows = { ...this.sourceRows }
468
513
  const totals = { ...this.sourceTotals }
469
- for (const { source, rows: list, total } of found) {
514
+ for (const { source, rows: list, total } of found.filter((entry) => !entry.refused)) {
470
515
  rows[source.key] = list.map((row) => this.resultOf(source, row))
471
516
  totals[source.key] = total
472
517
  }
@@ -529,6 +574,10 @@ export default {
529
574
  padding-inline-start: 56px;
530
575
  }
531
576
 
577
+ .cn-search-page__refusal {
578
+ margin-block-start: 8px;
579
+ }
580
+
532
581
  .cn-search-page__title {
533
582
  margin: 0 0 8px;
534
583
  font-size: 1.4em;
@@ -198,6 +198,10 @@ button.cn-stepper__step {
198
198
  z-index: 1;
199
199
  }
200
200
 
201
+ @media (prefers-reduced-motion: reduce) {
202
+ .cn-stepper__dot { transition: none; }
203
+ }
204
+
201
205
  .cn-wizard-dialog__progress-check {
202
206
  font-size: 16px;
203
207
  line-height: 1;
@@ -254,9 +258,12 @@ button.cn-stepper__step {
254
258
  }
255
259
 
256
260
  /* The board look: one row, 28px circles, the label beside the circle. */
257
- /* The board leaves 16px between the stepper and the step's body (DqInstellen). */
261
+ /* The board leaves 16px between the stepper and the step's body (DqInstellen).
262
+ The row never wraps: in a narrow dialog the connectors shrink first, then
263
+ the labels truncate. */
258
264
  .cn-stepper--board {
259
- flex-wrap: wrap;
265
+ flex-wrap: nowrap;
266
+ overflow: hidden;
260
267
  align-items: center;
261
268
  justify-content: flex-start;
262
269
  gap: 8px;
@@ -269,6 +276,7 @@ button.cn-stepper__step {
269
276
  flex-direction: row;
270
277
  align-items: center;
271
278
  gap: 8px;
279
+ min-width: 0;
272
280
  max-width: none;
273
281
  font-size: 14px;
274
282
  }
@@ -280,6 +288,7 @@ button.cn-stepper__step {
280
288
  .cn-stepper--board .cn-stepper__step {
281
289
  flex-direction: row;
282
290
  gap: 8px;
291
+ min-width: 0;
283
292
  }
284
293
 
285
294
  .cn-stepper--board .cn-stepper__dot {
@@ -291,8 +300,8 @@ button.cn-stepper__step {
291
300
  }
292
301
 
293
302
  .cn-stepper--board .cn-stepper__label {
294
- overflow: visible;
295
- text-overflow: clip;
303
+ overflow: hidden;
304
+ text-overflow: ellipsis;
296
305
  white-space: nowrap;
297
306
  font-size: 14px;
298
307
  }
@@ -300,7 +309,7 @@ button.cn-stepper__step {
300
309
  .cn-stepper--board .cn-stepper__connector {
301
310
  position: static;
302
311
  flex: 1 1 24px;
303
- min-width: 16px;
312
+ min-width: 8px;
304
313
  height: 2px;
305
314
  background: var(--color-border);
306
315
  }
@@ -22,6 +22,7 @@ The parent holds the answers: each input emits `answer` and the parent writes. [
22
22
  | `values` | Object | `{}` | The answers so far, keyed by field. |
23
23
  | `idPrefix` | String | `'cn-task-form-fields'` | Prefix of the input ids and test ids, so two forms on one page stay apart. |
24
24
  | `brokenOnly` | Boolean | `false` | Draw only the declared fields the form cannot show. |
25
+ | `errors` | Object | `{}` | A message under a field, keyed by field ("Completing was refused: fill in Report."), e.g. a required field left empty. |
25
26
 
26
27
  ## Events
27
28