chore: Move entities/IDE/constants (#39064)

## Description

Remove the IDE constants from the entities folder and move it to the
common IDE folder
Create separate buttons exports for sidebar buttons
Update the button usages 

Fixes #39050 

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/13191919670>
> Commit: 5055b6ed0394b5f3fe1450bd7a042eb851fe39ab
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13191919670&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Fri, 07 Feb 2025 05:19:56 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new editor state definitions and enhanced sidebar
configurations with conditional messaging for data source availability.

- **Refactor**
- Reorganized internal module structures and consolidated type
definitions to improve maintainability, consistency, and type safety.

- **Tests**
  - Updated test references to align with the new module organization.

These changes streamline the codebase and lay the groundwork for future
improvements while maintaining the existing end-user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ankita Kinger <ankita@appsmith.com>
This commit is contained in:
Hetu Nandu 2025-02-07 16:45:55 +05:30 committed by GitHub
parent ddc3eaeac5
commit ac41ad250b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
111 changed files with 292 additions and 281 deletions

View File

@ -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",
}

View File

@ -0,0 +1,8 @@
import type { ComponentType } from "react";
export type UseRoutes = Array<{
key: string;
component: ComponentType;
path: string[];
exact: boolean;
}>;

View File

@ -0,0 +1,41 @@
import type { IDESidebarButton } from "@appsmith/ads";
import { EditorState } from "../enums";
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,
});

View File

@ -3,3 +3,10 @@ export enum Condition {
// Error = "Error",
// Success = "Success",
}
export enum EditorState {
DATA = "DATA",
EDITOR = "EDITOR",
SETTINGS = "SETTINGS",
LIBRARIES = "LIBRARIES",
}

View File

@ -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";

View File

@ -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";

View File

@ -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<EntityItem, "type"> {}

View File

@ -0,0 +1,6 @@
export const IDE_TYPE = {
None: "None",
App: "App",
} as const;
export type IDEType = keyof typeof IDE_TYPE;

View File

