@deephaven/dashboard 0.44.1-beta.0 → 0.44.2-plugin-cleanup.3

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,aAAa,EAMd,MAAM,OAAO,CAAC;AACf,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,EAEV,cAAc,EAEf,MAAM,0BAA0B,CAAC;AAKlC,OAAqB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAU5D,OAAO,EAEL,sBAAsB,EACtB,oBAAoB,EAErB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,qBAAqB,GAAG,cAAc,EAAE,CAAC;AAarD,KAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,UAAU,oBAAoB;IAC5B,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,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC,wCAAwC;IACxC,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,eAAe,C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,KAAK,CAAC,SAAS,CAAC;IAEjC,wCAAwC;IACxC,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,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,CAqPpC;yBAhQe,eAAe;;;;;;;;;;;;;;;;;;;;;;;;AA6Q/B,eAAe,eAAe,CAAC"}
@@ -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,YAA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C,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","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 {/* TODO: Verify the id is getting populated from somewhere */}\n {/* <CType id={shortid.generate()} {...props} ref={ref} /> */}\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,I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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,7 +1,7 @@
1
1
  import type { Component, ComponentType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
2
2
  import { ConnectedComponent } from 'react-redux';
3
- import GoldenLayout from '@deephaven/golden-layout';
4
- import type { ReactComponentConfig, EventEmitter, Container } from '@deephaven/golden-layout';
3
+ import GoldenLayout, { GLPanelProps } from '@deephaven/golden-layout';
4
+ import type { ReactComponentConfig } from '@deephaven/golden-layout';
5
5
  import PanelManager from './PanelManager';
6
6
  /**
7
7
  * Alias for the return type of React.forwardRef()
@@ -27,10 +27,20 @@ export type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> & P
27
27
  export type WrappedComponentType<P extends PanelProps, C extends ComponentType<P>> = ConnectedComponent<C, P>;
28
28
  export type PanelComponentType<P extends PanelProps = PanelProps, C extends ComponentType<P> = ComponentType<P>> = (ComponentType<P> | WrappedComponentType<P, C> | PanelFunctionComponentType<P, unknown>) & PanelStaticMetaData;
29
29
  export declare function isWrappedComponent<P extends PanelProps, C extends ComponentType<P>>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C>;
30
- export type PanelProps = {
31
- glContainer: Container;
32
- glEventHub: EventEmitter;
30
+ export type PanelMetadata = {
31
+ id?: string;
32
+ name?: string;
33
+ type?: string;
33
34
  };
35
+ export type PanelProps = GLPanelProps & {
36
+ id: string;
37
+ metadata?: PanelMetadata;
38
+ };
39
+ export type DehydratedPanelProps = Omit<PanelProps, keyof GLPanelProps>;
40
+ export type DashboardPanelProps = PanelProps & {
41
+ localDashboardId: string;
42
+ };
43
+ export type DehydratedDashboardPanelProps = Omit<DashboardPanelProps, keyof GLPanelProps>;
34
44
  export type PanelComponent<T extends PanelProps = PanelProps> = Component<T>;
35
45
  export type PanelConfig = ReactComponentConfig & {
36
46
  componentState?: Record<string, unknown> | null;
@@ -45,13 +55,13 @@ export interface DashboardPanelDefinition {
45
55
  definition: ComponentType;
46
56
  }
47
57
  export type DeregisterComponentFunction = () => void;
48
- export type PanelHydrateFunction<T = PanelProps> = (props: T, dashboardId: string) => PanelProps;
58
+ export type PanelHydrateFunction<T extends DehydratedDashboardPanelProps = DehydratedDashboardPanelProps, R extends T = T> = (props: T, dashboardId: string) => R;
49
59
  export type PanelDehydrateFunction = (config: PanelConfig, dashboardId: string) => PanelConfig | null;
50
60
  export type DashboardPluginComponentProps = {
51
61
  id: string;
52
62
  layout: GoldenLayout;
53
63
  panelManager: PanelManager;
54
- registerComponent: <P extends PanelProps, C extends ComponentType<P>>(name: string, ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction<P>, dehydrate?: PanelDehydrateFunction) => DeregisterComponentFunction;
64
+ registerComponent: <P extends DashboardPanelProps, C extends ComponentType<P>>(name: string, ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction, dehydrate?: PanelDehydrateFunction) => DeregisterComponentFunction;
55
65
  };
56
66
  export interface DashboardPlugin {
57
67
  panels?: DashboardPanelDefinition[];
@@ -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,EAC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AAE,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 +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 ReactComponentConfig,\n EventEmitter,\n Container,\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 PanelProps = {\n glContainer: Container;\n glEventHub: EventEmitter;\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<T = PanelProps> = (\n props: T,\n dashboardId: string\n) => PanelProps;\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: <P extends PanelProps, C extends ComponentType<P>>(\n name: string,\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction<P>,\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,OAM7CC,YAAY;AAEnB;AACA;AACA;AAyCA,OAAO,SAASC,kBAAkB,CAGhCC,IAA8B,EAAsC;EACpE,OAAO,CAACA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAiCC,gBAAgB,MAAKC,SAAS;AAC7E;AAmEA;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, { GLPanelProps } from '@deephaven/golden-layout';\nimport type { ReactComponentConfig } 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 id: string;\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,MAAwB,0BAA0B;AAAC,OAE/DC,YAAY;AAEnB;AACA;AACA;AAyCA,OAAO,SAASC,kBAAkB,CAGhCC,IAA8B,EAAsC;EACpE,OAAO,CAACA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAiCC,gBAAgB,MAAKC,SAAS;AAC7E;AAiFA;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,8 +1,4 @@
1
- import { PanelConfig, PanelProps } from './DashboardPlugin';
2
- export type DashboardPanelProps = PanelProps & {
3
- localDashboardId: string;
4
- metadata?: Record<string, unknown>;
5
- };
1
+ import { DehydratedDashboardPanelProps, PanelConfig } from './DashboardPlugin';
6
2
  /**
7
3
  * Dehydrate an existing panel to allow it to be serialized/saved.
8
4
  * Just takes what's in the panels `metadata` in the props and `panelState` in
@@ -18,7 +14,7 @@ export declare function dehydrate(config: PanelConfig): PanelConfig | null;
18
14
  * @param localDashboardId The local dashboard ID to hydrate the panel with
19
15
  * @returns The hydrated panel props
20
16
  */
21
- export declare function hydrate(props: PanelProps & Record<string, unknown>, localDashboardId?: string): DashboardPanelProps;
17
+ export declare function hydrate<T extends DehydratedDashboardPanelProps>(props: T, localDashboardId?: string): T;
22
18
  declare const _default: {
23
19
  dehydrate: typeof dehydrate;
24
20
  hydrate: typeof hydrate;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG;IAC7C,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAqBjE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,gBAAgB,SAAK,GACpB,mBAAmB,CAMrB;;;;;AAED,wBAGE"}
1
+ {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAqBjE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,6BAA6B,EAC7D,KAAK,EAAE,CAAC,EACR,gBAAgB,SAAK,GACpB,CAAC,CAMH;;;;;AAED,wBAGE"}
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardUtils.js","names":["dehydrate","config","props","componentState","metadata","panelState","newProps","type","hydrate","localDashboardId"],"sources":["../src/DashboardUtils.ts"],"sourcesContent":["import { PanelConfig, PanelProps } from './DashboardPlugin';\n\nexport type DashboardPanelProps = PanelProps & {\n localDashboardId: string;\n metadata?: Record<string, unknown>;\n};\n\n/**\n * Dehydrate an existing panel to allow it to be serialized/saved.\n * Just takes what's in the panels `metadata` in the props and `panelState` in\n * the component state, assumes it's serializable, and saves it.\n * @param config The panel config to dehydrate\n * @returns The dehydrated PanelConfig\n */\nexport function dehydrate(config: PanelConfig): PanelConfig | null {\n const { props, componentState } = config;\n const { metadata } = props;\n let { panelState = null } = props;\n if (componentState) {\n ({ panelState } = componentState);\n }\n const newProps: Record<string, unknown> = {};\n if (metadata != null) {\n newProps.metadata = metadata;\n }\n if (panelState != null) {\n newProps.panelState = panelState;\n }\n\n return {\n ...config,\n componentState: null,\n props: newProps,\n type: 'react-component',\n };\n}\n\n/**\n * Default hydration function. Just applies the dashboard ID. When used with dehydrate above,\n * the panels state will be stored in `panelState` prop.\n * @param props Panel props to hydrate\n * @param localDashboardId The local dashboard ID to hydrate the panel with\n * @returns The hydrated panel props\n */\nexport function hydrate(\n props: PanelProps & Record<string, unknown>,\n localDashboardId = ''\n): DashboardPanelProps {\n return {\n metadata: {},\n ...props,\n localDashboardId,\n };\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"mappings":";;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAAS,CAACC,MAAmB,EAAsB;EACjE,IAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGF,MAAM;EACxC,IAAM;IAAEG;EAAS,CAAC,GAAGF,KAAK;EAC1B,IAAI;IAAEG,UAAU,GAAG;EAAK,CAAC,GAAGH,KAAK;EACjC,IAAIC,cAAc,EAAE;IAClB,CAAC;MAAEE;IAAW,CAAC,GAAGF,cAAc;EAClC;EACA,IAAMG,QAAiC,GAAG,CAAC,CAAC;EAC5C,IAAIF,QAAQ,IAAI,IAAI,EAAE;IACpBE,QAAQ,CAACF,QAAQ,GAAGA,QAAQ;EAC9B;EACA,IAAIC,UAAU,IAAI,IAAI,EAAE;IACtBC,QAAQ,CAACD,UAAU,GAAGA,UAAU;EAClC;EAEA,uCACKJ,MAAM;IACTE,cAAc,EAAE,IAAI;IACpBD,KAAK,EAAEI,QAAQ;IACfC,IAAI,EAAE;EAAiB;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAO,CACrBN,KAA2C,EAEtB;EAAA,IADrBO,gBAAgB,uEAAG,EAAE;EAErB;IACEL,QAAQ,EAAE,CAAC;EAAC,GACTF,KAAK;IACRO;EAAgB;AAEpB;AAEA,eAAe;EACbT,SAAS;EACTQ;AACF,CAAC"}
1
+ {"version":3,"file":"DashboardUtils.js","names":["dehydrate","config","props","componentState","metadata","panelState","newProps","type","hydrate","localDashboardId"],"sources":["../src/DashboardUtils.ts"],"sourcesContent":["import { DehydratedDashboardPanelProps, PanelConfig } from './DashboardPlugin';\n\n/**\n * Dehydrate an existing panel to allow it to be serialized/saved.\n * Just takes what's in the panels `metadata` in the props and `panelState` in\n * the component state, assumes it's serializable, and saves it.\n * @param config The panel config to dehydrate\n * @returns The dehydrated PanelConfig\n */\nexport function dehydrate(config: PanelConfig): PanelConfig | null {\n const { props, componentState } = config;\n const { metadata } = props;\n let { panelState = null } = props;\n if (componentState) {\n ({ panelState } = componentState);\n }\n const newProps: Record<string, unknown> = {};\n if (metadata != null) {\n newProps.metadata = metadata;\n }\n if (panelState != null) {\n newProps.panelState = panelState;\n }\n\n return {\n ...config,\n componentState: null,\n props: newProps,\n type: 'react-component',\n };\n}\n\n/**\n * Default hydration function. Just applies the dashboard ID. When used with dehydrate above,\n * the panels state will be stored in `panelState` prop.\n * @param props Panel props to hydrate\n * @param localDashboardId The local dashboard ID to hydrate the panel with\n * @returns The hydrated panel props\n */\nexport function hydrate<T extends DehydratedDashboardPanelProps>(\n props: T,\n localDashboardId = ''\n): T {\n return {\n metadata: {},\n ...props,\n localDashboardId,\n };\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"mappings":";;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAAS,CAACC,MAAmB,EAAsB;EACjE,IAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGF,MAAM;EACxC,IAAM;IAAEG;EAAS,CAAC,GAAGF,KAAK;EAC1B,IAAI;IAAEG,UAAU,GAAG;EAAK,CAAC,GAAGH,KAAK;EACjC,IAAIC,cAAc,EAAE;IAClB,CAAC;MAAEE;IAAW,CAAC,GAAGF,cAAc;EAClC;EACA,IAAMG,QAAiC,GAAG,CAAC,CAAC;EAC5C,IAAIF,QAAQ,IAAI,IAAI,EAAE;IACpBE,QAAQ,CAACF,QAAQ,GAAGA,QAAQ;EAC9B;EACA,IAAIC,UAAU,IAAI,IAAI,EAAE;IACtBC,QAAQ,CAACD,UAAU,GAAGA,UAAU;EAClC;EAEA,uCACKJ,MAAM;IACTE,cAAc,EAAE,IAAI;IACpBD,KAAK,EAAEI,QAAQ;IACfC,IAAI,EAAE;EAAiB;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAO,CACrBN,KAAQ,EAEL;EAAA,IADHO,gBAAgB,uEAAG,EAAE;EAErB;IACEL,QAAQ,EAAE,CAAC;EAAC,GACTF,KAAK;IACRO;EAAgB;AAEpB;AAEA,eAAe;EACbT,SAAS;EACTQ;AACF,CAAC"}
@@ -1,3 +1,19 @@
1
+ import { DragEvent } from 'react';
2
+ export type WidgetDefinition = {
3
+ type: string;
4
+ /**
5
+ * @deprecated
6
+ */
7
+ name?: string;
8
+ title?: string;
9
+ id?: string;
10
+ };
11
+ export type PanelOpenEventDetail = {
12
+ dragEvent?: DragEvent;
13
+ fetch?: () => Promise<unknown>;
14
+ panelId?: string;
15
+ widget: WidgetDefinition;
16
+ };
1
17
  /**
2
18
  * Events emitted by panels and to control panels
3
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PanelEvent.d.ts","sourceRoot":"","sources":["../src/PanelEvent.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;AACH,wBAsCG"}
1
+ {"version":3,"file":"PanelEvent.d.ts","sourceRoot":"","sources":["../src/PanelEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF;;GAEG;;;;;;;;;;;;;;;AACH,wBAsCG"}
@@ -1 +1 @@
1
- {"version":3,"file":"PanelEvent.js","names":["Object","freeze","FOCUS","MOUNT","UNMOUNT","TITLE_CHANGED","REOPEN","DELETE","CLONED","CLOSED","OPEN","CLOSE","DRAGGING","DROPPED"],"sources":["../src/PanelEvent.ts"],"sourcesContent":["/**\n * Events emitted by panels and to control panels\n */\nexport default Object.freeze({\n // Panel has received focus\n FOCUS: 'PanelEvent.FOCUS',\n\n // Panel has been mounted\n MOUNT: 'PanelEvent.MOUNT',\n\n // Panel has been unmounted\n UNMOUNT: 'PanelEvent.UNMOUNT',\n\n // The title of the panel has changed\n TITLE_CHANGED: 'PanelEvent.TITLE_CHANGED',\n\n // Panel was re-opened from a dehydrated state\n REOPEN: 'PanelEvent.REOPEN',\n\n // Panel was deleted\n DELETE: 'PanelEvent.DELETE',\n\n // Panel was cloned/copied\n CLONED: 'PanelEvent.CLONED',\n\n // Panel was closed\n CLOSED: 'PanelEvent.CLOSED',\n\n // Event to open a new panel\n // Plugins will need to register to open based on this event.\n // Multiple plugins could open panels for the same event if desired.\n OPEN: 'PanelEvent.OPEN',\n\n // Event to close a panel that's currently open\n CLOSE: 'PanelEvent.CLOSE',\n\n // Panel is being dragged\n DRAGGING: 'PanelEvent.DRAGGING',\n\n // Panel is dropped\n DROPPED: 'PanelEvent.DROPPED',\n});\n"],"mappings":"AAAA;AACA;AACA;AACA,eAAeA,MAAM,CAACC,MAAM,CAAC;EAC3B;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,OAAO,EAAE,oBAAoB;EAE7B;EACAC,aAAa,EAAE,0BAA0B;EAEzC;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACA;EACA;EACAC,IAAI,EAAE,iBAAiB;EAEvB;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,QAAQ,EAAE,qBAAqB;EAE/B;EACAC,OAAO,EAAE;AACX,CAAC,CAAC"}
1
+ {"version":3,"file":"PanelEvent.js","names":["Object","freeze","FOCUS","MOUNT","UNMOUNT","TITLE_CHANGED","REOPEN","DELETE","CLONED","CLOSED","OPEN","CLOSE","DRAGGING","DROPPED"],"sources":["../src/PanelEvent.ts"],"sourcesContent":["import { DragEvent } from 'react';\n\nexport type WidgetDefinition = {\n type: string;\n\n /**\n * @deprecated\n */\n name?: string;\n\n title?: string;\n\n id?: string;\n};\n\nexport type PanelOpenEventDetail = {\n dragEvent?: DragEvent;\n fetch?: () => Promise<unknown>;\n panelId?: string;\n widget: WidgetDefinition;\n};\n\n/**\n * Events emitted by panels and to control panels\n */\nexport default Object.freeze({\n // Panel has received focus\n FOCUS: 'PanelEvent.FOCUS',\n\n // Panel has been mounted\n MOUNT: 'PanelEvent.MOUNT',\n\n // Panel has been unmounted\n UNMOUNT: 'PanelEvent.UNMOUNT',\n\n // The title of the panel has changed\n TITLE_CHANGED: 'PanelEvent.TITLE_CHANGED',\n\n // Panel was re-opened from a dehydrated state\n REOPEN: 'PanelEvent.REOPEN',\n\n // Panel was deleted\n DELETE: 'PanelEvent.DELETE',\n\n // Panel was cloned/copied\n CLONED: 'PanelEvent.CLONED',\n\n // Panel was closed\n CLOSED: 'PanelEvent.CLOSED',\n\n // Event to open a new panel\n // Plugins will need to register to open based on this event.\n // Multiple plugins could open panels for the same event if desired.\n OPEN: 'PanelEvent.OPEN',\n\n // Event to close a panel that's currently open\n CLOSE: 'PanelEvent.CLOSE',\n\n // Panel is being dragged\n DRAGGING: 'PanelEvent.DRAGGING',\n\n // Panel is dropped\n DROPPED: 'PanelEvent.DROPPED',\n});\n"],"mappings":"AAsBA;AACA;AACA;AACA,eAAeA,MAAM,CAACC,MAAM,CAAC;EAC3B;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,OAAO,EAAE,oBAAoB;EAE7B;EACAC,aAAa,EAAE,0BAA0B;EAEzC;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACAC,MAAM,EAAE,mBAAmB;EAE3B;EACA;EACA;EACAC,IAAI,EAAE,iBAAiB;EAEvB;EACAC,KAAK,EAAE,kBAAkB;EAEzB;EACAC,QAAQ,EAAE,qBAAqB;EAE/B;EACAC,OAAO,EAAE;AACX,CAAC,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import './PanelPlaceholder.scss';
3
- import { PanelProps } from './DashboardPlugin';
4
3
  /**
5
4
  * Displays a placeholder for unregistered panel types.
6
5
  */
7
- declare const PanelPlaceholder: React.ForwardRefExoticComponent<PanelProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const PanelPlaceholder: React.ForwardRefExoticComponent<import("@deephaven/golden-layout").GLPanelProps & {
7
+ id: string;
8
+ metadata?: import("./DashboardPlugin").PanelMetadata | undefined;
9
+ } & React.RefAttributes<HTMLDivElement>>;
8
10
  export default PanelPlaceholder;
9
11
  //# sourceMappingURL=PanelPlaceholder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PanelPlaceholder.d.ts","sourceRoot":"","sources":["../src/PanelPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,QAAA,MAAM,gBAAgB,mFASrB,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PanelPlaceholder.d.ts","sourceRoot":"","sources":["../src/PanelPlaceholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,yBAAyB,CAAC;AAIjC;;GAEG;AACH,QAAA,MAAM,gBAAgB;;;wCASrB,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { default as DashboardUtils } from './DashboardUtils';
9
9
  export * from './layout';
10
10
  export * from './redux';
11
11
  export * from './PanelManager';
12
+ export * from './PanelEvent';
12
13
  export { default as PanelEvent } from './PanelEvent';
13
14
  export { default as PanelErrorBoundary } from './PanelErrorBoundary';
14
15
  export { default as PanelManager } from './PanelManager';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,eAAe,SAAS,CAAC;AAEzB,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,eAAe,SAAS,CAAC;AAEzB,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ export { default as DashboardUtils } from "./DashboardUtils.js";
9
9
  export * from "./layout/index.js";
10
10
  export * from "./redux/index.js";
11
11
  export * from "./PanelManager.js";
12
+ export * from "./PanelEvent.js";
12
13
  export { default as PanelEvent } from "./PanelEvent.js";
13
14
  export { default as PanelErrorBoundary } from "./PanelErrorBoundary.js";
14
15
  export { default as PanelManager } from "./PanelManager.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Dashboard","default","DashboardUtils","PanelEvent","PanelErrorBoundary","PanelManager"],"sources":["../src/index.ts"],"sourcesContent":["import Dashboard from './Dashboard';\n\nexport default Dashboard;\n\nexport * from './Dashboard';\nexport * from './DashboardConstants';\nexport * from './DashboardPlugin';\nexport * from './DashboardLayout';\nexport * from './DashboardUtils';\nexport { default as DashboardUtils } from './DashboardUtils';\nexport * from './layout';\nexport * from './redux';\nexport * from './PanelManager';\nexport { default as PanelEvent } from './PanelEvent';\nexport { default as PanelErrorBoundary } from './PanelErrorBoundary';\nexport { default as PanelManager } from './PanelManager';\n"],"mappings":"OAAOA,SAAS;AAEhB,eAAeA,SAAS;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA,SAOhBC,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA,SAIzBD,OAAO,IAAIE,UAAU;AAAA,SACrBF,OAAO,IAAIG,kBAAkB;AAAA,SAC7BH,OAAO,IAAII,YAAY"}
1
+ {"version":3,"file":"index.js","names":["Dashboard","default","DashboardUtils","PanelEvent","PanelErrorBoundary","PanelManager"],"sources":["../src/index.ts"],"sourcesContent":["import Dashboard from './Dashboard';\n\nexport default Dashboard;\n\nexport * from './Dashboard';\nexport * from './DashboardConstants';\nexport * from './DashboardPlugin';\nexport * from './DashboardLayout';\nexport * from './DashboardUtils';\nexport { default as DashboardUtils } from './DashboardUtils';\nexport * from './layout';\nexport * from './redux';\nexport * from './PanelManager';\nexport * from './PanelEvent';\nexport { default as PanelEvent } from './PanelEvent';\nexport { default as PanelErrorBoundary } from './PanelErrorBoundary';\nexport { default as PanelManager } from './PanelManager';\n"],"mappings":"OAAOA,SAAS;AAEhB,eAAeA,SAAS;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA,SAOhBC,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,SAKzBD,OAAO,IAAIE,UAAU;AAAA,SACrBF,OAAO,IAAIG,kBAAkB;AAAA,SAC7BH,OAAO,IAAII,YAAY"}
@@ -1,7 +1,11 @@
1
+ import { ComponentType } from 'react';
1
2
  import type { EventEmitter } from '@deephaven/golden-layout';
2
- export declare const useListener: (eventEmitter: EventEmitter, eventName: string, callback: Function) => void;
3
+ import { DashboardPanelProps, DashboardPluginComponentProps, PanelComponentType, PanelDehydrateFunction, PanelHydrateFunction } from '../DashboardPlugin';
4
+ export declare function useListener(eventEmitter: EventEmitter, eventName: string, callback: Function): void;
5
+ export declare function useComponent<P extends DashboardPanelProps, C extends ComponentType<P>>(dashboardProps: DashboardPluginComponentProps, componentName: string, component: PanelComponentType<P, C>, variableName: string | string[], hydrate?: PanelHydrateFunction, dehydrate?: PanelDehydrateFunction): void;
3
6
  declare const _default: {
4
- useListener: (eventEmitter: EventEmitter, eventName: string, callback: Function) => void;
7
+ useComponent: typeof useComponent;
8
+ useListener: typeof useListener;
5
9
  };
6
10
  export default _default;
7
11
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/layout/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,eAAO,MAAM,WAAW,iBACR,YAAY,aACf,MAAM,YAEP,QAAQ,KACjB,IAUA,CAAC;;;;AAEJ,wBAA+B"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/layout/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA0B,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAE7B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAI5B,wBAAgB,WAAW,CACzB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,EAEjB,QAAQ,EAAE,QAAQ,QAYnB;AAED,wBAAgB,YAAY,CAC1B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAE1B,cAAc,EAAE,6BAA6B,EAC7C,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACnC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,EAC/B,OAAO,CAAC,EAAE,oBAAoB,EAC9B,SAAS,CAAC,EAAE,sBAAsB,QA6DnC;;;;;AAED,wBAA6C"}
@@ -1,11 +1,89 @@
1
- import { useEffect } from 'react';
2
- export var useListener = (eventEmitter, eventName, callback) => useEffect(function initEventEmitter() {
3
- eventEmitter.on(eventName, callback);
4
- return () => {
5
- eventEmitter.off(eventName, callback);
6
- };
7
- }, [eventEmitter, eventName, callback]);
1
+ import { useCallback, useEffect } from 'react';
2
+ import shortid from 'shortid';
3
+ import PanelEvent from "../PanelEvent.js";
4
+ import { LayoutUtils } from "./index.js";
5
+ export function useListener(eventEmitter, eventName,
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ callback) {
8
+ useEffect(function initEventEmitter() {
9
+ eventEmitter.on(eventName, callback);
10
+ return () => {
11
+ eventEmitter.off(eventName, callback);
12
+ };
13
+ }, [eventEmitter, eventName, callback]);
14
+ }
15
+ export function useComponent(dashboardProps, componentName, component, variableName, hydrate, dehydrate) {
16
+ var {
17
+ id,
18
+ layout,
19
+ registerComponent
20
+ } = dashboardProps;
21
+ var handlePanelOpen = useCallback(_ref => {
22
+ var _widget$title;
23
+ var {
24
+ dragEvent,
25
+ fetch,
26
+ panelId = shortid.generate(),
27
+ widget
28
+ } = _ref;
29
+ var {
30
+ id: widgetId,
31
+ type
32
+ } = widget;
33
+ var name = (_widget$title = widget.title) !== null && _widget$title !== void 0 ? _widget$title : widget.name;
34
+ var isSupportedType = Array.isArray(variableName) && variableName.includes(type) || type === variableName;
35
+ if (!isSupportedType) {
36
+ // Only want to listen for your custom variable types
37
+ return;
38
+ }
39
+ var metadata = {
40
+ id: widgetId,
41
+ name,
42
+ type
43
+ };
44
+ var props = {
45
+ localDashboardId: id,
46
+ id: panelId,
47
+ metadata,
48
+ fetch
49
+ };
50
+ if (hydrate != null) {
51
+ props = hydrate(props, id);
52
+ }
53
+ var config = {
54
+ type: 'react-component',
55
+ component: componentName,
56
+ props,
57
+ title: name,
58
+ id: panelId
59
+ };
60
+ var {
61
+ root
62
+ } = layout;
63
+ LayoutUtils.openComponent({
64
+ root,
65
+ config,
66
+ dragEvent
67
+ });
68
+ }, [componentName, hydrate, id, layout, variableName]);
69
+
70
+ /**
71
+ * Register our custom component type so the layout know hows to open it
72
+ */
73
+ useEffect(() => {
74
+ var cleanups = [registerComponent(componentName, component, hydrate, dehydrate)];
75
+ return () => {
76
+ cleanups.forEach(cleanup => cleanup());
77
+ };
78
+ }, [component, componentName, dehydrate, hydrate, registerComponent]);
79
+
80
+ /**
81
+ * Listen for panel open events so we know when to open a panel
82
+ */
83
+ useListener(layout.eventHub, PanelEvent.OPEN, handlePanelOpen);
84
+ }
8
85
  export default {
86
+ useComponent,
9
87
  useListener
10
88
  };
11
89
  //# sourceMappingURL=hooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","names":["useEffect","useListener","eventEmitter","eventName","callback","initEventEmitter","on","off"],"sources":["../../src/layout/hooks.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { EventEmitter } from '@deephaven/golden-layout';\n\nexport const useListener = (\n eventEmitter: EventEmitter,\n eventName: string,\n // eslint-disable-next-line @typescript-eslint/ban-types\n callback: Function\n): void =>\n useEffect(\n function initEventEmitter() {\n eventEmitter.on(eventName, callback);\n\n return () => {\n eventEmitter.off(eventName, callback);\n };\n },\n [eventEmitter, eventName, callback]\n );\n\nexport default { useListener };\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AAGjC,OAAO,IAAMC,WAAW,GAAG,CACzBC,YAA0B,EAC1BC,SAAiB,EAEjBC,QAAkB,KAElBJ,SAAS,CACP,SAASK,gBAAgB,GAAG;EAC1BH,YAAY,CAACI,EAAE,CAACH,SAAS,EAAEC,QAAQ,CAAC;EAEpC,OAAO,MAAM;IACXF,YAAY,CAACK,GAAG,CAACJ,SAAS,EAAEC,QAAQ,CAAC;EACvC,CAAC;AACH,CAAC,EACD,CAACF,YAAY,EAAEC,SAAS,EAAEC,QAAQ,CAAC,CACpC;AAEH,eAAe;EAAEH;AAAY,CAAC"}
1
+ {"version":3,"file":"hooks.js","names":["useCallback","useEffect","shortid","PanelEvent","LayoutUtils","useListener","eventEmitter","eventName","callback","initEventEmitter","on","off","useComponent","dashboardProps","componentName","component","variableName","hydrate","dehydrate","id","layout","registerComponent","handlePanelOpen","dragEvent","fetch","panelId","generate","widget","widgetId","type","name","title","isSupportedType","Array","isArray","includes","metadata","props","localDashboardId","config","root","openComponent","cleanups","forEach","cleanup","eventHub","OPEN"],"sources":["../../src/layout/hooks.ts"],"sourcesContent":["import { ComponentType, useCallback, useEffect } from 'react';\nimport type {\n EventEmitter,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport shortid from 'shortid';\nimport {\n DashboardPanelProps,\n DashboardPluginComponentProps,\n DehydratedDashboardPanelProps,\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n} from '../DashboardPlugin';\nimport PanelEvent, { PanelOpenEventDetail } from '../PanelEvent';\nimport { LayoutUtils } from '.';\n\nexport function useListener(\n eventEmitter: EventEmitter,\n eventName: string,\n // eslint-disable-next-line @typescript-eslint/ban-types\n callback: Function\n) {\n useEffect(\n function initEventEmitter() {\n eventEmitter.on(eventName, callback);\n\n return () => {\n eventEmitter.off(eventName, callback);\n };\n },\n [eventEmitter, eventName, callback]\n );\n}\n\nexport function useComponent<\n P extends DashboardPanelProps,\n C extends ComponentType<P>\n>(\n dashboardProps: DashboardPluginComponentProps,\n componentName: string,\n component: PanelComponentType<P, C>,\n variableName: string | string[],\n hydrate?: PanelHydrateFunction,\n dehydrate?: PanelDehydrateFunction\n) {\n const { id, layout, registerComponent } = dashboardProps;\n\n const handlePanelOpen = useCallback(\n ({\n dragEvent,\n fetch,\n panelId = shortid.generate(),\n widget,\n }: PanelOpenEventDetail) => {\n const { id: widgetId, type } = widget;\n const name = widget.title ?? widget.name;\n const isSupportedType =\n (Array.isArray(variableName) && variableName.includes(type)) ||\n type === variableName;\n if (!isSupportedType) {\n // Only want to listen for your custom variable types\n return;\n }\n const metadata = { id: widgetId, name, type };\n let props: DehydratedDashboardPanelProps & { fetch?: typeof fetch } = {\n localDashboardId: id,\n id: panelId,\n metadata,\n fetch,\n };\n if (hydrate != null) {\n props = hydrate(props, id);\n }\n const config: ReactComponentConfig = {\n type: 'react-component',\n component: componentName,\n props,\n title: name,\n id: panelId,\n };\n\n const { root } = layout;\n LayoutUtils.openComponent({ root, config, dragEvent });\n },\n [componentName, hydrate, id, layout, variableName]\n );\n\n /**\n * Register our custom component type so the layout know hows to open it\n */\n useEffect(() => {\n const cleanups = [\n registerComponent(componentName, component, hydrate, dehydrate),\n ];\n\n return () => {\n cleanups.forEach(cleanup => cleanup());\n };\n }, [component, componentName, dehydrate, hydrate, registerComponent]);\n\n /**\n * Listen for panel open events so we know when to open a panel\n */\n useListener(layout.eventHub, PanelEvent.OPEN, handlePanelOpen);\n}\n\nexport default { useComponent, useListener };\n"],"mappings":"AAAA,SAAwBA,WAAW,EAAEC,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B,EAAEnB,EAAE;MACpBA,EAAE,EAAEM,OAAO;MACXW,QAAQ;MACRZ;IACF,CAAC;IACD,IAAIP,OAAO,IAAI,IAAI,EAAE;MACnBoB,KAAK,GAAGpB,OAAO,CAACoB,KAAK,EAAElB,EAAE,CAAC;IAC5B;IACA,IAAMoB,MAA4B,GAAG;MACnCV,IAAI,EAAE,iBAAiB;MACvBd,SAAS,EAAED,aAAa;MACxBuB,KAAK;MACLN,KAAK,EAAED,IAAI;MACXX,EAAE,EAAEM;IACN,CAAC;IAED,IAAM;MAAEe;IAAK,CAAC,GAAGpB,MAAM;IACvBhB,WAAW,CAACqC,aAAa,CAAC;MAAED,IAAI;MAAED,MAAM;MAAEhB;IAAU,CAAC,CAAC;EACxD,CAAC,EACD,CAACT,aAAa,EAAEG,OAAO,EAAEE,EAAE,EAAEC,MAAM,EAAEJ,YAAY,CAAC,CACnD;;EAED;AACF;AACA;EACEf,SAAS,CAAC,MAAM;IACd,IAAMyC,QAAQ,GAAG,CACfrB,iBAAiB,CAACP,aAAa,EAAEC,SAAS,EAAEE,OAAO,EAAEC,SAAS,CAAC,CAChE;IAED,OAAO,MAAM;MACXwB,QAAQ,CAACC,OAAO,CAACC,OAAO,IAAIA,OAAO,EAAE,CAAC;IACxC,CAAC;EACH,CAAC,EAAE,CAAC7B,SAAS,EAAED,aAAa,EAAEI,SAAS,EAAED,OAAO,EAAEI,iBAAiB,CAAC,CAAC;;EAErE;AACF;AACA;EACEhB,WAAW,CAACe,MAAM,CAACyB,QAAQ,EAAE1C,UAAU,CAAC2C,IAAI,EAAExB,eAAe,CAAC;AAChE;AAEA,eAAe;EAAEV,YAAY;EAAEP;AAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { DashboardPluginComponentProps, PanelComponentType, PanelDehydrateFunction, PanelHydrateFunction, PanelProps } from '../DashboardPlugin';
2
+ import { DashboardPanelProps, DashboardPluginComponentProps, PanelComponentType, PanelDehydrateFunction, PanelHydrateFunction } from '../DashboardPlugin';
3
3
  /**
4
4
  * Registers a given panel component. Also runs a `useEffect` that will
5
5
  * automatically de-register then panel on unmount.
@@ -8,5 +8,5 @@ import { DashboardPluginComponentProps, PanelComponentType, PanelDehydrateFuncti
8
8
  * @param hydrate
9
9
  * @param dehydrate
10
10
  */
11
- export default function usePanelRegistration<P extends PanelProps, C extends React.ComponentType<P>>(registerComponent: DashboardPluginComponentProps['registerComponent'], ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction<P>, dehydrate?: PanelDehydrateFunction): void;
11
+ export default function usePanelRegistration<P extends DashboardPanelProps, C extends React.ComponentType<P>>(registerComponent: DashboardPluginComponentProps['registerComponent'], ComponentType: PanelComponentType<P, C>, hydrate?: PanelHydrateFunction, dehydrate?: PanelDehydrateFunction): void;
12
12
  //# sourceMappingURL=usePanelRegistration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePanelRegistration.d.ts","sourceRoot":"","sources":["../../src/layout/usePanelRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,UAAU,EACX,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAEhC,iBAAiB,EAAE,6BAA6B,CAAC,mBAAmB,CAAC,EACrE,aAAa,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,EACjC,SAAS,CAAC,EAAE,sBAAsB,QAsBnC"}
1
+ {"version":3,"file":"usePanelRegistration.d.ts","sourceRoot":"","sources":["../../src/layout/usePanelRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAEhC,iBAAiB,EAAE,6BAA6B,CAAC,mBAAmB,CAAC,EACrE,aAAa,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,SAAS,CAAC,EAAE,sBAAsB,QAsBnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePanelRegistration.js","names":["React","usePanelRegistration","registerComponent","ComponentType","hydrate","dehydrate","name","COMPONENT","displayName","Error","useEffect","deregister"],"sources":["../../src/layout/usePanelRegistration.ts"],"sourcesContent":["import React from 'react';\nimport {\n DashboardPluginComponentProps,\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n PanelProps,\n} from '../DashboardPlugin';\n\n/**\n * Registers a given panel component. Also runs a `useEffect` that will\n * automatically de-register then panel on unmount.\n * @param registerComponent\n * @param ComponentType\n * @param hydrate\n * @param dehydrate\n */\nexport default function usePanelRegistration<\n P extends PanelProps,\n C extends React.ComponentType<P>\n>(\n registerComponent: DashboardPluginComponentProps['registerComponent'],\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction<P>,\n dehydrate?: PanelDehydrateFunction\n) {\n const name = ComponentType.COMPONENT ?? ComponentType.displayName;\n\n if (name == null) {\n throw new Error(\n 'ComponentType must have a `COMPONENT` or `displayName` attribute.'\n );\n }\n\n React.useEffect(() => {\n const deregister = registerComponent(\n name,\n ComponentType,\n hydrate,\n dehydrate\n );\n\n return () => {\n deregister();\n };\n }, [ComponentType, dehydrate, hydrate, name, registerComponent]);\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AASzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoB,CAI1CC,iBAAqE,EACrEC,aAAuC,EACvCC,OAAiC,EACjCC,SAAkC,EAClC;EAAA;EACA,IAAMC,IAAI,4BAAGH,aAAa,CAACI,SAAS,yEAAIJ,aAAa,CAACK,WAAW;EAEjE,IAAIF,IAAI,IAAI,IAAI,EAAE;IAChB,MAAM,IAAIG,KAAK,CACb,mEAAmE,CACpE;EACH;EAEAT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,IAAMC,UAAU,GAAGT,iBAAiB,CAClCI,IAAI,EACJH,aAAa,EACbC,OAAO,EACPC,SAAS,CACV;IAED,OAAO,MAAM;MACXM,UAAU,EAAE;IACd,CAAC;EACH,CAAC,EAAE,CAACR,aAAa,EAAEE,SAAS,EAAED,OAAO,EAAEE,IAAI,EAAEJ,iBAAiB,CAAC,CAAC;AAClE"}
1
+ {"version":3,"file":"usePanelRegistration.js","names":["React","usePanelRegistration","registerComponent","ComponentType","hydrate","dehydrate","name","COMPONENT","displayName","Error","useEffect","deregister"],"sources":["../../src/layout/usePanelRegistration.ts"],"sourcesContent":["import React from 'react';\nimport {\n DashboardPanelProps,\n DashboardPluginComponentProps,\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n} from '../DashboardPlugin';\n\n/**\n * Registers a given panel component. Also runs a `useEffect` that will\n * automatically de-register then panel on unmount.\n * @param registerComponent\n * @param ComponentType\n * @param hydrate\n * @param dehydrate\n */\nexport default function usePanelRegistration<\n P extends DashboardPanelProps,\n C extends React.ComponentType<P>\n>(\n registerComponent: DashboardPluginComponentProps['registerComponent'],\n ComponentType: PanelComponentType<P, C>,\n hydrate?: PanelHydrateFunction,\n dehydrate?: PanelDehydrateFunction\n) {\n const name = ComponentType.COMPONENT ?? ComponentType.displayName;\n\n if (name == null) {\n throw new Error(\n 'ComponentType must have a `COMPONENT` or `displayName` attribute.'\n );\n }\n\n React.useEffect(() => {\n const deregister = registerComponent(\n name,\n ComponentType,\n hydrate,\n dehydrate\n );\n\n return () => {\n deregister();\n };\n }, [ComponentType, dehydrate, hydrate, name, registerComponent]);\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AASzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoB,CAI1CC,iBAAqE,EACrEC,aAAuC,EACvCC,OAA8B,EAC9BC,SAAkC,EAClC;EAAA;EACA,IAAMC,IAAI,4BAAGH,aAAa,CAACI,SAAS,yEAAIJ,aAAa,CAACK,WAAW;EAEjE,IAAIF,IAAI,IAAI,IAAI,EAAE;IAChB,MAAM,IAAIG,KAAK,CACb,mEAAmE,CACpE;EACH;EAEAT,KAAK,CAACU,SAAS,CAAC,MAAM;IACpB,IAAMC,UAAU,GAAGT,iBAAiB,CAClCI,IAAI,EACJH,aAAa,EACbC,OAAO,EACPC,SAAS,CACV;IAED,OAAO,MAAM;MACXM,UAAU,EAAE;IACd,CAAC;EACH,CAAC,EAAE,CAACR,aAAa,EAAEE,SAAS,EAAED,OAAO,EAAEE,IAAI,EAAEJ,iBAAiB,CAAC,CAAC;AAClE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/dashboard",
3
- "version": "0.44.1-beta.0+ba13c913",
3
+ "version": "0.44.2-plugin-cleanup.3+218cf522",
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.44.1-beta.0+ba13c913",
26
- "@deephaven/golden-layout": "^0.44.1-beta.0+ba13c913",
27
- "@deephaven/jsapi-bootstrap": "^0.44.1-beta.0+ba13c913",
28
- "@deephaven/log": "^0.44.1-beta.0+ba13c913",
29
- "@deephaven/react-hooks": "^0.44.1-beta.0+ba13c913",
30
- "@deephaven/redux": "^0.44.1-beta.0+ba13c913",
31
- "@deephaven/utils": "^0.44.1-beta.0+ba13c913",
25
+ "@deephaven/components": "^0.44.2-plugin-cleanup.3+218cf522",
26
+ "@deephaven/golden-layout": "^0.44.2-plugin-cleanup.3+218cf522",
27
+ "@deephaven/jsapi-bootstrap": "^0.44.2-plugin-cleanup.3+218cf522",
28
+ "@deephaven/log": "^0.44.2-plugin-cleanup.3+218cf522",
29
+ "@deephaven/react-hooks": "^0.44.2-plugin-cleanup.3+218cf522",
30
+ "@deephaven/redux": "^0.44.2-plugin-cleanup.3+218cf522",
31
+ "@deephaven/utils": "^0.44.2-plugin-cleanup.3+218cf522",
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.44.1-beta.0+ba13c913",
44
+ "@deephaven/mocks": "^0.44.2-plugin-cleanup.3+218cf522",
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": "ba13c9139b3b7a5f5d64d79069f1de9d4727eeb6"
53
+ "gitHead": "218cf5224bcba3734025749fe55b1161bc3bb4a6"
54
54
  }