2020-05-05 07:50:30 +00:00
|
|
|
import { ReduxActionTypes, ReduxAction } from "constants/ReduxActionConstants";
|
2021-01-12 04:17:28 +00:00
|
|
|
import { Action } from "entities/Action";
|
2020-05-05 07:50:30 +00:00
|
|
|
|
2021-01-12 04:17:28 +00:00
|
|
|
export const createQueryRequest = (payload: Partial<Action>) => {
|
2020-05-05 07:50:30 +00:00
|
|
|
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 },
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2020-08-12 06:27:35 +00:00
|
|
|
export const changeQuery = (
|
|
|
|
|
id: string,
|
|
|
|
|
newQuery?: boolean,
|
2021-12-07 09:45:18 +00:00
|
|
|
action?: Action,
|
|
|
|
|
): ReduxAction<{ id: string; newQuery?: boolean; action?: any }> => {
|
2020-05-05 07:50:30 +00:00
|
|
|
return {
|
|
|
|
|
type: ReduxActionTypes.QUERY_PANE_CHANGE,
|
2021-12-07 09:45:18 +00:00
|
|
|
payload: { id, newQuery, action },
|
2020-05-05 07:50:30 +00:00
|
|
|
};
|
|
|
|
|
};
|