fix(editor): Fix various typecheck issues (no-changelog) (#8739)
This commit is contained in:
@@ -55,6 +55,8 @@ import type {
|
||||
ThemeOption,
|
||||
AppliedThemeOption,
|
||||
SuggestedTemplates,
|
||||
NotificationOptions,
|
||||
ModalState,
|
||||
} from '@/Interface';
|
||||
import { defineStore } from 'pinia';
|
||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||
@@ -144,7 +146,7 @@ export const useUIStore = defineStore(STORES.UI, {
|
||||
mode: '',
|
||||
activeId: null,
|
||||
showAuthSelector: false,
|
||||
},
|
||||
} as ModalState,
|
||||
},
|
||||
modalStack: [],
|
||||
sidebarMenuCollapsed: true,
|
||||
@@ -172,6 +174,7 @@ export const useUIStore = defineStore(STORES.UI, {
|
||||
stateIsDirty: false,
|
||||
lastSelectedNode: null,
|
||||
lastSelectedNodeOutputIndex: null,
|
||||
lastSelectedNodeEndpointUuid: null,
|
||||
nodeViewOffsetPosition: [0, 0],
|
||||
nodeViewMoveInProgress: false,
|
||||
selectedNodes: [],
|
||||
|
||||
@@ -40,7 +40,7 @@ import type {
|
||||
IConnection,
|
||||
IConnections,
|
||||
IDataObject,
|
||||
IExecutionsSummary,
|
||||
ExecutionSummary,
|
||||
INode,
|
||||
INodeConnections,
|
||||
INodeCredentials,
|
||||
@@ -263,11 +263,11 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
return (nodeName: string) => this.executingNode.includes(nodeName);
|
||||
},
|
||||
// Executions getters
|
||||
getExecutionDataById(): (id: string) => IExecutionsSummary | undefined {
|
||||
return (id: string): IExecutionsSummary | undefined =>
|
||||
getExecutionDataById(): (id: string) => ExecutionSummary | undefined {
|
||||
return (id: string): ExecutionSummary | undefined =>
|
||||
this.currentWorkflowExecutions.find((execution) => execution.id === id);
|
||||
},
|
||||
getAllLoadedFinishedExecutions(): IExecutionsSummary[] {
|
||||
getAllLoadedFinishedExecutions(): ExecutionSummary[] {
|
||||
return this.currentWorkflowExecutions.filter(
|
||||
(ex) => ex.finished === true || ex.stoppedAt !== undefined,
|
||||
);
|
||||
@@ -1366,7 +1366,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
|
||||
async loadCurrentWorkflowExecutions(
|
||||
requestFilter: ExecutionsQueryFilter,
|
||||
): Promise<IExecutionsSummary[]> {
|
||||
): Promise<ExecutionSummary[]> {
|
||||
let activeExecutions = [];
|
||||
|
||||
if (!requestFilter.workflowId) {
|
||||
@@ -1392,11 +1392,11 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||
return await getExecutionData(rootStore.getRestApiContext, executionId);
|
||||
},
|
||||
|
||||
deleteExecution(execution: IExecutionsSummary): void {
|
||||
deleteExecution(execution: ExecutionSummary): void {
|
||||
this.currentWorkflowExecutions.splice(this.currentWorkflowExecutions.indexOf(execution), 1);
|
||||
},
|
||||
|
||||
addToCurrentExecutions(executions: IExecutionsSummary[]): void {
|
||||
addToCurrentExecutions(executions: ExecutionSummary[]): void {
|
||||
executions.forEach((execution) => {
|
||||
const exists = this.currentWorkflowExecutions.find((ex) => ex.id === execution.id);
|
||||
if (!exists && execution.workflowId === this.workflowId) {
|
||||
|
||||
Reference in New Issue
Block a user