diff --git a/app/client/.gitlab-ci.yml b/app/client/.gitlab-ci.yml index 4fa48d9a2a..ce20400cf2 100644 --- a/app/client/.gitlab-ci.yml +++ b/app/client/.gitlab-ci.yml @@ -113,7 +113,11 @@ cypress-test: - cp $APPSMITH_SSL_CERTIFICATE /etc/certificate/dev.appsmith.com.pem - cp $APPSMITH_SSL_KEY /etc/certificate/dev.appsmith.com-key.pem - nginx - - yarn test:ci + # This command configures the cypress suite to point to our custom installation of sorry-cypress that will help us parallelize our tests + - | + DEBUG=cypress:* $(npm bin)/cypress version + sed -i -e 's|api_url:.*$|api_url: "https://appsmith-cypress.herokuapp.com/"|g' /builds/theappsmith/internal-tools-client/cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml + - BUILD_ID=$CI_COMMIT_SHORT_SHA yarn test:ci artifacts: when: always expire_in: 1 week diff --git a/app/client/cypress/fixtures/uiBindDsl.json b/app/client/cypress/fixtures/uiBindDsl.json index 40c18ac707..90f8be6e87 100644 --- a/app/client/cypress/fixtures/uiBindDsl.json +++ b/app/client/cypress/fixtures/uiBindDsl.json @@ -56,7 +56,7 @@ "isVisible": true, "isDisabled": false, "datePickerType": "DATE_PICKER", - "dateFormat": "DD/MM/YYYY", + "dateFormat": "YYYY-MM-DD", "label": "Date", "widgetName": "DatePicker1", "defaultDate": "2020-05-29T12:02:04.074+05:30", @@ -75,7 +75,7 @@ "isVisible": true, "isDisabled": false, "datePickerType": "DATE_PICKER", - "dateFormat": "DD/MM/YYYY", + "dateFormat": "YYYY-MM-DD", "label": "Date", "widgetName": "DatePicker2", "defaultDate": "2020-05-29T12:02:04.074+05:30", diff --git a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js index 32f432adfd..fe4e7ae45b 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ApiPaneTests/API_all_sidebar_actions_spec.js @@ -1,5 +1,3 @@ -const testdata = require("../../../fixtures/testdata.json"); - describe("API Panel Test Functionality ", function() { it("Test API copy/Move/delete feature", function() { cy.log("Login Successful"); @@ -8,7 +6,6 @@ describe("API Panel Test Functionality ", function() { cy.CreateAPI("FirstAPI"); cy.log("Creation of FirstAPI Action successful"); cy.CopyAPIToHome("FirstAPI"); - cy.DeleteAPI("FirstAPI"); cy.MoveAPIToPage(); cy.DeleteAPI("FirstAPI"); cy.CreateAPI("FirstAPI"); diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js index 2c2798c777..85692ff96f 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js @@ -49,7 +49,7 @@ describe("DatePicker Widget Functionality", function() { ); }); - it("Datepicker-Claer date validation", function() { + it("Datepicker-Clear date validation", function() { const today = Cypress.moment() .add(0, "days") .format("DD/MM/YYYY"); @@ -58,37 +58,37 @@ describe("DatePicker Widget Functionality", function() { cy.PublishtheApp(); cy.get(publishPage.datepickerWidget + " .bp3-input").should( "contain.value", - today + " 00:00", + "", ); }); - it("DatePicker-check Required field validation", function() { - // Check the required checkbox - cy.CheckWidgetProperties(commonlocators.requiredCheckbox); - cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should( - "contain.text", - "From Date", - ); - cy.PublishtheApp(); - cy.get(publishPage.datepickerWidget + " .bp3-label").should( - "contain.text", - "From Date", - ); - }); - - it("DatePicker-uncheck Required field validation", function() { - // Uncheck the required checkbox - cy.UncheckWidgetProperties(commonlocators.requiredCheckbox); - cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should( - "contain.text", - "From Date", - ); - cy.PublishtheApp(); - cy.get(publishPage.datepickerWidget + " .bp3-label").should( - "contain.text", - "From Date", - ); - }); + // it("DatePicker-check Required field validation", function() { + // // Check the required checkbox + // cy.CheckWidgetProperties(commonlocators.requiredCheckbox); + // cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should( + // "contain.text", + // "From Date", + // ); + // cy.PublishtheApp(); + // cy.get(publishPage.datepickerWidget + " .bp3-label").should( + // "contain.text", + // "From Date", + // ); + // }); + // + // it("DatePicker-uncheck Required field validation", function() { + // // Uncheck the required checkbox + // cy.UncheckWidgetProperties(commonlocators.requiredCheckbox); + // cy.get(formWidgetsPage.datepickerWidget + " .bp3-label").should( + // "contain.text", + // "From Date", + // ); + // cy.PublishtheApp(); + // cy.get(publishPage.datepickerWidget + " .bp3-label").should( + // "contain.text", + // "From Date", + // ); + // }); it("DatePicker-check Visible field validation", function() { // Check the visible checkbox diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 85cf8fb4ad..c61b68609b 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -38,6 +38,11 @@ Cypress.Commands.add("DeleteApp", appName => { "response.body.responseMeta.status", 200, ); + cy.wait("@organizations").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); cy.get('button span[icon="chevron-down"]').should("be.visible"); cy.get(homePage.searchInput).type(appName, { force: true }); cy.get(homePage.appMoreIcon) @@ -352,9 +357,7 @@ Cypress.Commands.add("MoveAPIToPage", () => { .first() .click({ force: true }); cy.get(apiwidget.moveTo).click({ force: true }); - cy.get( - ".single-select >div:contains('".concat(pageidcopy).concat("')"), - ).click({ force: true }); + cy.get(apiwidget.home).click({ force: true }); cy.wait("@createNewApi").should( "have.nested.property", "response.body.responseMeta.status", diff --git a/app/client/cypress/test.sh b/app/client/cypress/test.sh index 53f7a463d5..cbc96b79a9 100755 --- a/app/client/cypress/test.sh +++ b/app/client/cypress/test.sh @@ -26,7 +26,11 @@ echo "Got the target: $target" if [ "$target" == "ci" ]; then # On the CI server run the tests in parallel # This requires the projectId and the record_key to be configured in your environment variables. By default this is defined on the CI server - $(npm bin)/cypress run --headless --browser chrome --record --parallel --group "Electrons on Gitlab CI" --spec "cypress/integration/Smoke_TestSuite/*/*" + echo "Got the Build ID: $BUILD_ID" + CYPRESS_PROJECT_ID=appsmith-project $(npm bin)/cypress run --headless --browser chrome \ + --record --key "random-key" --ci-build-id $BUILD_ID \ + --parallel --group "Electrons on Gitlab CI" \ + --spec "cypress/integration/Smoke_TestSuite/*/*" else $(npm bin)/cypress run --headless --browser chrome --spec "cypress/integration/Smoke_TestSuite/*/*" fi \ No newline at end of file diff --git a/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx b/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx index 6f339a6cd2..e8042904f7 100644 --- a/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx +++ b/app/client/src/components/designSystems/blueprint/DatePickerComponent.tsx @@ -69,8 +69,8 @@ class DatePickerComponent extends React.Component< componentDidUpdate(prevProps: DatePickerComponentProps) { if ( this.props.selectedDate !== this.state.selectedDate && - !moment(this.props.selectedDate).isSame( - moment(prevProps.selectedDate), + !moment(this.props.selectedDate, this.props.dateFormat).isSame( + moment(prevProps.selectedDate, this.props.dateFormat), "seconds", ) ) { @@ -106,7 +106,7 @@ class DatePickerComponent extends React.Component< className={this.props.isLoading ? "bp3-skeleton" : ""} formatDate={this.formatDate} parseDate={this.parseDate} - placeholder={this.props.dateFormat} + placeholder={"Select Date"} disabled={this.props.isDisabled} showActionsBar={true} timePrecision={TimePrecision.MINUTE} @@ -114,7 +114,7 @@ class DatePickerComponent extends React.Component< onChange={this.onDateSelected} value={ this.state.selectedDate - ? moment(this.state.selectedDate).toDate() + ? this.parseDate(this.state.selectedDate) : null } maxDate={maxDate.toDate()} @@ -137,16 +137,15 @@ class DatePickerComponent extends React.Component< } formatDate = (date: Date): string => { - const dateFormat = "DD/MM/YYYY HH:mm"; - return moment(date).format(dateFormat); + return moment(date).format(this.props.dateFormat); }; parseDate = (dateStr: string): Date => { - return moment(dateStr, "DD/MM/YYYY HH:mm").toDate(); + return moment(dateStr, this.props.dateFormat).toDate(); }; onDateSelected = (selectedDate: Date) => { - const date = selectedDate ? moment(selectedDate).toISOString(true) : ""; + const date = selectedDate ? this.formatDate(selectedDate) : ""; this.setState({ selectedDate: date }); this.props.onDateSelected(date); }; @@ -156,7 +155,7 @@ interface DatePickerComponentProps extends ComponentProps { label: string; dateFormat: string; enableTimePicker?: boolean; - selectedDate: string; + selectedDate?: string; minDate?: Date; maxDate?: Date; timezone?: string; @@ -167,7 +166,7 @@ interface DatePickerComponentProps extends ComponentProps { } interface DatePickerComponentState { - selectedDate: string; + selectedDate?: string; } export default DatePickerComponent; diff --git a/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx b/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx index 957481d21e..3e61315bd5 100644 --- a/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx +++ b/app/client/src/components/editorComponents/DynamicAutocompleteInput.tsx @@ -367,6 +367,11 @@ class DynamicAutocompleteInput extends Component { let inputValue = this.props.input.value || ""; if (typeof inputValue === "object") { inputValue = JSON.stringify(inputValue, null, 2); + } else if ( + typeof inputValue === "number" || + typeof inputValue === "string" + ) { + inputValue += ""; } this.editor.setValue(inputValue); this.startAutocomplete(); @@ -383,6 +388,11 @@ class DynamicAutocompleteInput extends Component { // Safe update of value of the editor when value updated outside the editor if (typeof inputValue === "object") { inputValue = JSON.stringify(inputValue, null, 2); + } else if ( + typeof inputValue === "number" || + typeof inputValue === "string" + ) { + inputValue += ""; } if ((!!inputValue || inputValue === "") && inputValue !== editorValue) { this.editor.setValue(inputValue); @@ -574,7 +584,8 @@ class DynamicAutocompleteInput extends Component { } const showEvaluatedValue = this.state.isFocused && - ("evaluatedValue" in this.props || "dataTreePath" in this.props); + ("evaluatedValue" in this.props || + ("dataTreePath" in this.props && !!this.props.dataTreePath)); return ( diff --git a/app/client/src/components/editorComponents/ResizeStyledComponents.tsx b/app/client/src/components/editorComponents/ResizeStyledComponents.tsx index 32382ca63d..be73e16c29 100644 --- a/app/client/src/components/editorComponents/ResizeStyledComponents.tsx +++ b/app/client/src/components/editorComponents/ResizeStyledComponents.tsx @@ -3,7 +3,7 @@ import { WIDGET_PADDING } from "constants/WidgetConstants"; import styled, { css } from "styled-components"; const EDGE_RESIZE_HANDLE_WIDTH = 10; -const CORNER_RESIZE_HANDLE_WIDTH = 40; +const CORNER_RESIZE_HANDLE_WIDTH = 10; export const VisibilityContainer = styled.div<{ visible: boolean; diff --git a/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx b/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx index 01c61accf9..9673601420 100644 --- a/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx +++ b/app/client/src/components/editorComponents/actioncreator/ActionCreator.tsx @@ -195,6 +195,7 @@ const views = { props.set(event); } }} + dataTreePath={""} isValid={props.isValid} errorMessage={props.validationMessage} /> diff --git a/app/client/src/components/propertyControls/BaseControl.tsx b/app/client/src/components/propertyControls/BaseControl.tsx index 97acbd760b..b3440fd518 100644 --- a/app/client/src/components/propertyControls/BaseControl.tsx +++ b/app/client/src/components/propertyControls/BaseControl.tsx @@ -37,7 +37,7 @@ export interface ControlData { expected: string; evaluatedValue: any; validationMessage?: string; - dataTreePath: string; + dataTreePath?: string; } export interface ControlFunctions { diff --git a/app/client/src/components/propertyControls/ChartDataControl.tsx b/app/client/src/components/propertyControls/ChartDataControl.tsx index f73d15f673..f64c22dc41 100644 --- a/app/client/src/components/propertyControls/ChartDataControl.tsx +++ b/app/client/src/components/propertyControls/ChartDataControl.tsx @@ -1,11 +1,7 @@ import React from "react"; import _ from "lodash"; import BaseControl, { ControlProps } from "./BaseControl"; -import { - ControlWrapper, - StyledInputGroup, - StyledPropertyPaneButton, -} from "./StyledControls"; +import { ControlWrapper, StyledPropertyPaneButton } from "./StyledControls"; import styled from "constants/DefaultTheme"; import { FormIcons } from "icons/FormIcons"; import { AnyStyledComponent } from "styled-components"; @@ -18,24 +14,6 @@ const StyledOptionControlWrapper = styled(ControlWrapper)` width: 100%; `; -const StyledOptionControlInputGroup = styled(StyledInputGroup)` - margin-right: 2px; - width: 100%; - margin-bottom: 0; - &&& { - input { - border: none; - color: ${props => props.theme.colors.textOnDarkBG}; - background: ${props => props.theme.colors.paneInputBG}; - &:focus { - border: none; - color: ${props => props.theme.colors.textOnDarkBG}; - background: ${props => props.theme.colors.paneInputBG}; - } - } - } -`; - const StyledDynamicInput = styled.div` width: 100%; &&& { diff --git a/app/client/src/components/propertyControls/CodeEditorControl.tsx b/app/client/src/components/propertyControls/CodeEditorControl.tsx index 8f8daf94b4..0a6d13b647 100644 --- a/app/client/src/components/propertyControls/CodeEditorControl.tsx +++ b/app/client/src/components/propertyControls/CodeEditorControl.tsx @@ -5,20 +5,23 @@ import { EventOrValueHandler } from "redux-form"; class CodeEditorControl extends BaseControl { render() { const { - errorMessage, + validationMessage, expected, propertyValue, isValid, dataTreePath, + evaluatedValue, } = this.props; + return ( { - const selectedDate = date ? moment(date).toISOString(true) : ""; + const selectedDate = date ? moment(date).toISOString(true) : undefined; this.setState({ selectedDate: selectedDate }); this.updateProperty(this.props.propertyName, selectedDate); }; @@ -94,7 +94,7 @@ export interface DatePickerControlProps extends ControlProps { } interface DatePickerControlState { - selectedDate: string; + selectedDate?: string; } export default DatePickerControl; diff --git a/app/client/src/constants/ApiEditorConstants.ts b/app/client/src/constants/ApiEditorConstants.ts index 8710587491..1d0f5082c7 100644 --- a/app/client/src/constants/ApiEditorConstants.ts +++ b/app/client/src/constants/ApiEditorConstants.ts @@ -28,13 +28,23 @@ export const DEFAULT_API_ACTION: Partial = { export const API_CONSTANT = "API"; export const DEFAULT_PROVIDER_OPTION = "Business Software"; export const CONTENT_TYPE = "content-type"; -export const POST_BODY_FORMATS = [ - "application/json", - "application/x-www-form-urlencoded", - "raw", + +export const POST_BODY_FORMAT_OPTIONS = [ + { label: "json", value: "application/json" }, + { + label: "x-www-form-urlencoded", + value: "application/x-www-form-urlencoded", + }, + { label: "form-data", value: "multipart/form-data" }, + { label: "raw", value: "raw" }, ]; -export const POST_BODY_FORMAT_OPTIONS = POST_BODY_FORMATS.map(method => ({ - label: method, - value: method, -})); +export const POST_BODY_FORMAT_OPTIONS_NO_MULTI_PART = POST_BODY_FORMAT_OPTIONS.filter( + option => { + return option.value !== "multipart/form-data"; + }, +); + +export const POST_BODY_FORMATS = POST_BODY_FORMAT_OPTIONS.map(option => { + return option.value; +}); diff --git a/app/client/src/constants/FieldExpectedValue.ts b/app/client/src/constants/FieldExpectedValue.ts index b4930d4091..1a0c7f82d0 100644 --- a/app/client/src/constants/FieldExpectedValue.ts +++ b/app/client/src/constants/FieldExpectedValue.ts @@ -21,7 +21,7 @@ const FIELD_VALUES: Record< isRequired: "boolean", isVisible: "boolean", isDisabled: "boolean", - onDateSelected: "undefined", + onDateSelected: "Function Call", }, TABLE_WIDGET: { tableData: "Array", @@ -30,8 +30,8 @@ const FIELD_VALUES: Record< exportPDF: "boolean", exportExcel: "boolean", exportCsv: "boolean", - onRowSelected: "undefined", - onPageChange: "undefined", + onRowSelected: "Function Call", + onPageChange: "Function Call", }, IMAGE_WIDGET: { image: "string", @@ -43,7 +43,7 @@ const FIELD_VALUES: Record< defaultOptionValue: "string", isRequired: "boolean", isVisible: "boolean", - onSelectionChange: "undefined", + onSelectionChange: "Function Call", }, TABS_WIDGET: { tabs: "Array<{ label: string, id: string }>", @@ -53,7 +53,6 @@ const FIELD_VALUES: Record< CHART_WIDGET: { chartName: "string", chartType: "LINE_CHART | BAR_CHART | PIE_CHART | COLUMN_CHART | AREA_CHART", - singleChartData: "Array<{ x: string, y: number }>", xAxisName: "string", yAxisName: "string", isVisible: "boolean", @@ -71,7 +70,7 @@ const FIELD_VALUES: Record< isRequired: "boolean", isVisible: "boolean", isDisabled: "boolean", - onTextChanged: "undefined", + onTextChanged: "Function Call", }, DROP_DOWN_WIDGET: { label: "string", @@ -80,7 +79,7 @@ const FIELD_VALUES: Record< defaultOptionValue: "string", isRequired: "boolean", isVisible: "boolean", - onOptionChange: "boolean", + onOptionChange: "Function Call", }, FORM_BUTTON_WIDGET: { text: "string", @@ -88,7 +87,7 @@ const FIELD_VALUES: Record< disabledWhenInvalid: "boolean", resetFormOnClick: "boolean", isVisible: "boolean", - onClick: "boolean", + onClick: "Function Call", }, MAP_WIDGET: { defaultMarkers: "Array<{ lat: number, long: number }>", @@ -96,20 +95,20 @@ const FIELD_VALUES: Record< enablePickLocation: "boolean", enableCreateMarker: "boolean", isVisible: "boolean", - onMarkerClick: "undefined", - onCreateMarker: "undefined", + onMarkerClick: "Function Call", + onCreateMarker: "Function Call", }, BUTTON_WIDGET: { text: "string", buttonStyle: "PRIMARY_BUTTON | SECONDARY_BUTTON | DANGER_BUTTON", isVisible: "boolean", - onClick: "boolean", + onClick: "Function Call", }, RICH_TEXT_EDITOR_WIDGET: { defaultText: "string", isVisible: "boolean", isDisabled: "boolean", - onTextChange: "undefined", + onTextChange: "Function Call", }, FILE_PICKER_WIDGET: { label: "string", @@ -120,7 +119,7 @@ const FIELD_VALUES: Record< isRequired: "boolean", isVisible: "boolean", uploadedFileUrls: "string", - onFilesSelected: "undefined", + onFilesSelected: "Function Call", }, CHECKBOX_WIDGET: { label: "string", @@ -128,7 +127,7 @@ const FIELD_VALUES: Record< isRequired: "boolean", isDisabled: "boolean", isVisible: "boolean", - onCheckChange: "undefined", + onCheckChange: "Function Call", }, FORM_WIDGET: { backgroundColor: "string", diff --git a/app/client/src/constants/QueryEditorConstants.ts b/app/client/src/constants/QueryEditorConstants.ts index 24fe11876f..f3fc1debad 100644 --- a/app/client/src/constants/QueryEditorConstants.ts +++ b/app/client/src/constants/QueryEditorConstants.ts @@ -1,7 +1,7 @@ export const PLUGIN_NAME_POSTGRES = "PostgresDbPlugin"; export const PLUGIN_NAME_MONGODB = " MongoDBPlugin"; export const PLUGIN_NAME_DBS = [PLUGIN_NAME_POSTGRES, PLUGIN_NAME_MONGODB]; - +export const QUERY_BODY_FIELD = "actionConfiguration.body"; export const PLUGIN_PACKAGE_POSTGRES = "postgres-plugin"; export const PLUGIN_PACKAGE_MONGO = "mongo-plugin"; export const PLUGIN_PACKAGE_DBS = [ diff --git a/app/client/src/entities/Action/index.ts b/app/client/src/entities/Action/index.ts index 626b2e50a9..73f19713fe 100644 --- a/app/client/src/entities/Action/index.ts +++ b/app/client/src/entities/Action/index.ts @@ -48,7 +48,7 @@ export interface ApiActionConfig extends ActionConfig { } export interface QueryActionConfig extends ActionConfig { - queryString: string; + body: string; } export interface Action { diff --git a/app/client/src/mockResponses/WidgetConfigResponse.tsx b/app/client/src/mockResponses/WidgetConfigResponse.tsx index b91c0ec99b..0ead73cd0d 100644 --- a/app/client/src/mockResponses/WidgetConfigResponse.tsx +++ b/app/client/src/mockResponses/WidgetConfigResponse.tsx @@ -86,10 +86,10 @@ const WidgetConfigResponse: WidgetConfigReducerState = { datePickerType: "DATE_PICKER", rows: 1, label: "", - dateFormat: "DD/MM/YYYY", + dateFormat: "DD/MM/YYYY HH:mm", columns: 5, widgetName: "DatePicker", - defaultDate: moment().toISOString(true), + defaultDate: moment().format("DD/MM/YYYY HH:mm"), }, TABLE_WIDGET: { rows: 7, @@ -131,6 +131,7 @@ const WidgetConfigResponse: WidgetConfigReducerState = { { label: "Vegan", value: "VEGAN" }, ], widgetName: "Dropdown", + defaultOptionValue: "VEG", }, CHECKBOX_WIDGET: { rows: 1, @@ -147,7 +148,7 @@ const WidgetConfigResponse: WidgetConfigReducerState = { { id: "1", label: "Male", value: "M" }, { id: "2", label: "Female", value: "F" }, ], - defaultOptionValue: "1", + defaultOptionValue: "M", widgetName: "RadioGroup", }, ALERT_WIDGET: { @@ -164,6 +165,8 @@ const WidgetConfigResponse: WidgetConfigReducerState = { files: [], label: "Select Files", columns: 4, + maxNumFiles: 1, + maxFileSize: 5, widgetName: "FilePicker", isDefaultClickDisabled: true, }, @@ -233,8 +236,8 @@ const WidgetConfigResponse: WidgetConfigReducerState = { view: [ { type: "ICON_WIDGET", - position: { left: 15, top: 0 }, - size: { rows: 1, cols: 1 }, + position: { left: 14, top: 0 }, + size: { rows: 1, cols: 2 }, props: { iconName: "cross", iconSize: 24, @@ -244,7 +247,7 @@ const WidgetConfigResponse: WidgetConfigReducerState = { { type: "TEXT_WIDGET", position: { left: 0, top: 0 }, - size: { rows: 1, cols: 15 }, + size: { rows: 1, cols: 10 }, props: { text: "Modal Title", textStyle: "HEADING", diff --git a/app/client/src/pages/Editor/APIEditor/Form.tsx b/app/client/src/pages/Editor/APIEditor/Form.tsx index ee48be2667..65ef8fdd90 100644 --- a/app/client/src/pages/Editor/APIEditor/Form.tsx +++ b/app/client/src/pages/Editor/APIEditor/Form.tsx @@ -264,7 +264,7 @@ const ApiEditorForm: React.FC = (props: Props) => { actionConfigurationHeaders={actionConfigurationHeaders} actionConfiguration={actionConfigurationBody} change={props.change} - dataTreePath={`${actionName}.config.actionConfiguration.body`} + dataTreePath={`${actionName}.config.actionConfiguration`} /> )} diff --git a/app/client/src/pages/Editor/APIEditor/Pagination.tsx b/app/client/src/pages/Editor/APIEditor/Pagination.tsx index 202a455c21..65f81486cb 100644 --- a/app/client/src/pages/Editor/APIEditor/Pagination.tsx +++ b/app/client/src/pages/Editor/APIEditor/Pagination.tsx @@ -127,12 +127,30 @@ export default function Pagination(props: PaginationProps) { marginBottom: "6px", }} > - Configure the Table pageNo in the API. + 1. Configure the Table pageNo in the API.

http://api.example.com/users?pageNo={"{{Table1.pageNo}}"} + +

+ 2. Enable server side pagination in Table1 +

+
+ +

+ 3. Call this API onPageChange in Table1. +

+
); diff --git a/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx b/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx index f2533efeed..487c49629a 100644 --- a/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx +++ b/app/client/src/pages/Editor/APIEditor/PostBodyData.tsx @@ -7,6 +7,7 @@ import { POST_BODY_FORMAT_OPTIONS, POST_BODY_FORMATS, CONTENT_TYPE, + POST_BODY_FORMAT_OPTIONS_NO_MULTI_PART, } from "constants/ApiEditorConstants"; import { API_EDITOR_FORM_NAME } from "constants/forms"; import FormLabel from "components/editorComponents/FormLabel"; @@ -62,7 +63,7 @@ const PostBodyData = (props: Props) => { } = props; return ( - {"Post Body"} + {"Body"}