* fix(run-hot-key): added update init action with debounced on change function * fix(run-hot-key): Adding new action for updating store for isSaving query true * fix(run-hot-key): updating the action name to preparing_update_action * fix(run-hot-key): added descriptive comments * fix(run-hot-key): updated the action name and moved condition to action file * fix(run-hot-key): updated the action to entity started at global app * fix(run-hot-key): added entity saving status to show loader * fix(run-hot-key): fixed cypress test to type in the query rather using set method of code editor
43 lines
871 B
TypeScript
43 lines
871 B
TypeScript
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
|
|
|
/**
|
|
* action that sets preview mode
|
|
*
|
|
* @param payload
|
|
* @returns
|
|
*/
|
|
|
|
export const setPreviewModeAction = (payload: boolean) => ({
|
|
type: ReduxActionTypes.SET_PREVIEW_MODE,
|
|
payload,
|
|
});
|
|
|
|
/**
|
|
* action that update canvas layout
|
|
*
|
|
* @param width
|
|
* @param height
|
|
* @returns
|
|
*/
|
|
export const updateCanvasLayoutAction = (
|
|
width: number,
|
|
height: number | undefined,
|
|
) => {
|
|
return {
|
|
type: ReduxActionTypes.UPDATE_CANVAS_LAYOUT,
|
|
payload: {
|
|
height,
|
|
width,
|
|
},
|
|
};
|
|
};
|
|
|
|
/**
|
|
* This action when executed updates the status of saving entity to true
|
|
* This function was created to add a sync to the entity update and shortcut command being fired to execute any command.
|
|
*/
|
|
|
|
export const startingEntityUpdation = () => ({
|
|
type: ReduxActionTypes.ENTITY_UPDATE_STARTED,
|
|
});
|