mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -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',
|
||||
},
|
||||
{
|
||||
name: 'Match Fields',
|
||||
value: 'matchFields',
|
||||
name: 'Merge By Fields',
|
||||
value: 'mergeByFields',
|
||||
description: 'Pair items with the same field values',
|
||||
},
|
||||
{
|
||||
name: 'Match Positions',
|
||||
value: 'matchPositions',
|
||||
name: 'Merge By Position',
|
||||
value: 'mergeByPosition',
|
||||
description: 'Pair items based on their order',
|
||||
},
|
||||
{
|
||||
|
@ -81,10 +81,10 @@ const versionDescription: INodeTypeDescription = {
|
|||
description: 'How data of branches should be merged',
|
||||
},
|
||||
|
||||
// matchFields ------------------------------------------------------------------
|
||||
// mergeByFields ------------------------------------------------------------------
|
||||
{
|
||||
displayName: 'Fields to Match',
|
||||
name: 'matchFields',
|
||||
name: 'mergeByFields',
|
||||
type: 'fixedCollection',
|
||||
placeholder: 'Add Fields to Match',
|
||||
default: { values: [{ field1: '', field2: '' }] },
|
||||
|
@ -119,7 +119,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
mode: ['matchFields'],
|
||||
mode: ['mergeByFields'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -152,7 +152,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
default: 'keepMatches',
|
||||
displayOptions: {
|
||||
show: {
|
||||
mode: ['matchFields'],
|
||||
mode: ['mergeByFields'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -177,7 +177,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
default: 'both',
|
||||
displayOptions: {
|
||||
show: {
|
||||
mode: ['matchFields'],
|
||||
mode: ['mergeByFields'],
|
||||
joinMode: ['keepMatches'],
|
||||
},
|
||||
},
|
||||
|
@ -203,7 +203,7 @@ const versionDescription: INodeTypeDescription = {
|
|||
default: 'both',
|
||||
displayOptions: {
|
||||
show: {
|
||||
mode: ['matchFields'],
|
||||
mode: ['mergeByFields'],
|
||||
joinMode: ['keepNonMatches'],
|
||||
},
|
||||
},
|
||||
|
@ -331,7 +331,7 @@ export class MergeV2 implements INodeType {
|
|||
return [returnData];
|
||||
}
|
||||
|
||||
if (mode === 'matchPositions') {
|
||||
if (mode === 'mergeByPosition') {
|
||||
const clashHandling = this.getNodeParameter(
|
||||
'options.clashHandling.values',
|
||||
0,
|
||||
|
@ -399,9 +399,9 @@ export class MergeV2 implements INodeType {
|
|||
}
|
||||
}
|
||||
|
||||
if (mode === 'matchFields') {
|
||||
if (mode === 'mergeByFields') {
|
||||
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;
|
||||
|
|
|
@ -87,7 +87,7 @@ export const optionsDescription: INodeProperties[] = [
|
|||
...clashHandlingProperties,
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/mode': ['matchFields'],
|
||||
'/mode': ['mergeByFields'],
|
||||
},
|
||||
hide: {
|
||||
'/joinMode': ['keepMatches', 'keepNonMatches'],
|
||||
|
@ -98,7 +98,7 @@ export const optionsDescription: INodeProperties[] = [
|
|||
...clashHandlingProperties,
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/mode': ['matchFields'],
|
||||
'/mode': ['mergeByFields'],
|
||||
'/joinMode': ['keepMatches'],
|
||||
'/outputDataFrom': ['both'],
|
||||
},
|
||||
|
@ -108,7 +108,7 @@ export const optionsDescription: INodeProperties[] = [
|
|||
...clashHandlingProperties,
|
||||
displayOptions: {
|
||||
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',
|
||||
displayOptions: {
|
||||
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',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/mode': ['matchPositions'],
|
||||
'/mode': ['mergeByPosition'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -158,7 +158,7 @@ export const optionsDescription: INodeProperties[] = [
|
|||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/mode': ['matchFields'],
|
||||
'/mode': ['mergeByFields'],
|
||||
'/joinMode': ['keepMatches'],
|
||||
'/outputDataFrom': ['both'],
|
||||
},
|
||||
|
@ -183,7 +183,7 @@ export const optionsDescription: INodeProperties[] = [
|
|||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/mode': ['matchFields'],
|
||||
'/mode': ['mergeByFields'],
|
||||
'/joinMode': ['enrichInput1', 'enrichInput2'],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue