@deephaven/dashboard 0.46.1-beta.0 → 0.46.1-beta.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.
package/dist/Dashboard.js CHANGED
@@ -11,6 +11,8 @@ import LayoutUtils from "./layout/LayoutUtils.js";
11
11
  import PanelPlaceholder from "./PanelPlaceholder.js";
12
12
  import DashboardLayout from "./DashboardLayout.js";
13
13
  import "./Dashboard.css";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  var RESIZE_THROTTLE = 100;
15
17
  var DEFAULT_CALLBACK = () => undefined;
16
18
  var EMPTY_OBJECT = Object.freeze({});
@@ -72,22 +74,24 @@ export function Dashboard(_ref) {
72
74
  window.removeEventListener('resize', handleResize);
73
75
  };
74
76
  }, [handleResize]);
75
- return /*#__PURE__*/React.createElement("div", {
76
- className: "dashboard-container w-100 h-100"
77
- }, /*#__PURE__*/React.createElement("div", {
78
- className: "w-100 h-100",
79
- ref: layoutElement
80
- }), isInitialized && layout && /*#__PURE__*/React.createElement(DashboardLayout, {
81
- emptyDashboard: emptyDashboard,
82
- id: id,
83
- layout: layout,
84
- layoutConfig: layoutConfig,
85
- onLayoutChange: onLayoutConfigChange,
86
- onLayoutInitialized: onLayoutInitialized,
87
- hydrate: hydrate,
88
- dehydrate: dehydrate,
89
- panelWrapper: panelWrapper
90
- }, children));
77
+ return /*#__PURE__*/_jsxs("div", {
78
+ className: "dashboard-container w-100 h-100",
79
+ children: [/*#__PURE__*/_jsx("div", {
80
+ className: "w-100 h-100",
81
+ ref: layoutElement
82
+ }), isInitialized && layout && /*#__PURE__*/_jsx(DashboardLayout, {
83
+ emptyDashboard: emptyDashboard,
84
+ id: id,
85
+ layout: layout,
86
+ layoutConfig: layoutConfig,
87
+ onLayoutChange: onLayoutConfigChange,
88
+ onLayoutInitialized: onLayoutInitialized,
89
+ hydrate: hydrate,
90
+ dehydrate: dehydrate,
91
+ panelWrapper: panelWrapper,
92
+ children: children
93
+ })]
94
+ });
91
95
  }
92
96
  export default Dashboard;
93
97
  //# sourceMappingURL=Dashboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.js","names":["React","useEffect","useMemo","useRef","useState","throttle","GoldenLayout","LayoutUtils","PanelPlaceholder","DashboardLayout","RESIZE_THROTTLE","DEFAULT_CALLBACK","undefined","EMPTY_OBJECT","Object","freeze","Dashboard","id","children","emptyDashboard","layoutConfig","layoutSettings","onLayoutConfigChange","onGoldenLayoutChange","onLayoutInitialized","fallbackComponent","hydrate","dehydrate","panelWrapper","layoutElement","isInitialized","setIsInitialized","layout","setLayout","initDashboard","current","config","makeDefaultLayout","settings","assign","content","newLayout","onInit","off","on","setFallbackComponent","init","destroy","handleResize","isInitialised","updateSize","initResizeEventListner","window","addEventListener","removeEventListener"],"sources":["../src/Dashboard.tsx"],"sourcesContent":["import React, {\n ComponentType,\n ForwardRefExoticComponent,\n RefAttributes,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport throttle from 'lodash.throttle';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type { ItemConfigType } from '@deephaven/golden-layout';\nimport './layout/GoldenLayout.scss';\nimport LayoutUtils from './layout/LayoutUtils';\nimport PanelPlaceholder from './PanelPlaceholder';\nimport DashboardLayout from './DashboardLayout';\nimport {\n PanelDehydrateFunction,\n PanelHydrateFunction,\n PanelProps,\n} from './DashboardPlugin';\nimport './Dashboard.scss';\n\nconst RESIZE_THROTTLE = 100;\n\nconst DEFAULT_CALLBACK = () => undefined;\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nexport type DashboardProps = {\n id?: string;\n children?: React.ReactNode | React.ReactNode[];\n emptyDashboard?: React.ReactNode;\n layoutConfig?: ItemConfigType[];\n layoutSettings?: Record<string, unknown>;\n onLayoutConfigChange?: () => void;\n onGoldenLayoutChange?: (goldenLayout: GoldenLayout) => void;\n onLayoutInitialized?: () => void;\n fallbackComponent?: ForwardRefExoticComponent<\n PanelProps & RefAttributes<HTMLDivElement>\n >;\n hydrate?: PanelHydrateFunction;\n dehydrate?: PanelDehydrateFunction;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType;\n};\n\nexport function Dashboard({\n id = 'default',\n children,\n emptyDashboard,\n layoutConfig,\n layoutSettings = EMPTY_OBJECT,\n onLayoutConfigChange = DEFAULT_CALLBACK,\n onGoldenLayoutChange = DEFAULT_CALLBACK,\n onLayoutInitialized = DEFAULT_CALLBACK,\n fallbackComponent = PanelPlaceholder,\n hydrate,\n dehydrate,\n panelWrapper,\n}: DashboardProps): JSX.Element {\n const layoutElement = useRef<HTMLDivElement>(null);\n const [isInitialized, setIsInitialized] = useState(false);\n const [layout, setLayout] = useState<GoldenLayout>();\n\n useEffect(\n function initDashboard() {\n if (!layoutElement.current) {\n setLayout(undefined);\n return;\n }\n const config = {\n ...LayoutUtils.makeDefaultLayout(),\n };\n if (config.settings === undefined) {\n config.settings = {};\n }\n Object.assign(config.settings, layoutSettings);\n\n // Load our content later after plugins have registered\n config.content = [];\n\n const newLayout = new GoldenLayout(config, layoutElement.current);\n\n const onInit = () => {\n newLayout.off('initialised', onInit);\n setIsInitialized(true);\n };\n newLayout.on('initialised', onInit);\n\n if (fallbackComponent != null) {\n newLayout.setFallbackComponent(fallbackComponent);\n }\n\n newLayout.init();\n\n setLayout(newLayout);\n\n onGoldenLayoutChange(newLayout);\n\n return () => {\n newLayout.destroy();\n };\n },\n [\n layoutSettings,\n fallbackComponent,\n onGoldenLayoutChange,\n setIsInitialized,\n setLayout,\n ]\n );\n\n const handleResize = useMemo(\n () =>\n throttle(() => {\n if (layout != null && layout.isInitialised) {\n layout?.updateSize();\n }\n }, RESIZE_THROTTLE),\n [layout]\n );\n\n useEffect(\n function initResizeEventListner() {\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n },\n [handleResize]\n );\n\n return (\n <div className=\"dashboard-container w-100 h-100\">\n <div className=\"w-100 h-100\" ref={layoutElement} />\n {isInitialized && layout && (\n <DashboardLayout\n emptyDashboard={emptyDashboard}\n id={id}\n layout={layout}\n layoutConfig={layoutConfig}\n onLayoutChange={onLayoutConfigChange}\n onLayoutInitialized={onLayoutInitialized}\n hydrate={hydrate}\n dehydrate={dehydrate}\n panelWrapper={panelWrapper}\n >\n {children}\n </DashboardLayout>\n )}\n </div>\n );\n}\n\nexport default Dashboard;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAIVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,YAAY,MAAM,0BAA0B;AAAC;AAAA,OAG7CC,WAAW;AAAA,OACXC,gBAAgB;AAAA,OAChBC,eAAe;AAAA;AAQtB,IAAMC,eAAe,GAAG,GAAG;AAE3B,IAAMC,gBAAgB,GAAG,MAAMC,SAAS;AAExC,IAAMC,YAAY,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAqBtC,OAAO,SAASC,SAAS,OAaO;EAAA,IAbN;IACxBC,EAAE,GAAG,SAAS;IACdC,QAAQ;IACRC,cAAc;IACdC,YAAY;IACZC,cAAc,GAAGR,YAAY;IAC7BS,oBAAoB,GAAGX,gBAAgB;IACvCY,oBAAoB,GAAGZ,gBAAgB;IACvCa,mBAAmB,GAAGb,gBAAgB;IACtCc,iBAAiB,GAAGjB,gBAAgB;IACpCkB,OAAO;IACPC,SAAS;IACTC;EACc,CAAC;EACf,IAAMC,aAAa,GAAG1B,MAAM,CAAiB,IAAI,CAAC;EAClD,IAAM,CAAC2B,aAAa,EAAEC,gBAAgB,CAAC,GAAG3B,QAAQ,CAAC,KAAK,CAAC;EACzD,IAAM,CAAC4B,MAAM,EAAEC,SAAS,CAAC,GAAG7B,QAAQ,EAAgB;EAEpDH,SAAS,CACP,SAASiC,aAAa,GAAG;IACvB,IAAI,CAACL,aAAa,CAACM,OA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ED/B,SAAS,CACP,SAASkD,sBAAsB,GAAG;IAChCC,MAAM,CAACC,gBAAgB,CAAC,QAAQ,EAAEL,YAAY,CAAC;IAC/C,OAAO,MAAM;MACXI,MAAM,CAACE,mBAAmB,CAAC,QAAQ,EAAEN,YAAY,CAAC;IACpD,CAAC;EACH,CAAC,EACD,CAACA,YAAY,CAAC,CACf;EAED,oBACE;IAAK,SAAS,EAAC;EAAiC,gBAC9C;IAAK,SAAS,EAAC,aAAa;IAAC,GAAG,EAAEnB;EAAc,EAAG,EAClDC,aAAa,IAAIE,MAAM,iBACtB,oBAAC,eAAe;IACd,cAAc,EAAEb,cAAe;IAC/B,EAAE,EAAEF,EAAG;IACP,MAAM,EAAEe,MAAO;IACf,YAAY,EAAEZ,YAAa;IAC3B,cAAc,EAAEE,oBAAqB;IACrC,mBAAmB,EAAEE,mBAAoB;IACzC,OAAO,EAAEE,OAAQ;IACjB,SAAS,EAAEC,SAAU;IACrB,YAAY,EAAEC;EAAa,GAE1BV,QAAQ,CAEZ,CACG;AAEV;AAEA,eAAeF,SAAS"}
