PromucFlow_constructor/app/client/src/actions/explorerActions.ts
Hetu Nandu f8784fcf6b
feat: ADS Entity List Tree (#38493)
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
2025-01-13 08:24:30 +00:00

60 lines
1.2 KiB
TypeScript

import { ReduxActionTypes } from "ee/constants/ReduxActionConstants";
export const initExplorerEntityNameEdit = (entityId: string) => {
return {
type: ReduxActionTypes.INIT_EXPLORER_ENTITY_NAME_EDIT,
payload: {
id: entityId,
},
};
};
export const endExplorerEntityNameEdit = () => {
return {
type: ReduxActionTypes.END_EXPLORER_ENTITY_NAME_EDIT,
};
};
/**
* action that make explorer pin/unpin
*
* @param shouldPin
* @returns
*/
export const setExplorerPinnedAction = (shouldPin: boolean) => {
return {
type: ReduxActionTypes.SET_EXPLORER_PINNED,
payload: {
shouldPin,
},
};
};
/**
* action that make explorer active/inactive
* NOTE: active state is used to slide the sidebar in unpinned state on hover.
*
* @param shouldPin
* @returns
*/
export const setExplorerActiveAction = (active: boolean) => {
return {
type: ReduxActionTypes.SET_EXPLORER_ACTIVE,
payload: active,
};
};
/**
* action that updates explorer width
*
* @param shouldPin
* @returns
*/
export const updateExplorerWidthAction = (width: number | undefined) => {
return {
type: ReduxActionTypes.UPDATE_EXPLORER_WIDTH,
payload: {
width,
},
};
};