@conduction/nextcloud-vue 2.56.0-beta.74 → 2.56.0-beta.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnFlowStepList.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnFlowStepList.vue"],"sourcesContent":["<!--\n CnFlowStepList — a flow as a list: the trigger, then the steps in run order.\n\n The list view of the same flow the canvas draws (board OrFlowStappenlijst).\n It keeps no state of its own: the rows are read from the flow store and every\n button goes through a store action, so both views always show one document\n and Ctrl+Z undoes a change made here as well.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-flow-step-list\" data-testid=\"flow-step-list\">\n\t\t<section :aria-labelledby=\"`${uid}-when`\" class=\"cn-flow-step-list__section\">\n\t\t\t<h2 :id=\"`${uid}-when`\" class=\"cn-flow-step-list__title\">\n\t\t\t\t{{ t('nextcloud-vue', 'When') }}\n\t\t\t</h2>\n\t\t\t<div v-for=\"row in list.triggers\"\n\t\t\t\t:key=\"row.id\"\n\t\t\t\tclass=\"cn-flow-step-list__row\"\n\t\t\t\t:class=\"{ 'cn-flow-step-list__row--selected': isSelected(row) }\"\n\t\t\t\tdata-testid=\"flow-step-trigger\">\n\t\t\t\t<span class=\"cn-flow-step-list__badge cn-flow-step-list__badge--trigger\" aria-hidden=\"true\">\n\t\t\t\t\t<LightningBolt :size=\"16\" />\n\t\t\t\t</span>\n\t\t\t\t<div class=\"cn-flow-step-list__body\">\n\t\t\t\t\t<span class=\"cn-flow-step-list__head\">\n\t\t\t\t\t\t<strong>{{ titleOf(row.node) }}</strong>\n\t\t\t\t\t\t<CnStatusBadge :label=\"kindOf(row.node)\" variant=\"success\" size=\"small\" />\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<CnStatusBadge v-if=\"stateOf(row)\" :label=\"stateOf(row).label\" :variant=\"stateOf(row).variant\" />\n\t\t\t\t<NcButton v-if=\"editable\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Change trigger')\"\n\t\t\t\t\t:title=\"t('nextcloud-vue', 'Change trigger')\"\n\t\t\t\t\tdata-testid=\"flow-step-edit\"\n\t\t\t\t\t@click=\"$emit('edit', row.id)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"18\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"list.triggers.length === 0\" class=\"cn-flow-step-list__empty\" data-testid=\"flow-step-no-trigger\">\n\t\t\t\t{{ t('nextcloud-vue', 'This flow has no trigger yet.') }}\n\t\t\t</p>\n\t\t</section>\n\n\t\t<section :aria-labelledby=\"`${uid}-then`\" class=\"cn-flow-step-list__section\">\n\t\t\t<h2 :id=\"`${uid}-then`\" class=\"cn-flow-step-list__title\">\n\t\t\t\t{{ t('nextcloud-vue', 'Then, in this order') }}\n\t\t\t</h2>\n\t\t\t<ol class=\"cn-flow-step-list__steps\">\n\t\t\t\t<li v-for=\"row in list.steps\"\n\t\t\t\t\t:key=\"row.id\"\n\t\t\t\t\tclass=\"cn-flow-step-list__row\"\n\t\t\t\t\t:class=\"{ 'cn-flow-step-list__row--selected': isSelected(row), 'cn-flow-step-list__row--end': row.role === 'end' }\"\n\t\t\t\t\tdata-testid=\"flow-step-row\">\n\t\t\t\t\t<span class=\"cn-flow-step-list__badge\" aria-hidden=\"true\">{{ row.n }}</span>\n\t\t\t\t\t<div class=\"cn-flow-step-list__body\">\n\t\t\t\t\t\t<span v-if=\"row.when\" class=\"cn-flow-step-list__when\" data-testid=\"flow-step-when\">\n\t\t\t\t\t\t\t<CallSplit :size=\"14\" />\n\t\t\t\t\t\t\t{{ row.when }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"cn-flow-step-list__head\">\n\t\t\t\t\t\t\t<strong>{{ titleOf(row.node) }}</strong>\n\t\t\t\t\t\t\t<CnStatusBadge :label=\"kindOf(row.node)\" size=\"small\" />\n\t\t\t\t\t\t\t<CnStatusBadge v-if=\"row.loose\"\n\t\t\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Not connected')\"\n\t\t\t\t\t\t\t\tvariant=\"warning\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tdata-testid=\"flow-step-loose\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-if=\"row.routes.length > 0\" class=\"cn-flow-step-list__routes\" data-testid=\"flow-step-routes\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Routes:') }}\n\t\t\t\t\t\t\t<span v-for=\"route in row.routes\" :key=\"route.id\" class=\"cn-flow-step-list__route\">\n\t\t\t\t\t\t\t\t{{ route.label }}\n\t\t\t\t\t\t\t\t<ArrowRight :size=\"14\" />\n\t\t\t\t\t\t\t\t{{ route.to }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CnStatusBadge v-if=\"stateOf(row)\" :label=\"stateOf(row).label\" :variant=\"stateOf(row).variant\" />\n\t\t\t\t\t<CnStatusBadge v-if=\"isReadonly(row)\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Admins only')\"\n\t\t\t\t\t\tvariant=\"warning\"\n\t\t\t\t\t\tdata-testid=\"flow-step-admin\" />\n\t\t\t\t\t<span v-if=\"editable && !isReadonly(row)\"\n\t\t\t\t\t\trole=\"group\"\n\t\t\t\t\t\tclass=\"cn-flow-step-list__actions\"\n\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Actions for step {n}', { n: row.n })\">\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Up')\"\n\t\t\t\t\t\t\t:title=\"moveTitle(row.canMoveUp, t('nextcloud-vue', 'Up'))\"\n\t\t\t\t\t\t\t:disabled=\"!row.canMoveUp\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-up\"\n\t\t\t\t\t\t\t@click=\"store.moveStep({ id: row.id, by: -1 })\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<ChevronUp :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Down')\"\n\t\t\t\t\t\t\t:title=\"moveTitle(row.canMoveDown, t('nextcloud-vue', 'Down'))\"\n\t\t\t\t\t\t\t:disabled=\"!row.canMoveDown\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-down\"\n\t\t\t\t\t\t\t@click=\"store.moveStep({ id: row.id, by: 1 })\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<ChevronDown :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Edit')\"\n\t\t\t\t\t\t\t:title=\"t('nextcloud-vue', 'Edit')\"\n\t\t\t\t\t\t\t:aria-pressed=\"isSelected(row) ? 'true' : 'false'\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-edit\"\n\t\t\t\t\t\t\t@click=\"$emit('edit', row.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Delete')\"\n\t\t\t\t\t\t\t:title=\"t('nextcloud-vue', 'Delete')\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-delete\"\n\t\t\t\t\t\t\t@click=\"store.removeStep(row.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Delete :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t\t<div v-if=\"editable\" class=\"cn-flow-step-list__add\">\n\t\t\t\t<NcButton data-testid=\"flow-step-add\" @click=\"$emit('add')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"18\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('nextcloud-vue', 'Add step') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<span class=\"cn-flow-step-list__note\">{{ t('nextcloud-vue', 'A new step goes at the bottom; use the arrows to put it in place.') }}</span>\n\t\t\t</div>\n\t\t</section>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport CallSplit from 'vue-material-design-icons/CallSplit.vue'\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport ChevronUp from 'vue-material-design-icons/ChevronUp.vue'\nimport Delete from 'vue-material-design-icons/Delete.vue'\nimport LightningBolt from 'vue-material-design-icons/LightningBolt.vue'\nimport Pencil from 'vue-material-design-icons/Pencil.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport { useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowStepRows } from '../../utils/flowStepList.js'\nimport { CnStatusBadge } from '../CnStatusBadge/index.js'\n\nlet uidCounter = 0\n\n/**\n * The list view of a flow. CnFlowDetail renders it in place of the canvas when\n * its `view` is `list`, so the toolbar, messages and dialogs stay the same.\n */\nexport default {\n\tname: 'CnFlowStepList',\n\n\tcomponents: { ArrowRight, CallSplit, ChevronDown, ChevronUp, CnStatusBadge, Delete, LightningBolt, NcButton, Pencil, Plus },\n\n\tprops: {\n\t\t/**\n\t\t * A step's outcome in the open run, `(id) => { label, variant } | null`.\n\t\t */\n\t\tstepState: {\n\t\t\ttype: Function,\n\t\t\tdefault: () => null,\n\t\t},\n\n\t\t/** The ids of the steps the viewer can only read. */\n\t\treadonlySteps: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\n\temits: ['add', 'edit'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\tuidCounter += 1\n\n\t\treturn { uid: `cn-flow-step-list-${uidCounter}` }\n\t},\n\n\tcomputed: {\n\t\t/** @return {{triggers: Array<object>, steps: Array<object>}} The rows. */\n\t\tlist() {\n\t\t\treturn flowStepRows(this.store.stepGraph, this.titleOf)\n\t\t},\n\n\t\t/** @return {boolean} Whether the flow can be changed from here. */\n\t\teditable() {\n\t\t\treturn !this.store.graphLocked && !this.store.inRunView\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {object} node A flow node.\n\t\t * @return {string} The name it goes by.\n\t\t */\n\t\ttitleOf(node) {\n\t\t\treturn node.name || node.label || this.kindOf(node)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} node A flow node.\n\t\t * @return {string} What kind of step it is, from the catalogue.\n\t\t */\n\t\tkindOf(node) {\n\t\t\tconst entry = this.store.catalogEntry(node.type)\n\n\t\t\treturn entry?.displayName || node.type || node.id\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {boolean} Whether it is the selected step.\n\t\t */\n\t\tisSelected(row) {\n\t\t\treturn this.store.selectedNodeId === row.id\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {boolean} Whether the viewer can only read this step.\n\t\t */\n\t\tisReadonly(row) {\n\t\t\treturn this.readonlySteps.includes(row.id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {{label: string, variant: string}|null} Its outcome in the open run.\n\t\t */\n\t\tstateOf(row) {\n\t\t\treturn this.stepState(row.id)\n\t\t},\n\n\t\t/**\n\t\t * @param {boolean} possible Whether the move can be made.\n\t\t * @param {string} label The arrow's name.\n\t\t * @return {string} The arrow's tooltip.\n\t\t */\n\t\tmoveTitle(possible, label) {\n\t\t\treturn possible ? label : t('nextcloud-vue', 'Steps on a branch are moved on the canvas.')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-step-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tgap: 14px;\n\tbox-sizing: border-box;\n\tmin-block-size: 0;\n\tpadding: 12px;\n\toverflow-y: auto;\n}\n\n.cn-flow-step-list__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-step-list__title {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 700;\n\tletter-spacing: 0.06em;\n\ttext-transform: uppercase;\n}\n\n.cn-flow-step-list__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-flow-step-list__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\tpadding: 12px 14px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: 10px;\n\tbackground: var(--color-main-background);\n}\n\n.cn-flow-step-list__row--selected {\n\tborder-color: var(--color-primary-element);\n\tbox-shadow: 0 0 0 2px var(--color-primary-element);\n}\n\n.cn-flow-step-list__row--end {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-flow-step-list__badge {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\tinline-size: 34px;\n\tblock-size: 34px;\n\tborder-radius: 50%;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-weight: 700;\n}\n\n.cn-flow-step-list__badge--trigger {\n\tbackground: var(--color-success);\n\tcolor: var(--color-success-text-on-success, var(--color-primary-element-text));\n}\n\n.cn-flow-step-list__body {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 5px;\n\tmin-inline-size: 0;\n}\n\n.cn-flow-step-list__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-flow-step-list__when {\n\tdisplay: inline-flex;\n\talign-items: center;\n\talign-self: flex-start;\n\tgap: 6px;\n\tpadding: 2px 10px 2px 8px;\n\tborder: 1px dashed currentcolor;\n\tborder-radius: 10px;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n}\n\n.cn-flow-step-list__routes {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 6px;\n\tfont-size: 13px;\n}\n\n.cn-flow-step-list__route {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 1px 8px;\n\tborder-radius: 10px;\n\tbackground: var(--color-background-dark);\n\tfont-weight: 600;\n}\n\n.cn-flow-step-list__actions {\n\tdisplay: inline-flex;\n\tflex: none;\n\tgap: 4px;\n}\n\n.cn-flow-step-list__add {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n\tpadding-block-start: 4px;\n}\n\n.cn-flow-step-list__note,\n.cn-flow-step-list__empty {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n</style>\n"],"names":["CnStatusBadge","t"],"mappings":";;;;;;;;;;;;;;AAgKA,IAAI,UAAS,GAAI,EAAA;;AAEjB;AACC;;;AAGD,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;CAEtB,UAAU,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,iBAAEA,UAAa,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAG,EAAG;;AAE3H,CAAA,KAAK,EAAE;AACN;;;EAGA,SAAS,EAAE;GACV,IAAI,EAAE,QAAQ;AACd,GAAA,OAAO,EAAE,MAAM,IAAI;GACnB;;AAED;AACA,EAAA,aAAa,EAAE;GACd,IAAI,EAAE,KAAK;AACX,GAAA,OAAO,EAAE,MAAM,EAAE;GACjB;EACD;;AAED,CAAA,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;;AAEtB,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;EACN,UAAW,IAAG,EAAA;;AAEd,EAAA,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAE,EAAA;EAChD;;AAED,CAAA,QAAQ,EAAE;AACT;AACA,EAAA,IAAI,GAAG;GACN,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAA;GACtD;;;EAGD,QAAQ,GAAG;GACV,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,SAAQ;GACtD;EACD;;AAED,CAAA,OAAO,EAAE;KACRC,SAAC;;AAED;;AAEC;;EAED,OAAO,CAAC,IAAI,EAAE;AACb,GAAA,OAAO,IAAI,CAAC,IAAK,IAAG,IAAI,CAAC,KAAM,IAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAA;GAClD;;AAED;;;;EAIA,MAAM,CAAC,IAAI,EAAE;AACZ,GAAA,MAAM,KAAI,GAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAA;;AAE/C,GAAA,OAAO,KAAK,EAAE,eAAe,IAAI,CAAC,IAAG,IAAK,IAAI,CAAC,EAAC;GAChD;;AAED;;AAEC;;AAED,EAAA,UAAU,CAAC,GAAG,EAAE;AACf,GAAA,OAAO,IAAI,CAAC,KAAK,CAAC,cAAa,KAAM,GAAG,CAAC,EAAC;GAC1C;;AAED;;;;AAIA,EAAA,UAAU,CAAC,GAAG,EAAE;AACf,GAAA,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAA;GACzC;;AAED;;AAEC;;EAED,OAAO,CAAC,GAAG,EAAE;GACZ,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAA;GAC5B;;AAED;;AAEC;AACA;;EAED,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE;AAC1B,GAAA,OAAO,QAAS,GAAE,KAAI,GAAIA,SAAC,CAAC,eAAe,EAAE,4CAA4C,CAAA;GACzF;EACD;AACF;;;;"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, createVNode, createBlock, createCommentVNode, withCtx, createTextVNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
class: "cn-flow-step-list",
|
|
5
|
+
"data-testid": "flow-step-list"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2 = ["aria-labelledby"];
|
|
8
|
+
const _hoisted_3 = ["id"];
|
|
9
|
+
const _hoisted_4 = {
|
|
10
|
+
class: "cn-flow-step-list__badge cn-flow-step-list__badge--trigger",
|
|
11
|
+
"aria-hidden": "true"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_5 = { class: "cn-flow-step-list__body" };
|
|
14
|
+
const _hoisted_6 = { class: "cn-flow-step-list__head" };
|
|
15
|
+
const _hoisted_7 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "cn-flow-step-list__empty",
|
|
18
|
+
"data-testid": "flow-step-no-trigger"
|
|
19
|
+
};
|
|
20
|
+
const _hoisted_8 = ["aria-labelledby"];
|
|
21
|
+
const _hoisted_9 = ["id"];
|
|
22
|
+
const _hoisted_10 = { class: "cn-flow-step-list__steps" };
|
|
23
|
+
const _hoisted_11 = {
|
|
24
|
+
class: "cn-flow-step-list__badge",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_12 = { class: "cn-flow-step-list__body" };
|
|
28
|
+
const _hoisted_13 = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "cn-flow-step-list__when",
|
|
31
|
+
"data-testid": "flow-step-when"
|
|
32
|
+
};
|
|
33
|
+
const _hoisted_14 = { class: "cn-flow-step-list__head" };
|
|
34
|
+
const _hoisted_15 = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "cn-flow-step-list__routes",
|
|
37
|
+
"data-testid": "flow-step-routes"
|
|
38
|
+
};
|
|
39
|
+
const _hoisted_16 = ["aria-label"];
|
|
40
|
+
const _hoisted_17 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "cn-flow-step-list__add"
|
|
43
|
+
};
|
|
44
|
+
const _hoisted_18 = { class: "cn-flow-step-list__note" };
|
|
45
|
+
|
|
46
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
47
|
+
const _component_LightningBolt = resolveComponent("LightningBolt");
|
|
48
|
+
const _component_CnStatusBadge = resolveComponent("CnStatusBadge");
|
|
49
|
+
const _component_Pencil = resolveComponent("Pencil");
|
|
50
|
+
const _component_NcButton = resolveComponent("NcButton");
|
|
51
|
+
const _component_CallSplit = resolveComponent("CallSplit");
|
|
52
|
+
const _component_ArrowRight = resolveComponent("ArrowRight");
|
|
53
|
+
const _component_ChevronUp = resolveComponent("ChevronUp");
|
|
54
|
+
const _component_ChevronDown = resolveComponent("ChevronDown");
|
|
55
|
+
const _component_Delete = resolveComponent("Delete");
|
|
56
|
+
const _component_Plus = resolveComponent("Plus");
|
|
57
|
+
|
|
58
|
+
return (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
59
|
+
createElementVNode("section", {
|
|
60
|
+
"aria-labelledby": `${$data.uid}-when`,
|
|
61
|
+
class: "cn-flow-step-list__section"
|
|
62
|
+
}, [
|
|
63
|
+
createElementVNode("h2", {
|
|
64
|
+
id: `${$data.uid}-when`,
|
|
65
|
+
class: "cn-flow-step-list__title"
|
|
66
|
+
}, toDisplayString($options.t('nextcloud-vue', 'When')), 9 /* TEXT, PROPS */, _hoisted_3),
|
|
67
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.list.triggers, (row) => {
|
|
68
|
+
return (openBlock(), createElementBlock("div", {
|
|
69
|
+
key: row.id,
|
|
70
|
+
class: normalizeClass(["cn-flow-step-list__row", { 'cn-flow-step-list__row--selected': $options.isSelected(row) }]),
|
|
71
|
+
"data-testid": "flow-step-trigger"
|
|
72
|
+
}, [
|
|
73
|
+
createElementVNode("span", _hoisted_4, [
|
|
74
|
+
createVNode(_component_LightningBolt, { size: 16 })
|
|
75
|
+
]),
|
|
76
|
+
createElementVNode("div", _hoisted_5, [
|
|
77
|
+
createElementVNode("span", _hoisted_6, [
|
|
78
|
+
createElementVNode("strong", null, toDisplayString($options.titleOf(row.node)), 1 /* TEXT */),
|
|
79
|
+
createVNode(_component_CnStatusBadge, {
|
|
80
|
+
label: $options.kindOf(row.node),
|
|
81
|
+
variant: "success",
|
|
82
|
+
size: "small"
|
|
83
|
+
}, null, 8 /* PROPS */, ["label"])
|
|
84
|
+
])
|
|
85
|
+
]),
|
|
86
|
+
($options.stateOf(row))
|
|
87
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
88
|
+
key: 0,
|
|
89
|
+
label: $options.stateOf(row).label,
|
|
90
|
+
variant: $options.stateOf(row).variant
|
|
91
|
+
}, null, 8 /* PROPS */, ["label", "variant"]))
|
|
92
|
+
: createCommentVNode("v-if", true),
|
|
93
|
+
($options.editable)
|
|
94
|
+
? (openBlock(), createBlock(_component_NcButton, {
|
|
95
|
+
key: 1,
|
|
96
|
+
"aria-label": $options.t('nextcloud-vue', 'Change trigger'),
|
|
97
|
+
title: $options.t('nextcloud-vue', 'Change trigger'),
|
|
98
|
+
"data-testid": "flow-step-edit",
|
|
99
|
+
onClick: $event => (_ctx.$emit('edit', row.id))
|
|
100
|
+
}, {
|
|
101
|
+
icon: withCtx(() => [
|
|
102
|
+
createVNode(_component_Pencil, { size: 18 })
|
|
103
|
+
]),
|
|
104
|
+
_: 1 /* STABLE */
|
|
105
|
+
}, 8 /* PROPS */, ["aria-label", "title", "onClick"]))
|
|
106
|
+
: createCommentVNode("v-if", true)
|
|
107
|
+
], 2 /* CLASS */))
|
|
108
|
+
}), 128 /* KEYED_FRAGMENT */)),
|
|
109
|
+
($options.list.triggers.length === 0)
|
|
110
|
+
? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString($options.t('nextcloud-vue', 'This flow has no trigger yet.')), 1 /* TEXT */))
|
|
111
|
+
: createCommentVNode("v-if", true)
|
|
112
|
+
], 8 /* PROPS */, _hoisted_2),
|
|
113
|
+
createElementVNode("section", {
|
|
114
|
+
"aria-labelledby": `${$data.uid}-then`,
|
|
115
|
+
class: "cn-flow-step-list__section"
|
|
116
|
+
}, [
|
|
117
|
+
createElementVNode("h2", {
|
|
118
|
+
id: `${$data.uid}-then`,
|
|
119
|
+
class: "cn-flow-step-list__title"
|
|
120
|
+
}, toDisplayString($options.t('nextcloud-vue', 'Then, in this order')), 9 /* TEXT, PROPS */, _hoisted_9),
|
|
121
|
+
createElementVNode("ol", _hoisted_10, [
|
|
122
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.list.steps, (row) => {
|
|
123
|
+
return (openBlock(), createElementBlock("li", {
|
|
124
|
+
key: row.id,
|
|
125
|
+
class: normalizeClass(["cn-flow-step-list__row", { 'cn-flow-step-list__row--selected': $options.isSelected(row), 'cn-flow-step-list__row--end': row.role === 'end' }]),
|
|
126
|
+
"data-testid": "flow-step-row"
|
|
127
|
+
}, [
|
|
128
|
+
createElementVNode("span", _hoisted_11, toDisplayString(row.n), 1 /* TEXT */),
|
|
129
|
+
createElementVNode("div", _hoisted_12, [
|
|
130
|
+
(row.when)
|
|
131
|
+
? (openBlock(), createElementBlock("span", _hoisted_13, [
|
|
132
|
+
createVNode(_component_CallSplit, { size: 14 }),
|
|
133
|
+
createTextVNode(" " + toDisplayString(row.when), 1 /* TEXT */)
|
|
134
|
+
]))
|
|
135
|
+
: createCommentVNode("v-if", true),
|
|
136
|
+
createElementVNode("span", _hoisted_14, [
|
|
137
|
+
createElementVNode("strong", null, toDisplayString($options.titleOf(row.node)), 1 /* TEXT */),
|
|
138
|
+
createVNode(_component_CnStatusBadge, {
|
|
139
|
+
label: $options.kindOf(row.node),
|
|
140
|
+
size: "small"
|
|
141
|
+
}, null, 8 /* PROPS */, ["label"]),
|
|
142
|
+
(row.loose)
|
|
143
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
144
|
+
key: 0,
|
|
145
|
+
label: $options.t('nextcloud-vue', 'Not connected'),
|
|
146
|
+
variant: "warning",
|
|
147
|
+
size: "small",
|
|
148
|
+
"data-testid": "flow-step-loose"
|
|
149
|
+
}, null, 8 /* PROPS */, ["label"]))
|
|
150
|
+
: createCommentVNode("v-if", true)
|
|
151
|
+
]),
|
|
152
|
+
(row.routes.length > 0)
|
|
153
|
+
? (openBlock(), createElementBlock("span", _hoisted_15, [
|
|
154
|
+
createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Routes:')) + " ", 1 /* TEXT */),
|
|
155
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(row.routes, (route) => {
|
|
156
|
+
return (openBlock(), createElementBlock("span", {
|
|
157
|
+
key: route.id,
|
|
158
|
+
class: "cn-flow-step-list__route"
|
|
159
|
+
}, [
|
|
160
|
+
createTextVNode(toDisplayString(route.label) + " ", 1 /* TEXT */),
|
|
161
|
+
createVNode(_component_ArrowRight, { size: 14 }),
|
|
162
|
+
createTextVNode(" " + toDisplayString(route.to), 1 /* TEXT */)
|
|
163
|
+
]))
|
|
164
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
165
|
+
]))
|
|
166
|
+
: createCommentVNode("v-if", true)
|
|
167
|
+
]),
|
|
168
|
+
($options.stateOf(row))
|
|
169
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
170
|
+
key: 0,
|
|
171
|
+
label: $options.stateOf(row).label,
|
|
172
|
+
variant: $options.stateOf(row).variant
|
|
173
|
+
}, null, 8 /* PROPS */, ["label", "variant"]))
|
|
174
|
+
: createCommentVNode("v-if", true),
|
|
175
|
+
($options.isReadonly(row))
|
|
176
|
+
? (openBlock(), createBlock(_component_CnStatusBadge, {
|
|
177
|
+
key: 1,
|
|
178
|
+
label: $options.t('nextcloud-vue', 'Admins only'),
|
|
179
|
+
variant: "warning",
|
|
180
|
+
"data-testid": "flow-step-admin"
|
|
181
|
+
}, null, 8 /* PROPS */, ["label"]))
|
|
182
|
+
: createCommentVNode("v-if", true),
|
|
183
|
+
($options.editable && !$options.isReadonly(row))
|
|
184
|
+
? (openBlock(), createElementBlock("span", {
|
|
185
|
+
key: 2,
|
|
186
|
+
role: "group",
|
|
187
|
+
class: "cn-flow-step-list__actions",
|
|
188
|
+
"aria-label": $options.t('nextcloud-vue', 'Actions for step {n}', { n: row.n })
|
|
189
|
+
}, [
|
|
190
|
+
createVNode(_component_NcButton, {
|
|
191
|
+
variant: "tertiary",
|
|
192
|
+
"aria-label": $options.t('nextcloud-vue', 'Up'),
|
|
193
|
+
title: $options.moveTitle(row.canMoveUp, $options.t('nextcloud-vue', 'Up')),
|
|
194
|
+
disabled: !row.canMoveUp,
|
|
195
|
+
"data-testid": "flow-step-up",
|
|
196
|
+
onClick: $event => ($setup.store.moveStep({ id: row.id, by: -1 }))
|
|
197
|
+
}, {
|
|
198
|
+
icon: withCtx(() => [
|
|
199
|
+
createVNode(_component_ChevronUp, { size: 18 })
|
|
200
|
+
]),
|
|
201
|
+
_: 1 /* STABLE */
|
|
202
|
+
}, 8 /* PROPS */, ["aria-label", "title", "disabled", "onClick"]),
|
|
203
|
+
createVNode(_component_NcButton, {
|
|
204
|
+
variant: "tertiary",
|
|
205
|
+
"aria-label": $options.t('nextcloud-vue', 'Down'),
|
|
206
|
+
title: $options.moveTitle(row.canMoveDown, $options.t('nextcloud-vue', 'Down')),
|
|
207
|
+
disabled: !row.canMoveDown,
|
|
208
|
+
"data-testid": "flow-step-down",
|
|
209
|
+
onClick: $event => ($setup.store.moveStep({ id: row.id, by: 1 }))
|
|
210
|
+
}, {
|
|
211
|
+
icon: withCtx(() => [
|
|
212
|
+
createVNode(_component_ChevronDown, { size: 18 })
|
|
213
|
+
]),
|
|
214
|
+
_: 1 /* STABLE */
|
|
215
|
+
}, 8 /* PROPS */, ["aria-label", "title", "disabled", "onClick"]),
|
|
216
|
+
createVNode(_component_NcButton, {
|
|
217
|
+
variant: "tertiary",
|
|
218
|
+
"aria-label": $options.t('nextcloud-vue', 'Edit'),
|
|
219
|
+
title: $options.t('nextcloud-vue', 'Edit'),
|
|
220
|
+
"aria-pressed": $options.isSelected(row) ? 'true' : 'false',
|
|
221
|
+
"data-testid": "flow-step-edit",
|
|
222
|
+
onClick: $event => (_ctx.$emit('edit', row.id))
|
|
223
|
+
}, {
|
|
224
|
+
icon: withCtx(() => [
|
|
225
|
+
createVNode(_component_Pencil, { size: 18 })
|
|
226
|
+
]),
|
|
227
|
+
_: 1 /* STABLE */
|
|
228
|
+
}, 8 /* PROPS */, ["aria-label", "title", "aria-pressed", "onClick"]),
|
|
229
|
+
createVNode(_component_NcButton, {
|
|
230
|
+
variant: "tertiary",
|
|
231
|
+
"aria-label": $options.t('nextcloud-vue', 'Delete'),
|
|
232
|
+
title: $options.t('nextcloud-vue', 'Delete'),
|
|
233
|
+
"data-testid": "flow-step-delete",
|
|
234
|
+
onClick: $event => ($setup.store.removeStep(row.id))
|
|
235
|
+
}, {
|
|
236
|
+
icon: withCtx(() => [
|
|
237
|
+
createVNode(_component_Delete, { size: 18 })
|
|
238
|
+
]),
|
|
239
|
+
_: 1 /* STABLE */
|
|
240
|
+
}, 8 /* PROPS */, ["aria-label", "title", "onClick"])
|
|
241
|
+
], 8 /* PROPS */, _hoisted_16))
|
|
242
|
+
: createCommentVNode("v-if", true)
|
|
243
|
+
], 2 /* CLASS */))
|
|
244
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
245
|
+
]),
|
|
246
|
+
($options.editable)
|
|
247
|
+
? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
248
|
+
createVNode(_component_NcButton, {
|
|
249
|
+
"data-testid": "flow-step-add",
|
|
250
|
+
onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('add')))
|
|
251
|
+
}, {
|
|
252
|
+
icon: withCtx(() => [
|
|
253
|
+
createVNode(_component_Plus, { size: 18 })
|
|
254
|
+
]),
|
|
255
|
+
default: withCtx(() => [
|
|
256
|
+
createTextVNode(" " + toDisplayString($options.t('nextcloud-vue', 'Add step')), 1 /* TEXT */)
|
|
257
|
+
]),
|
|
258
|
+
_: 1 /* STABLE */
|
|
259
|
+
}),
|
|
260
|
+
createElementVNode("span", _hoisted_18, toDisplayString($options.t('nextcloud-vue', 'A new step goes at the bottom; use the arrows to put it in place.')), 1 /* TEXT */)
|
|
261
|
+
]))
|
|
262
|
+
: createCommentVNode("v-if", true)
|
|
263
|
+
], 8 /* PROPS */, _hoisted_8)
|
|
264
|
+
]))
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export { render };
|
|
268
|
+
//# sourceMappingURL=CnFlowStepList.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnFlowStepList.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnFlowStepList.vue?vue&type=template&id=57dc09e7&lang.js"],"sourcesContent":["<!--\n CnFlowStepList — a flow as a list: the trigger, then the steps in run order.\n\n The list view of the same flow the canvas draws (board OrFlowStappenlijst).\n It keeps no state of its own: the rows are read from the flow store and every\n button goes through a store action, so both views always show one document\n and Ctrl+Z undoes a change made here as well.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-flow-step-list\" data-testid=\"flow-step-list\">\n\t\t<section :aria-labelledby=\"`${uid}-when`\" class=\"cn-flow-step-list__section\">\n\t\t\t<h2 :id=\"`${uid}-when`\" class=\"cn-flow-step-list__title\">\n\t\t\t\t{{ t('nextcloud-vue', 'When') }}\n\t\t\t</h2>\n\t\t\t<div v-for=\"row in list.triggers\"\n\t\t\t\t:key=\"row.id\"\n\t\t\t\tclass=\"cn-flow-step-list__row\"\n\t\t\t\t:class=\"{ 'cn-flow-step-list__row--selected': isSelected(row) }\"\n\t\t\t\tdata-testid=\"flow-step-trigger\">\n\t\t\t\t<span class=\"cn-flow-step-list__badge cn-flow-step-list__badge--trigger\" aria-hidden=\"true\">\n\t\t\t\t\t<LightningBolt :size=\"16\" />\n\t\t\t\t</span>\n\t\t\t\t<div class=\"cn-flow-step-list__body\">\n\t\t\t\t\t<span class=\"cn-flow-step-list__head\">\n\t\t\t\t\t\t<strong>{{ titleOf(row.node) }}</strong>\n\t\t\t\t\t\t<CnStatusBadge :label=\"kindOf(row.node)\" variant=\"success\" size=\"small\" />\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<CnStatusBadge v-if=\"stateOf(row)\" :label=\"stateOf(row).label\" :variant=\"stateOf(row).variant\" />\n\t\t\t\t<NcButton v-if=\"editable\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Change trigger')\"\n\t\t\t\t\t:title=\"t('nextcloud-vue', 'Change trigger')\"\n\t\t\t\t\tdata-testid=\"flow-step-edit\"\n\t\t\t\t\t@click=\"$emit('edit', row.id)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"18\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"list.triggers.length === 0\" class=\"cn-flow-step-list__empty\" data-testid=\"flow-step-no-trigger\">\n\t\t\t\t{{ t('nextcloud-vue', 'This flow has no trigger yet.') }}\n\t\t\t</p>\n\t\t</section>\n\n\t\t<section :aria-labelledby=\"`${uid}-then`\" class=\"cn-flow-step-list__section\">\n\t\t\t<h2 :id=\"`${uid}-then`\" class=\"cn-flow-step-list__title\">\n\t\t\t\t{{ t('nextcloud-vue', 'Then, in this order') }}\n\t\t\t</h2>\n\t\t\t<ol class=\"cn-flow-step-list__steps\">\n\t\t\t\t<li v-for=\"row in list.steps\"\n\t\t\t\t\t:key=\"row.id\"\n\t\t\t\t\tclass=\"cn-flow-step-list__row\"\n\t\t\t\t\t:class=\"{ 'cn-flow-step-list__row--selected': isSelected(row), 'cn-flow-step-list__row--end': row.role === 'end' }\"\n\t\t\t\t\tdata-testid=\"flow-step-row\">\n\t\t\t\t\t<span class=\"cn-flow-step-list__badge\" aria-hidden=\"true\">{{ row.n }}</span>\n\t\t\t\t\t<div class=\"cn-flow-step-list__body\">\n\t\t\t\t\t\t<span v-if=\"row.when\" class=\"cn-flow-step-list__when\" data-testid=\"flow-step-when\">\n\t\t\t\t\t\t\t<CallSplit :size=\"14\" />\n\t\t\t\t\t\t\t{{ row.when }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"cn-flow-step-list__head\">\n\t\t\t\t\t\t\t<strong>{{ titleOf(row.node) }}</strong>\n\t\t\t\t\t\t\t<CnStatusBadge :label=\"kindOf(row.node)\" size=\"small\" />\n\t\t\t\t\t\t\t<CnStatusBadge v-if=\"row.loose\"\n\t\t\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Not connected')\"\n\t\t\t\t\t\t\t\tvariant=\"warning\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tdata-testid=\"flow-step-loose\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-if=\"row.routes.length > 0\" class=\"cn-flow-step-list__routes\" data-testid=\"flow-step-routes\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Routes:') }}\n\t\t\t\t\t\t\t<span v-for=\"route in row.routes\" :key=\"route.id\" class=\"cn-flow-step-list__route\">\n\t\t\t\t\t\t\t\t{{ route.label }}\n\t\t\t\t\t\t\t\t<ArrowRight :size=\"14\" />\n\t\t\t\t\t\t\t\t{{ route.to }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<CnStatusBadge v-if=\"stateOf(row)\" :label=\"stateOf(row).label\" :variant=\"stateOf(row).variant\" />\n\t\t\t\t\t<CnStatusBadge v-if=\"isReadonly(row)\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Admins only')\"\n\t\t\t\t\t\tvariant=\"warning\"\n\t\t\t\t\t\tdata-testid=\"flow-step-admin\" />\n\t\t\t\t\t<span v-if=\"editable && !isReadonly(row)\"\n\t\t\t\t\t\trole=\"group\"\n\t\t\t\t\t\tclass=\"cn-flow-step-list__actions\"\n\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Actions for step {n}', { n: row.n })\">\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Up')\"\n\t\t\t\t\t\t\t:title=\"moveTitle(row.canMoveUp, t('nextcloud-vue', 'Up'))\"\n\t\t\t\t\t\t\t:disabled=\"!row.canMoveUp\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-up\"\n\t\t\t\t\t\t\t@click=\"store.moveStep({ id: row.id, by: -1 })\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<ChevronUp :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Down')\"\n\t\t\t\t\t\t\t:title=\"moveTitle(row.canMoveDown, t('nextcloud-vue', 'Down'))\"\n\t\t\t\t\t\t\t:disabled=\"!row.canMoveDown\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-down\"\n\t\t\t\t\t\t\t@click=\"store.moveStep({ id: row.id, by: 1 })\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<ChevronDown :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Edit')\"\n\t\t\t\t\t\t\t:title=\"t('nextcloud-vue', 'Edit')\"\n\t\t\t\t\t\t\t:aria-pressed=\"isSelected(row) ? 'true' : 'false'\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-edit\"\n\t\t\t\t\t\t\t@click=\"$emit('edit', row.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Delete')\"\n\t\t\t\t\t\t\t:title=\"t('nextcloud-vue', 'Delete')\"\n\t\t\t\t\t\t\tdata-testid=\"flow-step-delete\"\n\t\t\t\t\t\t\t@click=\"store.removeStep(row.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Delete :size=\"18\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t\t<div v-if=\"editable\" class=\"cn-flow-step-list__add\">\n\t\t\t\t<NcButton data-testid=\"flow-step-add\" @click=\"$emit('add')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Plus :size=\"18\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('nextcloud-vue', 'Add step') }}\n\t\t\t\t</NcButton>\n\t\t\t\t<span class=\"cn-flow-step-list__note\">{{ t('nextcloud-vue', 'A new step goes at the bottom; use the arrows to put it in place.') }}</span>\n\t\t\t</div>\n\t\t</section>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport ArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport CallSplit from 'vue-material-design-icons/CallSplit.vue'\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport ChevronUp from 'vue-material-design-icons/ChevronUp.vue'\nimport Delete from 'vue-material-design-icons/Delete.vue'\nimport LightningBolt from 'vue-material-design-icons/LightningBolt.vue'\nimport Pencil from 'vue-material-design-icons/Pencil.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport { useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowStepRows } from '../../utils/flowStepList.js'\nimport { CnStatusBadge } from '../CnStatusBadge/index.js'\n\nlet uidCounter = 0\n\n/**\n * The list view of a flow. CnFlowDetail renders it in place of the canvas when\n * its `view` is `list`, so the toolbar, messages and dialogs stay the same.\n */\nexport default {\n\tname: 'CnFlowStepList',\n\n\tcomponents: { ArrowRight, CallSplit, ChevronDown, ChevronUp, CnStatusBadge, Delete, LightningBolt, NcButton, Pencil, Plus },\n\n\tprops: {\n\t\t/**\n\t\t * A step's outcome in the open run, `(id) => { label, variant } | null`.\n\t\t */\n\t\tstepState: {\n\t\t\ttype: Function,\n\t\t\tdefault: () => null,\n\t\t},\n\n\t\t/** The ids of the steps the viewer can only read. */\n\t\treadonlySteps: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\n\temits: ['add', 'edit'],\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\tuidCounter += 1\n\n\t\treturn { uid: `cn-flow-step-list-${uidCounter}` }\n\t},\n\n\tcomputed: {\n\t\t/** @return {{triggers: Array<object>, steps: Array<object>}} The rows. */\n\t\tlist() {\n\t\t\treturn flowStepRows(this.store.stepGraph, this.titleOf)\n\t\t},\n\n\t\t/** @return {boolean} Whether the flow can be changed from here. */\n\t\teditable() {\n\t\t\treturn !this.store.graphLocked && !this.store.inRunView\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {object} node A flow node.\n\t\t * @return {string} The name it goes by.\n\t\t */\n\t\ttitleOf(node) {\n\t\t\treturn node.name || node.label || this.kindOf(node)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} node A flow node.\n\t\t * @return {string} What kind of step it is, from the catalogue.\n\t\t */\n\t\tkindOf(node) {\n\t\t\tconst entry = this.store.catalogEntry(node.type)\n\n\t\t\treturn entry?.displayName || node.type || node.id\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {boolean} Whether it is the selected step.\n\t\t */\n\t\tisSelected(row) {\n\t\t\treturn this.store.selectedNodeId === row.id\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {boolean} Whether the viewer can only read this step.\n\t\t */\n\t\tisReadonly(row) {\n\t\t\treturn this.readonlySteps.includes(row.id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} row A list row.\n\t\t * @return {{label: string, variant: string}|null} Its outcome in the open run.\n\t\t */\n\t\tstateOf(row) {\n\t\t\treturn this.stepState(row.id)\n\t\t},\n\n\t\t/**\n\t\t * @param {boolean} possible Whether the move can be made.\n\t\t * @param {string} label The arrow's name.\n\t\t * @return {string} The arrow's tooltip.\n\t\t */\n\t\tmoveTitle(possible, label) {\n\t\t\treturn possible ? label : t('nextcloud-vue', 'Steps on a branch are moved on the canvas.')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-step-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tgap: 14px;\n\tbox-sizing: border-box;\n\tmin-block-size: 0;\n\tpadding: 12px;\n\toverflow-y: auto;\n}\n\n.cn-flow-step-list__section {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-flow-step-list__title {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 700;\n\tletter-spacing: 0.06em;\n\ttext-transform: uppercase;\n}\n\n.cn-flow-step-list__steps {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-flow-step-list__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 14px;\n\tpadding: 12px 14px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: 10px;\n\tbackground: var(--color-main-background);\n}\n\n.cn-flow-step-list__row--selected {\n\tborder-color: var(--color-primary-element);\n\tbox-shadow: 0 0 0 2px var(--color-primary-element);\n}\n\n.cn-flow-step-list__row--end {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-flow-step-list__badge {\n\tdisplay: inline-flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\tinline-size: 34px;\n\tblock-size: 34px;\n\tborder-radius: 50%;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-weight: 700;\n}\n\n.cn-flow-step-list__badge--trigger {\n\tbackground: var(--color-success);\n\tcolor: var(--color-success-text-on-success, var(--color-primary-element-text));\n}\n\n.cn-flow-step-list__body {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tgap: 5px;\n\tmin-inline-size: 0;\n}\n\n.cn-flow-step-list__head {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-flow-step-list__when {\n\tdisplay: inline-flex;\n\talign-items: center;\n\talign-self: flex-start;\n\tgap: 6px;\n\tpadding: 2px 10px 2px 8px;\n\tborder: 1px dashed currentcolor;\n\tborder-radius: 10px;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tfont-weight: 600;\n}\n\n.cn-flow-step-list__routes {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 6px;\n\tfont-size: 13px;\n}\n\n.cn-flow-step-list__route {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 4px;\n\tpadding: 1px 8px;\n\tborder-radius: 10px;\n\tbackground: var(--color-background-dark);\n\tfont-weight: 600;\n}\n\n.cn-flow-step-list__actions {\n\tdisplay: inline-flex;\n\tflex: none;\n\tgap: 4px;\n}\n\n.cn-flow-step-list__add {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n\tpadding-block-start: 4px;\n}\n\n.cn-flow-step-list__note,\n.cn-flow-step-list__empty {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n</style>\n"],"names":["_createElementVNode","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createVNode","_toDisplayString","_createBlock","_createTextVNode"],"mappings":";;;AAuBM,EAAA,KAAK,EAAC,mBAAmB;AAAC,EAAA,aAAA,EAAA,gBAAA;;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;kBAGVA,WAQW,CAAA,mBAAA,EAAA;AARV,oBAAA,OAAA,EAAA,UAAA;AACC,oBAAA,YAAU,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,QAAA,CAAA;AACb,oBAAA,KAAI,EAAG,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,QAAA,CAAA;AACT,oBAAA,aAAW,EAAC,kBAAC;AACZ,oBAAA,OAAK,aAAE,MAAK,CAAA,KAAA,CAAC,UAAG,CAAA,GAAA,CAAA,EAAA,CAAA,CAAA;;AACT,oBAAA,IAAA,UACP,MAAqB;sBAArBA,WAAqB,CAAA,iBAAA,EAAA,EAAZ,IAAI,EAAE,EAAE,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import script from './CnFlowViewSwitch.vue2.js';
|
|
2
|
+
import { render } from './CnFlowViewSwitch.vue3.js';
|
|
3
|
+
|
|
4
|
+
script.render = render;
|
|
5
|
+
script.__scopeId = "data-v-32e4144c";
|
|
6
|
+
const __sfc_main = script;
|
|
7
|
+
|
|
8
|
+
export { __sfc_main as default };
|
|
9
|
+
//# sourceMappingURL=CnFlowViewSwitch.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnFlowViewSwitch.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { translate } from '@nextcloud/l10n';
|
|
2
|
+
import FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue';
|
|
3
|
+
import VectorPolyline from 'vue-material-design-icons/VectorPolyline.vue';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Switches a flow editor between its canvas and its list. Both edit the same
|
|
7
|
+
* flow, so the switch only says which one is on screen (board OrFlowKop).
|
|
8
|
+
*/
|
|
9
|
+
var script = {
|
|
10
|
+
name: 'CnFlowViewSwitch',
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
/** The view on screen: `canvas` or `list`. */
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'canvas',
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
/** Say beside the switch that both views are the same flow. */
|
|
20
|
+
note: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
emits: ['update:modelValue'],
|
|
27
|
+
|
|
28
|
+
computed: {
|
|
29
|
+
/** @return {Array<object>} The two views. */
|
|
30
|
+
views() {
|
|
31
|
+
return [
|
|
32
|
+
{ id: 'canvas', label: translate('nextcloud-vue', 'Canvas'), icon: VectorPolyline },
|
|
33
|
+
{ id: 'list', label: translate('nextcloud-vue', 'List'), icon: FormatListBulleted },
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/** @return {string} The line beside the switch. */
|
|
38
|
+
noteText() {
|
|
39
|
+
return this.modelValue === 'list'
|
|
40
|
+
? translate('nextcloud-vue', 'The same flow and the same steps as on the canvas; what you change here changes there too.')
|
|
41
|
+
: translate('nextcloud-vue', 'The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.')
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
methods: { t: translate },
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { script as default };
|
|
49
|
+
//# sourceMappingURL=CnFlowViewSwitch.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnFlowViewSwitch.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnFlowViewSwitch.vue"],"sourcesContent":["<!--\n CnFlowViewSwitch — Canvas or List: the two views of one flow.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-flow-view-switch\">\n\t\t<div class=\"cn-flow-view-switch__group\"\n\t\t\trole=\"group\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'View of the flow')\"\n\t\t\tdata-testid=\"flow-view-switch\">\n\t\t\t<button v-for=\"view in views\"\n\t\t\t\t:key=\"view.id\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-flow-view-switch__option\"\n\t\t\t\t:class=\"{ 'cn-flow-view-switch__option--active': view.id === modelValue }\"\n\t\t\t\t:aria-pressed=\"view.id === modelValue ? 'true' : 'false'\"\n\t\t\t\t:data-testid=\"`flow-view-${view.id}`\"\n\t\t\t\t@click=\"$emit('update:modelValue', view.id)\">\n\t\t\t\t<component :is=\"view.icon\" :size=\"16\" />\n\t\t\t\t{{ view.label }}\n\t\t\t</button>\n\t\t</div>\n\t\t<span v-if=\"note\" class=\"cn-flow-view-switch__note\" data-testid=\"flow-view-note\">{{ noteText }}</span>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport VectorPolyline from 'vue-material-design-icons/VectorPolyline.vue'\n\n/**\n * Switches a flow editor between its canvas and its list. Both edit the same\n * flow, so the switch only says which one is on screen (board OrFlowKop).\n */\nexport default {\n\tname: 'CnFlowViewSwitch',\n\n\tprops: {\n\t\t/** The view on screen: `canvas` or `list`. */\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\tdefault: 'canvas',\n\t\t},\n\n\t\t/** Say beside the switch that both views are the same flow. */\n\t\tnote: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['update:modelValue'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The two views. */\n\t\tviews() {\n\t\t\treturn [\n\t\t\t\t{ id: 'canvas', label: t('nextcloud-vue', 'Canvas'), icon: VectorPolyline },\n\t\t\t\t{ id: 'list', label: t('nextcloud-vue', 'List'), icon: FormatListBulleted },\n\t\t\t]\n\t\t},\n\n\t\t/** @return {string} The line beside the switch. */\n\t\tnoteText() {\n\t\t\treturn this.modelValue === 'list'\n\t\t\t\t? t('nextcloud-vue', 'The same flow and the same steps as on the canvas; what you change here changes there too.')\n\t\t\t\t: t('nextcloud-vue', 'The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.')\n\t\t},\n\t},\n\n\tmethods: { t },\n}\n</script>\n\n<style scoped>\n.cn-flow-view-switch {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-flow-view-switch__group {\n\tdisplay: inline-flex;\n\tpadding: 3px;\n\tborder-radius: 10px;\n\tbackground: var(--color-background-dark);\n}\n\n.cn-flow-view-switch__option {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tmin-block-size: 34px;\n\tmargin: 0;\n\tpadding: 0 12px;\n\tborder: 0;\n\tborder-radius: 8px;\n\tbackground: transparent;\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n\tcursor: pointer;\n}\n\n.cn-flow-view-switch__option--active {\n\tbackground: var(--color-main-background);\n\tbox-shadow: 0 1px 3px var(--color-box-shadow);\n}\n\n.cn-flow-view-switch__note {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n</style>\n"],"names":["t"],"mappings":";;;;AAiCA;;;;AAIA,aAAe;CACd,IAAI,EAAE,kBAAkB;;AAExB,CAAA,KAAK,EAAE;AACN;EACA,UAAU,EAAE;GACX,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,QAAQ;GACjB;;;EAGD,IAAI,EAAE;GACL,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;EACD;;CAED,KAAK,EAAE,CAAC,mBAAmB,CAAC;;AAE5B,CAAA,QAAQ,EAAE;AACT;AACA,EAAA,KAAK,GAAG;AACP,GAAA,OAAO;AACN,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAEA,SAAC,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,gBAAgB;AAC3E,IAAA,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAEA,SAAC,CAAC,eAAe,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,oBAAoB;AAC5E,IAAA;GACA;;AAED;EACA,QAAQ,GAAG;GACV,OAAO,IAAI,CAAC,UAAW,KAAI,MAAK;MAC7BA,SAAC,CAAC,eAAe,EAAE,4FAA4F,CAAA;MAC/GA,SAAC,CAAC,eAAe,EAAE,gGAAgG,CAAA;GACtH;EACD;;CAED,OAAO,EAAE,KAAEA,SAAA,EAAG;AACf;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, createBlock, resolveDynamicComponent, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = { class: "cn-flow-view-switch" };
|
|
4
|
+
const _hoisted_2 = ["aria-label"];
|
|
5
|
+
const _hoisted_3 = ["aria-pressed", "data-testid", "onClick"];
|
|
6
|
+
const _hoisted_4 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "cn-flow-view-switch__note",
|
|
9
|
+
"data-testid": "flow-view-note"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13
|
+
return (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
14
|
+
createElementVNode("div", {
|
|
15
|
+
class: "cn-flow-view-switch__group",
|
|
16
|
+
role: "group",
|
|
17
|
+
"aria-label": $options.t('nextcloud-vue', 'View of the flow'),
|
|
18
|
+
"data-testid": "flow-view-switch"
|
|
19
|
+
}, [
|
|
20
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.views, (view) => {
|
|
21
|
+
return (openBlock(), createElementBlock("button", {
|
|
22
|
+
key: view.id,
|
|
23
|
+
type: "button",
|
|
24
|
+
class: normalizeClass(["cn-flow-view-switch__option", { 'cn-flow-view-switch__option--active': view.id === $props.modelValue }]),
|
|
25
|
+
"aria-pressed": view.id === $props.modelValue ? 'true' : 'false',
|
|
26
|
+
"data-testid": `flow-view-${view.id}`,
|
|
27
|
+
onClick: $event => (_ctx.$emit('update:modelValue', view.id))
|
|
28
|
+
}, [
|
|
29
|
+
(openBlock(), createBlock(resolveDynamicComponent(view.icon), { size: 16 })),
|
|
30
|
+
createTextVNode(" " + toDisplayString(view.label), 1 /* TEXT */)
|
|
31
|
+
], 10 /* CLASS, PROPS */, _hoisted_3))
|
|
32
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
33
|
+
], 8 /* PROPS */, _hoisted_2),
|
|
34
|
+
($props.note)
|
|
35
|
+
? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString($options.noteText), 1 /* TEXT */))
|
|
36
|
+
: createCommentVNode("v-if", true)
|
|
37
|
+
]))
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { render };
|
|
41
|
+
//# sourceMappingURL=CnFlowViewSwitch.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnFlowViewSwitch.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnFlowViewSwitch.vue?vue&type=template&id=32e4144c&lang.js"],"sourcesContent":["<!--\n CnFlowViewSwitch — Canvas or List: the two views of one flow.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-flow-view-switch\">\n\t\t<div class=\"cn-flow-view-switch__group\"\n\t\t\trole=\"group\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'View of the flow')\"\n\t\t\tdata-testid=\"flow-view-switch\">\n\t\t\t<button v-for=\"view in views\"\n\t\t\t\t:key=\"view.id\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-flow-view-switch__option\"\n\t\t\t\t:class=\"{ 'cn-flow-view-switch__option--active': view.id === modelValue }\"\n\t\t\t\t:aria-pressed=\"view.id === modelValue ? 'true' : 'false'\"\n\t\t\t\t:data-testid=\"`flow-view-${view.id}`\"\n\t\t\t\t@click=\"$emit('update:modelValue', view.id)\">\n\t\t\t\t<component :is=\"view.icon\" :size=\"16\" />\n\t\t\t\t{{ view.label }}\n\t\t\t</button>\n\t\t</div>\n\t\t<span v-if=\"note\" class=\"cn-flow-view-switch__note\" data-testid=\"flow-view-note\">{{ noteText }}</span>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport VectorPolyline from 'vue-material-design-icons/VectorPolyline.vue'\n\n/**\n * Switches a flow editor between its canvas and its list. Both edit the same\n * flow, so the switch only says which one is on screen (board OrFlowKop).\n */\nexport default {\n\tname: 'CnFlowViewSwitch',\n\n\tprops: {\n\t\t/** The view on screen: `canvas` or `list`. */\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\tdefault: 'canvas',\n\t\t},\n\n\t\t/** Say beside the switch that both views are the same flow. */\n\t\tnote: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['update:modelValue'],\n\n\tcomputed: {\n\t\t/** @return {Array<object>} The two views. */\n\t\tviews() {\n\t\t\treturn [\n\t\t\t\t{ id: 'canvas', label: t('nextcloud-vue', 'Canvas'), icon: VectorPolyline },\n\t\t\t\t{ id: 'list', label: t('nextcloud-vue', 'List'), icon: FormatListBulleted },\n\t\t\t]\n\t\t},\n\n\t\t/** @return {string} The line beside the switch. */\n\t\tnoteText() {\n\t\t\treturn this.modelValue === 'list'\n\t\t\t\t? t('nextcloud-vue', 'The same flow and the same steps as on the canvas; what you change here changes there too.')\n\t\t\t\t: t('nextcloud-vue', 'The same flow as a list: the trigger and the steps in order, for anyone who prefers no canvas.')\n\t\t},\n\t},\n\n\tmethods: { t },\n}\n</script>\n\n<style scoped>\n.cn-flow-view-switch {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-flow-view-switch__group {\n\tdisplay: inline-flex;\n\tpadding: 3px;\n\tborder-radius: 10px;\n\tbackground: var(--color-background-dark);\n}\n\n.cn-flow-view-switch__option {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tmin-block-size: 34px;\n\tmargin: 0;\n\tpadding: 0 12px;\n\tborder: 0;\n\tborder-radius: 8px;\n\tbackground: transparent;\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n\tcursor: pointer;\n}\n\n.cn-flow-view-switch__option--active {\n\tbackground: var(--color-main-background);\n\tbox-shadow: 0 1px 3px var(--color-box-shadow);\n}\n\n.cn-flow-view-switch__note {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n</style>\n"],"names":["_createElementBlock"],"mappings":";;AAaM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,qBAAK,GAAA;;;;;;;;;;;;AACV,MAAA,KAAK,EAAC,4BAAG;AACZ,MAAA,IAAG,EAAC,OAAO;AACX,MAAA,YAAU,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,kBAAA,CAAA;mBACH,EAAC,kBAAkB;;wBAC7BA,8CAAsB,QAAK,CAAA,KAAA,EAAA,CAAb,IAAI,KAAA;6BAAlBA;UACC,GAAG,EAAE,IAAI,CAAC,EAAE;AACb,UAAA,IAAI,EAAC,QAAQ;AACb,UAAA,KAAK,kBAAC,6BAAS,EAAA,EAAA,qCAAA,EACR,IAAA,CAAA,EAAA,KAAA,MAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AACN,UAAA,cAAE,EAAA,IAAA,CAAA,EAAA,KAAA,MAAA,CAAA,UAAA,GAAA,MAAA,GAAA,OAAA;UACF,aAAW,EAAA,CAAA,UAAA,EAAe,IAAI,CAAC,EAAE,CAAA,CAAA;AACjC,UAAA,OAAC,EAAA,MAAA,KAAA,IAAA,CAAA,KAAA,CAAA,mBAAA,EAAA,IAAA,CAAA,EAAA,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnFlowBoard.vue2.js';
|
|
|
2
2
|
import { render } from './CnFlowBoard.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-6b056b4a";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|