@deephaven/dashboard 1.18.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../src/DashboardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAMnB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAEV,UAAU,EAGX,MAAM,0BAA0B,CAAC;AAMlC,OAAqB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAWjE,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,qBAAqB,GAAG,UAAU,EAAE,CAAC;AAejD,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,KAAK,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAClD,EAAE,EAAE,MAAM,CAAC;IAGX,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACnE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC,wCAAwC;IACxC,YAAY,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAg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C,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,EAAE,EACF,QAAQ,EACR,cAA2E,EAC3E,MAAM,EACN,YAAoC,EACpC,cAAiC,EACjC,mBAAsC,EACtC,OAAwB,EACxB,SAA4B,EAC5B,YAAY,GACb,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAoTpC;AAED,eAAe,eAAe,CAAC"}
@@ -3,7 +3,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
3
3
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
6
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
7
  import Log from '@deephaven/log';
8
8
  import { usePrevious, useThrottledCallback } from '@deephaven/react-hooks';
9
9
  import { ErrorBoundary } from '@deephaven/components';
@@ -50,7 +50,9 @@ export function DashboardLayout(_ref) {
50
50
  var data = (_useSelector = useSelector(state => getDashboardData(state, id))) !== null && _useSelector !== void 0 ? _useSelector : EMPTY_OBJECT;
51
51
  var [isDashboardEmpty, setIsDashboardEmpty] = useState(false);
52
52
  var [isItemDragging, setIsItemDragging] = useState(false);
53
- var [lastConfig, setLastConfig] = useState();
53
+ // `lastConfig` is intentionally a ref rather than state so it can be written synchronously inside the throttled body before `onLayoutChange` runs.
54
+ // This guarantees any subsequent render triggered by the parent observes the latest value, regardless of how that render was scheduled (see DH-21843).
55
+ var lastConfigRef = useRef();
54
56
  var [initialClosedPanels] = useState((_closed = data === null || data === void 0 ? void 0 : data.closed) !== null && _closed !== void 0 ? _closed : []);
55
57
  var [layoutChildren, setLayoutChildren] = useState(layout.getReactChildren());
56
58
  var hydrateMap = useMemo(() => new Map(), []);
@@ -130,12 +132,17 @@ export function DashboardLayout(_ref) {
130
132
 
131
133
  // Throttle the calls so that we don't flood comparing these layouts
132
134
  var throttledProcessDehydratedLayoutConfig = useThrottledCallback(dehydratedLayoutConfig => {
133
- var hasChanged = lastConfig == null || !LayoutUtils.isEqual(lastConfig, dehydratedLayoutConfig);
135
+ var previousConfig = lastConfigRef.current;
136
+ var hasChanged = previousConfig == null || !LayoutUtils.isEqual(previousConfig, dehydratedLayoutConfig);
134
137
  log.debug('handleLayoutStateChanged', hasChanged, dehydratedLayoutConfig);
135
138
  if (hasChanged) {
136
- log.debug('Layout config has changed', 'lastConfig', lastConfig, 'dehydratedLayoutConfig', dehydratedLayoutConfig);
139
+ log.debug('Layout config has changed', 'lastConfig', previousConfig, 'dehydratedLayoutConfig', dehydratedLayoutConfig);
137
140
  setIsDashboardEmpty(layout.root.contentItems.length === 0);
138
- setLastConfig(dehydratedLayoutConfig);
141
+
142
+ // Update the ref synchronously before calling `onLayoutChange` so
143
+ // that any subsequent render triggered by the parent observes the
144
+ // latest value, regardless of how that render was scheduled.
145
+ lastConfigRef.current = dehydratedLayoutConfig;
139
146
  onLayoutChange(dehydratedLayoutConfig);
140
147
  setLayoutChildren(layout.getReactChildren());
141
148
  }
@@ -182,8 +189,8 @@ export function DashboardLayout(_ref) {
182
189
  useListener(layout, 'reactChildrenChanged', handleReactChildrenChange);
183
190
  var previousLayoutConfig = usePrevious(layoutConfig);
184
191
  useEffect(function loadNewConfig() {
185
- if (previousLayoutConfig !== layoutConfig && layoutConfig !== lastConfig) {
186
- log.debug('loadNewConfig effect triggered. previousLayoutConfig', previousLayoutConfig, 'layoutConfig', layoutConfig, 'lastConfig', lastConfig);
192
+ if (previousLayoutConfig !== layoutConfig && layoutConfig !== lastConfigRef.current) {
193
+ log.debug('loadNewConfig effect triggered. previousLayoutConfig', previousLayoutConfig, 'layoutConfig', layoutConfig, 'lastConfig', lastConfigRef.current);
187
194
  log.debug('Setting new layout content...');
188
195
  var content = LayoutUtils.hydrateLayoutConfig(layoutConfig, hydrateComponent);
189
196
  // Remove the old layout before add the new one
@@ -197,7 +204,7 @@ export function DashboardLayout(_ref) {
197
204
  }
198
205
  setIsDashboardEmpty(layout.root.contentItems.length === 0);
199
206
  }
200
- }, [hydrateComponent, layout, layoutConfig, lastConfig, panelManager, previousLayoutConfig]);
207
+ }, [hydrateComponent, layout, layoutConfig, panelManager, previousLayoutConfig]);
201
208
 
202
209
  // This should be the last hook called in this component
203
210
  // Ensures it runs after any other effects on mount
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardLayout.js","names":["React","useCallback","useEffect","useMemo","useState","Log","usePrevious","useThrottledCallback","ErrorBoundary","useDispatch","useSelector","PanelManager","PanelErrorBoundary","LayoutUtils","isReactComponentConfig","canHaveRef","dehydrate","dehydrateDefault","hydrate","hydrateDefault","PanelEvent","useListener","getDashboardData","updateDashboardData","DashboardPanelWrapper","PanelIdContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","EMPTY_OBJECT","Object","freeze","DEFAULT_LAYOUT_CONFIG","DEFAULT_CALLBACK","undefined","STATE_CHANGE_THROTTLE_MS","FALLBACK_CALLBACK","props","DashboardLayout","_ref","_useSelector","_closed","id","children","emptyDashboard","className","layout","layoutConfig","onLayoutChange","onLayoutInitialized","panelWrapper","dispatch","data","state","isDashboardEmpty","setIsDashboardEmpty","isItemDragging","setIsItemDragging","lastConfig","setLastConfig","initialClosedPanels","closed","layoutChildren","setLayoutChildren","getReactChildren","hydrateMap","Map","dehydrateMap","registerComponent","name","componentType","_componentType$displa","componentHydrate","arguments","length","componentDehydrate","debug2","wrappedComponent","ref","CType","PanelWrapperType","hasRef","innerElem","_objectSpread","glContainer","glEventHub","panelId","getIdFromContainer","Provider","value","displayName","concat","cleanup","forwardRef","set","hydrateComponent","_hydrateMap$get","get","dehydrateComponent","config","_dehydrateMap$get","panelManager","_ref2","openedMap","throttledProcessDehydratedLayoutConfig","dehydratedLayoutConfig","hasChanged","isEqual","debug","root","contentItems","flushOnUnmount","flush","handleLayoutStateChanged","glConfig","toConfig","contentConfig","content","dehydrateLayoutConfig","handleLayoutItemPickedUp","component","componentId","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","fallback","cloneElement"],"sources":["../src/DashboardLayout.tsx"],"sourcesContent":["import React, {\n type ComponentType,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport type GoldenLayout from '@deephaven/golden-layout';\nimport type {\n Container,\n ItemConfig,\n ReactComponentConfig,\n AbstractContentItem,\n} from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport { usePrevious, useThrottledCallback } from '@deephaven/react-hooks';\nimport { ErrorBoundary } from '@deephaven/components';\nimport { type RootState } from '@deephaven/redux';\nimport { useDispatch, useSelector } from 'react-redux';\nimport PanelManager, { type ClosedPanels } from './PanelManager';\nimport PanelErrorBoundary from './PanelErrorBoundary';\nimport LayoutUtils, { isReactComponentConfig } from './layout/LayoutUtils';\nimport {\n canHaveRef,\n dehydrate as dehydrateDefault,\n hydrate as hydrateDefault,\n} from './DashboardUtils';\nimport PanelEvent from './PanelEvent';\nimport { useListener } from './layout';\nimport { getDashboardData, updateDashboardData } from './redux';\nimport {\n type PanelConfig,\n type PanelComponentType,\n type PanelDehydrateFunction,\n type PanelHydrateFunction,\n type PanelProps,\n type DehydratedPanelProps,\n} from './DashboardPlugin';\nimport DashboardPanelWrapper from './DashboardPanelWrapper';\nimport { PanelIdContext } from './usePanelId';\n\nexport type DashboardLayoutConfig = ItemConfig[];\n\nconst log = Log.module('DashboardLayout');\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst DEFAULT_LAYOUT_CONFIG: DashboardLayoutConfig = [];\n\nconst DEFAULT_CALLBACK = (): void => undefined;\n\nconst STATE_CHANGE_THROTTLE_MS = 1000;\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 = <P,>(props: P): P => props;\n\ntype DashboardData = {\n closed?: ClosedPanels;\n};\n\ntype DashboardLayoutProps = React.PropsWithChildren<{\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 emptyDashboard?: React.ReactNode;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType<React.PropsWithChildren<PanelProps>>;\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 className=\"dashboard-empty\">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,\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 [layoutChildren, setLayoutChildren] = useState(\n layout.getReactChildren()\n );\n\n const hydrateMap = useMemo(() => new Map<string, PanelHydrateFunction>(), []);\n const dehydrateMap = useMemo(\n () => new Map<string, PanelDehydrateFunction>(),\n []\n );\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(\n props: PanelProps,\n ref: React.Ref<unknown>\n ): JSX.Element {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const CType = componentType as any;\n const PanelWrapperType = panelWrapper;\n\n /**\n * The ref is used to detect changes to class component state so we\n * can track changes to panelState. We should opt for more explicit\n * state changes in the future and in functional components.\n */\n const hasRef = canHaveRef(CType);\n\n const innerElem = hasRef ? (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <CType {...props} ref={ref} />\n ) : (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <CType {...props} />\n );\n\n // Props supplied by GoldenLayout\n const { glContainer, glEventHub } = props;\n const panelId = LayoutUtils.getIdFromContainer(glContainer);\n return (\n <PanelErrorBoundary glContainer={glContainer} glEventHub={glEventHub}>\n <PanelIdContext.Provider value={panelId as string | null}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <DashboardPanelWrapper {...props}>\n {PanelWrapperType == null ? (\n innerElem\n ) : (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <PanelWrapperType {...props}>{innerElem}</PanelWrapperType>\n )}\n </DashboardPanelWrapper>\n </PanelIdContext.Provider>\n </PanelErrorBoundary>\n );\n }\n\n wrappedComponent.displayName = `DashboardWrapper(${\n componentType.displayName ?? name\n })`;\n\n const cleanup = layout.registerComponent(\n name,\n React.forwardRef(wrappedComponent)\n );\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: string, props: DehydratedPanelProps) =>\n (hydrateMap.get(name) ?? (FALLBACK_CALLBACK as PanelHydrateFunction))(\n props,\n id\n ),\n [hydrateMap, id]\n );\n const dehydrateComponent = useCallback(\n (name: string, config: PanelConfig) =>\n (dehydrateMap.get(name) ?? (FALLBACK_CALLBACK as PanelDehydrateFunction))(\n config,\n id\n ),\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 // Throttle the calls so that we don't flood comparing these layouts\n const throttledProcessDehydratedLayoutConfig = useThrottledCallback(\n (dehydratedLayoutConfig: DashboardLayoutConfig) => {\n const hasChanged =\n lastConfig == null ||\n !LayoutUtils.isEqual(lastConfig, dehydratedLayoutConfig);\n\n log.debug('handleLayoutStateChanged', hasChanged, dehydratedLayoutConfig);\n\n if (hasChanged) {\n log.debug(\n 'Layout config has changed',\n 'lastConfig',\n lastConfig,\n 'dehydratedLayoutConfig',\n dehydratedLayoutConfig\n );\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n\n setLastConfig(dehydratedLayoutConfig);\n\n onLayoutChange(dehydratedLayoutConfig);\n\n setLayoutChildren(layout.getReactChildren());\n }\n },\n STATE_CHANGE_THROTTLE_MS,\n { flushOnUnmount: true }\n );\n\n useEffect(\n () => () => throttledProcessDehydratedLayoutConfig.flush(),\n [throttledProcessDehydratedLayoutConfig]\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 const glConfig = layout.toConfig();\n const contentConfig = glConfig.content;\n const dehydratedLayoutConfig = LayoutUtils.dehydrateLayoutConfig(\n contentConfig,\n dehydrateComponent\n );\n throttledProcessDehydratedLayoutConfig(dehydratedLayoutConfig);\n }, [\n dehydrateComponent,\n isItemDragging,\n layout,\n throttledProcessDehydratedLayoutConfig,\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: AbstractContentItem) => {\n log.debug2('handleComponentCreated', item);\n\n if (\n item == null ||\n item.config == null ||\n !isReactComponentConfig(item.config) ||\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(\n 'loadNewConfig effect triggered. previousLayoutConfig',\n previousLayoutConfig,\n 'layoutConfig',\n layoutConfig,\n 'lastConfig',\n lastConfig\n );\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 // This should be the last hook called in this component\n // Ensures it runs after any other effects on mount\n // Fire only once after the layout is mounted\n // This should ensure DashboardPlugins have been mounted\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => onLayoutInitialized(), []);\n\n return (\n <>\n {isDashboardEmpty && emptyDashboard}\n {layoutChildren}\n {React.Children.map(children, child =>\n child != null ? (\n // Have fallback be an empty array so that we don't show the error message over entire app\n // Look into using toast message in the future\n <ErrorBoundary fallback={[]}>\n {React.cloneElement(child as ReactElement, {\n id,\n layout,\n panelManager,\n registerComponent,\n })}\n </ErrorBoundary>\n ) : null\n )}\n </>\n );\n}\n\nexport default DashboardLayout;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AAQd,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,WAAW,EAAEC,oBAAoB,QAAQ,wBAAwB;AAC1E,SAASC,aAAa,QAAQ,uBAAuB;AAErD,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAAC,OAChDC,YAAY;AAAA,OACZC,kBAAkB;AAAA,OAClBC,WAAW,IAAIC,sBAAsB;AAAA,SAE1CC,UAAU,EACVC,SAAS,IAAIC,gBAAgB,EAC7BC,OAAO,IAAIC,cAAc;AAAA,OAEpBC,UAAU;AAAA,SACRC,WAAW;AAAA,SACXC,gBAAgB,EAAEC,mBAAmB;AA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AC+D,IAAI,CAACC,YAAY,CAACpC,MAAM,KAAK,CAAC,CAAC;IAC5D;EACF,CAAC,EACD,CACEqB,gBAAgB,EAChBjD,MAAM,EACNC,YAAY,EACZW,UAAU,EACV2C,YAAY,EACZoC,oBAAoB,CAExB,CAAC;;EAED;EACA;EACA;EACA;EACA;EACA5I,SAAS,CAAC,MAAMoD,mBAAmB,CAAC,CAAC,EAAE,EAAE,CAAC;EAE1C,oBACEvB,KAAA,CAAAF,SAAA;IAAAmB,QAAA,GACGW,gBAAgB,IAAIV,cAAc,EAClCkB,cAAc,EACdnE,KAAK,CAACoJ,QAAQ,CAACC,GAAG,CAACrG,QAAQ,EAAEsG,KAAK,IACjCA,KAAK,IAAI,IAAI;IAAA;IACX;IACA;IACA3H,IAAA,CAACnB,aAAa;MAAC+I,QAAQ,EAAE,EAAG;MAAAvG,QAAA,eACzBhD,KAAK,CAACwJ,YAAY,CAACF,KAAK,EAAkB;QACzCvG,EAAE;QACFI,MAAM;QACNuD,YAAY;QACZjC;MACF,CAAC;IAAC,CACW,CAAC,GACd,IACN,CAAC;EAAA,CACD,CAAC;AAEP;AAEA,eAAe9B,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"DashboardLayout.js","names":["React","useCallback","useEffect","useMemo","useRef","useState","Log","usePrevious","useThrottledCallback","ErrorBoundary","useDispatch","useSelector","PanelManager","PanelErrorBoundary","LayoutUtils","isReactComponentConfig","canHaveRef","dehydrate","dehydrateDefault","hydrate","hydrateDefault","PanelEvent","useListener","getDashboardData","updateDashboardData","DashboardPanelWrapper","PanelIdContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","log","module","EMPTY_OBJECT","Object","freeze","DEFAULT_LAYOUT_CONFIG","DEFAULT_CALLBACK","undefined","STATE_CHANGE_THROTTLE_MS","FALLBACK_CALLBACK","props","DashboardLayout","_ref","_useSelector","_closed","id","children","emptyDashboard","className","layout","layoutConfig","onLayoutChange","onLayoutInitialized","panelWrapper","dispatch","data","state","isDashboardEmpty","setIsDashboardEmpty","isItemDragging","setIsItemDragging","lastConfigRef","initialClosedPanels","closed","layoutChildren","setLayoutChildren","getReactChildren","hydrateMap","Map","dehydrateMap","registerComponent","name","componentType","_componentType$displa","componentHydrate","arguments","length","componentDehydrate","debug2","wrappedComponent","ref","CType","PanelWrapperType","hasRef","innerElem","_objectSpread","glContainer","glEventHub","panelId","getIdFromContainer","Provider","value","displayName","concat","cleanup","forwardRef","set","hydrateComponent","_hydrateMap$get","get","dehydrateComponent","config","_dehydrateMap$get","panelManager","_ref2","openedMap","throttledProcessDehydratedLayoutConfig","dehydratedLayoutConfig","previousConfig","current","hasChanged","isEqual","debug","root","contentItems","flushOnUnmount","flush","handleLayoutStateChanged","glConfig","toConfig","contentConfig","content","dehydrateLayoutConfig","handleLayoutItemPickedUp","component","componentId","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","fallback","cloneElement"],"sources":["../src/DashboardLayout.tsx"],"sourcesContent":["import React, {\n type ComponentType,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type GoldenLayout from '@deephaven/golden-layout';\nimport type {\n Container,\n ItemConfig,\n ReactComponentConfig,\n AbstractContentItem,\n} from '@deephaven/golden-layout';\nimport Log from '@deephaven/log';\nimport { usePrevious, useThrottledCallback } from '@deephaven/react-hooks';\nimport { ErrorBoundary } from '@deephaven/components';\nimport { type RootState } from '@deephaven/redux';\nimport { useDispatch, useSelector } from 'react-redux';\nimport PanelManager, { type ClosedPanels } from './PanelManager';\nimport PanelErrorBoundary from './PanelErrorBoundary';\nimport LayoutUtils, { isReactComponentConfig } from './layout/LayoutUtils';\nimport {\n canHaveRef,\n dehydrate as dehydrateDefault,\n hydrate as hydrateDefault,\n} from './DashboardUtils';\nimport PanelEvent from './PanelEvent';\nimport { useListener } from './layout';\nimport { getDashboardData, updateDashboardData } from './redux';\nimport {\n type PanelConfig,\n type PanelComponentType,\n type PanelDehydrateFunction,\n type PanelHydrateFunction,\n type PanelProps,\n type DehydratedPanelProps,\n} from './DashboardPlugin';\nimport DashboardPanelWrapper from './DashboardPanelWrapper';\nimport { PanelIdContext } from './usePanelId';\n\nexport type DashboardLayoutConfig = ItemConfig[];\n\nconst log = Log.module('DashboardLayout');\n\nconst EMPTY_OBJECT = Object.freeze({});\n\nconst DEFAULT_LAYOUT_CONFIG: DashboardLayoutConfig = [];\n\nconst DEFAULT_CALLBACK = (): void => undefined;\n\nconst STATE_CHANGE_THROTTLE_MS = 1000;\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 = <P,>(props: P): P => props;\n\ntype DashboardData = {\n closed?: ClosedPanels;\n};\n\ntype DashboardLayoutProps = React.PropsWithChildren<{\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 emptyDashboard?: React.ReactNode;\n\n /** Component to wrap each panel with */\n panelWrapper?: ComponentType<React.PropsWithChildren<PanelProps>>;\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 className=\"dashboard-empty\">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,\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 // `lastConfig` is intentionally a ref rather than state so it can be written synchronously inside the throttled body before `onLayoutChange` runs.\n // This guarantees any subsequent render triggered by the parent observes the latest value, regardless of how that render was scheduled (see DH-21843).\n const lastConfigRef = useRef<DashboardLayoutConfig>();\n const [initialClosedPanels] = useState<ReactComponentConfig[] | undefined>(\n (data as DashboardData)?.closed ?? []\n );\n const [layoutChildren, setLayoutChildren] = useState(\n layout.getReactChildren()\n );\n\n const hydrateMap = useMemo(() => new Map<string, PanelHydrateFunction>(), []);\n const dehydrateMap = useMemo(\n () => new Map<string, PanelDehydrateFunction>(),\n []\n );\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(\n props: PanelProps,\n ref: React.Ref<unknown>\n ): JSX.Element {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const CType = componentType as any;\n const PanelWrapperType = panelWrapper;\n\n /**\n * The ref is used to detect changes to class component state so we\n * can track changes to panelState. We should opt for more explicit\n * state changes in the future and in functional components.\n */\n const hasRef = canHaveRef(CType);\n\n const innerElem = hasRef ? (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <CType {...props} ref={ref} />\n ) : (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <CType {...props} />\n );\n\n // Props supplied by GoldenLayout\n const { glContainer, glEventHub } = props;\n const panelId = LayoutUtils.getIdFromContainer(glContainer);\n return (\n <PanelErrorBoundary glContainer={glContainer} glEventHub={glEventHub}>\n <PanelIdContext.Provider value={panelId as string | null}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <DashboardPanelWrapper {...props}>\n {PanelWrapperType == null ? (\n innerElem\n ) : (\n // eslint-disable-next-line react/jsx-props-no-spreading\n <PanelWrapperType {...props}>{innerElem}</PanelWrapperType>\n )}\n </DashboardPanelWrapper>\n </PanelIdContext.Provider>\n </PanelErrorBoundary>\n );\n }\n\n wrappedComponent.displayName = `DashboardWrapper(${\n componentType.displayName ?? name\n })`;\n\n const cleanup = layout.registerComponent(\n name,\n React.forwardRef(wrappedComponent)\n );\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: string, props: DehydratedPanelProps) =>\n (hydrateMap.get(name) ?? (FALLBACK_CALLBACK as PanelHydrateFunction))(\n props,\n id\n ),\n [hydrateMap, id]\n );\n const dehydrateComponent = useCallback(\n (name: string, config: PanelConfig) =>\n (dehydrateMap.get(name) ?? (FALLBACK_CALLBACK as PanelDehydrateFunction))(\n config,\n id\n ),\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 // Throttle the calls so that we don't flood comparing these layouts\n const throttledProcessDehydratedLayoutConfig = useThrottledCallback(\n (dehydratedLayoutConfig: DashboardLayoutConfig) => {\n const previousConfig = lastConfigRef.current;\n const hasChanged =\n previousConfig == null ||\n !LayoutUtils.isEqual(previousConfig, dehydratedLayoutConfig);\n\n log.debug('handleLayoutStateChanged', hasChanged, dehydratedLayoutConfig);\n\n if (hasChanged) {\n log.debug(\n 'Layout config has changed',\n 'lastConfig',\n previousConfig,\n 'dehydratedLayoutConfig',\n dehydratedLayoutConfig\n );\n setIsDashboardEmpty(layout.root.contentItems.length === 0);\n\n // Update the ref synchronously before calling `onLayoutChange` so\n // that any subsequent render triggered by the parent observes the\n // latest value, regardless of how that render was scheduled.\n lastConfigRef.current = dehydratedLayoutConfig;\n\n onLayoutChange(dehydratedLayoutConfig);\n\n setLayoutChildren(layout.getReactChildren());\n }\n },\n STATE_CHANGE_THROTTLE_MS,\n { flushOnUnmount: true }\n );\n\n useEffect(\n () => () => throttledProcessDehydratedLayoutConfig.flush(),\n [throttledProcessDehydratedLayoutConfig]\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 const glConfig = layout.toConfig();\n const contentConfig = glConfig.content;\n const dehydratedLayoutConfig = LayoutUtils.dehydrateLayoutConfig(\n contentConfig,\n dehydrateComponent\n );\n throttledProcessDehydratedLayoutConfig(dehydratedLayoutConfig);\n }, [\n dehydrateComponent,\n isItemDragging,\n layout,\n throttledProcessDehydratedLayoutConfig,\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: AbstractContentItem) => {\n log.debug2('handleComponentCreated', item);\n\n if (\n item == null ||\n item.config == null ||\n !isReactComponentConfig(item.config) ||\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 !== lastConfigRef.current\n ) {\n log.debug(\n 'loadNewConfig effect triggered. previousLayoutConfig',\n previousLayoutConfig,\n 'layoutConfig',\n layoutConfig,\n 'lastConfig',\n lastConfigRef.current\n );\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 [hydrateComponent, layout, layoutConfig, panelManager, previousLayoutConfig]\n );\n\n // This should be the last hook called in this component\n // Ensures it runs after any other effects on mount\n // Fire only once after the layout is mounted\n // This should ensure DashboardPlugins have been mounted\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => onLayoutInitialized(), []);\n\n return (\n <>\n {isDashboardEmpty && emptyDashboard}\n {layoutChildren}\n {React.Children.map(children, child =>\n child != null ? (\n // Have fallback be an empty array so that we don't show the error message over entire app\n // Look into using toast message in the future\n <ErrorBoundary fallback={[]}>\n {React.cloneElement(child as ReactElement, {\n id,\n layout,\n panelManager,\n registerComponent,\n })}\n </ErrorBoundary>\n ) : null\n )}\n </>\n );\n}\n\nexport default DashboardLayout;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAGVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,E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,6 @@
1
1
  {
2
2
  "name": "@deephaven/dashboard",
3
- "version": "1.18.1",
3
+ "version": "1.19.0",
4
4
  "description": "Deephaven Dashboard",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@
26
26
  "@deephaven/golden-layout": "^1.18.1",
27
27
  "@deephaven/log": "^1.8.0",
28
28
  "@deephaven/react-hooks": "^1.14.0",
29
- "@deephaven/redux": "^1.17.0",
29
+ "@deephaven/redux": "^1.19.0",
30
30
  "@deephaven/utils": "^1.10.0",
31
31
  "classnames": "^2.3.1",
32
32
  "fast-deep-equal": "^3.1.3",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "ce430c4d4bf89c95a6a9ade1d8bf3a88becad98d"
56
+ "gitHead": "8c0cabbd8c9bb2d85bdd2234deab3f43ae8bbcaf"
57
57
  }