1
+ {"version":3,"file":"Dashboard.js","names":["React","useEffect","useMemo","useRef","useState","throttle","GoldenLayout","LayoutUtils","PanelPlaceholder","DashboardLayout","RESIZE_THROTTLE","DEFAULT_CALLBACK","undefined","EMPTY_OBJECT","Object","freeze","Dashboard","id","children","emptyDashboard","layoutConfig","layoutSettings","onLayoutConfigChange","onGoldenLayoutChange","onLayoutInitialized","fallbackComponent","hydrate","dehydrate","panelWrapper","layoutElement","isInitialized","setIsInitialized","layout","setLayout","initDashboard","current","config","makeDefaultLayout","settings","assign","content","newLayout","onInit","off","on","setFallbackComponent","init","destroy","handleResize","isInitialised","updateSize","initResizeEventListner","window","addEventListener","removeEventListener"],"sources":["../src/Dashboard.tsx"],"sourcesContent":["import React, {\n ComponentType,\n ForwardRefExoticComponent,\n RefAttributes,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport throttle from 'lodash.throttle';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type { ItemConfigType } from '@deephaven/golden-layout';\nimport './layout/GoldenLayout.scss';\nimport LayoutUtils from './layout/LayoutUtils';\nimport PanelPlaceholder from './PanelPlaceholder';\nimport DashboardLayout from './DashboardLayout';\nimport {\n PanelDehydrateFunction,\n PanelHydrateFunction,\n PanelProps,\n} from './DashboardPlugin';\nimport './Dashboard.scss';\n\nconst RESIZE_THROTTLE = 100;\n\nconst DEFAULT_CALLBACK = () => undefined;\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nexport type DashboardProps = {\n id?: string;\n children?: React.ReactNode | React.ReactNode[];\n emptyDashboard?: React.ReactNode;\n layoutConfig?: ItemConfigType[];\n layoutSettings?: Record<string, unknown>;\n onLayoutConfigChange?: () => void;\n onGoldenLayoutChange?: (goldenLayout: GoldenLayout) => void;\n onLayoutInitialized?: () => void;\n fallbackComponent?: ForwardRefExoticComponent<\n PanelProps & RefAttributes<HTMLDivElement>\n >;\n hydrate?: PanelHydrateFunction;\n dehydrate?: PanelDehydrateFunction;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType;\n};\n\nexport function Dashboard({\n id = 'default',\n children,\n emptyDashboard,\n layoutConfig,\n layoutSettings = EMPTY_OBJECT,\n onLayoutConfigChange = DEFAULT_CALLBACK,\n onGoldenLayoutChange = DEFAULT_CALLBACK,\n onLayoutInitialized = DEFAULT_CALLBACK,\n fallbackComponent = PanelPlaceholder,\n hydrate,\n dehydrate,\n panelWrapper,\n}: DashboardProps): JSX.Element {\n const layoutElement = useRef<HTMLDivElement>(null);\n const [isInitialized, setIsInitialized] = useState(false);\n const [layout, setLayout] = useState<GoldenLayout>();\n\n useEffect(\n function initDashboard() {\n if (!layoutElement.current) {\n setLayout(undefined);\n return;\n }\n const config = {\n ...LayoutUtils.makeDefaultLayout(),\n };\n if (config.settings === undefined) {\n config.settings = {};\n }\n Object.assign(config.settings, layoutSettings);\n\n // Load our content later after plugins have registered\n config.content = [];\n\n const newLayout = new GoldenLayout(config, layoutElement.current);\n\n const onInit = () => {\n newLayout.off('initialised', onInit);\n setIsInitialized(true);\n };\n newLayout.on('initialised', onInit);\n\n if (fallbackComponent != null) {\n newLayout.setFallbackComponent(fallbackComponent);\n }\n\n newLayout.init();\n\n setLayout(newLayout);\n\n onGoldenLayoutChange(newLayout);\n\n return () => {\n newLayout.destroy();\n };\n },\n [\n layoutSettings,\n fallbackComponent,\n onGoldenLayoutChange,\n setIsInitialized,\n setLayout,\n ]\n );\n\n const handleResize = useMemo(\n () =>\n throttle(() => {\n if (layout != null && layout.isInitialised) {\n layout?.updateSize();\n }\n }, RESIZE_THROTTLE),\n [layout]\n );\n\n useEffect(\n function initResizeEventListner() {\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n },\n [handleResize]\n );\n\n return (\n <div className=\"dashboard-container w-100 h-100\">\n <div className=\"w-100 h-100\" ref={layoutElement} />\n {isInitialized && layout && (\n <DashboardLayout\n emptyDashboard={emptyDashboard}\n id={id}\n layout={layout}\n layoutConfig={layoutConfig}\n onLayoutChange={onLayoutConfigChange}\n onLayoutInitialized={onLayoutInitialized}\n hydrate={hydrate}\n dehydrate={dehydrate}\n panelWrapper={panelWrapper}\n >\n {children}\n </DashboardLayout>\n )}\n </div>\n );\n}\n\nexport default Dashboard;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAIVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAAOC,YAAY,MAAM,0BAA0B;AAAC;AAAA,OAG7CC,WAAW;AAAA,OACXC,gBAAgB;AAAA,OAChBC,eAAe;AAAA;AAAA;AAAA;AAQtB,IAAMC,eAAe,GAAG,GAAG;AAE3B,IAAMC,gBAAgB,GAAG,MAAMC,SAAS;AAExC,IAAMC,YAAY,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAqBtC,OAAO,SAASC,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C9B,EAAE,EACF,QAAQ,EACR,cAA+C,EAC/C,MAAM,EACN,YAAoC,EACpC,cAAiC,EACjC,mBAAsC,EACtC,OAAwB,EACxB,SAA4B,EAC5B,YAAoC,GACrC,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CA6OpC;yBAxPe,eAAe;;;;;;;;;;;;;;;;;;;;;;;;AAqQ/B,eAAe,eAAe,CAAC"}
@@ -1,4 +1,8 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ 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; }
2
+ 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; }
3
+ 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; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ 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); }
2
6
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
7
  import PropTypes from 'prop-types';
4
8
  import Log from '@deephaven/log';
@@ -12,6 +16,9 @@ import PanelEvent from "./PanelEvent.js";
12
16
  import { GLPropTypes, useListener } from "./layout/index.js";
13
17
  import { getDashboardData, updateDashboardData } from "./redux/index.js";
14
18
  import DashboardPanelWrapper from "./DashboardPanelWrapper.js";
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
22
  var log = Log.module('DashboardLayout');
16
23
  var EMPTY_OBJECT = Object.freeze({});
17
24
  var DEFAULT_LAYOUT_CONFIG = [];
