@deephaven/redux
Advanced tools
Comparing version 0.4.1-modules.0 to 0.5.0
@@ -1,5 +0,1 @@ | ||
export function setIsLoggedIn(isLoggedIn: any): { | ||
type: string; | ||
payload: any; | ||
}; | ||
export function setUser(user: any): { | ||
@@ -28,57 +24,2 @@ type: string; | ||
export function saveSettings(settings: Object): (dispatch: any) => any; | ||
export function setDashboardColumns(id: any, columns: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardInputFilters(id: any, inputFilters: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardIsolatedLinkerPanelId(id: any, panelId: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardClosedPanels(id: any, closedPanels: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardLinks(id: any, links: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function addDashboardLinks(id: any, links: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function deleteDashboardLinks(id: any, links: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardOpenedPanelMap(id: any, openedPanelMap: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardPanelTableMap(id: any, panelTableMap: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardColumnSelectionValidator(id: any, gridColumnSelectionValidator: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setDashboardConsoleCreatorSettings(id: any, consoleCreatorSettings: any): { | ||
type: string; | ||
payload: any; | ||
id: any; | ||
}; | ||
export function setActiveTool(payload: any): { | ||
@@ -88,14 +29,2 @@ type: string; | ||
}; | ||
export function setControllerConfiguration(controllerConfiguration: any): { | ||
type: string; | ||
payload: any; | ||
}; | ||
export function setDraftManager(draftManager: any): { | ||
type: string; | ||
payload: any; | ||
}; | ||
export function setServerConfigValues(serverConfigValues: any): { | ||
type: string; | ||
payload: any; | ||
}; | ||
//# sourceMappingURL=actions.d.ts.map |
@@ -7,27 +7,33 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
import { SET_IS_LOGGED_IN, SET_USER, SET_WORKSPACE, SET_COMMAND_HISTORY_STORAGE, SET_WORKSPACE_STORAGE, SET_DASHBOARD_INPUT_FILTERS, SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID, SET_DASHBOARD_CLOSED_PANELS, SET_DASHBOARD_OPENED_PANEL_MAP, SET_DASHBOARD_PANEL_TABLE_MAP, SET_DASHBOARD_COLUMNS, SET_DASHBOARD_LINKS, ADD_DASHBOARD_LINKS, DELETE_DASHBOARD_LINKS, SET_ACTIVE_TOOL, SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR, SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS, SET_CONTROLLER_CONFIGURATION, SET_DRAFT_MANAGER, SET_SERVER_CONFIG_VALUES, SET_FILE_STORAGE } from "./actionTypes.js"; | ||
export var setIsLoggedIn = isLoggedIn => ({ | ||
type: SET_IS_LOGGED_IN, | ||
payload: isLoggedIn | ||
}); | ||
export var setUser = user => ({ | ||
type: SET_USER, | ||
payload: user | ||
}); | ||
export var setWorkspace = workspace => ({ | ||
type: SET_WORKSPACE, | ||
payload: workspace | ||
}); | ||
export var setWorkspaceStorage = workspaceStorage => ({ | ||
type: SET_WORKSPACE_STORAGE, | ||
payload: workspaceStorage | ||
}); | ||
export var setCommandHistoryStorage = commandHistoryStorage => ({ | ||
type: SET_COMMAND_HISTORY_STORAGE, | ||
payload: commandHistoryStorage | ||
}); | ||
export var setFileStorage = fileStorage => ({ | ||
type: SET_FILE_STORAGE, | ||
payload: fileStorage | ||
}); | ||
import { SET_USER, SET_WORKSPACE, SET_COMMAND_HISTORY_STORAGE, SET_WORKSPACE_STORAGE, SET_ACTIVE_TOOL, SET_FILE_STORAGE } from './actionTypes'; | ||
export var setUser = function setUser(user) { | ||
return { | ||
type: SET_USER, | ||
payload: user | ||
}; | ||
}; | ||
export var setWorkspace = function setWorkspace(workspace) { | ||
return { | ||
type: SET_WORKSPACE, | ||
payload: workspace | ||
}; | ||
}; | ||
export var setWorkspaceStorage = function setWorkspaceStorage(workspaceStorage) { | ||
return { | ||
type: SET_WORKSPACE_STORAGE, | ||
payload: workspaceStorage | ||
}; | ||
}; | ||
export var setCommandHistoryStorage = function setCommandHistoryStorage(commandHistoryStorage) { | ||
return { | ||
type: SET_COMMAND_HISTORY_STORAGE, | ||
payload: commandHistoryStorage | ||
}; | ||
}; | ||
export var setFileStorage = function setFileStorage(fileStorage) { | ||
return { | ||
type: SET_FILE_STORAGE, | ||
payload: fileStorage | ||
}; | ||
}; | ||
/** | ||
@@ -38,11 +44,12 @@ * Sets the specified workspace locally and saves it remotely | ||
export var saveWorkspace = workspace => (dispatch, getState) => { | ||
dispatch(setWorkspace(workspace)); | ||
var { | ||
storage | ||
} = getState(); | ||
var { | ||
workspaceStorage | ||
} = storage; | ||
return workspaceStorage.save(workspace); | ||
export var saveWorkspace = function saveWorkspace(workspace) { | ||
return function (dispatch, getState) { | ||
dispatch(setWorkspace(workspace)); | ||
var _getState = getState(), | ||
storage = _getState.storage; | ||
var workspaceStorage = storage.workspaceStorage; | ||
return workspaceStorage.save(workspace); | ||
}; | ||
}; | ||
@@ -54,15 +61,15 @@ /** | ||
export var updateWorkspaceData = workspaceData => (dispatch, getState) => { | ||
var { | ||
workspace | ||
} = getState(); | ||
var { | ||
data | ||
} = workspace; | ||
export var updateWorkspaceData = function updateWorkspaceData(workspaceData) { | ||
return function (dispatch, getState) { | ||
var _getState2 = getState(), | ||
workspace = _getState2.workspace; | ||
var newWorkspace = _objectSpread(_objectSpread({}, workspace), {}, { | ||
data: _objectSpread(_objectSpread({}, data), workspaceData) | ||
}); | ||
var data = workspace.data; | ||
return dispatch(saveWorkspace(newWorkspace)); | ||
var newWorkspace = _objectSpread(_objectSpread({}, workspace), {}, { | ||
data: _objectSpread(_objectSpread({}, data), workspaceData) | ||
}); | ||
return dispatch(saveWorkspace(newWorkspace)); | ||
}; | ||
}; | ||
@@ -74,76 +81,15 @@ /** | ||
export var saveSettings = settings => dispatch => dispatch(updateWorkspaceData({ | ||
settings | ||
})); | ||
export var setDashboardColumns = (id, columns) => ({ | ||
type: SET_DASHBOARD_COLUMNS, | ||
payload: columns, | ||
id | ||
}); | ||
export var setDashboardInputFilters = (id, inputFilters) => ({ | ||
type: SET_DASHBOARD_INPUT_FILTERS, | ||
payload: inputFilters, | ||
id | ||
}); | ||
export var setDashboardIsolatedLinkerPanelId = (id, panelId) => ({ | ||
type: SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID, | ||
payload: panelId, | ||
id | ||
}); | ||
export var setDashboardClosedPanels = (id, closedPanels) => ({ | ||
type: SET_DASHBOARD_CLOSED_PANELS, | ||
payload: closedPanels, | ||
id | ||
}); | ||
export var setDashboardLinks = (id, links) => ({ | ||
type: SET_DASHBOARD_LINKS, | ||
payload: links, | ||
id | ||
}); | ||
export var addDashboardLinks = (id, links) => ({ | ||
type: ADD_DASHBOARD_LINKS, | ||
payload: links, | ||
id | ||
}); | ||
export var deleteDashboardLinks = (id, links) => ({ | ||
type: DELETE_DASHBOARD_LINKS, | ||
payload: links, | ||
id | ||
}); | ||
export var setDashboardOpenedPanelMap = (id, openedPanelMap) => ({ | ||
type: SET_DASHBOARD_OPENED_PANEL_MAP, | ||
payload: openedPanelMap, | ||
id | ||
}); | ||
export var setDashboardPanelTableMap = (id, panelTableMap) => ({ | ||
type: SET_DASHBOARD_PANEL_TABLE_MAP, | ||
payload: panelTableMap, | ||
id | ||
}); | ||
export var setDashboardColumnSelectionValidator = (id, gridColumnSelectionValidator) => ({ | ||
type: SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR, | ||
payload: gridColumnSelectionValidator, | ||
id | ||
}); | ||
export var setDashboardConsoleCreatorSettings = (id, consoleCreatorSettings) => ({ | ||
type: SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS, | ||
payload: consoleCreatorSettings, | ||
id | ||
}); | ||
export var setActiveTool = payload => ({ | ||
type: SET_ACTIVE_TOOL, | ||
payload | ||
}); | ||
export var setControllerConfiguration = controllerConfiguration => ({ | ||
type: SET_CONTROLLER_CONFIGURATION, | ||
payload: controllerConfiguration | ||
}); | ||
export var setDraftManager = draftManager => ({ | ||
type: SET_DRAFT_MANAGER, | ||
payload: draftManager | ||
}); | ||
export var setServerConfigValues = serverConfigValues => ({ | ||
type: SET_SERVER_CONFIG_VALUES, | ||
payload: serverConfigValues | ||
}); | ||
export var saveSettings = function saveSettings(settings) { | ||
return function (dispatch) { | ||
return dispatch(updateWorkspaceData({ | ||
settings: settings | ||
})); | ||
}; | ||
}; | ||
export var setActiveTool = function setActiveTool(payload) { | ||
return { | ||
type: SET_ACTIVE_TOOL, | ||
payload: payload | ||
}; | ||
}; | ||
//# sourceMappingURL=actions.js.map |
@@ -5,18 +5,3 @@ export const SAVE_WORKSPACE: "SAVE_WORKSPACE"; | ||
export const SET_DASHBOARD_STORAGE: "SET_DASHBOARD_STORAGE"; | ||
export const SET_DASHBOARD_COLUMNS: "SET_DASHBOARD_COLUMNS"; | ||
export const SET_DASHBOARD_LINKS: "SET_DASHBOARD_LINKS"; | ||
export const ADD_DASHBOARD_LINKS: "ADD_DASHBOARD_LINKS"; | ||
export const DELETE_DASHBOARD_LINKS: "DELETE_DASHBOARD_LINKS"; | ||
export const SET_DASHBOARD_INPUT_FILTERS: "SET_DASHBOARD_INPUT_FILTERS"; | ||
export const SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID: "SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID"; | ||
export const SET_DASHBOARD_CLOSED_PANELS: "SET_DASHBOARD_CLOSED_PANELS"; | ||
export const SET_DASHBOARD_OPENED_PANEL_MAP: "SET_DASHBOARD_OPENED_PANEL_MAP"; | ||
export const SET_DASHBOARD_PANEL_TABLE_MAP: "SET_DASHBOARD_PANEL_TABLE_MAP"; | ||
export const SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR: "SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR"; | ||
export const SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS: "SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS"; | ||
export const SET_CONTROLLER_CONFIGURATION: "SET_CONTROLLER_CONFIGURATION"; | ||
export const SET_DRAFT_MANAGER: "SET_DRAFT_MANAGER"; | ||
export const SET_SERVER_CONFIG_VALUES: "SET_SERVER_CONFIG_VALUES"; | ||
export const SET_FILE_STORAGE: "SET_FILE_STORAGE"; | ||
export const SET_IS_LOGGED_IN: "SET_IS_LOGGED_IN"; | ||
export const SET_USER: "SET_USER"; | ||
@@ -23,0 +8,0 @@ export const SET_WORKSPACE: "SET_WORKSPACE"; |
@@ -5,18 +5,3 @@ export var SAVE_WORKSPACE = 'SAVE_WORKSPACE'; | ||
export var SET_DASHBOARD_STORAGE = 'SET_DASHBOARD_STORAGE'; | ||
export var SET_DASHBOARD_COLUMNS = 'SET_DASHBOARD_COLUMNS'; | ||
export var SET_DASHBOARD_LINKS = 'SET_DASHBOARD_LINKS'; | ||
export var ADD_DASHBOARD_LINKS = 'ADD_DASHBOARD_LINKS'; | ||
export var DELETE_DASHBOARD_LINKS = 'DELETE_DASHBOARD_LINKS'; | ||
export var SET_DASHBOARD_INPUT_FILTERS = 'SET_DASHBOARD_INPUT_FILTERS'; | ||
export var SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID = 'SET_DASHBOARD_ISOLATED_LINKER_PANEL_ID'; | ||
export var SET_DASHBOARD_CLOSED_PANELS = 'SET_DASHBOARD_CLOSED_PANELS'; | ||
export var SET_DASHBOARD_OPENED_PANEL_MAP = 'SET_DASHBOARD_OPENED_PANEL_MAP'; | ||
export var SET_DASHBOARD_PANEL_TABLE_MAP = 'SET_DASHBOARD_PANEL_TABLE_MAP'; | ||
export var SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR = 'SET_DASHBOARD_COLUMN_SELECTION_VALIDATOR'; | ||
export var SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS = 'SET_DASHBOARD_CONSOLE_CREATOR_SETTINGS'; | ||
export var SET_CONTROLLER_CONFIGURATION = 'SET_CONTROLLER_CONFIGURATION'; | ||
export var SET_DRAFT_MANAGER = 'SET_DRAFT_MANAGER'; | ||
export var SET_SERVER_CONFIG_VALUES = 'SET_SERVER_CONFIG_VALUES'; | ||
export var SET_FILE_STORAGE = 'SET_FILE_STORAGE'; | ||
export var SET_IS_LOGGED_IN = 'SET_IS_LOGGED_IN'; | ||
export var SET_USER = 'SET_USER'; | ||
@@ -23,0 +8,0 @@ export var SET_WORKSPACE = 'SET_WORKSPACE'; |
@@ -1,7 +0,7 @@ | ||
export * from "./selectors.js"; | ||
export * from "./actions.js"; | ||
export * from "./reducers/common/index.js"; | ||
export { default as reducers } from "./reducers/index.js"; | ||
export { default as reducerRegistry } from "./reducerRegistry.js"; | ||
export { default as store } from "./store.js"; | ||
export * from './selectors'; | ||
export * from './actions'; | ||
export * from './reducers/common'; | ||
export { default as reducers } from './reducers'; | ||
export { default as reducerRegistry } from './reducerRegistry'; | ||
export { default as store } from './store'; | ||
//# sourceMappingURL=index.js.map |
import Log from '@deephaven/log'; | ||
var log = Log.module('redux-crashReporter'); | ||
var crashReporter = store => next => action => { | ||
try { | ||
return next(action); | ||
} catch (err) { | ||
log.error('Error executing', action, ' with state ', store.getState(), ':', err); | ||
throw err; | ||
} | ||
var crashReporter = function crashReporter(store) { | ||
return function (next) { | ||
return function (action) { | ||
try { | ||
return next(action); | ||
} catch (err) { | ||
log.error('Error executing', action, ' with state ', store.getState(), ':', err); | ||
throw err; | ||
} | ||
}; | ||
}; | ||
}; | ||
@@ -12,0 +16,0 @@ |
import thunk from 'redux-thunk'; | ||
import logger from "./logger.js"; | ||
import crashReporter from "./crashReporter.js"; | ||
import logger from './logger'; | ||
import crashReporter from './crashReporter'; | ||
export default [logger, crashReporter, thunk]; | ||
//# sourceMappingURL=index.js.map |
import Log from '@deephaven/log'; | ||
var log = Log.module('redux-logger'); | ||
var logger = store => next => action => { | ||
log.debug('dispatching', action); | ||
var result = next(action); | ||
log.debug('next state', store.getState()); | ||
return result; | ||
var logger = function logger(store) { | ||
return function (next) { | ||
return function (action) { | ||
log.debug('dispatching', action); | ||
var result = next(action); | ||
log.debug('next state', store.getState()); | ||
return result; | ||
}; | ||
}; | ||
}; | ||
@@ -10,0 +14,0 @@ |
@@ -5,2 +5,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -15,4 +21,6 @@ | ||
*/ | ||
export class ReducerRegistry { | ||
constructor() { | ||
export var ReducerRegistry = /*#__PURE__*/function () { | ||
function ReducerRegistry() { | ||
_classCallCheck(this, ReducerRegistry); | ||
_defineProperty(this, "reducers", {}); | ||
@@ -23,18 +31,21 @@ | ||
register(name, reducer) { | ||
var _this$listener; | ||
_createClass(ReducerRegistry, [{ | ||
key: "register", | ||
value: function register(name, reducer) { | ||
var _this$listener; | ||
this.reducers = _objectSpread(_objectSpread({}, this.reducers), {}, { | ||
[name]: reducer | ||
}); | ||
(_this$listener = this.listener) === null || _this$listener === void 0 ? void 0 : _this$listener.call(this, this.reducers); | ||
} | ||
this.reducers = _objectSpread(_objectSpread({}, this.reducers), {}, _defineProperty({}, name, reducer)); | ||
(_this$listener = this.listener) === null || _this$listener === void 0 ? void 0 : _this$listener.call(this, this.reducers); | ||
} | ||
}, { | ||
key: "setListener", | ||
value: function setListener(listener) { | ||
this.listener = listener; | ||
} | ||
}]); | ||
setListener(listener) { | ||
this.listener = listener; | ||
} | ||
} | ||
return ReducerRegistry; | ||
}(); | ||
var reducerRegistry = new ReducerRegistry(); | ||
export default reducerRegistry; | ||
//# sourceMappingURL=reducerRegistry.js.map |
/** | ||
* The active tool the user currently has selected | ||
*/ | ||
import { SET_ACTIVE_TOOL } from "../actionTypes.js"; | ||
import { replaceReducer } from "./common/index.js"; | ||
import { SET_ACTIVE_TOOL } from '../actionTypes'; | ||
import { replaceReducer } from './common'; | ||
export default replaceReducer(SET_ACTIVE_TOOL, null); | ||
//# sourceMappingURL=activeTool.js.map |
@@ -1,4 +0,4 @@ | ||
export { default as mergeReducer } from "./mergeReducer.js"; | ||
export { default as replaceByIdReducer } from "./replaceByIdReducer.js"; | ||
export { default as replaceReducer } from "./replaceReducer.js"; | ||
export { default as mergeReducer } from './mergeReducer'; | ||
export { default as replaceByIdReducer } from './replaceByIdReducer'; | ||
export { default as replaceReducer } from './replaceReducer'; | ||
//# sourceMappingURL=index.js.map |
@@ -13,26 +13,28 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
*/ | ||
export default ((type, initialState) => function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
export default (function (type, initialState) { | ||
return function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
switch (action.type) { | ||
case type: | ||
{ | ||
var newState = action.payload; | ||
switch (action.type) { | ||
case type: | ||
{ | ||
var newState = action.payload; | ||
if (newState == null) { | ||
return null; | ||
} | ||
if (newState == null) { | ||
return null; | ||
} | ||
if (state != null) { | ||
return _objectSpread(_objectSpread({}, state), newState); | ||
if (state != null) { | ||
return _objectSpread(_objectSpread({}, state), newState); | ||
} | ||
return _objectSpread({}, newState); | ||
} | ||
return _objectSpread({}, newState); | ||
} | ||
default: | ||
return state; | ||
} | ||
default: | ||
return state; | ||
} | ||
}; | ||
}); | ||
//# sourceMappingURL=mergeReducer.js.map |
@@ -24,9 +24,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
{ | ||
var { | ||
id, | ||
payload | ||
} = action; | ||
var id = action.id, | ||
payload = action.payload; | ||
if (checkIfChanged && deepEqual({ | ||
payload | ||
payload: payload | ||
}, { | ||
@@ -38,5 +36,3 @@ payload: state[id] | ||
return _objectSpread(_objectSpread({}, state), {}, { | ||
[id]: payload | ||
}); | ||
return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, id, payload)); | ||
} | ||
@@ -43,0 +39,0 @@ |
@@ -7,16 +7,18 @@ /** | ||
*/ | ||
export default ((type, initialState) => function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
export default (function (type, initialState) { | ||
return function () { | ||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; | ||
var action = arguments.length > 1 ? arguments[1] : undefined; | ||
switch (action.type) { | ||
case type: | ||
{ | ||
return action.payload; | ||
} | ||
switch (action.type) { | ||
case type: | ||
{ | ||
return action.payload; | ||
} | ||
default: | ||
return state; | ||
} | ||
default: | ||
return state; | ||
} | ||
}; | ||
}); | ||
//# sourceMappingURL=replaceReducer.js.map |
export default reducers; | ||
declare namespace reducers { | ||
export { activeTool }; | ||
export { dashboardClosedPanels }; | ||
export { dashboardOpenedPanelMaps }; | ||
export { dashboardColumnSelectionValidators }; | ||
export { dashboardConsoleCreatorSettings }; | ||
export { dashboardInputFilters }; | ||
export { dashboardIsolatedLinkerPanelIds }; | ||
export { dashboardColumns }; | ||
export { dashboardLinks }; | ||
export { dashboardPanelTableMaps }; | ||
export { isLoggedIn }; | ||
export { storage }; | ||
export { user }; | ||
export { workspace }; | ||
export { controllerConfiguration }; | ||
export { draftManager }; | ||
export { serverConfigValues }; | ||
} | ||
import activeTool from "./activeTool"; | ||
import dashboardClosedPanels from "./dashboardClosedPanels"; | ||
import dashboardOpenedPanelMaps from "./dashboardOpenedPanelMaps"; | ||
import dashboardColumnSelectionValidators from "./dashboardColumnSelectionValidators"; | ||
import dashboardConsoleCreatorSettings from "./dashboardConsoleCreatorSettings"; | ||
import dashboardInputFilters from "./dashboardInputFilters"; | ||
import dashboardIsolatedLinkerPanelIds from "./dashboardIsolatedLinkerPanelIds"; | ||
import dashboardColumns from "./dashboardColumns"; | ||
import dashboardLinks from "./dashboardLinks"; | ||
import dashboardPanelTableMaps from "./dashboardPanelTableMaps"; | ||
import isLoggedIn from "./isLoggedIn"; | ||
import storage from "./storage"; | ||
import user from "./user"; | ||
import workspace from "./workspace"; | ||
import controllerConfiguration from "./controllerConfiguration"; | ||
import draftManager from "./draftManager"; | ||
import serverConfigValues from "./serverConfigValues"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,38 +0,12 @@ | ||
import activeTool from "./activeTool.js"; | ||
import dashboardClosedPanels from "./dashboardClosedPanels.js"; | ||
import dashboardOpenedPanelMaps from "./dashboardOpenedPanelMaps.js"; | ||
import dashboardInputFilters from "./dashboardInputFilters.js"; | ||
import dashboardIsolatedLinkerPanelIds from "./dashboardIsolatedLinkerPanelIds.js"; | ||
import dashboardColumns from "./dashboardColumns.js"; | ||
import dashboardColumnSelectionValidators from "./dashboardColumnSelectionValidators.js"; | ||
import dashboardConsoleCreatorSettings from "./dashboardConsoleCreatorSettings.js"; | ||
import dashboardLinks from "./dashboardLinks.js"; | ||
import dashboardPanelTableMaps from "./dashboardPanelTableMaps.js"; | ||
import isLoggedIn from "./isLoggedIn.js"; | ||
import storage from "./storage/index.js"; | ||
import user from "./user.js"; | ||
import workspace from "./workspace.js"; | ||
import controllerConfiguration from "./controllerConfiguration.js"; | ||
import draftManager from "./draftManager.js"; | ||
import serverConfigValues from "./serverConfigValues.js"; | ||
import activeTool from './activeTool'; | ||
import storage from './storage'; | ||
import user from './user'; | ||
import workspace from './workspace'; | ||
var reducers = { | ||
activeTool, | ||
dashboardClosedPanels, | ||
dashboardOpenedPanelMaps, | ||
dashboardColumnSelectionValidators, | ||
dashboardConsoleCreatorSettings, | ||
dashboardInputFilters, | ||
dashboardIsolatedLinkerPanelIds, | ||
dashboardColumns, | ||
dashboardLinks, | ||
dashboardPanelTableMaps, | ||
isLoggedIn, | ||
storage, | ||
user, | ||
workspace, | ||
controllerConfiguration, | ||
draftManager, | ||
serverConfigValues | ||
activeTool: activeTool, | ||
storage: storage, | ||
user: user, | ||
workspace: workspace | ||
}; | ||
export default reducers; | ||
//# sourceMappingURL=index.js.map |
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
import { SET_COMMAND_HISTORY_STORAGE } from "../../actionTypes.js"; | ||
import { replaceReducer } from "../common/index.js"; | ||
import { SET_COMMAND_HISTORY_STORAGE } from '../../actionTypes'; | ||
import { replaceReducer } from '../common'; | ||
export default replaceReducer(SET_COMMAND_HISTORY_STORAGE, null); | ||
//# sourceMappingURL=commandHistoryStorage.js.map |
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
import { SET_FILE_STORAGE } from "../../actionTypes.js"; | ||
import { replaceReducer } from "../common/index.js"; | ||
import { SET_FILE_STORAGE } from '../../actionTypes'; | ||
import { replaceReducer } from '../common'; | ||
export default replaceReducer(SET_FILE_STORAGE, null); | ||
//# sourceMappingURL=fileStorage.js.map |
import { combineReducers } from 'redux'; | ||
import commandHistoryStorage from "./commandHistoryStorage.js"; | ||
import fileStorage from "./fileStorage.js"; | ||
import workspaceStorage from "./workspaceStorage.js"; | ||
import commandHistoryStorage from './commandHistoryStorage'; | ||
import fileStorage from './fileStorage'; | ||
import workspaceStorage from './workspaceStorage'; | ||
export default combineReducers({ | ||
commandHistoryStorage, | ||
fileStorage, | ||
workspaceStorage | ||
commandHistoryStorage: commandHistoryStorage, | ||
fileStorage: fileStorage, | ||
workspaceStorage: workspaceStorage | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
import { SET_WORKSPACE_STORAGE } from "../../actionTypes.js"; | ||
import { replaceReducer } from "../common/index.js"; | ||
import { SET_WORKSPACE_STORAGE } from '../../actionTypes'; | ||
import { replaceReducer } from '../common'; | ||
export default replaceReducer(SET_WORKSPACE_STORAGE, null); | ||
//# sourceMappingURL=workspaceStorage.js.map |
/** | ||
* Store information about the current user. | ||
*/ | ||
import { SET_USER } from "../actionTypes.js"; | ||
import { mergeReducer } from "./common/index.js"; | ||
import { SET_USER } from '../actionTypes'; | ||
import { mergeReducer } from './common'; | ||
export default mergeReducer(SET_USER, null); | ||
//# sourceMappingURL=user.js.map |
@@ -6,5 +6,5 @@ /** | ||
*/ | ||
import { SET_WORKSPACE } from "../actionTypes.js"; | ||
import { mergeReducer } from "./common/index.js"; | ||
import { SET_WORKSPACE } from '../actionTypes'; | ||
import { mergeReducer } from './common'; | ||
export default mergeReducer(SET_WORKSPACE, null); | ||
//# sourceMappingURL=workspace.js.map |
@@ -5,5 +5,5 @@ /** | ||
*/ | ||
import { SET_WORKSPACE_STORAGE } from "../actionTypes.js"; | ||
import { replaceReducer } from "./common/index.js"; | ||
import { SET_WORKSPACE_STORAGE } from '../actionTypes'; | ||
import { replaceReducer } from './common'; | ||
export default replaceReducer(SET_WORKSPACE_STORAGE, null); | ||
//# sourceMappingURL=workspaceStorage.js.map |
export function getUser(store: any): any; | ||
export function getUserName(store: any): any; | ||
export function getUserGroups(store: any): any; | ||
export function getIsLoggedIn(store: any): any; | ||
export function getStorage(store: any): any; | ||
@@ -18,24 +17,3 @@ export function getCommandHistoryStorage(store: any): any; | ||
export function getShowSystemBadge(store: any): any; | ||
export function getDashboardColumns(store: any): any; | ||
export function getDashboardInputFilters(store: any): any; | ||
export function getDashboardIsolatedLinkerPanelIds(store: any): any; | ||
export function getDashboardLinks(store: any): any; | ||
export function getColumnsForDashboard(store: any, dashboardId: any): any; | ||
export function getInputFiltersForDashboard(store: any, dashboardId: any): any; | ||
export function getIsolatedLinkerPanelIdForDashboard(store: any, dashboardId: any): any; | ||
export function getLinksForDashboard(store: any, dashboardId: any): any; | ||
export function getDashboardClosedPanels(store: any): any; | ||
export function getDashboardOpenedPanelMaps(store: any): any; | ||
export function getDashboardPanelTableMaps(store: any): any; | ||
export function getClosedPanelsForDashboard(store: any, dashboardId: any): any; | ||
export function getOpenedPanelMapForDashboard(store: any, dashboardId: any): any; | ||
export function getTableMapForDashboard(store: any, dashboardId: any): any; | ||
export function getDashboardColumnSelectionValidators(store: any): any; | ||
export function getDashboardConsoleCreatorSettings(store: any): any; | ||
export function getColumnSelectionValidatorForDashboard(store: any, dashboardId: any): any; | ||
export function getConsoleCreatorSettingsForDashboard(store: any, dashboardId: any): any; | ||
export function getActiveTool(store: any): any; | ||
export function getControllerConfiguration(store: any): any; | ||
export function getDraftManager(store: any): any; | ||
export function getServerConfigValues(store: any): any; | ||
//# sourceMappingURL=selectors.d.ts.map |
@@ -1,46 +0,56 @@ | ||
var EMPTY_MAP = new Map(); | ||
var EMPTY_ARRAY = Object.freeze([]); // User | ||
// User | ||
export var getUser = function getUser(store) { | ||
return store.user; | ||
}; | ||
export var getUserName = function getUserName(store) { | ||
return getUser(store).name; | ||
}; | ||
export var getUserGroups = function getUserGroups(store) { | ||
return getUserGroups(store).groups; | ||
}; // Storage | ||
export var getUser = store => store.user; | ||
export var getUserName = store => getUser(store).name; | ||
export var getUserGroups = store => getUserGroups(store).groups; | ||
export var getIsLoggedIn = store => store.isLoggedIn; // Storage | ||
export var getStorage = function getStorage(store) { | ||
return store.storage; | ||
}; | ||
export var getCommandHistoryStorage = function getCommandHistoryStorage(store) { | ||
return getStorage(store).commandHistoryStorage; | ||
}; | ||
export var getFileStorage = function getFileStorage(store) { | ||
return getStorage(store).fileStorage; | ||
}; | ||
export var getWorkspaceStorage = function getWorkspaceStorage(store) { | ||
return getStorage(store).workspaceStorage; | ||
}; // Workspace | ||
export var getStorage = store => store.storage; | ||
export var getCommandHistoryStorage = store => getStorage(store).commandHistoryStorage; | ||
export var getFileStorage = store => getStorage(store).fileStorage; | ||
export var getWorkspaceStorage = store => getStorage(store).workspaceStorage; // Workspace | ||
export var getWorkspace = function getWorkspace(store) { | ||
return store.workspace; | ||
}; // Settings | ||
export var getWorkspace = store => store.workspace; // Settings | ||
export var getSettings = store => getWorkspace(store).data.settings; | ||
export var getDefaultDateTimeFormat = store => getSettings(store).defaultDateTimeFormat; | ||
export var getFormatter = store => getSettings(store).formatter; | ||
export var getTimeZone = store => getSettings(store).timeZone; | ||
export var getShowTimeZone = store => getSettings(store).showTimeZone; | ||
export var getShowTSeparator = store => getSettings(store).showTSeparator; | ||
export var getDisableMoveConfirmation = store => getSettings(store).disableMoveConfirmation || false; | ||
export var getShowSystemBadge = store => getSettings(store).showSystemBadge; | ||
export var getDashboardColumns = store => store.dashboardColumns; | ||
export var getDashboardInputFilters = store => store.dashboardInputFilters; | ||
export var getDashboardIsolatedLinkerPanelIds = store => store.dashboardIsolatedLinkerPanelIds; | ||
export var getDashboardLinks = store => store.dashboardLinks; | ||
export var getColumnsForDashboard = (store, dashboardId) => getDashboardColumns(store)[dashboardId] || EMPTY_ARRAY; | ||
export var getInputFiltersForDashboard = (store, dashboardId) => getDashboardInputFilters(store)[dashboardId] || EMPTY_ARRAY; | ||
export var getIsolatedLinkerPanelIdForDashboard = (store, dashboardId) => getDashboardIsolatedLinkerPanelIds(store)[dashboardId] || null; | ||
export var getLinksForDashboard = (store, dashboardId) => getDashboardLinks(store)[dashboardId] || EMPTY_ARRAY; | ||
export var getDashboardClosedPanels = store => store.dashboardClosedPanels; | ||
export var getDashboardOpenedPanelMaps = store => store.dashboardOpenedPanelMaps; | ||
export var getDashboardPanelTableMaps = store => store.dashboardPanelTableMaps; | ||
export var getClosedPanelsForDashboard = (store, dashboardId) => getDashboardClosedPanels(store)[dashboardId] || EMPTY_ARRAY; | ||
export var getOpenedPanelMapForDashboard = (store, dashboardId) => getDashboardOpenedPanelMaps(store)[dashboardId] || EMPTY_MAP; | ||
export var getTableMapForDashboard = (store, dashboardId) => getDashboardPanelTableMaps(store)[dashboardId] || EMPTY_MAP; | ||
export var getDashboardColumnSelectionValidators = store => store.dashboardColumnSelectionValidators; | ||
export var getDashboardConsoleCreatorSettings = store => store.dashboardConsoleCreatorSettings; | ||
export var getColumnSelectionValidatorForDashboard = (store, dashboardId) => getDashboardColumnSelectionValidators(store)[dashboardId]; | ||
export var getConsoleCreatorSettingsForDashboard = (store, dashboardId) => getDashboardConsoleCreatorSettings(store)[dashboardId]; | ||
export var getActiveTool = store => store.activeTool; | ||
export var getControllerConfiguration = store => store.controllerConfiguration; | ||
export var getDraftManager = store => store.draftManager; | ||
export var getServerConfigValues = store => store.serverConfigValues; | ||
export var getSettings = function getSettings(store) { | ||
return getWorkspace(store).data.settings; | ||
}; | ||
export var getDefaultDateTimeFormat = function getDefaultDateTimeFormat(store) { | ||
return getSettings(store).defaultDateTimeFormat; | ||
}; | ||
export var getFormatter = function getFormatter(store) { | ||
return getSettings(store).formatter; | ||
}; | ||
export var getTimeZone = function getTimeZone(store) { | ||
return getSettings(store).timeZone; | ||
}; | ||
export var getShowTimeZone = function getShowTimeZone(store) { | ||
return getSettings(store).showTimeZone; | ||
}; | ||
export var getShowTSeparator = function getShowTSeparator(store) { | ||
return getSettings(store).showTSeparator; | ||
}; | ||
export var getDisableMoveConfirmation = function getDisableMoveConfirmation(store) { | ||
return getSettings(store).disableMoveConfirmation || false; | ||
}; | ||
export var getShowSystemBadge = function getShowSystemBadge(store) { | ||
return getSettings(store).showSystemBadge; | ||
}; | ||
export var getActiveTool = function getActiveTool(store) { | ||
return store.activeTool; | ||
}; | ||
//# sourceMappingURL=selectors.js.map |
@@ -0,8 +1,31 @@ | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
import { applyMiddleware, createStore, compose, combineReducers } from 'redux'; | ||
import rootMiddleware from "./middleware/index.js"; | ||
import reducers from "./reducers/index.js"; | ||
import reducerRegistry from "./reducerRegistry.js"; // TODO #70: Separate all reducers into their respective modules, register from there | ||
import rootMiddleware from './middleware'; | ||
import reducers from './reducers'; | ||
import reducerRegistry from './reducerRegistry'; // TODO #70: Separate all reducers into their respective modules, register from there | ||
Object.entries(reducers).map((_ref) => { | ||
var [name, reducer] = _ref; | ||
Object.entries(reducers).map(function (_ref) { | ||
var _ref2 = _slicedToArray(_ref, 2), | ||
name = _ref2[0], | ||
reducer = _ref2[1]; | ||
return reducerRegistry.register(name, reducer); | ||
@@ -13,4 +36,4 @@ }); | ||
var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | ||
var store = createStore(combineReducers(reducerRegistry.reducers), composeEnhancers(applyMiddleware(...rootMiddleware))); | ||
reducerRegistry.setListener(newReducers => { | ||
var store = createStore(combineReducers(reducerRegistry.reducers), composeEnhancers(applyMiddleware.apply(void 0, _toConsumableArray(rootMiddleware)))); | ||
reducerRegistry.setListener(function (newReducers) { | ||
store.replaceReducer(combineReducers(newReducers)); | ||
@@ -17,0 +40,0 @@ }); |
{ | ||
"name": "@deephaven/redux", | ||
"version": "0.4.1-modules.0+babe987", | ||
"version": "0.5.0", | ||
"description": "Deephaven Redux", | ||
"author": "Deephaven Data Labs LLC", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"repository": { | ||
@@ -42,4 +41,4 @@ "type": "git", | ||
"@babel/core": "7.12.3", | ||
"@deephaven/log": "^0.4.1-modules.0+babe987", | ||
"@deephaven/tsconfig": "^0.4.1-modules.0+babe987", | ||
"@deephaven/log": "^0.5.0", | ||
"@deephaven/tsconfig": "^0.5.0", | ||
"babel-loader": "8.1.0", | ||
@@ -53,3 +52,3 @@ "cross-env": "^7.0.2", | ||
"peerDependencies": { | ||
"@deephaven/log": "^0.3.1", | ||
"@deephaven/log": "^0.1.0", | ||
"redux": "^4.0.5" | ||
@@ -63,3 +62,3 @@ }, | ||
}, | ||
"gitHead": "babe9873983923869be98e4943bfb173a7097641" | ||
"gitHead": "520f49c8774ee88411308fd19661086f5a3962b3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
107732
92
531
No