@deephaven/app-utils 0.73.1-beta.0 → 0.74.1-beta.1
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/components/AppDashboards.d.ts +18 -0
- package/dist/components/AppDashboards.d.ts.map +1 -0
- package/dist/components/AppDashboards.js +71 -0
- package/dist/components/AppDashboards.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/package.json +20 -18
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import LayoutManager, { ItemConfigType, Settings as LayoutSettings } from '@deephaven/golden-layout';
|
|
3
|
+
interface AppDashboardsProps {
|
|
4
|
+
dashboards: {
|
|
5
|
+
id: string;
|
|
6
|
+
layoutConfig: ItemConfigType[];
|
|
7
|
+
layoutSettings?: Partial<LayoutSettings>;
|
|
8
|
+
key?: string;
|
|
9
|
+
}[];
|
|
10
|
+
activeDashboard: string;
|
|
11
|
+
onLayoutInitialized?: () => void;
|
|
12
|
+
onGoldenLayoutChange: (goldenLayout: LayoutManager) => void;
|
|
13
|
+
plugins: JSX.Element[];
|
|
14
|
+
emptyDashboard?: JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export declare function AppDashboards({ dashboards, activeDashboard, onLayoutInitialized, onGoldenLayoutChange, plugins, emptyDashboard, }: AppDashboardsProps): JSX.Element;
|
|
17
|
+
export default AppDashboards;
|
|
18
|
+
//# sourceMappingURL=AppDashboards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppDashboards.d.ts","sourceRoot":"","sources":["../../src/components/AppDashboards.tsx"],"names":[],"mappings":";AAWA,OAAO,aAAa,EAAE,EACpB,cAAc,EACd,QAAQ,IAAI,cAAc,EAC3B,MAAM,0BAA0B,CAAC;AAGlC,UAAU,kBAAkB;IAC1B,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,YAAY,EAAE,cAAc,EAAE,CAAC;QAC/B,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;QACzC,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACJ,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,oBAAoB,EAAE,CAAC,YAAY,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5D,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,OAAO,EACP,cAAmC,GACpC,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAgDlC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import React, { useCallback } from 'react';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { DashboardUtils, LazyDashboard } from '@deephaven/dashboard';
|
|
11
|
+
import { sanitizeVariableDescriptor, useObjectFetcher } from '@deephaven/jsapi-bootstrap';
|
|
12
|
+
import { LoadingOverlay } from '@deephaven/components';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
export function AppDashboards(_ref) {
|
|
15
|
+
var {
|
|
16
|
+
dashboards,
|
|
17
|
+
activeDashboard,
|
|
18
|
+
onLayoutInitialized,
|
|
19
|
+
onGoldenLayoutChange,
|
|
20
|
+
plugins,
|
|
21
|
+
emptyDashboard = /*#__PURE__*/_jsx(LoadingOverlay, {})
|
|
22
|
+
} = _ref;
|
|
23
|
+
var fetchObject = useObjectFetcher();
|
|
24
|
+
var hydratePanel = useCallback((hydrateProps, id) => {
|
|
25
|
+
var {
|
|
26
|
+
metadata
|
|
27
|
+
} = hydrateProps;
|
|
28
|
+
try {
|
|
29
|
+
if (metadata != null) {
|
|
30
|
+
var widget = sanitizeVariableDescriptor(metadata);
|
|
31
|
+
return _objectSpread(_objectSpread({
|
|
32
|
+
fetch: function () {
|
|
33
|
+
var _fetch = _asyncToGenerator(function* () {
|
|
34
|
+
return fetchObject(widget);
|
|
35
|
+
});
|
|
36
|
+
function fetch() {
|
|
37
|
+
return _fetch.apply(this, arguments);
|
|
38
|
+
}
|
|
39
|
+
return fetch;
|
|
40
|
+
}()
|
|
41
|
+
}, hydrateProps), {}, {
|
|
42
|
+
localDashboardId: id
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
} catch (e) {
|
|
46
|
+
// Ignore being unable to get the variable descriptor, do the default dashboard hydration
|
|
47
|
+
}
|
|
48
|
+
return DashboardUtils.hydrate(hydrateProps, id);
|
|
49
|
+
}, [fetchObject]);
|
|
50
|
+
return /*#__PURE__*/_jsx("div", {
|
|
51
|
+
className: "tab-content",
|
|
52
|
+
children: dashboards.map(d => /*#__PURE__*/_jsx("div", {
|
|
53
|
+
className: classNames('tab-pane', {
|
|
54
|
+
active: d.id === activeDashboard
|
|
55
|
+
}),
|
|
56
|
+
children: /*#__PURE__*/_jsx(LazyDashboard, {
|
|
57
|
+
id: d.id,
|
|
58
|
+
isActive: d.id === activeDashboard,
|
|
59
|
+
emptyDashboard: emptyDashboard,
|
|
60
|
+
layoutConfig: d.layoutConfig,
|
|
61
|
+
layoutSettings: d.layoutSettings,
|
|
62
|
+
onLayoutInitialized: onLayoutInitialized,
|
|
63
|
+
onGoldenLayoutChange: onGoldenLayoutChange,
|
|
64
|
+
hydrate: hydratePanel,
|
|
65
|
+
plugins: plugins
|
|
66
|
+
}, d.key)
|
|
67
|
+
}, d.id))
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export default AppDashboards;
|
|
71
|
+
//# sourceMappingURL=AppDashboards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppDashboards.js","names":["React","useCallback","classNames","DashboardUtils","LazyDashboard","sanitizeVariableDescriptor","useObjectFetcher","LoadingOverlay","jsx","_jsx","AppDashboards","_ref","dashboards","activeDashboard","onLayoutInitialized","onGoldenLayoutChange","plugins","emptyDashboard","fetchObject","hydratePanel","hydrateProps","id","metadata","widget","_objectSpread","fetch","_fetch","_asyncToGenerator","apply","arguments","localDashboardId","e","hydrate","className","children","map","d","active","isActive","layoutConfig","layoutSettings","key"],"sources":["../../src/components/AppDashboards.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport classNames from 'classnames';\nimport {\n DashboardUtils,\n DehydratedDashboardPanelProps,\n LazyDashboard,\n} from '@deephaven/dashboard';\nimport {\n sanitizeVariableDescriptor,\n useObjectFetcher,\n} from '@deephaven/jsapi-bootstrap';\nimport LayoutManager, {\n ItemConfigType,\n Settings as LayoutSettings,\n} from '@deephaven/golden-layout';\nimport { LoadingOverlay } from '@deephaven/components';\n\ninterface AppDashboardsProps {\n dashboards: {\n id: string;\n layoutConfig: ItemConfigType[];\n layoutSettings?: Partial<LayoutSettings>;\n key?: string;\n }[];\n activeDashboard: string;\n onLayoutInitialized?: () => void;\n onGoldenLayoutChange: (goldenLayout: LayoutManager) => void;\n plugins: JSX.Element[];\n emptyDashboard?: JSX.Element;\n}\n\nexport function AppDashboards({\n dashboards,\n activeDashboard,\n onLayoutInitialized,\n onGoldenLayoutChange,\n plugins,\n emptyDashboard = <LoadingOverlay />,\n}: AppDashboardsProps): JSX.Element {\n const fetchObject = useObjectFetcher();\n\n const hydratePanel = useCallback(\n (hydrateProps: DehydratedDashboardPanelProps, id: string) => {\n const { metadata } = hydrateProps;\n try {\n if (metadata != null) {\n const widget = sanitizeVariableDescriptor(metadata);\n return {\n fetch: async () => fetchObject(widget),\n ...hydrateProps,\n localDashboardId: id,\n };\n }\n } catch (e: unknown) {\n // Ignore being unable to get the variable descriptor, do the default dashboard hydration\n }\n return DashboardUtils.hydrate(hydrateProps, id);\n },\n [fetchObject]\n );\n\n return (\n <div className=\"tab-content\">\n {dashboards.map(d => (\n <div\n key={d.id}\n className={classNames('tab-pane', {\n active: d.id === activeDashboard,\n })}\n >\n <LazyDashboard\n id={d.id}\n key={d.key}\n isActive={d.id === activeDashboard}\n emptyDashboard={emptyDashboard}\n layoutConfig={d.layoutConfig}\n layoutSettings={d.layoutSettings}\n onLayoutInitialized={onLayoutInitialized}\n onGoldenLayoutChange={onGoldenLayoutChange}\n hydrate={hydratePanel}\n plugins={plugins}\n />\n </div>\n ))}\n </div>\n );\n}\n\nexport default AppDashboards;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,cAAc,EAEdC,aAAa,QACR,sBAAsB;AAC7B,SACEC,0BAA0B,EAC1BC,gBAAgB,QACX,4BAA4B;AAKnC,SAASC,cAAc,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgBvD,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAOO;EAAA,IAPN;IAC5BC,UAAU;IACVC,eAAe;IACfC,mBAAmB;IACnBC,oBAAoB;IACpBC,OAAO;IACPC,cAAc,gBAAGR,IAAA,CAACF,cAAc,IAAE;EAChB,CAAC,GAAAI,IAAA;EACnB,IAAMO,WAAW,GAAGZ,gBAAgB,CAAC,CAAC;EAEtC,IAAMa,YAAY,GAAGlB,WAAW,CAC9B,CAACmB,YAA2C,EAAEC,EAAU,KAAK;IAC3D,IAAM;MAAEC;IAAS,CAAC,GAAGF,YAAY;IACjC,IAAI;MACF,IAAIE,QAAQ,IAAI,IAAI,EAAE;QACpB,IAAMC,MAAM,GAAGlB,0BAA0B,CAACiB,QAAQ,CAAC;QACnD,OAAAE,aAAA,CAAAA,aAAA;UACEC,KAAK;YAAA,IAAAC,MAAA,GAAAC,iBAAA,CAAE;cAAA,OAAYT,WAAW,CAACK,MAAM,CAAC;YAAA;YAAA,SAAAE,MAAA;cAAA,OAAAC,MAAA,CAAAE,KAAA,OAAAC,SA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AAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './AppBootstrap';\nexport * from './AuthBootstrap';\nexport * from './ConnectionBootstrap';\nexport * from './ConnectionContext';\nexport * from './FontBootstrap';\nexport * from './FontsLoaded';\nexport * from './PluginsBootstrap';\nexport * from './ThemeBootstrap';\nexport * from './useConnection';\nexport * from './useServerConfig';\nexport * from './useUser';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './AppBootstrap';\nexport * from './AppDashboards';\nexport * from './AuthBootstrap';\nexport * from './ConnectionBootstrap';\nexport * from './ConnectionContext';\nexport * from './FontBootstrap';\nexport * from './FontsLoaded';\nexport * from './PluginsBootstrap';\nexport * from './ThemeBootstrap';\nexport * from './useConnection';\nexport * from './useServerConfig';\nexport * from './useUser';\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/app-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.74.1-beta.1+5f497611",
|
|
4
4
|
"description": "Deephaven App Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,25 +29,27 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@adobe/react-spectrum": "^3.34.1",
|
|
32
|
-
"@deephaven/auth-plugins": "^0.
|
|
33
|
-
"@deephaven/chart": "^0.
|
|
34
|
-
"@deephaven/components": "^0.
|
|
35
|
-
"@deephaven/console": "^0.
|
|
36
|
-
"@deephaven/dashboard": "^0.
|
|
37
|
-
"@deephaven/dashboard-core-plugins": "^0.
|
|
38
|
-
"@deephaven/
|
|
39
|
-
"@deephaven/
|
|
40
|
-
"@deephaven/
|
|
41
|
-
"@deephaven/jsapi-
|
|
32
|
+
"@deephaven/auth-plugins": "^0.74.1-beta.1+5f497611",
|
|
33
|
+
"@deephaven/chart": "^0.74.1-beta.1+5f497611",
|
|
34
|
+
"@deephaven/components": "^0.74.1-beta.1+5f497611",
|
|
35
|
+
"@deephaven/console": "^0.74.1-beta.1+5f497611",
|
|
36
|
+
"@deephaven/dashboard": "^0.74.1-beta.1+5f497611",
|
|
37
|
+
"@deephaven/dashboard-core-plugins": "^0.74.1-beta.1+5f497611",
|
|
38
|
+
"@deephaven/golden-layout": "^0.74.1-beta.1+5f497611",
|
|
39
|
+
"@deephaven/icons": "^0.74.1-beta.1+5f497611",
|
|
40
|
+
"@deephaven/iris-grid": "^0.74.1-beta.1+5f497611",
|
|
41
|
+
"@deephaven/jsapi-bootstrap": "^0.74.1-beta.1+5f497611",
|
|
42
|
+
"@deephaven/jsapi-components": "^0.74.1-beta.1+5f497611",
|
|
42
43
|
"@deephaven/jsapi-types": "1.0.0-dev0.33.1",
|
|
43
|
-
"@deephaven/jsapi-utils": "^0.
|
|
44
|
-
"@deephaven/log": "^0.
|
|
45
|
-
"@deephaven/plugin": "^0.
|
|
46
|
-
"@deephaven/react-hooks": "^0.
|
|
47
|
-
"@deephaven/redux": "^0.
|
|
48
|
-
"@deephaven/utils": "^0.
|
|
44
|
+
"@deephaven/jsapi-utils": "^0.74.1-beta.1+5f497611",
|
|
45
|
+
"@deephaven/log": "^0.74.1-beta.1+5f497611",
|
|
46
|
+
"@deephaven/plugin": "^0.74.1-beta.1+5f497611",
|
|
47
|
+
"@deephaven/react-hooks": "^0.74.1-beta.1+5f497611",
|
|
48
|
+
"@deephaven/redux": "^0.74.1-beta.1+5f497611",
|
|
49
|
+
"@deephaven/utils": "^0.74.1-beta.1+5f497611",
|
|
49
50
|
"@paciolan/remote-component": "2.13.0",
|
|
50
51
|
"@paciolan/remote-module-loader": "^3.0.2",
|
|
52
|
+
"classnames": "^2.5.1",
|
|
51
53
|
"fira": "mozilla/fira#4.202"
|
|
52
54
|
},
|
|
53
55
|
"peerDependencies": {
|
|
@@ -65,5 +67,5 @@
|
|
|
65
67
|
"publishConfig": {
|
|
66
68
|
"access": "public"
|
|
67
69
|
},
|
|
68
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "5f4976115bfc016e6d9cbe9fd77413c3fd8f8353"
|
|
69
71
|
}
|