From 01c90f1df18d50422efb0157396e4ed2b8a14487 Mon Sep 17 00:00:00 2001 From: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com> Date: Tue, 12 Sep 2023 17:21:39 +0530 Subject: [PATCH] changes in evaluation for EE - split (#27144) ## Description Evaluation split changes for EE. 1. RequiresLinting function has moved to common place - on EE extra checks will be added 2. DataTreeFactory - getActionsForCurrentPage changed to getCurrentActions -- which will be modified on EE to acomodate package actions 3. same as above for getJSCollectionsForCurrentPage --> changed to getCurrentJSCollections #### PR fixes following issue(s) Fixes # (issue number) > if no issue exists, please create an issue and ask the maintainers about this first > > > #### Type of change - Chore (housekeeping or task changes that don't impact user perception) > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed --- .../src/{ => ce}/actions/evaluationActions.ts | 11 +++++++++ app/client/src/ce/sagas/ApplicationSagas.tsx | 5 +++- app/client/src/ce/sagas/analyticsSaga.ts | 5 +++- .../{ => ce}/selectors/entitiesSelector.ts | 24 +++++++++---------- .../ActionCreator/Field/FieldConfig.ts | 2 +- .../ActionCreator/helpers.tsx | 10 ++++---- .../viewComponents/Action/ActionSelector.tsx | 2 +- .../viewComponents/ActionBlockTree/utils.tsx | 4 ++-- .../editorComponents/ActionNameEditor.tsx | 2 +- .../ActionRightPane/index.tsx | 2 +- .../editorComponents/ApiResponseView.tsx | 2 +- .../PeekOverlayPopup/PeekOverlayPopup.tsx | 2 +- .../CodeEditor/hintHelpers.ts | 2 +- .../editorComponents/CodeEditor/index.tsx | 2 +- .../editorComponents/Debugger/EntityLink.tsx | 2 +- .../ErrorLogs/components/LogEntityLink.tsx | 2 +- .../Debugger/hooks/debuggerHooks.ts | 2 +- .../Debugger/hooks/useGetEntityInfo.tsx | 2 +- .../GlobalSearch/GlobalSearchHooks.tsx | 2 +- .../editorComponents/GlobalSearch/index.tsx | 2 +- .../GlobalSearch/useRecentEntities.tsx | 2 +- .../editorComponents/GlobalSearch/utils.tsx | 2 +- .../components/editorComponents/Sidebar.tsx | 2 +- .../DatasourceDropdown/useDatasource.tsx | 6 ++--- .../useTableOrSpreadsheet.tsx | 2 +- .../ConnectData/useConnectData.ts | 2 +- .../SheetsDropdown/useSheets.tsx | 2 +- .../TableHeaderIndex/useTableHeader.ts | 2 +- .../DatasourceSpecificControls/index.tsx | 2 +- .../ColumnDropdown/useColumns.tsx | 2 +- .../fields/EmbeddedDatasourcePathField.tsx | 2 +- .../formControls/DynamicTextFieldControl.tsx | 2 +- .../ActionSelectorControl.tsx | 2 +- .../src/ee/actions/evaluationActions.ts | 1 + .../src/ee/selectors/entitiesSelector.ts | 1 + .../common/flexCanvas/FlexBoxComponent.tsx | 2 +- .../AppViewer/AppViewerPageContainer.tsx | 2 +- .../Editor/APIEditor/CommonEditorForm.tsx | 2 +- .../APIEditor/GraphQL/GraphQLEditorForm.tsx | 5 +--- .../Editor/APIEditor/RapidApiEditorForm.tsx | 2 +- .../pages/Editor/APIEditor/RestAPIForm.tsx | 2 +- .../src/pages/Editor/APIEditor/index.tsx | 2 +- .../AppSettingsPane/AppSettings/index.tsx | 2 +- .../DataSourceEditor/DatasourceSection.tsx | 2 +- .../DatasourceViewModeSchema.tsx | 2 +- .../Editor/DataSourceEditor/FormTitle.tsx | 6 +++-- .../DataSourceEditor/NewActionButton.tsx | 2 +- .../pages/Editor/DataSourceEditor/index.tsx | 2 +- .../ActionPane/ActionPaneNavigation.ts | 2 +- .../ActionPane/QueryPaneNavigation.ts | 2 +- .../EntityNavigation/ActionPane/index.ts | 2 +- .../Editor/Explorer/Actions/ActionEntity.tsx | 2 +- .../Actions/ActionEntityContextMenu.tsx | 2 +- .../src/pages/Editor/Explorer/Datasources.tsx | 2 +- .../Datasources/DataSourceContextMenu.tsx | 2 +- .../Explorer/Datasources/DatasourceEntity.tsx | 2 +- .../Datasources/DatasourceStructure.tsx | 2 +- .../DatasourceStructureContainer.tsx | 2 +- .../Explorer/Datasources/QueryTemplates.tsx | 2 +- .../src/pages/Editor/Explorer/Files/index.tsx | 2 +- .../JSActions/JSActionContextMenu.tsx | 2 +- .../Explorer/JSActions/JSActionEntity.tsx | 2 +- .../Explorer/JSActions/MoreJSActionsMenu.tsx | 2 +- .../Editor/Explorer/Libraries/Installer.tsx | 2 +- .../pages/Editor/Explorer/Libraries/index.tsx | 2 +- .../src/pages/Editor/Explorer/Pages/index.tsx | 2 +- .../Editor/Explorer/Widgets/WidgetGroup.tsx | 2 +- .../Explorer/Widgets/useNavigateToWidget.ts | 2 +- app/client/src/pages/Editor/Explorer/hooks.ts | 5 +++- .../src/pages/Editor/Explorer/index.tsx | 2 +- .../FirstTimeUserOnboarding/Checklist.tsx | 2 +- .../FirstTimeUserOnboarding/Statusbar.tsx | 2 +- .../TooltipContent.tsx | 2 +- app/client/src/pages/Editor/FormControl.tsx | 2 +- .../components/DataSourceOption.tsx | 2 +- .../GeneratePageForm/GeneratePageForm.tsx | 4 ++-- .../GeneratePageForm/GoogleSheetForm.tsx | 2 +- .../IntegrationEditor/DatasourceCard.tsx | 8 +++---- .../IntegrationEditor/DatasourceHome.tsx | 7 ++++-- .../IntegrationsHomeScreen.tsx | 5 +++- .../IntegrationEditor/MockDataSources.tsx | 2 +- .../pages/Editor/IntegrationEditor/NewApi.tsx | 2 +- app/client/src/pages/Editor/JSEditor/Form.tsx | 2 +- .../Editor/JSEditor/JSObjectNameEditor.tsx | 5 +++- .../Editor/MultiSelectPropertyPane/index.tsx | 2 +- .../Editor/QueryEditor/EditorJSONtoForm.tsx | 2 +- .../src/pages/Editor/QueryEditor/Form.tsx | 2 +- .../pages/Editor/QueryEditor/TemplateMenu.tsx | 2 +- .../src/pages/Editor/QueryEditor/index.tsx | 4 ++-- .../Editor/SaaSEditor/DatasourceCard.tsx | 6 ++--- .../Editor/SaaSEditor/DatasourceForm.tsx | 2 +- .../Editor/SaaSEditor/GoogleSheetSchema.tsx | 2 +- .../src/pages/Editor/SaaSEditor/ListView.tsx | 2 +- .../SaaSEditor/__tests__/ActionForm.test.js | 2 +- app/client/src/pages/Editor/WidgetSidebar.tsx | 2 +- .../pages/Editor/WidgetSidebarWithTags.tsx | 2 +- .../Editor/WidgetsEditor/CanvasContainer.tsx | 2 +- .../pages/Editor/WidgetsMultiSelectBox.tsx | 2 +- .../gitSync/ReconnectDatasourceModal.tsx | 2 +- .../src/pages/Templates/DatasourceChip.tsx | 2 +- .../common/datasourceAuth/AuthMessage.tsx | 2 +- .../sagas/ActionExecution/PluginActionSaga.ts | 8 +++---- .../sagas/ActionExecution/StoreActionSaga.ts | 2 +- app/client/src/sagas/ActionSagas.ts | 2 +- app/client/src/sagas/ApiPaneSagas.ts | 2 +- app/client/src/sagas/AppThemingSaga.tsx | 2 +- app/client/src/sagas/ContextSwitchingSaga.ts | 2 +- app/client/src/sagas/DatasourcesSagas.ts | 2 +- app/client/src/sagas/DebuggerSagas.ts | 2 +- app/client/src/sagas/EvaluationsSaga.ts | 11 ++++----- app/client/src/sagas/FormEvaluationSaga.ts | 4 ++-- app/client/src/sagas/GitSyncSagas.ts | 5 +++- app/client/src/sagas/JSActionSagas.ts | 2 +- app/client/src/sagas/JSLibrarySaga.ts | 2 +- app/client/src/sagas/JSPaneSagas.ts | 5 +++- app/client/src/sagas/LintingSagas.ts | 2 +- app/client/src/sagas/OneClickBindingSaga.ts | 2 +- app/client/src/sagas/PageSagas.tsx | 2 +- app/client/src/sagas/PluginSagas.ts | 2 +- app/client/src/sagas/QueryPaneSagas.ts | 4 ++-- app/client/src/sagas/ReplaySaga.ts | 4 ++-- app/client/src/sagas/SaaSPaneSagas.ts | 2 +- app/client/src/sagas/SnipingModeSagas.ts | 2 +- app/client/src/sagas/ToastSagas.ts | 2 +- app/client/src/sagas/WidgetLoadingSaga.ts | 2 +- app/client/src/sagas/WidgetSelectionSagas.ts | 5 +++- .../src/sagas/autoHeightSagas/helpers.ts | 2 +- .../src/sagas/autoHeightSagas/widgets.ts | 2 +- app/client/src/sagas/layoutConversionSagas.ts | 2 +- app/client/src/sagas/selectors.tsx | 2 +- app/client/src/selectors/actionSelectors.tsx | 2 +- app/client/src/selectors/dataTreeSelectors.ts | 10 ++++---- app/client/src/selectors/editorSelectors.tsx | 2 +- .../src/selectors/navigationSelectors.ts | 6 ++--- .../src/selectors/onboardingSelectors.tsx | 6 ++--- .../src/selectors/propertyPaneSelectors.tsx | 2 +- .../src/selectors/templatesSelectors.tsx | 2 +- app/client/src/usagePulse/utils.ts | 2 +- app/client/src/utils/editorContextUtils.ts | 2 +- .../src/utils/hooks/useDynamicAppLayout.tsx | 2 +- .../component/ConnectDataOverlay.tsx | 2 +- .../src/workers/Evaluation/JSObject/utils.ts | 4 ++-- app/client/test/testCommon.ts | 2 +- app/client/test/testMockedWidgets.tsx | 2 +- 144 files changed, 227 insertions(+), 193 deletions(-) rename app/client/src/{ => ce}/actions/evaluationActions.ts (95%) rename app/client/src/{ => ce}/selectors/entitiesSelector.ts (98%) create mode 100644 app/client/src/ee/actions/evaluationActions.ts create mode 100644 app/client/src/ee/selectors/entitiesSelector.ts diff --git a/app/client/src/actions/evaluationActions.ts b/app/client/src/ce/actions/evaluationActions.ts similarity index 95% rename from app/client/src/actions/evaluationActions.ts rename to app/client/src/ce/actions/evaluationActions.ts index eedd569060..3a308c9fdb 100644 --- a/app/client/src/actions/evaluationActions.ts +++ b/app/client/src/ce/actions/evaluationActions.ts @@ -8,6 +8,9 @@ import type { DependencyMap } from "utils/DynamicBindingUtils"; import type { QueryActionConfig } from "entities/Action"; import type { DatasourceConfiguration } from "entities/Datasource"; import type { DiffWithReferenceState } from "workers/Evaluation/helpers"; +import store from "store"; +import { getAppMode } from "@appsmith/selectors/applicationSelectors"; +import { APP_MODE } from "entities/App"; export const FIRST_EVAL_REDUX_ACTIONS = [ // Pages @@ -224,3 +227,11 @@ export const EVAL_AND_LINT_REDUX_ACTIONS = union( EVALUATE_REDUX_ACTIONS, Object.keys(LINT_REDUX_ACTIONS), ); + +export function getRequiresLinting(action: ReduxAction) { + const appMode: ReturnType = getAppMode(store.getState()); + + const requiresLinting = + appMode === APP_MODE.EDIT && shouldTriggerLinting(action); + return requiresLinting; +} diff --git a/app/client/src/ce/sagas/ApplicationSagas.tsx b/app/client/src/ce/sagas/ApplicationSagas.tsx index fbe440fc4f..6735f4b8e6 100644 --- a/app/client/src/ce/sagas/ApplicationSagas.tsx +++ b/app/client/src/ce/sagas/ApplicationSagas.tsx @@ -104,7 +104,10 @@ import { getDefaultPageId as selectDefaultPageId } from "sagas/selectors"; import PageApi from "api/PageApi"; import { identity, isEmpty, merge, pickBy } from "lodash"; import { checkAndGetPluginFormConfigsSaga } from "sagas/PluginSagas"; -import { getPageList, getPluginForm } from "selectors/entitiesSelector"; +import { + getPageList, + getPluginForm, +} from "@appsmith/selectors/entitiesSelector"; import { getConfigInitialValues } from "components/formControls/utils"; import DatasourcesApi from "api/DatasourcesApi"; import { resetApplicationWidgets } from "actions/pageActions"; diff --git a/app/client/src/ce/sagas/analyticsSaga.ts b/app/client/src/ce/sagas/analyticsSaga.ts index 2b7fcb94fb..e6460ee5dc 100644 --- a/app/client/src/ce/sagas/analyticsSaga.ts +++ b/app/client/src/ce/sagas/analyticsSaga.ts @@ -13,7 +13,10 @@ import { TriggerKind } from "constants/AppsmithActionConstants/ActionConstants"; import { isArray } from "lodash"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { getEntityNameAndPropertyPath } from "@appsmith/workers/Evaluation/evaluationUtils"; -import { getAppMode, getJSActionFromName } from "selectors/entitiesSelector"; +import { + getAppMode, + getJSActionFromName, +} from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import { getWidget } from "sagas/selectors"; diff --git a/app/client/src/selectors/entitiesSelector.ts b/app/client/src/ce/selectors/entitiesSelector.ts similarity index 98% rename from app/client/src/selectors/entitiesSelector.ts rename to app/client/src/ce/selectors/entitiesSelector.ts index 4054553b4a..836e5783e1 100644 --- a/app/client/src/selectors/entitiesSelector.ts +++ b/app/client/src/ce/selectors/entitiesSelector.ts @@ -398,7 +398,7 @@ export const getQueryName = (state: AppState, actionId: string): string => { return action?.config.name ?? ""; }; -const getCurrentPageId = (state: AppState) => +export const getCurrentPageId = (state: AppState) => state.entities.pageList.currentPageId; export const getDatasourcePlugins = createSelector(getPlugins, (plugins) => { @@ -480,7 +480,7 @@ export const getPluginIdPackageNamesMap = createSelector( }, ); -export const getActionsForCurrentPage = createSelector( +export const getCurrentActions = createSelector( getCurrentPageId, getActions, (pageId, actions) => { @@ -493,7 +493,7 @@ export const getCanvasWidgets = (state: AppState): CanvasWidgetsReduxState => state.entities.canvasWidgets; export const actionsExistInCurrentPage = createSelector( - getActionsForCurrentPage, + getCurrentActions, (actions) => { return !!actions.length; }, @@ -506,8 +506,8 @@ export const widgetsExistCurrentPage = createSelector( }, ); -// Note: getJSCollectionsForCurrentPage (returns a new object everytime) -export const getJSCollectionsForCurrentPage = createSelector( +// Note: getCurrentJSCollections (returns a new object everytime) +export const getCurrentJSCollections = createSelector( getCurrentPageId, getJSCollections, (pageId, actions) => { @@ -518,7 +518,7 @@ export const getJSCollectionsForCurrentPage = createSelector( export const getJSCollectionFromName = createSelector( [ - getJSCollectionsForCurrentPage, + getCurrentJSCollections, (_state: AppState, JSObjectName: string) => JSObjectName, ], (jsCollections, JSObjectName) => { @@ -870,8 +870,8 @@ export const getDatasourceLoading = (state: AppState) => { }; export const selectFilesForExplorer = createSelector( - getActionsForCurrentPage, - getJSCollectionsForCurrentPage, + getCurrentActions, + getCurrentJSCollections, selectDatasourceIdToNameMap, (actions, jsActions, datasourceIdToNameMap) => { const files = [...actions, ...jsActions].reduce((acc, file) => { @@ -1029,8 +1029,8 @@ export const getJSCollectionParseErrors = ( export const getNumberOfEntitiesInCurrentPage = createSelector( getCanvasWidgets, - getActionsForCurrentPage, - getJSCollectionsForCurrentPage, + getCurrentActions, + getCurrentJSCollections, (widgets, actions, jsCollections) => { return ( Object.keys(widgets).length - 1 + actions.length + jsCollections.length @@ -1106,12 +1106,12 @@ export const getAllJSActionsData = (state: AppState) => { }; export const selectActionByName = (actionName: string) => - createSelector(getActionsForCurrentPage, (actions) => { + createSelector(getCurrentActions, (actions) => { return actions.find((action) => action.config.name === actionName); }); export const selectJSCollectionByName = (collectionName: string) => - createSelector(getJSCollectionsForCurrentPage, (collections) => { + createSelector(getCurrentJSCollections, (collections) => { return collections.find( (collection) => collection.config.name === collectionName, ); diff --git a/app/client/src/components/editorComponents/ActionCreator/Field/FieldConfig.ts b/app/client/src/components/editorComponents/ActionCreator/Field/FieldConfig.ts index 6c3898a355..2312f1351c 100644 --- a/app/client/src/components/editorComponents/ActionCreator/Field/FieldConfig.ts +++ b/app/client/src/components/editorComponents/ActionCreator/Field/FieldConfig.ts @@ -32,7 +32,7 @@ import { genericSetter, } from "../utils"; import store from "store"; -import { getPageList } from "selectors/entitiesSelector"; +import { getPageList } from "@appsmith/selectors/entitiesSelector"; import type { TreeDropdownOption } from "design-system-old"; import { FIELD_GROUP_CONFIG } from "../FieldGroup/FieldGroupConfig"; import { getFunctionName, checkIfArgumentExistAtPosition } from "@shared/ast"; diff --git a/app/client/src/components/editorComponents/ActionCreator/helpers.tsx b/app/client/src/components/editorComponents/ActionCreator/helpers.tsx index d811f91307..f0390b93f3 100644 --- a/app/client/src/components/editorComponents/ActionCreator/helpers.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/helpers.tsx @@ -24,10 +24,10 @@ import type { ActionDataState } from "reducers/entityReducers/actionsReducer"; import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; import { getCurrentPageId } from "selectors/editorSelectors"; import { - getActionsForCurrentPage, + getCurrentActions, getJSCollectionFromName, - getJSCollectionsForCurrentPage, -} from "selectors/entitiesSelector"; + getCurrentJSCollections, +} from "@appsmith/selectors/entitiesSelector"; import { getModalDropdownList, getNextModalName, @@ -543,8 +543,8 @@ export function useApisQueriesAndJsActionOptions(handleClose: () => void) { return state.entities.plugins.list; }); const pluginGroups: any = useMemo(() => keyBy(plugins, "id"), [plugins]); - const actions = useSelector(getActionsForCurrentPage); - const jsActions = useSelector(getJSCollectionsForCurrentPage); + const actions = useSelector(getCurrentActions); + const jsActions = useSelector(getCurrentJSCollections); // this function gets all the Queries/API's/JS Objects and attaches it to actionList return getApiQueriesAndJSActionOptionsWithChildren( diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx index aacc686a1c..bf512a44f0 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionSelector.tsx @@ -5,7 +5,7 @@ import { Text, Button } from "design-system"; import React, { useCallback, useRef } from "react"; import { useSelector } from "react-redux"; import { getWidgetOptionsTree } from "sagas/selectors"; -import { getPageListAsOptions } from "selectors/entitiesSelector"; +import { getPageListAsOptions } from "@appsmith/selectors/entitiesSelector"; import type { AdditionalDynamicDataTree } from "utils/autocomplete/customTreeTypeDefCreator"; import { ActionCreatorContext } from "../.."; import { AppsmithFunction } from "../../constants"; diff --git a/app/client/src/components/editorComponents/ActionCreator/viewComponents/ActionBlockTree/utils.tsx b/app/client/src/components/editorComponents/ActionCreator/viewComponents/ActionBlockTree/utils.tsx index 7ed37cba9c..53ed5e0782 100644 --- a/app/client/src/components/editorComponents/ActionCreator/viewComponents/ActionBlockTree/utils.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/viewComponents/ActionBlockTree/utils.tsx @@ -7,7 +7,7 @@ import { getFunctionName, getFunctionArguments } from "@shared/ast"; import { FIELD_CONFIG } from "../../Field/FieldConfig"; import { getCodeFromMoustache, getEvaluationVersion } from "../../utils"; import { ApiMethodIcon } from "pages/Editor/Explorer/ExplorerIcons"; -import { getActionsForCurrentPage } from "selectors/entitiesSelector"; +import { getCurrentActions } from "@appsmith/selectors/entitiesSelector"; import { useSelector } from "react-redux"; import type { HTTP_METHOD } from "constants/ApiEditorConstants/CommonApiConstants"; @@ -15,7 +15,7 @@ function GetIconForAction( actionType: ActionTree["actionType"], code: string, ): React.FunctionComponent { - const actions = useSelector(getActionsForCurrentPage); + const actions = useSelector(getCurrentActions); switch (actionType) { case AppsmithFunction.none: diff --git a/app/client/src/components/editorComponents/ActionNameEditor.tsx b/app/client/src/components/editorComponents/ActionNameEditor.tsx index b59a2d5740..66951c26fe 100644 --- a/app/client/src/components/editorComponents/ActionNameEditor.tsx +++ b/app/client/src/components/editorComponents/ActionNameEditor.tsx @@ -13,7 +13,7 @@ import type { Action } from "entities/Action"; import { saveActionName } from "actions/pluginActionActions"; import { Spinner } from "design-system"; import { Classes } from "@blueprintjs/core"; -import { getAction, getPlugin } from "selectors/entitiesSelector"; +import { getAction, getPlugin } from "@appsmith/selectors/entitiesSelector"; import type { Plugin } from "api/PluginApi"; import NameEditorComponent from "components/utils/NameEditorComponent"; import { diff --git a/app/client/src/components/editorComponents/ActionRightPane/index.tsx b/app/client/src/components/editorComponents/ActionRightPane/index.tsx index 5a38f38743..c8f8cf908a 100644 --- a/app/client/src/components/editorComponents/ActionRightPane/index.tsx +++ b/app/client/src/components/editorComponents/ActionRightPane/index.tsx @@ -42,7 +42,7 @@ import { getDatasourceStructureById, getPluginDatasourceComponentFromId, getPluginNameFromId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { DatasourceComponentTypes } from "api/PluginApi"; import { fetchDatasourceStructure } from "actions/datasourceActions"; import WalkthroughContext from "components/featureWalkthrough/walkthroughContext"; diff --git a/app/client/src/components/editorComponents/ApiResponseView.tsx b/app/client/src/components/editorComponents/ApiResponseView.tsx index 447ebf2309..1051409d77 100644 --- a/app/client/src/components/editorComponents/ApiResponseView.tsx +++ b/app/client/src/components/editorComponents/ApiResponseView.tsx @@ -13,7 +13,7 @@ import type { SourceEntity } from "entities/AppsmithConsole"; import LOG_TYPE from "entities/AppsmithConsole/logtype"; import { ENTITY_TYPE } from "entities/AppsmithConsole"; import ReadOnlyEditor from "components/editorComponents/ReadOnlyEditor"; -import { getActionResponses } from "selectors/entitiesSelector"; +import { getActionResponses } from "@appsmith/selectors/entitiesSelector"; import { isArray, isEmpty, isString } from "lodash"; import { CHECK_REQUEST_BODY, diff --git a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx index bfe66d389d..9dd7fa1c32 100644 --- a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx @@ -11,7 +11,7 @@ import { Divider } from "design-system"; import { useSelector } from "react-redux"; import { getConfigTree, getDataTree } from "selectors/dataTreeSelectors"; import { filterInternalProperties } from "utils/FilterInternalProperties"; -import { getJSCollections } from "selectors/entitiesSelector"; +import { getJSCollections } from "@appsmith/selectors/entitiesSelector"; export type PeekOverlayStateProps = { objectName: string; diff --git a/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts b/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts index b7e57d2f5e..e757b7b4dc 100644 --- a/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts +++ b/app/client/src/components/editorComponents/CodeEditor/hintHelpers.ts @@ -10,7 +10,7 @@ import { } from "components/editorComponents/CodeEditor/codeEditorUtils"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import { isEmpty, isString } from "lodash"; -import type { getAllDatasourceTableKeys } from "selectors/entitiesSelector"; +import type { getAllDatasourceTableKeys } from "@appsmith/selectors/entitiesSelector"; import { filterCompletions, getHintDetailsFromClassName, diff --git a/app/client/src/components/editorComponents/CodeEditor/index.tsx b/app/client/src/components/editorComponents/CodeEditor/index.tsx index 6a2eb86e91..324bcfc591 100644 --- a/app/client/src/components/editorComponents/CodeEditor/index.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/index.tsx @@ -152,7 +152,7 @@ import { import { getAllDatasourceTableKeys, selectInstalledLibraries, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { debug } from "loglevel"; import { PeekOverlayExpressionIdentifier, SourceType } from "@shared/ast"; import type { MultiplexingModeConfig } from "components/editorComponents/CodeEditor/modes"; diff --git a/app/client/src/components/editorComponents/Debugger/EntityLink.tsx b/app/client/src/components/editorComponents/Debugger/EntityLink.tsx index d4305e8d73..4acf04e493 100644 --- a/app/client/src/components/editorComponents/Debugger/EntityLink.tsx +++ b/app/client/src/components/editorComponents/Debugger/EntityLink.tsx @@ -5,7 +5,7 @@ import React, { useCallback } from "react"; import { useDispatch, useSelector } from "react-redux"; import type { AppState } from "@appsmith/reducers"; import { getCurrentPageId } from "selectors/editorSelectors"; -import { getAction, getDatasource } from "selectors/entitiesSelector"; +import { getAction, getDatasource } from "@appsmith/selectors/entitiesSelector"; import AnalyticsUtil from "utils/AnalyticsUtil"; import history from "utils/history"; import { getQueryParams } from "utils/URLUtils"; diff --git a/app/client/src/components/editorComponents/Debugger/ErrorLogs/components/LogEntityLink.tsx b/app/client/src/components/editorComponents/Debugger/ErrorLogs/components/LogEntityLink.tsx index 100f41e746..04db47115f 100644 --- a/app/client/src/components/editorComponents/Debugger/ErrorLogs/components/LogEntityLink.tsx +++ b/app/client/src/components/editorComponents/Debugger/ErrorLogs/components/LogEntityLink.tsx @@ -12,7 +12,7 @@ import { } from "pages/Editor/Explorer/ExplorerIcons"; import { ENTITY_TYPE } from "entities/AppsmithConsole"; import { PluginType } from "entities/Action"; -import { getPlugins } from "selectors/entitiesSelector"; +import { getPlugins } from "@appsmith/selectors/entitiesSelector"; import EntityLink, { DebuggerLinkUI } from "../../EntityLink"; import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; diff --git a/app/client/src/components/editorComponents/Debugger/hooks/debuggerHooks.ts b/app/client/src/components/editorComponents/Debugger/hooks/debuggerHooks.ts index 60c856dfbf..3533599a53 100644 --- a/app/client/src/components/editorComponents/Debugger/hooks/debuggerHooks.ts +++ b/app/client/src/components/editorComponents/Debugger/hooks/debuggerHooks.ts @@ -9,7 +9,7 @@ import { getCurrentApplicationId, getCurrentPageId, } from "selectors/editorSelectors"; -import { getAction, getPlugins } from "selectors/entitiesSelector"; +import { getAction, getPlugins } from "@appsmith/selectors/entitiesSelector"; import { onApiEditor, onCanvas, onQueryEditor } from "../helpers"; import { getLastSelectedWidget } from "selectors/ui"; import { getConfigTree, getDataTree } from "selectors/dataTreeSelectors"; diff --git a/app/client/src/components/editorComponents/Debugger/hooks/useGetEntityInfo.tsx b/app/client/src/components/editorComponents/Debugger/hooks/useGetEntityInfo.tsx index e615e77ea6..efec5cdfa6 100644 --- a/app/client/src/components/editorComponents/Debugger/hooks/useGetEntityInfo.tsx +++ b/app/client/src/components/editorComponents/Debugger/hooks/useGetEntityInfo.tsx @@ -6,7 +6,7 @@ import { getPluginIcon, jsIcon } from "pages/Editor/Explorer/ExplorerIcons"; import { useMemo, useCallback } from "react"; import type { AppState } from "@appsmith/reducers"; import { getFilteredErrors } from "selectors/debuggerSelectors"; -import { getAction, getDatasource } from "selectors/entitiesSelector"; +import { getAction, getDatasource } from "@appsmith/selectors/entitiesSelector"; import { useSelector } from "react-redux"; import { isAction, diff --git a/app/client/src/components/editorComponents/GlobalSearch/GlobalSearchHooks.tsx b/app/client/src/components/editorComponents/GlobalSearch/GlobalSearchHooks.tsx index 5bd3c68988..6427610669 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/GlobalSearchHooks.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/GlobalSearchHooks.tsx @@ -11,7 +11,7 @@ import { getJSCollections, getPlugins, getRecentDatasourceIds, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { useSelector } from "react-redux"; import type { EventLocation } from "@appsmith/utils/analyticsUtilTypes"; import history from "utils/history"; diff --git a/app/client/src/components/editorComponents/GlobalSearch/index.tsx b/app/client/src/components/editorComponents/GlobalSearch/index.tsx index b800901908..45455f0523 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/index.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/index.tsx @@ -60,7 +60,7 @@ import { datasourcesEditorIdURL, jsCollectionIdURL, } from "RouteBuilder"; -import { getPlugins } from "selectors/entitiesSelector"; +import { getPlugins } from "@appsmith/selectors/entitiesSelector"; import { DatasourceCreateEntryPoints, TEMP_DATASOURCE_ID, diff --git a/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx b/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx index a84bbbfd87..a8b176b098 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/useRecentEntities.tsx @@ -5,7 +5,7 @@ import { getActions, getAllWidgetsMap, getJSCollections, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { SEARCH_ITEM_TYPES } from "./utils"; import { get } from "lodash"; import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer"; diff --git a/app/client/src/components/editorComponents/GlobalSearch/utils.tsx b/app/client/src/components/editorComponents/GlobalSearch/utils.tsx index 7090016aa3..71a2417bd9 100644 --- a/app/client/src/components/editorComponents/GlobalSearch/utils.tsx +++ b/app/client/src/components/editorComponents/GlobalSearch/utils.tsx @@ -9,7 +9,7 @@ import type { Datasource } from "entities/Datasource"; import { PluginPackageName, PluginType } from "entities/Action"; import type { WidgetType } from "constants/WidgetConstants"; import type { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; -import { getPluginByPackageName } from "selectors/entitiesSelector"; +import { getPluginByPackageName } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import WidgetFactory from "WidgetProvider/factory"; import { diff --git a/app/client/src/components/editorComponents/Sidebar.tsx b/app/client/src/components/editorComponents/Sidebar.tsx index 0ab5be39df..2e2c04e920 100644 --- a/app/client/src/components/editorComponents/Sidebar.tsx +++ b/app/client/src/components/editorComponents/Sidebar.tsx @@ -31,7 +31,7 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { SIDEBAR_ID } from "constants/Explorer"; import { getIsAppSettingsPaneWithNavigationTabOpen } from "selectors/appSettingsPaneSelectors"; import { EntityClassNames } from "pages/Editor/Explorer/Entity"; -import { getEditingEntityName } from "selectors/entitiesSelector"; +import { getEditingEntityName } from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import moment from "moment"; import AnalyticsUtil from "../../utils/AnalyticsUtil"; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useDatasource.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useDatasource.tsx index 587225493b..edb2067462 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useDatasource.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/DatasourceDropdown/useDatasource.tsx @@ -14,14 +14,14 @@ import { useDispatch, useSelector } from "react-redux"; import { useParams } from "react-router"; import { integrationEditorURL } from "RouteBuilder"; import { - getActionsForCurrentPage, + getCurrentActions, getDatasourceLoading, getDatasources, getMockDatasources, getPluginIdPackageNamesMap, getPluginImages, getPlugins, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import history from "utils/history"; import WidgetQueryGeneratorRegistry from "utils/WidgetQueryGeneratorRegistry"; import { WidgetQueryGeneratorFormContext } from "../.."; @@ -382,7 +382,7 @@ export function useDatasource(searchText: string) { return options; }, [currentPageId, history, propertyName, sampleData, addBinding]); - const queries = useSelector(getActionsForCurrentPage); + const queries = useSelector(getCurrentActions); const queryOptions = useMemo(() => { return sortQueries(queries, expectedType).map((query) => ({ diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/useTableOrSpreadsheet.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/useTableOrSpreadsheet.tsx index 71a0581146..8668051f59 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/useTableOrSpreadsheet.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/CommonControls/TableOrSpreadsheetDropdown/useTableOrSpreadsheet.tsx @@ -8,7 +8,7 @@ import { getDatasourceStructureById, getIsFetchingDatasourceStructure, getPluginPackageFromDatasourceId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { WidgetQueryGeneratorFormContext } from "../.."; import { Bold, Label } from "../../styles"; import { PluginFormInputFieldMap } from "../../constants"; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/ConnectData/useConnectData.ts b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/ConnectData/useConnectData.ts index 694cf9c895..b2f3900734 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/ConnectData/useConnectData.ts +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/ConnectData/useConnectData.ts @@ -4,7 +4,7 @@ import { PluginPackageName } from "entities/Action"; import { useContext, useMemo } from "react"; import { useDispatch, useSelector } from "react-redux"; import { getWidget } from "sagas/selectors"; -import { getPluginPackageFromDatasourceId } from "selectors/entitiesSelector"; +import { getPluginPackageFromDatasourceId } from "@appsmith/selectors/entitiesSelector"; import { getisOneClickBindingConnectingForWidget } from "selectors/oneClickBindingSelectors"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { WidgetQueryGeneratorFormContext } from ".."; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/SheetsDropdown/useSheets.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/SheetsDropdown/useSheets.tsx index 1119715ce1..5683f860a2 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/SheetsDropdown/useSheets.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/SheetsDropdown/useSheets.tsx @@ -10,7 +10,7 @@ import { getGsheetsSheets, getisFetchingGsheetsSheets, } from "selectors/datasourceSelectors"; -import { getDatasource } from "selectors/entitiesSelector"; +import { getDatasource } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { getWidget } from "sagas/selectors"; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/TableHeaderIndex/useTableHeader.ts b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/TableHeaderIndex/useTableHeader.ts index 5d42de64ff..284bcad72e 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/TableHeaderIndex/useTableHeader.ts +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/GoogleSheetControls/TableHeaderIndex/useTableHeader.ts @@ -4,7 +4,7 @@ import { WidgetQueryGeneratorFormContext } from "components/editorComponents/Wid import { isNumber } from "lodash"; import { useCallback, useContext } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { getDatasource } from "selectors/entitiesSelector"; +import { getDatasource } from "@appsmith/selectors/entitiesSelector"; import { isValidGsheetConfig } from "components/editorComponents/WidgetQueryGeneratorForm/utils"; export function useTableHeaderIndex() { diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/index.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/index.tsx index b5b9a668aa..d4ffc9b2c6 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/index.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/DatasourceSpecificControls/index.tsx @@ -2,7 +2,7 @@ import type { AppState } from "@appsmith/reducers"; import { PluginPackageName } from "entities/Action"; import React, { useContext } from "react"; import { useSelector } from "react-redux"; -import { getPluginPackageFromDatasourceId } from "selectors/entitiesSelector"; +import { getPluginPackageFromDatasourceId } from "@appsmith/selectors/entitiesSelector"; import { WidgetQueryGeneratorFormContext } from ".."; import { Section } from "../styles"; import { GoogleSheetControls } from "./GoogleSheetControls"; diff --git a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/ColumnDropdown/useColumns.tsx b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/ColumnDropdown/useColumns.tsx index ed4b17c6a8..fc53876f62 100644 --- a/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/ColumnDropdown/useColumns.tsx +++ b/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/WidgetSpecificControls/ColumnDropdown/useColumns.tsx @@ -13,7 +13,7 @@ import { getDatasourceTableColumns, getDatasourceTablePrimaryColumn, getPluginPackageFromDatasourceId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { WidgetQueryGeneratorFormContext } from "../.."; import { DropdownOption as Option } from "../../CommonControls/DatasourceDropdown/DropdownOption"; import { getisOneClickBindingConnectingForWidget } from "selectors/oneClickBindingSelectors"; diff --git a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx index f0a946dd2a..4c7e6ebdb2 100644 --- a/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx +++ b/app/client/src/components/editorComponents/form/fields/EmbeddedDatasourcePathField.tsx @@ -42,7 +42,7 @@ import equal from "fast-deep-equal/es6"; import { getDatasource, getDatasourcesByPluginId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { extractApiUrlPath } from "transformers/RestActionTransformer"; import { getCurrentAppWorkspace } from "@appsmith/selectors/workspaceSelectors"; import { diff --git a/app/client/src/components/formControls/DynamicTextFieldControl.tsx b/app/client/src/components/formControls/DynamicTextFieldControl.tsx index a78425d444..3619fc3cbc 100644 --- a/app/client/src/components/formControls/DynamicTextFieldControl.tsx +++ b/app/client/src/components/formControls/DynamicTextFieldControl.tsx @@ -16,7 +16,7 @@ import styled from "styled-components"; import { getPluginResponseTypes, getPluginNameFromId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { actionPathFromName } from "components/formControls/utils"; import type { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory"; import { getSqlEditorModeFromPluginName } from "components/editorComponents/CodeEditor/sql/config"; diff --git a/app/client/src/components/propertyControls/ActionSelectorControl.tsx b/app/client/src/components/propertyControls/ActionSelectorControl.tsx index 8fa14a121b..c7b2fe890b 100644 --- a/app/client/src/components/propertyControls/ActionSelectorControl.tsx +++ b/app/client/src/components/propertyControls/ActionSelectorControl.tsx @@ -18,7 +18,7 @@ import { getActions, getJSCollections, getPlugins, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import store from "store"; import keyBy from "lodash/keyBy"; import { getCurrentPageId } from "selectors/editorSelectors"; diff --git a/app/client/src/ee/actions/evaluationActions.ts b/app/client/src/ee/actions/evaluationActions.ts new file mode 100644 index 0000000000..3677c90570 --- /dev/null +++ b/app/client/src/ee/actions/evaluationActions.ts @@ -0,0 +1 @@ +export * from "ce/actions/evaluationActions"; diff --git a/app/client/src/ee/selectors/entitiesSelector.ts b/app/client/src/ee/selectors/entitiesSelector.ts new file mode 100644 index 0000000000..488f35717e --- /dev/null +++ b/app/client/src/ee/selectors/entitiesSelector.ts @@ -0,0 +1 @@ +export * from "ce/selectors/entitiesSelector"; diff --git a/app/client/src/layoutSystems/autolayout/common/flexCanvas/FlexBoxComponent.tsx b/app/client/src/layoutSystems/autolayout/common/flexCanvas/FlexBoxComponent.tsx index ba3ce6183a..62e1159d41 100644 --- a/app/client/src/layoutSystems/autolayout/common/flexCanvas/FlexBoxComponent.tsx +++ b/app/client/src/layoutSystems/autolayout/common/flexCanvas/FlexBoxComponent.tsx @@ -10,7 +10,7 @@ import { } from "layoutSystems/autolayout/utils/constants"; import { APP_MODE } from "entities/App"; import { useSelector } from "react-redux"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import AutoLayoutLayer from "./AutoLayoutLayer"; import { FLEXBOX_PADDING, GridDefaults } from "constants/WidgetConstants"; import type { diff --git a/app/client/src/pages/AppViewer/AppViewerPageContainer.tsx b/app/client/src/pages/AppViewer/AppViewerPageContainer.tsx index 1815b35daa..b07549780a 100644 --- a/app/client/src/pages/AppViewer/AppViewerPageContainer.tsx +++ b/app/client/src/pages/AppViewer/AppViewerPageContainer.tsx @@ -17,7 +17,7 @@ import { PERMISSION_TYPE, } from "@appsmith/utils/permissionHelpers"; import { builderURL } from "RouteBuilder"; -import { getCanvasWidgetsStructure } from "selectors/entitiesSelector"; +import { getCanvasWidgetsStructure } from "@appsmith/selectors/entitiesSelector"; import equal from "fast-deep-equal/es6"; const Section = styled.section` diff --git a/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx b/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx index bda46aabe5..50260f72ba 100644 --- a/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx +++ b/app/client/src/pages/Editor/APIEditor/CommonEditorForm.tsx @@ -47,7 +47,7 @@ import equal from "fast-deep-equal/es6"; import ApiAuthentication from "./ApiAuthentication"; import { replayHighlightClass } from "globalStyles/portals"; -import { getPlugin } from "selectors/entitiesSelector"; +import { getPlugin } from "@appsmith/selectors/entitiesSelector"; import { hasDeleteActionPermission, hasExecuteActionPermission, diff --git a/app/client/src/pages/Editor/APIEditor/GraphQL/GraphQLEditorForm.tsx b/app/client/src/pages/Editor/APIEditor/GraphQL/GraphQLEditorForm.tsx index 59f2de3e0f..beaf6bd818 100644 --- a/app/client/src/pages/Editor/APIEditor/GraphQL/GraphQLEditorForm.tsx +++ b/app/client/src/pages/Editor/APIEditor/GraphQL/GraphQLEditorForm.tsx @@ -13,10 +13,7 @@ import { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig import useHorizontalResize from "utils/hooks/useHorizontalResize"; import get from "lodash/get"; import type { Datasource } from "entities/Datasource"; -import { - getAction, - getActionData, -} from "../../../../selectors/entitiesSelector"; +import { getAction, getActionData } from "@appsmith/selectors/entitiesSelector"; import { isEmpty } from "lodash"; import type { CommonFormProps } from "../CommonEditorForm"; import CommonEditorForm from "../CommonEditorForm"; diff --git a/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx b/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx index 6a3f8fc62c..9f7649b4b1 100644 --- a/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx +++ b/app/client/src/pages/Editor/APIEditor/RapidApiEditorForm.tsx @@ -18,7 +18,7 @@ import type { PaginationType, Action } from "entities/Action"; import ActionNameEditor from "components/editorComponents/ActionNameEditor"; import { NameWrapper } from "./CommonEditorForm"; import { BaseButton } from "components/designSystems/appsmith/BaseButton"; -import { getActionData } from "../../../selectors/entitiesSelector"; +import { getActionData } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import { Icon } from "design-system"; import { showDebuggerFlag } from "selectors/debuggerSelectors"; diff --git a/app/client/src/pages/Editor/APIEditor/RestAPIForm.tsx b/app/client/src/pages/Editor/APIEditor/RestAPIForm.tsx index 92deb7b850..6a127d3201 100644 --- a/app/client/src/pages/Editor/APIEditor/RestAPIForm.tsx +++ b/app/client/src/pages/Editor/APIEditor/RestAPIForm.tsx @@ -18,7 +18,7 @@ import { getAction, getActionData, getActionResponses, -} from "../../../selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { isEmpty } from "lodash"; import type { CommonFormProps } from "./CommonEditorForm"; import CommonEditorForm from "./CommonEditorForm"; diff --git a/app/client/src/pages/Editor/APIEditor/index.tsx b/app/client/src/pages/Editor/APIEditor/index.tsx index b644dbaf0f..ceddf6f196 100644 --- a/app/client/src/pages/Editor/APIEditor/index.tsx +++ b/app/client/src/pages/Editor/APIEditor/index.tsx @@ -39,7 +39,7 @@ import { getPageList, getPlugins, getPluginSettingConfigs, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import history from "utils/history"; import { saasEditorApiIdURL } from "RouteBuilder"; import GraphQLEditorForm from "./GraphQL/GraphQLEditorForm"; diff --git a/app/client/src/pages/Editor/AppSettingsPane/AppSettings/index.tsx b/app/client/src/pages/Editor/AppSettingsPane/AppSettings/index.tsx index 8ca93943e0..f3c87ca5db 100644 --- a/app/client/src/pages/Editor/AppSettingsPane/AppSettings/index.tsx +++ b/app/client/src/pages/Editor/AppSettingsPane/AppSettings/index.tsx @@ -2,7 +2,7 @@ import type { Page } from "@appsmith/constants/ReduxActionConstants"; import { ThemePropertyPane } from "pages/Editor/ThemePropertyPane"; import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { selectAllPages } from "selectors/entitiesSelector"; +import { selectAllPages } from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import GeneralSettings from "./GeneralSettings"; import type { SectionHeaderProps } from "./SectionHeader"; diff --git a/app/client/src/pages/Editor/DataSourceEditor/DatasourceSection.tsx b/app/client/src/pages/Editor/DataSourceEditor/DatasourceSection.tsx index 8f9d478d5a..5e7fb8d07f 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/DatasourceSection.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/DatasourceSection.tsx @@ -8,8 +8,8 @@ import { ComparisonOperationsEnum } from "components/formControls/BaseControl"; import type { AppState } from "@appsmith/reducers"; import { connect } from "react-redux"; import { datasourceEnvEnabled } from "@appsmith/selectors/featureFlagsSelectors"; +import { getPlugin } from "@appsmith/selectors/entitiesSelector"; import { DB_NOT_SUPPORTED } from "@appsmith/utils/Environments"; -import { getPlugin } from "selectors/entitiesSelector"; import type { PluginType } from "entities/Action"; import { getDefaultEnvId } from "@appsmith/api/ApiUtils"; import { EnvConfigSection } from "@appsmith/components/EnvConfigSection"; diff --git a/app/client/src/pages/Editor/DataSourceEditor/DatasourceViewModeSchema.tsx b/app/client/src/pages/Editor/DataSourceEditor/DatasourceViewModeSchema.tsx index 11f4eee4ab..cb0dfd72a7 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/DatasourceViewModeSchema.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/DatasourceViewModeSchema.tsx @@ -9,7 +9,7 @@ import { getDatasourceStructureById, getIsFetchingDatasourceStructure, getNumberOfEntitiesInCurrentPage, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import DatasourceStructureHeader from "../Explorer/Datasources/DatasourceStructureHeader"; import { MessageWrapper, TableWrapper } from "../SaaSEditor/GoogleSheetSchema"; import { Spinner, Text, Button } from "design-system"; diff --git a/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx b/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx index ff7a797a54..4e138df759 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/FormTitle.tsx @@ -4,9 +4,11 @@ import { useParams } from "react-router-dom"; import EditableText, { EditInteractionKind, } from "components/editorComponents/EditableText"; - import type { AppState } from "@appsmith/reducers"; -import { getDatasource, getDatasources } from "selectors/entitiesSelector"; +import { + getDatasource, + getDatasources, +} from "@appsmith/selectors/entitiesSelector"; import { useSelector, useDispatch } from "react-redux"; import type { Datasource } from "entities/Datasource"; import { isNameValid } from "utils/helpers"; diff --git a/app/client/src/pages/Editor/DataSourceEditor/NewActionButton.tsx b/app/client/src/pages/Editor/DataSourceEditor/NewActionButton.tsx index d13ab3bc34..3566970c0e 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/NewActionButton.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/NewActionButton.tsx @@ -19,7 +19,7 @@ import { getIsFirstTimeUserOnboardingEnabled } from "selectors/onboardingSelecto import { getFeatureWalkthroughShown } from "utils/storage"; import { FEATURE_WALKTHROUGH_KEYS } from "constants/WalkthroughConstants"; import { adaptiveSignpostingEnabled } from "@appsmith/selectors/featureFlagsSelectors"; -import { actionsExistInCurrentPage } from "selectors/entitiesSelector"; +import { actionsExistInCurrentPage } from "@appsmith/selectors/entitiesSelector"; import { SignpostingWalkthroughConfig } from "../FirstTimeUserOnboarding/Utils"; type NewActionButtonProps = { diff --git a/app/client/src/pages/Editor/DataSourceEditor/index.tsx b/app/client/src/pages/Editor/DataSourceEditor/index.tsx index 2e0f9efb04..13552b04c1 100644 --- a/app/client/src/pages/Editor/DataSourceEditor/index.tsx +++ b/app/client/src/pages/Editor/DataSourceEditor/index.tsx @@ -14,7 +14,7 @@ import { getDatasource, getPlugin, getDatasourceFormButtonConfig, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { switchDatasource, setDatasourceViewMode, diff --git a/app/client/src/pages/Editor/EntityNavigation/ActionPane/ActionPaneNavigation.ts b/app/client/src/pages/Editor/EntityNavigation/ActionPane/ActionPaneNavigation.ts index 1fe543eac5..e8d3b64e54 100644 --- a/app/client/src/pages/Editor/EntityNavigation/ActionPane/ActionPaneNavigation.ts +++ b/app/client/src/pages/Editor/EntityNavigation/ActionPane/ActionPaneNavigation.ts @@ -4,7 +4,7 @@ import { getAction, getPlugin, getSettingConfig, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { call, delay, put, select } from "redux-saga/effects"; import PaneNavigation from "../PaneNavigation"; import type { Plugin } from "api/PluginApi"; diff --git a/app/client/src/pages/Editor/EntityNavigation/ActionPane/QueryPaneNavigation.ts b/app/client/src/pages/Editor/EntityNavigation/ActionPane/QueryPaneNavigation.ts index 5b66f8ac87..760a3f3ffb 100644 --- a/app/client/src/pages/Editor/EntityNavigation/ActionPane/QueryPaneNavigation.ts +++ b/app/client/src/pages/Editor/EntityNavigation/ActionPane/QueryPaneNavigation.ts @@ -8,7 +8,7 @@ import { getFormEvaluationState } from "selectors/formSelectors"; import type { FormEvaluationState } from "reducers/evaluationReducers/formEvaluationReducer"; import { isEmpty } from "lodash"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; -import { isActionSaving } from "selectors/entitiesSelector"; +import { isActionSaving } from "@appsmith/selectors/entitiesSelector"; export default class QueryPaneNavigation extends ActionPaneNavigation { constructor(entityInfo: EntityInfo) { diff --git a/app/client/src/pages/Editor/EntityNavigation/ActionPane/index.ts b/app/client/src/pages/Editor/EntityNavigation/ActionPane/index.ts index 19b5dc7a2b..8c1a6bb9aa 100644 --- a/app/client/src/pages/Editor/EntityNavigation/ActionPane/index.ts +++ b/app/client/src/pages/Editor/EntityNavigation/ActionPane/index.ts @@ -1,6 +1,6 @@ import { PluginType, type Action } from "entities/Action"; import type { EntityInfo } from "../types"; -import { getAction } from "selectors/entitiesSelector"; +import { getAction } from "@appsmith/selectors/entitiesSelector"; import { select } from "redux-saga/effects"; import { ActionPaneNavigation, diff --git a/app/client/src/pages/Editor/Explorer/Actions/ActionEntity.tsx b/app/client/src/pages/Editor/Explorer/Actions/ActionEntity.tsx index 929839e3e1..1bea7199e9 100644 --- a/app/client/src/pages/Editor/Explorer/Actions/ActionEntity.tsx +++ b/app/client/src/pages/Editor/Explorer/Actions/ActionEntity.tsx @@ -12,7 +12,7 @@ import { getAction, getDatasource, getPlugins, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Action, StoredDatasource } from "entities/Action"; import { PluginType } from "entities/Action"; import { keyBy } from "lodash"; diff --git a/app/client/src/pages/Editor/Explorer/Actions/ActionEntityContextMenu.tsx b/app/client/src/pages/Editor/Explorer/Actions/ActionEntityContextMenu.tsx index 147677dbc3..aaee9dc3a3 100644 --- a/app/client/src/pages/Editor/Explorer/Actions/ActionEntityContextMenu.tsx +++ b/app/client/src/pages/Editor/Explorer/Actions/ActionEntityContextMenu.tsx @@ -7,7 +7,7 @@ import { initExplorerEntityNameEdit } from "actions/explorerActions"; import { noop } from "lodash"; import React, { useCallback, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { getPageListAsOptions } from "selectors/entitiesSelector"; +import { getPageListAsOptions } from "@appsmith/selectors/entitiesSelector"; import history from "utils/history"; import { useNewActionName } from "./helpers"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; diff --git a/app/client/src/pages/Editor/Explorer/Datasources.tsx b/app/client/src/pages/Editor/Explorer/Datasources.tsx index bdf8cd80b7..bd795cec3d 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources.tsx @@ -10,7 +10,7 @@ import { getCurrentApplicationId, getCurrentPageId, } from "selectors/editorSelectors"; -import { getPlugins } from "selectors/entitiesSelector"; +import { getPlugins } from "@appsmith/selectors/entitiesSelector"; import { keyBy } from "lodash"; import Entity from "./Entity"; import history from "utils/history"; diff --git a/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx b/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx index 03d1107852..304105bac8 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources/DataSourceContextMenu.tsx @@ -18,7 +18,7 @@ import { hasManageDatasourcePermission, } from "@appsmith/utils/permissionHelpers"; -import { getDatasource } from "selectors/entitiesSelector"; +import { getDatasource } from "@appsmith/selectors/entitiesSelector"; import type { TreeDropdownOption } from "pages/Editor/Explorer/ContextMenu"; import ContextMenu from "pages/Editor/Explorer/ContextMenu"; import { DatasourceStructureContext } from "./DatasourceStructureContainer"; diff --git a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceEntity.tsx b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceEntity.tsx index a4fea19875..38e0ac13cc 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceEntity.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceEntity.tsx @@ -22,7 +22,7 @@ import { getAction, getDatasourceStructureById, getIsFetchingDatasourceStructure, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { datasourcesEditorIdURL, saasEditorDatasourceIdURL, diff --git a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructure.tsx b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructure.tsx index a5fa901054..916caff25a 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructure.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructure.tsx @@ -9,7 +9,7 @@ import { SIDEBAR_ID } from "constants/Explorer"; import { hasCreateDatasourceActionPermission } from "@appsmith/utils/permissionHelpers"; import { useSelector } from "react-redux"; import type { AppState } from "@appsmith/reducers"; -import { getDatasource, getPlugin } from "selectors/entitiesSelector"; +import { getDatasource, getPlugin } from "@appsmith/selectors/entitiesSelector"; import { getPagePermissions } from "selectors/editorSelectors"; import { Menu, MenuTrigger, Button, Tooltip, MenuContent } from "design-system"; import { SHOW_TEMPLATES, createMessage } from "@appsmith/constants/messages"; diff --git a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx index 692f1912f2..573169e40d 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources/DatasourceStructureContainer.tsx @@ -14,7 +14,7 @@ import EntityPlaceholder from "../Entity/Placeholder"; import DatasourceStructure from "./DatasourceStructure"; import { SearchInput, Text } from "design-system"; import styled from "styled-components"; -import { getIsFetchingDatasourceStructure } from "selectors/entitiesSelector"; +import { getIsFetchingDatasourceStructure } from "@appsmith/selectors/entitiesSelector"; import { useSelector } from "react-redux"; import type { AppState } from "@appsmith/reducers"; import DatasourceStructureLoadingContainer from "./DatasourceStructureLoadingContainer"; diff --git a/app/client/src/pages/Editor/Explorer/Datasources/QueryTemplates.tsx b/app/client/src/pages/Editor/Explorer/Datasources/QueryTemplates.tsx index 8857dbd087..fe6a9878c6 100644 --- a/app/client/src/pages/Editor/Explorer/Datasources/QueryTemplates.tsx +++ b/app/client/src/pages/Editor/Explorer/Datasources/QueryTemplates.tsx @@ -15,7 +15,7 @@ import { getAction, getDatasource, getPlugin, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { integrationEditorURL } from "RouteBuilder"; import { MenuItem } from "design-system"; import type { Plugin } from "api/PluginApi"; diff --git a/app/client/src/pages/Editor/Explorer/Files/index.tsx b/app/client/src/pages/Editor/Explorer/Files/index.tsx index 7199240b8a..09b225c986 100644 --- a/app/client/src/pages/Editor/Explorer/Files/index.tsx +++ b/app/client/src/pages/Editor/Explorer/Files/index.tsx @@ -15,7 +15,7 @@ import { } from "selectors/editorSelectors"; import { ExplorerActionEntity } from "../Actions/ActionEntity"; import ExplorerJSCollectionEntity from "../JSActions/JSActionEntity"; -import { selectFilesForExplorer } from "selectors/entitiesSelector"; +import { selectFilesForExplorer } from "@appsmith/selectors/entitiesSelector"; import { getExplorerStatus, saveExplorerStatus, diff --git a/app/client/src/pages/Editor/Explorer/JSActions/JSActionContextMenu.tsx b/app/client/src/pages/Editor/Explorer/JSActions/JSActionContextMenu.tsx index ee02de375f..e84ecc27f9 100644 --- a/app/client/src/pages/Editor/Explorer/JSActions/JSActionContextMenu.tsx +++ b/app/client/src/pages/Editor/Explorer/JSActions/JSActionContextMenu.tsx @@ -20,7 +20,7 @@ import { CONTEXT_SHOW_BINDING, createMessage, } from "@appsmith/constants/messages"; -import { getPageListAsOptions } from "selectors/entitiesSelector"; +import { getPageListAsOptions } from "@appsmith/selectors/entitiesSelector"; import ContextMenu from "pages/Editor/Explorer/ContextMenu"; import type { TreeDropdownOption } from "pages/Editor/Explorer/ContextMenu"; diff --git a/app/client/src/pages/Editor/Explorer/JSActions/JSActionEntity.tsx b/app/client/src/pages/Editor/Explorer/JSActions/JSActionEntity.tsx index 6bc7b3285d..4e56ecbef4 100644 --- a/app/client/src/pages/Editor/Explorer/JSActions/JSActionEntity.tsx +++ b/app/client/src/pages/Editor/Explorer/JSActions/JSActionEntity.tsx @@ -5,7 +5,7 @@ import JSCollectionEntityContextMenu from "./JSActionContextMenu"; import { saveJSObjectName } from "actions/jsActionActions"; import { useSelector } from "react-redux"; import { getCurrentPageId } from "selectors/editorSelectors"; -import { getJSCollection } from "selectors/entitiesSelector"; +import { getJSCollection } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import type { JSCollection } from "entities/JSCollection"; import { JsFileIconV2 } from "../ExplorerIcons"; diff --git a/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx b/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx index c4190bb104..328179681d 100644 --- a/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx +++ b/app/client/src/pages/Editor/Explorer/JSActions/MoreJSActionsMenu.tsx @@ -14,7 +14,7 @@ import { CONTEXT_MOVE, createMessage, } from "@appsmith/constants/messages"; -import { getPageListAsOptions } from "selectors/entitiesSelector"; +import { getPageListAsOptions } from "@appsmith/selectors/entitiesSelector"; import { autoIndentCode, getAutoIndentShortcutKeyText, diff --git a/app/client/src/pages/Editor/Explorer/Libraries/Installer.tsx b/app/client/src/pages/Editor/Explorer/Libraries/Installer.tsx index 7f47bd6291..c46cc8fbba 100644 --- a/app/client/src/pages/Editor/Explorer/Libraries/Installer.tsx +++ b/app/client/src/pages/Editor/Explorer/Libraries/Installer.tsx @@ -30,7 +30,7 @@ import { selectIsLibraryInstalled, selectQueuedLibraries, selectStatusForURL, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { InstallState } from "reducers/uiReducers/libraryReducer"; import recommendedLibraries from "pages/Editor/Explorer/Libraries/recommendedLibraries"; import type { AppState } from "@appsmith/reducers"; diff --git a/app/client/src/pages/Editor/Explorer/Libraries/index.tsx b/app/client/src/pages/Editor/Explorer/Libraries/index.tsx index 62da25c440..91db2b087e 100644 --- a/app/client/src/pages/Editor/Explorer/Libraries/index.tsx +++ b/app/client/src/pages/Editor/Explorer/Libraries/index.tsx @@ -23,7 +23,7 @@ import { selectInstallationStatus, selectIsInstallerOpen, selectLibrariesForExplorer, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { InstallState } from "reducers/uiReducers/libraryReducer"; import { Collapse } from "@blueprintjs/core"; import useClipboard from "utils/hooks/useClipboard"; diff --git a/app/client/src/pages/Editor/Explorer/Pages/index.tsx b/app/client/src/pages/Editor/Explorer/Pages/index.tsx index 36c8ec22e7..1a6d377fe6 100644 --- a/app/client/src/pages/Editor/Explorer/Pages/index.tsx +++ b/app/client/src/pages/Editor/Explorer/Pages/index.tsx @@ -23,7 +23,7 @@ import PageContextMenu from "./PageContextMenu"; import { resolveAsSpaceChar } from "utils/helpers"; import { getExplorerPinned } from "selectors/explorerSelector"; import { setExplorerPinnedAction } from "actions/explorerActions"; -import { selectAllPages } from "selectors/entitiesSelector"; +import { selectAllPages } from "@appsmith/selectors/entitiesSelector"; import { builderURL } from "RouteBuilder"; import { getExplorerStatus, diff --git a/app/client/src/pages/Editor/Explorer/Widgets/WidgetGroup.tsx b/app/client/src/pages/Editor/Explorer/Widgets/WidgetGroup.tsx index 67f224fcb8..277daa19f3 100644 --- a/app/client/src/pages/Editor/Explorer/Widgets/WidgetGroup.tsx +++ b/app/client/src/pages/Editor/Explorer/Widgets/WidgetGroup.tsx @@ -14,7 +14,7 @@ import { EMPTY_WIDGET_BUTTON_TEXT, EMPTY_WIDGET_MAIN_TEXT, } from "@appsmith/constants/messages"; -import { selectWidgetsForCurrentPage } from "selectors/entitiesSelector"; +import { selectWidgetsForCurrentPage } from "@appsmith/selectors/entitiesSelector"; import { inGuidedTour } from "selectors/onboardingSelectors"; import { getExplorerStatus, diff --git a/app/client/src/pages/Editor/Explorer/Widgets/useNavigateToWidget.ts b/app/client/src/pages/Editor/Explorer/Widgets/useNavigateToWidget.ts index 89ea280a9c..96c742899c 100644 --- a/app/client/src/pages/Editor/Explorer/Widgets/useNavigateToWidget.ts +++ b/app/client/src/pages/Editor/Explorer/Widgets/useNavigateToWidget.ts @@ -4,7 +4,7 @@ import { useParams } from "react-router"; import type { ExplorerURLParams } from "@appsmith/pages/Editor/Explorer/helpers"; import { useDispatch } from "react-redux"; import { useWidgetSelection } from "utils/hooks/useWidgetSelection"; -import { getCurrentPageWidgets } from "selectors/entitiesSelector"; +import { getCurrentPageWidgets } from "@appsmith/selectors/entitiesSelector"; import store from "store"; import type { NavigationMethod } from "utils/history"; import { SelectionRequestType } from "sagas/WidgetSelectUtils"; diff --git a/app/client/src/pages/Editor/Explorer/hooks.ts b/app/client/src/pages/Editor/Explorer/hooks.ts index f6bda214c4..635130eaae 100644 --- a/app/client/src/pages/Editor/Explorer/hooks.ts +++ b/app/client/src/pages/Editor/Explorer/hooks.ts @@ -8,7 +8,10 @@ import type { WidgetProps } from "widgets/BaseWidget"; import log from "loglevel"; import produce from "immer"; import type { CanvasStructure } from "reducers/uiReducers/pageCanvasStructureReducer"; -import { getActions, getDatasources } from "selectors/entitiesSelector"; +import { + getActions, + getDatasources, +} from "@appsmith/selectors/entitiesSelector"; import type { ActionData } from "reducers/entityReducers/actionsReducer"; import { matchPath, useLocation } from "react-router"; import { diff --git a/app/client/src/pages/Editor/Explorer/index.tsx b/app/client/src/pages/Editor/Explorer/index.tsx index 45ff80cb13..62530fa1cd 100644 --- a/app/client/src/pages/Editor/Explorer/index.tsx +++ b/app/client/src/pages/Editor/Explorer/index.tsx @@ -27,7 +27,7 @@ import { FEATURE_WALKTHROUGH_KEYS } from "constants/WalkthroughConstants"; import { actionsExistInCurrentPage, widgetsExistCurrentPage, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { SignpostingWalkthroughConfig } from "../FirstTimeUserOnboarding/Utils"; const selectForceOpenWidgetPanel = (state: AppState) => diff --git a/app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx b/app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx index ff5d790f1e..c01dbda8fc 100644 --- a/app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx +++ b/app/client/src/pages/Editor/FirstTimeUserOnboarding/Checklist.tsx @@ -6,7 +6,7 @@ import { getCanvasWidgets, getPageActions, getSavedDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { INTEGRATION_TABS } from "constants/routes"; import { getApplicationLastDeployedAt, diff --git a/app/client/src/pages/Editor/FirstTimeUserOnboarding/Statusbar.tsx b/app/client/src/pages/Editor/FirstTimeUserOnboarding/Statusbar.tsx index 28e62973c6..7a8465459a 100644 --- a/app/client/src/pages/Editor/FirstTimeUserOnboarding/Statusbar.tsx +++ b/app/client/src/pages/Editor/FirstTimeUserOnboarding/Statusbar.tsx @@ -8,7 +8,7 @@ import { getCanvasWidgets, getPageActions, getSavedDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { SIGNPOSTING_STEP } from "./Utils"; import { getFirstTimeUserOnboardingComplete, diff --git a/app/client/src/pages/Editor/FirstTimeUserOnboarding/TooltipContent.tsx b/app/client/src/pages/Editor/FirstTimeUserOnboarding/TooltipContent.tsx index 7dce21e700..9c6c53de21 100644 --- a/app/client/src/pages/Editor/FirstTimeUserOnboarding/TooltipContent.tsx +++ b/app/client/src/pages/Editor/FirstTimeUserOnboarding/TooltipContent.tsx @@ -15,7 +15,7 @@ import { getPageActions, getCanvasWidgets, getSavedDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { showSignpostingTooltip } from "actions/onboardingActions"; import { SIGNPOSTING_STEP } from "./Utils"; import { isWidgetActionConnectionPresent } from "selectors/onboardingSelectors"; diff --git a/app/client/src/pages/Editor/FormControl.tsx b/app/client/src/pages/Editor/FormControl.tsx index 1aa5d09546..cc60f583ea 100644 --- a/app/client/src/pages/Editor/FormControl.tsx +++ b/app/client/src/pages/Editor/FormControl.tsx @@ -24,7 +24,7 @@ import { getDatasourceStructureById, getPluginNameFromId, getPluginTemplates, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { get } from "lodash"; import { SQL_PLUGINS_DEFAULT_TEMPLATE_TYPE } from "constants/Datasource"; import TemplateMenu from "./QueryEditor/TemplateMenu"; diff --git a/app/client/src/pages/Editor/GeneratePage/components/DataSourceOption.tsx b/app/client/src/pages/Editor/GeneratePage/components/DataSourceOption.tsx index 9ec6995df2..8f37a84ca6 100644 --- a/app/client/src/pages/Editor/GeneratePage/components/DataSourceOption.tsx +++ b/app/client/src/pages/Editor/GeneratePage/components/DataSourceOption.tsx @@ -1,7 +1,7 @@ import React from "react"; import styled from "styled-components"; import { useSelector } from "react-redux"; -import { getPluginImages } from "selectors/entitiesSelector"; +import { getPluginImages } from "@appsmith/selectors/entitiesSelector"; import type { DropdownOption, RenderDropdownOptionType, diff --git a/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GeneratePageForm.tsx b/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GeneratePageForm.tsx index 3638a4018c..65a6d42acd 100644 --- a/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GeneratePageForm.tsx +++ b/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GeneratePageForm.tsx @@ -8,7 +8,7 @@ import { getIsFetchingSinglePluginForm, getDatasourcesStructure, getNumberOfEntitiesInCurrentPage, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Datasource } from "entities/Datasource"; import { fetchDatasourceStructure } from "actions/datasourceActions"; @@ -60,7 +60,7 @@ import { datasourcesEditorIdURL, integrationEditorURL } from "RouteBuilder"; import { PluginPackageName } from "entities/Action"; import { getCurrentAppWorkspace } from "@appsmith/selectors/workspaceSelectors"; import { hasCreateDatasourcePermission } from "@appsmith/utils/permissionHelpers"; -import { getPluginImages } from "selectors/entitiesSelector"; +import { getPluginImages } from "@appsmith/selectors/entitiesSelector"; import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; import { DatasourceCreateEntryPoints } from "constants/Datasource"; import { isGoogleSheetPluginDS } from "utils/editorContextUtils"; diff --git a/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GoogleSheetForm.tsx b/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GoogleSheetForm.tsx index 1795b3b4bf..ebfbbc9f51 100644 --- a/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GoogleSheetForm.tsx +++ b/app/client/src/pages/Editor/GeneratePage/components/GeneratePageForm/GoogleSheetForm.tsx @@ -1,7 +1,7 @@ import type { ReactElement } from "react"; import React, { useState, useEffect, useCallback } from "react"; import { useSelector, useDispatch } from "react-redux"; -import { getEditorConfig } from "selectors/entitiesSelector"; +import { getEditorConfig } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import { fetchPluginFormConfig } from "actions/pluginActions"; import { DROPDOWN_DIMENSION, DEFAULT_DROPDOWN_OPTION } from "../constants"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/DatasourceCard.tsx b/app/client/src/pages/Editor/IntegrationEditor/DatasourceCard.tsx index c20918b041..e308767d52 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/DatasourceCard.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/DatasourceCard.tsx @@ -6,8 +6,8 @@ import { useDispatch, useSelector } from "react-redux"; import CollapseComponent from "components/utils/CollapseComponent"; import { getPluginImages, - getActionsForCurrentPage, -} from "selectors/entitiesSelector"; + getCurrentActions, +} from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import type { AppState } from "@appsmith/reducers"; import history from "utils/history"; @@ -15,7 +15,7 @@ import RenderDatasourceInformation from "pages/Editor/DataSourceEditor/Datasourc import { getQueryParams } from "utils/URLUtils"; import { Button, MenuContent, MenuItem, MenuTrigger } from "design-system"; import { deleteDatasource } from "actions/datasourceActions"; -import { getGenerateCRUDEnabledPluginMap } from "selectors/entitiesSelector"; +import { getGenerateCRUDEnabledPluginMap } from "@appsmith/selectors/entitiesSelector"; import type { GenerateCRUDEnabledPluginMap, Plugin } from "api/PluginApi"; import AnalyticsUtil from "utils/AnalyticsUtil"; import NewActionButton from "../DataSourceEditor/NewActionButton"; @@ -153,7 +153,7 @@ function DatasourceCard(props: DatasourceCardProps) { const datasourceFormConfigs = useSelector( (state: AppState) => state.entities.plugins.formConfigs, ); - const queryActions = useSelector(getActionsForCurrentPage); + const queryActions = useSelector(getCurrentActions); const queriesWithThisDatasource = queryActions.filter( (action) => isStoredDatasource(action.config.datasource) && diff --git a/app/client/src/pages/Editor/IntegrationEditor/DatasourceHome.tsx b/app/client/src/pages/Editor/IntegrationEditor/DatasourceHome.tsx index 7fbf753f84..5284043ccd 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/DatasourceHome.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/DatasourceHome.tsx @@ -2,7 +2,10 @@ import React from "react"; import styled from "styled-components"; import { connect } from "react-redux"; import { initialize } from "redux-form"; -import { getDBPlugins, getPluginImages } from "selectors/entitiesSelector"; +import { + getDBPlugins, + getPluginImages, +} from "@appsmith/selectors/entitiesSelector"; import type { Plugin } from "api/PluginApi"; import { DATASOURCE_DB_FORM } from "@appsmith/constants/forms"; import { @@ -14,7 +17,7 @@ import AnalyticsUtil from "utils/AnalyticsUtil"; import { getCurrentApplication } from "@appsmith/selectors/applicationSelectors"; import type { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; import { getQueryParams } from "utils/URLUtils"; -import { getGenerateCRUDEnabledPluginMap } from "selectors/entitiesSelector"; +import { getGenerateCRUDEnabledPluginMap } from "@appsmith/selectors/entitiesSelector"; import type { GenerateCRUDEnabledPluginMap } from "api/PluginApi"; import { getIsGeneratePageInitiator } from "utils/GenerateCrudUtil"; import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/IntegrationsHomeScreen.tsx b/app/client/src/pages/Editor/IntegrationEditor/IntegrationsHomeScreen.tsx index 7f139811ea..1367848ced 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/IntegrationsHomeScreen.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/IntegrationsHomeScreen.tsx @@ -10,7 +10,10 @@ import NewQueryScreen from "./NewQuery"; import ActiveDataSources from "./ActiveDataSources"; import MockDataSources from "./MockDataSources"; import AddDatasourceSecurely from "./AddDatasourceSecurely"; -import { getDatasources, getMockDatasources } from "selectors/entitiesSelector"; +import { + getDatasources, + getMockDatasources, +} from "@appsmith/selectors/entitiesSelector"; import type { Datasource, MockDatasource } from "entities/Datasource"; import type { TabProp } from "design-system-old"; import { IconSize, Text, TextType } from "design-system-old"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/MockDataSources.tsx b/app/client/src/pages/Editor/IntegrationEditor/MockDataSources.tsx index 808b46e37f..3acad070a4 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/MockDataSources.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/MockDataSources.tsx @@ -2,7 +2,7 @@ import React from "react"; import styled from "styled-components"; import { useDispatch, useSelector } from "react-redux"; import type { MockDatasource } from "entities/Datasource"; -import { getPluginImages } from "selectors/entitiesSelector"; +import { getPluginImages } from "@appsmith/selectors/entitiesSelector"; import { addMockDatasourceToWorkspace } from "actions/datasourceActions"; import { getCurrentWorkspaceId } from "@appsmith/selectors/workspaceSelectors"; import { getQueryParams } from "utils/URLUtils"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx b/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx index d613a17e59..0a5f3a0de8 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx @@ -15,7 +15,7 @@ import AnalyticsUtil from "utils/AnalyticsUtil"; import { CURL } from "constants/AppsmithActionConstants/ActionConstants"; import { PluginPackageName, PluginType } from "entities/Action"; import { getQueryParams } from "utils/URLUtils"; -import { getGenerateCRUDEnabledPluginMap } from "selectors/entitiesSelector"; +import { getGenerateCRUDEnabledPluginMap } from "@appsmith/selectors/entitiesSelector"; import { getIsGeneratePageInitiator } from "utils/GenerateCrudUtil"; import { curlImportPageURL } from "RouteBuilder"; import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; diff --git a/app/client/src/pages/Editor/JSEditor/Form.tsx b/app/client/src/pages/Editor/JSEditor/Form.tsx index d7e4a01292..acd5e939f6 100644 --- a/app/client/src/pages/Editor/JSEditor/Form.tsx +++ b/app/client/src/pages/Editor/JSEditor/Form.tsx @@ -31,7 +31,7 @@ import { getIsExecutingJSAction, getJSActions, getJSCollectionParseErrors, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { JSActionDropdownOption } from "./utils"; import { convertJSActionsToDropdownOptions, diff --git a/app/client/src/pages/Editor/JSEditor/JSObjectNameEditor.tsx b/app/client/src/pages/Editor/JSEditor/JSObjectNameEditor.tsx index bd06a32ccc..2030faf6ff 100644 --- a/app/client/src/pages/Editor/JSEditor/JSObjectNameEditor.tsx +++ b/app/client/src/pages/Editor/JSEditor/JSObjectNameEditor.tsx @@ -8,7 +8,10 @@ import type { AppState } from "@appsmith/reducers"; import type { JSCollection } from "entities/JSCollection"; import { Classes } from "@blueprintjs/core"; import { saveJSObjectName } from "actions/jsActionActions"; -import { getJSCollection, getPlugin } from "selectors/entitiesSelector"; +import { + getJSCollection, + getPlugin, +} from "@appsmith/selectors/entitiesSelector"; import NameEditorComponent from "components/utils/NameEditorComponent"; import { ACTION_NAME_PLACEHOLDER, diff --git a/app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx b/app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx index abbe96aaf7..38111a7408 100644 --- a/app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx +++ b/app/client/src/pages/Editor/MultiSelectPropertyPane/index.tsx @@ -6,7 +6,7 @@ import { } from "@appsmith/constants/messages"; import { Text, Button } from "design-system"; import { useSelector } from "react-redux"; -import { getCanvasWidgets } from "selectors/entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import { getSelectedWidgets } from "selectors/ui"; import { useWidgetSelection } from "utils/hooks/useWidgetSelection"; import { SelectionRequestType } from "sagas/WidgetSelectUtils"; diff --git a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx index a1daeead83..87d86817af 100644 --- a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx +++ b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx @@ -7,7 +7,7 @@ import type { Datasource } from "entities/Datasource"; import { getPluginImages, getPluginNameFromId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import FormControl from "../FormControl"; import { PluginName, diff --git a/app/client/src/pages/Editor/QueryEditor/Form.tsx b/app/client/src/pages/Editor/QueryEditor/Form.tsx index 9f4030f1e0..2b3a975855 100644 --- a/app/client/src/pages/Editor/QueryEditor/Form.tsx +++ b/app/client/src/pages/Editor/QueryEditor/Form.tsx @@ -8,7 +8,7 @@ import { getPluginDocumentationLinks, getPlugin, getActionData, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { EditorJSONtoFormProps } from "./EditorJSONtoForm"; import { EditorJSONtoForm } from "./EditorJSONtoForm"; import { getFormEvaluationState } from "selectors/formSelectors"; diff --git a/app/client/src/pages/Editor/QueryEditor/TemplateMenu.tsx b/app/client/src/pages/Editor/QueryEditor/TemplateMenu.tsx index d31c54d374..5eb865b184 100644 --- a/app/client/src/pages/Editor/QueryEditor/TemplateMenu.tsx +++ b/app/client/src/pages/Editor/QueryEditor/TemplateMenu.tsx @@ -2,7 +2,7 @@ import React from "react"; import styled from "styled-components"; import { connect } from "react-redux"; import type { AppState } from "@appsmith/reducers"; -import { getPluginTemplates } from "selectors/entitiesSelector"; +import { getPluginTemplates } from "@appsmith/selectors/entitiesSelector"; import AnalyticsUtil from "utils/AnalyticsUtil"; const Container = styled.div` diff --git a/app/client/src/pages/Editor/QueryEditor/index.tsx b/app/client/src/pages/Editor/QueryEditor/index.tsx index 473e42fbce..10ad38b2a0 100644 --- a/app/client/src/pages/Editor/QueryEditor/index.tsx +++ b/app/client/src/pages/Editor/QueryEditor/index.tsx @@ -30,7 +30,7 @@ import { getActionResponses, getDatasourceByPluginId, getDBAndRemoteDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { PLUGIN_PACKAGE_DBS } from "constants/QueryEditorConstants"; import type { QueryAction, SaaSAction } from "entities/Action"; import Spinner from "components/editorComponents/Spinner"; @@ -40,7 +40,7 @@ import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; import AnalyticsUtil from "utils/AnalyticsUtil"; -import { initFormEvaluations } from "actions/evaluationActions"; +import { initFormEvaluations } from "@appsmith/actions/evaluationActions"; import { getUIComponent } from "./helpers"; import type { Diff } from "deep-diff"; import { diff } from "deep-diff"; diff --git a/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx b/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx index 2a7f702354..861d3eb266 100644 --- a/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx +++ b/app/client/src/pages/Editor/SaaSEditor/DatasourceCard.tsx @@ -7,9 +7,9 @@ import { Colors } from "constants/Colors"; import { useParams } from "react-router"; import { - getActionsForCurrentPage, + getCurrentActions, getPluginImages, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import type { AppState } from "@appsmith/reducers"; import history from "utils/history"; @@ -98,7 +98,7 @@ function DatasourceCard(props: DatasourceCardProps) { const datasourceFormConfigs = useSelector( (state: AppState) => state.entities.plugins.formConfigs, ); - const queryActions = useSelector(getActionsForCurrentPage); + const queryActions = useSelector(getCurrentActions); const queriesWithThisDatasource = queryActions.filter( (action) => isStoredDatasource(action.config.datasource) && diff --git a/app/client/src/pages/Editor/SaaSEditor/DatasourceForm.tsx b/app/client/src/pages/Editor/SaaSEditor/DatasourceForm.tsx index e792d8f274..8a1593be40 100644 --- a/app/client/src/pages/Editor/SaaSEditor/DatasourceForm.tsx +++ b/app/client/src/pages/Editor/SaaSEditor/DatasourceForm.tsx @@ -24,7 +24,7 @@ import { getPlugin, getPluginDocumentationLinks, getDatasourceScopeValue, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { ActionDataState } from "reducers/entityReducers/actionsReducer"; import type { JSONtoFormProps } from "../DataSourceEditor/JSONtoForm"; import { JSONtoForm } from "../DataSourceEditor/JSONtoForm"; diff --git a/app/client/src/pages/Editor/SaaSEditor/GoogleSheetSchema.tsx b/app/client/src/pages/Editor/SaaSEditor/GoogleSheetSchema.tsx index 5ec0f38f4a..a1ef435584 100644 --- a/app/client/src/pages/Editor/SaaSEditor/GoogleSheetSchema.tsx +++ b/app/client/src/pages/Editor/SaaSEditor/GoogleSheetSchema.tsx @@ -38,7 +38,7 @@ import { } from "@appsmith/utils/permissionHelpers"; import { getCurrentApplication } from "@appsmith/selectors/applicationSelectors"; import type { AppState } from "@appsmith/reducers"; -import { getDatasource } from "selectors/entitiesSelector"; +import { getDatasource } from "@appsmith/selectors/entitiesSelector"; export const MessageWrapper = styled.div` display: flex; diff --git a/app/client/src/pages/Editor/SaaSEditor/ListView.tsx b/app/client/src/pages/Editor/SaaSEditor/ListView.tsx index 4a8d6a8fc5..a0dc24850c 100644 --- a/app/client/src/pages/Editor/SaaSEditor/ListView.tsx +++ b/app/client/src/pages/Editor/SaaSEditor/ListView.tsx @@ -5,7 +5,7 @@ import type { Plugin } from "api/PluginApi"; import { getDatasourcesByPluginId, getPluginByPackageName, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import NotFound from "pages/common/NotFound"; import type { AppState } from "@appsmith/reducers"; import { createDatasourceFromForm } from "actions/datasourceActions"; diff --git a/app/client/src/pages/Editor/SaaSEditor/__tests__/ActionForm.test.js b/app/client/src/pages/Editor/SaaSEditor/__tests__/ActionForm.test.js index 0229c9ce79..dac98e3066 100644 --- a/app/client/src/pages/Editor/SaaSEditor/__tests__/ActionForm.test.js +++ b/app/client/src/pages/Editor/SaaSEditor/__tests__/ActionForm.test.js @@ -1,7 +1,7 @@ import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { diff } from "deep-diff"; import { merge } from "lodash"; -import { getAction } from "selectors/entitiesSelector"; +import { getAction } from "@appsmith/selectors/entitiesSelector"; import { getConfigInitialValues } from "components/formControls/utils"; import { getPathAndValueFromActionDiffObject } from "utils/getPathAndValueFromActionDiffObject"; import configureStore from "redux-mock-store"; diff --git a/app/client/src/pages/Editor/WidgetSidebar.tsx b/app/client/src/pages/Editor/WidgetSidebar.tsx index f0d4fc998a..5024147e57 100644 --- a/app/client/src/pages/Editor/WidgetSidebar.tsx +++ b/app/client/src/pages/Editor/WidgetSidebar.tsx @@ -19,7 +19,7 @@ import { adaptiveSignpostingEnabled } from "@appsmith/selectors/featureFlagsSele import { actionsExistInCurrentPage, widgetsExistCurrentPage, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import WalkthroughContext from "components/featureWalkthrough/walkthroughContext"; import { SignpostingWalkthroughConfig } from "./FirstTimeUserOnboarding/Utils"; diff --git a/app/client/src/pages/Editor/WidgetSidebarWithTags.tsx b/app/client/src/pages/Editor/WidgetSidebarWithTags.tsx index 64d685b285..8e69b9a7cb 100644 --- a/app/client/src/pages/Editor/WidgetSidebarWithTags.tsx +++ b/app/client/src/pages/Editor/WidgetSidebarWithTags.tsx @@ -27,7 +27,7 @@ import { adaptiveSignpostingEnabled } from "@appsmith/selectors/featureFlagsSele import { actionsExistInCurrentPage, widgetsExistCurrentPage, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { getFeatureWalkthroughShown } from "utils/storage"; import { FEATURE_WALKTHROUGH_KEYS } from "constants/WalkthroughConstants"; import { SignpostingWalkthroughConfig } from "./FirstTimeUserOnboarding/Utils"; diff --git a/app/client/src/pages/Editor/WidgetsEditor/CanvasContainer.tsx b/app/client/src/pages/Editor/WidgetsEditor/CanvasContainer.tsx index 5ab57113bf..dc8ce0d7be 100644 --- a/app/client/src/pages/Editor/WidgetsEditor/CanvasContainer.tsx +++ b/app/client/src/pages/Editor/WidgetsEditor/CanvasContainer.tsx @@ -26,7 +26,7 @@ import { } from "selectors/appThemingSelectors"; import { getIsAutoLayout } from "selectors/canvasSelectors"; import { getCurrentThemeDetails } from "selectors/themeSelectors"; -import { getCanvasWidgetsStructure } from "selectors/entitiesSelector"; +import { getCanvasWidgetsStructure } from "@appsmith/selectors/entitiesSelector"; import { AUTOLAYOUT_RESIZER_WIDTH_BUFFER, useDynamicAppLayout, diff --git a/app/client/src/pages/Editor/WidgetsMultiSelectBox.tsx b/app/client/src/pages/Editor/WidgetsMultiSelectBox.tsx index 5280680275..f40d8d7578 100644 --- a/app/client/src/pages/Editor/WidgetsMultiSelectBox.tsx +++ b/app/client/src/pages/Editor/WidgetsMultiSelectBox.tsx @@ -15,7 +15,7 @@ import { TooltipComponent as Tooltip } from "design-system-old"; import { getSelectedWidgets } from "selectors/ui"; import { stopEventPropagation } from "utils/AppsmithUtils"; -import { getCanvasWidgets } from "selectors/entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import type { IPopoverSharedProps } from "@blueprintjs/core"; import { useWidgetSelection } from "utils/hooks/useWidgetSelection"; import WidgetFactory from "WidgetProvider/factory"; diff --git a/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx b/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx index 0e25819ed1..fcea419c13 100644 --- a/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx +++ b/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx @@ -33,7 +33,7 @@ import { getIsListing, getIsReconnectingDatasourcesModalOpen, getUnconfiguredDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { initDatasourceConnectionDuringImportRequest, resetDatasourceConfigForImportFetchedFlag, diff --git a/app/client/src/pages/Templates/DatasourceChip.tsx b/app/client/src/pages/Templates/DatasourceChip.tsx index 3409c53f1d..d7cb16ea2f 100644 --- a/app/client/src/pages/Templates/DatasourceChip.tsx +++ b/app/client/src/pages/Templates/DatasourceChip.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useSelector } from "react-redux"; import type { AppState } from "@appsmith/reducers"; -import { getDefaultPlugin } from "selectors/entitiesSelector"; +import { getDefaultPlugin } from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import { Tag } from "design-system"; diff --git a/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx b/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx index 027e4f203f..c3f0e04a11 100644 --- a/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx +++ b/app/client/src/pages/common/datasourceAuth/AuthMessage.tsx @@ -9,7 +9,7 @@ import { useDispatch, useSelector } from "react-redux"; import { getPlugin, getPluginTypeFromDatasourceId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import styled from "styled-components"; import { GOOGLE_SHEETS_AUTHORIZE_DATASOURCE, diff --git a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts index 9da2671d08..a480b0aadb 100644 --- a/app/client/src/sagas/ActionExecution/PluginActionSaga.ts +++ b/app/client/src/sagas/ActionExecution/PluginActionSaga.ts @@ -42,7 +42,7 @@ import { isActionSaving, getJSCollection, getDatasource, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { getIsGitSyncModalOpen } from "selectors/gitSyncSelectors"; import { getAppMode, @@ -147,7 +147,7 @@ import { toast } from "design-system"; import type { TRunDescription } from "workers/Evaluation/fns/actionFns"; import { DEBUGGER_TAB_KEYS } from "components/editorComponents/Debugger/helpers"; import { FILE_SIZE_LIMIT_FOR_BLOBS } from "constants/WidgetConstants"; -import { getActionsForCurrentPage } from "selectors/entitiesSelector"; +import { getCurrentActions } from "@appsmith/selectors/entitiesSelector"; import type { ActionData } from "reducers/entityReducers/actionsReducer"; import { handleStoreOperations } from "./StoreActionSaga"; import { fetchPage } from "actions/pageActions"; @@ -1495,9 +1495,7 @@ function* openDebugger() { // Function to clear the action responses for the actions which are not executeOnLoad. function* clearTriggerActionResponse() { - const currentPageActions: ActionData[] = yield select( - getActionsForCurrentPage, - ); + const currentPageActions: ActionData[] = yield select(getCurrentActions); for (const action of currentPageActions) { // Clear the action response if the action has data and is not executeOnLoad. if (action.data && !action.config.executeOnLoad) { diff --git a/app/client/src/sagas/ActionExecution/StoreActionSaga.ts b/app/client/src/sagas/ActionExecution/StoreActionSaga.ts index b6f9b01584..0225e573d8 100644 --- a/app/client/src/sagas/ActionExecution/StoreActionSaga.ts +++ b/app/client/src/sagas/ActionExecution/StoreActionSaga.ts @@ -3,7 +3,7 @@ import { getAppStoreName } from "constants/AppConstants"; import localStorage from "utils/localStorage"; import { updateAppStore } from "actions/pageActions"; import AppsmithConsole from "utils/AppsmithConsole"; -import { getAppStoreData } from "selectors/entitiesSelector"; +import { getAppStoreData } from "@appsmith/selectors/entitiesSelector"; import { getCurrentGitBranch } from "selectors/gitSyncSelectors"; import { getCurrentApplicationId } from "selectors/editorSelectors"; import type { AppStoreState } from "reducers/entityReducers/appReducer"; diff --git a/app/client/src/sagas/ActionSagas.ts b/app/client/src/sagas/ActionSagas.ts index eb4b77a7fd..a788ff01c8 100644 --- a/app/client/src/sagas/ActionSagas.ts +++ b/app/client/src/sagas/ActionSagas.ts @@ -76,7 +76,7 @@ import { getPageNameByPageId, getPlugin, getSettingConfig, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import history from "utils/history"; import { INTEGRATION_TABS } from "constants/routes"; import PerformanceTracker, { diff --git a/app/client/src/sagas/ApiPaneSagas.ts b/app/client/src/sagas/ApiPaneSagas.ts index 4bf9a6fce6..ed6e01a507 100644 --- a/app/client/src/sagas/ApiPaneSagas.ts +++ b/app/client/src/sagas/ApiPaneSagas.ts @@ -41,7 +41,7 @@ import { getActions, getDatasourceActionRouteInfo, getPlugin, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { ActionData, ActionDataState, diff --git a/app/client/src/sagas/AppThemingSaga.tsx b/app/client/src/sagas/AppThemingSaga.tsx index 5f9e582dbd..13c16026c3 100644 --- a/app/client/src/sagas/AppThemingSaga.tsx +++ b/app/client/src/sagas/AppThemingSaga.tsx @@ -24,7 +24,7 @@ import { } from "@appsmith/constants/messages"; import { ENTITY_TYPE } from "entities/AppsmithConsole"; import { updateReplayEntity } from "actions/pageActions"; -import { getCanvasWidgets } from "selectors/entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import { getAppMode } from "@appsmith/selectors/applicationSelectors"; import type { APP_MODE } from "entities/App"; import { getCurrentUser } from "selectors/usersSelectors"; diff --git a/app/client/src/sagas/ContextSwitchingSaga.ts b/app/client/src/sagas/ContextSwitchingSaga.ts index d5f9c77257..7696c6e8ba 100644 --- a/app/client/src/sagas/ContextSwitchingSaga.ts +++ b/app/client/src/sagas/ContextSwitchingSaga.ts @@ -21,7 +21,7 @@ import type { AppsmithLocationState } from "utils/history"; import history, { NavigationMethod } from "utils/history"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import type { Action } from "entities/Action"; -import { getAction, getPlugin } from "selectors/entitiesSelector"; +import { getAction, getPlugin } from "@appsmith/selectors/entitiesSelector"; import type { Plugin } from "api/PluginApi"; import { getCurrentGitBranch } from "selectors/gitSyncSelectors"; import { has } from "lodash"; diff --git a/app/client/src/sagas/DatasourcesSagas.ts b/app/client/src/sagas/DatasourcesSagas.ts index e7e3f3e1e7..dd582ca235 100644 --- a/app/client/src/sagas/DatasourcesSagas.ts +++ b/app/client/src/sagas/DatasourcesSagas.ts @@ -45,7 +45,7 @@ import { getPluginByPackageName, getDatasourcesUsedInApplicationByActions, getEntityExplorerDatasources, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { addMockDatasourceToWorkspace, setDatasourceViewModeFlag, diff --git a/app/client/src/sagas/DebuggerSagas.ts b/app/client/src/sagas/DebuggerSagas.ts index 5dc5086101..ee5ca6d803 100644 --- a/app/client/src/sagas/DebuggerSagas.ts +++ b/app/client/src/sagas/DebuggerSagas.ts @@ -29,7 +29,7 @@ import { getPlugin, getJSCollection, getAppMode, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Action } from "entities/Action"; import { PluginType } from "entities/Action"; import type { JSCollection } from "entities/JSCollection"; diff --git a/app/client/src/sagas/EvaluationsSaga.ts b/app/client/src/sagas/EvaluationsSaga.ts index 636524d824..c2dfbe698f 100644 --- a/app/client/src/sagas/EvaluationsSaga.ts +++ b/app/client/src/sagas/EvaluationsSaga.ts @@ -45,8 +45,8 @@ import { shouldLog, shouldProcessAction, shouldTriggerEvaluation, - shouldTriggerLinting, -} from "actions/evaluationActions"; + getRequiresLinting, +} from "@appsmith/actions/evaluationActions"; import ConfigTreeActions from "utils/configTree"; import { dynamicTriggerErrorHandler, @@ -81,7 +81,7 @@ import { resetWidgetsMetaState, updateMetaState } from "actions/metaActions"; import { getAllActionValidationConfig, getAllJSActionsData, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { DataTree, UnEvalTree, @@ -100,7 +100,6 @@ import { executeJSUpdates } from "actions/pluginActionActions"; import { setEvaluatedActionSelectorField } from "actions/actionSelectorActions"; import { waitForWidgetConfigBuild } from "./InitSagas"; import { logDynamicTriggerExecution } from "@appsmith/sagas/analyticsSaga"; - const APPSMITH_CONFIGS = getAppsmithConfigs(); export const evalWorker = new GracefulWorkerService( new Worker( @@ -537,10 +536,8 @@ function* evalAndLintingHandler( }>, ) { const { forceEvaluation, requiresLogging, shouldReplay } = options; - const appMode: ReturnType = yield select(getAppMode); - const requiresLinting = - appMode === APP_MODE.EDIT && shouldTriggerLinting(action); + const requiresLinting = getRequiresLinting(action); const requiresEval = shouldTriggerEvaluation(action); log.debug({ diff --git a/app/client/src/sagas/FormEvaluationSaga.ts b/app/client/src/sagas/FormEvaluationSaga.ts index 5476bbded7..46bc2266a0 100644 --- a/app/client/src/sagas/FormEvaluationSaga.ts +++ b/app/client/src/sagas/FormEvaluationSaga.ts @@ -11,12 +11,12 @@ import type { DynamicValues, FormEvaluationState, } from "reducers/evaluationReducers/formEvaluationReducer"; -import { FORM_EVALUATION_REDUX_ACTIONS } from "actions/evaluationActions"; +import { FORM_EVALUATION_REDUX_ACTIONS } from "@appsmith/actions/evaluationActions"; import type { Action, ActionConfig } from "entities/Action"; import type { FormConfigType } from "components/formControls/BaseControl"; import PluginsApi from "api/PluginApi"; import type { ApiResponse } from "api/ApiResponses"; -import { getAction } from "selectors/entitiesSelector"; +import { getAction } from "@appsmith/selectors/entitiesSelector"; import { getDataTreeActionConfigPath } from "entities/Action/actionProperties"; import { getDataTree } from "selectors/dataTreeSelectors"; import { getDynamicBindings, isDynamicValue } from "utils/DynamicBindingUtils"; diff --git a/app/client/src/sagas/GitSyncSagas.ts b/app/client/src/sagas/GitSyncSagas.ts index 74d2b31157..076b5d6b4d 100644 --- a/app/client/src/sagas/GitSyncSagas.ts +++ b/app/client/src/sagas/GitSyncSagas.ts @@ -102,7 +102,10 @@ import { builderURL } from "RouteBuilder"; import { APP_MODE } from "entities/App"; import type { GitDiscardResponse } from "reducers/uiReducers/gitSyncReducer"; import { FocusEntity, identifyEntityFromPath } from "navigation/FocusEntity"; -import { getActions, getJSCollections } from "selectors/entitiesSelector"; +import { + getActions, + getJSCollections, +} from "@appsmith/selectors/entitiesSelector"; import type { Action } from "entities/Action"; import type { JSCollectionDataState } from "reducers/entityReducers/jsActionsReducer"; import { toast } from "design-system"; diff --git a/app/client/src/sagas/JSActionSagas.ts b/app/client/src/sagas/JSActionSagas.ts index e26254097f..51cfc162e7 100644 --- a/app/client/src/sagas/JSActionSagas.ts +++ b/app/client/src/sagas/JSActionSagas.ts @@ -30,7 +30,7 @@ import { import { getJSCollection, getPageNameByPageId, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import history from "utils/history"; import { getCurrentPageId } from "selectors/editorSelectors"; import type { JSCollectionCreateUpdateResponse } from "api/JSActionAPI"; diff --git a/app/client/src/sagas/JSLibrarySaga.ts b/app/client/src/sagas/JSLibrarySaga.ts index ac99b3d201..0e1857ab9f 100644 --- a/app/client/src/sagas/JSLibrarySaga.ts +++ b/app/client/src/sagas/JSLibrarySaga.ts @@ -32,7 +32,7 @@ import AnalyticsUtil from "utils/AnalyticsUtil"; import type { TJSLibrary } from "workers/common/JSLibrary"; import { getUsedActionNames } from "selectors/actionSelectors"; import AppsmithConsole from "utils/AppsmithConsole"; -import { selectInstalledLibraries } from "selectors/entitiesSelector"; +import { selectInstalledLibraries } from "@appsmith/selectors/entitiesSelector"; import { toast } from "design-system"; export function parseErrorMessage(text: string) { diff --git a/app/client/src/sagas/JSPaneSagas.ts b/app/client/src/sagas/JSPaneSagas.ts index 5b9a6591aa..d19df1b87b 100644 --- a/app/client/src/sagas/JSPaneSagas.ts +++ b/app/client/src/sagas/JSPaneSagas.ts @@ -18,7 +18,10 @@ import { getCurrentPageId, getIsSavingEntity, } from "selectors/editorSelectors"; -import { getJSCollection, getJSCollections } from "selectors/entitiesSelector"; +import { + getJSCollection, + getJSCollections, +} from "@appsmith/selectors/entitiesSelector"; import type { JSCollectionData, JSCollectionDataState, diff --git a/app/client/src/sagas/LintingSagas.ts b/app/client/src/sagas/LintingSagas.ts index 0583bec230..56f31135ca 100644 --- a/app/client/src/sagas/LintingSagas.ts +++ b/app/client/src/sagas/LintingSagas.ts @@ -3,7 +3,7 @@ import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { APP_MODE } from "entities/App"; import { call, put, select, takeEvery } from "redux-saga/effects"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import type { TJSLibrary } from "workers/common/JSLibrary"; import { logLatestLintPropertyErrors } from "./PostLintingSagas"; import { getAppsmithConfigs } from "@appsmith/configs"; diff --git a/app/client/src/sagas/OneClickBindingSaga.ts b/app/client/src/sagas/OneClickBindingSaga.ts index 8277c949d0..77eb5b6c3b 100644 --- a/app/client/src/sagas/OneClickBindingSaga.ts +++ b/app/client/src/sagas/OneClickBindingSaga.ts @@ -15,7 +15,7 @@ import { getCurrentPageNameByActionId, getDatasource, getPlugin, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { createNewQueryName } from "utils/AppsmithUtils"; import WidgetQueryGeneratorRegistry from "utils/WidgetQueryGeneratorRegistry"; import { diff --git a/app/client/src/sagas/PageSagas.tsx b/app/client/src/sagas/PageSagas.tsx index 5d6f1205d9..6f1f712064 100644 --- a/app/client/src/sagas/PageSagas.tsx +++ b/app/client/src/sagas/PageSagas.tsx @@ -134,7 +134,7 @@ import { checkAndLogErrorsIfCyclicDependency } from "./helper"; import { LOCAL_STORAGE_KEYS } from "utils/localStorage"; import { generateAutoHeightLayoutTreeAction } from "actions/autoHeightActions"; import { getUsedActionNames } from "selectors/actionSelectors"; -import { getPageList } from "selectors/entitiesSelector"; +import { getPageList } from "@appsmith/selectors/entitiesSelector"; import { setPreviewModeAction } from "actions/editorActions"; import { SelectionRequestType } from "sagas/WidgetSelectUtils"; import { toast } from "design-system"; diff --git a/app/client/src/sagas/PluginSagas.ts b/app/client/src/sagas/PluginSagas.ts index 410484577f..aca713e55e 100644 --- a/app/client/src/sagas/PluginSagas.ts +++ b/app/client/src/sagas/PluginSagas.ts @@ -14,7 +14,7 @@ import { getPlugin, getPluginForm, getPlugins, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Datasource } from "entities/Datasource"; import type { Plugin } from "api/PluginApi"; import { diff --git a/app/client/src/sagas/QueryPaneSagas.ts b/app/client/src/sagas/QueryPaneSagas.ts index d9d47cde87..46ff9f213b 100644 --- a/app/client/src/sagas/QueryPaneSagas.ts +++ b/app/client/src/sagas/QueryPaneSagas.ts @@ -38,7 +38,7 @@ import { getSettingConfig, getPlugins, getGenerateCRUDEnabledPluginMap, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Action, QueryAction } from "entities/Action"; import { PluginType } from "entities/Action"; import { @@ -58,7 +58,7 @@ import get from "lodash/get"; import { initFormEvaluations, startFormEvaluations, -} from "actions/evaluationActions"; +} from "@appsmith/actions/evaluationActions"; import { updateReplayEntity } from "actions/pageActions"; import { ENTITY_TYPE } from "entities/AppsmithConsole"; import type { EventLocation } from "@appsmith/utils/analyticsUtilTypes"; diff --git a/app/client/src/sagas/ReplaySaga.ts b/app/client/src/sagas/ReplaySaga.ts index 058304f9e9..f01278258a 100644 --- a/app/client/src/sagas/ReplaySaga.ts +++ b/app/client/src/sagas/ReplaySaga.ts @@ -51,7 +51,7 @@ import { getPluginForm, getPlugins, getSettingConfig, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Action } from "entities/Action"; import { isAPIAction, isQueryAction, isSaaSAction } from "entities/Action"; import { API_EDITOR_TABS } from "constants/ApiEditorConstants/CommonApiConstants"; @@ -75,7 +75,7 @@ import { import { AppThemingMode } from "selectors/appThemingSelectors"; import { generateAutoHeightLayoutTreeAction } from "actions/autoHeightActions"; import { SelectionRequestType } from "sagas/WidgetSelectUtils"; -import { startFormEvaluations } from "actions/evaluationActions"; +import { startFormEvaluations } from "@appsmith/actions/evaluationActions"; import { getUIComponent } from "pages/Editor/QueryEditor/helpers"; import type { Plugin } from "api/PluginApi"; import { UIComponentTypes } from "api/PluginApi"; diff --git a/app/client/src/sagas/SaaSPaneSagas.ts b/app/client/src/sagas/SaaSPaneSagas.ts index 57d99f226c..c125a4a4be 100644 --- a/app/client/src/sagas/SaaSPaneSagas.ts +++ b/app/client/src/sagas/SaaSPaneSagas.ts @@ -5,7 +5,7 @@ import history from "utils/history"; import { getGenerateCRUDEnabledPluginMap, getPlugin, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import type { Action } from "entities/Action"; import { PluginType } from "entities/Action"; import type { GenerateCRUDEnabledPluginMap, Plugin } from "api/PluginApi"; diff --git a/app/client/src/sagas/SnipingModeSagas.ts b/app/client/src/sagas/SnipingModeSagas.ts index 2f6160aa1a..9ffcb5905e 100644 --- a/app/client/src/sagas/SnipingModeSagas.ts +++ b/app/client/src/sagas/SnipingModeSagas.ts @@ -3,7 +3,7 @@ import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import { ReduxActionTypes } from "@appsmith/constants/ReduxActionConstants"; import { snipingModeBindToSelector } from "selectors/editorSelectors"; import type { ActionData } from "reducers/entityReducers/actionsReducer"; -import { getCanvasWidgets } from "selectors/entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import { batchUpdateWidgetDynamicProperty, batchUpdateWidgetProperty, diff --git a/app/client/src/sagas/ToastSagas.ts b/app/client/src/sagas/ToastSagas.ts index 4f12bc06f8..77c57aef02 100644 --- a/app/client/src/sagas/ToastSagas.ts +++ b/app/client/src/sagas/ToastSagas.ts @@ -2,7 +2,7 @@ import type { ToastProps } from "design-system"; import { toast } from "design-system"; import { APP_MODE } from "entities/App"; import { select } from "redux-saga/effects"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import log from "loglevel"; type ExtraOptions = { diff --git a/app/client/src/sagas/WidgetLoadingSaga.ts b/app/client/src/sagas/WidgetLoadingSaga.ts index 19fb96ac2b..a91ca39595 100644 --- a/app/client/src/sagas/WidgetLoadingSaga.ts +++ b/app/client/src/sagas/WidgetLoadingSaga.ts @@ -5,7 +5,7 @@ import { getDataTree, } from "selectors/dataTreeSelectors"; import type { DataTree } from "entities/DataTree/dataTreeFactory"; -import { getActions } from "selectors/entitiesSelector"; +import { getActions } from "@appsmith/selectors/entitiesSelector"; import type { ActionData, ActionDataState, diff --git a/app/client/src/sagas/WidgetSelectionSagas.ts b/app/client/src/sagas/WidgetSelectionSagas.ts index 0b56027f97..9d4b2e6aa3 100644 --- a/app/client/src/sagas/WidgetSelectionSagas.ts +++ b/app/client/src/sagas/WidgetSelectionSagas.ts @@ -29,7 +29,10 @@ import { snipingModeSelector, } from "selectors/editorSelectors"; import { builderURL, widgetURL } from "RouteBuilder"; -import { getAppMode, getCanvasWidgets } from "selectors/entitiesSelector"; +import { + getAppMode, + getCanvasWidgets, +} from "@appsmith/selectors/entitiesSelector"; import type { SetSelectionResult } from "sagas/WidgetSelectUtils"; import { assertParentId, diff --git a/app/client/src/sagas/autoHeightSagas/helpers.ts b/app/client/src/sagas/autoHeightSagas/helpers.ts index 400308ae09..3029117c91 100644 --- a/app/client/src/sagas/autoHeightSagas/helpers.ts +++ b/app/client/src/sagas/autoHeightSagas/helpers.ts @@ -12,7 +12,7 @@ import type { import { select } from "redux-saga/effects"; import { getWidgetMetaProps, getWidgets } from "sagas/selectors"; import { previewModeSelector } from "selectors/editorSelectors"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import { isAutoHeightEnabledForWidget } from "widgets/WidgetUtils"; import { getCanvasHeightOffset } from "utils/WidgetSizeUtils"; import type { DataTree, WidgetEntity } from "entities/DataTree/dataTreeFactory"; diff --git a/app/client/src/sagas/autoHeightSagas/widgets.ts b/app/client/src/sagas/autoHeightSagas/widgets.ts index 5f20707363..34a0f12505 100644 --- a/app/client/src/sagas/autoHeightSagas/widgets.ts +++ b/app/client/src/sagas/autoHeightSagas/widgets.ts @@ -41,7 +41,7 @@ import WidgetFactory from "WidgetProvider/factory"; import type { ReduxAction } from "@appsmith/constants/ReduxActionConstants"; import type { TreeNode } from "utils/autoHeight/constants"; import { directlyMutateDOMNodes } from "utils/autoHeight/mutateDOM"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import { APP_MODE } from "entities/App"; import { getDimensionMap, diff --git a/app/client/src/sagas/layoutConversionSagas.ts b/app/client/src/sagas/layoutConversionSagas.ts index a0b1be4f60..731e1ba39c 100644 --- a/app/client/src/sagas/layoutConversionSagas.ts +++ b/app/client/src/sagas/layoutConversionSagas.ts @@ -8,7 +8,7 @@ import type { SupportedLayouts } from "reducers/entityReducers/pageListReducer"; import { CONVERSION_STATES } from "reducers/uiReducers/layoutConversionReducer"; import type { PageWidgetsReduxState } from "reducers/uiReducers/pageWidgetsReducer"; import { all, call, put, select, takeLatest } from "redux-saga/effects"; -import { getPageWidgets } from "selectors/entitiesSelector"; +import { getPageWidgets } from "@appsmith/selectors/entitiesSelector"; import { convertNormalizedDSLToFixed } from "utils/DSLConversions/autoToFixedLayout"; import convertToAutoLayout from "utils/DSLConversions/fixedToAutoLayout"; import type { DSLWidget } from "WidgetProvider/constants"; diff --git a/app/client/src/sagas/selectors.tsx b/app/client/src/sagas/selectors.tsx index b5c5b5a206..08ba5780b0 100644 --- a/app/client/src/sagas/selectors.tsx +++ b/app/client/src/sagas/selectors.tsx @@ -11,7 +11,7 @@ import type { WidgetType } from "constants/WidgetConstants"; import { WIDGET_PROPS_TO_SKIP_FROM_EVAL } from "constants/WidgetConstants"; import type { ActionData } from "reducers/entityReducers/actionsReducer"; import type { Page } from "@appsmith/constants/ReduxActionConstants"; -import { getActions, getPlugins } from "selectors/entitiesSelector"; +import { getActions, getPlugins } from "@appsmith/selectors/entitiesSelector"; import type { Plugin } from "api/PluginApi"; import type { DragDetails } from "reducers/uiReducers/dragResizeReducer"; import type { DataTreeForActionCreator } from "components/editorComponents/ActionCreator/types"; diff --git a/app/client/src/selectors/actionSelectors.tsx b/app/client/src/selectors/actionSelectors.tsx index 7e66629319..9a554e9eba 100644 --- a/app/client/src/selectors/actionSelectors.tsx +++ b/app/client/src/selectors/actionSelectors.tsx @@ -7,7 +7,7 @@ import { getDataTree } from "./dataTreeSelectors"; import { getExistingPageNames, selectInstalledLibraries, -} from "./entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { getErrorForApiName, getErrorForJSObjectName, diff --git a/app/client/src/selectors/dataTreeSelectors.ts b/app/client/src/selectors/dataTreeSelectors.ts index 5864e8b0d9..ba5db589e9 100644 --- a/app/client/src/selectors/dataTreeSelectors.ts +++ b/app/client/src/selectors/dataTreeSelectors.ts @@ -1,11 +1,11 @@ import { createSelector } from "reselect"; import { - getActionsForCurrentPage, + getCurrentActions, getAppData, getPluginDependencyConfig, getPluginEditorConfigs, - getJSCollectionsForCurrentPage, -} from "./entitiesSelector"; + getCurrentJSCollections, +} from "@appsmith/selectors/entitiesSelector"; import type { DataTree, WidgetEntity } from "entities/DataTree/dataTreeFactory"; import { DataTreeFactory } from "entities/DataTree/dataTreeFactory"; import { @@ -26,8 +26,8 @@ import ConfigTreeActions from "utils/configTree"; import { DATATREE_INTERNAL_KEYWORDS } from "constants/WidgetValidation"; export const getUnevaluatedDataTree = createSelector( - getActionsForCurrentPage, - getJSCollectionsForCurrentPage, + getCurrentActions, + getCurrentJSCollections, getWidgetsForEval, getWidgetsMeta, getPageList, diff --git a/app/client/src/selectors/editorSelectors.tsx b/app/client/src/selectors/editorSelectors.tsx index 9894102082..0a2e820ef5 100644 --- a/app/client/src/selectors/editorSelectors.tsx +++ b/app/client/src/selectors/editorSelectors.tsx @@ -43,7 +43,7 @@ import { getActions, getCanvasWidgets, getJSCollections, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { checkIsDropTarget } from "WidgetProvider/factory/helpers"; import { buildChildWidgetTree, diff --git a/app/client/src/selectors/navigationSelectors.ts b/app/client/src/selectors/navigationSelectors.ts index d8e3e39bcb..003522db4e 100644 --- a/app/client/src/selectors/navigationSelectors.ts +++ b/app/client/src/selectors/navigationSelectors.ts @@ -2,11 +2,11 @@ import type { DataTree } from "entities/DataTree/dataTreeFactory"; import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import { createSelector } from "reselect"; import { - getActionsForCurrentPage, + getCurrentActions, getDatasources, getJSCollections, getPlugins, -} from "selectors/entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { getWidgets } from "sagas/selectors"; import { getCurrentPageId } from "selectors/editorSelectors"; import { getActionConfig } from "pages/Editor/Explorer/Actions/helpers"; @@ -42,7 +42,7 @@ export type NavigationData = { export type EntityNavigationData = Record; export const getEntitiesForNavigation = createSelector( - getActionsForCurrentPage, + getCurrentActions, getPlugins, getJSCollections, getWidgets, diff --git a/app/client/src/selectors/onboardingSelectors.tsx b/app/client/src/selectors/onboardingSelectors.tsx index a41fb886ec..00a85986db 100644 --- a/app/client/src/selectors/onboardingSelectors.tsx +++ b/app/client/src/selectors/onboardingSelectors.tsx @@ -6,9 +6,9 @@ import { getWidgets } from "sagas/selectors"; import { getActionResponses, getActions, - getActionsForCurrentPage, + getCurrentActions, getCanvasWidgets, -} from "./entitiesSelector"; +} from "@appsmith/selectors/entitiesSelector"; import { getLastSelectedWidget } from "./ui"; import { GuidedTourEntityNames } from "pages/Editor/GuidedTour/constants"; import type { SIGNPOSTING_STEP } from "pages/Editor/FirstTimeUserOnboarding/Utils"; @@ -68,7 +68,7 @@ export const getIsAnonymousDataPopupVisible = (state: AppState) => state.ui.onBoarding.showAnonymousDataPopup; export const isWidgetActionConnectionPresent = createSelector( getCanvasWidgets, - getActionsForCurrentPage, + getCurrentActions, getEvaluationInverseDependencyMap, (widgets, actions, deps) => { const actionLables = actions.map((action: any) => action.config.name); diff --git a/app/client/src/selectors/propertyPaneSelectors.tsx b/app/client/src/selectors/propertyPaneSelectors.tsx index cc25941479..1b49b800e6 100644 --- a/app/client/src/selectors/propertyPaneSelectors.tsx +++ b/app/client/src/selectors/propertyPaneSelectors.tsx @@ -21,7 +21,7 @@ import { import { generateClassName } from "utils/generators"; import { getGoogleMapsApiKey } from "@appsmith/selectors/tenantSelectors"; import type { WidgetProps } from "widgets/BaseWidget"; -import { getCanvasWidgets } from "./entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import { getLastSelectedWidget, getSelectedWidgets } from "./ui"; import { getCurrentAppPositioningType } from "./editorSelectors"; diff --git a/app/client/src/selectors/templatesSelectors.tsx b/app/client/src/selectors/templatesSelectors.tsx index e3979ead8b..51394ce595 100644 --- a/app/client/src/selectors/templatesSelectors.tsx +++ b/app/client/src/selectors/templatesSelectors.tsx @@ -3,7 +3,7 @@ import Fuse from "fuse.js"; import type { AppState } from "@appsmith/reducers"; import { createSelector } from "reselect"; import { getWorkspaceCreateApplication } from "@appsmith/selectors/applicationSelectors"; -import { getDefaultPlugins } from "./entitiesSelector"; +import { getDefaultPlugins } from "@appsmith/selectors/entitiesSelector"; import type { Filter } from "pages/Templates/Filters"; const fuzzySearchOptions = { diff --git a/app/client/src/usagePulse/utils.ts b/app/client/src/usagePulse/utils.ts index 40807b8544..5052b2470d 100644 --- a/app/client/src/usagePulse/utils.ts +++ b/app/client/src/usagePulse/utils.ts @@ -2,7 +2,7 @@ import { isEditorPath } from "@appsmith/pages/Editor/Explorer/helpers"; import { APP_MODE } from "entities/App"; import { isNil, noop } from "lodash"; import nanoid from "nanoid"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import store from "store"; import AnalyticsUtil from "utils/AnalyticsUtil"; import { FALLBACK_KEY } from "@appsmith/constants/UsagePulse"; diff --git a/app/client/src/utils/editorContextUtils.ts b/app/client/src/utils/editorContextUtils.ts index 061ba3b694..06c01c63fb 100644 --- a/app/client/src/utils/editorContextUtils.ts +++ b/app/client/src/utils/editorContextUtils.ts @@ -16,7 +16,7 @@ import type { import { AuthenticationStatus, AuthType } from "entities/Datasource"; import { get, isArray } from "lodash"; import store from "store"; -import { getPlugin } from "selectors/entitiesSelector"; +import { getPlugin } from "@appsmith/selectors/entitiesSelector"; import type { AppState } from "@appsmith/reducers"; import { MOCK_DB_TABLE_NAMES, diff --git a/app/client/src/utils/hooks/useDynamicAppLayout.tsx b/app/client/src/utils/hooks/useDynamicAppLayout.tsx index 8920b6778f..ed1a1383cb 100644 --- a/app/client/src/utils/hooks/useDynamicAppLayout.tsx +++ b/app/client/src/utils/hooks/useDynamicAppLayout.tsx @@ -19,7 +19,7 @@ import { getMainCanvasProps, previewModeSelector, } from "selectors/editorSelectors"; -import { getAppMode } from "selectors/entitiesSelector"; +import { getAppMode } from "@appsmith/selectors/entitiesSelector"; import { getExplorerPinned, getExplorerWidth, diff --git a/app/client/src/widgets/TableWidgetV2/component/ConnectDataOverlay.tsx b/app/client/src/widgets/TableWidgetV2/component/ConnectDataOverlay.tsx index 3c4409bf66..0cf17e9b09 100644 --- a/app/client/src/widgets/TableWidgetV2/component/ConnectDataOverlay.tsx +++ b/app/client/src/widgets/TableWidgetV2/component/ConnectDataOverlay.tsx @@ -7,7 +7,7 @@ import { Button } from "design-system"; import { SignpostingWalkthroughConfig } from "pages/Editor/FirstTimeUserOnboarding/Utils"; import React, { useContext, useEffect } from "react"; import { useSelector } from "react-redux"; -import { actionsExistInCurrentPage } from "selectors/entitiesSelector"; +import { actionsExistInCurrentPage } from "@appsmith/selectors/entitiesSelector"; import { getIsFirstTimeUserOnboardingEnabled, isWidgetActionConnectionPresent, diff --git a/app/client/src/workers/Evaluation/JSObject/utils.ts b/app/client/src/workers/Evaluation/JSObject/utils.ts index 7d954a9ccd..a1311498df 100644 --- a/app/client/src/workers/Evaluation/JSObject/utils.ts +++ b/app/client/src/workers/Evaluation/JSObject/utils.ts @@ -15,7 +15,7 @@ import type { } from "reducers/entityReducers/jsActionsReducer"; import { select } from "redux-saga/effects"; import type { JSAction } from "entities/JSCollection"; -import { getJSCollectionsForCurrentPage } from "selectors/entitiesSelector"; +import { getCurrentJSCollections } from "@appsmith/selectors/entitiesSelector"; import { getEntityNameAndPropertyPath, isJSAction, @@ -326,7 +326,7 @@ export function* sortJSExecutionDataByCollectionId( const sortedErrors: BatchedJSExecutionErrors = {}; const JSCollectionsForCurrentPage: JSCollectionData[] = yield select( - getJSCollectionsForCurrentPage, + getCurrentJSCollections, ); for (const jsfuncFullName of Object.keys(data)) { diff --git a/app/client/test/testCommon.ts b/app/client/test/testCommon.ts index 183b13262a..d5a1ff9115 100644 --- a/app/client/test/testCommon.ts +++ b/app/client/test/testCommon.ts @@ -7,7 +7,7 @@ import { useDispatch } from "react-redux"; import type { CanvasWidgetsReduxState } from "reducers/entityReducers/canvasWidgetsReducer"; import { createSelector } from "reselect"; import { getCanvasWidgetsPayload } from "sagas/PageSagas"; -import { getCanvasWidgets } from "selectors/entitiesSelector"; +import { getCanvasWidgets } from "@appsmith/selectors/entitiesSelector"; import { editorInitializer } from "utils/editor/EditorUtils"; import { extractCurrentDSL } from "utils/WidgetPropsUtils"; import type { AppState } from "@appsmith/reducers"; diff --git a/app/client/test/testMockedWidgets.tsx b/app/client/test/testMockedWidgets.tsx index 2c72895776..2b169f6876 100644 --- a/app/client/test/testMockedWidgets.tsx +++ b/app/client/test/testMockedWidgets.tsx @@ -4,7 +4,7 @@ import Canvas from "pages/Editor/Canvas"; import MainContainer from "pages/Editor/MainContainer"; import React from "react"; import { useSelector } from "react-redux"; -import { getCanvasWidgetsStructure } from "selectors/entitiesSelector"; +import { getCanvasWidgetsStructure } from "@appsmith/selectors/entitiesSelector"; import { useMockDsl } from "./testCommon"; export function MockCanvas() {