@deephaven/dashboard 0.85.3-beta.3 → 0.86.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.
@@ -4,6 +4,7 @@ import GoldenLayout from '@deephaven/golden-layout';
4
4
  import type { GLPanelProps, ReactComponentConfig } from '@deephaven/golden-layout';
5
5
  import PanelManager from './PanelManager';
6
6
  import { WidgetDescriptor } from './PanelEvent';
7
+ export { isWrappedComponent } from '@deephaven/components';
7
8
  /**
8
9
  * Panel components can provide static props that provide meta data about the
9
10
  * panel.
@@ -27,8 +28,7 @@ type ForwardRefComponentType<P, R> = ForwardRefExoticComponent<PropsWithoutRef<P
27
28
  export type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> & PanelStaticMetaData;
28
29
  export type WrappedComponentType<P extends PanelProps, C extends ComponentType<P>> = ConnectedComponent<C, P>;
29
30
  export type PanelComponentType<P extends PanelProps = PanelProps, C extends ComponentType<P> = ComponentType<P>> = (ComponentType<P> | WrappedComponentType<P, C>) & PanelStaticMetaData;
30
- export declare function isWrappedComponent<P extends PanelProps, C extends ComponentType<P>>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C>;
31
- export type PanelMetadata = Partial<WidgetDescriptor>;
31
+ export type PanelMetadata = WidgetDescriptor;
32
32
  export type PanelProps = GLPanelProps & {
33
33
  metadata?: PanelMetadata;
34
34
  panelState?: unknown;
@@ -76,5 +76,4 @@ export type DashboardPluginComponentProps = {
76
76
  */
77
77
  export declare function isDashboardPluginProps(props: Partial<DashboardPluginComponentProps>): props is DashboardPluginComponentProps;
78
78
  export declare function assertIsDashboardPluginProps(props: Partial<DashboardPluginComponentProps>): asserts props is DashboardPluginComponentProps;
79
- export {};
80
79
  //# sourceMappingURL=DashboardPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPlugin.d.ts","sourceRoot":"","sources":["../src/DashboardPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SA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AG,CACnC,MAAM,EAAE,WAAW,EACnB,WAAW,EAAE,MAAM,KAChB,WAAW,GAAG,IAAI,CAAC;AAExB,MAAM,MAAM,6BAA6B,GAAG;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,iBAAiB,EAAE,CACjB,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAE1B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACvC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,SAAS,CAAC,EAAE,sBAAsB,KAC/B,2BAA2B,CAAC;CAClC,CAAC;AAEF;;;;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,18 +1,20 @@
1
1
  import GoldenLayout from '@deephaven/golden-layout';
2
2
  import PanelManager from "./PanelManager.js";
3
+ export { isWrappedComponent } from '@deephaven/components';
4
+
3
5
  /**
4
6
  * Panel components can provide static props that provide meta data about the
5
7
  * panel.
6
8
  */
9
+
7
10
  /**
8
11
  * Alias for the return type of React.forwardRef()
9
12
  */
13
+
10
14
  /**
11
15
  * @deprecated Use `PanelComponentType` instead and add generic types to forwardRef call.
12
16
  */
13
- export function isWrappedComponent(type) {
14
- return (type === null || type === void 0 ? void 0 : type.WrappedComponent) !== undefined;
15
- }
17
+
16
18
  /**
17
19
  * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.
18
20
  * @param props The props to check
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPlugin.js","names":["GoldenLayout","PanelManager","isWrappedComponent","type","WrappedComponent","undefined","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error","concat"],"sources":["../src/DashboardPlugin.ts"],"sourcesContent":["import type {\n Component,\n ComponentType,\n ForwardRefExoticComponent,\n PropsWithoutRef,\n RefAttributes,\n} from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n GLPanelProps,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\nimport { WidgetDescriptor } from './PanelEvent';\n\n/**\n * Panel components can provide static props that provide meta data about the\n * panel.\n */\nexport interface PanelStaticMetaData {\n /**\n * Should be set to the same name as the component type.\n * @deprecated Use `displayName` instead.\n */\n COMPONENT?: string;\n\n /** Title of the panel. */\n TITLE?: string;\n}\n\n/**\n * Alias for the return type of React.forwardRef()\n */\ntype ForwardRefComponentType<P, R> = ForwardRefExoticComponent<\n PropsWithoutRef<P> & RefAttributes<R>\n>;\n\n/**\n * @deprecated Use `PanelComponentType` instead and add generic types to forwardRef call.\n */\nexport type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> &\n PanelStaticMetaData;\n\nexport type WrappedComponentType<\n P extends PanelProps,\n C extends ComponentType<P>,\n> = ConnectedComponent<C, P>;\n\nexport type PanelComponentType<\n P extends PanelProps = PanelProps,\n C extends ComponentType<P> = ComponentType<P>,\n> = (ComponentType<P> | WrappedComponentType<P, C>) & PanelStaticMetaData;\n\nexport function isWrappedComponent<\n P extends PanelProps,\n C extends ComponentType<P>,\n>(type: PanelComponentType<P, C>): type is WrappedComponentType<P, C> {\n return (type as WrappedComponentType<P, C>)?.WrappedComponent !== undefined;\n}\n\nexport type PanelMetadata = Partial<WidgetDescriptor>;\n\nexport type PanelProps = GLPanelProps & {\n metadata?: PanelMetadata;\n panelState?: unknown;\n};\n\nexport type DehydratedPanelProps = Omit<PanelProps, keyof GLPanelProps>;\n\nexport type LocalDashboardProps = { localDashboardId: string };\n\nexport type DashboardPanelProps = PanelProps & LocalDashboardProps;\n\nexport type DehydratedDashboardPanelProps = DehydratedPanelProps &\n LocalDashboardProps;\n\nexport type PanelComponent<T extends PanelProps = PanelProps> =\n | Component<T>\n | { props: T; state: unknown };\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DehydratedPanelConfig = PanelConfig & {\n componentState: null;\n props: DehydratedPanelProps;\n type: 'react-component';\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\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"mappings":"AAQA,OAAOA,YAAY,MAAM,0BAA0B;AAAC,OAK7CC,YAAY;AAGnB;AACA;AACA;AACA;AAYA;AACA;AACA;AAKA;AACA;AACA;AAcA,OAAO,SAASC,kBAAkBA,CAGhCC,IAA8B,EAAsC;EACpE,OAAO,CAACA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAiCC,gBAAgB,MAAKC,SAAS;AAC7E;AAsEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,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,4BAA4BA,CAC1CL,KAA6C,EACG;EAChD,IAAI,CAACD,sBAAsB,CAACC,KAAK,CAAC,EAAE;IAClC,MAAM,IAAIM,KAAK,0DAAAC,MAAA,CAC4CP,KAAK,CAChE,CAAC;EACH;AACF"}
1
+ {"version":3,"file":"DashboardPlugin.js","names":["GoldenLayout","PanelManager","isWrappedComponent","isDashboardPluginProps","props","id","layout","panelManager","registerComponent","assertIsDashboardPluginProps","Error","concat"],"sources":["../src/DashboardPlugin.ts"],"sourcesContent":["import type {\n Component,\n ComponentType,\n ForwardRefExoticComponent,\n PropsWithoutRef,\n RefAttributes,\n} from 'react';\nimport { ConnectedComponent } from 'react-redux';\nimport GoldenLayout from '@deephaven/golden-layout';\nimport type {\n GLPanelProps,\n ReactComponentConfig,\n} from '@deephaven/golden-layout';\nimport PanelManager from './PanelManager';\nimport { WidgetDescriptor } from './PanelEvent';\n\nexport { isWrappedComponent } from '@deephaven/components';\n\n/**\n * Panel components can provide static props that provide meta data about the\n * panel.\n */\nexport interface PanelStaticMetaData {\n /**\n * Should be set to the same name as the component type.\n * @deprecated Use `displayName` instead.\n */\n COMPONENT?: string;\n\n /** Title of the panel. */\n TITLE?: string;\n}\n\n/**\n * Alias for the return type of React.forwardRef()\n */\ntype ForwardRefComponentType<P, R> = ForwardRefExoticComponent<\n PropsWithoutRef<P> & RefAttributes<R>\n>;\n\n/**\n * @deprecated Use `PanelComponentType` instead and add generic types to forwardRef call.\n */\nexport type PanelFunctionComponentType<P, R> = ForwardRefComponentType<P, R> &\n PanelStaticMetaData;\n\nexport type WrappedComponentType<\n P extends PanelProps,\n C extends ComponentType<P>,\n> = ConnectedComponent<C, P>;\n\nexport type PanelComponentType<\n P extends PanelProps = PanelProps,\n C extends ComponentType<P> = ComponentType<P>,\n> = (ComponentType<P> | WrappedComponentType<P, C>) & PanelStaticMetaData;\n\nexport type PanelMetadata = WidgetDescriptor;\n\nexport type PanelProps = GLPanelProps & {\n metadata?: PanelMetadata;\n panelState?: unknown;\n};\n\nexport type DehydratedPanelProps = Omit<PanelProps, keyof GLPanelProps>;\n\nexport type LocalDashboardProps = { localDashboardId: string };\n\nexport type DashboardPanelProps = PanelProps & LocalDashboardProps;\n\nexport type DehydratedDashboardPanelProps = DehydratedPanelProps &\n LocalDashboardProps;\n\nexport type PanelComponent<T extends PanelProps = PanelProps> =\n | Component<T>\n | { props: T; state: unknown };\n\nexport type PanelConfig = ReactComponentConfig & {\n componentState?: Record<string, unknown> | null;\n};\n\nexport type DehydratedPanelConfig = PanelConfig & {\n componentState: null;\n props: DehydratedPanelProps;\n type: 'react-component';\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\n/**\n * Takes a partial DashboardPluginComponentProps and verifies all the dashboard component fields are filled in.\n * @param props The props to check\n * @returns True if the props are valid DashboardPluginComponentProps, false otherwise\n */\nexport function isDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): props is DashboardPluginComponentProps {\n return (\n typeof props.id === 'string' &&\n props.layout instanceof GoldenLayout &&\n props.panelManager instanceof PanelManager &&\n typeof props.registerComponent === 'function'\n );\n}\n\nexport function assertIsDashboardPluginProps(\n props: Partial<DashboardPluginComponentProps>\n): asserts props is DashboardPluginComponentProps {\n if (!isDashboardPluginProps(props)) {\n throw new Error(\n `Expected dashboard plugin props, but instead received ${props}`\n );\n }\n}\n"],"mappings":"AAQA,OAAOA,YAAY,MAAM,0BAA0B;AAAC,OAK7CC,YAAY;AAGnB,SAASC,kBAAkB,QAAQ,uBAAuB;;AAE1D;AACA;AACA;AACA;;AAYA;AACA;AACA;;AAKA;AACA;AACA;;AAkFA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CACpCC,KAA6C,EACL;EACxC,OACE,OAAOA,KAAK,CAACC,EAAE,KAAK,QAAQ,IAC5BD,KAAK,CAACE,MAAM,YAAYN,YAAY,IACpCI,KAAK,CAACG,YAAY,YAAYN,YAAY,IAC1C,OAAOG,KAAK,CAACI,iBAAiB,KAAK,UAAU;AAEjD;AAEA,OAAO,SAASC,4BAA4BA,CAC1CL,KAA6C,EACG;EAChD,IAAI,CAACD,sBAAsB,CAACC,KAAK,CAAC,EAAE;IAClC,MAAM,IAAIM,KAAK,0DAAAC,MAAA,CAC4CP,KAAK,CAChE,CAAC;EACH;AACF"}
@@ -1,4 +1,5 @@
1
- import { DehydratedDashboardPanelProps, DehydratedPanelConfig, PanelComponentType, PanelConfig } from './DashboardPlugin';
1
+ import { DehydratedDashboardPanelProps, DehydratedPanelConfig, PanelConfig } from './DashboardPlugin';
2
+ export { canHaveRef } from '@deephaven/components';
2
3
  /**
3
4
  * Dehydrate an existing panel to allow it to be serialized/saved.
4
5
  * Just takes what's in the panels `metadata` in the props and `panelState` in
@@ -15,13 +16,6 @@ export declare function dehydrate(config: PanelConfig): DehydratedPanelConfig;
15
16
  * @returns The hydrated panel props
16
17
  */
17
18
  export declare function hydrate<T extends DehydratedDashboardPanelProps>(props: T, localDashboardId?: string): T;
