Skip to content

Commit

Permalink
Sync changes from EE excluding enterprise directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Oct 11, 2024
1 parent 8e7dbdd commit 38b5128
Show file tree
Hide file tree
Showing 33 changed files with 49 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import {
} from "ee/utils/BusinessFeatures/permissionPageHelpers";
import { isGACEnabled } from "ee/utils/planHelpers";
import { selectFeatureFlags } from "ee/selectors/featureFlagsSelectors";
import { getDatasourceInfo } from "../../../utils/getDatasourceInfo";
import { getDatasourceInfo } from "../utils/getDatasourceInfo";

interface ReduxStateProps {
workspaceId: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DEFAULT_APPSMITH_AI_QUERY_TIMEOUT_MS } from "ee/constants/ApiConstants";
import type { ActionConfig } from "../../entities/Action";
import type { ActionConfig } from "entities/Action";

// Appsmith AI Default Config
export const DEFAULT_APPSMITH_AI_ACTION_CONFIG: ActionConfig = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ApiActionConfig } from "../../entities/Action";
import type { ApiActionConfig } from "entities/Action";
import { DEFAULT_ACTION_TIMEOUT } from "ee/constants/ApiConstants";
import {
CONTENT_TYPE_HEADER_KEY,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isEnvironmentValid } from "ee/utils/Environments";
import type { Property } from "../../entities/Action";
import type { Datasource, DatasourceStorage } from "../../entities/Datasource";
import type { Property } from "entities/Action";
import type { Datasource, DatasourceStorage } from "entities/Datasource";
import type {
ApiDatasourceForm,
Authentication,
Expand All @@ -11,12 +11,8 @@ import type {
ApiKey,
BearerToken,
SSL,
} from "../../entities/Datasource/RestAPIForm";
import {
AuthType,
GrantType,
SSLType,
} from "../../entities/Datasource/RestAPIForm";
} from "entities/Datasource/RestAPIForm";
import { AuthType, GrantType, SSLType } from "entities/Datasource/RestAPIForm";
import { get, set } from "lodash";

export const datasourceToFormValues = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import {
extractApiUrlPath,
transformRestAction,
} from "./RestActionTransformer";
import type { ApiAction } from "../../entities/Action";
import { PluginType } from "../../entities/Action";
import type { ApiAction } from "entities/Action";
import { PluginType } from "entities/Action";
import {
HTTP_PROTOCOL,
MultiPartOptionTypes,
POST_BODY_FORMAT_OPTIONS,
// POST_BODY_FORMAT_OPTIONS_ENUM,
} from "../constants/CommonApiConstants";

// jest.mock("POST_");
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/api/helpers/validateJsonResponseMeta.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Sentry from "@sentry/react";
import type { AxiosResponse } from "axios";
import { CONTENT_TYPE_HEADER_KEY } from "../../PluginActionEditor/constants/CommonApiConstants";
import { CONTENT_TYPE_HEADER_KEY } from "PluginActionEditor/constants/CommonApiConstants";

export const validateJsonResponseMeta = (response: AxiosResponse) => {
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getHasExecuteActionPermission } from "ee/utils/BusinessFeatures/permissionPageHelpers";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
import { DEFAULT_DATASOURCE_NAME } from "PluginActionEditor/constants/ApiEditorConstants";
import { UIComponentTypes } from "api/PluginApi";
import { SQL_DATASOURCES } from "constants/QueryEditorConstants";
import { usePluginActionContext } from "PluginActionEditor/PluginActionContext";
import { DEFAULT_DATASOURCE_NAME } from "PluginActionEditor/constants/ApiEditorConstants";

