feat(editor): AI Floating Nodes (#8703)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-02-23 13:34:32 +01:00
committed by GitHub
parent a29b41ec55
commit 41b191e055
7 changed files with 575 additions and 75 deletions

View File

@@ -45,6 +45,7 @@
:has-double-width="activeNodeType?.parameterPane === 'wide'"
:node-type="activeNodeType"
@switchSelectedNode="onSwitchSelectedNode"
@openConnectionNodeCreator="onOpenConnectionNodeCreator"
@close="close"
@init="onPanelsInit"
@dragstart="onDragStart"
@@ -117,6 +118,8 @@
@stopExecution="onStopExecution"
@redrawRequired="redrawRequired = true"
@activate="onWorkflowActivate"
@switchSelectedNode="onSwitchSelectedNode"
@openConnectionNodeCreator="onOpenConnectionNodeCreator"
/>
<a
v-if="featureRequestUrl"
@@ -143,6 +146,7 @@ import type {
IRunData,
IRunExecutionData,
Workflow,
ConnectionTypes,
} from 'n8n-workflow';
import { jsonParse, NodeHelpers, NodeConnectionType } from 'n8n-workflow';
import type { IExecutionResponse, INodeUi, IUpdateInformation, TargetItem } from '@/Interface';
@@ -664,9 +668,12 @@ export default defineComponent({
nodeTypeSelected(nodeTypeName: string) {
this.$emit('nodeTypeSelected', nodeTypeName);
},
async onSwitchSelectedNode(nodeTypeName: string) {
onSwitchSelectedNode(nodeTypeName: string) {
this.$emit('switchSelectedNode', nodeTypeName);
},
onOpenConnectionNodeCreator(nodeTypeName: string, connectionType: ConnectionTypes) {
this.$emit('openConnectionNodeCreator', nodeTypeName, connectionType);
},
async close() {
if (this.isDragging) {
return;
@@ -780,8 +787,9 @@ export default defineComponent({
}
.data-display-wrapper {
height: calc(100% - var(--spacing-2xl));
height: calc(100% - var(--spacing-l)) !important;
margin-top: var(--spacing-xl) !important;
margin-bottom: var(--spacing-xl) !important;
width: 100%;
background: none;
border: none;