@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
@@ -18,7 +18,7 @@ import Undo from 'vue-material-design-icons/Undo.vue'
18
18
  import { formatRelativeDate } from '../utils/boardDate.js'
19
19
  import { fetchReferenceObjects } from '../utils/boardReferenceColumns.js'
20
20
  import { fillTemplate } from '../utils/fillTemplate.js'
21
- import { FLOW_RUN_ERROR_STATUSES, flowRunStatuses } from '../utils/flowRunStatus.js'
21
+ import { FLOW_RUN_ERROR_STATUSES, flowRunCounters, flowRunStatuses, flowRunSubjects } from '../utils/flowRunStatus.js'
22
22
  import { fetchGroupMembers, fetchPresence, fetchStatuses, fetchUsers } from '../utils/nextcloudDirectory.js'
23
23
  import { readPath } from '../utils/readPath.js'
24
24
  import { resolveNextcloudUser } from '../utils/userAutocomplete.js'
@@ -106,14 +106,19 @@ export function flowTriggerCell(flow, catalog = []) {
106
106
  * last run ended, how often it ran this week), read in one request from
107
107
  * the run summary rather than derived from a page of runs.
108
108
  *
109
+ * `sourceConfig.extraColumns` adds `health` (a dot before the name) and `owner`
110
+ * (before the status) to the default columns, as board OrFlows draws them.
111
+ *
109
112
  * The quick filters (All, Active, Paused, With errors) narrow the loaded
110
113
  * list in place: every flow of the app is already loaded, so the counts on
111
114
  * the tabs and the rows they show can never disagree.
112
115
  *
116
+ * @param config
113
117
  * @return {object} The source adapter.
114
118
  */
