n8n/packages/nodes-base/nodes/If/If.node.ts
Elias Meire 8a5343401d
feat(editor): Filter component + implement in If node (#7490)
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>
2023-12-13 14:45:22 +01:00

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);
}
}