diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 20ba275c25..f0608dfa6f 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -57,6 +57,7 @@ import type { Scope } from '@n8n/permissions'; import type { NotificationOptions as ElementNotificationOptions } from 'element-plus'; import type { ProjectSharingData } from '@/features/projects/projects.types'; import type { Connection } from '@jsplumb/core'; +import type { BaseTextKey } from './plugins/i18n'; export * from 'n8n-design-system/types'; @@ -138,14 +139,7 @@ export type EndpointMeta = { }; }; -export interface IUpdateInformation< - T extends NodeParameterValueType = - | string - | number - | { [key: string]: string | number | boolean } - | NodeParameterValueType - | INodeParameters, -> { +export interface IUpdateInformation { name: string; key?: string; value: T; @@ -1340,12 +1334,12 @@ export interface UIState { export type IFakeDoor = { id: FAKE_DOOR_FEATURES; - featureName: string; + featureName: BaseTextKey; icon?: string; - infoText?: string; - actionBoxTitle: string; - actionBoxDescription: string; - actionBoxButtonLabel?: string; + infoText?: BaseTextKey; + actionBoxTitle: BaseTextKey; + actionBoxDescription: BaseTextKey; + actionBoxButtonLabel?: BaseTextKey; linkURL: string; uiLocations: IFakeDoorLocation[]; }; diff --git a/packages/editor-ui/src/components/BinaryDataDisplayEmbed.vue b/packages/editor-ui/src/components/BinaryDataDisplayEmbed.vue index 719cb53b7d..41fd89e23f 100644 --- a/packages/editor-ui/src/components/BinaryDataDisplayEmbed.vue +++ b/packages/editor-ui/src/components/BinaryDataDisplayEmbed.vue @@ -69,7 +69,7 @@ export default defineComponent({ } } else { try { - const binaryUrl = this.workflowsStore.getBinaryUrl(id, 'view', fileName, mimeType); + const binaryUrl = this.workflowsStore.getBinaryUrl(id, 'view', fileName ?? '', mimeType); if (isJSONData || isHTMLData) { const fetchedData = await fetch(binaryUrl, { credentials: 'include' }); this.data = await (isJSONData ? fetchedData.json() : fetchedData.text()); diff --git a/packages/editor-ui/src/components/ChatEmbedModal.vue b/packages/editor-ui/src/components/ChatEmbedModal.vue index 26e0cbcbd8..0aad76bb65 100644 --- a/packages/editor-ui/src/components/ChatEmbedModal.vue +++ b/packages/editor-ui/src/components/ChatEmbedModal.vue @@ -22,7 +22,12 @@ const i18n = useI18n(); const rootStore = useRootStore(); const workflowsStore = useWorkflowsStore(); -const tabs = ref([ +type ChatEmbedModalTabValue = 'cdn' | 'vue' | 'react' | 'other'; +type ChatEmbedModalTab = { + label: string; + value: ChatEmbedModalTabValue; +}; +const tabs = ref([ { label: 'CDN Embed', value: 'cdn', @@ -40,7 +45,7 @@ const tabs = ref([ value: 'other', }, ]); -const currentTab = ref('cdn'); +const currentTab = ref('cdn'); const webhookNode = computed(() => { for (const type of [CHAT_TRIGGER_NODE_TYPE, WEBHOOK_NODE_TYPE]) { diff --git a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue index 911454c368..3c2cfdd3b1 100644 --- a/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue +++ b/packages/editor-ui/src/components/CodeNodeEditor/CodeNodeEditor.vue @@ -134,7 +134,7 @@ export default defineComponent({ }; }, watch: { - mode(newMode, previousMode: CodeExecutionMode) { + mode(_newMode, previousMode: CodeExecutionMode) { this.reloadLinter(); if ( @@ -143,7 +143,7 @@ export default defineComponent({ this.refreshPlaceholder(); } }, - language(newLanguage, previousLanguage: CodeNodeEditorLanguage) { + language(_newLanguage, previousLanguage: CodeNodeEditorLanguage) { if ( this.getCurrentEditorContent().trim() === CODE_PLACEHOLDERS[previousLanguage]?.[this.mode] ) { diff --git a/packages/editor-ui/src/components/CommunityPackageInstallModal.vue b/packages/editor-ui/src/components/CommunityPackageInstallModal.vue index d2122a2ada..7441bdf37c 100644 --- a/packages/editor-ui/src/components/CommunityPackageInstallModal.vue +++ b/packages/editor-ui/src/components/CommunityPackageInstallModal.vue @@ -16,7 +16,7 @@ {{ ' ' }} - {{ $locale.baseText('_reusableDynamicText.moreInfo') }} + {{ $locale.baseText('generic.moreInfo') }}
{{ - $locale.baseText('_reusableDynamicText.moreInfo') + $locale.baseText('generic.moreInfo') }} diff --git a/packages/editor-ui/src/components/CopyInput.vue b/packages/editor-ui/src/components/CopyInput.vue index c999d9b5cf..c959f257e2 100644 --- a/packages/editor-ui/src/components/CopyInput.vue +++ b/packages/editor-ui/src/components/CopyInput.vue @@ -77,7 +77,7 @@ export default defineComponent({ methods: { copy(): void { this.$emit('copy'); - void this.clipboard.copy(this.value); + void this.clipboard.copy(this.value ?? ''); this.showMessage({ title: this.toastTitle, diff --git a/packages/editor-ui/src/components/DeleteUserModal.vue b/packages/editor-ui/src/components/DeleteUserModal.vue index e5f64e7a8f..b344f91d7d 100644 --- a/packages/editor-ui/src/components/DeleteUserModal.vue +++ b/packages/editor-ui/src/components/DeleteUserModal.vue @@ -118,6 +118,7 @@ export default defineComponent({ computed: { ...mapStores(useUsersStore, useProjectsStore), userToDelete(): IUser | null { + if (!this.activeId) return null; return this.usersStore.getUserById(this.activeId); }, isPending(): boolean { diff --git a/packages/editor-ui/src/components/DraggableTarget.vue b/packages/editor-ui/src/components/DraggableTarget.vue index 18274cd4ad..e3229041fb 100644 --- a/packages/editor-ui/src/components/DraggableTarget.vue +++ b/packages/editor-ui/src/components/DraggableTarget.vue @@ -114,7 +114,7 @@ export default defineComponent({ e.clientY <= dim.bottom; } }, - onMouseUp(e: MouseEvent) { + onMouseUp() { if (this.activeDrop) { const data = this.ndvStore.draggableData; this.$emit('drop', data); diff --git a/packages/editor-ui/src/components/HoverableNodeIcon.vue b/packages/editor-ui/src/components/HoverableNodeIcon.vue index 22b665f626..15b9f7659b 100644 --- a/packages/editor-ui/src/components/HoverableNodeIcon.vue +++ b/packages/editor-ui/src/components/HoverableNodeIcon.vue @@ -40,7 +40,7 @@