{/* BACK BUTTON */}
{props.isPanelTitle && (
diff --git a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx
index a3c97d624f1..0721f3ae295 100644
--- a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx
+++ b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx
@@ -11,7 +11,6 @@ import styled from "styled-components";
import FormRow from "components/editorComponents/FormRow";
import {
createMessage,
- DEBUGGER_RESPONSE,
DOCUMENTATION,
DOCUMENTATION_TOOLTIP,
} from "ee/constants/messages";
@@ -29,17 +28,12 @@ import { setQueryPaneConfigSelectedTabIndex } from "actions/queryPaneActions";
import type { SourceEntity } from "entities/AppsmithConsole";
import { ENTITY_TYPE as SOURCE_ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils";
import { DocsLink, openDoc } from "../../../constants/DocumentationLinks";
-import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
-import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { QueryEditorContext } from "./QueryEditorContext";
import QueryDebuggerTabs from "./QueryDebuggerTabs";
import useShowSchema from "components/editorComponents/ActionRightPane/useShowSchema";
import { doesPluginRequireDatasource } from "ee/entities/Engine/actionHelpers";
import FormRender from "./FormRender";
import QueryEditorHeader from "./QueryEditorHeader";
-import ActionEditor from "../IDE/EditorPane/components/ActionEditor";
-import QueryResponseTab from "./QueryResponseTab";
-import DatasourceSelector from "./DatasourceSelector";
import RunHistory from "ee/components/RunHistory";
const QueryFormContainer = styled.form`
@@ -227,10 +221,6 @@ export function EditorJSONtoForm(props: Props) {
useShowSchema(currentActionConfig?.pluginId || "") &&
pluginRequireDatasource;
- const isActionRedesignEnabled = useFeatureFlag(
- FEATURE_FLAG.release_actions_redesign_enabled,
- );
-
const dispatch = useDispatch();
const handleDocumentationClick = () => {
@@ -256,59 +246,6 @@ export function EditorJSONtoForm(props: Props) {
return null;
}
- if (isActionRedesignEnabled && plugin) {
- const responseTabs = [];
- if (currentActionConfig) {
- responseTabs.push({
- key: "response",
- title: createMessage(DEBUGGER_RESPONSE),
- panelComponent: (
-
- ),
- });
- }
- return (
-
- }
- settingsRender={
-
-
-
- }
- tabs={responseTabs}
- >
-
-
- );
- }
-
return (
<>
{closeEditorLink}
diff --git a/app/client/src/pages/Editor/QueryEditor/index.tsx b/app/client/src/pages/Editor/QueryEditor/index.tsx
index c6135365eca..58cfb59d5ce 100644
--- a/app/client/src/pages/Editor/QueryEditor/index.tsx
+++ b/app/client/src/pages/Editor/QueryEditor/index.tsx
@@ -41,6 +41,7 @@ import { resolveIcon } from "../utils";
import { ENTITY_ICON_SIZE, EntityIcon } from "../Explorer/ExplorerIcons";
import { getIDEViewMode } from "selectors/ideSelectors";
import { EditorViewMode } from "ee/entities/IDE/constants";
+import { AppPluginActionEditor } from "../AppPluginActionEditor";
type QueryEditorProps = RouteComponentProps
;
@@ -188,6 +189,14 @@ function QueryEditor(props: QueryEditorProps) {
);
}, [action?.name, isConverting]);
+ const isActionRedesignEnabled = useFeatureFlag(
+ FEATURE_FLAG.release_actions_redesign_enabled,
+ );
+
+ if (isActionRedesignEnabled) {
+ return ;
+ }
+
return (
{
appState === EditorState.SETTINGS && isNavigationSelectedInSettings;
return (
-
+
);
};
diff --git a/app/client/src/pages/Editor/WidgetsEditor/components/PropertyPaneWrapper.tsx b/app/client/src/pages/Editor/WidgetsEditor/components/PropertyPaneWrapper.tsx
index 64b5a3f1bad..4c75e561928 100644
--- a/app/client/src/pages/Editor/WidgetsEditor/components/PropertyPaneWrapper.tsx
+++ b/app/client/src/pages/Editor/WidgetsEditor/components/PropertyPaneWrapper.tsx
@@ -1,8 +1,5 @@
-import { setPropertyPaneWidthAction } from "actions/propertyPaneActions";
+import React from "react";
import PropertyPaneSidebar from "components/editorComponents/PropertyPaneSidebar";
-import React, { useCallback } from "react";
-import { useDispatch, useSelector } from "react-redux";
-import { getPropertyPaneWidth } from "selectors/propertyPaneSelectors";
import { CreateNewQueryModal } from "pages/Editor/IDE/RightPane/components/CreateNewQueryModal";
/**
@@ -12,32 +9,9 @@ import { CreateNewQueryModal } from "pages/Editor/IDE/RightPane/components/Creat
* It is used to handle the width of the property pane sidebar.
*/
function PropertyPaneWrapper() {
- const dispatch = useDispatch();
- const propertyPaneWidth = useSelector(getPropertyPaneWidth);
-
- /**
- * on property pane sidebar drag end
- *
- * @return void
- */
- const onRightSidebarDragEnd = useCallback(() => {
- dispatch(setPropertyPaneWidthAction(propertyPaneWidth));
- }, [propertyPaneWidth]);
-
- /**
- * on property pane sidebar width change
- */
- const onRightSidebarWidthChange = useCallback((newWidth) => {
- dispatch(setPropertyPaneWidthAction(newWidth));
- }, []);
-
return (
<>
-
+
>
);
diff --git a/app/client/src/pages/Editor/commons/EditorHeaderComponents.tsx b/app/client/src/pages/Editor/commons/EditorHeaderComponents.tsx
index ba8f67913cd..cdaaa0859f3 100644
--- a/app/client/src/pages/Editor/commons/EditorHeaderComponents.tsx
+++ b/app/client/src/pages/Editor/commons/EditorHeaderComponents.tsx
@@ -1,6 +1,7 @@
import styled from "styled-components";
import { Profile } from "pages/common/ProfileImage";
import { getTypographyByKey } from "@appsmith/ads-old";
+import { IDE_HEADER_HEIGHT } from "IDE";
export const HeaderWrapper = styled.div`
width: 100%;
@@ -10,7 +11,7 @@ export const HeaderWrapper = styled.div`
flex-direction: row;
box-shadow: none;
border-bottom: 1px solid var(--ads-v2-color-border);
- height: ${(props) => props.theme.smallHeaderHeight};
+ height: ${IDE_HEADER_HEIGHT}px;
& .editable-application-name {
${getTypographyByKey("h4")}
color: ${(props) => props.theme.colors.header.appName};
diff --git a/app/client/src/pages/Editor/commons/EditorSettingsPaneContainer.tsx b/app/client/src/pages/Editor/commons/EditorSettingsPaneContainer.tsx
index 80fea699a8e..bd395031087 100644
--- a/app/client/src/pages/Editor/commons/EditorSettingsPaneContainer.tsx
+++ b/app/client/src/pages/Editor/commons/EditorSettingsPaneContainer.tsx
@@ -1,4 +1,3 @@
-import { APP_SETTINGS_PANE_WIDTH } from "constants/AppConstants";
import React from "react";
import styled from "styled-components";
import PaneHeader from "../IDE/LeftPane/PaneHeader";
@@ -10,7 +9,7 @@ type EditorSettingsPaneContainerProps = React.PropsWithChildren<{
const SettingsPageWrapper = styled.div`
display: flex;
flex-direction: column;
- width: ${APP_SETTINGS_PANE_WIDTH}px;
+ width: 100%;
&:nth-child(2) {
height: 100%;
diff --git a/app/client/src/pages/Editor/commons/EditorWrapperContainer.tsx b/app/client/src/pages/Editor/commons/EditorWrapperContainer.tsx
index 9bbd48c2e06..f9ba9ab873e 100644
--- a/app/client/src/pages/Editor/commons/EditorWrapperContainer.tsx
+++ b/app/client/src/pages/Editor/commons/EditorWrapperContainer.tsx
@@ -4,6 +4,9 @@ import classNames from "classnames";
import { useSelector } from "react-redux";
import { combinedPreviewModeSelector } from "../../../selectors/editorSelectors";
import { protectedModeSelector } from "selectors/gitSyncSelectors";
+import { IDE_HEADER_HEIGHT } from "../../../IDE";
+import { BOTTOM_BAR_HEIGHT } from "../../../components/BottomBar/constants";
+import { PROTECTED_CALLOUT_HEIGHT } from "../IDE/ProtectedCallout";
interface EditorWrapperContainerProps {
children: React.ReactNode;
@@ -14,9 +17,9 @@ const Wrapper = styled.div<{
}>`
display: flex;
height: calc(
- 100vh - ${(props) => props.theme.smallHeaderHeight} -
- ${(props) => props.theme.bottomBarHeight} -
- ${(props) => (props.isProtectedMode ? "70px" : "0px")}
+ 100vh - ${IDE_HEADER_HEIGHT}px - ${BOTTOM_BAR_HEIGHT}px -
+ ${(props) =>
+ props.isProtectedMode ? PROTECTED_CALLOUT_HEIGHT + "px" : "0px"}
);
background-color: ${(props) => props.theme.appBackground};
`;
diff --git a/app/client/src/pages/Editor/commons/Omnibar.tsx b/app/client/src/pages/Editor/commons/Omnibar.tsx
index 291286023bf..0c2fa611f3f 100644
--- a/app/client/src/pages/Editor/commons/Omnibar.tsx
+++ b/app/client/src/pages/Editor/commons/Omnibar.tsx
@@ -3,13 +3,14 @@ import styled from "styled-components";
import { snipingModeSelector } from "selectors/editorSelectors";
import { retryPromise } from "utils/AppsmithUtils";
import { useSelector } from "react-redux";
+import { IDE_HEADER_HEIGHT } from "IDE";
const BindingBanner = styled.div`
position: fixed;
width: 199px;
height: 36px;
left: 50%;
- top: ${(props) => props.theme.smallHeaderHeight};
+ top: ${IDE_HEADER_HEIGHT}px;
transform: translate(-50%, 0);
text-align: center;
background: var(--ads-v2-color-fg-information);
diff --git a/app/client/src/pages/Editor/gitSync/components/GitErrorPopup.tsx b/app/client/src/pages/Editor/gitSync/components/GitErrorPopup.tsx
index 181714cb73b..f86b4f4ee7c 100644
--- a/app/client/src/pages/Editor/gitSync/components/GitErrorPopup.tsx
+++ b/app/client/src/pages/Editor/gitSync/components/GitErrorPopup.tsx
@@ -17,6 +17,7 @@ import { Colors } from "constants/Colors";
import ConflictInfo from "../components/ConflictInfo";
import { getCurrentAppGitMetaData } from "ee/selectors/applicationSelectors";
import { Button } from "@appsmith/ads";
+import { BOTTOM_BAR_HEIGHT } from "../../../../components/BottomBar/constants";
const StyledGitErrorPopup = styled.div`
& {
@@ -31,7 +32,7 @@ const StyledGitErrorPopup = styled.div`
.${Classes.OVERLAY_CONTENT} {
overflow: hidden;
bottom: ${(props) =>
- `calc(${props.theme.bottomBarHeight} + ${props.theme.spaces[3]}px)`};
+ `calc(${BOTTOM_BAR_HEIGHT}px + ${props.theme.spaces[3]}px)`};
left: ${(props) => props.theme.spaces[3]}px;
background-color: ${Colors.WHITE};
}
diff --git a/app/client/src/pages/Editor/index.tsx b/app/client/src/pages/Editor/index.tsx
index 435f7e7f744..bd9230a97b6 100644
--- a/app/client/src/pages/Editor/index.tsx
+++ b/app/client/src/pages/Editor/index.tsx
@@ -50,6 +50,7 @@ import { PartialExportModal } from "components/editorComponents/PartialImportExp
import { PartialImportModal } from "components/editorComponents/PartialImportExport/PartialImportModal";
import type { Page } from "entities/Page";
import { AppCURLImportModal } from "ee/pages/Editor/CurlImport";
+import { IDE_HEADER_HEIGHT } from "IDE";
interface EditorProps {
currentApplicationId?: string;
@@ -175,7 +176,7 @@ class Editor extends Component {
if (!this.props.isEditorInitialized || this.props.loadingGuidedTour) {
return (
diff --git a/app/client/src/pages/UserProfile/index.test.tsx b/app/client/src/pages/UserProfile/index.test.tsx
index aa57ee2d919..f9e6ffe3653 100644
--- a/app/client/src/pages/UserProfile/index.test.tsx
+++ b/app/client/src/pages/UserProfile/index.test.tsx
@@ -1,6 +1,6 @@
import "@testing-library/jest-dom/extend-expect";
import React from "react";
-import { render, screen, fireEvent } from "@testing-library/react";
+import { render } from "@testing-library/react";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import { lightTheme } from "selectors/themeSelectors";
@@ -87,15 +87,6 @@ jest.mock("actions/gitSyncActions", () => ({
fetchGlobalGitConfigInit: jest.fn(),
}));
-const mockHistoryPush = jest.fn();
-
-jest.mock("react-router-dom", () => ({
- ...jest.requireActual("react-router-dom"),
- useHistory: () => ({
- push: mockHistoryPush,
- }),
-}));
-
const mockStore = configureStore([]);
describe("Git config ", () => {
// TODO: Fix this the next time the file is edited
@@ -137,22 +128,6 @@ describe("Git config ", () => {
expect(getAllByText("Sign in to your account")).toBeInTheDocument;
});
- it("should call history push when user goes back to applications", () => {
- store = mockStore(defaultStoreState);
- render(
-
-
-
-
-
-
- ,
- );
- const backButton = screen.getByText("Back");
- fireEvent.click(backButton);
- expect(mockHistoryPush).toHaveBeenCalledWith("/applications");
- });
-
afterAll(() => {
jest.clearAllMocks();
store.clearActions();
diff --git a/app/client/src/pages/UserProfile/index.tsx b/app/client/src/pages/UserProfile/index.tsx
index bf7de701ef7..2cfb2fee9fb 100644
--- a/app/client/src/pages/UserProfile/index.tsx
+++ b/app/client/src/pages/UserProfile/index.tsx
@@ -56,7 +56,7 @@ function UserProfile() {
return (
-
+
{tabs.map((tab) => {
diff --git a/app/client/src/pages/workspace/__tests__/settings.test.tsx b/app/client/src/pages/workspace/__tests__/settings.test.tsx
index 3e488f3fb4c..fdcbea9eb15 100644
--- a/app/client/src/pages/workspace/__tests__/settings.test.tsx
+++ b/app/client/src/pages/workspace/__tests__/settings.test.tsx
@@ -1,17 +1,9 @@
import React from "react";
import "@testing-library/jest-dom";
import Router from "react-router-dom";
-import { BrowserRouter } from "react-router-dom";
import { render, screen } from "test/testUtils";
-import {
- render as testRender,
- screen as testScreen,
-} from "@testing-library/react";
-import { fireEvent } from "@testing-library/react";
import Settings from "../settings";
import * as reactRedux from "react-redux";
-import configureStore from "redux-mock-store";
-import { Provider } from "react-redux";
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -159,16 +151,9 @@ const mockWorkspaceData = {
new: false,
};
-const mockHistoryPush = jest.fn();
-
-const mockStore = configureStore([]);
-
jest.mock("react-router-dom", () => ({
...jest.requireActual("react-router-dom"),
useParams: jest.fn(),
- useHistory: () => ({
- push: mockHistoryPush,
- }),
}));
function renderComponent() {
@@ -205,19 +190,4 @@ describe("", () => {
expect(tabList.length).toBeGreaterThanOrEqual(2);
expect(tabList.length).toBeLessThanOrEqual(3);
});
-
- it("should redirect to workspace page if user wants to go back", () => {
- testRender(
-
-
-
-
- ,
- );
- const backBtn = testScreen.getByText("Back");
- fireEvent.click(backBtn);
- expect(mockHistoryPush).toHaveBeenCalledWith(
- `/applications?workspaceId=${mockWorkspaceData.id}`,
- );
- });
});
diff --git a/app/client/src/pages/workspace/settings.tsx b/app/client/src/pages/workspace/settings.tsx
index 1c5ab878d55..0d4567c9325 100644
--- a/app/client/src/pages/workspace/settings.tsx
+++ b/app/client/src/pages/workspace/settings.tsx
@@ -127,7 +127,7 @@ export default function Settings() {
<>
-
+
{
return initialState;
},
+ [ReduxActionTypes.FETCH_CURRENT_TENANT_CONFIG_SUCCESS]: (
+ state: ErrorReduxState,
+ ) => {
+ if (
+ state?.currentError?.sourceAction === "FETCH_CURRENT_TENANT_CONFIG_ERROR"
+ ) {
+ return {
+ ...state,
+ ...initialState,
+ };
+ }
+ return state;
+ },
+ [ReduxActionTypes.UPDATE_TENANT_CONFIG_SUCCESS]: (state: ErrorReduxState) => {
+ if (state?.currentError?.sourceAction === "UPDATE_TENANT_CONFIG_ERROR") {
+ return {
+ ...state,
+ ...initialState,
+ };
+ }
+ return state;
+ },
});
export interface ErrorReduxState {
diff --git a/app/client/src/sagas/DatasourcesSagas.ts b/app/client/src/sagas/DatasourcesSagas.ts
index b05c609664e..8d9b77bf4e3 100644
--- a/app/client/src/sagas/DatasourcesSagas.ts
+++ b/app/client/src/sagas/DatasourcesSagas.ts
@@ -929,7 +929,7 @@ function* testDatasourceSaga(actionPayload: ReduxAction) {
id: datasource.id,
environmentId: currentEnvironment,
show: true,
- error: { message: responseData.invalids.join(", ") },
+ error: { message: responseData.invalids.join("\n") },
},
});
AppsmithConsole.error({
diff --git a/app/client/src/widgets/TableWidgetV2/widget/derived.js b/app/client/src/widgets/TableWidgetV2/widget/derived.js
index ad69270fa97..aa5873dd548 100644
--- a/app/client/src/widgets/TableWidgetV2/widget/derived.js
+++ b/app/client/src/widgets/TableWidgetV2/widget/derived.js
@@ -342,12 +342,46 @@ export default {
const newRow = { ...row };
selectColumnKeysWithSortByLabel.forEach((key) => {
const value = row[key];
- const selectOptions =
- primaryColumns[key].selectOptions[row.__originalIndex__];
- const option = selectOptions.find((option) => option.value === value);
+ const isSelectOptionsAnArray = _.isArray(
+ primaryColumns[key].selectOptions,
+ );
+
+ let selectOptions;
- if (option) {
- newRow[key] = option.label;
+ /*
+ * If selectOptions is an array, check if it contains nested arrays.
+ * This is to handle situations where selectOptons is a javascript object and computes as a nested array.
+ */
+ if (isSelectOptionsAnArray) {
+ if (_.some(primaryColumns[key].selectOptions, _.isArray)) {
+ /* Handle the case where selectOptions contains nested arrays - selectOptions is javascript */
+ selectOptions =
+ primaryColumns[key].selectOptions[row.__originalIndex__];
+ const option = selectOptions.find((option) => {
+ return option.value === value;
+ });
+ if (option) {
+ newRow[key] = option.label;
+ }
+ } else {
+ /* Handle the case where selectOptions is a flat array - selectOptions is plain JSON */
+ selectOptions = primaryColumns[key].selectOptions;
+ const option = selectOptions.find(
+ (option) => option.value === value,
+ );
+ if (option) {
+ newRow[key] = option.label;
+ }
+ }
+ } else {
+ /* If selectOptions is not an array, parse it as JSON - not evaluated yet, so returns as string */
+ selectOptions = JSON.parse(primaryColumns[key].selectOptions);
+ const option = selectOptions.find(
+ (option) => option.value === value,
+ );
+ if (option) {
+ newRow[key] = option.label;
+ }
}
});
@@ -450,18 +484,55 @@ export default {
}
});
+ /*
+ * When sorting is done, transform the data back to its original state
+ * where table data shows value instead of label
+ */
if (selectColumnKeysWithSortByLabel.length) {
const transformedLabelToValueData = sortedTableData.map((row) => {
const newRow = { ...row };
selectColumnKeysWithSortByLabel.forEach((key) => {
const label = row[key];
- const selectOptions =
- primaryColumns[key].selectOptions[row.__originalIndex__];
- const option = selectOptions.find(
- (option) => option.label === label,
+ const isSelectOptionsAnArray = _.isArray(
+ primaryColumns[key].selectOptions,
);
- if (option) {
- newRow[key] = option.value;
+
+ let selectOptions;
+
+ /*
+ * If selectOptions is an array, check if it contains nested arrays.
+ * This is to handle situations where selectOptons is a javascript object and computes as a nested array.
+ */
+ if (isSelectOptionsAnArray) {
+ if (_.some(primaryColumns[key].selectOptions, _.isArray)) {
+ /* Handle the case where selectOptions contains nested arrays - selectOptions is javascript */
+ selectOptions =
+ primaryColumns[key].selectOptions[row.__originalIndex__];
+ const option = selectOptions.find((option) => {
+ return option.label === label;
+ });
+ if (option) {
+ newRow[key] = option.value;
+ }
+ } else {
+ /* Handle the case where selectOptions is a flat array - selectOptions is plain JSON */
+ selectOptions = primaryColumns[key].selectOptions;
+ const option = selectOptions.find(
+ (option) => option.label === label,
+ );
+ if (option) {
+ newRow[key] = option.value;
+ }
+ }
+ } else {
+ /* If selectOptions is not an array, parse it as JSON - not evaluated yet, so returns as string */
+ selectOptions = JSON.parse(primaryColumns[key].selectOptions);
+ const option = selectOptions.find(
+ (option) => option.label === label,
+ );
+ if (option) {
+ newRow[key] = option.value;
+ }
}
});
@@ -587,8 +658,83 @@ export default {
const columnWithDisplayText = Object.values(props.primaryColumns).filter(
(column) => column.columnType === "url" && column.displayText,
);
+
+ /*
+ * For select columns with label and values, we need to include the label value
+ * in the search
+ */
+ let labelValueForSelectCell = "";
+ /*
+ * Initialize an array to store keys for columns that have the 'select' column type
+ * and contain selectOptions.
+ */
+ const selectColumnKeys = [];
+ /*
+ * Iterate over the primary columns to identify which columns are of type 'select'
+ * and have selectOptions. These keys are pushed into the selectColumnKeys array.
+ */
+ Object.entries(props.primaryColumns).forEach(([id, column]) => {
+ const isColumnSelectColumnType =
+ column?.columnType === "select" && column?.selectOptions?.length;
+ if (isColumnSelectColumnType) {
+ selectColumnKeys.push(id);
+ }
+ });
+ /*
+ * If there are any select columns, iterate over them to find the label value
+ * associated with the selected value in each row.
+ */
+ if (selectColumnKeys.length) {
+ selectColumnKeys.forEach((key) => {
+ const value = row[key];
+
+ const isSelectOptionsAnArray = _.isArray(
+ primaryColumns[key].selectOptions,
+ );
+
+ let selectOptions;
+
+ /*
+ * If selectOptions is an array, check if it contains nested arrays.
+ * This is to handle situations where selectOptons is a javascript object and computes as a nested array.
+ */
+ if (isSelectOptionsAnArray) {
+ if (_.some(primaryColumns[key].selectOptions, _.isArray)) {
+ /* Handle the case where selectOptions contains nested arrays - selectOptions is javascript */
+ selectOptions =
+ primaryColumns[key].selectOptions[row.__originalIndex__];
+ const option = selectOptions.find((option) => {
+ return option.value === value;
+ });
+ if (option) {
+ labelValueForSelectCell = option.label;
+ }
+ } else {
+ /* Handle the case where selectOptions is a flat array - selectOptions is plain JSON */
+ selectOptions = primaryColumns[key].selectOptions;
+ const option = selectOptions.find(
+ (option) => option.value === value,
+ );
+ if (option) {
+ labelValueForSelectCell = option.label;
+ }
+ }
+ } else {
+ /* If selectOptions is not an array, parse it as JSON - not evaluated yet, so returns as string */
+ selectOptions = JSON.parse(primaryColumns[key].selectOptions);
+ const option = selectOptions.find(
+ (option) => option.value === value,
+ );
+ if (option) {
+ labelValueForSelectCell = option.label;
+ }
+ }
+ });
+ }
+
const displayedRow = {
...row,
+ labelValueForSelectCell,
...columnWithDisplayText.reduce((acc, column) => {
let displayText;
if (_.isArray(column.displayText)) {
diff --git a/app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts b/app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
index 83067483739..356d2155a85 100644
--- a/app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
+++ b/app/client/src/widgets/wds/WDSComboBoxWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
@@ -77,6 +77,22 @@ export function optionsCustomValidation(
});
}
+ const isValidKeys = options.every((option) => {
+ return (
+ _.isPlainObject(option) &&
+ _.has(option, "label") &&
+ _.has(option, "value")
+ );
+ });
+
+ if (!isValidKeys) {
+ return createErrorValidationResponse(options, {
+ name: "ValidationError",
+ message:
+ 'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
+ });
+ }
+
for (let i = 0; i < options.length; i++) {
const option = options[i];
diff --git a/app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx b/app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx
index 116fe24ee6a..e75189a06f5 100644
--- a/app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx
+++ b/app/client/src/widgets/wds/WDSComboBoxWidget/widget/index.tsx
@@ -152,7 +152,11 @@ class WDSComboBoxWidget extends BaseWidget<
id: option["value"] as string,
}));
- return items;
+ const isValidItems = items.every(
+ (item) => item.label !== undefined && item.id !== undefined,
+ );
+
+ return isValidItems ? items : [];
}
return [];
diff --git a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts
index ef68eec86d7..9466f1c8a93 100644
--- a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts
+++ b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/contentConfig.ts
@@ -1,237 +1,16 @@
-import {
- ValidationTypes,
- type ValidationResponse,
-} from "constants/WidgetValidation";
-import { get, isPlainObject, uniq, type LoDashStatic } from "lodash";
-import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
-
+import { ValidationTypes } from "constants/WidgetValidation";
import { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory";
-import { EVAL_VALUE_PATH } from "../../../../../utils/DynamicBindingUtils";
-import type { PropertyUpdates } from "../../../../../WidgetProvider/constants";
-import type { WidgetProps } from "../../../../BaseWidget";
+import { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType";
import type { WDSSelectWidgetProps } from "../../widget/types";
import {
defaultOptionValidation,
optionsCustomValidation,
} from "./validations";
+import type { WidgetProps } from "../../../../BaseWidget";
+import type { PropertyUpdates } from "../../../../../WidgetProvider/constants";
type WidgetTypeValue = "SELECT" | "COMBOBOX";
-interface ValidationErrorMessage {
- name: string;
- message: string;
-}
-
-export const getOptionLabelValueExpressionPrefix = (widget: WidgetProps) =>
- `{{${widget.widgetName}.sourceData.map((item) => (`;
-
-export const optionLabelValueExpressionSuffix = `))}}`;
-
-export function getLabelValueKeyOptions(
- widget: WidgetProps,
-): Record[] {
- // UTILS
- const isTrueObject = (item: unknown): item is Record => {
- return Object.prototype.toString.call(item) === "[object Object]";
- };
-
- const sourceData = get(widget, `${EVAL_VALUE_PATH}.options`);
- const widgetOptions = get(widget, "options");
- const options = sourceData || widgetOptions;
-
- // Is Form mode, otherwise it is JS mode
- if (Array.isArray(widgetOptions)) {
- return options.map((option: Record | string) => {
- if (isTrueObject(option)) {
- return {
- label: option[widget.optionLabel],
- value: option[widget.optionValue],
- };
- }
-
- return [];
- });
- }
-
- if (Array.isArray(options)) {
- const x = uniq(
- options.reduce((keys, obj) => {
- if (isPlainObject(obj)) {
- Object.keys(obj).forEach((d) => keys.push(d));
- }
-
- return keys;
- }, []),
- ).map((d: unknown) => ({
- label: d,
- value: d,
- }));
-
- return x;
- } else {
- return [];
- }
-}
-
-export function labelKeyValidation(
- value: unknown,
- widgetProps: WDSSelectWidgetProps,
- _: LoDashStatic,
-) {
- // UTILS
- const hasDuplicates = (array: unknown[]): boolean => {
- const set = new Set(array);
-
- return set.size !== array.length;
- };
-
- const createErrorValidationResponse = (
- value: unknown,
- message: ValidationErrorMessage,
- ): ValidationResponse => ({
- isValid: false,
- parsed: value,
- messages: [message],
- });
-
- const createSuccessValidationResponse = (
- value: unknown,
- ): ValidationResponse => ({
- isValid: true,
- parsed: value,
- });
-
- if (value === "" || _.isNil(value)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: `value does not evaluate to type: string | Array`,
- });
- }
-
- if (Array.isArray(widgetProps.options)) {
- const values = _.map(widgetProps.options, (option) => {
- return option[widgetProps.optionLabel];
- }).filter((d) => d);
-
- if (values.length && hasDuplicates(values)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: "Duplicate values found, value must be unique",
- });
- }
- }
-
- if (_.isString(value)) {
- const keys = _.map(widgetProps.options, _.keys).flat();
-
- if (!keys.includes(value)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: "value key should be present in the options",
- });
- }
-
- return createSuccessValidationResponse(value);
- } else if (_.isArray(value)) {
- const errorIndex = value.findIndex((d) => !_.isString(d));
-
- if (errorIndex === -1) {
- return createSuccessValidationResponse(value);
- }
-
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: `Invalid entry at index: ${errorIndex}. This value does not evaluate to type: string`,
- });
- } else {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: `value does not evaluate to type: string | Array`,
- });
- }
-}
-
-export function getLabelValueAdditionalAutocompleteData(props: WidgetProps) {
- const keys = getLabelValueKeyOptions(props);
-
- return {
- item: keys
- .map((d) => d.label)
- .reduce((prev: Record, curr: unknown) => {
- prev[curr as string] = "";
-
- return prev;
- }, {}),
- };
-}
-
-export function valueKeyValidation(
- value: unknown,
- widgetProps: WDSSelectWidgetProps,
- _: LoDashStatic,
-) {
- // UTILS
- const isTrueObject = (item: unknown): item is Record => {
- return Object.prototype.toString.call(item) === "[object Object]";
- };
-
- const hasDuplicates = (array: unknown[]): boolean => {
- const set = new Set(array);
-
- return set.size !== array.length;
- };
-
- const createErrorValidationResponse = (
- value: unknown,
- message: ValidationErrorMessage,
- ): ValidationResponse => ({
- isValid: false,
- parsed: value,
- messages: [message],
- });
-
- const createSuccessValidationResponse = (
- value: unknown,
- ): ValidationResponse => ({
- isValid: true,
- parsed: value,
- });
-
- if (value === "" || _.isNil(value) || !_.isString(value)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message:
- "value does not evaluate to type: string | Array",
- });
- }
-
- if (!_.flatMap(widgetProps.options, _.keys).includes(value)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: "value key should be present in the options",
- });
- }
-
- if (!isTrueObject(widgetProps.options)) {
- return createSuccessValidationResponse(value);
- }
-
- const values = _.map(widgetProps.options, (option) => {
- if (isTrueObject(option)) {
- return option[widgetProps.optionValue];
- }
- }).filter((d) => d);
-
- if (values.length && hasDuplicates(values)) {
- return createErrorValidationResponse(value, {
- name: "ValidationError",
- message: "Duplicate values found, value must be unique",
- });
- }
-
- return createSuccessValidationResponse(value);
-}
-
export const propertyPaneContentConfig = [
{
sectionName: "Data",
@@ -306,82 +85,6 @@ export const propertyPaneContentConfig = [
},
evaluationSubstitutionType: EvaluationSubstitutionType.SMART_SUBSTITUTE,
},
- {
- helpText: "Choose or set a field from source data as the display label",
- propertyName: "optionLabel",
- label: "Label key",
- controlType: "DROP_DOWN",
- customJSControl: "WRAPPED_CODE_EDITOR",
- controlConfig: {
- wrapperCode: {
- prefix: getOptionLabelValueExpressionPrefix,
- suffix: optionLabelValueExpressionSuffix,
- },
- },
- placeholderText: "",
- isBindProperty: true,
- isTriggerProperty: false,
- isJSConvertible: true,
- evaluatedDependencies: ["options"],
- options: getLabelValueKeyOptions,
- alwaysShowSelected: true,
- validation: {
- type: ValidationTypes.FUNCTION,
- params: {
- fn: labelKeyValidation,
- expected: {
- type: "String or Array",
- example: `color | ["blue", "green"]`,
- autocompleteDataType: AutocompleteDataType.STRING,
- },
- },
- },
- dependencies: ["options", "dynamicPropertyPathList"],
- additionalAutoComplete: getLabelValueAdditionalAutocompleteData,
- hidden: (props: WDSSelectWidgetProps) => {
- return !(props.dynamicPropertyPathList || []).some(
- ({ key }) => key === "options",
- );
- },
- },
- {
- helpText: "Choose or set a field from source data as the value",
- propertyName: "optionValue",
- label: "Value key",
- controlType: "DROP_DOWN",
- customJSControl: "WRAPPED_CODE_EDITOR",
- controlConfig: {
- wrapperCode: {
- prefix: getOptionLabelValueExpressionPrefix,
- suffix: optionLabelValueExpressionSuffix,
- },
- },
- placeholderText: "",
- isBindProperty: true,
- isTriggerProperty: false,
- isJSConvertible: true,
- evaluatedDependencies: ["options"],
- options: getLabelValueKeyOptions,
- alwaysShowSelected: true,
- validation: {
- type: ValidationTypes.FUNCTION,
- params: {
- fn: valueKeyValidation,
- expected: {
- type: "String or Array",
- example: `color | [1, "orange"]`,
- autocompleteDataType: AutocompleteDataType.STRING,
- },
- },
- },
- dependencies: ["options", "dynamicPropertyPathList"],
- additionalAutoComplete: getLabelValueAdditionalAutocompleteData,
- hidden: (props: WDSSelectWidgetProps) => {
- return !(props.dynamicPropertyPathList || []).some(
- ({ key }) => key === "options",
- );
- },
- },
{
helpText: "Sets a default selected option",
propertyName: "defaultOptionValue",
diff --git a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts
index 4f4458fe960..463f49d9cc4 100644
--- a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts
+++ b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/defaultOptionValidation.ts
@@ -48,7 +48,7 @@ export function defaultOptionValidation(
if (Array.isArray(options)) {
const values = _.map(widgetProps.options, (option) => {
if (isTrueObject(option)) {
- return option[widgetProps.optionValue];
+ return option["value"];
}
});
diff --git a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
index 5b526639e75..356d2155a85 100644
--- a/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
+++ b/app/client/src/widgets/wds/WDSSelectWidget/config/propertyPaneConfig/validations/optionsCustomValidation.ts
@@ -38,8 +38,23 @@ export function optionsCustomValidation(
const hasDuplicates = (array: unknown[]): boolean =>
new Set(array).size !== array.length;
- // Is Form mode, otherwise it is JS mode
if (Array.isArray(options)) {
+ const isValidKeys = options.every((option) => {
+ return (
+ _.isPlainObject(option) &&
+ _.has(option, "label") &&
+ _.has(option, "value")
+ );
+ });
+
+ if (!isValidKeys) {
+ return createErrorValidationResponse(options, {
+ name: "ValidationError",
+ message:
+ 'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
+ });
+ }
+
return createSuccessValidationResponse(options);
}
@@ -62,6 +77,22 @@ export function optionsCustomValidation(
});
}
+ const isValidKeys = options.every((option) => {
+ return (
+ _.isPlainObject(option) &&
+ _.has(option, "label") &&
+ _.has(option, "value")
+ );
+ });
+
+ if (!isValidKeys) {
+ return createErrorValidationResponse(options, {
+ name: "ValidationError",
+ message:
+ 'This value does not evaluate to type Array<{ "label": "string", "value": "string" | number }>',
+ });
+ }
+
for (let i = 0; i < options.length; i++) {
const option = options[i];
diff --git a/app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx b/app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx
index 7d7048f1092..a5e3d7e0d2c 100644
--- a/app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx
+++ b/app/client/src/widgets/wds/WDSSelectWidget/widget/index.tsx
@@ -137,10 +137,16 @@ class WDSSelectWidget extends BaseWidget {
options: WDSSelectWidgetProps["options"],
): SelectItem[] => {
if (Array.isArray(options)) {
- return options.map((option) => ({
+ const items = options.map((option) => ({
label: option[this.props.optionLabel || "label"] as string,
id: option[this.props.optionValue || "value"] as string,
}));
+
+ const isValidItems = items.every(
+ (item) => item.label !== undefined && item.id !== undefined,
+ );
+
+ return isValidItems ? items : [];
}
return [];
diff --git a/app/client/src/workers/common/DependencyMap/index.ts b/app/client/src/workers/common/DependencyMap/index.ts
index 54a23eafb45..52f5bc8a46d 100644
--- a/app/client/src/workers/common/DependencyMap/index.ts
+++ b/app/client/src/workers/common/DependencyMap/index.ts
@@ -29,6 +29,7 @@ import {
} from "ee/workers/Evaluation/Actions";
import { isWidgetActionOrJsObject } from "ee/entities/DataTree/utils";
import { getValidEntityType } from "workers/common/DataTreeEvaluator/utils";
+import type DependencyMap from "entities/DependencyMap";
export function createDependencyMap(
dataTreeEvalRef: DataTreeEvaluator,
@@ -72,6 +73,30 @@ export function createDependencyMap(
inverseDependencies: dependencyMap.inverseDependencies,
};
}
+const addingAffectedNodesToList = (
+ affectedNodes: Set,
+ addedNodes: string[],
+) => {
+ addedNodes.forEach((v) => affectedNodes.add(v));
+};
+
+const addNodesToDependencyMap =
+ (affectedNodes: Set, dependencyMap: DependencyMap) =>
+ (addedNodes: Record, strict?: boolean) => {
+ const didUpdateDep = dependencyMap.addNodes(addedNodes, strict);
+ if (didUpdateDep) {
+ addingAffectedNodesToList(affectedNodes, Object.keys(addedNodes));
+ }
+ return didUpdateDep;
+ };
+
+const setDependenciesToDependencyMap =
+ (affectedNodes: Set, dependencyMap: DependencyMap) =>
+ (node: string, dependencies: string[]) => {
+ dependencyMap.addDependency(node, dependencies);
+
+ addingAffectedNodesToList(affectedNodes, [node, ...dependencies]);
+ };
export const updateDependencyMap = ({
configTree,
@@ -91,7 +116,15 @@ export const updateDependencyMap = ({
const { allKeys, dependencyMap, oldConfigTree, oldUnEvalTree } =
dataTreeEvalRef;
let { errors: dataTreeEvalErrors } = dataTreeEvalRef;
-
+ const affectedNodes: Set = new Set();
+ const addNodesToDepedencyMapFn = addNodesToDependencyMap(
+ affectedNodes,
+ dependencyMap,
+ );
+ const setDependenciesToDepedencyMapFn = setDependenciesToDependencyMap(
+ affectedNodes,
+ dependencyMap,
+ );
translatedDiffs.forEach((dataTreeDiff) => {
const {
event,
@@ -117,15 +150,18 @@ export const updateDependencyMap = ({
});
// If a new entity is added, add setter functions to all nodes
if (entityName === fullPropertyPath) {
- const didUpdateDep = dependencyMap.addNodes(
- getEntitySetterFunctions(entityConfig, entityName, entity),
+ const addedNodes = getEntitySetterFunctions(
+ entityConfig,
+ entityName,
+ entity,
);
- if (didUpdateDep) didUpdateDependencyMap = true;
+ didUpdateDependencyMap =
+ addNodesToDepedencyMapFn(addedNodes) || didUpdateDependencyMap;
}
- const didUpdateDep = dependencyMap.addNodes(allAddedPaths, false);
-
- if (didUpdateDep) didUpdateDependencyMap = true;
+ didUpdateDependencyMap =
+ addNodesToDepedencyMapFn(allAddedPaths, false) ||
+ didUpdateDependencyMap;
if (isWidgetActionOrJsObject(entity)) {
if (!isDynamicLeaf(unEvalDataTree, fullPropertyPath, configTree)) {
@@ -141,7 +177,9 @@ export const updateDependencyMap = ({
([path, pathDependencies]) => {
const { errors: extractDependencyErrors, references } =
extractInfoFromBindings(pathDependencies, allKeys);
- dependencyMap.addDependency(path, references);
+
+ setDependenciesToDepedencyMapFn(path, references);
+
didUpdateDependencyMap = true;
dataTreeEvalErrors = dataTreeEvalErrors.concat(
extractDependencyErrors,
@@ -158,7 +196,9 @@ export const updateDependencyMap = ({
);
const { errors: extractDependencyErrors, references } =
extractInfoFromBindings(entityPathDependencies, allKeys);
- dependencyMap.addDependency(fullPropertyPath, references);
+
+ setDependenciesToDepedencyMapFn(fullPropertyPath, references);
+
didUpdateDependencyMap = true;
dataTreeEvalErrors = dataTreeEvalErrors.concat(
extractDependencyErrors,
@@ -218,7 +258,8 @@ export const updateDependencyMap = ({
);
const { errors: extractDependencyErrors, references } =
extractInfoFromBindings(entityPathDependencies, allKeys);
- dependencyMap.addDependency(fullPropertyPath, references);
+ setDependenciesToDepedencyMapFn(fullPropertyPath, references);
+
didUpdateDependencyMap = true;
dataTreeEvalErrors = dataTreeEvalErrors.concat(
extractDependencyErrors,
@@ -237,7 +278,10 @@ export const updateDependencyMap = ({
const updateChangedDependenciesStart = performance.now();
if (didUpdateDependencyMap) {
- DependencyMapUtils.makeParentsDependOnChildren(dependencyMap);
+ DependencyMapUtils.linkAffectedChildNodesToParent(
+ dependencyMap,
+ affectedNodes,
+ );
dataTreeEvalRef.sortedDependencies = dataTreeEvalRef.sortDependencies(
dependencyMap,
translatedDiffs,
diff --git a/app/client/yarn.lock b/app/client/yarn.lock
index b8350d99ecf..03470d21a80 100644
--- a/app/client/yarn.lock
+++ b/app/client/yarn.lock
@@ -8585,6 +8585,19 @@ __metadata:
languageName: node
linkType: hard
+"@simonsmith/cypress-image-snapshot@npm:^9.1.0":
+ version: 9.1.0
+ resolution: "@simonsmith/cypress-image-snapshot@npm:9.1.0"
+ dependencies:
+ "@types/jest-image-snapshot": ^6.1.0
+ chalk: ^4.1.2
+ jest-image-snapshot: ^6.1.0
+ peerDependencies:
+ cypress: ">10.0.0"
+ checksum: cb81eb96f0dbe29627f3bf555b3fadb16fbbcc276c0f682bb3800261d3287093eda2ce0a13778ef73e9ee052ae0a6cb2c46cee3640d4145f22ebed1e8fc2b56d
+ languageName: node
+ linkType: hard
+
"@sinclair/typebox@npm:^0.23.3":
version: 0.23.5
resolution: "@sinclair/typebox@npm:0.23.5"
@@ -10585,13 +10598,6 @@ __metadata:
languageName: node
linkType: hard
-"@types/cypress-image-snapshot@npm:^3.1.9":
- version: 3.1.9
- resolution: "@types/cypress-image-snapshot@npm:3.1.9"
- checksum: 8afbeb26c575275d02861cfafde5bfae3a7d25f35d0c18bbc1c70a72b45a8bc021ff73de3b5d4a36c7cb22bc86442fee14308ef096f9650dc5eddd941f923f2f
- languageName: node
- linkType: hard
-
"@types/d3-geo@npm:^3.1.0":
version: 3.1.0
resolution: "@types/d3-geo@npm:3.1.0"
@@ -10631,6 +10637,13 @@ __metadata:
languageName: node
linkType: hard
+"@types/dom-view-transitions@npm:^1.0.5":
+ version: 1.0.5
+ resolution: "@types/dom-view-transitions@npm:1.0.5"
+ checksum: 4190915a3d4c63d4c590d5e64d14ca1d1140496a75adb5af64b0ef13e075cc7676bff926f5c5c60305c4f6d46965a196c119a7960cbe0ff40e95e17e82334c22
+ languageName: node
+ linkType: hard
+
"@types/dom4@npm:^2.0.1":
version: 2.0.2
resolution: "@types/dom4@npm:2.0.2"
@@ -10916,6 +10929,17 @@ __metadata:
languageName: node
linkType: hard
+"@types/jest-image-snapshot@npm:^6.1.0":
+ version: 6.4.0
+ resolution: "@types/jest-image-snapshot@npm:6.4.0"
+ dependencies:
+ "@types/jest": "*"
+ "@types/pixelmatch": "*"
+ ssim.js: ^3.1.1
+ checksum: db751a487f3a8aef7a6f7d4209378fb147670a8d5f7bb08739426ce6cc6a034bc02dca12b9eefcb7a9fe0deec4dc0a809d436445ca405d3e796d6058da4e0568
+ languageName: node
+ linkType: hard
+
"@types/jest@npm:*, @types/jest@npm:^29.2.3":
version: 29.5.12
resolution: "@types/jest@npm:29.5.12"
@@ -11163,6 +11187,15 @@ __metadata:
languageName: node
linkType: hard
+"@types/pixelmatch@npm:*":
+ version: 5.2.6
+ resolution: "@types/pixelmatch@npm:5.2.6"
+ dependencies:
+ "@types/node": "*"
+ checksum: 8299207286913414bfd95ac980418342f58e7bc93dc78befbd48ccab110b0341b400712f89fea2b0f0a3a4ad0b1aed18e98e26100b529abe60d4bcc14e11d2e3
+ languageName: node
+ linkType: hard
+
"@types/prettier@npm:^2.1.5":
version: 2.7.0
resolution: "@types/prettier@npm:2.7.0"
@@ -12973,7 +13006,7 @@ __metadata:
languageName: node
linkType: hard
-"ansi-escapes@npm:^4.1.0, ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.1":
+"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.1":
version: 4.3.2
resolution: "ansi-escapes@npm:4.3.2"
dependencies:
@@ -13035,13 +13068,6 @@ __metadata:
languageName: node
linkType: hard
-"ansi-styles@npm:^2.2.1":
- version: 2.2.1
- resolution: "ansi-styles@npm:2.2.1"
- checksum: ebc0e00381f2a29000d1dac8466a640ce11943cef3bda3cd0020dc042e31e1058ab59bf6169cd794a54c3a7338a61ebc404b7c91e004092dd20e028c432c9c2c
- languageName: node
- linkType: hard
-
"ansi-styles@npm:^3.2.0, ansi-styles@npm:^3.2.1":
version: 3.2.1
resolution: "ansi-styles@npm:3.2.1"
@@ -13091,15 +13117,6 @@ __metadata:
languageName: node
linkType: hard
-"app-path@npm:^3.2.0":
- version: 3.3.0
- resolution: "app-path@npm:3.3.0"
- dependencies:
- execa: ^1.0.0
- checksum: 4a0f64c05b9033b96ddfc28067ec72b04903929e3bbdafd3309fa96b1ec77ded06613c84e984cffe043572ead0d257830077012bd36892bdbdb28a818e362ef0
- languageName: node
- linkType: hard
-
"append-transform@npm:^2.0.0":
version: 2.0.0
resolution: "append-transform@npm:2.0.0"
@@ -13134,7 +13151,7 @@ __metadata:
axios: ^1.7.4
esbuild: ^0.19.4
escodegen: ^2.0.0
- express: ^4.19.2
+ express: ^4.20.0
express-validator: ^6.14.2
http-status-codes: ^2.2.0
jest: ^29.3.1
@@ -13202,6 +13219,7 @@ __metadata:
"@sentry/webpack-plugin": ^1.18.9
"@shared/ast": "workspace:^"
"@shared/dsl": "workspace:^"
+ "@simonsmith/cypress-image-snapshot": ^9.1.0
"@tanstack/virtual-core": ^3.0.0-beta.18
"@testing-library/jest-dom": 5.16.1
"@testing-library/react": 12.1.2
@@ -13210,10 +13228,10 @@ __metadata:
"@tinymce/tinymce-react": ^5.1.1
"@types/babel__standalone": ^7.1.7
"@types/codemirror": ^0.0.96
- "@types/cypress-image-snapshot": ^3.1.9
"@types/d3-geo": ^3.1.0
"@types/deep-diff": ^1.0.0
"@types/dom-mediacapture-record": ^1.0.11
+ "@types/dom-view-transitions": ^1.0.5
"@types/downloadjs": ^1.4.2
"@types/google.maps": ^3.51.0
"@types/jest": ^27.4.1
@@ -13294,7 +13312,6 @@ __metadata:
cy-verify-downloads: ^0.0.5
cypress: 13.13.0
cypress-file-upload: ^4.1.1
- cypress-image-snapshot: ^4.0.1
cypress-log-to-output: ^1.1.2
cypress-mochawesome-reporter: ^3.5.1
cypress-multi-reporters: ^1.2.4
@@ -14354,7 +14371,7 @@ __metadata:
languageName: node
linkType: hard
-"base64-js@npm:^1.0.2, base64-js@npm:^1.3.1, base64-js@npm:^1.5.1":
+"base64-js@npm:^1.0.2, base64-js@npm:^1.3.1":
version: 1.5.1
resolution: "base64-js@npm:1.5.1"
checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005
@@ -14493,9 +14510,9 @@ __metadata:
languageName: node
linkType: hard
-"body-parser@npm:1.20.2":
- version: 1.20.2
- resolution: "body-parser@npm:1.20.2"
+"body-parser@npm:1.20.3":
+ version: 1.20.3
+ resolution: "body-parser@npm:1.20.3"
dependencies:
bytes: 3.1.2
content-type: ~1.0.5
@@ -14505,11 +14522,11 @@ __metadata:
http-errors: 2.0.0
iconv-lite: 0.4.24
on-finished: 2.4.1
- qs: 6.11.0
+ qs: 6.13.0
raw-body: 2.5.2
type-is: ~1.6.18
unpipe: 1.0.0
- checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737
+ checksum: 1a35c59a6be8d852b00946330141c4f142c6af0f970faa87f10ad74f1ee7118078056706a05ae3093c54dabca9cd3770fa62a170a85801da1a4324f04381167d
languageName: node
linkType: hard
@@ -15036,13 +15053,16 @@ __metadata:
languageName: node
linkType: hard
-"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2":
- version: 1.0.2
- resolution: "call-bind@npm:1.0.2"
+"call-bind@npm:^1.0.2, call-bind@npm:^1.0.7":
+ version: 1.0.7
+ resolution: "call-bind@npm:1.0.7"
dependencies:
- function-bind: ^1.1.1
- get-intrinsic: ^1.0.2
- checksum: f8e31de9d19988a4b80f3e704788c4a2d6b6f3d17cfec4f57dc29ced450c53a49270dc66bf0fbd693329ee948dd33e6c90a329519aef17474a4d961e8d6426b0
+ es-define-property: ^1.0.0
+ es-errors: ^1.3.0
+ function-bind: ^1.1.2
+ get-intrinsic: ^1.2.4
+ set-function-length: ^1.2.1
+ checksum: 295c0c62b90dd6522e6db3b0ab1ce26bdf9e7404215bda13cfee25b626b5ff1a7761324d58d38b1ef1607fc65aca2d06e44d2e18d0dfc6c14b465b00d8660029
languageName: node
linkType: hard
@@ -15156,19 +15176,6 @@ __metadata:
languageName: node
linkType: hard
-"chalk@npm:^1.1.3":
- version: 1.1.3
- resolution: "chalk@npm:1.1.3"
- dependencies:
- ansi-styles: ^2.2.1
- escape-string-regexp: ^1.0.2
- has-ansi: ^2.0.0
- strip-ansi: ^3.0.0
- supports-color: ^2.0.0
- checksum: 9d2ea6b98fc2b7878829eec223abcf404622db6c48396a9b9257f6d0ead2acf18231ae368d6a664a83f272b0679158da12e97b5229f794939e555cc574478acd
- languageName: node
- linkType: hard
-
"chalk@npm:^2.4.1, chalk@npm:^2.4.2":
version: 2.4.2
resolution: "chalk@npm:2.4.2"
@@ -16329,19 +16336,6 @@ __metadata:
languageName: node
linkType: hard
-"cross-spawn@npm:^6.0.0":
- version: 6.0.5
- resolution: "cross-spawn@npm:6.0.5"
- dependencies:
- nice-try: ^1.0.4
- path-key: ^2.0.1
- semver: ^5.5.0
- shebang-command: ^1.2.0
- which: ^1.2.9
- checksum: f893bb0d96cd3d5751d04e67145bdddf25f99449531a72e82dcbbd42796bbc8268c1076c6b3ea51d4d455839902804b94bc45dfb37ecbb32ea8e54a6741c3ab9
- languageName: node
- linkType: hard
-
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
@@ -16851,22 +16845,6 @@ __metadata:
languageName: node
linkType: hard
-"cypress-image-snapshot@npm:^4.0.1":
- version: 4.0.1
- resolution: "cypress-image-snapshot@npm:4.0.1"
- dependencies:
- chalk: ^2.4.1
- fs-extra: ^7.0.1
- glob: ^7.1.3
- jest-image-snapshot: 4.2.0
- pkg-dir: ^3.0.0
- term-img: ^4.0.0
- peerDependencies:
- cypress: ^4.5.0
- checksum: 0921e39acbd92f49d58c88e95b212148cc2b74d7fc5b08ab6bdfcfcc1601a74889ddde680504140a522d6b9674e8535eab813830ad853e1fb858dbac88607c6d
- languageName: node
- linkType: hard
-
"cypress-log-to-output@npm:^1.1.2":
version: 1.1.2
resolution: "cypress-log-to-output@npm:1.1.2"
@@ -17344,14 +17322,14 @@ __metadata:
languageName: node
linkType: hard
-"define-data-property@npm:^1.0.1":
- version: 1.1.0
- resolution: "define-data-property@npm:1.1.0"
+"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4":
+ version: 1.1.4
+ resolution: "define-data-property@npm:1.1.4"
dependencies:
- get-intrinsic: ^1.2.1
+ es-define-property: ^1.0.0
+ es-errors: ^1.3.0
gopd: ^1.0.1
- has-property-descriptors: ^1.0.0
- checksum: 7ad4ee84cca8ad427a4831f5693526804b62ce9dfd4efac77214e95a4382aed930072251d4075dc8dc9fc949a353ed51f19f5285a84a788ba9216cc51472a093
+ checksum: 8068ee6cab694d409ac25936eb861eea704b7763f7f342adbdfe337fc27c78d7ae0eff2364b2917b58c508d723c7a074326d068eef2e45c4edcd85cf94d0313b
languageName: node
linkType: hard
@@ -18121,6 +18099,13 @@ __metadata:
languageName: node
linkType: hard
+"encodeurl@npm:~2.0.0":
+ version: 2.0.0
+ resolution: "encodeurl@npm:2.0.0"
+ checksum: abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe
+ languageName: node
+ linkType: hard
+
"encoding@npm:^0.1.13":
version: 0.1.13
resolution: "encoding@npm:0.1.13"
@@ -18360,6 +18345,22 @@ __metadata:
languageName: node
linkType: hard
+"es-define-property@npm:^1.0.0":
+ version: 1.0.0
+ resolution: "es-define-property@npm:1.0.0"
+ dependencies:
+ get-intrinsic: ^1.2.4
+ checksum: f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6
+ languageName: node
+ linkType: hard
+
+"es-errors@npm:^1.3.0":
+ version: 1.3.0
+ resolution: "es-errors@npm:1.3.0"
+ checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5
+ languageName: node
+ linkType: hard
+
"es-get-iterator@npm:^1.1.3":
version: 1.1.3
resolution: "es-get-iterator@npm:1.1.3"
@@ -18640,7 +18641,7 @@ __metadata:
languageName: node
linkType: hard
-"escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5":
+"escape-string-regexp@npm:^1.0.5":
version: 1.0.5
resolution: "escape-string-regexp@npm:1.0.5"
checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410
@@ -19266,21 +19267,6 @@ __metadata:
languageName: node
linkType: hard
-"execa@npm:^1.0.0":
- version: 1.0.0
- resolution: "execa@npm:1.0.0"
- dependencies:
- cross-spawn: ^6.0.0
- get-stream: ^4.0.0
- is-stream: ^1.1.0
- npm-run-path: ^2.0.0
- p-finally: ^1.0.0
- signal-exit: ^3.0.0
- strip-eof: ^1.0.0
- checksum: ddf1342c1c7d02dd93b41364cd847640f6163350d9439071abf70bf4ceb1b9b2b2e37f54babb1d8dc1df8e0d8def32d0e81e74a2e62c3e1d70c303eb4c306bc4
- languageName: node
- linkType: hard
-
"execa@npm:^5.0.0":
version: 5.1.1
resolution: "execa@npm:5.1.1"
@@ -19388,42 +19374,42 @@ __metadata:
languageName: node
linkType: hard
-"express@npm:^4.16.3, express@npm:^4.17.3, express@npm:^4.19.2":
- version: 4.19.2
- resolution: "express@npm:4.19.2"
+"express@npm:^4.16.3, express@npm:^4.17.3, express@npm:^4.19.2, express@npm:^4.20.0":
+ version: 4.21.0
+ resolution: "express@npm:4.21.0"
dependencies:
accepts: ~1.3.8
array-flatten: 1.1.1
- body-parser: 1.20.2
+ body-parser: 1.20.3
content-disposition: 0.5.4
content-type: ~1.0.4
cookie: 0.6.0
cookie-signature: 1.0.6
debug: 2.6.9
depd: 2.0.0
- encodeurl: ~1.0.2
+ encodeurl: ~2.0.0
escape-html: ~1.0.3
etag: ~1.8.1
- finalhandler: 1.2.0
+ finalhandler: 1.3.1
fresh: 0.5.2
http-errors: 2.0.0
- merge-descriptors: 1.0.1
+ merge-descriptors: 1.0.3
methods: ~1.1.2
on-finished: 2.4.1
parseurl: ~1.3.3
- path-to-regexp: 0.1.7
+ path-to-regexp: 0.1.10
proxy-addr: ~2.0.7
- qs: 6.11.0
+ qs: 6.13.0
range-parser: ~1.2.1
safe-buffer: 5.2.1
- send: 0.18.0
- serve-static: 1.15.0
+ send: 0.19.0
+ serve-static: 1.16.2
setprototypeof: 1.2.0
statuses: 2.0.1
type-is: ~1.6.18
utils-merge: 1.0.1
vary: ~1.1.2
- checksum: 212dbd6c2c222a96a61bc927639c95970a53b06257080bb9e2838adb3bffdb966856551fdad1ab5dd654a217c35db94f987d0aa88d48fb04d306340f5f34dca5
+ checksum: 1c5212993f665809c249bf00ab550b989d1365a5b9171cdfaa26d93ee2ef10cd8add520861ec8d5da74b3194d8374e1d9d53e85ef69b89fd9c4196b87045a5d4
languageName: node
linkType: hard
@@ -19767,18 +19753,18 @@ __metadata:
languageName: node
linkType: hard
-"finalhandler@npm:1.2.0":
- version: 1.2.0
- resolution: "finalhandler@npm:1.2.0"
+"finalhandler@npm:1.3.1":
+ version: 1.3.1
+ resolution: "finalhandler@npm:1.3.1"
dependencies:
debug: 2.6.9
- encodeurl: ~1.0.2
+ encodeurl: ~2.0.0
escape-html: ~1.0.3
on-finished: 2.4.1
parseurl: ~1.3.3
statuses: 2.0.1
unpipe: ~1.0.0
- checksum: 92effbfd32e22a7dff2994acedbd9bcc3aa646a3e919ea6a53238090e87097f8ef07cced90aa2cc421abdf993aefbdd5b00104d55c7c5479a8d00ed105b45716
+ checksum: a8c58cd97c9cd47679a870f6833a7b417043f5a288cd6af6d0f49b476c874a506100303a128b6d3b654c3d74fa4ff2ffed68a48a27e8630cda5c918f2977dcf4
languageName: node
linkType: hard
@@ -20309,10 +20295,10 @@ __metadata:
languageName: node
linkType: hard
-"function-bind@npm:^1.1.1":
- version: 1.1.1
- resolution: "function-bind@npm:1.1.1"
- checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a
+"function-bind@npm:^1.1.1, function-bind@npm:^1.1.2":
+ version: 1.1.2
+ resolution: "function-bind@npm:1.1.2"
+ checksum: 2b0ff4ce708d99715ad14a6d1f894e2a83242e4a52ccfcefaee5e40050562e5f6dafc1adbb4ce2d4ab47279a45dc736ab91ea5042d843c3c092820dfe032efb1
languageName: node
linkType: hard
@@ -20417,15 +20403,16 @@ __metadata:
languageName: node
linkType: hard
-"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1":
- version: 1.2.1
- resolution: "get-intrinsic@npm:1.2.1"
+"get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.4":
+ version: 1.2.4
+ resolution: "get-intrinsic@npm:1.2.4"
dependencies:
- function-bind: ^1.1.1
- has: ^1.0.3
+ es-errors: ^1.3.0
+ function-bind: ^1.1.2
has-proto: ^1.0.1
has-symbols: ^1.0.3
- checksum: 5b61d88552c24b0cf6fa2d1b3bc5459d7306f699de060d76442cce49a4721f52b8c560a33ab392cf5575b7810277d54ded9d4d39a1ea61855619ebc005aa7e5f
+ hasown: ^2.0.0
+ checksum: 414e3cdf2c203d1b9d7d33111df746a4512a1aa622770b361dadddf8ed0b5aeb26c560f49ca077e24bfafb0acb55ca908d1f709216ccba33ffc548ec8a79a951
languageName: node
linkType: hard
@@ -20457,15 +20444,6 @@ __metadata:
languageName: node
linkType: hard
-"get-stream@npm:^4.0.0":
- version: 4.1.0
- resolution: "get-stream@npm:4.1.0"
- dependencies:
- pump: ^3.0.0
- checksum: 443e1914170c15bd52ff8ea6eff6dfc6d712b031303e36302d2778e3de2506af9ee964d6124010f7818736dcfde05c04ba7ca6cc26883106e084357a17ae7d73
- languageName: node
- linkType: hard
-
"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0":
version: 5.2.0
resolution: "get-stream@npm:5.2.0"
@@ -20885,15 +20863,6 @@ __metadata:
languageName: node
linkType: hard
-"has-ansi@npm:^2.0.0":
- version: 2.0.0
- resolution: "has-ansi@npm:2.0.0"
- dependencies:
- ansi-regex: ^2.0.0
- checksum: 1b51daa0214440db171ff359d0a2d17bc20061164c57e76234f614c91dbd2a79ddd68dfc8ee73629366f7be45a6df5f2ea9de83f52e1ca24433f2cc78c35d8ec
- languageName: node
- linkType: hard
-
"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2":
version: 1.0.2
resolution: "has-bigints@npm:1.0.2"
@@ -20915,12 +20884,12 @@ __metadata:
languageName: node
linkType: hard
-"has-property-descriptors@npm:^1.0.0":
- version: 1.0.0
- resolution: "has-property-descriptors@npm:1.0.0"
+"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2":
+ version: 1.0.2
+ resolution: "has-property-descriptors@npm:1.0.2"
dependencies:
- get-intrinsic: ^1.1.1
- checksum: a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb
+ es-define-property: ^1.0.0
+ checksum: fcbb246ea2838058be39887935231c6d5788babed499d0e9d0cc5737494c48aba4fe17ba1449e0d0fbbb1e36175442faa37f9c427ae357d6ccb1d895fbcd3de3
languageName: node
linkType: hard
@@ -21001,6 +20970,15 @@ __metadata:
languageName: node
linkType: hard
+"hasown@npm:^2.0.0":
+ version: 2.0.2
+ resolution: "hasown@npm:2.0.2"
+ dependencies:
+ function-bind: ^1.1.2
+ checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db
+ languageName: node
+ linkType: hard
+
"hast-util-heading-rank@npm:^3.0.0":
version: 3.0.0
resolution: "hast-util-heading-rank@npm:3.0.0"
@@ -22318,13 +22296,6 @@ __metadata:
languageName: node
linkType: hard
-"is-stream@npm:^1.1.0":
- version: 1.1.0
- resolution: "is-stream@npm:1.1.0"
- checksum: 063c6bec9d5647aa6d42108d4c59723d2bd4ae42135a2d4db6eadbd49b7ea05b750fd69d279e5c7c45cf9da753ad2c00d8978be354d65aa9f6bb434969c6a2ae
- languageName: node
- linkType: hard
-
"is-stream@npm:^2.0.0":
version: 2.0.1
resolution: "is-stream@npm:2.0.1"
@@ -22621,16 +22592,6 @@ __metadata:
languageName: node
linkType: hard
-"iterm2-version@npm:^4.1.0":
- version: 4.2.0
- resolution: "iterm2-version@npm:4.2.0"
- dependencies:
- app-path: ^3.2.0
- plist: ^3.0.1
- checksum: 3a83c748775712a056333a0c226f75d6fa961c125a64cd4d60994f7d14dbbcf3f801fee67777f568b0eb1e998864086e6148fddece0fd341e4123e5ade7fc5b2
- languageName: node
- linkType: hard
-
"jake@npm:^10.8.5":
version: 10.8.5
resolution: "jake@npm:10.8.5"
@@ -23032,22 +22993,24 @@ __metadata:
languageName: node
linkType: hard
-"jest-image-snapshot@npm:4.2.0":
- version: 4.2.0
- resolution: "jest-image-snapshot@npm:4.2.0"
+"jest-image-snapshot@npm:^6.1.0":
+ version: 6.4.0
+ resolution: "jest-image-snapshot@npm:6.4.0"
dependencies:
- chalk: ^1.1.3
+ chalk: ^4.0.0
get-stdin: ^5.0.1
glur: ^1.1.2
lodash: ^4.17.4
- mkdirp: ^0.5.1
pixelmatch: ^5.1.0
pngjs: ^3.4.0
rimraf: ^2.6.2
ssim.js: ^3.1.1
peerDependencies:
- jest: ">=20 <=26"
- checksum: 55c696955a75ef79a4a06fb18910a1238510fd4458a5322e1d82149c07bb7588762623730e9f8613c90fd0ab142f105809676f3ef787558ed6336a967a7ec021
+ jest: ">=20 <=29"
+ peerDependenciesMeta:
+ jest:
+ optional: true
+ checksum: f3b8a0cbba6e4bd4c19080e8cb807b4dd03e60d43bc69e0bf5898c09dbbb0ee812c04ad66d027ee64121f169bb5ef0cd81d5903efd2772e085e619aa6415676b
languageName: node
linkType: hard
@@ -25206,10 +25169,10 @@ __metadata:
languageName: node
linkType: hard
-"merge-descriptors@npm:1.0.1":
- version: 1.0.1
- resolution: "merge-descriptors@npm:1.0.1"
- checksum: 5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26
+"merge-descriptors@npm:1.0.3":
+ version: 1.0.3
+ resolution: "merge-descriptors@npm:1.0.3"
+ checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1
languageName: node
linkType: hard
@@ -26152,13 +26115,6 @@ __metadata:
languageName: node
linkType: hard
-"nice-try@npm:^1.0.4":
- version: 1.0.5
- resolution: "nice-try@npm:1.0.5"
- checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff
- languageName: node
- linkType: hard
-
"no-case@npm:^3.0.4":
version: 3.0.4
resolution: "no-case@npm:3.0.4"
@@ -26346,15 +26302,6 @@ __metadata:
languageName: node
linkType: hard
-"npm-run-path@npm:^2.0.0":
- version: 2.0.2
- resolution: "npm-run-path@npm:2.0.2"
- dependencies:
- path-key: ^2.0.0
- checksum: acd5ad81648ba4588ba5a8effb1d98d2b339d31be16826a118d50f182a134ac523172101b82eab1d01cb4c2ba358e857d54cfafd8163a1ffe7bd52100b741125
- languageName: node
- linkType: hard
-
"npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1":
version: 4.0.1
resolution: "npm-run-path@npm:4.0.1"
@@ -26478,10 +26425,10 @@ __metadata:
languageName: node
linkType: hard
-"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0":
- version: 1.12.3
- resolution: "object-inspect@npm:1.12.3"
- checksum: dabfd824d97a5f407e6d5d24810d888859f6be394d8b733a77442b277e0808860555176719c5905e765e3743a7cada6b8b0a3b85e5331c530fd418cc8ae991db
+"object-inspect@npm:^1.12.3, object-inspect@npm:^1.13.1":
+ version: 1.13.2
+ resolution: "object-inspect@npm:1.13.2"
+ checksum: 9f850b3c045db60e0e97746e809ee4090d6ce62195af17dd1e9438ac761394a7d8ec4f7906559aea5424eaf61e35d3e53feded2ccd5f62fcc7d9670d3c8eb353
languageName: node
linkType: hard
@@ -26826,13 +26773,6 @@ __metadata:
languageName: node
linkType: hard
-"p-finally@npm:^1.0.0":
- version: 1.0.0
- resolution: "p-finally@npm:1.0.0"
- checksum: 93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4
- languageName: node
- linkType: hard
-
"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0":
version: 2.3.0
resolution: "p-limit@npm:2.3.0"
@@ -27112,13 +27052,6 @@ __metadata:
languageName: node
linkType: hard
-"path-key@npm:^2.0.0, path-key@npm:^2.0.1":
- version: 2.0.1
- resolution: "path-key@npm:2.0.1"
- checksum: f7ab0ad42fe3fb8c7f11d0c4f849871e28fbd8e1add65c370e422512fc5887097b9cf34d09c1747d45c942a8c1e26468d6356e2df3f740bf177ab8ca7301ebfd
- languageName: node
- linkType: hard
-
"path-key@npm:^3.0.0, path-key@npm:^3.1.0":
version: 3.1.1
resolution: "path-key@npm:3.1.1"
@@ -27163,10 +27096,10 @@ __metadata:
languageName: node
linkType: hard
-"path-to-regexp@npm:0.1.7":
- version: 0.1.7
- resolution: "path-to-regexp@npm:0.1.7"
- checksum: 69a14ea24db543e8b0f4353305c5eac6907917031340e5a8b37df688e52accd09e3cebfe1660b70d76b6bd89152f52183f28c74813dbf454ba1a01c82a38abce
+"path-to-regexp@npm:0.1.10":
+ version: 0.1.10
+ resolution: "path-to-regexp@npm:0.1.10"
+ checksum: ab7a3b7a0b914476d44030340b0a65d69851af2a0f33427df1476100ccb87d409c39e2182837a96b98fb38c4ef2ba6b87bdad62bb70a2c153876b8061760583c
languageName: node
linkType: hard
@@ -27461,16 +27394,6 @@ __metadata:
languageName: node
linkType: hard
-"plist@npm:^3.0.1":
- version: 3.0.5
- resolution: "plist@npm:3.0.5"
- dependencies:
- base64-js: ^1.5.1
- xmlbuilder: ^9.0.7
- checksum: f8b82816f66559965a4dabf139bd8dd95cdec7e51f32742bb353af276ea8228b9807113743b860eda3e867f6ed70d2bcbc1e135b3204d92b5c37ac765f68444e
- languageName: node
- linkType: hard
-
"plop@npm:^3.1.1":
version: 3.1.1
resolution: "plop@npm:3.1.1"
@@ -29195,21 +29118,12 @@ __metadata:
languageName: node
linkType: hard
-"qs@npm:6.11.0":
- version: 6.11.0
- resolution: "qs@npm:6.11.0"
- dependencies:
- side-channel: ^1.0.4
- checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297
- languageName: node
- linkType: hard
-
-"qs@npm:^6.11.0":
- version: 6.11.1
- resolution: "qs@npm:6.11.1"
+"qs@npm:6.13.0, qs@npm:^6.11.0":
+ version: 6.13.0
+ resolution: "qs@npm:6.13.0"
dependencies:
- side-channel: ^1.0.4
- checksum: 82ee78ef12a16f3372fae5b64f76f8aedecb000feea882bbff1af146c147f6eb66b08f9c3f34d7e076f28563586956318b9b2ca41141846cdd6d5ad6f241d52f
+ side-channel: ^1.0.6
+ checksum: e9404dc0fc2849245107108ce9ec2766cde3be1b271de0bf1021d049dc5b98d1a2901e67b431ac5509f865420a7ed80b7acb3980099fe1c118a1c5d2e1432ad8
languageName: node
linkType: hard
@@ -31989,7 +31903,7 @@ __metadata:
languageName: node
linkType: hard
-"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0, semver@npm:^5.6.0":
+"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.6.0":
version: 5.7.2
resolution: "semver@npm:5.7.2"
bin:
@@ -32016,9 +31930,9 @@ __metadata:
languageName: node
linkType: hard
-"send@npm:0.18.0":
- version: 0.18.0
- resolution: "send@npm:0.18.0"
+"send@npm:0.19.0":
+ version: 0.19.0
+ resolution: "send@npm:0.19.0"
dependencies:
debug: 2.6.9
depd: 2.0.0
@@ -32033,7 +31947,7 @@ __metadata:
on-finished: 2.4.1
range-parser: ~1.2.1
statuses: 2.0.1
- checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8
+ checksum: 5ae11bd900c1c2575525e2aa622e856804e2f96a09281ec1e39610d089f53aa69e13fd8db84b52f001d0318cf4bb0b3b904ad532fc4c0014eb90d32db0cff55f
languageName: node
linkType: hard
@@ -32081,15 +31995,15 @@ __metadata:
languageName: node
linkType: hard
-"serve-static@npm:1.15.0":
- version: 1.15.0
- resolution: "serve-static@npm:1.15.0"
+"serve-static@npm:1.16.2":
+ version: 1.16.2
+ resolution: "serve-static@npm:1.16.2"
dependencies:
- encodeurl: ~1.0.2
+ encodeurl: ~2.0.0
escape-html: ~1.0.3
parseurl: ~1.3.3
- send: 0.18.0
- checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d
+ send: 0.19.0
+ checksum: dffc52feb4cc5c68e66d0c7f3c1824d4e989f71050aefc9bd5f822a42c54c9b814f595fc5f2b717f4c7cc05396145f3e90422af31186a93f76cf15f707019759
languageName: node
linkType: hard
@@ -32107,6 +32021,20 @@ __metadata:
languageName: node
linkType: hard
+"set-function-length@npm:^1.2.1":
+ version: 1.2.2
+ resolution: "set-function-length@npm:1.2.2"
+ dependencies:
+ define-data-property: ^1.1.4
+ es-errors: ^1.3.0
+ function-bind: ^1.1.2
+ get-intrinsic: ^1.2.4
+ gopd: ^1.0.1
+ has-property-descriptors: ^1.0.2
+ checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72
+ languageName: node
+ linkType: hard
+
"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1":
version: 2.0.1
resolution: "set-function-name@npm:2.0.1"
@@ -32193,15 +32121,6 @@ __metadata:
languageName: node
linkType: hard
-"shebang-command@npm:^1.2.0":
- version: 1.2.0
- resolution: "shebang-command@npm:1.2.0"
- dependencies:
- shebang-regex: ^1.0.0
- checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908
- languageName: node
- linkType: hard
-
"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"
@@ -32211,13 +32130,6 @@ __metadata:
languageName: node
linkType: hard
-"shebang-regex@npm:^1.0.0":
- version: 1.0.0
- resolution: "shebang-regex@npm:1.0.0"
- checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372
- languageName: node
- linkType: hard
-
"shebang-regex@npm:^3.0.0":
version: 3.0.0
resolution: "shebang-regex@npm:3.0.0"
@@ -32250,14 +32162,15 @@ __metadata:
languageName: node
linkType: hard
-"side-channel@npm:^1.0.4":
- version: 1.0.4
- resolution: "side-channel@npm:1.0.4"
+"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6":
+ version: 1.0.6
+ resolution: "side-channel@npm:1.0.6"
dependencies:
- call-bind: ^1.0.0
- get-intrinsic: ^1.0.2
- object-inspect: ^1.9.0
- checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245
+ call-bind: ^1.0.7
+ es-errors: ^1.3.0
+ get-intrinsic: ^1.2.4
+ object-inspect: ^1.13.1
+ checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97
languageName: node
linkType: hard
@@ -33159,13 +33072,6 @@ __metadata:
languageName: node
linkType: hard
-"strip-eof@npm:^1.0.0":
- version: 1.0.0
- resolution: "strip-eof@npm:1.0.0"
- checksum: 40bc8ddd7e072f8ba0c2d6d05267b4e0a4800898c3435b5fb5f5a21e6e47dfaff18467e7aa0d1844bb5d6274c3097246595841fbfeb317e541974ee992cac506
- languageName: node
- linkType: hard
-
"strip-final-newline@npm:^2.0.0":
version: 2.0.0
resolution: "strip-final-newline@npm:2.0.0"
@@ -33354,13 +33260,6 @@ __metadata:
languageName: node
linkType: hard
-"supports-color@npm:^2.0.0":
- version: 2.0.0
- resolution: "supports-color@npm:2.0.0"
- checksum: 602538c5812b9006404370b5a4b885d3e2a1f6567d314f8b4a41974ffe7d08e525bf92ae0f9c7030e3b4c78e4e34ace55d6a67a74f1571bc205959f5972f88f0
- languageName: node
- linkType: hard
-
"supports-color@npm:^5.3.0, supports-color@npm:^5.5.0":
version: 5.5.0
resolution: "supports-color@npm:5.5.0"
@@ -33649,16 +33548,6 @@ __metadata:
languageName: node
linkType: hard
-"term-img@npm:^4.0.0":
- version: 4.1.0
- resolution: "term-img@npm:4.1.0"
- dependencies:
- ansi-escapes: ^4.1.0
- iterm2-version: ^4.1.0
- checksum: fda618b4a45c01bec0a5bc79f456ca1834ad88cbfde3a1bf14871373f555f7df3f40f7ed6d678600a7abebe454b3ab66604bf19dcc87004260677f088d6c7d18
- languageName: node
- linkType: hard
-
"terminal-link@npm:^2.0.0":
version: 2.1.1
resolution: "terminal-link@npm:2.1.1"
@@ -35772,7 +35661,7 @@ __metadata:
languageName: node
linkType: hard
-"which@npm:^1.2.12, which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.1":
+"which@npm:^1.2.12, which@npm:^1.2.14, which@npm:^1.3.1":
version: 1.3.1
resolution: "which@npm:1.3.1"
dependencies:
@@ -36253,13 +36142,6 @@ __metadata:
languageName: node
linkType: hard
-"xmlbuilder@npm:^9.0.7":
- version: 9.0.7
- resolution: "xmlbuilder@npm:9.0.7"
- checksum: 8193bb323806a002764f013bea0c6e9ff2dc26fd29109408761b16b59a8ad2214c2abe8e691755fd8b525586e3a0e1efeb92335947d7b0899032b779f1705a53
- languageName: node
- linkType: hard
-
"xmlchars@npm:^2.2.0":
version: 2.2.0
resolution: "xmlchars@npm:2.2.0"
diff --git a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ApplicationSpanCE.java b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ApplicationSpanCE.java
index 6e27900e592..57a8982e0e3 100644
--- a/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ApplicationSpanCE.java
+++ b/app/server/appsmith-interfaces/src/main/java/com/appsmith/external/constants/spans/ce/ApplicationSpanCE.java
@@ -1,7 +1,10 @@
package com.appsmith.external.constants.spans.ce;
+import static com.appsmith.external.constants.spans.ConsolidatedApiSpanNames.APPLICATION_ID_SPAN;
import static com.appsmith.external.constants.spans.ConsolidatedApiSpanNames.CONSOLIDATED_API_PREFIX;
public class ApplicationSpanCE {
public static final String APPLICATION_FETCH_FROM_DB = CONSOLIDATED_API_PREFIX + "app_db";
+ public static final String APPLICATION_ID_FETCH_REDIS_SPAN = APPLICATION_ID_SPAN + ".read_redis";
+ public static final String APPLICATION_ID_UPDATE_REDIS_SPAN = APPLICATION_ID_SPAN + ".update_redis";
}
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create.json
index bd075899bcc..e99b738928c 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create.json
@@ -1,13 +1,12 @@
{
"identifier": "UPLOAD_FILE_FROM_BODY",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'UPLOAD_FILE_FROM_BODY'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -16,12 +15,17 @@
"evaluationSubstitutionType": "TEMPLATE",
"isRequired": true,
"initialValue": ""
+ },
+ {
+ "label": "Expiry duration of signed URL (minutes)",
+ "configProperty": "actionConfiguration.formData.create.expiry.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "initialValue": "5"
}
]
},
{
- "controlType": "SECTION",
- "label": "Query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"description": "Optional",
"children": [
{
@@ -45,13 +49,13 @@
"value": "NO"
}
]
- },
- {
- "label": "Expiry duration of signed URL (minutes)",
- "configProperty": "actionConfiguration.formData.create.expiry.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "initialValue": "5"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "description": "Optional",
+ "children": [
{
"label": "Content",
"configProperty": "actionConfiguration.formData.body.data",
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create_many.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create_many.json
index 712278db471..1ed2d5fb59c 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create_many.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/create_many.json
@@ -1,13 +1,12 @@
{
"identifier": "UPLOAD_MULTIPLE_FILES_FROM_BODY",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'UPLOAD_MULTIPLE_FILES_FROM_BODY'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -16,12 +15,17 @@
"evaluationSubstitutionType": "TEMPLATE",
"isRequired": true,
"initialValue": ""
+ },
+ {
+ "label": "Expiry duration of signed URL (minutes)",
+ "configProperty": "actionConfiguration.formData.create.expiry.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "initialValue": "5"
}
]
},
{
- "controlType": "SECTION",
- "label": "Query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"description": "Optional",
"children": [
{
@@ -45,13 +49,13 @@
"value": "NO"
}
]
- },
- {
- "label": "Expiry duration of signed URL (minutes)",
- "configProperty": "actionConfiguration.formData.create.expiry.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "initialValue": "5"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "description": "Optional",
+ "children": [
{
"label": "Content",
"configProperty": "actionConfiguration.formData.body.data",
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete.json
index 29ebcb00dd5..053132225d5 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete.json
@@ -1,13 +1,12 @@
{
"identifier": "DELETE_FILE",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE_FILE'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -20,8 +19,7 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"description": "Optional",
"children": [
{
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete_many.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete_many.json
index e8b8fdb8887..1c4352297e3 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete_many.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/delete_many.json
@@ -1,13 +1,12 @@
{
"identifier": "DELETE_MULTIPLE_FILES",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE_MULTIPLE_FILES'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -16,7 +15,12 @@
"evaluationSubstitutionType": "TEMPLATE",
"isRequired": true,
"initialValue": ""
- },
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "children": [
{
"label": "List of Files",
"configProperty": "actionConfiguration.formData.path.data",
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/list.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/list.json
index 0a85b2df4e7..c9fbfc4cf73 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/list.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/list.json
@@ -1,13 +1,12 @@
{
"identifier": "LIST",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'LIST'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -16,62 +15,17 @@
"evaluationSubstitutionType": "TEMPLATE",
"isRequired": true,
"initialValue": ""
- }
- ]
- },
- {
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
- "children": [
+ },
{
"label": "Prefix",
"configProperty": "actionConfiguration.formData.list.prefix.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"initialValue": ""
- },
- {
- "label": "Where",
- "configProperty": "actionConfiguration.formData.list.where.data",
- "nestedLevels": 3,
- "controlType": "WHERE_CLAUSE",
- "-subtitle": "Array of Objects",
- "-tooltipText": "Array of Objects",
- "-alternateViewTypes": ["json"],
- "logicalTypes": [
- {
- "label": "AND",
- "value": "AND"
- },
- {
- "label": "OR",
- "value": "OR"
- }
- ],
- "comparisonTypes": [
- {
- "label": "==",
- "value": "EQ"
- },
- {
- "label": "!=",
- "value": "NOT_EQ"
- },
- {
- "label": "in",
- "value": "IN"
- },
- {
- "label": "not in",
- "value": "NOT_IN"
- }
- ]
}
]
},
{
- "controlType": "SECTION",
- "label": "Options",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Generate signed URL",
@@ -122,9 +76,52 @@
"value": "NO"
}
]
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "description": "Optional",
+ "children": [
+ {
+ "label": "Filter data",
+ "configProperty": "actionConfiguration.formData.list.where.data",
+ "nestedLevels": 3,
+ "controlType": "WHERE_CLAUSE",
+ "-subtitle": "Array of Objects",
+ "-tooltipText": "Array of Objects",
+ "-alternateViewTypes": ["json"],
+ "logicalTypes": [
+ {
+ "label": "AND",
+ "value": "AND"
+ },
+ {
+ "label": "OR",
+ "value": "OR"
+ }
+ ],
+ "comparisonTypes": [
+ {
+ "label": "==",
+ "value": "EQ"
+ },
+ {
+ "label": "!=",
+ "value": "NOT_EQ"
+ },
+ {
+ "label": "in",
+ "value": "IN"
+ },
+ {
+ "label": "not in",
+ "value": "NOT_IN"
+ }
+ ]
},
{
- "label": "Sort By",
+ "label": "Sort data",
"configProperty": "actionConfiguration.formData.list.sortBy.data",
"controlType": "SORTING",
"-subtitle": "Array of Objects",
@@ -132,7 +129,7 @@
"-alternateViewTypes": ["json"]
},
{
- "label": "Paginate By",
+ "label": "Paginate data",
"configProperty": "actionConfiguration.formData.list.pagination.data",
"controlType": "PAGINATION",
"-subtitle": "Object",
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/read.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/read.json
index ca069a97380..749f86709c2 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/read.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/read.json
@@ -1,13 +1,12 @@
{
"identifier": "READ_FILE",
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'READ_FILE'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select bucket to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"children": [
{
"label": "Bucket name",
@@ -20,8 +19,7 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
"description": "Optional",
"children": [
{
diff --git a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json
index 82d8d5d91d1..0a1976bf8f1 100644
--- a/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/amazons3Plugin/src/main/resources/editor/root.json
@@ -1,39 +1,44 @@
{
"editor": [
{
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
- "label": "Command",
- "description": "Choose the method you would like to use",
- "configProperty": "actionConfiguration.formData.command.data",
- "controlType": "DROP_DOWN",
- "initialValue": "LIST",
- "options": [
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "children": [
{
- "label": "List files in bucket",
- "value": "LIST"
- },
- {
- "label": "Create a new file",
- "value": "UPLOAD_FILE_FROM_BODY"
- },
- {
- "label": "Create multiple new files",
- "value": "UPLOAD_MULTIPLE_FILES_FROM_BODY"
- },
- {
- "label": "Read file",
- "value": "READ_FILE"
- },
- {
- "label": "Delete file",
- "value": "DELETE_FILE"
- },
- {
- "label": "Delete multiple files",
- "value": "DELETE_MULTIPLE_FILES"
+ "label": "Command",
+ "description": "Choose the method you would like to use",
+ "configProperty": "actionConfiguration.formData.command.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "LIST",
+ "options": [
+ {
+ "label": "List files in bucket",
+ "value": "LIST"
+ },
+ {
+ "label": "Create a new file",
+ "value": "UPLOAD_FILE_FROM_BODY"
+ },
+ {
+ "label": "Create multiple new files",
+ "value": "UPLOAD_MULTIPLE_FILES_FROM_BODY"
+ },
+ {
+ "label": "Read file",
+ "value": "READ_FILE"
+ },
+ {
+ "label": "Delete file",
+ "value": "DELETE_FILE"
+ },
+ {
+ "label": "Delete multiple files",
+ "value": "DELETE_MULTIPLE_FILES"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json
new file mode 100644
index 00000000000..a1621376380
--- /dev/null
+++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/chat.json
@@ -0,0 +1,130 @@
+{
+ "identifier": "CHAT",
+ "controlType": "SECTION_V2",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
+ },
+ "children": [
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "Models",
+ "tooltipText": "Select the model for response generation",
+ "subtitle": "ID of the model to use.",
+ "isRequired": true,
+ "propertyName": "chat_model_id",
+ "configProperty": "actionConfiguration.formData.chatModel.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "",
+ "options": [],
+ "placeholderText": "All models will be fetched.",
+ "fetchOptionsConditionally": true,
+ "setFirstOptionAsDefault": true,
+ "alternateViewTypes": ["json"],
+ "conditionals": {
+ "enable": "{{true}}",
+ "fetchDynamicValues": {
+ "condition": "{{actionConfiguration.formData.command.data === 'CHAT'}}",
+ "config": {
+ "params": {
+ "requestType": "CHAT_MODELS",
+ "displayType": "DROP_DOWN"
+ }
+ }
+ }
+ }
+ },
+ {
+ "label": "Max Tokens",
+ "tooltipText": "The maximum number of tokens to generate in the chat completion.",
+ "subtitle": "The maximum number of tokens to generate in the chat completion.",
+ "Description": "Put a positive integer value",
+ "configProperty": "actionConfiguration.formData.maxTokens",
+ "controlType": "INPUT_TEXT",
+ "initialValue": "256",
+ "isRequired": true,
+ "dataType": "NUMBER",
+ "customStyles": {
+ "width": "270px",
+ "minWidth": "270px"
+ }
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "System Prompt",
+ "Description": "Provide additional instructions for the AI model as system prompt",
+ "subtitle": "Provide additional instructions for the AI model as system prompt",
+ "configProperty": "actionConfiguration.formData.systemPrompt.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
+ "initialValue": "",
+ "isRequired": false,
+ "customStyles": {
+ "width": "590px",
+ "minWidth": "400px"
+ }
+ },
+ {
+ "label": "Messages",
+ "tooltipText": "Ask a question",
+ "subtitle": "A list of messages comprising the conversation so far.",
+ "propertyName": "messages",
+ "isRequired": true,
+ "configProperty": "actionConfiguration.formData.messages.data",
+ "controlType": "ARRAY_FIELD",
+ "addMoreButtonLabel": "Add message",
+ "alternateViewTypes": ["json"],
+ "schema": [
+ {
+ "label": "Role",
+ "key": "role",
+ "controlType": "DROP_DOWN",
+ "initialValue": "Human",
+ "options": [
+ {
+ "label": "Human",
+ "value": "Human"
+ },
+ {
+ "label": "Assistant",
+ "value": "Assistant"
+ }
+ ]
+ },
+ {
+ "label": "Content",
+ "key": "content",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "placeholderText": "{{ UserInput.text }}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "Temperature",
+ "tooltipText": "Put a value between 0 and 1",
+ "Description": "Put a value between 0 and 1",
+ "subtitle": "Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks.",
+ "configProperty": "actionConfiguration.formData.temperature",
+ "controlType": "INPUT_TEXT",
+ "dataType": "NUMBER",
+ "initialValue": "1",
+ "isRequired": false,
+ "customStyles": {
+ "width": "270px",
+ "minWidth": "270px"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/root.json
index 2b674a2fc49..abc010dddc7 100644
--- a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/root.json
@@ -2,7 +2,7 @@
"editor": [
{
"controlType": "SECTION_V2",
- "identifier": "SECTION-ONE",
+ "identifier": "SELECTOR",
"children": [
{
"controlType": "DOUBLE_COLUMN_ZONE",
@@ -27,316 +27,9 @@
]
}
]
- },
- {
- "controlType": "DOUBLE_COLUMN_ZONE",
- "identifier": "SO-Z2",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
- },
- "children": [
- {
- "label": "Models",
- "tooltipText": "Select the model for response generation",
- "subtitle": "ID of the model to use.",
- "isRequired": true,
- "propertyName": "chat_model_id",
- "configProperty": "actionConfiguration.formData.chatModel.data",
- "controlType": "DROP_DOWN",
- "initialValue": "",
- "options": [],
- "placeholderText": "All models will be fetched.",
- "fetchOptionsConditionally": true,
- "setFirstOptionAsDefault": true,
- "alternateViewTypes": ["json"],
- "conditionals": {
- "enable": "{{true}}",
- "fetchDynamicValues": {
- "condition": "{{actionConfiguration.formData.command.data === 'CHAT'}}",
- "config": {
- "params": {
- "requestType": "CHAT_MODELS",
- "displayType": "DROP_DOWN"
- }
- }
- }
- }
- },
- {
- "label": "Max Tokens",
- "tooltipText": "The maximum number of tokens to generate in the chat completion.",
- "subtitle": "The maximum number of tokens to generate in the chat completion.",
- "Description": "Put a positive integer value",
- "configProperty": "actionConfiguration.formData.maxTokens",
- "controlType": "INPUT_TEXT",
- "initialValue": "256",
- "isRequired": true,
- "dataType": "NUMBER",
- "customStyles": {
- "width": "270px",
- "minWidth": "270px"
- }
- }
- ]
- },
- {
- "controlType": "SINGLE_COLUMN_ZONE",
- "identifier": "SO-Z3",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
- },
- "children": [
- {
- "label": "System Prompt",
- "Description": "Provide additional instructions for the AI model as system prompt",
- "subtitle": "Provide additional instructions for the AI model as system prompt",
- "configProperty": "actionConfiguration.formData.systemPrompt.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
- "initialValue": "",
- "isRequired": false,
- "customStyles": {
- "width": "590px",
- "minWidth": "400px"
- }
- }
- ]
- },
- {
- "controlType": "DOUBLE_COLUMN_ZONE",
- "identifier": "SO-Z4",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'VISION'}}"
- },
- "children": [
- {
- "label": "Models",
- "tooltipText": "Select the model for response generation",
- "subtitle": "ID of the model to use.",
- "isRequired": true,
- "propertyName": "vision_model_id",
- "configProperty": "actionConfiguration.formData.visionModel.data",
- "controlType": "DROP_DOWN",
- "initialValue": "",
- "options": [],
- "placeholderText": "All models will be fetched.",
- "fetchOptionsConditionally": true,
- "setFirstOptionAsDefault": true,
- "alternateViewTypes": ["json"],
- "conditionals": {
- "enable": "{{true}}",
- "fetchDynamicValues": {
- "condition": "{{actionConfiguration.formData.command.data === 'VISION'}}",
- "config": {
- "params": {
- "requestType": "VISION_MODELS",
- "displayType": "DROP_DOWN"
- }
- }
- }
- }
- },
- {
- "label": "Max Tokens",
- "tooltipText": "The maximum number of tokens to generate in the chat completion.",
- "subtitle": "The maximum number of tokens to generate in the chat completion.",
- "Description": "Put a positive integer value",
- "configProperty": "actionConfiguration.formData.maxTokens",
- "controlType": "INPUT_TEXT",
- "initialValue": "256",
- "isRequired": true,
- "dataType": "NUMBER",
- "customStyles": {
- "width": "270px",
- "minWidth": "270px"
- }
- }
- ]
- },
- {
- "controlType": "SINGLE_COLUMN_ZONE",
- "identifier": "SO-Z5",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'VISION'}}"
- },
- "children": [
- {
- "label": "System Prompt",
- "Description": "Provide additional instructions for the AI model as system prompt",
- "subtitle": "Provide additional instructions for the AI model as system prompt",
- "configProperty": "actionConfiguration.formData.systemPrompt.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
- "initialValue": "",
- "isRequired": false
- }
- ]
- }
- ]
- },
- {
- "controlType": "SECTION_V2",
- "identifier": "SECTION-TWO",
- "children": [
- {
- "controlType": "SINGLE_COLUMN_ZONE",
- "identifier": "ST-Z1",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
- },
- "children": [
- {
- "label": "Messages",
- "tooltipText": "Ask a question",
- "subtitle": "A list of messages comprising the conversation so far.",
- "propertyName": "messages",
- "isRequired": true,
- "configProperty": "actionConfiguration.formData.messages.data",
- "controlType": "ARRAY_FIELD",
- "addMoreButtonLabel": "Add message",
- "alternateViewTypes": ["json"],
- "schema": [
- {
- "label": "Role",
- "key": "role",
- "controlType": "DROP_DOWN",
- "initialValue": "Human",
- "options": [
- {
- "label": "Human",
- "value": "Human"
- },
- {
- "label": "Assistant",
- "value": "Assistant"
- }
- ]
- },
- {
- "label": "Content",
- "key": "content",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "placeholderText": "{{ UserInput.text }}"
- }
- ]
- }
- ]
- },
- {
- "controlType": "SINGLE_COLUMN_ZONE",
- "identifier": "ST-Z2",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'VISION'}}"
- },
- "children": [
- {
- "label": "Messages",
- "tooltipText": "Ask a question",
- "subtitle": "A list of messages comprising the conversation so far. You can pass base64 encoded image directly in the request.",
- "propertyName": "messages",
- "isRequired": true,
- "configProperty": "actionConfiguration.formData.messages.data",
- "controlType": "ARRAY_FIELD",
- "addMoreButtonLabel": "Add message",
- "alternateViewTypes": ["json"],
- "schema": [
- {
- "label": "Role",
- "key": "role",
- "controlType": "DROP_DOWN",
- "initialValue": "Human",
- "options": [
- {
- "label": "Human",
- "value": "Human"
- },
- {
- "label": "Assistant",
- "value": "Assistant"
- }
- ]
- },
- {
- "label": "Type",
- "key": "type",
- "controlType": "DROP_DOWN",
- "initialValue": "text",
- "options": [
- {
- "label": "Text",
- "value": "text"
- },
- {
- "label": "Image",
- "value": "image"
- }
- ]
- },
- {
- "label": "Content",
- "key": "content",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "placeholderText": "{{Img1.image}} or {{Input1.text}}"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "controlType": "SECTION_V2",
- "identifier": "SECTION-THREE",
- "children": [
- {
- "controlType": "DOUBLE_COLUMN_ZONE",
- "identifier": "STH-Z1",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'CHAT'}}"
- },
- "children": [
- {
- "label": "Temperature",
- "tooltipText": "Put a value between 0 and 1",
- "Description": "Put a value between 0 and 1",
- "subtitle": "Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks.",
- "configProperty": "actionConfiguration.formData.temperature",
- "controlType": "INPUT_TEXT",
- "dataType": "NUMBER",
- "initialValue": "1",
- "isRequired": false,
- "customStyles": {
- "width": "270px",
- "minWidth": "270px"
- }
- }
- ]
- },
- {
- "controlType": "DOUBLE_COLUMN_ZONE",
- "identifier": "STH-Z2",
- "conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'VISION'}}"
- },
- "children": [
- {
- "label": "Temperature",
- "tooltipText": "Put a value between 0 and 1",
- "Description": "Put a value between 0 and 1",
- "subtitle": "Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks.",
- "configProperty": "actionConfiguration.formData.temperature",
- "controlType": "INPUT_TEXT",
- "dataType": "NUMBER",
- "initialValue": "1",
- "isRequired": false,
- "customStyles": {
- "width": "270px",
- "minWidth": "270px"
- }
- }
- ]
}
]
}
- ]
+ ],
+ "files": ["chat.json", "vision.json"]
}
diff --git a/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json
new file mode 100644
index 00000000000..282ddac5355
--- /dev/null
+++ b/app/server/appsmith-plugins/anthropicPlugin/src/main/resources/editor/vision.json
@@ -0,0 +1,142 @@
+{
+ "identifier": "VISION",
+ "controlType": "SECTION_V2",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.command.data === 'VISION'}}"
+ },
+ "children": [
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "Models",
+ "tooltipText": "Select the model for response generation",
+ "subtitle": "ID of the model to use.",
+ "isRequired": true,
+ "propertyName": "vision_model_id",
+ "configProperty": "actionConfiguration.formData.visionModel.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "",
+ "options": [],
+ "placeholderText": "All models will be fetched.",
+ "fetchOptionsConditionally": true,
+ "setFirstOptionAsDefault": true,
+ "alternateViewTypes": ["json"],
+ "conditionals": {
+ "enable": "{{true}}",
+ "fetchDynamicValues": {
+ "condition": "{{actionConfiguration.formData.command.data === 'VISION'}}",
+ "config": {
+ "params": {
+ "requestType": "VISION_MODELS",
+ "displayType": "DROP_DOWN"
+ }
+ }
+ }
+ }
+ },
+ {
+ "label": "Max Tokens",
+ "tooltipText": "The maximum number of tokens to generate in the chat completion.",
+ "subtitle": "The maximum number of tokens to generate in the chat completion.",
+ "Description": "Put a positive integer value",
+ "configProperty": "actionConfiguration.formData.maxTokens",
+ "controlType": "INPUT_TEXT",
+ "initialValue": "256",
+ "isRequired": true,
+ "dataType": "NUMBER",
+ "customStyles": {
+ "width": "270px",
+ "minWidth": "270px"
+ }
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "System Prompt",
+ "Description": "Provide additional instructions for the AI model as system prompt",
+ "subtitle": "Provide additional instructions for the AI model as system prompt",
+ "configProperty": "actionConfiguration.formData.systemPrompt.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
+ "initialValue": "",
+ "isRequired": false
+ },
+ {
+ "label": "Messages",
+ "tooltipText": "Ask a question",
+ "subtitle": "A list of messages comprising the conversation so far. You can pass base64 encoded image directly in the request.",
+ "propertyName": "messages",
+ "isRequired": true,
+ "configProperty": "actionConfiguration.formData.messages.data",
+ "controlType": "ARRAY_FIELD",
+ "addMoreButtonLabel": "Add message",
+ "alternateViewTypes": ["json"],
+ "schema": [
+ {
+ "label": "Role",
+ "key": "role",
+ "controlType": "DROP_DOWN",
+ "initialValue": "Human",
+ "options": [
+ {
+ "label": "Human",
+ "value": "Human"
+ },
+ {
+ "label": "Assistant",
+ "value": "Assistant"
+ }
+ ]
+ },
+ {
+ "label": "Type",
+ "key": "type",
+ "controlType": "DROP_DOWN",
+ "initialValue": "text",
+ "options": [
+ {
+ "label": "Text",
+ "value": "text"
+ },
+ {
+ "label": "Image",
+ "value": "image"
+ }
+ ]
+ },
+ {
+ "label": "Content",
+ "key": "content",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "placeholderText": "{{Img1.image}} or {{Input1.text}}"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "children": [
+ {
+ "label": "Temperature",
+ "tooltipText": "Put a value between 0 and 1",
+ "Description": "Put a value between 0 and 1",
+ "subtitle": "Defaults to 1. Ranges from 0 to 1. Use temp closer to 0 for analytical / multiple choice, and closer to 1 for creative and generative tasks.",
+ "configProperty": "actionConfiguration.formData.temperature",
+ "controlType": "INPUT_TEXT",
+ "dataType": "NUMBER",
+ "initialValue": "1",
+ "isRequired": false,
+ "customStyles": {
+ "width": "270px",
+ "minWidth": "270px"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json
index 49a61e3faf8..bab24a7605c 100644
--- a/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/databricksPlugin/src/main/resources/editor/root.json
@@ -1,14 +1,20 @@
{
"editor": [
{
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
- "label": "",
- "configProperty": "actionConfiguration.body",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "evaluationSubstitutionType": "TEMPLATE"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "SELECTOR-Z1",
+ "children": [
+ {
+ "label": "",
+ "configProperty": "actionConfiguration.body",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/addToCollection.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/addToCollection.json
index 00c1dee0183..c8394db1e54 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/addToCollection.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/addToCollection.json
@@ -1,32 +1,50 @@
{
+ "controlType": "SECTION_V2",
"identifier": "ADD_TO_COLLECTION",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'ADD_TO_COLLECTION'}}"
},
"children": [
{
- "label": "Collection/Document path",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "ADD-TO-COLLECTION-Z1",
+ "children": [
+ {
+ "label": "Collection/Document path",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
},
{
- "label": "Body",
- "configProperty": "actionConfiguration.formData.body.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "initialValue": "",
- "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "ADD-TO-COLLECTION-Z2",
+ "children": [
+ {
+ "label": "Body",
+ "configProperty": "actionConfiguration.formData.body.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "initialValue": "",
+ "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ }
+ ]
},
{
- "label": "Timestamp Path",
- "configProperty": "actionConfiguration.formData.timestampValuePath.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "initialValue": "",
- "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "ADD-TO-COLLECTION-Z3",
+ "children": [
+ {
+ "label": "Timestamp Path",
+ "configProperty": "actionConfiguration.formData.timestampValuePath.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "initialValue": "",
+ "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json
index 2da8632fd28..18fc12a2f3b 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/createDocument.json
@@ -1,32 +1,50 @@
{
+ "controlType": "SECTION_V2",
"identifier": "CREATE_DOCUMENT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'CREATE_DOCUMENT'}}"
},
"children": [
{
- "label": "Collection Name",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "CREATE-DOCUMENT-Z1",
+ "children": [
+ {
+ "label": "Collection Name",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
},
{
- "label": "Body",
- "configProperty": "actionConfiguration.formData.body.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "initialValue": "",
- "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "CREATE-DOCUMENT-Z2",
+ "children": [
+ {
+ "label": "Body",
+ "configProperty": "actionConfiguration.formData.body.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "initialValue": "",
+ "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ }
+ ]
},
{
- "label": "Timestamp Path",
- "configProperty": "actionConfiguration.formData.timestampValuePath.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "initialValue": "",
- "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "CREATE-DOCUMENT-Z3",
+ "children": [
+ {
+ "label": "Timestamp Path",
+ "configProperty": "actionConfiguration.formData.timestampValuePath.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "initialValue": "",
+ "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json
index 651fc4cd294..5943ec682a3 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/deleteDocument.json
@@ -1,18 +1,24 @@
{
+ "controlType": "SECTION_V2",
"identifier": "DELETE_DOCUMENT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE_DOCUMENT'}}"
},
"children": [
{
- "label": "Collection/Document path",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "placeholderText": "collection/{{Table1.selectedRow._ref}}",
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DELETE-DOCUMENT-Z1",
+ "children": [
+ {
+ "label": "Collection/Document path",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "placeholderText": "collection/{{Table1.selectedRow._ref}}",
+ "initialValue": ""
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json
index ef11956f380..b1e5d07b536 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getCollection.json
@@ -1,101 +1,131 @@
{
+ "controlType": "SECTION_V2",
"identifier": "GET_COLLECTION",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'GET_COLLECTION'}}"
},
"children": [
{
- "label": "Collection Name",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "GET-COLLECTION-Z1",
+ "children": [
+ {
+ "label": "Collection Name",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
},
{
- "label": "Where",
- "configProperty": "actionConfiguration.formData.where.data",
- "nestedLevels": 1,
- "controlType": "WHERE_CLAUSE",
- "-subtitle": "Array of Objects",
- "-tooltipText": "Array of Objects",
- "-alternateViewTypes": ["json"],
- "logicalTypes": [
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "GET-COLLECTION-Z2",
+ "children": [
{
- "label": "AND",
- "value": "AND"
+ "label": "Where",
+ "configProperty": "actionConfiguration.formData.where.data",
+ "nestedLevels": 1,
+ "controlType": "WHERE_CLAUSE",
+ "-subtitle": "Array of Objects",
+ "-tooltipText": "Array of Objects",
+ "-alternateViewTypes": ["json"],
+ "logicalTypes": [
+ {
+ "label": "AND",
+ "value": "AND"
+ }
+ ],
+ "comparisonTypes": [
+ {
+ "label": "==",
+ "value": "EQ"
+ },
+ {
+ "label": "<",
+ "value": "LT"
+ },
+ {
+ "label": "<=",
+ "value": "LTE"
+ },
+ {
+ "label": ">=",
+ "value": "GTE"
+ },
+ {
+ "label": ">",
+ "value": "GT"
+ },
+ {
+ "label": "in",
+ "value": "IN"
+ },
+ {
+ "label": "Contains",
+ "value": "ARRAY_CONTAINS"
+ },
+ {
+ "label": "Contains Any",
+ "value": "ARRAY_CONTAINS_ANY"
+ }
+ ]
}
- ],
- "comparisonTypes": [
- {
- "label": "==",
- "value": "EQ"
- },
- {
- "label": "<",
- "value": "LT"
- },
- {
- "label": "<=",
- "value": "LTE"
- },
- {
- "label": ">=",
- "value": "GTE"
- },
- {
- "label": ">",
- "value": "GT"
- },
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "GET-COLLECTION-Z3",
+ "children": [
{
- "label": "in",
- "value": "IN"
- },
+ "label": "Order By",
+ "configProperty": "actionConfiguration.formData.orderBy.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": false,
+ "initialValue": "",
+ "placeholderText": "[\"ascKey\", \"-descKey\"]"
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "GET-COLLECTION-Z4",
+ "children": [
{
- "label": "Contains",
- "value": "ARRAY_CONTAINS"
+ "label": "Start After",
+ "configProperty": "actionConfiguration.formData.next.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": false,
+ "initialValue": "",
+ "palceholderText": ""
},
{
- "label": "Contains Any",
- "value": "ARRAY_CONTAINS_ANY"
+ "label": "End Before",
+ "configProperty": "actionConfiguration.formData.prev.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": false,
+ "initialValue": ""
}
]
},
{
- "label": "Order By",
- "configProperty": "actionConfiguration.formData.orderBy.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": false,
- "initialValue": "",
- "placeholderText": "[\"ascKey\", \"-descKey\"]"
- },
- {
- "label": "Start After",
- "configProperty": "actionConfiguration.formData.next.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": false,
- "initialValue": "",
- "palceholderText": ""
- },
- {
- "label": "End Before",
- "configProperty": "actionConfiguration.formData.prev.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": false,
- "initialValue": ""
- },
- {
- "label": "Limit",
- "configProperty": "actionConfiguration.formData.limitDocuments.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": false,
- "palceholderText": "{{Table1.pageSize}}",
- "initialValue": "10"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "GET-COLLECTION-Z5",
+ "children": [
+ {
+ "label": "Limit",
+ "configProperty": "actionConfiguration.formData.limitDocuments.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": false,
+ "palceholderText": "{{Table1.pageSize}}",
+ "initialValue": "10"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json
index 2f1aa00bfc3..8422d805738 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/getDocument.json
@@ -1,17 +1,23 @@
{
+ "controlType": "SECTION_V2",
"identifier": "GET_DOCUMENT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'GET_DOCUMENT'}}"
},
"children": [
{
- "label": "Collection/Document path",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "GET-DOCUMENT-Z1",
+ "children": [
+ {
+ "label": "Collection/Document path",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json
index e15b769264c..c0986810e99 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/root.json
@@ -1,43 +1,49 @@
{
"editor": [
{
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
- "label": "Command",
- "description": "Choose method you would like to use",
- "configProperty": "actionConfiguration.formData.command.data",
- "controlType": "DROP_DOWN",
- "initialValue": "GET_COLLECTION",
- "options": [
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "SELECTOR-Z1",
+ "children": [
{
- "label": "List Documents",
- "value": "GET_COLLECTION"
- },
- {
- "label": "Create document",
- "value": "CREATE_DOCUMENT"
- },
- {
- "label": "Update document",
- "value": "UPDATE_DOCUMENT"
- },
- {
- "label": "Delete document",
- "value": "DELETE_DOCUMENT"
- },
- {
- "label": "Get Document",
- "value": "GET_DOCUMENT"
- },
- {
- "label": "Upsert Document",
- "value": "SET_DOCUMENT"
- },
- {
- "label": "Add document to collection",
- "value": "ADD_TO_COLLECTION"
+ "label": "Command",
+ "description": "Choose method you would like to use",
+ "configProperty": "actionConfiguration.formData.command.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "GET_COLLECTION",
+ "options": [
+ {
+ "label": "List Documents",
+ "value": "GET_COLLECTION"
+ },
+ {
+ "label": "Create document",
+ "value": "CREATE_DOCUMENT"
+ },
+ {
+ "label": "Update document",
+ "value": "UPDATE_DOCUMENT"
+ },
+ {
+ "label": "Delete document",
+ "value": "DELETE_DOCUMENT"
+ },
+ {
+ "label": "Get Document",
+ "value": "GET_DOCUMENT"
+ },
+ {
+ "label": "Upsert Document",
+ "value": "SET_DOCUMENT"
+ },
+ {
+ "label": "Add document to collection",
+ "value": "ADD_TO_COLLECTION"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json
index a874402b7f9..25dd8b0da1f 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/setDocument.json
@@ -1,32 +1,50 @@
{
+ "controlType": "SECTION_V2",
"identifier": "SET_DOCUMENT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'SET_DOCUMENT'}}"
},
"children": [
{
- "label": "Collection/Document path",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "SET-DOCUMENT-Z1",
+ "children": [
+ {
+ "label": "Collection/Document path",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
},
{
- "label": "Body",
- "configProperty": "actionConfiguration.formData.body.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "initialValue": "",
- "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "SET-DOCUMENT-Z2",
+ "children": [
+ {
+ "label": "Body",
+ "configProperty": "actionConfiguration.formData.body.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "initialValue": "",
+ "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ }
+ ]
},
{
- "label": "Timestamp Path",
- "configProperty": "actionConfiguration.formData.timestampValuePath.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "initialValue": "",
- "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "SET-DOCUMENT-Z3",
+ "children": [
+ {
+ "label": "Timestamp Path",
+ "configProperty": "actionConfiguration.formData.timestampValuePath.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "initialValue": "",
+ "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json
index 6bb8ef57d3a..3cdbda305dc 100644
--- a/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json
+++ b/app/server/appsmith-plugins/firestorePlugin/src/main/resources/editor/updateDocument.json
@@ -1,41 +1,59 @@
{
+ "controlType": "SECTION_V2",
"identifier": "UPDATE_DOCUMENT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'UPDATE_DOCUMENT'}}"
},
"children": [
{
- "label": "Collection/Document path",
- "configProperty": "actionConfiguration.formData.path.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": ""
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "UPDATE-DOCUMENT-Z1",
+ "children": [
+ {
+ "label": "Collection/Document path",
+ "configProperty": "actionConfiguration.formData.path.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": ""
+ }
+ ]
},
{
- "label": "Body",
- "configProperty": "actionConfiguration.formData.body.data",
- "controlType": "QUERY_DYNAMIC_TEXT",
- "initialValue": "",
- "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "UPDATE-DOCUMENT-Z2",
+ "children": [
+ {
+ "label": "Body",
+ "configProperty": "actionConfiguration.formData.body.data",
+ "controlType": "QUERY_DYNAMIC_TEXT",
+ "initialValue": "",
+ "placeholderText": "{\n \"name\": {{nameInput.text}},\n \"dob\": {{dobPicker.formattedDate}},\n \"gender\": {{genderSelect.selectedOptionValue}} \n}"
+ }
+ ]
},
{
- "label": "Delete Key Path",
- "configProperty": "actionConfiguration.formData.deleteKeyPath.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "isRequired": true,
- "initialValue": "",
- "placeholderText": "[\"userKey.nestedNamekey\"]"
- },
- {
- "label": "Timestamp Path",
- "configProperty": "actionConfiguration.formData.timestampValuePath.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "initialValue": "",
- "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "UPDATE-DOCUMENT-Z3",
+ "children": [
+ {
+ "label": "Delete Key Path",
+ "configProperty": "actionConfiguration.formData.deleteKeyPath.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "isRequired": true,
+ "initialValue": "",
+ "placeholderText": "[\"userKey.nestedNamekey\"]"
+ },
+ {
+ "label": "Timestamp Path",
+ "configProperty": "actionConfiguration.formData.timestampValuePath.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "initialValue": "",
+ "placeholderText": "[ \"checkinLog.timestampKey\" ]"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/delete.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/delete.json
index 4c143852ebb..09b6132fe64 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/delete.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/delete.json
@@ -1,18 +1,24 @@
{
+ "controlType": "SECTION_V2",
"identifier": "DELETE",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE_ONE' && actionConfiguration.formData.entityType.data == 'ROWS'}}"
},
"children": [
{
- "label": "Row Index",
- "tooltipText": "The rowIndex property of the row object returned by the fetch query",
- "propertyName": "rows_delete_rowIndex",
- "configProperty": "actionConfiguration.formData.rowIndex.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "isRequired": true,
- "placeholderText": "{{Table1.selectedRow.rowIndex}}"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DELETE-Z1",
+ "children": [
+ {
+ "label": "Row Index",
+ "tooltipText": "The rowIndex property of the row object returned by the fetch query",
+ "propertyName": "rows_delete_rowIndex",
+ "configProperty": "actionConfiguration.formData.rowIndex.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "isRequired": true,
+ "placeholderText": "{{Table1.selectedRow.rowIndex}}"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/entity_data.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/entity_data.json
new file mode 100644
index 00000000000..873f705c854
--- /dev/null
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/entity_data.json
@@ -0,0 +1,108 @@
+{
+ "controlType": "SECTION_V2",
+ "identifier": "ENTITY_SELECTOR",
+ "children": [
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "ENTITY-SELECTOR-Z1",
+ "children": [
+ {
+ "label": "Entity",
+ "tooltipText": "The entity to query on the datasource",
+ "description": "Select the entity that you would like to work with",
+ "propertyName": "entityType",
+ "configProperty": "actionConfiguration.formData.entityType.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "ROWS",
+ "isRequired": true,
+ "setFirstOptionAsDefault": true,
+ "options": [
+ {
+ "disabled": "{{ ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'UPDATE_MANY', 'INSERT_MANY'].includes(actionConfiguration.formData.command.data) === false }}",
+ "label": "Sheet Row(s)",
+ "value": "ROWS"
+ },
+ {
+ "disabled": "{{ ['FETCH_MANY', 'FETCH_DETAILS', 'INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false || (['INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === true && ['https://www.googleapis.com/auth/drive.file'].includes(datasourceConfiguration.authentication.scopeString) === true)}}",
+ "label": "Spreadsheet",
+ "value": "SPREADSHEET"
+ },
+ {
+ "disabled": "{{ ['DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false }}",
+ "label": "Sheet",
+ "value": "SHEET"
+ }
+ ],
+ "conditionals": {
+ "evaluateFormConfig": {
+ "condition": "{{true}}",
+ "paths": ["options"]
+ }
+ }
+ },
+ {
+ "label": "Spreadsheet",
+ "tooltipText": "The URL of the spreadsheet in your Google Drive",
+ "propertyName": "rows_get_spreadsheetUrl",
+ "configProperty": "actionConfiguration.formData.sheetUrl.data",
+ "controlType": "DROP_DOWN",
+ "isSearchable": true,
+ "isRequired": true,
+ "-placeholderText": "https://docs.google.com/spreadsheets/d/xyz/edit#gid=0",
+ "fetchOptionsConditionally": true,
+ "alternateViewTypes": ["json"],
+ "conditionals": {
+ "show": "{{ !!actionConfiguration.formData.entityType.data && (new Object({ 'SPREADSHEET': ['FETCH_DETAILS', 'DELETE_ONE'], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data)) }}",
+ "fetchDynamicValues": {
+ "condition": "{{true}}",
+ "config": {
+ "params": {
+ "requestType": "SPREADSHEET_SELECTOR",
+ "displayType": "DROP_DOWN"
+ }
+ }
+ }
+ }
+ },
+ {
+ "label": "Sheet name",
+ "propertyName": "rows_get_sheetName",
+ "tooltipText": "The name of the sheet inside the spreadsheet",
+ "configProperty": "actionConfiguration.formData.sheetName.data",
+ "controlType": "DROP_DOWN",
+ "isSearchable": true,
+ "isRequired": true,
+ "fetchOptionsConditionally": true,
+ "alternateViewTypes": ["json"],
+ "conditionals": {
+ "show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetUrl.data }}",
+ "fetchDynamicValues": {
+ "condition": "{{ !!actionConfiguration.formData.sheetUrl.data }}",
+ "config": {
+ "params": {
+ "requestType": "SHEET_SELECTOR",
+ "displayType": "DROP_DOWN",
+ "parameters": {
+ "sheetUrl": "{{actionConfiguration.formData.sheetUrl.data}}"
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "label": "Table heading row index",
+ "tooltipText": "The index of the column names in the sheet (starts from 1)",
+ "propertyName": "rows_get_tableHeadingRowIndex",
+ "configProperty": "actionConfiguration.formData.tableHeaderIndex.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "initialValue": "1",
+ "isRequired": true,
+ "conditionals": {
+ "show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': [], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetName.data }}"
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/fetch_many.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/fetch_many.json
index c516b1b5a77..cbb21cb0f91 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/fetch_many.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/fetch_many.json
@@ -1,165 +1,220 @@
{
- "identifier": "FETCH_MANY",
"controlType": "SECTION",
+ "identifier": "FETCH_MANY",
"conditionals": {
"show": "{{!!actionConfiguration.formData.entityType.data && actionConfiguration.formData.entityType.data !== 'SPREADSHEET' && actionConfiguration.formData.command.data === 'FETCH_MANY' && !!actionConfiguration.formData.sheetName.data}}"
},
"children": [
{
- "label": "Columns",
- "tooltipText": "The columns to fetch from the google sheet",
- "propertyName": "rows_get_projection",
- "configProperty": "actionConfiguration.formData.projection.data",
- "controlType": "PROJECTION",
- "initialValue": [],
- "options": [],
- "placeholderText": "All columns will be fetched.",
- "fetchOptionsConditionally": true,
- "alternateViewTypes": ["json"],
- "conditionals": {
- "enable": "{{!!actionConfiguration.formData.sheetUrl.data && !!actionConfiguration.formData.sheetName.data && !!actionConfiguration.formData.tableHeaderIndex.data}}",
- "fetchDynamicValues": {
- "condition": "{{!!actionConfiguration.formData.sheetUrl.data && !!actionConfiguration.formData.sheetName.data && !!actionConfiguration.formData.tableHeaderIndex.data}}",
- "config": {
- "params": {
- "requestType": "COLUMNS_SELECTOR",
- "displayType": "DROP_DOWN",
- "parameters": {
- "sheetUrl": "{{actionConfiguration.formData.sheetUrl.data}}",
- "sheetName": "{{actionConfiguration.formData.sheetName.data}}",
- "tableHeaderIndex": "{{actionConfiguration.formData.tableHeaderIndex.data}}"
+ "controlType": "SECTION_V2",
+ "identifier": "FETCH_MANY_SECTION_ONE",
+ "children": [
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "FETCH_MANY-Z1",
+ "children": [
+ {
+ "label": "Columns",
+ "tooltipText": "The columns to fetch from the google sheet",
+ "propertyName": "rows_get_projection",
+ "configProperty": "actionConfiguration.formData.projection.data",
+ "controlType": "PROJECTION",
+ "initialValue": [],
+ "options": [],
+ "placeholderText": "All columns will be fetched.",
+ "fetchOptionsConditionally": true,
+ "alternateViewTypes": ["json"],
+ "conditionals": {
+ "enable": "{{!!actionConfiguration.formData.sheetUrl.data && !!actionConfiguration.formData.sheetName.data && !!actionConfiguration.formData.tableHeaderIndex.data}}",
+ "fetchDynamicValues": {
+ "condition": "{{!!actionConfiguration.formData.sheetUrl.data && !!actionConfiguration.formData.sheetName.data && !!actionConfiguration.formData.tableHeaderIndex.data}}",
+ "config": {
+ "params": {
+ "requestType": "COLUMNS_SELECTOR",
+ "displayType": "DROP_DOWN",
+ "parameters": {
+ "sheetUrl": "{{actionConfiguration.formData.sheetUrl.data}}",
+ "sheetName": "{{actionConfiguration.formData.sheetName.data}}",
+ "tableHeaderIndex": "{{actionConfiguration.formData.tableHeaderIndex.data}}"
+ }
+ }
+ }
+ }
}
}
- }
- }
- }
- },
- {
- "label": "Filter Format",
- "tooltipText": "The format of the filter to be applied on the data",
- "propertyName": "rows_get_queryFormat",
- "conditionals": {
- "show": "{{actionConfiguration.formData.entityType.data === 'ROWS'}}"
- },
- "configProperty": "actionConfiguration.formData.queryFormat.data",
- "controlType": "DROP_DOWN",
- "initialValue": "ROWS",
- "options": [
- {
- "label": "Where Clause",
- "value": "ROWS"
+ ]
},
{
- "label": "Cell range",
- "value": "RANGE"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "FETCH_MANY-Z2",
+ "children": [
+ {
+ "label": "Filter Format",
+ "tooltipText": "The format of the filter to be applied on the data",
+ "propertyName": "rows_get_queryFormat",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.entityType.data === 'ROWS'}}"
+ },
+ "configProperty": "actionConfiguration.formData.queryFormat.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "ROWS",
+ "options": [
+ {
+ "label": "Where Clause",
+ "value": "ROWS"
+ },
+ {
+ "label": "Cell range",
+ "value": "RANGE"
+ }
+ ]
+ },
+ {
+ "label": "Cell range",
+ "propertyName": "rows_get_cellRange",
+ "tooltipText": "The Google Sheet notation of cells to filter (A1:B)",
+ "subtitle": "Specify the google sheet range of cells",
+ "configProperty": "actionConfiguration.formData.range.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.queryFormat.data === 'RANGE'}}"
+ },
+ "initialValue": "",
+ "placeholderText": "A2:Z"
+ }
+ ]
}
]
},
{
- "label": "Cell range",
- "propertyName": "rows_get_cellRange",
- "tooltipText": "The Google Sheet notation of cells to filter (A1:B)",
- "subtitle": "Specify the google sheet range of cells",
- "configProperty": "actionConfiguration.formData.range.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "conditionals": {
- "show": "{{actionConfiguration.formData.queryFormat.data === 'RANGE'}}"
- },
- "initialValue": "",
- "placeholderText": "A2:Z"
- },
- {
- "identifier": "ROWS_SECTION",
- "controlType": "SECTION",
- "label": "Rows Section",
- "conditionals": {
- "show": "{{actionConfiguration.formData.queryFormat.data === 'ROWS'}}"
- },
+ "controlType": "SECTION_V2",
+ "identifier": "FETCH_MANY_SECTION_TWO",
"children": [
{
- "label": "Filter By",
- "tooltipText": "Filters data returned",
- "subtitle": "The filter applied on the data. Can be empty",
- "propertyName": "rows_get_rowSheetName",
- "configProperty": "actionConfiguration.formData.where.data",
- "nestedLevels": 3,
- "controlType": "WHERE_CLAUSE",
- "logicalTypes": [
- {
- "label": "AND",
- "value": "AND"
- },
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "ROWS-SECTION-Z2",
+ "label": "Rows Section",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.queryFormat.data === 'ROWS'}}"
+ },
+ "children": [
{
- "label": "OR",
- "value": "OR"
+ "label": "Filter By",
+ "tooltipText": "Filters data returned",
+ "subtitle": "The filter applied on the data. Can be empty",
+ "propertyName": "rows_get_rowSheetName",
+ "configProperty": "actionConfiguration.formData.where.data",
+ "nestedLevels": 3,
+ "controlType": "WHERE_CLAUSE",
+ "logicalTypes": [
+ {
+ "label": "AND",
+ "value": "AND"
+ },
+ {
+ "label": "OR",
+ "value": "OR"
+ }
+ ],
+ "comparisonTypes": [
+ {
+ "label": "<",
+ "value": "LT"
+ },
+ {
+ "label": "<=",
+ "value": "LTE"
+ },
+ {
+ "label": "==",
+ "value": "EQ"
+ },
+ {
+ "label": "!=",
+ "value": "NOT_EQ"
+ },
+ {
+ "label": ">=",
+ "value": "GTE"
+ },
+ {
+ "label": ">",
+ "value": "GT"
+ },
+ {
+ "label": "in",
+ "value": "IN"
+ },
+ {
+ "label": "contains",
+ "value": "CONTAINS"
+ },
+ {
+ "label": "not in",
+ "value": "NOT_IN"
+ }
+ ],
+ "alternateViewTypes": ["json"]
}
- ],
- "comparisonTypes": [
- {
- "label": "<",
- "value": "LT"
- },
- {
- "label": "<=",
- "value": "LTE"
- },
- {
- "label": "==",
- "value": "EQ"
- },
- {
- "label": "!=",
- "value": "NOT_EQ"
- },
- {
- "label": ">=",
- "value": "GTE"
- },
- {
- "label": ">",
- "value": "GT"
- },
- {
- "label": "in",
- "value": "IN"
- },
- {
- "label": "contains",
- "value": "CONTAINS"
- },
+ ]
+ }
+ ]
+ },
+ {
+ "controlType": "SECTION_V2",
+ "identifier": "FETCH_MANY_SECTION_THREE",
+ "children": [
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "ROWS-SECTION-Z3",
+ "label": "Rows Section",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.queryFormat.data === 'ROWS'}}"
+ },
+ "children": [
{
- "label": "not in",
- "value": "NOT_IN"
+ "label": "Sort By",
+ "tooltipText": "The parameters to sort the data by",
+ "configProperty": "actionConfiguration.formData.sortBy.data",
+ "controlType": "SORTING",
+ "-subtitle": "Array of Objects",
+ "-tooltipText": "Array of Objects",
+ "alternateViewTypes": ["json"]
}
- ],
- "alternateViewTypes": ["json"]
- },
- {
- "label": "Sort By",
- "tooltipText": "The parameters to sort the data by",
- "configProperty": "actionConfiguration.formData.sortBy.data",
- "controlType": "SORTING",
- "-subtitle": "Array of Objects",
- "-tooltipText": "Array of Objects",
- "alternateViewTypes": ["json"]
- },
+ ]
+ }
+ ]
+ },
+ {
+ "controlType": "SECTION_V2",
+ "identifier": "FETCH_MANY_SECTION_FOUR",
+ "children": [
{
- "label": "",
- "configProperty": "actionConfiguration.formData.pagination.data",
- "controlType": "PAGINATION",
- "-subtitle": "Object",
- "placeholderText": {
- "limit": "{{Table1.pageSize}}",
- "offset": "{{(Table1.pageNo - 1)*Table1.pageSize}}"
- },
- "initialValue": {
- "limit": "20",
- "offset": "0"
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "ROWS-SECTION-Z4",
+ "label": "Rows Section",
+ "conditionals": {
+ "show": "{{actionConfiguration.formData.queryFormat.data === 'ROWS'}}"
},
- "tooltipText": {
- "limit": "Bind to the pageSize property of your widget {{Table1.pageSize}}",
- "offset": "Bind to the index of the first row to display {{(Table1.pageNo-1)*Table1.pageSize}}"
- }
+ "children": [
+ {
+ "configProperty": "actionConfiguration.formData.pagination.data",
+ "controlType": "PAGINATION",
+ "-subtitle": "Object",
+ "placeholderText": {
+ "limit": "{{Table1.pageSize}}",
+ "offset": "{{(Table1.pageNo - 1)*Table1.pageSize}}"
+ },
+ "initialValue": {
+ "limit": "20",
+ "offset": "0"
+ },
+ "tooltipText": {
+ "limit": "Bind to the pageSize property of your widget {{Table1.pageSize}}",
+ "offset": "Bind to the index of the first row to display {{(Table1.pageNo-1)*Table1.pageSize}}"
+ }
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/insert.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/insert.json
index 6363ddc8b8e..7d166273390 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/insert.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/insert.json
@@ -1,24 +1,31 @@
{
+ "controlType": "SECTION_V2",
"identifier": "INSERT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'INSERT_ONE' || actionConfiguration.formData.command.data === 'INSERT_MANY'}}"
},
"children": [
{
- "label": "Spreadsheet Name",
- "tooltipText": "The name of the sheet to be created",
- "propertyName": "file_create_spreadsheetName",
- "configProperty": "actionConfiguration.formData.spreadsheetName.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "isRequired": true,
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "INSERT-Z1",
"conditionals": {
"show": "{{actionConfiguration.formData.entityType.data === 'SPREADSHEET'}}"
},
- "placeholderText": "Goals"
+ "children": [
+ {
+ "label": "Spreadsheet Name",
+ "tooltipText": "The name of the sheet to be created",
+ "propertyName": "file_create_spreadsheetName",
+ "configProperty": "actionConfiguration.formData.spreadsheetName.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "isRequired": true,
+ "placeholderText": "Goals"
+ }
+ ]
},
{
- "controlType": "SECTION",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "INSERT-Z2",
"label": "Row objects",
"description": "",
"conditionals": {
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/root.json
index 07b2bff2ab9..cf2ff07becc 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/root.json
@@ -1,156 +1,63 @@
{
"editor": [
{
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
- "label": "Operation",
- "tooltipText": "The command to run on the datasource",
- "description": "Select the operation you would like to execute",
- "propertyName": "rows_commands",
- "configProperty": "actionConfiguration.formData.command.data",
- "controlType": "DROP_DOWN",
- "initialValue": "FETCH_MANY",
- "isRequired": true,
- "options": [
- {
- "label": "Fetch Details",
- "value": "FETCH_DETAILS"
- },
- {
- "label": "Insert One",
- "value": "INSERT_ONE"
- },
- {
- "label": "Update One",
- "value": "UPDATE_ONE"
- },
- {
- "label": "Delete One",
- "value": "DELETE_ONE"
- },
- {
- "label": "Fetch Many",
- "value": "FETCH_MANY"
- },
- {
- "label": "Insert Many",
- "value": "INSERT_MANY"
- },
- {
- "label": "Update Many",
- "value": "UPDATE_MANY"
- }
- ]
- },
- {
- "label": "Entity",
- "tooltipText": "The entity to query on the datasource",
- "description": "Select the entity that you would like to work with",
- "propertyName": "entityType",
- "configProperty": "actionConfiguration.formData.entityType.data",
- "controlType": "DROP_DOWN",
- "initialValue": "ROWS",
- "isRequired": true,
- "setFirstOptionAsDefault": true,
- "options": [
- {
- "disabled": "{{ ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'UPDATE_MANY', 'INSERT_MANY'].includes(actionConfiguration.formData.command.data) === false }}",
- "label": "Sheet Row(s)",
- "value": "ROWS"
- },
- {
- "disabled": "{{ ['FETCH_MANY', 'FETCH_DETAILS', 'INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false || (['INSERT_ONE', 'DELETE_ONE'].includes(actionConfiguration.formData.command.data) === true && ['https://www.googleapis.com/auth/drive.file'].includes(datasourceConfiguration.authentication.scopeString) === true)}}",
- "label": "Spreadsheet",
- "value": "SPREADSHEET"
- },
- {
- "disabled": "{{ ['DELETE_ONE'].includes(actionConfiguration.formData.command.data) === false }}",
- "label": "Sheet",
- "value": "SHEET"
- }
- ],
- "conditionals": {
- "evaluateFormConfig": {
- "condition": "{{true}}",
- "paths": ["options"]
- }
- }
- },
- {
- "label": "",
- "configProperty": "actionConfiguration.formData.selector.data",
- "controlType": "ENTITY_SELECTOR",
- "conditionals": {
- "show": "{{ !!actionConfiguration.formData.entityType.data && (new Object({ 'SPREADSHEET': ['FETCH_DETAILS', 'DELETE_ONE'], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data)) }}"
- },
- "schema": [
- {
- "label": "Spreadsheet",
- "tooltipText": "The URL of the spreadsheet in your Google Drive",
- "propertyName": "rows_get_spreadsheetUrl",
- "configProperty": "actionConfiguration.formData.sheetUrl.data",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "SELECTOR-Z1",
+ "children": [
+ {
+ "label": "Operation",
+ "tooltipText": "The command to run on the datasource",
+ "description": "Select the operation you would like to execute",
+ "propertyName": "rows_commands",
+ "configProperty": "actionConfiguration.formData.command.data",
"controlType": "DROP_DOWN",
- "isSearchable": true,
+ "initialValue": "FETCH_MANY",
"isRequired": true,
- "-placeholderText": "https://docs.google.com/spreadsheets/d/xyz/edit#gid=0",
- "fetchOptionsConditionally": true,
- "alternateViewTypes": ["json"],
- "conditionals": {
- "fetchDynamicValues": {
- "condition": "{{true}}",
- "config": {
- "params": {
- "requestType": "SPREADSHEET_SELECTOR",
- "displayType": "DROP_DOWN"
- }
- }
+ "options": [
+ {
+ "label": "Fetch Details",
+ "value": "FETCH_DETAILS"
+ },
+ {
+ "label": "Insert One",
+ "value": "INSERT_ONE"
+ },
+ {
+ "label": "Update One",
+ "value": "UPDATE_ONE"
+ },
+ {
+ "label": "Delete One",
+ "value": "DELETE_ONE"
+ },
+ {
+ "label": "Fetch Many",
+ "value": "FETCH_MANY"
+ },
+ {
+ "label": "Insert Many",
+ "value": "INSERT_MANY"
+ },
+ {
+ "label": "Update Many",
+ "value": "UPDATE_MANY"
}
- }
- },
- {
- "label": "Sheet name",
- "propertyName": "rows_get_sheetName",
- "tooltipText": "The name of the sheet inside the spreadsheet",
- "configProperty": "actionConfiguration.formData.sheetName.data",
- "controlType": "DROP_DOWN",
- "isSearchable": true,
- "isRequired": true,
- "fetchOptionsConditionally": true,
- "alternateViewTypes": ["json"],
- "conditionals": {
- "show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': ['DELETE_ONE'], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetUrl.data }}",
- "fetchDynamicValues": {
- "condition": "{{ !!actionConfiguration.formData.sheetUrl.data }}",
- "config": {
- "params": {
- "requestType": "SHEET_SELECTOR",
- "displayType": "DROP_DOWN",
- "parameters": {
- "sheetUrl": "{{actionConfiguration.formData.sheetUrl.data}}"
- }
- }
- }
- }
- }
- },
- {
- "label": "Table heading row index",
- "tooltipText": "The index of the column names in the sheet (starts from 1)",
- "propertyName": "rows_get_tableHeadingRowIndex",
- "configProperty": "actionConfiguration.formData.tableHeaderIndex.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "initialValue": "1",
- "isRequired": true,
- "conditionals": {
- "show": "{{ new Object({ 'SPREADSHEET': [], 'SHEET': [], 'ROWS': ['INSERT_ONE', 'UPDATE_ONE', 'DELETE_ONE', 'FETCH_MANY', 'INSERT_MANY', 'UPDATE_MANY'] })[actionConfiguration.formData.entityType.data].includes(actionConfiguration.formData.command.data) && !!actionConfiguration.formData.sheetName.data }}"
- }
+ ]
}
]
}
]
}
],
- "files": ["insert.json", "delete.json", "fetch_many.json", "update.json"]
+ "files": [
+ "entity_data.json",
+ "insert.json",
+ "delete.json",
+ "fetch_many.json",
+ "update.json"
+ ]
}
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/update.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/update.json
index 327563dd8cb..7a65002e973 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/update.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/editor/update.json
@@ -1,17 +1,15 @@
{
+ "controlType": "SECTION_V2",
"identifier": "UPDATE",
- "controlType": "SECTION",
"conditionals": {
- "show": "{{actionConfiguration.formData.command.data === 'UPDATE_ONE' || actionConfiguration.formData.command.data === 'UPDATE_MANY'}}"
+ "show": "{{(actionConfiguration.formData.command.data === 'UPDATE_ONE' || actionConfiguration.formData.command.data === 'UPDATE_MANY') && (!!actionConfiguration.formData.sheetName.data && actionConfiguration.formData.entityType.data === 'ROWS')}}"
},
+ "label": "Row objects",
+ "description": "",
"children": [
{
- "controlType": "SECTION",
- "label": "Row objects",
- "description": "",
- "conditionals": {
- "show": "{{!!actionConfiguration.formData.sheetName.data && actionConfiguration.formData.entityType.data === 'ROWS'}}"
- },
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "UPDATE-Z1",
"children": [
{
"label": "Update row object",
diff --git a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json
index 66447b9f563..d5f7709c310 100644
--- a/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json
+++ b/app/server/appsmith-plugins/googleSheetsPlugin/src/main/resources/form.json
@@ -38,21 +38,9 @@
{
"label": "Read / Write / Delete | Selected google sheets",
"value": "https://www.googleapis.com/auth/drive.file"
- },
- {
- "label": "Read / Write / Delete | All google sheets",
- "value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive"
- },
- {
- "label": "Read / Write | All google sheets",
- "value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.readonly"
- },
- {
- "label": "Read | All google sheets",
- "value": "https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/drive.readonly"
}
],
- "initialValue": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive",
+ "initialValue": "https://www.googleapis.com/auth/drive.file",
"customStyles": {
"width": "340px"
}
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json
index 323f7f760c4..1241370d274 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/aggregate.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "AGGREGATE",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'AGGREGATE'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "AGGREGATE-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "AGGREGATE-Z2",
"children": [
{
"label": "Array of pipelines",
@@ -47,11 +46,17 @@
]
},
{
- "label": "Limit",
- "configProperty": "actionConfiguration.formData.aggregate.limit.data",
- "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
- "evaluationSubstitutionType": "TEMPLATE",
- "initialValue": "10"
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "AGGREGATE-Z3",
+ "children": [
+ {
+ "label": "Limit",
+ "configProperty": "actionConfiguration.formData.aggregate.limit.data",
+ "controlType": "QUERY_DYNAMIC_INPUT_TEXT",
+ "evaluationSubstitutionType": "TEMPLATE",
+ "initialValue": "10"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json
index 70a9ddc7989..e8848d8ca2e 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/count.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "COUNT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'COUNT'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "COUNT-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "COUNT-Z2",
"children": [
{
"label": "Query",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json
index d5fce44dbbe..8a3ada65124 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/delete.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "DELETE",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DELETE'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DELETE-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "DELETE-Z2",
"children": [
{
"label": "Query",
@@ -43,7 +42,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DELETE-Z3",
+ "children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.delete.limit.data",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json
index ab4bfc4fb0d..240c8edff7a 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/distinct.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "DISTINCT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'DISTINCT'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DISTINCT-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "DISTINCT-Z2",
"children": [
{
"label": "Query",
@@ -43,7 +42,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "DISTINCT-Z3",
+ "children": [
{
"label": "Key",
"configProperty": "actionConfiguration.formData.distinct.key.data",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json
index 741a7788528..3dfec0d2c60 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/find.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "FIND",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'FIND'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "FIND-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "FIND-Z2",
"children": [
{
"label": "Query",
@@ -42,7 +41,13 @@
"controlType": "QUERY_DYNAMIC_TEXT",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "FIND-Z3",
+ "children": [
{
"label": "Sort",
"configProperty": "actionConfiguration.formData.find.sort.data",
@@ -58,7 +63,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{name : 1}"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "FIND-Z4",
+ "children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.find.limit.data",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json
index e70f7f903bc..48855312458 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/insert.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "INSERT",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'INSERT'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "INSERT-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "INSERT-Z2",
"children": [
{
"label": "Documents",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json
index 6829311c381..609dd4b991e 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/raw.json
@@ -1,14 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "RAW",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'RAW'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "RAW-Z1",
"children": [
{
"label": "",
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json
index 7d1c79dc8ef..2f7f7b68b40 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/root.json
@@ -1,47 +1,53 @@
{
"editor": [
{
- "controlType": "SECTION",
+ "controlType": "SECTION_V2",
"identifier": "SELECTOR",
"children": [
{
- "label": "Command",
- "description": "Choose method you would like to use to query the database",
- "configProperty": "actionConfiguration.formData.command.data",
- "controlType": "DROP_DOWN",
- "initialValue": "FIND",
- "options": [
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "SELECTOR-Z1",
+ "children": [
{
- "label": "Find document(s)",
- "value": "FIND"
- },
- {
- "label": "Insert document(s)",
- "value": "INSERT"
- },
- {
- "label": "Update document(s)",
- "value": "UPDATE"
- },
- {
- "label": "Delete document(s)",
- "value": "DELETE"
- },
- {
- "label": "Count",
- "value": "COUNT"
- },
- {
- "label": "Distinct",
- "value": "DISTINCT"
- },
- {
- "label": "Aggregate",
- "value": "AGGREGATE"
- },
- {
- "label": "Raw",
- "value": "RAW"
+ "label": "Command",
+ "description": "Choose method you would like to use to query the database",
+ "configProperty": "actionConfiguration.formData.command.data",
+ "controlType": "DROP_DOWN",
+ "initialValue": "FIND",
+ "options": [
+ {
+ "label": "Find document(s)",
+ "value": "FIND"
+ },
+ {
+ "label": "Insert document(s)",
+ "value": "INSERT"
+ },
+ {
+ "label": "Update document(s)",
+ "value": "UPDATE"
+ },
+ {
+ "label": "Delete document(s)",
+ "value": "DELETE"
+ },
+ {
+ "label": "Count",
+ "value": "COUNT"
+ },
+ {
+ "label": "Distinct",
+ "value": "DISTINCT"
+ },
+ {
+ "label": "Aggregate",
+ "value": "AGGREGATE"
+ },
+ {
+ "label": "Raw",
+ "value": "RAW"
+ }
+ ]
}
]
}
diff --git a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json
index bcd4aae93c7..4f9a19c52f9 100644
--- a/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json
+++ b/app/server/appsmith-plugins/mongoPlugin/src/main/resources/editor/update.json
@@ -1,13 +1,13 @@
{
+ "controlType": "SECTION_V2",
"identifier": "UPDATE",
- "controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.command.data === 'UPDATE'}}"
},
"children": [
{
- "controlType": "SECTION",
- "label": "Select collection to query",
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "UPDATE-Z1",
"children": [
{
"label": "Collection",
@@ -32,9 +32,8 @@
]
},
{
- "controlType": "SECTION",
- "label": "Query",
- "description": "Optional",
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "UPDATE-Z2",
"children": [
{
"label": "Query",
@@ -43,7 +42,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{rating : {$gte : 9}}"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "SINGLE_COLUMN_ZONE",
+ "identifier": "UPDATE-Z3",
+ "children": [
{
"label": "Update",
"configProperty": "actionConfiguration.formData.updateMany.update.data",
@@ -51,7 +56,13 @@
"inputType": "JSON",
"evaluationSubstitutionType": "TEMPLATE",
"placeholderText": "{ $inc: { score: 1 } }"
- },
+ }
+ ]
+ },
+ {
+ "controlType": "DOUBLE_COLUMN_ZONE",
+ "identifier": "UPDATE-Z4",
+ "children": [
{
"label": "Limit",
"configProperty": "actionConfiguration.formData.updateMany.limit.data",
diff --git a/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java b/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
index 8a6db99d5a6..a27e2ecc8e9 100644
--- a/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
+++ b/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
@@ -47,6 +47,8 @@
import org.pf4j.Extension;
import org.pf4j.PluginWrapper;
import org.postgresql.util.PGobject;
+import org.postgresql.util.PSQLException;
+import org.postgresql.util.PSQLState;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import reactor.core.publisher.Mono;
@@ -1347,10 +1349,21 @@ private static HikariDataSource createConnectionPool(
try {
datasource = new HikariDataSource(config);
} catch (PoolInitializationException e) {
+ Throwable cause = e.getCause();
+ if (cause instanceof PSQLException) {
+ PSQLException psqlException = (PSQLException) cause;
+ String sqlState = psqlException.getSQLState();
+ if (PSQLState.CONNECTION_UNABLE_TO_CONNECT.getState().equals(sqlState)) {
+ throw new AppsmithPluginException(
+ AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,
+ PostgresErrorMessages.DS_INVALID_HOSTNAME_AND_PORT_MSG,
+ psqlException.getMessage());
+ }
+ }
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_DATASOURCE_ARGUMENT_ERROR,
PostgresErrorMessages.CONNECTION_POOL_CREATION_FAILED_ERROR_MSG,
- e.getMessage());
+ cause != null ? cause.getMessage() : e.getMessage());
}
return datasource;
diff --git a/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/exceptions/PostgresErrorMessages.java b/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/exceptions/PostgresErrorMessages.java
index daee3654117..8cee7970b58 100644
--- a/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/exceptions/PostgresErrorMessages.java
+++ b/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/exceptions/PostgresErrorMessages.java
@@ -49,4 +49,6 @@ public class PostgresErrorMessages extends BasePluginErrorMessages {
public static final String DS_MISSING_PASSWORD_ERROR_MSG = "Missing password for authentication.";
public static final String DS_MISSING_DATABASE_NAME_ERROR_MSG = "Missing database name.";
+
+ public static final String DS_INVALID_HOSTNAME_AND_PORT_MSG = "Please check the host and port.";
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java
index b04292a7540..50872df66db 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/applications/base/ApplicationServiceCEImpl.java
@@ -1037,7 +1037,9 @@ public Mono findByBaseIdBranchNameAndApplicationMode(
? applicationPermission.getReadPermission()
: applicationPermission.getEditPermission();
- return findByBranchNameAndBaseApplicationId(branchName, defaultApplicationId, permissionForApplication);
+ return findByBranchNameAndBaseApplicationId(branchName, defaultApplicationId, permissionForApplication)
+ .name(APPLICATION_FETCH_FROM_DB)
+ .tap(Micrometer.observation(observationRegistry));
}
@Override
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/RTSCaller.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/RTSCaller.java
index d005ecb032e..d14132a352e 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/RTSCaller.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/RTSCaller.java
@@ -91,4 +91,8 @@ public Mono post(@NonNull String path, @NonNull Objec
public Mono put(@NonNull String path, @NonNull Object requestBody) {
return makeRequest(HttpMethod.PUT, path, requestBody);
}
+
+ public Mono delete(@NonNull String path) {
+ return makeRequest(HttpMethod.DELETE, path, null);
+ }
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java
index 41586161539..12b787c4dfb 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java
@@ -1012,7 +1012,7 @@ public Flux getUnpublishedActions(
Mono branchedPageMono = !StringUtils.hasLength(params.getFirst(FieldName.PAGE_ID))
? Mono.just(new NewPage())
: newPageService.findByBranchNameAndBasePageId(
- branchName, params.getFirst(FieldName.PAGE_ID), pagePermission.getReadPermission());
+ branchName, params.getFirst(FieldName.PAGE_ID), pagePermission.getReadPermission(), null);
Mono branchedApplicationMono = !StringUtils.hasLength(params.getFirst(FieldName.APPLICATION_ID))
? Mono.just(new Application())
: applicationService.findByBranchNameAndBaseApplicationId(
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCE.java
index d8c1192de9b..b669c91a414 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCE.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCE.java
@@ -30,8 +30,6 @@ public interface NewPageServiceCE extends CrudService {
Flux findNewPagesByApplicationId(
String applicationId, AclPermission permission, List includeFields);
- Mono findByIdAndBranchName(String id, String branchName);
-
Mono saveUnpublishedPage(PageDTO page);
Mono createDefault(PageDTO object);
@@ -71,7 +69,8 @@ Mono findByNameAndApplicationIdAndViewMode(
Mono getNameByPageId(String pageId, boolean isPublishedName);
- Mono findByBranchNameAndBasePageId(String branchName, String defaultPageId, AclPermission permission);
+ Mono findByBranchNameAndBasePageId(
+ String branchName, String defaultPageId, AclPermission permission, List projectedFieldNames);
Mono findByBranchNameAndBasePageIdAndApplicationMode(
String branchName, String basePageId, ApplicationMode mode);
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java
index e8f418d3928..594e94d033e 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java
@@ -136,11 +136,6 @@ public Flux findByApplicationId(String applicationId, AclPermission per
return findNewPagesByApplicationId(applicationId, permission).flatMap(page -> getPageByViewMode(page, view));
}
- @Override
- public Mono findByIdAndBranchName(String id, String branchName) {
- return this.findByBranchNameAndBasePageId(branchName, id, pagePermission.getReadPermission());
- }
-
@Override
public Mono saveUnpublishedPage(PageDTO page) {
@@ -511,19 +506,21 @@ public Mono getNameByPageId(String pageId, boolean isPublishedName) {
}
@Override
- public Mono findByBranchNameAndBasePageId(String branchName, String basePageId, AclPermission permission) {
+ public Mono findByBranchNameAndBasePageId(
+ String branchName, String basePageId, AclPermission permission, List projectedFieldNames) {
if (!StringUtils.hasText(basePageId)) {
return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.PAGE_ID));
} else if (!StringUtils.hasText(branchName)) {
- return this.findById(basePageId, permission)
+ return repository
+ .findById(basePageId, permission, projectedFieldNames)
.name(GET_PAGE_WITHOUT_BRANCH)
.tap(Micrometer.observation(observationRegistry))
.switchIfEmpty(Mono.error(
new AppsmithException(AppsmithError.NO_RESOURCE_FOUND, FieldName.PAGE, basePageId)));
}
return repository
- .findPageByBranchNameAndBasePageId(branchName, basePageId, permission)
+ .findPageByBranchNameAndBasePageId(branchName, basePageId, permission, projectedFieldNames)
.name(GET_PAGE_WITH_BRANCH)
.tap(Micrometer.observation(observationRegistry))
.switchIfEmpty(Mono.error(new AppsmithException(
@@ -541,7 +538,8 @@ public Mono findByBranchNameAndBasePageIdAndApplicationMode(
permission = pagePermission.getReadPermission();
}
- return this.findByBranchNameAndBasePageId(branchName, basePageId, permission)
+ return this.findByBranchNameAndBasePageId(
+ branchName, basePageId, permission, List.of(NewPage.Fields.id, NewPage.Fields.applicationId))
.name(getQualifiedSpanName(GET_PAGE, mode))
.tap(Micrometer.observation(observationRegistry));
}
@@ -556,7 +554,7 @@ public Mono findBranchedPageId(String branchName, String basePageId, Acl
return Mono.just(basePageId);
}
return repository
- .findPageByBranchNameAndBasePageId(branchName, basePageId, permission)
+ .findPageByBranchNameAndBasePageId(branchName, basePageId, permission, null)
.switchIfEmpty(Mono.error(new AppsmithException(
AppsmithError.NO_RESOURCE_FOUND, FieldName.PAGE_ID, basePageId + ", " + branchName)))
.map(NewPage::getId);
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCE.java
index 8bf2c469b9a..fc66e5e2eee 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCE.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCE.java
@@ -4,6 +4,7 @@
import com.appsmith.server.domains.User;
import reactor.core.publisher.Mono;
+import java.util.List;
import java.util.Set;
public interface CacheableRepositoryHelperCE {
@@ -23,4 +24,25 @@ public interface CacheableRepositoryHelperCE {
Mono fetchDefaultTenant(String tenantId);
Mono evictCachedTenant(String tenantId);
+
+ /**
+ * Retrieves the base application ID from the cache based on the provided base page ID.
+ *
+ * If the cache contains the ID for the specified {@code basePageId}, it is returned as a {@code Mono} containing the {@code baseApplicationId}.
+ * If the cache does not contain the ID (cache miss) and {@code baseApplicationId} is {@code null} or empty, an empty {@code Mono} is returned.
+ *
+ * If {@code baseApplicationId} is not {@code null} or empty and a cache miss occurs, the cache will be updated with the provided {@code baseApplicationId}.
+ *
+ * Note that calling this method with a {@code null} {@code baseApplicationId} on a cache miss will not update the cache.
+ * In this case, the method will return an empty {@code Mono}, and no cache update will occur.
+ *
+ * @param basePageId the identifier for the base page used as the cache key
+ * @param baseApplicationId the base application ID to be returned or used to update the cache if not {@code null} or empty
+ * @return a {@code Mono} containing the {@code baseApplicationId} if it is present in the cache or provided; otherwise, an empty {@code Mono} on a cache miss with a {@code null} or empty {@code baseApplicationId}.
+ *
+ * On a cache miss, if {@code baseApplicationId} is provided, the cache will be updated with the new value after performing additional database operations to fetch the application document.
+ */
+ Mono fetchBaseApplicationId(String basePageId, String baseApplicationId);
+
+ Mono evictCachedBasePageIds(List basePageIds);
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java
index 330ae848910..3cdcc4e8b08 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CacheableRepositoryHelperCEImpl.java
@@ -21,9 +21,11 @@
import org.springframework.data.mongodb.core.ReactiveMongoOperations;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
import reactor.core.observability.micrometer.Micrometer;
import reactor.core.publisher.Mono;
+import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -41,6 +43,7 @@ public class CacheableRepositoryHelperCEImpl implements CacheableRepositoryHelpe
private final ReactiveMongoOperations mongoOperations;
private final InMemoryCacheableRepositoryHelper inMemoryCacheableRepositoryHelper;
private final ObservationRegistry observationRegistry;
+ private static final String CACHE_DEFAULT_PAGE_ID_TO_DEFAULT_APPLICATION_ID = "pageIdToAppId";
@Cache(cacheName = "permissionGroupsForUser", key = "{#user.email + #user.tenantId}")
@Override
@@ -199,4 +202,16 @@ public Mono fetchDefaultTenant(String tenantId) {
public Mono evictCachedTenant(String tenantId) {
return Mono.empty().then();
}
+
+ @Cache(cacheName = CACHE_DEFAULT_PAGE_ID_TO_DEFAULT_APPLICATION_ID, key = "{#basePageId}")
+ @Override
+ public Mono fetchBaseApplicationId(String basePageId, String baseApplicationId) {
+ return !StringUtils.hasText(baseApplicationId) ? Mono.empty() : Mono.just(baseApplicationId);
+ }
+
+ @CacheEvict(cacheName = CACHE_DEFAULT_PAGE_ID_TO_DEFAULT_APPLICATION_ID, keys = "#basePageIds")
+ @Override
+ public Mono evictCachedBasePageIds(List basePageIds) {
+ return Mono.just(Boolean.TRUE);
+ }
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java
index 43d30d5ea14..ca0beb98bec 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCE.java
@@ -12,6 +12,8 @@
public interface CustomNewPageRepositoryCE extends AppsmithRepository {
+ Mono findById(String id, AclPermission permission, List projectedFields);
+
Flux findByApplicationId(String applicationId, AclPermission aclPermission);
Flux findByApplicationId(String applicationId, AclPermission aclPermission, List includeFields);
@@ -30,7 +32,8 @@ Mono findByNameAndApplicationIdAndViewMode(
Mono getNameByPageId(String pageId, boolean isPublishedName);
- Mono findPageByBranchNameAndBasePageId(String branchName, String basePageId, AclPermission permission);
+ Mono findPageByBranchNameAndBasePageId(
+ String branchName, String basePageId, AclPermission permission, List projectedFieldNames);
Flux findAllByApplicationIds(List branchedArtifactIds, List includedFields);
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
index c1d59515075..03b06fc065f 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java
@@ -40,6 +40,15 @@ public class CustomNewPageRepositoryCEImpl extends BaseAppsmithRepositoryImpl findById(String id, AclPermission permission, List projectedFields) {
+ return queryBuilder()
+ .criteria(Bridge.equal(NewPage.Fields.id, id))
+ .permission(permission)
+ .fields(projectedFields)
+ .one();
+ }
+
@Override
public Flux findByApplicationId(String applicationId, AclPermission aclPermission) {
return queryBuilder()
@@ -161,7 +170,7 @@ public Mono getNameByPageId(String pageId, boolean isPublishedName) {
@Override
public Mono findPageByBranchNameAndBasePageId(
- String branchName, String basePageId, AclPermission permission) {
+ String branchName, String basePageId, AclPermission permission, List projectedFieldNames) {
final BridgeQuery q =
// defaultPageIdCriteria
@@ -177,6 +186,7 @@ public Mono findPageByBranchNameAndBasePageId(
return queryBuilder()
.criteria(q)
.permission(permission)
+ .fields(projectedFieldNames)
.one()
.name(FETCH_PAGE_FROM_DB)
.tap(Micrometer.observation(observationRegistry));
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ApplicationPageServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ApplicationPageServiceImpl.java
index 808a45405e4..f31d8f50c3a 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ApplicationPageServiceImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ApplicationPageServiceImpl.java
@@ -13,6 +13,7 @@
import com.appsmith.server.newpages.base.NewPageService;
import com.appsmith.server.repositories.ActionCollectionRepository;
import com.appsmith.server.repositories.ApplicationRepository;
+import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.appsmith.server.repositories.DatasourceRepository;
import com.appsmith.server.repositories.NewActionRepository;
import com.appsmith.server.repositories.NewPageRepository;
@@ -60,7 +61,8 @@ public ApplicationPageServiceImpl(
DSLMigrationUtils dslMigrationUtils,
ClonePageService actionClonePageService,
ClonePageService actionCollectionClonePageService,
- ObservationRegistry observationRegistry) {
+ ObservationRegistry observationRegistry,
+ CacheableRepositoryHelper cacheableRepositoryHelper) {
super(
workspaceService,
applicationService,
@@ -89,6 +91,7 @@ public ApplicationPageServiceImpl(
dslMigrationUtils,
actionClonePageService,
actionCollectionClonePageService,
- observationRegistry);
+ observationRegistry,
+ cacheableRepositoryHelper);
}
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConsolidatedAPIServiceImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConsolidatedAPIServiceImpl.java
index f786ac90c1b..9b0c48a44d0 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConsolidatedAPIServiceImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ConsolidatedAPIServiceImpl.java
@@ -7,6 +7,7 @@
import com.appsmith.server.newactions.base.NewActionService;
import com.appsmith.server.newpages.base.NewPageService;
import com.appsmith.server.plugins.base.PluginService;
+import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.appsmith.server.services.ce_compatible.ConsolidatedAPIServiceCECompatibleImpl;
import com.appsmith.server.themes.base.ThemeService;
import io.micrometer.observation.ObservationRegistry;
@@ -33,7 +34,8 @@ public ConsolidatedAPIServiceImpl(
PluginService pluginService,
DatasourceService datasourceService,
MockDataService mockDataService,
- ObservationRegistry observationRegistry) {
+ ObservationRegistry observationRegistry,
+ CacheableRepositoryHelper cacheableRepositoryHelper) {
super(
sessionUserService,
userService,
@@ -50,6 +52,7 @@ public ConsolidatedAPIServiceImpl(
pluginService,
datasourceService,
mockDataService,
- observationRegistry);
+ observationRegistry,
+ cacheableRepositoryHelper);
}
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java
index cc3cfd047f0..1536ba67a35 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java
@@ -43,6 +43,7 @@
import com.appsmith.server.newpages.base.NewPageService;
import com.appsmith.server.repositories.ActionCollectionRepository;
import com.appsmith.server.repositories.ApplicationRepository;
+import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.appsmith.server.repositories.DatasourceRepository;
import com.appsmith.server.repositories.NewActionRepository;
import com.appsmith.server.repositories.NewPageRepository;
@@ -128,6 +129,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE {
private final ClonePageService actionClonePageService;
private final ClonePageService actionCollectionClonePageService;
private final ObservationRegistry observationRegistry;
+ private final CacheableRepositoryHelper cacheableRepositoryHelper;
@Override
public Mono createPage(PageDTO page) {
@@ -311,7 +313,7 @@ public Mono getPageAndMigrateDslByBranchAndBasePageId(
ApplicationMode applicationMode = viewMode ? ApplicationMode.PUBLISHED : ApplicationMode.EDIT;
// Fetch the page with read permission in both editor and in viewer.
return newPageService
- .findByBranchNameAndBasePageId(branchName, defaultPageId, pagePermission.getReadPermission())
+ .findByBranchNameAndBasePageId(branchName, defaultPageId, pagePermission.getReadPermission(), null)
.flatMap(newPage -> getPageDTOAfterMigratingDSL(newPage, viewMode, migrateDsl)
.name(getQualifiedSpanName(MIGRATE_DSL, applicationMode))
.tap(Micrometer.observation(observationRegistry)));
@@ -1084,6 +1086,9 @@ protected Mono, ApplicationPublishingMetaDTO>> publishA
Mono archivePageMono;
+ Mono evictDeletedDefaultPageIdsMono =
+ cacheableRepositoryHelper.evictCachedBasePageIds(new ArrayList<>(publishedPageIds));
+
if (!publishedPageIds.isEmpty()) {
archivePageMono = newPageService.archiveByIds(publishedPageIds);
} else {
@@ -1102,8 +1107,12 @@ protected Mono, ApplicationPublishingMetaDTO>> publishA
newPageService.publishPages(editedPageIds, pagePermission.getEditPermission());
// Archive the deleted pages and save the application changes and then return the pages so that
- // the pages can also be published
- return Mono.when(archivePageMono, publishPagesMono, applicationService.save(application))
+ // the pages can also be published; In addition invalidate the cache for the deleted page Ids
+ return Mono.when(
+ archivePageMono,
+ publishPagesMono,
+ applicationService.save(application),
+ evictDeletedDefaultPageIdsMono)
.thenReturn(pages);
})
.cache(); // caching as we'll need this to send analytics attributes after publishing the app
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConsolidatedAPIServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConsolidatedAPIServiceCEImpl.java
index 7ec347e840b..1f046c8ba29 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConsolidatedAPIServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ConsolidatedAPIServiceCEImpl.java
@@ -21,6 +21,7 @@
import com.appsmith.server.newactions.base.NewActionService;
import com.appsmith.server.newpages.base.NewPageService;
import com.appsmith.server.plugins.base.PluginService;
+import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.appsmith.server.services.ApplicationPageService;
import com.appsmith.server.services.MockDataService;
import com.appsmith.server.services.ProductAlertService;
@@ -51,6 +52,8 @@
import java.util.stream.Collectors;
import static com.appsmith.external.constants.PluginConstants.PLUGINS_THAT_ALLOW_QUERY_CREATION_WITHOUT_DATASOURCE;
+import static com.appsmith.external.constants.spans.ApplicationSpan.APPLICATION_ID_FETCH_REDIS_SPAN;
+import static com.appsmith.external.constants.spans.ApplicationSpan.APPLICATION_ID_UPDATE_REDIS_SPAN;
import static com.appsmith.external.constants.spans.ConsolidatedApiSpanNames.ACTIONS_SPAN;
import static com.appsmith.external.constants.spans.ConsolidatedApiSpanNames.ACTION_COLLECTIONS_SPAN;
import static com.appsmith.external.constants.spans.ConsolidatedApiSpanNames.APPLICATION_ID_SPAN;
@@ -99,6 +102,7 @@ public class ConsolidatedAPIServiceCEImpl implements ConsolidatedAPIServiceCE {
private final DatasourceService datasourceService;
private final MockDataService mockDataService;
private final ObservationRegistry observationRegistry;
+ private final CacheableRepositoryHelper cacheableRepositoryHelper;
ResponseDTO getSuccessResponse(T data) {
return new ResponseDTO<>(HttpStatus.OK.value(), data, null);
@@ -197,29 +201,57 @@ public Mono getConsolidatedInfoForPageLoad(
boolean isViewMode = ApplicationMode.PUBLISHED.equals(mode);
/* Fetch default application id if not provided */
+ if (isBlank(basePageId)) {
+ return Mono.when(fetches).thenReturn(consolidatedAPIResponseDTO);
+ }
Mono branchedApplicationMonoCached;
- Mono branchedPageMonoCached = Mono.empty();
- if (!isBlank(basePageId)) {
- branchedPageMonoCached = newPageService
- .findByBranchNameAndBasePageIdAndApplicationMode(branchName, basePageId, mode)
- .cache();
+ Mono baseApplicationIdMono = Mono.just("");
+ if (isViewMode) {
+ // Attempt to retrieve the application ID associated with the given base page ID from the cache.
+ baseApplicationIdMono = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId, baseApplicationId)
+ .switchIfEmpty(Mono.just(""))
+ .cast(String.class);
}
+ baseApplicationIdMono = baseApplicationIdMono
+ .name(getQualifiedSpanName(APPLICATION_ID_FETCH_REDIS_SPAN, mode))
+ .tap(Micrometer.observation(observationRegistry))
+ .cache();
- if (isBlank(baseApplicationId)) {
- branchedApplicationMonoCached = branchedPageMonoCached
- .map(NewPage::getApplicationId)
- .flatMap(applicationId ->
- applicationService.findByBranchedApplicationIdAndApplicationMode(applicationId, mode))
- .name(getQualifiedSpanName(APPLICATION_ID_SPAN, mode))
- .tap(Micrometer.observation(observationRegistry))
- .cache();
- } else {
- branchedApplicationMonoCached = applicationService
- .findByBaseIdBranchNameAndApplicationMode(baseApplicationId, branchName, mode)
- .name(getQualifiedSpanName(APPLICATION_ID_SPAN, mode))
- .tap(Micrometer.observation(observationRegistry))
- .cache();
- }
+ Mono branchedPageMonoCached = newPageService
+ .findByBranchNameAndBasePageIdAndApplicationMode(branchName, basePageId, mode)
+ .cache();
+
+ branchedApplicationMonoCached = baseApplicationIdMono.flatMap(cachedBaseApplicationId -> {
+ if (!StringUtils.hasText(cachedBaseApplicationId)) {
+ // Handle empty or null baseApplicationId
+ return branchedPageMonoCached.flatMap(branchedPage ->
+ // Use the application ID to find the complete application details.
+ applicationService
+ .findByBranchedApplicationIdAndApplicationMode(branchedPage.getApplicationId(), mode)
+ .flatMap(application -> {
+ if (isViewMode) {
+ // Update the cache with the new application’s base ID for future
+ // queries.
+ return cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId, application.getBaseId())
+ .thenReturn(application)
+ .name(getQualifiedSpanName(APPLICATION_ID_UPDATE_REDIS_SPAN, mode))
+ .tap(Micrometer.observation(observationRegistry));
+ }
+ return Mono.just(application);
+ }));
+ } else {
+ // Handle non-empty baseApplicationId
+ return applicationService.findByBaseIdBranchNameAndApplicationMode(
+ cachedBaseApplicationId, branchName, mode);
+ }
+ });
+
+ branchedApplicationMonoCached = branchedApplicationMonoCached
+ .name(getQualifiedSpanName(APPLICATION_ID_SPAN, mode))
+ .tap(Micrometer.observation(observationRegistry))
+ .cache();
Mono> pagesFromCurrentApplicationMonoCached = branchedApplicationMonoCached
.flatMap(branchedApplication ->
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/CurlImporterServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/CurlImporterServiceCEImpl.java
index 0a75c2f9d7b..d4a473ae650 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/CurlImporterServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/CurlImporterServiceCEImpl.java
@@ -107,7 +107,8 @@ public Mono importAction(
protected Mono getBranchedContextId(CreatorContextType contextType, String contextId, String branchName) {
return newPageService
- .findByBranchNameAndBasePageId(branchName, contextId, pagePermission.getActionCreatePermission())
+ .findByBranchNameAndBasePageId(
+ branchName, contextId, pagePermission.getActionCreatePermission(), List.of(NewPage.Fields.id))
.map(NewPage::getId);
}
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java
index ca6cb2f6044..1589daf14bd 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java
@@ -1,6 +1,5 @@
package com.appsmith.server.services.ce;
-import com.appsmith.external.helpers.AppsmithBeanUtils;
import com.appsmith.external.helpers.EncryptionHelper;
import com.appsmith.server.acl.AclPermission;
import com.appsmith.server.configurations.CommonConfig;
@@ -576,8 +575,7 @@ private Mono update(User existingUser, User userUpdate) {
userUpdate.setPassword(passwordEncoder.encode(userUpdate.getPassword()));
}
- AppsmithBeanUtils.copyNewFieldValuesIntoOldObject(userUpdate, existingUser);
- return repository.save(existingUser);
+ return repository.updateById(existingUser.getId(), userUpdate, null);
}
private boolean validateName(String name) {
@@ -603,6 +601,8 @@ public Mono updateCurrentUser(final UserUpdateDTO allUpdates, ServerWebExc
return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.NAME));
}
updates.setName(inputName);
+ // Set policies to null to avoid overriding them.
+ updates.setPolicies(null);
updatedUserMono = sessionUserService
.getCurrentUser()
.flatMap(user -> updateWithoutPermission(user.getId(), updates)
diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce_compatible/ConsolidatedAPIServiceCECompatibleImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce_compatible/ConsolidatedAPIServiceCECompatibleImpl.java
index c41efc86957..c7cc66cc436 100644
--- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce_compatible/ConsolidatedAPIServiceCECompatibleImpl.java
+++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce_compatible/ConsolidatedAPIServiceCECompatibleImpl.java
@@ -7,6 +7,7 @@
import com.appsmith.server.newactions.base.NewActionService;
import com.appsmith.server.newpages.base.NewPageService;
import com.appsmith.server.plugins.base.PluginService;
+import com.appsmith.server.repositories.CacheableRepositoryHelper;
import com.appsmith.server.services.ApplicationPageService;
import com.appsmith.server.services.MockDataService;
import com.appsmith.server.services.ProductAlertService;
@@ -36,7 +37,8 @@ public ConsolidatedAPIServiceCECompatibleImpl(
PluginService pluginService,
DatasourceService datasourceService,
MockDataService mockDataService,
- ObservationRegistry observationRegistry) {
+ ObservationRegistry observationRegistry,
+ CacheableRepositoryHelper cacheableRepositoryHelper) {
super(
sessionUserService,
userService,
@@ -53,6 +55,7 @@ public ConsolidatedAPIServiceCECompatibleImpl(
pluginService,
datasourceService,
mockDataService,
- observationRegistry);
+ observationRegistry,
+ cacheableRepositoryHelper);
}
}
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryTest.java
index 6cff70087a0..71da2c69072 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryTest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryTest.java
@@ -101,7 +101,7 @@ void publishPages_WhenIdMatches_Published() {
@Test
void findPageWithoutBranchName() {
StepVerifier.create(newPageRepository.findPageByBranchNameAndBasePageId(
- null, "pageId", AclPermission.PAGE_CREATE_PAGE_ACTIONS))
+ null, "pageId", AclPermission.PAGE_CREATE_PAGE_ACTIONS, null))
.verifyComplete();
}
}
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ActionCollectionServiceImplTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ActionCollectionServiceImplTest.java
index 716779b1653..43b0d91a085 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ActionCollectionServiceImplTest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ActionCollectionServiceImplTest.java
@@ -200,7 +200,8 @@ public void testCreateCollection_withRepeatedActionName_throwsError() throws IOE
final NewPage newPage = objectMapper.convertValue(jsonNode.get("newPage"), NewPage.class);
Mockito.when(newPageService.findById(Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
- Mockito.when(newPageService.findByBranchNameAndBasePageId(Mockito.any(), Mockito.any(), Mockito.any()))
+ Mockito.when(newPageService.findByBranchNameAndBasePageId(
+ Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
Mockito.when(refactoringService.isNameAllowed(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(false));
@@ -233,7 +234,8 @@ public void testCreateCollection_createActionFailure_returnsWithIncompleteCollec
Mockito.when(newPageService.findById(Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
- Mockito.when(newPageService.findByBranchNameAndBasePageId(Mockito.any(), Mockito.any(), Mockito.any()))
+ Mockito.when(newPageService.findByBranchNameAndBasePageId(
+ Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
Mockito.when(refactoringService.isNameAllowed(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(true));
@@ -290,7 +292,8 @@ public void testCreateCollection_validCollection_returnsPopulatedCollection() th
Mockito.when(newPageService.findById(Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
- Mockito.when(newPageService.findByBranchNameAndBasePageId(Mockito.any(), Mockito.any(), Mockito.any()))
+ Mockito.when(newPageService.findByBranchNameAndBasePageId(
+ Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
Mockito.when(refactoringService.isNameAllowed(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(true));
@@ -385,7 +388,8 @@ public void testUpdateUnpublishedActionCollection_withInvalidId_throwsError() th
Mockito.when(actionCollectionRepository.findById(Mockito.anyString(), Mockito.any()))
.thenReturn(Mono.empty());
- Mockito.when(newPageService.findByBranchNameAndBasePageId(Mockito.any(), Mockito.any(), Mockito.any()))
+ Mockito.when(newPageService.findByBranchNameAndBasePageId(
+ Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any()))
.thenReturn(Mono.just(newPage));
Mockito.when(newPageService.findById(Mockito.any(), Mockito.any()))
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ConsolidatedAPIServiceImplTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ConsolidatedAPIServiceImplTest.java
index c030539e9ce..cddb33847c5 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ConsolidatedAPIServiceImplTest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ConsolidatedAPIServiceImplTest.java
@@ -225,7 +225,7 @@ public void testPageLoadResponseForViewMode() {
mockNewPage.setId("mockPageId");
doReturn(Mono.just(mockNewPage))
.when(spyNewPageService)
- .findByBranchNameAndBasePageId(anyString(), anyString(), any());
+ .findByBranchNameAndBasePageId(anyString(), anyString(), any(), any());
doReturn(Mono.just(List.of(mockNewPage)))
.when(spyApplicationPageService)
@@ -268,7 +268,7 @@ public void testPageLoadResponseForViewMode() {
Mono consolidatedInfoForPageLoad =
consolidatedAPIService.getConsolidatedInfoForPageLoad(
- "pageId", null, "branch", ApplicationMode.PUBLISHED);
+ "pageId123", null, "branch", ApplicationMode.PUBLISHED);
StepVerifier.create(consolidatedInfoForPageLoad)
.assertNext(consolidatedAPIResponseDTO -> {
assertNotNull(consolidatedAPIResponseDTO.getPublishedActions());
@@ -416,7 +416,7 @@ public void testPageLoadResponseForEditMode() {
mockNewPage.setApplicationId("mockApplicationId");
doReturn(Mono.just(mockNewPage))
.when(spyNewPageService)
- .findByBranchNameAndBasePageId(anyString(), anyString(), any());
+ .findByBranchNameAndBasePageId(anyString(), anyString(), any(), any());
doReturn(Mono.just(List.of(mockNewPage)))
.when(spyApplicationPageService)
@@ -721,7 +721,7 @@ public void testErrorResponseWhenAnonymousUserAccessPrivateApp() {
when(mockProductAlertService.getSingleApplicableMessage())
.thenReturn(Mono.just(List.of(sampleProductAlertResponseDTO)));
- when(mockNewPageRepository.findPageByBranchNameAndBasePageId(anyString(), anyString(), any()))
+ when(mockNewPageRepository.findPageByBranchNameAndBasePageId(anyString(), anyString(), any(), any()))
.thenReturn(Mono.empty());
doReturn(Mono.empty())
.when(spyApplicationRepository)
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
index fc702317864..3ec766f804c 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
@@ -863,7 +863,7 @@ public void clonePage_whenPageCloned_defaultIdsRetained() {
final Mono pageMono = applicationPageService
.clonePage(page.getId())
.flatMap(pageDTO ->
- newPageService.findByBranchNameAndBasePageId(branchName, pageDTO.getId(), MANAGE_PAGES))
+ newPageService.findByBranchNameAndBasePageId(branchName, pageDTO.getId(), MANAGE_PAGES, null))
.cache();
Mono> actionsMono = pageMono.flatMapMany(
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserServiceTest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserServiceTest.java
index fe9647bf7de..03b2cdd7105 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserServiceTest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/UserServiceTest.java
@@ -13,6 +13,7 @@
import com.appsmith.server.domains.TenantConfiguration;
import com.appsmith.server.domains.User;
import com.appsmith.server.domains.UserData;
+import com.appsmith.server.domains.UserState;
import com.appsmith.server.domains.Workspace;
import com.appsmith.server.dtos.InviteUsersDTO;
import com.appsmith.server.dtos.ResendEmailVerificationDTO;
@@ -39,6 +40,9 @@
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.boot.test.mock.mockito.SpyBean;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.context.SecurityContextImpl;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.test.context.support.WithUserDetails;
import org.springframework.test.annotation.DirtiesContext;
@@ -748,4 +752,61 @@ public void updateNameProficiencyAndUseCaseOfUser() {
})
.verifyComplete();
}
+
+ private Mono runAs(Mono input, User user, String password) {
+ log.info("Running as user: {}", user.getEmail());
+ return input.contextWrite((ctx) -> {
+ SecurityContext securityContext = new SecurityContextImpl(
+ new UsernamePasswordAuthenticationToken(user, password, user.getAuthorities()));
+ return ctx.put(SecurityContext.class, Mono.just(securityContext));
+ });
+ }
+
+ @Test
+ @WithUserDetails(value = "api_user")
+ public void testUpdateCurrentUser_shouldNotUpdatePolicies() {
+ String testName = "testUpdateName_shouldNotUpdatePolicies";
+ User user = new User();
+ user.setEmail(testName + "@test.com");
+ user.setPassword(testName);
+ User createdUser = userService.create(user).block();
+ Set policies = createdUser.getPolicies();
+
+ assertThat(createdUser.getName()).isNull();
+ assertThat(createdUser.getPolicies()).isNotEmpty();
+
+ UserUpdateDTO updateUser = new UserUpdateDTO();
+ updateUser.setName("Test Name");
+
+ User userUpdatedPostNameUpdate = runAs(userService.updateCurrentUser(updateUser, null), createdUser, testName)
+ .block();
+
+ assertThat(userUpdatedPostNameUpdate.getName()).isEqualTo("Test Name");
+ userUpdatedPostNameUpdate.getPolicies().forEach(policy -> {
+ assertThat(policies).contains(policy);
+ });
+ }
+
+ @Test
+ @WithUserDetails(value = "api_user")
+ public void testUpdateWithoutPermission_shouldUpdateChangedFields() {
+ String testName = "testUpdateWithoutPermission_shouldUpdateChangedFields";
+ User user = new User();
+ user.setEmail(testName + "@test.com");
+ user.setPassword(testName);
+ User createdUser = userService.create(user).block();
+ Set policies = createdUser.getPolicies();
+
+ User update = new User();
+ update.setName("Test Name");
+ update.setState(UserState.ACTIVATED);
+ User updatedUser =
+ userService.updateWithoutPermission(createdUser.getId(), update).block();
+
+ assertThat(updatedUser.getName()).isEqualTo("Test Name");
+ assertThat(updatedUser.getState()).isEqualTo(UserState.ACTIVATED);
+ policies.forEach(policy -> {
+ assertThat(updatedUser.getPolicies()).contains(policy);
+ });
+ }
}
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java
index 001452bb058..f71b1925732 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java
@@ -19,6 +19,7 @@
import com.appsmith.server.domains.ActionCollection;
import com.appsmith.server.domains.Application;
import com.appsmith.server.domains.ApplicationDetail;
+import com.appsmith.server.domains.ApplicationMode;
import com.appsmith.server.domains.ApplicationPage;
import com.appsmith.server.domains.Asset;
import com.appsmith.server.domains.CustomJSLib;
@@ -62,6 +63,7 @@
import com.appsmith.server.repositories.PermissionGroupRepository;
import com.appsmith.server.repositories.PluginRepository;
import com.appsmith.server.repositories.UserRepository;
+import com.appsmith.server.services.ConsolidatedAPIService;
import com.appsmith.server.services.LayoutActionService;
import com.appsmith.server.services.LayoutCollectionService;
import com.appsmith.server.services.PermissionGroupService;
@@ -124,6 +126,7 @@
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
+import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import static com.appsmith.server.acl.AclPermission.CONNECT_TO_GIT;
@@ -289,6 +292,9 @@ public class ApplicationServiceCETest {
@Autowired
private AssetRepository assetRepository;
+ @Autowired
+ private ConsolidatedAPIService consolidatedAPIService;
+
private Mono runAs(Mono input, User user) {
log.info("Running as user: {}", user.getEmail());
return input.contextWrite((ctx) -> {
@@ -1710,7 +1716,7 @@ public void cloneApplication_applicationWithGitMetadata_success() {
Mono> srcNewPageListMono = Flux.fromIterable(gitConnectedApp.getPages())
.flatMap(applicationPage -> newPageService.findByBranchNameAndBasePageId(
- branchName, applicationPage.getDefaultPageId(), READ_PAGES))
+ branchName, applicationPage.getDefaultPageId(), READ_PAGES, null))
.collectList();
StepVerifier.create(Mono.zip(clonedNewPageListMono, srcNewPageListMono))
@@ -4392,4 +4398,126 @@ public void findByWorkspaceIdAndDefaultApplicationsInRecentlyUsedOrder_invalidWo
})
.verify();
}
+
+ @Test
+ @WithUserDetails(value = "api_user")
+ public void testCacheEviction_whenPagesDeletedInEditModeFollowedByAppPublish_shouldInvalidateCache() {
+ // Step 1: Initialize the test application and page identifiers
+ Application testApplication = new Application();
+ String appName = "ApplicationServiceTest Publish Application Delete Page";
+ testApplication.setName(appName);
+ AtomicReference basePageId1Ref = new AtomicReference<>();
+ AtomicReference basePageId2Ref = new AtomicReference<>();
+
+ // Step 2: Create an application with a page and publish it
+ Mono applicationMono = applicationPageService
+ .createApplication(testApplication, workspaceId)
+ .flatMap(application -> {
+ // Step 2.1: Create a new page and set default layout
+ PageDTO page = new PageDTO();
+ page.setName("New Page");
+ page.setApplicationId(application.getId());
+ Layout defaultLayout = newPageService.createDefaultLayout();
+ List layouts = new ArrayList<>();
+ layouts.add(defaultLayout);
+ page.setLayouts(layouts);
+
+ // Step 2.2: Create and clone the page, then publish the application
+ return applicationPageService
+ .createPage(page)
+ .flatMap(page1 -> {
+ basePageId1Ref.set(page1.getBaseId());
+ return applicationPageService
+ .clonePage(page1.getId())
+ .flatMap(clonedPage -> {
+ basePageId2Ref.set(clonedPage.getId());
+ return applicationPageService.publish(page1.getApplicationId(), true);
+ });
+ })
+ .then(applicationService.findById(application.getId(), MANAGE_APPLICATIONS));
+ })
+ .cache();
+
+ // Step 3: Fetch the new page and verify its existence
+ PageDTO newPage = applicationMono
+ .flatMap(application -> newPageService
+ .findByNameAndApplicationIdAndViewMode("New Page", application.getId(), READ_PAGES, false)
+ .switchIfEmpty(Mono.error(new AppsmithException(AppsmithError.NO_RESOURCE_FOUND, "page"))))
+ .block();
+
+ // Step 4: Assert that page IDs are not null
+ assertThat(basePageId1Ref.get()).isNotNull();
+ assertThat(basePageId2Ref.get()).isNotNull();
+
+ // Step 5: Delete the pages in edit mode
+ applicationPageService.deleteUnpublishedPage(basePageId1Ref.get()).block();
+ applicationPageService.deleteUnpublishedPage(basePageId2Ref.get()).block();
+
+ // Step 6: Verify basePageId1 is not cached before calling the consolidated API
+ String cachedBaseAppId1 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId1Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId1).isNull();
+
+ // Step 7: Call the consolidated API to force cache update
+ consolidatedAPIService
+ .getConsolidatedInfoForPageLoad(basePageId1Ref.get(), null, null, ApplicationMode.PUBLISHED)
+ .block();
+
+ // Step 8: Verify basePageId1 is now cached after the consolidated API call
+ cachedBaseAppId1 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId1Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId1).isNotNull();
+
+ // Step 9: Verify basePageId2 is not cached before calling the consolidated API
+ String cachedBaseAppId2 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId2Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId2).isNull();
+
+ // Step 10: Call the consolidated API to force cache update for basePageId2
+ consolidatedAPIService
+ .getConsolidatedInfoForPageLoad(basePageId2Ref.get(), null, null, ApplicationMode.PUBLISHED)
+ .block();
+
+ // Step 11: Verify basePageId2 is now cached after the consolidated API call
+ cachedBaseAppId2 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId2Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId2).isNotNull();
+
+ // Step 12: Verify the application pages after deletion and publishing
+ ApplicationPage applicationPage = new ApplicationPage();
+ applicationPage.setId(newPage.getId());
+ applicationPage.setIsDefault(false);
+ applicationPage.setDefaultPageId(newPage.getId());
+
+ StepVerifier.create(applicationService.findById(newPage.getApplicationId(), MANAGE_APPLICATIONS))
+ .assertNext(editedApplication -> {
+ // Step 12.1: Check the published pages and edited pages
+ List publishedPages = editedApplication.getPublishedPages();
+ assertThat(publishedPages).size().isEqualTo(3);
+ assertThat(publishedPages).containsAnyOf(applicationPage);
+
+ List editedApplicationPages = editedApplication.getPages();
+ assertThat(editedApplicationPages).hasSize(1);
+ assertThat(editedApplicationPages).doesNotContain(applicationPage);
+ })
+ .verifyComplete();
+
+ // Step 13: Publish the application again
+ applicationPageService.publish(newPage.getApplicationId(), true).block();
+
+ // Step 14: Verify that the cache entries for deleted pages are evicted
+ cachedBaseAppId1 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId1Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId1).isNull();
+
+ cachedBaseAppId2 = cacheableRepositoryHelper
+ .fetchBaseApplicationId(basePageId2Ref.get(), null)
+ .block();
+ assertThat(cachedBaseAppId2).isNull();
+ }
}
diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java
index ae1af27a460..5ebba1803e6 100644
--- a/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java
+++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/CreateDBTablePageSolutionTests.java
@@ -367,7 +367,7 @@ public void createPage_withValidBranch_validDefaultIds() {
.flatMap(savedPage ->
solution.createPageFromDBTable(savedPage.getId(), resource, testDefaultEnvironmentId))
.flatMap(crudPageResponseDTO -> newPageService.findByBranchNameAndBasePageId(
- gitData.getBranchName(), crudPageResponseDTO.getPage().getId(), READ_PAGES));
+ gitData.getBranchName(), crudPageResponseDTO.getPage().getId(), READ_PAGES, null));
StepVerifier.create(resultMono.zipWhen(newPage1 -> getActions(newPage1.getId())))
.assertNext(tuple -> {
diff --git a/app/server/reactive-caching/src/main/java/com/appsmith/caching/annotations/CacheEvict.java b/app/server/reactive-caching/src/main/java/com/appsmith/caching/annotations/CacheEvict.java
index 001aaa0b648..7d307df03d8 100644
--- a/app/server/reactive-caching/src/main/java/com/appsmith/caching/annotations/CacheEvict.java
+++ b/app/server/reactive-caching/src/main/java/com/appsmith/caching/annotations/CacheEvict.java
@@ -23,6 +23,13 @@
*/
String key() default "";
+ /**
+ * Array of keys for which cache entries should be evicted.
+ * Can be used to specify multiple keys for bulk eviction.
+ * If empty, a single key can be derived from the method arguments.
+ */
+ String[] keys() default {};
+
/**
* Whether to evict all keys for a given cache name.
*/
diff --git a/app/server/reactive-caching/src/main/java/com/appsmith/caching/aspects/CacheAspect.java b/app/server/reactive-caching/src/main/java/com/appsmith/caching/aspects/CacheAspect.java
index 0ef5e9410e8..7e489e64c5d 100644
--- a/app/server/reactive-caching/src/main/java/com/appsmith/caching/aspects/CacheAspect.java
+++ b/app/server/reactive-caching/src/main/java/com/appsmith/caching/aspects/CacheAspect.java
@@ -11,6 +11,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.interceptor.SimpleKey;
import org.springframework.expression.EvaluationContext;
+import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
@@ -19,6 +20,7 @@
import reactor.core.publisher.Mono;
import java.lang.reflect.Method;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -201,6 +203,7 @@ public Object cacheEvict(ProceedingJoinPoint joinPoint) throws Throwable {
CacheEvict annotation = method.getAnnotation(CacheEvict.class);
String cacheName = annotation.cacheName();
boolean all = annotation.all();
+ String[] keys = annotation.keys(); // Get the array of keys
Class> returnType = method.getReturnType();
if (!returnType.isAssignableFrom(Mono.class)) {
@@ -212,10 +215,55 @@ public Object cacheEvict(ProceedingJoinPoint joinPoint) throws Throwable {
return cacheManager.evictAll(cacheName).then((Mono>) joinPoint.proceed());
}
+ // Evict multiple keys
+ if (keys.length > 0) { // If there are specific keys, evict those
+ // Create a Flux from the array of keys and map each key to a Mono of eviction
+
+ // Create the expression parser and evaluation context
+ ExpressionParser parser = new SpelExpressionParser();
+ StandardEvaluationContext context = new StandardEvaluationContext();
+
+ // Bind method arguments to the context
+ String[] parameterNames = signature.getParameterNames();
+ List> evictionMonos = new ArrayList<>();
+ for (int i = 0; i < joinPoint.getArgs().length; i++) {
+ context.setVariable(parameterNames[i], joinPoint.getArgs()[i]);
+ }
+
+ // Evaluate each key expression
+ for (String keyExpression : keys) {
+ // Parse and evaluate the expression
+ Expression expression = parser.parseExpression(keyExpression);
+
+ Object keyObj = expression.getValue(context);
+
+ // Handle case where the key value is a List
+ if (keyObj instanceof List) {
+ List> keyList = (List>) keyObj;
+ for (Object key : keyList) {
+ if (key != null) {
+ evictionMonos.add(cacheManager.evict(cacheName, key.toString()));
+ }
+ }
+ } else {
+ // Single key handling
+ if (keyObj != null) {
+ evictionMonos.add(cacheManager.evict(cacheName, keyObj.toString()));
+ }
+ }
+ }
+ return Flux.fromIterable(evictionMonos)
+ .flatMap(voidMono -> voidMono)
+ .collectList()
+ .then((Mono>) joinPoint.proceed());
+ }
+
+ // Evict single key
// derive key
String[] parameterNames = signature.getParameterNames();
Object[] args = joinPoint.getArgs();
String key = deriveKey(annotation.key(), parameterNames, args);
+
// Evict key from the cache then call the original method
return cacheManager.evict(cacheName, key).then((Mono>) joinPoint.proceed());
}
diff --git a/deploy/docker/fs/etc/supervisor/supervisord.conf b/deploy/docker/fs/etc/supervisor/supervisord.conf
index e3b341fca69..21d4f98d696 100644
--- a/deploy/docker/fs/etc/supervisor/supervisord.conf
+++ b/deploy/docker/fs/etc/supervisor/supervisord.conf
@@ -39,3 +39,9 @@ command = python3 -m supervisor.appsmith_supervisor_stdout
buffer_size = 10000
events = PROCESS_LOG
result_handler = supervisor.appsmith_supervisor_stdout:event_handler
+stdout_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/access-supervisor-%(ENV_HOSTNAME)s.log
+stderr_logfile=%(ENV_APPSMITH_LOG_DIR)s/supervisor/error-supervisor-%(ENV_HOSTNAME)s.log
+stdout_logfile_maxbytes=10MB
+stderr_logfile_maxbytes=10MB
+stdout_logfile_backups=10
+stderr_logfile_backups=10