mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Migrate part of the vuex store to pinia (#4484)
* ✨ Added pinia support. Migrated community nodes module. * ✨ Added ui pinia store, moved some data from root store to it, updated modals to work with pinia stores * ✨ Added ui pinia store and migrated a part of the root store * ✨ Migrated `settings` store to pinia * ✨ Removing vuex store refs from router * ✨ Migrated `users` module to pinia store * ⚡ Fixing errors after sync with master * ⚡ One more error after merge * ⚡ Created `workflows` pinia store. Moved large part of root store to it. Started updating references. * ✨ Finished migrating workflows store to pinia * ⚡ Renaming some getters and actions to make more sense * ✨ Finished migrating the root store to pinia * ✨ Migrated ndv store to pinia * ⚡ Renaming main panel dimensions getter so it doesn't clash with data prop name * ✔️ Fixing lint errors * ✨ Migrated `templates` store to pinia * ✨ Migrated the `nodeTypes`store * ⚡ Removed unused pieces of code and oold vuex modules * ✨ Adding vuex calls to pinia store, fi xing wrong references * 💄 Removing leftover $store refs * ⚡ Added legacy getters and mutations to store to support webhooks * ⚡ Added missing front-end hooks, updated vuex state subscriptions to pinia * ✔️ Fixing linting errors * ⚡ Removing vue composition api plugin * ⚡ Fixing main sidebar state when loading node view * 🐛 Fixing an error when activating workflows * 🐛 Fixing isses with workflow settings and executions auto-refresh * 🐛 Removing duplicate listeners which cause import error * 🐛 Fixing route authentication * ⚡ Updating freshly pulled $store refs * Adding deleted const * ⚡ Updating store references in ee features. Reseting NodeView credentials update flag when resetting workspace * ⚡ Adding return type to email submission modal * ⚡ Making NodeView only react to paste event when active * 🐛 Fixing signup view errors * 👌 Addressing PR review comments * 👌 Addressing new PR comments * 👌 Updating invite id logic in signup view
This commit is contained in:
committed by
GitHub
parent
c2c7927414
commit
40e413d958
@@ -1,3 +1,4 @@
|
||||
import { IMenuItem } from 'n8n-design-system';
|
||||
import {
|
||||
jsPlumbInstance,
|
||||
DragOptions,
|
||||
@@ -33,6 +34,7 @@ import {
|
||||
ILoadOptions,
|
||||
INodeCredentials,
|
||||
INodeListSearchItems,
|
||||
NodeParameterValueType,
|
||||
} from 'n8n-workflow';
|
||||
import { FAKE_DOOR_FEATURES } from './constants';
|
||||
|
||||
@@ -152,8 +154,8 @@ export type IJsPlumbInstance = Omit<jsPlumbInstance, 'addEndpoint' | 'draggable'
|
||||
|
||||
export interface IUpdateInformation {
|
||||
name: string;
|
||||
key: string;
|
||||
value: string | number | { [key: string]: string | number | boolean }; // with null makes problems in NodeSettings.vue
|
||||
key?: string;
|
||||
value: string | number | { [key: string]: string | number | boolean } | NodeParameterValueType | INodeParameters; // with null makes problems in NodeSettings.vue
|
||||
node?: string;
|
||||
oldValue?: string | number;
|
||||
}
|
||||
@@ -887,6 +889,47 @@ export interface INodeMetadata {
|
||||
parametersLastUpdatedAt?: number;
|
||||
}
|
||||
|
||||
export interface WorkflowsState {
|
||||
activeExecutions: IExecutionsCurrentSummaryExtended[];
|
||||
activeWorkflows: string[];
|
||||
activeWorkflowExecution: IExecutionsSummary | null;
|
||||
currentWorkflowExecutions: IExecutionsSummary[];
|
||||
activeExecutionId: string | null;
|
||||
executingNode: string | null;
|
||||
executionWaitingForWebhook: boolean;
|
||||
finishedExecutionsCount: number;
|
||||
nodeMetadata: NodeMetadataMap;
|
||||
subWorkflowExecutionError: Error | null;
|
||||
workflow: IWorkflowDb;
|
||||
workflowExecutionData: IExecutionResponse | null;
|
||||
workflowExecutionPairedItemMappings: {[itemId: string]: Set<string>};
|
||||
workflowsById: IWorkflowsMap;
|
||||
}
|
||||
|
||||
export interface RootState {
|
||||
baseUrl: string;
|
||||
defaultLocale: string;
|
||||
endpointWebhook: string;
|
||||
endpointWebhookTest: string;
|
||||
pushConnectionActive: boolean;
|
||||
timezone: string;
|
||||
executionTimeout: number;
|
||||
maxExecutionTimeout: number;
|
||||
versionCli: string;
|
||||
oauthCallbackUrls: object;
|
||||
n8nMetadata: {
|
||||
[key: string]: string | number | undefined;
|
||||
};
|
||||
sessionId: string;
|
||||
urlBaseWebhook: string;
|
||||
urlBaseEditor: string;
|
||||
instanceId: string;
|
||||
isNpmAvailable: boolean;
|
||||
}
|
||||
|
||||
export interface NodeMetadataMap {
|
||||
[nodeName: string]: INodeMetadata;
|
||||
}
|
||||
export interface IRootState {
|
||||
activeExecutions: IExecutionsCurrentSummaryExtended[];
|
||||
activeWorkflows: string[];
|
||||
@@ -924,12 +967,12 @@ export interface IRootState {
|
||||
workflowsById: IWorkflowsMap;
|
||||
sidebarMenuItems: IMenuItem[];
|
||||
instanceId: string;
|
||||
nodeMetadata: {[nodeName: string]: INodeMetadata};
|
||||
nodeMetadata: NodeMetadataMap;
|
||||
isNpmAvailable: boolean;
|
||||
subworkflowExecutionError: Error | null;
|
||||
}
|
||||
|
||||
export interface ICommunityPackageMap {
|
||||
export interface CommunityPackageMap {
|
||||
[name: string]: PublicInstalledPackage;
|
||||
}
|
||||
|
||||
@@ -964,6 +1007,7 @@ export interface IModalState {
|
||||
}
|
||||
|
||||
export type IRunDataDisplayMode = 'table' | 'json' | 'binary';
|
||||
export type nodePanelType = 'input' | 'output';
|
||||
|
||||
export interface TargetItem {
|
||||
nodeName: string;
|
||||
@@ -1023,6 +1067,37 @@ export interface IUiState {
|
||||
executionSidebarAutoRefresh: boolean;
|
||||
}
|
||||
|
||||
export interface UIState {
|
||||
activeActions: string[];
|
||||
activeCredentialType: string | null;
|
||||
sidebarMenuCollapsed: boolean;
|
||||
modalStack: string[];
|
||||
modals: {
|
||||
[key: string]: IModalState;
|
||||
};
|
||||
isPageLoading: boolean;
|
||||
currentView: string;
|
||||
mainPanelPosition: number;
|
||||
fakeDoorFeatures: IFakeDoor[];
|
||||
draggable: {
|
||||
isDragging: boolean;
|
||||
type: string;
|
||||
data: string;
|
||||
canDrop: boolean;
|
||||
stickyPosition: null | XYPosition;
|
||||
};
|
||||
stateIsDirty: boolean;
|
||||
lastSelectedNode: string | null;
|
||||
lastSelectedNodeOutputIndex: number | null;
|
||||
nodeViewOffsetPosition: XYPosition;
|
||||
nodeViewMoveInProgress: boolean;
|
||||
selectedNodes: INodeUi[];
|
||||
sidebarMenuItems: IMenuItem[];
|
||||
nodeViewInitialized: boolean;
|
||||
addFirstStepOnLoad: boolean;
|
||||
executionSidebarAutoRefresh: boolean;
|
||||
}
|
||||
|
||||
export type ILogLevel = 'info' | 'debug' | 'warn' | 'error' | 'verbose';
|
||||
|
||||
export type IFakeDoor = {
|
||||
@@ -1059,6 +1134,9 @@ export interface ISettingsState {
|
||||
path: string;
|
||||
};
|
||||
onboardingCallPromptEnabled: boolean;
|
||||
saveDataErrorExecution: string;
|
||||
saveDataSuccessExecution: string;
|
||||
saveManualExecutions: boolean;
|
||||
}
|
||||
|
||||
export interface INodeTypesState {
|
||||
@@ -1109,11 +1187,9 @@ export interface IWorkflowsState {
|
||||
[name: string]: IWorkflowDb;
|
||||
}
|
||||
|
||||
export interface IWorkflowsState {}
|
||||
|
||||
export interface ICommunityNodesState {
|
||||
export interface CommunityNodesState {
|
||||
availablePackageCount: number;
|
||||
installedPackages: ICommunityPackageMap;
|
||||
installedPackages: CommunityPackageMap;
|
||||
}
|
||||
|
||||
export interface IRestApiContext {
|
||||
@@ -1149,8 +1225,8 @@ export interface IOnboardingCallPromptResponse {
|
||||
|
||||
export interface IOnboardingCallPrompt {
|
||||
title: string;
|
||||
body: string;
|
||||
index: number;
|
||||
description: string;
|
||||
toast_sequence_number: number;
|
||||
}
|
||||
|
||||
export interface ITab {
|
||||
@@ -1182,3 +1258,14 @@ export interface IResourceLocatorReqParams {
|
||||
export interface IResourceLocatorResultExpanded extends INodeListSearchItems {
|
||||
linkAlt?: string;
|
||||
}
|
||||
|
||||
export interface CurlToJSONResponse {
|
||||
"parameters.url": string;
|
||||
"parameters.authentication": string;
|
||||
"parameters.method": string;
|
||||
"parameters.sendHeaders": boolean;
|
||||
"parameters.headerParameters.parameters.0.name": string;
|
||||
"parameters.headerParameters.parameters.0.value": string;
|
||||
"parameters.sendQuery": boolean;
|
||||
"parameters.sendBody": boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user