mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(Merge Node): Change parameter names
This commit is contained in:
parent
5130529066
commit
76b0dd9de5
|
@ -57,13 +57,13 @@ const versionDescription: INodeTypeDescription = {
|
||||||
description: 'All items of input 1, then all items of input 2',
|
description: 'All items of input 1, then all items of input 2',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Match Fields',
|
name: 'Merge By Fields',
|
||||||
value: 'matchFields',
|
value: 'mergeByFields',
|
||||||
description: 'Pair items with the same field values',
|
description: 'Pair items with the same field values',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Match Positions',
|
name: 'Merge By Position',
|
||||||
value: 'matchPositions',
|
value: 'mergeByPosition',
|
||||||
description: 'Pair items based on their order',
|
description: 'Pair items based on their order',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -81,10 +81,10 @@ const versionDescription: INodeTypeDescription = {
|
||||||
description: 'How data of branches should be merged',
|
description: 'How data of branches should be merged',
|
||||||
},
|
},
|
||||||
|
|
||||||
// matchFields ------------------------------------------------------------------
|
// mergeByFields ------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
displayName: 'Fields to Match',
|
displayName: 'Fields to Match',
|
||||||
name: 'matchFields',
|
name: 'mergeByFields',
|
||||||
type: 'fixedCollection',
|
type: 'fixedCollection',
|
||||||
placeholder: 'Add Fields to Match',
|
placeholder: 'Add Fields to Match',
|
||||||
default: { values: [{ field1: '', field2: '' }] },
|
default: { values: [{ field1: '', field2: '' }] },
|
||||||
|
@ -119,7 +119,7 @@ const versionDescription: INodeTypeDescription = {
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
mode: ['matchFields'],
|
mode: ['mergeByFields'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -152,7 +152,7 @@ const versionDescription: INodeTypeDescription = {
|
||||||
default: 'keepMatches',
|
default: 'keepMatches',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
mode: ['matchFields'],
|
mode: ['mergeByFields'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -177,7 +177,7 @@ const versionDescription: INodeTypeDescription = {
|
||||||
default: 'both',
|
default: 'both',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
mode: ['matchFields'],
|
mode: ['mergeByFields'],
|
||||||
joinMode: ['keepMatches'],
|
joinMode: ['keepMatches'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -203,7 +203,7 @@ const versionDescription: INodeTypeDescription = {
|
||||||
default: 'both',
|
default: 'both',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
mode: ['matchFields'],
|
mode: ['mergeByFields'],
|
||||||
joinMode: ['keepNonMatches'],
|
joinMode: ['keepNonMatches'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -331,7 +331,7 @@ export class MergeV2 implements INodeType {
|
||||||
return [returnData];
|
return [returnData];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode === 'matchPositions') {
|
if (mode === 'mergeByPosition') {
|
||||||
const clashHandling = this.getNodeParameter(
|
const clashHandling = this.getNodeParameter(
|
||||||
'options.clashHandling.values',
|
'options.clashHandling.values',
|
||||||
0,
|
0,
|
||||||
|
@ -399,9 +399,9 @@ export class MergeV2 implements INodeType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode === 'matchFields') {
|
if (mode === 'mergeByFields') {
|
||||||
const matchFields = checkMatchFieldsInput(
|
const matchFields = checkMatchFieldsInput(
|
||||||
this.getNodeParameter('matchFields.values', 0, []) as IDataObject[],
|
this.getNodeParameter('mergeByFields.values', 0, []) as IDataObject[],
|
||||||
);
|
);
|
||||||
|
|
||||||
const joinMode = this.getNodeParameter('joinMode', 0) as MatchFieldsJoinMode;
|
const joinMode = this.getNodeParameter('joinMode', 0) as MatchFieldsJoinMode;
|
||||||
|
|
|
@ -87,7 +87,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
...clashHandlingProperties,
|
...clashHandlingProperties,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchFields'],
|
'/mode': ['mergeByFields'],
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
'/joinMode': ['keepMatches', 'keepNonMatches'],
|
'/joinMode': ['keepMatches', 'keepNonMatches'],
|
||||||
|
@ -98,7 +98,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
...clashHandlingProperties,
|
...clashHandlingProperties,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchFields'],
|
'/mode': ['mergeByFields'],
|
||||||
'/joinMode': ['keepMatches'],
|
'/joinMode': ['keepMatches'],
|
||||||
'/outputDataFrom': ['both'],
|
'/outputDataFrom': ['both'],
|
||||||
},
|
},
|
||||||
|
@ -108,7 +108,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
...clashHandlingProperties,
|
...clashHandlingProperties,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['multiplex', 'matchPositions'],
|
'/mode': ['multiplex', 'mergeByPosition'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -121,7 +121,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
'Whether to disallow referencing child fields using `parent.child` in the field name',
|
'Whether to disallow referencing child fields using `parent.child` in the field name',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchFields'],
|
'/mode': ['mergeByFields'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -135,7 +135,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
'If there are different numbers of items in input 1 and input 2, whether to include the ones at the end with nothing to pair with',
|
'If there are different numbers of items in input 1 and input 2, whether to include the ones at the end with nothing to pair with',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchPositions'],
|
'/mode': ['mergeByPosition'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -158,7 +158,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchFields'],
|
'/mode': ['mergeByFields'],
|
||||||
'/joinMode': ['keepMatches'],
|
'/joinMode': ['keepMatches'],
|
||||||
'/outputDataFrom': ['both'],
|
'/outputDataFrom': ['both'],
|
||||||
},
|
},
|
||||||
|
@ -183,7 +183,7 @@ export const optionsDescription: INodeProperties[] = [
|
||||||
],
|
],
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
'/mode': ['matchFields'],
|
'/mode': ['mergeByFields'],
|
||||||
'/joinMode': ['enrichInput1', 'enrichInput2'],
|
'/joinMode': ['enrichInput1', 'enrichInput2'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue