mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-27 19:15:01 +02:00
refactor(core)!: Migrate node defaults.color to iconColor (#34180)
This commit is contained in:
parent
1a1ad686cd
commit
cf54dccb08
|
|
@ -277,9 +277,9 @@ export class AgentV1 implements INodeType {
|
|||
this.description = {
|
||||
version: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9],
|
||||
...baseDescription,
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'AI Agent',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: `={{
|
||||
((agent, hasOutputParser) => {
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ export class AgentToolV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2.2],
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'AI Agent Tool',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: `={{
|
||||
((hasOutputParser, needsFallback) => {
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ export class AgentV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2, 2.1, 2.2],
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'AI Agent',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: `={{
|
||||
((hasOutputParser, needsFallback) => {
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ export class AgentToolV3 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [3],
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'AI Agent Tool',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: `={{
|
||||
((hasOutputParser, needsFallback) => {
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ export class AgentV3 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [3, 3.1],
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'AI Agent',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: `={{
|
||||
((hasOutputParser, needsFallback) => {
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ export class OpenAiAssistant implements INodeType {
|
|||
version: [1, 1.1],
|
||||
description: 'Utilizes Assistant API from Open AI.',
|
||||
subtitle: 'Open AI Assistant',
|
||||
iconColor: 'black',
|
||||
defaults: {
|
||||
name: 'OpenAI Assistant',
|
||||
color: '#404040',
|
||||
},
|
||||
codex: {
|
||||
alias: ['LangChain'],
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ export class ChainSummarizationV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'gray',
|
||||
defaults: {
|
||||
name: 'Summarization Chain',
|
||||
color: '#909298',
|
||||
},
|
||||
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ export class ChainSummarizationV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2, 2.1],
|
||||
iconColor: 'gray',
|
||||
defaults: {
|
||||
name: 'Summarization Chain',
|
||||
color: '#909298',
|
||||
},
|
||||
|
||||
inputs: `={{ ((parameter) => { ${getInputs.toString()}; return getInputs(parameter) })($parameter) }}`,
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ export class MemoryXata implements INodeType {
|
|||
description: 'Use Xata Memory',
|
||||
defaults: {
|
||||
name: 'Xata',
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-non-core-color-present
|
||||
color: '#1321A7',
|
||||
},
|
||||
codex: {
|
||||
categories: ['AI'],
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ export class ManualChatTrigger implements INodeType {
|
|||
eventTriggerDescription: '',
|
||||
maxNodes: 1,
|
||||
hidden: true,
|
||||
iconColor: 'gray',
|
||||
defaults: {
|
||||
name: 'When chat message received',
|
||||
color: '#909298',
|
||||
},
|
||||
codex: {
|
||||
categories: ['Core Nodes'],
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ export class VectorStorePineconeInsert implements INodeType {
|
|||
description: 'Insert data into Pinecone Vector Store index',
|
||||
defaults: {
|
||||
name: 'Pinecone: Insert',
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-non-core-color-present
|
||||
color: '#1321A7',
|
||||
},
|
||||
codex: {
|
||||
categories: ['AI'],
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ export const predefinedNodesTypes: INodeTypeData = {
|
|||
description: 'Test tool executor',
|
||||
defaults: {
|
||||
name: 'Test Tool Executor',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.AiTool, NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -69,7 +68,6 @@ export const predefinedNodesTypes: INodeTypeData = {
|
|||
inputs: [],
|
||||
defaults: {
|
||||
name: 'Test Tool',
|
||||
color: '#0000FF',
|
||||
},
|
||||
outputs: [NodeConnectionTypes.AiTool],
|
||||
properties: [],
|
||||
|
|
@ -87,7 +85,6 @@ export const predefinedNodesTypes: INodeTypeData = {
|
|||
description: 'Tests if versioning works',
|
||||
defaults: {
|
||||
name: 'Version Test',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -146,7 +143,6 @@ export const predefinedNodesTypes: INodeTypeData = {
|
|||
description: 'Sets a value',
|
||||
defaults: {
|
||||
name: 'Set',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -178,7 +174,6 @@ export const predefinedNodesTypes: INodeTypeData = {
|
|||
description: 'Sets multiple values',
|
||||
defaults: {
|
||||
name: 'Set Multi',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ const makeNodeType = (outputs: NodeConnectionType[], name: string) =>
|
|||
inputs: [],
|
||||
outputs,
|
||||
properties: [],
|
||||
defaults: { color: '', name: '' },
|
||||
defaults: { name: '' },
|
||||
group: [],
|
||||
description: '',
|
||||
}) as INodeTypeDescription;
|
||||
|
|
|
|||
|
|
@ -256,6 +256,15 @@ describe('util: Node Icon', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should not fall back to the legacy defaults.color when iconColor is absent', () => {
|
||||
const result = getNodeIconSource(
|
||||
{ icon: 'icon:user', defaults: { color: '#ff0000' } } as unknown as IconNodeType,
|
||||
null,
|
||||
null,
|
||||
);
|
||||
expect(result).toEqual({ type: 'icon', name: 'user' });
|
||||
});
|
||||
|
||||
it('should include badge if available', () => {
|
||||
const result = getNodeIconSource(
|
||||
mock<IconNodeType>({ badgeIconUrl: 'images/badge.svg', name: undefined }),
|
||||
|
|
|
|||
|
|
@ -106,8 +106,7 @@ const getNodeIconColor = (nodeType: IconNodeType): string | undefined => {
|
|||
if ('iconColor' in nodeType && nodeType.iconColor) {
|
||||
return `var(--node--icon--color--${nodeType.iconColor})`;
|
||||
}
|
||||
const defaultColor = nodeType?.defaults?.color;
|
||||
return typeof defaultColor === 'string' ? defaultColor : undefined;
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const prefixBaseUrl = (url: string): string => {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ const nodeType: INodeTypeDescription = {
|
|||
},
|
||||
],
|
||||
properties: [],
|
||||
defaults: { color: '', name: '' },
|
||||
defaults: { name: '' },
|
||||
group: [],
|
||||
description: '',
|
||||
};
|
||||
|
|
@ -153,7 +153,7 @@ describe('NDVSubConnections', () => {
|
|||
],
|
||||
outputs: [NodeConnectionTypes.AiLanguageModel],
|
||||
properties: [],
|
||||
defaults: { color: '', name: '' },
|
||||
defaults: { name: '' },
|
||||
group: [],
|
||||
description: '',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ export const EXECUTE_WORKFLOW_NODE_TYPE_TEST: INodeTypeDescription = {
|
|||
version: [1, 1.1, 1.2],
|
||||
subtitle: '={{"Workflow: " + $parameter["workflowId"]}}',
|
||||
description: 'Execute another workflow',
|
||||
defaults: { name: 'Execute Workflow', color: '#ff6d5a' },
|
||||
defaults: { name: 'Execute Workflow' },
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
properties: [
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ export const mockSimplifiedNodeType = (
|
|||
},
|
||||
alias: ['alias1', 'alias2'],
|
||||
},
|
||||
defaults: {
|
||||
color: '#ffffff',
|
||||
},
|
||||
defaults: {},
|
||||
outputs: [],
|
||||
...overrides,
|
||||
});
|
||||
|
|
@ -58,7 +56,7 @@ const mockSubcategoryItemProps = (
|
|||
icon: 'smile',
|
||||
title: 'Sample title',
|
||||
subcategory: 'sampleSubcategory',
|
||||
defaults: { color: '#ffffff' },
|
||||
defaults: {},
|
||||
forceIncludeNodes: ['node1', 'node2'],
|
||||
...overrides,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -162,9 +162,9 @@ function getEvaluationNode(
|
|||
...evaluationNode,
|
||||
properties: {
|
||||
...evaluationNode.properties,
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'Evaluation',
|
||||
color: '#c3c9d5',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -402,9 +402,9 @@ export function TriggerView() {
|
|||
displayName: 'When running evaluation',
|
||||
description: 'Run a dataset through your workflow to test performance',
|
||||
icon: 'fa:check-double',
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'Evaluation',
|
||||
color: '#c3c9d5',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ export class Cron implements INodeType {
|
|||
eventTriggerDescription: '',
|
||||
activationMessage:
|
||||
'Your cron trigger will now trigger executions on the schedule you have defined.',
|
||||
iconColor: 'emerald',
|
||||
defaults: {
|
||||
name: 'Cron',
|
||||
color: '#29a568',
|
||||
},
|
||||
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ const versionDescription: INodeTypeDescription = {
|
|||
description: 'Provide cryptographic utilities',
|
||||
defaults: {
|
||||
name: 'Crypto',
|
||||
color: '#408000',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ const versionDescription: INodeTypeDescription = {
|
|||
description: 'Provide cryptographic utilities',
|
||||
defaults: {
|
||||
name: 'Crypto',
|
||||
color: '#408000',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ const versionDescription: INodeTypeDescription = {
|
|||
version: 1,
|
||||
description: 'Allows you to manipulate date and time values',
|
||||
subtitle: '={{$parameter["action"]}}',
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Date & Time',
|
||||
color: '#408000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ export class DateTimeV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 2,
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Date & Time',
|
||||
color: '#408000',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ const versionDescription: INodeTypeDescription = {
|
|||
version: 1,
|
||||
description: 'Triggers the workflow when a new email is received',
|
||||
eventTriggerDescription: 'Waiting for you to receive an email',
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Email Trigger (IMAP)',
|
||||
color: '#44AA22',
|
||||
},
|
||||
triggerPanel: {
|
||||
header: '',
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ const versionDescription: INodeTypeDescription = {
|
|||
eventTriggerDescription: 'Waiting for you to receive an email',
|
||||
defaults: {
|
||||
name: 'Email Trigger (IMAP)',
|
||||
color: '#44AA22',
|
||||
},
|
||||
triggerPanel: {
|
||||
header: '',
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ export class Evaluation implements INodeType {
|
|||
description: 'Runs an evaluation',
|
||||
eventTriggerDescription: '',
|
||||
subtitle: '={{$parameter["operation"]}}',
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'Evaluation',
|
||||
color: '#c3c9d5',
|
||||
},
|
||||
// Pass function explicitly since expression context doesn't allow imports in getInputConnectionTypes
|
||||
inputs: `={{(${getInputConnectionTypes})($parameter, ${metricRequiresModelConnection})}}`,
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ export class EvaluationTrigger implements INodeType {
|
|||
version: [4.6, 4.7],
|
||||
description: 'Run a test dataset through your workflow to check performance',
|
||||
eventTriggerDescription: '',
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'When fetching a dataset row',
|
||||
color: '#c3c9d5',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export class FilterV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'sky-blue',
|
||||
defaults: {
|
||||
name: 'Filter',
|
||||
color: '#229eff',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ export class FilterV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2, 2.1, 2.2, 2.3],
|
||||
iconColor: 'sky-blue',
|
||||
defaults: {
|
||||
name: 'Filter',
|
||||
color: '#229eff',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ export class Function implements INodeType {
|
|||
version: 1,
|
||||
description:
|
||||
'Run custom function code which gets executed once and allows you to add, remove, change and replace items',
|
||||
iconColor: 'amber',
|
||||
defaults: {
|
||||
name: 'Function',
|
||||
color: '#FF9922',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ export class FunctionItem implements INodeType {
|
|||
group: ['transform'],
|
||||
version: 1,
|
||||
description: 'Run custom function code which gets executed once per item',
|
||||
iconColor: 'amber',
|
||||
defaults: {
|
||||
name: 'Function Item',
|
||||
color: '#ddbb33',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ export class HtmlExtract implements INodeType {
|
|||
hidden: true,
|
||||
subtitle: '={{$parameter["sourceData"] + ": " + $parameter["dataPropertyName"]}}',
|
||||
description: 'Extracts data from HTML',
|
||||
iconColor: 'dark-blue',
|
||||
defaults: {
|
||||
name: 'HTML Extract',
|
||||
color: '#333377',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ export class HttpRequestV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'HTTP Request',
|
||||
color: '#2200DD',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ export class HttpRequestV2 implements INodeType {
|
|||
constructor(baseDescription: INodeTypeBaseDescription) {
|
||||
this.description = {
|
||||
...baseDescription,
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'HTTP Request',
|
||||
color: '#2200DD',
|
||||
},
|
||||
version: 2,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -73,9 +73,9 @@ export class HttpRequestV3 implements INodeType {
|
|||
...baseDescription,
|
||||
subtitle: '={{$parameter["method"] + ": " + $parameter["url"]}}',
|
||||
version: [3, 4, 4.1, 4.2, 4.3, 4.4],
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'HTTP Request',
|
||||
color: '#0004F5',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ export class ICalendar implements INodeType {
|
|||
version: 1,
|
||||
subtitle: '={{$parameter["operation"]}}',
|
||||
description: 'Create iCalendar file',
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'iCalendar',
|
||||
color: '#408000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ export class IfV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'If',
|
||||
color: '#408000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ export class IfV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2, 2.1, 2.2, 2.3],
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'If',
|
||||
color: '#408000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main, NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export class Interval implements INodeType {
|
|||
eventTriggerDescription: '',
|
||||
activationMessage:
|
||||
'Your interval trigger will now trigger executions on the schedule you have defined.',
|
||||
iconColor: 'lime',
|
||||
defaults: {
|
||||
name: 'Interval',
|
||||
color: '#00FF00',
|
||||
},
|
||||
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ export class MergeV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'teal',
|
||||
defaults: {
|
||||
name: 'Merge',
|
||||
color: '#00bbcc',
|
||||
},
|
||||
|
||||
inputs: [NodeConnectionTypes.Main, NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ export class MoveBinaryData implements INodeType {
|
|||
version: [1, 1.1],
|
||||
subtitle: '={{$parameter["mode"]==="binaryToJson" ? "Binary to JSON" : "JSON to Binary"}}',
|
||||
description: 'Move data between binary and JSON properties',
|
||||
iconColor: 'purple',
|
||||
defaults: {
|
||||
name: 'Convert to/from binary data',
|
||||
color: '#7722CC',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ export class ReadBinaryFile implements INodeType {
|
|||
version: 1,
|
||||
hidden: true,
|
||||
description: 'Reads a binary file from disk',
|
||||
iconColor: 'forest-green',
|
||||
defaults: {
|
||||
name: 'Read Binary File',
|
||||
color: '#449922',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export class ReadBinaryFiles implements INodeType {
|
|||
group: ['input'],
|
||||
version: 1,
|
||||
description: 'Reads binary files from disk',
|
||||
iconColor: 'forest-green',
|
||||
defaults: {
|
||||
name: 'Read Binary Files',
|
||||
color: '#44AA44',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ export class ReadPDF implements INodeType {
|
|||
group: ['input'],
|
||||
version: 1,
|
||||
description: 'Reads a PDF and extracts its content',
|
||||
iconColor: 'dark-blue',
|
||||
defaults: {
|
||||
name: 'Read PDF',
|
||||
color: '#003355',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ const versionDescription: INodeTypeDescription = {
|
|||
group: ['input'],
|
||||
version: [1, 2],
|
||||
description: 'Sets values on items and optionally remove other values',
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'Set',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ export class Simulate implements INodeType {
|
|||
description: 'Simulate a node',
|
||||
subtitle: '={{$parameter.subtitle || undefined}}',
|
||||
icon: 'fa:arrow-right',
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'Simulate',
|
||||
color: '#b0b0b0',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ export class SimulateTrigger implements INodeType {
|
|||
group: ['trigger'],
|
||||
version: 1,
|
||||
description: 'Simulate a trigger node',
|
||||
iconColor: 'neutral',
|
||||
defaults: {
|
||||
name: 'Simulate Trigger',
|
||||
color: '#b0b0b0',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ export class SplitInBatchesV1 implements INodeType {
|
|||
group: ['organization'],
|
||||
version: 1,
|
||||
description: 'Split data into batches and iterate over each batch',
|
||||
iconColor: 'dark-green',
|
||||
defaults: {
|
||||
name: 'Split In Batches',
|
||||
color: '#007755',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ export class SplitInBatchesV2 implements INodeType {
|
|||
group: ['organization'],
|
||||
version: 2,
|
||||
description: 'Split data into batches and iterate over each batch',
|
||||
iconColor: 'dark-green',
|
||||
defaults: {
|
||||
name: 'Split In Batches',
|
||||
color: '#007755',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ export class SpreadsheetFileV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 1,
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'Spreadsheet File',
|
||||
color: '#2244FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export class SpreadsheetFileV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: 2,
|
||||
iconColor: 'blue',
|
||||
defaults: {
|
||||
name: 'Spreadsheet File',
|
||||
color: '#2244FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ export class StickyNote implements INodeType {
|
|||
group: ['input'],
|
||||
version: 1,
|
||||
description: 'Make your workflow easier to understand',
|
||||
iconColor: 'amber',
|
||||
defaults: {
|
||||
name: 'Sticky Note',
|
||||
color: '#FFD233',
|
||||
},
|
||||
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ export class SwitchV1 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [1],
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Switch',
|
||||
color: '#506000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ export class SwitchV2 implements INodeType {
|
|||
this.description = {
|
||||
...baseDescription,
|
||||
version: [2],
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Switch',
|
||||
color: '#506000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ export class SwitchV3 implements INodeType {
|
|||
...baseDescription,
|
||||
subtitle: `=mode: {{(${capitalize})($parameter["mode"])}}`,
|
||||
version: [3, 3.1, 3.2, 3.3, 3.4],
|
||||
iconColor: 'green',
|
||||
defaults: {
|
||||
name: 'Switch',
|
||||
color: '#506000',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: `={{(${configuredOutputs})($parameter)}}`,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ export class WorkflowTrigger implements INodeType {
|
|||
activationMessage: 'Your workflow will now trigger executions on the event you have defined.',
|
||||
defaults: {
|
||||
name: 'Workflow Trigger',
|
||||
color: '#ff6d5a',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ export class WriteBinaryFile implements INodeType {
|
|||
group: ['output'],
|
||||
version: 1,
|
||||
description: 'Writes a binary file to disk',
|
||||
iconColor: 'red',
|
||||
defaults: {
|
||||
name: 'Write Binary File',
|
||||
color: '#CC2233',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
|
|
@ -2739,10 +2739,6 @@ export interface INodeOutputConfiguration {
|
|||
export type ExpressionString = `={{${string}}}`;
|
||||
|
||||
export type NodeDefaults = Partial<{
|
||||
/**
|
||||
* @deprecated Use {@link INodeTypeBaseDescription.iconColor|iconColor} instead. `iconColor` supports dark mode and uses preset colors from n8n's design system.
|
||||
*/
|
||||
color: string;
|
||||
name: string;
|
||||
}>;
|
||||
|
||||
|
|
|
|||
|
|
@ -6387,7 +6387,6 @@ describe('NodeHelpers', () => {
|
|||
version: 0,
|
||||
defaults: {
|
||||
name: '',
|
||||
color: '',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
properties: [],
|
||||
|
|
@ -6407,7 +6406,6 @@ describe('NodeHelpers', () => {
|
|||
version: 0,
|
||||
defaults: {
|
||||
name: '',
|
||||
color: '',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
properties: [],
|
||||
|
|
@ -6427,7 +6425,6 @@ describe('NodeHelpers', () => {
|
|||
version: 0,
|
||||
defaults: {
|
||||
name: '',
|
||||
color: '',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
properties: [],
|
||||
|
|
@ -6447,7 +6444,6 @@ describe('NodeHelpers', () => {
|
|||
version: 0,
|
||||
defaults: {
|
||||
name: '',
|
||||
color: '',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
properties: [],
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ const stickyNode: LoadedClass<INodeType> = {
|
|||
group: ['input'],
|
||||
version: 1,
|
||||
description: 'Make your workflow easier to understand',
|
||||
defaults: { name: 'Sticky Note', color: '#FFD233' },
|
||||
defaults: { name: 'Sticky Note' },
|
||||
inputs: [],
|
||||
outputs: [],
|
||||
properties: [
|
||||
|
|
@ -551,7 +551,6 @@ const setNode: LoadedClass<INodeType> = {
|
|||
description: 'Sets a value',
|
||||
defaults: {
|
||||
name: 'Set',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -584,7 +583,6 @@ const codeNode: LoadedClass<INodeType> = {
|
|||
description: 'Code node',
|
||||
defaults: {
|
||||
name: 'Code',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -611,7 +609,6 @@ const htmlNode: LoadedClass<INodeType> = {
|
|||
description: 'HTML node',
|
||||
defaults: {
|
||||
name: 'HTML',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -638,7 +635,6 @@ const formNode: LoadedClass<INodeType> = {
|
|||
description: 'Form node',
|
||||
defaults: {
|
||||
name: 'Form',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -910,7 +906,6 @@ const manualTriggerNode: LoadedClass<INodeType> = {
|
|||
maxNodes: 1,
|
||||
defaults: {
|
||||
name: 'When clicking ‘Execute workflow’',
|
||||
color: '#909298',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
@ -938,7 +933,7 @@ const executeWorkflowNode: LoadedClass<INodeType> = {
|
|||
version: [1, 1.1, 1.2],
|
||||
subtitle: '={{"Workflow: " + $parameter["workflowId"]}}',
|
||||
description: 'Execute another workflow',
|
||||
defaults: { name: 'Execute Workflow', color: '#ff6d5a' },
|
||||
defaults: { name: 'Execute Workflow' },
|
||||
inputs: [],
|
||||
outputs: [],
|
||||
properties: [
|
||||
|
|
@ -1164,7 +1159,6 @@ const aiAgentNode: LoadedClass<INodeType> = {
|
|||
description: 'Generates an action plan and executes it. Can use external tools.',
|
||||
defaults: {
|
||||
name: 'AI Agent',
|
||||
color: '#404040',
|
||||
},
|
||||
inputs: [
|
||||
NodeConnectionTypes.Main,
|
||||
|
|
@ -1345,7 +1339,6 @@ export class NodeTypes implements INodeTypes {
|
|||
description: 'Sets multiple values',
|
||||
defaults: {
|
||||
name: 'Set Multi',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user