diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index b08d3ab4a5..ab2afde49d 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -55,7 +55,7 @@ import type { PartialBy, TupleToUnion } from '@/utils/typeHelpers'; import type { Component } from 'vue'; import type { Scope } from '@n8n/permissions'; import type { NotificationOptions as ElementNotificationOptions } from 'element-plus'; -import type { ProjectSharingData } from '@/features/projects/projects.types'; +import type { ProjectSharingData } from '@/types/projects.types'; import type { Connection } from '@jsplumb/core'; import type { BaseTextKey } from './plugins/i18n'; diff --git a/packages/editor-ui/src/__tests__/data/projects.ts b/packages/editor-ui/src/__tests__/data/projects.ts index 9f87d7f781..620a396925 100644 --- a/packages/editor-ui/src/__tests__/data/projects.ts +++ b/packages/editor-ui/src/__tests__/data/projects.ts @@ -1,10 +1,6 @@ import { faker } from '@faker-js/faker'; -import type { - ProjectListItem, - ProjectSharingData, - ProjectType, -} from '@/features/projects/projects.types'; -import { ProjectTypes } from '@/features/projects/projects.utils'; +import type { ProjectListItem, ProjectSharingData, ProjectType } from '@/types/projects.types'; +import { ProjectTypes } from '@/types/projects.types'; export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({ id: faker.string.uuid(), diff --git a/packages/editor-ui/src/__tests__/mocks.ts b/packages/editor-ui/src/__tests__/mocks.ts index e3a02698c2..6b7e31a3a0 100644 --- a/packages/editor-ui/src/__tests__/mocks.ts +++ b/packages/editor-ui/src/__tests__/mocks.ts @@ -13,7 +13,7 @@ import { NodeHelpers, Workflow } from 'n8n-workflow'; import { uuid } from '@jsplumb/util'; import { defaultMockNodeTypes } from '@/__tests__/defaults'; import type { INodeUi, ITag, IUsedCredential, IWorkflowDb, WorkflowMetadata } from '@/Interface'; -import type { ProjectSharingData } from '@/features/projects/projects.types'; +import type { ProjectSharingData } from '@/types/projects.types'; import type { RouteLocationNormalized } from 'vue-router'; export function createTestNodeTypes(data: INodeTypeData = {}): INodeTypes { diff --git a/packages/editor-ui/src/__tests__/permissions.spec.ts b/packages/editor-ui/src/__tests__/permissions.spec.ts index 4d20c98ed4..e126b76741 100644 --- a/packages/editor-ui/src/__tests__/permissions.spec.ts +++ b/packages/editor-ui/src/__tests__/permissions.spec.ts @@ -5,7 +5,7 @@ import { getWorkflowPermissions, } from '@/permissions'; import type { ICredentialsResponse, IUser, IWorkflowDb } from '@/Interface'; -import type { Project } from '@/features/projects/projects.types'; +import type { Project } from '@/types/projects.types'; describe('permissions', () => { it('getVariablesPermissions', () => { diff --git a/packages/editor-ui/src/features/projects/projects.api.ts b/packages/editor-ui/src/api/projects.api.ts similarity index 97% rename from packages/editor-ui/src/features/projects/projects.api.ts rename to packages/editor-ui/src/api/projects.api.ts index f85d466a80..b3bae3fbf1 100644 --- a/packages/editor-ui/src/features/projects/projects.api.ts +++ b/packages/editor-ui/src/api/projects.api.ts @@ -6,7 +6,7 @@ import type { ProjectListItem, ProjectUpdateRequest, ProjectsCount, -} from '@/features/projects/projects.types'; +} from '@/types/projects.types'; export const getAllProjects = async (context: IRestApiContext): Promise => { return await makeRestApiRequest(context, 'GET', '/projects'); diff --git a/packages/editor-ui/src/components/CredentialCard.vue b/packages/editor-ui/src/components/CredentialCard.vue index b85f80c5af..04425af7d3 100644 --- a/packages/editor-ui/src/components/CredentialCard.vue +++ b/packages/editor-ui/src/components/CredentialCard.vue @@ -44,10 +44,10 @@ import { useUIStore } from '@/stores/ui.store'; import { useUsersStore } from '@/stores/users.store'; import { useCredentialsStore } from '@/stores/credentials.store'; import TimeAgo from '@/components/TimeAgo.vue'; -import type { ProjectSharingData } from '@/features/projects/projects.types'; -import { useProjectsStore } from '@/features/projects/projects.store'; +import type { ProjectSharingData } from '@/types/projects.types'; +import { useProjectsStore } from '@/stores/projects.store'; import type { CredentialScope } from '@n8n/permissions'; -import ProjectCardBadge from '@/features/projects/components/ProjectCardBadge.vue'; +import ProjectCardBadge from '@/components/Projects/ProjectCardBadge.vue'; export const CREDENTIAL_LIST_ITEM_ACTIONS = { OPEN: 'open', diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue index f9c5a5e1be..7f852767e9 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue @@ -157,7 +157,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store'; import { useNDVStore } from '@/stores/ndv.store'; import { useCredentialsStore } from '@/stores/credentials.store'; import { useNodeTypesStore } from '@/stores/nodeTypes.store'; -import type { ProjectSharingData } from '@/features/projects/projects.types'; +import type { ProjectSharingData } from '@/types/projects.types'; import { assert } from '@/utils/assert'; import { @@ -168,7 +168,7 @@ import { import { isValidCredentialResponse, isCredentialModalState } from '@/utils/typeGuards'; import { isExpression, isTestableExpression } from '@/utils/expressions'; import { useExternalHooks } from '@/composables/useExternalHooks'; -import { useProjectsStore } from '@/features/projects/projects.store'; +import { useProjectsStore } from '@/stores/projects.store'; import type { CredentialScope } from '@n8n/permissions'; export default defineComponent({ diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue index 38eb0f55a6..1a526164ba 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialSharing.ee.vue @@ -83,20 +83,16 @@ import { useUIStore } from '@/stores/ui.store'; import { useCredentialsStore } from '@/stores/credentials.store'; import { useUsageStore } from '@/stores/usage.store'; import { EnterpriseEditionFeature } from '@/constants'; -import ProjectSharing from '@/features/projects/components/ProjectSharing.vue'; -import { useProjectsStore } from '@/features/projects/projects.store'; -import type { - ProjectListItem, - ProjectSharingData, - Project, -} from '@/features/projects/projects.types'; +import ProjectSharing from '@/components/Projects/ProjectSharing.vue'; +import { useProjectsStore } from '@/stores/projects.store'; +import type { ProjectListItem, ProjectSharingData, Project } from '@/types/projects.types'; +import { ProjectTypes } from '@/types/projects.types'; import type { ICredentialDataDecryptedObject } from 'n8n-workflow'; import type { PermissionsMap } from '@/permissions'; import type { CredentialScope } from '@n8n/permissions'; import type { EventBus } from 'n8n-design-system/utils'; import { useRolesStore } from '@/stores/roles.store'; import type { RoleMap } from '@/types/roles.types'; -import { ProjectTypes } from '@/features/projects/projects.utils'; export default defineComponent({ name: 'CredentialSharing', diff --git a/packages/editor-ui/src/components/DeleteUserModal.vue b/packages/editor-ui/src/components/DeleteUserModal.vue index b344f91d7d..311392521c 100644 --- a/packages/editor-ui/src/components/DeleteUserModal.vue +++ b/packages/editor-ui/src/components/DeleteUserModal.vue @@ -83,9 +83,9 @@ import type { IUser } from '@/Interface'; import { mapStores } from 'pinia'; import { useUsersStore } from '@/stores/users.store'; import { createEventBus } from 'n8n-design-system/utils'; -import { useProjectsStore } from '@/features/projects/projects.store'; -import type { ProjectListItem, ProjectSharingData } from '@/features/projects/projects.types'; -import ProjectSharing from '@/features/projects/components/ProjectSharing.vue'; +import { useProjectsStore } from '@/stores/projects.store'; +import type { ProjectListItem, ProjectSharingData } from '@/types/projects.types'; +import ProjectSharing from '@/components/Projects/ProjectSharing.vue'; export default defineComponent({ name: 'DeleteUserModal', diff --git a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue index 5ad4b88c44..ff9570de18 100644 --- a/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue +++ b/packages/editor-ui/src/components/MainHeader/WorkflowDetails.vue @@ -31,7 +31,7 @@ import { useTagsStore } from '@/stores/tags.store'; import { useUIStore } from '@/stores/ui.store'; import { useUsersStore } from '@/stores/users.store'; import { useWorkflowsStore } from '@/stores/workflows.store'; -import { useProjectsStore } from '@/features/projects/projects.store'; +import { useProjectsStore } from '@/stores/projects.store'; import { saveAs } from 'file-saver'; import { useTitleChange } from '@/composables/useTitleChange'; @@ -41,7 +41,7 @@ import { useToast } from '@/composables/useToast'; import { getWorkflowPermissions } from '@/permissions'; import { createEventBus } from 'n8n-design-system/utils'; import { nodeViewEventBus } from '@/event-bus'; -import { hasPermission } from '@/rbac/permissions'; +import { hasPermission } from '@/utils/rbac/permissions'; import { useCanvasStore } from '@/stores/canvas.store'; import { useRoute, useRouter } from 'vue-router'; import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers'; diff --git a/packages/editor-ui/src/components/MainSidebar.vue b/packages/editor-ui/src/components/MainSidebar.vue index fae341cdc7..9b9635928a 100644 --- a/packages/editor-ui/src/components/MainSidebar.vue +++ b/packages/editor-ui/src/components/MainSidebar.vue @@ -126,11 +126,11 @@ import { useTemplatesStore } from '@/stores/templates.store'; import ExecutionsUsage from '@/components/executions/ExecutionsUsage.vue'; import BecomeTemplateCreatorCta from '@/components/BecomeTemplateCreatorCta/BecomeTemplateCreatorCta.vue'; import MainSidebarSourceControl from '@/components/MainSidebarSourceControl.vue'; -import { hasPermission } from '@/rbac/permissions'; +import { hasPermission } from '@/utils/rbac/permissions'; import { useExternalHooks } from '@/composables/useExternalHooks'; import { useDebounce } from '@/composables/useDebounce'; import { useBecomeTemplateCreatorStore } from '@/components/BecomeTemplateCreatorCta/becomeTemplateCreatorStore'; -import ProjectNavigation from '@/features/projects/components/ProjectNavigation.vue'; +import ProjectNavigation from '@/components/Projects/ProjectNavigation.vue'; export default defineComponent({ name: 'MainSidebar', diff --git a/packages/editor-ui/src/components/MainSidebarSourceControl.vue b/packages/editor-ui/src/components/MainSidebarSourceControl.vue index b3a4b424d5..5a863a9d46 100644 --- a/packages/editor-ui/src/components/MainSidebarSourceControl.vue +++ b/packages/editor-ui/src/components/MainSidebarSourceControl.vue @@ -3,7 +3,7 @@ import { computed, nextTick, ref } from 'vue'; import { useRouter } from 'vue-router'; import { createEventBus } from 'n8n-design-system/utils'; import { useI18n } from '@/composables/useI18n'; -import { hasPermission } from '@/rbac/permissions'; +import { hasPermission } from '@/utils/rbac/permissions'; import { useToast } from '@/composables/useToast'; import { useLoadingService } from '@/composables/useLoadingService'; import { useUIStore } from '@/stores/ui.store'; diff --git a/packages/editor-ui/src/features/projects/components/__tests__/ProjectCardBadge.test.ts b/packages/editor-ui/src/components/Projects/ProjectCardBadge.test.ts similarity index 94% rename from packages/editor-ui/src/features/projects/components/__tests__/ProjectCardBadge.test.ts rename to packages/editor-ui/src/components/Projects/ProjectCardBadge.test.ts index 20fcb938cc..1482b68038 100644 --- a/packages/editor-ui/src/features/projects/components/__tests__/ProjectCardBadge.test.ts +++ b/packages/editor-ui/src/components/Projects/ProjectCardBadge.test.ts @@ -1,5 +1,5 @@ import { createComponentRenderer } from '@/__tests__/render'; -import ProjectCardBadge from '@/features/projects/components/ProjectCardBadge.vue'; +import ProjectCardBadge from '@/components/Projects/ProjectCardBadge.vue'; const renderComponent = createComponentRenderer(ProjectCardBadge); diff --git a/packages/editor-ui/src/features/projects/components/ProjectCardBadge.vue b/packages/editor-ui/src/components/Projects/ProjectCardBadge.vue similarity index 89% rename from packages/editor-ui/src/features/projects/components/ProjectCardBadge.vue rename to packages/editor-ui/src/components/Projects/ProjectCardBadge.vue index 54560963ee..2c6b67753f 100644 --- a/packages/editor-ui/src/features/projects/components/ProjectCardBadge.vue +++ b/packages/editor-ui/src/components/Projects/ProjectCardBadge.vue @@ -1,9 +1,10 @@