@conduction/nextcloud-vue 2.178.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.
- 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/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/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/CnIndexPage/CnIndexPage.vue2.js +90 -75
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +46 -22
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.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 +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +40 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +39 -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 +566 -337
- package/dist/esm/utils/dialogWidths.js +6 -4
- package/dist/esm/utils/dialogWidths.js.map +1 -1
- 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/nextcloud-vue.cjs.js +12543 -10668
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +566 -337
- package/l10n/en.json +40 -1
- package/l10n/nl.json +39 -1
- package/package.json +1 -1
- package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
- package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
- 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/CnIndexPage/CnIndexPage.vue +29 -0
- package/src/components/index.js +1 -1
- package/src/composables/indexSources.js +24 -4
- package/src/composables/useFlowStore.js +75 -4
- package/src/css/index-page.css +4 -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 +2 -0
- package/src/utils/dialogWidths.js +6 -4
- package/src/utils/flowCondition.js +173 -0
- package/src/utils/flowRunStatus.js +63 -0
- package/src/utils/flowStepList.js +381 -0
|
@@ -2,7 +2,7 @@ import script from './CnFlowEdgeEditModal.vue2.js';
|
|
|
2
2
|
import { render } from './CnFlowEdgeEditModal.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-be0e0eea";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -2,11 +2,13 @@ import { translate } from '@nextcloud/l10n';
|
|
|
2
2
|
import { NcButton, NcDialog, NcSelect, NcTextField } from '@nextcloud/vue';
|
|
3
3
|
import { EDGE_LINE_TYPES } from '../composables/useFlowEdgeStyles.js';
|
|
4
4
|
import { useFlowStore } from '../composables/useFlowStore.js';
|
|
5
|
+
import { flowEdgeConditionText, flowEdgeCondition } from '../utils/flowCondition.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* CnFlowEdgeEditModal β edit one connection between two steps.
|
|
8
9
|
*
|
|
9
10
|
* A line carries two authored things: what it is CALLED, and how it is DRAWN.
|
|
11
|
+
* When a condition decides it, the dialog says that condition in words.
|
|
10
12
|
* The label is the one that matters on a branching flow β an unlabelled arrow
|
|
11
13
|
* out of a routing step says nothing about which branch it is β and the router
|
|
12
14
|
* is the escape hatch for the one line an automatic layout puts through a node.
|
|
@@ -81,6 +83,21 @@ var script = {
|
|
|
81
83
|
to: this.nodeLabel(pair.target),
|
|
82
84
|
})
|
|
83
85
|
},
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @return {string} When this line is taken, in words, or '' when it is simply followed.
|
|
89
|
+
*/
|
|
90
|
+
conditionLine() {
|
|
91
|
+
const pair = this.store.editingEdge;
|
|
92
|
+
const found = pair ? this.store.locateEdge(pair) : null;
|
|
93
|
+
if (found === null) {
|
|
94
|
+
return ''
|
|
95
|
+
}
|
|
96
|
+
const source = this.store.nodes.find((node) => node.id === pair.source) || null;
|
|
97
|
+
const text = flowEdgeConditionText(found.edge, source);
|
|
98
|
+
|
|
99
|
+
return flowEdgeCondition(found.edge, source) === null ? text : translate('nextcloud-vue', 'Only if {condition}', { condition: text })
|
|
100
|
+
},
|
|
84
101
|
},
|
|
85
102
|
|
|
86
103
|
methods: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowEdgeEditModal.vue2.js","sources":["../../../src/dialogs/CnFlowEdgeEditModal.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog size=\"small\"\n\t\t:name=\"t('nextcloud-vue', 'Connection')\"\n\t\t@closing=\"cancel\">\n\t\t<div class=\"cn-flow-edge-edit\">\n\t\t\t<p class=\"cn-flow-edge-edit__endpoints\">\n\t\t\t\t{{ endpoints }}\n\t\t\t</p>\n\n\t\t\t<NcTextField :modelValue=\"draft.title\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Label')\"\n\t\t\t\t:helperText=\"t('nextcloud-vue', 'Shown on the line. A branch reads better named β βapprovedβ, βover budgetβ β than as an unlabelled arrow.')\"\n\t\t\t\t@update:modelValue=\"draft.title = $event\" />\n\n\t\t\t<NcSelect :modelValue=\"selectedStyle\"\n\t\t\t\t:options=\"styleOptions\"\n\t\t\t\tlabel=\"label\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Line style')\"\n\t\t\t\t:clearable=\"false\"\n\t\t\t\t@update:modelValue=\"onStylePicked\" />\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton variant=\"error\" @click=\"removeConnection\">\n\t\t\t\t{{ t('nextcloud-vue', 'Remove connection') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton @click=\"cancel\">\n\t\t\t\t{{ t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton variant=\"primary\" @click=\"done\">\n\t\t\t\t{{ t('nextcloud-vue', 'Done') }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { EDGE_LINE_TYPES } from '../composables/useFlowEdgeStyles.js'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * CnFlowEdgeEditModal β edit one connection between two steps.\n *\n * A line carries two authored things: what it is CALLED, and how it is DRAWN.\n * The label is the one that matters on a branching flow β an unlabelled arrow\n * out of a routing step says nothing about which branch it is β and the router\n * is the escape hatch for the one line an automatic layout puts through a node.\n *\n * β οΈ KEYED ON THE ENDPOINT PAIR, NOT ON AN ID. A stored edge may draw several\n * lines (`{from: 'a', to: ['b','c']}`), so a drawn line's id is synthesised per\n * render and means nothing to the document; `{source, target}` is the only\n * identity both halves share. Setting a field on a line of a multi-line record\n * splits it out first β see `useFlowStore.setEdgeFields`.\n *\n * Edits land on a DRAFT: Done commits, Cancel discards β the same contract\n * CnFlowNodeEditModal holds. Opened by setting `useFlowStore().editingEdge` to\n * `{source, target}`; hosted by CnFlowDetail so it exists wherever the canvas\n * does.\n */\nexport default {\n\tname: 'CnFlowEdgeEditModal',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcDialog,\n\t\tNcSelect,\n\t\tNcTextField,\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\tconst store = useFlowStore()\n\t\tconst found = store.editingEdge ? store.locateEdge(store.editingEdge) : null\n\t\tconst edge = found?.edge || {}\n\n\t\treturn {\n\t\t\tdraft: {\n\t\t\t\ttitle: edge.title ?? edge.label ?? '',\n\t\t\t\tlineType: edge.lineType || 'smoothstep',\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {Array<object>} The routers a line may be drawn with, labelled\n\t\t * for a human rather than by Vue Flow's internal names.\n\t\t */\n\t\tstyleOptions() {\n\t\t\treturn EDGE_LINE_TYPES.map((style) => ({ id: style.id, label: style.label() }))\n\t\t},\n\n\t\t/**\n\t\t * @return {object|null} The option matching the draft's router.\n\t\t */\n\t\tselectedStyle() {\n\t\t\treturn this.styleOptions.find((option) => option.id === this.draft.lineType) || null\n\t\t},\n\n\t\t/**\n\t\t * @return {string} Which two steps this line joins, by their labels β\n\t\t * the dialog is opened from a context menu on a line that may be one\n\t\t * of many, so it has to say which one it is.\n\t\t */\n\t\tendpoints() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\n\t\t\treturn t('nextcloud-vue', '{from} β {to}', {\n\t\t\t\tfrom: this.nodeLabel(pair.source),\n\t\t\t\tto: this.nodeLabel(pair.target),\n\t\t\t})\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {string} id A node id.\n\t\t * @return {string} Its authored name, or its id when it has none.\n\t\t */\n\t\tnodeLabel(id) {\n\t\t\tconst node = this.store.nodes.find((candidate) => candidate.id === id)\n\n\t\t\treturn node?.name || node?.id || id\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked style option.\n\t\t * @return {void}\n\t\t */\n\t\tonStylePicked(option) {\n\t\t\tif (option === null || option === undefined) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.draft.lineType = option.id\n\t\t},\n\n\t\t/**\n\t\t * Commit the draft as ONE change, so one Ctrl+Z reverses it.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tdone() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.setEdgeFields({\n\t\t\t\t\tsource: pair.source,\n\t\t\t\t\ttarget: pair.target,\n\t\t\t\t\tfields: { title: this.draft.title, lineType: this.draft.lineType },\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tremoveConnection() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.removeEdge(pair)\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tcancel() {\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-edge-edit {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding-block-end: 8px;\n}\n\n.cn-flow-edge-edit__endpoints {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n</style>\n"],"names":["t"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CnFlowEdgeEditModal.vue2.js","sources":["../../../src/dialogs/CnFlowEdgeEditModal.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog size=\"small\"\n\t\t:name=\"t('nextcloud-vue', 'Connection')\"\n\t\t@closing=\"cancel\">\n\t\t<div class=\"cn-flow-edge-edit\">\n\t\t\t<p class=\"cn-flow-edge-edit__endpoints\">\n\t\t\t\t{{ endpoints }}\n\t\t\t</p>\n\n\t\t\t<p v-if=\"conditionLine\"\n\t\t\t\tclass=\"cn-flow-edge-edit__condition\"\n\t\t\t\tdata-testid=\"flow-edge-condition\">\n\t\t\t\t{{ conditionLine }}\n\t\t\t</p>\n\n\t\t\t<NcTextField :modelValue=\"draft.title\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Label')\"\n\t\t\t\t:helperText=\"t('nextcloud-vue', 'Shown on the line. A branch reads better named β βapprovedβ, βover budgetβ β than as an unlabelled arrow.')\"\n\t\t\t\t@update:modelValue=\"draft.title = $event\" />\n\n\t\t\t<NcSelect :modelValue=\"selectedStyle\"\n\t\t\t\t:options=\"styleOptions\"\n\t\t\t\tlabel=\"label\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Line style')\"\n\t\t\t\t:clearable=\"false\"\n\t\t\t\t@update:modelValue=\"onStylePicked\" />\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton variant=\"error\" @click=\"removeConnection\">\n\t\t\t\t{{ t('nextcloud-vue', 'Remove connection') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton @click=\"cancel\">\n\t\t\t\t{{ t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton variant=\"primary\" @click=\"done\">\n\t\t\t\t{{ t('nextcloud-vue', 'Done') }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { EDGE_LINE_TYPES } from '../composables/useFlowEdgeStyles.js'\nimport { useFlowStore } from '../composables/useFlowStore.js'\nimport { flowEdgeCondition, flowEdgeConditionText } from '../utils/flowCondition.js'\n\n/**\n * CnFlowEdgeEditModal β edit one connection between two steps.\n *\n * A line carries two authored things: what it is CALLED, and how it is DRAWN.\n * When a condition decides it, the dialog says that condition in words.\n * The label is the one that matters on a branching flow β an unlabelled arrow\n * out of a routing step says nothing about which branch it is β and the router\n * is the escape hatch for the one line an automatic layout puts through a node.\n *\n * β οΈ KEYED ON THE ENDPOINT PAIR, NOT ON AN ID. A stored edge may draw several\n * lines (`{from: 'a', to: ['b','c']}`), so a drawn line's id is synthesised per\n * render and means nothing to the document; `{source, target}` is the only\n * identity both halves share. Setting a field on a line of a multi-line record\n * splits it out first β see `useFlowStore.setEdgeFields`.\n *\n * Edits land on a DRAFT: Done commits, Cancel discards β the same contract\n * CnFlowNodeEditModal holds. Opened by setting `useFlowStore().editingEdge` to\n * `{source, target}`; hosted by CnFlowDetail so it exists wherever the canvas\n * does.\n */\nexport default {\n\tname: 'CnFlowEdgeEditModal',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcDialog,\n\t\tNcSelect,\n\t\tNcTextField,\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\tconst store = useFlowStore()\n\t\tconst found = store.editingEdge ? store.locateEdge(store.editingEdge) : null\n\t\tconst edge = found?.edge || {}\n\n\t\treturn {\n\t\t\tdraft: {\n\t\t\t\ttitle: edge.title ?? edge.label ?? '',\n\t\t\t\tlineType: edge.lineType || 'smoothstep',\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {Array<object>} The routers a line may be drawn with, labelled\n\t\t * for a human rather than by Vue Flow's internal names.\n\t\t */\n\t\tstyleOptions() {\n\t\t\treturn EDGE_LINE_TYPES.map((style) => ({ id: style.id, label: style.label() }))\n\t\t},\n\n\t\t/**\n\t\t * @return {object|null} The option matching the draft's router.\n\t\t */\n\t\tselectedStyle() {\n\t\t\treturn this.styleOptions.find((option) => option.id === this.draft.lineType) || null\n\t\t},\n\n\t\t/**\n\t\t * @return {string} Which two steps this line joins, by their labels β\n\t\t * the dialog is opened from a context menu on a line that may be one\n\t\t * of many, so it has to say which one it is.\n\t\t */\n\t\tendpoints() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\n\t\t\treturn t('nextcloud-vue', '{from} β {to}', {\n\t\t\t\tfrom: this.nodeLabel(pair.source),\n\t\t\t\tto: this.nodeLabel(pair.target),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * @return {string} When this line is taken, in words, or '' when it is simply followed.\n\t\t */\n\t\tconditionLine() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tconst found = pair ? this.store.locateEdge(pair) : null\n\t\t\tif (found === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst source = this.store.nodes.find((node) => node.id === pair.source) || null\n\t\t\tconst text = flowEdgeConditionText(found.edge, source)\n\n\t\t\treturn flowEdgeCondition(found.edge, source) === null ? text : t('nextcloud-vue', 'Only if {condition}', { condition: text })\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {string} id A node id.\n\t\t * @return {string} Its authored name, or its id when it has none.\n\t\t */\n\t\tnodeLabel(id) {\n\t\t\tconst node = this.store.nodes.find((candidate) => candidate.id === id)\n\n\t\t\treturn node?.name || node?.id || id\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked style option.\n\t\t * @return {void}\n\t\t */\n\t\tonStylePicked(option) {\n\t\t\tif (option === null || option === undefined) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.draft.lineType = option.id\n\t\t},\n\n\t\t/**\n\t\t * Commit the draft as ONE change, so one Ctrl+Z reverses it.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tdone() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.setEdgeFields({\n\t\t\t\t\tsource: pair.source,\n\t\t\t\t\ttarget: pair.target,\n\t\t\t\t\tfields: { title: this.draft.title, lineType: this.draft.lineType },\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tremoveConnection() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.removeEdge(pair)\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tcancel() {\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-edge-edit {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding-block-end: 8px;\n}\n\n.cn-flow-edge-edit__endpoints {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-flow-edge-edit__condition {\n\tmargin: 0;\n\tfont-weight: 600;\n}\n</style>\n"],"names":["t"],"mappings":";;;;;;AAqDA;;AAEC;;;;;AAKA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;AAGD,aAAe;CACd,IAAI,EAAE,qBAAqB;;CAE3B,UAAU,EAAE;AACX,EAAA,QAAQ;AACR,EAAA,QAAQ;AACR,EAAA,QAAQ;EACR,WAAW;EACX;;AAED,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;EACN,MAAM,KAAI,GAAI,YAAY,GAAC;AAC3B,EAAA,MAAM,KAAM,GAAE,KAAK,CAAC,WAAY,GAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAA,GAAI,KAAG;EAC3E,MAAM,IAAK,GAAE,K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,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAO,EAAG;KAClE,EAAA;AACF,IAAA;;GAEA,IAAI,CAAC,KAAK,CAAC,WAAY,GAAE,KAAG;GAC5B;;AAED;;;AAGA,EAAA,gBAAgB,GAAG;AAClB,GAAA,MAAM,IAAG,GAAI,IAAI,CAAC,KAAK,CAAC,YAAU;AAClC,GAAA,IAAI,IAAG,KAAM,IAAI,EAAE;IAClB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAA;AAC3B,IAAA;;GAEA,IAAI,CAAC,KAAK,CAAC,WAAY,GAAE,KAAG;GAC5B;;AAED;;;AAGA,EAAA,MAAM,GAAG;GACR,IAAI,CAAC,KAAK,CAAC,WAAY,GAAE,KAAG;GAC5B;;KAEDA,SAAC;EACD;AACF;;;;"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode } from 'vue';
|
|
1
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, createElementBlock, createCommentVNode } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = { class: "cn-flow-edge-edit" };
|
|
4
4
|
const _hoisted_2 = { class: "cn-flow-edge-edit__endpoints" };
|
|
5
|
+
const _hoisted_3 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "cn-flow-edge-edit__condition",
|
|
8
|
+
"data-testid": "flow-edge-condition"
|
|
9
|
+
};
|
|
5
10
|
|
|
6
11
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7
12
|
const _component_NcTextField = resolveComponent("NcTextField");
|
|
@@ -43,6 +48,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
43
48
|
default: withCtx(() => [
|
|
44
49
|
createElementVNode("div", _hoisted_1, [
|
|
45
50
|
createElementVNode("p", _hoisted_2, toDisplayString($options.endpoints), 1 /* TEXT */),
|
|
51
|
+
($options.conditionLine)
|
|
52
|
+
? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString($options.conditionLine), 1 /* TEXT */))
|
|
53
|
+
: createCommentVNode("v-if", true),
|
|
46
54
|
createVNode(_component_NcTextField, {
|
|
47
55
|
modelValue: $data.draft.title,
|
|
48
56
|
label: $options.t('nextcloud-vue', 'Label'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowEdgeEditModal.vue3.js","sources":["../../../src/dialogs/CnFlowEdgeEditModal.vue?vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"CnFlowEdgeEditModal.vue3.js","sources":["../../../src/dialogs/CnFlowEdgeEditModal.vue?vue&type=template&id=be0e0eea&lang.js"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog size=\"small\"\n\t\t:name=\"t('nextcloud-vue', 'Connection')\"\n\t\t@closing=\"cancel\">\n\t\t<div class=\"cn-flow-edge-edit\">\n\t\t\t<p class=\"cn-flow-edge-edit__endpoints\">\n\t\t\t\t{{ endpoints }}\n\t\t\t</p>\n\n\t\t\t<p v-if=\"conditionLine\"\n\t\t\t\tclass=\"cn-flow-edge-edit__condition\"\n\t\t\t\tdata-testid=\"flow-edge-condition\">\n\t\t\t\t{{ conditionLine }}\n\t\t\t</p>\n\n\t\t\t<NcTextField :modelValue=\"draft.title\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Label')\"\n\t\t\t\t:helperText=\"t('nextcloud-vue', 'Shown on the line. A branch reads better named β βapprovedβ, βover budgetβ β than as an unlabelled arrow.')\"\n\t\t\t\t@update:modelValue=\"draft.title = $event\" />\n\n\t\t\t<NcSelect :modelValue=\"selectedStyle\"\n\t\t\t\t:options=\"styleOptions\"\n\t\t\t\tlabel=\"label\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Line style')\"\n\t\t\t\t:clearable=\"false\"\n\t\t\t\t@update:modelValue=\"onStylePicked\" />\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton variant=\"error\" @click=\"removeConnection\">\n\t\t\t\t{{ t('nextcloud-vue', 'Remove connection') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton @click=\"cancel\">\n\t\t\t\t{{ t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton variant=\"primary\" @click=\"done\">\n\t\t\t\t{{ t('nextcloud-vue', 'Done') }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { EDGE_LINE_TYPES } from '../composables/useFlowEdgeStyles.js'\nimport { useFlowStore } from '../composables/useFlowStore.js'\nimport { flowEdgeCondition, flowEdgeConditionText } from '../utils/flowCondition.js'\n\n/**\n * CnFlowEdgeEditModal β edit one connection between two steps.\n *\n * A line carries two authored things: what it is CALLED, and how it is DRAWN.\n * When a condition decides it, the dialog says that condition in words.\n * The label is the one that matters on a branching flow β an unlabelled arrow\n * out of a routing step says nothing about which branch it is β and the router\n * is the escape hatch for the one line an automatic layout puts through a node.\n *\n * β οΈ KEYED ON THE ENDPOINT PAIR, NOT ON AN ID. A stored edge may draw several\n * lines (`{from: 'a', to: ['b','c']}`), so a drawn line's id is synthesised per\n * render and means nothing to the document; `{source, target}` is the only\n * identity both halves share. Setting a field on a line of a multi-line record\n * splits it out first β see `useFlowStore.setEdgeFields`.\n *\n * Edits land on a DRAFT: Done commits, Cancel discards β the same contract\n * CnFlowNodeEditModal holds. Opened by setting `useFlowStore().editingEdge` to\n * `{source, target}`; hosted by CnFlowDetail so it exists wherever the canvas\n * does.\n */\nexport default {\n\tname: 'CnFlowEdgeEditModal',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcDialog,\n\t\tNcSelect,\n\t\tNcTextField,\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\tconst store = useFlowStore()\n\t\tconst found = store.editingEdge ? store.locateEdge(store.editingEdge) : null\n\t\tconst edge = found?.edge || {}\n\n\t\treturn {\n\t\t\tdraft: {\n\t\t\t\ttitle: edge.title ?? edge.label ?? '',\n\t\t\t\tlineType: edge.lineType || 'smoothstep',\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {Array<object>} The routers a line may be drawn with, labelled\n\t\t * for a human rather than by Vue Flow's internal names.\n\t\t */\n\t\tstyleOptions() {\n\t\t\treturn EDGE_LINE_TYPES.map((style) => ({ id: style.id, label: style.label() }))\n\t\t},\n\n\t\t/**\n\t\t * @return {object|null} The option matching the draft's router.\n\t\t */\n\t\tselectedStyle() {\n\t\t\treturn this.styleOptions.find((option) => option.id === this.draft.lineType) || null\n\t\t},\n\n\t\t/**\n\t\t * @return {string} Which two steps this line joins, by their labels β\n\t\t * the dialog is opened from a context menu on a line that may be one\n\t\t * of many, so it has to say which one it is.\n\t\t */\n\t\tendpoints() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\n\t\t\treturn t('nextcloud-vue', '{from} β {to}', {\n\t\t\t\tfrom: this.nodeLabel(pair.source),\n\t\t\t\tto: this.nodeLabel(pair.target),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * @return {string} When this line is taken, in words, or '' when it is simply followed.\n\t\t */\n\t\tconditionLine() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tconst found = pair ? this.store.locateEdge(pair) : null\n\t\t\tif (found === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst source = this.store.nodes.find((node) => node.id === pair.source) || null\n\t\t\tconst text = flowEdgeConditionText(found.edge, source)\n\n\t\t\treturn flowEdgeCondition(found.edge, source) === null ? text : t('nextcloud-vue', 'Only if {condition}', { condition: text })\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {string} id A node id.\n\t\t * @return {string} Its authored name, or its id when it has none.\n\t\t */\n\t\tnodeLabel(id) {\n\t\t\tconst node = this.store.nodes.find((candidate) => candidate.id === id)\n\n\t\t\treturn node?.name || node?.id || id\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked style option.\n\t\t * @return {void}\n\t\t */\n\t\tonStylePicked(option) {\n\t\t\tif (option === null || option === undefined) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.draft.lineType = option.id\n\t\t},\n\n\t\t/**\n\t\t * Commit the draft as ONE change, so one Ctrl+Z reverses it.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tdone() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.setEdgeFields({\n\t\t\t\t\tsource: pair.source,\n\t\t\t\t\ttarget: pair.target,\n\t\t\t\t\tfields: { title: this.draft.title, lineType: this.draft.lineType },\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tremoveConnection() {\n\t\t\tconst pair = this.store.editingEdge\n\t\t\tif (pair !== null) {\n\t\t\t\tthis.store.removeEdge(pair)\n\t\t\t}\n\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tcancel() {\n\t\t\tthis.store.editingEdge = null\n\t\t},\n\n\t\tt,\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-edge-edit {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding-block-end: 8px;\n}\n\n.cn-flow-edge-edit__endpoints {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-flow-edge-edit__condition {\n\tmargin: 0;\n\tfont-weight: 600;\n}\n</style>\n"],"names":["_create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EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAA,KAAA,CAAA,KAAA,CAAA,KAAA,GAAA,MAAA,CAAA,CAAA;;QAEZF,WAKqC,CAAA,mBAAA,EAAA;AAL3B,UAAA,UAAO,EAAA,QAAA,CAAA,aAAA;AAChB,UAAA,OAAO,EAAE,QAAY,CAAA,YAAA;AACtB,UAAA,KAAG,EAAA,OAAA;;AAEF,UAAA,SAAS,EAAE,KAAI;AACf,UAAA,qBAAiB,EAAE,QAAa,CAAA,aAAA;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnFlowEditModal.vue2.js';
|
|
|
2
2
|
import { render } from './CnFlowEditModal.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-0b49d288";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { NcButton, NcDialog } from '@nextcloud/vue';
|
|
2
2
|
import __sfc_main from '../components/CnFlowDetail/CnFlowDetail.vue.js';
|
|
3
3
|
import __sfc_main$1 from '../components/CnFlowDetail/CnFlowSidebar.vue.js';
|
|
4
|
+
import __sfc_main$2 from '../components/CnFlowDetail/CnFlowViewSwitch.vue.js';
|
|
4
5
|
import { useFlowStore } from '../composables/useFlowStore.js';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Link to the flow page in list mode (`/flows/{id}?view=list`).
|
|
9
|
+
* Kept while callers move; it renders that same list view in a dialog.
|
|
10
|
+
*/
|
|
6
11
|
var script = {
|
|
7
12
|
name: 'CnFlowEditModal',
|
|
8
13
|
|
|
@@ -11,6 +16,7 @@ var script = {
|
|
|
11
16
|
NcDialog,
|
|
12
17
|
CnFlowDetail: __sfc_main,
|
|
13
18
|
CnFlowSidebar: __sfc_main$1,
|
|
19
|
+
CnFlowViewSwitch: __sfc_main$2,
|
|
14
20
|
},
|
|
15
21
|
|
|
16
22
|
props: {
|
|
@@ -29,6 +35,14 @@ var script = {
|
|
|
29
35
|
type: String,
|
|
30
36
|
default: null,
|
|
31
37
|
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The view on arrival: `list` or `canvas`.
|
|
41
|
+
*/
|
|
42
|
+
view: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: 'list',
|
|
45
|
+
},
|
|
32
46
|
},
|
|
33
47
|
|
|
34
48
|
emits: ['close', 'saved'],
|
|
@@ -39,6 +53,7 @@ var script = {
|
|
|
39
53
|
|
|
40
54
|
data() {
|
|
41
55
|
return {
|
|
56
|
+
activeView: this.view,
|
|
42
57
|
confirmDiscard: false,
|
|
43
58
|
}
|
|
44
59
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowEditModal.vue2.js","sources":["../../../src/dialogs/CnFlowEditModal.vue"],"sourcesContent":["<!--\n CnFlowEditModal β edit a flow without leaving the page.\n\n
|
|
1
|
+
{"version":3,"file":"CnFlowEditModal.vue2.js","sources":["../../../src/dialogs/CnFlowEditModal.vue"],"sourcesContent":["<!--\n CnFlowEditModal β edit a flow without leaving the page.\n\n What Buildiq's \"Edit flowsβ¦\" opens for an app without a flow page in list mode.\n It is no editor of its own: it hosts the SAME components as the flow detail\n page, CnFlowDetail in its list view with the Canvas / List switch and\n CnFlowSidebar for the controls, so a flow behaves the same wherever it opens.\n New callers link to the flow page with `?view=list` instead (decision 379).\n\n `size=\"full\"` because a graph needs the room: the canvas and the controls have\n to be on screen together, and at any smaller size the sidebar either wraps\n under the canvas or squeezes it to a strip.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog size=\"full\"\n\t\t:name=\"dialogName\"\n\t\t@closing=\"onClosing\">\n\t\t<div class=\"cn-flow-modal\">\n\t\t\t<div class=\"cn-flow-modal__canvas\">\n\t\t\t\t<CnFlowDetail :id=\"flowId\"\n\t\t\t\t\t:app=\"app\"\n\t\t\t\t\t:view=\"activeView\"\n\t\t\t\t\t@save=\"onSave\"\n\t\t\t\t\t@run=\"onRun\">\n\t\t\t\t\t<template #toolbar-start>\n\t\t\t\t\t\t<CnFlowViewSwitch v-model=\"activeView\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnFlowDetail>\n\t\t\t</div>\n\t\t\t<aside class=\"cn-flow-modal__side\">\n\t\t\t\t<!-- `embedded`: NcAppSidebar's app-layout positioning has no\n\t\t\t\t meaning inside a dialog. -->\n\t\t\t\t<CnFlowSidebar embedded />\n\t\t\t</aside>\n\t\t</div>\n\n\t\t<!--\n\t\t A dirty flow closing without saving is the one destructive thing this\n\t\t dialog can do, so it asks. The canvas holds unsaved node positions and\n\t\t configuration that exist nowhere else.\n\t\t-->\n\t\t<NcDialog v-if=\"confirmDiscard\"\n\t\t\t:name=\"t('nextcloud-vue', 'Discard changes?')\"\n\t\t\t@closing=\"confirmDiscard = false\">\n\t\t\t<p>{{ t('nextcloud-vue', 'This flow has unsaved changes. Closing now discards them.') }}</p>\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"confirmDiscard = false\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Keep editing') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"error\" @click=\"discard\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Discard') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcDialog>\n\t</NcDialog>\n</template>\n\n<script>\nimport { NcButton, NcDialog } from '@nextcloud/vue'\nimport CnFlowDetail from '../components/CnFlowDetail/CnFlowDetail.vue'\nimport CnFlowSidebar from '../components/CnFlowDetail/CnFlowSidebar.vue'\nimport CnFlowViewSwitch from '../components/CnFlowDetail/CnFlowViewSwitch.vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * @deprecated Link to the flow page in list mode (`/flows/{id}?view=list`).\n * Kept while callers move; it renders that same list view in a dialog.\n */\nexport default {\n\tname: 'CnFlowEditModal',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcDialog,\n\t\tCnFlowDetail,\n\t\tCnFlowSidebar,\n\t\tCnFlowViewSwitch,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The flow to edit. `new` starts a blank one.\n\t\t */\n\t\tflowId: {\n\t\t\ttype: String,\n\t\t\tdefault: 'new',\n\t\t},\n\n\t\t/**\n\t\t * The owning app id, stamped on a new flow and used to scope the list.\n\t\t */\n\t\tapp: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The view on arrival: `list` or `canvas`.\n\t\t */\n\t\tview: {\n\t\t\ttype: String,\n\t\t\tdefault: 'list',\n\t\t},\n\t},\n\n\temits: ['close', 'saved'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveView: this.view,\n\t\t\tconfirmDiscard: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string} The dialog title.\n\t\t */\n\t\tdialogName() {\n\t\t\treturn this.store.flow?.name || this.t('nextcloud-vue', 'Edit flow')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onSave() {\n\t\t\tconst saved = await this.store.save()\n\t\t\tif (saved) {\n\t\t\t\tthis.$emit('saved', saved)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRun() {\n\t\t\tawait this.store.run({})\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tonClosing() {\n\t\t\tif (this.store.dirty) {\n\t\t\t\tthis.confirmDiscard = true\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tdiscard() {\n\t\t\tthis.confirmDiscard = false\n\t\t\tthis.store.dirty = false\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-modal {\n\tdisplay: flex;\n\tgap: 0;\n\tblock-size: 100%;\n\tmin-block-size: 60vh;\n}\n\n.cn-flow-modal__canvas {\n\tflex: 1 1 auto;\n\tmin-inline-size: 0;\n}\n\n.cn-flow-modal__side {\n\tflex: 0 0 340px;\n\tmax-inline-size: 340px;\n\toverflow-y: auto;\n\tborder-inline-start: 1px solid var(--color-border);\n}\n\n@media (max-width: 900px) {\n\t.cn-flow-modal {\n\t\tflex-direction: column;\n\t}\n\n\t.cn-flow-modal__side {\n\t\tflex: 1 1 auto;\n\t\tmax-inline-size: none;\n\t\tborder-inline-start: none;\n\t\tborder-block-start: 1px solid var(--color-border);\n\t}\n}\n</style>\n"],"names":["CnFlowDetail","CnFlowSidebar","CnFlowViewSwitch"],"mappings":";;;;;;AAmEA;AACC;;;AAGD,aAAe;CACd,IAAI,EAAE,iBAAiB;;CAEvB,UAAU,EAAE;AACX,EAAA,QAAQ;AACR,EAAA,QAAQ;gBACRA,UAAY;iBACZC,YAAa;AACb,oBAAAC,YAAgB;EAChB;;AAED,CAAA,KAAK,EAAE;AACN;AACC;;AAED,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,KAAK;GACd;;AAED;;;EAGA,GAAG,EAAE;GACJ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,IAAI;GACb;;AAED;AACC;;EAED,IAAI,EAAE;GACL,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,MAAM;GACf;EACD;;CAED,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;;AAEzB,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;AACN,EAAA,OAAO;AACN,GAAA,UAAU,EAAE,IAAI,CAAC,IAAI;AACrB,GAAA,cAAc,EAAE,KAAK;AACtB,GAAA;EACA;;AAED,CAAA,QAAQ,EAAE;AACT;AACC;;EAED,UAAU,GAAG;AACZ,GAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAG,IAAK,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,WAAW,CAAA;GACnE;EACD;;AAED,CAAA,OAAO,EAAE;AACR;;;EAGA,MAAM,MAAM,GAAG;AACd,GAAA,MAAM,KAAM,GAAE,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,GAAC;AACpC,GAAA,IAAI,KAAK,EAAE;IACV,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAA;AAC1B,IAAA;GACA;;AAED;;;EAGA,MAAM,KAAK,GAAG;GACb,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAA;GACvB;;AAED;;;EAGA,SAAS,GAAG;AACX,GAAA,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;IACrB,IAAI,CAAC,cAAe,GAAE,KAAG;IACzB,MAAK;AACN,IAAA;;AAEA,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;;AAED;;;AAGA,EAAA,OAAO,GAAG;GACT,IAAI,CAAC,iBAAiB,MAAI;AAC1B,GAAA,IAAI,CAAC,KAAK,CAAC,KAAI,GAAI,MAAI;AACvB,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
|
|
@@ -5,6 +5,7 @@ const _hoisted_2 = { class: "cn-flow-modal__canvas" };
|
|
|
5
5
|
const _hoisted_3 = { class: "cn-flow-modal__side" };
|
|
6
6
|
|
|
7
7
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8
|
+
const _component_CnFlowViewSwitch = resolveComponent("CnFlowViewSwitch");
|
|
8
9
|
const _component_CnFlowDetail = resolveComponent("CnFlowDetail");
|
|
9
10
|
const _component_CnFlowSidebar = resolveComponent("CnFlowSidebar");
|
|
10
11
|
const _component_NcButton = resolveComponent("NcButton");
|
|
@@ -21,9 +22,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21
22
|
createVNode(_component_CnFlowDetail, {
|
|
22
23
|
id: $props.flowId,
|
|
23
24
|
app: $props.app,
|
|
25
|
+
view: $data.activeView,
|
|
24
26
|
onSave: $options.onSave,
|
|
25
27
|
onRun: $options.onRun
|
|
26
|
-
},
|
|
28
|
+
}, {
|
|
29
|
+
"toolbar-start": withCtx(() => [
|
|
30
|
+
createVNode(_component_CnFlowViewSwitch, {
|
|
31
|
+
modelValue: $data.activeView,
|
|
32
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.activeView) = $event))
|
|
33
|
+
}, null, 8 /* PROPS */, ["modelValue"])
|
|
34
|
+
]),
|
|
35
|
+
_: 1 /* STABLE */
|
|
36
|
+
}, 8 /* PROPS */, ["id", "app", "view", "onSave", "onRun"])
|
|
27
37
|
]),
|
|
28
38
|
createElementVNode("aside", _hoisted_3, [
|
|
29
39
|
createVNode(_component_CnFlowSidebar, { embedded: "" })
|
|
@@ -33,11 +43,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33
43
|
? (openBlock(), createBlock(_component_NcDialog, {
|
|
34
44
|
key: 0,
|
|
35
45
|
name: _ctx.t('nextcloud-vue', 'Discard changes?'),
|
|
36
|
-
onClosing: _cache[
|
|
46
|
+
onClosing: _cache[2] || (_cache[2] = $event => ($data.confirmDiscard = false))
|
|
37
47
|
}, {
|
|
38
48
|
actions: withCtx(() => [
|
|
39
49
|
createVNode(_component_NcButton, {
|
|
40
|
-
onClick: _cache[
|
|
50
|
+
onClick: _cache[1] || (_cache[1] = $event => ($data.confirmDiscard = false))
|
|
41
51
|
}, {
|
|
42
52
|
default: withCtx(() => [
|
|
43
53
|
createTextVNode(toDisplayString(_ctx.t('nextcloud-vue', 'Keep editing')), 1 /* TEXT */)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowEditModal.vue3.js","sources":["../../../src/dialogs/CnFlowEditModal.vue?vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"CnFlowEditModal.vue3.js","sources":["../../../src/dialogs/CnFlowEditModal.vue?vue&type=template&id=0b49d288&lang.js"],"sourcesContent":["<!--\n CnFlowEditModal β edit a flow without leaving the page.\n\n What Buildiq's \"Edit flowsβ¦\" opens for an app without a flow page in list mode.\n It is no editor of its own: it hosts the SAME components as the flow detail\n page, CnFlowDetail in its list view with the Canvas / List switch and\n CnFlowSidebar for the controls, so a flow behaves the same wherever it opens.\n New callers link to the flow page with `?view=list` instead (decision 379).\n\n `size=\"full\"` because a graph needs the room: the canvas and the controls have\n to be on screen together, and at any smaller size the sidebar either wraps\n under the canvas or squeezes it to a strip.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog size=\"full\"\n\t\t:name=\"dialogName\"\n\t\t@closing=\"onClosing\">\n\t\t<div class=\"cn-flow-modal\">\n\t\t\t<div class=\"cn-flow-modal__canvas\">\n\t\t\t\t<CnFlowDetail :id=\"flowId\"\n\t\t\t\t\t:app=\"app\"\n\t\t\t\t\t:view=\"activeView\"\n\t\t\t\t\t@save=\"onSave\"\n\t\t\t\t\t@run=\"onRun\">\n\t\t\t\t\t<template #toolbar-start>\n\t\t\t\t\t\t<CnFlowViewSwitch v-model=\"activeView\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnFlowDetail>\n\t\t\t</div>\n\t\t\t<aside class=\"cn-flow-modal__side\">\n\t\t\t\t<!-- `embedded`: NcAppSidebar's app-layout positioning has no\n\t\t\t\t meaning inside a dialog. -->\n\t\t\t\t<CnFlowSidebar embedded />\n\t\t\t</aside>\n\t\t</div>\n\n\t\t<!--\n\t\t A dirty flow closing without saving is the one destructive thing this\n\t\t dialog can do, so it asks. The canvas holds unsaved node positions and\n\t\t configuration that exist nowhere else.\n\t\t-->\n\t\t<NcDialog v-if=\"confirmDiscard\"\n\t\t\t:name=\"t('nextcloud-vue', 'Discard changes?')\"\n\t\t\t@closing=\"confirmDiscard = false\">\n\t\t\t<p>{{ t('nextcloud-vue', 'This flow has unsaved changes. Closing now discards them.') }}</p>\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"confirmDiscard = false\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Keep editing') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"error\" @click=\"discard\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Discard') }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</NcDialog>\n\t</NcDialog>\n</template>\n\n<script>\nimport { NcButton, NcDialog } from '@nextcloud/vue'\nimport CnFlowDetail from '../components/CnFlowDetail/CnFlowDetail.vue'\nimport CnFlowSidebar from '../components/CnFlowDetail/CnFlowSidebar.vue'\nimport CnFlowViewSwitch from '../components/CnFlowDetail/CnFlowViewSwitch.vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * @deprecated Link to the flow page in list mode (`/flows/{id}?view=list`).\n * Kept while callers move; it renders that same list view in a dialog.\n */\nexport default {\n\tname: 'CnFlowEditModal',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcDialog,\n\t\tCnFlowDetail,\n\t\tCnFlowSidebar,\n\t\tCnFlowViewSwitch,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The flow to edit. `new` starts a blank one.\n\t\t */\n\t\tflowId: {\n\t\t\ttype: String,\n\t\t\tdefault: 'new',\n\t\t},\n\n\t\t/**\n\t\t * The owning app id, stamped on a new flow and used to scope the list.\n\t\t */\n\t\tapp: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The view on arrival: `list` or `canvas`.\n\t\t */\n\t\tview: {\n\t\t\ttype: String,\n\t\t\tdefault: 'list',\n\t\t},\n\t},\n\n\temits: ['close', 'saved'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveView: this.view,\n\t\t\tconfirmDiscard: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {string} The dialog title.\n\t\t */\n\t\tdialogName() {\n\t\t\treturn this.store.flow?.name || this.t('nextcloud-vue', 'Edit flow')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onSave() {\n\t\t\tconst saved = await this.store.save()\n\t\t\tif (saved) {\n\t\t\t\tthis.$emit('saved', saved)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onRun() {\n\t\t\tawait this.store.run({})\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tonClosing() {\n\t\t\tif (this.store.dirty) {\n\t\t\t\tthis.confirmDiscard = true\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\t/**\n\t\t * @return {void}\n\t\t */\n\t\tdiscard() {\n\t\t\tthis.confirmDiscard = false\n\t\t\tthis.store.dirty = false\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-modal {\n\tdisplay: flex;\n\tgap: 0;\n\tblock-size: 100%;\n\tmin-block-size: 60vh;\n}\n\n.cn-flow-modal__canvas {\n\tflex: 1 1 auto;\n\tmin-inline-size: 0;\n}\n\n.cn-flow-modal__side {\n\tflex: 0 0 340px;\n\tmax-inline-size: 340px;\n\toverflow-y: auto;\n\tborder-inline-start: 1px solid var(--color-border);\n}\n\n@media (max-width: 900px) {\n\t.cn-flow-modal {\n\t\tflex-direction: column;\n\t}\n\n\t.cn-flow-modal__side {\n\t\tflex: 1 1 auto;\n\t\tmax-inline-size: none;\n\t\tborder-inline-start: none;\n\t\tborder-block-start: 1px solid var(--color-border);\n\t}\n}\n</style>\n"],"names":["_createElementVNode","_createVNode"],"mappings":";;AAoCO,MAAA,UAAA,GAAA,EAAA,KAAG,EAAA,eAAA,GAAA;AACH,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,uBAAA,GAAA;AAWG,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,qBAAK,GAAA;;;;;;;;;;AAfV,IAAA,IAAI,EAAC,MAAM;UACb,QAAU,CAAA,UAAA;aACT,EAAE,QAAS,CAAA,SAAA;;qBAClB,MAiBK;AAjBL,MAAAA,kBAAA,CAiBK,OAjBL,UAiBK,EAAA;AAhBL,QAAAA,kBAAA,CAUM,OAVN,UAUM,EAAA;qBADU,CAAA,uBAAA,EAAA;;AAPd,YAAA,GAAA,EAAA,MAAA,CAAA,GAAA;AACC,YAAA,IAAI,EAAE,KAAU,CAAA,UAAA;AAChB,YAAA,MAAG,EAAG,QAAO,CAAA,MAAA;AACb,YAAA,KAAG,EAAE,QAAK,CAAA,KAAA;;AACZ,YAAA,eAAA,UACE,MAA0B;cAA1BC,WAA0B,CAAA,2BAAA,EAAA;4BAAA,KAAA,CAAA,UAAA;6EAAA,KAAA,CAAA,UAAA,IAAA,MAAA,CAAA,CAAA;;;;;;AAI7B,QAAAD,kBAAA,CAIQ,SAJR,UAIQ,EAAA;UADPC,WAAU,CAAA,wBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnFlowStepPickerModal.vue2.js';
|
|
|
2
2
|
import { render } from './CnFlowStepPickerModal.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-69168a80";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -25,6 +25,14 @@ var script = {
|
|
|
25
25
|
|
|
26
26
|
components: { NcDialog, NcSelect, NcTextField },
|
|
27
27
|
|
|
28
|
+
props: {
|
|
29
|
+
/** Add the step at the bottom of the list view, wired in, not loose on the canvas. */
|
|
30
|
+
append: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
|
|
28
36
|
emits: ['close'],
|
|
29
37
|
|
|
30
38
|
setup() {
|
|
@@ -182,7 +190,11 @@ var script = {
|
|
|
182
190
|
* @return {void}
|
|
183
191
|
*/
|
|
184
192
|
add(id) {
|
|
185
|
-
this.
|
|
193
|
+
if (this.append) {
|
|
194
|
+
this.store.appendStep(id);
|
|
195
|
+
} else {
|
|
196
|
+
this.store.addNode(id);
|
|
197
|
+
}
|
|
186
198
|
this.$emit('close');
|
|
187
199
|
},
|
|
188
200
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowStepPickerModal.vue2.js","sources":["../../../src/dialogs/CnFlowStepPickerModal.vue"],"sourcesContent":["<!--\n CnFlowStepPickerModal β every step the engine offers, searchable, in a modal.\n\n WHY THIS IS NOT A SIDEBAR PANEL ANY MORE\n ----------------------------------------\n The palette lived in the Steps tab, a column roughly 300px wide, and a live\n instance serves SIXTY-FIVE step types into it. A one-per-row list that long is\n not a chooser; it is a scroll. The author who knows what they want scrolls\n past it, and the author who does not cannot see enough at once to compare.\n\n A modal has the whole window. The same entries render as a grid, so a screen\n shows a dozen at a glance instead of three, and the search and the type filter\n sit above them rather than competing with the graph for the sidebar's width.\n\n It also frees the sidebar. With the palette gone the sidebar is the flow's\n runs, which is what an author looks at once the graph is built.\n\n WHAT IS CARRIED ACROSS, DELIBERATELY\n ------------------------------------\n DRAGGING. A step can be dragged from here onto the canvas exactly as it could\n from the palette, through the same `store.paletteDragType`. Clicking still\n adds to the graph. Losing either would trade one interaction for another\n rather than moving the surface.\n\n THE THREE EMPTY STATES, which say three different things: the catalogue is\n still loading, the catalogue is empty (the server could not be read, which is\n a standing condition of the flow and is ALSO on the canvas), and the search\n matched nothing. Collapsing them into one \"nothing here\" was the version of\n this that made a broken catalogue look like a bad search term.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog :name=\"t('nextcloud-vue', 'Add a step')\"\n\t\tsize=\"large\"\n\t\tdata-testid=\"flow-step-picker\"\n\t\t@closing=\"$emit('close')\">\n\t\t<div class=\"cn-step-picker\">\n\t\t\t<div class=\"cn-step-picker__controls\">\n\t\t\t\t<NcTextField :modelValue=\"search\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Search steps')\"\n\t\t\t\t\ttrailingButtonIcon=\"close\"\n\t\t\t\t\t:showTrailingButton=\"search !== ''\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-search\"\n\t\t\t\t\t@trailingButtonClick=\"search = ''\"\n\t\t\t\t\t@update:modelValue=\"search = $event\" />\n\n\t\t\t\t<NcSelect :modelValue=\"roleOption\"\n\t\t\t\t\t:options=\"roleOptions\"\n\t\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Type')\"\n\t\t\t\t\t:clearable=\"false\"\n\t\t\t\t\t@update:modelValue=\"role = $event ? $event.id : null\" />\n\t\t\t</div>\n\n\t\t\t<p v-if=\"store.catalogLoading && !store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'Loading the available stepsβ¦') }}\n\t\t\t</p>\n\t\t\t<!--\n\t\t\t\tWhy the list is empty, AT the list. One short line, because the\n\t\t\t\tdiagnosis β the catalogue could not be read, and no step can be\n\t\t\t\tadded at all β is a standing condition of the flow and renders on\n\t\t\t\tthe canvas with every other message.\n\t\t\t-->\n\t\t\t<p v-else-if=\"!store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'No steps are available to add.') }}\n\t\t\t</p>\n\t\t\t<p v-else-if=\"!entries.length\" class=\"cn-step-picker__hint\" data-testid=\"flow-step-picker-nomatch\">\n\t\t\t\t{{ t('nextcloud-vue', 'No step matches this search.') }}\n\t\t\t</p>\n\t\t\t<template v-else>\n\t\t\t\t<section v-for=\"group in groups\"\n\t\t\t\t\t:key=\"group.category\"\n\t\t\t\t\tclass=\"cn-step-picker__group\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-group\"\n\t\t\t\t\t:data-category=\"group.category\">\n\t\t\t\t\t<h3 class=\"cn-step-picker__group-title\">\n\t\t\t\t\t\t{{ group.label }}\n\t\t\t\t\t\t<span class=\"cn-step-picker__group-count\">{{ group.entries.length }}</span>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<ul class=\"cn-step-picker__grid\">\n\t\t\t\t\t\t<li v-for=\"entry in group.entries\"\n\t\t\t\t\t\t\t:key=\"entry.id\"\n\t\t\t\t\t\t\tclass=\"cn-step-picker__item\"\n\t\t\t\t\t\t\tdraggable=\"true\"\n\t\t\t\t\t\t\t:title=\"entry.description\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-picker-item\"\n\t\t\t\t\t\t\t@dragstart=\"store.paletteDragType = entry.id\"\n\t\t\t\t\t\t\t@dragend=\"store.paletteDragType = null\"\n\t\t\t\t\t\t\t@click=\"add(entry.id)\">\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__name\">{{ entry.displayName || entry.id }}</span>\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__role\"\n\t\t\t\t\t\t\t\t\t:class=\"`cn-step-picker__role--${entry.role}`\">\n\t\t\t\t\t\t\t\t\t{{ roleWord(entry.role) }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"entry.description\" class=\"cn-step-picker__description\">{{ entry.description }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__id\">{{ entry.id }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * The palette's groups, in the order it presents them.\n *\n * Mirrors `IFlowNodeTaxonomy::CATEGORIES` in openregister. Kept as a literal\n * rather than derived from the catalogue for the reason in `groups()`: a\n * discovered order is an accident of which apps are installed.\n */\nconst CATEGORY_ORDER = [\n\t'triggers',\n\t'human',\n\t'objects',\n\t'logic',\n\t'messaging',\n\t'ai',\n\t'integrations',\n\t'other',\n]\n\nexport default {\n\tname: 'CnFlowStepPickerModal',\n\n\tcomponents: { NcDialog, NcSelect, NcTextField },\n\n\temits: ['close'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { search: '', role: null }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The catalogue, filtered and ordered the way an author reads it:\n\t\t * triggers first, then steps, then ends.\n\t\t *\n\t\t * @return {Array<object>} The entries to show.\n\t\t */\n\t\tentries() {\n\t\t\tconst rank = { trigger: 0, step: 1, end: 2 }\n\t\t\tconst needle = this.search.trim().toLowerCase()\n\n\t\t\treturn this.store.nodeCatalog\n\t\t\t\t.map((entry) => ({ ...entry, role: this.store.roleOfNodeType(entry.id) }))\n\t\t\t\t.filter((entry) => !this.role || entry.role === this.role)\n\t\t\t\t.filter((entry) => {\n\t\t\t\t\tif (!needle) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `${entry.id} ${entry.displayName || ''} ${entry.description || ''}`\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.includes(needle)\n\t\t\t\t})\n\t\t\t\t// Stable: equal roles keep the catalogue's own order.\n\t\t\t\t.map((entry, index) => ({ entry, index }))\n\t\t\t\t.sort((a, b) => ((rank[a.entry.role] ?? 1) - (rank[b.entry.role] ?? 1)) || (a.index - b.index))\n\t\t\t\t.map(({ entry }) => entry)\n\t\t},\n\n\t\t/**\n\t\t * The entries grouped by category, in a FIXED order.\n\t\t *\n\t\t * π΄ THE ORDER IS DECLARED, NOT DISCOVERED. Registration order depends\n\t\t * on which apps are installed and in what order their listeners fire,\n\t\t * so a palette ordered by the catalogue's own sequence reorders itself\n\t\t * when an unrelated app is enabled, and an author's muscle memory is\n\t\t * wrong through no change of theirs.\n\t\t *\n\t\t * An empty category is omitted rather than rendered as a heading with\n\t\t * nothing under it. `other` is last because it is the prompt for a node\n\t\t * whose owner has not declared yet, not a home.\n\t\t *\n\t\t * @return {Array<object>} One entry per non-empty category.\n\t\t */\n\t\tgroups() {\n\t\t\tconst byCategory = new Map()\n\t\t\tfor (const entry of this.entries) {\n\t\t\t\t// The server always sends a category; an older instance that\n\t\t\t\t// does not is read as undeclared rather than dropped.\n\t\t\t\tconst category = entry.category || 'other'\n\t\t\t\tif (!byCategory.has(category)) {\n\t\t\t\t\tbyCategory.set(category, [])\n\t\t\t\t}\n\t\t\t\tbyCategory.get(category).push(entry)\n\t\t\t}\n\n\t\t\t// Anything the server sends that this build does not know about\n\t\t\t// still gets shown, after the known ones and before `other`.\n\t\t\tconst known = CATEGORY_ORDER.filter((c) => c !== 'other')\n\t\t\tconst unknown = [...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)).sort()\n\t\t\tconst order = [...known, ...unknown, 'other']\n\n\t\t\treturn order\n\t\t\t\t.filter((category) => byCategory.has(category))\n\t\t\t\t.map((category) => ({\n\t\t\t\t\tcategory,\n\t\t\t\t\tlabel: this.categoryLabel(category),\n\t\t\t\t\tentries: byCategory.get(category),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The type filter's options.\n\t\t */\n\t\troleOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: null, label: this.t('nextcloud-vue', 'All types') },\n\t\t\t\t{ id: 'trigger', label: this.t('nextcloud-vue', 'Triggers') },\n\t\t\t\t{ id: 'step', label: this.t('nextcloud-vue', 'Steps') },\n\t\t\t\t{ id: 'end', label: this.t('nextcloud-vue', 'End') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * @return {object} The selected option.\n\t\t */\n\t\troleOption() {\n\t\t\treturn this.roleOptions.find((o) => o.id === this.role) || this.roleOptions[0]\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A category's heading, in the author's language.\n\t\t *\n\t\t * A category this build does not know is shown by its own id rather\n\t\t * than hidden: a group an author can see and ask about beats a step\n\t\t * that silently is not there.\n\t\t *\n\t\t * @param {string} category The category id.\n\t\t * @return {string} The heading.\n\t\t */\n\t\tcategoryLabel(category) {\n\t\t\treturn {\n\t\t\t\ttriggers: this.t('nextcloud-vue', 'Triggers'),\n\t\t\t\thuman: this.t('nextcloud-vue', 'People'),\n\t\t\t\tobjects: this.t('nextcloud-vue', 'Objects'),\n\t\t\t\tlogic: this.t('nextcloud-vue', 'Logic'),\n\t\t\t\tmessaging: this.t('nextcloud-vue', 'Messaging'),\n\t\t\t\tai: this.t('nextcloud-vue', 'AI'),\n\t\t\t\tintegrations: this.t('nextcloud-vue', 'Integrations'),\n\t\t\t\tother: this.t('nextcloud-vue', 'Other'),\n\t\t\t}[category] || category\n\t\t},\n\n\t\t/**\n\t\t * The role, in the author's language.\n\t\t *\n\t\t * @param {string} role The role.\n\t\t * @return {string} The word.\n\t\t */\n\t\troleWord(role) {\n\t\t\treturn {\n\t\t\t\ttrigger: this.t('nextcloud-vue', 'Trigger'),\n\t\t\t\tstep: this.t('nextcloud-vue', 'Step'),\n\t\t\t\tend: this.t('nextcloud-vue', 'End'),\n\t\t\t}[role] || role\n\t\t},\n\n\t\t/**\n\t\t * Add the step and get out of the way β whether it worked or not.\n\t\t *\n\t\t * π΄ IT CLOSES ON A REFUSAL TOO, and that is the correction of a wrong\n\t\t * first answer. I had it stay open when the graph refused the step, on\n\t\t * the reasoning that closing would hide the refusal. It is the other\n\t\t * way round: the refusal renders in the CANVAS message area, and this\n\t\t * modal covers the canvas. Staying open is what hides it.\n\t\t *\n\t\t * So both outcomes end here, and both are visible behind: the step\n\t\t * arriving on the graph, or the message saying why it did not.\n\t\t *\n\t\t * @param {string} id The node type.\n\t\t * @return {void}\n\t\t */\n\t\tadd(id) {\n\t\t\tthis.store.addNode(id)\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-step-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 8px 0;\n\t/* The dialog is tall; the grid scrolls, the controls do not. */\n\tmax-block-size: 70vh;\n}\n\n.cn-step-picker__controls {\n\tdisplay: flex;\n\tgap: 12px;\n\tflex-wrap: wrap;\n\talign-items: end;\n}\n\n.cn-step-picker__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n/* THE WHOLE POINT OF THE MODAL: a grid, so sixty-five entries can be compared\n rather than scrolled past one at a time. `auto-fill` rather than a fixed\n count, so the same markup works in a narrow window. */\n.cn-step-picker__group {\n\tmargin-block-start: 16px;\n}\n\n.cn-step-picker__group-title {\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tfont-weight: bold;\n\tdisplay: flex;\n\talign-items: baseline;\n\tgap: 8px;\n}\n\n.cn-step-picker__group-count {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-step-picker__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 8px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow-y: auto;\n}\n\n.cn-step-picker__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tpadding: 10px 12px;\n\tborder: 2px solid transparent;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-step-picker__item:hover,\n.cn-step-picker__item:focus-visible {\n\tborder-color: var(--color-primary-element);\n}\n\n.cn-step-picker__head {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tjustify-content: space-between;\n}\n\n.cn-step-picker__name {\n\tfont-weight: bold;\n}\n\n.cn-step-picker__role {\n\tfont-size: 0.8em;\n\ttext-transform: uppercase;\n\tcolor: var(--color-text-maxcontrast);\n\tletter-spacing: 0.04em;\n}\n\n.cn-step-picker__role--trigger { color: var(--color-primary-element); }\n\n.cn-step-picker__role--end { color: var(--color-warning-text, var(--color-warning)); }\n\n.cn-step-picker__description {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-step-picker__id {\n\tfont-family: monospace;\n\tfont-size: 0.8em;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;;;AAgHA;AACC;AACA;AACA;;;;AAID,MAAM,iBAAiB;CACtB,UAAU;AACV,CAAA,OAAO;AACP,CAAA,SAAS;AACT,CAAA,OAAO;CACP,WAAW;CACX,IAAI;AACJ,CAAA,cAAc;AACd,CAAA,OAAO;AACR,EAAA;;AAEA,aAAe;CACd,IAAI,EAAE,uBAAuB;;AAE7B,CAAA,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa;;AAE/C,CAAA,KAAK,EAAE,CAAC,OAAO,CAAC;;AAEhB,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;EACN,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAK,EAAA;EAChC;;AAED,CAAA,QAAQ,EAAE;AACT;;AAEC;AACA;AACA;;AAED,EAAA,OAAO,GAAG;AACT,GAAA,MAAM,IAAG,GAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CA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CAAE,IAAG,QAAO;GACtB;;AAED;AACC;AACA;;;;AAID,EAAA,QAAQ,CAAC,IAAI,EAAE;AACd,GAAA,OAAO;AACN,IAAA,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC;AAC3C,IAAA,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC;AACrC,IAAA,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,CAAC;IACnC,CAAC,IAAI,KAAK,IAAG;GACd;;AAED;;AAEC;;;;;;AAMA;;;AAGA;;;;AAID,EAAA,GAAG,CAAC,EAAE,EAAE;AACP,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAA;AACrB,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnFlowStepPickerModal.vue2.js","sources":["../../../src/dialogs/CnFlowStepPickerModal.vue"],"sourcesContent":["<!--\n CnFlowStepPickerModal β every step the engine offers, searchable, in a modal.\n\n WHY THIS IS NOT A SIDEBAR PANEL ANY MORE\n ----------------------------------------\n The palette lived in the Steps tab, a column roughly 300px wide, and a live\n instance serves SIXTY-FIVE step types into it. A one-per-row list that long is\n not a chooser; it is a scroll. The author who knows what they want scrolls\n past it, and the author who does not cannot see enough at once to compare.\n\n A modal has the whole window. The same entries render as a grid, so a screen\n shows a dozen at a glance instead of three, and the search and the type filter\n sit above them rather than competing with the graph for the sidebar's width.\n\n It also frees the sidebar. With the palette gone the sidebar is the flow's\n runs, which is what an author looks at once the graph is built.\n\n WHAT IS CARRIED ACROSS, DELIBERATELY\n ------------------------------------\n DRAGGING. A step can be dragged from here onto the canvas exactly as it could\n from the palette, through the same `store.paletteDragType`. Clicking still\n adds to the graph. Losing either would trade one interaction for another\n rather than moving the surface.\n\n THE THREE EMPTY STATES, which say three different things: the catalogue is\n still loading, the catalogue is empty (the server could not be read, which is\n a standing condition of the flow and is ALSO on the canvas), and the search\n matched nothing. Collapsing them into one \"nothing here\" was the version of\n this that made a broken catalogue look like a bad search term.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog :name=\"t('nextcloud-vue', 'Add a step')\"\n\t\tsize=\"large\"\n\t\tdata-testid=\"flow-step-picker\"\n\t\t@closing=\"$emit('close')\">\n\t\t<div class=\"cn-step-picker\">\n\t\t\t<div class=\"cn-step-picker__controls\">\n\t\t\t\t<NcTextField :modelValue=\"search\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Search steps')\"\n\t\t\t\t\ttrailingButtonIcon=\"close\"\n\t\t\t\t\t:showTrailingButton=\"search !== ''\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-search\"\n\t\t\t\t\t@trailingButtonClick=\"search = ''\"\n\t\t\t\t\t@update:modelValue=\"search = $event\" />\n\n\t\t\t\t<NcSelect :modelValue=\"roleOption\"\n\t\t\t\t\t:options=\"roleOptions\"\n\t\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Type')\"\n\t\t\t\t\t:clearable=\"false\"\n\t\t\t\t\t@update:modelValue=\"role = $event ? $event.id : null\" />\n\t\t\t</div>\n\n\t\t\t<p v-if=\"store.catalogLoading && !store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'Loading the available stepsβ¦') }}\n\t\t\t</p>\n\t\t\t<!--\n\t\t\t\tWhy the list is empty, AT the list. One short line, because the\n\t\t\t\tdiagnosis β the catalogue could not be read, and no step can be\n\t\t\t\tadded at all β is a standing condition of the flow and renders on\n\t\t\t\tthe canvas with every other message.\n\t\t\t-->\n\t\t\t<p v-else-if=\"!store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'No steps are available to add.') }}\n\t\t\t</p>\n\t\t\t<p v-else-if=\"!entries.length\" class=\"cn-step-picker__hint\" data-testid=\"flow-step-picker-nomatch\">\n\t\t\t\t{{ t('nextcloud-vue', 'No step matches this search.') }}\n\t\t\t</p>\n\t\t\t<template v-else>\n\t\t\t\t<section v-for=\"group in groups\"\n\t\t\t\t\t:key=\"group.category\"\n\t\t\t\t\tclass=\"cn-step-picker__group\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-group\"\n\t\t\t\t\t:data-category=\"group.category\">\n\t\t\t\t\t<h3 class=\"cn-step-picker__group-title\">\n\t\t\t\t\t\t{{ group.label }}\n\t\t\t\t\t\t<span class=\"cn-step-picker__group-count\">{{ group.entries.length }}</span>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<ul class=\"cn-step-picker__grid\">\n\t\t\t\t\t\t<li v-for=\"entry in group.entries\"\n\t\t\t\t\t\t\t:key=\"entry.id\"\n\t\t\t\t\t\t\tclass=\"cn-step-picker__item\"\n\t\t\t\t\t\t\tdraggable=\"true\"\n\t\t\t\t\t\t\t:title=\"entry.description\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-picker-item\"\n\t\t\t\t\t\t\t@dragstart=\"store.paletteDragType = entry.id\"\n\t\t\t\t\t\t\t@dragend=\"store.paletteDragType = null\"\n\t\t\t\t\t\t\t@click=\"add(entry.id)\">\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__name\">{{ entry.displayName || entry.id }}</span>\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__role\"\n\t\t\t\t\t\t\t\t\t:class=\"`cn-step-picker__role--${entry.role}`\">\n\t\t\t\t\t\t\t\t\t{{ roleWord(entry.role) }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"entry.description\" class=\"cn-step-picker__description\">{{ entry.description }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__id\">{{ entry.id }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * The palette's groups, in the order it presents them.\n *\n * Mirrors `IFlowNodeTaxonomy::CATEGORIES` in openregister. Kept as a literal\n * rather than derived from the catalogue for the reason in `groups()`: a\n * discovered order is an accident of which apps are installed.\n */\nconst CATEGORY_ORDER = [\n\t'triggers',\n\t'human',\n\t'objects',\n\t'logic',\n\t'messaging',\n\t'ai',\n\t'integrations',\n\t'other',\n]\n\nexport default {\n\tname: 'CnFlowStepPickerModal',\n\n\tcomponents: { NcDialog, NcSelect, NcTextField },\n\n\tprops: {\n\t\t/** Add the step at the bottom of the list view, wired in, not loose on the canvas. */\n\t\tappend: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { search: '', role: null }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The catalogue, filtered and ordered the way an author reads it:\n\t\t * triggers first, then steps, then ends.\n\t\t *\n\t\t * @return {Array<object>} The entries to show.\n\t\t */\n\t\tentries() {\n\t\t\tconst rank = { trigger: 0, step: 1, end: 2 }\n\t\t\tconst needle = this.search.trim().toLowerCase()\n\n\t\t\treturn this.store.nodeCatalog\n\t\t\t\t.map((entry) => ({ ...entry, role: this.store.roleOfNodeType(entry.id) }))\n\t\t\t\t.filter((entry) => !this.role || entry.role === this.role)\n\t\t\t\t.filter((entry) => {\n\t\t\t\t\tif (!needle) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `${entry.id} ${entry.displayName || ''} ${entry.description || ''}`\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.includes(needle)\n\t\t\t\t})\n\t\t\t\t// Stable: equal roles keep the catalogue's own order.\n\t\t\t\t.map((entry, index) => ({ entry, index }))\n\t\t\t\t.sort((a, b) => ((rank[a.entry.role] ?? 1) - (rank[b.entry.role] ?? 1)) || (a.index - b.index))\n\t\t\t\t.map(({ entry }) => entry)\n\t\t},\n\n\t\t/**\n\t\t * The entries grouped by category, in a FIXED order.\n\t\t *\n\t\t * π΄ THE ORDER IS DECLARED, NOT DISCOVERED. Registration order depends\n\t\t * on which apps are installed and in what order their listeners fire,\n\t\t * so a palette ordered by the catalogue's own sequence reorders itself\n\t\t * when an unrelated app is enabled, and an author's muscle memory is\n\t\t * wrong through no change of theirs.\n\t\t *\n\t\t * An empty category is omitted rather than rendered as a heading with\n\t\t * nothing under it. `other` is last because it is the prompt for a node\n\t\t * whose owner has not declared yet, not a home.\n\t\t *\n\t\t * @return {Array<object>} One entry per non-empty category.\n\t\t */\n\t\tgroups() {\n\t\t\tconst byCategory = new Map()\n\t\t\tfor (const entry of this.entries) {\n\t\t\t\t// The server always sends a category; an older instance that\n\t\t\t\t// does not is read as undeclared rather than dropped.\n\t\t\t\tconst category = entry.category || 'other'\n\t\t\t\tif (!byCategory.has(category)) {\n\t\t\t\t\tbyCategory.set(category, [])\n\t\t\t\t}\n\t\t\t\tbyCategory.get(category).push(entry)\n\t\t\t}\n\n\t\t\t// Anything the server sends that this build does not know about\n\t\t\t// still gets shown, after the known ones and before `other`.\n\t\t\tconst known = CATEGORY_ORDER.filter((c) => c !== 'other')\n\t\t\tconst unknown = [...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)).sort()\n\t\t\tconst order = [...known, ...unknown, 'other']\n\n\t\t\treturn order\n\t\t\t\t.filter((category) => byCategory.has(category))\n\t\t\t\t.map((category) => ({\n\t\t\t\t\tcategory,\n\t\t\t\t\tlabel: this.categoryLabel(category),\n\t\t\t\t\tentries: byCategory.get(category),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The type filter's options.\n\t\t */\n\t\troleOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: null, label: this.t('nextcloud-vue', 'All types') },\n\t\t\t\t{ id: 'trigger', label: this.t('nextcloud-vue', 'Triggers') },\n\t\t\t\t{ id: 'step', label: this.t('nextcloud-vue', 'Steps') },\n\t\t\t\t{ id: 'end', label: this.t('nextcloud-vue', 'End') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * @return {object} The selected option.\n\t\t */\n\t\troleOption() {\n\t\t\treturn this.roleOptions.find((o) => o.id === this.role) || this.roleOptions[0]\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A category's heading, in the author's language.\n\t\t *\n\t\t * A category this build does not know is shown by its own id rather\n\t\t * than hidden: a group an author can see and ask about beats a step\n\t\t * that silently is not there.\n\t\t *\n\t\t * @param {string} category The category id.\n\t\t * @return {string} The heading.\n\t\t */\n\t\tcategoryLabel(category) {\n\t\t\treturn {\n\t\t\t\ttriggers: this.t('nextcloud-vue', 'Triggers'),\n\t\t\t\thuman: this.t('nextcloud-vue', 'People'),\n\t\t\t\tobjects: this.t('nextcloud-vue', 'Objects'),\n\t\t\t\tlogic: this.t('nextcloud-vue', 'Logic'),\n\t\t\t\tmessaging: this.t('nextcloud-vue', 'Messaging'),\n\t\t\t\tai: this.t('nextcloud-vue', 'AI'),\n\t\t\t\tintegrations: this.t('nextcloud-vue', 'Integrations'),\n\t\t\t\tother: this.t('nextcloud-vue', 'Other'),\n\t\t\t}[category] || category\n\t\t},\n\n\t\t/**\n\t\t * The role, in the author's language.\n\t\t *\n\t\t * @param {string} role The role.\n\t\t * @return {string} The word.\n\t\t */\n\t\troleWord(role) {\n\t\t\treturn {\n\t\t\t\ttrigger: this.t('nextcloud-vue', 'Trigger'),\n\t\t\t\tstep: this.t('nextcloud-vue', 'Step'),\n\t\t\t\tend: this.t('nextcloud-vue', 'End'),\n\t\t\t}[role] || role\n\t\t},\n\n\t\t/**\n\t\t * Add the step and get out of the way β whether it worked or not.\n\t\t *\n\t\t * π΄ IT CLOSES ON A REFUSAL TOO, and that is the correction of a wrong\n\t\t * first answer. I had it stay open when the graph refused the step, on\n\t\t * the reasoning that closing would hide the refusal. It is the other\n\t\t * way round: the refusal renders in the CANVAS message area, and this\n\t\t * modal covers the canvas. Staying open is what hides it.\n\t\t *\n\t\t * So both outcomes end here, and both are visible behind: the step\n\t\t * arriving on the graph, or the message saying why it did not.\n\t\t *\n\t\t * @param {string} id The node type.\n\t\t * @return {void}\n\t\t */\n\t\tadd(id) {\n\t\t\tif (this.append) {\n\t\t\t\tthis.store.appendStep(id)\n\t\t\t} else {\n\t\t\t\tthis.store.addNode(id)\n\t\t\t}\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-step-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 8px 0;\n\t/* The dialog is tall; the grid scrolls, the controls do not. */\n\tmax-block-size: 70vh;\n}\n\n.cn-step-picker__controls {\n\tdisplay: flex;\n\tgap: 12px;\n\tflex-wrap: wrap;\n\talign-items: end;\n}\n\n.cn-step-picker__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n/* THE WHOLE POINT OF THE MODAL: a grid, so sixty-five entries can be compared\n rather than scrolled past one at a time. `auto-fill` rather than a fixed\n count, so the same markup works in a narrow window. */\n.cn-step-picker__group {\n\tmargin-block-start: 16px;\n}\n\n.cn-step-picker__group-title {\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tfont-weight: bold;\n\tdisplay: flex;\n\talign-items: baseline;\n\tgap: 8px;\n}\n\n.cn-step-picker__group-count {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-step-picker__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 8px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow-y: auto;\n}\n\n.cn-step-picker__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tpadding: 10px 12px;\n\tborder: 2px solid transparent;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-step-picker__item:hover,\n.cn-step-picker__item:focus-visible {\n\tborder-color: var(--color-primary-element);\n}\n\n.cn-step-picker__head {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tjustify-content: space-between;\n}\n\n.cn-step-picker__name {\n\tfont-weight: bold;\n}\n\n.cn-step-picker__role {\n\tfont-size: 0.8em;\n\ttext-transform: uppercase;\n\tcolor: var(--color-text-maxcontrast);\n\tletter-spacing: 0.04em;\n}\n\n.cn-step-picker__role--trigger { color: var(--color-primary-element); }\n\n.cn-step-picker__role--end { color: var(--color-warning-text, var(--color-warning)); }\n\n.cn-step-picker__description {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-step-picker__id {\n\tfont-family: monospace;\n\tfont-size: 0.8em;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;;;AAgHA;AACC;AACA;AACA;;;;AAID,MAAM,iBAAiB;CACtB,UAAU;AACV,CAAA,OAAO;AACP,CAAA,SAAS;AACT,CAAA,OAAO;CACP,WAAW;CACX,IAAI;AACJ,CAAA,cAAc;AACd,CAAA,OAAO;AACR,EAAA;;AAEA,aAAe;CACd,IAAI,EAAE,uBAAuB;;AAE7B,CAAA,UAAU,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa;;AAE/C,CAAA,KAAK,EAAE;AACN;AACA,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;EACD;;AAED,CAAA,KAAK,EAAE,CAAC,OAAO,CAAC;;AAEhB,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,E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E,WAAW,CAAC;AAC/C,IAAA,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,IAAI,CAAC;IACjC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,cAAc,CAAC;AACrD,IAAA,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC;AACxC,IAAC,CAAC,QAAQ,CAAE,IAAG,QAAO;GACtB;;AAED;AACC;AACA;;;;AAID,EAAA,QAAQ,CAAC,IAAI,EAAE;AACd,GAAA,OAAO;AACN,IAAA,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC;AAC3C,IAAA,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC;AACrC,IAAA,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,CAAC;IACnC,CAAC,IAAI,KAAK,IAAG;GACd;;AAED;;AAEC;;;;;;AAMA;;;AAGA;;;;AAID,EAAA,GAAG,CAAC,EAAE,EAAE;AACP,GAAA,IAAI,IAAI,CAAC,MAAM,EAAE;IAChB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAA;IACvB,MAAK;AACN,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAA;AACtB,IAAA;AACA,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnFlowStepPickerModal.vue3.js","sources":["../../../src/dialogs/CnFlowStepPickerModal.vue?vue&type=template&id=3c6012bb&lang.js"],"sourcesContent":["<!--\n CnFlowStepPickerModal β every step the engine offers, searchable, in a modal.\n\n WHY THIS IS NOT A SIDEBAR PANEL ANY MORE\n ----------------------------------------\n The palette lived in the Steps tab, a column roughly 300px wide, and a live\n instance serves SIXTY-FIVE step types into it. A one-per-row list that long is\n not a chooser; it is a scroll. The author who knows what they want scrolls\n past it, and the author who does not cannot see enough at once to compare.\n\n A modal has the whole window. The same entries render as a grid, so a screen\n shows a dozen at a glance instead of three, and the search and the type filter\n sit above them rather than competing with the graph for the sidebar's width.\n\n It also frees the sidebar. With the palette gone the sidebar is the flow's\n runs, which is what an author looks at once the graph is built.\n\n WHAT IS CARRIED ACROSS, DELIBERATELY\n ------------------------------------\n DRAGGING. A step can be dragged from here onto the canvas exactly as it could\n from the palette, through the same `store.paletteDragType`. Clicking still\n adds to the graph. Losing either would trade one interaction for another\n rather than moving the surface.\n\n THE THREE EMPTY STATES, which say three different things: the catalogue is\n still loading, the catalogue is empty (the server could not be read, which is\n a standing condition of the flow and is ALSO on the canvas), and the search\n matched nothing. Collapsing them into one \"nothing here\" was the version of\n this that made a broken catalogue look like a bad search term.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog :name=\"t('nextcloud-vue', 'Add a step')\"\n\t\tsize=\"large\"\n\t\tdata-testid=\"flow-step-picker\"\n\t\t@closing=\"$emit('close')\">\n\t\t<div class=\"cn-step-picker\">\n\t\t\t<div class=\"cn-step-picker__controls\">\n\t\t\t\t<NcTextField :modelValue=\"search\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Search steps')\"\n\t\t\t\t\ttrailingButtonIcon=\"close\"\n\t\t\t\t\t:showTrailingButton=\"search !== ''\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-search\"\n\t\t\t\t\t@trailingButtonClick=\"search = ''\"\n\t\t\t\t\t@update:modelValue=\"search = $event\" />\n\n\t\t\t\t<NcSelect :modelValue=\"roleOption\"\n\t\t\t\t\t:options=\"roleOptions\"\n\t\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Type')\"\n\t\t\t\t\t:clearable=\"false\"\n\t\t\t\t\t@update:modelValue=\"role = $event ? $event.id : null\" />\n\t\t\t</div>\n\n\t\t\t<p v-if=\"store.catalogLoading && !store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'Loading the available stepsβ¦') }}\n\t\t\t</p>\n\t\t\t<!--\n\t\t\t\tWhy the list is empty, AT the list. One short line, because the\n\t\t\t\tdiagnosis β the catalogue could not be read, and no step can be\n\t\t\t\tadded at all β is a standing condition of the flow and renders on\n\t\t\t\tthe canvas with every other message.\n\t\t\t-->\n\t\t\t<p v-else-if=\"!store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'No steps are available to add.') }}\n\t\t\t</p>\n\t\t\t<p v-else-if=\"!entries.length\" class=\"cn-step-picker__hint\" data-testid=\"flow-step-picker-nomatch\">\n\t\t\t\t{{ t('nextcloud-vue', 'No step matches this search.') }}\n\t\t\t</p>\n\t\t\t<template v-else>\n\t\t\t\t<section v-for=\"group in groups\"\n\t\t\t\t\t:key=\"group.category\"\n\t\t\t\t\tclass=\"cn-step-picker__group\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-group\"\n\t\t\t\t\t:data-category=\"group.category\">\n\t\t\t\t\t<h3 class=\"cn-step-picker__group-title\">\n\t\t\t\t\t\t{{ group.label }}\n\t\t\t\t\t\t<span class=\"cn-step-picker__group-count\">{{ group.entries.length }}</span>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<ul class=\"cn-step-picker__grid\">\n\t\t\t\t\t\t<li v-for=\"entry in group.entries\"\n\t\t\t\t\t\t\t:key=\"entry.id\"\n\t\t\t\t\t\t\tclass=\"cn-step-picker__item\"\n\t\t\t\t\t\t\tdraggable=\"true\"\n\t\t\t\t\t\t\t:title=\"entry.description\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-picker-item\"\n\t\t\t\t\t\t\t@dragstart=\"store.paletteDragType = entry.id\"\n\t\t\t\t\t\t\t@dragend=\"store.paletteDragType = null\"\n\t\t\t\t\t\t\t@click=\"add(entry.id)\">\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__name\">{{ entry.displayName || entry.id }}</span>\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__role\"\n\t\t\t\t\t\t\t\t\t:class=\"`cn-step-picker__role--${entry.role}`\">\n\t\t\t\t\t\t\t\t\t{{ roleWord(entry.role) }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"entry.description\" class=\"cn-step-picker__description\">{{ entry.description }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__id\">{{ entry.id }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * The palette's groups, in the order it presents them.\n *\n * Mirrors `IFlowNodeTaxonomy::CATEGORIES` in openregister. Kept as a literal\n * rather than derived from the catalogue for the reason in `groups()`: a\n * discovered order is an accident of which apps are installed.\n */\nconst CATEGORY_ORDER = [\n\t'triggers',\n\t'human',\n\t'objects',\n\t'logic',\n\t'messaging',\n\t'ai',\n\t'integrations',\n\t'other',\n]\n\nexport default {\n\tname: 'CnFlowStepPickerModal',\n\n\tcomponents: { NcDialog, NcSelect, NcTextField },\n\n\temits: ['close'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { search: '', role: null }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The catalogue, filtered and ordered the way an author reads it:\n\t\t * triggers first, then steps, then ends.\n\t\t *\n\t\t * @return {Array<object>} The entries to show.\n\t\t */\n\t\tentries() {\n\t\t\tconst rank = { trigger: 0, step: 1, end: 2 }\n\t\t\tconst needle = this.search.trim().toLowerCase()\n\n\t\t\treturn this.store.nodeCatalog\n\t\t\t\t.map((entry) => ({ ...entry, role: this.store.roleOfNodeType(entry.id) }))\n\t\t\t\t.filter((entry) => !this.role || entry.role === this.role)\n\t\t\t\t.filter((entry) => {\n\t\t\t\t\tif (!needle) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `${entry.id} ${entry.displayName || ''} ${entry.description || ''}`\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.includes(needle)\n\t\t\t\t})\n\t\t\t\t// Stable: equal roles keep the catalogue's own order.\n\t\t\t\t.map((entry, index) => ({ entry, index }))\n\t\t\t\t.sort((a, b) => ((rank[a.entry.role] ?? 1) - (rank[b.entry.role] ?? 1)) || (a.index - b.index))\n\t\t\t\t.map(({ entry }) => entry)\n\t\t},\n\n\t\t/**\n\t\t * The entries grouped by category, in a FIXED order.\n\t\t *\n\t\t * π΄ THE ORDER IS DECLARED, NOT DISCOVERED. Registration order depends\n\t\t * on which apps are installed and in what order their listeners fire,\n\t\t * so a palette ordered by the catalogue's own sequence reorders itself\n\t\t * when an unrelated app is enabled, and an author's muscle memory is\n\t\t * wrong through no change of theirs.\n\t\t *\n\t\t * An empty category is omitted rather than rendered as a heading with\n\t\t * nothing under it. `other` is last because it is the prompt for a node\n\t\t * whose owner has not declared yet, not a home.\n\t\t *\n\t\t * @return {Array<object>} One entry per non-empty category.\n\t\t */\n\t\tgroups() {\n\t\t\tconst byCategory = new Map()\n\t\t\tfor (const entry of this.entries) {\n\t\t\t\t// The server always sends a category; an older instance that\n\t\t\t\t// does not is read as undeclared rather than dropped.\n\t\t\t\tconst category = entry.category || 'other'\n\t\t\t\tif (!byCategory.has(category)) {\n\t\t\t\t\tbyCategory.set(category, [])\n\t\t\t\t}\n\t\t\t\tbyCategory.get(category).push(entry)\n\t\t\t}\n\n\t\t\t// Anything the server sends that this build does not know about\n\t\t\t// still gets shown, after the known ones and before `other`.\n\t\t\tconst known = CATEGORY_ORDER.filter((c) => c !== 'other')\n\t\t\tconst unknown = [...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)).sort()\n\t\t\tconst order = [...known, ...unknown, 'other']\n\n\t\t\treturn order\n\t\t\t\t.filter((category) => byCategory.has(category))\n\t\t\t\t.map((category) => ({\n\t\t\t\t\tcategory,\n\t\t\t\t\tlabel: this.categoryLabel(category),\n\t\t\t\t\tentries: byCategory.get(category),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The type filter's options.\n\t\t */\n\t\troleOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: null, label: this.t('nextcloud-vue', 'All types') },\n\t\t\t\t{ id: 'trigger', label: this.t('nextcloud-vue', 'Triggers') },\n\t\t\t\t{ id: 'step', label: this.t('nextcloud-vue', 'Steps') },\n\t\t\t\t{ id: 'end', label: this.t('nextcloud-vue', 'End') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * @return {object} The selected option.\n\t\t */\n\t\troleOption() {\n\t\t\treturn this.roleOptions.find((o) => o.id === this.role) || this.roleOptions[0]\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A category's heading, in the author's language.\n\t\t *\n\t\t * A category this build does not know is shown by its own id rather\n\t\t * than hidden: a group an author can see and ask about beats a step\n\t\t * that silently is not there.\n\t\t *\n\t\t * @param {string} category The category id.\n\t\t * @return {string} The heading.\n\t\t */\n\t\tcategoryLabel(category) {\n\t\t\treturn {\n\t\t\t\ttriggers: this.t('nextcloud-vue', 'Triggers'),\n\t\t\t\thuman: this.t('nextcloud-vue', 'People'),\n\t\t\t\tobjects: this.t('nextcloud-vue', 'Objects'),\n\t\t\t\tlogic: this.t('nextcloud-vue', 'Logic'),\n\t\t\t\tmessaging: this.t('nextcloud-vue', 'Messaging'),\n\t\t\t\tai: this.t('nextcloud-vue', 'AI'),\n\t\t\t\tintegrations: this.t('nextcloud-vue', 'Integrations'),\n\t\t\t\tother: this.t('nextcloud-vue', 'Other'),\n\t\t\t}[category] || category\n\t\t},\n\n\t\t/**\n\t\t * The role, in the author's language.\n\t\t *\n\t\t * @param {string} role The role.\n\t\t * @return {string} The word.\n\t\t */\n\t\troleWord(role) {\n\t\t\treturn {\n\t\t\t\ttrigger: this.t('nextcloud-vue', 'Trigger'),\n\t\t\t\tstep: this.t('nextcloud-vue', 'Step'),\n\t\t\t\tend: this.t('nextcloud-vue', 'End'),\n\t\t\t}[role] || role\n\t\t},\n\n\t\t/**\n\t\t * Add the step and get out of the way β whether it worked or not.\n\t\t *\n\t\t * π΄ IT CLOSES ON A REFUSAL TOO, and that is the correction of a wrong\n\t\t * first answer. I had it stay open when the graph refused the step, on\n\t\t * the reasoning that closing would hide the refusal. It is the other\n\t\t * way round: the refusal renders in the CANVAS message area, and this\n\t\t * modal covers the canvas. Staying open is what hides it.\n\t\t *\n\t\t * So both outcomes end here, and both are visible behind: the step\n\t\t * arriving on the graph, or the message saying why it did not.\n\t\t *\n\t\t * @param {string} id The node type.\n\t\t * @return {void}\n\t\t */\n\t\tadd(id) {\n\t\t\tthis.store.addNode(id)\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-step-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 8px 0;\n\t/* The dialog is tall; the grid scrolls, the controls do not. */\n\tmax-block-size: 70vh;\n}\n\n.cn-step-picker__controls {\n\tdisplay: flex;\n\tgap: 12px;\n\tflex-wrap: wrap;\n\talign-items: end;\n}\n\n.cn-step-picker__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n/* THE WHOLE POINT OF THE MODAL: a grid, so sixty-five entries can be compared\n rather than scrolled past one at a time. `auto-fill` rather than a fixed\n count, so the same markup works in a narrow window. */\n.cn-step-picker__group {\n\tmargin-block-start: 16px;\n}\n\n.cn-step-picker__group-title {\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tfont-weight: bold;\n\tdisplay: flex;\n\talign-items: baseline;\n\tgap: 8px;\n}\n\n.cn-step-picker__group-count {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-step-picker__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 8px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow-y: auto;\n}\n\n.cn-step-picker__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tpadding: 10px 12px;\n\tborder: 2px solid transparent;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-step-picker__item:hover,\n.cn-step-picker__item:focus-visible {\n\tborder-color: var(--color-primary-element);\n}\n\n.cn-step-picker__head {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tjustify-content: space-between;\n}\n\n.cn-step-picker__name {\n\tfont-weight: bold;\n}\n\n.cn-step-picker__role {\n\tfont-size: 0.8em;\n\ttext-transform: uppercase;\n\tcolor: var(--color-text-maxcontrast);\n\tletter-spacing: 0.04em;\n}\n\n.cn-step-picker__role--trigger { color: var(--color-primary-element); }\n\n.cn-step-picker__role--end { color: var(--color-warning-text, var(--color-warning)); }\n\n.cn-step-picker__description {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-step-picker__id {\n\tfont-family: monospace;\n\tfont-size: 0.8em;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_createElementVNode","_createVNode","_createElementBlock","_toDisplayString"],"mappings":";;AAuEO,MAAA,UAAA,GAAA,EAAA,KAAI,EAAE,gBAAgB,GAAA;AACrB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,0BAAW,GAAA;;;AAgBoB,EAAA,KAAA,EAAA,sBAAA;;;;AASD,EAAA,KAAK,EAAC,sBAAsB;;;;AAG/D,EAAA,KAAA,EAAA,sBAAA;AAAA,EAAA,aAAA,E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EAAA,8BAAA,CAAA,CAAA,EAAA,CAAA,YAAA;cAQU,MAAK,CAAA,KAAA,CAAC,WAAW,CAAC,MAAM;4BAAnCD,kBAEA,CAAA,GAAA,EAFA,UAEA,EAAAC,eAAA,CADA,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,gCAAA,CAAA,CAAA,EAAA,CAAA,YAAA;AAEC,cAAA,CAAA,CAAA,QAAA,CAAA,OAAA,CAAA,MAAA;gDAEF,CAAA,GAAA,YAAA,EAAAA,eAAA,CADA,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,8BAAA,CAAA,CAAA,EAAA,CAAA,YAAA;kCAGJD,oDAAO,QAAA,CAAA,MAAA,EAAA,CAAA,KAAA,KAAA;uCAAPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnFlowStepPickerModal.vue3.js","sources":["../../../src/dialogs/CnFlowStepPickerModal.vue?vue&type=template&id=69168a80&lang.js"],"sourcesContent":["<!--\n CnFlowStepPickerModal β every step the engine offers, searchable, in a modal.\n\n WHY THIS IS NOT A SIDEBAR PANEL ANY MORE\n ----------------------------------------\n The palette lived in the Steps tab, a column roughly 300px wide, and a live\n instance serves SIXTY-FIVE step types into it. A one-per-row list that long is\n not a chooser; it is a scroll. The author who knows what they want scrolls\n past it, and the author who does not cannot see enough at once to compare.\n\n A modal has the whole window. The same entries render as a grid, so a screen\n shows a dozen at a glance instead of three, and the search and the type filter\n sit above them rather than competing with the graph for the sidebar's width.\n\n It also frees the sidebar. With the palette gone the sidebar is the flow's\n runs, which is what an author looks at once the graph is built.\n\n WHAT IS CARRIED ACROSS, DELIBERATELY\n ------------------------------------\n DRAGGING. A step can be dragged from here onto the canvas exactly as it could\n from the palette, through the same `store.paletteDragType`. Clicking still\n adds to the graph. Losing either would trade one interaction for another\n rather than moving the surface.\n\n THE THREE EMPTY STATES, which say three different things: the catalogue is\n still loading, the catalogue is empty (the server could not be read, which is\n a standing condition of the flow and is ALSO on the canvas), and the search\n matched nothing. Collapsing them into one \"nothing here\" was the version of\n this that made a broken catalogue look like a bad search term.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcDialog :name=\"t('nextcloud-vue', 'Add a step')\"\n\t\tsize=\"large\"\n\t\tdata-testid=\"flow-step-picker\"\n\t\t@closing=\"$emit('close')\">\n\t\t<div class=\"cn-step-picker\">\n\t\t\t<div class=\"cn-step-picker__controls\">\n\t\t\t\t<NcTextField :modelValue=\"search\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Search steps')\"\n\t\t\t\t\ttrailingButtonIcon=\"close\"\n\t\t\t\t\t:showTrailingButton=\"search !== ''\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-search\"\n\t\t\t\t\t@trailingButtonClick=\"search = ''\"\n\t\t\t\t\t@update:modelValue=\"search = $event\" />\n\n\t\t\t\t<NcSelect :modelValue=\"roleOption\"\n\t\t\t\t\t:options=\"roleOptions\"\n\t\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'Type')\"\n\t\t\t\t\t:clearable=\"false\"\n\t\t\t\t\t@update:modelValue=\"role = $event ? $event.id : null\" />\n\t\t\t</div>\n\n\t\t\t<p v-if=\"store.catalogLoading && !store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'Loading the available stepsβ¦') }}\n\t\t\t</p>\n\t\t\t<!--\n\t\t\t\tWhy the list is empty, AT the list. One short line, because the\n\t\t\t\tdiagnosis β the catalogue could not be read, and no step can be\n\t\t\t\tadded at all β is a standing condition of the flow and renders on\n\t\t\t\tthe canvas with every other message.\n\t\t\t-->\n\t\t\t<p v-else-if=\"!store.nodeCatalog.length\" class=\"cn-step-picker__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'No steps are available to add.') }}\n\t\t\t</p>\n\t\t\t<p v-else-if=\"!entries.length\" class=\"cn-step-picker__hint\" data-testid=\"flow-step-picker-nomatch\">\n\t\t\t\t{{ t('nextcloud-vue', 'No step matches this search.') }}\n\t\t\t</p>\n\t\t\t<template v-else>\n\t\t\t\t<section v-for=\"group in groups\"\n\t\t\t\t\t:key=\"group.category\"\n\t\t\t\t\tclass=\"cn-step-picker__group\"\n\t\t\t\t\tdata-testid=\"flow-step-picker-group\"\n\t\t\t\t\t:data-category=\"group.category\">\n\t\t\t\t\t<h3 class=\"cn-step-picker__group-title\">\n\t\t\t\t\t\t{{ group.label }}\n\t\t\t\t\t\t<span class=\"cn-step-picker__group-count\">{{ group.entries.length }}</span>\n\t\t\t\t\t</h3>\n\t\t\t\t\t<ul class=\"cn-step-picker__grid\">\n\t\t\t\t\t\t<li v-for=\"entry in group.entries\"\n\t\t\t\t\t\t\t:key=\"entry.id\"\n\t\t\t\t\t\t\tclass=\"cn-step-picker__item\"\n\t\t\t\t\t\t\tdraggable=\"true\"\n\t\t\t\t\t\t\t:title=\"entry.description\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-picker-item\"\n\t\t\t\t\t\t\t@dragstart=\"store.paletteDragType = entry.id\"\n\t\t\t\t\t\t\t@dragend=\"store.paletteDragType = null\"\n\t\t\t\t\t\t\t@click=\"add(entry.id)\">\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__name\">{{ entry.displayName || entry.id }}</span>\n\t\t\t\t\t\t\t\t<span class=\"cn-step-picker__role\"\n\t\t\t\t\t\t\t\t\t:class=\"`cn-step-picker__role--${entry.role}`\">\n\t\t\t\t\t\t\t\t\t{{ roleWord(entry.role) }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"entry.description\" class=\"cn-step-picker__description\">{{ entry.description }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-step-picker__id\">{{ entry.id }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcDialog, NcSelect, NcTextField } from '@nextcloud/vue'\nimport { useFlowStore } from '../composables/useFlowStore.js'\n\n/**\n * The palette's groups, in the order it presents them.\n *\n * Mirrors `IFlowNodeTaxonomy::CATEGORIES` in openregister. Kept as a literal\n * rather than derived from the catalogue for the reason in `groups()`: a\n * discovered order is an accident of which apps are installed.\n */\nconst CATEGORY_ORDER = [\n\t'triggers',\n\t'human',\n\t'objects',\n\t'logic',\n\t'messaging',\n\t'ai',\n\t'integrations',\n\t'other',\n]\n\nexport default {\n\tname: 'CnFlowStepPickerModal',\n\n\tcomponents: { NcDialog, NcSelect, NcTextField },\n\n\tprops: {\n\t\t/** Add the step at the bottom of the list view, wired in, not loose on the canvas. */\n\t\tappend: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['close'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { search: '', role: null }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The catalogue, filtered and ordered the way an author reads it:\n\t\t * triggers first, then steps, then ends.\n\t\t *\n\t\t * @return {Array<object>} The entries to show.\n\t\t */\n\t\tentries() {\n\t\t\tconst rank = { trigger: 0, step: 1, end: 2 }\n\t\t\tconst needle = this.search.trim().toLowerCase()\n\n\t\t\treturn this.store.nodeCatalog\n\t\t\t\t.map((entry) => ({ ...entry, role: this.store.roleOfNodeType(entry.id) }))\n\t\t\t\t.filter((entry) => !this.role || entry.role === this.role)\n\t\t\t\t.filter((entry) => {\n\t\t\t\t\tif (!needle) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `${entry.id} ${entry.displayName || ''} ${entry.description || ''}`\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.includes(needle)\n\t\t\t\t})\n\t\t\t\t// Stable: equal roles keep the catalogue's own order.\n\t\t\t\t.map((entry, index) => ({ entry, index }))\n\t\t\t\t.sort((a, b) => ((rank[a.entry.role] ?? 1) - (rank[b.entry.role] ?? 1)) || (a.index - b.index))\n\t\t\t\t.map(({ entry }) => entry)\n\t\t},\n\n\t\t/**\n\t\t * The entries grouped by category, in a FIXED order.\n\t\t *\n\t\t * π΄ THE ORDER IS DECLARED, NOT DISCOVERED. Registration order depends\n\t\t * on which apps are installed and in what order their listeners fire,\n\t\t * so a palette ordered by the catalogue's own sequence reorders itself\n\t\t * when an unrelated app is enabled, and an author's muscle memory is\n\t\t * wrong through no change of theirs.\n\t\t *\n\t\t * An empty category is omitted rather than rendered as a heading with\n\t\t * nothing under it. `other` is last because it is the prompt for a node\n\t\t * whose owner has not declared yet, not a home.\n\t\t *\n\t\t * @return {Array<object>} One entry per non-empty category.\n\t\t */\n\t\tgroups() {\n\t\t\tconst byCategory = new Map()\n\t\t\tfor (const entry of this.entries) {\n\t\t\t\t// The server always sends a category; an older instance that\n\t\t\t\t// does not is read as undeclared rather than dropped.\n\t\t\t\tconst category = entry.category || 'other'\n\t\t\t\tif (!byCategory.has(category)) {\n\t\t\t\t\tbyCategory.set(category, [])\n\t\t\t\t}\n\t\t\t\tbyCategory.get(category).push(entry)\n\t\t\t}\n\n\t\t\t// Anything the server sends that this build does not know about\n\t\t\t// still gets shown, after the known ones and before `other`.\n\t\t\tconst known = CATEGORY_ORDER.filter((c) => c !== 'other')\n\t\t\tconst unknown = [...byCategory.keys()].filter((c) => !CATEGORY_ORDER.includes(c)).sort()\n\t\t\tconst order = [...known, ...unknown, 'other']\n\n\t\t\treturn order\n\t\t\t\t.filter((category) => byCategory.has(category))\n\t\t\t\t.map((category) => ({\n\t\t\t\t\tcategory,\n\t\t\t\t\tlabel: this.categoryLabel(category),\n\t\t\t\t\tentries: byCategory.get(category),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The type filter's options.\n\t\t */\n\t\troleOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: null, label: this.t('nextcloud-vue', 'All types') },\n\t\t\t\t{ id: 'trigger', label: this.t('nextcloud-vue', 'Triggers') },\n\t\t\t\t{ id: 'step', label: this.t('nextcloud-vue', 'Steps') },\n\t\t\t\t{ id: 'end', label: this.t('nextcloud-vue', 'End') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * @return {object} The selected option.\n\t\t */\n\t\troleOption() {\n\t\t\treturn this.roleOptions.find((o) => o.id === this.role) || this.roleOptions[0]\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * A category's heading, in the author's language.\n\t\t *\n\t\t * A category this build does not know is shown by its own id rather\n\t\t * than hidden: a group an author can see and ask about beats a step\n\t\t * that silently is not there.\n\t\t *\n\t\t * @param {string} category The category id.\n\t\t * @return {string} The heading.\n\t\t */\n\t\tcategoryLabel(category) {\n\t\t\treturn {\n\t\t\t\ttriggers: this.t('nextcloud-vue', 'Triggers'),\n\t\t\t\thuman: this.t('nextcloud-vue', 'People'),\n\t\t\t\tobjects: this.t('nextcloud-vue', 'Objects'),\n\t\t\t\tlogic: this.t('nextcloud-vue', 'Logic'),\n\t\t\t\tmessaging: this.t('nextcloud-vue', 'Messaging'),\n\t\t\t\tai: this.t('nextcloud-vue', 'AI'),\n\t\t\t\tintegrations: this.t('nextcloud-vue', 'Integrations'),\n\t\t\t\tother: this.t('nextcloud-vue', 'Other'),\n\t\t\t}[category] || category\n\t\t},\n\n\t\t/**\n\t\t * The role, in the author's language.\n\t\t *\n\t\t * @param {string} role The role.\n\t\t * @return {string} The word.\n\t\t */\n\t\troleWord(role) {\n\t\t\treturn {\n\t\t\t\ttrigger: this.t('nextcloud-vue', 'Trigger'),\n\t\t\t\tstep: this.t('nextcloud-vue', 'Step'),\n\t\t\t\tend: this.t('nextcloud-vue', 'End'),\n\t\t\t}[role] || role\n\t\t},\n\n\t\t/**\n\t\t * Add the step and get out of the way β whether it worked or not.\n\t\t *\n\t\t * π΄ IT CLOSES ON A REFUSAL TOO, and that is the correction of a wrong\n\t\t * first answer. I had it stay open when the graph refused the step, on\n\t\t * the reasoning that closing would hide the refusal. It is the other\n\t\t * way round: the refusal renders in the CANVAS message area, and this\n\t\t * modal covers the canvas. Staying open is what hides it.\n\t\t *\n\t\t * So both outcomes end here, and both are visible behind: the step\n\t\t * arriving on the graph, or the message saying why it did not.\n\t\t *\n\t\t * @param {string} id The node type.\n\t\t * @return {void}\n\t\t */\n\t\tadd(id) {\n\t\t\tif (this.append) {\n\t\t\t\tthis.store.appendStep(id)\n\t\t\t} else {\n\t\t\t\tthis.store.addNode(id)\n\t\t\t}\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-step-picker {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 8px 0;\n\t/* The dialog is tall; the grid scrolls, the controls do not. */\n\tmax-block-size: 70vh;\n}\n\n.cn-step-picker__controls {\n\tdisplay: flex;\n\tgap: 12px;\n\tflex-wrap: wrap;\n\talign-items: end;\n}\n\n.cn-step-picker__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n/* THE WHOLE POINT OF THE MODAL: a grid, so sixty-five entries can be compared\n rather than scrolled past one at a time. `auto-fill` rather than a fixed\n count, so the same markup works in a narrow window. */\n.cn-step-picker__group {\n\tmargin-block-start: 16px;\n}\n\n.cn-step-picker__group-title {\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tfont-weight: bold;\n\tdisplay: flex;\n\talign-items: baseline;\n\tgap: 8px;\n}\n\n.cn-step-picker__group-count {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-step-picker__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 8px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow-y: auto;\n}\n\n.cn-step-picker__item {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tpadding: 10px 12px;\n\tborder: 2px solid transparent;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-step-picker__item:hover,\n.cn-step-picker__item:focus-visible {\n\tborder-color: var(--color-primary-element);\n}\n\n.cn-step-picker__head {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tjustify-content: space-between;\n}\n\n.cn-step-picker__name {\n\tfont-weight: bold;\n}\n\n.cn-step-picker__role {\n\tfont-size: 0.8em;\n\ttext-transform: uppercase;\n\tcolor: var(--color-text-maxcontrast);\n\tletter-spacing: 0.04em;\n}\n\n.cn-step-picker__role--trigger { color: var(--color-primary-element); }\n\n.cn-step-picker__role--end { color: var(--color-warning-text, var(--color-warning)); }\n\n.cn-step-picker__description {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-step-picker__id {\n\tfont-family: monospace;\n\tfont-size: 0.8em;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_createElementVNode","_createVNode","_createElementBlock","_toDisplayString"],"mappings":";;AAuEO,MAAA,UAAA,GAAA,EAAA,KAAI,EAAE,gBAAgB,GAAA;AACrB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,0BAAW,GAAA;;;AAgBoB,EAAA,KAAA,EAAA,sBAAA;;;;AASD,EAAA,KAAK,EAAC,sBAAsB;;;;AAG/D,EAAA,KAAA,EAAA,sBAAA;AAAA,EAAA,aAAA,EAAA,0BAAA;;;;;;;;;;;;;;;;;;;;;AAjCG,IAAA,IAAI,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,YAAA,CAAA;QACd,EAAE,OAAO;AACX,IAAA,aAAG,EAAA,kBAAA;AACH,IAAA,SAAO,uCAAC,IAAM,CAAA,KAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;AAEZ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AAA,CAAA,QAAA,CAAA,OAAA,CAAA,MAAA;gDAEF,CAAA,GAAA,YAAA,EAAAA,eAAA,CADA,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,8BAAA,CAAA,CAAA,EAAA,CAAA,YAAA;kCAGJD,oDAAO,QAAA,CAAA,MAAA,EAAA,CAAA,KAAA,KAAA;uCAAPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -202,7 +202,9 @@ export { default as CnFlowRunsWidget } from './components/CnFlowRunsWidget/CnFlo
|
|
|
202
202
|
export { default as CnFlowRunsWidgetForm } from './components/CnFlowRunsWidgetForm/CnFlowRunsWidgetForm.vue.js';
|
|
203
203
|
export { default as CnFlowSidebar } from './components/CnFlowDetail/CnFlowSidebar.vue.js';
|
|
204
204
|
export { default as CnFlowsPage } from './components/CnFlowsPage/CnFlowsPage.vue.js';
|
|
205
|
+
export { default as CnFlowStepList } from './components/CnFlowDetail/CnFlowStepList.vue.js';
|
|
205
206
|
export { default as CnFlowStepOutcomes } from './components/CnFlowStepOutcomes/CnFlowStepOutcomes.vue.js';
|
|
207
|
+
export { default as CnFlowViewSwitch } from './components/CnFlowDetail/CnFlowViewSwitch.vue.js';
|
|
206
208
|
export { default as CnFolderSidebar } from './components/CnFolderSidebar/CnFolderSidebar.vue.js';
|
|
207
209
|
export { default as CnFolderTree } from './components/CnFolderTree/CnFolderTree.vue.js';
|
|
208
210
|
export { default as CnFollowToggle } from './components/CnFollowToggle/CnFollowToggle.vue.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|