@deephaven/redux 0.6.1-fixed-deps.2 → 0.6.3-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionTypes.d.ts +8 -8
- package/dist/actionTypes.d.ts.map +1 -1
- package/dist/actionTypes.js.map +1 -1
- package/dist/actions.d.ts +30 -27
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +3 -3
- package/dist/actions.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/middleware/crashReporter.d.ts +2 -1
- package/dist/middleware/crashReporter.d.ts.map +1 -1
- package/dist/middleware/crashReporter.js.map +1 -1
- package/dist/middleware/index.d.ts +1 -3
- package/dist/middleware/index.d.ts.map +1 -1
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware/logger.d.ts +2 -1
- package/dist/middleware/logger.d.ts.map +1 -1
- package/dist/middleware/logger.js.map +1 -1
- package/dist/reducerRegistry.js +1 -1
- package/dist/reducers/activeTool.d.ts +1 -1
- package/dist/reducers/activeTool.d.ts.map +1 -1
- package/dist/reducers/activeTool.js.map +1 -1
- package/dist/reducers/common/index.d.ts +3 -3
- package/dist/reducers/common/index.d.ts.map +1 -1
- package/dist/reducers/common/index.js.map +1 -1
- package/dist/reducers/common/mergeReducer.d.ts +8 -2
- package/dist/reducers/common/mergeReducer.d.ts.map +1 -1
- package/dist/reducers/common/mergeReducer.js +24 -22
- package/dist/reducers/common/mergeReducer.js.map +1 -1
- package/dist/reducers/common/replaceByIdReducer.d.ts +7 -2
- package/dist/reducers/common/replaceByIdReducer.d.ts.map +1 -1
- package/dist/reducers/common/replaceByIdReducer.js +5 -5
- package/dist/reducers/common/replaceByIdReducer.js.map +1 -1
- package/dist/reducers/common/replaceReducer.d.ts +8 -2
- package/dist/reducers/common/replaceReducer.d.ts.map +1 -1
- package/dist/reducers/common/replaceReducer.js +16 -14
- package/dist/reducers/common/replaceReducer.js.map +1 -1
- package/dist/reducers/index.d.ts +10 -10
- package/dist/reducers/index.d.ts.map +1 -1
- package/dist/reducers/index.js.map +1 -1
- package/dist/reducers/storage/commandHistoryStorage.d.ts +1 -1
- package/dist/reducers/storage/commandHistoryStorage.d.ts.map +1 -1
- package/dist/reducers/storage/commandHistoryStorage.js.map +1 -1
- package/dist/reducers/storage/fileStorage.d.ts +1 -1
- package/dist/reducers/storage/fileStorage.d.ts.map +1 -1
- package/dist/reducers/storage/fileStorage.js.map +1 -1
- package/dist/reducers/storage/index.d.ts +4 -4
- package/dist/reducers/storage/index.d.ts.map +1 -1
- package/dist/reducers/storage/index.js.map +1 -1
- package/dist/reducers/storage/workspaceStorage.d.ts +1 -1
- package/dist/reducers/storage/workspaceStorage.d.ts.map +1 -1
- package/dist/reducers/storage/workspaceStorage.js.map +1 -1
- package/dist/reducers/user.d.ts +1 -1
- package/dist/reducers/user.d.ts.map +1 -1
- package/dist/reducers/user.js.map +1 -1
- package/dist/reducers/workspace.d.ts +1 -1
- package/dist/reducers/workspace.d.ts.map +1 -1
- package/dist/reducers/workspace.js.map +1 -1
- package/dist/reducers/workspaceStorage.d.ts +1 -1
- package/dist/reducers/workspaceStorage.d.ts.map +1 -1
- package/dist/reducers/workspaceStorage.js.map +1 -1
- package/dist/selectors.d.ts +21 -17
- package/dist/selectors.d.ts.map +1 -1
- package/dist/selectors.js +2 -1
- package/dist/selectors.js.map +1 -1
- package/dist/store.d.ts +60 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +4 -6
- package/dist/store.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -5
package/dist/actionTypes.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const SAVE_WORKSPACE
|
|
2
|
-
export const SET_ACTIVE_TOOL
|
|
3
|
-
export const SET_COMMAND_HISTORY_STORAGE
|
|
4
|
-
export const SET_DASHBOARD_STORAGE
|
|
5
|
-
export const SET_FILE_STORAGE
|
|
6
|
-
export const SET_USER
|
|
7
|
-
export const SET_WORKSPACE
|
|
8
|
-
export const SET_WORKSPACE_STORAGE
|
|
1
|
+
export declare const SAVE_WORKSPACE = "SAVE_WORKSPACE";
|
|
2
|
+
export declare const SET_ACTIVE_TOOL = "SET_ACTIVE_TOOL";
|
|
3
|
+
export declare const SET_COMMAND_HISTORY_STORAGE = "SET_COMMAND_HISTORY_STORAGE";
|
|
4
|
+
export declare const SET_DASHBOARD_STORAGE = "SET_DASHBOARD_STORAGE";
|
|
5
|
+
export declare const SET_FILE_STORAGE = "SET_FILE_STORAGE";
|
|
6
|
+
export declare const SET_USER = "SET_USER";
|
|
7
|
+
export declare const SET_WORKSPACE = "SET_WORKSPACE";
|
|
8
|
+
export declare const SET_WORKSPACE_STORAGE = "SET_WORKSPACE_STORAGE";
|
|
9
9
|
//# sourceMappingURL=actionTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionTypes.d.ts","sourceRoot":"","sources":["../src/actionTypes.
|
|
1
|
+
{"version":3,"file":"actionTypes.d.ts","sourceRoot":"","sources":["../src/actionTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAEzE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC"}
|
package/dist/actionTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/actionTypes.
|
|
1
|
+
{"version":3,"sources":["../src/actionTypes.ts"],"names":["SAVE_WORKSPACE","SET_ACTIVE_TOOL","SET_COMMAND_HISTORY_STORAGE","SET_DASHBOARD_STORAGE","SET_FILE_STORAGE","SET_USER","SET_WORKSPACE","SET_WORKSPACE_STORAGE"],"mappings":"AAAA,OAAO,IAAMA,cAAc,GAAG,gBAAvB;AAEP,OAAO,IAAMC,eAAe,GAAG,iBAAxB;AAEP,OAAO,IAAMC,2BAA2B,GAAG,6BAApC;AAEP,OAAO,IAAMC,qBAAqB,GAAG,uBAA9B;AAEP,OAAO,IAAMC,gBAAgB,GAAG,kBAAzB;AAEP,OAAO,IAAMC,QAAQ,GAAG,UAAjB;AAEP,OAAO,IAAMC,aAAa,GAAG,eAAtB;AAEP,OAAO,IAAMC,qBAAqB,GAAG,uBAA9B","sourcesContent":["export const SAVE_WORKSPACE = 'SAVE_WORKSPACE';\n\nexport const SET_ACTIVE_TOOL = 'SET_ACTIVE_TOOL';\n\nexport const SET_COMMAND_HISTORY_STORAGE = 'SET_COMMAND_HISTORY_STORAGE';\n\nexport const SET_DASHBOARD_STORAGE = 'SET_DASHBOARD_STORAGE';\n\nexport const SET_FILE_STORAGE = 'SET_FILE_STORAGE';\n\nexport const SET_USER = 'SET_USER';\n\nexport const SET_WORKSPACE = 'SET_WORKSPACE';\n\nexport const SET_WORKSPACE_STORAGE = 'SET_WORKSPACE_STORAGE';\n"],"file":"actionTypes.js"}
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
payload:
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
1
|
+
import type { Action } from 'redux';
|
|
2
|
+
import type { ThunkAction } from 'redux-thunk';
|
|
3
|
+
import type { CommandHistoryStorage } from '@deephaven/console';
|
|
4
|
+
import type { FileStorage } from '@deephaven/file-explorer';
|
|
5
|
+
import type { RootState, User, Workspace, WorkspaceData, WorkspaceSettings, WorkspaceStorage } from './store';
|
|
6
|
+
export interface PayloadAction<P = unknown> extends Action<string> {
|
|
7
|
+
payload: P;
|
|
8
|
+
}
|
|
9
|
+
export declare type PayloadActionCreator<P> = (payload: P) => PayloadAction<P>;
|
|
10
|
+
export declare const setUser: PayloadActionCreator<User>;
|
|
11
|
+
export declare const setWorkspace: PayloadActionCreator<Workspace>;
|
|
12
|
+
export declare const setWorkspaceStorage: PayloadActionCreator<WorkspaceStorage>;
|
|
13
|
+
export declare const setCommandHistoryStorage: PayloadActionCreator<CommandHistoryStorage>;
|
|
14
|
+
export declare const setFileStorage: PayloadActionCreator<FileStorage>;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the specified workspace locally and saves it remotely
|
|
17
|
+
* @param workspace The workspace to save
|
|
18
|
+
*/
|
|
19
|
+
export declare const saveWorkspace: (workspace: Workspace) => ThunkAction<Promise<Workspace>, RootState, never, PayloadAction<unknown>>;
|
|
20
|
+
/**
|
|
21
|
+
* Update part of the workspace data and save it
|
|
22
|
+
* @param workspaceData The properties to update in workspace data
|
|
23
|
+
*/
|
|
24
|
+
export declare const updateWorkspaceData: (workspaceData: Partial<WorkspaceData>) => ThunkAction<Promise<Workspace>, RootState, never, PayloadAction<unknown>>;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the specified settings locally and saves them remotely
|
|
27
|
+
* @param {Object} settings The settings to save
|
|
28
|
+
*/
|
|
29
|
+
export declare const saveSettings: (settings: WorkspaceSettings) => ThunkAction<Promise<Workspace>, RootState, never, PayloadAction<unknown>>;
|
|
30
|
+
export declare const setActiveTool: PayloadActionCreator<string>;
|
|
28
31
|
//# sourceMappingURL=actions.d.ts.map
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAS5D,OAAO,KAAK,EACV,SAAS,EACT,IAAI,EACJ,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,MAAM,CAAC,MAAM,CAAC;IAChE,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,oBAAY,oBAAoB,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;AAEvE,eAAO,MAAM,OAAO,EAAE,oBAAoB,CAAC,IAAI,CAG7C,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,oBAAoB,CAAC,SAAS,CAGvD,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,oBAAoB,CAAC,gBAAgB,CAGrE,CAAC;AAEH,eAAO,MAAM,wBAAwB,EAAE,oBAAoB,CAAC,qBAAqB,CAG/E,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAG3D,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,cACb,SAAS,KACnB,YACD,QAAQ,SAAS,CAAC,EAClB,SAAS,EACT,KAAK,EACL,cAAc,OAAO,CAAC,CAOvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,kBACf,QAAQ,aAAa,CAAC,KACpC,YACD,QAAQ,SAAS,CAAC,EAClB,SAAS,EACT,KAAK,EACL,cAAc,OAAO,CAAC,CAYvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,aACb,iBAAiB,KAC1B,YACD,QAAQ,SAAS,CAAC,EAClB,SAAS,EACT,KAAK,EACL,cAAc,OAAO,CAAC,CACoC,CAAC;AAE7D,eAAO,MAAM,aAAa,EAAE,oBAAoB,CAAC,MAAM,CAGrD,CAAC"}
|
package/dist/actions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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; }
|
|
1
|
+
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; }
|
|
2
2
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
4
|
|
|
@@ -27,7 +27,7 @@ export var setFileStorage = fileStorage => ({
|
|
|
27
27
|
});
|
|
28
28
|
/**
|
|
29
29
|
* Sets the specified workspace locally and saves it remotely
|
|
30
|
-
* @param
|
|
30
|
+
* @param workspace The workspace to save
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
export var saveWorkspace = workspace => (dispatch, getState) => {
|
|
@@ -42,7 +42,7 @@ export var saveWorkspace = workspace => (dispatch, getState) => {
|
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* Update part of the workspace data and save it
|
|
45
|
-
* @param
|
|
45
|
+
* @param workspaceData The properties to update in workspace data
|
|
46
46
|
*/
|
|
47
47
|
|
|
48
48
|
export var updateWorkspaceData = workspaceData => (dispatch, getState) => {
|
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/actions.
|
|
1
|
+
{"version":3,"sources":["../src/actions.ts"],"names":["SET_USER","SET_WORKSPACE","SET_COMMAND_HISTORY_STORAGE","SET_WORKSPACE_STORAGE","SET_ACTIVE_TOOL","SET_FILE_STORAGE","setUser","user","type","payload","setWorkspace","workspace","setWorkspaceStorage","workspaceStorage","setCommandHistoryStorage","commandHistoryStorage","setFileStorage","fileStorage","saveWorkspace","dispatch","getState","storage","save","updateWorkspaceData","workspaceData","data","newWorkspace","saveSettings","settings","setActiveTool"],"mappings":";;;;;;SAKEA,Q,EACAC,a,EACAC,2B,EACAC,qB,EACAC,e,EACAC,gB;AAiBF,OAAO,IAAMC,OAAmC,GAAGC,IAAI,KAAK;AAC1DC,EAAAA,IAAI,EAAER,QADoD;AAE1DS,EAAAA,OAAO,EAAEF;AAFiD,CAAL,CAAhD;AAKP,OAAO,IAAMG,YAA6C,GAAGC,SAAS,KAAK;AACzEH,EAAAA,IAAI,EAAEP,aADmE;AAEzEQ,EAAAA,OAAO,EAAEE;AAFgE,CAAL,CAA/D;AAKP,OAAO,IAAMC,mBAA2D,GAAGC,gBAAgB,KAAK;AAC9FL,EAAAA,IAAI,EAAEL,qBADwF;AAE9FM,EAAAA,OAAO,EAAEI;AAFqF,CAAL,CAApF;AAKP,OAAO,IAAMC,wBAAqE,GAAGC,qBAAqB,KAAK;AAC7GP,EAAAA,IAAI,EAAEN,2BADuG;AAE7GO,EAAAA,OAAO,EAAEM;AAFoG,CAAL,CAAnG;AAKP,OAAO,IAAMC,cAAiD,GAAGC,WAAW,KAAK;AAC/ET,EAAAA,IAAI,EAAEH,gBADyE;AAE/EI,EAAAA,OAAO,EAAEQ;AAFsE,CAAL,CAArE;AAKP;AACA;AACA;AACA;;AACA,OAAO,IAAMC,aAAa,GACxBP,SAD2B,IAOxB,CAACQ,QAAD,EAAWC,QAAX,KAAwB;AAC3BD,EAAAA,QAAQ,CAACT,YAAY,CAACC,SAAD,CAAb,CAAR;AAEA,MAAM;AAAEU,IAAAA;AAAF,MAAcD,QAAQ,EAA5B;AACA,MAAM;AAAEP,IAAAA;AAAF,MAAuBQ,OAA7B;AACA,SAAOR,gBAAgB,CAACS,IAAjB,CAAsBX,SAAtB,CAAP;AACD,CAbM;AAeP;AACA;AACA;AACA;;AACA,OAAO,IAAMY,mBAAmB,GAC9BC,aADiC,IAO9B,CAACL,QAAD,EAAWC,QAAX,KAAwB;AAC3B,MAAM;AAAET,IAAAA;AAAF,MAAgBS,QAAQ,EAA9B;AACA,MAAM;AAAEK,IAAAA;AAAF,MAAWd,SAAjB;;AACA,MAAMe,YAAY,mCACbf,SADa;AAEhBc,IAAAA,IAAI,kCACCA,IADD,GAECD,aAFD;AAFY,IAAlB;;AAOA,SAAOL,QAAQ,CAACD,aAAa,CAACQ,YAAD,CAAd,CAAf;AACD,CAlBM;AAoBP;AACA;AACA;AACA;;AACA,OAAO,IAAMC,YAAY,GACvBC,QAD0B,IAOvBT,QAAQ,IAAIA,QAAQ,CAACI,mBAAmB,CAAC;AAAEK,EAAAA;AAAF,CAAD,CAApB,CAPlB;AASP,OAAO,IAAMC,aAA2C,GAAGpB,OAAO,KAAK;AACrED,EAAAA,IAAI,EAAEJ,eAD+D;AAErEK,EAAAA;AAFqE,CAAL,CAA3D","sourcesContent":["import type { Action } from 'redux';\nimport type { ThunkAction } from 'redux-thunk';\nimport type { CommandHistoryStorage } from '@deephaven/console';\nimport type { FileStorage } from '@deephaven/file-explorer';\nimport {\n SET_USER,\n SET_WORKSPACE,\n SET_COMMAND_HISTORY_STORAGE,\n SET_WORKSPACE_STORAGE,\n SET_ACTIVE_TOOL,\n SET_FILE_STORAGE,\n} from './actionTypes';\nimport type {\n RootState,\n User,\n Workspace,\n WorkspaceData,\n WorkspaceSettings,\n WorkspaceStorage,\n} from './store';\n\nexport interface PayloadAction<P = unknown> extends Action<string> {\n payload: P;\n}\n\nexport type PayloadActionCreator<P> = (payload: P) => PayloadAction<P>;\n\nexport const setUser: PayloadActionCreator<User> = user => ({\n type: SET_USER,\n payload: user,\n});\n\nexport const setWorkspace: PayloadActionCreator<Workspace> = workspace => ({\n type: SET_WORKSPACE,\n payload: workspace,\n});\n\nexport const setWorkspaceStorage: PayloadActionCreator<WorkspaceStorage> = workspaceStorage => ({\n type: SET_WORKSPACE_STORAGE,\n payload: workspaceStorage,\n});\n\nexport const setCommandHistoryStorage: PayloadActionCreator<CommandHistoryStorage> = commandHistoryStorage => ({\n type: SET_COMMAND_HISTORY_STORAGE,\n payload: commandHistoryStorage,\n});\n\nexport const setFileStorage: PayloadActionCreator<FileStorage> = fileStorage => ({\n type: SET_FILE_STORAGE,\n payload: fileStorage,\n});\n\n/**\n * Sets the specified workspace locally and saves it remotely\n * @param workspace The workspace to save\n */\nexport const saveWorkspace = (\n workspace: Workspace\n): ThunkAction<\n Promise<Workspace>,\n RootState,\n never,\n PayloadAction<unknown>\n> => (dispatch, getState) => {\n dispatch(setWorkspace(workspace));\n\n const { storage } = getState();\n const { workspaceStorage } = storage;\n return workspaceStorage.save(workspace);\n};\n\n/**\n * Update part of the workspace data and save it\n * @param workspaceData The properties to update in workspace data\n */\nexport const updateWorkspaceData = (\n workspaceData: Partial<WorkspaceData>\n): ThunkAction<\n Promise<Workspace>,\n RootState,\n never,\n PayloadAction<unknown>\n> => (dispatch, getState) => {\n const { workspace } = getState();\n const { data } = workspace;\n const newWorkspace = {\n ...workspace,\n data: {\n ...data,\n ...workspaceData,\n },\n };\n return dispatch(saveWorkspace(newWorkspace));\n};\n\n/**\n * Sets the specified settings locally and saves them remotely\n * @param {Object} settings The settings to save\n */\nexport const saveSettings = (\n settings: WorkspaceSettings\n): ThunkAction<\n Promise<Workspace>,\n RootState,\n never,\n PayloadAction<unknown>\n> => dispatch => dispatch(updateWorkspaceData({ settings }));\n\nexport const setActiveTool: PayloadActionCreator<string> = payload => ({\n type: SET_ACTIVE_TOOL,\n payload,\n});\n"],"file":"actions.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export { default as reducers } from
|
|
5
|
-
export { default as reducerRegistry } from
|
|
6
|
-
export
|
|
1
|
+
export * from './selectors';
|
|
2
|
+
export * from './actions';
|
|
3
|
+
export * from './reducers/common';
|
|
4
|
+
export { default as reducers } from './reducers';
|
|
5
|
+
export { default as reducerRegistry } from './reducerRegistry';
|
|
6
|
+
export * from './store';
|
|
7
|
+
export { default as store } from './store';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,6 @@ export * from "./actions.js";
|
|
|
3
3
|
export * from "./reducers/common/index.js";
|
|
4
4
|
export { default as reducers } from "./reducers/index.js";
|
|
5
5
|
export { default as reducerRegistry } from "./reducerRegistry.js";
|
|
6
|
+
export * from "./store.js";
|
|
6
7
|
export { default as store } from "./store.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["default","reducers","reducerRegistry","store"],"mappings":";;;SAGSA,OAAO,IAAIC,Q;SACXD,OAAO,IAAIE,e;;SAEXF,OAAO,IAAIG,K","sourcesContent":["export * from './selectors';\nexport * from './actions';\nexport * from './reducers/common';\nexport { default as reducers } from './reducers';\nexport { default as reducerRegistry } from './reducerRegistry';\nexport * from './store';\nexport { default as store } from './store';\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crashReporter.d.ts","sourceRoot":"","sources":["../../src/middleware/crashReporter.
|
|
1
|
+
{"version":3,"file":"crashReporter.d.ts","sourceRoot":"","sources":["../../src/middleware/crashReporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,aAAa,EAAE,UAcpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/middleware/crashReporter.
|
|
1
|
+
{"version":3,"sources":["../../src/middleware/crashReporter.ts"],"names":["Log","log","module","crashReporter","store","next","action","err","error","getState"],"mappings":"AACA,OAAOA,GAAP,MAAgB,gBAAhB;AAEA,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAJ,CAAW,qBAAX,CAAZ;;AAEA,IAAMC,aAAyB,GAAGC,KAAK,IAAIC,IAAI,IAAIC,MAAM,IAAI;AAC3D,MAAI;AACF,WAAOD,IAAI,CAACC,MAAD,CAAX;AACD,GAFD,CAEE,OAAOC,GAAP,EAAY;AACZN,IAAAA,GAAG,CAACO,KAAJ,CACE,iBADF,EAEEF,MAFF,EAGE,cAHF,EAIEF,KAAK,CAACK,QAAN,EAJF,EAKE,GALF,EAMEF,GANF;AAQA,UAAMA,GAAN;AACD;AACF,CAdD;;AAgBA,eAAeJ,aAAf","sourcesContent":["import type { Middleware } from 'redux';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('redux-crashReporter');\n\nconst crashReporter: Middleware = store => next => action => {\n try {\n return next(action);\n } catch (err) {\n log.error(\n 'Error executing',\n action,\n ' with state ',\n store.getState(),\n ':',\n err\n );\n throw err;\n }\n};\n\nexport default crashReporter;\n"],"file":"crashReporter.js"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
declare
|
|
2
|
-
withExtraArgument<ExtraThunkArg, State = any, BasicAction extends import("redux").Action<any> = import("redux").AnyAction>(extraArgument: ExtraThunkArg): import("redux-thunk").ThunkMiddleware<State, BasicAction, ExtraThunkArg>;
|
|
3
|
-
}))[];
|
|
1
|
+
declare const _default: import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>[];
|
|
4
2
|
export default _default;
|
|
5
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/middleware/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/middleware/index.ts"],"names":[],"mappings":";AAIA,wBAA8C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/middleware/index.
|
|
1
|
+
{"version":3,"sources":["../../src/middleware/index.ts"],"names":["thunk","logger","crashReporter"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,aAAlB;OACOC,M;OACAC,a;AAEP,eAAe,CAACD,MAAD,EAASC,aAAT,EAAwBF,KAAxB,CAAf","sourcesContent":["import thunk from 'redux-thunk';\nimport logger from './logger';\nimport crashReporter from './crashReporter';\n\nexport default [logger, crashReporter, thunk];\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/middleware/logger.
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/middleware/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAKxC,QAAA,MAAM,MAAM,EAAE,UAKb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/middleware/logger.
|
|
1
|
+
{"version":3,"sources":["../../src/middleware/logger.ts"],"names":["Log","log","module","logger","store","next","action","debug","result","getState"],"mappings":"AACA,OAAOA,GAAP,MAAgB,gBAAhB;AAEA,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAJ,CAAW,cAAX,CAAZ;;AAEA,IAAMC,MAAkB,GAAGC,KAAK,IAAIC,IAAI,IAAIC,MAAM,IAAI;AACpDL,EAAAA,GAAG,CAACM,KAAJ,CAAU,aAAV,EAAyBD,MAAzB;AACA,MAAME,MAAM,GAAGH,IAAI,CAACC,MAAD,CAAnB;AACAL,EAAAA,GAAG,CAACM,KAAJ,CAAU,YAAV,EAAwBH,KAAK,CAACK,QAAN,EAAxB;AACA,SAAOD,MAAP;AACD,CALD;;AAOA,eAAeL,MAAf","sourcesContent":["import type { Middleware } from 'redux';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('redux-logger');\n\nconst logger: Middleware = store => next => action => {\n log.debug('dispatching', action);\n const result = next(action);\n log.debug('next state', store.getState());\n return result;\n};\n\nexport default logger;\n"],"file":"logger.js"}
|
package/dist/reducerRegistry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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; }
|
|
1
|
+
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; }
|
|
2
2
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activeTool.d.ts","sourceRoot":"","sources":["../../src/reducers/activeTool.
|
|
1
|
+
{"version":3,"file":"activeTool.d.ts","sourceRoot":"","sources":["../../src/reducers/activeTool.ts"],"names":[],"mappings":";AAMA,wBAAqD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reducers/activeTool.
|
|
1
|
+
{"version":3,"sources":["../../src/reducers/activeTool.ts"],"names":["SET_ACTIVE_TOOL","replaceReducer"],"mappings":"AAAA;AACA;AACA;SACSA,e;SACAC,c;AAET,eAAeA,cAAc,CAACD,eAAD,EAAkB,IAAlB,CAA7B","sourcesContent":["/**\n * The active tool the user currently has selected\n */\nimport { SET_ACTIVE_TOOL } from '../actionTypes';\nimport { replaceReducer } from './common';\n\nexport default replaceReducer(SET_ACTIVE_TOOL, null);\n"],"file":"activeTool.js"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as mergeReducer } from
|
|
2
|
-
export { default as replaceByIdReducer } from
|
|
3
|
-
export { default as replaceReducer } from
|
|
1
|
+
export { default as mergeReducer } from './mergeReducer';
|
|
2
|
+
export { default as replaceByIdReducer } from './replaceByIdReducer';
|
|
3
|
+
export { default as replaceReducer } from './replaceReducer';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/reducers/common/index.
|
|
1
|
+
{"version":3,"sources":["../../../src/reducers/common/index.ts"],"names":["default","mergeReducer","replaceByIdReducer","replaceReducer"],"mappings":"SAASA,OAAO,IAAIC,Y;SACXD,OAAO,IAAIE,kB;SACXF,OAAO,IAAIG,c","sourcesContent":["export { default as mergeReducer } from './mergeReducer';\nexport { default as replaceByIdReducer } from './replaceByIdReducer';\nexport { default as replaceReducer } from './replaceReducer';\n"],"file":"index.js"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Reducer } from 'redux';
|
|
2
|
+
/**
|
|
3
|
+
* Setup a merge reducer for a specific action type.
|
|
4
|
+
* Will take the payload passed in and merge it with the previous state to update.
|
|
5
|
+
* @param type The action type
|
|
6
|
+
* @param initialState The initial state
|
|
7
|
+
*/
|
|
8
|
+
export default function mergeReducer<S>(type: string, initialState: S): Reducer<S>;
|
|
3
9
|
//# sourceMappingURL=mergeReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/mergeReducer.
|
|
1
|
+
{"version":3,"file":"mergeReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/mergeReducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EACpC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,CAAC,CAsBZ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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; }
|
|
1
|
+
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; }
|
|
2
2
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
4
|
|
|
@@ -7,31 +7,33 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7
7
|
/**
|
|
8
8
|
* Setup a merge reducer for a specific action type.
|
|
9
9
|
* Will take the payload passed in and merge it with the previous state to update.
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
10
|
+
* @param type The action type
|
|
11
|
+
* @param initialState The initial state
|
|
12
12
|
*/
|
|
13
|
-
export default (
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export default function mergeReducer(type, initialState) {
|
|
14
|
+
return function () {
|
|
15
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
16
|
+
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
switch (action.type) {
|
|
19
|
+
case type:
|
|
20
|
+
{
|
|
21
|
+
var newState = action.payload;
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (newState == null) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
if (state != null) {
|
|
28
|
+
return _objectSpread(_objectSpread({}, state), newState);
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
return _objectSpread({}, newState);
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
34
|
+
default:
|
|
35
|
+
return state;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
37
39
|
//# sourceMappingURL=mergeReducer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/reducers/common/mergeReducer.
|
|
1
|
+
{"version":3,"sources":["../../../src/reducers/common/mergeReducer.ts"],"names":["mergeReducer","type","initialState","state","action","newState","payload"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAT,CACbC,IADa,EAEbC,YAFa,EAGD;AACZ,SAAO,YAAkC;AAAA,QAAjCC,KAAiC,uEAAzBD,YAAyB;AAAA,QAAXE,MAAW;;AACvC,YAAQA,MAAM,CAACH,IAAf;AACE,WAAKA,IAAL;AAAW;AACT,cAAMI,QAAQ,GAAGD,MAAM,CAACE,OAAxB;;AACA,cAAID,QAAQ,IAAI,IAAhB,EAAsB;AACpB,mBAAO,IAAP;AACD;;AAED,cAAIF,KAAK,IAAI,IAAb,EAAmB;AACjB,mDACKA,KADL,GAEKE,QAFL;AAID;;AAED,mCAAYA,QAAZ;AACD;;AACD;AACE,eAAOF,KAAP;AAjBJ;AAmBD,GApBD;AAqBD","sourcesContent":["import type { Reducer } from 'redux';\n\n/**\n * Setup a merge reducer for a specific action type.\n * Will take the payload passed in and merge it with the previous state to update.\n * @param type The action type\n * @param initialState The initial state\n */\nexport default function mergeReducer<S>(\n type: string,\n initialState: S\n): Reducer<S> {\n return (state = initialState, action) => {\n switch (action.type) {\n case type: {\n const newState = action.payload;\n if (newState == null) {\n return null;\n }\n\n if (state != null) {\n return {\n ...state,\n ...newState,\n };\n }\n\n return { ...newState };\n }\n default:\n return state;\n }\n };\n}\n"],"file":"mergeReducer.js"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Reducer } from 'redux';
|
|
2
|
+
/**
|
|
3
|
+
* Setup a replace reducer for a specific action type.
|
|
4
|
+
* Will take the payload passed in and replace the entity at the id with the payload
|
|
5
|
+
* @param type The action type
|
|
6
|
+
*/
|
|
7
|
+
export default function replaceByIdReducer<S extends Record<string, unknown>>(type: string, initialState?: S, checkIfChanged?: boolean): Reducer<S>;
|
|
3
8
|
//# sourceMappingURL=replaceByIdReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replaceByIdReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/replaceByIdReducer.
|
|
1
|
+
{"version":3,"file":"replaceByIdReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/replaceByIdReducer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1E,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,CAAe,EAC7B,cAAc,UAAO,GACpB,OAAO,CAAC,CAAC,CAAC,CAiBZ"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
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; }
|
|
1
|
+
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; }
|
|
2
2
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
7
7
|
import deepEqual from 'deep-equal';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Setup a replace reducer for a specific action type.
|
|
10
11
|
* Will take the payload passed in and replace the entity at the id with the payload
|
|
11
|
-
* @param
|
|
12
|
+
* @param type The action type
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
-
export default (function (type) {
|
|
14
|
+
export default function replaceByIdReducer(type) {
|
|
15
15
|
var initialState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
16
16
|
var checkIfChanged = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
17
17
|
return function () {
|
|
@@ -43,5 +43,5 @@ export default (function (type) {
|
|
|
43
43
|
return state;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=replaceByIdReducer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/reducers/common/replaceByIdReducer.
|
|
1
|
+
{"version":3,"sources":["../../../src/reducers/common/replaceByIdReducer.ts"],"names":["deepEqual","replaceByIdReducer","type","initialState","checkIfChanged","state","action","id","payload"],"mappings":";;;;;;AAAA,OAAOA,SAAP,MAAsB,YAAtB;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAT,CACbC,IADa,EAID;AAAA,MAFZC,YAEY,uEAFM,EAEN;AAAA,MADZC,cACY,uEADK,IACL;AACZ,SAAO,YAAkC;AAAA,QAAjCC,KAAiC,uEAAzBF,YAAyB;AAAA,QAAXG,MAAW;;AACvC,YAAQA,MAAM,CAACJ,IAAf;AACE,WAAKA,IAAL;AAAW;AACT,cAAM;AAAEK,YAAAA,EAAF;AAAMC,YAAAA;AAAN,cAAkBF,MAAxB;;AACA,cAAIF,cAAc,IAAIJ,SAAS,CAAC;AAAEQ,YAAAA;AAAF,WAAD,EAAc;AAAEA,YAAAA,OAAO,EAAEH,KAAK,CAACE,EAAD;AAAhB,WAAd,CAA/B,EAAsE;AACpE,mBAAOF,KAAP;AACD;;AACD,iDACKA,KADL;AAEE,aAACE,EAAD,GAAMC;AAFR;AAID;;AACD;AACE,eAAOH,KAAP;AAZJ;AAcD,GAfD;AAgBD","sourcesContent":["import deepEqual from 'deep-equal';\nimport type { Reducer } from 'redux';\n\n/**\n * Setup a replace reducer for a specific action type.\n * Will take the payload passed in and replace the entity at the id with the payload\n * @param type The action type\n */\nexport default function replaceByIdReducer<S extends Record<string, unknown>>(\n type: string,\n initialState: S = {} as never,\n checkIfChanged = true\n): Reducer<S> {\n return (state = initialState, action) => {\n switch (action.type) {\n case type: {\n const { id, payload } = action;\n if (checkIfChanged && deepEqual({ payload }, { payload: state[id] })) {\n return state;\n }\n return {\n ...state,\n [id]: payload,\n };\n }\n default:\n return state;\n }\n };\n}\n"],"file":"replaceByIdReducer.js"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Reducer } from 'redux';
|
|
2
|
+
/**
|
|
3
|
+
* Setup a replace reducer for a specific action type.
|
|
4
|
+
* Will take the payload passed in and replace the previous state
|
|
5
|
+
* @param type The action type
|
|
6
|
+
* @param initialState The initial state
|
|
7
|
+
*/
|
|
8
|
+
export default function replaceReducer<S>(type: string, initialState: S): Reducer<S>;
|
|
3
9
|
//# sourceMappingURL=replaceReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replaceReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/replaceReducer.
|
|
1
|
+
{"version":3,"file":"replaceReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/common/replaceReducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EACtC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,CAAC,CAUZ"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Setup a replace reducer for a specific action type.
|
|
3
3
|
* Will take the payload passed in and replace the previous state
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
4
|
+
* @param type The action type
|
|
5
|
+
* @param initialState The initial state
|
|
6
6
|
*/
|
|
7
|
-
export default (
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export default function replaceReducer(type, initialState) {
|
|
8
|
+
return function () {
|
|
9
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
10
|
+
var action = arguments.length > 1 ? arguments[1] : undefined;
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
switch (action.type) {
|
|
13
|
+
case type:
|
|
14
|
+
{
|
|
15
|
+
return action.payload;
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
18
|
+
default:
|
|
19
|
+
return state;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
21
23
|
//# sourceMappingURL=replaceReducer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/reducers/common/replaceReducer.
|
|
1
|
+
{"version":3,"sources":["../../../src/reducers/common/replaceReducer.ts"],"names":["replaceReducer","type","initialState","state","action","payload"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,cAAT,CACbC,IADa,EAEbC,YAFa,EAGD;AACZ,SAAO,YAAkC;AAAA,QAAjCC,KAAiC,uEAAzBD,YAAyB;AAAA,QAAXE,MAAW;;AACvC,YAAQA,MAAM,CAACH,IAAf;AACE,WAAKA,IAAL;AAAW;AACT,iBAAOG,MAAM,CAACC,OAAd;AACD;;AACD;AACE,eAAOF,KAAP;AALJ;AAOD,GARD;AASD","sourcesContent":["import type { Reducer } from 'redux';\n\n/**\n * Setup a replace reducer for a specific action type.\n * Will take the payload passed in and replace the previous state\n * @param type The action type\n * @param initialState The initial state\n */\nexport default function replaceReducer<S>(\n type: string,\n initialState: S\n): Reducer<S> {\n return (state = initialState, action) => {\n switch (action.type) {\n case type: {\n return action.payload;\n }\n default:\n return state;\n }\n };\n}\n"],"file":"replaceReducer.js"}
|
package/dist/reducers/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
declare const reducers: {
|
|
2
|
+
activeTool: import("redux").Reducer<null, import("redux").AnyAction>;
|
|
3
|
+
storage: import("redux").Reducer<import("redux").CombinedState<{
|
|
4
|
+
commandHistoryStorage: null;
|
|
5
|
+
fileStorage: null;
|
|
6
|
+
workspaceStorage: null;
|
|
7
|
+
}>, import("redux").AnyAction>;
|
|
8
|
+
user: import("redux").Reducer<null, import("redux").AnyAction>;
|
|
9
|
+
workspace: import("redux").Reducer<null, import("redux").AnyAction>;
|
|
10
|
+
};
|
|
1
11
|
export default reducers;
|
|
2
|
-
declare namespace reducers {
|
|
3
|
-
export { activeTool };
|
|
4
|
-
export { storage };
|
|
5
|
-
export { user };
|
|
6
|
-
export { workspace };
|
|
7
|
-
}
|
|
8
|
-
import activeTool from "./activeTool";
|
|
9
|
-
import storage from "./storage";
|
|
10
|
-
import user from "./user";
|
|
11
|
-
import workspace from "./workspace";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,QAAQ;;;;;;;;;CAKb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reducers/index.
|
|
1
|
+
{"version":3,"sources":["../../src/reducers/index.ts"],"names":["activeTool","storage","user","workspace","reducers"],"mappings":"OAAOA,U;OACAC,O;OACAC,I;OACAC,S;AAEP,IAAMC,QAAQ,GAAG;AACfJ,EAAAA,UADe;AAEfC,EAAAA,OAFe;AAGfC,EAAAA,IAHe;AAIfC,EAAAA;AAJe,CAAjB;AAOA,eAAeC,QAAf","sourcesContent":["import activeTool from './activeTool';\nimport storage from './storage';\nimport user from './user';\nimport workspace from './workspace';\n\nconst reducers = {\n activeTool,\n storage,\n user,\n workspace,\n};\n\nexport default reducers;\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandHistoryStorage.d.ts","sourceRoot":"","sources":["../../../src/reducers/storage/commandHistoryStorage.
|
|
1
|
+
{"version":3,"file":"commandHistoryStorage.d.ts","sourceRoot":"","sources":["../../../src/reducers/storage/commandHistoryStorage.ts"],"names":[],"mappings":";AAOA,wBAAiE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/reducers/storage/commandHistoryStorage.
|
|
1
|
+
{"version":3,"sources":["../../../src/reducers/storage/commandHistoryStorage.ts"],"names":["SET_COMMAND_HISTORY_STORAGE","replaceReducer"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,2B;SACAC,c;AAET,eAAeA,cAAc,CAACD,2BAAD,EAA8B,IAA9B,CAA7B","sourcesContent":["/**\n * Store the current `CommandHistoryStorage` instance for this user.\n * Use this instance to read/write data from dashboard storage.\n */\nimport { SET_COMMAND_HISTORY_STORAGE } from '../../actionTypes';\nimport { replaceReducer } from '../common';\n\nexport default replaceReducer(SET_COMMAND_HISTORY_STORAGE, null);\n"],"file":"commandHistoryStorage.js"}
|