const useBlockExecution = () => {
const { action, plugin } = usePluginActionContext();
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/ce/navigation/FocusElements/AppIDE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ import {
import { getFirstDatasourceId } from "selectors/datasourceSelectors";
import { FocusElement, FocusElementConfigType } from "navigation/FocusElements";
import type { FocusElementsConfigList } from "sagas/FocusRetentionSaga";
import { ActionExecutionResizerHeight } from "../../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";
import {
getPluginActionConfigSelectedTab,
getPluginActionDebuggerState,
setPluginActionEditorDebuggerState,
setPluginActionEditorSelectedTab,
} from "PluginActionEditor/store";
import { EDITOR_TABS } from "constants/QueryEditorConstants";
import { API_EDITOR_TABS } from "../../../PluginActionEditor/constants/CommonApiConstants";
import { API_EDITOR_TABS } from "PluginActionEditor/constants/CommonApiConstants";

export const AppIDEFocusElements: FocusElementsConfigList = {
[FocusEntity.DATASOURCE_LIST]: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { getCodeFromMoustache, getEvaluationVersion } from "../../utils";
import { ApiMethodIcon } from "pages/Editor/Explorer/ExplorerIcons";
import { getCurrentActions } from "ee/selectors/entitiesSelector";
import { useSelector } from "react-redux";
import type { HTTP_METHOD } from "../../../../../PluginActionEditor/constants/CommonApiConstants";
import type { HTTP_METHOD } from "PluginActionEditor/constants/CommonApiConstants";

function GetIconForAction(
actionType: ActionTree["actionType"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { render } from "@testing-library/react";
import ApiResponseView from "components/editorComponents/ApiResponseView";
import ApiResponseView from "./ApiResponseView";
import configureStore from "redux-mock-store";
import { Provider } from "react-redux";
import { ThemeProvider } from "styled-components";
Expand All @@ -12,7 +12,7 @@ import "@testing-library/jest-dom/extend-expect";
import { APIFactory } from "test/factories/Actions/API";
import { noop } from "lodash";

jest.mock("components/editorComponents/EntityBottomTabs", () => ({
jest.mock("./EntityBottomTabs", () => ({
__esModule: true,
default: () => <div />,
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { BottomTab } from "./EntityBottomTabs";
import EntityBottomTabs from "./EntityBottomTabs";
import { DEBUGGER_TAB_KEYS } from "./Debugger/constants";
import { getErrorCount } from "selectors/debuggerSelectors";
import { ActionExecutionResizerHeight } from "../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";
import type { Action } from "entities/Action";
import { EMPTY_RESPONSE } from "./emptyResponse";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from "ee/constants/messages";
import { DEBUGGER_TAB_KEYS } from "./constants";
import EntityBottomTabs from "../EntityBottomTabs";
import { ActionExecutionResizerHeight } from "../../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";
import { IDEBottomView, ViewHideBehaviour, ViewDisplayMode } from "IDE";

function DebuggerTabs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Layers } from "constants/Layers";
import type { RefObject } from "react";
import React, { useState, useEffect } from "react";
import styled, { css } from "styled-components";
import { ActionExecutionResizerHeight } from "../../../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";

export const ResizerCSS = css`
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
import {
DEFAULT_MULTI_PART_DROPDOWN_PLACEHOLDER,
MULTI_PART_DROPDOWN_OPTIONS,
} from "../../../../PluginActionEditor/constants/CommonApiConstants";
} from "PluginActionEditor/constants/CommonApiConstants";
import { Button, Text } from "@appsmith/ads";
import RequestDropdownField from "./RequestDropdownField";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import {
HTTP_PROTOCOL,
HTTP_PROTOCOL_VERSIONS,
} from "../../../PluginActionEditor/constants/CommonApiConstants";
} from "PluginActionEditor/constants/CommonApiConstants";

export default [
{
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/entities/AppsmithConsole/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ReduxAction } from "ee/constants/ReduxActionConstants";
import type LOG_TYPE from "./logtype";
import type { PropertyEvaluationErrorType } from "utils/DynamicBindingUtils";
import type { PluginType } from "entities/Action";
import type { HTTP_METHOD } from "../../PluginActionEditor/constants/CommonApiConstants";
import type { HTTP_METHOD } from "PluginActionEditor/constants/CommonApiConstants";
import type {
ENTITY_TYPE,
PLATFORM_ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import type { CommonFormProps } from "../CommonEditorForm";
import CommonEditorForm from "../CommonEditorForm";
import Pagination from "PluginActionEditor/components/PluginActionForm/components/GraphQLEditor/Pagination";
import { GRAPHQL_HTTP_METHOD_OPTIONS } from "../../../../PluginActionEditor/constants/GraphQLEditorConstants";
import { GRAPHQL_HTTP_METHOD_OPTIONS } from "PluginActionEditor/constants/GraphQLEditorConstants";
import PostBodyData from "PluginActionEditor/components/PluginActionForm/components/GraphQLEditor/PostBodyData";

type APIFormProps = {
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/pages/Editor/DataSourceEditor/Debugger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
getErrorCount,
getResponsePaneHeight,
} from "selectors/debuggerSelectors";
import { ActionExecutionResizerHeight } from "../../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";
import { IDEBottomView, ViewHideBehaviour } from "IDE";

export const ResizerMainContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import type { ReduxAction } from "ee/constants/ReduxActionConstants";
import {
datasourceToFormValues,
formValuesToDatasource,
} from "../../../PluginActionEditor/transformers/RestAPIDatasourceFormTransformer";
} from "PluginActionEditor/transformers/RestAPIDatasourceFormTransformer";
import type {
ApiDatasourceForm,
AuthorizationCode,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/pages/Editor/DataSourceEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import {
} from "components/formControls/utils";
import type { ControlProps } from "components/formControls/BaseControl";
import type { ApiDatasourceForm } from "entities/Datasource/RestAPIForm";
import { formValuesToDatasource } from "../../../PluginActionEditor/transformers/RestAPIDatasourceFormTransformer";
import { formValuesToDatasource } from "PluginActionEditor/transformers/RestAPIDatasourceFormTransformer";
import { DSFormHeader } from "./DSFormHeader";
import type { PluginType } from "entities/Action";
import { PluginPackageName } from "entities/Action";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import type { DropdownOptions } from "../GeneratePage/components/constants";
import { DEFAULT_DROPDOWN_OPTION } from "../GeneratePage/components/constants";
import { isEmpty } from "lodash";
import Table from "../../../PluginActionEditor/components/PluginActionResponse/components/Table";
import Table from "PluginActionEditor/components/PluginActionResponse/components/Table";
import {
getCurrentApplicationId,
getPagePermissions,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { call, delay, put } from "redux-saga/effects";
import type { EntityInfo, IApiPaneNavigationConfig } from "../types";
import { ActionPaneNavigation } from "./exports";
import { API_EDITOR_TABS } from "../../../../PluginActionEditor/constants/CommonApiConstants";
import { API_EDITOR_TABS } from "PluginActionEditor/constants/CommonApiConstants";
import { setPluginActionEditorSelectedTab } from "PluginActionEditor/store";
import { NAVIGATION_DELAY } from "../costants";

Expand Down
6 changes: 4 additions & 2 deletions app/client/src/pages/Editor/Explorer/ExplorerIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { MenuIcons } from "icons/MenuIcons";
import type { Plugin } from "api/PluginApi";
import ImageAlt from "assets/images/placeholder-image.svg";
import styled from "styled-components";
import type { HTTP_METHOD } from "../../../PluginActionEditor/constants/CommonApiConstants";
import { HTTP_METHODS_COLOR } from "../../../PluginActionEditor/constants/CommonApiConstants";
import {
HTTP_METHODS_COLOR,
type HTTP_METHOD,
} from "PluginActionEditor/constants/CommonApiConstants";
import { PRIMARY_KEY, FOREIGN_KEY } from "constants/DatasourceEditorConstants";
import { Icon } from "@appsmith/ads";
import { getAssetUrl } from "ee/utils/airgapHelpers";
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/pages/Editor/FormControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
} from "ee/selectors/entitiesSelector";
import { get } from "lodash";
import { SQL_PLUGINS_DEFAULT_TEMPLATE_TYPE } from "constants/Datasource";
import TemplateMenu from "../../PluginActionEditor/components/PluginActionForm/components/UQIEditor/TemplateMenu";
import { SQL_DATASOURCES } from "../../constants/QueryEditorConstants";
import TemplateMenu from "PluginActionEditor/components/PluginActionForm/components/UQIEditor/TemplateMenu";
import { SQL_DATASOURCES } from "constants/QueryEditorConstants";
import type { Datasource, DatasourceStructure } from "entities/Datasource";
import { getCurrentEditingEnvironmentId } from "ee/selectors/environmentSelectors";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from "react";
import { render, screen } from "test/testUtils";
import "@testing-library/jest-dom";
import Table from "../../../PluginActionEditor/components/PluginActionResponse/components/Table";
import { getScrollBarWidth } from "../../../PluginActionEditor/components/PluginActionResponse/components/Table";
import Table, {
getScrollBarWidth,
} from "PluginActionEditor/components/PluginActionResponse/components/Table";

function createEle() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ReduxAction } from "ee/constants/ReduxActionConstants";
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
import type { Datasource } from "entities/Datasource";
import _ from "lodash";
import { ActionExecutionResizerHeight } from "../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";

const initialState: DatasourcePaneReduxState = {
drafts: {},
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/reducers/uiReducers/debuggerReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ReduxAction } from "ee/constants/ReduxActionConstants";
import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
import { omit, isUndefined, isEmpty } from "lodash";
import equal from "fast-deep-equal";
import { ActionExecutionResizerHeight } from "../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";
import { klona } from "klona";

export const DefaultDebuggerContext = {
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/reducers/uiReducers/jsPaneReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ReduxActionErrorTypes,
} from "ee/constants/ReduxActionConstants";
import type { JSCollection } from "entities/JSCollection";
import { ActionExecutionResizerHeight } from "../../PluginActionEditor/components/PluginActionResponse/constants";
import { ActionExecutionResizerHeight } from "PluginActionEditor/components/PluginActionResponse/constants";

export enum JSEditorTab {
CODE = "CODE",
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/sagas/ActionSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ import {
API_EDITOR_FORM_NAME,
QUERY_EDITOR_FORM_NAME,
} from "ee/constants/forms";
import { DEFAULT_GRAPHQL_ACTION_CONFIG } from "../PluginActionEditor/constants/GraphQLEditorConstants";
import { DEFAULT_API_ACTION_CONFIG } from "../PluginActionEditor/constants/ApiEditorConstants";
import { DEFAULT_GRAPHQL_ACTION_CONFIG } from "PluginActionEditor/constants/GraphQLEditorConstants";
import { DEFAULT_API_ACTION_CONFIG } from "PluginActionEditor/constants/ApiEditorConstants";
import { fetchDatasourceStructure } from "actions/datasourceActions";
import { setAIPromptTriggered } from "utils/storage";
import { getDefaultTemplateActionConfig } from "utils/editorContextUtils";
Expand Down
10 changes: 5 additions & 5 deletions app/client/src/sagas/ApiPaneSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import {
HTTP_METHOD,
POST_BODY_FORMAT_OPTIONS,
POST_BODY_FORMAT_OPTIONS_ARRAY,
} from "../PluginActionEditor/constants/CommonApiConstants";
import { DEFAULT_CREATE_API_CONFIG } from "../PluginActionEditor/constants/ApiEditorConstants";
import { DEFAULT_CREATE_GRAPHQL_CONFIG } from "../PluginActionEditor/constants/GraphQLEditorConstants";
} from "PluginActionEditor/constants/CommonApiConstants";
import { DEFAULT_CREATE_API_CONFIG } from "PluginActionEditor/constants/ApiEditorConstants";
import { DEFAULT_CREATE_GRAPHQL_CONFIG } from "PluginActionEditor/constants/GraphQLEditorConstants";
import history from "utils/history";
import { autofill, change, initialize, reset } from "redux-form";
import type { Property } from "api/ActionAPI";
Expand Down Expand Up @@ -78,12 +78,12 @@ import {
getApplicationByIdFromWorkspaces,
getCurrentApplicationIdForCreateNewApp,
} from "ee/selectors/applicationSelectors";
import { DEFAULT_CREATE_APPSMITH_AI_CONFIG } from "../PluginActionEditor/constants/AppsmithAIEditorConstants";
import { DEFAULT_CREATE_APPSMITH_AI_CONFIG } from "PluginActionEditor/constants/AppsmithAIEditorConstants";
import { checkAndGetPluginFormConfigsSaga } from "./PluginSagas";
import { convertToBasePageIdSelector } from "selectors/pageListSelectors";
import type { ApplicationPayload } from "entities/Application";
import { klonaLiteWithTelemetry } from "utils/helpers";
import { POST_BODY_FORM_DATA_KEY } from "../PluginActionEditor/store/constants";
import { POST_BODY_FORM_DATA_KEY } from "PluginActionEditor/store/constants";

function* syncApiParamsSaga(
actionPayload: ReduxActionWithMeta<string, { field: string }>,
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/sagas/ReplaySaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import {
isQueryAction,
isSaaSAction,
} from "entities/Action";
import { API_EDITOR_TABS } from "../PluginActionEditor/constants/CommonApiConstants";
import { API_EDITOR_TABS } from "PluginActionEditor/constants/CommonApiConstants";
import { EDITOR_TABS } from "constants/QueryEditorConstants";
import _, { isEmpty } from "lodash";
import type { ReplayEditorUpdate } from "entities/Replay/ReplayEntity/ReplayEditor";
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/utils/ApiPaneUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { POST_BODY_FORMAT_OPTIONS } from "../PluginActionEditor/constants/CommonApiConstants";
import { POST_BODY_FORMAT_OPTIONS } from "PluginActionEditor/constants/CommonApiConstants";
import {
getContentTypeHeaderValue,
getIndextoUpdate,
Expand Down

0 comments on commit 38b5128

Please sign in to comment.