@ -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<Record<IDEType, string[]>> = {
[IDE_TYPE.None]: [],
[IDE_TYPE.App]: [BUILDER_PATH, BUILDER_PATH_DEPRECATED, BUILDER_CUSTOM_PATH],
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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<Record<IDEType, string[]>> = {
[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<EntityItem, "type"> {}
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<any>;
path: string[];
exact: boolean;
}>;

View File

@ -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";

View File

@ -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/enums";
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 {

View File

@ -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;

View File

@ -8,7 +8,7 @@ import {
FocusStoreHierarchy,
identifyEntityFromPath,
} from "navigation/FocusEntity";
import { EditorState } from "ee/entities/IDE/constants";
import { EditorState } from "IDE/enums";
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
import {
datasourcesEditorURL,

View File

@ -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";

View File

@ -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 }) => {

View File

@ -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";

View File

@ -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;

View File

@ -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";

View File

@ -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 = (

View File

@ -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/enums";
describe("getJSUrl", () => {
urlBuilder.setCurrentBasePageId("0123456789abcdef00000000");

View File

@ -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 <QueryEntityItem {...props} />;

View File

@ -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";

View File

@ -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;

View File

@ -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";

View File

@ -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 = (

View File

@ -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/enums";
import { PluginPackageName } from "entities/Plugin";
import urlBuilder from "ee/entities/URLRedirect/URLAssembly";

View File

@ -0,0 +1,26 @@
import {
DataButton,
EditorButton,
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("datasource"),
condition: Condition.Warn,
tooltip: createMessage(EMPTY_DATASOURCE_TOOLTIP_SIDEBUTTON),
};
const DataButtonWithoutWarning = DataButton("datasource");
export const BottomButtons = (datasourcesExist: boolean) => [
datasourcesExist ? DataButtonWithoutWarning : DataButtonWithWarning,
LibrariesButton("libraries"),
SettingsButton("settings"),
];
export const TopButtons = [EditorButton("editor")];

View File

@ -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,

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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,

View File

@ -57,12 +57,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,

View File

@ -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,

View File

@ -1,4 +1,4 @@
import type { IDEType } from "ee/entities/IDE/constants";
import type { IDEType } from "ee/IDE/Interfaces/IDETypes";
interface ContextType {
ideType: IDEType;

View File

@ -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";

View File

@ -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";

View File

@ -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();

View File

@ -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,

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -0,0 +1 @@
export * from "ce/IDE/Interfaces/EntityItem";

View File

@ -0,0 +1 @@
export * from "ce/IDE/Interfaces/IDETypes";

View File

@ -0,0 +1 @@
export * from "ce/IDE/constants/routes";

View File

@ -1 +0,0 @@
export * from "ce/entities/IDE/constants";

View File

@ -0,0 +1 @@
export * from "ce/pages/Editor/IDE/constants/SidebarButtons";

View File

@ -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/enums";
import { EditorEntityTab } from "IDE/Interfaces/EditorTypes";
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import "jest-styled-components";

View File

@ -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/enums";
interface TestCase {
path: string;

View File

@ -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/enums";
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";

View File

@ -1,5 +1,5 @@
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { EditorState } from "ee/entities/IDE/constants";
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";

View File

@ -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";

View File

@ -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";

View File

@ -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)`

View File

@ -18,7 +18,7 @@ import {
import SegmentSwitcher from "./components/SegmentSwitcher";
import { useSelector } from "react-redux";
import { getIDEViewMode } from "selectors/ideSelectors";
import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants";
import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes";
import { DEFAULT_EXPLORER_PANE_WIDTH } from "constants/AppConstants";
import { useCurrentEditorState } from "../hooks";

View File

@ -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";

View File

@ -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) =>

View File

@ -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);

View File

@ -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";

View File

@ -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 {

View File

@ -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";

View File

@ -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) =>

View File

@ -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 {

View File

@ -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("");

View File

@ -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";

View File

@ -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";

View File

@ -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";

View File

@ -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 = () => {

View File

@ -6,7 +6,7 @@ import { DismissibleTab, Text } from "@appsmith/ads";
import {
EditorEntityTab,
EditorEntityTabState,
} from "ee/entities/IDE/constants";
} from "IDE/Interfaces/EditorTypes";
import { useCurrentEditorState } from "../hooks";

View File

@ -4,7 +4,7 @@ import { useEventCallback } from "usehooks-ts";
import { EditableDismissibleTab } from "@appsmith/ads";
import { type EntityItem } from "ee/entities/IDE/constants";
import { type EntityItem } from "ee/IDE/Interfaces/EntityItem";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { getIsSavingEntityName } from "ee/selectors/entitiesSelector";

View File

@ -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";

View File

@ -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";

View File

@ -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,

View File

@ -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,

View File

@ -10,12 +10,12 @@ import {
} from "@appsmith/ads";
import { getIDEViewMode, getListViewActiveState } from "selectors/ideSelectors";
import type { EntityItem } from "ee/entities/IDE/constants";
import type { EntityItem } from "ee/IDE/Interfaces/EntityItem";
import {
EditorEntityTab,
EditorEntityTabState,
EditorViewMode,
} from "ee/entities/IDE/constants";
} from "IDE/Interfaces/EditorTypes";
import { useIsJSAddLoading } from "ee/pages/Editor/IDE/EditorPane/JS/hooks";
import { identifyEntityFromPath } from "navigation/FocusEntity";

View File

@ -57,7 +57,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/enums";
import { EditorSaveIndicator } from "pages/Editor/EditorSaveIndicator";
import { APPLICATIONS_URL } from "constants/routes";
import { useNavigationMenuData } from "../../EditorName/useNavigationMenuData";

View File

@ -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";

View File

@ -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/enums";
import { EditorEntityTab, EditorViewMode } from "IDE/Interfaces/EditorTypes";
import {
APP_SETTINGS_PANE_WIDTH,
APP_SIDEBAR_WIDTH,

View File

@ -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",

View File

@ -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%;

View File

@ -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";
BottomButtons,
TopButtons,
} from "ee/pages/Editor/IDE/constants/SidebarButtons";
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(() => {

View File

@ -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<EditorEntityTab>(

View File

@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { EditorState } from "ee/entities/IDE/constants";
import { EditorState } from "IDE/enums";
import { useLocation } from "react-router";
import { identifyEntityFromPath } from "navigation/FocusEntity";

View File

@ -48,7 +48,7 @@ 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";
import { filterSearch } from "./util";
import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";

View File

@ -51,7 +51,7 @@ 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";
import { filterSearch } from "./util";
// This function remove the given key from queryParams and return string

View File

@ -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";

View File

@ -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/enums";
import { RenderModes } from "constants/WidgetConstants";
import styled from "styled-components";
import { IDE_HEADER_HEIGHT } from "@appsmith/ads";

View File

@ -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/enums";
/**
* CodeModeTooltip

View File

@ -1,6 +1,6 @@
import type { ReactNode } from "react";
import React from "react";
import { EditorState } from "ee/entities/IDE/constants";
import { EditorState } from "IDE/enums";
import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState";
import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors";
import { useSelector } from "react-redux";

View File

@ -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/enums";
import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors";
/**

View File

@ -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/enums";
import { useCurrentAppState } from "pages/Editor/IDE/hooks/useCurrentAppState";
import {
getAppSettingsPaneContext,

View File

@ -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/enums";
import { FocusEntity } from "navigation/FocusEntity";
import { objectKeys } from "@appsmith/utils";

View File

@ -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",

View File

@ -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<string, Position> = {};

View File

@ -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";

Some files were not shown because too many files have changed in this diff Show More