refactor(editor): Fix remaining FE type check errors (no-changelog) (#9607)

Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
Ricardo Espinoza
2024-06-10 09:23:06 -04:00
committed by GitHub
parent 1e15f73b0d
commit 22bdb0568e
84 changed files with 438 additions and 318 deletions

View File

@@ -88,7 +88,9 @@ function onSelected(item: INodeCreateElement) {
const icon = item.properties.iconUrl
? `${baseUrl}${item.properties.iconUrl}`
: item.properties.icon?.split(':')[1];
: typeof item.properties.icon === 'string'
? item.properties.icon?.split(':')[1]
: undefined;
const transformedActions = nodeActions?.map((a) =>
transformNodeType(a, item.properties.displayName, 'action'),

View File

@@ -18,7 +18,7 @@ export const mockSimplifiedNodeType = (
): SimplifiedNodeType => ({
displayName: 'Sample DisplayName',
name: 'sampleName',
icon: 'sampleIcon',
icon: 'fa:sampleIcon',
iconUrl: 'https://example.com/icon.png',
group: ['group1', 'group2'],
description: 'Sample description',

View File

@@ -36,7 +36,7 @@ import { useI18n } from '@/composables/useI18n';
import { useKeyboardNavigation } from './useKeyboardNavigation';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import type { INodeInputFilter, NodeConnectionType } from 'n8n-workflow';
import type { INodeInputFilter, NodeConnectionType, Themed } from 'n8n-workflow';
import { useCanvasStore } from '@/stores/canvas.store';
interface ViewStack {
@@ -48,7 +48,7 @@ interface ViewStack {
info?: string;
nodeIcon?: {
iconType?: string;
icon?: string;
icon?: Themed<string>;
color?: string;
};
iconUrl?: string;

View File

@@ -58,7 +58,7 @@ import {
import { useI18n } from '@/composables/useI18n';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import type { SimplifiedNodeType } from '@/Interface';
import type { INodeTypeDescription } from 'n8n-workflow';
import type { INodeTypeDescription, Themed } from 'n8n-workflow';
import { NodeConnectionType } from 'n8n-workflow';
import { useTemplatesStore } from '@/stores/templates.store';
@@ -74,7 +74,7 @@ export interface NodeViewItem {
properties: {
name?: string;
title?: string;
icon?: string;
icon?: Themed<string>;
iconProps?: {
color?: string;
};