From 2c960daca33f8a7b8f793be3145bbd91426e45f8 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Thu, 6 Feb 2025 14:44:48 +0530 Subject: [PATCH 1/7] chore: move ide entities constants --- app/client/src/IDE/Interfaces/EditorState.ts | 6 + app/client/src/IDE/Interfaces/EditorTypes.ts | 16 ++ app/client/src/IDE/Interfaces/UseRoutes.ts | 8 + .../src/IDE/constants/SidebarButtons.ts | 41 +++++ .../hooks/useIsInSideBySideEditor.test.tsx | 2 +- app/client/src/actions/ideActions.ts | 2 +- .../src/ce/IDE/Interfaces/EntityItem.ts | 13 ++ app/client/src/ce/IDE/Interfaces/IDETypes.ts | 6 + app/client/src/ce/IDE/constants/routes.ts | 44 ++++++ .../src/ce/IDE/hooks/useParentEntityInfo.ts | 2 +- .../hooks/usePluginActionResponseTabs.tsx | 3 +- app/client/src/ce/actions/helpers.ts | 2 +- app/client/src/ce/entities/IDE/constants.ts | 141 ------------------ .../IDE/hooks/useCreateActionsPermissions.ts | 2 +- app/client/src/ce/entities/IDE/utils.ts | 8 +- .../src/ce/hooks/datasourceEditorHooks.tsx | 2 +- .../FocusStrategy/AppIDEFocusStrategy.ts | 2 +- .../src/ce/navigation/FocusStrategy/index.ts | 3 +- .../Editor/IDE/EditorPane/JS/ListItem.tsx | 2 +- .../pages/Editor/IDE/EditorPane/JS/hooks.tsx | 4 +- .../Editor/IDE/EditorPane/JS/old/ListItem.tsx | 2 +- .../JS/utils/getJSContextMenuByIdeType.tsx | 2 +- .../EditorPane/JS/utils/getJSEntityItemUrl.ts | 2 +- .../IDE/EditorPane/JS/utils/getJSUrl.test.ts | 2 +- .../Editor/IDE/EditorPane/Query/ListItem.tsx | 2 +- .../Editor/IDE/EditorPane/Query/hooks.tsx | 4 +- .../IDE/EditorPane/Query/old/ListItem.tsx | 2 +- .../utils/getQueryContextMenuByIdeType.tsx | 2 +- .../Query/utils/getQueryEntityItemUrl.ts | 2 +- .../Query/utils/getQueryUrl.test.ts | 2 +- .../Editor/IDE/constants/SidebarButtons.ts | 24 +++ .../Editor/gitSync/useReconnectModalData.ts | 2 +- app/client/src/ce/sagas/DatasourcesSagas.ts | 2 +- app/client/src/ce/sagas/JSActionSagas.ts | 2 +- app/client/src/ce/sagas/NavigationSagas.ts | 4 +- .../src/ce/selectors/appIDESelectors.test.ts | 2 +- .../src/ce/selectors/appIDESelectors.ts | 2 +- .../src/ce/selectors/entitiesSelector.ts | 12 +- .../permissionPageHelpers.tsx | 2 +- app/client/src/ce/utils/lintRulesHelpers.ts | 2 +- .../editorComponents/ApiResponseView.test.tsx | 2 +- .../editorComponents/ApiResponseView.tsx | 2 +- .../Debugger/DebuggerTabs.tsx | 2 +- .../hooks/useStateInspectorItems.ts | 2 +- .../Debugger/hooks/useDebuggerTriggerClick.ts | 2 +- .../editorComponents/JSResponseView.test.tsx | 2 +- .../editorComponents/JSResponseView.tsx | 3 +- .../src/ee/IDE/Interfaces/EntityItem.ts | 1 + app/client/src/ee/IDE/Interfaces/IDETypes.ts | 1 + app/client/src/ee/IDE/constants/routes.ts | 1 + .../Editor/IDE/constants/SidebarButtons.ts | 1 + .../dropTarget/OnBoarding/OnBoarding.test.tsx | 3 +- app/client/src/navigation/FocusEntity.test.ts | 2 +- app/client/src/navigation/FocusEntity.ts | 5 +- .../hooks/useShowSnapShotBanner.ts | 2 +- .../Editor/DataSourceEditor/Debugger.test.tsx | 2 +- .../Explorer/Entity/EntityProperties.tsx | 2 +- .../pages/Editor/IDE/EditorPane/Editor.tsx | 2 +- .../pages/Editor/IDE/EditorPane/Explorer.tsx | 2 +- .../pages/Editor/IDE/EditorPane/JS/Add.tsx | 2 +- .../EditorPane/JS/EntityItem/JSEntityItem.tsx | 2 +- .../Editor/IDE/EditorPane/JS/Explorer.tsx | 2 +- .../IDE/EditorPane/JS/JSRender.test.tsx | 2 +- .../pages/Editor/IDE/EditorPane/JS/List.tsx | 2 +- .../pages/Editor/IDE/EditorPane/Query/Add.tsx | 2 +- .../Query/EntityItem/QueryEntityItem.tsx | 2 +- .../Editor/IDE/EditorPane/Query/Explorer.tsx | 2 +- .../Editor/IDE/EditorPane/Query/List.tsx | 2 +- .../IDE/EditorPane/Query/QueryRender.test.tsx | 2 +- .../IDE/EditorPane/UI/UIRender.test.tsx | 2 +- .../EditorPane/components/SegmentSwitcher.tsx | 2 +- .../src/pages/Editor/IDE/EditorPane/index.tsx | 2 +- .../pages/Editor/IDE/EditorTabs/AddButton.tsx | 2 +- .../pages/Editor/IDE/EditorTabs/AddTab.tsx | 2 +- .../Editor/IDE/EditorTabs/EditableTab.tsx | 2 +- .../Editor/IDE/EditorTabs/Editortabs.test.tsx | 2 +- .../src/pages/Editor/IDE/EditorTabs/List.tsx | 2 +- .../IDE/EditorTabs/ScreenModeToggle.tsx | 2 +- .../pages/Editor/IDE/EditorTabs/constants.ts | 4 +- .../src/pages/Editor/IDE/EditorTabs/index.tsx | 4 +- .../src/pages/Editor/IDE/Header/index.tsx | 2 +- .../hooks/useEditorStateLeftPaneWidth.ts | 2 +- .../IDE/Layout/hooks/useGridLayoutTemplate.ts | 7 +- app/client/src/pages/Editor/IDE/Sidebar.tsx | 29 +--- app/client/src/pages/Editor/IDE/hooks.ts | 4 +- .../Editor/IDE/hooks/useCurrentAppState.ts | 2 +- .../IntegrationEditor/APIOrSaasPlugins.tsx | 3 +- .../DBOrMostPopularPlugins.tsx | 3 +- .../Editor/QueryEditor/QueryDebuggerTabs.tsx | 2 +- .../WidgetsEditor/WidgetEditorContainer.tsx | 2 +- .../components/CodeModeTooltip.tsx | 2 +- .../NavigationAdjustedPageViewer.tsx | 2 +- .../components/NavigationPreview.tsx | 2 +- .../components/WidgetEditorNavigation.tsx | 2 +- app/client/src/pages/Editor/utils.tsx | 4 +- app/client/src/plugins/Linting/constants.ts | 3 +- .../plugins/Linting/utils/getLintingErrors.ts | 2 +- .../src/reducers/uiReducers/ideReducer.ts | 2 +- app/client/src/sagas/ActionSagas.ts | 3 +- app/client/src/sagas/AnalyticsSaga.ts | 2 +- app/client/src/sagas/DebuggerSagas.ts | 2 +- app/client/src/sagas/FocusRetentionSaga.ts | 2 +- app/client/src/sagas/IDESaga.tsx | 4 +- app/client/src/sagas/JSPaneSagas.ts | 2 +- .../sagas/getNextEntityAfterRemove.test.ts | 3 +- app/client/src/selectors/ideSelectors.tsx | 2 +- .../src/utils/hooks/useHoverToFocusWidget.ts | 2 +- app/client/src/utils/storage.ts | 2 +- 108 files changed, 290 insertions(+), 279 deletions(-) create mode 100644 app/client/src/IDE/Interfaces/EditorState.ts create mode 100644 app/client/src/IDE/Interfaces/EditorTypes.ts create mode 100644 app/client/src/IDE/Interfaces/UseRoutes.ts create mode 100644 app/client/src/IDE/constants/SidebarButtons.ts create mode 100644 app/client/src/ce/IDE/Interfaces/EntityItem.ts create mode 100644 app/client/src/ce/IDE/Interfaces/IDETypes.ts create mode 100644 app/client/src/ce/IDE/constants/routes.ts delete mode 100644 app/client/src/ce/entities/IDE/constants.ts create mode 100644 app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts create mode 100644 app/client/src/ee/IDE/Interfaces/EntityItem.ts create mode 100644 app/client/src/ee/IDE/Interfaces/IDETypes.ts create mode 100644 app/client/src/ee/IDE/constants/routes.ts create mode 100644 app/client/src/ee/pages/Editor/IDE/constants/SidebarButtons.ts diff --git a/app/client/src/IDE/Interfaces/EditorState.ts b/app/client/src/IDE/Interfaces/EditorState.ts new file mode 100644 index 000000000000..fe8736df4a62 --- /dev/null +++ b/app/client/src/IDE/Interfaces/EditorState.ts @@ -0,0 +1,6 @@ +export enum EditorState { + DATA = "DATA", + EDITOR = "EDITOR", + SETTINGS = "SETTINGS", + LIBRARIES = "LIBRARIES", +} diff --git a/app/client/src/IDE/Interfaces/EditorTypes.ts b/app/client/src/IDE/Interfaces/EditorTypes.ts new file mode 100644 index 000000000000..c899c3bd02f0 --- /dev/null +++ b/app/client/src/IDE/Interfaces/EditorTypes.ts @@ -0,0 +1,16 @@ +export enum EditorEntityTab { + QUERIES = "queries", + JS = "js", + UI = "ui", +} + +export enum EditorEntityTabState { + List = "List", + Edit = "Edit", + Add = "Add", +} + +export enum EditorViewMode { + FullScreen = "FullScreen", + SplitScreen = "SplitScreen", +} diff --git a/app/client/src/IDE/Interfaces/UseRoutes.ts b/app/client/src/IDE/Interfaces/UseRoutes.ts new file mode 100644 index 000000000000..23744e49c3e1 --- /dev/null +++ b/app/client/src/IDE/Interfaces/UseRoutes.ts @@ -0,0 +1,8 @@ +import type { ComponentType } from "react"; + +export type UseRoutes = Array<{ + key: string; + component: ComponentType; + path: string[]; + exact: boolean; +}>; diff --git a/app/client/src/IDE/constants/SidebarButtons.ts b/app/client/src/IDE/constants/SidebarButtons.ts new file mode 100644 index 000000000000..5f06f41bfb6f --- /dev/null +++ b/app/client/src/IDE/constants/SidebarButtons.ts @@ -0,0 +1,41 @@ +import type { IDESidebarButton } from "@appsmith/ads"; +import { EditorState } from "IDE/Interfaces/EditorState"; + +const SidebarButtonTitles = { + EDITOR: "Editor", + DATA: "Datasources", + SETTINGS: "Settings", + LIBRARIES: "Libraries", +}; + +export const EditorButton = (urlSuffix: string): IDESidebarButton => ({ + state: EditorState.EDITOR, + icon: "editor-v3", + title: SidebarButtonTitles.EDITOR, + testId: SidebarButtonTitles.EDITOR, + urlSuffix, +}); + +export const DataButton = (urlSuffix: string): IDESidebarButton => ({ + state: EditorState.DATA, + icon: "datasource-v3", + tooltip: SidebarButtonTitles.DATA, + testId: SidebarButtonTitles.DATA, + urlSuffix, +}); + +export const LibrariesButton = (urlSuffix: string): IDESidebarButton => ({ + state: EditorState.LIBRARIES, + icon: "packages-v3", + tooltip: SidebarButtonTitles.LIBRARIES, + testId: SidebarButtonTitles.LIBRARIES, + urlSuffix, +}); + +export const SettingsButton = (urlSuffix: string): IDESidebarButton => ({ + state: EditorState.SETTINGS, + icon: "settings-v3", + tooltip: SidebarButtonTitles.SETTINGS, + testId: SidebarButtonTitles.SETTINGS, + urlSuffix, +}); diff --git a/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx b/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx index 81cf7a8d802f..e19ee79c2b7f 100644 --- a/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx +++ b/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import { renderHook, act } from "@testing-library/react-hooks/dom"; import { Provider } from "react-redux"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { useIsInSideBySideEditor } from "./useIsInSideBySideEditor"; import { getIDETestState } from "test/factories/AppIDEFactoryUtils"; import type { AppState } from "ee/reducers"; diff --git a/app/client/src/actions/ideActions.ts b/app/client/src/actions/ideActions.ts index 028fa36b18f3..c6f8b5ae385c 100644 --- a/app/client/src/actions/ideActions.ts +++ b/app/client/src/actions/ideActions.ts @@ -1,4 +1,4 @@ -import type { EditorViewMode } from "ee/entities/IDE/constants"; +import type { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; import type { ParentEntityIDETabs } from "../reducers/uiReducers/ideReducer"; diff --git a/app/client/src/ce/IDE/Interfaces/EntityItem.ts b/app/client/src/ce/IDE/Interfaces/EntityItem.ts new file mode 100644 index 000000000000..d4c723e0533c --- /dev/null +++ b/app/client/src/ce/IDE/Interfaces/EntityItem.ts @@ -0,0 +1,13 @@ +import type { PluginType } from "../../../entities/Plugin"; +import type { ReactNode } from "react"; + +export interface EntityItem { + title: string; + type: PluginType; + key: string; + icon?: ReactNode; + group?: string; + userPermissions?: string[]; +} + +export interface GenericEntityItem extends Omit {} diff --git a/app/client/src/ce/IDE/Interfaces/IDETypes.ts b/app/client/src/ce/IDE/Interfaces/IDETypes.ts new file mode 100644 index 000000000000..525d543603ce --- /dev/null +++ b/app/client/src/ce/IDE/Interfaces/IDETypes.ts @@ -0,0 +1,6 @@ +export const IDE_TYPE = { + None: "None", + App: "App", +} as const; + +export type IDEType = keyof typeof IDE_TYPE; diff --git a/app/client/src/ce/IDE/constants/routes.ts b/app/client/src/ce/IDE/constants/routes.ts new file mode 100644 index 000000000000..114075e8ac44 --- /dev/null +++ b/app/client/src/ce/IDE/constants/routes.ts @@ -0,0 +1,44 @@ +import { + ADD_PATH, + API_EDITOR_ID_ADD_PATH, + API_EDITOR_ID_PATH, + BUILDER_CUSTOM_PATH, + BUILDER_PATH, + BUILDER_PATH_DEPRECATED, + DATA_SOURCES_EDITOR_ID_PATH, + ENTITY_PATH, + INTEGRATION_EDITOR_PATH, + JS_COLLECTION_ID_ADD_PATH, + JS_COLLECTION_ID_PATH, + QUERIES_EDITOR_ID_ADD_PATH, + QUERIES_EDITOR_ID_PATH, + WIDGETS_EDITOR_ID_PATH, +} from "ee/constants/routes/appRoutes"; +import { + SAAS_EDITOR_API_ID_ADD_PATH, + SAAS_EDITOR_API_ID_PATH, + SAAS_EDITOR_DATASOURCE_ID_PATH, +} from "pages/Editor/SaaSEditor/constants"; + +import { IDE_TYPE, type IDEType } from "../Interfaces/IDETypes"; + +export const EntityPaths: string[] = [ + API_EDITOR_ID_ADD_PATH, + API_EDITOR_ID_PATH, + QUERIES_EDITOR_ID_ADD_PATH, + QUERIES_EDITOR_ID_PATH, + DATA_SOURCES_EDITOR_ID_PATH, + INTEGRATION_EDITOR_PATH, + SAAS_EDITOR_DATASOURCE_ID_PATH, + SAAS_EDITOR_API_ID_ADD_PATH, + SAAS_EDITOR_API_ID_PATH, + JS_COLLECTION_ID_PATH, + JS_COLLECTION_ID_ADD_PATH, + WIDGETS_EDITOR_ID_PATH, + WIDGETS_EDITOR_ID_PATH + ADD_PATH, + ENTITY_PATH, +]; +export const IDEBasePaths: Readonly> = { + [IDE_TYPE.None]: [], + [IDE_TYPE.App]: [BUILDER_PATH, BUILDER_PATH_DEPRECATED, BUILDER_CUSTOM_PATH], +}; diff --git a/app/client/src/ce/IDE/hooks/useParentEntityInfo.ts b/app/client/src/ce/IDE/hooks/useParentEntityInfo.ts index 47a277a4cca8..8844342f74f5 100644 --- a/app/client/src/ce/IDE/hooks/useParentEntityInfo.ts +++ b/app/client/src/ce/IDE/hooks/useParentEntityInfo.ts @@ -1,5 +1,5 @@ import { ActionParentEntityType } from "ee/entities/Engine/actionHelpers"; -import type { IDEType } from "ee/entities/IDE/constants"; +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; import { useSelector } from "react-redux"; import { getCurrentApplicationId, diff --git a/app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx b/app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx index 6d6988b883f5..80563b6d3d89 100644 --- a/app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx +++ b/app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/usePluginActionResponseTabs.tsx @@ -3,7 +3,8 @@ import { usePluginActionContext } from "PluginActionEditor/PluginActionContext"; import type { BottomTab } from "components/editorComponents/EntityBottomTabs"; import { getIDEViewMode } from "selectors/ideSelectors"; import { useSelector } from "react-redux"; -import { EditorViewMode, IDE_TYPE } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import { DEBUGGER_TAB_KEYS } from "components/editorComponents/Debugger/constants"; import { createMessage, diff --git a/app/client/src/ce/actions/helpers.ts b/app/client/src/ce/actions/helpers.ts index f244ff7483d2..bc0c4d1621b8 100644 --- a/app/client/src/ce/actions/helpers.ts +++ b/app/client/src/ce/actions/helpers.ts @@ -10,7 +10,7 @@ import { saveActionName, } from "actions/pluginActionActions"; import { saveJSObjectName } from "actions/jsActionActions"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; export const createNewQueryBasedOnParentEntity = ( entityId: string, diff --git a/app/client/src/ce/entities/IDE/constants.ts b/app/client/src/ce/entities/IDE/constants.ts deleted file mode 100644 index 7809cb7f47d6..000000000000 --- a/app/client/src/ce/entities/IDE/constants.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { - ADD_PATH, - API_EDITOR_ID_ADD_PATH, - API_EDITOR_ID_PATH, - BUILDER_CUSTOM_PATH, - BUILDER_PATH, - BUILDER_PATH_DEPRECATED, - DATA_SOURCES_EDITOR_ID_PATH, - ENTITY_PATH, - INTEGRATION_EDITOR_PATH, - JS_COLLECTION_ID_ADD_PATH, - JS_COLLECTION_ID_PATH, - QUERIES_EDITOR_ID_ADD_PATH, - QUERIES_EDITOR_ID_PATH, - WIDGETS_EDITOR_ID_PATH, -} from "ee/constants/routes/appRoutes"; -import { - SAAS_EDITOR_API_ID_ADD_PATH, - SAAS_EDITOR_API_ID_PATH, - SAAS_EDITOR_DATASOURCE_ID_PATH, -} from "pages/Editor/SaaSEditor/constants"; -import type { PluginType } from "entities/Plugin"; -import type { ComponentType, ReactNode } from "react"; -import type { IDESidebarButton } from "@appsmith/ads"; - -export enum EditorState { - DATA = "DATA", - EDITOR = "EDITOR", - SETTINGS = "SETTINGS", - LIBRARIES = "LIBRARIES", -} - -export const SidebarTopButtonTitles = { - EDITOR: "Editor", -}; - -export const SidebarBottomButtonTitles = { - DATA: "Datasources", - SETTINGS: "Settings", - LIBRARIES: "Libraries", -}; - -export enum EditorEntityTab { - QUERIES = "queries", - JS = "js", - UI = "ui", -} - -export enum EditorEntityTabState { - List = "List", - Edit = "Edit", - Add = "Add", -} - -export enum EditorViewMode { - FullScreen = "FullScreen", - SplitScreen = "SplitScreen", -} - -export const TopButtons: IDESidebarButton[] = [ - { - state: EditorState.EDITOR, - icon: "editor-v3", - title: SidebarTopButtonTitles.EDITOR, - testId: SidebarTopButtonTitles.EDITOR, - urlSuffix: "", - }, -]; - -export const BottomButtons: IDESidebarButton[] = [ - { - state: EditorState.DATA, - icon: "datasource-v3", - tooltip: SidebarBottomButtonTitles.DATA, - testId: SidebarBottomButtonTitles.DATA, - urlSuffix: "datasource", - }, - { - state: EditorState.LIBRARIES, - icon: "packages-v3", - tooltip: SidebarBottomButtonTitles.LIBRARIES, - testId: SidebarBottomButtonTitles.LIBRARIES, - urlSuffix: "libraries", - }, - { - state: EditorState.SETTINGS, - icon: "settings-v3", - tooltip: SidebarBottomButtonTitles.SETTINGS, - testId: SidebarBottomButtonTitles.SETTINGS, - urlSuffix: "settings", - }, -]; - -export const IDE_TYPE = { - None: "None", - App: "App", -} as const; - -export type IDEType = keyof typeof IDE_TYPE; - -export const EntityPaths: string[] = [ - API_EDITOR_ID_ADD_PATH, - API_EDITOR_ID_PATH, - QUERIES_EDITOR_ID_ADD_PATH, - QUERIES_EDITOR_ID_PATH, - DATA_SOURCES_EDITOR_ID_PATH, - INTEGRATION_EDITOR_PATH, - SAAS_EDITOR_DATASOURCE_ID_PATH, - SAAS_EDITOR_API_ID_ADD_PATH, - SAAS_EDITOR_API_ID_PATH, - JS_COLLECTION_ID_PATH, - JS_COLLECTION_ID_ADD_PATH, - WIDGETS_EDITOR_ID_PATH, - WIDGETS_EDITOR_ID_PATH + ADD_PATH, - ENTITY_PATH, -]; - -export const IDEBasePaths: Readonly> = { - [IDE_TYPE.None]: [], - [IDE_TYPE.App]: [BUILDER_PATH, BUILDER_PATH_DEPRECATED, BUILDER_CUSTOM_PATH], -}; - -export interface EntityItem { - title: string; - type: PluginType; - key: string; - icon?: ReactNode; - group?: string; - userPermissions?: string[]; -} - -export interface GenericEntityItem extends Omit {} - -export type UseRoutes = Array<{ - key: string; - // TODO: Fix this the next time the file is edited - // eslint-disable-next-line @typescript-eslint/no-explicit-any - component: ComponentType; - path: string[]; - exact: boolean; -}>; diff --git a/app/client/src/ce/entities/IDE/hooks/useCreateActionsPermissions.ts b/app/client/src/ce/entities/IDE/hooks/useCreateActionsPermissions.ts index c984e29bc061..25af291d792d 100644 --- a/app/client/src/ce/entities/IDE/hooks/useCreateActionsPermissions.ts +++ b/app/client/src/ce/entities/IDE/hooks/useCreateActionsPermissions.ts @@ -1,5 +1,5 @@ import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; import { useSelector } from "react-redux"; import { getPagePermissions } from "selectors/editorSelectors"; diff --git a/app/client/src/ce/entities/IDE/utils.ts b/app/client/src/ce/entities/IDE/utils.ts index d119cac82369..f5df1cdd24e2 100644 --- a/app/client/src/ce/entities/IDE/utils.ts +++ b/app/client/src/ce/entities/IDE/utils.ts @@ -1,5 +1,6 @@ -import type { IDEType, EditorState } from "ee/entities/IDE/constants"; -import { IDE_TYPE, IDEBasePaths } from "ee/entities/IDE/constants"; +import type { EditorState } from "IDE/Interfaces/EditorState"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; +import { IDEBasePaths } from "ee/IDE/constants/routes"; import { matchPath } from "react-router"; import { identifyEntityFromPath } from "navigation/FocusEntity"; import { @@ -9,7 +10,8 @@ import { } from "ee/constants/routes/appRoutes"; import { saveActionName } from "actions/pluginActionActions"; import { saveJSObjectName } from "actions/jsActionActions"; -import { EditorEntityTab, type EntityItem } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { getHasManageActionPermission } from "ee/utils/BusinessFeatures/permissionPageHelpers"; export interface SaveEntityName { diff --git a/app/client/src/ce/hooks/datasourceEditorHooks.tsx b/app/client/src/ce/hooks/datasourceEditorHooks.tsx index db6730c1961d..0630e8db57d9 100644 --- a/app/client/src/ce/hooks/datasourceEditorHooks.tsx +++ b/app/client/src/ce/hooks/datasourceEditorHooks.tsx @@ -23,7 +23,7 @@ import { isEnabledForPreviewData } from "utils/editorContextUtils"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; import { getCurrentApplication } from "ee/selectors/applicationSelectors"; import { openGeneratePageModal } from "pages/Editor/GeneratePage/store/generatePageActions"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; export interface HeaderActionProps { datasource: Datasource | ApiDatasourceForm | undefined; diff --git a/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts b/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts index ea26fc3bf8d5..a38a95cf13fc 100644 --- a/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts +++ b/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts @@ -8,7 +8,7 @@ import { FocusStoreHierarchy, identifyEntityFromPath, } from "navigation/FocusEntity"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; import { datasourcesEditorURL, diff --git a/app/client/src/ce/navigation/FocusStrategy/index.ts b/app/client/src/ce/navigation/FocusStrategy/index.ts index 024a97de0c96..cbac41820fb2 100644 --- a/app/client/src/ce/navigation/FocusStrategy/index.ts +++ b/app/client/src/ce/navigation/FocusStrategy/index.ts @@ -1,5 +1,4 @@ -import type { IDEType } from "ee/entities/IDE/constants"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; import { AppIDEFocusStrategy } from "./AppIDEFocusStrategy"; import { NoIDEFocusStrategy } from "./NoIDEFocusStrategy"; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/ListItem.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/ListItem.tsx index 0aadd95aa31f..2edc10d68940 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/ListItem.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/ListItem.tsx @@ -1,5 +1,5 @@ import React from "react"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { JSEntityItem } from "pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem"; export const JSEntity = (props: { item: EntityItem }) => { diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.tsx index 9f71fb80b129..fbc198f2bd61 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/hooks.tsx @@ -7,14 +7,14 @@ import type { GroupedAddOperations } from "ee/pages/Editor/IDE/EditorPane/Query/ import { createMessage, EDITOR_PANE_TEXTS } from "ee/constants/messages"; import { JsFileIconV2 } from "pages/Editor/Explorer/ExplorerIcons"; import { SEARCH_ITEM_TYPES } from "components/editorComponents/GlobalSearch/utils"; -import type { UseRoutes } from "ee/entities/IDE/constants"; +import type { UseRoutes } from "IDE/Interfaces/UseRoutes"; import { ADD_PATH } from "ee/constants/routes/appRoutes"; import history from "utils/history"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; import { useModuleOptions } from "ee/utils/moduleInstanceHelpers"; import { getJSUrl } from "ee/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { setListViewActiveState } from "actions/ideActions"; import { retryPromise } from "utils/AppsmithUtils"; import Skeleton from "widgets/Skeleton"; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx index 65db9a369bd6..d1622c54e160 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/old/ListItem.tsx @@ -1,7 +1,7 @@ import React from "react"; import ExplorerJSCollectionEntity from "pages/Editor/Explorer/JSActions/JSActionEntity"; import { Flex } from "@appsmith/ads"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; export interface JSListItemProps { item: EntityItem; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx index d56db7010543..5590b59650a8 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; import EntityContextMenu from "pages/Editor/IDE/EditorPane/components/EntityContextMenu"; import { AppJSContextMenuItems } from "pages/Editor/IDE/EditorPane/JS/EntityItem/AppJSContextMenuItems"; import type { JSCollection } from "entities/JSCollection"; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl.ts index e394f9db47fd..abc76193a611 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl.ts @@ -1,4 +1,4 @@ -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { jsCollectionIdURL } from "ee/RouteBuilder"; export const getJSEntityItemUrl = ( diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts index d71b88d4f4bd..853c494d0d4c 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts @@ -2,7 +2,7 @@ import { getJSUrl } from "./getJSUrl"; import urlBuilder from "ee/entities/URLRedirect/URLAssembly"; import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity } from "navigation/FocusEntity"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; describe("getJSUrl", () => { urlBuilder.setCurrentBasePageId("0123456789abcdef00000000"); diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/ListItem.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/ListItem.tsx index 201d728199f3..f877949a889a 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/ListItem.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/ListItem.tsx @@ -1,6 +1,6 @@ import React from "react"; import { QueryEntityItem } from "pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; export const ActionEntityItem = (props: { item: EntityItem }) => { return ; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/hooks.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/hooks.tsx index d7aacb7d649a..34bcdc29ea8b 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/hooks.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/hooks.tsx @@ -24,7 +24,7 @@ import { BUILDER_PATH_DEPRECATED, } from "ee/constants/routes/appRoutes"; import { SAAS_EDITOR_API_ID_PATH } from "pages/Editor/SaaSEditor/constants"; -import type { UseRoutes } from "ee/entities/IDE/constants"; +import type { UseRoutes } from "IDE/Interfaces/UseRoutes"; import type { AppState } from "ee/reducers"; import keyBy from "lodash/keyBy"; import { getPluginEntityIcon } from "pages/Editor/Explorer/ExplorerIcons"; @@ -35,7 +35,7 @@ import { } from "@appsmith/ads"; import { createAddClassName } from "pages/Editor/IDE/EditorPane/utils"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { setListViewActiveState } from "actions/ideActions"; import { retryPromise } from "utils/AppsmithUtils"; import Skeleton from "widgets/Skeleton"; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx index 90db39393a2a..7a62dffb63ed 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/old/ListItem.tsx @@ -1,6 +1,6 @@ import React from "react"; import ExplorerActionEntity from "pages/Editor/Explorer/Actions/ActionEntity"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; export interface QueryListItemProps { item: EntityItem; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryContextMenuByIdeType.tsx b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryContextMenuByIdeType.tsx index 052d6825d145..179e6a3fb863 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryContextMenuByIdeType.tsx +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryContextMenuByIdeType.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; import type { Action } from "entities/Action"; import { AppQueryContextMenuItems } from "pages/Editor/IDE/EditorPane/Query/EntityItem/AppQueryContextMenuItems"; import EntityContextMenu from "pages/Editor/IDE/EditorPane/components/EntityContextMenu"; diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl.ts index b8b7ae4112de..6437a897e639 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl.ts @@ -1,4 +1,4 @@ -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { getActionConfig } from "pages/Editor/Explorer/Actions/helpers"; export const getQueryEntityItemUrl = ( diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts index aa5fee5925da..8869bb8d066b 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts @@ -1,7 +1,7 @@ import { getQueryUrl } from "./getQueryUrl"; import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity } from "navigation/FocusEntity"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { PluginPackageName } from "entities/Plugin"; import urlBuilder from "ee/entities/URLRedirect/URLAssembly"; diff --git a/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts new file mode 100644 index 000000000000..95ab5050b5f0 --- /dev/null +++ b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts @@ -0,0 +1,24 @@ +import { + DataButton, + LibrariesButton, + SettingsButton, +} from "IDE/constants/SidebarButtons"; +import { Condition, type IDESidebarButton } from "@appsmith/ads"; +import { + createMessage, + EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON, +} from "ee/constants/messages"; + +const DataButtonWithWarning: IDESidebarButton = { + ...DataButton("datasources"), + condition: Condition.Warn, + tooltip: createMessage(EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON), +}; + +const DataButtonWithoutWarning = DataButton("datasources"); + +export const BottomButtons = (datasourcesExist: boolean) => [ + datasourcesExist ? DataButtonWithoutWarning : DataButtonWithWarning, + LibrariesButton("libraries"), + SettingsButton("settings"), +]; diff --git a/app/client/src/ce/pages/Editor/gitSync/useReconnectModalData.ts b/app/client/src/ce/pages/Editor/gitSync/useReconnectModalData.ts index b8c012ee97d1..f2be964e6dbd 100644 --- a/app/client/src/ce/pages/Editor/gitSync/useReconnectModalData.ts +++ b/app/client/src/ce/pages/Editor/gitSync/useReconnectModalData.ts @@ -1,4 +1,4 @@ -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import { builderURL } from "ee/RouteBuilder"; import { RECONNECT_MISSING_DATASOURCE_CREDENTIALS_DESCRIPTION, diff --git a/app/client/src/ce/sagas/DatasourcesSagas.ts b/app/client/src/ce/sagas/DatasourcesSagas.ts index 30529b22f3a0..a3230c23cff5 100644 --- a/app/client/src/ce/sagas/DatasourcesSagas.ts +++ b/app/client/src/ce/sagas/DatasourcesSagas.ts @@ -87,7 +87,7 @@ import { } from "ee/constants/forms"; import type { ActionDataState } from "ee/reducers/entityReducers/actionsReducer"; import { setIdeEditorViewMode } from "../../actions/ideActions"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { getIsAnvilEnabledInCurrentApplication } from "../../layoutSystems/anvil/integrations/selectors"; import { createActionRequestSaga } from "../../sagas/ActionSagas"; import { validateResponse } from "../../sagas/ErrorSagas"; diff --git a/app/client/src/ce/sagas/JSActionSagas.ts b/app/client/src/ce/sagas/JSActionSagas.ts index ada296297b95..5302d4c06c36 100644 --- a/app/client/src/ce/sagas/JSActionSagas.ts +++ b/app/client/src/ce/sagas/JSActionSagas.ts @@ -72,7 +72,7 @@ import { getWidgets } from "sagas/selectors"; import FocusRetention from "sagas/FocusRetentionSaga"; import { handleJSEntityRedirect } from "sagas/IDESaga"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import { CreateNewActionKey } from "ee/entities/Engine/actionHelpers"; import { getAllActionTestPayloads } from "utils/storage"; import { convertToBasePageIdSelector } from "selectors/pageListSelectors"; diff --git a/app/client/src/ce/sagas/NavigationSagas.ts b/app/client/src/ce/sagas/NavigationSagas.ts index 88d84e26a4b6..ea8b37fc8d6c 100644 --- a/app/client/src/ce/sagas/NavigationSagas.ts +++ b/app/client/src/ce/sagas/NavigationSagas.ts @@ -21,8 +21,8 @@ import { flushErrors } from "actions/errorActions"; import type { NavigationMethod } from "utils/history"; import UsagePulse from "usagePulse"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; -import type { EditorViewMode } from "ee/entities/IDE/constants"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import type { EditorViewMode } from "IDE/Interfaces/EditorTypes"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import { updateIDETabsOnRouteChangeSaga } from "sagas/IDESaga"; import { getIDEViewMode } from "selectors/ideSelectors"; diff --git a/app/client/src/ce/selectors/appIDESelectors.test.ts b/app/client/src/ce/selectors/appIDESelectors.test.ts index 43425a1490b6..e2fce1e4c4d6 100644 --- a/app/client/src/ce/selectors/appIDESelectors.test.ts +++ b/app/client/src/ce/selectors/appIDESelectors.test.ts @@ -1,4 +1,4 @@ -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { groupAndSortEntitySegmentList } from "./appIDESelectors"; import { PluginType } from "entities/Plugin"; diff --git a/app/client/src/ce/selectors/appIDESelectors.ts b/app/client/src/ce/selectors/appIDESelectors.ts index 16fcca2e5e5f..73ada5de31ae 100644 --- a/app/client/src/ce/selectors/appIDESelectors.ts +++ b/app/client/src/ce/selectors/appIDESelectors.ts @@ -1,6 +1,6 @@ import { groupBy, keyBy, sortBy } from "lodash"; import { createSelector } from "reselect"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { getJSSegmentItems, getQuerySegmentItems, diff --git a/app/client/src/ce/selectors/entitiesSelector.ts b/app/client/src/ce/selectors/entitiesSelector.ts index 10b30bc32b90..0a51f3dddae3 100644 --- a/app/client/src/ce/selectors/entitiesSelector.ts +++ b/app/client/src/ce/selectors/entitiesSelector.ts @@ -60,12 +60,12 @@ import { import { MAX_DATASOURCE_SUGGESTIONS } from "constants/DatasourceEditorConstants"; import type { CreateNewActionKeyInterface } from "ee/entities/Engine/actionHelpers"; import { getNextEntityName } from "utils/AppsmithUtils"; -import { - EditorEntityTab, - type EntityItem, - type GenericEntityItem, - type IDEType, -} from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; +import type { + EntityItem, + GenericEntityItem, +} from "ee/IDE/Interfaces/EntityItem"; import { ActionUrlIcon, JsFileIconV2, diff --git a/app/client/src/ce/utils/BusinessFeatures/permissionPageHelpers.tsx b/app/client/src/ce/utils/BusinessFeatures/permissionPageHelpers.tsx index e882d308b893..14ba9b5d8607 100644 --- a/app/client/src/ce/utils/BusinessFeatures/permissionPageHelpers.tsx +++ b/app/client/src/ce/utils/BusinessFeatures/permissionPageHelpers.tsx @@ -43,7 +43,7 @@ import { hasExecuteActionPermission as hasExecuteActionPermission_EE } from "ee/ import { hasAuditLogsReadPermission as hasAuditLogsReadPermission_CE } from "ce/utils/permissionHelpers"; import { hasAuditLogsReadPermission as hasAuditLogsReadPermission_EE } from "ee/utils/permissionHelpers"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; export const getHasCreateWorkspacePermission = ( isEnabled: boolean, diff --git a/app/client/src/ce/utils/lintRulesHelpers.ts b/app/client/src/ce/utils/lintRulesHelpers.ts index fe0c07471d15..f0aa216747a3 100644 --- a/app/client/src/ce/utils/lintRulesHelpers.ts +++ b/app/client/src/ce/utils/lintRulesHelpers.ts @@ -1,4 +1,4 @@ -import type { IDEType } from "ee/entities/IDE/constants"; +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; interface ContextType { ideType: IDEType; diff --git a/app/client/src/components/editorComponents/ApiResponseView.test.tsx b/app/client/src/components/editorComponents/ApiResponseView.test.tsx index 9ad68895e52f..d3a142c304de 100644 --- a/app/client/src/components/editorComponents/ApiResponseView.test.tsx +++ b/app/client/src/components/editorComponents/ApiResponseView.test.tsx @@ -7,7 +7,7 @@ import { ThemeProvider } from "styled-components"; import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; import { lightTheme } from "selectors/themeSelectors"; import { BrowserRouter as Router } from "react-router-dom"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import "@testing-library/jest-dom/extend-expect"; import { APIFactory } from "test/factories/Actions/API"; import { noop } from "lodash"; diff --git a/app/client/src/components/editorComponents/ApiResponseView.tsx b/app/client/src/components/editorComponents/ApiResponseView.tsx index be02637831d4..8f359b7355d9 100644 --- a/app/client/src/components/editorComponents/ApiResponseView.tsx +++ b/app/client/src/components/editorComponents/ApiResponseView.tsx @@ -24,7 +24,7 @@ import { setPluginActionEditorDebuggerState, } from "PluginActionEditor/store"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import useDebuggerTriggerClick from "./Debugger/hooks/useDebuggerTriggerClick"; import { IDEBottomView, ViewHideBehaviour } from "IDE"; import { Response } from "PluginActionEditor/components/PluginActionResponse/components/Response"; diff --git a/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx b/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx index 514423108f63..e172214f4e4f 100644 --- a/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx +++ b/app/client/src/components/editorComponents/Debugger/DebuggerTabs.tsx @@ -26,7 +26,7 @@ import { IDEBottomView, ViewHideBehaviour, ViewDisplayMode } from "IDE"; import { StateInspector } from "./StateInspector"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { useLocation } from "react-router"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; function DebuggerTabs() { const dispatch = useDispatch(); diff --git a/app/client/src/components/editorComponents/Debugger/StateInspector/hooks/useStateInspectorItems.ts b/app/client/src/components/editorComponents/Debugger/StateInspector/hooks/useStateInspectorItems.ts index 906984a16467..e9f8ff8dcd7a 100644 --- a/app/client/src/components/editorComponents/Debugger/StateInspector/hooks/useStateInspectorItems.ts +++ b/app/client/src/components/editorComponents/Debugger/StateInspector/hooks/useStateInspectorItems.ts @@ -6,7 +6,7 @@ import { useGetJSItemsForStateInspector } from "./useGetJSItemsForStateInspector import { useGetUIItemsForStateInspector } from "./useGetUIItemsForStateInspector"; import type { GroupedItems } from "../types"; import { enhanceItemForListItem } from "../utils"; -import type { GenericEntityItem } from "ee/entities/IDE/constants"; +import type { GenericEntityItem } from "ee/IDE/Interfaces/EntityItem"; export const useStateInspectorItems: () => [ GenericEntityItem | undefined, diff --git a/app/client/src/components/editorComponents/Debugger/hooks/useDebuggerTriggerClick.ts b/app/client/src/components/editorComponents/Debugger/hooks/useDebuggerTriggerClick.ts index d901f3702d53..2ebfbdf20dd4 100644 --- a/app/client/src/components/editorComponents/Debugger/hooks/useDebuggerTriggerClick.ts +++ b/app/client/src/components/editorComponents/Debugger/hooks/useDebuggerTriggerClick.ts @@ -13,7 +13,7 @@ import { import { getCanvasDebuggerState } from "selectors/debuggerSelectors"; import { getIDEViewMode } from "selectors/ideSelectors"; import { useDispatch, useSelector } from "react-redux"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import type { ReduxAction } from "actions/ReduxActionTypes"; import type { CanvasDebuggerState } from "reducers/uiReducers/debuggerReducer"; import type { AppState } from "ee/reducers"; diff --git a/app/client/src/components/editorComponents/JSResponseView.test.tsx b/app/client/src/components/editorComponents/JSResponseView.test.tsx index 74217d6ae49a..656c536cdee4 100644 --- a/app/client/src/components/editorComponents/JSResponseView.test.tsx +++ b/app/client/src/components/editorComponents/JSResponseView.test.tsx @@ -8,7 +8,7 @@ import { ThemeProvider } from "styled-components"; import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; import { lightTheme } from "selectors/themeSelectors"; import { BrowserRouter as Router } from "react-router-dom"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import type { JSCollectionData } from "ee/reducers/entityReducers/jsActionsReducer"; import { PluginType } from "entities/Plugin"; import "@testing-library/jest-dom/extend-expect"; diff --git a/app/client/src/components/editorComponents/JSResponseView.tsx b/app/client/src/components/editorComponents/JSResponseView.tsx index 185d45408f9b..738112b34c0a 100644 --- a/app/client/src/components/editorComponents/JSResponseView.tsx +++ b/app/client/src/components/editorComponents/JSResponseView.tsx @@ -32,7 +32,8 @@ import { import { getJsPaneDebuggerState } from "selectors/jsPaneSelectors"; import { setJsPaneDebuggerState } from "actions/jsPaneActions"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode, IDE_TYPE } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import ErrorLogs from "./Debugger/Errors"; import { isBrowserExecutionAllowed } from "ee/utils/actionExecutionUtils"; import JSRemoteExecutionView from "ee/components/JSRemoteExecutionView"; diff --git a/app/client/src/ee/IDE/Interfaces/EntityItem.ts b/app/client/src/ee/IDE/Interfaces/EntityItem.ts new file mode 100644 index 000000000000..64d8614b5d1d --- /dev/null +++ b/app/client/src/ee/IDE/Interfaces/EntityItem.ts @@ -0,0 +1 @@ +export * from "ce/IDE/Interfaces/EntityItem"; diff --git a/app/client/src/ee/IDE/Interfaces/IDETypes.ts b/app/client/src/ee/IDE/Interfaces/IDETypes.ts new file mode 100644 index 000000000000..1e0b445528af --- /dev/null +++ b/app/client/src/ee/IDE/Interfaces/IDETypes.ts @@ -0,0 +1 @@ +export * from "ce/IDE/Interfaces/IDETypes"; diff --git a/app/client/src/ee/IDE/constants/routes.ts b/app/client/src/ee/IDE/constants/routes.ts new file mode 100644 index 000000000000..56054c42df2b --- /dev/null +++ b/app/client/src/ee/IDE/constants/routes.ts @@ -0,0 +1 @@ +export * from "ce/IDE/constants/routes"; diff --git a/app/client/src/ee/pages/Editor/IDE/constants/SidebarButtons.ts b/app/client/src/ee/pages/Editor/IDE/constants/SidebarButtons.ts new file mode 100644 index 000000000000..56e6a6d8fa98 --- /dev/null +++ b/app/client/src/ee/pages/Editor/IDE/constants/SidebarButtons.ts @@ -0,0 +1 @@ +export * from "ce/pages/Editor/IDE/constants/SidebarButtons"; diff --git a/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx b/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx index cb09b911afca..035decd694d0 100644 --- a/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx +++ b/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx @@ -1,5 +1,6 @@ import { EMPTY_CANVAS_HINTS, createMessage } from "ee/constants/messages"; -import { EditorEntityTab, EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import "@testing-library/jest-dom"; import { render, screen } from "@testing-library/react"; import "jest-styled-components"; diff --git a/app/client/src/navigation/FocusEntity.test.ts b/app/client/src/navigation/FocusEntity.test.ts index ee286285dc6d..1cf52d586d97 100644 --- a/app/client/src/navigation/FocusEntity.test.ts +++ b/app/client/src/navigation/FocusEntity.test.ts @@ -1,6 +1,6 @@ import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; interface TestCase { path: string; diff --git a/app/client/src/navigation/FocusEntity.ts b/app/client/src/navigation/FocusEntity.ts index 7b50baa57cb0..baf103ec3578 100644 --- a/app/client/src/navigation/FocusEntity.ts +++ b/app/client/src/navigation/FocusEntity.ts @@ -2,8 +2,9 @@ import type { match } from "react-router"; import { matchPath } from "react-router"; import { ADD_PATH } from "constants/routes"; import { TEMP_DATASOURCE_ID } from "constants/Datasource"; -import type { IDEType } from "ee/entities/IDE/constants"; -import { EditorState, EntityPaths } from "ee/entities/IDE/constants"; +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; +import { EditorState } from "IDE/Interfaces/EditorState"; +import { EntityPaths } from "ee/IDE/constants/routes"; import { getBaseUrlsForIDEType, getIDETypeByUrl } from "ee/entities/IDE/utils"; import { memoize } from "lodash"; import { MODULE_TYPE } from "ee/constants/ModuleConstants"; diff --git a/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts b/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts index ed09ba647cc4..5c3fd696372d 100644 --- a/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts +++ b/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts @@ -1,5 +1,5 @@ import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { getReadableSnapShotDetails } from "layoutSystems/autolayout/utils/AutoLayoutUtils"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { useSelector } from "react-redux"; diff --git a/app/client/src/pages/Editor/DataSourceEditor/Debugger.test.tsx b/app/client/src/pages/Editor/DataSourceEditor/Debugger.test.tsx index 4a39ac05904d..5429ab626dc1 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/Debugger.test.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/Debugger.test.tsx @@ -6,7 +6,7 @@ import { ThemeProvider } from "styled-components"; import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils"; import { lightTheme } from "selectors/themeSelectors"; import { BrowserRouter as Router } from "react-router-dom"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import "@testing-library/jest-dom/extend-expect"; import Debugger from "./Debugger"; diff --git a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx index 21846b52a95d..06293abfd904 100644 --- a/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx +++ b/app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx @@ -14,7 +14,7 @@ import { getEntityProperties } from "ee/pages/Editor/Explorer/Entity/getEntityPr import store from "store"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { DEFAULT_EXPLORER_PANE_WIDTH } from "constants/AppConstants"; import { BOTTOM_BAR_HEIGHT } from "components/BottomBar/constants"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Editor.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Editor.tsx index 1664df4ec4f0..9e5c1724c56c 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Editor.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Editor.tsx @@ -10,7 +10,7 @@ import { JSEditorPane } from "./JS"; import { QueryEditor } from "./Query"; import EditorTabs from "../EditorTabs"; import { useCurrentEditorState } from "../hooks"; -import { EditorEntityTab } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import styled from "styled-components"; const Container = styled(Flex)` diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx index 25f31d1b1960..d62d04f22d4e 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx @@ -18,7 +18,7 @@ import { import SegmentSwitcher from "./components/SegmentSwitcher"; import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { DEFAULT_EXPLORER_PANE_WIDTH } from "constants/AppConstants"; const EditorPaneExplorer = () => { diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/Add.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/Add.tsx index a15f59e6af92..65b1cf5531ff 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/Add.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/Add.tsx @@ -19,7 +19,7 @@ import { createAddClassName } from "../utils"; import { FocusEntity } from "navigation/FocusEntity"; import { getIDEViewMode } from "selectors/ideSelectors"; import type { FlexProps } from "@appsmith/ads"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { filterEntityGroupsBySearchTerm } from "IDE/utils"; import { DEFAULT_GROUP_LIST_SIZE } from "../../constants"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx index 9a341d91324a..07f2ae1e8c56 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/EntityItem/JSEntityItem.tsx @@ -1,6 +1,5 @@ import React, { useCallback, useMemo } from "react"; import { EntityItem } from "@appsmith/ads"; -import type { EntityItem as EntityItemProps } from "ee/entities/IDE/constants"; import type { AppState } from "ee/reducers"; import { getJsCollectionByBaseId } from "ee/selectors/entitiesSelector"; import { useDispatch, useSelector } from "react-redux"; @@ -20,6 +19,7 @@ import type { JSCollection } from "entities/JSCollection"; import { jsCollectionIdURL } from "ee/RouteBuilder"; import { JsFileIconV2 } from "pages/Editor/Explorer/ExplorerIcons"; import { getJSContextMenuByIdeType } from "ee/pages/Editor/IDE/EditorPane/JS/utils/getJSContextMenuByIdeType"; +import type { EntityItem as EntityItemProps } from "ee/IDE/Interfaces/EntityItem"; export const JSEntityItem = ({ item }: { item: EntityItemProps }) => { const jsAction = useSelector((state: AppState) => diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/Explorer.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/Explorer.tsx index cd2fe71fd280..f568223ac4e1 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/Explorer.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/Explorer.tsx @@ -2,7 +2,7 @@ import React from "react"; import List from "./List"; import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; const JSExplorer = () => { const ideViewMode = useSelector(getIDEViewMode); diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx index 5e1b2cf1d6e7..dac2b145eff5 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx @@ -5,7 +5,7 @@ import IDE from "pages/Editor/IDE/index"; import React from "react"; import { createMessage, EDITOR_PANE_TEXTS } from "ee/constants/messages"; import { getIDETestState } from "test/factories/AppIDEFactoryUtils"; -import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { PageFactory } from "test/factories/PageFactory"; import { JSObjectFactory } from "test/factories/Actions/JSObject"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx index 992afea302bd..8be64a119f55 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/List.tsx @@ -24,8 +24,8 @@ import { useLocation } from "react-router"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { useParentEntityInfo } from "ee/IDE/hooks/useParentEntityInfo"; import { useCreateActionsPermissions } from "ee/entities/IDE/hooks/useCreateActionsPermissions"; -import type { EntityItem } from "ee/entities/IDE/constants"; import { JSEntity } from "ee/pages/Editor/IDE/EditorPane/JS/ListItem"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; const JSContainer = styled(Flex)` & .t--entity-item { diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/Add.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/Add.tsx index a19e3c3f50cc..36fef60ce41e 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/Add.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/Add.tsx @@ -16,7 +16,7 @@ import { } from "ee/pages/Editor/IDE/EditorPane/Query/hooks"; import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { filterEntityGroupsBySearchTerm } from "IDE/utils"; import { DEFAULT_GROUP_LIST_SIZE } from "../../constants"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx index f74f53d02d28..9b045f6be8b8 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/EntityItem/QueryEntityItem.tsx @@ -1,6 +1,5 @@ import React, { useCallback, useMemo } from "react"; import { EntityItem } from "@appsmith/ads"; -import type { EntityItem as EntityItemProps } from "ee/entities/IDE/constants"; import type { AppState } from "ee/reducers"; import { getActionByBaseId, @@ -26,6 +25,7 @@ import { useActiveActionBaseId } from "ee/pages/Editor/Explorer/hooks"; import { PluginType } from "entities/Plugin"; import { useParentEntityInfo } from "ee/IDE/hooks/useParentEntityInfo"; import { getQueryContextMenuByIdeType } from "ee/pages/Editor/IDE/EditorPane/Query/utils/getQueryContextMenuByIdeType"; +import type { EntityItem as EntityItemProps } from "ee/IDE/Interfaces/EntityItem"; export const QueryEntityItem = ({ item }: { item: EntityItemProps }) => { const action = useSelector((state: AppState) => diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/Explorer.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/Explorer.tsx index 587da0cd88ad..64720ed10089 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/Explorer.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/Explorer.tsx @@ -4,7 +4,7 @@ import styled from "styled-components"; import { Flex } from "@appsmith/ads"; import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; const QueriesContainer = styled(Flex)` & .t--entity-item { diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx index a919ad44ad75..66683f461bc7 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/List.tsx @@ -20,13 +20,13 @@ import { getShowWorkflowFeature } from "ee/selectors/workflowSelectors"; import { BlankState } from "./BlankState"; import { EDITOR_PANE_TEXTS, createMessage } from "ee/constants/messages"; import { filterEntityGroupsBySearchTerm } from "IDE/utils"; -import type { EntityItem } from "ee/entities/IDE/constants"; import { ActionEntityItem } from "ee/pages/Editor/IDE/EditorPane/Query/ListItem"; import { useLocation } from "react-router"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { useParentEntityInfo } from "ee/IDE/hooks/useParentEntityInfo"; import { useCreateActionsPermissions } from "ee/entities/IDE/hooks/useCreateActionsPermissions"; import { objectKeys } from "@appsmith/utils"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; const ListQuery = () => { const [searchTerm, setSearchTerm] = useState(""); diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx index 97ac93702354..66292912e196 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx @@ -4,7 +4,7 @@ import { render } from "test/testUtils"; import IDE from "pages/Editor/IDE/index"; import { createMessage, EDITOR_PANE_TEXTS } from "ee/constants/messages"; import { BUILDER_PATH } from "ee/constants/routes/appRoutes"; -import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { APIFactory } from "test/factories/Actions/API"; import { PostgresFactory } from "test/factories/Actions/Postgres"; import { sagasToRunForTests } from "test/sagas"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx index ebea1b837310..015ffa44c55a 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx @@ -11,7 +11,7 @@ import { buildChildren, widgetCanvasFactory, } from "test/factories/WidgetFactoryUtils"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; const pageId = "0123456789abcdef00000000"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentSwitcher.tsx b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentSwitcher.tsx index fa0df5e105c7..e8c48fcde922 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentSwitcher.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentSwitcher.tsx @@ -1,6 +1,6 @@ import React, { useMemo } from "react"; import { createMessage, EDITOR_PANE_TEXTS } from "ee/constants/messages"; -import { EditorEntityTab } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import { useCurrentEditorState, useSegmentNavigation } from "../../hooks"; import { EditorSegments } from "@appsmith/ads"; diff --git a/app/client/src/pages/Editor/IDE/EditorPane/index.tsx b/app/client/src/pages/Editor/IDE/EditorPane/index.tsx index 5f520760579f..053b7b4eb552 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/index.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/index.tsx @@ -4,7 +4,7 @@ import EditorPaneExplorer from "./Explorer"; import Editor from "./Editor"; import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import EntityProperties from "pages/Editor/Explorer/Entity/EntityProperties"; const EditorPane = () => { diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/AddButton.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/AddButton.tsx index b6cefda06379..63429bcab636 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/AddButton.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/AddButton.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Flex, Spinner, Button } from "@appsmith/ads"; import { useCurrentEditorState, useIDETabClickHandlers } from "../hooks"; import { useIsJSAddLoading } from "ee/pages/Editor/IDE/EditorPane/JS/hooks"; -import { EditorEntityTabState } from "ee/entities/IDE/constants"; +import { EditorEntityTabState } from "IDE/Interfaces/EditorTypes"; const AddButton = () => { const { addClickHandler } = useIDETabClickHandlers(); diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/AddTab.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/AddTab.tsx index c1e355678f59..f053d73e510d 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/AddTab.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/AddTab.tsx @@ -5,7 +5,7 @@ import { useCurrentEditorState } from "../hooks"; import { EditorEntityTab, EditorEntityTabState, -} from "ee/entities/IDE/constants"; +} from "IDE/Interfaces/EditorTypes"; import { Text } from "@appsmith/ads"; const AddTab = ({ diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/EditableTab.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/EditableTab.tsx index 30d1b12546d7..f09290c3f1fa 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/EditableTab.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/EditableTab.tsx @@ -1,7 +1,6 @@ import React, { useCallback } from "react"; import { FileTab } from "IDE/Components/FileTab"; -import { type EntityItem } from "ee/entities/IDE/constants"; import { useCurrentEditorState } from "../hooks"; import { useDispatch, useSelector } from "react-redux"; @@ -16,6 +15,7 @@ import { import { noop } from "lodash"; import { EditableName, useIsRenaming } from "IDE"; import { IconContainer } from "IDE/Components/FileTab/styles"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; interface EditableTabProps { id: string; diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx index df7623c7948b..ec4eadd480d6 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/Editortabs.test.tsx @@ -2,7 +2,7 @@ import React from "react"; import { fireEvent, render } from "test/testUtils"; import EditorTabs from "."; import { getIDETestState } from "test/factories/AppIDEFactoryUtils"; -import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { Route } from "react-router-dom"; import { BUILDER_PATH } from "ee/constants/routes/appRoutes"; import "@testing-library/jest-dom"; diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/List.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/List.tsx index bab1f62c42c4..0960d23cf99d 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/List.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/List.tsx @@ -3,7 +3,7 @@ import styled from "styled-components"; import { Flex } from "@appsmith/ads"; import { useCurrentEditorState } from "../hooks"; -import { EditorEntityTab } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import ListQuery from "../EditorPane/Query/List"; import ListJSObjects from "../EditorPane/JS/List"; diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx index aa5b78a10ac8..e51bb3df56c4 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx @@ -3,7 +3,7 @@ import { useDispatch, useSelector } from "react-redux"; import { Button, Tooltip } from "@appsmith/ads"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import { MAXIMIZE_BUTTON_TOOLTIP, diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/constants.ts b/app/client/src/pages/Editor/IDE/EditorTabs/constants.ts index ba9ce7d61210..021efadc1b5a 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/constants.ts +++ b/app/client/src/pages/Editor/IDE/EditorTabs/constants.ts @@ -1,5 +1,4 @@ -import type { EntityItem } from "ee/entities/IDE/constants"; -import { EditorEntityTab } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import type { AppState } from "ee/reducers"; import { selectJSSegmentEditorTabs, @@ -11,6 +10,7 @@ import { } from "ee/selectors/entitiesSelector"; import { getJSEntityItemUrl } from "ee/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl"; import { getQueryEntityItemUrl } from "ee/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; export const TabSelectors: Record< EditorEntityTab, diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx index 87ece02a1448..7412d23fa882 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx @@ -2,12 +2,11 @@ import React, { useCallback, useEffect } from "react"; import { shallowEqual, useDispatch, useSelector } from "react-redux"; import { Flex, ScrollArea, ToggleButton } from "@appsmith/ads"; import { getIDEViewMode, getListViewActiveState } from "selectors/ideSelectors"; -import type { EntityItem } from "ee/entities/IDE/constants"; import { EditorEntityTab, EditorEntityTabState, EditorViewMode, -} from "ee/entities/IDE/constants"; +} from "IDE/Interfaces/EditorTypes"; import Container from "./Container"; import { @@ -27,6 +26,7 @@ import { setListViewActiveState } from "actions/ideActions"; import { useEventCallback } from "usehooks-ts"; import { EditableTab } from "./EditableTab"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; const EditorTabs = () => { const ideViewMode = useSelector(getIDEViewMode); diff --git a/app/client/src/pages/Editor/IDE/Header/index.tsx b/app/client/src/pages/Editor/IDE/Header/index.tsx index c26b641ba40d..08d5867c117d 100644 --- a/app/client/src/pages/Editor/IDE/Header/index.tsx +++ b/app/client/src/pages/Editor/IDE/Header/index.tsx @@ -58,7 +58,7 @@ import { viewerURL } from "ee/RouteBuilder"; import HelpBar from "components/editorComponents/GlobalSearch/HelpBar"; import { EditorTitle } from "./EditorTitle"; import { useCurrentAppState } from "../hooks/useCurrentAppState"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { EditorSaveIndicator } from "pages/Editor/EditorSaveIndicator"; import { APPLICATIONS_URL } from "constants/routes"; import { useNavigationMenuData } from "../../EditorName/useNavigationMenuData"; diff --git a/app/client/src/pages/Editor/IDE/Layout/hooks/useEditorStateLeftPaneWidth.ts b/app/client/src/pages/Editor/IDE/Layout/hooks/useEditorStateLeftPaneWidth.ts index fe8dfd7e8a6a..97801344b8b4 100644 --- a/app/client/src/pages/Editor/IDE/Layout/hooks/useEditorStateLeftPaneWidth.ts +++ b/app/client/src/pages/Editor/IDE/Layout/hooks/useEditorStateLeftPaneWidth.ts @@ -8,7 +8,7 @@ import { import { useSelector } from "react-redux"; import { getIDEViewMode } from "selectors/ideSelectors"; import { getPropertyPaneWidth } from "selectors/propertyPaneSelectors"; -import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { useCurrentEditorState } from "../../hooks"; import { previewModeSelector } from "selectors/editorSelectors"; import { useGitProtectedMode } from "pages/Editor/gitSync/hooks/modHooks"; diff --git a/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts b/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts index bf97ce71790b..a82ad1b6b117 100644 --- a/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts +++ b/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts @@ -7,11 +7,8 @@ import { useCurrentAppState } from "../../hooks/useCurrentAppState"; import { getPropertyPaneWidth } from "selectors/propertyPaneSelectors"; import { previewModeSelector } from "selectors/editorSelectors"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { - EditorEntityTab, - EditorState, - EditorViewMode, -} from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { APP_SETTINGS_PANE_WIDTH, APP_SIDEBAR_WIDTH, diff --git a/app/client/src/pages/Editor/IDE/Sidebar.tsx b/app/client/src/pages/Editor/IDE/Sidebar.tsx index 8e8fb55a03f0..e0cb31389dfb 100644 --- a/app/client/src/pages/Editor/IDE/Sidebar.tsx +++ b/app/client/src/pages/Editor/IDE/Sidebar.tsx @@ -6,17 +6,12 @@ import history, { NavigationMethod } from "utils/history"; import { useCurrentAppState } from "./hooks/useCurrentAppState"; import { getCurrentWorkspaceId } from "ee/selectors/selectedWorkspaceSelectors"; import { fetchWorkspace } from "ee/actions/workspaceActions"; -import { IDESidebar, Condition } from "@appsmith/ads"; -import { - BottomButtons, - EditorState, - TopButtons, -} from "ee/entities/IDE/constants"; +import { IDESidebar } from "@appsmith/ads"; import { getDatasources } from "ee/selectors/entitiesSelector"; -import { - createMessage, - EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON, -} from "ee/constants/messages"; +import { EditorButton } from "IDE/constants/SidebarButtons"; +import { BottomButtons } from "ee/pages/Editor/IDE/constants/SidebarButtons"; + +const TopButtons = [EditorButton("editor")]; function Sidebar() { const dispatch = useDispatch(); @@ -28,19 +23,7 @@ function Sidebar() { // Updates the bottom button config based on datasource existence const bottomButtons = React.useMemo(() => { - return datasourcesExist - ? BottomButtons - : BottomButtons.map((button) => { - if (button.state === EditorState.DATA) { - return { - ...button, - condition: Condition.Warn, - tooltip: createMessage(EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON), - }; - } - - return button; - }); + return BottomButtons(datasourcesExist); }, [datasourcesExist]); useEffect(() => { diff --git a/app/client/src/pages/Editor/IDE/hooks.ts b/app/client/src/pages/Editor/IDE/hooks.ts index d48defeba1aa..5c525622eb39 100644 --- a/app/client/src/pages/Editor/IDE/hooks.ts +++ b/app/client/src/pages/Editor/IDE/hooks.ts @@ -1,9 +1,8 @@ import { useCallback, useEffect, useState } from "react"; -import type { EntityItem } from "ee/entities/IDE/constants"; import { EditorEntityTab, EditorEntityTabState, -} from "ee/entities/IDE/constants"; +} from "IDE/Interfaces/EditorTypes"; import { useLocation } from "react-router"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; import { useDispatch, useSelector } from "react-redux"; @@ -32,6 +31,7 @@ import { useBoolean } from "usehooks-ts"; import { isWidgetActionConnectionPresent } from "selectors/onboardingSelectors"; import localStorage, { LOCAL_STORAGE_KEYS } from "utils/localStorage"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; export const useCurrentEditorState = () => { const [selectedSegment, setSelectedSegment] = useState( diff --git a/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts b/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts index db1061cdc149..e5446863c07f 100644 --- a/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts +++ b/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { useLocation } from "react-router"; import { identifyEntityFromPath } from "navigation/FocusEntity"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/APIOrSaasPlugins.tsx b/app/client/src/pages/Editor/IntegrationEditor/APIOrSaasPlugins.tsx index 3cf053abc581..8d5fc0fb3bc1 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/APIOrSaasPlugins.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/APIOrSaasPlugins.tsx @@ -48,7 +48,8 @@ import { } from "./PremiumDatasources/Constants"; import { getDatasourcesLoadingState } from "selectors/datasourceSelectors"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; -import type { IDEType } from "ee/entities/IDE/constants"; + +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; interface CreateAPIOrSaasPluginsProps { location: { diff --git a/app/client/src/pages/Editor/IntegrationEditor/DBOrMostPopularPlugins.tsx b/app/client/src/pages/Editor/IntegrationEditor/DBOrMostPopularPlugins.tsx index d3fc12b0ca57..cde141345e03 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/DBOrMostPopularPlugins.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/DBOrMostPopularPlugins.tsx @@ -51,7 +51,8 @@ import { PluginType, } from "entities/Plugin"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; -import type { IDEType } from "ee/entities/IDE/constants"; + +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; // This function remove the given key from queryParams and return string const removeQueryParams = (paramKeysToRemove: Array) => { diff --git a/app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx b/app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx index 6481edfc4d25..19afb1f4a8ef 100644 --- a/app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx +++ b/app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx @@ -31,7 +31,7 @@ import { } from "PluginActionEditor/store"; import { actionResponseDisplayDataFormats } from "../utils"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { IDEBottomView, ViewHideBehaviour } from "IDE"; import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx b/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx index cad110052fd0..233f720cc886 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx @@ -5,7 +5,7 @@ import classNames from "classnames"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { useSelector } from "react-redux"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { RenderModes } from "constants/WidgetConstants"; import styled from "styled-components"; import { IDE_HEADER_HEIGHT } from "@appsmith/ads"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx index c39b9b648343..f59f66c9ea75 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx @@ -6,7 +6,7 @@ import { getWidgetSelectionBlock } from "selectors/ui"; import { retrieveCodeWidgetNavigationUsed } from "utils/storage"; import { CANVAS_VIEW_MODE_TOOLTIP, createMessage } from "ee/constants/messages"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; /** * CodeModeTooltip diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx index 6eb0f1ff10a6..219d97017bcc 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from "react"; import React from "react"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; import { useSelector } from "react-redux"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx index 8f2aa0e23c24..08d28f4e6d77 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx @@ -5,7 +5,7 @@ import { useSelector } from "react-redux"; import { selectCombinedPreviewMode } from "selectors/gitModSelectors"; import { Navigation } from "pages/AppViewer/Navigation"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; /** diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx index d7b7d2869271..690061b21fee 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx @@ -1,6 +1,6 @@ import React, { forwardRef, useEffect, useRef, useState } from "react"; import NavigationPreview from "./NavigationPreview"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { getAppSettingsPaneContext, diff --git a/app/client/src/pages/Editor/utils.tsx b/app/client/src/pages/Editor/utils.tsx index f9b42347b8d8..71aa32da1d95 100644 --- a/app/client/src/pages/Editor/utils.tsx +++ b/app/client/src/pages/Editor/utils.tsx @@ -35,9 +35,9 @@ import { Icon } from "@appsmith/ads"; import { EditorEntityTab, EditorEntityTabState, - EditorState, EditorViewMode, -} from "ee/entities/IDE/constants"; +} from "IDE/Interfaces/EditorTypes"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { FocusEntity } from "navigation/FocusEntity"; import { objectKeys } from "@appsmith/utils"; diff --git a/app/client/src/plugins/Linting/constants.ts b/app/client/src/plugins/Linting/constants.ts index 63acf26cfbd6..c7a7f9955eaa 100644 --- a/app/client/src/plugins/Linting/constants.ts +++ b/app/client/src/plugins/Linting/constants.ts @@ -3,7 +3,8 @@ import type { LintOptions } from "jshint"; import isEntityFunction from "./utils/isEntityFunction"; import { noFloatingPromisesLintRule } from "./customRules/no-floating-promises"; import { getLintRulesBasedOnContext } from "ee/utils/lintRulesHelpers"; -import type { IDEType } from "ee/entities/IDE/constants"; + +import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; export enum LINTER_TYPE { "JSHINT" = "JSHint", diff --git a/app/client/src/plugins/Linting/utils/getLintingErrors.ts b/app/client/src/plugins/Linting/utils/getLintingErrors.ts index bfbc61d13f02..850d54415e5e 100644 --- a/app/client/src/plugins/Linting/utils/getLintingErrors.ts +++ b/app/client/src/plugins/Linting/utils/getLintingErrors.ts @@ -45,8 +45,8 @@ import { Linter } from "eslint-linter-browserify"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import type { DataTreeEntity } from "entities/DataTree/dataTreeTypes"; import type { AppsmithEntity } from "ee/entities/DataTree/types"; -import { IDE_TYPE, type IDEType } from "ee/entities/IDE/constants"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; +import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; const EvaluationScriptPositions: Record = {}; diff --git a/app/client/src/reducers/uiReducers/ideReducer.ts b/app/client/src/reducers/uiReducers/ideReducer.ts index 19f1456d0a40..69624a49c4f9 100644 --- a/app/client/src/reducers/uiReducers/ideReducer.ts +++ b/app/client/src/reducers/uiReducers/ideReducer.ts @@ -1,7 +1,7 @@ import { createImmerReducer } from "utils/ReducerUtils"; import type { ReduxAction } from "actions/ReduxActionTypes"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { klona } from "klona"; import { get, remove, set } from "lodash"; diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index 274faa639cc6..b6ea24423b9e 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -58,7 +58,7 @@ import { } from "ee/constants/ReduxActionConstants"; import { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils"; import { CreateNewActionKey } from "ee/entities/Engine/actionHelpers"; -import { EditorViewMode, IDE_TYPE } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import type { ActionData } from "ee/reducers/entityReducers/actionsReducer"; import { @@ -143,6 +143,7 @@ import { } from "./helper"; import { handleQueryEntityRedirect } from "./IDESaga"; import type { EvaluationReduxAction } from "actions/EvaluationReduxActionTypes"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; export const DEFAULT_PREFIX = { QUERY: "Query", diff --git a/app/client/src/sagas/AnalyticsSaga.ts b/app/client/src/sagas/AnalyticsSaga.ts index 87477f4407a1..25ada435aa70 100644 --- a/app/client/src/sagas/AnalyticsSaga.ts +++ b/app/client/src/sagas/AnalyticsSaga.ts @@ -12,7 +12,7 @@ import log from "loglevel"; import { all, put, select, takeEvery } from "redux-saga/effects"; import { getIdeCanvasSideBySideHoverState } from "selectors/ideSelectors"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { recordAnalyticsForSideBySideNavigation, recordAnalyticsForSideBySideWidgetHover, diff --git a/app/client/src/sagas/DebuggerSagas.ts b/app/client/src/sagas/DebuggerSagas.ts index dfa17ffe92a7..d91842067bd9 100644 --- a/app/client/src/sagas/DebuggerSagas.ts +++ b/app/client/src/sagas/DebuggerSagas.ts @@ -57,7 +57,7 @@ import { } from "ee/sagas/helpers"; import { identifyEntityFromPath } from "../navigation/FocusEntity"; import { getIDEViewMode } from "../selectors/ideSelectors"; -import type { EditorViewMode } from "ee/entities/IDE/constants"; +import type { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { getDebuggerPaneConfig } from "../components/editorComponents/Debugger/hooks/useDebuggerTriggerClick"; import { DEBUGGER_TAB_KEYS } from "../components/editorComponents/Debugger/constants"; diff --git a/app/client/src/sagas/FocusRetentionSaga.ts b/app/client/src/sagas/FocusRetentionSaga.ts index 19e3b3c45b23..5a2470347937 100644 --- a/app/client/src/sagas/FocusRetentionSaga.ts +++ b/app/client/src/sagas/FocusRetentionSaga.ts @@ -20,7 +20,7 @@ import { getAction, getPlugin } from "ee/selectors/entitiesSelector"; import type { Plugin } from "entities/Plugin"; import { getIDETypeByUrl } from "ee/entities/IDE/utils"; import { getIDEFocusStrategy } from "ee/navigation/FocusStrategy"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; import { selectGitApplicationCurrentBranch } from "selectors/gitModSelectors"; export interface FocusPath { diff --git a/app/client/src/sagas/IDESaga.tsx b/app/client/src/sagas/IDESaga.tsx index e6adeafa8e3d..ced295c54dab 100644 --- a/app/client/src/sagas/IDESaga.tsx +++ b/app/client/src/sagas/IDESaga.tsx @@ -14,13 +14,13 @@ import { queryAddURL, queryListURL, } from "ee/RouteBuilder"; -import type { EntityItem } from "ee/entities/IDE/constants"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { getQueryEntityItemUrl } from "ee/pages/Editor/IDE/EditorPane/Query/utils/getQueryEntityItemUrl"; import { getJSEntityItemUrl } from "ee/pages/Editor/IDE/EditorPane/JS/utils/getJSEntityItemUrl"; import log from "loglevel"; import type { ReduxAction } from "actions/ReduxActionTypes"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; -import type { EditorViewMode } from "ee/entities/IDE/constants"; +import type { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { retrieveIDEViewMode, storeIDEViewMode } from "utils/storage"; import { selectJSSegmentEditorTabs, diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index 5e49d43b0808..2434dff1b86c 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -96,7 +96,7 @@ import { getJsPaneDebuggerState } from "selectors/jsPaneSelectors"; import { logMainJsActionExecution } from "ee/utils/analyticsHelpers"; import { getFocusablePropertyPaneField } from "selectors/propertyPaneSelectors"; import { setIdeEditorViewMode } from "actions/ideActions"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { updateJSCollectionAPICall } from "ee/sagas/ApiCallerSagas"; import { convertToBasePageIdSelector } from "selectors/pageListSelectors"; diff --git a/app/client/src/sagas/getNextEntityAfterRemove.test.ts b/app/client/src/sagas/getNextEntityAfterRemove.test.ts index daf7565eb4e4..9876f3c09b4e 100644 --- a/app/client/src/sagas/getNextEntityAfterRemove.test.ts +++ b/app/client/src/sagas/getNextEntityAfterRemove.test.ts @@ -1,8 +1,9 @@ -import { EditorState, type EntityItem } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; import { PluginType } from "entities/Plugin"; import * as FocusEntityObj from "navigation/FocusEntity"; import { RedirectAction, getNextEntityAfterRemove } from "./IDESaga"; import { FocusEntity } from "navigation/FocusEntity"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; describe("getNextEntityAfterRemove function", () => { const items: EntityItem[] = [ diff --git a/app/client/src/selectors/ideSelectors.tsx b/app/client/src/selectors/ideSelectors.tsx index f3c0499779b0..18f926994f42 100644 --- a/app/client/src/selectors/ideSelectors.tsx +++ b/app/client/src/selectors/ideSelectors.tsx @@ -1,7 +1,7 @@ import { createSelector } from "reselect"; import type { AppState } from "ee/reducers"; import { getPageActions } from "ee/selectors/entitiesSelector"; -import { EditorEntityTab } from "ee/entities/IDE/constants"; +import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import { getCurrentBasePageId } from "./editorSelectors"; import type { ParentEntityIDETabs } from "../reducers/uiReducers/ideReducer"; import { get } from "lodash"; diff --git a/app/client/src/utils/hooks/useHoverToFocusWidget.ts b/app/client/src/utils/hooks/useHoverToFocusWidget.ts index a6cf7962de9a..8f7f3d026b06 100644 --- a/app/client/src/utils/hooks/useHoverToFocusWidget.ts +++ b/app/client/src/utils/hooks/useHoverToFocusWidget.ts @@ -6,7 +6,7 @@ import { selectCombinedPreviewMode } from "selectors/gitModSelectors"; import type { AppState } from "ee/reducers"; import type React from "react"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "ee/entities/IDE/constants"; +import { EditorState } from "IDE/Interfaces/EditorState"; export const useHoverToFocusWidget = ( widgetId: string, diff --git a/app/client/src/utils/storage.ts b/app/client/src/utils/storage.ts index 8893261bb190..eefd22ee09ff 100644 --- a/app/client/src/utils/storage.ts +++ b/app/client/src/utils/storage.ts @@ -3,7 +3,7 @@ import moment from "moment"; import localforage from "localforage"; import { isNumber } from "lodash"; import { EditorModes } from "components/editorComponents/CodeEditor/EditorConfig"; -import type { EditorViewMode } from "ee/entities/IDE/constants"; +import type { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import type { OverriddenFeatureFlags } from "./hooks/useFeatureFlagOverride"; import { AvailableFeaturesToOverride } from "./hooks/useFeatureFlagOverride"; From 110d389b812133b5e4652ea8321b57a9225a8654 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Thu, 6 Feb 2025 14:58:29 +0530 Subject: [PATCH 2/7] fix: test file import --- app/client/test/factories/AppIDEFactoryUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/test/factories/AppIDEFactoryUtils.ts b/app/client/test/factories/AppIDEFactoryUtils.ts index 5eccc699e189..b91938136412 100644 --- a/app/client/test/factories/AppIDEFactoryUtils.ts +++ b/app/client/test/factories/AppIDEFactoryUtils.ts @@ -1,5 +1,5 @@ import store from "store"; -import { EditorViewMode } from "ee/entities/IDE/constants"; +import { EditorViewMode } from "IDE/Interfaces/EditorTypes"; import type { AppState } from "ee/reducers"; import MockPluginsState from "test/factories/MockPluginsState"; import type { Action } from "entities/Action"; From 54ab0043432ce0018b3253d6aac04b1a2a154455 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Thu, 6 Feb 2025 15:07:40 +0530 Subject: [PATCH 3/7] fix: Missed import --- app/client/src/pages/Editor/IDE/EditorTabs/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx b/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx index d504c4a9a378..29bc483fb961 100644 --- a/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx +++ b/app/client/src/pages/Editor/IDE/EditorTabs/index.tsx @@ -10,6 +10,7 @@ import { } from "@appsmith/ads"; import { getIDEViewMode, getListViewActiveState } from "selectors/ideSelectors"; +import type { EntityItem } from "ee/IDE/Interfaces/EntityItem"; import { EditorEntityTab, EditorEntityTabState, From 7e688b5f799cc0002c841ff459d5d1e916af1792 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Thu, 6 Feb 2025 17:03:07 +0530 Subject: [PATCH 4/7] fix: basic issues --- .../src/ce/pages/Editor/IDE/constants/SidebarButtons.ts | 4 ++-- app/client/src/ee/entities/IDE/constants.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 app/client/src/ee/entities/IDE/constants.ts diff --git a/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts index 95ab5050b5f0..79f5353faa49 100644 --- a/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts +++ b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts @@ -10,12 +10,12 @@ import { } from "ee/constants/messages"; const DataButtonWithWarning: IDESidebarButton = { - ...DataButton("datasources"), + ...DataButton("datasource"), condition: Condition.Warn, tooltip: createMessage(EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON), }; -const DataButtonWithoutWarning = DataButton("datasources"); +const DataButtonWithoutWarning = DataButton("datasource"); export const BottomButtons = (datasourcesExist: boolean) => [ datasourcesExist ? DataButtonWithoutWarning : DataButtonWithWarning, diff --git a/app/client/src/ee/entities/IDE/constants.ts b/app/client/src/ee/entities/IDE/constants.ts deleted file mode 100644 index bad2f3dc193a..000000000000 --- a/app/client/src/ee/entities/IDE/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "ce/entities/IDE/constants"; From 77e2c2ecec99f204568471b20119de675472c348 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Thu, 6 Feb 2025 17:21:36 +0530 Subject: [PATCH 5/7] Sync changes from EE excluding enterprise directory --- app/client/src/IDE/Interfaces/EditorState.ts | 6 ------ app/client/src/IDE/constants/SidebarButtons.ts | 2 +- app/client/src/IDE/enums.ts | 7 +++++++ app/client/src/ce/entities/IDE/utils.ts | 2 +- .../ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts | 2 +- .../pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts | 2 +- .../Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts | 2 +- .../src/ce/pages/Editor/IDE/constants/SidebarButtons.ts | 2 ++ .../common/dropTarget/OnBoarding/OnBoarding.test.tsx | 2 +- app/client/src/navigation/FocusEntity.test.ts | 2 +- app/client/src/navigation/FocusEntity.ts | 2 +- .../CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts | 2 +- app/client/src/pages/Editor/IDE/Header/index.tsx | 2 +- .../Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts | 2 +- app/client/src/pages/Editor/IDE/Sidebar.tsx | 8 ++++---- .../src/pages/Editor/IDE/hooks/useCurrentAppState.ts | 2 +- .../pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx | 2 +- .../Editor/WidgetsEditor/components/CodeModeTooltip.tsx | 2 +- .../components/NavigationAdjustedPageViewer.tsx | 2 +- .../Editor/WidgetsEditor/components/NavigationPreview.tsx | 2 +- .../WidgetsEditor/components/WidgetEditorNavigation.tsx | 2 +- app/client/src/pages/Editor/utils.tsx | 2 +- app/client/src/sagas/getNextEntityAfterRemove.test.ts | 2 +- app/client/src/utils/hooks/useHoverToFocusWidget.ts | 2 +- 24 files changed, 33 insertions(+), 30 deletions(-) diff --git a/app/client/src/IDE/Interfaces/EditorState.ts b/app/client/src/IDE/Interfaces/EditorState.ts index fe8736df4a62..e69de29bb2d1 100644 --- a/app/client/src/IDE/Interfaces/EditorState.ts +++ b/app/client/src/IDE/Interfaces/EditorState.ts @@ -1,6 +0,0 @@ -export enum EditorState { - DATA = "DATA", - EDITOR = "EDITOR", - SETTINGS = "SETTINGS", - LIBRARIES = "LIBRARIES", -} diff --git a/app/client/src/IDE/constants/SidebarButtons.ts b/app/client/src/IDE/constants/SidebarButtons.ts index 5f06f41bfb6f..2a57b14b3521 100644 --- a/app/client/src/IDE/constants/SidebarButtons.ts +++ b/app/client/src/IDE/constants/SidebarButtons.ts @@ -1,5 +1,5 @@ import type { IDESidebarButton } from "@appsmith/ads"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "../enums"; const SidebarButtonTitles = { EDITOR: "Editor", diff --git a/app/client/src/IDE/enums.ts b/app/client/src/IDE/enums.ts index 2c62e72c91ad..b1fdd7489d8f 100644 --- a/app/client/src/IDE/enums.ts +++ b/app/client/src/IDE/enums.ts @@ -3,3 +3,10 @@ export enum Condition { // Error = "Error", // Success = "Success", } + +export enum EditorState { + DATA = "DATA", + EDITOR = "EDITOR", + SETTINGS = "SETTINGS", + LIBRARIES = "LIBRARIES", +} diff --git a/app/client/src/ce/entities/IDE/utils.ts b/app/client/src/ce/entities/IDE/utils.ts index f5df1cdd24e2..02c6809e6015 100644 --- a/app/client/src/ce/entities/IDE/utils.ts +++ b/app/client/src/ce/entities/IDE/utils.ts @@ -1,4 +1,4 @@ -import type { EditorState } from "IDE/Interfaces/EditorState"; +import type { EditorState } from "IDE/enums"; import { IDE_TYPE, type IDEType } from "ee/IDE/Interfaces/IDETypes"; import { IDEBasePaths } from "ee/IDE/constants/routes"; import { matchPath } from "react-router"; diff --git a/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts b/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts index a38a95cf13fc..a358014d55ff 100644 --- a/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts +++ b/app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts @@ -8,7 +8,7 @@ import { FocusStoreHierarchy, identifyEntityFromPath, } from "navigation/FocusEntity"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { ReduxActionTypes } from "ee/constants/ReduxActionConstants"; import { datasourcesEditorURL, diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts index 853c494d0d4c..475734581638 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/JS/utils/getJSUrl.test.ts @@ -2,7 +2,7 @@ import { getJSUrl } from "./getJSUrl"; import urlBuilder from "ee/entities/URLRedirect/URLAssembly"; import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity } from "navigation/FocusEntity"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; describe("getJSUrl", () => { urlBuilder.setCurrentBasePageId("0123456789abcdef00000000"); diff --git a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts index 8869bb8d066b..a835868204e4 100644 --- a/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts +++ b/app/client/src/ce/pages/Editor/IDE/EditorPane/Query/utils/getQueryUrl.test.ts @@ -1,7 +1,7 @@ import { getQueryUrl } from "./getQueryUrl"; import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity } from "navigation/FocusEntity"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { PluginPackageName } from "entities/Plugin"; import urlBuilder from "ee/entities/URLRedirect/URLAssembly"; diff --git a/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts index 79f5353faa49..51fbd654fe32 100644 --- a/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts +++ b/app/client/src/ce/pages/Editor/IDE/constants/SidebarButtons.ts @@ -1,5 +1,6 @@ import { DataButton, + EditorButton, LibrariesButton, SettingsButton, } from "IDE/constants/SidebarButtons"; @@ -22,3 +23,4 @@ export const BottomButtons = (datasourcesExist: boolean) => [ LibrariesButton("libraries"), SettingsButton("settings"), ]; +export const TopButtons = [EditorButton("editor")]; diff --git a/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx b/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx index 035decd694d0..b07105cd2196 100644 --- a/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx +++ b/app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx @@ -1,5 +1,5 @@ import { EMPTY_CANVAS_HINTS, createMessage } from "ee/constants/messages"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { EditorEntityTab } from "IDE/Interfaces/EditorTypes"; import "@testing-library/jest-dom"; import { render, screen } from "@testing-library/react"; diff --git a/app/client/src/navigation/FocusEntity.test.ts b/app/client/src/navigation/FocusEntity.test.ts index 1cf52d586d97..69aa11d2e081 100644 --- a/app/client/src/navigation/FocusEntity.test.ts +++ b/app/client/src/navigation/FocusEntity.test.ts @@ -1,6 +1,6 @@ import type { FocusEntityInfo } from "navigation/FocusEntity"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; interface TestCase { path: string; diff --git a/app/client/src/navigation/FocusEntity.ts b/app/client/src/navigation/FocusEntity.ts index baf103ec3578..351ba0599a82 100644 --- a/app/client/src/navigation/FocusEntity.ts +++ b/app/client/src/navigation/FocusEntity.ts @@ -3,7 +3,7 @@ import { matchPath } from "react-router"; import { ADD_PATH } from "constants/routes"; import { TEMP_DATASOURCE_ID } from "constants/Datasource"; import type { IDEType } from "ee/IDE/Interfaces/IDETypes"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { EntityPaths } from "ee/IDE/constants/routes"; import { getBaseUrlsForIDEType, getIDETypeByUrl } from "ee/entities/IDE/utils"; import { memoize } from "lodash"; diff --git a/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts b/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts index 5c3fd696372d..59d12e965eba 100644 --- a/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts +++ b/app/client/src/pages/Editor/CanvasLayoutConversion/hooks/useShowSnapShotBanner.ts @@ -1,5 +1,5 @@ import { FEATURE_FLAG } from "ee/entities/FeatureFlag"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { getReadableSnapShotDetails } from "layoutSystems/autolayout/utils/AutoLayoutUtils"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { useSelector } from "react-redux"; diff --git a/app/client/src/pages/Editor/IDE/Header/index.tsx b/app/client/src/pages/Editor/IDE/Header/index.tsx index 08d5867c117d..17c2f63afa57 100644 --- a/app/client/src/pages/Editor/IDE/Header/index.tsx +++ b/app/client/src/pages/Editor/IDE/Header/index.tsx @@ -58,7 +58,7 @@ import { viewerURL } from "ee/RouteBuilder"; import HelpBar from "components/editorComponents/GlobalSearch/HelpBar"; import { EditorTitle } from "./EditorTitle"; import { useCurrentAppState } from "../hooks/useCurrentAppState"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { EditorSaveIndicator } from "pages/Editor/EditorSaveIndicator"; import { APPLICATIONS_URL } from "constants/routes"; import { useNavigationMenuData } from "../../EditorName/useNavigationMenuData"; diff --git a/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts b/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts index a82ad1b6b117..c58548156633 100644 --- a/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts +++ b/app/client/src/pages/Editor/IDE/Layout/hooks/useGridLayoutTemplate.ts @@ -7,7 +7,7 @@ import { useCurrentAppState } from "../../hooks/useCurrentAppState"; import { getPropertyPaneWidth } from "selectors/propertyPaneSelectors"; import { previewModeSelector } from "selectors/editorSelectors"; import { getIDEViewMode } from "selectors/ideSelectors"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes"; import { APP_SETTINGS_PANE_WIDTH, diff --git a/app/client/src/pages/Editor/IDE/Sidebar.tsx b/app/client/src/pages/Editor/IDE/Sidebar.tsx index e0cb31389dfb..eb711ddb35e3 100644 --- a/app/client/src/pages/Editor/IDE/Sidebar.tsx +++ b/app/client/src/pages/Editor/IDE/Sidebar.tsx @@ -8,10 +8,10 @@ import { getCurrentWorkspaceId } from "ee/selectors/selectedWorkspaceSelectors"; import { fetchWorkspace } from "ee/actions/workspaceActions"; import { IDESidebar } from "@appsmith/ads"; import { getDatasources } from "ee/selectors/entitiesSelector"; -import { EditorButton } from "IDE/constants/SidebarButtons"; -import { BottomButtons } from "ee/pages/Editor/IDE/constants/SidebarButtons"; - -const TopButtons = [EditorButton("editor")]; +import { + BottomButtons, + TopButtons, +} from "ee/pages/Editor/IDE/constants/SidebarButtons"; function Sidebar() { const dispatch = useDispatch(); diff --git a/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts b/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts index e5446863c07f..9d36e085644a 100644 --- a/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts +++ b/app/client/src/pages/Editor/IDE/hooks/useCurrentAppState.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { useLocation } from "react-router"; import { identifyEntityFromPath } from "navigation/FocusEntity"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx b/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx index 233f720cc886..16e668ae3b50 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/WidgetEditorContainer.tsx @@ -5,7 +5,7 @@ import classNames from "classnames"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { useSelector } from "react-redux"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { RenderModes } from "constants/WidgetConstants"; import styled from "styled-components"; import { IDE_HEADER_HEIGHT } from "@appsmith/ads"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx index f59f66c9ea75..62c12f752fe8 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/CodeModeTooltip.tsx @@ -6,7 +6,7 @@ import { getWidgetSelectionBlock } from "selectors/ui"; import { retrieveCodeWidgetNavigationUsed } from "utils/storage"; import { CANVAS_VIEW_MODE_TOOLTIP, createMessage } from "ee/constants/messages"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; /** * CodeModeTooltip diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx index 219d97017bcc..c9e079795ad7 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationAdjustedPageViewer.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from "react"; import React from "react"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; import { useSelector } from "react-redux"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx index 08d28f4e6d77..ff8ce07de230 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/NavigationPreview.tsx @@ -5,7 +5,7 @@ import { useSelector } from "react-redux"; import { selectCombinedPreviewMode } from "selectors/gitModSelectors"; import { Navigation } from "pages/AppViewer/Navigation"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; /** diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx index 690061b21fee..2876bfcfce71 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/components/WidgetEditorNavigation.tsx @@ -1,6 +1,6 @@ import React, { forwardRef, useEffect, useRef, useState } from "react"; import NavigationPreview from "./NavigationPreview"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; import { getAppSettingsPaneContext, diff --git a/app/client/src/pages/Editor/utils.tsx b/app/client/src/pages/Editor/utils.tsx index 71aa32da1d95..02fcd76893ac 100644 --- a/app/client/src/pages/Editor/utils.tsx +++ b/app/client/src/pages/Editor/utils.tsx @@ -37,7 +37,7 @@ import { EditorEntityTabState, EditorViewMode, } from "IDE/Interfaces/EditorTypes"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { FocusEntity } from "navigation/FocusEntity"; import { objectKeys } from "@appsmith/utils"; diff --git a/app/client/src/sagas/getNextEntityAfterRemove.test.ts b/app/client/src/sagas/getNextEntityAfterRemove.test.ts index 9876f3c09b4e..77ad93bfd417 100644 --- a/app/client/src/sagas/getNextEntityAfterRemove.test.ts +++ b/app/client/src/sagas/getNextEntityAfterRemove.test.ts @@ -1,4 +1,4 @@ -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; import { PluginType } from "entities/Plugin"; import * as FocusEntityObj from "navigation/FocusEntity"; import { RedirectAction, getNextEntityAfterRemove } from "./IDESaga"; diff --git a/app/client/src/utils/hooks/useHoverToFocusWidget.ts b/app/client/src/utils/hooks/useHoverToFocusWidget.ts index 8f7f3d026b06..176192674a8c 100644 --- a/app/client/src/utils/hooks/useHoverToFocusWidget.ts +++ b/app/client/src/utils/hooks/useHoverToFocusWidget.ts @@ -6,7 +6,7 @@ import { selectCombinedPreviewMode } from "selectors/gitModSelectors"; import type { AppState } from "ee/reducers"; import type React from "react"; import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState"; -import { EditorState } from "IDE/Interfaces/EditorState"; +import { EditorState } from "IDE/enums"; export const useHoverToFocusWidget = ( widgetId: string, From 9b5014ecf54116f71aa32df1d3ecb5636fad3e63 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Thu, 6 Feb 2025 21:23:19 +0530 Subject: [PATCH 6/7] removing empty file --- app/client/src/IDE/Interfaces/EditorState.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/client/src/IDE/Interfaces/EditorState.ts diff --git a/app/client/src/IDE/Interfaces/EditorState.ts b/app/client/src/IDE/Interfaces/EditorState.ts deleted file mode 100644 index e69de29bb2d1..000000000000 From 0a88e2fd73be19bdfd4d5ef58612368159620996 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 7 Feb 2025 00:07:52 +0530 Subject: [PATCH 7/7] fixing client build --- app/client/src/pages/Editor/IDE/LeftPane/DataSidePane.test.tsx | 2 +- app/client/src/pages/Editor/IDE/LeftPane/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/pages/Editor/IDE/LeftPane/DataSidePane.test.tsx b/app/client/src/pages/Editor/IDE/LeftPane/DataSidePane.test.tsx index 6d040c9a2fc5..65a75ae14534 100644 --- a/app/client/src/pages/Editor/IDE/LeftPane/DataSidePane.test.tsx +++ b/app/client/src/pages/Editor/IDE/LeftPane/DataSidePane.test.tsx @@ -8,7 +8,7 @@ import { PostgresFactory } from "test/factories/Actions/Postgres"; import type { AppState } from "ee/reducers"; import { render } from "test/testUtils"; import { getDatasourceUsageCountForApp } from "ee/selectors/entitiesSelector"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; const productsDS = datasourceFactory().build({ name: "Products", diff --git a/app/client/src/pages/Editor/IDE/LeftPane/index.tsx b/app/client/src/pages/Editor/IDE/LeftPane/index.tsx index a8b152005e73..2c855e8e3d79 100644 --- a/app/client/src/pages/Editor/IDE/LeftPane/index.tsx +++ b/app/client/src/pages/Editor/IDE/LeftPane/index.tsx @@ -17,7 +17,7 @@ import DataSidePane from "./DataSidePane"; import EditorPane from "../EditorPane"; import LibrarySidePane from "ee/pages/Editor/IDE/LeftPane/LibrarySidePane"; import { getDatasourceUsageCountForApp } from "ee/selectors/entitiesSelector"; -import { IDE_TYPE } from "ee/entities/IDE/constants"; +import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; export const LeftPaneContainer = styled.div` height: 100%;