@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
51 lines (50 loc) • 2.72 kB
JavaScript
/**
* @ReduxAction Plugins have been instantiated
*/
export const PLUGINS_SET_PLUGIN_STATE = 'PLUGINS_SET_PLUGIN_STATE';
export const IPUSHPULL_SET_THROTTLE_TIME = 'IPUSHPULL_SET_THROTTLE_TIME';
export const IPUSHPULL_SEND_SNAPSHOT = 'IPUSHPULL_SEND_SNAPSHOT';
export const IPUSHPULL_REPORT_SELECT = 'IPUSHPULL_REPORT_SELECT';
export const IPUSHPULL_START_LIVE_DATA = 'IPUSHPULL_START_LIVE_DATA';
export const IPUSHPULL_STOP_LIVE_DATA = 'IPUSHPULL_STOP_LIVE_DATA';
export const IPUSHPULL_ADD_PAGE = 'IPUSHPULL_ADD_PAGE';
export const IPUSHPULL_LOGIN = 'IPUSHPULL_LOGIN';
export const IPUSHPULL_LOGOUT = 'IPUSHPULL_LOGOUT';
export const IPUSHPULL_SET_LOGIN_ERROR_MESSAGE = 'IPUSHPULL_SET_LOGIN_ERROR_MESSAGE';
export const IPUSHPULL_SET_LOGIN_DETAILS = 'IPUSHPULL_SET_LOGIN_DETAILS';
export const IPUSHPULL_SET_AVAILABLE_ON = 'IPUSHPULL_SET_AVAILABLE_ON';
export const IPUSHPULL_SET_AVAILABLE_OFF = 'SET_IPUSHPULL_AVAILABLE_OFF';
export const IPUSHPULL_SET_RUNNING_ON = 'IPUSHPULL_SET_RUNNING_ON';
export const IPUSHPULL_SET_RUNNING_OFF = 'IPUSHPULL_SET_RUNNING_OFF';
export const IPUSHPULL_LIVE_REPORT_SET = 'IPUSHPULL_LIVE_REPORT_SET';
export const IPUSHPULL_LIVE_REPORT_CLEAR = 'IPUSHPULL_LIVE_REPORT_CLEAR';
export const IPUSHPULL_DOMAIN_PAGES_SET = 'IPUSHPULL_DOMAIN_PAGES_SET';
export const IPUSHPULL_DOMAIN_PAGES_CLEAR = 'IPUSHPULL_DOMAIN_PAGES_CLEAR';
export const IPUSHPULL_SET_CURRENT_REPORTNAME = 'IPUSHPULL_SET_CURRENT_REPORTNAME';
export const IPUSHPULL_SET_CURRENT_FOLDER = 'IPUSHPULL_SET_CURRENT_FOLDER';
export const IPUSHPULL_SET_CURRENT_PAGE = 'IPUSHPULL_SET_CURRENT_PAGE';
export const IPUSHPULL_SET_AVAILABLE_PAGES = 'IPUSHPULL_SET_AVAILABLE_PAGES';
export const OPENFIN_START_LIVE_DATA = 'OPENFIN_START_LIVE_DATA';
export const OPENFIN_STOP_LIVE_DATA = 'OPENFIN_STOP_LIVE_DATA';
export const OPENFIN_LIVE_REPORT_SET = 'OPENFIN_LIVE_REPORT_SET';
export const OPENFIN_LIVE_REPORT_CLEAR = 'OPENFIN_LIVE_REPORT_CLEAR';
export const OPENFIN_SET_AVAILABLE_ON = 'OPENFIN_SET_AVAILABLE_ON';
export const OPENFIN_SET_AVAILABLE_OFF = 'OPENFIN_SET_AVAILABLE_OFF';
export const OPENFIN_SET_RUNNING_ON = 'OPENFIN_SET_RUNNING_ON';
export const OPENFIN_SET_RUNNING_OFF = 'OPENFIN_SET_RUNNING_OFF';
export const OPENFIN_SET_CURRENT_REPORTNAME = 'OPENFIN_SET_CURRENT_REPORTNAME';
export const PluginsSetPluginState = (pluginId, pluginState) => ({
type: PLUGINS_SET_PLUGIN_STATE,
pluginId,
pluginState,
});
const initialState = {};
export const PluginsReducer = (state = initialState, action) => {
switch (action.type) {
case PLUGINS_SET_PLUGIN_STATE: {
return { ...state, [action.pluginId]: action.pluginState };
}
default:
return state;
}
};