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

@@ -165,6 +165,13 @@
</div>
</div>
</div>
<NDVSubConnections
v-if="node"
ref="subConnections"
:root-node="node"
@switchSelectedNode="onSwitchSelectedNode"
@openConnectionNodeCreator="onOpenConnectionNodeCreator"
/>
<n8n-block-ui :show="blockUI" />
</div>
</template>
@@ -178,6 +185,7 @@ import type {
INodeParameters,
INodeProperties,
NodeParameterValue,
ConnectionTypes,
} from 'n8n-workflow';
import { NodeHelpers, NodeConnectionType, deepCopy } from 'n8n-workflow';
import type {
@@ -199,6 +207,7 @@ import ParameterInputList from '@/components/ParameterInputList.vue';
import NodeCredentials from '@/components/NodeCredentials.vue';
import NodeSettingsTabs from '@/components/NodeSettingsTabs.vue';
import NodeWebhooks from '@/components/NodeWebhooks.vue';
import NDVSubConnections from '@/components/NDVSubConnections.vue';
import { get, set, unset } from 'lodash-es';
import NodeExecuteButton from './NodeExecuteButton.vue';
@@ -223,6 +232,7 @@ export default defineComponent({
ParameterInputList,
NodeSettingsTabs,
NodeWebhooks,
NDVSubConnections,
NodeExecuteButton,
},
setup() {
@@ -467,6 +477,12 @@ export default defineComponent({
this.eventBus?.off('openSettings', this.openSettings);
},
methods: {
onSwitchSelectedNode(node: string) {
this.$emit('switchSelectedNode', node);
},
onOpenConnectionNodeCreator(node: string, connectionType: ConnectionTypes) {
this.$emit('openConnectionNodeCreator', node, connectionType);
},
populateHiddenIssuesSet() {
if (!this.node || !this.workflowsStore.isNodePristine(this.node.name)) return;
@@ -612,6 +628,7 @@ export default defineComponent({
},
onNodeExecute() {
this.hiddenIssuesInputs = [];
(this.$refs.subConnections as InstanceType<typeof NDVSubConnections>)?.showNodeInputsIssues();
this.$emit('execute');
},
setValue(name: string, value: NodeParameterValue) {