mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
8a5343401d
New Filter component + implementation in If node (v2) <img width="3283" alt="image" src="https://github.com/n8n-io/n8n/assets/8850410/35c379ef-4b62-4d06-82e7-673d4edcd652"> --------- Co-authored-by: Giulio Andreini <andreini@netseven.it> Co-authored-by: Michael Kret <michael.k@radency.com>
26 lines
686 B
TypeScript
26 lines
686 B
TypeScript
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { IfV1 } from './V1/IfV1.node';
|
|
import { IfV2 } from './V2/IfV2.node';
|
|
|
|
export class If extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'If',
|
|
name: 'if',
|
|
icon: 'fa:map-signs',
|
|
group: ['transform'],
|
|
description: 'Route items to different branches (true/false)',
|
|
defaultVersion: 2,
|
|
};
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: new IfV1(baseDescription),
|
|
2: new IfV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|