refactor(editor): create ndv store (#4409)

* refactor ndv module out

* update active node in root state

* simplify

* fix conflict

* fix dragging
This commit is contained in:
Mutasem Aldmour
2022-10-24 11:35:03 +02:00
committed by GitHub
parent f6733cff9d
commit 127f988400
38 changed files with 331 additions and 308 deletions

View File

@@ -497,7 +497,7 @@ export default mixins(
}
// Get the resolved parameter values of the current node
const currentNodeParameters = this.$store.getters.activeNode.parameters;
const currentNodeParameters = this.$store.getters['ndv/activeNode'].parameters;
try {
const resolvedNodeParameters = this.resolveParameter(currentNodeParameters);
@@ -512,7 +512,7 @@ export default mixins(
}
},
node (): INodeUi | null {
return this.$store.getters.activeNode;
return this.$store.getters['ndv/activeNode'];
},
displayTitle (): string {
const interpolation = { interpolate: { shortPath: this.shortPath } };
@@ -782,7 +782,7 @@ export default mixins(
// Get the resolved parameter values of the current node
try {
const currentNodeParameters = (this.$store.getters.activeNode as INodeUi).parameters;
const currentNodeParameters = (this.$store.getters['ndv/activeNode'] as INodeUi).parameters;
const resolvedNodeParameters = this.resolveParameter(currentNodeParameters) as INodeParameters;
const loadOptionsMethod = this.getArgument('loadOptionsMethod') as string | undefined;
const loadOptions = this.getArgument('loadOptions') as ILoadOptions | undefined;
@@ -826,7 +826,7 @@ export default mixins(
parameter_field_type: this.parameter.type,
new_expression: !this.isValueExpression,
workflow_id: this.$store.getters.workflowId,
session_id: this.$store.getters['ui/ndvSessionId'],
session_id: this.$store.getters['ndv/ndvSessionId'],
source: this.eventSource || 'ndv',
});
}
@@ -958,7 +958,7 @@ export default mixins(
node_type: this.node && this.node.type,
resource: this.node && this.node.parameters.resource,
is_custom: value === CUSTOM_API_CALL_KEY,
session_id: this.$store.getters['ui/ndvSessionId'],
session_id: this.$store.getters['ndv/ndvSessionId'],
parameter: this.parameter.name,
});
}