115
- function flowsSource() {
119
+ function flowsSource(config = {}) {
116
120
  const store = useFlowStore()
121
+ const extraColumns = [].concat(config.extraColumns ?? [])
117
122
  const view = reactive({ state: 'all', owners: [], runsRoute: '/flow-runs', flowsRoute: '/flows' })
118
123
  const statuses = flowRunStatuses()
119
124
 
@@ -220,6 +225,7 @@ function flowsSource() {
220
225
  loading: () => !!store.loading,
221
226
 
222
227
  columns: [
228
+ ...(extraColumns.includes('health') ? [{ key: 'lastRunStatus', label: t('nextcloud-vue', 'Health'), widget: 'flowHealth' }] : []),
223
229
  { key: 'name', label: t('nextcloud-vue', 'Flow'), secondary: 'description' },
224
230
  {
225
231
  key: 'triggerLabel',
@@ -236,6 +242,7 @@ function flowsSource() {
236
242
  widgetProps: { colorMap: lastRunColors },
237
243
  },
238
244
  { key: 'runsThisWeek', label: t('nextcloud-vue', 'Runs this week'), class: 'cn-table-col--end' },
245
+ ...(extraColumns.includes('owner') ? [{ key: 'owner', label: t('nextcloud-vue', 'Owner') }] : []),
239
246
  {
240
247
  key: 'statusLabel',
241
248
  label: t('nextcloud-vue', 'Status'),
@@ -354,9 +361,14 @@ function flowsSource() {
354
361
  * the rows are the runs the flows tab counted. A row opens the run on its
355
362
  * flow's canvas (`/flows/:flowId?run=:uuid`), where CnFlowDetail shows it.
356
363
  *
364
+ * `sourceConfig.counters` draws the run counters above the list and adds the
365
+ * Subject column; `sourceConfig.flowId` narrows the list to one flow (board
366
+ * OrFlowOverzicht).
367
+ *
368
+ * @param {object} [config] The page's source config.
357
369
  * @return {object} The source adapter.
358
370
  */
359
- function flowRunsSource() {
371
+ function flowRunsSource(config = {}) {
360
372
  const store = useFlowStore()
361
373
  const view = reactive({ runsRoute: '/flow-runs', flowsRoute: '/flows' })
362
374
  const statuses = flowRunStatuses()
@@ -392,7 +404,7 @@ function flowRunsSource() {
392
404
  view.runsRoute = config?.runsRoute || '/flow-runs'
393
405
  view.flowsRoute = config?.flowsRoute || '/flows'
394
406
  await store.load({ app: config?.app })
395
- const ids = (store.flows || []).map((flow) => flow.id || flow.uuid)
407
+ const ids = config?.flowId ? [config.flowId] : (store.flows || []).map((flow) => flow.id || flow.uuid)
396
408
  const since = startOfWeek()
397
409
  await Promise.all([store.loadRecentRuns(ids, since), store.loadRunSummary(ids, since)])
398
410
  },
@@ -411,9 +423,16 @@ function flowRunsSource() {
411
423
  flowName: names[run.flowId] || run.flowId,
412
424
  statusLabel: (statuses[run.status] && statuses[run.status].label) || String(run.status || ''),
413
425
  startedAt: formatRelativeDate(run.created, { withTime: true }),
426
+ subjectLabel: flowRunSubjects(run).map((subject) => subject.uuid).join(', '),
427
+ subjectRoles: flowRunSubjects(run).map((subject) => subject.role).filter(Boolean).join(', '),
414
428
  }))
415
429
  },
416
430
 
431
+ /**
432
+ * @return {Array<object>} The tiles above the list, when the page asks for them.
433
+ */
434
+ counters: () => (config.counters === true ? flowRunCounters(store.recentRuns || []) : []),
435
+
417
436
  /**
418
437
  * @return {boolean} Whether a load is in flight.
419
438
  */
@@ -421,6 +440,7 @@ function flowRunsSource() {
421
440
 
422
441
  columns: [
423
442
  { key: 'flowName', label: t('nextcloud-vue', 'Flow'), secondary: 'error' },
443
+ ...(config.counters === true ? [{ key: 'subjectLabel', label: t('nextcloud-vue', 'Subject'), secondary: 'subjectRoles' }] : []),
424
444
  { key: 'statusLabel', label: t('nextcloud-vue', 'Status'), widget: 'badge', widgetProps: { colorMap: statusColors } },
425
445
  { key: 'startedAt', label: t('nextcloud-vue', 'Started') },
426
446
  { key: 'trigger', label: t('nextcloud-vue', 'Trigger') },
@@ -26,6 +26,8 @@ import axios from '@nextcloud/axios'
26
26
  import { translate as t } from '@nextcloud/l10n'
27
27
  import { generateUrl } from '@nextcloud/router'
28
28
  import { defineStore } from 'pinia'
29
+ import { flowEdgeCondition, flowEdgeConditionText } from '../utils/flowCondition.js'
30
+ import { flowStepBridge, flowStepSwap, flowStepTail, insertStepEdges, swapStepEdges, swapStepPlaces } from '../utils/flowStepList.js'
29
31
  import { layoutFlowNodes, needsFullLayout, placeLooseNodes } from './flowGraphLayout.js'
30
32
  import { DEFAULT_EDGE_LINE_TYPE } from './useFlowEdgeStyles.js'
31
33
 
@@ -555,6 +557,8 @@ export const useFlowStore = defineStore('cnFlow', {
555
557
  return (value === null || value === undefined || value === '') ? [] : [value]
556
558
  }
557
559
 
560
+ const nodeOf = (id) => (state.flow.nodes || []).find((node) => node.id === id) || null
561
+
558
562
  const lines = []
559
563
  for (const [index, edge] of (state.flow.edges || []).entries()) {
560
564
  const sources = toList(edge.source ?? edge.from)
@@ -630,6 +634,8 @@ export const useFlowStore = defineStore('cnFlow', {
630
634
  lineType: edge.lineType || DEFAULT_EDGE_LINE_TYPE,
631
635
  labelT: edge.labelT,
632
636
  label: edge.title || edge.label || '',
637
+ condition: flowEdgeCondition(edge, nodeOf(source)),
638
+ conditionText: flowEdgeConditionText(edge, nodeOf(source)),
633
639
  edge,
634
640
  },
635
641
  })
@@ -661,6 +667,15 @@ export const useFlowStore = defineStore('cnFlow', {
661
667
  return nodes.length ? [nodes[0].id] : []
662
668
  },
663
669
 
670
+ /**
671
+ * The flow as the list view reads it (see `utils/flowStepList.js`).
672
+ *
673
+ * @return {{nodes: Array<object>, lines: Array<object>, startIds: Array<string>, roleOf: Function}} The graph.
674
+ */
675
+ stepGraph() {
676
+ return { nodes: this.nodes, lines: this.canvasEdges, startIds: this.startNodeIds, roleOf: this.roleOfNodeType }
677
+ },
678
+
664
679
  /**
665
680
  * What stops this flow from ever finishing, by node ROLE.
666
681
  *
@@ -1194,6 +1209,59 @@ export const useFlowStore = defineStore('cnFlow', {
1194
1209
  this.selectedNodeId = node.id
1195
1210
  this.dirty = true
1196
1211
  this.checkResult = null
1212
+
1213
+ return node.id
1214
+ },
1215
+
1216
+ /**
1217
+ * Add a step at the bottom of the list view: wired in before the
1218
+ * closing step, else after the last step, as one undoable change.
1219
+ *
1220
+ * @param {string} type The step type.
1221
+ * @return {string|undefined} The new node's id, unless the graph is locked.
1222
+ */
1223
+ appendStep(type) {
1224
+ const tail = flowStepTail(this.stepGraph)
1225
+ const id = this.addNode(type)
1226
+ if (id !== undefined) {
1227
+ this.flow.edges = insertStepEdges(this.edges, { id, ...tail })
1228
+ }
1229
+
1230
+ return id
1231
+ },
1232
+
1233
+ /**
1234
+ * Swap a step with its neighbour in the list view, in the flow itself.
1235
+ * A move the list cannot make (a step on a branch) changes nothing.
1236
+ *
1237
+ * @param {{id: string, by: number}} move The step and -1 (up) or 1 (down).
1238
+ * @return {void}
1239
+ */
1240
+ moveStep(move) {
1241
+ const pair = flowStepSwap(this.stepGraph, move)
1242
+ if (pair === null || !this.pushUndo()) {
1243
+ return
1244
+ }
1245
+
1246
+ this.flow.edges = swapStepEdges(this.edges, pair)
1247
+ this.flow.nodes = swapStepPlaces(this.nodes, pair)
1248
+ this.dirty = true
1249
+ this.checkResult = null
1250
+ },
1251
+
1252
+ /**
1253
+ * Remove a step in the list view: a step in a chain leaves no gap, the
1254
+ * line into it goes on to the step after it.
1255
+ *
1256
+ * @param {string} id The step.
1257
+ * @return {void}
1258
+ */
1259
+ removeStep(id) {
1260
+ const bridge = flowStepBridge(this.stepGraph, id)
1261
+ this.removeNode(id)
1262
+ if (bridge !== null && !this.nodes.some((node) => node.id === id)) {
1263
+ this.flow.edges = [...this.edges, bridge]
1264
+ }
1197
1265
  },
1198
1266
 
1199
1267
  /**
@@ -2148,13 +2216,14 @@ export const useFlowStore = defineStore('cnFlow', {
2148
2216
  },
2149
2217
 
2150
2218
  /**
2151
- * Try the saved flow with a record, changing and sending nothing.
2219
+ * Try the saved flow with a record or an example payload, changing and
2220
+ * sending nothing.
2152
2221
  *
2153
2222
  * OpenRegister's dry-run walks the flow against the record: steps without
2154
2223
  * side effects run, every other step says what it would do. The answer,
2155
- * with the record, is kept in `dryRunResult` for the board to show.
2224
+ * with the subject, is kept in `dryRunResult` for the board to show.
2156
2225
  *
2157
- * @param {object} subject `{uuid, register, schema}` of the record.
2226
+ * @param {object} subject `{uuid, register, schema}` of the record, or `{payload}`.
2158
2227
  * @return {Promise<object|null>} The answer (`{status, steps, error?}`), or null.
2159
2228
  * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-testing-a-flow-with-a-record-changes-nothing
2160
2229
  */
@@ -2168,7 +2237,9 @@ export const useFlowStore = defineStore('cnFlow', {
2168
2237
  try {
2169
2238
  const response = await axios.post(
2170
2239
  generateUrl(`/apps/openregister/api/flows/${this.flow.id}/dry-run`),
2171
- { register: subject.register, schema: subject.schema, objectId: subject.uuid },
2240
+ subject.payload === undefined
2241
+ ? { register: subject.register, schema: subject.schema, objectId: subject.uuid }
2242
+ : { payload: subject.payload },
2172
2243
  )
2173
2244
  const result = response.data || { status: '', steps: [] }
2174
2245
  this.dryRunResult = { ...result, subject: { ...subject } }
@@ -37,6 +37,10 @@
37
37
  margin-bottom: calc(4 * var(--default-grid-baseline));
38
38
  }
39
39
 
40
+ .cn-index-page__counters {
41
+ margin-block-end: 12px;
42
+ }
43
+
40
44
  /* A below-header wrapper whose slot renders nothing on this route (e.g. an
41
45
  empty breadcrumb trail at the root) must not leave its margin as a blank
42
46
  band above the actions bar. Vue leaves only comment placeholders for
@@ -762,3 +766,9 @@
762
766
  .cn-index-page__notices {
763
767
  margin-bottom: 12px;
764
768
  }
769
+
770
+ /* The muted line closing an Export menu (`headerButtons[].note`). */
771
+ .cn-index-header-menu__note {
772
+ color: var(--color-text-maxcontrast);
773
+ font-size: 13px;
774
+ }
@@ -11,6 +11,12 @@
11
11
  {{ endpoints }}
12
12
  </p>
13
13
 
14
+ <p v-if="conditionLine"
15
+ class="cn-flow-edge-edit__condition"
16
+ data-testid="flow-edge-condition">
17
+ {{ conditionLine }}
18
+ </p>
19
+
14
20
  <NcTextField :modelValue="draft.title"
15
21
  :label="t('nextcloud-vue', 'Label')"
16
22
  :helperText="t('nextcloud-vue', 'Shown on the line. A branch reads better named — “approved”, “over budget” — than as an unlabelled arrow.')"
@@ -43,11 +49,13 @@ import { translate as t } from '@nextcloud/l10n'
43
49
  import { NcButton, NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'
44
50
  import { EDGE_LINE_TYPES } from '../composables/useFlowEdgeStyles.js'
45
51
  import { useFlowStore } from '../composables/useFlowStore.js'
52
+ import { flowEdgeCondition, flowEdgeConditionText } from '../utils/flowCondition.js'
46
53
 
47
54
  /**
48
55
  * CnFlowEdgeEditModal — edit one connection between two steps.
49
56
  *
50
57
  * A line carries two authored things: what it is CALLED, and how it is DRAWN.
58
+ * When a condition decides it, the dialog says that condition in words.
51
59
  * The label is the one that matters on a branching flow — an unlabelled arrow
52
60
  * out of a routing step says nothing about which branch it is — and the router
53
61
  * is the escape hatch for the one line an automatic layout puts through a node.
@@ -122,6 +130,21 @@ export default {
122
130
  to: this.nodeLabel(pair.target),
123
131
  })
124
132
  },
133
+
134
+ /**
135
+ * @return {string} When this line is taken, in words, or '' when it is simply followed.
136
+ */
137
+ conditionLine() {
138
+ const pair = this.store.editingEdge
139
+ const found = pair ? this.store.locateEdge(pair) : null
140
+ if (found === null) {
141
+ return ''
142
+ }
143
+ const source = this.store.nodes.find((node) => node.id === pair.source) || null
144
+ const text = flowEdgeConditionText(found.edge, source)
145
+
146
+ return flowEdgeCondition(found.edge, source) === null ? text : t('nextcloud-vue', 'Only if {condition}', { condition: text })
147
+ },
125
148
  },
126
149
 
127
150
  methods: {
@@ -201,4 +224,9 @@ export default {
201
224
  color: var(--color-text-maxcontrast);
202
225
  font-size: 0.9em;
203
226
  }
227
+
228
+ .cn-flow-edge-edit__condition {
229
+ margin: 0;
230
+ font-weight: 600;
231
+ }
204
232
  </style>
@@ -1,11 +1,11 @@
1
1
  <!--
2
2
  CnFlowEditModal — edit a flow without leaving the page.
3
3
 
4
- This is what Buildiq's "Edit flows…" opens. It hosts the SAME components as
5
- the flow detail page — CnFlowDetail for the canvas, CnFlowSidebar for the
6
- controls — rather than a second, simpler editor. A modal that could only edit
7
- a flow's name would quietly become a different product surface from the page,
8
- and the two would drift.
4
+ What Buildiq's "Edit flows…" opens for an app without a flow page in list mode.
5
+ It is no editor of its own: it hosts the SAME components as the flow detail
6
+ page, CnFlowDetail in its list view with the Canvas / List switch and
7
+ CnFlowSidebar for the controls, so a flow behaves the same wherever it opens.
8
+ New callers link to the flow page with `?view=list` instead (decision 379).
9
9
 
10
10
  `size="full"` because a graph needs the room: the canvas and the controls have
11
11
  to be on screen together, and at any smaller size the sidebar either wraps
@@ -22,8 +22,13 @@
22
22
  <div class="cn-flow-modal__canvas">
23
23
  <CnFlowDetail :id="flowId"
24
24
  :app="app"
25
+ :view="activeView"
25
26
  @save="onSave"
26
- @run="onRun" />
27
+ @run="onRun">
28
+ <template #toolbar-start>
29
+ <CnFlowViewSwitch v-model="activeView" />
30
+ </template>
31
+ </CnFlowDetail>
27
32
  </div>
28
33
  <aside class="cn-flow-modal__side">
29
34
  <!-- `embedded`: NcAppSidebar's app-layout positioning has no
@@ -57,8 +62,13 @@
57
62
  import { NcButton, NcDialog } from '@nextcloud/vue'
58
63
  import CnFlowDetail from '../components/CnFlowDetail/CnFlowDetail.vue'
59
64
  import CnFlowSidebar from '../components/CnFlowDetail/CnFlowSidebar.vue'
65
+ import CnFlowViewSwitch from '../components/CnFlowDetail/CnFlowViewSwitch.vue'
60
66
  import { useFlowStore } from '../composables/useFlowStore.js'
61
67
 
68
+ /**
69
+ * @deprecated Link to the flow page in list mode (`/flows/{id}?view=list`).
70
+ * Kept while callers move; it renders that same list view in a dialog.
71
+ */
62
72
  export default {
63
73
  name: 'CnFlowEditModal',
64
74
 
@@ -67,6 +77,7 @@ export default {
67
77
  NcDialog,
68
78
  CnFlowDetail,
69
79
  CnFlowSidebar,
80
+ CnFlowViewSwitch,
70
81
  },
71
82
 
72
83
  props: {
@@ -85,6 +96,14 @@ export default {
85
96
  type: String,
86
97
  default: null,
87
98
  },
99
+
100
+ /**
101
+ * The view on arrival: `list` or `canvas`.
102
+ */
103
+ view: {
104
+ type: String,
105
+ default: 'list',
106
+ },
88
107
  },
89
108
 
90
109
  emits: ['close', 'saved'],
@@ -95,6 +114,7 @@ export default {
95
114
 
96
115
  data() {
97
116
  return {
117
+ activeView: this.view,
98
118
  confirmDiscard: false,
99
119
  }
100
120
  },
@@ -133,6 +133,14 @@ export default {
133
133
 
134
134
  components: { NcDialog, NcSelect, NcTextField },
135
135
 
136
+ props: {
137
+ /** Add the step at the bottom of the list view, wired in, not loose on the canvas. */
138
+ append: {
139
+ type: Boolean,
140
+ default: false,
141
+ },
142
+ },
143
+
136
144
  emits: ['close'],
137
145
 
138
146
  setup() {
@@ -290,7 +298,11 @@ export default {
290
298
  * @return {void}
291
299
  */
292
300
  add(id) {
293
- this.store.addNode(id)
301
+ if (this.append) {
302
+ this.store.appendStep(id)
303
+ } else {
304
+ this.store.addNode(id)
305
+ }
294
306
  this.$emit('close')
295
307
  },
296
308
  },
package/src/index.js CHANGED
@@ -176,7 +176,9 @@ export {
176
176
  CnFlowRunsWidgetForm,
177
177
  CnFlowSidebar,
178
178
  CnFlowsPage,
179
+ CnFlowStepList,
179
180
  CnFlowStepOutcomes,
181
+ CnFlowViewSwitch,
180
182
  CnFolderSidebar,
181
183
  CnFolderTree,
182
184
  CnFollowToggle,
@@ -382,6 +384,7 @@ export {
382
384
  CnTagsCard,
383
385
  CnTaskFormDialog,
384
386
  CnTaskFormFields,
387
+ CnTaskFormWidget,
385
388
  CnTasksCard,
386
389
  CnTasksWidget,
387
390
  CnTasksWidgetForm,
@@ -2,17 +2,19 @@
2
2
  // SPDX-License-Identifier: EUPL-1.2
3
3
 
4
4
  /**
5
- * The three dialog widths of the screens canon (section 5 of UNIFORM-canon.md),
6
- * by role. No other width is reachable through the `width` prop of a `Cn*`
7
- * dialog.
5
+ * The dialog widths of the screens canon (section 5 of UNIFORM-canon.md), by
6
+ * role. `browse` is the search-and-pick dialog with a filter column beside its
7
+ * results (learniq/LqOpenLesmateriaal). No other width is reachable through the
8
+ * `width` prop of a `Cn*` dialog.
8
9
  *
9
- * @spec openspec/changes/screens-dialog-parity/specs/dialog-system/spec.md#requirement-a-dialog-takes-one-of-three-widths
10
+ * @spec openspec/changes/screens-dialog-parity/specs/dialog-system/spec.md#requirement-a-dialog-takes-one-of-four-widths
10
11
  * @type {Readonly<Record<string, number>>}
11
12
  */
12
13
  export const DIALOG_WIDTHS = Object.freeze({
13
14
  confirm: 560,
14
15
  form: 640,
15
16
  wizard: 720,
17
+ browse: 1120,
16
18
  })
17
19
 
18
20
  /**
@@ -0,0 +1,73 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: 2026 Conduction B.V.
3
+ * SPDX-License-Identifier: EUPL-1.2
4
+ *
5
+ * fieldPill: the status pill a widget draws for a row from a pill config, so
6
+ * a record list, grouped cards and a checklist read the same keys.
7
+ *
8
+ * @module utils/fieldPill
9
+ */
10
+ import { isBadgeVariant } from './badgeVariants.js'
11
+ import { variantForColor } from './headerFieldChips.js'
12
+ import { readPath } from './readPath.js'
13
+ import { evaluateVisibleWhenLocal } from './visibleWhen.js'
14
+
15
+ /**
16
+ * The pill for a row.
17
+ *
18
+ * `{ field, labels?, colorMap?, colorField?, variant?, variantWhen?, hideValues? }`
19
+ * reads the value at `field`: its label through `labels`, its tone through
20
+ * `colorMap` (keys match case-insensitively), else the colour name at
21
+ * `colorField`, else `variant`. `variantWhen` (`[{ when, variant }]`, the first
22
+ * whose local condition holds for the row) wins over all of them.
23
+ *
24
+ * `{ cases: [{ when, label, variant? }], label?, variant? }` takes the first
25
+ * case whose `when` holds, else the pill's own `label`; a label with `{field}`
26
+ * tokens is filled from the row and draws nothing when it fills to ''.
27
+ *
28
+ * @param {object} row The row.
29
+ * @param {object} pill The pill config.
30
+ * @param {object} [options] Options.
31
+ * @param {(text: string) => string} [options.translate] The app's translate.
32
+ * @param {(template: string, row: object) => string} [options.fill] Fill a template from the row (translated).
33
+ * @return {{label: string, variant: string}|null} The pill, or null.
34
+ * @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
35
+ * @spec openspec/changes/grouped-cards-pills-and-counts/specs/grouped-cards-widget/spec.md
36
+ */
37
+ export function fieldPill(row, pill, options = {}) {
38
+ const translate = typeof options.translate === 'function' ? options.translate : (text) => text
39
+ const fill = typeof options.fill === 'function' ? options.fill : (template) => translate(template)
40
+ if (pill && typeof pill === 'object' && Array.isArray(pill.cases)) {
41
+ const found = pill.cases.find((entry) => entry && typeof entry === 'object' && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
42
+ const chosen = found || pill
43
+ if (typeof chosen.label !== 'string' || chosen.label === '') {
44
+ return null
45
+ }
46
+ const label = chosen.label.indexOf('{') === -1 ? translate(chosen.label) : fill(chosen.label, row)
47
+ return label === '' ? null : { label, variant: isBadgeVariant(chosen.variant) ? chosen.variant : 'default' }
48
+ }
49
+ if (!pill || typeof pill !== 'object' || !pill.field) {
50
+ return null
51
+ }
52
+ const raw = readPath(row, pill.field)
53
+ if (raw === null || raw === undefined || raw === '' || typeof raw === 'object') {
54
+ return null
55
+ }
56
+ const key = String(raw)
57
+ if (Array.isArray(pill.hideValues) && pill.hideValues.map(String).includes(key)) {
58
+ return null
59
+ }
60
+ const labels = pill.labels && typeof pill.labels === 'object' ? pill.labels : {}
61
+ const map = pill.colorMap && typeof pill.colorMap === 'object' ? pill.colorMap : {}
62
+ const found = Object.keys(map).find((k) => k.toLowerCase() === key.toLowerCase())
63
+ const rule = Array.isArray(pill.variantWhen)
64
+ ? pill.variantWhen.find((entry) => entry && entry.when && evaluateVisibleWhenLocal(entry.when, row || {}))
65
+ : null
66
+ const colour = pill.colorField ? readPath(row, pill.colorField) : null
67
+ const fromRow = typeof colour === 'string' && colour !== '' ? variantForColor(colour) : null
68
+ const variant = rule ? rule.variant : (found ? map[found] : (fromRow || pill.variant))
69
+ return {
70
+ label: labels[key] ? translate(labels[key]) : key,
71
+ variant: isBadgeVariant(variant) ? variant : 'default',
72
+ }
73
+ }