From 753cbc1e96b2758d32d7277527caa336be7fd6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 28 Nov 2023 12:15:08 +0100 Subject: [PATCH] refactor(editor): Delete some barrel files and reduce circular dependencies (no-changelog) (#7838) --- .../src/components/N8nDatatable/Datatable.vue | 2 +- .../N8nKeyboardShortcut.vue | 2 +- .../N8nNodeCreatorNode/NodeCreatorNode.vue | 2 +- .../design-system/src/composables/index.ts | 2 - packages/design-system/src/main.ts | 2 +- packages/design-system/vite.config.mts | 1 + packages/editor-ui/src/App.vue | 26 ++++---- packages/editor-ui/src/Interface.ts | 2 +- .../editor-ui/src/__tests__/router.test.ts | 2 +- packages/editor-ui/src/api/cloudPlans.ts | 2 +- packages/editor-ui/src/api/communityNodes.ts | 2 +- packages/editor-ui/src/api/environments.ee.ts | 2 +- packages/editor-ui/src/api/eventbus.ee.ts | 2 +- .../editor-ui/src/api/externalSecrets.ee.ts | 2 +- packages/editor-ui/src/api/orchestration.ts | 2 +- packages/editor-ui/src/api/sourceControl.ts | 4 +- packages/editor-ui/src/api/sso.ts | 2 +- packages/editor-ui/src/api/tags.ts | 2 +- packages/editor-ui/src/api/workflowHistory.ts | 2 +- .../src/components/ActivationModal.vue | 2 +- .../src/components/BinaryDataDisplayEmbed.vue | 2 +- .../src/components/BreakpointsObserver.vue | 4 +- .../src/components/ChangePasswordModal.vue | 2 +- .../src/components/ChatEmbedModal.vue | 4 +- .../components/CodeNodeEditor/AskAI/AskAI.vue | 13 +++- .../CodeNodeEditor/CodeNodeEditor.vue | 5 +- .../completions/secrets.completions.ts | 2 +- .../completions/variables.completions.ts | 2 +- .../CommunityPackageInstallModal.vue | 2 +- .../CommunityPackageManageConfirmModal.vue | 2 +- .../src/components/ContactPromptModal.vue | 2 +- .../components/ContextMenu/ContextMenu.vue | 2 +- .../editor-ui/src/components/CopyInput.vue | 2 +- .../src/components/CredentialCard.vue | 2 +- .../CredentialEdit/AuthTypeSelector.vue | 2 +- .../CredentialEdit/CredentialConfig.vue | 2 +- .../CredentialEdit/CredentialEdit.vue | 11 ++-- .../CredentialEdit/CredentialSharing.ee.vue | 2 +- .../CredentialEdit/GoogleAuthButton.vue | 2 +- .../CredentialPicker/CredentialPicker.vue | 2 +- .../CredentialPicker/CredentialsDropdown.vue | 2 +- .../src/components/DebugPaywallModal.vue | 2 +- .../src/components/DeleteUserModal.vue | 2 +- .../components/DuplicateWorkflowDialog.vue | 4 +- .../src/components/Error/NodeErrorView.vue | 4 +- .../src/components/ExecutionFilter.vue | 4 +- .../src/components/ExecutionsList.vue | 8 ++- .../src/components/ExecutionsUsage.vue | 2 +- .../ExecutionsView/ExecutionPreview.vue | 3 +- .../ExecutionsView/ExecutionsList.vue | 6 +- .../__tests__/ExecutionPreview.test.ts | 3 +- .../ExternalSecretsProviderCard.ee.vue | 7 ++- ...rnalSecretsProviderConnectionSwitch.ee.vue | 6 +- .../ExternalSecretsProviderModal.ee.vue | 7 ++- .../src/components/ImportCurlModal.vue | 2 +- .../InlineExpressionEditorOutput.vue | 2 +- .../src/components/InlineNameEdit.vue | 2 +- .../src/components/InviteUsersModal.vue | 4 +- packages/editor-ui/src/components/Logo.vue | 3 +- .../src/components/MainHeader/MainHeader.vue | 4 +- .../components/MainHeader/WorkflowDetails.vue | 22 +++---- .../editor-ui/src/components/MainSidebar.vue | 22 +++---- .../components/MainSidebarSourceControl.vue | 5 +- .../src/components/MfaSetupModal.vue | 2 +- packages/editor-ui/src/components/Node.vue | 4 +- .../Node/NodeCreator/ItemTypes/NodeItem.vue | 5 +- .../NodeCreator/ItemTypes/SubcategoryItem.vue | 2 +- .../Node/NodeCreator/Modes/ActionsMode.vue | 2 +- .../Node/NodeCreator/Modes/NodesMode.vue | 3 +- .../Node/NodeCreator/NodeCreator.vue | 3 +- .../Node/NodeCreator/Panel/NodesListPanel.vue | 2 +- .../Node/NodeCreator/Panel/SearchBar.vue | 2 +- .../NodeCreator/composables/useActions.ts | 2 +- .../NodeCreator/composables/useViewStacks.ts | 4 +- .../src/components/Node/NodeCreator/utils.ts | 2 +- .../components/Node/NodeCreator/viewsData.ts | 4 +- .../src/components/NodeCredentials.vue | 4 +- .../src/components/NodeDetailsView.vue | 4 +- .../src/components/NodeExecuteButton.vue | 3 +- .../editor-ui/src/components/NodeList.vue | 2 +- .../editor-ui/src/components/NodeSettings.vue | 2 +- .../src/components/NodeSettingsTabs.vue | 2 +- .../editor-ui/src/components/NodeWebhooks.vue | 2 +- .../components/OnboardingCallSignupModal.vue | 2 +- .../editor-ui/src/components/PageAlert.vue | 4 +- .../src/components/ParameterInput.vue | 5 +- .../src/components/ParameterInputExpanded.vue | 2 +- .../src/components/ParameterInputFull.vue | 11 ++-- .../src/components/ParameterInputHint.vue | 2 +- .../src/components/ParameterInputList.vue | 6 +- .../src/components/ParameterInputWrapper.vue | 5 +- .../src/components/ParameterOptions.vue | 3 +- .../src/components/PersonalizationModal.vue | 6 +- .../ResourceLocator/ResourceLocator.vue | 8 +-- .../ResourceMapper/MappingFields.vue | 10 ++- .../ResourceMapper/MappingModeSelect.vue | 2 +- .../ResourceMapper/MatchingColumnsSelect.vue | 2 +- .../ResourceMapper/ResourceMapper.vue | 3 +- packages/editor-ui/src/components/RunData.vue | 6 +- .../RunDataAi/AiRunContentBlock.vue | 4 +- .../src/components/RunDataAi/RunDataAi.vue | 3 +- .../components/RunDataAi/RunDataAiContent.vue | 3 +- .../editor-ui/src/components/RunDataJson.vue | 5 +- .../src/components/RunDataJsonActions.vue | 6 +- .../src/components/RunDataSchema.vue | 5 +- .../src/components/RunDataSchemaItem.vue | 4 +- .../src/components/RunDataSearch.vue | 2 +- .../editor-ui/src/components/RunDataTable.vue | 4 +- .../editor-ui/src/components/SSOLogin.vue | 3 +- .../EventDestinationCard.ee.vue | 2 +- .../EventDestinationSettingsModal.ee.vue | 2 +- .../editor-ui/src/components/ShortenName.vue | 2 +- .../components/SourceControlPullModal.ee.vue | 6 +- .../components/SourceControlPushModal.ee.vue | 6 +- packages/editor-ui/src/components/Sticky.vue | 4 +- .../editor-ui/src/components/TagsDropdown.vue | 3 +- .../components/TagsManager/TagsManager.vue | 2 +- .../editor-ui/src/components/TemplateCard.vue | 3 +- .../src/components/TemplateDetails.vue | 4 +- packages/editor-ui/src/components/TimeAgo.vue | 2 +- .../editor-ui/src/components/TriggerPanel.vue | 2 +- .../editor-ui/src/components/ValueSurvey.vue | 2 +- .../editor-ui/src/components/VariablesRow.vue | 4 +- .../src/components/WorkerList.ee.vue | 9 +-- .../Workers/WorkerChartsAccordion.ee.vue | 2 +- .../Workers/WorkerNetAccordion.ee.vue | 4 +- .../src/components/WorkflowActivator.vue | 4 +- .../editor-ui/src/components/WorkflowCard.vue | 3 +- .../WorkflowHistoryContent.vue | 2 +- .../WorkflowHistory/WorkflowHistoryList.vue | 2 +- .../WorkflowHistoryListItem.vue | 2 +- .../WorkflowHistoryVersionRestoreModal.vue | 4 +- .../src/components/WorkflowLMChat.vue | 5 +- .../src/components/WorkflowPreview.vue | 3 +- .../src/components/WorkflowSettings.vue | 2 +- .../src/components/WorkflowShareModal.ee.vue | 3 +- .../__tests__/RunDataSearch.test.ts | 3 +- .../src/components/banners/BannerStack.vue | 2 +- .../banners/EmailConfirmationBanner.vue | 2 +- .../layouts/ResourcesListLayout.vue | 2 +- .../__tests__/useContextMenu.test.ts | 3 +- .../__tests__/useDataSchema.test.ts | 2 +- packages/editor-ui/src/composables/index.ts | 17 ----- .../src/composables/useCanvasMouseSelect.ts | 2 +- .../src/composables/useContextMenu.ts | 5 +- .../src/composables/useDataSchema.ts | 2 +- .../src/composables/useExecutionDebugging.ts | 8 ++- .../src/composables/useExternalHooks.ts | 2 +- .../src/composables/useHistoryHelper.ts | 4 +- .../src/composables/useTitleChange.ts | 2 +- .../editor-ui/src/composables/useToast.ts | 2 +- packages/editor-ui/src/hooks/index.ts | 4 -- .../mixins/__tests__/workflowHelpers.spec.ts | 3 +- .../editor-ui/src/mixins/externalHooks.ts | 2 +- .../editor-ui/src/mixins/genericHelpers.ts | 4 +- packages/editor-ui/src/mixins/newVersions.ts | 2 +- packages/editor-ui/src/mixins/nodeHelpers.ts | 4 +- packages/editor-ui/src/mixins/pinData.ts | 4 +- .../editor-ui/src/mixins/pushConnection.ts | 5 +- .../editor-ui/src/mixins/workflowActivate.ts | 2 +- .../editor-ui/src/mixins/workflowHelpers.ts | 7 ++- packages/editor-ui/src/mixins/workflowRun.ts | 2 +- .../completions/datatype.completions.ts | 5 +- .../completions/dollar.completions.ts | 2 +- packages/editor-ui/src/plugins/i18n/index.ts | 14 ++--- .../editor-ui/src/plugins/telemetry/index.ts | 9 +-- .../src/rbac/checks/__tests__/hasRole.test.ts | 2 +- packages/editor-ui/src/rbac/checks/hasRole.ts | 2 +- .../src/rbac/checks/isAuthenticated.ts | 2 +- .../rbac/checks/isEnterpriseFeatureEnabled.ts | 2 +- packages/editor-ui/src/rbac/checks/isGuest.ts | 2 +- .../rbac/middleware/__tests__/role.test.ts | 2 +- packages/editor-ui/src/router.ts | 11 ++-- .../src/stores/__tests__/environments.spec.ts | 2 +- .../editor-ui/src/stores/__tests__/ui.test.ts | 3 +- .../src/stores/__tests__/workflows.spec.ts | 4 +- .../src/stores/__tests__/workflows.test.ts | 2 +- .../editor-ui/src/stores/auditLogs.store.ts | 2 +- packages/editor-ui/src/stores/canvas.store.ts | 16 ++--- .../editor-ui/src/stores/credentials.store.ts | 2 +- packages/editor-ui/src/stores/index.ts | 31 ---------- .../editor-ui/src/stores/nodeTypes.store.ts | 2 +- .../editor-ui/src/stores/settings.store.ts | 9 ++- packages/editor-ui/src/stores/ui.store.ts | 5 +- packages/editor-ui/src/stores/users.store.ts | 2 +- .../editor-ui/src/stores/workflows.store.ts | 13 ++-- packages/editor-ui/src/types/externalHooks.ts | 4 +- .../src/utils/__tests__/htmlUtils.test.ts | 2 +- .../src/utils/__tests__/objectUtils.test.ts | 2 +- .../__tests__/sourceControlUtils.test.ts | 2 +- .../src/utils/__tests__/typesUtils.test.ts | 2 +- packages/editor-ui/src/utils/canvasUtils.ts | 21 +------ packages/editor-ui/src/utils/index.ts | 13 ---- .../editor-ui/src/utils/nodeTypesUtils.ts | 3 +- packages/editor-ui/src/utils/nodeViewUtils.ts | 23 ++++++- .../editor-ui/src/utils/pairedItemUtils.ts | 4 +- .../editor-ui/src/utils/telemetryUtils.ts | 2 +- .../src/views/ChangePasswordView.vue | 2 +- .../editor-ui/src/views/CredentialsView.vue | 2 +- .../src/views/ForgotMyPasswordView.vue | 2 +- packages/editor-ui/src/views/NodeView.vue | 62 +++++++++---------- .../editor-ui/src/views/SettingsApiView.vue | 3 +- .../editor-ui/src/views/SettingsAuditLogs.vue | 5 +- .../src/views/SettingsCommunityNodesView.vue | 2 +- .../src/views/SettingsExternalSecrets.vue | 6 +- .../editor-ui/src/views/SettingsLdapView.vue | 8 ++- .../src/views/SettingsLogStreamingView.vue | 14 ++--- .../src/views/SettingsPersonalView.vue | 3 +- .../src/views/SettingsSourceControl.vue | 8 ++- packages/editor-ui/src/views/SettingsSso.vue | 4 +- .../src/views/SettingsUsageAndPlan.vue | 6 +- .../editor-ui/src/views/SettingsUsersView.vue | 4 +- packages/editor-ui/src/views/SetupView.vue | 2 +- .../AppsRequiringCredsNotice.vue | 2 +- .../SetupWorkflowFromTemplateView.vue | 4 +- .../setupTemplate.store.ts | 12 ++-- packages/editor-ui/src/views/SigninView.vue | 5 +- packages/editor-ui/src/views/SignoutView.vue | 2 +- packages/editor-ui/src/views/SignupView.vue | 2 +- .../src/views/TemplatesCollectionView.vue | 2 +- .../src/views/TemplatesSearchView.vue | 4 +- .../src/views/TemplatesWorkflowView.vue | 2 +- .../editor-ui/src/views/VariablesView.vue | 17 ++--- .../editor-ui/src/views/WorkflowHistory.vue | 3 +- .../src/views/WorkflowOnboardingView.vue | 6 +- .../editor-ui/src/views/WorkflowsView.vue | 2 +- .../views/__tests__/SettingsAuditLogs.test.ts | 3 +- .../__tests__/SettingsSourceControl.test.ts | 3 +- .../src/views/__tests__/VariablesView.spec.ts | 4 +- 229 files changed, 539 insertions(+), 507 deletions(-) delete mode 100644 packages/design-system/src/composables/index.ts delete mode 100644 packages/editor-ui/src/composables/index.ts delete mode 100644 packages/editor-ui/src/hooks/index.ts delete mode 100644 packages/editor-ui/src/stores/index.ts delete mode 100644 packages/editor-ui/src/utils/index.ts diff --git a/packages/design-system/src/components/N8nDatatable/Datatable.vue b/packages/design-system/src/components/N8nDatatable/Datatable.vue index b776cc759e9af..14d1b216555b0 100644 --- a/packages/design-system/src/components/N8nDatatable/Datatable.vue +++ b/packages/design-system/src/components/N8nDatatable/Datatable.vue @@ -3,7 +3,7 @@ import type { PropType } from 'vue'; import { computed, defineComponent, ref, useCssModule } from 'vue'; import type { DatatableColumn, DatatableRow, DatatableRowDataType } from '../../types'; import { getValueByPath } from '../../utils'; -import { useI18n } from '../../composables'; +import { useI18n } from '../../composables/useI18n'; import N8nSelect from '../N8nSelect'; import N8nOption from '../N8nOption'; import N8nPagination from '../N8nPagination'; diff --git a/packages/design-system/src/components/N8nKeyboardShortcut/N8nKeyboardShortcut.vue b/packages/design-system/src/components/N8nKeyboardShortcut/N8nKeyboardShortcut.vue index 333299b1fbd50..8dc809755a1bf 100644 --- a/packages/design-system/src/components/N8nKeyboardShortcut/N8nKeyboardShortcut.vue +++ b/packages/design-system/src/components/N8nKeyboardShortcut/N8nKeyboardShortcut.vue @@ -1,6 +1,6 @@