@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
@@ -1,19 +1,23 @@
1
- import { translate } from '@nextcloud/l10n';
1
+ import { translate, translatePlural } from '@nextcloud/l10n';
2
2
  import { NcButton } from '@nextcloud/vue';
3
+ import Autorenew from 'vue-material-design-icons/Autorenew.vue';
4
+ import InformationOutline from 'vue-material-design-icons/InformationOutline.vue';
5
+ import __sfc_main from '../CnStatusBadge/CnStatusBadge.vue.js';
3
6
 
4
7
  /**
5
8
  * CnFlowDryRunResult — what trying a flow with a record showed: every step
6
9
  * the flow reached, in order, what it did (a step without side effects) or
7
10
  * would do (any other step), the fields it would change and the messages it
8
11
  * would send. Drawn beside the canvas by CnFlowBoard (DqFlow "Testen met een
9
- * zaak"). Nothing was changed or sent, and the panel says so.
12
+ * zaak"). Nothing was changed or sent, and the panel says so. With `card` it
13
+ * is the test run card of board OrFlowTestrunKaart: the same answer as a table.
10
14
  *
11
15
  * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-the-result-shows-each-step-beside-the-canvas
12
16
  */
13
17
  var script = {
14
18
  name: 'CnFlowDryRunResult',
15
19
 
16
- components: { NcButton },
20
+ components: { Autorenew, CnStatusBadge: __sfc_main, InformationOutline, NcButton },
17
21
 
18
22
  props: {
19
23
  /**
@@ -25,9 +29,15 @@ var script = {
25
29
  type: Object,
26
30
  required: true,
27
31
  },
32
+
33
+ /** Draw the test run card, a table with Test again. */
34
+ card: {
35
+ type: Boolean,
36
+ default: false,
37
+ },
28
38
  },
29
39
 
30
- emits: ['close'],
40
+ emits: ['close', 'again'],
31
41
 
32
42
  computed: {
33
43
  /** @return {Array<object>} The steps reached, in order. */
@@ -39,10 +49,52 @@ var script = {
39
49
  title() {
40
50
  return translate('nextcloud-vue', 'Test result')
41
51
  },
52
+
53
+ /** @return {boolean} Whether the flow was tried on an example payload. */
54
+ onPayload() {
55
+ return this.result.subject?.payload !== undefined
56
+ },
57
+
58
+ /** @return {string} The head of the first column. */
59
+ subjectHead() {
60
+ return this.onPayload ? translate('nextcloud-vue', 'Example') : translate('nextcloud-vue', 'Record')
61
+ },
62
+
63
+ /** @return {string} What the flow was tried on. */
64
+ subjectName() {
65
+ return this.onPayload ? translate('nextcloud-vue', 'Example payload') : (this.result.subject?.label || this.result.subject?.uuid || '')
66
+ },
42
67
  },
43
68
 
44
69
  methods: {
45
70
  t: translate,
71
+ n: translatePlural,
72
+
73
+ /**
74
+ * @param {object} step A step.
75
+ * @return {{label: string, variant: string}} How the step came out.
76
+ */
77
+ outcomeOf(step) {
78
+ if (step.status === 'failed') {
79
+ return { label: translate('nextcloud-vue', 'Would fail'), variant: 'error' }
80
+ }
81
+ if (step.status === 'skipped') {
82
+ return { label: translate('nextcloud-vue', 'Skipped'), variant: 'default' }
83
+ }
84
+
85
+ return { label: translate('nextcloud-vue', 'Would succeed'), variant: 'success' }
86
+ },
87
+
88
+ /**
89
+ * @param {object} step A step.
90
+ * @return {string} What it would do, with the fields and messages it names.
91
+ */
92
+ wouldDo(step) {
93
+ const fields = this.changesOf(step).map((change) => `${change.field}: ${this.valueText(change.value)}`);
94
+ const messages = this.messagesOf(step).map((message) => translate('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }));
95
+
96
+ return [this.summaryOf(step), ...fields, ...messages].filter(Boolean).join(' · ')
97
+ },
46
98
 
47
99
  /**
48
100
  * @param {object} step A step.
@@ -1 +1 @@
1
- {"version":3,"file":"CnFlowDryRunResult.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnFlowDryRunResult.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<section class=\"cn-flow-dry-run\" :aria-label=\"title\" data-testid=\"flow-dry-run-result\">\n\t\t<div class=\"cn-flow-dry-run__head\">\n\t\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t\t{{ title }}\n\t\t\t</h3>\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<p class=\"cn-flow-dry-run__note\" data-testid=\"flow-dry-run-note\">\n\t\t\t{{ t('nextcloud-vue', 'Nothing was changed or sent.') }}\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<ol class=\"cn-flow-dry-run__steps\">\n\t\t\t<li v-for=\"(step, index) in steps\"\n\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\tclass=\"cn-flow-dry-run__step\"\n\t\t\t\tdata-testid=\"flow-dry-run-step\">\n\t\t\t\t<span class=\"cn-flow-dry-run__step-name\">{{ step.label || step.type || step.nodeId }}</span>\n\t\t\t\t<span v-if=\"summaryOf(step)\" class=\"cn-flow-dry-run__summary\">{{ summaryOf(step) }}</span>\n\t\t\t\t<ul v-if=\"changesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"change in changesOf(step)\" :key=\"change.field\" data-testid=\"flow-dry-run-change\">\n\t\t\t\t\t\t{{ change.field }}: {{ valueText(change.value) }}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul v-if=\"messagesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"(message, m) in messagesOf(step)\" :key=\"m\" data-testid=\"flow-dry-run-message\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }) }}<template v-if=\"message.subject\">\n\t\t\t\t\t\t\t· {{ message.subject }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</ol>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\n\n/**\n * CnFlowDryRunResult — what trying a flow with a record showed: every step\n * the flow reached, in order, what it did (a step without side effects) or\n * would do (any other step), the fields it would change and the messages it\n * would send. Drawn beside the canvas by CnFlowBoard (DqFlow \"Testen met een\n * zaak\"). Nothing was changed or sent, and the panel says so.\n *\n * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-the-result-shows-each-step-beside-the-canvas\n */\nexport default {\n\tname: 'CnFlowDryRunResult',\n\n\tcomponents: { NcButton },\n\n\tprops: {\n\t\t/**\n\t\t * OpenRegister's dry-run answer: `{ status, error?, steps: [{ nodeId,\n\t\t * type, label, status, preview: { performed, summary?, changes?,\n\t\t * messages? } }] }`.\n\t\t */\n\t\tresult: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\temits: ['close'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The steps reached, in order. */\n\t\tsteps() {\n\t\t\treturn Array.isArray(this.result.steps) ? this.result.steps : []\n\t\t},\n\n\t\t/** @return {string} The panel's heading. */\n\t\ttitle() {\n\t\t\treturn t('nextcloud-vue', 'Test result')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it did or would do.\n\t\t */\n\t\tsummaryOf(step) {\n\t\t\treturn (step.preview && step.preview.summary) || ''\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<{field: string, value: unknown}>} The fields it would change.\n\t\t */\n\t\tchangesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.changes) ? step.preview.changes : []\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<object>} The messages it would send.\n\t\t */\n\t\tmessagesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.messages) ? step.preview.messages : []\n\t\t},\n\n\t\t/**\n\t\t * @param {unknown} value A field value.\n\t\t * @return {string} It as text.\n\t\t */\n\t\tvalueText(value) {\n\t\t\treturn value !== null && typeof value === 'object' ? JSON.stringify(value) : String(value ?? '')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-dry-run {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.cn-flow-dry-run__note {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-flow-dry-run__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmargin: 0;\n\tpadding-inline-start: 20px;\n}\n\n.cn-flow-dry-run__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-flow-dry-run__step-name {\n\tfont-weight: 600;\n}\n\n.cn-flow-dry-run__summary,\n.cn-flow-dry-run__list {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__list {\n\tmargin: 0;\n\tpadding-inline-start: 16px;\n}\n</style>\n"],"names":["t"],"mappings":";;;AAoDA;;;;AAIC;;AAEA;AACA;;AAED,aAAe;CACd,IAAI,EAAE,oBAAoB;;AAE1B,CAAA,UAAU,EAAE,EAAE,UAAU;;AAExB,CAAA,KAAK,EAAE;AACN;;;AAGC;;AAED,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;EACD;;AAED,CAAA,KAAK,EAAE,CAAC,OAAO,CAAC;;AAEhB,CAAA,QAAQ,EAAE;;AAET,EAAA,KAAK,GAAG;GACP,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAA,GAAI,IAAI,CAAC,MAAM,CAAC,KAAM,GAAE,EAAC;GAC/D;;AAED;AACA,EAAA,KAAK,GAAG;AACP,GAAA,OAAOA,SAAC,CAAC,eAAe,EAAE,aAAa,CAAA;GACvC;EACD;;AAED,CAAA,OAAO,EAAE;KACRA,SAAC;;AAED;;AAEC;;AAED,EAAA,SAAS,CAAC,IAAI,EAAE;AACf,GAAA,OAAO,CAAC,IAAI,CAAC,OAAM,IAAK,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,EAAC;GAClD;;AAED;;AAEC;;AAED,EAAA,SAAS,CAAC,IAAI,EAAE;AACf,GAAA,OAAO,IAAI,CAAC,OAAQ,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAE,GAAE,IAAI,CAAC,OAAO,CAAC,OAAM,GAAI,EAAC;GACrF;;AAED;;AAEC;;AAED,EAAA,UAAU,CAAC,IAAI,EAAE;AAChB,GAAA,OAAO,IAAI,CAAC,OAAQ,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAE,GAAE,IAAI,CAAC,OAAO,CAAC,QAAO,GAAI,EAAC;GACvF;;AAED;AACC;;;AAGD,EAAA,SAAS,CAAC,KAAK,EAAE;AAChB,GAAA,OAAO,KAAI,KAAM,IAAK,IAAG,OAAO,KAAI,KAAM,QAAO,GAAI,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,EAAE,CAAA;GAC/F;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnFlowDryRunResult.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnFlowDryRunResult.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<section v-if=\"card\"\n\t\tclass=\"cn-flow-dry-run cn-flow-dry-run--card\"\n\t\t:aria-label=\"title\"\n\t\tdata-testid=\"flow-dry-run-card\">\n\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t{{ t('nextcloud-vue', 'Test: a trial run without carrying anything out') }}\n\t\t</h3>\n\t\t<p class=\"cn-flow-dry-run__intro\" data-testid=\"flow-dry-run-note\">\n\t\t\t<InformationOutline :size=\"18\" />\n\t\t\t<span>{{ t('nextcloud-vue', 'Nothing was sent or changed; the saved flow was worked through, not the canvas.') }}</span>\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<table class=\"cn-flow-dry-run__table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ subjectHead }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Step') }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Would do') }}\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr v-for=\"(step, index) in steps\"\n\t\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\t\tdata-testid=\"flow-dry-run-row\">\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<strong v-if=\"index === 0\">{{ subjectName }}</strong>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>{{ step.label || step.type || step.nodeId }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<CnStatusBadge :label=\"outcomeOf(step).label\" :variant=\"outcomeOf(step).variant\" size=\"small\" />\n\t\t\t\t\t\t{{ wouldDo(step) }}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<div class=\"cn-flow-dry-run__foot\">\n\t\t\t<span class=\"cn-flow-dry-run__count\">{{ n('nextcloud-vue', '%n step', '%n steps', steps.length) }}</span>\n\t\t\t<NcButton data-testid=\"flow-dry-run-again\" @click=\"$emit('again')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Autorenew :size=\"18\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Test again') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton variant=\"primary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t</section>\n\t<section v-else\n\t\tclass=\"cn-flow-dry-run\"\n\t\t:aria-label=\"title\"\n\t\tdata-testid=\"flow-dry-run-result\">\n\t\t<div class=\"cn-flow-dry-run__head\">\n\t\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t\t{{ title }}\n\t\t\t</h3>\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<p class=\"cn-flow-dry-run__note\" data-testid=\"flow-dry-run-note\">\n\t\t\t{{ t('nextcloud-vue', 'Nothing was changed or sent.') }}\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<ol class=\"cn-flow-dry-run__steps\">\n\t\t\t<li v-for=\"(step, index) in steps\"\n\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\tclass=\"cn-flow-dry-run__step\"\n\t\t\t\tdata-testid=\"flow-dry-run-step\">\n\t\t\t\t<span class=\"cn-flow-dry-run__step-name\">{{ step.label || step.type || step.nodeId }}</span>\n\t\t\t\t<span v-if=\"summaryOf(step)\" class=\"cn-flow-dry-run__summary\">{{ summaryOf(step) }}</span>\n\t\t\t\t<ul v-if=\"changesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"change in changesOf(step)\" :key=\"change.field\" data-testid=\"flow-dry-run-change\">\n\t\t\t\t\t\t{{ change.field }}: {{ valueText(change.value) }}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul v-if=\"messagesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"(message, m) in messagesOf(step)\" :key=\"m\" data-testid=\"flow-dry-run-message\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }) }}<template v-if=\"message.subject\">\n\t\t\t\t\t\t\t· {{ message.subject }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</ol>\n\t</section>\n</template>\n\n<script>\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport Autorenew from 'vue-material-design-icons/Autorenew.vue'\nimport InformationOutline from 'vue-material-design-icons/InformationOutline.vue'\nimport { CnStatusBadge } from '../CnStatusBadge/index.js'\n\n/**\n * CnFlowDryRunResult — what trying a flow with a record showed: every step\n * the flow reached, in order, what it did (a step without side effects) or\n * would do (any other step), the fields it would change and the messages it\n * would send. Drawn beside the canvas by CnFlowBoard (DqFlow \"Testen met een\n * zaak\"). Nothing was changed or sent, and the panel says so. With `card` it\n * is the test run card of board OrFlowTestrunKaart: the same answer as a table.\n *\n * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-the-result-shows-each-step-beside-the-canvas\n */\nexport default {\n\tname: 'CnFlowDryRunResult',\n\n\tcomponents: { Autorenew, CnStatusBadge, InformationOutline, NcButton },\n\n\tprops: {\n\t\t/**\n\t\t * OpenRegister's dry-run answer: `{ status, error?, steps: [{ nodeId,\n\t\t * type, label, status, preview: { performed, summary?, changes?,\n\t\t * messages? } }] }`.\n\t\t */\n\t\tresult: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Draw the test run card, a table with Test again. */\n\t\tcard: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close', 'again'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The steps reached, in order. */\n\t\tsteps() {\n\t\t\treturn Array.isArray(this.result.steps) ? this.result.steps : []\n\t\t},\n\n\t\t/** @return {string} The panel's heading. */\n\t\ttitle() {\n\t\t\treturn t('nextcloud-vue', 'Test result')\n\t\t},\n\n\t\t/** @return {boolean} Whether the flow was tried on an example payload. */\n\t\tonPayload() {\n\t\t\treturn this.result.subject?.payload !== undefined\n\t\t},\n\n\t\t/** @return {string} The head of the first column. */\n\t\tsubjectHead() {\n\t\t\treturn this.onPayload ? t('nextcloud-vue', 'Example') : t('nextcloud-vue', 'Record')\n\t\t},\n\n\t\t/** @return {string} What the flow was tried on. */\n\t\tsubjectName() {\n\t\t\treturn this.onPayload ? t('nextcloud-vue', 'Example payload') : (this.result.subject?.label || this.result.subject?.uuid || '')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tn,\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {{label: string, variant: string}} How the step came out.\n\t\t */\n\t\toutcomeOf(step) {\n\t\t\tif (step.status === 'failed') {\n\t\t\t\treturn { label: t('nextcloud-vue', 'Would fail'), variant: 'error' }\n\t\t\t}\n\t\t\tif (step.status === 'skipped') {\n\t\t\t\treturn { label: t('nextcloud-vue', 'Skipped'), variant: 'default' }\n\t\t\t}\n\n\t\t\treturn { label: t('nextcloud-vue', 'Would succeed'), variant: 'success' }\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it would do, with the fields and messages it names.\n\t\t */\n\t\twouldDo(step) {\n\t\t\tconst fields = this.changesOf(step).map((change) => `${change.field}: ${this.valueText(change.value)}`)\n\t\t\tconst messages = this.messagesOf(step).map((message) => t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }))\n\n\t\t\treturn [this.summaryOf(step), ...fields, ...messages].filter(Boolean).join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it did or would do.\n\t\t */\n\t\tsummaryOf(step) {\n\t\t\treturn (step.preview && step.preview.summary) || ''\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<{field: string, value: unknown}>} The fields it would change.\n\t\t */\n\t\tchangesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.changes) ? step.preview.changes : []\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<object>} The messages it would send.\n\t\t */\n\t\tmessagesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.messages) ? step.preview.messages : []\n\t\t},\n\n\t\t/**\n\t\t * @param {unknown} value A field value.\n\t\t * @return {string} It as text.\n\t\t */\n\t\tvalueText(value) {\n\t\t\treturn value !== null && typeof value === 'object' ? JSON.stringify(value) : String(value ?? '')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-dry-run {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run--card {\n\tgap: 12px;\n}\n\n.cn-flow-dry-run__intro {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: 8px;\n\tmargin: 0;\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__table {\n\tinline-size: 100%;\n\tborder-collapse: collapse;\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__table th {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 600;\n\ttext-align: start;\n}\n\n.cn-flow-dry-run__table th,\n.cn-flow-dry-run__table td {\n\tpadding: 6px 8px 6px 0;\n\tborder-block-end: 1px solid var(--color-border);\n\tvertical-align: top;\n}\n\n.cn-flow-dry-run__foot {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__count {\n\tflex: 1 1 auto;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.cn-flow-dry-run__note {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-flow-dry-run__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmargin: 0;\n\tpadding-inline-start: 20px;\n}\n\n.cn-flow-dry-run__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-flow-dry-run__step-name {\n\tfont-weight: 600;\n}\n\n.cn-flow-dry-run__summary,\n.cn-flow-dry-run__list {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__list {\n\tmargin: 0;\n\tpadding-inline-start: 16px;\n}\n</style>\n"],"names":["CnStatusBadge","t","n"],"mappings":";;;;;;AAqHA;;;;AAIC;;AAEA;AACA;AACA;;AAED,aAAe;CACd,IAAI,EAAE,oBAAoB;;AAE1B,CAAA,UAAU,EAAE,EAAE,SAAS,iBAAEA,UAAa,EAAE,kBAAkB,EAAE,UAAU;;AAEtE,CAAA,KAAK,EAAE;AACN;;;AAGC;;AAED,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;AAED;EACA,IAAI,EAAE;GACL,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;EACD;;CAED,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;;AAEzB,CAAA,QAAQ,EAAE;;AAET,EAAA,KAAK,GAAG;GACP,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAA,GAAI,IAAI,CAAC,MAAM,CAAC,KAAM,GAAE,EAAC;GAC/D;;AAED;AACA,EAAA,KAAK,GAAG;AACP,GAAA,OAAOC,SAAC,CAAC,eAAe,EAAE,aAAa,CAAA;GACvC;;;EAGD,SAAS,GAAG;AACX,GAAA,OAAO,IAAI,C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UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,KAAKA,SAAC,CAAC,eAAe,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAC,IAAK,EAAE,EAAE,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC,EAAA;;AAE5I,GAAA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;GAChF;;AAED;;AAEC;;AAED,EAAA,SAAS,CAAC,IAAI,EAAE;AACf,GAAA,OAAO,CAAC,IAAI,CAAC,OAAM,IAAK,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,EAAC;GAClD;;AAED;;AAEC;;AAED,EAAA,SAAS,CAAC,IAAI,EAAE;AACf,GAAA,OAAO,IAAI,CAAC,OAAQ,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAE,GAAE,IAAI,CAAC,OAAO,CAAC,OAAM,GAAI,EAAC;GACrF;;AAED;;AAEC;;AAED,EAAA,UAAU,CAAC,IAAI,EAAE;AAChB,GAAA,OAAO,IAAI,CAAC,OAAQ,IAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAE,GAAE,IAAI,CAAC,OAAO,CAAC,QAAO,GAAI,EAAC;GACvF;;AAED;AACC;;;AAGD,EAAA,SAAS,CAAC,KAAK,EAAE;AAChB,GAAA,OAAO,KAAI,KAAM,IAAK,IAAG,OAAO,KAAI,KAAM,QAAO,GAAI,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,EAAE,CAAA;GAC/F;EACD;AACF;;;;"}
@@ -1,100 +1,196 @@
1
- import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createTextVNode, createCommentVNode, Fragment, renderList } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, createCommentVNode, Fragment, renderList, createTextVNode, withCtx } from 'vue';
2
2
 
3
3
  const _hoisted_1 = ["aria-label"];
4
- const _hoisted_2 = { class: "cn-flow-dry-run__head" };
5
- const _hoisted_3 = { class: "cn-flow-dry-run__title" };
4
+ const _hoisted_2 = { class: "cn-flow-dry-run__title" };
5
+ const _hoisted_3 = {
6
+ class: "cn-flow-dry-run__intro",
7
+ "data-testid": "flow-dry-run-note"
8
+ };
6
9
  const _hoisted_4 = {
10
+ key: 0,
11
+ class: "cn-flow-dry-run__error",
12
+ role: "alert",
13
+ "data-testid": "flow-dry-run-error"
14
+ };
15
+ const _hoisted_5 = { class: "cn-flow-dry-run__table" };
16
+ const _hoisted_6 = { scope: "col" };
17
+ const _hoisted_7 = { scope: "col" };
18
+ const _hoisted_8 = { scope: "col" };
19
+ const _hoisted_9 = { key: 0 };
20
+ const _hoisted_10 = { class: "cn-flow-dry-run__foot" };
21
+ const _hoisted_11 = { class: "cn-flow-dry-run__count" };
22
+ const _hoisted_12 = ["aria-label"];
23
+ const _hoisted_13 = { class: "cn-flow-dry-run__head" };
24
+ const _hoisted_14 = { class: "cn-flow-dry-run__title" };
25
+ const _hoisted_15 = {
7
26
  class: "cn-flow-dry-run__note",
8
27
  "data-testid": "flow-dry-run-note"
9
28
  };
10
- const _hoisted_5 = {
29
+ const _hoisted_16 = {
11
30
  key: 0,
12
31
  class: "cn-flow-dry-run__error",
13
32
  role: "alert",
14
33
  "data-testid": "flow-dry-run-error"
15
34
  };
16
- const _hoisted_6 = { class: "cn-flow-dry-run__steps" };
17
- const _hoisted_7 = { class: "cn-flow-dry-run__step-name" };
18
- const _hoisted_8 = {
35
+ const _hoisted_17 = { class: "cn-flow-dry-run__steps" };
36
+ const _hoisted_18 = { class: "cn-flow-dry-run__step-name" };
37
+ const _hoisted_19 = {
19
38
  key: 0,
20
39
  class: "cn-flow-dry-run__summary"
21
40
  };
22
- const _hoisted_9 = {
41
+ const _hoisted_20 = {
23
42
  key: 1,
24
43
  class: "cn-flow-dry-run__list"
25
44
  };
26
- const _hoisted_10 = {
45
+ const _hoisted_21 = {
27
46
  key: 2,
28
47
  class: "cn-flow-dry-run__list"
29
48
  };
30
49
 
31
50
  function render(_ctx, _cache, $props, $setup, $data, $options) {
51
+ const _component_InformationOutline = resolveComponent("InformationOutline");
52
+ const _component_CnStatusBadge = resolveComponent("CnStatusBadge");
53
+ const _component_Autorenew = resolveComponent("Autorenew");
32
54
  const _component_NcButton = resolveComponent("NcButton");
33
55
 
34
- return (openBlock(), createElementBlock("section", {
35
- class: "cn-flow-dry-run",
36
- "aria-label": $options.title,
37
- "data-testid": "flow-dry-run-result"
38
- }, [
39
- createElementVNode("div", _hoisted_2, [
40
- createElementVNode("h3", _hoisted_3, toDisplayString($options.title), 1 /* TEXT */),
41
- createVNode(_component_NcButton, {
42
- variant: "tertiary",
43
- "data-testid": "flow-dry-run-close",
44
- onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('close')))
45
- }, {
46
- default: withCtx(() => [
47
- createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Close')), 1 /* TEXT */)
56
+ return ($props.card)
57
+ ? (openBlock(), createElementBlock("section", {
58
+ key: 0,
59
+ class: "cn-flow-dry-run cn-flow-dry-run--card",
60
+ "aria-label": $options.title,
61
+ "data-testid": "flow-dry-run-card"
62
+ }, [
63
+ createElementVNode("h3", _hoisted_2, toDisplayString($options.t('nextcloud-vue', 'Test: a trial run without carrying anything out')), 1 /* TEXT */),
64
+ createElementVNode("p", _hoisted_3, [
65
+ createVNode(_component_InformationOutline, { size: 18 }),
66
+ createElementVNode("span", null, toDisplayString($options.t('nextcloud-vue', 'Nothing was sent or changed; the saved flow was worked through, not the canvas.')), 1 /* TEXT */)
48
67
  ]),
49
- _: 1 /* STABLE */
50
- })
51
- ]),
52
- createElementVNode("p", _hoisted_4, toDisplayString($options.t('nextcloud-vue', 'Nothing was changed or sent.')), 1 /* TEXT */),
53
- ($props.result.error)
54
- ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString($props.result.error), 1 /* TEXT */))
55
- : createCommentVNode("v-if", true),
56
- createElementVNode("ol", _hoisted_6, [
57
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.steps, (step, index) => {
58
- return (openBlock(), createElementBlock("li", {
59
- key: `${index}-${step.nodeId}`,
60
- class: "cn-flow-dry-run__step",
61
- "data-testid": "flow-dry-run-step"
62
- }, [
63
- createElementVNode("span", _hoisted_7, toDisplayString(step.label || step.type || step.nodeId), 1 /* TEXT */),
64
- ($options.summaryOf(step))
65
- ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString($options.summaryOf(step)), 1 /* TEXT */))
66
- : createCommentVNode("v-if", true),
67
- ($options.changesOf(step).length > 0)
68
- ? (openBlock(), createElementBlock("ul", _hoisted_9, [
69
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.changesOf(step), (change) => {
70
- return (openBlock(), createElementBlock("li", {
71
- key: change.field,
72
- "data-testid": "flow-dry-run-change"
73
- }, toDisplayString(change.field) + ": " + toDisplayString($options.valueText(change.value)), 1 /* TEXT */))
74
- }), 128 /* KEYED_FRAGMENT */))
68
+ ($props.result.error)
69
+ ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString($props.result.error), 1 /* TEXT */))
70
+ : createCommentVNode("v-if", true),
71
+ createElementVNode("table", _hoisted_5, [
72
+ createElementVNode("thead", null, [
73
+ createElementVNode("tr", null, [
74
+ createElementVNode("th", _hoisted_6, toDisplayString($options.subjectHead), 1 /* TEXT */),
75
+ createElementVNode("th", _hoisted_7, toDisplayString($options.t('nextcloud-vue', 'Step')), 1 /* TEXT */),
76
+ createElementVNode("th", _hoisted_8, toDisplayString($options.t('nextcloud-vue', 'Would do')), 1 /* TEXT */)
77
+ ])
78
+ ]),
79
+ createElementVNode("tbody", null, [
80
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.steps, (step, index) => {
81
+ return (openBlock(), createElementBlock("tr", {
82
+ key: `${index}-${step.nodeId}`,
83
+ "data-testid": "flow-dry-run-row"
84
+ }, [
85
+ createElementVNode("td", null, [
86
+ (index === 0)
87
+ ? (openBlock(), createElementBlock("strong", _hoisted_9, toDisplayString($options.subjectName), 1 /* TEXT */))
88
+ : createCommentVNode("v-if", true)
89
+ ]),
90
+ createElementVNode("td", null, toDisplayString(step.label || step.type || step.nodeId), 1 /* TEXT */),
91
+ createElementVNode("td", null, [
92
+ createVNode(_component_CnStatusBadge, {
93
+ label: $options.outcomeOf(step).label,
94
+ variant: $options.outcomeOf(step).variant,
95
+ size: "small"
96
+ }, null, 8 /* PROPS */, ["label", "variant"]),
97
+ createTextVNode(" " + toDisplayString($options.wouldDo(step)), 1 /* TEXT */)
98
+ ])
75
99
  ]))
76
- : createCommentVNode("v-if", true),
77
- ($options.messagesOf(step).length > 0)
78
- ? (openBlock(), createElementBlock("ul", _hoisted_10, [
79
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.messagesOf(step), (message, m) => {
80
- return (openBlock(), createElementBlock("li", {
81
- key: m,
82
- "data-testid": "flow-dry-run-message"
83
- }, [
84
- createTextVNode(toDisplayString($options.t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') })), 1 /* TEXT */),
85
- (message.subject)
86
- ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
87
- createTextVNode(" · " + toDisplayString(message.subject), 1 /* TEXT */)
88
- ], 64 /* STABLE_FRAGMENT */))
89
- : createCommentVNode("v-if", true)
100
+ }), 128 /* KEYED_FRAGMENT */))
101
+ ])
102
+ ]),
103
+ createElementVNode("div", _hoisted_10, [
104
+ createElementVNode("span", _hoisted_11, toDisplayString($options.n('nextcloud-vue', '%n step', '%n steps', $options.steps.length)), 1 /* TEXT */),
105
+ createVNode(_component_NcButton, {
106
+ "data-testid": "flow-dry-run-again",
107
+ onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('again')))
108
+ }, {
109
+ icon: withCtx(() => [
110
+ createVNode(_component_Autorenew, { size: 18 })
111
+ ]),
112
+ default: withCtx(() => [
113
+ createTextVNode(" " + toDisplayString($options.t('nextcloud-vue', 'Test again')), 1 /* TEXT */)
114
+ ]),
115
+ _: 1 /* STABLE */
116
+ }),
117
+ createVNode(_component_NcButton, {
118
+ variant: "primary",
119
+ "data-testid": "flow-dry-run-close",
120
+ onClick: _cache[1] || (_cache[1] = $event => (_ctx.$emit('close')))
121
+ }, {
122
+ default: withCtx(() => [
123
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Close')), 1 /* TEXT */)
124
+ ]),
125
+ _: 1 /* STABLE */
126
+ })
127
+ ])
128
+ ], 8 /* PROPS */, _hoisted_1))
129
+ : (openBlock(), createElementBlock("section", {
130
+ key: 1,
131
+ class: "cn-flow-dry-run",
132
+ "aria-label": $options.title,
133
+ "data-testid": "flow-dry-run-result"
134
+ }, [
135
+ createElementVNode("div", _hoisted_13, [
136
+ createElementVNode("h3", _hoisted_14, toDisplayString($options.title), 1 /* TEXT */),
137
+ createVNode(_component_NcButton, {
138
+ variant: "tertiary",
139
+ "data-testid": "flow-dry-run-close",
140
+ onClick: _cache[2] || (_cache[2] = $event => (_ctx.$emit('close')))
141
+ }, {
142
+ default: withCtx(() => [
143
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Close')), 1 /* TEXT */)
144
+ ]),
145
+ _: 1 /* STABLE */
146
+ })
147
+ ]),
148
+ createElementVNode("p", _hoisted_15, toDisplayString($options.t('nextcloud-vue', 'Nothing was changed or sent.')), 1 /* TEXT */),
149
+ ($props.result.error)
150
+ ? (openBlock(), createElementBlock("p", _hoisted_16, toDisplayString($props.result.error), 1 /* TEXT */))
151
+ : createCommentVNode("v-if", true),
152
+ createElementVNode("ol", _hoisted_17, [
153
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.steps, (step, index) => {
154
+ return (openBlock(), createElementBlock("li", {
155
+ key: `${index}-${step.nodeId}`,
156
+ class: "cn-flow-dry-run__step",
157
+ "data-testid": "flow-dry-run-step"
158
+ }, [
159
+ createElementVNode("span", _hoisted_18, toDisplayString(step.label || step.type || step.nodeId), 1 /* TEXT */),
160
+ ($options.summaryOf(step))
161
+ ? (openBlock(), createElementBlock("span", _hoisted_19, toDisplayString($options.summaryOf(step)), 1 /* TEXT */))
162
+ : createCommentVNode("v-if", true),
163
+ ($options.changesOf(step).length > 0)
164
+ ? (openBlock(), createElementBlock("ul", _hoisted_20, [
165
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.changesOf(step), (change) => {
166
+ return (openBlock(), createElementBlock("li", {
167
+ key: change.field,
168
+ "data-testid": "flow-dry-run-change"
169
+ }, toDisplayString(change.field) + ": " + toDisplayString($options.valueText(change.value)), 1 /* TEXT */))
170
+ }), 128 /* KEYED_FRAGMENT */))
90
171
  ]))
91
- }), 128 /* KEYED_FRAGMENT */))
92
- ]))
93
- : createCommentVNode("v-if", true)
94
- ]))
95
- }), 128 /* KEYED_FRAGMENT */))
96
- ])
97
- ], 8 /* PROPS */, _hoisted_1))
172
+ : createCommentVNode("v-if", true),
173
+ ($options.messagesOf(step).length > 0)
174
+ ? (openBlock(), createElementBlock("ul", _hoisted_21, [
175
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.messagesOf(step), (message, m) => {
176
+ return (openBlock(), createElementBlock("li", {
177
+ key: m,
178
+ "data-testid": "flow-dry-run-message"
179
+ }, [
180
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') })), 1 /* TEXT */),
181
+ (message.subject)
182
+ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
183
+ createTextVNode(" · " + toDisplayString(message.subject), 1 /* TEXT */)
184
+ ], 64 /* STABLE_FRAGMENT */))
185
+ : createCommentVNode("v-if", true)
186
+ ]))
187
+ }), 128 /* KEYED_FRAGMENT */))
188
+ ]))
189
+ : createCommentVNode("v-if", true)
190
+ ]))
191
+ }), 128 /* KEYED_FRAGMENT */))
192
+ ])
193
+ ], 8 /* PROPS */, _hoisted_12))
98
194
  }
