feat(editor): Add support for configurable configuration nodes in new canvas (no-changelog) (#9991)

This commit is contained in:
Alex Grozav
2024-07-10 17:51:18 +03:00
committed by GitHub
parent d2ca8b4b42
commit a45899765c
17 changed files with 318 additions and 457 deletions

View File

@@ -1,8 +1,6 @@
<script lang="ts" setup>
import { h, inject } from 'vue';
import CanvasNodeDefault from '@/components/canvas/elements/nodes/render-types/CanvasNodeDefault.vue';
import CanvasNodeConfiguration from '@/components/canvas/elements/nodes/render-types/CanvasNodeConfiguration.vue';
import CanvasNodeConfigurable from '@/components/canvas/elements/nodes/render-types/CanvasNodeConfigurable.vue';
import { CanvasNodeKey } from '@/constants';
const node = inject(CanvasNodeKey);
@@ -13,19 +11,8 @@ const slots = defineSlots<{
const Render = () => {
let Component;
switch (node?.data.value.renderType) {
case 'configurable':
Component = CanvasNodeConfigurable;
break;
case 'configuration':
Component = CanvasNodeConfiguration;
break;
case 'trigger':
Component = CanvasNodeDefault;
break;
switch (node?.data.value.render.type) {
// @TODO Add support for sticky notes here
default:
Component = CanvasNodeDefault;
}