mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(editor): Updating node reference pattern in expression editor (#6228)
* feat(editor): Updating node reference pattern in expression editor * ⚡ Updated node ref when dragging data, telemetry and some comments * ✔️ Updating tests * 🔨 Removing old telemetry code, updating the current one based on the review feedback * ✔️ Updating mapping e2e tests
This commit is contained in:
committed by
GitHub
parent
fc181ffbff
commit
13bcec1661
@@ -181,21 +181,22 @@ export default mixins(externalHooks, genericHelpers, debounceHelper).extend({
|
||||
trackProperties.variable_type = 'Raw value';
|
||||
}
|
||||
|
||||
if (splitVar[0].startsWith('$node')) {
|
||||
const sourceNodeName = splitVar[0].split('"')[1];
|
||||
trackProperties.node_type_source =
|
||||
this.workflowsStore.getNodeByName(sourceNodeName)?.type;
|
||||
const nodeConnections: Array<Array<{ node: string }>> =
|
||||
this.workflowsStore.outgoingConnectionsByNodeName(sourceNodeName).main;
|
||||
trackProperties.is_immediate_input =
|
||||
nodeConnections &&
|
||||
nodeConnections[0] &&
|
||||
!!nodeConnections[0].find(({ node }) => node === this.ndvStore.activeNode?.name || '')
|
||||
? true
|
||||
: false;
|
||||
if (splitVar[0].startsWith("$('")) {
|
||||
const match = /\$\('(.*?)'\)/.exec(splitVar[0]);
|
||||
if (match && match.length > 1) {
|
||||
const sourceNodeName = match[1];
|
||||
trackProperties.node_type_source =
|
||||
this.workflowsStore.getNodeByName(sourceNodeName)?.type;
|
||||
const nodeConnections: Array<Array<{ node: string }>> =
|
||||
this.workflowsStore.outgoingConnectionsByNodeName(sourceNodeName).main;
|
||||
trackProperties.is_immediate_input =
|
||||
nodeConnections &&
|
||||
nodeConnections[0] &&
|
||||
nodeConnections[0].some(({ node }) => node === this.ndvStore.activeNode?.name || '');
|
||||
|
||||
if (splitVar[1].startsWith('parameter')) {
|
||||
trackProperties.parameter_name_source = splitVar[1].split('"')[1];
|
||||
if (splitVar[1].startsWith('parameter')) {
|
||||
trackProperties.parameter_name_source = splitVar[1].split('"')[1];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
trackProperties.is_immediate_input = true;
|
||||
|
||||
Reference in New Issue
Block a user