@@ -27,7 +34,9 @@ export function DashboardLayout(_ref) {
27
34
  var {
28
35
  id,
29
36
  children,
30
- emptyDashboard = /*#__PURE__*/React.createElement("div", null, "Dashboard is empty."),
37
+ emptyDashboard = /*#__PURE__*/_jsx("div", {
38
+ children: "Dashboard is empty."
39
+ }),
31
40
  layout,
32
41
  layoutConfig = DEFAULT_LAYOUT_CONFIG,
33
42
  onLayoutChange = DEFAULT_CALLBACK,
@@ -50,28 +59,23 @@ export function DashboardLayout(_ref) {
50
59
  var componentHydrate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : hydrate;
51
60
  var componentDehydrate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : dehydrate;
52
61
  log.debug2('registerComponent', name, componentType, componentHydrate, componentDehydrate);
53
- function renderComponent(props, ref) {
54
- // Cast it to an `any` type so we can pass the ref in correctly.
55
- // ComponentType doesn't seem to work right, ReactNode is also incorrect
56
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
+ function wrappedComponent(props) {
57
63
  var CType = componentType;
58
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
64
  var PanelWrapperType = panelWrapper;
60
65
 
61
66
  // Props supplied by GoldenLayout
62
- // eslint-disable-next-line react/prop-types
63
67
  var {
64
68
  glContainer,
65
69
  glEventHub
66
70
  } = props;
67
- return /*#__PURE__*/React.createElement(PanelErrorBoundary, {
71
+ return /*#__PURE__*/_jsx(PanelErrorBoundary, {
68
72
  glContainer: glContainer,
69
- glEventHub: glEventHub
70
- }, /*#__PURE__*/React.createElement(PanelWrapperType, props, /*#__PURE__*/React.createElement(CType, _extends({}, props, {
71
- ref: ref
72
- }))));
73
+ glEventHub: glEventHub,
74
+ children: /*#__PURE__*/_jsx(PanelWrapperType, _objectSpread(_objectSpread({}, props), {}, {
75
+ children: /*#__PURE__*/_jsx(CType, _objectSpread({}, props))
76
+ }))
77
+ });
73
78
  }
74
- var wrappedComponent = /*#__PURE__*/React.forwardRef(renderComponent);
75
79
  var cleanup = layout.registerComponent(name, wrappedComponent);
76
80
  hydrateMap.set(name, componentHydrate);
77
81
  dehydrateMap.set(name, componentDehydrate);
@@ -160,12 +164,14 @@ export function DashboardLayout(_ref) {
160
164
  setIsDashboardEmpty(layout.root.contentItems.length === 0);
161
165
  }
162
166
  }, [hydrateComponent, layout, layoutConfig, lastConfig, panelManager, previousLayoutConfig]);
163
- return /*#__PURE__*/React.createElement(React.Fragment, null, isDashboardEmpty && emptyDashboard, layoutChildren, React.Children.map(children, child => child != null ? /*#__PURE__*/React.cloneElement(child, {
164
- id,
165
- layout,
166
- panelManager,
167
- registerComponent
168
- }) : null));
167
+ return /*#__PURE__*/_jsxs(_Fragment, {
168
+ children: [isDashboardEmpty && emptyDashboard, layoutChildren, React.Children.map(children, child => child != null ? /*#__PURE__*/React.cloneElement(child, {
169
+ id,
170
+ layout,
171
+ panelManager,
172
+ registerComponent
173
+ }) : null)]
174
+ });
169
175
  }
170
176
  DashboardLayout.propTypes = {
171
177
  id: PropTypes.string.isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardLayout.js","names":["React","useCallback","useEffect","useMemo","useState","PropTypes","Log","usePrevious","useDispatch","useSelector","PanelManager","PanelErrorBoundary","LayoutUtils","dehydrate","dehydrateDefault","hydrate","hydrateDefault","PanelEvent","GLPropTypes","useListener","getDashboardData","updateDashboardData","DashboardPanelWrapper","log","module","EMPTY_OBJECT","Object","freeze","DEFAULT_LAYOUT_CONFIG","DEFAULT_CALLBACK","undefined","FALLBACK_CALLBACK","props","DashboardLayout","id","children","emptyDashboard","layout","layoutConfig","onLayoutChange","onLayoutInitialized","panelWrapper","dispatch","data","state","isDashboardEmpty","setIsDashboardEmpty","isItemDragging","setIsItemDragging","lastConfig","setLastConfig","initialClosedPanels","closed","isDashboardInitialized","setIsDashboardInitialized","layoutChildren","setLayoutChildren","getReactChildren","hydrateMap","Map","dehydrateMap","registerComponent","name","componentType","componentHydrate","componentDehydrate","debug2","renderComponent","ref","CType","PanelWrapperType","glContainer","glEventHub","wrappedComponent","forwardRef","cleanup","set","hydrateComponent","get","dehydrateComponent","config","panelManager","openedMap","handleLayoutStateChanged","glConfig","toConfig","contentConfig","content","dehydratedLayoutConfig","dehydrateLayoutConfig","hasChanged","isEqual","debug","root","contentItems","length","handleLayoutItemPickedUp","component","componentId","getIdFromContainer","eventHub","emit","DRAGGING","handleLayoutItemDropped","DROPPED","handleComponentCreated","item","element","cssComponent","replace","toLowerCase","cssClass","addClass","handleReactChildrenChange","TITLE_CHANGED","previousLayoutConfig","loadNewConfig","hydrateLayoutConfig","remove","i","addChild","Children","map","child","cloneElement","propTypes","string","isRequired","node","shape","Layout","arrayOf","func"],"sources":["../src/DashboardLayout.tsx"],"sourcesContent":["import React, {\n ComponentType,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n Container,\n ItemConfigType,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport { usePrevious } from '@deephaven/react-hooks';\nimport { RootState } from '@deephaven/redux';\nimport { useDispatch, useSelector } from 'react-redux';\nimport PanelManager, { ClosedPanels } from './PanelManager';\nimport PanelErrorBoundary from './PanelErrorBoundary';\nimport LayoutUtils from './layout/LayoutUtils';\nimport {\n dehydrate as dehydrateDefault,\n hydrate as hydrateDefault,\n} from './DashboardUtils';\nimport PanelEvent from './PanelEvent';\nimport { GLPropTypes, useListener } from './layout';\nimport { getDashboardData, updateDashboardData } from './redux';\nimport {\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n PanelProps,\n} from './DashboardPlugin';\nimport DashboardPanelWrapper from './DashboardPanelWrapper';\n\nexport type DashboardLayoutConfig = ItemConfigType[];\n\nconst log = Log.module('DashboardLayout');\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst DEFAULT_LAYOUT_CONFIG: DashboardLayoutConfig = [];\n\nconst DEFAULT_CALLBACK = () => undefined;\n\n// If a component isn't registered, just pass through the props so they are saved if a plugin is loaded later\nconst FALLBACK_CALLBACK = (props: unknown) => props;\n\ntype DashboardData = {\n closed?: ClosedPanels;\n};\n\ninterface DashboardLayoutProps {\n id: string;\n\n // Default hydrate/dehydration functions\n hydrate?: PanelHydrateFunction;\n dehydrate?: PanelDehydrateFunction;\n layout: GoldenLayout;\n layoutConfig?: DashboardLayoutConfig;\n onLayoutChange?: (dehydratedLayout: DashboardLayoutConfig) => void;\n onLayoutInitialized?: () => void;\n data?: DashboardData;\n children?: React.ReactNode | React.ReactNode[];\n emptyDashboard?: React.ReactNode;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType;\n}\n\n/**\n * DashboardLayout component. Handles hydrating, dehydrating components, listening for dragging panels.\n */\nexport function DashboardLayout({\n id,\n children,\n emptyDashboard = <div>Dashboard is empty.</div>,\n layout,\n layoutConfig = DEFAULT_LAYOUT_CONFIG,\n onLayoutChange = DEFAULT_CALLBACK,\n onLayoutInitialized = DEFAULT_CALLBACK,\n hydrate = hydrateDefault,\n dehydrate = dehydrateDefault,\n panelWrapper = DashboardPanelWrapper,\n}: DashboardLayoutProps): JSX.Element {\n const dispatch = useDispatch();\n const data =\n useSelector<RootState>(state => getDashboardData(state, id)) ??\n EMPTY_OBJECT;\n\n const [isDashboardEmpty, setIsDashboardEmpty] = useState(false);\n const [isItemDragging, setIsItemDragging] = useState(false);\n const [lastConfig, setLastConfig] = useState<DashboardLayoutConfig>();\n const [initialClosedPanels] = useState<ReactComponentConfig[] | undefined>(\n (data as DashboardData)?.closed ?? []\n );\n const [isDashboardInitialized, setIsDashboardInitialized] = useState(false);\n const [layoutChildren, setLayoutChildren] = useState(\n layout.getReactChildren()\n );\n\n const hydrateMap = useMemo(() => new Map(), []);\n const dehydrateMap = useMemo(() => new Map(), []);\n const registerComponent = useCallback(\n (\n name: string,\n componentType: PanelComponentType,\n componentHydrate = hydrate,\n componentDehydrate = dehydrate\n ) => {\n log.debug2(\n 'registerComponent',\n name,\n componentType,\n componentHydrate,\n componentDehydrate\n );\n\n function renderComponent(props: PanelProps, ref: unknown) {\n // Cast it to an `any` type so we can pass the ref in correctly.\n // ComponentType doesn't seem to work right, ReactNode is also incorrect\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const CType = componentType as any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const PanelWrapperType = panelWrapper as any;\n\n // Props supplied by GoldenLayout\n // eslint-disable-next-line react/prop-types\n const { glContainer, glEventHub } = props;\n return (\n <PanelErrorBoundary glContainer={glContainer} glEventHub={glEventHub}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <PanelWrapperType {...props}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <CType {...props} ref={ref} />\n </PanelWrapperType>\n </PanelErrorBoundary>\n );\n }\n\n const wrappedComponent = React.forwardRef(renderComponent);\n const cleanup = layout.registerComponent(name, wrappedComponent);\n hydrateMap.set(name, componentHydrate);\n dehydrateMap.set(name, componentDehydrate);\n return cleanup;\n },\n [hydrate, dehydrate, hydrateMap, dehydrateMap, layout, panelWrapper]\n );\n const hydrateComponent = useCallback(\n (name, props) => (hydrateMap.get(name) ?? FALLBACK_CALLBACK)(props, id),\n [hydrateMap, id]\n );\n const dehydrateComponent = useCallback(\n (name, config) => (dehydrateMap.get(name) ?? FALLBACK_CALLBACK)(config, id),\n [dehydrateMap, id]\n );\n const panelManager = useMemo(\n () =>\n new PanelManager(\n layout,\n hydrateComponent,\n dehydrateComponent,\n new Map(),\n initialClosedPanels,\n ({ closed, openedMap }) => {\n dispatch(updateDashboardData(id, { closed, openedMap }));\n }\n ),\n [\n dehydrateComponent,\n dispatch,\n hydrateComponent,\n id,\n initialClosedPanels,\n layout,\n ]\n );\n\n const handleLayoutStateChanged = useCallback(() => {\n // we don't want to emit stateChanges that happen during item drags or else\n // we risk the last saved state being one without that panel in the layout entirely\n if (isItemDragging) return;\n\n if (!isDashboardInitialized) {\n onLayoutInitialized();\n setIsDashboardInitialized(true);\n }\n\n const glConfig = layout.toConfig();\n const contentConfig = glConfig.content;\n const dehydratedLayoutConfig = LayoutUtils.dehydrateLayoutConfig(\n contentConfig,\n dehydrateComponent\n );\n const hasChanged =\n lastConfig == null ||\n !LayoutUtils.isEqual(lastConfig, dehydratedLayoutConfig);\n\n log.debug(\n 'handleLayoutStateChanged',\n hasChanged,\n contentConfig,\n dehydratedLayoutConfig\n );\n\n if (hasChanged) {\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n\n setLastConfig(dehydratedLayoutConfig);\n\n onLayoutChange(dehydratedLayoutConfig);\n\n setLayoutChildren(layout.getReactChildren());\n }\n }, [\n dehydrateComponent,\n isDashboardInitialized,\n isItemDragging,\n lastConfig,\n layout,\n onLayoutChange,\n onLayoutInitialized,\n ]);\n\n const handleLayoutItemPickedUp = useCallback(\n (component: Container) => {\n const componentId = LayoutUtils.getIdFromContainer(component);\n layout.eventHub.emit(PanelEvent.DRAGGING, componentId);\n setIsItemDragging(true);\n },\n [layout.eventHub]\n );\n\n const handleLayoutItemDropped = useCallback(\n (component: Container) => {\n const componentId = LayoutUtils.getIdFromContainer(component);\n layout.eventHub.emit(PanelEvent.DROPPED, componentId);\n setIsItemDragging(false);\n },\n [layout.eventHub]\n );\n\n const handleComponentCreated = useCallback(item => {\n log.debug2('handleComponentCreated', item);\n\n if (\n item == null ||\n item.config == null ||\n item.config.component == null ||\n item.element == null\n ) {\n return;\n }\n\n const cssComponent = item.config.component\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .toLowerCase();\n const cssClass = `${cssComponent}-component`;\n item.element.addClass(cssClass);\n }, []);\n\n const handleReactChildrenChange = useCallback(() => {\n setLayoutChildren(layout.getReactChildren());\n }, [layout]);\n\n useListener(layout, 'stateChanged', handleLayoutStateChanged);\n useListener(layout, 'itemPickedUp', handleLayoutItemPickedUp);\n useListener(layout, 'itemDropped', handleLayoutItemDropped);\n useListener(layout, 'componentCreated', handleComponentCreated);\n useListener(\n layout.eventHub,\n PanelEvent.TITLE_CHANGED,\n handleLayoutStateChanged\n );\n useListener(layout, 'reactChildrenChanged', handleReactChildrenChange);\n\n const previousLayoutConfig = usePrevious(layoutConfig);\n useEffect(\n function loadNewConfig() {\n if (\n previousLayoutConfig !== layoutConfig &&\n layoutConfig !== lastConfig\n ) {\n log.debug('Setting new layout content...');\n const content = LayoutUtils.hydrateLayoutConfig(\n layoutConfig,\n hydrateComponent\n );\n // Remove the old layout before add the new one\n while (layout.root.contentItems.length > 0) {\n layout.root.contentItems[0].remove();\n }\n\n // Add the new content. It is usally just one item from the root\n for (let i = 0; i < content.length; i += 1) {\n layout.root.addChild(content[i]);\n }\n\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n }\n },\n [\n hydrateComponent,\n layout,\n layoutConfig,\n lastConfig,\n panelManager,\n previousLayoutConfig,\n ]\n );\n\n return (\n <>\n {isDashboardEmpty && emptyDashboard}\n {layoutChildren}\n {React.Children.map(children, child =>\n child != null\n ? React.cloneElement(child as ReactElement, {\n id,\n layout,\n panelManager,\n registerComponent,\n })\n : null\n )}\n </>\n );\n}\n\nDashboardLayout.propTypes = {\n id: PropTypes.string.isRequired,\n children: PropTypes.node,\n data: PropTypes.shape({}),\n emptyDashboard: PropTypes.node,\n layout: GLPropTypes.Layout.isRequired,\n layoutConfig: PropTypes.arrayOf(PropTypes.shape({})),\n onLayoutChange: PropTypes.func,\n onLayoutInitialized: PropTypes.func,\n};\n\nexport default DashboardLayout;\n"],"mappings":";AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AACd,OAAOC,SAAS,MAAM,YAAY;AAOlC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,WAAW,QAAQ,wBAAwB;AAEpD,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAAC,OAChDC,YAAY;AAAA,OACZC,kBAAkB;AAAA,OAClBC,WAAW;AAAA,SAEhBC,SAAS,IAAIC,gBAAgB,EAC7BC,OAAO,IAAIC,cAAc;AAAA,OAEpBC,UAAU;AAAA,SACRC,WAAW,EAAEC,WAAW;AAAA,SACxBC,gBAAgB,EAAEC,mBAAmB;AAAA,OAOvCC,qBAAqB;AAI5B,IAAMC,GAAG,GAAGjB,GAAG,CAACkB,MAAM,CAAC,iBAAiB,CAAC;AAEzC,IAAMC,YAAY,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAAC;AAEtC,IAAMC,qBAA4C,GAAG,EAAE;AAEvD,IAAMC,gBAAgB,GAAG,MAAMC,SAAS;;AAExC;AACA,IAAMC,iBAAiB,GAAIC,KAAc,IAAKA,KAAK;AAwBnD;AACA;AACA;AACA,OAAO,SAASC,eAAe,OAWO;EAAA;EAAA,IAXN;IAC9BC,EAAE;IACFC,QAAQ;IACRC,cAAc,gBAAG,iCAAK,qBAAmB,CAAM;IAC/CC,MAAM;IACNC,YAAY,GAAGV,qBAAqB;IACpCW,cAAc,GAAGV,gBAAgB;IACjCW,mBAAmB,GAAGX,gBAAgB;IACtCd,OAAO,GAAGC,cAAc;IACxBH,SAAS,GAAGC,gBAAgB;IAC5B2B,YAAY,GAAGnB;EACK,CAAC;EACrB,IAAMoB,QAA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ACgC,CAAC,CAAC,CAAC;MAClC;MAEAzE,mBAAmB,CAACT,MAAM,CAACwD,IAAI,CAACC,YAAY,CAACC,MAAM,KAAK,CAAC,CAAC;IAC5D;EACF,CAAC,EACD,CACElB,gBAAgB,EAChBxC,MAAM,EACNC,YAAY,EACZW,UAAU,EACVgC,YAAY,EACZkC,oBAAoB,CACrB,CACF;EAED,oBACE,0CACGtE,gBAAgB,IAAIT,cAAc,EAClCmB,cAAc,EACdvD,KAAK,CAACyH,QAAQ,CAACC,GAAG,CAACvF,QAAQ,EAAEwF,KAAK,IACjCA,KAAK,IAAI,IAAI,gBACT3H,KAAK,CAAC4H,YAAY,CAACD,KAAK,EAAkB;IACxCzF,EAAE;IACFG,MAAM;IACN4C,YAAY;IACZpB;EACF,CAAC,CAAC,GACF,IAAI,CACT,CACA;AAEP;AAEA5B,eAAe,CAAC4F,SAAS,GAAG;EAC1B3F,EAAE,EAAE7B,SAAS,CAACyH,MAAM,CAACC,UAAU;EAC/B5F,QAAQ,EAAE9B,SAAS,CAAC2H,IAAI;EACxBrF,IAAI,EAAEtC,SAAS,CAAC4H,KAAK,CAAC,CAAC,CAAC,CAAC;EACzB7F,cAAc,EAAE/B,SAAS,CAAC2H,IAAI;EAC9B3F,MAAM,EAAEnB,WAAW,CAACgH,MAAM,CAACH,UAAU;EACrCzF,YAAY,EAAEjC,SAAS,CAAC8H,OAAO,CAAC9H,SAAS,CAAC4H,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;EACpD1F,cAAc,EAAElC,SAAS,CAAC+H,IAAI;EAC9B5F,mBAAmB,EAAEnC,SAAS,CAAC+H;AACjC,CAAC;AAED,eAAenG,eAAe"}
1
+ {"version":3,"file":"DashboardLayout.js","names":["React","useCallback","useEffect","useMemo","useState","PropTypes","Log","usePrevious","useDispatch","useSelector","PanelManager","PanelErrorBoundary","LayoutUtils","dehydrate","dehydrateDefault","hydrate","hydrateDefault","PanelEvent","GLPropTypes","useListener","getDashboardData","updateDashboardData","DashboardPanelWrapper","log","module","EMPTY_OBJECT","Object","freeze","DEFAULT_LAYOUT_CONFIG","DEFAULT_CALLBACK","undefined","FALLBACK_CALLBACK","props","DashboardLayout","id","children","emptyDashboard","layout","layoutConfig","onLayoutChange","onLayoutInitialized","panelWrapper","dispatch","data","state","isDashboardEmpty","setIsDashboardEmpty","isItemDragging","setIsItemDragging","lastConfig","setLastConfig","initialClosedPanels","closed","isDashboardInitialized","setIsDashboardInitialized","layoutChildren","setLayoutChildren","getReactChildren","hydrateMap","Map","dehydrateMap","registerComponent","name","componentType","componentHydrate","componentDehydrate","debug2","wrappedComponent","CType","PanelWrapperType","glContainer","glEventHub","cleanup","set","hydrateComponent","get","dehydrateComponent","config","panelManager","openedMap","handleLayoutStateChanged","glConfig","toConfig","contentConfig","content","dehydratedLayoutConfig","dehydrateLayoutConfig","hasChanged","isEqual","debug","root","contentItems","length","handleLayoutItemPickedUp","component","componentId","getIdFromContainer","eventHub","emit","DRAGGING","handleLayoutItemDropped","DROPPED","handleComponentCreated","item","element","cssComponent","replace","toLowerCase","cssClass","addClass","handleReactChildrenChange","TITLE_CHANGED","previousLayoutConfig","loadNewConfig","hydrateLayoutConfig","remove","i","addChild","Children","map","child","cloneElement","propTypes","string","isRequired","node","shape","Layout","arrayOf","func"],"sources":["../src/DashboardLayout.tsx"],"sourcesContent":["import React, {\n ComponentType,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n Container,\n ItemConfigType,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport { usePrevious } from '@deephaven/react-hooks';\nimport { RootState } from '@deephaven/redux';\nimport { useDispatch, useSelector } from 'react-redux';\nimport PanelManager, { ClosedPanels } from './PanelManager';\nimport PanelErrorBoundary from './PanelErrorBoundary';\nimport LayoutUtils from './layout/LayoutUtils';\nimport {\n dehydrate as dehydrateDefault,\n hydrate as hydrateDefault,\n} from './DashboardUtils';\nimport PanelEvent from './PanelEvent';\nimport { GLPropTypes, useListener } from './layout';\nimport { getDashboardData, updateDashboardData } from './redux';\nimport {\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n PanelProps,\n} from './DashboardPlugin';\nimport DashboardPanelWrapper from './DashboardPanelWrapper';\n\nexport type DashboardLayoutConfig = ItemConfigType[];\n\nconst log = Log.module('DashboardLayout');\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst DEFAULT_LAYOUT_CONFIG: DashboardLayoutConfig = [];\n\nconst DEFAULT_CALLBACK = () => undefined;\n\n// If a component isn't registered, just pass through the props so they are saved if a plugin is loaded later\nconst FALLBACK_CALLBACK = (props: unknown) => props;\n\ntype DashboardData = {\n closed?: ClosedPanels;\n};\n\ninterface DashboardLayoutProps {\n id: string;\n\n // Default hydrate/dehydration functions\n hydrate?: PanelHydrateFunction;\n dehydrate?: PanelDehydrateFunction;\n layout: GoldenLayout;\n layoutConfig?: DashboardLayoutConfig;\n onLayoutChange?: (dehydratedLayout: DashboardLayoutConfig) => void;\n onLayoutInitialized?: () => void;\n data?: DashboardData;\n children?: React.ReactNode | React.ReactNode[];\n emptyDashboard?: React.ReactNode;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType;\n}\n\n/**\n * DashboardLayout component. Handles hydrating, dehydrating components, listening for dragging panels.\n */\nexport function DashboardLayout({\n id,\n children,\n emptyDashboard = <div>Dashboard is empty.</div>,\n layout,\n layoutConfig = DEFAULT_LAYOUT_CONFIG,\n onLayoutChange = DEFAULT_CALLBACK,\n onLayoutInitialized = DEFAULT_CALLBACK,\n hydrate = hydrateDefault,\n dehydrate = dehydrateDefault,\n panelWrapper = DashboardPanelWrapper,\n}: DashboardLayoutProps): JSX.Element {\n const dispatch = useDispatch();\n const data =\n useSelector<RootState>(state => getDashboardData(state, id)) ??\n EMPTY_OBJECT;\n\n const [isDashboardEmpty, setIsDashboardEmpty] = useState(false);\n const [isItemDragging, setIsItemDragging] = useState(false);\n const [lastConfig, setLastConfig] = useState<DashboardLayoutConfig>();\n const [initialClosedPanels] = useState<ReactComponentConfig[] | undefined>(\n (data as DashboardData)?.closed ?? []\n );\n const [isDashboardInitialized, setIsDashboardInitialized] = useState(false);\n const [layoutChildren, setLayoutChildren] = useState(\n layout.getReactChildren()\n );\n\n const hydrateMap = useMemo(() => new Map(), []);\n const dehydrateMap = useMemo(() => new Map(), []);\n const registerComponent = useCallback(\n (\n name: string,\n componentType: PanelComponentType,\n componentHydrate = hydrate,\n componentDehydrate = dehydrate\n ) => {\n log.debug2(\n 'registerComponent',\n name,\n componentType,\n componentHydrate,\n componentDehydrate\n );\n\n function wrappedComponent(props: PanelProps) {\n const CType = componentType;\n const PanelWrapperType = panelWrapper;\n\n // Props supplied by GoldenLayout\n const { glContainer, glEventHub } = props;\n return (\n <PanelErrorBoundary glContainer={glContainer} glEventHub={glEventHub}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <PanelWrapperType {...props}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <CType {...props} />\n </PanelWrapperType>\n </PanelErrorBoundary>\n );\n }\n\n const cleanup = layout.registerComponent(name, wrappedComponent);\n hydrateMap.set(name, componentHydrate);\n dehydrateMap.set(name, componentDehydrate);\n return cleanup;\n },\n [hydrate, dehydrate, hydrateMap, dehydrateMap, layout, panelWrapper]\n );\n const hydrateComponent = useCallback(\n (name, props) => (hydrateMap.get(name) ?? FALLBACK_CALLBACK)(props, id),\n [hydrateMap, id]\n );\n const dehydrateComponent = useCallback(\n (name, config) => (dehydrateMap.get(name) ?? FALLBACK_CALLBACK)(config, id),\n [dehydrateMap, id]\n );\n const panelManager = useMemo(\n () =>\n new PanelManager(\n layout,\n hydrateComponent,\n dehydrateComponent,\n new Map(),\n initialClosedPanels,\n ({ closed, openedMap }) => {\n dispatch(updateDashboardData(id, { closed, openedMap }));\n }\n ),\n [\n dehydrateComponent,\n dispatch,\n hydrateComponent,\n id,\n initialClosedPanels,\n layout,\n ]\n );\n\n const handleLayoutStateChanged = useCallback(() => {\n // we don't want to emit stateChanges that happen during item drags or else\n // we risk the last saved state being one without that panel in the layout entirely\n if (isItemDragging) return;\n\n if (!isDashboardInitialized) {\n onLayoutInitialized();\n setIsDashboardInitialized(true);\n }\n\n const glConfig = layout.toConfig();\n const contentConfig = glConfig.content;\n const dehydratedLayoutConfig = LayoutUtils.dehydrateLayoutConfig(\n contentConfig,\n dehydrateComponent\n );\n const hasChanged =\n lastConfig == null ||\n !LayoutUtils.isEqual(lastConfig, dehydratedLayoutConfig);\n\n log.debug(\n 'handleLayoutStateChanged',\n hasChanged,\n contentConfig,\n dehydratedLayoutConfig\n );\n\n if (hasChanged) {\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n\n setLastConfig(dehydratedLayoutConfig);\n\n onLayoutChange(dehydratedLayoutConfig);\n\n setLayoutChildren(layout.getReactChildren());\n }\n }, [\n dehydrateComponent,\n isDashboardInitialized,\n isItemDragging,\n lastConfig,\n layout,\n onLayoutChange,\n onLayoutInitialized,\n ]);\n\n const handleLayoutItemPickedUp = useCallback(\n (component: Container) => {\n const componentId = LayoutUtils.getIdFromContainer(component);\n layout.eventHub.emit(PanelEvent.DRAGGING, componentId);\n setIsItemDragging(true);\n },\n [layout.eventHub]\n );\n\n const handleLayoutItemDropped = useCallback(\n (component: Container) => {\n const componentId = LayoutUtils.getIdFromContainer(component);\n layout.eventHub.emit(PanelEvent.DROPPED, componentId);\n setIsItemDragging(false);\n },\n [layout.eventHub]\n );\n\n const handleComponentCreated = useCallback(item => {\n log.debug2('handleComponentCreated', item);\n\n if (\n item == null ||\n item.config == null ||\n item.config.component == null ||\n item.element == null\n ) {\n return;\n }\n\n const cssComponent = item.config.component\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .toLowerCase();\n const cssClass = `${cssComponent}-component`;\n item.element.addClass(cssClass);\n }, []);\n\n const handleReactChildrenChange = useCallback(() => {\n setLayoutChildren(layout.getReactChildren());\n }, [layout]);\n\n useListener(layout, 'stateChanged', handleLayoutStateChanged);\n useListener(layout, 'itemPickedUp', handleLayoutItemPickedUp);\n useListener(layout, 'itemDropped', handleLayoutItemDropped);\n useListener(layout, 'componentCreated', handleComponentCreated);\n useListener(\n layout.eventHub,\n PanelEvent.TITLE_CHANGED,\n handleLayoutStateChanged\n );\n useListener(layout, 'reactChildrenChanged', handleReactChildrenChange);\n\n const previousLayoutConfig = usePrevious(layoutConfig);\n useEffect(\n function loadNewConfig() {\n if (\n previousLayoutConfig !== layoutConfig &&\n layoutConfig !== lastConfig\n ) {\n log.debug('Setting new layout content...');\n const content = LayoutUtils.hydrateLayoutConfig(\n layoutConfig,\n hydrateComponent\n );\n // Remove the old layout before add the new one\n while (layout.root.contentItems.length > 0) {\n layout.root.contentItems[0].remove();\n }\n\n // Add the new content. It is usally just one item from the root\n for (let i = 0; i < content.length; i += 1) {\n layout.root.addChild(content[i]);\n }\n\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n }\n },\n [\n hydrateComponent,\n layout,\n layoutConfig,\n lastConfig,\n panelManager,\n previousLayoutConfig,\n ]\n );\n\n return (\n <>\n {isDashboardEmpty && emptyDashboard}\n {layoutChildren}\n {React.Children.map(children, child =>\n child != null\n ? React.cloneElement(child as ReactElement, {\n id,\n layout,\n panelManager,\n registerComponent,\n })\n : null\n )}\n </>\n );\n}\n\nDashboardLayout.propTypes = {\n id: PropTypes.string.isRequired,\n children: PropTypes.node,\n data: PropTypes.shape({}),\n emptyDashboard: PropTypes.node,\n layout: GLPropTypes.Layout.isRequired,\n layoutConfig: PropTypes.arrayOf(PropTypes.shape({})),\n onLayoutChange: PropTypes.func,\n onLayoutInitialized: PropTypes.func,\n};\n\nexport default DashboardLayout;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AACd,OAAOC,SAAS,MAAM,YAAY;AAOlC,OAA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ACTxH,KAAK,CAACyH,YAAY,CAACD,KAAK,EAAkB;MACxCtF,EAAE;MACFG,MAAM;MACNyC,YAAY;MACZjB;IACF,CAAC,CAAC,GACF,IAAI,CACT;EAAA,EACA;AAEP;AAEA5B,eAAe,CAACyF,SAAS,GAAG;EAC1BxF,EAAE,EAAE7B,SAAS,CAACsH,MAAM,CAACC,UAAU;EAC/BzF,QAAQ,EAAE9B,SAAS,CAACwH,IAAI;EACxBlF,IAAI,EAAEtC,SAAS,CAACyH,KAAK,CAAC,CAAC,CAAC,CAAC;EACzB1F,cAAc,EAAE/B,SAAS,CAACwH,IAAI;EAC9BxF,MAAM,EAAEnB,WAAW,CAAC6G,MAAM,CAACH,UAAU;EACrCtF,YAAY,EAAEjC,SAAS,CAAC2H,OAAO,CAAC3H,SAAS,CAACyH,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;EACpDvF,cAAc,EAAElC,SAAS,CAAC4H,IAAI;EAC9BzF,mBAAmB,EAAEnC,SAAS,CAAC4H;AACjC,CAAC;AAED,eAAehG,eAAe"}
@@ -1,10 +1,14 @@
1
1
  import React from 'react';
2
+ import { Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
2
4
  export function DashboardPanelWrapper(_ref) {
3
5
  var {
4
6
  children
5
7
  } = _ref;
6
8
  // eslint-disable-next-line react/jsx-no-useless-fragment
7
- return /*#__PURE__*/React.createElement(React.Fragment, null, children);
9
+ return /*#__PURE__*/_jsx(_Fragment, {
10
+ children: children
11
+ });
8
12
  }
9
13
  export default DashboardPanelWrapper;
10
14
  //# sourceMappingURL=DashboardPanelWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPanelWrapper.js","names":["React","DashboardPanelWrapper","children"],"sources":["../src/DashboardPanelWrapper.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nexport function DashboardPanelWrapper({ children }: PropsWithChildren<object>) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n}\n\nexport default DashboardPanelWrapper;\n"],"mappings":"AAAA,OAAOA,KAAK,MAA6B,OAAO;AAEhD,OAAO,SAASC,qBAAqB,OAA0C;EAAA,IAAzC;IAAEC;EAAoC,CAAC;EAC3E;EACA,oBAAO,0CAAGA,QAAQ,CAAI;AACxB;AAEA,eAAeD,qBAAqB"}
1
+ {"version":3,"file":"DashboardPanelWrapper.js","names":["React","DashboardPanelWrapper","children"],"sources":["../src/DashboardPanelWrapper.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nexport function DashboardPanelWrapper({ children }: PropsWithChildren<object>) {\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n}\n\nexport default DashboardPanelWrapper;\n"],"mappings":"AAAA,OAAOA,KAAK,MAA6B,OAAO;AAAC;AAAA;AAEjD,OAAO,SAASC,qBAAqB,OAA0C;EAAA,IAAzC;IAAEC;EAAoC,CAAC;EAC3E;EACA,oBAAO;IAAA,UAAGA;EAAQ,EAAI;AACxB;AAEA,eAAeD,qBAAqB"}
@@ -3,10 +3,6 @@ import { ConnectedComponent } from 'react-redux';
3
3
  import GoldenLayout from '@deephaven/golden-layout';
4
4
  import type { GLPanelProps, ReactComponentConfig } from '@deephaven/golden-layout';
5
5
  import PanelManager from './PanelManager';
6
- /**
7
- * Alias for the return type of React.forwardRef()
8
- */
9
- export type ForwardRefComponentType<P, R> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>;
10
6
  /**
11
7
  * Panel components can provide static props that provide meta data about the
12
8
  * panel.
@@ -21,11 +17,16 @@ export interface PanelStaticMetaData {
21
17
  TITLE?: string;
22
18
  }
23
19
  /**
20
+ * Alias for the return type of React.forwardRef()
21
+ */
22
+ type ForwardRefComponentType<P, R> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<R>>;
23
+ /**
24
+ * @deprecated Use `PanelComponentType` instead and add generic types to forwardRef call.
24
25
  * Panels defined as functional components have to use React.forwardRef.
25
26
  */
26
27
  export type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> & PanelStaticMetaData;
27
28
  export type WrappedComponentType<P extends PanelProps, C extends ComponentType<P>> = ConnectedComponent<C, P>;
28
- export type PanelComponentType<P extends PanelProps = PanelProps, C extends ComponentType<P> = ComponentType<P>> = (ComponentType<P> | WrappedComponentType<P, C> | PanelFunctionComponentType<P, unknown>) & PanelStaticMetaData;
29
+ export type PanelComponentType<P extends PanelProps = PanelProps, C extends ComponentType<P> = ComponentType<P>> = (ComponentType<P> | WrappedComponentType<P, C>) & PanelStaticMetaData;
29
30
  export declare function isWrappedComponent<P extends PanelProps, C extends ComponentType<P>>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C>;
30
31
  export type PanelMetadata = {
31
32
  id?: string;
@@ -80,4 +81,5 @@ export interface DashboardPlugin {
80
81
  */
81
82
  export declare function isDashboardPluginProps(props: Partial<DashboardPluginComponentProps>): props is DashboardPluginComponentProps;
82
83
  export declare function assertIsDashboardPluginProps(props: Partial<DashboardPluginComponentProps>): asserts props is DashboardPluginComponentProps;
84
+ export {};
83
85
  //# sourceMappingURL=DashboardPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPlugin.d.ts","sourceRoot":"","sources":["../src/DashboardPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,yBAAyB,EACzB,eAAe,EACf,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,yBAAyB,CACnE,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,C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AC3B,iBAAiB,EAAE,CACjB,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAE1B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,SAAS,CAAC,EAAE,sBAAsB,KAC/B,2BAA2B,CAAC;CAClC,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAEpC,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,UAAU,CAAC;IAEnE,uHAAuH;IACvH,kBAAkB,CAAC,EAAE,CACnB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,KAChB,WAAW,GAAG,IAAI,CAAC;IAExB,oEAAoE;IACpE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IAE/C,oFAAoF;IACpF,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAC5C,KAAK,IAAI,6BAA6B,CAOxC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,GAC5C,OAAO,CAAC,KAAK,IAAI,6BAA6B,CAMhD"}
@@ -1,7 +1,8 @@
1
1
  import GoldenLayout from '@deephaven/golden-layout';
2
2
  import PanelManager from "./PanelManager.js";
3
3
  /**
4
- * Alias for the return type of React.forwardRef()
4
+ * Panel components can provide static props that provide meta data about the
5
+ * panel.
5
6
  */
6
7
  export function isWrappedComponent(type) {
7
8
  return (type === null || type === void 0 ? void 0 : type.WrappedComponent) !== undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPlugin.js","names":["GoldenLayout","PanelManager","isWrappedComponent","type","WrappedComponent","undefined","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error"],"sources":["../src/DashboardPlugin.ts"],"sourcesContent":["import type {\n Component,\n ComponentType,\n ForwardRefExoticComponent,\n PropsWithoutRef,\n RefAttributes,\n} from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n GLPanelProps,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\n\n/**\n * Alias for the return type of React.forwardRef()\n */\nexport type ForwardRefComponentType<P, R> = ForwardRefExoticComponent<\n PropsWithoutRef<P> & RefAttributes<R>\n>;\n\n/**\n * Panel components can provide static props that provide meta data about the\n * panel.\n */\nexport interface PanelStaticMetaData {\n /**\n * Should be set to the same name as the component type.\n * @deprecated Use `displayName` instead.\n */\n COMPONENT?: string;\n\n /** Title of the panel. */\n TITLE?: string;\n}\n\n/**\n * Panels defined as functional components have to use React.forwardRef.\n */\nexport type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> &\n PanelStaticMetaData;\n\nexport type WrappedComponentType<\n P extends PanelProps,\n C extends ComponentType<P>,\n> = ConnectedComponent<C, P>;\n\nexport type PanelComponentType<\n P extends PanelProps = PanelProps,\n C extends ComponentType<P> = ComponentType<P>,\n> = (\n | ComponentType<P>\n | WrappedComponentType<P, C>\n | PanelFunctionComponentType<P, unknown>\n) &\n PanelStaticMetaData;\n\nexport function isWrappedComponent<\n P extends PanelProps,\n C extends ComponentType<P>,\n>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C> {\n return (type as WrappedComponentType<P, C>)?.WrappedComponent !== undefined;\n}\n\nexport type PanelMetadata = { id?: string; name?: string; type?: string };\n\nexport type PanelProps = GLPanelProps & {\n metadata?: PanelMetadata;\n};\n\nexport type DehydratedPanelProps = Omit<PanelProps, keyof GLPanelProps>;\n\nexport type DashboardPanelProps = PanelProps & { localDashboardId: string };\n\nexport type DehydratedDashboardPanelProps = Omit<\n DashboardPanelProps,\n keyof GLPanelProps\n>;\n\nexport type PanelComponent<T extends PanelProps = PanelProps> = Component<T>;\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DashboardConfig = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n};\n\nexport interface DashboardPanelDefinition {\n name: string;\n definition: ComponentType;\n}\n\nexport type DeregisterComponentFunction = () => void;\n\nexport type PanelHydrateFunction<\n T extends DehydratedDashboardPanelProps = DehydratedDashboardPanelProps,\n R extends T = T,\n> = (props: T, dashboardId: string) => R;\n\nexport type PanelDehydrateFunction = (\n config: PanelConfig,\n dashboardId: string\n) => PanelConfig | null;\n\nexport type DashboardPluginComponentProps = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n registerComponent: <\n P extends DashboardPanelProps,\n C extends ComponentType<P>,\n >(\n name: string,\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction,\n dehydrate?: PanelDehydrateFunction\n ) => DeregisterComponentFunction;\n};\n\nexport interface DashboardPlugin {\n panels?: DashboardPanelDefinition[];\n\n /** Hydrate the provided panel and props. Return the same object if no changes made. */\n hydrateComponent?: (name: string, props: PanelProps) => PanelProps;\n\n /** Dehydrate a component. Return the same object if no changes made, or `null` if the component should not be saved */\n dehydrateComponent?: (\n name: string,\n config: PanelConfig\n ) => PanelConfig | null;\n\n /** Called when the dashboard is initialized and layout is ready. */\n initialize?: (config: DashboardConfig) => void;\n\n /** Called when the dashboard is unintialized and layout is about to be destroyed */\n deinitialize?: (config: DashboardConfig) => void;\n}\n\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"mappings":"AAQA,OAAOA,YAAY,MAAM,0BAA0B;AAAC,OAK7CC,YAAY;AAEnB;AACA;AACA;AAyCA,OAAO,SAASC,kBAAkB,CAGhCC,IAA8B,EAAsC;EACpE,OAAO,CAACA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAiCC,gBAAgB,MAAKC,SAAS;AAC7E;AAgFA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsB,CACpCC,KAA6C,EACL;EACxC,OACE,OAAOA,KAAK,CAACC,EAAE,KAAK,QAAQ,IAC5BD,KAAK,CAACE,MAAM,YAAYT,YAAY,IACpCO,KAAK,CAACG,YAAY,YAAYT,YAAY,IAC1C,OAAOM,KAAK,CAACI,iBAAiB,KAAK,UAAU;AAEjD;AAEA,OAAO,SAASC,4BAA4B,CAC1CL,KAA6C,EACG;EAChD,IAAI,CAACD,sBAAsB,CAACC,KAAK,CAAC,EAAE;IAClC,MAAM,IAAIM,KAAK,iEAC4CN,KAAK,EAC/D;EACH;AACF"}
1
+ {"version":3,"file":"DashboardPlugin.js","names":["GoldenLayout","PanelManager","isWrappedComponent","type","WrappedComponent","undefined","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error"],"sources":["../src/DashboardPlugin.ts"],"sourcesContent":["import type {\n Component,\n ComponentType,\n ForwardRefExoticComponent,\n PropsWithoutRef,\n RefAttributes,\n} from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n GLPanelProps,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\n\n/**\n * Panel components can provide static props that provide meta data about the\n * panel.\n */\nexport interface PanelStaticMetaData {\n /**\n * Should be set to the same name as the component type.\n * @deprecated Use `displayName` instead.\n */\n COMPONENT?: string;\n\n /** Title of the panel. */\n TITLE?: string;\n}\n\n/**\n * Alias for the return type of React.forwardRef()\n */\ntype ForwardRefComponentType<P, R> = ForwardRefExoticComponent<\n PropsWithoutRef<P> & RefAttributes<R>\n>;\n\n/**\n * @deprecated Use `PanelComponentType` instead and add generic types to forwardRef call.\n * Panels defined as functional components have to use React.forwardRef.\n */\nexport type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> &\n PanelStaticMetaData;\n\nexport type WrappedComponentType<\n P extends PanelProps,\n C extends ComponentType<P>,\n> = ConnectedComponent<C, P>;\n\nexport type PanelComponentType<\n P extends PanelProps = PanelProps,\n C extends ComponentType<P> = ComponentType<P>,\n> = (ComponentType<P> | WrappedComponentType<P, C>) & PanelStaticMetaData;\n\nexport function isWrappedComponent<\n P extends PanelProps,\n C extends ComponentType<P>,\n>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C> {\n return (type as WrappedComponentType<P, C>)?.WrappedComponent !== undefined;\n}\n\nexport type PanelMetadata = { id?: string; name?: string; type?: string };\n\nexport type PanelProps = GLPanelProps & {\n metadata?: PanelMetadata;\n};\n\nexport type DehydratedPanelProps = Omit<PanelProps, keyof GLPanelProps>;\n\nexport type DashboardPanelProps = PanelProps & { localDashboardId: string };\n\nexport type DehydratedDashboardPanelProps = Omit<\n DashboardPanelProps,\n keyof GLPanelProps\n>;\n\nexport type PanelComponent<T extends PanelProps = PanelProps> = Component<T>;\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DashboardConfig = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n};\n\nexport interface DashboardPanelDefinition {\n name: string;\n definition: ComponentType;\n}\n\nexport type DeregisterComponentFunction = () => void;\n\nexport type PanelHydrateFunction<\n T extends DehydratedDashboardPanelProps = DehydratedDashboardPanelProps,\n R extends T = T,\n> = (props: T, dashboardId: string) => R;\n\nexport type PanelDehydrateFunction = (\n config: PanelConfig,\n dashboardId: string\n) => PanelConfig | null;\n\nexport type DashboardPluginComponentProps = {\n id: string;\n layout: GoldenLayout;\n panelManager: PanelManager;\n registerComponent: <\n P extends DashboardPanelProps,\n C extends ComponentType<P>,\n >(\n name: string,\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction,\n dehydrate?: PanelDehydrateFunction\n ) => DeregisterComponentFunction;\n};\n\nexport interface DashboardPlugin {\n panels?: DashboardPanelDefinition[];\n\n /** Hydrate the provided panel and props. Return the same object if no changes made. */\n hydrateComponent?: (name: string, props: PanelProps) => PanelProps;\n\n /** Dehydrate a component. Return the same object if no changes made, or `null` if the component should not be saved */\n dehydrateComponent?: (\n name: string,\n config: PanelConfig\n ) => PanelConfig | null;\n\n /** Called when the dashboard is initialized and layout is ready. */\n initialize?: (config: DashboardConfig) => void;\n\n /** Called when the dashboard is unintialized and layout is about to be destroyed */\n deinitialize?: (config: DashboardConfig) => void;\n}\n\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"mappings":"AAQA,OAAOA,YAAY,MAAM,0BAA0B;AAAC,OAK7CC,YAAY;AAEnB;AACA;AACA;AACA;AAoCA,OAAO,SAASC,kBAAkB,CAGhCC,IAA8B,EAAsC;EACpE,OAAO,CAACA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAiCC,gBAAgB,MAAKC,SAAS;AAC7E;AAgFA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsB,CACpCC,KAA6C,EACL;EACxC,OACE,OAAOA,KAAK,CAACC,EAAE,KAAK,QAAQ,IAC5BD,KAAK,CAACE,MAAM,YAAYT,YAAY,IACpCO,KAAK,CAACG,YAAY,YAAYT,YAAY,IAC1C,OAAOM,KAAK,CAACI,iBAAiB,KAAK,UAAU;AAEjD;AAEA,OAAO,SAASC,4BAA4B,CAC1CL,KAA6C,EACG;EAChD,IAAI,CAACD,sBAAsB,CAACC,KAAK,CAAC,EAAE;IAClC,MAAM,IAAIM,KAAK,iEAC4CN,KAAK,EAC/D;EACH;AACF"}
@@ -4,6 +4,7 @@ import Log from '@deephaven/log';
4
4
  import PanelEvent from "./PanelEvent.js";
5
5
  import LayoutUtils from "./layout/LayoutUtils.js";
6
6
  import "./PanelErrorBoundary.css";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
7
8
  var log = Log.module('PanelErrorBoundary');
8
9
  /**
9
10
  * Panel wrapper implementing Error Boundary and emitting Closed event.
@@ -40,13 +41,14 @@ class PanelErrorBoundary extends Component {
40
41
  error
41
42
  } = this.state;
42
43
  if (error != null) {
43
- return /*#__PURE__*/React.createElement("div", {
44
- className: "panel-error-boundary"
45
- }, /*#__PURE__*/React.createElement(LoadingOverlay, {
46
- errorMessage: "".concat(error),
47
- isLoading: false,
48
- isLoaded: false
49
- }));
44
+ return /*#__PURE__*/_jsx("div", {
45
+ className: "panel-error-boundary",
46
+ children: /*#__PURE__*/_jsx(LoadingOverlay, {
47
+ errorMessage: "".concat(error),
48
+ isLoading: false,
49
+ isLoaded: false
50
+ })
51
+ });
50
52
  }
51
53
  return children;
52
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PanelErrorBoundary.js","names":["React","Component","LoadingOverlay","Log","PanelEvent","LayoutUtils","log","module","PanelErrorBoundary","constructor","props","state","error","componentDidCatch","setState","componentWillUnmount","glContainer","glEventHub","panelId","getIdFromContainer","debug","emit","CLOSED","render","children"],"sources":["../src/PanelErrorBoundary.tsx"],"sourcesContent":["import React, { Component, ReactNode } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport type { Container, EventEmitter } from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport PanelEvent from './PanelEvent';\nimport LayoutUtils from './layout/LayoutUtils';\nimport './PanelErrorBoundary.scss';\n\nconst log = Log.module('PanelErrorBoundary');\n\ninterface PanelErrorBoundaryProps {\n children: ReactNode;\n glContainer: Container;\n glEventHub: EventEmitter;\n}\n\ninterface PanelErrorBoundaryState {\n error: Error | null;\n}\n/**\n * Panel wrapper implementing Error Boundary and emitting Closed event.\n * Closed event has to be emitted from the wrapper instead of the panel itself\n * because the panel can get unmounted on errors\n * and we want to differentiate between unmount on error vs panel being intentionally closed.\n */\nclass PanelErrorBoundary extends Component<\n PanelErrorBoundaryProps,\n PanelErrorBoundaryState\n> {\n constructor(props: PanelErrorBoundaryProps) {\n super(props);\n this.state = { error: null };\n }\n\n componentDidCatch(error: Error): void {\n this.setState({ error });\n }\n\n componentWillUnmount(): void {\n const { glContainer, glEventHub } = this.props;\n const panelId = LayoutUtils.getIdFromContainer(glContainer);\n log.debug('componentWillUnmount', panelId);\n glEventHub.emit(PanelEvent.CLOSED, panelId, glContainer);\n }\n\n render(): ReactNode {\n const { children } = this.props;\n const { error } = this.state;\n if (error != null) {\n return (\n <div className=\"panel-error-boundary\">\n <LoadingOverlay\n errorMessage={`${error}`}\n isLoading={false}\n isLoaded={false}\n />\n </div>\n );\n }\n return children;\n }\n}\n\nexport default PanelErrorBoundary;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAmB,OAAO;AACnD,SAASC,cAAc,QAAQ,uBAAuB;AAEtD,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,UAAU;AAAA,OACVC,WAAW;AAAA;AAGlB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,oBAAoB,CAAC;AAW5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,SAASP,SAAS,CAGxC;EACAQ,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MAAEC,KAAK,EAAE;IAAK,CAAC;EAC9B;EAEAC,iBAAiB,CAACD,KAAY,EAAQ;IACpC,IAAI,CAACE,QAAQ,CAAC;MAAEF;IAAM,CAAC,CAAC;EAC1B;EAEAG,oBAAoB,GAAS;IAC3B,IAAM;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACP,KAAK;IAC9C,IAAMQ,OAAO,GAAGb,WAAW,CAACc,kBAAkB,CAACH,WAAW,CAAC;IAC3DV,GAAG,CAACc,KAAK,CAAC,sBAAsB,EAAEF,OAAO,CAAC;IAC1CD,UAAU,CAACI,IAAI,CAACjB,UAAU,CAACkB,MAAM,EAAEJ,OAAO,EAAEF,WAAW,CAAC;EAC1D;EAEAO,MAAM,GAAc;IAClB,IAAM;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACd,KAAK;IAC/B,IAAM;MAAEE;IAAM,CAAC,GAAG,IAAI,CAACD,KAAK;IAC5B,IAAIC,KAAK,IAAI,IAAI,EAAE;MACjB,oBACE;QAAK,SAAS,EAAC;MAAsB,gBACnC,oBAAC,cAAc;QACb,YAAY,YAAKA,KAAK,CAAG;QACzB,SAAS,EAAE,KAAM;QACjB,QAAQ,EAAE;MAAM,EAChB,CACE;IAEV;IACA,OAAOY,QAAQ;EACjB;AACF;AAEA,eAAehB,kBAAkB"}
1
+ {"version":3,"file":"PanelErrorBoundary.js","names":["React","Component","LoadingOverlay","Log","PanelEvent","LayoutUtils","log","module","PanelErrorBoundary","constructor","props","state","error","componentDidCatch","setState","componentWillUnmount","glContainer","glEventHub","panelId","getIdFromContainer","debug","emit","CLOSED","render","children"],"sources":["../src/PanelErrorBoundary.tsx"],"sourcesContent":["import React, { Component, ReactNode } from 'react';\nimport { LoadingOverlay } from '@deephaven/components';\nimport type { Container, EventEmitter } from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport PanelEvent from './PanelEvent';\nimport LayoutUtils from './layout/LayoutUtils';\nimport './PanelErrorBoundary.scss';\n\nconst log = Log.module('PanelErrorBoundary');\n\ninterface PanelErrorBoundaryProps {\n children: ReactNode;\n glContainer: Container;\n glEventHub: EventEmitter;\n}\n\ninterface PanelErrorBoundaryState {\n error: Error | null;\n}\n/**\n * Panel wrapper implementing Error Boundary and emitting Closed event.\n * Closed event has to be emitted from the wrapper instead of the panel itself\n * because the panel can get unmounted on errors\n * and we want to differentiate between unmount on error vs panel being intentionally closed.\n */\nclass PanelErrorBoundary extends Component<\n PanelErrorBoundaryProps,\n PanelErrorBoundaryState\n> {\n constructor(props: PanelErrorBoundaryProps) {\n super(props);\n this.state = { error: null };\n }\n\n componentDidCatch(error: Error): void {\n this.setState({ error });\n }\n\n componentWillUnmount(): void {\n const { glContainer, glEventHub } = this.props;\n const panelId = LayoutUtils.getIdFromContainer(glContainer);\n log.debug('componentWillUnmount', panelId);\n glEventHub.emit(PanelEvent.CLOSED, panelId, glContainer);\n }\n\n render(): ReactNode {\n const { children } = this.props;\n const { error } = this.state;\n if (error != null) {\n return (\n <div className=\"panel-error-boundary\">\n <LoadingOverlay\n errorMessage={`${error}`}\n isLoading={false}\n isLoaded={false}\n />\n </div>\n );\n }\n return children;\n }\n}\n\nexport default PanelErrorBoundary;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAmB,OAAO;AACnD,SAASC,cAAc,QAAQ,uBAAuB;AAEtD,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,UAAU;AAAA,OACVC,WAAW;AAAA;AAAA;AAGlB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,oBAAoB,CAAC;AAW5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,SAASP,SAAS,CAGxC;EACAQ,WAAW,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CAAC;IACZ,IAAI,CAACC,KAAK,GAAG;MAAEC,KAAK,EAAE;IAAK,CAAC;EAC9B;EAEAC,iBAAiB,CAACD,KAAY,EAAQ;IACpC,IAAI,CAACE,QAAQ,CAAC;MAAEF;IAAM,CAAC,CAAC;EAC1B;EAEAG,oBAAoB,GAAS;IAC3B,IAAM;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACP,KAAK;IAC9C,IAAMQ,OAAO,GAAGb,WAAW,CAACc,kBAAkB,CAACH,WAAW,CAAC;IAC3DV,GAAG,CAACc,KAAK,CAAC,sBAAsB,EAAEF,OAAO,CAAC;IAC1CD,UAAU,CAACI,IAAI,CAACjB,UAAU,CAACkB,MAAM,EAAEJ,OAAO,EAAEF,WAAW,CAAC;EAC1D;EAEAO,MAAM,GAAc;IAClB,IAAM;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACd,KAAK;IAC/B,IAAM;MAAEE;IAAM,CAAC,GAAG,IAAI,CAACD,KAAK;IAC5B,IAAIC,KAAK,IAAI,IAAI,EAAE;MACjB,oBACE;QAAK,SAAS,EAAC,sBAAsB;QAAA,uBACnC,KAAC,cAAc;UACb,YAAY,YAAKA,KAAK,CAAG;UACzB,SAAS,EAAE,KAAM;UACjB,QAAQ,EAAE;QAAM;MAChB,EACE;IAEV;IACA,OAAOY,QAAQ;EACjB;AACF;AAEA,eAAehB,kBAAkB"}
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import "./PanelPlaceholder.css";
3
3
  import LayoutUtils from "./layout/LayoutUtils.js";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
4
6
  /**
5
7
  * Displays a placeholder for unregistered panel types.
6
8
  */
@@ -8,10 +10,13 @@ var PanelPlaceholder = /*#__PURE__*/React.forwardRef((props, ref) => {
8
10
  var component = LayoutUtils.getComponentNameFromPanel({
9
11
  props
10
12
  });
11
- return /*#__PURE__*/React.createElement("div", {
13
+ return /*#__PURE__*/_jsx("div", {
12
14
  ref: ref,
13
- className: "panel-placeholder"
14
- }, /*#__PURE__*/React.createElement("div", null, "Component \"", component, "\" is not registered."));
15
+ className: "panel-placeholder",
16
+ children: /*#__PURE__*/_jsxs("div", {
17
+ children: ["Component \"", component, "\" is not registered."]
18
+ })
19
+ });
15
20
  });
16
21
  PanelPlaceholder.displayName = 'PanelPlaceholder';
17
22
  export default PanelPlaceholder;
@@ -1 +1 @@
1
- {"version":3,"file":"PanelPlaceholder.js","names":["React","LayoutUtils","PanelPlaceholder","forwardRef","props","ref","component","getComponentNameFromPanel","displayName"],"sources":["../src/PanelPlaceholder.tsx"],"sourcesContent":["import React, { ForwardedRef } from 'react';\nimport './PanelPlaceholder.scss';\nimport LayoutUtils from './layout/LayoutUtils';\nimport { PanelProps } from './DashboardPlugin';\n\n/**\n * Displays a placeholder for unregistered panel types.\n */\nconst PanelPlaceholder = React.forwardRef(\n (props: PanelProps, ref: ForwardedRef<HTMLDivElement>) => {\n const component = LayoutUtils.getComponentNameFromPanel({ props });\n return (\n <div ref={ref} className=\"panel-placeholder\">\n <div>Component &quot;{component}&quot; is not registered.</div>\n </div>\n );\n }\n);\n\nPanelPlaceholder.displayName = 'PanelPlaceholder';\n\nexport default PanelPlaceholder;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAAC;AAAA,OAErCC,WAAW;AAGlB;AACA;AACA;AACA,IAAMC,gBAAgB,gBAAGF,KAAK,CAACG,UAAU,CACvC,CAACC,KAAiB,EAAEC,GAAiC,KAAK;EACxD,IAAMC,SAAS,GAAGL,WAAW,CAACM,yBAAyB,CAAC;IAAEH;EAAM,CAAC,CAAC;EAClE,oBACE;IAAK,GAAG,EAAEC,GAAI;IAAC,SAAS,EAAC;EAAmB,gBAC1C,iCAAK,cAAgB,EAACC,SAAS,EAAC,uBAAyB,CAAM,CAC3D;AAEV,CAAC,CACF;AAEDJ,gBAAgB,CAACM,WAAW,GAAG,kBAAkB;AAEjD,eAAeN,gBAAgB"}
1
+ {"version":3,"file":"PanelPlaceholder.js","names":["React","LayoutUtils","PanelPlaceholder","forwardRef","props","ref","component","getComponentNameFromPanel","displayName"],"sources":["../src/PanelPlaceholder.tsx"],"sourcesContent":["import React, { ForwardedRef } from 'react';\nimport './PanelPlaceholder.scss';\nimport LayoutUtils from './layout/LayoutUtils';\nimport { PanelProps } from './DashboardPlugin';\n\n/**\n * Displays a placeholder for unregistered panel types.\n */\nconst PanelPlaceholder = React.forwardRef(\n (props: PanelProps, ref: ForwardedRef<HTMLDivElement>) => {\n const component = LayoutUtils.getComponentNameFromPanel({ props });\n return (\n <div ref={ref} className=\"panel-placeholder\">\n <div>Component &quot;{component}&quot; is not registered.</div>\n </div>\n );\n }\n);\n\nPanelPlaceholder.displayName = 'PanelPlaceholder';\n\nexport default PanelPlaceholder;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAAC;AAAA,OAErCC,WAAW;AAAA;AAAA;AAGlB;AACA;AACA;AACA,IAAMC,gBAAgB,gBAAGF,KAAK,CAACG,UAAU,CACvC,CAACC,KAAiB,EAAEC,GAAiC,KAAK;EACxD,IAAMC,SAAS,GAAGL,WAAW,CAACM,yBAAyB,CAAC;IAAEH;EAAM,CAAC,CAAC;EAClE,oBACE;IAAK,GAAG,EAAEC,GAAI;IAAC,SAAS,EAAC,mBAAmB;IAAA,uBAC1C;MAAA,WAAK,cAAgB,EAACC,SAAS,EAAC,uBAAyB;IAAA;EAAM,EAC3D;AAEV,CAAC,CACF;AAEDJ,gBAAgB,CAACM,WAAW,GAAG,kBAAkB;AAEjD,eAAeN,gBAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/dashboard",
3
- "version": "0.46.1-beta.0+2a4ec0dc",
3
+ "version": "0.46.1-beta.4+6ff27a67",
4
4
  "description": "Deephaven Dashboard",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,13 +22,13 @@
22
22
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^0.46.1-beta.0+2a4ec0dc",
26
- "@deephaven/golden-layout": "^0.46.1-beta.0+2a4ec0dc",
27
- "@deephaven/jsapi-bootstrap": "^0.46.1-beta.0+2a4ec0dc",
28
- "@deephaven/log": "^0.46.1-beta.0+2a4ec0dc",
29
- "@deephaven/react-hooks": "^0.46.1-beta.0+2a4ec0dc",
30
- "@deephaven/redux": "^0.46.1-beta.0+2a4ec0dc",
31
- "@deephaven/utils": "^0.46.1-beta.0+2a4ec0dc",
25
+ "@deephaven/components": "^0.46.1-beta.4+6ff27a67",
26
+ "@deephaven/golden-layout": "^0.46.1-beta.4+6ff27a67",
27
+ "@deephaven/jsapi-bootstrap": "^0.46.1-beta.4+6ff27a67",
28
+ "@deephaven/log": "^0.46.1-beta.4+6ff27a67",
29
+ "@deephaven/react-hooks": "^0.46.1-beta.4+6ff27a67",
30
+ "@deephaven/redux": "^0.46.1-beta.4+6ff27a67",
31
+ "@deephaven/utils": "^0.46.1-beta.4+6ff27a67",
32
32
  "deep-equal": "^2.0.5",
33
33
  "lodash.ismatch": "^4.1.1",
34
34
  "lodash.throttle": "^4.1.1",
@@ -41,7 +41,7 @@
41
41
  "react-redux": "^7.2.4"
42
42
  },
43
43
  "devDependencies": {
44
- "@deephaven/mocks": "^0.46.1-beta.0+2a4ec0dc",
44
+ "@deephaven/mocks": "^0.46.1-beta.4+6ff27a67",
45
45
  "@types/lodash.ismatch": "^4.4.0"
46
46
  },
47
47
  "files": [
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "2a4ec0dc2720f38236aa2da2e70a2f321fea1c35"
53
+ "gitHead": "6ff27a67fded2d6a7affe5ec8480faf01ff1af00"
54
54
  }