diff --git a/app/client/package.json b/app/client/package.json index 095aaed2be..3206ad5a25 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -28,6 +28,7 @@ "eslint": "^6.4.0", "flow-bin": "^0.91.0", "fontfaceobserver": "^2.1.0", + "history": "^4.10.1", "husky": "^3.0.5", "jsonpath-plus": "^1.0.0", "lint-staged": "^9.2.5", @@ -53,7 +54,6 @@ "react-router-dom": "^5.0.1", "react-scripts": "^3.1.1", "react-select": "^3.0.8", - "react-tabs": "^3.0.0", "redux": "^4.0.1", "redux-form": "^8.2.6", "redux-saga": "^1.0.0", diff --git a/app/client/src/actions/actionActions.ts b/app/client/src/actions/actionActions.ts index f4f553b97c..a59a73d6d6 100644 --- a/app/client/src/actions/actionActions.ts +++ b/app/client/src/actions/actionActions.ts @@ -3,7 +3,14 @@ import { RestAction } from "../api/ActionAPI"; export const createAction = (payload: RestAction) => { return { - type: ReduxActionTypes.CREATE_ACTION, + type: ReduxActionTypes.CREATE_ACTION_INIT, + payload, + }; +}; + +export const createActionSuccess = (payload: RestAction) => { + return { + type: ReduxActionTypes.CREATE_ACTION_SUCCESS, payload, }; }; @@ -14,13 +21,6 @@ export const fetchActions = () => { }; }; -export const selectAction = (payload: { id: string }) => { - return { - type: ReduxActionTypes.SELECT_ACTION, - payload, - }; -}; - export const fetchApiConfig = (payload: { id: string }) => { return { type: ReduxActionTypes.FETCH_ACTION, @@ -30,21 +30,35 @@ export const fetchApiConfig = (payload: { id: string }) => { export const runAction = (payload: { id: string }) => { return { - type: ReduxActionTypes.RUN_ACTION, - payload, - }; -}; - -export const deleteAction = (payload: { id: string }) => { - return { - type: ReduxActionTypes.DELETE_ACTION, + type: ReduxActionTypes.RUN_ACTION_INIT, payload, }; }; export const updateAction = (payload: { data: RestAction }) => { return { - type: ReduxActionTypes.UPDATE_ACTION, + type: ReduxActionTypes.UPDATE_ACTION_INIT, + payload, + }; +}; + +export const updateActionSuccess = (payload: { data: RestAction }) => { + return { + type: ReduxActionTypes.UPDATE_ACTION_SUCCESS, + payload, + }; +}; + +export const deleteAction = (payload: { id: string }) => { + return { + type: ReduxActionTypes.DELETE_ACTION_INIT, + payload, + }; +}; + +export const deleteActionSuccess = (payload: { id: string }) => { + return { + type: ReduxActionTypes.DELETE_ACTION_SUCCESS, payload, }; }; @@ -55,4 +69,7 @@ export default { fetchApiConfig, runAction, deleteAction, + deleteActionSuccess, + updateAction, + updateActionSuccess, }; diff --git a/app/client/src/assets/icons/form/add-new.svg b/app/client/src/assets/icons/form/add-new.svg new file mode 100644 index 0000000000..6edbd99663 --- /dev/null +++ b/app/client/src/assets/icons/form/add-new.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/client/src/components/canvas/CreatableDropdown.tsx b/app/client/src/components/canvas/CreatableDropdown.tsx index 59349221e0..98a698fb7b 100644 --- a/app/client/src/components/canvas/CreatableDropdown.tsx +++ b/app/client/src/components/canvas/CreatableDropdown.tsx @@ -38,7 +38,6 @@ class CreatableDropdown extends React.Component { onCreateOption={onCreateOption} {...input} onChange={value => input.onChange(value)} - onBlur={() => input.onBlur(input.value)} /> ); } diff --git a/app/client/src/components/canvas/Dropdown.tsx b/app/client/src/components/canvas/Dropdown.tsx index 5deeb69785..245825f15c 100644 --- a/app/client/src/components/canvas/Dropdown.tsx +++ b/app/client/src/components/canvas/Dropdown.tsx @@ -8,12 +8,13 @@ type DropdownProps = { label: string; }>; input: WrappedFieldInputProps; + placeholder: string; }; const selectStyles = { control: (styles: any) => ({ ...styles, - width: 100, + width: 120, }), }; @@ -21,12 +22,11 @@ export const BaseDropdown = (props: DropdownProps) => { const { input, options } = props; return (