99
195
 
100
196
  export { render };
@@ -1 +1 @@
1
- {"version":3,"file":"CnFlowDryRunResult.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnFlowDryRunResult.vue?vue&type=template&id=09d61cb0&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<section class=\"cn-flow-dry-run\" :aria-label=\"title\" data-testid=\"flow-dry-run-result\">\n\t\t<div class=\"cn-flow-dry-run__head\">\n\t\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t\t{{ title }}\n\t\t\t</h3>\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<p class=\"cn-flow-dry-run__note\" data-testid=\"flow-dry-run-note\">\n\t\t\t{{ t('nextcloud-vue', 'Nothing was changed or sent.') }}\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<ol class=\"cn-flow-dry-run__steps\">\n\t\t\t<li v-for=\"(step, index) in steps\"\n\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\tclass=\"cn-flow-dry-run__step\"\n\t\t\t\tdata-testid=\"flow-dry-run-step\">\n\t\t\t\t<span class=\"cn-flow-dry-run__step-name\">{{ step.label || step.type || step.nodeId }}</span>\n\t\t\t\t<span v-if=\"summaryOf(step)\" class=\"cn-flow-dry-run__summary\">{{ summaryOf(step) }}</span>\n\t\t\t\t<ul v-if=\"changesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"change in changesOf(step)\" :key=\"change.field\" data-testid=\"flow-dry-run-change\">\n\t\t\t\t\t\t{{ change.field }}: {{ valueText(change.value) }}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul v-if=\"messagesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"(message, m) in messagesOf(step)\" :key=\"m\" data-testid=\"flow-dry-run-message\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }) }}<template v-if=\"message.subject\">\n\t\t\t\t\t\t\t· {{ message.subject }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</ol>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\n\n/**\n * CnFlowDryRunResult — what trying a flow with a record showed: every step\n * the flow reached, in order, what it did (a step without side effects) or\n * would do (any other step), the fields it would change and the messages it\n * would send. Drawn beside the canvas by CnFlowBoard (DqFlow \"Testen met een\n * zaak\"). Nothing was changed or sent, and the panel says so.\n *\n * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-the-result-shows-each-step-beside-the-canvas\n */\nexport default {\n\tname: 'CnFlowDryRunResult',\n\n\tcomponents: { NcButton },\n\n\tprops: {\n\t\t/**\n\t\t * OpenRegister's dry-run answer: `{ status, error?, steps: [{ nodeId,\n\t\t * type, label, status, preview: { performed, summary?, changes?,\n\t\t * messages? } }] }`.\n\t\t */\n\t\tresult: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\temits: ['close'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The steps reached, in order. */\n\t\tsteps() {\n\t\t\treturn Array.isArray(this.result.steps) ? this.result.steps : []\n\t\t},\n\n\t\t/** @return {string} The panel's heading. */\n\t\ttitle() {\n\t\t\treturn t('nextcloud-vue', 'Test result')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it did or would do.\n\t\t */\n\t\tsummaryOf(step) {\n\t\t\treturn (step.preview && step.preview.summary) || ''\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<{field: string, value: unknown}>} The fields it would change.\n\t\t */\n\t\tchangesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.changes) ? step.preview.changes : []\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<object>} The messages it would send.\n\t\t */\n\t\tmessagesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.messages) ? step.preview.messages : []\n\t\t},\n\n\t\t/**\n\t\t * @param {unknown} value A field value.\n\t\t * @return {string} It as text.\n\t\t */\n\t\tvalueText(value) {\n\t\t\treturn value !== null && typeof value === 'object' ? JSON.stringify(value) : String(value ?? '')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-dry-run {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.cn-flow-dry-run__note {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-flow-dry-run__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmargin: 0;\n\tpadding-inline-start: 20px;\n}\n\n.cn-flow-dry-run__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-flow-dry-run__step-name {\n\tfont-weight: 600;\n}\n\n.cn-flow-dry-run__summary,\n.cn-flow-dry-run__list {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__list {\n\tmargin: 0;\n\tpadding-inline-start: 16px;\n}\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","_openBlock","_renderList","_Fragment","_createTextVNode"],"mappings":";;;AAYO,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;AAC7B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAA,GAAA;;AAOR,EAAA,KAAK,EAAC,uBAAG;AAAA,EAAA,aAAA,EAAA,mBAAA;;;;AAIX,EAAA,KAAK,EAAC,wBAAwB;AAC9B,EAAA,IAAI,EAAC,OAAO;AACX,EAAA,aAAU,EAAC,oBAAoB;;AAG7B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;AAK3B,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,4BAAA,GAAA;;;AACD,EAAA,KAAA,EAAA,0BAAA;;;;AACmC,EAAA,KAAI,EAAC,uBAAuB;;;;AAK9D,EAAA,KAAA,EAAA,uBAAA;;;;;;uBA9BNA;AAAO,IAAA,KAAK,EAAC,iBAAiB;AAAE,IAAA,YAAU,EAAE,QAAK,CAAA,KAAA;AAAE,IAAA,aAAW,EAAC,qBAAqB;;uBAQ/E,iBAAA,EAAA;MANLC,kBAEK,CAAA,IAAA,EAFL,UAEK,EAAAC,eAAA,CADD,QAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;MAEJC,WAEW,CAAA,mBAAA,EAAA;AAFD,QAAA,OAAO,EAAC,UAAU;AAAC,QAAA,aAAW,EAAC,oBAAc;AAAA,QAAA,OAAA,uCAAA,IAAA,CAAA,KAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;yBACtD,MAAC;0CAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,OAAA,CAAA,CAAA,EAAA,CAAA,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C,IAAI,IAAxB,MAAM,KAAA;uCAAjBL,kBAEK,CAAA,IAAA,EAAA;oBAFkC,GAAG,EAAG,MAAK,CAAC,KAAK;AAAE,oBAAA,aAAW,EAAC,qBAAkB;qCACpF,MAAM,CAAC,KAAK,CAAG,GAAA,IAAE,mBAAG,QAAS,CAAA,SAAA,CAAC,MAAM,CAAA,KAAM,CAAA,CAAA,EAAA,CAAA,YAAA,CAAA;;;;WAG1C,QAAA,CAAA,UAAA,CAAA,IAAA,CAAA,CAAA,MAAA,GAAA,CAAA;;AACJ,iBAAAI,SAAA,CAAA,IAAA,CAAA,EAAAJ,kBAAA,4BAAG,QAAA,CAAA,UAAA,CAAA,IAAA,CAAA,EAAA,CAAA,OAAA,EAAA,CAAA,KAAA;uCAAHA;AAAG,oBAAA,GAAA,EAAA,CAAA;AAAA,oBAAA,aAAA,EAAA,sBAAA;;AACD,oBAAAO,eAAA,CAAAL,eAAA,CAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,UAAA,EAAA,CAAA,OAAA,CAAA,EAAA,QAAA,IAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,YAAA;AAAA,oBAAA,CAAA,OAAA,CAAA,OAAA;sCAAAF,kBAEG,CAAAM,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;0CAFH,KACD,GAAAJ,eAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnFlowDryRunResult.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnFlowDryRunResult.vue?vue&type=template&id=33ff3b8c&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<section v-if=\"card\"\n\t\tclass=\"cn-flow-dry-run cn-flow-dry-run--card\"\n\t\t:aria-label=\"title\"\n\t\tdata-testid=\"flow-dry-run-card\">\n\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t{{ t('nextcloud-vue', 'Test: a trial run without carrying anything out') }}\n\t\t</h3>\n\t\t<p class=\"cn-flow-dry-run__intro\" data-testid=\"flow-dry-run-note\">\n\t\t\t<InformationOutline :size=\"18\" />\n\t\t\t<span>{{ t('nextcloud-vue', 'Nothing was sent or changed; the saved flow was worked through, not the canvas.') }}</span>\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<table class=\"cn-flow-dry-run__table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ subjectHead }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Step') }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th scope=\"col\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Would do') }}\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr v-for=\"(step, index) in steps\"\n\t\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\t\tdata-testid=\"flow-dry-run-row\">\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<strong v-if=\"index === 0\">{{ subjectName }}</strong>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>{{ step.label || step.type || step.nodeId }}</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<CnStatusBadge :label=\"outcomeOf(step).label\" :variant=\"outcomeOf(step).variant\" size=\"small\" />\n\t\t\t\t\t\t{{ wouldDo(step) }}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<div class=\"cn-flow-dry-run__foot\">\n\t\t\t<span class=\"cn-flow-dry-run__count\">{{ n('nextcloud-vue', '%n step', '%n steps', steps.length) }}</span>\n\t\t\t<NcButton data-testid=\"flow-dry-run-again\" @click=\"$emit('again')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Autorenew :size=\"18\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Test again') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton variant=\"primary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t</section>\n\t<section v-else\n\t\tclass=\"cn-flow-dry-run\"\n\t\t:aria-label=\"title\"\n\t\tdata-testid=\"flow-dry-run-result\">\n\t\t<div class=\"cn-flow-dry-run__head\">\n\t\t\t<h3 class=\"cn-flow-dry-run__title\">\n\t\t\t\t{{ title }}\n\t\t\t</h3>\n\t\t\t<NcButton variant=\"tertiary\" data-testid=\"flow-dry-run-close\" @click=\"$emit('close')\">\n\t\t\t\t{{ t('nextcloud-vue', 'Close') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<p class=\"cn-flow-dry-run__note\" data-testid=\"flow-dry-run-note\">\n\t\t\t{{ t('nextcloud-vue', 'Nothing was changed or sent.') }}\n\t\t</p>\n\t\t<p v-if=\"result.error\"\n\t\t\tclass=\"cn-flow-dry-run__error\"\n\t\t\trole=\"alert\"\n\t\t\tdata-testid=\"flow-dry-run-error\">\n\t\t\t{{ result.error }}\n\t\t</p>\n\t\t<ol class=\"cn-flow-dry-run__steps\">\n\t\t\t<li v-for=\"(step, index) in steps\"\n\t\t\t\t:key=\"`${index}-${step.nodeId}`\"\n\t\t\t\tclass=\"cn-flow-dry-run__step\"\n\t\t\t\tdata-testid=\"flow-dry-run-step\">\n\t\t\t\t<span class=\"cn-flow-dry-run__step-name\">{{ step.label || step.type || step.nodeId }}</span>\n\t\t\t\t<span v-if=\"summaryOf(step)\" class=\"cn-flow-dry-run__summary\">{{ summaryOf(step) }}</span>\n\t\t\t\t<ul v-if=\"changesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"change in changesOf(step)\" :key=\"change.field\" data-testid=\"flow-dry-run-change\">\n\t\t\t\t\t\t{{ change.field }}: {{ valueText(change.value) }}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul v-if=\"messagesOf(step).length > 0\" class=\"cn-flow-dry-run__list\">\n\t\t\t\t\t<li v-for=\"(message, m) in messagesOf(step)\" :key=\"m\" data-testid=\"flow-dry-run-message\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }) }}<template v-if=\"message.subject\">\n\t\t\t\t\t\t\t· {{ message.subject }}\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</ol>\n\t</section>\n</template>\n\n<script>\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport Autorenew from 'vue-material-design-icons/Autorenew.vue'\nimport InformationOutline from 'vue-material-design-icons/InformationOutline.vue'\nimport { CnStatusBadge } from '../CnStatusBadge/index.js'\n\n/**\n * CnFlowDryRunResult — what trying a flow with a record showed: every step\n * the flow reached, in order, what it did (a step without side effects) or\n * would do (any other step), the fields it would change and the messages it\n * would send. Drawn beside the canvas by CnFlowBoard (DqFlow \"Testen met een\n * zaak\"). Nothing was changed or sent, and the panel says so. With `card` it\n * is the test run card of board OrFlowTestrunKaart: the same answer as a table.\n *\n * @spec openspec/changes/flow-test-with-a-record/specs/flow-test-with-a-record/spec.md#requirement-the-result-shows-each-step-beside-the-canvas\n */\nexport default {\n\tname: 'CnFlowDryRunResult',\n\n\tcomponents: { Autorenew, CnStatusBadge, InformationOutline, NcButton },\n\n\tprops: {\n\t\t/**\n\t\t * OpenRegister's dry-run answer: `{ status, error?, steps: [{ nodeId,\n\t\t * type, label, status, preview: { performed, summary?, changes?,\n\t\t * messages? } }] }`.\n\t\t */\n\t\tresult: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Draw the test run card, a table with Test again. */\n\t\tcard: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close', 'again'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The steps reached, in order. */\n\t\tsteps() {\n\t\t\treturn Array.isArray(this.result.steps) ? this.result.steps : []\n\t\t},\n\n\t\t/** @return {string} The panel's heading. */\n\t\ttitle() {\n\t\t\treturn t('nextcloud-vue', 'Test result')\n\t\t},\n\n\t\t/** @return {boolean} Whether the flow was tried on an example payload. */\n\t\tonPayload() {\n\t\t\treturn this.result.subject?.payload !== undefined\n\t\t},\n\n\t\t/** @return {string} The head of the first column. */\n\t\tsubjectHead() {\n\t\t\treturn this.onPayload ? t('nextcloud-vue', 'Example') : t('nextcloud-vue', 'Record')\n\t\t},\n\n\t\t/** @return {string} What the flow was tried on. */\n\t\tsubjectName() {\n\t\t\treturn this.onPayload ? t('nextcloud-vue', 'Example payload') : (this.result.subject?.label || this.result.subject?.uuid || '')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tn,\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {{label: string, variant: string}} How the step came out.\n\t\t */\n\t\toutcomeOf(step) {\n\t\t\tif (step.status === 'failed') {\n\t\t\t\treturn { label: t('nextcloud-vue', 'Would fail'), variant: 'error' }\n\t\t\t}\n\t\t\tif (step.status === 'skipped') {\n\t\t\t\treturn { label: t('nextcloud-vue', 'Skipped'), variant: 'default' }\n\t\t\t}\n\n\t\t\treturn { label: t('nextcloud-vue', 'Would succeed'), variant: 'success' }\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it would do, with the fields and messages it names.\n\t\t */\n\t\twouldDo(step) {\n\t\t\tconst fields = this.changesOf(step).map((change) => `${change.field}: ${this.valueText(change.value)}`)\n\t\t\tconst messages = this.messagesOf(step).map((message) => t('nextcloud-vue', 'To {recipients}', { recipients: (message.to || []).join(', ') }))\n\n\t\t\treturn [this.summaryOf(step), ...fields, ...messages].filter(Boolean).join(' · ')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {string} What it did or would do.\n\t\t */\n\t\tsummaryOf(step) {\n\t\t\treturn (step.preview && step.preview.summary) || ''\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<{field: string, value: unknown}>} The fields it would change.\n\t\t */\n\t\tchangesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.changes) ? step.preview.changes : []\n\t\t},\n\n\t\t/**\n\t\t * @param {object} step A step.\n\t\t * @return {Array<object>} The messages it would send.\n\t\t */\n\t\tmessagesOf(step) {\n\t\t\treturn step.preview && Array.isArray(step.preview.messages) ? step.preview.messages : []\n\t\t},\n\n\t\t/**\n\t\t * @param {unknown} value A field value.\n\t\t * @return {string} It as text.\n\t\t */\n\t\tvalueText(value) {\n\t\t\treturn value !== null && typeof value === 'object' ? JSON.stringify(value) : String(value ?? '')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-dry-run {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run--card {\n\tgap: 12px;\n}\n\n.cn-flow-dry-run__intro {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: 8px;\n\tmargin: 0;\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__table {\n\tinline-size: 100%;\n\tborder-collapse: collapse;\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__table th {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 600;\n\ttext-align: start;\n}\n\n.cn-flow-dry-run__table th,\n.cn-flow-dry-run__table td {\n\tpadding: 6px 8px 6px 0;\n\tborder-block-end: 1px solid var(--color-border);\n\tvertical-align: top;\n}\n\n.cn-flow-dry-run__foot {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__count {\n\tflex: 1 1 auto;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-flow-dry-run__title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.cn-flow-dry-run__note {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-flow-dry-run__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tmargin: 0;\n\tpadding-inline-start: 20px;\n}\n\n.cn-flow-dry-run__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-flow-dry-run__step-name {\n\tfont-weight: 600;\n}\n\n.cn-flow-dry-run__summary,\n.cn-flow-dry-run__list {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-flow-dry-run__list {\n\tmargin: 0;\n\tpadding-inline-start: 16px;\n}\n</style>\n"],"names":["_createElementBlock","_toDisplayString","_createVNode","_createElementVNode","_openBlock","_Fragment","_renderList","_createTextVNode"],"mappings":";;;AAeM,MAAA,UAAA,GAAA,EAAA,KAAI,EAAE,wBAAwB,GAAA;;AAG/B,EAAA,KAAK,EAAC,wBAAqB;AAAA,EAAA,aAAA,EAAA,mBAAA;;;;AAK7B,EAAA,OAAM,wBAAwB;AAC9B,EAAA,IAAI,EAAC,OAAC;AACL,EAAA,aAAG,EAAA,oBAAA;;AAGE,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,wBAAA,GAAA;AAGA,MAAA,UAAA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AAAD,kBAEG,CAAAK,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;8CAFH,KACD,GAAAJ,eAAA,CAAA,OAAA,CAAA,OAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import script from './CnFlowStepList.vue2.js';
2
+ import { render } from './CnFlowStepList.vue3.js';
3
+
4
+ script.render = render;
5
+ script.__scopeId = "data-v-57dc09e7";
6
+ const __sfc_main = script;
7
+
8
+ export { __sfc_main as default };
9
+ //# sourceMappingURL=CnFlowStepList.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CnFlowStepList.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,123 @@
1
+ import { translate } from '@nextcloud/l10n';
2
+ import { NcButton } from '@nextcloud/vue';
3
+ import ArrowRight from 'vue-material-design-icons/ArrowRight.vue';
4
+ import CallSplit from 'vue-material-design-icons/CallSplit.vue';
5
+ import ChevronDown from 'vue-material-design-icons/ChevronDown.vue';
6
+ import ChevronUp from 'vue-material-design-icons/ChevronUp.vue';
7
+ import Delete from 'vue-material-design-icons/Delete.vue';
8
+ import LightningBolt from 'vue-material-design-icons/LightningBolt.vue';
9
+ import Pencil from 'vue-material-design-icons/Pencil.vue';
10
+ import Plus from 'vue-material-design-icons/Plus.vue';
11
+ import { useFlowStore } from '../../composables/useFlowStore.js';
12
+ import { flowStepRows } from '../../utils/flowStepList.js';
13
+ import __sfc_main from '../CnStatusBadge/CnStatusBadge.vue.js';
14
+
15
+ let uidCounter = 0;
16
+
17
+ /**
18
+ * The list view of a flow. CnFlowDetail renders it in place of the canvas when
19
+ * its `view` is `list`, so the toolbar, messages and dialogs stay the same.
20
+ */
21
+ var script = {
22
+ name: 'CnFlowStepList',
23
+
24
+ components: { ArrowRight, CallSplit, ChevronDown, ChevronUp, CnStatusBadge: __sfc_main, Delete, LightningBolt, NcButton, Pencil, Plus },
25
+
26
+ props: {
27
+ /**
28
+ * A step's outcome in the open run, `(id) => { label, variant } | null`.
29
+ */
30
+ stepState: {
31
+ type: Function,
32
+ default: () => null,
33
+ },
34
+
35
+ /** The ids of the steps the viewer can only read. */
36
+ readonlySteps: {
37
+ type: Array,
38
+ default: () => [],
39
+ },
40
+ },
41
+
42
+ emits: ['add', 'edit'],
43
+
44
+ setup() {
45
+ return { store: useFlowStore() }
46
+ },
47
+
48
+ data() {
49
+ uidCounter += 1;
50
+
51
+ return { uid: `cn-flow-step-list-${uidCounter}` }
52
+ },
53
+
54
+ computed: {
55
+ /** @return {{triggers: Array<object>, steps: Array<object>}} The rows. */
56
+ list() {
57
+ return flowStepRows(this.store.stepGraph, this.titleOf)
58
+ },
59
+
60
+ /** @return {boolean} Whether the flow can be changed from here. */
61
+ editable() {
62
+ return !this.store.graphLocked && !this.store.inRunView
63
+ },
64
+ },
65
+
66
+ methods: {
67
+ t: translate,
68
+
69
+ /**
70
+ * @param {object} node A flow node.
71
+ * @return {string} The name it goes by.
72
+ */
73
+ titleOf(node) {
74
+ return node.name || node.label || this.kindOf(node)
75
+ },
76
+
77
+ /**
78
+ * @param {object} node A flow node.
79
+ * @return {string} What kind of step it is, from the catalogue.
80
+ */
81
+ kindOf(node) {
82
+ const entry = this.store.catalogEntry(node.type);
83
+
84
+ return entry?.displayName || node.type || node.id
85
+ },
86
+
87
+ /**
88
+ * @param {object} row A list row.
89
+ * @return {boolean} Whether it is the selected step.
90
+ */
91
+ isSelected(row) {
92
+ return this.store.selectedNodeId === row.id
93
+ },
94
+
95
+ /**
96
+ * @param {object} row A list row.
97
+ * @return {boolean} Whether the viewer can only read this step.
98
+ */
99
+ isReadonly(row) {
100
+ return this.readonlySteps.includes(row.id)
101
+ },
102
+
103
+ /**
104
+ * @param {object} row A list row.
105
+ * @return {{label: string, variant: string}|null} Its outcome in the open run.
106
+ */
107
+ stateOf(row) {
108
+ return this.stepState(row.id)
109
+ },
110
+
111
+ /**
112
+ * @param {boolean} possible Whether the move can be made.
113
+ * @param {string} label The arrow's name.
114
+ * @return {string} The arrow's tooltip.
115
+ */
116
+ moveTitle(possible, label) {
117
+ return possible ? label : translate('nextcloud-vue', 'Steps on a branch are moved on the canvas.')
118
+ },
119
+ },
120
+ };
121
+
122
+ export { script as default };
123
+ //# sourceMappingURL=CnFlowStepList.vue2.js.map