PromucFlow_constructor/app/client/src/actions/queryPaneActions.ts

31 lines
758 B
TypeScript
Raw Normal View History

import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
import { Action } from "entities/Action";
export const createQueryRequest = (payload: Partial<Action>) => {
return {
type: ReduxActionTypes.CREATE_QUERY_INIT,
payload,
};
};
export const initQueryPane = (
pluginType: string,
urlId?: string,
): ReduxAction<{ pluginType: string; id?: string }> => {
return {
type: ReduxActionTypes.INIT_QUERY_PANE,
payload: { id: urlId, pluginType },
};
};
export const changeQuery = (
id: string,
newQuery?: boolean,
2021-12-07 09:45:18 +00:00
action?: Action,
): ReduxAction<{ id: string; newQuery?: boolean; action?: any }> => {
return {
type: ReduxActionTypes.QUERY_PANE_CHANGE,
2021-12-07 09:45:18 +00:00
payload: { id, newQuery, action },
};
};