PromucFlow_constructor/app/client/src/actions/applicationActions.ts
Ashok Kumar M a7e0990cf8
Feature: Canvas Layout Options(max width config) (#3141)
* Feature: Canvas Layout Options(max width config)

* Fixing css issues.

* Changing Default Device option to Desktop.

* Changed Implementation to maintain resize updates within the client.

* Addressing code review changes.

* Updating device resolutions.

* updating cytests

* Fixing resize bug.
2021-03-03 10:56:47 +05:30

91 lines
1.8 KiB
TypeScript

import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
import { APP_MODE } from "../reducers/entityReducers/appReducer";
import { UpdateApplicationPayload } from "api/ApplicationApi";
export const setDefaultApplicationPageSuccess = (
pageId: string,
applicationId: string,
) => {
return {
type: ReduxActionTypes.SET_DEFAULT_APPLICATION_PAGE_SUCCESS,
payload: {
pageId,
applicationId,
},
};
};
export interface FetchApplicationPayload {
applicationId: string;
mode: APP_MODE;
}
export const fetchApplication = (
applicationId: string,
mode: APP_MODE,
): ReduxAction<FetchApplicationPayload> => {
return {
type: ReduxActionTypes.FETCH_APPLICATION_INIT,
payload: {
applicationId,
mode,
},
};
};
export const updateApplicationLayout = (
id: string,
data: UpdateApplicationPayload,
) => {
return {
type: ReduxActionTypes.UPDATE_APP_LAYOUT,
payload: {
id,
...data,
},
};
};
export const updateApplication = (
id: string,
data: UpdateApplicationPayload,
) => {
return {
type: ReduxActionTypes.UPDATE_APPLICATION,
payload: {
id,
...data,
},
};
};
export const publishApplication = (applicationId: string) => {
return {
type: ReduxActionTypes.PUBLISH_APPLICATION_INIT,
payload: {
applicationId,
},
};
};
export const duplicateApplication = (applicationId: string) => {
return {
type: ReduxActionTypes.DUPLICATE_APPLICATION_INIT,
payload: {
applicationId,
},
};
};
export const getAllApplications = () => {
return {
type: ReduxActionTypes.GET_ALL_APPLICATION_INIT,
};
};
export const resetCurrentApplication = () => {
return {
type: ReduxActionTypes.RESET_CURRENT_APPLICATION,
};
};