@deephaven/redux 0.15.6-vite.21 → 0.15.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"actionTypes.js","names":["SAVE_WORKSPACE","SET_ACTIVE_TOOL","SET_COMMAND_HISTORY_STORAGE","SET_DASHBOARD_STORAGE","SET_FILE_STORAGE","SET_PLUGINS","SET_USER","SET_WORKSPACE","SET_WORKSPACE_STORAGE"],"sources":["../src/actionTypes.ts"],"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_PLUGINS = 'SET_PLUGINS';\n\nexport const SET_USER = 'SET_USER';\n\nexport const SET_WORKSPACE = 'SET_WORKSPACE';\n\nexport const SET_WORKSPACE_STORAGE = 'SET_WORKSPACE_STORAGE';\n"],"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,WAAW,GAAG,aAApB;AAEP,OAAO,IAAMC,QAAQ,GAAG,UAAjB;AAEP,OAAO,IAAMC,aAAa,GAAG,eAAtB;AAEP,OAAO,IAAMC,qBAAqB,GAAG,uBAA9B"}
1
+ {"version":3,"sources":["../src/actionTypes.ts"],"names":["SAVE_WORKSPACE","SET_ACTIVE_TOOL","SET_COMMAND_HISTORY_STORAGE","SET_DASHBOARD_STORAGE","SET_FILE_STORAGE","SET_PLUGINS","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,WAAW,GAAG,aAApB;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_PLUGINS = 'SET_PLUGINS';\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,6 +1,5 @@
1
1
  import type { Action } from 'redux';
2
2
  import type { ThunkAction } from 'redux-thunk';
3
- import type { CommandHistoryStorage } from '@deephaven/console';
4
3
  import type { FileStorage } from '@deephaven/file-explorer';
5
4
  import type { DeephavenPluginModuleMap, RootState, User, Workspace, WorkspaceData, WorkspaceSettings, WorkspaceStorage } from './store';
6
5
  export interface PayloadAction<P = unknown> extends Action<string> {
@@ -10,7 +9,7 @@ export declare type PayloadActionCreator<P> = (payload: P) => PayloadAction<P>;
10
9
  export declare const setUser: PayloadActionCreator<User>;
11
10
  export declare const setWorkspace: PayloadActionCreator<Workspace>;
12
11
  export declare const setWorkspaceStorage: PayloadActionCreator<WorkspaceStorage>;
13
- export declare const setCommandHistoryStorage: PayloadActionCreator<CommandHistoryStorage>;
12
+ export declare const setCommandHistoryStorage: PayloadActionCreator<unknown>;
14
13
  export declare const setFileStorage: PayloadActionCreator<FileStorage>;
15
14
  /**
16
15
  * Sets the specified workspace locally and saves it remotely
@@ -1 +1 @@
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;AAU5D,OAAO,KAAK,EACV,wBAAwB,EACxB,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,CAG3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O,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,OAAO,CAGjE,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;AAEH,eAAO,MAAM,UAAU,EAAE,oBAAoB,CAAC,wBAAwB,CAGpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","names":["SET_PLUGINS","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","setPlugins","plugins"],"sources":["../src/actions.ts"],"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_PLUGINS,\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 DeephavenPluginModuleMap,\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 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\nexport const setPlugins: PayloadActionCreator<DeephavenPluginModuleMap> = plugins => ({\n type: SET_PLUGINS,\n payload: plugins,\n});\n"],"mappings":";;;;;;SAKEA,W,EACAC,Q,EACAC,a,EACAC,2B,EACAC,qB,EACAC,e,EACAC,gB;AAkBF,OAAO,IAAMC,OAAmC,GAAGC,IAAI,KAAK;EAC1DC,IAAI,EAAER,QADoD;EAE1DS,OAAO,EAAEF;AAFiD,CAAL,CAAhD;AAKP,OAAO,IAAMG,YAA6C,GAAGC,SAAS,KAAK;EACzEH,IAAI,EAAEP,aADmE;EAEzEQ,OAAO,EAAEE;AAFgE,CAAL,CAA/D;AAKP,OAAO,IAAMC,mBAA2D,GAAGC,gBAAgB,KAAK;EAC9FL,IAAI,EAAEL,qBADwF;EAE9FM,OAAO,EAAEI;AAFqF,CAAL,CAApF;AAKP,OAAO,IAAMC,wBAAqE,GAAGC,qBAAqB,KAAK;EAC7GP,IAAI,EAAEN,2BADuG;EAE7GO,OAAO,EAAEM;AAFoG,CAAL,CAAnG;AAKP,OAAO,IAAMC,cAAiD,GAAGC,WAAW,KAAK;EAC/ET,IAAI,EAAEH,gBADyE;EAE/EI,OAAO,EAAEQ;AAFsE,CAAL,CAArE;AAKP;AACA;AACA;AACA;;AACA,OAAO,IAAMC,aAAa,GACxBP,SAD2B,IAOxB,CAACQ,QAAD,EAAWC,QAAX,KAAwB;EAC3BD,QAAQ,CAACT,YAAY,CAACC,SAAD,CAAb,CAAR;EAEA,IAAM;IAAEU;EAAF,IAAcD,QAAQ,EAA5B;EACA,IAAM;IAAEP;EAAF,IAAuBQ,OAA7B;EACA,OAAOR,gBAAgB,CAACS,IAAjB,CAAsBX,SAAtB,CAAP;AACD,CAbM;AAeP;AACA;AACA;AACA;;AACA,OAAO,IAAMY,mBAAmB,GAC9BC,aADiC,IAO9B,CAACL,QAAD,EAAWC,QAAX,KAAwB;EAC3B,IAAM;IAAET;EAAF,IAAgBS,QAAQ,EAA9B;EACA,IAAM;IAAEK;EAAF,IAAWd,SAAjB;;EACA,IAAMe,YAAY,mCACbf,SADa;IAEhBc,IAAI,kCACCA,IADD,GAECD,aAFD;EAFY,EAAlB;;EAOA,OAAOL,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;EAAEK;AAAF,CAAD,CAApB,CAPlB;AASP,OAAO,IAAMC,aAA2C,GAAGpB,OAAO,KAAK;EACrED,IAAI,EAAEJ,eAD+D;EAErEK;AAFqE,CAAL,CAA3D;AAKP,OAAO,IAAMqB,UAA0D,GAAGC,OAAO,KAAK;EACpFvB,IAAI,EAAET,WAD8E;EAEpFU,OAAO,EAAEsB;AAF2E,CAAL,CAA1E"}
1
+ {"version":3,"sources":["../src/actions.ts"],"names":["SET_PLUGINS","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","setPlugins","plugins"],"mappings":";;;;;;SAIEA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F,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;AAKP,OAAO,IAAMqB,UAA0D,GAAGC,OAAO,KAAK;AACpFvB,EAAAA,IAAI,EAAET,WAD8E;AAEpFU,EAAAA,OAAO,EAAEsB;AAF2E,CAAL,CAA1E","sourcesContent":["import type { Action } from 'redux';\nimport type { ThunkAction } from 'redux-thunk';\nimport type { FileStorage } from '@deephaven/file-explorer';\nimport {\n SET_PLUGINS,\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 DeephavenPluginModuleMap,\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<unknown> = 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 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\nexport const setPlugins: PayloadActionCreator<DeephavenPluginModuleMap> = plugins => ({\n type: SET_PLUGINS,\n payload: plugins,\n});\n"],"file":"actions.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMockStore.js","names":["createMockStore","dispatch","jest","fn","undefined","getState","dashboardData","workspace","data","settings","subscribe"],"sources":["../src/createMockStore.ts"],"sourcesContent":["import store from './store';\n\nexport function createMockStore(): typeof store {\n return ({\n dispatch: jest.fn(() => undefined),\n getState: jest.fn(() => ({\n dashboardData: {},\n workspace: {\n data: {\n settings: {},\n },\n },\n })),\n subscribe: jest.fn(() => undefined),\n } as unknown) as typeof store;\n}\n\nexport default createMockStore;\n"],"mappings":"AAEA,OAAO,SAASA,eAAT,GAAyC;EAC9C,OAAQ;IACNC,QAAQ,EAAEC,IAAI,CAACC,EAAL,CAAQ,MAAMC,SAAd,CADJ;IAENC,QAAQ,EAAEH,IAAI,CAACC,EAAL,CAAQ,OAAO;MACvBG,aAAa,EAAE,EADQ;MAEvBC,SAAS,EAAE;QACTC,IAAI,EAAE;UACJC,QAAQ,EAAE;QADN;MADG;IAFY,CAAP,CAAR,CAFJ;IAUNC,SAAS,EAAER,IAAI,CAACC,EAAL,CAAQ,MAAMC,SAAd;EAVL,CAAR;AAYD;AAED,eAAeJ,eAAf"}
1
+ {"version":3,"sources":["../src/createMockStore.ts"],"names":["createMockStore","dispatch","jest","fn","undefined","getState","dashboardData","workspace","data","settings","subscribe"],"mappings":"AAEA,OAAO,SAASA,eAAT,GAAyC;AAC9C,SAAQ;AACNC,IAAAA,QAAQ,EAAEC,IAAI,CAACC,EAAL,CAAQ,MAAMC,SAAd,CADJ;AAENC,IAAAA,QAAQ,EAAEH,IAAI,CAACC,EAAL,CAAQ,OAAO;AACvBG,MAAAA,aAAa,EAAE,EADQ;AAEvBC,MAAAA,SAAS,EAAE;AACTC,QAAAA,IAAI,EAAE;AACJC,UAAAA,QAAQ,EAAE;AADN;AADG;AAFY,KAAP,CAAR,CAFJ;AAUNC,IAAAA,SAAS,EAAER,IAAI,CAACC,EAAL,CAAQ,MAAMC,SAAd;AAVL,GAAR;AAYD;AAED,eAAeJ,eAAf","sourcesContent":["import store from './store';\n\nexport function createMockStore(): typeof store {\n return ({\n dispatch: jest.fn(() => undefined),\n getState: jest.fn(() => ({\n dashboardData: {},\n workspace: {\n data: {\n settings: {},\n },\n },\n })),\n subscribe: jest.fn(() => undefined),\n } as unknown) as typeof store;\n}\n\nexport default createMockStore;\n"],"file":"createMockStore.js"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","reducers","reducerRegistry","store"],"sources":["../src/index.ts"],"sourcesContent":["export * from './selectors';\nexport * from './actions';\nexport * from './createMockStore';\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"],"mappings":";;;;SAISA,OAAO,IAAIC,Q;SACXD,OAAO,IAAIE,e;;SAEXF,OAAO,IAAIG,K"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["default","reducers","reducerRegistry","store"],"mappings":";;;;SAISA,OAAO,IAAIC,Q;SACXD,OAAO,IAAIE,e;;SAEXF,OAAO,IAAIG,K","sourcesContent":["export * from './selectors';\nexport * from './actions';\nexport * from './createMockStore';\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.js","names":["Log","log","module","crashReporter","store","next","action","err","error","getState"],"sources":["../../src/middleware/crashReporter.ts"],"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"],"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;EAC3D,IAAI;IACF,OAAOD,IAAI,CAACC,MAAD,CAAX;EACD,CAFD,CAEE,OAAOC,GAAP,EAAY;IACZN,GAAG,CAACO,KAAJ,CACE,iBADF,EAEEF,MAFF,EAGE,cAHF,EAIEF,KAAK,CAACK,QAAN,EAJF,EAKE,GALF,EAMEF,GANF;IAQA,MAAMA,GAAN;EACD;AACF,CAdD;;AAgBA,eAAeJ,aAAf"}
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 +1 @@
1
- {"version":3,"file":"index.js","names":["thunk","logger","crashReporter"],"sources":["../../src/middleware/index.ts"],"sourcesContent":["import thunk from 'redux-thunk';\nimport logger from './logger';\nimport crashReporter from './crashReporter';\n\nexport default [logger, crashReporter, thunk];\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,aAAlB;OACOC,M;OACAC,a;AAEP,eAAe,CAACD,MAAD,EAASC,aAAT,EAAwBF,KAAxB,CAAf"}
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.js","names":["Log","log","module","logger","store","next","action","debug","result","getState"],"sources":["../../src/middleware/logger.ts"],"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"],"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;EACpDL,GAAG,CAACM,KAAJ,CAAU,aAAV,EAAyBD,MAAzB;EACA,IAAME,MAAM,GAAGH,IAAI,CAACC,MAAD,CAAnB;EACAL,GAAG,CAACM,KAAJ,CAAU,YAAV,EAAwBH,KAAK,CAACK,QAAN,EAAxB;EACA,OAAOD,MAAP;AACD,CALD;;AAOA,eAAeL,MAAf"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"reducerRegistry.js","names":["ReducerRegistry","register","name","reducer","reducers","listener","setListener","reducerRegistry"],"sources":["../src/reducerRegistry.ts"],"sourcesContent":["import { Reducer, ReducersMapObject } from 'redux';\n\nexport type ReducerRegistryListener = (reducers: ReducersMapObject) => void;\n\n/**\n * A registry for registering reducers. Whenever a new reducer is added,\n * the reducers should be replaced in the store.\n *\n * See this blog post for some notes on redux modules/code splitting\n * http://nicolasgallagher.com/redux-modules-and-code-splitting/\n */\nexport class ReducerRegistry {\n reducers = {} as ReducersMapObject;\n\n listener: ReducerRegistryListener | null = null;\n\n register(name: string, reducer: Reducer): void {\n this.reducers = { ...this.reducers, [name]: reducer };\n this.listener?.(this.reducers);\n }\n\n setListener(listener: ReducerRegistryListener): void {\n this.listener = listener;\n }\n}\n\nconst reducerRegistry = new ReducerRegistry();\nexport default reducerRegistry;\n"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,eAAN,CAAsB;EAAA;IAAA,kCAChB,EADgB;;IAAA,kCAGgB,IAHhB;EAAA;;EAK3BC,QAAQ,CAACC,IAAD,EAAeC,OAAf,EAAuC;IAAA;;IAC7C,KAAKC,QAAL,mCAAqB,KAAKA,QAA1B;MAAoC,CAACF,IAAD,GAAQC;IAA5C;IACA,uBAAKE,QAAL,6EAAgB,KAAKD,QAArB;EACD;;EAEDE,WAAW,CAACD,QAAD,EAA0C;IACnD,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;AAZ0B;AAe7B,IAAME,eAAe,GAAG,IAAIP,eAAJ,EAAxB;AACA,eAAeO,eAAf"}
1
+ {"version":3,"sources":["../src/reducerRegistry.ts"],"names":["ReducerRegistry","register","name","reducer","reducers","listener","setListener","reducerRegistry"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,eAAN,CAAsB;AAAA;AAAA,sCAChB,EADgB;;AAAA,sCAGgB,IAHhB;AAAA;;AAK3BC,EAAAA,QAAQ,CAACC,IAAD,EAAeC,OAAf,EAAuC;AAAA;;AAC7C,SAAKC,QAAL,mCAAqB,KAAKA,QAA1B;AAAoC,OAACF,IAAD,GAAQC;AAA5C;AACA,2BAAKE,QAAL,6EAAgB,KAAKD,QAArB;AACD;;AAEDE,EAAAA,WAAW,CAACD,QAAD,EAA0C;AACnD,SAAKA,QAAL,GAAgBA,QAAhB;AACD;;AAZ0B;AAe7B,IAAME,eAAe,GAAG,IAAIP,eAAJ,EAAxB;AACA,eAAeO,eAAf","sourcesContent":["import { Reducer, ReducersMapObject } from 'redux';\n\nexport type ReducerRegistryListener = (reducers: ReducersMapObject) => void;\n\n/**\n * A registry for registering reducers. Whenever a new reducer is added,\n * the reducers should be replaced in the store.\n *\n * See this blog post for some notes on redux modules/code splitting\n * http://nicolasgallagher.com/redux-modules-and-code-splitting/\n */\nexport class ReducerRegistry {\n reducers = {} as ReducersMapObject;\n\n listener: ReducerRegistryListener | null = null;\n\n register(name: string, reducer: Reducer): void {\n this.reducers = { ...this.reducers, [name]: reducer };\n this.listener?.(this.reducers);\n }\n\n setListener(listener: ReducerRegistryListener): void {\n this.listener = listener;\n }\n}\n\nconst reducerRegistry = new ReducerRegistry();\nexport default reducerRegistry;\n"],"file":"reducerRegistry.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"activeTool.js","names":["SET_ACTIVE_TOOL","replaceReducer"],"sources":["../../src/reducers/activeTool.ts"],"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"],"mappings":"AAAA;AACA;AACA;SACSA,e;SACAC,c;AAET,eAAeA,cAAc,CAACD,eAAD,EAAkB,IAAlB,CAA7B"}
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 +1 @@
1
- {"version":3,"file":"index.js","names":["default","mergeReducer","replaceByIdReducer","replaceReducer"],"sources":["../../../src/reducers/common/index.ts"],"sourcesContent":["export { default as mergeReducer } from './mergeReducer';\nexport { default as replaceByIdReducer } from './replaceByIdReducer';\nexport { default as replaceReducer } from './replaceReducer';\n"],"mappings":"SAASA,OAAO,IAAIC,Y;SACXD,OAAO,IAAIE,kB;SACXF,OAAO,IAAIG,c"}
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 +1 @@
1
- {"version":3,"file":"mergeReducer.js","names":["mergeReducer","type","initialState","state","action","newState","payload"],"sources":["../../../src/reducers/common/mergeReducer.ts"],"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"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAT,CACbC,IADa,EAEbC,YAFa,EAGD;EACZ,OAAO,YAAkC;IAAA,IAAjCC,KAAiC,uEAAzBD,YAAyB;IAAA,IAAXE,MAAW;;IACvC,QAAQA,MAAM,CAACH,IAAf;MACE,KAAKA,IAAL;QAAW;UACT,IAAMI,QAAQ,GAAGD,MAAM,CAACE,OAAxB;;UACA,IAAID,QAAQ,IAAI,IAAhB,EAAsB;YACpB,OAAO,IAAP;UACD;;UAED,IAAIF,KAAK,IAAI,IAAb,EAAmB;YACjB,uCACKA,KADL,GAEKE,QAFL;UAID;;UAED,yBAAYA,QAAZ;QACD;;MACD;QACE,OAAOF,KAAP;IAjBJ;EAmBD,CApBD;AAqBD"}
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 +1 @@
1
- {"version":3,"file":"replaceByIdReducer.js","names":["deepEqual","replaceByIdReducer","type","initialState","checkIfChanged","state","action","id","payload"],"sources":["../../../src/reducers/common/replaceByIdReducer.ts"],"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"],"mappings":";;;;;;AAAA,OAAOA,SAAP,MAAsB,YAAtB;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,kBAAT,CACbC,IADa,EAID;EAAA,IAFZC,YAEY,uEAFM,EAEN;EAAA,IADZC,cACY,uEADK,IACL;EACZ,OAAO,YAAkC;IAAA,IAAjCC,KAAiC,uEAAzBF,YAAyB;IAAA,IAAXG,MAAW;;IACvC,QAAQA,MAAM,CAACJ,IAAf;MACE,KAAKA,IAAL;QAAW;UACT,IAAM;YAAEK,EAAF;YAAMC;UAAN,IAAkBF,MAAxB;;UACA,IAAIF,cAAc,IAAIJ,SAAS,CAAC;YAAEQ;UAAF,CAAD,EAAc;YAAEA,OAAO,EAAEH,KAAK,CAACE,EAAD;UAAhB,CAAd,CAA/B,EAAsE;YACpE,OAAOF,KAAP;UACD;;UACD,uCACKA,KADL;YAEE,CAACE,EAAD,GAAMC;UAFR;QAID;;MACD;QACE,OAAOH,KAAP;IAZJ;EAcD,CAfD;AAgBD"}
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 +1 @@
1
- {"version":3,"file":"replaceReducer.js","names":["replaceReducer","type","initialState","state","action","payload"],"sources":["../../../src/reducers/common/replaceReducer.ts"],"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"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,cAAT,CACbC,IADa,EAEbC,YAFa,EAGD;EACZ,OAAO,YAAkC;IAAA,IAAjCC,KAAiC,uEAAzBD,YAAyB;IAAA,IAAXE,MAAW;;IACvC,QAAQA,MAAM,CAACH,IAAf;MACE,KAAKA,IAAL;QAAW;UACT,OAAOG,MAAM,CAACC,OAAd;QACD;;MACD;QACE,OAAOF,KAAP;IALJ;EAOD,CARD;AASD"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["activeTool","plugins","storage","user","workspace","reducers"],"sources":["../../src/reducers/index.ts"],"sourcesContent":["import activeTool from './activeTool';\nimport plugins from './plugins';\nimport storage from './storage';\nimport user from './user';\nimport workspace from './workspace';\n\nconst reducers = {\n activeTool,\n plugins,\n storage,\n user,\n workspace,\n};\n\nexport default reducers;\n"],"mappings":"OAAOA,U;OACAC,O;OACAC,O;OACAC,I;OACAC,S;AAEP,IAAMC,QAAQ,GAAG;EACfL,UADe;EAEfC,OAFe;EAGfC,OAHe;EAIfC,IAJe;EAKfC;AALe,CAAjB;AAQA,eAAeC,QAAf"}
1
+ {"version":3,"sources":["../../src/reducers/index.ts"],"names":["activeTool","plugins","storage","user","workspace","reducers"],"mappings":"OAAOA,U;OACAC,O;OACAC,O;OACAC,I;OACAC,S;AAEP,IAAMC,QAAQ,GAAG;AACfL,EAAAA,UADe;AAEfC,EAAAA,OAFe;AAGfC,EAAAA,OAHe;AAIfC,EAAAA,IAJe;AAKfC,EAAAA;AALe,CAAjB;AAQA,eAAeC,QAAf","sourcesContent":["import activeTool from './activeTool';\nimport plugins from './plugins';\nimport storage from './storage';\nimport user from './user';\nimport workspace from './workspace';\n\nconst reducers = {\n activeTool,\n plugins,\n storage,\n user,\n workspace,\n};\n\nexport default reducers;\n"],"file":"index.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.js","names":["SET_PLUGINS","replaceReducer"],"sources":["../../src/reducers/plugins.ts"],"sourcesContent":["/**\n * The plugins that have been loaded\n */\nimport { SET_PLUGINS } from '../actionTypes';\nimport { replaceReducer } from './common';\n\nexport default replaceReducer(SET_PLUGINS, null);\n"],"mappings":"AAAA;AACA;AACA;SACSA,W;SACAC,c;AAET,eAAeA,cAAc,CAACD,WAAD,EAAc,IAAd,CAA7B"}
1
+ {"version":3,"sources":["../../src/reducers/plugins.ts"],"names":["SET_PLUGINS","replaceReducer"],"mappings":"AAAA;AACA;AACA;SACSA,W;SACAC,c;AAET,eAAeA,cAAc,CAACD,WAAD,EAAc,IAAd,CAA7B","sourcesContent":["/**\n * The plugins that have been loaded\n */\nimport { SET_PLUGINS } from '../actionTypes';\nimport { replaceReducer } from './common';\n\nexport default replaceReducer(SET_PLUGINS, null);\n"],"file":"plugins.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"commandHistoryStorage.js","names":["SET_COMMAND_HISTORY_STORAGE","replaceReducer"],"sources":["../../../src/reducers/storage/commandHistoryStorage.ts"],"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"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,2B;SACAC,c;AAET,eAAeA,cAAc,CAACD,2BAAD,EAA8B,IAA9B,CAA7B"}
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"}
@@ -1 +1 @@
1
- {"version":3,"file":"fileStorage.js","names":["SET_FILE_STORAGE","replaceReducer"],"sources":["../../../src/reducers/storage/fileStorage.ts"],"sourcesContent":["/**\n * Store the current `FileStorage` instance for this user.\n * Use this instance to read/write data from storage.\n */\nimport { SET_FILE_STORAGE } from '../../actionTypes';\nimport { replaceReducer } from '../common';\n\nexport default replaceReducer(SET_FILE_STORAGE, null);\n"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,gB;SACAC,c;AAET,eAAeA,cAAc,CAACD,gBAAD,EAAmB,IAAnB,CAA7B"}
1
+ {"version":3,"sources":["../../../src/reducers/storage/fileStorage.ts"],"names":["SET_FILE_STORAGE","replaceReducer"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,gB;SACAC,c;AAET,eAAeA,cAAc,CAACD,gBAAD,EAAmB,IAAnB,CAA7B","sourcesContent":["/**\n * Store the current `FileStorage` instance for this user.\n * Use this instance to read/write data from storage.\n */\nimport { SET_FILE_STORAGE } from '../../actionTypes';\nimport { replaceReducer } from '../common';\n\nexport default replaceReducer(SET_FILE_STORAGE, null);\n"],"file":"fileStorage.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["combineReducers","commandHistoryStorage","fileStorage","workspaceStorage"],"sources":["../../../src/reducers/storage/index.ts"],"sourcesContent":["import { combineReducers } from 'redux';\n\nimport commandHistoryStorage from './commandHistoryStorage';\nimport fileStorage from './fileStorage';\nimport workspaceStorage from './workspaceStorage';\n\nexport default combineReducers({\n commandHistoryStorage,\n fileStorage,\n workspaceStorage,\n});\n"],"mappings":"AAAA,SAASA,eAAT,QAAgC,OAAhC;OAEOC,qB;OACAC,W;OACAC,gB;AAEP,eAAeH,eAAe,CAAC;EAC7BC,qBAD6B;EAE7BC,WAF6B;EAG7BC;AAH6B,CAAD,CAA9B"}
1
+ {"version":3,"sources":["../../../src/reducers/storage/index.ts"],"names":["combineReducers","commandHistoryStorage","fileStorage","workspaceStorage"],"mappings":"AAAA,SAASA,eAAT,QAAgC,OAAhC;OAEOC,qB;OACAC,W;OACAC,gB;AAEP,eAAeH,eAAe,CAAC;AAC7BC,EAAAA,qBAD6B;AAE7BC,EAAAA,WAF6B;AAG7BC,EAAAA;AAH6B,CAAD,CAA9B","sourcesContent":["import { combineReducers } from 'redux';\n\nimport commandHistoryStorage from './commandHistoryStorage';\nimport fileStorage from './fileStorage';\nimport workspaceStorage from './workspaceStorage';\n\nexport default combineReducers({\n commandHistoryStorage,\n fileStorage,\n workspaceStorage,\n});\n"],"file":"index.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceStorage.js","names":["SET_WORKSPACE_STORAGE","replaceReducer"],"sources":["../../../src/reducers/storage/workspaceStorage.ts"],"sourcesContent":["/**\n * Store the current `WorkspaceStorage` instance for this user.\n * Use this instance to read/write data from workspace storage.\n */\nimport { SET_WORKSPACE_STORAGE } from '../../actionTypes';\nimport { replaceReducer } from '../common';\n\nexport default replaceReducer(SET_WORKSPACE_STORAGE, null);\n"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,qB;SACAC,c;AAET,eAAeA,cAAc,CAACD,qBAAD,EAAwB,IAAxB,CAA7B"}
1
+ {"version":3,"sources":["../../../src/reducers/storage/workspaceStorage.ts"],"names":["SET_WORKSPACE_STORAGE","replaceReducer"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,qB;SACAC,c;AAET,eAAeA,cAAc,CAACD,qBAAD,EAAwB,IAAxB,CAA7B","sourcesContent":["/**\n * Store the current `WorkspaceStorage` instance for this user.\n * Use this instance to read/write data from workspace storage.\n */\nimport { SET_WORKSPACE_STORAGE } from '../../actionTypes';\nimport { replaceReducer } from '../common';\n\nexport default replaceReducer(SET_WORKSPACE_STORAGE, null);\n"],"file":"workspaceStorage.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","names":["SET_USER","mergeReducer"],"sources":["../../src/reducers/user.ts"],"sourcesContent":["/**\n * Store information about the current user.\n */\nimport { SET_USER } from '../actionTypes';\nimport { mergeReducer } from './common';\n\nexport default mergeReducer(SET_USER, null);\n"],"mappings":"AAAA;AACA;AACA;SACSA,Q;SACAC,Y;AAET,eAAeA,YAAY,CAACD,QAAD,EAAW,IAAX,CAA3B"}
1
+ {"version":3,"sources":["../../src/reducers/user.ts"],"names":["SET_USER","mergeReducer"],"mappings":"AAAA;AACA;AACA;SACSA,Q;SACAC,Y;AAET,eAAeA,YAAY,CAACD,QAAD,EAAW,IAAX,CAA3B","sourcesContent":["/**\n * Store information about the current user.\n */\nimport { SET_USER } from '../actionTypes';\nimport { mergeReducer } from './common';\n\nexport default mergeReducer(SET_USER, null);\n"],"file":"user.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","names":["SET_WORKSPACE","mergeReducer"],"sources":["../../src/reducers/workspace.ts"],"sourcesContent":["/**\n * Store the users current Workspace. Should be loaded from WorkspaceStorage.\n *\n * Includes the full row as stored in the `workspaceData` table.\n */\nimport { SET_WORKSPACE } from '../actionTypes';\nimport { mergeReducer } from './common';\n\nexport default mergeReducer(SET_WORKSPACE, null);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;SACSA,a;SACAC,Y;AAET,eAAeA,YAAY,CAACD,aAAD,EAAgB,IAAhB,CAA3B"}
1
+ {"version":3,"sources":["../../src/reducers/workspace.ts"],"names":["SET_WORKSPACE","mergeReducer"],"mappings":"AAAA;AACA;AACA;AACA;AACA;SACSA,a;SACAC,Y;AAET,eAAeA,YAAY,CAACD,aAAD,EAAgB,IAAhB,CAA3B","sourcesContent":["/**\n * Store the users current Workspace. Should be loaded from WorkspaceStorage.\n *\n * Includes the full row as stored in the `workspaceData` table.\n */\nimport { SET_WORKSPACE } from '../actionTypes';\nimport { mergeReducer } from './common';\n\nexport default mergeReducer(SET_WORKSPACE, null);\n"],"file":"workspace.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceStorage.js","names":["SET_WORKSPACE_STORAGE","replaceReducer"],"sources":["../../src/reducers/workspaceStorage.ts"],"sourcesContent":["/**\n * Store the current `WorkspaceStorage` instance for this user.\n * Use this instance to read/write data from workspace storage.\n */\nimport { SET_WORKSPACE_STORAGE } from '../actionTypes';\nimport { replaceReducer } from './common';\n\nexport default replaceReducer(SET_WORKSPACE_STORAGE, null);\n"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,qB;SACAC,c;AAET,eAAeA,cAAc,CAACD,qBAAD,EAAwB,IAAxB,CAA7B"}
1
+ {"version":3,"sources":["../../src/reducers/workspaceStorage.ts"],"names":["SET_WORKSPACE_STORAGE","replaceReducer"],"mappings":"AAAA;AACA;AACA;AACA;SACSA,qB;SACAC,c;AAET,eAAeA,cAAc,CAACD,qBAAD,EAAwB,IAAxB,CAA7B","sourcesContent":["/**\n * Store the current `WorkspaceStorage` instance for this user.\n * Use this instance to read/write data from workspace storage.\n */\nimport { SET_WORKSPACE_STORAGE } from '../actionTypes';\nimport { replaceReducer } from './common';\n\nexport default replaceReducer(SET_WORKSPACE_STORAGE, null);\n"],"file":"workspaceStorage.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.js","names":["EMPTY_OBJECT","Object","freeze","EMPTY_MAP","Map","getUser","store","user","getUserName","name","getUserGroups","groups","getStorage","storage","getCommandHistoryStorage","commandHistoryStorage","getFileStorage","fileStorage","getWorkspaceStorage","workspaceStorage","getWorkspace","workspace","getSettings","data","settings","getDefaultDateTimeFormat","defaultDateTimeFormat","getDefaultDecimalFormatOptions","defaultDecimalFormatOptions","getDefaultIntegerFormatOptions","defaultIntegerFormatOptions","getFormatter","formatter","getTimeZone","timeZone","getShowTimeZone","showTimeZone","getShowTSeparator","showTSeparator","getTruncateNumbersWithPound","truncateNumbersWithPound","getDisableMoveConfirmation","disableMoveConfirmation","getShortcutOverrides","shortcutOverrides","getActiveTool","activeTool","getPlugins","plugins"],"sources":["../src/selectors.ts"],"sourcesContent":["import type {\n RootState,\n User,\n Storage,\n Workspace,\n WorkspaceSettings,\n} from './store';\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst EMPTY_MAP: ReadonlyMap<unknown, unknown> = new Map();\n\ntype Selector<R> = (state: RootState) => R;\n\n// User\nexport const getUser: Selector<User> = store => store.user;\n\nexport const getUserName: Selector<User['name']> = store => getUser(store).name;\n\nexport const getUserGroups: Selector<User['groups']> = store =>\n getUser(store).groups;\n\n// Storage\nexport const getStorage: Selector<Storage> = store => store.storage;\n\nexport const getCommandHistoryStorage: Selector<\n Storage['commandHistoryStorage']\n> = store => getStorage(store).commandHistoryStorage;\n\nexport const getFileStorage: Selector<Storage['fileStorage']> = store =>\n getStorage(store).fileStorage;\n\nexport const getWorkspaceStorage: Selector<\n Storage['workspaceStorage']\n> = store => getStorage(store).workspaceStorage;\n\n// Workspace\nexport const getWorkspace: Selector<Workspace> = store => store.workspace;\n\n// Settings\nexport const getSettings: Selector<WorkspaceSettings> = store =>\n getWorkspace(store).data.settings;\n\nexport const getDefaultDateTimeFormat: Selector<\n WorkspaceSettings['defaultDateTimeFormat']\n> = store => getSettings(store).defaultDateTimeFormat;\n\nexport const getDefaultDecimalFormatOptions: Selector<\n WorkspaceSettings['defaultDecimalFormatOptions']\n> = store => getSettings(store).defaultDecimalFormatOptions ?? EMPTY_OBJECT;\n\nexport const getDefaultIntegerFormatOptions: Selector<\n WorkspaceSettings['defaultIntegerFormatOptions']\n> = store => getSettings(store).defaultIntegerFormatOptions ?? EMPTY_OBJECT;\n\nexport const getFormatter: Selector<WorkspaceSettings['formatter']> = store =>\n getSettings(store).formatter;\n\nexport const getTimeZone: Selector<WorkspaceSettings['timeZone']> = store =>\n getSettings(store).timeZone;\n\nexport const getShowTimeZone: Selector<\n WorkspaceSettings['showTimeZone']\n> = store => getSettings(store).showTimeZone;\n\nexport const getShowTSeparator: Selector<\n WorkspaceSettings['showTSeparator']\n> = store => getSettings(store).showTSeparator;\n\nexport const getTruncateNumbersWithPound: Selector<\n WorkspaceSettings['truncateNumbersWithPound']\n> = store => getSettings(store).truncateNumbersWithPound;\n\nexport const getDisableMoveConfirmation: Selector<\n WorkspaceSettings['disableMoveConfirmation']\n> = store => getSettings(store).disableMoveConfirmation || false;\n\nexport const getShortcutOverrides: Selector<\n WorkspaceSettings['shortcutOverrides']\n> = store => getSettings(store).shortcutOverrides;\n\nexport const getActiveTool: Selector<RootState['activeTool']> = store =>\n store.activeTool;\n\nexport const getPlugins: Selector<RootState['plugins']> = store =>\n store.plugins ?? EMPTY_MAP;\n"],"mappings":"AAQA,IAAMA,YAAY,GAAGC,MAAM,CAACC,MAAP,CAAc,EAAd,CAArB;AAEA,IAAMC,SAAwC,GAAG,IAAIC,GAAJ,EAAjD;AAIA;AACA,OAAO,IAAMC,OAAuB,GAAGC,KAAK,IAAIA,KAAK,CAACC,IAA/C;AAEP,OAAO,IAAMC,WAAmC,GAAGF,KAAK,IAAID,OAAO,CAACC,KAAD,CAAP,CAAeG,IAApE;AAEP,OAAO,IAAMC,aAAuC,GAAGJ,KAAK,IAC1DD,OAAO,CAACC,KAAD,CAAP,CAAeK,MADV,C,CAGP;;AACA,OAAO,IAAMC,UAA6B,GAAGN,KAAK,IAAIA,KAAK,CAACO,OAArD;AAEP,OAAO,IAAMC,wBAEZ,GAAGR,KAAK,IAAIM,UAAU,CAACN,KAAD,CAAV,CAAkBS,qBAFxB;AAIP,OAAO,IAAMC,cAAgD,GAAGV,KAAK,IACnEM,UAAU,CAACN,KAAD,CAAV,CAAkBW,WADb;AAGP,OAAO,IAAMC,mBAEZ,GAAGZ,KAAK,IAAIM,UAAU,CAACN,KAAD,CAAV,CAAkBa,gBAFxB,C,CAIP;;AACA,OAAO,IAAMC,YAAiC,GAAGd,KAAK,IAAIA,KAAK,CAACe,SAAzD,C,CAEP;;AACA,OAAO,IAAMC,WAAwC,GAAGhB,KAAK,IAC3Dc,YAAY,CAACd,KAAD,CAAZ,CAAoBiB,IAApB,CAAyBC,QADpB;AAGP,OAAO,IAAMC,wBAEZ,GAAGnB,KAAK,IAAIgB,WAAW,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","getUser","store","user","getUserName","name","getUserGroups","groups","getStorage","storage","getCommandHistoryStorage","commandHistoryStorage","getFileStorage","fileStorage","getWorkspaceStorage","workspaceStorage","getWorkspace","workspace","getSettings","data","settings","getDefaultDateTimeFormat","defaultDateTimeFormat","getDefaultDecimalFormatOptions","defaultDecimalFormatOptions","getDefaultIntegerFormatOptions","defaultIntegerFormatOptions","getFormatter","formatter","getTimeZone","timeZone","getShowTimeZone","showTimeZone","getShowTSeparator","showTSeparator","getTruncateNumbersWithPound","truncateNumbersWithPound","getDisableMoveConfirmation","disableMoveConfirmation","getShortcutOverrides","shortcutOverrides","getActiveTool","activeTool","getPlugins","plugins"],"mappings":"AAQA,IAAMA,YAAY,GAAGC,MAAM,CAACC,MAAP,CAAc,EAAd,CAArB;AAEA,IAAMC,SAAwC,GAAG,IAAIC,GAAJ,EAAjD;AAIA;AACA,OAAO,IAAMC,OAAuB,GAAGC,KAAK,IAAIA,KAAK,CAACC,IAA/C;AAEP,OAAO,IAAMC,WAAmC,GAAGF,KAAK,IAAID,OAAO,CAACC,KAAD,CAAP,CAAeG,IAApE;AAEP,OAAO,IAAMC,aAAuC,GAAGJ,KAAK,IAC1DD,OAAO,CAACC,KAAD,CAAP,CAAeK,MADV,C,CAGP;;AACA,OAAO,IAAMC,UAA6B,GAAGN,KAAK,IAAIA,KAAK,CAACO,OAArD;AAEP,OAAO,IAAMC,wBAEZ,GAAGR,KAAK,IAAIM,UAAU,CAACN,KAAD,CAAV,CAAkBS,qBAFxB;AAIP,OAAO,IAAMC,cAAgD,GAAGV,KAAK,IACnEM,UAAU,CAACN,KAAD,CAAV,CAAkBW,WADb;AAGP,OAAO,IAAMC,mBAEZ,GAAGZ,KAAK,IAAIM,UAAU,CAACN,KAAD,CAAV,CAAkBa,gBAFxB,C,CAIP;;AACA,OAAO,IAAMC,YAAiC,GAAGd,KAAK,IAAIA,KAAK,CAACe,SAAzD,C,CAEP;;AACA,OAAO,IAAMC,WAAwC,GAAGhB,KAAK,IAC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C0C,OADuD,2DAC5C7C,SAD4C;AAAA,CAAxD","sourcesContent":["import type {\n RootState,\n User,\n Storage,\n Workspace,\n WorkspaceSettings,\n} from './store';\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst EMPTY_MAP: ReadonlyMap<unknown, unknown> = new Map();\n\ntype Selector<R> = (state: RootState) => R;\n\n// User\nexport const getUser: Selector<User> = store => store.user;\n\nexport const getUserName: Selector<User['name']> = store => getUser(store).name;\n\nexport const getUserGroups: Selector<User['groups']> = store =>\n getUser(store).groups;\n\n// Storage\nexport const getStorage: Selector<Storage> = store => store.storage;\n\nexport const getCommandHistoryStorage: Selector<\n Storage['commandHistoryStorage']\n> = store => getStorage(store).commandHistoryStorage;\n\nexport const getFileStorage: Selector<Storage['fileStorage']> = store =>\n getStorage(store).fileStorage;\n\nexport const getWorkspaceStorage: Selector<\n Storage['workspaceStorage']\n> = store => getStorage(store).workspaceStorage;\n\n// Workspace\nexport const getWorkspace: Selector<Workspace> = store => store.workspace;\n\n// Settings\nexport const getSettings: Selector<WorkspaceSettings> = store =>\n getWorkspace(store).data.settings;\n\nexport const getDefaultDateTimeFormat: Selector<\n WorkspaceSettings['defaultDateTimeFormat']\n> = store => getSettings(store).defaultDateTimeFormat;\n\nexport const getDefaultDecimalFormatOptions: Selector<\n WorkspaceSettings['defaultDecimalFormatOptions']\n> = store => getSettings(store).defaultDecimalFormatOptions ?? EMPTY_OBJECT;\n\nexport const getDefaultIntegerFormatOptions: Selector<\n WorkspaceSettings['defaultIntegerFormatOptions']\n> = store => getSettings(store).defaultIntegerFormatOptions ?? EMPTY_OBJECT;\n\nexport const getFormatter: Selector<WorkspaceSettings['formatter']> = store =>\n getSettings(store).formatter;\n\nexport const getTimeZone: Selector<WorkspaceSettings['timeZone']> = store =>\n getSettings(store).timeZone;\n\nexport const getShowTimeZone: Selector<\n WorkspaceSettings['showTimeZone']\n> = store => getSettings(store).showTimeZone;\n\nexport const getShowTSeparator: Selector<\n WorkspaceSettings['showTSeparator']\n> = store => getSettings(store).showTSeparator;\n\nexport const getTruncateNumbersWithPound: Selector<\n WorkspaceSettings['truncateNumbersWithPound']\n> = store => getSettings(store).truncateNumbersWithPound;\n\nexport const getDisableMoveConfirmation: Selector<\n WorkspaceSettings['disableMoveConfirmation']\n> = store => getSettings(store).disableMoveConfirmation || false;\n\nexport const getShortcutOverrides: Selector<\n WorkspaceSettings['shortcutOverrides']\n> = store => getSettings(store).shortcutOverrides;\n\nexport const getActiveTool: Selector<RootState['activeTool']> = store =>\n store.activeTool;\n\nexport const getPlugins: Selector<RootState['plugins']> = store =>\n store.plugins ?? EMPTY_MAP;\n"],"file":"selectors.js"}
package/dist/store.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["applyMiddleware","createStore","compose","combineReducers","rootMiddleware","reducers","reducerRegistry","Object","entries","map","name","reducer","register","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","store","setListener","newReducers","replaceReducer"],"sources":["../src/store.ts"],"sourcesContent":["import { applyMiddleware, createStore, compose, combineReducers } from 'redux';\nimport type { FileStorage } from '@deephaven/file-explorer';\nimport type { ValidKeyState } from '@deephaven/components';\nimport type { FormattingRule } from '@deephaven/jsapi-utils';\nimport type { PayloadAction } from './actions';\nimport rootMiddleware from './middleware';\nimport reducers from './reducers';\nimport reducerRegistry from './reducerRegistry';\n\n// A DeephavenPluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface DeephavenPluginModule {}\n\nexport type DeephavenPluginModuleMap = Map<string, DeephavenPluginModule>;\n\nexport interface UserPermissions {\n isSuperUser: boolean;\n isQueryViewOnly: boolean;\n isNonInteractive: boolean;\n canUsePanels: boolean;\n canCreateDashboard: boolean;\n canCreateCodeStudio: boolean;\n canCreateQueryMonitor: boolean;\n canCopy: boolean;\n canDownloadCsv: boolean;\n}\n\nexport interface User {\n permissions: UserPermissions;\n name: string;\n operateAs: string;\n groups: string[];\n}\n\nexport interface Storage {\n commandHistoryStorage: unknown;\n fileStorage: FileStorage;\n workspaceStorage: WorkspaceStorage;\n}\n\nexport interface WorkspaceSettings {\n defaultDateTimeFormat: string;\n defaultDecimalFormatOptions: {\n defaultFormatString?: string;\n };\n defaultIntegerFormatOptions: {\n defaultFormatString?: string;\n };\n formatter: FormattingRule[];\n timeZone: string;\n showTimeZone: boolean;\n showTSeparator: boolean;\n truncateNumbersWithPound: boolean;\n disableMoveConfirmation: boolean;\n shortcutOverrides?: {\n windows?: { [id: string]: ValidKeyState };\n mac?: { [id: string]: ValidKeyState };\n };\n}\n\nexport interface WorkspaceData {\n closed: unknown[];\n filterSets: unknown[];\n layoutConfig: unknown[];\n links: unknown;\n settings: WorkspaceSettings;\n}\n\nexport interface Workspace {\n data: WorkspaceData;\n}\nexport type DashboardData = Record<string, unknown>;\n\nexport interface WorkspaceStorage {\n load(): Promise<Workspace>;\n save(workspace: Workspace): Promise<Workspace>;\n}\n\nexport type RootState = {\n activeTool: string;\n plugins: DeephavenPluginModuleMap;\n storage: Storage;\n user: User;\n workspace: Workspace;\n dashboardData: Record<string, DashboardData>;\n layoutStorage: unknown;\n};\n\nObject.entries(reducers).map(([name, reducer]) =>\n reducerRegistry.register(name, reducer)\n);\n\nconst composeEnhancers: typeof compose =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst store = createStore<RootState, PayloadAction, unknown, unknown>(\n combineReducers(reducerRegistry.reducers),\n composeEnhancers(applyMiddleware(...rootMiddleware))\n);\n\nreducerRegistry.setListener(newReducers => {\n store.replaceReducer(combineReducers(newReducers));\n});\n\nexport default store;\n\nexport type RootDispatch = typeof store.dispatch;\n"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,WAA1B,EAAuCC,OAAvC,EAAgDC,eAAhD,QAAuE,OAAvE;OAKOC,c;OACAC,Q;OACAC,e,8BAEP;AACA;;AA8EAC,MAAM,CAACC,OAAP,CAAeH,QAAf,EAAyBI,GAAzB,CAA6B;EAAA,IAAC,CAACC,IAAD,EAAOC,OAAP,CAAD;EAAA,OAC3BL,eAAe,CAACM,QAAhB,CAAyBF,IAAzB,EAA+BC,OAA/B,CAD2B;AAAA,CAA7B;AAIA,IAAME,gBAAgC,GACpC;AACCC,MAAD,CAAgBC,oCAAhB,IAAwDb,OAF1D;AAIA,IAAMc,KAAK,GAAGf,WAAW,CACvBE,eAAe,CAACG,eAAe,CAACD,QAAjB,CADQ,EAEvBQ,gBAAgB,CAACb,eAAe,CAAC,GAAGI,cAAJ,CAAhB,CAFO,CAAzB;AAKAE,eAAe,CAACW,WAAhB,CAA4BC,WAAW,IAAI;EACzCF,KAAK,CAACG,cAAN,CAAqBhB,eAAe,CAACe,WAAD,CAApC;AACD,CAFD;AAIA,eAAeF,KAAf"}
1
+ {"version":3,"sources":["../src/store.ts"],"names":["applyMiddleware","createStore","compose","combineReducers","rootMiddleware","reducers","reducerRegistry","Object","entries","map","name","reducer","register","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","store","setListener","newReducers","replaceReducer"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,WAA1B,EAAuCC,OAAvC,EAAgDC,eAAhD,QAAuE,OAAvE;OAKOC,c;OACAC,Q;OACAC,e,8BAEP;AACA;;AA8EAC,MAAM,CAACC,OAAP,CAAeH,QAAf,EAAyBI,GAAzB,CAA6B;AAAA,MAAC,CAACC,IAAD,EAAOC,OAAP,CAAD;AAAA,SAC3BL,eAAe,CAACM,QAAhB,CAAyBF,IAAzB,EAA+BC,OAA/B,CAD2B;AAAA,CAA7B;AAIA,IAAME,gBAAgC,GACpC;AACCC,MAAD,CAAgBC,oCAAhB,IAAwDb,OAF1D;AAIA,IAAMc,KAAK,GAAGf,WAAW,CACvBE,eAAe,CAACG,eAAe,CAACD,QAAjB,CADQ,EAEvBQ,gBAAgB,CAACb,eAAe,CAAC,GAAGI,cAAJ,CAAhB,CAFO,CAAzB;AAKAE,eAAe,CAACW,WAAhB,CAA4BC,WAAW,IAAI;AACzCF,EAAAA,KAAK,CAACG,cAAN,CAAqBhB,eAAe,CAACe,WAAD,CAApC;AACD,CAFD;AAIA,eAAeF,KAAf","sourcesContent":["import { applyMiddleware, createStore, compose, combineReducers } from 'redux';\nimport type { FileStorage } from '@deephaven/file-explorer';\nimport type { ValidKeyState } from '@deephaven/components';\nimport type { FormattingRule } from '@deephaven/jsapi-utils';\nimport type { PayloadAction } from './actions';\nimport rootMiddleware from './middleware';\nimport reducers from './reducers';\nimport reducerRegistry from './reducerRegistry';\n\n// A DeephavenPluginModule. This interface should have new fields added to it from different levels of plugins.\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface DeephavenPluginModule {}\n\nexport type DeephavenPluginModuleMap = Map<string, DeephavenPluginModule>;\n\nexport interface UserPermissions {\n isSuperUser: boolean;\n isQueryViewOnly: boolean;\n isNonInteractive: boolean;\n canUsePanels: boolean;\n canCreateDashboard: boolean;\n canCreateCodeStudio: boolean;\n canCreateQueryMonitor: boolean;\n canCopy: boolean;\n canDownloadCsv: boolean;\n}\n\nexport interface User {\n permissions: UserPermissions;\n name: string;\n operateAs: string;\n groups: string[];\n}\n\nexport interface Storage {\n commandHistoryStorage: unknown;\n fileStorage: FileStorage;\n workspaceStorage: WorkspaceStorage;\n}\n\nexport interface WorkspaceSettings {\n defaultDateTimeFormat: string;\n defaultDecimalFormatOptions: {\n defaultFormatString?: string;\n };\n defaultIntegerFormatOptions: {\n defaultFormatString?: string;\n };\n formatter: FormattingRule[];\n timeZone: string;\n showTimeZone: boolean;\n showTSeparator: boolean;\n truncateNumbersWithPound: boolean;\n disableMoveConfirmation: boolean;\n shortcutOverrides?: {\n windows?: { [id: string]: ValidKeyState };\n mac?: { [id: string]: ValidKeyState };\n };\n}\n\nexport interface WorkspaceData {\n closed: unknown[];\n filterSets: unknown[];\n layoutConfig: unknown[];\n links: unknown;\n settings: WorkspaceSettings;\n}\n\nexport interface Workspace {\n data: WorkspaceData;\n}\nexport type DashboardData = Record<string, unknown>;\n\nexport interface WorkspaceStorage {\n load(): Promise<Workspace>;\n save(workspace: Workspace): Promise<Workspace>;\n}\n\nexport type RootState = {\n activeTool: string;\n plugins: DeephavenPluginModuleMap;\n storage: Storage;\n user: User;\n workspace: Workspace;\n dashboardData: Record<string, DashboardData>;\n layoutStorage: unknown;\n};\n\nObject.entries(reducers).map(([name, reducer]) =>\n reducerRegistry.register(name, reducer)\n);\n\nconst composeEnhancers: typeof compose =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n\nconst store = createStore<RootState, PayloadAction, unknown, unknown>(\n combineReducers(reducerRegistry.reducers),\n composeEnhancers(applyMiddleware(...rootMiddleware))\n);\n\nreducerRegistry.setListener(newReducers => {\n store.replaceReducer(combineReducers(newReducers));\n});\n\nexport default store;\n\nexport type RootDispatch = typeof store.dispatch;\n"],"file":"store.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/redux",
3
- "version": "0.15.6-vite.21+822fd63",
3
+ "version": "0.15.6",
4
4
  "description": "Deephaven Redux",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "source": "src/index.js",
14
14
  "main": "dist/index.js",
15
- "module": "dist/index.js",
16
15
  "types": "dist/index.d.ts",
17
16
  "engines": {
18
17
  "node": ">=16"
@@ -28,13 +27,13 @@
28
27
  "start": "cross-env NODE_ENV=development npm run watch"
29
28
  },
30
29
  "dependencies": {
31
- "@deephaven/jsapi-utils": "^0.15.6-vite.21+822fd63",
32
- "@deephaven/log": "^0.15.6-vite.21+822fd63",
30
+ "@deephaven/jsapi-utils": "^0.15.6",
31
+ "@deephaven/log": "^0.15.5",
33
32
  "deep-equal": "^2.0.5",
34
- "redux-thunk": "2.4.1"
33
+ "redux-thunk": "2.4.1 "
35
34
  },
36
35
  "devDependencies": {
37
- "@deephaven/tsconfig": "^0.15.6-vite.21+822fd63"
36
+ "@deephaven/tsconfig": "^0.15.2"
38
37
  },
39
38
  "peerDependencies": {
40
39
  "redux": "^4.2.0"
@@ -45,5 +44,5 @@
45
44
  "publishConfig": {
46
45
  "access": "public"
47
46
  },
48
- "gitHead": "822fd633ddb5c62b896547cf90b1cad01799a346"
47
+ "gitHead": "c54e11a1fe772b855b6bac2a1534857c8cedc8f8"
49
48
  }