@conduction/nextcloud-vue 2.56.0-beta.73 → 2.56.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
- package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
- package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
- package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
- package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
- package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
- package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
- package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
- package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
- package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
- package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
- package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
- package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
- package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/composables/indexSources.js +24 -4
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/composables/useFlowStore.js +75 -4
- package/dist/esm/composables/useFlowStore.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
- package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
- package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
- package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +52 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +51 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1203 -812
- package/dist/esm/utils/dialogWidths.js +6 -4
- package/dist/esm/utils/dialogWidths.js.map +1 -1
- package/dist/esm/utils/fieldPill.js +77 -0
- package/dist/esm/utils/fieldPill.js.map +1 -0
- package/dist/esm/utils/flowCondition.js +177 -0
- package/dist/esm/utils/flowCondition.js.map +1 -0
- package/dist/esm/utils/flowRunStatus.js +64 -1
- package/dist/esm/utils/flowRunStatus.js.map +1 -1
- package/dist/esm/utils/flowStepList.js +385 -0
- package/dist/esm/utils/flowStepList.js.map +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/searchRefusal.js +35 -1
- package/dist/esm/utils/searchRefusal.js.map +1 -1
- package/dist/esm/utils/widgetDispatch.js +1 -1
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +14837 -11411
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1203 -812
- package/l10n/en.json +52 -1
- package/l10n/nl.json +51 -1
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
- package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
- package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
- package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
- package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
- package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
- package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
- package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
- package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
- package/src/components/CnFlowDetail/index.js +2 -0
- package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
- package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
- package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
- package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
- package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
- package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
- package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
- package/src/components/CnStepper/CnStepper.vue +14 -5
- package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
- package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
- package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
- package/src/components/CnTaskFormWidget/index.js +23 -0
- package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/src/components/index.js +2 -1
- package/src/composables/indexSources.js +24 -4
- package/src/composables/useFlowStore.js +75 -4
- package/src/css/index-page.css +10 -0
- package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
- package/src/dialogs/CnFlowEditModal.vue +26 -6
- package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
- package/src/index.js +3 -0
- package/src/utils/dialogWidths.js +6 -4
- package/src/utils/fieldPill.js +73 -0
- package/src/utils/flowCondition.js +173 -0
- package/src/utils/flowRunStatus.js +63 -0
- package/src/utils/flowStepList.js +381 -0
- package/src/utils/libraryWidgetKeys.js +1 -0
- package/src/utils/searchRefusal.js +33 -0
- package/src/utils/widgetDispatch.js +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
SPDX-License-Identifier: EUPL-1.2
|
|
13
13
|
-->
|
|
14
14
|
<template>
|
|
15
|
-
<div class="cn-flow-board" :class="{ 'cn-flow-board--with-palette': showPalette, 'cn-flow-board--canvas': canvasLayout, 'cn-flow-board--run': store.inRunView }" data-testid="flow-board">
|
|
15
|
+
<div class="cn-flow-board" :class="{ 'cn-flow-board--with-palette': showPalette, 'cn-flow-board--canvas': canvasLayout, 'cn-flow-board--run': store.inRunView, 'cn-flow-board--list': inList, 'cn-flow-board--list-panel': inList && inspectorShown }" data-testid="flow-board">
|
|
16
16
|
<header class="cn-flow-board__header">
|
|
17
17
|
<div class="cn-flow-board__heading">
|
|
18
18
|
<h1 class="cn-flow-board__title" data-testid="flow-board-title">
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div v-if="!store.inRunView || canvasLayout" class="cn-flow-board__actions">
|
|
23
23
|
<template v-if="!store.inRunView">
|
|
24
|
-
<NcButton v-if="
|
|
24
|
+
<NcButton v-if="testReady"
|
|
25
25
|
:disabled="store.dryRunning || !store.flow.id"
|
|
26
26
|
data-testid="flow-board-test"
|
|
27
27
|
@click="testOpen = true">
|
|
@@ -116,20 +116,30 @@
|
|
|
116
116
|
data-testid="flow-board-test-dialog"
|
|
117
117
|
@closing="testOpen = false">
|
|
118
118
|
<p class="cn-flow-board__test-intro">
|
|
119
|
-
{{
|
|
119
|
+
{{ testIntro }}
|
|
120
120
|
</p>
|
|
121
|
-
<CnResourceSelect v-
|
|
121
|
+
<CnResourceSelect v-if="testSubjectReady"
|
|
122
|
+
v-model="testRecord"
|
|
122
123
|
:register="testSubject.register"
|
|
123
124
|
:schema="testSubject.schema"
|
|
124
125
|
:labelField="testSubject.labelField || 'title'"
|
|
125
126
|
:inputLabel="t('nextcloud-vue', 'Record')"
|
|
126
127
|
data-testid="flow-board-test-record" />
|
|
128
|
+
<NcTextArea v-if="payloadTest"
|
|
129
|
+
:modelValue="payloadText"
|
|
130
|
+
:label="t('nextcloud-vue', 'Example payload')"
|
|
131
|
+
:error="payloadInvalid"
|
|
132
|
+
:helperText="payloadInvalid ? t('nextcloud-vue', 'This is not a JSON object.') : ''"
|
|
133
|
+
resize="vertical"
|
|
134
|
+
rows="6"
|
|
135
|
+
data-testid="flow-board-test-payload"
|
|
136
|
+
@update:modelValue="payloadText = $event" />
|
|
127
137
|
<template #actions>
|
|
128
138
|
<NcButton data-testid="flow-board-test-cancel" @click="testOpen = false">
|
|
129
139
|
{{ t('nextcloud-vue', 'Cancel') }}
|
|
130
140
|
</NcButton>
|
|
131
141
|
<NcButton variant="primary"
|
|
132
|
-
:disabled="!
|
|
142
|
+
:disabled="!testCanRun || store.dryRunning"
|
|
133
143
|
data-testid="flow-board-test-run"
|
|
134
144
|
@click="runTest">
|
|
135
145
|
{{ t('nextcloud-vue', 'Run test') }}
|
|
@@ -167,9 +177,20 @@
|
|
|
167
177
|
<span v-if="metaText" class="cn-flow-board__meta"> · {{ metaText }}</span>
|
|
168
178
|
</p>
|
|
169
179
|
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
180
|
+
<CnFlowViewSwitch v-if="listMode"
|
|
181
|
+
v-model="activeView"
|
|
182
|
+
class="cn-flow-board__views"
|
|
183
|
+
note />
|
|
184
|
+
|
|
185
|
+
<!-- @slot notice A notice under the path, such as a drift warning. Replaces the `notice` prop's card. -->
|
|
186
|
+
<slot name="notice">
|
|
187
|
+
<NcNoteCard v-if="notice && !store.inRunView"
|
|
188
|
+
:type="noticeLevel"
|
|
189
|
+
class="cn-flow-board__notice"
|
|
190
|
+
data-testid="flow-board-notice">
|
|
191
|
+
{{ noticeText }}
|
|
192
|
+
</NcNoteCard>
|
|
193
|
+
</slot>
|
|
173
194
|
|
|
174
195
|
<div class="cn-flow-board__body">
|
|
175
196
|
<aside v-if="showPalette"
|
|
@@ -208,7 +229,7 @@
|
|
|
208
229
|
</aside>
|
|
209
230
|
<CnFlowStepPickerModal v-if="stepPickerOpen" @close="stepPickerOpen = false" />
|
|
210
231
|
|
|
211
|
-
<section class="cn-flow-board__card cn-flow-board__canvas" :aria-label="t('nextcloud-vue', 'Flow canvas')">
|
|
232
|
+
<section class="cn-flow-board__card cn-flow-board__canvas" :aria-label="inList ? t('nextcloud-vue', 'Flow steps') : t('nextcloud-vue', 'Flow canvas')">
|
|
212
233
|
<CnFlowDetail :id="id"
|
|
213
234
|
:app="app"
|
|
214
235
|
:run="run"
|
|
@@ -218,6 +239,10 @@
|
|
|
218
239
|
:nodeBadge="nodeLook === 'card' ? nodeBadge : null"
|
|
219
240
|
:toolbarActions="false"
|
|
220
241
|
:addStep="!showPalette"
|
|
242
|
+
:edgeConditions="edgeConditions"
|
|
243
|
+
:view="activeView"
|
|
244
|
+
:readonlySteps="readonlyStepIds"
|
|
245
|
+
stepPanel
|
|
221
246
|
quietRun
|
|
222
247
|
@save="$emit('save')"
|
|
223
248
|
@run="onRun">
|
|
@@ -306,6 +331,8 @@
|
|
|
306
331
|
</NcButton>
|
|
307
332
|
<CnFlowDryRunResult v-if="store.dryRunResult && !store.inRunView"
|
|
308
333
|
:result="store.dryRunResult"
|
|
334
|
+
:card="payloadTest"
|
|
335
|
+
@again="testAgain"
|
|
309
336
|
@close="store.clearDryRun()" />
|
|
310
337
|
<template v-else-if="store.inRunView">
|
|
311
338
|
<CnFlowRunSummary v-if="!canvasLayout"
|
|
@@ -382,10 +409,16 @@
|
|
|
382
409
|
</template>
|
|
383
410
|
</NcButton>
|
|
384
411
|
</div>
|
|
412
|
+
<!-- @slot step-notice A notice on the selected step, `{ node }`. Replaces the admin only note. -->
|
|
413
|
+
<slot name="step-notice" :node="store.selectedNode">
|
|
414
|
+
<NcNoteCard v-if="selectedAdminStep" type="warning" data-testid="flow-board-admin-step">
|
|
415
|
+
{{ t('nextcloud-vue', 'Only admins may use this action. You can read this step, but not change or save it; ask an admin.') }}
|
|
416
|
+
</NcNoteCard>
|
|
417
|
+
</slot>
|
|
385
418
|
<NcTextField v-if="canvasLayout"
|
|
386
419
|
:modelValue="nameDraft === null ? stepName : nameDraft"
|
|
387
420
|
:label="t('nextcloud-vue', 'Step name')"
|
|
388
|
-
:disabled="
|
|
421
|
+
:disabled="stepLocked"
|
|
389
422
|
data-testid="flow-board-step-name-field"
|
|
390
423
|
@update:modelValue="nameDraft = $event"
|
|
391
424
|
@blur="commitStepName"
|
|
@@ -412,13 +445,13 @@
|
|
|
412
445
|
<NcCheckboxRadioSwitch v-if="canvasLayout && field.widget === 'switch' && field.description"
|
|
413
446
|
type="switch"
|
|
414
447
|
:modelValue="field.value === true"
|
|
415
|
-
:disabled="
|
|
448
|
+
:disabled="stepLocked"
|
|
416
449
|
:aria-labelledby="`${toggleLabelId}-${field.key}`"
|
|
417
450
|
@update:modelValue="setStepField(field, $event)" />
|
|
418
451
|
<NcCheckboxRadioSwitch v-else-if="field.widget === 'switch'"
|
|
419
452
|
type="switch"
|
|
420
453
|
:modelValue="field.value === true"
|
|
421
|
-
:disabled="
|
|
454
|
+
:disabled="stepLocked"
|
|
422
455
|
@update:modelValue="setStepField(field, $event)">
|
|
423
456
|
{{ field.label }}
|
|
424
457
|
</NcCheckboxRadioSwitch>
|
|
@@ -427,20 +460,20 @@
|
|
|
427
460
|
:options="field.options"
|
|
428
461
|
:inputLabel="field.label"
|
|
429
462
|
:clearable="false"
|
|
430
|
-
:disabled="
|
|
463
|
+
:disabled="stepLocked"
|
|
431
464
|
label="label"
|
|
432
465
|
@update:modelValue="setStepField(field, $event ? $event.id : '')" />
|
|
433
466
|
<NcTextArea v-else-if="field.widget === 'textarea'"
|
|
434
467
|
:modelValue="fieldDraft(field)"
|
|
435
468
|
:label="field.label"
|
|
436
|
-
:disabled="
|
|
469
|
+
:disabled="stepLocked"
|
|
437
470
|
resize="vertical"
|
|
438
471
|
@update:modelValue="drafts[field.key] = $event"
|
|
439
472
|
@blur="commitStepField(field)" />
|
|
440
473
|
<NcTextField v-else
|
|
441
474
|
:modelValue="fieldDraft(field)"
|
|
442
475
|
:label="field.label"
|
|
443
|
-
:disabled="
|
|
476
|
+
:disabled="stepLocked"
|
|
444
477
|
@update:modelValue="drafts[field.key] = $event"
|
|
445
478
|
@blur="commitStepField(field)"
|
|
446
479
|
@keydown.enter="commitStepField(field)" />
|
|
@@ -454,7 +487,9 @@
|
|
|
454
487
|
</div>
|
|
455
488
|
</dl>
|
|
456
489
|
<div class="cn-flow-board__step-actions">
|
|
457
|
-
<NcButton
|
|
490
|
+
<NcButton :disabled="selectedAdminStep"
|
|
491
|
+
data-testid="flow-board-edit-step"
|
|
492
|
+
@click="store.editingNodeId = store.selectedNodeId">
|
|
458
493
|
{{ t('nextcloud-vue', 'Edit step') }}
|
|
459
494
|
</NcButton>
|
|
460
495
|
<NcButton v-if="lastRunUuid && !canvasLayout"
|
|
@@ -490,7 +525,7 @@
|
|
|
490
525
|
<div class="cn-flow-board__step-footer">
|
|
491
526
|
<NcButton variant="tertiary"
|
|
492
527
|
:class="{ 'cn-flow-board__delete-step': canvasLayout }"
|
|
493
|
-
:disabled="
|
|
528
|
+
:disabled="stepLocked"
|
|
494
529
|
data-testid="flow-board-delete-step"
|
|
495
530
|
@click="store.removeNode(store.selectedNodeId)">
|
|
496
531
|
{{ t('nextcloud-vue', 'Delete step') }}
|
|
@@ -510,7 +545,7 @@
|
|
|
510
545
|
<CnFlowSidebar embedded />
|
|
511
546
|
</template>
|
|
512
547
|
<div v-else class="cn-flow-board__inspector-empty" data-testid="flow-board-inspector-empty">
|
|
513
|
-
<p>{{ t('nextcloud-vue', 'Select a step on the canvas to see its settings.') }}</p>
|
|
548
|
+
<p>{{ inList ? t('nextcloud-vue', 'Edit a step to see its settings.') : t('nextcloud-vue', 'Select a step on the canvas to see its settings.') }}</p>
|
|
514
549
|
<NcButton variant="secondary"
|
|
515
550
|
data-testid="flow-board-show-runs"
|
|
516
551
|
@click="showRuns = true">
|
|
@@ -523,6 +558,7 @@
|
|
|
523
558
|
</template>
|
|
524
559
|
|
|
525
560
|
<script>
|
|
561
|
+
import { getCurrentUser } from '@nextcloud/auth'
|
|
526
562
|
import { translate as t } from '@nextcloud/l10n'
|
|
527
563
|
import { NcActionButton, NcActions, NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue'
|
|
528
564
|
import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
|
|
@@ -544,6 +580,7 @@ import CnFlowDryRunResult from '../CnFlowDetail/CnFlowDryRunResult.vue'
|
|
|
544
580
|
import CnFlowRunSummary from '../CnFlowDetail/CnFlowRunSummary.vue'
|
|
545
581
|
import CnFlowSidebar from '../CnFlowDetail/CnFlowSidebar.vue'
|
|
546
582
|
import CnFlowStepLog from '../CnFlowDetail/CnFlowStepLog.vue'
|
|
583
|
+
import CnFlowViewSwitch from '../CnFlowDetail/CnFlowViewSwitch.vue'
|
|
547
584
|
import CnResourceSelect from '../CnResourceSelect/CnResourceSelect.vue'
|
|
548
585
|
import { FLOW_RUN_ACTIVE_STATUSES, useFlowStore } from '../../composables/useFlowStore.js'
|
|
549
586
|
import { formatRelativeDate } from '../../utils/boardDate.js'
|
|
@@ -562,7 +599,7 @@ import { CnStatusBadge } from '../CnStatusBadge/index.js'
|
|
|
562
599
|
export default {
|
|
563
600
|
name: 'CnFlowBoard',
|
|
564
601
|
|
|
565
|
-
components: { ArrowLeft, Autorenew, Check, CheckCircleOutline, ChevronDown, Close, DockRight, History, InformationOutline, Play, Replay, NcActionButton, NcActions, CnBuildiqEditButton, CnDialog, CnFlowDetail, CnFlowDryRunResult, CnResourceSelect, CnFlowRunSummary, CnFlowSidebar, CnFlowStepLog, CnFlowStepPickerModal, CnStatusBadge, NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField },
|
|
602
|
+
components: { ArrowLeft, Autorenew, Check, CheckCircleOutline, ChevronDown, Close, DockRight, History, InformationOutline, Play, Replay, NcActionButton, NcActions, CnBuildiqEditButton, CnDialog, CnFlowDetail, CnFlowDryRunResult, CnResourceSelect, CnFlowRunSummary, CnFlowSidebar, CnFlowStepLog, CnFlowStepPickerModal, CnFlowViewSwitch, CnStatusBadge, NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField },
|
|
566
603
|
|
|
567
604
|
props: {
|
|
568
605
|
/** The flow uuid, or `new`. */
|
|
@@ -600,6 +637,26 @@ export default {
|
|
|
600
637
|
flowDirection: { type: String, default: 'right' },
|
|
601
638
|
/** An info notice under the path. */
|
|
602
639
|
notice: { type: String, default: '' },
|
|
640
|
+
/** The look of `notice`: `info`, `warning` or `error`. */
|
|
641
|
+
noticeLevel: { type: String, default: 'info' },
|
|
642
|
+
/**
|
|
643
|
+
* Steps only an admin may change, by node id or step type. Anyone else
|
|
644
|
+
* reads them: the list view offers no buttons on them and the step
|
|
645
|
+
* panel says why. This is the screen's side; the server decides.
|
|
646
|
+
*/
|
|
647
|
+
adminSteps: { type: Array, default: () => [] },
|
|
648
|
+
/** Write a line's condition on the line when it has no name of its own. */
|
|
649
|
+
edgeConditions: { type: Boolean, default: false },
|
|
650
|
+
/** Offer the list view beside the canvas, with the Canvas / List switch. */
|
|
651
|
+
listMode: { type: Boolean, default: false },
|
|
652
|
+
/** The view on arrival when `listMode` is on: `canvas` or `list`. */
|
|
653
|
+
view: { type: String, default: 'canvas' },
|
|
654
|
+
/**
|
|
655
|
+
* Test the flow on an example payload (OrFlowTestrun): `true` opens an
|
|
656
|
+
* empty field, text opens it with that JSON. The result shows as the
|
|
657
|
+
* test run card. Without it only `testSubject` offers a test.
|
|
658
|
+
*/
|
|
659
|
+
testPayload: { type: [Boolean, String], default: false },
|
|
603
660
|
/**
|
|
604
661
|
* Edit a published flow in place; Save publishes the edits as the next
|
|
605
662
|
* version, and runs already started keep theirs (DqFlow).
|
|
@@ -655,7 +712,7 @@ export default {
|
|
|
655
712
|
},
|
|
656
713
|
|
|
657
714
|
data() {
|
|
658
|
-
return { nameDraft: null, legendTitleId: `cn-flow-board-legend-${Math.random().toString(36).slice(2)}`, panelOpen: false, runPanelClosed: false, runTab: 'step', testOpen: false, testRecord: null, appNames: {}, showRuns: false, stepPickerOpen: false, drafts: {}, loadedOptions: {}, toggleLabelId: `cn-flow-board-toggle-${Math.random().toString(36).slice(2)}` }
|
|
715
|
+
return { payloadText: typeof this.testPayload === 'string' ? this.testPayload : '', activeView: this.listMode && this.view === 'list' ? 'list' : 'canvas', nameDraft: null, legendTitleId: `cn-flow-board-legend-${Math.random().toString(36).slice(2)}`, panelOpen: false, runPanelClosed: false, runTab: 'step', testOpen: false, testRecord: null, appNames: {}, showRuns: false, stepPickerOpen: false, drafts: {}, loadedOptions: {}, toggleLabelId: `cn-flow-board-toggle-${Math.random().toString(36).slice(2)}` }
|
|
659
716
|
},
|
|
660
717
|
|
|
661
718
|
computed: {
|
|
@@ -722,14 +779,77 @@ export default {
|
|
|
722
779
|
return Boolean(this.testSubject && this.testSubject.register && this.testSubject.schema)
|
|
723
780
|
},
|
|
724
781
|
|
|
782
|
+
/** @return {boolean} Whether the page tests on an example payload. */
|
|
783
|
+
payloadTest() {
|
|
784
|
+
return this.testPayload !== false
|
|
785
|
+
},
|
|
786
|
+
|
|
787
|
+
/** @return {boolean} Whether the test button is drawn. */
|
|
788
|
+
testReady() {
|
|
789
|
+
return this.testSubjectReady || this.payloadTest
|
|
790
|
+
},
|
|
791
|
+
|
|
792
|
+
/** @return {object|null} The example payload as data, null when the field holds no JSON object. */
|
|
793
|
+
payloadValue() {
|
|
794
|
+
try {
|
|
795
|
+
const value = JSON.parse(this.payloadText)
|
|
796
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value) ? value : null
|
|
797
|
+
} catch {
|
|
798
|
+
return null
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
|
|
802
|
+
/** @return {boolean} Whether the field holds text that is no JSON object. */
|
|
803
|
+
payloadInvalid() {
|
|
804
|
+
return this.payloadText.trim() !== '' && this.payloadValue === null
|
|
805
|
+
},
|
|
806
|
+
|
|
807
|
+
/** @return {boolean} Whether the dialog has something to try the flow on. */
|
|
808
|
+
testCanRun() {
|
|
809
|
+
return Boolean(this.testRecord) || this.payloadValue !== null
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
/** @return {string} The line at the top of the test dialog. */
|
|
813
|
+
testIntro() {
|
|
814
|
+
return this.testSubjectReady
|
|
815
|
+
? t('nextcloud-vue', 'The saved flow is tried with the record you pick. Nothing is changed or sent.')
|
|
816
|
+
: t('nextcloud-vue', 'The saved flow is tried with the example you enter. Nothing is changed or sent.')
|
|
817
|
+
},
|
|
818
|
+
|
|
725
819
|
/** @return {string} The test button's label: the page's own, else the library's. */
|
|
726
820
|
testLabel() {
|
|
727
|
-
|
|
821
|
+
const fallback = this.testSubjectReady ? t('nextcloud-vue', 'Test with a record') : t('nextcloud-vue', 'Test')
|
|
822
|
+
|
|
823
|
+
return (this.testSubject && this.testSubject.label) || fallback
|
|
728
824
|
},
|
|
729
825
|
|
|
730
826
|
/** @return {boolean} Whether the palette card is drawn. */
|
|
731
827
|
showPalette() {
|
|
732
|
-
return this.palette === 'column' && !this.store.inRunView
|
|
828
|
+
return this.palette === 'column' && !this.store.inRunView && !this.inList
|
|
829
|
+
},
|
|
830
|
+
|
|
831
|
+
/** @return {Array<string>} The ids of the steps this viewer can only read. */
|
|
832
|
+
readonlyStepIds() {
|
|
833
|
+
if (this.adminSteps.length === 0 || getCurrentUser()?.isAdmin === true) {
|
|
834
|
+
return []
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
return this.store.nodes.filter((node) => this.adminSteps.includes(node.id) || this.adminSteps.includes(node.type)).map((node) => node.id)
|
|
838
|
+
},
|
|
839
|
+
|
|
840
|
+
/** @return {boolean} Whether the selected step is one this viewer can only read. */
|
|
841
|
+
selectedAdminStep() {
|
|
842
|
+
return this.readonlyStepIds.includes(this.store.selectedNodeId)
|
|
843
|
+
},
|
|
844
|
+
|
|
845
|
+
/** @return {boolean} Whether the selected step cannot be changed here. */
|
|
846
|
+
stepLocked() {
|
|
847
|
+
return this.store.graphLocked || this.selectedAdminStep
|
|
848
|
+
},
|
|
849
|
+
|
|
850
|
+
/** @return {boolean} Whether the list view is on screen. */
|
|
851
|
+
inList() {
|
|
852
|
+
return this.activeView === 'list'
|
|
733
853
|
},
|
|
734
854
|
|
|
735
855
|
/** @return {string} The page title. */
|
|
@@ -1406,15 +1526,38 @@ export default {
|
|
|
1406
1526
|
* @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
|
|
1407
1527
|
*/
|
|
1408
1528
|
async runTest() {
|
|
1409
|
-
const
|
|
1410
|
-
if (
|
|
1529
|
+
const subject = this.testRunSubject()
|
|
1530
|
+
if (subject === null) {
|
|
1411
1531
|
return
|
|
1412
1532
|
}
|
|
1413
|
-
await this.store.dryRun(
|
|
1533
|
+
await this.store.dryRun(subject)
|
|
1414
1534
|
this.testOpen = false
|
|
1415
1535
|
this.testRecord = null
|
|
1416
1536
|
},
|
|
1417
1537
|
|
|
1538
|
+
/**
|
|
1539
|
+
* What the dialog tries the flow on: the picked record, else the payload.
|
|
1540
|
+
*
|
|
1541
|
+
* @return {object|null} The subject for `store.dryRun`, or null.
|
|
1542
|
+
*/
|
|
1543
|
+
testRunSubject() {
|
|
1544
|
+
const uuid = Array.isArray(this.testRecord) ? this.testRecord[0] : this.testRecord
|
|
1545
|
+
if (uuid) {
|
|
1546
|
+
return { uuid, register: this.testSubject.register, schema: this.testSubject.schema }
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
return this.payloadValue === null ? null : { payload: this.payloadValue }
|
|
1550
|
+
},
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* Try the flow again on what the last test used.
|
|
1554
|
+
*
|
|
1555
|
+
* @return {Promise<void>}
|
|
1556
|
+
*/
|
|
1557
|
+
async testAgain() {
|
|
1558
|
+
await this.store.dryRun(this.store.dryRunResult.subject)
|
|
1559
|
+
},
|
|
1560
|
+
|
|
1418
1561
|
t,
|
|
1419
1562
|
|
|
1420
1563
|
/**
|
|
@@ -1686,6 +1829,14 @@ export default {
|
|
|
1686
1829
|
background-size: 16px 16px;
|
|
1687
1830
|
}
|
|
1688
1831
|
|
|
1832
|
+
.cn-flow-board--list .cn-flow-board__canvas {
|
|
1833
|
+
background-image: none;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
.cn-flow-board__views {
|
|
1837
|
+
margin-block-end: 12px;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1689
1840
|
.cn-flow-board__palette {
|
|
1690
1841
|
gap: 14px;
|
|
1691
1842
|
padding: 14px;
|
|
@@ -2090,6 +2241,12 @@ export default {
|
|
|
2090
2241
|
box-shadow: 0 4px 16px rgba(27, 28, 29, 0.12);
|
|
2091
2242
|
}
|
|
2092
2243
|
|
|
2244
|
+
/* The floating inspector must not cover the rows of the list. */
|
|
2245
|
+
.cn-flow-board--canvas.cn-flow-board--list-panel .cn-flow-board__canvas {
|
|
2246
|
+
inline-size: auto;
|
|
2247
|
+
inset-inline-end: 358px;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2093
2250
|
.cn-flow-board__inspector-close {
|
|
2094
2251
|
align-self: flex-end;
|
|
2095
2252
|
margin: -8px -8px -4px 0;
|
|
@@ -15,25 +15,47 @@
|
|
|
15
15
|
:layout="layout"
|
|
16
16
|
:toggleLabel="toggleLabel"
|
|
17
17
|
:nodeLook="nodeLook"
|
|
18
|
+
:edgeConditions="edgeConditions"
|
|
19
|
+
:listMode="listMode"
|
|
20
|
+
:view="arrivalView"
|
|
18
21
|
:notice="notice ? cnTranslate(notice) : ''"
|
|
22
|
+
:noticeLevel="noticeLevel"
|
|
23
|
+
:adminSteps="adminSteps"
|
|
19
24
|
:saveAsVersion="saveAsVersion"
|
|
20
25
|
:metaParts="metaParts"
|
|
21
26
|
:metaNote="metaNote ? cnTranslate(metaNote) : ''"
|
|
22
27
|
:pill="pill ? cnTranslate(pill) : ''"
|
|
23
28
|
:pillVariant="pillVariant"
|
|
24
29
|
:testSubject="testSubject ? { ...testSubject, label: testSubject.label ? cnTranslate(testSubject.label) : '' } : null"
|
|
30
|
+
:testPayload="testPayload"
|
|
25
31
|
@save="onSave"
|
|
26
|
-
@run="onRun"
|
|
32
|
+
@run="onRun">
|
|
33
|
+
<template v-if="$slots.notice" #notice>
|
|
34
|
+
<!-- @slot notice A notice under the path, such as a drift warning (board look). -->
|
|
35
|
+
<slot name="notice" />
|
|
36
|
+
</template>
|
|
37
|
+
<template v-if="$slots['step-notice']" #step-notice="scope">
|
|
38
|
+
<!-- @slot step-notice A notice on the selected step, `{ node }` (board look). -->
|
|
39
|
+
<slot name="step-notice" v-bind="scope" />
|
|
40
|
+
</template>
|
|
41
|
+
</CnFlowBoard>
|
|
27
42
|
<CnFlowDetail v-else
|
|
28
43
|
:id="flowId"
|
|
29
44
|
:app="app"
|
|
30
45
|
:run="runUuid"
|
|
46
|
+
:edgeConditions="edgeConditions"
|
|
47
|
+
:view="activeView"
|
|
31
48
|
@save="onSave"
|
|
32
|
-
@run="onRun"
|
|
49
|
+
@run="onRun">
|
|
50
|
+
<template v-if="listMode" #toolbar-start>
|
|
51
|
+
<CnFlowViewSwitch v-model="activeView" />
|
|
52
|
+
</template>
|
|
53
|
+
</CnFlowDetail>
|
|
33
54
|
</template>
|
|
34
55
|
|
|
35
56
|
<script>
|
|
36
57
|
import CnFlowDetail from '../CnFlowDetail/CnFlowDetail.vue'
|
|
58
|
+
import CnFlowViewSwitch from '../CnFlowDetail/CnFlowViewSwitch.vue'
|
|
37
59
|
import CnFlowBoard from './CnFlowBoard.vue'
|
|
38
60
|
import { useFlowStore } from '../../composables/useFlowStore.js'
|
|
39
61
|
import { useLook } from '../../composables/useLook.js'
|
|
@@ -58,7 +80,7 @@ import { useLook } from '../../composables/useLook.js'
|
|
|
58
80
|
export default {
|
|
59
81
|
name: 'CnFlowEditorPage',
|
|
60
82
|
|
|
61
|
-
components: { CnFlowBoard, CnFlowDetail },
|
|
83
|
+
components: { CnFlowBoard, CnFlowDetail, CnFlowViewSwitch },
|
|
62
84
|
|
|
63
85
|
inject: {
|
|
64
86
|
cnTranslate: { default: () => (key) => key },
|
|
@@ -174,6 +196,16 @@ export default {
|
|
|
174
196
|
default: null,
|
|
175
197
|
},
|
|
176
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Board look: test the flow on an example payload. `true` opens an
|
|
201
|
+
* empty field, text opens it with that JSON. Manifest key
|
|
202
|
+
* `config.testPayload`.
|
|
203
|
+
*/
|
|
204
|
+
testPayload: {
|
|
205
|
+
type: [Boolean, String],
|
|
206
|
+
default: false,
|
|
207
|
+
},
|
|
208
|
+
|
|
177
209
|
/**
|
|
178
210
|
* Board look: an info notice under the path. Manifest key
|
|
179
211
|
* `config.notice`, translated with the app's catalogue; `{name}` is
|
|
@@ -184,6 +216,25 @@ export default {
|
|
|
184
216
|
default: '',
|
|
185
217
|
},
|
|
186
218
|
|
|
219
|
+
/**
|
|
220
|
+
* Board look: the look of `notice`, `info`, `warning` or `error`.
|
|
221
|
+
* Manifest key `config.noticeLevel`.
|
|
222
|
+
*/
|
|
223
|
+
noticeLevel: {
|
|
224
|
+
type: String,
|
|
225
|
+
default: 'info',
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Board look: steps only an admin may change, by node id or step type.
|
|
230
|
+
* Anyone else reads them. The server decides what is saved; this is
|
|
231
|
+
* the screen's side. Manifest key `config.adminSteps`.
|
|
232
|
+
*/
|
|
233
|
+
adminSteps: {
|
|
234
|
+
type: Array,
|
|
235
|
+
default: () => [],
|
|
236
|
+
},
|
|
237
|
+
|
|
187
238
|
/**
|
|
188
239
|
* Board look: edit a published flow in place; Save publishes the edits
|
|
189
240
|
* as the next version and runs already started keep theirs. Manifest
|
|
@@ -273,6 +324,36 @@ export default {
|
|
|
273
324
|
type: String,
|
|
274
325
|
default: 'state',
|
|
275
326
|
},
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Write a line's condition on the line when it has no name of its
|
|
330
|
+
* own ("amount is more than 1000"). Manifest key
|
|
331
|
+
* `config.edgeConditions`.
|
|
332
|
+
*/
|
|
333
|
+
edgeConditions: {
|
|
334
|
+
type: Boolean,
|
|
335
|
+
default: false,
|
|
336
|
+
},
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Offer the list view beside the canvas, with the Canvas / List switch:
|
|
340
|
+
* the trigger and the steps in order, editing the same flow. Manifest
|
|
341
|
+
* key `config.listMode`.
|
|
342
|
+
*/
|
|
343
|
+
listMode: {
|
|
344
|
+
type: Boolean,
|
|
345
|
+
default: false,
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The view on arrival when `listMode` is on: `canvas` or `list`.
|
|
350
|
+
* Defaults to the `view` query parameter, so a link can open the list.
|
|
351
|
+
* Manifest key `config.view`.
|
|
352
|
+
*/
|
|
353
|
+
view: {
|
|
354
|
+
type: String,
|
|
355
|
+
default: '',
|
|
356
|
+
},
|
|
276
357
|
},
|
|
277
358
|
|
|
278
359
|
/**
|
|
@@ -287,7 +368,20 @@ export default {
|
|
|
287
368
|
return { store: useFlowStore(), isBoard }
|
|
288
369
|
},
|
|
289
370
|
|
|
371
|
+
data() {
|
|
372
|
+
return { activeView: 'canvas' }
|
|
373
|
+
},
|
|
374
|
+
|
|
290
375
|
computed: {
|
|
376
|
+
/**
|
|
377
|
+
* @return {string} The view asked for on arrival.
|
|
378
|
+
*/
|
|
379
|
+
arrivalView() {
|
|
380
|
+
const asked = this.view || this.$route?.query?.view
|
|
381
|
+
|
|
382
|
+
return this.listMode && asked === 'list' ? 'list' : 'canvas'
|
|
383
|
+
},
|
|
384
|
+
|
|
291
385
|
/**
|
|
292
386
|
* @return {string} The flow id being edited.
|
|
293
387
|
*/
|
|
@@ -316,6 +410,10 @@ export default {
|
|
|
316
410
|
},
|
|
317
411
|
},
|
|
318
412
|
|
|
413
|
+
created() {
|
|
414
|
+
this.activeView = this.arrivalView
|
|
415
|
+
},
|
|
416
|
+
|
|
319
417
|
methods: {
|
|
320
418
|
/**
|
|
321
419
|
* @return {Promise<void>}
|