feat(editor): Node Creator AI nodes improvements (#9484)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-05-30 16:53:33 +02:00
committed by GitHub
parent e68a3fd6ce
commit be4f54de15
62 changed files with 661 additions and 204 deletions

View File

@@ -9,7 +9,7 @@ import type {
VIEWS,
ROLE,
} from '@/constants';
import type { IMenuItem } from 'n8n-design-system';
import type { IMenuItem, NodeCreatorTag } from 'n8n-design-system';
import {
type GenericValue,
type IConnections,
@@ -932,7 +932,9 @@ export type SimplifiedNodeType = Pick<
| 'codex'
| 'defaults'
| 'outputs'
>;
> & {
tag?: string;
};
export interface SubcategoryItemProps {
description?: string;
iconType?: string;
@@ -951,11 +953,21 @@ export interface ViewItemProps {
title: string;
description: string;
icon: string;
tag?: string;
tag?: NodeCreatorTag;
borderless?: boolean;
}
export interface LabelItemProps {
key: string;
}
export interface LinkItemProps {
url: string;
key: string;
newTab?: boolean;
title: string;
description: string;
icon: string;
tag?: NodeCreatorTag;
}
export interface ActionTypeDescription extends SimplifiedNodeType {
displayOptions?: IDisplayOptions;
values?: IDataObject;
@@ -1010,6 +1022,11 @@ export interface LabelCreateElement extends CreateElementBase {
properties: LabelItemProps;
}
export interface LinkCreateElement extends CreateElementBase {
type: 'link';
properties: LinkItemProps;
}
export interface ActionCreateElement extends CreateElementBase {
type: 'action';
subcategory: string;
@@ -1023,7 +1040,8 @@ export type INodeCreateElement =
| SectionCreateElement
| ViewCreateElement
| LabelCreateElement
| ActionCreateElement;
| ActionCreateElement
| LinkCreateElement;
export interface SubcategorizedNodeTypes {
[subcategory: string]: INodeCreateElement[];