@deephaven/dashboard 0.78.2 → 0.78.4
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,6 +1,10 @@
|
|
|
1
|
-
import { DashboardData, PluginDataMap, RootState } from '@deephaven/redux';
|
|
1
|
+
import { AppStore, DashboardData, PluginDataMap, RootDispatch, RootState } from '@deephaven/redux';
|
|
2
|
+
import { TypedUseSelectorHook } from 'react-redux';
|
|
2
3
|
import { ClosedPanels, OpenedPanelMap } from '../PanelManager';
|
|
3
4
|
type Selector<R> = (state: RootState) => R;
|
|
5
|
+
export declare const useAppDispatch: () => RootDispatch;
|
|
6
|
+
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
7
|
+
export declare const useAppStore: () => AppStore;
|
|
4
8
|
/**
|
|
5
9
|
* Retrieve the data for all dashboards
|
|
6
10
|
* @param store The redux store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/redux/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,aAAa,EACb,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/redux/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EAEb,aAAa,EACb,YAAY,EACZ,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EAIrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQ/D,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,CAAC;AAK3C,eAAO,MAAM,cAAc,EAAE,MAAM,YAA0B,CAAC;AAC9D,eAAO,MAAM,cAAc,EAAE,oBAAoB,CAAC,SAAS,CAAe,CAAC;AAC3E,eAAO,MAAM,WAAW,EAAE,MAAM,QAAmB,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CACzC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CACC,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UACpB,SAAS,eACH,MAAM,KAClB,aAAyE,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,UAC/B,SAAS,eACH,MAAM,iBAEyD,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,UACjC,SAAS,eACH,MAAM,mBAGW,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,uBAChC,SAAS,eACH,MAAM,qBAE+C,CAAC;AAErE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,uBAC7B,SAAS,eACH,MAAM,YACT,MAAM,MACmD,CAAC"}
|
package/dist/redux/selectors.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import { useDispatch, useSelector, useStore } from 'react-redux';
|
|
1
2
|
var EMPTY_MAP = new Map();
|
|
2
3
|
var EMPTY_OBJECT = Object.freeze({});
|
|
3
4
|
var EMPTY_ARRAY = Object.freeze([]);
|
|
5
|
+
// https://react-redux.js.org/using-react-redux/usage-with-typescript#define-typed-hooks
|
|
6
|
+
// Defined in @deephaven/dashboard, as that's the most common package with React and @deephaven/redux as dependencies
|
|
7
|
+
// We could have another package specifically for this, but it's not really necessary.
|
|
8
|
+
export var useAppDispatch = useDispatch;
|
|
9
|
+
export var useAppSelector = useSelector;
|
|
10
|
+
export var useAppStore = useStore;
|
|
11
|
+
|
|
4
12
|
/**
|
|
5
13
|
* Retrieve the data for all dashboards
|
|
6
14
|
* @param store The redux store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","names":["EMPTY_MAP","Map","EMPTY_OBJECT","Object","freeze","EMPTY_ARRAY","getAllDashboardsData","store","dashboardData","getDashboardData","dashboardId","_getAllDashboardsData","getClosedPanelsForDashboard","_getDashboardData$clo","closed","getOpenedPanelMapForDashboard","_getDashboardData$ope","openedMap","getPluginDataMapForDashboard","_getDashboardData$plu","pluginDataMap","getPluginDataForDashboard","pluginId"],"sources":["../../src/redux/selectors.ts"],"sourcesContent":["import {\n DashboardData,\n PluginData,\n PluginDataMap,\n RootState,\n} from '@deephaven/redux';\nimport { ClosedPanels, OpenedPanelMap } from '../PanelManager';\n\nconst EMPTY_MAP = new Map();\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst EMPTY_ARRAY = Object.freeze([]);\n\ntype Selector<R> = (state: RootState) => R;\n\n/**\n * Retrieve the data for all dashboards\n * @param store The redux store\n * @returns Property mapping dashboard ID to data for that dashboard\n */\nexport const getAllDashboardsData: Selector<\n Record<string, DashboardData>\n> = store => store.dashboardData;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The data object for the dashboard with the specified ID\n */\nexport const getDashboardData = (\n store: RootState,\n dashboardId: string\n): DashboardData => getAllDashboardsData(store)[dashboardId] ?? EMPTY_OBJECT;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The ClosedPanel array of panels that were previously closed/dehydrated\n */\nexport const getClosedPanelsForDashboard = (\n store: RootState,\n dashboardId: string\n): ClosedPanels =>\n (getDashboardData(store, dashboardId).closed ?? EMPTY_ARRAY) as ClosedPanels;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The map of panel IDs to components of all currently open components\n */\nexport const getOpenedPanelMapForDashboard = (\n store: RootState,\n dashboardId: string\n): OpenedPanelMap =>\n (getDashboardData(store, dashboardId).openedMap ??\n EMPTY_MAP) as OpenedPanelMap;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The map of plugin IDs to data for all plugins on the dashboard\n */\nexport const getPluginDataMapForDashboard = <T = PluginData>(\n store: RootState,\n dashboardId: string\n): PluginDataMap<T> =>\n getDashboardData(store, dashboardId).pluginDataMap ?? EMPTY_OBJECT;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @param pluginId The plugin ID to get data for\n * @returns The plugin data\n */\nexport const getPluginDataForDashboard = <T = PluginData>(\n store: RootState,\n dashboardId: string,\n pluginId: string\n): T => getPluginDataMapForDashboard<T>(store, dashboardId)[pluginId];\n"],"mappings":"AAQA,
|
|
1
|
+
{"version":3,"file":"selectors.js","names":["useDispatch","useSelector","useStore","EMPTY_MAP","Map","EMPTY_OBJECT","Object","freeze","EMPTY_ARRAY","useAppDispatch","useAppSelector","useAppStore","getAllDashboardsData","store","dashboardData","getDashboardData","dashboardId","_getAllDashboardsData","getClosedPanelsForDashboard","_getDashboardData$clo","closed","getOpenedPanelMapForDashboard","_getDashboardData$ope","openedMap","getPluginDataMapForDashboard","_getDashboardData$plu","pluginDataMap","getPluginDataForDashboard","pluginId"],"sources":["../../src/redux/selectors.ts"],"sourcesContent":["import {\n AppStore,\n DashboardData,\n PluginData,\n PluginDataMap,\n RootDispatch,\n RootState,\n} from '@deephaven/redux';\nimport {\n TypedUseSelectorHook,\n useDispatch,\n useSelector,\n useStore,\n} from 'react-redux';\nimport { ClosedPanels, OpenedPanelMap } from '../PanelManager';\n\nconst EMPTY_MAP = new Map();\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst EMPTY_ARRAY = Object.freeze([]);\n\ntype Selector<R> = (state: RootState) => R;\n\n// https://react-redux.js.org/using-react-redux/usage-with-typescript#define-typed-hooks\n// Defined in @deephaven/dashboard, as that's the most common package with React and @deephaven/redux as dependencies\n// We could have another package specifically for this, but it's not really necessary.\nexport const useAppDispatch: () => RootDispatch = useDispatch;\nexport const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;\nexport const useAppStore: () => AppStore = useStore;\n\n/**\n * Retrieve the data for all dashboards\n * @param store The redux store\n * @returns Property mapping dashboard ID to data for that dashboard\n */\nexport const getAllDashboardsData: Selector<\n Record<string, DashboardData>\n> = store => store.dashboardData;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The data object for the dashboard with the specified ID\n */\nexport const getDashboardData = (\n store: RootState,\n dashboardId: string\n): DashboardData => getAllDashboardsData(store)[dashboardId] ?? EMPTY_OBJECT;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The ClosedPanel array of panels that were previously closed/dehydrated\n */\nexport const getClosedPanelsForDashboard = (\n store: RootState,\n dashboardId: string\n): ClosedPanels =>\n (getDashboardData(store, dashboardId).closed ?? EMPTY_ARRAY) as ClosedPanels;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The map of panel IDs to components of all currently open components\n */\nexport const getOpenedPanelMapForDashboard = (\n store: RootState,\n dashboardId: string\n): OpenedPanelMap =>\n (getDashboardData(store, dashboardId).openedMap ??\n EMPTY_MAP) as OpenedPanelMap;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @returns The map of plugin IDs to data for all plugins on the dashboard\n */\nexport const getPluginDataMapForDashboard = <T = PluginData>(\n store: RootState,\n dashboardId: string\n): PluginDataMap<T> =>\n getDashboardData(store, dashboardId).pluginDataMap ?? EMPTY_OBJECT;\n\n/**\n * @param store The redux store\n * @param dashboardId The dashboard ID to get data for\n * @param pluginId The plugin ID to get data for\n * @returns The plugin data\n */\nexport const getPluginDataForDashboard = <T = PluginData>(\n store: RootState,\n dashboardId: string,\n pluginId: string\n): T => getPluginDataMapForDashboard<T>(store, dashboardId)[pluginId];\n"],"mappings":"AAQA,SAEEA,WAAW,EACXC,WAAW,EACXC,QAAQ,QACH,aAAa;AAGpB,IAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAA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BV,gBAAgB,CAACF,KAAK,EAAEG,WAAW,CAAC,CAACU,aAAa,cAAAD,qBAAA,cAAAA,qBAAA,GAAIpB,YAAY;AAAA;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMsB,yBAAyB,GAAGA,CACvCd,KAAgB,EAChBG,WAAmB,EACnBY,QAAgB,KACVJ,4BAA4B,CAAIX,KAAK,EAAEG,WAAW,CAAC,CAACY,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/dashboard",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.4",
|
|
4
4
|
"description": "Deephaven Dashboard",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@deephaven/components": "^0.78.
|
|
26
|
-
"@deephaven/golden-layout": "^0.78.
|
|
25
|
+
"@deephaven/components": "^0.78.4",
|
|
26
|
+
"@deephaven/golden-layout": "^0.78.4",
|
|
27
27
|
"@deephaven/log": "^0.78.0",
|
|
28
28
|
"@deephaven/react-hooks": "^0.78.0",
|
|
29
|
-
"@deephaven/redux": "^0.78.
|
|
29
|
+
"@deephaven/redux": "^0.78.4",
|
|
30
30
|
"@deephaven/utils": "^0.78.0",
|
|
31
31
|
"fast-deep-equal": "^3.1.3",
|
|
32
32
|
"lodash.ismatch": "^4.1.1",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "758f09a1c49f76633d8e8da0f828a198c86b5f5f"
|
|
54
54
|
}
|