18
- /**
19
- * Checks if a panel component can take a ref. Helps silence react dev errors
20
- * if a ref is passed to a functional component without forwardRef.
21
- * @param component The panel component to check if it can take a ref
22
- * @returns Wheter the component can take a ref or not
23
- */
24
- export declare function canHaveRef(component: PanelComponentType): boolean;
25
19
  declare const _default: {
26
20
  dehydrate: typeof dehydrate;
27
21
  hydrate: typeof hydrate;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EAErB,kBAAkB,EAClB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,qBAAqB,CAqBpE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,6BAA6B,EAC7D,KAAK,EAAE,CAAC,EACR,gBAAgB,SAAK,GACpB,CAAC,CAKH;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAejE;;;;;AAED,wBAGE"}
1
+ {"version":3,"file":"DashboardUtils.d.ts","sourceRoot":"","sources":["../src/DashboardUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,qBAAqB,CAqBpE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,6BAA6B,EAC7D,KAAK,EAAE,CAAC,EACR,gBAAgB,SAAK,GACpB,CAAC,CAKH;;;;;AAED,wBAGE"}
@@ -3,8 +3,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
5
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
- import { ForwardRef } from 'react-is';
7
- import { isWrappedComponent } from "./DashboardPlugin.js";
6
+ export { canHaveRef } from '@deephaven/components';
7
+
8
8
  /**
9
9
  * Dehydrate an existing panel to allow it to be serialized/saved.
10
10
  * Just takes what's in the panels `metadata` in the props and `panelState` in
@@ -55,19 +55,6 @@ export function hydrate(props) {
55
55
  localDashboardId
56
56
  });
57
57
  }
58
-
59
- /**
60
- * Checks if a panel component can take a ref. Helps silence react dev errors
61
- * if a ref is passed to a functional component without forwardRef.
62
- * @param component The panel component to check if it can take a ref
63
- * @returns Wheter the component can take a ref or not
64
- */
65
- export function canHaveRef(component) {
66
- // Might be a redux connect wrapped component
67
- var isClassComponent = isWrappedComponent(component) && component.WrappedComponent.prototype != null && component.WrappedComponent.prototype.isReactComponent != null || component.prototype != null && component.prototype.isReactComponent != null;
68
- var isForwardRef = !isWrappedComponent(component) && '$$typeof' in component && component.$$typeof === ForwardRef;
69
- return isClassComponent || isForwardRef;
70
- }
71
58
  export default {
72
59
  dehydrate,
73
60
  hydrate
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardUtils.js","names":["ForwardRef","isWrappedComponent","dehydrate","config","props","componentState","metadata","panelState","newProps","_objectSpread","type","hydrate","localDashboardId","arguments","length","undefined","canHaveRef","component","isClassComponent","WrappedComponent","prototype","isReactComponent","isForwardRef","$$typeof"],"sources":["../src/DashboardUtils.tsx"],"sourcesContent":["import { ForwardRef } from 'react-is';\nimport {\n DehydratedDashboardPanelProps,\n DehydratedPanelConfig,\n isWrappedComponent,\n PanelComponentType,\n PanelConfig,\n} 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): DehydratedPanelConfig {\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 ...props,\n localDashboardId,\n };\n}\n\n/**\n * Checks if a panel component can take a ref. Helps silence react dev errors\n * if a ref is passed to a functional component without forwardRef.\n * @param component The panel component to check if it can take a ref\n * @returns Wheter the component can take a ref or not\n */\nexport function canHaveRef(component: PanelComponentType): boolean {\n // Might be a redux connect wrapped component\n const isClassComponent =\n (isWrappedComponent(component) &&\n component.WrappedComponent.prototype != null &&\n component.WrappedComponent.prototype.isReactComponent != null) ||\n (component.prototype != null &&\n component.prototype.isReactComponent != null);\n\n const isForwardRef =\n !isWrappedComponent(component) &&\n '$$typeof' in component &&\n component.$$typeof === ForwardRef;\n\n return isClassComponent || isForwardRef;\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"mappings":";;;;;AAAA,SAASA,UAAU,QAAQ,UAAU;AAAC,SAIpCC,kBAAkB;AAKpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,MAAmB,EAAyB;EACpE,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,OAAAE,aAAA,CAAAA,aAAA,KACKN,MAAM;IACTE,cAAc,EAAE,IAAI;IACpBD,KAAK,EAAEI,QAAQ;IACfE,IAAI,EAAE;EAAiB;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CACrBP,KAAQ,EAEL;EAAA,IADHQ,gBAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAErB,OAAAJ,aAAA,CAAAA,aAAA,KACKL,KAAK;IACRQ;EAAgB;AAEpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,UAAUA,CAACC,SAA6B,EAAW;EACjE;EACA,IAAMC,gBAAgB,GACnBjB,kBAAkB,CAACgB,SAAS,CAAC,IAC5BA,SAAS,CAACE,gBAAgB,CAACC,SAAS,IAAI,IAAI,IAC5CH,SAAS,CAACE,gBAAgB,CAACC,SAAS,CAACC,gBAAgB,IAAI,IAAI,IAC9DJ,SAAS,CAACG,SAAS,IAAI,IAAI,IAC1BH,SAAS,CAACG,SAAS,CAACC,gBAAgB,IAAI,IAAK;EAEjD,IAAMC,YAAY,GAChB,CAACrB,kBAAkB,CAACgB,SAAS,CAAC,IAC9B,UAAU,IAAIA,SAAS,IACvBA,SAAS,CAACM,QAAQ,KAAKvB,UAAU;EAEnC,OAAOkB,gBAAgB,IAAII,YAAY;AACzC;AAEA,eAAe;EACbpB,SAAS;EACTS;AACF,CAAC"}
1
+ {"version":3,"file":"DashboardUtils.js","names":["canHaveRef","dehydrate","config","props","componentState","metadata","panelState","newProps","_objectSpread","type","hydrate","localDashboardId","arguments","length","undefined"],"sources":["../src/DashboardUtils.tsx"],"sourcesContent":["import {\n DehydratedDashboardPanelProps,\n DehydratedPanelConfig,\n PanelConfig,\n} from './DashboardPlugin';\n\nexport { canHaveRef } from '@deephaven/components';\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): DehydratedPanelConfig {\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 ...props,\n localDashboardId,\n };\n}\n\nexport default {\n dehydrate,\n hydrate,\n};\n"],"mappings":";;;;;AAMA,SAASA,UAAU,QAAQ,uBAAuB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,MAAmB,EAAyB;EACpE,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,OAAAE,aAAA,CAAAA,aAAA,KACKN,MAAM;IACTE,cAAc,EAAE,IAAI;IACpBD,KAAK,EAAEI,QAAQ;IACfE,IAAI,EAAE;EAAiB;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CACrBP,KAAQ,EAEL;EAAA,IADHQ,gBAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAErB,OAAAJ,aAAA,CAAAA,aAAA,KACKL,KAAK;IACRQ;EAAgB;AAEpB;AAEA,eAAe;EACbV,SAAS;EACTS;AACF,CAAC"}
@@ -1,19 +1,28 @@
1
- import { DragEvent } from 'react';
2
1
  export type WidgetDescriptor = {
3
2
  type: string;
4
3
  name?: string | null;
5
4
  id?: string | null;
6
5
  };
7
6
  export type PanelOpenEventDetail<T = unknown> = {
8
- dragEvent?: DragEvent;
9
- fetch?: () => Promise<T>;
7
+ /**
8
+ * Opening the widget was triggered by dragging from a list, such as the Panels dropdown.
9
+ * The coordinates are used as the starting location for the drag, where we will show the panel until the user drops it in the dashboard.
10
+ */
11
+ dragEvent?: MouseEvent;
12
+ /** ID of the panel to re-use. Will replace any existing panel with this ID. Otherwise a new panel is opened with a randomly generated ID. */
10
13
  panelId?: string;
14
+ /** Descriptor of the widget. */
11
15
  widget: WidgetDescriptor;
16
+ /**
17
+ * Function to fetch the instance of the widget
18
+ * @deprecated Use `useWidget` hook with the `widget` descriptor instead
19
+ */
20
+ fetch?: () => Promise<T>;
12
21
  };
13
22
  /**
14
23
  * Events emitted by panels and to control panels
15
24
  */
16
- declare const _default: Readonly<{
25
+ export declare const PanelEvent: Readonly<{
17
26
  FOCUS: "PanelEvent.FOCUS";
18
27
  MOUNT: "PanelEvent.MOUNT";
19
28
  UNMOUNT: "PanelEvent.UNMOUNT";
@@ -28,5 +37,6 @@ declare const _default: Readonly<{
28
37
  DRAGGING: "PanelEvent.DRAGGING";
29
38
  DROPPED: "PanelEvent.DROPPED";
30
39
  }>;
31
- export default _default;
40
+ export declare const listenForPanelOpen: import("@deephaven/golden-layout").EventListenFunction<PanelOpenEventDetail<unknown>>, emitPanelOpen: import("@deephaven/golden-layout").EventEmitFunction<PanelOpenEventDetail<unknown>>, usePanelOpenListener: import("@deephaven/golden-layout").EventListenerHook<PanelOpenEventDetail<unknown>>;
41
+ export default PanelEvent;
32
42
  //# sourceMappingURL=PanelEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PanelEvent.d.ts","sourceRoot":"","sources":["../src/PanelEvent.ts"],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,8 @@
1
+ import { makeEventFunctions } from '@deephaven/golden-layout';
1
2
  /**
2
3
  * Events emitted by panels and to control panels
3
4
  */
4
- export default Object.freeze({
5
+ export var PanelEvent = Object.freeze({
5
6
  // Panel has received focus
6
7
  FOCUS: 'PanelEvent.FOCUS',
7
8
  // Panel has been mounted
@@ -31,4 +32,13 @@ export default Object.freeze({
31
32
  // Panel is dropped
32
33
  DROPPED: 'PanelEvent.DROPPED'
33
34
  });
35
+ export var {
36
+ listen: listenForPanelOpen,
37
+ emit: emitPanelOpen,
38
+ useListener: usePanelOpenListener
39
+ } = makeEventFunctions(PanelEvent.OPEN);
40
+
41
+ // TODO (#2147): Add the rest of the event functions here. Need to create the correct types for all of them.
42
+
43
+ export default PanelEvent;
34
44
  //# sourceMappingURL=PanelEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PanelEvent.js","names":["Object","freeze","FOCUS","MOUNT","UNMOUNT","TITLE_CHANGED","REOPEN","REOPEN_LAST","DELETE","CLONED","CLOSED","OPEN","CLOSE","DRAGGING","DROPPED"],"sources":["../src/PanelEvent.ts"],"sourcesContent":["import { DragEvent } from 'react';\n\nexport type WidgetDescriptor = {\n type: string;\n name?: string | null;\n id?: string | null;\n};\n\nexport type PanelOpenEventDetail<T = unknown> = {\n dragEvent?: DragEvent;\n fetch?: () => Promise<T>;\n panelId?: string;\n widget: WidgetDescriptor;\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 // Reopen last closed panel\n REOPEN_LAST: 'PanelEvent.REOPEN_LAST',\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":"AAeA;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,WAAW,EAAE,wBAAwB;EAErC;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":["makeEventFunctions","PanelEvent","Object","freeze","FOCUS","MOUNT","UNMOUNT","TITLE_CHANGED","REOPEN","REOPEN_LAST","DELETE","CLONED","CLOSED","OPEN","CLOSE","DRAGGING","DROPPED","listen","listenForPanelOpen","emit","emitPanelOpen","useListener","usePanelOpenListener"],"sources":["../src/PanelEvent.ts"],"sourcesContent":["import { makeEventFunctions } from '@deephaven/golden-layout';\n\nexport type WidgetDescriptor = {\n type: string;\n name?: string | null;\n id?: string | null;\n};\n\nexport type PanelOpenEventDetail<T = unknown> = {\n /**\n * Opening the widget was triggered by dragging from a list, such as the Panels dropdown.\n * The coordinates are used as the starting location for the drag, where we will show the panel until the user drops it in the dashboard.\n */\n dragEvent?: MouseEvent;\n\n /** ID of the panel to re-use. Will replace any existing panel with this ID. Otherwise a new panel is opened with a randomly generated ID. */\n panelId?: string;\n\n /** Descriptor of the widget. */\n widget: WidgetDescriptor;\n\n /**\n * Function to fetch the instance of the widget\n * @deprecated Use `useWidget` hook with the `widget` descriptor instead\n */\n fetch?: () => Promise<T>;\n};\n\n/**\n * Events emitted by panels and to control panels\n */\nexport const PanelEvent = 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 // Reopen last closed panel\n REOPEN_LAST: 'PanelEvent.REOPEN_LAST',\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\nexport const {\n listen: listenForPanelOpen,\n emit: emitPanelOpen,\n useListener: usePanelOpenListener,\n} = makeEventFunctions<PanelOpenEventDetail>(PanelEvent.OPEN);\n\n// TODO (#2147): Add the rest of the event functions here. Need to create the correct types for all of them.\n\nexport default PanelEvent;\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,0BAA0B;AA4B7D;AACA;AACA;AACA,OAAO,IAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAAC;EACtC;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,WAAW,EAAE,wBAAwB;EAErC;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;AAEF,OAAO,IAAM;EACXC,MAAM,EAAEC,kBAAkB;EAC1BC,IAAI,EAAEC,aAAa;EACnBC,WAAW,EAAEC;AACf,CAAC,GAAGtB,kBAAkB,CAAuBC,UAAU,CAACY,IAAI,CAAC;;AAE7D;;AAEA,eAAeZ,UAAU"}
@@ -4,7 +4,7 @@ import './PanelPlaceholder.scss';
4
4
  * Displays a placeholder for unregistered panel types.
5
5
  */
6
6
  declare const PanelPlaceholder: React.ForwardRefExoticComponent<import("@deephaven/golden-layout").GLPanelProps & {
7
- metadata?: Partial<import("./PanelEvent").WidgetDescriptor> | undefined;
7
+ metadata?: import("./PanelEvent").WidgetDescriptor | undefined;
8
8
  panelState?: unknown;
9
9
  } & React.RefAttributes<HTMLDivElement>>;
10
10
  export default PanelPlaceholder;
package/dist/index.d.ts CHANGED
@@ -12,7 +12,6 @@ export * from './layout';
12
12
  export * from './redux';
13
13
  export * from './PanelManager';
14
14
  export * from './PanelEvent';
15
- export { default as PanelEvent } from './PanelEvent';
16
15
  export { default as PanelErrorBoundary } from './PanelErrorBoundary';
17
16
  export { default as PanelManager } from './PanelManager';
18
17
  //# sourceMappingURL=index.d.ts.map
@@ -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,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,iBAAiB,CAAC;AAChC,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"}
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,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -12,7 +12,6 @@ export * from "./layout/index.js";
12
12
  export * from "./redux/index.js";
13
13
  export * from "./PanelManager.js";
14
14
  export * from "./PanelEvent.js";
15
- export { default as PanelEvent } from "./PanelEvent.js";
16
15
  export { default as PanelErrorBoundary } from "./PanelErrorBoundary.js";
17
16
  export { default as PanelManager } from "./PanelManager.js";
18
17
  //# sourceMappingURL=index.js.map
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 './DashboardEvents';\nexport * from './DashboardPlugin';\nexport * from './DashboardLayout';\nexport * from './DashboardUtils';\nexport { default as DashboardUtils } from './DashboardUtils';\nexport * from './LazyDashboard';\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;AAAA,SAQhBC,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAMzBD,OAAO,IAAIE,UAAU;AAAA,SACrBF,OAAO,IAAIG,kBAAkB;AAAA,SAC7BH,OAAO,IAAII,YAAY"}
1
+ {"version":3,"file":"index.js","names":["Dashboard","default","DashboardUtils","PanelErrorBoundary","PanelManager"],"sources":["../src/index.ts"],"sourcesContent":["import Dashboard from './Dashboard';\n\nexport default Dashboard;\n\nexport * from './Dashboard';\nexport * from './DashboardConstants';\nexport * from './DashboardEvents';\nexport * from './DashboardPlugin';\nexport * from './DashboardLayout';\nexport * from './DashboardUtils';\nexport { default as DashboardUtils } from './DashboardUtils';\nexport * from './LazyDashboard';\nexport * from './layout';\nexport * from './redux';\nexport * from './PanelManager';\nexport * 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;AAAA,SAQhBC,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAMzBD,OAAO,IAAIE,kBAAkB;AAAA,SAC7BF,OAAO,IAAIG,YAAY"}
@@ -1,4 +1,3 @@
1
- import { DragEvent } from 'react';
2
1
  import GoldenLayout, { GLPanelProps } from '@deephaven/golden-layout';
3
2
  import type { Config, Container, ContentItem, ItemConfig, ReactComponentConfig, Stack, Tab, CloseOptions } from '@deephaven/golden-layout';
4
3
  import { DashboardLayoutConfig } from '../DashboardLayout';
@@ -122,7 +121,7 @@ declare class LayoutUtils {
122
121
  replaceConfig?: Partial<ItemConfig>;
123
122
  createNewStack?: boolean;
124
123
  focusElement?: string;
125
- dragEvent?: DragEvent;
124
+ dragEvent?: MouseEvent;
126
125
  }): void;
127
126
  /**
128
127
  * Opens a component in an given stack.
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutUtils.d.ts","sourceRoot":"","sources":["../../src/layout/LayoutUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,YAAY,EAAE,EAKnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAEV,MAAM,EACN,SAAS,EACT,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,KAAK,EACL,GAAG,EACH,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,WA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AAoB,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW;IAI9D;;;OAGG;IACH,MAAM,CAAC,+BAA+B,CACpC,SAAS,CAAC,EAAE,SAAS,GACpB,UAAU,GAAG,IAAI;IAgBpB,MAAM,CAAC,qBAAqB,CAC1B,SAAS,EAAE,SAAS,GACnB,MAAM,GAAG,IAAI,GAAG,SAAS;IAW5B,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;IAO3D;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CACvB,WAAW,EAAE,SAAS,GACrB,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS;IAQvC;;;;OAIG;IACH,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,WAAW,GACjB,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS;IAKvC;;;;OAIG;IACH,MAAM,CAAC,yBAAyB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IASnE;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE;QACjC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gBAAgB,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7C,GAAG,MAAM;IASV;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,SAAqC,GAC5C,OAAO,GAAG,IAAI;IAejB;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAa1D;AAED,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutUtils.js","names":["deepEqual","nanoid","isMatch","Log","isComponent","isRoot","isStack","GoldenLayoutThemeExport","assertNotNull","log","module","isComponentConfig","config","componentName","undefined","isReactComponentConfig","reactConfig","type","component","isHTMLElement","element","focus","isStackItemConfig","LayoutUtils","activateTab","root","stack","getStackForRoot","error","contentItem","getContentItemInStack","setActiveContentItem","isActiveTab","activeItem","getActiveContentItem","addStack","parent","columnPreferred","arguments","length","rowOrColConfig","contentItems","addChild","child","isCorrectType","isColumn","isRow","removeChild","maintainFocusElement","document","activeElement","newParent","inverseRowOrColConfig","getStackById","item","searchId","_item$config","allowEmptyStack","id","Error","concat","i","getStackForConfig","createIfNecessary","matchComponentType","getStackForComponentTypes","types","isLastType","dehydrateLayoutConfig","dehydrateComponent","dehydratedConfig","itemConfig","content","dehydratedComponent","push","debug2","layoutItemConfig","_objectSpread","getTabPoint","glContainer","tab","tabRect","getBoundingClientRect","left","width","bottom","dropLayoutMinorChange","activeItemIndex","props","panelState","irisGridState","sorts","quickFilters","gridState","isStuckToBottom","isStuckToRight","isEqual","layout1","layout2","major","layout1Clone","cloneLayout","layout2Clone","layout","JSON","parse","stringify","hydrateLayoutConfig","hydrateComponent","hydratedConfig","_itemConfig$id","contentConfig","warn","openComponent","configParam","stackParam","replaceExisting","replaceConfig","createNewStack","focusElement","dragEvent","layoutManager","createDragSourceFromEvent","searchConfig","oldContentItem","onComponentCreated","event","debug","off","origin","requestAnimationFrame","on","index","indexOf","openComponentInStack","closeComponent","closeOptions","container","close","contains","renameComponent","newTitle","setTitle","cloneComponent","getPanelComponentState","cloneConfig","title","_config$componentStat","componentState","_config$props","makeDefaultLayout","dimensions","headerHeight","tabHeight","borderWidth","dragBorderWidth","borderGrabWidth","settings","showPopoutIcon","showCloseIcon","constrainDragToContainer","getRootFromContainer","getComponentConfigFromContainer","_config","getTitleFromContainer","getTitleFromTab","getIdFromContainer","getIdFromPanel","panel","getComponentNameFromPanel","_config$component","getComponentName","_component$WrappedCom","_component$WrappedCom2","name","WrappedComponent","displayName","selector","DEFAULT_FOCUS_SELECTOR","querySelector","onInitialized","Promise","resolve","isInitialised","onInit","_defineProperty"],"sources":["../../src/layout/LayoutUtils.ts"],"sourcesContent":["import { DragEvent } from 'react';\nimport deepEqual from 'fast-deep-equal';\nimport { nanoid } from 'nanoid';\nimport isMatch from 'lodash.ismatch';\nimport Log from '@deephaven/log';\nimport GoldenLayout, {\n isComponent,\n isRoot,\n isStack,\n GoldenLayoutThemeExport,\n GLPanelProps,\n} from '@deephaven/golden-layout';\nimport type {\n ComponentConfig,\n Config,\n Container,\n ContentItem,\n ItemConfig,\n ReactComponentConfig,\n Stack,\n Tab,\n CloseOptions,\n} from '@deephaven/golden-layout';\nimport { assertNotNull } from '@deephaven/utils';\nimport { DashboardLayoutConfig } from '../DashboardLayout';\nimport { PanelConfig } from '../DashboardPlugin';\n\nconst log = Log.module('LayoutUtils');\n\ntype LayoutConfig = { id?: string; component?: string };\n\nexport type LayoutPanel = {\n props: GLPanelProps;\n};\n\nexport type StackItemConfig = ItemConfig & {\n activeItemIndex?: number;\n};\n\nfunction isComponentConfig(config: ItemConfig): config is ComponentConfig {\n return (config as ComponentConfig).componentName !== undefined;\n}\n\nexport function isReactComponentConfig(\n config: ItemConfig\n): config is ReactComponentConfig {\n const reactConfig = config as ReactComponentConfig;\n // Golden layout sets the type to 'component' and componentName to 'lm-react-component' in `createContentItem`, then changes it back in `toConfig`\n // For our purposes, we need to check both.\n return (\n ((isComponentConfig(config) &&\n config.componentName === 'lm-react-component') ||\n config.type === 'react-component') &&\n reactConfig.component !== undefined\n );\n}\n\nfunction isHTMLElement(element: Element): element is HTMLElement {\n return (element as HTMLElement).focus !== undefined;\n}\n\nfunction isStackItemConfig(config: ItemConfig): config is StackItemConfig {\n return config.type === 'stack';\n}\nclass LayoutUtils {\n static DEFAULT_FOCUS_SELECTOR = 'input, select, textarea, button';\n\n static activateTab(root: ContentItem, config: Partial<ItemConfig>): void {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return;\n }\n // Find the tab with the specified table and activate it\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n if (contentItem) {\n stack.setActiveContentItem(contentItem);\n }\n }\n\n /**\n * Is the tab with the given config active\n * @param root A GoldenLayout content item with the tab\n * @param config Tab config to match\n * @returns True if the tab is active\n */\n static isActiveTab(\n root: ContentItem,\n config: Partial<ReactComponentConfig>\n ): boolean {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return false;\n }\n // Find the item with the specified config and compare with active item\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n const activeItem = stack.getActiveContentItem();\n return activeItem === contentItem;\n }\n\n /**\n * Adds a stack to the root layout specified. Adds to the first row/column with only one item\n * @param parent A GoldenLayout content item to add the stack to\n * @returns The newly created stack.\n */\n static addStack(parent: ContentItem, columnPreferred = true): Stack {\n if (isRoot(parent)) {\n const rowOrColConfig: ItemConfig = {\n type: columnPreferred ? 'column' : 'row',\n };\n\n if (parent.contentItems == null || parent.contentItems.length === 0) {\n parent.addChild(rowOrColConfig);\n }\n\n const child = parent.contentItems[0];\n const isCorrectType = columnPreferred ? child.isColumn : child.isRow;\n if (!isCorrectType) {\n parent.removeChild(child, true);\n parent.addChild(rowOrColConfig);\n\n // The addChild may cause the element that has focus to be removed from the DOM, which changes focus to the body\n // Try and maintain the focus as best we can. The unfocused element may still send a blur/focus event so that needs to be handled correctly.\n const maintainFocusElement = document.activeElement;\n parent.contentItems[0].addChild(child);\n if (\n maintainFocusElement &&\n (maintainFocusElement as HTMLElement).focus != null\n ) {\n (maintainFocusElement as HTMLElement).focus();\n }\n }\n\n return this.addStack(parent.contentItems[0], columnPreferred);\n }\n\n if (parent.contentItems.length < 2) {\n parent.addChild({ type: 'stack' });\n return parent.contentItems[parent.contentItems.length - 1] as Stack;\n }\n let newParent = parent.contentItems[parent.contentItems.length - 1];\n const isCorrectType = !columnPreferred\n ? newParent.isColumn\n : newParent.isRow;\n if (!isCorrectType) {\n const inverseRowOrColConfig: ItemConfig = {\n type: !columnPreferred ? 'column' : 'row',\n };\n parent.addChild(inverseRowOrColConfig);\n parent.removeChild(newParent, true);\n parent.contentItems[parent.contentItems.length - 1].addChild(newParent);\n newParent = parent.contentItems[parent.contentItems.length - 1];\n }\n\n return this.addStack(newParent, !columnPreferred);\n }\n\n /**\n * Gets a stack by its ID\n * @param item Golden layout content item to search for the stack\n * @param searchId the ID\n */\n static getStackById(\n item: ContentItem,\n searchId: string | string[],\n allowEmptyStack = false\n ): Stack | null {\n if (allowEmptyStack && isStack(item) && item.contentItems.length === 0) {\n return item;\n }\n\n if (searchId === item.config?.id) {\n if (isStack(item)) {\n return item as Stack;\n }\n throw new Error(`Item with ID ${searchId} is not a stack`);\n }\n\n if (item.contentItems == null) {\n return null;\n }\n\n for (let i = 0; i < item.contentItems.length; i += 1) {\n const stack = this.getStackById(\n item.contentItems[i],\n searchId,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n\n return null;\n }\n\n /**\n * Gets the first stack which contains a contentItem with the given config values\n * @param item Golden layout content item to search for the stack\n * @param config The item properties to match\n */\n static getStackForConfig(\n item: ContentItem,\n config: Partial<ItemConfig> = {},\n allowEmptyStack = false\n ): Stack | null {\n if (allowEmptyStack && isStack(item) && item.contentItems.length === 0) {\n return item;\n }\n\n if (item.contentItems == null) {\n return null;\n }\n\n for (let i = 0; i < item.contentItems.length; i += 1) {\n const contentItem = item.contentItems[i];\n if (contentItem.isComponent && contentItem.config != null) {\n if (isMatch(contentItem.config, config)) {\n return item as Stack;\n }\n }\n\n const stack = this.getStackForConfig(\n contentItem,\n config,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n\n return null;\n }\n\n /**\n * Gets a stack matching the specified config\n * @param root The root GoldenLayout element\n * @param config The item config type to match, eg. { component: 'IrisGridPanel', title: 'Table Name' }\n * @param createIfNecessary Whether to create the stack if it does not exist.\n * @param matchComponentType If the config doesn't match exactly, just find another one of the same component type\n * @param allowEmptyStack If no configs match, search for an empty stack that can be used\n */\n static getStackForRoot(\n root: ContentItem,\n config: Partial<ItemConfig>,\n createIfNecessary = true,\n matchComponentType = true,\n allowEmptyStack = true\n ): Stack | null {\n let stack = this.getStackForConfig(root, config);\n if (!stack && matchComponentType) {\n stack = this.getStackForConfig(\n root,\n { component: (config as { component?: string }).component },\n allowEmptyStack\n );\n }\n\n if (!stack && createIfNecessary) {\n stack = this.addStack(root);\n }\n\n return stack;\n }\n\n /**\n * Gets a stack matching one of the specified types, creates new stack if necessary\n * @param root The GoldenLayout root to find or create the stack in\n * @param types The array of component types to match\n * @param createIfNecessary Whether to create the stack if it does not exist\n * @param matchComponentType If the config doesn't match exactly, just find another one of the same component type\n * @param allowEmptyStack If no configs match, search for an empty stack that can be used\n */\n static getStackForComponentTypes(\n root: ContentItem,\n types: string[],\n createIfNecessary = true,\n matchComponentType = true,\n allowEmptyStack = true\n ): Stack | null {\n for (let i = 0; i < types.length; i += 1) {\n const component = types[i];\n const isLastType = i === types.length - 1;\n const stack = LayoutUtils.getStackForRoot(\n root,\n { component },\n createIfNecessary && isLastType,\n matchComponentType,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n return null;\n }\n\n /**\n * Gets first content item with the specified config in stack.\n * @param stack The stack to search for the item\n * @param config The item config type to match, eg. { component: 'IrisGridPanel', title: 'Table Name' }\n * @returns Returns the found content item, null if not found.\n */\n static getContentItemInStack(\n stack: ContentItem | null,\n config: Partial<ItemConfig>\n ): ContentItem | null {\n if (!stack) {\n return null;\n }\n for (let i = 0; i < stack.contentItems.length; i += 1) {\n const contentItem = stack.contentItems[i];\n if (contentItem.isComponent && contentItem.config != null) {\n if (isMatch(contentItem.config, config)) {\n return contentItem;\n }\n }\n }\n return null;\n }\n\n /**\n * Removes dynamic props from components in the given config so this config could be serialized\n * @param config Config objec\n * @returns Dehydrated config\n */\n static dehydrateLayoutConfig(\n config: ItemConfig[],\n dehydrateComponent: (\n componentName: string,\n config: ItemConfig\n ) => PanelConfig\n ): (PanelConfig | ItemConfig)[] {\n if (config == null || !config.length) {\n return [];\n }\n const dehydratedConfig: (PanelConfig | ItemConfig)[] = [];\n\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n const { component, content } = itemConfig as ReactComponentConfig;\n if (component) {\n const dehydratedComponent = dehydrateComponent(component, itemConfig);\n if (dehydratedComponent != null) {\n dehydratedConfig.push(dehydratedComponent);\n } else {\n log.debug2(\n `dehydrateLayoutConfig: skipping unmapped component \"${component}\"`\n );\n }\n } else if (content) {\n const layoutItemConfig = {\n ...itemConfig,\n content: LayoutUtils.dehydrateLayoutConfig(\n content,\n dehydrateComponent\n ),\n };\n dehydratedConfig.push(layoutItemConfig);\n } else {\n dehydratedConfig.push(itemConfig);\n }\n }\n return dehydratedConfig;\n }\n\n static getTabPoint(glContainer: Container): [number, number] {\n const { tab } = glContainer;\n if (tab == null) {\n throw new Error(`Cannot get tab for panel container ${glContainer}`);\n }\n const tabRect = tab.element[0].getBoundingClientRect();\n\n return [tabRect.left + tabRect.width * 0.5, tabRect.bottom - 8];\n }\n\n /**\n * Drop minor changes in Layout Configuration for deep comparison\n * @param config Layout Configuration\n *\n * minor changes:\n * 1. sorts in grid\n * 2. quick filters in grid\n * 3. active item\n * 4. isStuckToBottom/isStuckToRight\n *\n * item id is also removed\n */\n static dropLayoutMinorChange(config: DashboardLayoutConfig): void {\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n const { content } = itemConfig;\n if (content !== undefined) {\n if (isStackItemConfig(itemConfig)) {\n delete itemConfig.activeItemIndex;\n }\n LayoutUtils.dropLayoutMinorChange(content);\n } else if (\n isReactComponentConfig(itemConfig) &&\n itemConfig.component === 'IrisGridPanel'\n ) {\n if (itemConfig.props.panelState != null) {\n delete itemConfig.id;\n itemConfig.props.panelState.irisGridState.sorts = [];\n itemConfig.props.panelState.irisGridState.quickFilters = [];\n itemConfig.props.panelState.gridState.isStuckToBottom = false;\n itemConfig.props.panelState.gridState.isStuckToRight = false;\n }\n }\n }\n }\n\n /**\n * Compare two layouts to see if they are equivalent\n * @param layout1 A Golden Layout config object\n * @param layout2 Another Golden layout config object\n * @param major When true, will ignore \"minor\" property differences (eg. sorts)\n */\n static isEqual(\n layout1: DashboardLayoutConfig,\n layout2: DashboardLayoutConfig,\n major = false\n ): boolean {\n const layout1Clone = LayoutUtils.cloneLayout(layout1);\n const layout2Clone = LayoutUtils.cloneLayout(layout2);\n if (major) {\n LayoutUtils.dropLayoutMinorChange(layout1Clone);\n LayoutUtils.dropLayoutMinorChange(layout2Clone);\n return deepEqual(layout1Clone, layout2Clone);\n }\n // Pass cloned layouts to avoid false negatives\n // when comparing layouts with undefined and missing properties\n return deepEqual(layout1Clone, layout2Clone);\n }\n\n static cloneLayout(layout: DashboardLayoutConfig): DashboardLayoutConfig {\n return JSON.parse(JSON.stringify(layout));\n }\n\n /**\n * Adds dynamic props to components in the given config so this config could be used to initialize a layout\n * @param config Dehydrated config object\n * @param hydrateComponent Function to hydrate the component\n * @returns Hydrated config\n */\n static hydrateLayoutConfig(\n config: (PanelConfig | ItemConfig)[],\n hydrateComponent: (\n componentName: string,\n config: PanelConfig | ItemConfig\n ) => ReactComponentConfig\n ): DashboardLayoutConfig {\n if (config == null || !config.length) {\n return [];\n }\n const hydratedConfig = [];\n\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n if (isReactComponentConfig(itemConfig)) {\n const { component, props = {} } = itemConfig;\n hydratedConfig.push({\n ...itemConfig,\n id: itemConfig?.id ?? nanoid(),\n props: hydrateComponent(component, props),\n });\n } else if (itemConfig.content !== undefined) {\n const contentConfig = LayoutUtils.hydrateLayoutConfig(\n itemConfig.content,\n hydrateComponent\n );\n if (\n isStackItemConfig(itemConfig) &&\n itemConfig.activeItemIndex != null &&\n itemConfig.activeItemIndex >= contentConfig.length\n ) {\n log.warn(\n 'Fixing bad activeItemIndex!',\n itemConfig.activeItemIndex,\n itemConfig\n );\n itemConfig.activeItemIndex = 0;\n }\n hydratedConfig.push({\n ...itemConfig,\n content: contentConfig,\n });\n } else {\n hydratedConfig.push(itemConfig);\n }\n }\n\n return hydratedConfig;\n }\n\n /**\n * Opens a component. It will try and open the component in an existing stack of the same component.\n * If `replaceExisting` is true and there is a component found with the same `config.id`, it will replace that component with this one.\n * If `allowStack` is true and there is a component of the same type found, it will open in that stack (potentially covering up a panel).\n * @param root The GoldenLayout root to open the component in\n * @param config The component config definition to open\n * @param replaceExisting Whether it should replace the existing one matching component type and id, or open a new one\n * @param replaceConfig The component config to replace\n * @param createNewStack True to force opening in a new stack, false to try and open in a stack with the same type of component.\n * @param focusElement The element to focus on\n * @param dragEvent Whether component is being created with a drag, mouse event is initial position for drag proxy\n */\n static openComponent({\n root,\n config: configParam,\n stack: stackParam = undefined,\n replaceExisting = true,\n replaceConfig = undefined,\n createNewStack = false,\n focusElement = undefined,\n dragEvent = undefined,\n }: {\n root?: ContentItem;\n config?: Partial<ReactComponentConfig>;\n stack?: Stack;\n replaceExisting?: boolean;\n replaceConfig?: Partial<ItemConfig>;\n createNewStack?: boolean;\n focusElement?: string;\n dragEvent?: DragEvent;\n } = {}): void {\n // attempt to retain focus after dom manipulation, which can break focus\n const maintainFocusElement = document.activeElement;\n const config = { ...configParam } as ReactComponentConfig;\n\n if (config.id == null) {\n config.id = nanoid();\n }\n\n if (dragEvent != null) {\n root?.layoutManager.createDragSourceFromEvent(config, dragEvent);\n return;\n }\n\n const searchConfig = replaceConfig || {\n id: config.id,\n component: config.component,\n };\n assertNotNull(root);\n const stack =\n stackParam ??\n (createNewStack\n ? LayoutUtils.addStack(root)\n : LayoutUtils.getStackForRoot(root, searchConfig));\n\n assertNotNull(stack);\n const oldContentItem = LayoutUtils.getContentItemInStack(\n stack,\n searchConfig\n );\n\n if (focusElement != null) {\n // We need to listen for when the stack is created\n const onComponentCreated = (event: {\n origin: { element: Element[] };\n }): void => {\n log.debug('Component created, focusing element', focusElement);\n\n stack.off('componentCreated', onComponentCreated);\n\n const { element } = event.origin;\n\n // Need to wait until the component actually renders.\n requestAnimationFrame(() => {\n LayoutUtils.focusElement(element[0], focusElement);\n });\n };\n stack.on('componentCreated', onComponentCreated);\n }\n if (replaceExisting && oldContentItem) {\n const index = stack.contentItems.indexOf(oldContentItem);\n\n // Using remove/add here instead of replaceChild because I was getting errors with replaceChild... should be the same.\n // Add first so that the stack doesn't get screwed up\n stack.addChild(config, index + 1);\n stack.removeChild(oldContentItem);\n\n stack.setActiveContentItem(stack.contentItems[index]);\n } else {\n stack.addChild(config);\n }\n\n if (\n focusElement == null &&\n maintainFocusElement &&\n isHTMLElement(maintainFocusElement)\n ) {\n maintainFocusElement.focus();\n }\n }\n\n /**\n * Opens a component in an given stack.\n * If `replaceExisting` is true and there is a component found with the same `config.id`, it will replace that component with this one\n * @param stack The GoldenLayout stack to open the component in\n * @param config The component config definition to open\n * @param replaceExisting Whether it should replace the existing one matching component type and id, or open a new one\n */\n static openComponentInStack(\n stack: Stack | null,\n config: ItemConfig & Record<string, unknown>,\n replaceExisting = true\n ): void {\n const maintainFocusElement = document.activeElement; // attempt to retain focus after dom manipulation, which can break focus\n\n const searchConfig = { id: config.id };\n\n const oldContentItem = LayoutUtils.getContentItemInStack(\n stack,\n searchConfig\n );\n\n if (replaceExisting && oldContentItem && stack) {\n const index = stack?.contentItems.indexOf(oldContentItem);\n\n // Using remove/add here instead of replaceChild because I was getting errors with replaceChild... should be the same.\n // Add first so that the stack doesn't get screwed up\n stack.addChild(config, index + 1);\n stack.removeChild(oldContentItem);\n\n stack.setActiveContentItem(stack.contentItems[index]);\n } else {\n stack?.addChild(config);\n }\n\n if (maintainFocusElement && isHTMLElement(maintainFocusElement)) {\n maintainFocusElement.focus();\n }\n }\n\n /**\n * Close the specified component and remove it from the stack it's currently in\n * @param root The GoldenLayout root to search and close the component in\n * @param config The GoldenLayout component config definition to close, eg. { component: 'IrisGridPanel', id: 'table-t' }\n */\n static closeComponent(\n root: ContentItem,\n config: LayoutConfig,\n closeOptions?: CloseOptions\n ): void {\n const stack = LayoutUtils.getStackForRoot(\n root,\n config,\n false,\n false,\n false\n );\n\n if (!stack) {\n log.warn('Cannot find stack for component, ignoring close', config);\n return;\n }\n\n // Find the tab with the specified config and remove it\n // Same component was used to get the stack above, so getContentItemInStack shouldn't return null\n const oldContentItem = LayoutUtils.getContentItemInStack(stack, config);\n const maintainFocusElement = document.activeElement; // attempt to retain focus after dom manipulation, which can break focus\n if (oldContentItem) {\n if (isComponent(oldContentItem)) {\n oldContentItem.container.close(closeOptions);\n } else {\n stack.removeChild(oldContentItem);\n }\n }\n // if focused element is still in dom restore focus, note it could have been in the removed panel so check first\n if (\n maintainFocusElement &&\n document.contains(maintainFocusElement) &&\n isHTMLElement(maintainFocusElement)\n ) {\n maintainFocusElement.focus();\n }\n }\n\n static renameComponent(\n root: ContentItem,\n config: Partial<ItemConfig>,\n newTitle: string\n ): void {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return;\n }\n // Find the tab with the specified config and rename it\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n if (contentItem) {\n contentItem.setTitle(newTitle);\n }\n }\n\n /**\n * Create a component clone based on the given config\n * @param root The GoldenLayout root to clone the component in\n * @param config The config to clone\n * @returns Clone config\n */\n static cloneComponent(\n root: ContentItem,\n config: ReactComponentConfig\n ): ReactComponentConfig | null {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return null;\n }\n const { props = {} } = config;\n const panelState = LayoutUtils.getPanelComponentState(config);\n const cloneConfig = {\n type: 'react-component' as const,\n component: config.component,\n props: {\n ...props,\n panelState,\n },\n title: `${config.title} Copy`,\n id: nanoid(),\n };\n LayoutUtils.openComponentInStack(stack, cloneConfig);\n return cloneConfig;\n }\n\n /**\n * Get panel component state for the given config\n * @param config Panel config\n * @returns Panel state\n */\n static getPanelComponentState(config: ItemConfig): unknown {\n if (isComponentConfig(config)) {\n return config.componentState?.panelState;\n }\n if (isReactComponentConfig(config)) {\n return config.props?.panelState;\n }\n return null;\n }\n\n static makeDefaultLayout(): Config {\n return {\n dimensions: {\n headerHeight: GoldenLayoutThemeExport.tabHeight,\n borderWidth: GoldenLayoutThemeExport.dragBorderWidth,\n borderGrabWidth: 10,\n },\n settings: {\n showPopoutIcon: false,\n showCloseIcon: false,\n constrainDragToContainer: false,\n },\n } as Config;\n }\n\n /**\n * Gets a containers root node\n * @param container The Golden Layout container to get the root for\n */\n static getRootFromContainer(container: Container): ContentItem {\n return container.layoutManager.root;\n }\n\n /**\n * Gets the config for the panel component given a glContainer\n * @param container The Golden Layout container to get the config for\n */\n static getComponentConfigFromContainer(\n container?: Container\n ): ItemConfig | null {\n if (container) {\n if (container.tab != null && container.tab.contentItem != null) {\n return container.tab.contentItem.config;\n }\n\n // If the container hasn't populated the tab yet, just get the config directly from the container\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore private api usage\n // eslint-disable-next-line no-underscore-dangle\n return container._config;\n }\n\n return null;\n }\n\n static getTitleFromContainer(\n container: Container\n ): string | null | undefined {\n if (\n container != null &&\n container.tab != null &&\n container.tab.contentItem != null\n ) {\n return container.tab.contentItem.config.title;\n }\n return null;\n }\n\n static getTitleFromTab(tab: Tab): string | null | undefined {\n if (tab != null && tab.contentItem != null) {\n return tab.contentItem.config.title;\n }\n return null;\n }\n\n /**\n * Retrieve the panel ID for the provided golden layout container\n * @param glContainer The container to get the panel ID for\n * @returns Panel ID\n */\n static getIdFromContainer(\n glContainer: Container\n ): string | string[] | null | undefined {\n const config = LayoutUtils.getComponentConfigFromContainer(glContainer);\n if (config) {\n return config.id;\n }\n return null;\n }\n\n /**\n * Retrieve the ID of the panel provided\n * @param panel The panel to get the ID for\n * @returns Panel ID\n */\n static getIdFromPanel(\n panel: LayoutPanel\n ): string | string[] | null | undefined {\n const { glContainer } = panel.props;\n return LayoutUtils.getIdFromContainer(glContainer);\n }\n\n /**\n * Get component name from the panel instance\n * @param panel Panel to get component name for\n * @returns Component name or null if unable to retrieve name\n */\n static getComponentNameFromPanel(panel: LayoutPanel): string | null {\n const { glContainer } = panel.props;\n const config = LayoutUtils.getComponentConfigFromContainer(glContainer);\n if (config && isReactComponentConfig(config)) {\n return config.component ?? null;\n }\n return null;\n }\n\n /**\n * Get component name for wrapped and un-wrapped components\n * @param component Component to get name for\n * @returns Component name\n * @throws If displayName for the component is not defined\n */\n static getComponentName(component: {\n displayName?: string;\n WrappedComponent?: { displayName?: string };\n }): string {\n const name =\n component.WrappedComponent?.displayName ?? component.displayName;\n if (name == null) {\n throw new Error(`Component displayName not defined ${component}`);\n }\n return name;\n }\n\n /**\n * Put focus on the first \"input\" element (input, button, select, textarea) within an element\n * If element is null or input element not found, does nothing\n * @param element The element to put focus in.\n * @param selector The first element matching this selector will be focused.\n * @returns The element that was focused, null if not focused\n */\n static focusElement(\n element: Element,\n selector = LayoutUtils.DEFAULT_FOCUS_SELECTOR\n ): Element | null {\n if (element == null) {\n return null;\n }\n const focusElement = element.querySelector(selector);\n if (focusElement == null) {\n return null;\n }\n\n if (isHTMLElement(focusElement)) {\n focusElement.focus();\n }\n return focusElement;\n }\n\n /**\n * Get a promise that initializes when layout is initialized\n * @param layout The layout to await initialization on\n * @returns Promise that resolves when layout is initialized\n */\n static onInitialized(layout: GoldenLayout): Promise<void> {\n return new Promise(resolve => {\n if (layout.isInitialised) {\n resolve();\n return;\n }\n const onInit = (): void => {\n layout.off('initialised', onInit);\n resolve();\n };\n layout.on('initialised', onInit);\n });\n }\n}\n\nexport default LayoutUtils;\n"],"mappings":";;;;;AACA,OAAOA,SAAS,MAAM,iBAAiB;AACvC,SAASC,MAAM,QAAQ,QAAQ;AAC/B,OAAOC,OAAO,MAAM,gBAAgB;AACpC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SACEC,WAAW,EACXC,MAAM,EACNC,OAAO,EACPC,uBAAuB,QAElB,0BAA0B;AAYjC,SAASC,aAAa,QAAQ,kBAAkB;AAIhD,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAM,CAAC,aAAa,CAAC;AAYrC,SAASC,iBAAiB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;MACxB,OAAO,IAAI;IACb;IAEA,IAAIpG,aAAa,CAACoG,YAAY,CAAC,EAAE;MAC/BA,YAAY,CAAClG,KAAK,CAAC,CAAC;IACtB;IACA,OAAOkG,YAAY;EACrB;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAO6D,aAAaA,CAAC7E,MAAoB,EAAiB;IACxD,OAAO,IAAI8E,OAAO,CAACC,OAAO,IAAI;MAC5B,IAAI/E,MAAM,CAACgF,aAAa,EAAE;QACxBD,OAAO,CAAC,CAAC;QACT;MACF;MACA,IAAME,MAAM,GAAGA,CAAA,KAAY;QACzBjF,MAAM,CAACyB,GAAG,CAAC,aAAa,EAAEwD,MAAM,CAAC;QACjCF,OAAO,CAAC,CAAC;MACX,CAAC;MACD/E,MAAM,CAAC4B,EAAE,CAAC,aAAa,EAAEqD,MAAM,CAAC;IAClC,CAAC,CAAC;EACJ;AACF;AAACC,eAAA,CA/0BKlK,WAAW,4BACiB,iCAAiC;AAg1BnE,eAAeA,WAAW"}
1
+ {"version":3,"file":"LayoutUtils.js","names":["deepEqual","nanoid","isMatch","Log","isComponent","isRoot","isStack","GoldenLayoutThemeExport","assertNotNull","log","module","isComponentConfig","config","componentName","undefined","isReactComponentConfig","reactConfig","type","component","isHTMLElement","element","focus","isStackItemConfig","LayoutUtils","activateTab","root","stack","getStackForRoot","error","contentItem","getContentItemInStack","setActiveContentItem","isActiveTab","activeItem","getActiveContentItem","addStack","parent","columnPreferred","arguments","length","rowOrColConfig","contentItems","addChild","child","isCorrectType","isColumn","isRow","removeChild","maintainFocusElement","document","activeElement","newParent","inverseRowOrColConfig","getStackById","item","searchId","_item$config","allowEmptyStack","id","Error","concat","i","getStackForConfig","createIfNecessary","matchComponentType","getStackForComponentTypes","types","isLastType","dehydrateLayoutConfig","dehydrateComponent","dehydratedConfig","itemConfig","content","dehydratedComponent","push","debug2","layoutItemConfig","_objectSpread","getTabPoint","glContainer","tab","tabRect","getBoundingClientRect","left","width","bottom","dropLayoutMinorChange","activeItemIndex","props","panelState","irisGridState","sorts","quickFilters","gridState","isStuckToBottom","isStuckToRight","isEqual","layout1","layout2","major","layout1Clone","cloneLayout","layout2Clone","layout","JSON","parse","stringify","hydrateLayoutConfig","hydrateComponent","hydratedConfig","_itemConfig$id","contentConfig","warn","openComponent","configParam","stackParam","replaceExisting","replaceConfig","createNewStack","focusElement","dragEvent","layoutManager","createDragSourceFromEvent","searchConfig","oldContentItem","onComponentCreated","event","debug","off","origin","requestAnimationFrame","on","index","indexOf","openComponentInStack","closeComponent","closeOptions","container","close","contains","renameComponent","newTitle","setTitle","cloneComponent","getPanelComponentState","cloneConfig","title","_config$componentStat","componentState","_config$props","makeDefaultLayout","dimensions","headerHeight","tabHeight","borderWidth","dragBorderWidth","borderGrabWidth","settings","showPopoutIcon","showCloseIcon","constrainDragToContainer","getRootFromContainer","getComponentConfigFromContainer","_config","getTitleFromContainer","getTitleFromTab","getIdFromContainer","getIdFromPanel","panel","getComponentNameFromPanel","_config$component","getComponentName","_component$WrappedCom","_component$WrappedCom2","name","WrappedComponent","displayName","selector","DEFAULT_FOCUS_SELECTOR","querySelector","onInitialized","Promise","resolve","isInitialised","onInit","_defineProperty"],"sources":["../../src/layout/LayoutUtils.ts"],"sourcesContent":["import deepEqual from 'fast-deep-equal';\nimport { nanoid } from 'nanoid';\nimport isMatch from 'lodash.ismatch';\nimport Log from '@deephaven/log';\nimport GoldenLayout, {\n isComponent,\n isRoot,\n isStack,\n GoldenLayoutThemeExport,\n GLPanelProps,\n} from '@deephaven/golden-layout';\nimport type {\n ComponentConfig,\n Config,\n Container,\n ContentItem,\n ItemConfig,\n ReactComponentConfig,\n Stack,\n Tab,\n CloseOptions,\n} from '@deephaven/golden-layout';\nimport { assertNotNull } from '@deephaven/utils';\nimport { DashboardLayoutConfig } from '../DashboardLayout';\nimport { PanelConfig } from '../DashboardPlugin';\n\nconst log = Log.module('LayoutUtils');\n\ntype LayoutConfig = { id?: string; component?: string };\n\nexport type LayoutPanel = {\n props: GLPanelProps;\n};\n\nexport type StackItemConfig = ItemConfig & {\n activeItemIndex?: number;\n};\n\nfunction isComponentConfig(config: ItemConfig): config is ComponentConfig {\n return (config as ComponentConfig).componentName !== undefined;\n}\n\nexport function isReactComponentConfig(\n config: ItemConfig\n): config is ReactComponentConfig {\n const reactConfig = config as ReactComponentConfig;\n // Golden layout sets the type to 'component' and componentName to 'lm-react-component' in `createContentItem`, then changes it back in `toConfig`\n // For our purposes, we need to check both.\n return (\n ((isComponentConfig(config) &&\n config.componentName === 'lm-react-component') ||\n config.type === 'react-component') &&\n reactConfig.component !== undefined\n );\n}\n\nfunction isHTMLElement(element: Element): element is HTMLElement {\n return (element as HTMLElement).focus !== undefined;\n}\n\nfunction isStackItemConfig(config: ItemConfig): config is StackItemConfig {\n return config.type === 'stack';\n}\nclass LayoutUtils {\n static DEFAULT_FOCUS_SELECTOR = 'input, select, textarea, button';\n\n static activateTab(root: ContentItem, config: Partial<ItemConfig>): void {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return;\n }\n // Find the tab with the specified table and activate it\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n if (contentItem) {\n stack.setActiveContentItem(contentItem);\n }\n }\n\n /**\n * Is the tab with the given config active\n * @param root A GoldenLayout content item with the tab\n * @param config Tab config to match\n * @returns True if the tab is active\n */\n static isActiveTab(\n root: ContentItem,\n config: Partial<ReactComponentConfig>\n ): boolean {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return false;\n }\n // Find the item with the specified config and compare with active item\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n const activeItem = stack.getActiveContentItem();\n return activeItem === contentItem;\n }\n\n /**\n * Adds a stack to the root layout specified. Adds to the first row/column with only one item\n * @param parent A GoldenLayout content item to add the stack to\n * @returns The newly created stack.\n */\n static addStack(parent: ContentItem, columnPreferred = true): Stack {\n if (isRoot(parent)) {\n const rowOrColConfig: ItemConfig = {\n type: columnPreferred ? 'column' : 'row',\n };\n\n if (parent.contentItems == null || parent.contentItems.length === 0) {\n parent.addChild(rowOrColConfig);\n }\n\n const child = parent.contentItems[0];\n const isCorrectType = columnPreferred ? child.isColumn : child.isRow;\n if (!isCorrectType) {\n parent.removeChild(child, true);\n parent.addChild(rowOrColConfig);\n\n // The addChild may cause the element that has focus to be removed from the DOM, which changes focus to the body\n // Try and maintain the focus as best we can. The unfocused element may still send a blur/focus event so that needs to be handled correctly.\n const maintainFocusElement = document.activeElement;\n parent.contentItems[0].addChild(child);\n if (\n maintainFocusElement &&\n (maintainFocusElement as HTMLElement).focus != null\n ) {\n (maintainFocusElement as HTMLElement).focus();\n }\n }\n\n return this.addStack(parent.contentItems[0], columnPreferred);\n }\n\n if (parent.contentItems.length < 2) {\n parent.addChild({ type: 'stack' });\n return parent.contentItems[parent.contentItems.length - 1] as Stack;\n }\n let newParent = parent.contentItems[parent.contentItems.length - 1];\n const isCorrectType = !columnPreferred\n ? newParent.isColumn\n : newParent.isRow;\n if (!isCorrectType) {\n const inverseRowOrColConfig: ItemConfig = {\n type: !columnPreferred ? 'column' : 'row',\n };\n parent.addChild(inverseRowOrColConfig);\n parent.removeChild(newParent, true);\n parent.contentItems[parent.contentItems.length - 1].addChild(newParent);\n newParent = parent.contentItems[parent.contentItems.length - 1];\n }\n\n return this.addStack(newParent, !columnPreferred);\n }\n\n /**\n * Gets a stack by its ID\n * @param item Golden layout content item to search for the stack\n * @param searchId the ID\n */\n static getStackById(\n item: ContentItem,\n searchId: string | string[],\n allowEmptyStack = false\n ): Stack | null {\n if (allowEmptyStack && isStack(item) && item.contentItems.length === 0) {\n return item;\n }\n\n if (searchId === item.config?.id) {\n if (isStack(item)) {\n return item as Stack;\n }\n throw new Error(`Item with ID ${searchId} is not a stack`);\n }\n\n if (item.contentItems == null) {\n return null;\n }\n\n for (let i = 0; i < item.contentItems.length; i += 1) {\n const stack = this.getStackById(\n item.contentItems[i],\n searchId,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n\n return null;\n }\n\n /**\n * Gets the first stack which contains a contentItem with the given config values\n * @param item Golden layout content item to search for the stack\n * @param config The item properties to match\n */\n static getStackForConfig(\n item: ContentItem,\n config: Partial<ItemConfig> = {},\n allowEmptyStack = false\n ): Stack | null {\n if (allowEmptyStack && isStack(item) && item.contentItems.length === 0) {\n return item;\n }\n\n if (item.contentItems == null) {\n return null;\n }\n\n for (let i = 0; i < item.contentItems.length; i += 1) {\n const contentItem = item.contentItems[i];\n if (contentItem.isComponent && contentItem.config != null) {\n if (isMatch(contentItem.config, config)) {\n return item as Stack;\n }\n }\n\n const stack = this.getStackForConfig(\n contentItem,\n config,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n\n return null;\n }\n\n /**\n * Gets a stack matching the specified config\n * @param root The root GoldenLayout element\n * @param config The item config type to match, eg. { component: 'IrisGridPanel', title: 'Table Name' }\n * @param createIfNecessary Whether to create the stack if it does not exist.\n * @param matchComponentType If the config doesn't match exactly, just find another one of the same component type\n * @param allowEmptyStack If no configs match, search for an empty stack that can be used\n */\n static getStackForRoot(\n root: ContentItem,\n config: Partial<ItemConfig>,\n createIfNecessary = true,\n matchComponentType = true,\n allowEmptyStack = true\n ): Stack | null {\n let stack = this.getStackForConfig(root, config);\n if (!stack && matchComponentType) {\n stack = this.getStackForConfig(\n root,\n { component: (config as { component?: string }).component },\n allowEmptyStack\n );\n }\n\n if (!stack && createIfNecessary) {\n stack = this.addStack(root);\n }\n\n return stack;\n }\n\n /**\n * Gets a stack matching one of the specified types, creates new stack if necessary\n * @param root The GoldenLayout root to find or create the stack in\n * @param types The array of component types to match\n * @param createIfNecessary Whether to create the stack if it does not exist\n * @param matchComponentType If the config doesn't match exactly, just find another one of the same component type\n * @param allowEmptyStack If no configs match, search for an empty stack that can be used\n */\n static getStackForComponentTypes(\n root: ContentItem,\n types: string[],\n createIfNecessary = true,\n matchComponentType = true,\n allowEmptyStack = true\n ): Stack | null {\n for (let i = 0; i < types.length; i += 1) {\n const component = types[i];\n const isLastType = i === types.length - 1;\n const stack = LayoutUtils.getStackForRoot(\n root,\n { component },\n createIfNecessary && isLastType,\n matchComponentType,\n allowEmptyStack\n );\n if (stack) {\n return stack;\n }\n }\n return null;\n }\n\n /**\n * Gets first content item with the specified config in stack.\n * @param stack The stack to search for the item\n * @param config The item config type to match, eg. { component: 'IrisGridPanel', title: 'Table Name' }\n * @returns Returns the found content item, null if not found.\n */\n static getContentItemInStack(\n stack: ContentItem | null,\n config: Partial<ItemConfig>\n ): ContentItem | null {\n if (!stack) {\n return null;\n }\n for (let i = 0; i < stack.contentItems.length; i += 1) {\n const contentItem = stack.contentItems[i];\n if (contentItem.isComponent && contentItem.config != null) {\n if (isMatch(contentItem.config, config)) {\n return contentItem;\n }\n }\n }\n return null;\n }\n\n /**\n * Removes dynamic props from components in the given config so this config could be serialized\n * @param config Config objec\n * @returns Dehydrated config\n */\n static dehydrateLayoutConfig(\n config: ItemConfig[],\n dehydrateComponent: (\n componentName: string,\n config: ItemConfig\n ) => PanelConfig\n ): (PanelConfig | ItemConfig)[] {\n if (config == null || !config.length) {\n return [];\n }\n const dehydratedConfig: (PanelConfig | ItemConfig)[] = [];\n\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n const { component, content } = itemConfig as ReactComponentConfig;\n if (component) {\n const dehydratedComponent = dehydrateComponent(component, itemConfig);\n if (dehydratedComponent != null) {\n dehydratedConfig.push(dehydratedComponent);\n } else {\n log.debug2(\n `dehydrateLayoutConfig: skipping unmapped component \"${component}\"`\n );\n }\n } else if (content) {\n const layoutItemConfig = {\n ...itemConfig,\n content: LayoutUtils.dehydrateLayoutConfig(\n content,\n dehydrateComponent\n ),\n };\n dehydratedConfig.push(layoutItemConfig);\n } else {\n dehydratedConfig.push(itemConfig);\n }\n }\n return dehydratedConfig;\n }\n\n static getTabPoint(glContainer: Container): [number, number] {\n const { tab } = glContainer;\n if (tab == null) {\n throw new Error(`Cannot get tab for panel container ${glContainer}`);\n }\n const tabRect = tab.element[0].getBoundingClientRect();\n\n return [tabRect.left + tabRect.width * 0.5, tabRect.bottom - 8];\n }\n\n /**\n * Drop minor changes in Layout Configuration for deep comparison\n * @param config Layout Configuration\n *\n * minor changes:\n * 1. sorts in grid\n * 2. quick filters in grid\n * 3. active item\n * 4. isStuckToBottom/isStuckToRight\n *\n * item id is also removed\n */\n static dropLayoutMinorChange(config: DashboardLayoutConfig): void {\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n const { content } = itemConfig;\n if (content !== undefined) {\n if (isStackItemConfig(itemConfig)) {\n delete itemConfig.activeItemIndex;\n }\n LayoutUtils.dropLayoutMinorChange(content);\n } else if (\n isReactComponentConfig(itemConfig) &&\n itemConfig.component === 'IrisGridPanel'\n ) {\n if (itemConfig.props.panelState != null) {\n delete itemConfig.id;\n itemConfig.props.panelState.irisGridState.sorts = [];\n itemConfig.props.panelState.irisGridState.quickFilters = [];\n itemConfig.props.panelState.gridState.isStuckToBottom = false;\n itemConfig.props.panelState.gridState.isStuckToRight = false;\n }\n }\n }\n }\n\n /**\n * Compare two layouts to see if they are equivalent\n * @param layout1 A Golden Layout config object\n * @param layout2 Another Golden layout config object\n * @param major When true, will ignore \"minor\" property differences (eg. sorts)\n */\n static isEqual(\n layout1: DashboardLayoutConfig,\n layout2: DashboardLayoutConfig,\n major = false\n ): boolean {\n const layout1Clone = LayoutUtils.cloneLayout(layout1);\n const layout2Clone = LayoutUtils.cloneLayout(layout2);\n if (major) {\n LayoutUtils.dropLayoutMinorChange(layout1Clone);\n LayoutUtils.dropLayoutMinorChange(layout2Clone);\n return deepEqual(layout1Clone, layout2Clone);\n }\n // Pass cloned layouts to avoid false negatives\n // when comparing layouts with undefined and missing properties\n return deepEqual(layout1Clone, layout2Clone);\n }\n\n static cloneLayout(layout: DashboardLayoutConfig): DashboardLayoutConfig {\n return JSON.parse(JSON.stringify(layout));\n }\n\n /**\n * Adds dynamic props to components in the given config so this config could be used to initialize a layout\n * @param config Dehydrated config object\n * @param hydrateComponent Function to hydrate the component\n * @returns Hydrated config\n */\n static hydrateLayoutConfig(\n config: (PanelConfig | ItemConfig)[],\n hydrateComponent: (\n componentName: string,\n config: PanelConfig | ItemConfig\n ) => ReactComponentConfig\n ): DashboardLayoutConfig {\n if (config == null || !config.length) {\n return [];\n }\n const hydratedConfig = [];\n\n for (let i = 0; i < config.length; i += 1) {\n const itemConfig = config[i];\n if (isReactComponentConfig(itemConfig)) {\n const { component, props = {} } = itemConfig;\n hydratedConfig.push({\n ...itemConfig,\n id: itemConfig?.id ?? nanoid(),\n props: hydrateComponent(component, props),\n });\n } else if (itemConfig.content !== undefined) {\n const contentConfig = LayoutUtils.hydrateLayoutConfig(\n itemConfig.content,\n hydrateComponent\n );\n if (\n isStackItemConfig(itemConfig) &&\n itemConfig.activeItemIndex != null &&\n itemConfig.activeItemIndex >= contentConfig.length\n ) {\n log.warn(\n 'Fixing bad activeItemIndex!',\n itemConfig.activeItemIndex,\n itemConfig\n );\n itemConfig.activeItemIndex = 0;\n }\n hydratedConfig.push({\n ...itemConfig,\n content: contentConfig,\n });\n } else {\n hydratedConfig.push(itemConfig);\n }\n }\n\n return hydratedConfig;\n }\n\n /**\n * Opens a component. It will try and open the component in an existing stack of the same component.\n * If `replaceExisting` is true and there is a component found with the same `config.id`, it will replace that component with this one.\n * If `allowStack` is true and there is a component of the same type found, it will open in that stack (potentially covering up a panel).\n * @param root The GoldenLayout root to open the component in\n * @param config The component config definition to open\n * @param replaceExisting Whether it should replace the existing one matching component type and id, or open a new one\n * @param replaceConfig The component config to replace\n * @param createNewStack True to force opening in a new stack, false to try and open in a stack with the same type of component.\n * @param focusElement The element to focus on\n * @param dragEvent Whether component is being created with a drag, mouse event is initial position for drag proxy\n */\n static openComponent({\n root,\n config: configParam,\n stack: stackParam = undefined,\n replaceExisting = true,\n replaceConfig = undefined,\n createNewStack = false,\n focusElement = undefined,\n dragEvent = undefined,\n }: {\n root?: ContentItem;\n config?: Partial<ReactComponentConfig>;\n stack?: Stack;\n replaceExisting?: boolean;\n replaceConfig?: Partial<ItemConfig>;\n createNewStack?: boolean;\n focusElement?: string;\n dragEvent?: MouseEvent;\n } = {}): void {\n // attempt to retain focus after dom manipulation, which can break focus\n const maintainFocusElement = document.activeElement;\n const config = { ...configParam } as ReactComponentConfig;\n\n if (config.id == null) {\n config.id = nanoid();\n }\n\n if (dragEvent != null) {\n root?.layoutManager.createDragSourceFromEvent(config, dragEvent);\n return;\n }\n\n const searchConfig = replaceConfig || {\n id: config.id,\n component: config.component,\n };\n assertNotNull(root);\n const stack =\n stackParam ??\n (createNewStack\n ? LayoutUtils.addStack(root)\n : LayoutUtils.getStackForRoot(root, searchConfig));\n\n assertNotNull(stack);\n const oldContentItem = LayoutUtils.getContentItemInStack(\n stack,\n searchConfig\n );\n\n if (focusElement != null) {\n // We need to listen for when the stack is created\n const onComponentCreated = (event: {\n origin: { element: Element[] };\n }): void => {\n log.debug('Component created, focusing element', focusElement);\n\n stack.off('componentCreated', onComponentCreated);\n\n const { element } = event.origin;\n\n // Need to wait until the component actually renders.\n requestAnimationFrame(() => {\n LayoutUtils.focusElement(element[0], focusElement);\n });\n };\n stack.on('componentCreated', onComponentCreated);\n }\n if (replaceExisting && oldContentItem) {\n const index = stack.contentItems.indexOf(oldContentItem);\n\n // Using remove/add here instead of replaceChild because I was getting errors with replaceChild... should be the same.\n // Add first so that the stack doesn't get screwed up\n stack.addChild(config, index + 1);\n stack.removeChild(oldContentItem);\n\n stack.setActiveContentItem(stack.contentItems[index]);\n } else {\n stack.addChild(config);\n }\n\n if (\n focusElement == null &&\n maintainFocusElement &&\n isHTMLElement(maintainFocusElement)\n ) {\n maintainFocusElement.focus();\n }\n }\n\n /**\n * Opens a component in an given stack.\n * If `replaceExisting` is true and there is a component found with the same `config.id`, it will replace that component with this one\n * @param stack The GoldenLayout stack to open the component in\n * @param config The component config definition to open\n * @param replaceExisting Whether it should replace the existing one matching component type and id, or open a new one\n */\n static openComponentInStack(\n stack: Stack | null,\n config: ItemConfig & Record<string, unknown>,\n replaceExisting = true\n ): void {\n const maintainFocusElement = document.activeElement; // attempt to retain focus after dom manipulation, which can break focus\n\n const searchConfig = { id: config.id };\n\n const oldContentItem = LayoutUtils.getContentItemInStack(\n stack,\n searchConfig\n );\n\n if (replaceExisting && oldContentItem && stack) {\n const index = stack?.contentItems.indexOf(oldContentItem);\n\n // Using remove/add here instead of replaceChild because I was getting errors with replaceChild... should be the same.\n // Add first so that the stack doesn't get screwed up\n stack.addChild(config, index + 1);\n stack.removeChild(oldContentItem);\n\n stack.setActiveContentItem(stack.contentItems[index]);\n } else {\n stack?.addChild(config);\n }\n\n if (maintainFocusElement && isHTMLElement(maintainFocusElement)) {\n maintainFocusElement.focus();\n }\n }\n\n /**\n * Close the specified component and remove it from the stack it's currently in\n * @param root The GoldenLayout root to search and close the component in\n * @param config The GoldenLayout component config definition to close, eg. { component: 'IrisGridPanel', id: 'table-t' }\n */\n static closeComponent(\n root: ContentItem,\n config: LayoutConfig,\n closeOptions?: CloseOptions\n ): void {\n const stack = LayoutUtils.getStackForRoot(\n root,\n config,\n false,\n false,\n false\n );\n\n if (!stack) {\n log.warn('Cannot find stack for component, ignoring close', config);\n return;\n }\n\n // Find the tab with the specified config and remove it\n // Same component was used to get the stack above, so getContentItemInStack shouldn't return null\n const oldContentItem = LayoutUtils.getContentItemInStack(stack, config);\n const maintainFocusElement = document.activeElement; // attempt to retain focus after dom manipulation, which can break focus\n if (oldContentItem) {\n if (isComponent(oldContentItem)) {\n oldContentItem.container.close(closeOptions);\n } else {\n stack.removeChild(oldContentItem);\n }\n }\n // if focused element is still in dom restore focus, note it could have been in the removed panel so check first\n if (\n maintainFocusElement &&\n document.contains(maintainFocusElement) &&\n isHTMLElement(maintainFocusElement)\n ) {\n maintainFocusElement.focus();\n }\n }\n\n static renameComponent(\n root: ContentItem,\n config: Partial<ItemConfig>,\n newTitle: string\n ): void {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return;\n }\n // Find the tab with the specified config and rename it\n const contentItem = LayoutUtils.getContentItemInStack(stack, config);\n if (contentItem) {\n contentItem.setTitle(newTitle);\n }\n }\n\n /**\n * Create a component clone based on the given config\n * @param root The GoldenLayout root to clone the component in\n * @param config The config to clone\n * @returns Clone config\n */\n static cloneComponent(\n root: ContentItem,\n config: ReactComponentConfig\n ): ReactComponentConfig | null {\n const stack = LayoutUtils.getStackForRoot(root, config, false);\n if (!stack) {\n log.error('Could not find stack for config', config);\n return null;\n }\n const { props = {} } = config;\n const panelState = LayoutUtils.getPanelComponentState(config);\n const cloneConfig = {\n type: 'react-component' as const,\n component: config.component,\n props: {\n ...props,\n panelState,\n },\n title: `${config.title} Copy`,\n id: nanoid(),\n };\n LayoutUtils.openComponentInStack(stack, cloneConfig);\n return cloneConfig;\n }\n\n /**\n * Get panel component state for the given config\n * @param config Panel config\n * @returns Panel state\n */\n static getPanelComponentState(config: ItemConfig): unknown {\n if (isComponentConfig(config)) {\n return config.componentState?.panelState;\n }\n if (isReactComponentConfig(config)) {\n return config.props?.panelState;\n }\n return null;\n }\n\n static makeDefaultLayout(): Config {\n return {\n dimensions: {\n headerHeight: GoldenLayoutThemeExport.tabHeight,\n borderWidth: GoldenLayoutThemeExport.dragBorderWidth,\n borderGrabWidth: 10,\n },\n settings: {\n showPopoutIcon: false,\n showCloseIcon: false,\n constrainDragToContainer: false,\n },\n } as Config;\n }\n\n /**\n * Gets a containers root node\n * @param container The Golden Layout container to get the root for\n */\n static getRootFromContainer(container: Container): ContentItem {\n return container.layoutManager.root;\n }\n\n /**\n * Gets the config for the panel component given a glContainer\n * @param container The Golden Layout container to get the config for\n */\n static getComponentConfigFromContainer(\n container?: Container\n ): ItemConfig | null {\n if (container) {\n if (container.tab != null && container.tab.contentItem != null) {\n return container.tab.contentItem.config;\n }\n\n // If the container hasn't populated the tab yet, just get the config directly from the container\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore private api usage\n // eslint-disable-next-line no-underscore-dangle\n return container._config;\n }\n\n return null;\n }\n\n static getTitleFromContainer(\n container: Container\n ): string | null | undefined {\n if (\n container != null &&\n container.tab != null &&\n container.tab.contentItem != null\n ) {\n return container.tab.contentItem.config.title;\n }\n return null;\n }\n\n static getTitleFromTab(tab: Tab): string | null | undefined {\n if (tab != null && tab.contentItem != null) {\n return tab.contentItem.config.title;\n }\n return null;\n }\n\n /**\n * Retrieve the panel ID for the provided golden layout container\n * @param glContainer The container to get the panel ID for\n * @returns Panel ID\n */\n static getIdFromContainer(\n glContainer: Container\n ): string | string[] | null | undefined {\n const config = LayoutUtils.getComponentConfigFromContainer(glContainer);\n if (config) {\n return config.id;\n }\n return null;\n }\n\n /**\n * Retrieve the ID of the panel provided\n * @param panel The panel to get the ID for\n * @returns Panel ID\n */\n static getIdFromPanel(\n panel: LayoutPanel\n ): string | string[] | null | undefined {\n const { glContainer } = panel.props;\n return LayoutUtils.getIdFromContainer(glContainer);\n }\n\n /**\n * Get component name from the panel instance\n * @param panel Panel to get component name for\n * @returns Component name or null if unable to retrieve name\n */\n static getComponentNameFromPanel(panel: LayoutPanel): string | null {\n const { glContainer } = panel.props;\n const config = LayoutUtils.getComponentConfigFromContainer(glContainer);\n if (config && isReactComponentConfig(config)) {\n return config.component ?? null;\n }\n return null;\n }\n\n /**\n * Get component name for wrapped and un-wrapped components\n * @param component Component to get name for\n * @returns Component name\n * @throws If displayName for the component is not defined\n */\n static getComponentName(component: {\n displayName?: string;\n WrappedComponent?: { displayName?: string };\n }): string {\n const name =\n component.WrappedComponent?.displayName ?? component.displayName;\n if (name == null) {\n throw new Error(`Component displayName not defined ${component}`);\n }\n return name;\n }\n\n /**\n * Put focus on the first \"input\" element (input, button, select, textarea) within an element\n * If element is null or input element not found, does nothing\n * @param element The element to put focus in.\n * @param selector The first element matching this selector will be focused.\n * @returns The element that was focused, null if not focused\n */\n static focusElement(\n element: Element,\n selector = LayoutUtils.DEFAULT_FOCUS_SELECTOR\n ): Element | null {\n if (element == null) {\n return null;\n }\n const focusElement = element.querySelector(selector);\n if (focusElement == null) {\n return null;\n }\n\n if (isHTMLElement(focusElement)) {\n focusElement.focus();\n }\n return focusElement;\n }\n\n /**\n * Get a promise that initializes when layout is initialized\n * @param layout The layout to await initialization on\n * @returns Promise that resolves when layout is initialized\n */\n static onInitialized(layout: GoldenLayout): Promise<void> {\n return new Promise(resolve => {\n if (layout.isInitialised) {\n resolve();\n return;\n }\n const onInit = (): void => {\n layout.off('initialised', onInit);\n resolve();\n };\n layout.on('initialised', onInit);\n });\n }\n}\n\nexport default LayoutUtils;\n"],"mappings":";;;;;AAAA,OAAOA,SAAS,MAAM,iBAAiB;AACvC,SAASC,MAAM,QAAQ,QAAQ;AAC/B,OAAOC,OAAO,MAAM,gBAAgB;AACpC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SACEC,WAAW,EACXC,MAAM,EACNC,OAAO,EACPC,uBAAuB,QAElB,0BAA0B;AAYjC,SAASC,aAAa,QAAQ,kBAAkB;AAIhD,IAAMC,GAAG,GAAGN,GAAG,CAACO,MAAM,CAAC,aAAa,CAAC;AAYrC,SAASC,iBAAiBA,CAACC,MAAkB,EAA6B;EACxE,OAAQA,MAAM,CAAqBC,aAAa,KAAKC,SAAS;AAChE;AAEA,OAAO,SAASC,sBAAsBA,CACpCH,MAAkB,EACc;EAChC,IAAMI,WAAW,GAAGJ,MAA8B;EAClD;EACA;EACA,OACE,CAAED,iBAAiB,CAACC,MAAM,CAAC,IACzBA,MAAM,CAACC,aAAa,KAAK,oBAAoB,IAC7CD,MAAM,CAACK,IAAI,KAAK,iBAAiB,KACnCD,WAAW,CAACE,SAAS,KAAKJ,SAAS;AAEvC;AAEA,SAASK,aAAaA,CAACC,OAAgB,EAA0B;EAC/D,OAAQA,OAAO,CAAiBC,KAAK,KAAKP,SAAS;AACrD;AAEA,SAASQ,iBAAiBA,CAACV,MAAkB,EAA6B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M,CAAC4B,EAAE,CAAC,aAAa,EAAEqD,MAAM,CAAC;IAClC,CAAC,CAAC;EACJ;AACF;AAACC,eAAA,CA/0BKlK,WAAW,4BACiB,iCAAiC;AAg1BnE,eAAeA,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDashboardPanel.d.ts","sourceRoot":"","sources":["../../src/layout/useDashboardPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,OAAO,CAAC;AAGnD,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAE7B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAM5B;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,EACA,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,OAAO,EACP,SAAS,GACV,EAAE;IACD,iEAAiE;IACjE,cAAc,EAAE,6BAA6B,CAAC;IAE9C,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IAEtB,iCAAiC;IACjC,SAAS,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEpC,iEAAiE;IACjE,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAElC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,oFAAoF;IACpF,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC,GAAG,IAAI,CA4CP;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"useDashboardPanel.d.ts","sourceRoot":"","sources":["../../src/layout/useDashboardPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,OAAO,CAAC;AAGnD,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAE7B,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAK5B;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,EACA,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,OAAO,EACP,SAAS,GACV,EAAE;IACD,iEAAiE;IACjE,cAAc,EAAE,6BAA6B,CAAC;IAE9C,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IAEtB,iCAAiC;IACjC,SAAS,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEpC,iEAAiE;IACjE,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAElC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B,oFAAoF;IACpF,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC,GAAG,IAAI,CA4CP;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { useCallback } from 'react';
2
2
  import { nanoid } from 'nanoid';
3
- import PanelEvent from "../PanelEvent.js";
3
+ import { usePanelOpenListener } from "../PanelEvent.js";
4
4
  import LayoutUtils from "./LayoutUtils.js";
5
- import useListener from "./useListener.js";
6
5
  import usePanelRegistration from "./usePanelRegistration.js";
7
6
  /**
8
7
  * Register a panel that will be opened when one of the `supportedTypes` objects is triggered.
@@ -68,7 +67,7 @@ export function useDashboardPanel(_ref) {
68
67
  /**
69
68
  * Listen for panel open events so we know when to open a panel
70
69
  */
71
- useListener(layout.eventHub, PanelEvent.OPEN, handlePanelOpen);
70
+ usePanelOpenListener(layout.eventHub, handlePanelOpen);
72
71
  }
73
72
  export default useDashboardPanel;
74
73
  //# sourceMappingURL=useDashboardPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDashboardPanel.js","names":["useCallback","nanoid","PanelEvent","LayoutUtils","useListener","usePanelRegistration","useDashboardPanel","_ref","dashboardProps","componentName","component","supportedTypes","hydrate","dehydrate","id","layout","registerComponent","handlePanelOpen","_ref2","dragEvent","panelId","widget","name","type","isSupportedType","Array","isArray","includes","props","localDashboardId","metadata","config","title","undefined","root","openComponent","eventHub","OPEN"],"sources":["../../src/layout/useDashboardPanel.ts"],"sourcesContent":["import { ComponentType, useCallback } from 'react';\nimport type { ReactComponentConfig } from '@deephaven/golden-layout';\nimport { nanoid } from 'nanoid';\nimport {\n DashboardPanelProps,\n DashboardPluginComponentProps,\n DehydratedDashboardPanelProps,\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n} from '../DashboardPlugin';\nimport PanelEvent, { PanelOpenEventDetail } from '../PanelEvent';\nimport LayoutUtils from './LayoutUtils';\nimport useListener from './useListener';\nimport usePanelRegistration from './usePanelRegistration';\n\n/**\n * Register a panel that will be opened when one of the `supportedTypes` objects is triggered.\n */\nexport function useDashboardPanel<\n P extends DashboardPanelProps,\n C extends ComponentType<P>,\n>({\n dashboardProps,\n componentName,\n component,\n supportedTypes,\n hydrate,\n dehydrate,\n}: {\n /** Props from the dashboard this panel is being registered in */\n dashboardProps: DashboardPluginComponentProps;\n\n /** Name of the component to register */\n componentName: string;\n\n /** Component type to register */\n component: PanelComponentType<P, C>;\n\n /** Names of the supported variable types this panel opens for */\n supportedTypes: string | string[];\n\n /** Custom hydration function to call when opening a panel */\n hydrate?: PanelHydrateFunction;\n\n /** Custom dehydration function to call when saving a panel's state to the layout */\n dehydrate?: PanelDehydrateFunction;\n}): void {\n const { id, layout, registerComponent } = dashboardProps;\n\n const handlePanelOpen = useCallback(\n ({ dragEvent, panelId = nanoid(), widget }: PanelOpenEventDetail) => {\n const { name, type } = widget;\n const isSupportedType =\n type != null &&\n ((Array.isArray(supportedTypes) && supportedTypes.includes(type)) ||\n type === supportedTypes);\n if (!isSupportedType) {\n // Only want to listen for your custom variable types\n return;\n }\n let props: DehydratedDashboardPanelProps = {\n localDashboardId: id,\n metadata: widget,\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 ?? undefined,\n id: panelId,\n };\n\n const { root } = layout;\n LayoutUtils.openComponent({ root, config, dragEvent });\n },\n [componentName, hydrate, id, layout, supportedTypes]\n );\n\n /**\n * Register our custom component type so the layout know hows to open it\n */\n usePanelRegistration(registerComponent, component, hydrate, dehydrate);\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 useDashboardPanel;\n"],"mappings":"AAAA,SAAwBA,WAAW,QAAQ,OAAO;AAElD,SAASC,MAAM,QAAQ,QAAQ;AAAC,OASzBC,UAAU;AAAA,OACVC,WAAW;AAAA,OACXC,WAAW;AAAA,OACXC,oBAAoB;AAE3B;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAAC,IAAA,EA4BxB;EAAA,IAzBP;IACAC,cAAc;IACdC,aAAa;IACbC,SAAS;IACTC,cAAc;IACdC,OAAO;IACPC;EAmBF,CAAC,GAAAN,IAAA;EACC,IAAM;IAAEO,EAAE;IAAEC,MAAM;IAAEC;EAAkB,CAAC,GAAGR,cAAc;EAExD,IAAMS,eAAe,GAAGjB,WAAW,CACjCkB,KAAA,IAAqE;IAAA,IAApE;MAAEC,SAAS;MAAEC,OAAO,GAAGnB,MAAM,CAAC,CAAC;MAAEoB;IAA6B,CAAC,GAAAH,KAAA;IAC9D,IAAM;MAAEI,IAAI;MAAEC;IAAK,CAAC,GAAGF,MAAM;IAC7B,IAAMG,eAAe,GACnBD,IAAI,IAAI,IAAI,KACVE,KAAK,CAACC,OAAO,CAACf,cAAc,CAAC,IAAIA,cAAc,CAACgB,QAAQ,CAACJ,IAAI,CAAC,IAC9DA,IAAI,KAAKZ,cAAc,CAAC;IAC5B,IAAI,CAACa,eAAe,EAAE;MACpB;MACA;IACF;IACA,IAAII,KAAoC,GAAG;MACzCC,gBAAgB,EAAEf,EAAE;MACpBgB,QAAQ,EAAET;IACZ,CAAC;IACD,IAAIT,OAAO,IAAI,IAAI,EAAE;MACnBgB,KAAK,GAAGhB,OAAO,CAACgB,KAAK,EAAEd,EAAE,CAAC;IAC5B;IACA,IAAMiB,MAA4B,GAAG;MACnCR,IAAI,EAAE,iBAAiB;MACvBb,SAAS,EAAED,aAAa;MACxBmB,KAAK;MACLI,KAAK,EAAEV,IAAI,aAAJA,IAAI,cAAJA,IAAI,GAAIW,SAAS;MACxBnB,EAAE,EAAEM;IACN,CAAC;IAED,IAAM;MAAEc;IAAK,CAAC,GAAGnB,MAAM;IACvBZ,WAAW,CAACgC,aAAa,CAAC;MAAED,IAAI;MAAEH,MAAM;MAAEZ;IAAU,CAAC,CAAC;EACxD,CAAC,EACD,CAACV,aAAa,EAAEG,OAAO,EAAEE,EAAE,EAAEC,MAAM,EAAEJ,cAAc,CACrD,CAAC;;EAED;AACF;AACA;EACEN,oBAAoB,CAACW,iBAAiB,EAAEN,SAAS,EAAEE,OAAO,EAAEC,SAAS,CAAC;;EAEtE;AACF;AACA;EACET,WAAW,CAACW,MAAM,CAACqB,QAAQ,EAAElC,UAAU,CAACmC,IAAI,EAAEpB,eAAe,CAAC;AAChE;AAEA,eAAeX,iBAAiB"}
1
+ {"version":3,"file":"useDashboardPanel.js","names":["useCallback","nanoid","usePanelOpenListener","LayoutUtils","usePanelRegistration","useDashboardPanel","_ref","dashboardProps","componentName","component","supportedTypes","hydrate","dehydrate","id","layout","registerComponent","handlePanelOpen","_ref2","dragEvent","panelId","widget","name","type","isSupportedType","Array","isArray","includes","props","localDashboardId","metadata","config","title","undefined","root","openComponent","eventHub"],"sources":["../../src/layout/useDashboardPanel.ts"],"sourcesContent":["import { ComponentType, useCallback } from 'react';\nimport type { ReactComponentConfig } from '@deephaven/golden-layout';\nimport { nanoid } from 'nanoid';\nimport {\n DashboardPanelProps,\n DashboardPluginComponentProps,\n DehydratedDashboardPanelProps,\n PanelComponentType,\n PanelDehydrateFunction,\n PanelHydrateFunction,\n} from '../DashboardPlugin';\nimport { PanelOpenEventDetail, usePanelOpenListener } from '../PanelEvent';\nimport LayoutUtils from './LayoutUtils';\nimport usePanelRegistration from './usePanelRegistration';\n\n/**\n * Register a panel that will be opened when one of the `supportedTypes` objects is triggered.\n */\nexport function useDashboardPanel<\n P extends DashboardPanelProps,\n C extends ComponentType<P>,\n>({\n dashboardProps,\n componentName,\n component,\n supportedTypes,\n hydrate,\n dehydrate,\n}: {\n /** Props from the dashboard this panel is being registered in */\n dashboardProps: DashboardPluginComponentProps;\n\n /** Name of the component to register */\n componentName: string;\n\n /** Component type to register */\n component: PanelComponentType<P, C>;\n\n /** Names of the supported variable types this panel opens for */\n supportedTypes: string | string[];\n\n /** Custom hydration function to call when opening a panel */\n hydrate?: PanelHydrateFunction;\n\n /** Custom dehydration function to call when saving a panel's state to the layout */\n dehydrate?: PanelDehydrateFunction;\n}): void {\n const { id, layout, registerComponent } = dashboardProps;\n\n const handlePanelOpen = useCallback(\n ({ dragEvent, panelId = nanoid(), widget }: PanelOpenEventDetail) => {\n const { name, type } = widget;\n const isSupportedType =\n type != null &&\n ((Array.isArray(supportedTypes) && supportedTypes.includes(type)) ||\n type === supportedTypes);\n if (!isSupportedType) {\n // Only want to listen for your custom variable types\n return;\n }\n let props: DehydratedDashboardPanelProps = {\n localDashboardId: id,\n metadata: widget,\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 ?? undefined,\n id: panelId,\n };\n\n const { root } = layout;\n LayoutUtils.openComponent({ root, config, dragEvent });\n },\n [componentName, hydrate, id, layout, supportedTypes]\n );\n\n /**\n * Register our custom component type so the layout know hows to open it\n */\n usePanelRegistration(registerComponent, component, hydrate, dehydrate);\n\n /**\n * Listen for panel open events so we know when to open a panel\n */\n usePanelOpenListener(layout.eventHub, handlePanelOpen);\n}\n\nexport default useDashboardPanel;\n"],"mappings":"AAAA,SAAwBA,WAAW,QAAQ,OAAO;AAElD,SAASC,MA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MAAM;MAAEZ;IAAU,CAAC,CAAC;EACxD,CAAC,EACD,CAACV,aAAa,EAAEG,OAAO,EAAEE,EAAE,EAAEC,MAAM,EAAEJ,cAAc,CACrD,CAAC;;EAED;AACF;AACA;EACEN,oBAAoB,CAACW,iBAAiB,EAAEN,SAAS,EAAEE,OAAO,EAAEC,SAAS,CAAC;;EAEtE;AACF;AACA;EACEV,oBAAoB,CAACY,MAAM,CAACqB,QAAQ,EAAEnB,eAAe,CAAC;AACxD;AAEA,eAAeX,iBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/dashboard",
3
- "version": "0.85.3-beta.3+58ee88dc",
3
+ "version": "0.86.0",
4
4
  "description": "Deephaven Dashboard",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,12 +22,12 @@
22
22
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^0.85.3-beta.3+58ee88dc",
26
- "@deephaven/golden-layout": "^0.85.3-beta.3+58ee88dc",
27
- "@deephaven/log": "^0.85.3-beta.3+58ee88dc",
28
- "@deephaven/react-hooks": "^0.85.3-beta.3+58ee88dc",
29
- "@deephaven/redux": "^0.85.3-beta.3+58ee88dc",
30
- "@deephaven/utils": "^0.85.3-beta.3+58ee88dc",
25
+ "@deephaven/components": "^0.86.0",
26
+ "@deephaven/golden-layout": "^0.86.0",
27
+ "@deephaven/log": "^0.86.0",
28
+ "@deephaven/react-hooks": "^0.86.0",
29
+ "@deephaven/redux": "^0.86.0",
30
+ "@deephaven/utils": "^0.86.0",
31
31
  "fast-deep-equal": "^3.1.3",
32
32
  "lodash.ismatch": "^4.1.1",
33
33
  "lodash.throttle": "^4.1.1",
@@ -37,11 +37,10 @@
37
37
  "peerDependencies": {
38
38
  "react": ">=16.8.0",
39
39
  "react-dom": ">=16.8.0",
40
- "react-is": ">=16.8.0",
41
40
  "react-redux": "^7.2.4"
42
41
  },
43
42
  "devDependencies": {
44
- "@deephaven/mocks": "^0.85.3-beta.3+58ee88dc",
43
+ "@deephaven/mocks": "^0.86.0",
45
44
  "@types/lodash.ismatch": "^4.4.0"
46
45
  },
47
46
  "files": [
@@ -50,5 +49,5 @@
50
49
  "publishConfig": {
51
50
  "access": "public"
52
51
  },
53
- "gitHead": "58ee88dc92bfe9a283ebc789c93f23639a954ba3"
52
+ "gitHead": "958b0119480f0ec1a4683bf0020f9934637654fe"
54
53
  }