From 2058505a2206887c16c0d8a27c20f1b1c9487990 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Tue, 29 Apr 2025 22:11:30 +0530 Subject: [PATCH 1/2] resolving cyclic dependencies --- .../PluginActionSettings/SettingsPopover.tsx | 2 +- .../PluginActionTypes.ts} | 0 app/client/src/actions/pluginActionActions.ts | 2 +- app/client/src/api/ActionAPI.tsx | 2 +- app/client/src/api/PageApi.tsx | 2 +- .../components/editorComponents/GPT/index.tsx | 2 +- .../entityReducers/actionsReducer.tsx | 2 +- .../entityReducers/jsActionsReducer.tsx | 2 +- .../ce/utils/moduleInstanceNavigationData.ts | 2 +- .../CodeEditor/EditorConfig.ts | 6 +++-- .../CodeEditor/MarkHelpers/entityMarker.ts | 2 +- .../CodeEditor/commandsHelper.ts | 2 +- .../editorComponents/CodeEditor/index.tsx | 2 +- .../components/editorComponents/utils.test.ts | 2 +- .../formConfig/ApiSettingsConfig.ts | 2 +- .../formConfig/GoogleSheetsSettingsConfig.ts | 2 +- .../formConfig/QuerySettingsConfig.ts | 2 +- app/client/src/entities/Action/index.ts | 2 +- .../src/entities/DataTree/dataTreeTypes.ts | 21 ++++++++++++++++++ .../components/JSFunctionSettings.test.tsx | 2 +- .../components/JSFunctionSettings.tsx | 8 ++++--- .../Editor/JSEditor/JSEditorToolbar/types.ts | 2 +- .../src/pages/Editor/JSEditor/utils.test.ts | 2 +- .../sagas/ActionExecution/PluginActionSaga.ts | 2 +- app/client/src/sagas/ActionSagas.ts | 2 +- app/client/src/sagas/JSPaneSagas.ts | 2 +- .../src/selectors/navigationSelectors.ts | 22 +------------------ .../FilterInternalProperties/JsAction.ts | 2 +- app/client/src/utils/JSPaneUtils.tsx | 2 +- .../utils/NavigationSelector/JsChildren.ts | 2 +- .../NavigationSelector/WidgetChildren.ts | 2 +- .../src/utils/NavigationSelector/common.ts | 2 +- 32 files changed, 58 insertions(+), 53 deletions(-) rename app/client/src/PluginActionEditor/{constants/PluginActionConstants.ts => types/PluginActionTypes.ts} (100%) diff --git a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx index d8d88c368a02..af8fc1658519 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionSettings/SettingsPopover.tsx @@ -13,7 +13,7 @@ import { isPluginActionSettingsOpen, openPluginActionSettings, } from "../../store"; -import { THEME } from "../../constants/PluginActionConstants"; +import { THEME } from "../../types/PluginActionTypes"; import { type DocsLink, openDoc } from "constants/DocumentationLinks"; import { ToolbarSettingsPopover } from "IDE"; diff --git a/app/client/src/PluginActionEditor/constants/PluginActionConstants.ts b/app/client/src/PluginActionEditor/types/PluginActionTypes.ts similarity index 100% rename from app/client/src/PluginActionEditor/constants/PluginActionConstants.ts rename to app/client/src/PluginActionEditor/types/PluginActionTypes.ts diff --git a/app/client/src/actions/pluginActionActions.ts b/app/client/src/actions/pluginActionActions.ts index 4f06d7171053..2db9e6dc0114 100644 --- a/app/client/src/actions/pluginActionActions.ts +++ b/app/client/src/actions/pluginActionActions.ts @@ -20,7 +20,7 @@ import type { EventLocation } from "ee/utils/analyticsUtilTypes"; import type { GenerateDestinationIdInfoReturnType } from "ee/sagas/helpers"; import type { Span } from "instrumentation/types"; import type { EvaluationReduxAction } from "./EvaluationReduxActionTypes"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export const createActionRequest = ( payload: Partial, diff --git a/app/client/src/api/ActionAPI.tsx b/app/client/src/api/ActionAPI.tsx index 3855f9d4c172..f832e2fa41d4 100644 --- a/app/client/src/api/ActionAPI.tsx +++ b/app/client/src/api/ActionAPI.tsx @@ -10,7 +10,7 @@ import type { APIRequest } from "constants/AppsmithActionConstants/ActionConstan import type { WidgetType } from "constants/WidgetConstants"; import type { ActionParentEntityTypeInterface } from "ee/entities/Engine/actionHelpers"; import type { PostActionRunConfig } from "./types"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export interface Property { key: string; diff --git a/app/client/src/api/PageApi.tsx b/app/client/src/api/PageApi.tsx index d233da57345a..90bc7ddc49e0 100644 --- a/app/client/src/api/PageApi.tsx +++ b/app/client/src/api/PageApi.tsx @@ -9,7 +9,7 @@ import type { import type { DSLWidget } from "WidgetProvider/constants"; import type { FetchApplicationResponse } from "ee/api/ApplicationApi"; import type { APP_MODE } from "entities/App"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export interface FetchPageRequest { pageId: string; diff --git a/app/client/src/ce/components/editorComponents/GPT/index.tsx b/app/client/src/ce/components/editorComponents/GPT/index.tsx index a23e560fd5a9..e52b2cb83d0c 100644 --- a/app/client/src/ce/components/editorComponents/GPT/index.tsx +++ b/app/client/src/ce/components/editorComponents/GPT/index.tsx @@ -3,7 +3,7 @@ import type { FieldEntityInformation, TEditorModes, } from "components/editorComponents/CodeEditor/EditorConfig"; -import type { EntityNavigationData } from "selectors/navigationSelectors"; +import type { EntityNavigationData } from "ee/entities/DataTree/types"; import React from "react"; import type CodeMirror from "codemirror"; diff --git a/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx b/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx index 2f7937d72384..36c773911ed0 100644 --- a/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx +++ b/app/client/src/ce/reducers/entityReducers/actionsReducer.tsx @@ -13,7 +13,7 @@ import type { UpdateActionPropertyActionPayload, } from "actions/pluginActionActions"; import { klona } from "klona"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export interface ActionData { isLoading: boolean; diff --git a/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx b/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx index 9ff70ca5430d..ad390f8f6c65 100644 --- a/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx +++ b/app/client/src/ce/reducers/entityReducers/jsActionsReducer.tsx @@ -8,7 +8,7 @@ import { import { set, keyBy, findIndex, unset } from "lodash"; import { create } from "mutative"; import { klona } from "klona"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export const initialState: JSCollectionDataState = []; diff --git a/app/client/src/ce/utils/moduleInstanceNavigationData.ts b/app/client/src/ce/utils/moduleInstanceNavigationData.ts index 9328a106baef..8248b6d67096 100644 --- a/app/client/src/ce/utils/moduleInstanceNavigationData.ts +++ b/app/client/src/ce/utils/moduleInstanceNavigationData.ts @@ -1,5 +1,5 @@ import type { ModuleInstance } from "ee/constants/ModuleInstanceConstants"; -import type { EntityNavigationData } from "selectors/navigationSelectors"; +import type { EntityNavigationData } from "entities/DataTree/dataTreeTypes"; export const getModuleInstanceNavigationData = ( /* eslint-disable @typescript-eslint/no-unused-vars */ diff --git a/app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts b/app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts index 1c31557f9a2a..5dcf99919871 100644 --- a/app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts +++ b/app/client/src/components/editorComponents/CodeEditor/EditorConfig.ts @@ -1,8 +1,10 @@ import type CodeMirror from "codemirror"; import type { EntityTypeValue } from "ee/entities/DataTree/types"; -import type { DataTree } from "entities/DataTree/dataTreeTypes"; +import type { + DataTree, + EntityNavigationData, +} from "entities/DataTree/dataTreeTypes"; import type { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType"; -import type { EntityNavigationData } from "selectors/navigationSelectors"; import type { ExpectedValueExample } from "utils/validation/common"; import { editorSQLModes } from "./sql/config"; diff --git a/app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts b/app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts index 9eb2a57673df..7ae54f9d0bf3 100644 --- a/app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts +++ b/app/client/src/components/editorComponents/CodeEditor/MarkHelpers/entityMarker.ts @@ -1,7 +1,7 @@ import type { EntityNavigationData, NavigationData, -} from "selectors/navigationSelectors"; +} from "entities/DataTree/dataTreeTypes"; import type { MarkHelper } from "../EditorConfig"; export const NAVIGATE_TO_ATTRIBUTE = "data-navigate-to"; diff --git a/app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts b/app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts index 1ccbb28876b9..3bbb391d8815 100644 --- a/app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts +++ b/app/client/src/components/editorComponents/CodeEditor/commandsHelper.ts @@ -18,7 +18,7 @@ import type { FeatureFlags } from "ee/entities/FeatureFlag"; import type { EntityNavigationData, NavigationData, -} from "selectors/navigationSelectors"; +} from "entities/DataTree/dataTreeTypes"; import { getAIContext } from "ee/components/editorComponents/GPT/trigger"; import type { Plugin } from "entities/Plugin"; diff --git a/app/client/src/components/editorComponents/CodeEditor/index.tsx b/app/client/src/components/editorComponents/CodeEditor/index.tsx index 7e5c0f734ac2..beb62b5d8d46 100644 --- a/app/client/src/components/editorComponents/CodeEditor/index.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/index.tsx @@ -122,7 +122,7 @@ import { updateCustomDef } from "utils/autocomplete/customDefUtils"; import { shouldFocusOnPropertyControl } from "utils/editorContextUtils"; import { getEntityLintErrors } from "selectors/lintingSelectors"; import { getCodeCommentKeyMap, handleCodeComment } from "./utils/codeComment"; -import type { EntityNavigationData } from "selectors/navigationSelectors"; +import type { EntityNavigationData } from "entities/DataTree/dataTreeTypes"; import { getEntitiesForNavigation } from "selectors/navigationSelectors"; import history, { NavigationMethod } from "utils/history"; import { CursorPositionOrigin } from "ee/reducers/uiReducers/editorContextReducer"; diff --git a/app/client/src/components/editorComponents/utils.test.ts b/app/client/src/components/editorComponents/utils.test.ts index 3315e1945410..ba64f41e367a 100644 --- a/app/client/src/components/editorComponents/utils.test.ts +++ b/app/client/src/components/editorComponents/utils.test.ts @@ -1,5 +1,5 @@ import { getJSResponseViewState, JSResponseState } from "./utils"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; const TEST_JS_FUNCTION_ID = "627ccff468e1fa5185b7f901"; const TEST_JS_FUNCTION_BASE_ID = "627ccff468e1fa5185b7f912"; diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts index b644f68a590f..9dd3c609183d 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/ApiSettingsConfig.ts @@ -9,7 +9,7 @@ import { import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/constants/PluginActionConstants"; +} from "PluginActionEditor/types/PluginActionTypes"; export default [ { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts index dfe84f404029..3b574cb07832 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/GoogleSheetsSettingsConfig.ts @@ -1,7 +1,7 @@ import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/constants/PluginActionConstants"; +} from "PluginActionEditor/types/PluginActionTypes"; export default [ { diff --git a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts index 8e7137d4dabc..1eb23f3497f0 100644 --- a/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts +++ b/app/client/src/constants/AppsmithActionConstants/formConfig/QuerySettingsConfig.ts @@ -1,7 +1,7 @@ import { RUN_BEHAVIOR, RUN_BEHAVIOR_VALUES, -} from "PluginActionEditor/constants/PluginActionConstants"; +} from "PluginActionEditor/types/PluginActionTypes"; export default [ { diff --git a/app/client/src/entities/Action/index.ts b/app/client/src/entities/Action/index.ts index 61a7687cdb99..e5d1fc0627d6 100644 --- a/app/client/src/entities/Action/index.ts +++ b/app/client/src/entities/Action/index.ts @@ -10,7 +10,7 @@ import { type Plugin, type PluginName, } from "../Plugin"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export enum PaginationType { NONE = "NONE", diff --git a/app/client/src/entities/DataTree/dataTreeTypes.ts b/app/client/src/entities/DataTree/dataTreeTypes.ts index 8758e18bb1d5..3e283c1066da 100644 --- a/app/client/src/entities/DataTree/dataTreeTypes.ts +++ b/app/client/src/entities/DataTree/dataTreeTypes.ts @@ -3,6 +3,7 @@ import type { DataTreeEntityObject, UnEvalTreeEntityObject, AppsmithEntity, + EntityTypeValue, } from "ee/entities/DataTree/types"; export interface unEvalAndConfigTree { @@ -23,3 +24,23 @@ export type UnEvalTreeEntity = UnEvalTreeEntityObject | AppsmithEntity; export interface UnEvalTree { [entityName: string]: UnEvalTreeEntity; } + +export interface NavigationData { + name: string; + id: string; + type: EntityTypeValue; + isfunction?: boolean; + url: string | undefined; + navigable: boolean; + children: EntityNavigationData; + key?: string; + pluginName?: string; + pluginId?: string; + isMock?: boolean; + datasourceId?: string; + actionType?: string; + widgetType?: string; + value?: boolean | string; +} + +export type EntityNavigationData = Record; diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx index 5dff0fde7728..95ba5ef87768 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.test.tsx @@ -4,7 +4,7 @@ import { render, screen } from "test/testUtils"; import { JSFunctionSettings } from "./JSFunctionSettings"; import { useFeatureFlag } from "utils/hooks/useFeatureFlag"; import { JSObjectFactory } from "test/factories/Actions/JSObject"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; // Mock the useFeatureFlag hook jest.mock("utils/hooks/useFeatureFlag"); diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx index 169ff0d3ed73..48dcf9293dac 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/components/JSFunctionSettings.tsx @@ -14,8 +14,10 @@ import { } from "ee/constants/messages"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import type { OnUpdateSettingsProps } from "../types"; -import type { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; -import { RUN_BEHAVIOR_VALUES } from "PluginActionEditor/constants/PluginActionConstants"; +import { + RUN_BEHAVIOR_VALUES, + type ActionRunBehaviourType, +} from "PluginActionEditor/types/PluginActionTypes"; import styled from "styled-components"; const OptionLabel = styled(Text)` @@ -48,7 +50,7 @@ const FunctionSettingRow = (props: FunctionSettingsRowProps) => { const options = RUN_BEHAVIOR_VALUES as Omit[]; const onSelectOptions = useCallback( - (newRunBehavior: ActionRunBehaviour) => { + (newRunBehavior: ActionRunBehaviourType) => { setRunBehavior(newRunBehavior); props.onUpdateSettings?.({ value: newRunBehavior, diff --git a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts index 6375ce761233..268e8c0101ce 100644 --- a/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts +++ b/app/client/src/pages/Editor/JSEditor/JSEditorToolbar/types.ts @@ -1,6 +1,6 @@ import type { JSAction } from "entities/JSCollection"; import type { DropdownOption } from "@appsmith/ads-old"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export interface OnUpdateSettingsProps { value: ActionRunBehaviourType; diff --git a/app/client/src/pages/Editor/JSEditor/utils.test.ts b/app/client/src/pages/Editor/JSEditor/utils.test.ts index 47912e9c2850..171f91878944 100644 --- a/app/client/src/pages/Editor/JSEditor/utils.test.ts +++ b/app/client/src/pages/Editor/JSEditor/utils.test.ts @@ -6,7 +6,7 @@ import { getJSActionOption, } from "./JSEditorToolbar/utils"; import { NO_FUNCTION_DROPDOWN_OPTION } from "./JSEditorToolbar/constants"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; const BASE_JS_OBJECT_BODY = `export default { myVar1: [], diff --git a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts index ddc8f653f863..7b9b6b5dac8d 100644 --- a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts +++ b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts @@ -169,7 +169,7 @@ import { selectGitOpsModalOpen, } from "selectors/gitModSelectors"; import { createActionExecutionResponse } from "./PluginActionSagaUtils"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; import { appsmithTelemetry } from "instrumentation"; interface FilePickerInstumentationObject { diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index 6aba29434dac..a0ada1e71846 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -147,7 +147,7 @@ import { import { handleQueryEntityRedirect } from "./IDESaga"; import type { EvaluationReduxAction } from "actions/EvaluationReduxActionTypes"; import { IDE_TYPE } from "ee/IDE/Interfaces/IDETypes"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export const DEFAULT_PREFIX = { QUERY: "Query", diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index 5741c72392d0..279fe73a3f7c 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -101,7 +101,7 @@ import { updateJSCollectionAPICall } from "ee/sagas/ApiCallerSagas"; import { convertToBasePageIdSelector } from "selectors/pageListSelectors"; import { getIsAnvilEnabledInCurrentApplication } from "layoutSystems/anvil/integrations/selectors"; import { fetchActionsForPage } from "actions/pluginActionActions"; -import type { ActionRunBehaviourType } from "PluginActionEditor/constants/PluginActionConstants"; +import type { ActionRunBehaviourType } from "PluginActionEditor/types/PluginActionTypes"; export interface GenerateDefaultJSObjectProps { name: string; diff --git a/app/client/src/selectors/navigationSelectors.ts b/app/client/src/selectors/navigationSelectors.ts index b2044437785d..69bcad50e26b 100644 --- a/app/client/src/selectors/navigationSelectors.ts +++ b/app/client/src/selectors/navigationSelectors.ts @@ -1,4 +1,3 @@ -import type { EntityTypeValue } from "ee/entities/DataTree/types"; import { ACTION_TYPE, JSACTION_TYPE, @@ -34,26 +33,7 @@ import { PluginType } from "entities/Plugin"; import type { StoredDatasource } from "entities/Action"; import type { Datasource } from "entities/Datasource"; import { getModuleInstanceNavigationData } from "ee/utils/moduleInstanceNavigationData"; - -export interface NavigationData { - name: string; - id: string; - type: EntityTypeValue; - isfunction?: boolean; - url: string | undefined; - navigable: boolean; - children: EntityNavigationData; - key?: string; - pluginName?: string; - pluginId?: string; - isMock?: boolean; - datasourceId?: string; - actionType?: string; - widgetType?: string; - value?: boolean | string; -} - -export type EntityNavigationData = Record; +import type { EntityNavigationData } from "entities/DataTree/dataTreeTypes"; export const getModulesData = createSelector( getModuleInstances, diff --git a/app/client/src/utils/FilterInternalProperties/JsAction.ts b/app/client/src/utils/FilterInternalProperties/JsAction.ts index 02c1a1b6c0ac..7638f2305feb 100644 --- a/app/client/src/utils/FilterInternalProperties/JsAction.ts +++ b/app/client/src/utils/FilterInternalProperties/JsAction.ts @@ -1,7 +1,7 @@ import type { JSActionEntity } from "ee/entities/DataTree/types"; import type { DataTree } from "entities/DataTree/dataTreeTypes"; import type { JSCollectionData } from "ee/reducers/entityReducers/jsActionsReducer"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export const getJsActionPeekData = ( jsAction: JSCollectionData, diff --git a/app/client/src/utils/JSPaneUtils.tsx b/app/client/src/utils/JSPaneUtils.tsx index dcd901aff1c1..02665ee00366 100644 --- a/app/client/src/utils/JSPaneUtils.tsx +++ b/app/client/src/utils/JSPaneUtils.tsx @@ -3,7 +3,7 @@ import type { JSCollection, JSAction, Variable } from "entities/JSCollection"; import { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils"; import LOG_TYPE from "entities/AppsmithConsole/logtype"; import AppsmithConsole from "utils/AppsmithConsole"; -import { ActionRunBehaviour } from "PluginActionEditor/constants/PluginActionConstants"; +import { ActionRunBehaviour } from "PluginActionEditor/types/PluginActionTypes"; export interface ParsedJSSubAction { name: string; diff --git a/app/client/src/utils/NavigationSelector/JsChildren.ts b/app/client/src/utils/NavigationSelector/JsChildren.ts index cae3630a2e58..1d378be0f079 100644 --- a/app/client/src/utils/NavigationSelector/JsChildren.ts +++ b/app/client/src/utils/NavigationSelector/JsChildren.ts @@ -7,7 +7,7 @@ import { jsCollectionIdURL } from "ee/RouteBuilder"; import type { EntityNavigationData, NavigationData, -} from "selectors/navigationSelectors"; +} from "entities/DataTree/dataTreeTypes"; import { createNavData } from "./common"; export const getJsChildrenNavData = ( diff --git a/app/client/src/utils/NavigationSelector/WidgetChildren.ts b/app/client/src/utils/NavigationSelector/WidgetChildren.ts index 2a337993ff11..306b77580ceb 100644 --- a/app/client/src/utils/NavigationSelector/WidgetChildren.ts +++ b/app/client/src/utils/NavigationSelector/WidgetChildren.ts @@ -2,7 +2,7 @@ import type { WidgetEntity } from "ee/entities/DataTree/types"; import type { DataTree } from "entities/DataTree/dataTreeTypes"; import { ENTITY_TYPE } from "ee/entities/DataTree/types"; import { builderURL } from "ee/RouteBuilder"; -import type { EntityNavigationData } from "selectors/navigationSelectors"; +import type { EntityNavigationData } from "entities/DataTree/dataTreeTypes"; import { createNavData } from "./common"; export const getWidgetChildrenNavData = ( diff --git a/app/client/src/utils/NavigationSelector/common.ts b/app/client/src/utils/NavigationSelector/common.ts index ead2f508548f..eac3a7cfb46a 100644 --- a/app/client/src/utils/NavigationSelector/common.ts +++ b/app/client/src/utils/NavigationSelector/common.ts @@ -2,7 +2,7 @@ import type { EntityTypeValue } from "ee/entities/DataTree/types"; import type { EntityNavigationData, NavigationData, -} from "selectors/navigationSelectors"; +} from "entities/DataTree/dataTreeTypes"; export const createNavData = (general: { name: string; From 72c296cf462909ee85e7411dde5ca91705d81731 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Tue, 29 Apr 2025 22:20:32 +0530 Subject: [PATCH 2/2] fixing client build --- app/client/src/ce/components/editorComponents/GPT/index.tsx | 2 +- .../editorComponents/CodeEditor/generateQuickCommands.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/ce/components/editorComponents/GPT/index.tsx b/app/client/src/ce/components/editorComponents/GPT/index.tsx index e52b2cb83d0c..a545494abc3c 100644 --- a/app/client/src/ce/components/editorComponents/GPT/index.tsx +++ b/app/client/src/ce/components/editorComponents/GPT/index.tsx @@ -3,7 +3,7 @@ import type { FieldEntityInformation, TEditorModes, } from "components/editorComponents/CodeEditor/EditorConfig"; -import type { EntityNavigationData } from "ee/entities/DataTree/types"; +import type { EntityNavigationData } from "entities/DataTree/dataTreeTypes"; import React from "react"; import type CodeMirror from "codemirror"; diff --git a/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx b/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx index 6168325f06b6..7f8d45e6216f 100644 --- a/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx @@ -14,7 +14,7 @@ import { APPSMITH_AI } from "ee/components/editorComponents/GPT/trigger"; import { DatasourceCreateEntryPoints } from "constants/Datasource"; import AnalyticsUtil from "ee/utils/AnalyticsUtil"; import BetaCard from "../BetaCard"; -import type { NavigationData } from "selectors/navigationSelectors"; +import type { NavigationData } from "entities/DataTree/dataTreeTypes"; import type { AIEditorContext } from "ee/components/editorComponents/GPT"; import type { EntityTypeValue } from "ee/entities/DataTree/types"; import history, { NavigationMethod } from "utils/history";